RTEMS 4.10.2Annotated Report
Tue Dec 13 12:58:06 2011
0010fe58 <IMFS_Set_handlers>:
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
10fe58: 55 push %ebp
10fe59: 89 e5 mov %esp,%ebp
10fe5b: 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;
10fe5e: 8b 50 10 mov 0x10(%eax),%edx
10fe61: 8b 4a 34 mov 0x34(%edx),%ecx
switch( node->type ) {
10fe64: 8b 10 mov (%eax),%edx
10fe66: 83 7a 4c 07 cmpl $0x7,0x4c(%edx)
10fe6a: 77 12 ja 10fe7e <IMFS_Set_handlers+0x26><== NEVER TAKEN
10fe6c: 8b 52 4c mov 0x4c(%edx),%edx
10fe6f: ff 24 95 34 2f 12 00 jmp *0x122f34(,%edx,4)
10fe76: 66 90 xchg %ax,%ax
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
10fe78: 8b 51 0c mov 0xc(%ecx),%edx
10fe7b: 89 50 08 mov %edx,0x8(%eax)
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
10fe7e: 31 c0 xor %eax,%eax
10fe80: c9 leave
10fe81: c3 ret
10fe82: 66 90 xchg %ax,%ax
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
10fe84: 8b 51 08 mov 0x8(%ecx),%edx
10fe87: 89 50 08 mov %edx,0x8(%eax)
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
10fe8a: 31 c0 xor %eax,%eax
10fe8c: c9 leave
10fe8d: c3 ret
10fe8e: 66 90 xchg %ax,%ax
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
10fe90: c7 40 08 00 31 12 00 movl $0x123100,0x8(%eax)
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
10fe97: 31 c0 xor %eax,%eax
10fe99: c9 leave
10fe9a: c3 ret
10fe9b: 90 nop
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = &IMFS_fifo_handlers;
10fe9c: c7 40 08 c0 2f 12 00 movl $0x122fc0,0x8(%eax)
break;
}
return 0;
}
10fea3: 31 c0 xor %eax,%eax
10fea5: c9 leave
10fea6: c3 ret
10fea7: 90 nop
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
10fea8: c7 40 08 80 30 12 00 movl $0x123080,0x8(%eax)
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
10feaf: 31 c0 xor %eax,%eax
10feb1: c9 leave
10feb2: c3 ret
0010fca8 <IMFS_allocate_node>:
IMFS_jnode_t *IMFS_allocate_node(
IMFS_jnode_types_t type,
const char *name,
mode_t mode
)
{
10fca8: 55 push %ebp
10fca9: 89 e5 mov %esp,%ebp
10fcab: 53 push %ebx
10fcac: 83 ec 1c sub $0x1c,%esp
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
10fcaf: 6a 64 push $0x64
10fcb1: 6a 01 push $0x1
10fcb3: e8 14 87 ff ff call 1083cc <calloc>
10fcb8: 89 c3 mov %eax,%ebx
if ( !node )
10fcba: 83 c4 10 add $0x10,%esp
10fcbd: 85 c0 test %eax,%eax
10fcbf: 74 4f je 10fd10 <IMFS_allocate_node+0x68><== NEVER TAKEN
return NULL;
/*
* Fill in the basic information
*/
node->st_nlink = 1;
10fcc1: 66 c7 40 34 01 00 movw $0x1,0x34(%eax)
node->type = type;
10fcc7: 8b 45 08 mov 0x8(%ebp),%eax
10fcca: 89 43 4c mov %eax,0x4c(%ebx)
strncpy( node->name, name, IMFS_NAME_MAX );
10fccd: 51 push %ecx
10fcce: 6a 20 push $0x20
10fcd0: ff 75 0c pushl 0xc(%ebp)
10fcd3: 8d 43 0c lea 0xc(%ebx),%eax
10fcd6: 50 push %eax
10fcd7: e8 70 60 00 00 call 115d4c <strncpy>
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode;
10fcdc: 8b 45 10 mov 0x10(%ebp),%eax
10fcdf: 89 43 30 mov %eax,0x30(%ebx)
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
10fce2: e8 3d 11 00 00 call 110e24 <geteuid>
10fce7: 66 89 43 3c mov %ax,0x3c(%ebx)
node->st_gid = getegid();
10fceb: e8 24 11 00 00 call 110e14 <getegid>
10fcf0: 66 89 43 3e mov %ax,0x3e(%ebx)
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
10fcf4: 58 pop %eax
10fcf5: 5a pop %edx
10fcf6: 6a 00 push $0x0
10fcf8: 8d 45 f0 lea -0x10(%ebp),%eax
10fcfb: 50 push %eax
10fcfc: e8 5f 89 ff ff call 108660 <gettimeofday>
node->stat_atime = (time_t) tv.tv_sec;
10fd01: 8b 45 f0 mov -0x10(%ebp),%eax
10fd04: 89 43 40 mov %eax,0x40(%ebx)
node->stat_mtime = (time_t) tv.tv_sec;
10fd07: 89 43 44 mov %eax,0x44(%ebx)
node->stat_ctime = (time_t) tv.tv_sec;
10fd0a: 89 43 48 mov %eax,0x48(%ebx)
return node;
10fd0d: 83 c4 10 add $0x10,%esp
}
10fd10: 89 d8 mov %ebx,%eax
10fd12: 8b 5d fc mov -0x4(%ebp),%ebx
10fd15: c9 leave
10fd16: c3 ret
0010fc44 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
10fc44: 55 push %ebp
10fc45: 89 e5 mov %esp,%ebp
10fc47: 57 push %edi
10fc48: 56 push %esi
10fc49: 53 push %ebx
10fc4a: 83 ec 1c sub $0x1c,%esp
10fc4d: 8b 7d 0c mov 0xc(%ebp),%edi
10fc50: 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;
10fc53: 8b 45 08 mov 0x8(%ebp),%eax
10fc56: 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();
10fc58: e8 c7 11 00 00 call 110e24 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
10fc5d: 66 3b 43 3c cmp 0x3c(%ebx),%ax
10fc61: 74 05 je 10fc68 <IMFS_chown+0x24> <== ALWAYS TAKEN
10fc63: 66 85 c0 test %ax,%ax <== NOT EXECUTED
10fc66: 75 2c jne 10fc94 <IMFS_chown+0x50> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
10fc68: 66 89 7b 3c mov %di,0x3c(%ebx)
jnode->st_gid = group;
10fc6c: 66 89 73 3e mov %si,0x3e(%ebx)
IMFS_update_ctime( jnode );
10fc70: 83 ec 08 sub $0x8,%esp
10fc73: 6a 00 push $0x0
10fc75: 8d 45 e0 lea -0x20(%ebp),%eax
10fc78: 50 push %eax
10fc79: e8 e2 89 ff ff call 108660 <gettimeofday>
10fc7e: 8b 45 e0 mov -0x20(%ebp),%eax
10fc81: 89 43 48 mov %eax,0x48(%ebx)
10fc84: 31 c0 xor %eax,%eax
return 0;
10fc86: 83 c4 10 add $0x10,%esp
}
10fc89: 8d 65 f4 lea -0xc(%ebp),%esp
10fc8c: 5b pop %ebx
10fc8d: 5e pop %esi
10fc8e: 5f pop %edi
10fc8f: c9 leave
10fc90: c3 ret
10fc91: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
10fc94: e8 6b 54 00 00 call 115104 <__errno> <== NOT EXECUTED
10fc99: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
10fc9f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10fca4: eb e3 jmp 10fc89 <IMFS_chown+0x45> <== NOT EXECUTED
0010fd4c <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
10fd4c: 55 push %ebp
10fd4d: 89 e5 mov %esp,%ebp
10fd4f: 57 push %edi
10fd50: 56 push %esi
10fd51: 53 push %ebx
10fd52: 83 ec 1c sub $0x1c,%esp
10fd55: 8b 5d 08 mov 0x8(%ebp),%ebx
10fd58: 8b 75 0c mov 0xc(%ebp),%esi
10fd5b: 8b 7d 18 mov 0x18(%ebp),%edi
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
10fd5e: 85 db test %ebx,%ebx
10fd60: 75 0a jne 10fd6c <IMFS_create_node+0x20> <== ALWAYS TAKEN
10fd62: 31 c0 xor %eax,%eax
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
10fd64: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10fd67: 5b pop %ebx <== NOT EXECUTED
10fd68: 5e pop %esi <== NOT EXECUTED
10fd69: 5f pop %edi <== NOT EXECUTED
10fd6a: c9 leave <== NOT EXECUTED
10fd6b: c3 ret <== NOT EXECUTED
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
10fd6c: 50 push %eax
10fd6d: a1 24 70 12 00 mov 0x127024,%eax
10fd72: 8b 40 2c mov 0x2c(%eax),%eax
10fd75: f7 d0 not %eax
10fd77: 23 45 14 and 0x14(%ebp),%eax
10fd7a: 50 push %eax
10fd7b: ff 75 10 pushl 0x10(%ebp)
10fd7e: 56 push %esi
10fd7f: e8 24 ff ff ff call 10fca8 <IMFS_allocate_node>
if ( !node )
10fd84: 83 c4 10 add $0x10,%esp
10fd87: 85 c0 test %eax,%eax
10fd89: 74 d9 je 10fd64 <IMFS_create_node+0x18> <== NEVER TAKEN
return NULL;
/*
* Set the type specific information
*/
switch (type) {
10fd8b: 83 fe 07 cmp $0x7,%esi
10fd8e: 76 18 jbe 10fda8 <IMFS_create_node+0x5c> <== ALWAYS TAKEN
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
break;
default:
assert(0);
10fd90: 68 7a 28 12 00 push $0x12287a <== NOT EXECUTED
10fd95: 68 20 2f 12 00 push $0x122f20 <== NOT EXECUTED
10fd9a: 6a 5c push $0x5c <== NOT EXECUTED
10fd9c: 68 b0 2e 12 00 push $0x122eb0 <== NOT EXECUTED
10fda1: e8 fe 84 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
10fda6: 66 90 xchg %ax,%ax <== NOT EXECUTED
return NULL;
/*
* Set the type specific information
*/
switch (type) {
10fda8: ff 24 b5 00 2f 12 00 jmp *0x122f00(,%esi,4)
10fdaf: 90 nop
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;
10fdb0: 8b 17 mov (%edi),%edx
10fdb2: 89 50 50 mov %edx,0x50(%eax)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
10fdb5: 8b 13 mov (%ebx),%edx
fs_info = parent_loc->mt_entry->fs_info;
10fdb7: 8b 4b 10 mov 0x10(%ebx),%ecx
10fdba: 8b 59 34 mov 0x34(%ecx),%ebx
node->Parent = parent;
10fdbd: 89 50 08 mov %edx,0x8(%eax)
node->st_ino = ++fs_info->ino_count;
10fdc0: 8b 4b 04 mov 0x4(%ebx),%ecx
10fdc3: 41 inc %ecx
10fdc4: 89 4b 04 mov %ecx,0x4(%ebx)
10fdc7: 89 48 38 mov %ecx,0x38(%eax)
10fdca: 83 ec 08 sub $0x8,%esp
10fdcd: 50 push %eax
10fdce: 83 c2 50 add $0x50,%edx
10fdd1: 52 push %edx
10fdd2: 89 45 e4 mov %eax,-0x1c(%ebp)
10fdd5: e8 fa c7 ff ff call 10c5d4 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
10fdda: 83 c4 10 add $0x10,%esp
10fddd: 8b 45 e4 mov -0x1c(%ebp),%eax
}
10fde0: 8d 65 f4 lea -0xc(%ebp),%esp
10fde3: 5b pop %ebx
10fde4: 5e pop %esi
10fde5: 5f pop %edi
10fde6: c9 leave
10fde7: c3 ret
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
10fde8: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED
10fdef: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED
node->info.linearfile.direct = 0;
10fdf6: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
10fdfd: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
10fe04: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.file.indirect = 0;
10fe0b: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
node->info.file.doubly_indirect = 0;
10fe12: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
node->info.file.triply_indirect = 0;
10fe19: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
break;
10fe20: eb 93 jmp 10fdb5 <IMFS_create_node+0x69>
10fe22: 66 90 xchg %ax,%ax
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
10fe24: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
break;
10fe2b: eb 88 jmp 10fdb5 <IMFS_create_node+0x69>
10fe2d: 8d 76 00 lea 0x0(%esi),%esi
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
10fe30: 8b 17 mov (%edi),%edx
10fe32: 89 50 50 mov %edx,0x50(%eax)
node->info.device.minor = info->device.minor;
10fe35: 8b 57 04 mov 0x4(%edi),%edx
10fe38: 89 50 54 mov %edx,0x54(%eax)
break;
10fe3b: e9 75 ff ff ff jmp 10fdb5 <IMFS_create_node+0x69>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10fe40: 8d 50 54 lea 0x54(%eax),%edx
10fe43: 89 50 50 mov %edx,0x50(%eax)
the_chain->permanent_null = NULL;
10fe46: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
the_chain->last = _Chain_Head(the_chain);
10fe4d: 8d 50 50 lea 0x50(%eax),%edx
10fe50: 89 50 58 mov %edx,0x58(%eax)
10fe53: e9 5d ff ff ff jmp 10fdb5 <IMFS_create_node+0x69>
0010fd18 <IMFS_create_root_node>:
IMFS_jnode_t *IMFS_create_root_node(void)
{
10fd18: 55 push %ebp
10fd19: 89 e5 mov %esp,%ebp
10fd1b: 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) );
10fd1e: 68 ed 41 00 00 push $0x41ed
10fd23: 68 35 2b 12 00 push $0x122b35
10fd28: 6a 01 push $0x1
10fd2a: e8 79 ff ff ff call 10fca8 <IMFS_allocate_node>
if ( !node )
10fd2f: 83 c4 10 add $0x10,%esp
10fd32: 85 c0 test %eax,%eax
10fd34: 74 13 je 10fd49 <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);
10fd36: 8d 50 54 lea 0x54(%eax),%edx
10fd39: 89 50 50 mov %edx,0x50(%eax)
the_chain->permanent_null = NULL;
10fd3c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
the_chain->last = _Chain_Head(the_chain);
10fd43: 8d 50 50 lea 0x50(%eax),%edx
10fd46: 89 50 58 mov %edx,0x58(%eax)
* NOTE: Root node is always a directory.
*/
rtems_chain_initialize_empty(&node->info.directory.Entries);
return node;
}
10fd49: c9 leave
10fd4a: c3 ret
00109d64 <IMFS_dump_directory>:
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
109d64: 55 push %ebp
109d65: 89 e5 mov %esp,%ebp
109d67: 57 push %edi
109d68: 56 push %esi
109d69: 53 push %ebx
109d6a: 83 ec 1c sub $0x1c,%esp
109d6d: 8b 45 08 mov 0x8(%ebp),%eax
109d70: 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 );
109d73: 85 c0 test %eax,%eax
109d75: 74 7a je 109df1 <IMFS_dump_directory+0x8d><== NEVER TAKEN
assert( level >= 0 );
109d77: 85 f6 test %esi,%esi
109d79: 0f 88 a4 00 00 00 js 109e23 <IMFS_dump_directory+0xbf><== NEVER TAKEN
assert( the_directory->type == IMFS_DIRECTORY );
109d7f: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
109d83: 0f 85 81 00 00 00 jne 109e0a <IMFS_dump_directory+0xa6><== NEVER TAKEN
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
109d89: 8b 78 50 mov 0x50(%eax),%edi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
109d8c: 83 c0 54 add $0x54,%eax
109d8f: 89 45 e4 mov %eax,-0x1c(%ebp)
109d92: 39 c7 cmp %eax,%edi
109d94: 74 41 je 109dd7 <IMFS_dump_directory+0x73>
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 );
109d96: 8d 46 01 lea 0x1(%esi),%eax
109d99: 89 45 e0 mov %eax,-0x20(%ebp)
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
109d9c: 31 db xor %ebx,%ebx
109d9e: 66 90 xchg %ax,%ax
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
109da0: a1 e0 d3 12 00 mov 0x12d3e0,%eax
109da5: ff 70 08 pushl 0x8(%eax)
109da8: 6a 04 push $0x4
109daa: 6a 01 push $0x1
109dac: 68 d5 7e 12 00 push $0x127ed5
109db1: e8 7e fb 00 00 call 119934 <fwrite>
!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++ )
109db6: 43 inc %ebx
109db7: 83 c4 10 add $0x10,%esp
109dba: 39 de cmp %ebx,%esi
109dbc: 7d e2 jge 109da0 <IMFS_dump_directory+0x3c>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
109dbe: 83 ec 0c sub $0xc,%esp
109dc1: 57 push %edi
109dc2: e8 f5 fd ff ff call 109bbc <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
109dc7: 83 c4 10 add $0x10,%esp
109dca: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
109dce: 74 10 je 109de0 <IMFS_dump_directory+0x7c>
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 ) {
109dd0: 8b 3f mov (%edi),%edi
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
109dd2: 3b 7d e4 cmp -0x1c(%ebp),%edi
109dd5: 75 c5 jne 109d9c <IMFS_dump_directory+0x38>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
109dd7: 8d 65 f4 lea -0xc(%ebp),%esp
109dda: 5b pop %ebx
109ddb: 5e pop %esi
109ddc: 5f pop %edi
109ddd: c9 leave
109dde: c3 ret
109ddf: 90 nop
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 );
109de0: 83 ec 08 sub $0x8,%esp
109de3: ff 75 e0 pushl -0x20(%ebp)
109de6: 57 push %edi
109de7: e8 78 ff ff ff call 109d64 <IMFS_dump_directory>
109dec: 83 c4 10 add $0x10,%esp
109def: eb df jmp 109dd0 <IMFS_dump_directory+0x6c>
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
109df1: 68 bc 7e 12 00 push $0x127ebc <== NOT EXECUTED
109df6: 68 04 80 12 00 push $0x128004 <== NOT EXECUTED
109dfb: 68 84 00 00 00 push $0x84 <== NOT EXECUTED
109e00: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED
109e05: e8 92 07 00 00 call 10a59c <__assert_func> <== NOT EXECUTED
assert( level >= 0 );
assert( the_directory->type == IMFS_DIRECTORY );
109e0a: 68 48 7f 12 00 push $0x127f48 <== NOT EXECUTED
109e0f: 68 04 80 12 00 push $0x128004 <== NOT EXECUTED
109e14: 68 88 00 00 00 push $0x88 <== NOT EXECUTED
109e19: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED
109e1e: e8 79 07 00 00 call 10a59c <__assert_func> <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
assert( level >= 0 );
109e23: 68 ca 7e 12 00 push $0x127eca <== NOT EXECUTED
109e28: 68 04 80 12 00 push $0x128004 <== NOT EXECUTED
109e2d: 68 86 00 00 00 push $0x86 <== NOT EXECUTED
109e32: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED
109e37: e8 60 07 00 00 call 10a59c <__assert_func> <== NOT EXECUTED
00110018 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
110018: 55 push %ebp
110019: 89 e5 mov %esp,%ebp
11001b: 57 push %edi
11001c: 56 push %esi
11001d: 53 push %ebx
11001e: 83 ec 4c sub $0x4c,%esp
IMFS_token_types type = IMFS_CURRENT_DIR;
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
110021: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp)
110028: 0f 85 0b 03 00 00 jne 110339 <IMFS_eval_path+0x321> <== NEVER TAKEN
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
11002e: 8b 45 14 mov 0x14(%ebp),%eax
110031: 8b 38 mov (%eax),%edi
110033: 31 db xor %ebx,%ebx
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
110035: 8d 55 e4 lea -0x1c(%ebp),%edx
110038: 52 push %edx
110039: 8d 4d c3 lea -0x3d(%ebp),%ecx
11003c: 51 push %ecx
11003d: ff 75 0c pushl 0xc(%ebp)
110040: 8b 45 08 mov 0x8(%ebp),%eax
110043: 01 d8 add %ebx,%eax
110045: 50 push %eax
110046: e8 39 0a 00 00 call 110a84 <IMFS_get_token>
11004b: 89 c6 mov %eax,%esi
pathnamelen -= len;
11004d: 8b 55 e4 mov -0x1c(%ebp),%edx
i += len;
if ( !pathloc->node_access )
110050: 8b 4d 14 mov 0x14(%ebp),%ecx
110053: 8b 01 mov (%ecx),%eax
110055: 83 c4 10 add $0x10,%esp
110058: 85 c0 test %eax,%eax
11005a: 0f 84 14 02 00 00 je 110274 <IMFS_eval_path+0x25c> <== NEVER TAKEN
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
110060: 29 55 0c sub %edx,0xc(%ebp)
i += len;
110063: 01 d3 add %edx,%ebx
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
110065: 85 f6 test %esi,%esi
110067: 75 47 jne 1100b0 <IMFS_eval_path+0x98>
* 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 ) {
110069: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
11006d: 0f 84 9d 01 00 00 je 110210 <IMFS_eval_path+0x1f8>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
110073: 83 ec 0c sub $0xc,%esp
110076: ff 75 14 pushl 0x14(%ebp)
110079: e8 da fd ff ff call 10fe58 <IMFS_Set_handlers>
11007e: 89 c6 mov %eax,%esi
110080: 59 pop %ecx
110081: 5b pop %ebx
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
110082: ff 75 10 pushl 0x10(%ebp)
110085: ff 75 14 pushl 0x14(%ebp)
110088: e8 27 fe ff ff call 10feb4 <IMFS_evaluate_permission>
11008d: 83 c4 10 add $0x10,%esp
110090: 85 c0 test %eax,%eax
110092: 0f 85 d4 00 00 00 jne 11016c <IMFS_eval_path+0x154>
rtems_set_errno_and_return_minus_one( EACCES );
110098: e8 67 50 00 00 call 115104 <__errno>
11009d: c7 00 0d 00 00 00 movl $0xd,(%eax)
1100a3: be ff ff ff ff mov $0xffffffff,%esi
1100a8: e9 bf 00 00 00 jmp 11016c <IMFS_eval_path+0x154>
1100ad: 8d 76 00 lea 0x0(%esi),%esi
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
1100b0: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
1100b4: 0f 84 be 00 00 00 je 110178 <IMFS_eval_path+0x160>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
1100ba: 89 c7 mov %eax,%edi
switch( type ) {
1100bc: 83 fe 03 cmp $0x3,%esi
1100bf: 74 1b je 1100dc <IMFS_eval_path+0xc4>
1100c1: 83 fe 04 cmp $0x4,%esi
1100c4: 0f 84 92 00 00 00 je 11015c <IMFS_eval_path+0x144>
1100ca: 83 fe 02 cmp $0x2,%esi
1100cd: 74 59 je 110128 <IMFS_eval_path+0x110>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
1100cf: 83 fe 04 cmp $0x4,%esi
1100d2: 0f 85 5d ff ff ff jne 110035 <IMFS_eval_path+0x1d> <== ALWAYS TAKEN
1100d8: eb 8f jmp 110069 <IMFS_eval_path+0x51> <== NOT EXECUTED
1100da: 66 90 xchg %ax,%ax <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
1100dc: 8b 40 4c mov 0x4c(%eax),%eax
1100df: 83 f8 03 cmp $0x3,%eax
1100e2: 0f 84 68 01 00 00 je 110250 <IMFS_eval_path+0x238>
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
1100e8: 83 f8 04 cmp $0x4,%eax
1100eb: 0f 84 ef 01 00 00 je 1102e0 <IMFS_eval_path+0x2c8>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
1100f1: 48 dec %eax
1100f2: 0f 85 d3 01 00 00 jne 1102cb <IMFS_eval_path+0x2b3>
/*
* Find the token name in the current node.
*/
node = IMFS_find_match_in_dir( node, token );
1100f8: 83 ec 08 sub $0x8,%esp
1100fb: 8d 45 c3 lea -0x3d(%ebp),%eax
1100fe: 50 push %eax
1100ff: 57 push %edi
110100: e8 ef 08 00 00 call 1109f4 <IMFS_find_match_in_dir>
110105: 89 c7 mov %eax,%edi
if ( !node )
110107: 83 c4 10 add $0x10,%esp
11010a: 85 c0 test %eax,%eax
11010c: 0f 84 62 01 00 00 je 110274 <IMFS_eval_path+0x25c>
* file system and not the IMFS. For example the IMFS length is
* limited. If the token is a parent directory move back up otherwise
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
110112: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
110116: 0f 84 80 00 00 00 je 11019c <IMFS_eval_path+0x184>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
11011c: 8b 4d 14 mov 0x14(%ebp),%ecx
11011f: 89 39 mov %edi,(%ecx)
break;
110121: e9 0f ff ff ff jmp 110035 <IMFS_eval_path+0x1d>
110126: 66 90 xchg %ax,%ax
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
110128: 8b 15 24 70 12 00 mov 0x127024,%edx
11012e: 39 42 18 cmp %eax,0x18(%edx)
110131: 0f 84 fe fe ff ff je 110035 <IMFS_eval_path+0x1d>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
110137: 8b 4d 14 mov 0x14(%ebp),%ecx
11013a: 8b 51 10 mov 0x10(%ecx),%edx
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
11013d: 39 42 1c cmp %eax,0x1c(%edx)
110140: 0f 84 bf 01 00 00 je 110305 <IMFS_eval_path+0x2ed>
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
110146: 8b 78 08 mov 0x8(%eax),%edi
110149: 85 ff test %edi,%edi
11014b: 0f 84 23 01 00 00 je 110274 <IMFS_eval_path+0x25c>
rtems_set_errno_and_return_minus_one( ENOENT );
node = node->Parent;
}
pathloc->node_access = node;
110151: 8b 45 14 mov 0x14(%ebp),%eax
110154: 89 38 mov %edi,(%eax)
break;
110156: e9 da fe ff ff jmp 110035 <IMFS_eval_path+0x1d>
11015b: 90 nop
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
11015c: e8 a3 4f 00 00 call 115104 <__errno>
110161: c7 00 5b 00 00 00 movl $0x5b,(%eax)
110167: be ff ff ff ff mov $0xffffffff,%esi
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
11016c: 89 f0 mov %esi,%eax
11016e: 8d 65 f4 lea -0xc(%ebp),%esp
110171: 5b pop %ebx
110172: 5e pop %esi
110173: 5f pop %edi
110174: c9 leave
110175: c3 ret
110176: 66 90 xchg %ax,%ax
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
110178: 83 ec 08 sub $0x8,%esp
11017b: 6a 01 push $0x1
11017d: ff 75 14 pushl 0x14(%ebp)
110180: e8 2f fd ff ff call 10feb4 <IMFS_evaluate_permission>
110185: 83 c4 10 add $0x10,%esp
110188: 85 c0 test %eax,%eax
11018a: 0f 84 08 ff ff ff je 110098 <IMFS_eval_path+0x80>
110190: 8b 55 14 mov 0x14(%ebp),%edx
110193: 8b 02 mov (%edx),%eax
110195: e9 20 ff ff ff jmp 1100ba <IMFS_eval_path+0xa2>
11019a: 66 90 xchg %ax,%ax
* file system and not the IMFS. For example the IMFS length is
* limited. If the token is a parent directory move back up otherwise
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
11019c: 8b 70 5c mov 0x5c(%eax),%esi
11019f: 85 f6 test %esi,%esi
1101a1: 0f 84 75 ff ff ff je 11011c <IMFS_eval_path+0x104>
1101a7: 8b 75 08 mov 0x8(%ebp),%esi
1101aa: 01 de add %ebx,%esi
1101ac: 89 45 b0 mov %eax,-0x50(%ebp)
1101af: 8b 7d 0c mov 0xc(%ebp),%edi
1101b2: eb 15 jmp 1101c9 <IMFS_eval_path+0x1b1>
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
1101b4: 8a 06 mov (%esi),%al
1101b6: 84 c0 test %al,%al
1101b8: 0f 84 ce 00 00 00 je 11028c <IMFS_eval_path+0x274>
1101be: 46 inc %esi
1101bf: 85 ff test %edi,%edi
1101c1: 0f 84 f9 00 00 00 je 1102c0 <IMFS_eval_path+0x2a8> <== NEVER TAKEN
++(*index);
1101c7: 43 inc %ebx
--(*len);
1101c8: 4f dec %edi
1101c9: 89 75 b4 mov %esi,-0x4c(%ebp)
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
1101cc: 83 ec 0c sub $0xc,%esp
1101cf: 0f be 06 movsbl (%esi),%eax
1101d2: 50 push %eax
1101d3: e8 d4 92 ff ff call 1094ac <rtems_filesystem_is_separator>
1101d8: 83 c4 10 add $0x10,%esp
1101db: 85 c0 test %eax,%eax
1101dd: 75 d5 jne 1101b4 <IMFS_eval_path+0x19c>
1101df: 89 7d 0c mov %edi,0xc(%ebp)
1101e2: 8b 7d b0 mov -0x50(%ebp),%edi
1101e5: 8b 55 b4 mov -0x4c(%ebp),%edx
1101e8: 8a 02 mov (%edx),%al
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
1101ea: 3c 2e cmp $0x2e,%al
1101ec: 0f 85 a0 00 00 00 jne 110292 <IMFS_eval_path+0x27a>
1101f2: 8b 4d 08 mov 0x8(%ebp),%ecx
1101f5: 80 7c 19 01 2e cmpb $0x2e,0x1(%ecx,%ebx,1)
1101fa: 0f 85 92 00 00 00 jne 110292 <IMFS_eval_path+0x27a>
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalpath_h)( &pathname[i],
pathnamelen,
flags, pathloc );
}
i += 2;
110200: 83 c3 02 add $0x2,%ebx
pathnamelen -= 2;
110203: 83 6d 0c 02 subl $0x2,0xc(%ebp)
node = node->Parent;
110207: 8b 7f 08 mov 0x8(%edi),%edi
11020a: e9 0d ff ff ff jmp 11011c <IMFS_eval_path+0x104>
11020f: 90 nop
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
110210: 8b 70 5c mov 0x5c(%eax),%esi
110213: 85 f6 test %esi,%esi
110215: 0f 84 58 fe ff ff je 110073 <IMFS_eval_path+0x5b> <== ALWAYS TAKEN
*pathloc = node->info.directory.mt_fs->mt_fs_root;
11021b: 83 c6 1c add $0x1c,%esi <== NOT EXECUTED
11021e: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED
110223: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
110226: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
110228: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
11022b: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
11022e: 8b 41 0c mov 0xc(%ecx),%eax <== NOT EXECUTED
110231: 51 push %ecx <== NOT EXECUTED
110232: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
110235: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
110238: 01 d1 add %edx,%ecx <== NOT EXECUTED
11023a: 51 push %ecx <== NOT EXECUTED
11023b: 29 d3 sub %edx,%ebx <== NOT EXECUTED
11023d: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
110240: 01 da add %ebx,%edx <== NOT EXECUTED
110242: 52 push %edx <== NOT EXECUTED
110243: ff 10 call *(%eax) <== NOT EXECUTED
110245: 89 c6 mov %eax,%esi <== NOT EXECUTED
110247: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11024a: e9 1d ff ff ff jmp 11016c <IMFS_eval_path+0x154> <== NOT EXECUTED
11024f: 90 nop <== NOT EXECUTED
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
110250: 83 ec 08 sub $0x8,%esp
110253: 6a 00 push $0x0
110255: ff 75 14 pushl 0x14(%ebp)
110258: e8 c3 fc ff ff call 10ff20 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
11025d: 8b 55 14 mov 0x14(%ebp),%edx
110260: 8b 3a mov (%edx),%edi
if ( !node )
110262: 83 c4 10 add $0x10,%esp
110265: 85 ff test %edi,%edi
110267: 74 62 je 1102cb <IMFS_eval_path+0x2b3> <== NEVER TAKEN
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
110269: 8b 47 4c mov 0x4c(%edi),%eax
11026c: e9 80 fe ff ff jmp 1100f1 <IMFS_eval_path+0xd9>
110271: 8d 76 00 lea 0x0(%esi),%esi
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
110274: e8 8b 4e 00 00 call 115104 <__errno>
110279: c7 00 02 00 00 00 movl $0x2,(%eax)
11027f: be ff ff ff ff mov $0xffffffff,%esi
110284: e9 e3 fe ff ff jmp 11016c <IMFS_eval_path+0x154>
110289: 8d 76 00 lea 0x0(%esi),%esi
11028c: 89 7d 0c mov %edi,0xc(%ebp)
11028f: 8b 7d b0 mov -0x50(%ebp),%edi
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
110292: 8b 77 5c mov 0x5c(%edi),%esi
110295: 83 c6 1c add $0x1c,%esi
110298: b9 05 00 00 00 mov $0x5,%ecx
11029d: 8b 7d 14 mov 0x14(%ebp),%edi
1102a0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalpath_h)( &pathname[i],
1102a2: 8b 55 14 mov 0x14(%ebp),%edx
1102a5: 8b 42 0c mov 0xc(%edx),%eax
1102a8: 52 push %edx
1102a9: ff 75 10 pushl 0x10(%ebp)
1102ac: ff 75 0c pushl 0xc(%ebp)
1102af: ff 75 b4 pushl -0x4c(%ebp)
1102b2: ff 10 call *(%eax)
1102b4: 89 c6 mov %eax,%esi
1102b6: 83 c4 10 add $0x10,%esp
1102b9: e9 ae fe ff ff jmp 11016c <IMFS_eval_path+0x154>
1102be: 66 90 xchg %ax,%ax
1102c0: 89 7d 0c mov %edi,0xc(%ebp) <== NOT EXECUTED
1102c3: 8b 7d b0 mov -0x50(%ebp),%edi <== NOT EXECUTED
1102c6: e9 1f ff ff ff jmp 1101ea <IMFS_eval_path+0x1d2> <== NOT EXECUTED
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
1102cb: e8 34 4e 00 00 call 115104 <__errno>
1102d0: c7 00 14 00 00 00 movl $0x14,(%eax)
1102d6: be ff ff ff ff mov $0xffffffff,%esi
1102db: e9 8c fe ff ff jmp 11016c <IMFS_eval_path+0x154>
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
1102e0: 83 ec 08 sub $0x8,%esp
1102e3: 6a 00 push $0x0
1102e5: ff 75 14 pushl 0x14(%ebp)
1102e8: e8 8f fc ff ff call 10ff7c <IMFS_evaluate_sym_link>
1102ed: 89 c6 mov %eax,%esi
node = pathloc->node_access;
1102ef: 8b 4d 14 mov 0x14(%ebp),%ecx
1102f2: 8b 39 mov (%ecx),%edi
if ( result == -1 )
1102f4: 83 c4 10 add $0x10,%esp
1102f7: 83 f8 ff cmp $0xffffffff,%eax
1102fa: 0f 85 69 ff ff ff jne 110269 <IMFS_eval_path+0x251> <== ALWAYS TAKEN
110300: e9 67 fe ff ff jmp 11016c <IMFS_eval_path+0x154> <== NOT EXECUTED
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
110305: 8d 72 08 lea 0x8(%edx),%esi
110308: b9 05 00 00 00 mov $0x5,%ecx
11030d: 8b 7d 14 mov 0x14(%ebp),%edi
110310: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
110312: 8b 55 e4 mov -0x1c(%ebp),%edx
110315: 8b 4d 14 mov 0x14(%ebp),%ecx
110318: 8b 41 0c mov 0xc(%ecx),%eax
11031b: 51 push %ecx
11031c: ff 75 10 pushl 0x10(%ebp)
11031f: 8b 4d 0c mov 0xc(%ebp),%ecx
110322: 01 d1 add %edx,%ecx
110324: 51 push %ecx
110325: 29 d3 sub %edx,%ebx
110327: 8b 55 08 mov 0x8(%ebp),%edx
11032a: 01 da add %ebx,%edx
11032c: 52 push %edx
11032d: ff 10 call *(%eax)
11032f: 89 c6 mov %eax,%esi
110331: 83 c4 10 add $0x10,%esp
110334: e9 33 fe ff ff jmp 11016c <IMFS_eval_path+0x154>
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
110339: 68 7a 28 12 00 push $0x12287a <== NOT EXECUTED
11033e: 68 54 2f 12 00 push $0x122f54 <== NOT EXECUTED
110343: 68 08 02 00 00 push $0x208 <== NOT EXECUTED
110348: 68 64 2f 12 00 push $0x122f64 <== NOT EXECUTED
11034d: e8 52 7f ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
00110400 <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 */
)
{
110400: 55 push %ebp
110401: 89 e5 mov %esp,%ebp
110403: 57 push %edi
110404: 56 push %esi
110405: 53 push %ebx
110406: 83 ec 4c sub $0x4c,%esp
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
110409: 8b 45 0c mov 0xc(%ebp),%eax
11040c: 8b 18 mov (%eax),%ebx
/*
* Get the path length.
*/
pathlen = strlen( path );
11040e: 31 c0 xor %eax,%eax
110410: b9 ff ff ff ff mov $0xffffffff,%ecx
110415: 8b 7d 08 mov 0x8(%ebp),%edi
110418: f2 ae repnz scas %es:(%edi),%al
11041a: f7 d1 not %ecx
11041c: 8d 71 ff lea -0x1(%ecx),%esi
11041f: c7 45 b4 00 00 00 00 movl $0x0,-0x4c(%ebp)
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
110426: 8d 55 e4 lea -0x1c(%ebp),%edx
110429: 52 push %edx
11042a: 8d 4d c3 lea -0x3d(%ebp),%ecx
11042d: 51 push %ecx
11042e: 56 push %esi
11042f: 8b 45 08 mov 0x8(%ebp),%eax
110432: 03 45 b4 add -0x4c(%ebp),%eax
110435: 50 push %eax
110436: e8 49 06 00 00 call 110a84 <IMFS_get_token>
11043b: 89 c7 mov %eax,%edi
pathlen -= len;
11043d: 8b 55 e4 mov -0x1c(%ebp),%edx
i += len;
if ( !pathloc->node_access )
110440: 8b 4d 0c mov 0xc(%ebp),%ecx
110443: 8b 01 mov (%ecx),%eax
110445: 83 c4 10 add $0x10,%esp
110448: 85 c0 test %eax,%eax
11044a: 0f 84 e8 00 00 00 je 110538 <IMFS_evaluate_for_make+0x138><== NEVER TAKEN
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
110450: 85 ff test %edi,%edi
110452: 75 1c jne 110470 <IMFS_evaluate_for_make+0x70>
pathloc->node_access = node;
}
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
110454: e8 ab 4c 00 00 call 115104 <__errno>
110459: c7 00 11 00 00 00 movl $0x11,(%eax)
11045f: bb ff ff ff ff mov $0xffffffff,%ebx
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
110464: 89 d8 mov %ebx,%eax
110466: 8d 65 f4 lea -0xc(%ebp),%esp
110469: 5b pop %ebx
11046a: 5e pop %esi
11046b: 5f pop %edi
11046c: c9 leave
11046d: c3 ret
11046e: 66 90 xchg %ax,%ax
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
110470: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
110474: 0f 84 d6 00 00 00 je 110550 <IMFS_evaluate_for_make+0x150>
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
11047a: 29 d6 sub %edx,%esi
i += len;
11047c: 01 55 b4 add %edx,-0x4c(%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;
11047f: 89 c3 mov %eax,%ebx
switch( type ) {
110481: 83 ff 02 cmp $0x2,%edi
110484: 0f 84 86 00 00 00 je 110510 <IMFS_evaluate_for_make+0x110>
11048a: 76 24 jbe 1104b0 <IMFS_evaluate_for_make+0xb0>
11048c: 83 ff 03 cmp $0x3,%edi
11048f: 74 2b je 1104bc <IMFS_evaluate_for_make+0xbc>
110491: 83 ff 04 cmp $0x4,%edi
110494: 75 90 jne 110426 <IMFS_evaluate_for_make+0x26><== NEVER TAKEN
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
110496: e8 69 4c 00 00 call 115104 <__errno>
11049b: c7 00 5b 00 00 00 movl $0x5b,(%eax)
1104a1: bb ff ff ff ff mov $0xffffffff,%ebx
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
1104a6: 89 d8 mov %ebx,%eax
1104a8: 8d 65 f4 lea -0xc(%ebp),%esp
1104ab: 5b pop %ebx
1104ac: 5e pop %esi
1104ad: 5f pop %edi
1104ae: c9 leave
1104af: c3 ret
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
1104b0: 85 ff test %edi,%edi
1104b2: 74 a0 je 110454 <IMFS_evaluate_for_make+0x54><== NEVER TAKEN
1104b4: e9 6d ff ff ff jmp 110426 <IMFS_evaluate_for_make+0x26>
1104b9: 8d 76 00 lea 0x0(%esi),%esi
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
1104bc: 8b 40 4c mov 0x4c(%eax),%eax
1104bf: 83 f8 03 cmp $0x3,%eax
1104c2: 0f 84 fd 01 00 00 je 1106c5 <IMFS_evaluate_for_make+0x2c5><== NEVER TAKEN
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
1104c8: 83 f8 04 cmp $0x4,%eax
1104cb: 0f 84 13 02 00 00 je 1106e4 <IMFS_evaluate_for_make+0x2e4><== NEVER TAKEN
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
1104d1: 85 db test %ebx,%ebx
1104d3: 0f 84 d7 01 00 00 je 1106b0 <IMFS_evaluate_for_make+0x2b0><== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
1104d9: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
1104dd: 0f 85 cd 01 00 00 jne 1106b0 <IMFS_evaluate_for_make+0x2b0><== NEVER TAKEN
/*
* Find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
1104e3: 83 ec 08 sub $0x8,%esp
1104e6: 8d 4d c3 lea -0x3d(%ebp),%ecx
1104e9: 51 push %ecx
1104ea: 53 push %ebx
1104eb: e8 04 05 00 00 call 1109f4 <IMFS_find_match_in_dir>
1104f0: 89 c3 mov %eax,%ebx
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
1104f2: 83 c4 10 add $0x10,%esp
1104f5: 85 c0 test %eax,%eax
1104f7: 0f 84 eb 00 00 00 je 1105e8 <IMFS_evaluate_for_make+0x1e8>
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
1104fd: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
110501: 74 75 je 110578 <IMFS_evaluate_for_make+0x178>
i += 2;
pathlen -= 2;
node = node->Parent;
}
pathloc->node_access = node;
110503: 8b 4d 0c mov 0xc(%ebp),%ecx
110506: 89 19 mov %ebx,(%ecx)
110508: e9 19 ff ff ff jmp 110426 <IMFS_evaluate_for_make+0x26>
11050d: 8d 76 00 lea 0x0(%esi),%esi
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
110510: 8b 15 24 70 12 00 mov 0x127024,%edx
110516: 39 42 18 cmp %eax,0x18(%edx)
110519: 0f 84 07 ff ff ff je 110426 <IMFS_evaluate_for_make+0x26>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
11051f: 8b 4d 0c mov 0xc(%ebp),%ecx
110522: 8b 51 10 mov 0x10(%ecx),%edx
110525: 39 42 1c cmp %eax,0x1c(%edx)
110528: 0f 84 d5 01 00 00 je 110703 <IMFS_evaluate_for_make+0x303>
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
11052e: 8b 58 08 mov 0x8(%eax),%ebx
110531: 85 db test %ebx,%ebx
110533: 75 ce jne 110503 <IMFS_evaluate_for_make+0x103>
110535: 8d 76 00 lea 0x0(%esi),%esi
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
rtems_set_errno_and_return_minus_one( ENOENT );
110538: e8 c7 4b 00 00 call 115104 <__errno>
11053d: c7 00 02 00 00 00 movl $0x2,(%eax)
110543: bb ff ff ff ff mov $0xffffffff,%ebx
110548: e9 17 ff ff ff jmp 110464 <IMFS_evaluate_for_make+0x64>
11054d: 8d 76 00 lea 0x0(%esi),%esi
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
110550: 83 ec 08 sub $0x8,%esp
110553: 6a 01 push $0x1
110555: ff 75 0c pushl 0xc(%ebp)
110558: 89 55 a8 mov %edx,-0x58(%ebp)
11055b: e8 54 f9 ff ff call 10feb4 <IMFS_evaluate_permission>
110560: 83 c4 10 add $0x10,%esp
110563: 85 c0 test %eax,%eax
110565: 8b 55 a8 mov -0x58(%ebp),%edx
110568: 0f 84 2d 01 00 00 je 11069b <IMFS_evaluate_for_make+0x29b><== NEVER TAKEN
11056e: 8b 4d 0c mov 0xc(%ebp),%ecx
110571: 8b 01 mov (%ecx),%eax
110573: e9 02 ff ff ff jmp 11047a <IMFS_evaluate_for_make+0x7a>
*/
if ( ! node )
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
110578: 8b 40 5c mov 0x5c(%eax),%eax
11057b: 85 c0 test %eax,%eax
11057d: 74 84 je 110503 <IMFS_evaluate_for_make+0x103>
11057f: 8b 7d 08 mov 0x8(%ebp),%edi
110582: 03 7d b4 add -0x4c(%ebp),%edi
110585: 89 5d ac mov %ebx,-0x54(%ebp)
110588: 8b 5d b4 mov -0x4c(%ebp),%ebx
11058b: eb 18 jmp 1105a5 <IMFS_evaluate_for_make+0x1a5>
11058d: 8d 76 00 lea 0x0(%esi),%esi
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
110590: 8a 07 mov (%edi),%al
110592: 84 c0 test %al,%al
110594: 0f 84 92 00 00 00 je 11062c <IMFS_evaluate_for_make+0x22c><== NEVER TAKEN
11059a: 47 inc %edi
11059b: 85 f6 test %esi,%esi
11059d: 0f 84 b9 00 00 00 je 11065c <IMFS_evaluate_for_make+0x25c><== NEVER TAKEN
++(*index);
1105a3: 43 inc %ebx
--(*len);
1105a4: 4e dec %esi
1105a5: 89 7d b0 mov %edi,-0x50(%ebp)
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
1105a8: 83 ec 0c sub $0xc,%esp
1105ab: 0f be 07 movsbl (%edi),%eax
1105ae: 50 push %eax
1105af: e8 f8 8e ff ff call 1094ac <rtems_filesystem_is_separator>
1105b4: 83 c4 10 add $0x10,%esp
1105b7: 85 c0 test %eax,%eax
1105b9: 75 d5 jne 110590 <IMFS_evaluate_for_make+0x190>
1105bb: 89 5d b4 mov %ebx,-0x4c(%ebp)
1105be: 8b 5d ac mov -0x54(%ebp),%ebx
1105c1: 8b 55 b0 mov -0x50(%ebp),%edx
1105c4: 8a 02 mov (%edx),%al
if ( ! node )
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
1105c6: 3c 2e cmp $0x2e,%al
1105c8: 75 65 jne 11062f <IMFS_evaluate_for_make+0x22f>
1105ca: 8b 45 08 mov 0x8(%ebp),%eax
1105cd: 8b 4d b4 mov -0x4c(%ebp),%ecx
1105d0: 80 7c 08 01 2e cmpb $0x2e,0x1(%eax,%ecx,1)
1105d5: 75 58 jne 11062f <IMFS_evaluate_for_make+0x22f><== NEVER TAKEN
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalformake_h)( &path[i],
pathloc,
name );
}
i += 2;
1105d7: 83 45 b4 02 addl $0x2,-0x4c(%ebp)
pathlen -= 2;
1105db: 83 ee 02 sub $0x2,%esi
node = node->Parent;
1105de: 8b 5b 08 mov 0x8(%ebx),%ebx
1105e1: e9 1d ff ff ff jmp 110503 <IMFS_evaluate_for_make+0x103>
1105e6: 66 90 xchg %ax,%ax
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
1105e8: 8b 45 b4 mov -0x4c(%ebp),%eax
1105eb: 2b 45 e4 sub -0x1c(%ebp),%eax
1105ee: 03 45 08 add 0x8(%ebp),%eax
1105f1: 8b 55 10 mov 0x10(%ebp),%edx
1105f4: 89 02 mov %eax,(%edx)
/*
* 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++) {
1105f6: 8b 55 08 mov 0x8(%ebp),%edx
1105f9: 8b 4d b4 mov -0x4c(%ebp),%ecx
1105fc: 8a 04 0a mov (%edx,%ecx,1),%al
1105ff: 84 c0 test %al,%al
110601: 74 65 je 110668 <IMFS_evaluate_for_make+0x268>
110603: 89 d3 mov %edx,%ebx
110605: 01 cb add %ecx,%ebx
110607: eb 0b jmp 110614 <IMFS_evaluate_for_make+0x214>
110609: 8d 76 00 lea 0x0(%esi),%esi
11060c: 8a 43 01 mov 0x1(%ebx),%al
11060f: 43 inc %ebx
110610: 84 c0 test %al,%al
110612: 74 54 je 110668 <IMFS_evaluate_for_make+0x268>
if ( !IMFS_is_separator( path[ i ] ) )
110614: 83 ec 0c sub $0xc,%esp
110617: 0f be c0 movsbl %al,%eax
11061a: 50 push %eax
11061b: e8 8c 8e ff ff call 1094ac <rtems_filesystem_is_separator>
110620: 83 c4 10 add $0x10,%esp
110623: 85 c0 test %eax,%eax
110625: 75 e5 jne 11060c <IMFS_evaluate_for_make+0x20c>
110627: e9 0c ff ff ff jmp 110538 <IMFS_evaluate_for_make+0x138>
11062c: 8b 5d ac mov -0x54(%ebp),%ebx <== NOT EXECUTED
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
11062f: 8b 73 5c mov 0x5c(%ebx),%esi
110632: 83 c6 1c add $0x1c,%esi
110635: b9 05 00 00 00 mov $0x5,%ecx
11063a: 8b 7d 0c mov 0xc(%ebp),%edi
11063d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalformake_h)( &path[i],
11063f: 57 push %edi
110640: 8b 55 0c mov 0xc(%ebp),%edx
110643: 8b 42 0c mov 0xc(%edx),%eax
110646: ff 75 10 pushl 0x10(%ebp)
110649: 52 push %edx
11064a: ff 75 b0 pushl -0x50(%ebp)
11064d: ff 50 04 call *0x4(%eax)
110650: 89 c3 mov %eax,%ebx
110652: 83 c4 10 add $0x10,%esp
110655: e9 0a fe ff ff jmp 110464 <IMFS_evaluate_for_make+0x64>
11065a: 66 90 xchg %ax,%ax
11065c: 89 5d b4 mov %ebx,-0x4c(%ebp) <== NOT EXECUTED
11065f: 8b 5d ac mov -0x54(%ebp),%ebx <== NOT EXECUTED
110662: e9 5f ff ff ff jmp 1105c6 <IMFS_evaluate_for_make+0x1c6><== NOT EXECUTED
110667: 90 nop <== NOT EXECUTED
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
110668: 83 ec 0c sub $0xc,%esp
11066b: ff 75 0c pushl 0xc(%ebp)
11066e: e8 e5 f7 ff ff call 10fe58 <IMFS_Set_handlers>
110673: 89 c3 mov %eax,%ebx
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
110675: 8b 4d 0c mov 0xc(%ebp),%ecx
110678: 8b 01 mov (%ecx),%eax
11067a: 83 c4 10 add $0x10,%esp
11067d: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
110681: 75 2d jne 1106b0 <IMFS_evaluate_for_make+0x2b0><== NEVER TAKEN
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
110683: 83 ec 08 sub $0x8,%esp
110686: 6a 03 push $0x3
110688: ff 75 0c pushl 0xc(%ebp)
11068b: e8 24 f8 ff ff call 10feb4 <IMFS_evaluate_permission>
110690: 83 c4 10 add $0x10,%esp
110693: 85 c0 test %eax,%eax
110695: 0f 85 c9 fd ff ff jne 110464 <IMFS_evaluate_for_make+0x64>
rtems_set_errno_and_return_minus_one( EACCES );
11069b: e8 64 4a 00 00 call 115104 <__errno>
1106a0: c7 00 0d 00 00 00 movl $0xd,(%eax)
1106a6: bb ff ff ff ff mov $0xffffffff,%ebx
1106ab: e9 b4 fd ff ff jmp 110464 <IMFS_evaluate_for_make+0x64>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
1106b0: e8 4f 4a 00 00 call 115104 <__errno>
1106b5: c7 00 14 00 00 00 movl $0x14,(%eax)
1106bb: bb ff ff ff ff mov $0xffffffff,%ebx
1106c0: e9 9f fd ff ff jmp 110464 <IMFS_evaluate_for_make+0x64>
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
1106c5: 83 ec 08 sub $0x8,%esp
1106c8: 6a 00 push $0x0
1106ca: ff 75 0c pushl 0xc(%ebp)
1106cd: e8 82 fc ff ff call 110354 <IMFS_evaluate_link>
if ( result == -1 )
1106d2: 83 c4 10 add $0x10,%esp
1106d5: 83 f8 ff cmp $0xffffffff,%eax
1106d8: 74 58 je 110732 <IMFS_evaluate_for_make+0x332><== NEVER TAKEN
1106da: 8b 45 0c mov 0xc(%ebp),%eax
1106dd: 8b 18 mov (%eax),%ebx
1106df: e9 ed fd ff ff jmp 1104d1 <IMFS_evaluate_for_make+0xd1>
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
1106e4: 83 ec 08 sub $0x8,%esp
1106e7: 6a 00 push $0x0
1106e9: ff 75 0c pushl 0xc(%ebp)
1106ec: e8 63 fc ff ff call 110354 <IMFS_evaluate_link>
if ( result == -1 )
1106f1: 83 c4 10 add $0x10,%esp
1106f4: 83 f8 ff cmp $0xffffffff,%eax
1106f7: 74 39 je 110732 <IMFS_evaluate_for_make+0x332><== NEVER TAKEN
1106f9: 8b 55 0c mov 0xc(%ebp),%edx
1106fc: 8b 1a mov (%edx),%ebx
1106fe: e9 ce fd ff ff jmp 1104d1 <IMFS_evaluate_for_make+0xd1>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
110703: 8d 72 08 lea 0x8(%edx),%esi
110706: b9 05 00 00 00 mov $0x5,%ecx
11070b: 8b 7d 0c mov 0xc(%ebp),%edi
11070e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
110710: 52 push %edx
110711: 8b 55 0c mov 0xc(%ebp),%edx
110714: 8b 42 0c mov 0xc(%edx),%eax
110717: ff 75 10 pushl 0x10(%ebp)
11071a: 52 push %edx
11071b: 8b 55 b4 mov -0x4c(%ebp),%edx
11071e: 2b 55 e4 sub -0x1c(%ebp),%edx
110721: 03 55 08 add 0x8(%ebp),%edx
110724: 52 push %edx
110725: ff 50 04 call *0x4(%eax)
110728: 89 c3 mov %eax,%ebx
11072a: 83 c4 10 add $0x10,%esp
11072d: e9 32 fd ff ff jmp 110464 <IMFS_evaluate_for_make+0x64>
110732: 89 c3 mov %eax,%ebx <== NOT EXECUTED
110734: e9 2b fd ff ff jmp 110464 <IMFS_evaluate_for_make+0x64><== NOT EXECUTED
0010ff20 <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
10ff20: 55 push %ebp
10ff21: 89 e5 mov %esp,%ebp
10ff23: 53 push %ebx
10ff24: 83 ec 04 sub $0x4,%esp
10ff27: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *jnode = node->node_access;
10ff2a: 8b 03 mov (%ebx),%eax
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
10ff2c: 83 78 4c 03 cmpl $0x3,0x4c(%eax)
10ff30: 75 3c jne 10ff6e <IMFS_evaluate_hard_link+0x4e><== NEVER TAKEN
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
10ff32: 8b 40 50 mov 0x50(%eax),%eax
10ff35: 89 03 mov %eax,(%ebx)
IMFS_Set_handlers( node );
10ff37: 83 ec 0c sub $0xc,%esp
10ff3a: 53 push %ebx
10ff3b: e8 18 ff ff ff call 10fe58 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
10ff40: 58 pop %eax
10ff41: 5a pop %edx
10ff42: ff 75 0c pushl 0xc(%ebp)
10ff45: 53 push %ebx
10ff46: e8 69 ff ff ff call 10feb4 <IMFS_evaluate_permission>
10ff4b: 83 c4 10 add $0x10,%esp
10ff4e: 85 c0 test %eax,%eax
10ff50: 74 0a je 10ff5c <IMFS_evaluate_hard_link+0x3c><== NEVER TAKEN
10ff52: 31 c0 xor %eax,%eax
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10ff54: 8b 5d fc mov -0x4(%ebp),%ebx
10ff57: c9 leave
10ff58: c3 ret
10ff59: 8d 76 00 lea 0x0(%esi),%esi
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
10ff5c: e8 a3 51 00 00 call 115104 <__errno> <== NOT EXECUTED
10ff61: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED
10ff67: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10ff6c: eb e6 jmp 10ff54 <IMFS_evaluate_hard_link+0x34><== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
10ff6e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ff71: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED
10ff76: e8 7d c3 ff ff call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
00110354 <IMFS_evaluate_link>:
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
110354: 55 push %ebp
110355: 89 e5 mov %esp,%ebp
110357: 57 push %edi
110358: 56 push %esi
110359: 53 push %ebx
11035a: 83 ec 0c sub $0xc,%esp
11035d: 8b 75 08 mov 0x8(%ebp),%esi
110360: 8b 7d 0c mov 0xc(%ebp),%edi
110363: 8b 15 24 70 12 00 mov 0x127024,%edx
110369: eb 0e jmp 110379 <IMFS_evaluate_link+0x25>
11036b: 90 nop
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
11036c: 83 f8 04 cmp $0x4,%eax
11036f: 74 53 je 1103c4 <IMFS_evaluate_link+0x70>
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
110371: 83 e8 03 sub $0x3,%eax
110374: 83 f8 01 cmp $0x1,%eax
110377: 77 3a ja 1103b3 <IMFS_evaluate_link+0x5f><== ALWAYS TAKEN
{
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
110379: 8b 1e mov (%esi),%ebx
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
11037b: 8b 42 30 mov 0x30(%edx),%eax
11037e: 40 inc %eax
11037f: 66 89 42 30 mov %ax,0x30(%edx)
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
110383: 66 83 f8 05 cmp $0x5,%ax
110387: 77 57 ja 1103e0 <IMFS_evaluate_link+0x8c>
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
110389: 8b 43 4c mov 0x4c(%ebx),%eax
11038c: 83 f8 03 cmp $0x3,%eax
11038f: 75 db jne 11036c <IMFS_evaluate_link+0x18>
result = IMFS_evaluate_hard_link( node, flags );
110391: 83 ec 08 sub $0x8,%esp
110394: 57 push %edi
110395: 56 push %esi
110396: e8 85 fb ff ff call 10ff20 <IMFS_evaluate_hard_link>
11039b: 83 c4 10 add $0x10,%esp
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
11039e: 85 c0 test %eax,%eax
1103a0: 75 33 jne 1103d5 <IMFS_evaluate_link+0x81><== NEVER TAKEN
1103a2: 8b 43 4c mov 0x4c(%ebx),%eax
1103a5: 8b 15 24 70 12 00 mov 0x127024,%edx
1103ab: 83 e8 03 sub $0x3,%eax
1103ae: 83 f8 01 cmp $0x1,%eax
1103b1: 76 c6 jbe 110379 <IMFS_evaluate_link+0x25><== ALWAYS TAKEN
1103b3: 31 c0 xor %eax,%eax
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
1103b5: 66 c7 42 30 00 00 movw $0x0,0x30(%edx)
return result;
}
1103bb: 8d 65 f4 lea -0xc(%ebp),%esp
1103be: 5b pop %ebx
1103bf: 5e pop %esi
1103c0: 5f pop %edi
1103c1: c9 leave
1103c2: c3 ret
1103c3: 90 nop
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
1103c4: 83 ec 08 sub $0x8,%esp
1103c7: 57 push %edi
1103c8: 56 push %esi
1103c9: e8 ae fb ff ff call 10ff7c <IMFS_evaluate_sym_link>
1103ce: 83 c4 10 add $0x10,%esp
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
1103d1: 85 c0 test %eax,%eax
1103d3: 74 cd je 1103a2 <IMFS_evaluate_link+0x4e>
1103d5: 8b 15 24 70 12 00 mov 0x127024,%edx
1103db: eb d8 jmp 1103b5 <IMFS_evaluate_link+0x61>
1103dd: 8d 76 00 lea 0x0(%esi),%esi
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
1103e0: 66 c7 42 30 00 00 movw $0x0,0x30(%edx)
rtems_set_errno_and_return_minus_one( ELOOP );
1103e6: e8 19 4d 00 00 call 115104 <__errno>
1103eb: c7 00 5c 00 00 00 movl $0x5c,(%eax)
1103f1: b8 ff ff ff ff mov $0xffffffff,%eax
*/
rtems_filesystem_link_counts = 0;
return result;
}
1103f6: 8d 65 f4 lea -0xc(%ebp),%esp
1103f9: 5b pop %ebx
1103fa: 5e pop %esi
1103fb: 5f pop %edi
1103fc: c9 leave
1103fd: c3 ret
0010feb4 <IMFS_evaluate_permission>:
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
10feb4: 55 push %ebp
10feb5: 89 e5 mov %esp,%ebp
10feb7: 57 push %edi
10feb8: 56 push %esi
10feb9: 53 push %ebx
10feba: 83 ec 0c sub $0xc,%esp
10febd: 8b 75 0c mov 0xc(%ebp),%esi
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
10fec0: f7 c6 f8 ff ff ff test $0xfffffff8,%esi
10fec6: 75 44 jne 10ff0c <IMFS_evaluate_permission+0x58><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
10fec8: 8b 45 08 mov 0x8(%ebp),%eax
10fecb: 8b 18 mov (%eax),%ebx
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
10fecd: e8 52 0f 00 00 call 110e24 <geteuid>
10fed2: 89 c7 mov %eax,%edi
st_gid = getegid();
10fed4: e8 3b 0f 00 00 call 110e14 <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
10fed9: 66 3b 7b 3c cmp 0x3c(%ebx),%di
10fedd: 74 1d je 10fefc <IMFS_evaluate_permission+0x48>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
10fedf: 66 3b 43 3e cmp 0x3e(%ebx),%ax
10fee3: 74 1f je 10ff04 <IMFS_evaluate_permission+0x50><== ALWAYS TAKEN
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
10fee5: 8b 43 30 mov 0x30(%ebx),%eax
10fee8: 21 f0 and %esi,%eax
10feea: 39 c6 cmp %eax,%esi
10feec: 0f 94 c0 sete %al
10feef: 0f b6 c0 movzbl %al,%eax
return 1;
return 0;
}
10fef2: 83 c4 0c add $0xc,%esp
10fef5: 5b pop %ebx
10fef6: 5e pop %esi
10fef7: 5f pop %edi
10fef8: c9 leave
10fef9: c3 ret
10fefa: 66 90 xchg %ax,%ax
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
10fefc: c1 e6 06 shl $0x6,%esi
10feff: eb e4 jmp 10fee5 <IMFS_evaluate_permission+0x31>
10ff01: 8d 76 00 lea 0x0(%esi),%esi
else if ( st_gid == jnode->st_gid )
flags_to_test <<= 3;
10ff04: c1 e6 03 shl $0x3,%esi
10ff07: eb dc jmp 10fee5 <IMFS_evaluate_permission+0x31>
10ff09: 8d 76 00 lea 0x0(%esi),%esi
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
10ff0c: e8 f3 51 00 00 call 115104 <__errno> <== NOT EXECUTED
10ff11: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
10ff17: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10ff1c: eb d4 jmp 10fef2 <IMFS_evaluate_permission+0x3e><== NOT EXECUTED
0010ff7c <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
10ff7c: 55 push %ebp
10ff7d: 89 e5 mov %esp,%ebp
10ff7f: 57 push %edi
10ff80: 56 push %esi
10ff81: 53 push %ebx
10ff82: 83 ec 1c sub $0x1c,%esp
10ff85: 8b 5d 08 mov 0x8(%ebp),%ebx
10ff88: 8b 75 0c mov 0xc(%ebp),%esi
IMFS_jnode_t *jnode = node->node_access;
10ff8b: 8b 3b mov (%ebx),%edi
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
10ff8d: 83 7f 4c 04 cmpl $0x4,0x4c(%edi)
10ff91: 75 78 jne 11000b <IMFS_evaluate_sym_link+0x8f><== NEVER TAKEN
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
10ff93: 8b 47 08 mov 0x8(%edi),%eax
10ff96: 85 c0 test %eax,%eax
10ff98: 74 64 je 10fffe <IMFS_evaluate_sym_link+0x82><== NEVER TAKEN
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
10ff9a: 89 03 mov %eax,(%ebx)
rtems_filesystem_get_sym_start_loc(
10ff9c: 52 push %edx
10ff9d: 53 push %ebx
10ff9e: 8d 45 e4 lea -0x1c(%ebp),%eax
10ffa1: 50 push %eax
10ffa2: ff 77 50 pushl 0x50(%edi)
10ffa5: e8 5e 13 00 00 call 111308 <rtems_filesystem_get_sym_start_loc>
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
10ffaa: 8b 57 50 mov 0x50(%edi),%edx
10ffad: 03 55 e4 add -0x1c(%ebp),%edx
10ffb0: 31 c0 xor %eax,%eax
10ffb2: b9 ff ff ff ff mov $0xffffffff,%ecx
10ffb7: 89 d7 mov %edx,%edi
10ffb9: f2 ae repnz scas %es:(%edi),%al
10ffbb: f7 d1 not %ecx
10ffbd: 49 dec %ecx
10ffbe: 53 push %ebx
10ffbf: 56 push %esi
10ffc0: 51 push %ecx
10ffc1: 52 push %edx
10ffc2: e8 51 00 00 00 call 110018 <IMFS_eval_path>
10ffc7: 89 c7 mov %eax,%edi
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
10ffc9: 83 c4 14 add $0x14,%esp
10ffcc: 53 push %ebx
10ffcd: e8 86 fe ff ff call 10fe58 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
10ffd2: 59 pop %ecx
10ffd3: 58 pop %eax
10ffd4: 56 push %esi
10ffd5: 53 push %ebx
10ffd6: e8 d9 fe ff ff call 10feb4 <IMFS_evaluate_permission>
10ffdb: 83 c4 10 add $0x10,%esp
10ffde: 85 c0 test %eax,%eax
10ffe0: 74 0a je 10ffec <IMFS_evaluate_sym_link+0x70><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10ffe2: 89 f8 mov %edi,%eax
10ffe4: 8d 65 f4 lea -0xc(%ebp),%esp
10ffe7: 5b pop %ebx
10ffe8: 5e pop %esi
10ffe9: 5f pop %edi
10ffea: c9 leave
10ffeb: c3 ret
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
10ffec: e8 13 51 00 00 call 115104 <__errno> <== NOT EXECUTED
10fff1: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED
10fff7: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
10fffc: eb e4 jmp 10ffe2 <IMFS_evaluate_sym_link+0x66><== NOT EXECUTED
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
rtems_fatal_error_occurred( 0xBAD00000 );
10fffe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110001: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED
110006: e8 ed c2 ff ff call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
11000b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11000e: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED
110013: e8 e0 c2 ff ff call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
00114014 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
114014: 55 push %ebp
114015: 89 e5 mov %esp,%ebp
114017: 53 push %ebx
114018: 83 ec 14 sub $0x14,%esp
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
11401b: 8b 45 08 mov 0x8(%ebp),%eax
11401e: 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();
114020: e8 ff cd ff ff call 110e24 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
114025: 66 3b 43 3c cmp 0x3c(%ebx),%ax
114029: 74 05 je 114030 <IMFS_fchmod+0x1c> <== ALWAYS TAKEN
11402b: 66 85 c0 test %ax,%ax <== NOT EXECUTED
11402e: 75 34 jne 114064 <IMFS_fchmod+0x50> <== 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);
114030: 8b 45 0c mov 0xc(%ebp),%eax
114033: 25 ff 0f 00 00 and $0xfff,%eax
114038: 8b 53 30 mov 0x30(%ebx),%edx
11403b: 81 e2 00 f0 ff ff and $0xfffff000,%edx
114041: 09 d0 or %edx,%eax
114043: 89 43 30 mov %eax,0x30(%ebx)
IMFS_update_ctime( jnode );
114046: 83 ec 08 sub $0x8,%esp
114049: 6a 00 push $0x0
11404b: 8d 45 f0 lea -0x10(%ebp),%eax
11404e: 50 push %eax
11404f: e8 0c 46 ff ff call 108660 <gettimeofday>
114054: 8b 45 f0 mov -0x10(%ebp),%eax
114057: 89 43 48 mov %eax,0x48(%ebx)
11405a: 31 c0 xor %eax,%eax
return 0;
11405c: 83 c4 10 add $0x10,%esp
}
11405f: 8b 5d fc mov -0x4(%ebp),%ebx
114062: c9 leave
114063: c3 ret
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
114064: e8 9b 10 00 00 call 115104 <__errno> <== NOT EXECUTED
114069: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
11406f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
114074: eb e9 jmp 11405f <IMFS_fchmod+0x4b> <== NOT EXECUTED
001108b0 <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
1108b0: 55 push %ebp <== NOT EXECUTED
1108b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1108b3: 57 push %edi <== NOT EXECUTED
1108b4: 56 push %esi <== NOT EXECUTED
1108b5: 53 push %ebx <== NOT EXECUTED
1108b6: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
1108b9: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
1108bc: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
1108bf: 53 push %ebx <== NOT EXECUTED
1108c0: 8d 47 50 lea 0x50(%edi),%eax <== NOT EXECUTED
1108c3: 50 push %eax <== NOT EXECUTED
1108c4: e8 47 ee ff ff call 10f710 <pipe_release> <== NOT EXECUTED
1108c9: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (! err) {
1108cb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1108ce: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED
1108d1: 74 0d je 1108e0 <IMFS_fifo_close+0x30> <== 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)
free(jnode);
}
IMFS_FIFO_RETURN(err);
1108d3: 7c 37 jl 11090c <IMFS_fifo_close+0x5c> <== NOT EXECUTED
}
1108d5: 89 f0 mov %esi,%eax <== NOT EXECUTED
1108d7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1108da: 5b pop %ebx <== NOT EXECUTED
1108db: 5e pop %esi <== NOT EXECUTED
1108dc: 5f pop %edi <== NOT EXECUTED
1108dd: c9 leave <== NOT EXECUTED
1108de: c3 ret <== NOT EXECUTED
1108df: 90 nop <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (! err) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
1108e0: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) <== 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)
1108e7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1108ea: 57 push %edi <== NOT EXECUTED
1108eb: e8 9c 05 00 00 call 110e8c <rtems_libio_is_file_open><== NOT EXECUTED
1108f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1108f3: 85 c0 test %eax,%eax <== NOT EXECUTED
1108f5: 75 de jne 1108d5 <IMFS_fifo_close+0x25> <== NOT EXECUTED
1108f7: 66 83 7f 34 00 cmpw $0x0,0x34(%edi) <== NOT EXECUTED
1108fc: 75 d7 jne 1108d5 <IMFS_fifo_close+0x25> <== NOT EXECUTED
free(jnode);
1108fe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110901: 57 push %edi <== NOT EXECUTED
110902: e8 dd 7c ff ff call 1085e4 <free> <== NOT EXECUTED
110907: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11090a: eb c9 jmp 1108d5 <IMFS_fifo_close+0x25> <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
11090c: e8 f3 47 00 00 call 115104 <__errno> <== NOT EXECUTED
110911: f7 de neg %esi <== NOT EXECUTED
110913: 89 30 mov %esi,(%eax) <== NOT EXECUTED
110915: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
11091a: eb b9 jmp 1108d5 <IMFS_fifo_close+0x25> <== NOT EXECUTED
00110780 <IMFS_fifo_ioctl>:
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
110780: 55 push %ebp <== NOT EXECUTED
110781: 89 e5 mov %esp,%ebp <== NOT EXECUTED
110783: 53 push %ebx <== NOT EXECUTED
110784: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
110787: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
11078a: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
11078d: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
int err;
if (command == FIONBIO) {
110790: 81 fa 7e 66 04 80 cmp $0x8004667e,%edx <== NOT EXECUTED
110796: 74 1c je 1107b4 <IMFS_fifo_ioctl+0x34> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
110798: 50 push %eax <== NOT EXECUTED
110799: 51 push %ecx <== NOT EXECUTED
11079a: 52 push %edx <== NOT EXECUTED
11079b: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED
11079e: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED
1107a1: e8 4a eb ff ff call 10f2f0 <pipe_ioctl> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
1107a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1107a9: 85 c0 test %eax,%eax <== NOT EXECUTED
1107ab: 78 3e js 1107eb <IMFS_fifo_ioctl+0x6b> <== NOT EXECUTED
}
1107ad: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1107b0: c9 leave <== NOT EXECUTED
1107b1: c3 ret <== NOT EXECUTED
1107b2: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
1107b4: 85 c9 test %ecx,%ecx <== NOT EXECUTED
1107b6: 74 20 je 1107d8 <IMFS_fifo_ioctl+0x58> <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
1107b8: 8b 11 mov (%ecx),%edx <== NOT EXECUTED
1107ba: 85 d2 test %edx,%edx <== NOT EXECUTED
1107bc: 74 0e je 1107cc <IMFS_fifo_ioctl+0x4c> <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
1107be: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED
1107c2: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
1107c4: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1107c7: c9 leave <== NOT EXECUTED
1107c8: c3 ret <== NOT EXECUTED
1107c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
1107cc: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED
1107d0: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
1107d2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1107d5: c9 leave <== NOT EXECUTED
1107d6: c3 ret <== NOT EXECUTED
1107d7: 90 nop <== NOT EXECUTED
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
1107d8: bb 0e 00 00 00 mov $0xe,%ebx <== NOT EXECUTED
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
1107dd: e8 22 49 00 00 call 115104 <__errno> <== NOT EXECUTED
1107e2: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
1107e4: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1107e9: eb c2 jmp 1107ad <IMFS_fifo_ioctl+0x2d> <== NOT EXECUTED
1107eb: 89 c3 mov %eax,%ebx <== NOT EXECUTED
1107ed: f7 db neg %ebx <== NOT EXECUTED
1107ef: eb ec jmp 1107dd <IMFS_fifo_ioctl+0x5d> <== NOT EXECUTED
0011073c <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
11073c: 55 push %ebp <== NOT EXECUTED
11073d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11073f: 53 push %ebx <== NOT EXECUTED
110740: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
110743: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
110746: 50 push %eax <== NOT EXECUTED
110747: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
11074a: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
11074d: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
110750: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED
110753: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED
110756: e8 35 eb ff ff call 10f290 <pipe_lseek> <== NOT EXECUTED
11075b: 89 c3 mov %eax,%ebx <== NOT EXECUTED
11075d: 99 cltd <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
11075e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
110761: 85 d2 test %edx,%edx <== NOT EXECUTED
110763: 78 05 js 11076a <IMFS_fifo_lseek+0x2e> <== NOT EXECUTED
}
110765: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
110768: c9 leave <== NOT EXECUTED
110769: c3 ret <== NOT EXECUTED
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
11076a: e8 95 49 00 00 call 115104 <__errno> <== NOT EXECUTED
11076f: f7 db neg %ebx <== NOT EXECUTED
110771: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
110773: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
110778: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
11077d: eb e6 jmp 110765 <IMFS_fifo_lseek+0x29> <== NOT EXECUTED
0011091c <IMFS_fifo_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
11091c: 55 push %ebp
11091d: 89 e5 mov %esp,%ebp
11091f: 53 push %ebx
110920: 83 ec 0c sub $0xc,%esp
110923: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
110926: 50 push %eax
110927: 8b 40 38 mov 0x38(%eax),%eax
11092a: 83 c0 50 add $0x50,%eax
11092d: 50 push %eax
11092e: e8 f1 ee ff ff call 10f824 <fifo_open>
110933: 89 c3 mov %eax,%ebx
IMFS_FIFO_RETURN(err);
110935: 83 c4 10 add $0x10,%esp
110938: 85 c0 test %eax,%eax
11093a: 78 07 js 110943 <IMFS_fifo_open+0x27> <== ALWAYS TAKEN
}
11093c: 89 d8 mov %ebx,%eax
11093e: 8b 5d fc mov -0x4(%ebp),%ebx
110941: c9 leave
110942: c3 ret
)
{
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
IMFS_FIFO_RETURN(err);
110943: e8 bc 47 00 00 call 115104 <__errno>
110948: f7 db neg %ebx
11094a: 89 18 mov %ebx,(%eax)
11094c: bb ff ff ff ff mov $0xffffffff,%ebx
110951: eb e9 jmp 11093c <IMFS_fifo_open+0x20>
00110854 <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
110854: 55 push %ebp <== NOT EXECUTED
110855: 89 e5 mov %esp,%ebp <== NOT EXECUTED
110857: 56 push %esi <== NOT EXECUTED
110858: 53 push %ebx <== NOT EXECUTED
110859: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
11085c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
11085f: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
110862: 50 push %eax <== NOT EXECUTED
110863: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
110866: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
110869: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED
11086c: e8 df ea ff ff call 10f350 <pipe_read> <== NOT EXECUTED
110871: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (err > 0)
110873: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
110876: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED
110879: 7e 21 jle 11089c <IMFS_fifo_read+0x48> <== NOT EXECUTED
IMFS_update_atime(jnode);
11087b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
11087e: 6a 00 push $0x0 <== NOT EXECUTED
110880: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
110883: 50 push %eax <== NOT EXECUTED
110884: e8 d7 7d ff ff call 108660 <gettimeofday> <== NOT EXECUTED
110889: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
11088c: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED
11088f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
}
110892: 89 d8 mov %ebx,%eax <== NOT EXECUTED
110894: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
110897: 5b pop %ebx <== NOT EXECUTED
110898: 5e pop %esi <== NOT EXECUTED
110899: c9 leave <== NOT EXECUTED
11089a: c3 ret <== NOT EXECUTED
11089b: 90 nop <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0)
IMFS_update_atime(jnode);
IMFS_FIFO_RETURN(err);
11089c: 74 f4 je 110892 <IMFS_fifo_read+0x3e> <== NOT EXECUTED
11089e: e8 61 48 00 00 call 115104 <__errno> <== NOT EXECUTED
1108a3: f7 db neg %ebx <== NOT EXECUTED
1108a5: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
1108a7: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
1108ac: eb e4 jmp 110892 <IMFS_fifo_read+0x3e> <== NOT EXECUTED
001107f4 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
1107f4: 55 push %ebp <== NOT EXECUTED
1107f5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1107f7: 56 push %esi <== NOT EXECUTED
1107f8: 53 push %ebx <== NOT EXECUTED
1107f9: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
1107fc: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
1107ff: 8b 58 38 mov 0x38(%eax),%ebx <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
110802: 50 push %eax <== NOT EXECUTED
110803: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
110806: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
110809: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED
11080c: e8 ff ec ff ff call 10f510 <pipe_write> <== NOT EXECUTED
110811: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (err > 0) {
110813: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
110816: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED
110819: 7e 25 jle 110840 <IMFS_fifo_write+0x4c> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
11081b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
11081e: 6a 00 push $0x0 <== NOT EXECUTED
110820: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
110823: 50 push %eax <== NOT EXECUTED
110824: e8 37 7e ff ff call 108660 <gettimeofday> <== NOT EXECUTED
110829: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
11082c: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED
11082f: 89 43 48 mov %eax,0x48(%ebx) <== NOT EXECUTED
110832: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
}
110835: 89 f0 mov %esi,%eax <== NOT EXECUTED
110837: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
11083a: 5b pop %ebx <== NOT EXECUTED
11083b: 5e pop %esi <== NOT EXECUTED
11083c: c9 leave <== NOT EXECUTED
11083d: c3 ret <== NOT EXECUTED
11083e: 66 90 xchg %ax,%ax <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
110840: 74 f3 je 110835 <IMFS_fifo_write+0x41> <== NOT EXECUTED
110842: e8 bd 48 00 00 call 115104 <__errno> <== NOT EXECUTED
110847: f7 de neg %esi <== NOT EXECUTED
110849: 89 30 mov %esi,(%eax) <== NOT EXECUTED
11084b: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
110850: eb e3 jmp 110835 <IMFS_fifo_write+0x41> <== NOT EXECUTED
001109f4 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
1109f4: 55 push %ebp
1109f5: 89 e5 mov %esp,%ebp
1109f7: 57 push %edi
1109f8: 56 push %esi
1109f9: 53 push %ebx
1109fa: 83 ec 0c sub $0xc,%esp
1109fd: 8b 45 08 mov 0x8(%ebp),%eax
110a00: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
110a03: 85 c0 test %eax,%eax
110a05: 74 67 je 110a6e <IMFS_find_match_in_dir+0x7a><== NEVER TAKEN
if ( !name )
110a07: 85 db test %ebx,%ebx
110a09: 74 2d je 110a38 <IMFS_find_match_in_dir+0x44><== NEVER TAKEN
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
110a0b: bf 57 30 12 00 mov $0x123057,%edi
110a10: b9 02 00 00 00 mov $0x2,%ecx
110a15: 89 de mov %ebx,%esi
110a17: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
110a19: 74 13 je 110a2e <IMFS_find_match_in_dir+0x3a><== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
110a1b: bf 59 30 12 00 mov $0x123059,%edi
110a20: b9 03 00 00 00 mov $0x3,%ecx
110a25: 89 de mov %ebx,%esi
110a27: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
110a29: 75 19 jne 110a44 <IMFS_find_match_in_dir+0x50><== ALWAYS TAKEN
return directory->Parent;
110a2b: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
110a2e: 8d 65 f4 lea -0xc(%ebp),%esp
110a31: 5b pop %ebx
110a32: 5e pop %esi
110a33: 5f pop %edi
110a34: c9 leave
110a35: c3 ret
110a36: 66 90 xchg %ax,%ax
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
110a38: 31 c0 xor %eax,%eax
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
110a3a: 8d 65 f4 lea -0xc(%ebp),%esp
110a3d: 5b pop %ebx
110a3e: 5e pop %esi
110a3f: 5f pop %edi
110a40: c9 leave
110a41: c3 ret
110a42: 66 90 xchg %ax,%ax
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
110a44: 8b 70 50 mov 0x50(%eax),%esi
110a47: 8d 78 54 lea 0x54(%eax),%edi
110a4a: 39 fe cmp %edi,%esi
110a4c: 75 08 jne 110a56 <IMFS_find_match_in_dir+0x62>
110a4e: eb e8 jmp 110a38 <IMFS_find_match_in_dir+0x44>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
110a50: 8b 36 mov (%esi),%esi
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
110a52: 39 fe cmp %edi,%esi
110a54: 74 e2 je 110a38 <IMFS_find_match_in_dir+0x44>
!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 ) )
110a56: 8d 46 0c lea 0xc(%esi),%eax
110a59: 83 ec 08 sub $0x8,%esp
110a5c: 50 push %eax
110a5d: 53 push %ebx
110a5e: e8 69 51 00 00 call 115bcc <strcmp>
110a63: 83 c4 10 add $0x10,%esp
110a66: 85 c0 test %eax,%eax
110a68: 75 e6 jne 110a50 <IMFS_find_match_in_dir+0x5c>
110a6a: 89 f0 mov %esi,%eax
110a6c: eb c0 jmp 110a2e <IMFS_find_match_in_dir+0x3a>
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
110a6e: 68 f8 2f 12 00 push $0x122ff8 <== NOT EXECUTED
110a73: 68 5c 30 12 00 push $0x12305c <== NOT EXECUTED
110a78: 6a 2a push $0x2a <== NOT EXECUTED
110a7a: 68 04 30 12 00 push $0x123004 <== NOT EXECUTED
110a7f: e8 20 78 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
0011095c <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
)
{
11095c: 55 push %ebp
11095d: 89 e5 mov %esp,%ebp
11095f: 57 push %edi
110960: 56 push %esi
110961: 53 push %ebx
110962: 83 ec 3c sub $0x3c,%esp
110965: 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;
110968: 8b 58 1c mov 0x1c(%eax),%ebx
loc = temp_mt_entry->mt_fs_root;
11096b: 8d 55 d4 lea -0x2c(%ebp),%edx
11096e: 89 55 c4 mov %edx,-0x3c(%ebp)
110971: 8d 70 1c lea 0x1c(%eax),%esi
110974: b9 05 00 00 00 mov $0x5,%ecx
110979: 89 d7 mov %edx,%edi
11097b: 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;
11097d: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
do {
next = jnode->Parent;
110984: 8b 73 08 mov 0x8(%ebx),%esi
loc.node_access = (void *)jnode;
110987: 89 5d d4 mov %ebx,-0x2c(%ebp)
IMFS_Set_handlers( &loc );
11098a: 83 ec 0c sub $0xc,%esp
11098d: 8d 45 d4 lea -0x2c(%ebp),%eax
110990: 50 push %eax
110991: e8 c2 f4 ff ff call 10fe58 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
110996: 83 c4 10 add $0x10,%esp
110999: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
11099d: 75 2d jne 1109cc <IMFS_fsunmount+0x70>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11099f: 8d 43 54 lea 0x54(%ebx),%eax
1109a2: 39 43 50 cmp %eax,0x50(%ebx)
1109a5: 74 3e je 1109e5 <IMFS_fsunmount+0x89>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
1109a7: 85 db test %ebx,%ebx
1109a9: 74 15 je 1109c0 <IMFS_fsunmount+0x64>
if ( jnode->type == IMFS_DIRECTORY ) {
1109ab: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
1109af: 75 d3 jne 110984 <IMFS_fsunmount+0x28> <== NEVER TAKEN
1109b1: 8d 43 54 lea 0x54(%ebx),%eax
1109b4: 39 43 50 cmp %eax,0x50(%ebx)
1109b7: 74 cb je 110984 <IMFS_fsunmount+0x28>
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
1109b9: 8b 5b 50 mov 0x50(%ebx),%ebx
}
}
} while (jnode != NULL);
1109bc: 85 db test %ebx,%ebx
1109be: 75 c4 jne 110984 <IMFS_fsunmount+0x28> <== ALWAYS TAKEN
1109c0: 31 c0 xor %eax,%eax
return 0;
}
1109c2: 8d 65 f4 lea -0xc(%ebp),%esp
1109c5: 5b pop %ebx
1109c6: 5e pop %esi
1109c7: 5f pop %edi
1109c8: c9 leave
1109c9: c3 ret
1109ca: 66 90 xchg %ax,%ax
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
result = IMFS_unlink( NULL, &loc );
1109cc: 83 ec 08 sub $0x8,%esp
1109cf: 8d 55 d4 lea -0x2c(%ebp),%edx
1109d2: 52 push %edx
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
1109d3: 6a 00 push $0x0
1109d5: e8 7a 76 ff ff call 108054 <IMFS_unlink>
if (result != 0)
1109da: 83 c4 10 add $0x10,%esp
1109dd: 85 c0 test %eax,%eax
1109df: 75 0d jne 1109ee <IMFS_fsunmount+0x92> <== NEVER TAKEN
1109e1: 89 f3 mov %esi,%ebx
1109e3: eb c2 jmp 1109a7 <IMFS_fsunmount+0x4b>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
1109e5: 83 ec 08 sub $0x8,%esp
1109e8: 8d 45 d4 lea -0x2c(%ebp),%eax
1109eb: 50 push %eax
1109ec: eb e5 jmp 1109d3 <IMFS_fsunmount+0x77>
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
1109ee: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
1109f1: eb cf jmp 1109c2 <IMFS_fsunmount+0x66> <== NOT EXECUTED
00110a84 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
110a84: 55 push %ebp
110a85: 89 e5 mov %esp,%ebp
110a87: 57 push %edi
110a88: 56 push %esi
110a89: 53 push %ebx
110a8a: 83 ec 1c sub $0x1c,%esp
110a8d: 8b 7d 08 mov 0x8(%ebp),%edi
110a90: 8b 5d 10 mov 0x10(%ebp),%ebx
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
110a93: 8a 17 mov (%edi),%dl
110a95: 31 f6 xor %esi,%esi
110a97: 89 7d e4 mov %edi,-0x1c(%ebp)
110a9a: 89 df mov %ebx,%edi
110a9c: 88 d3 mov %dl,%bl
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
110a9e: eb 07 jmp 110aa7 <IMFS_get_token+0x23>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
110aa0: 46 inc %esi
110aa1: 8b 45 e4 mov -0x1c(%ebp),%eax
110aa4: 8a 1c 30 mov (%eax,%esi,1),%bl
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
110aa7: 83 ec 0c sub $0xc,%esp
110aaa: 0f be c3 movsbl %bl,%eax
110aad: 50 push %eax
110aae: e8 f9 89 ff ff call 1094ac <rtems_filesystem_is_separator>
110ab3: 83 c4 10 add $0x10,%esp
110ab6: 85 c0 test %eax,%eax
110ab8: 75 1a jne 110ad4 <IMFS_get_token+0x50>
110aba: 3b 75 0c cmp 0xc(%ebp),%esi
110abd: 7d 15 jge 110ad4 <IMFS_get_token+0x50>
token[i] = c;
110abf: 88 1c 37 mov %bl,(%edi,%esi,1)
if ( i == IMFS_NAME_MAX )
110ac2: 83 fe 20 cmp $0x20,%esi
110ac5: 75 d9 jne 110aa0 <IMFS_get_token+0x1c>
110ac7: b8 04 00 00 00 mov $0x4,%eax
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
110acc: 8d 65 f4 lea -0xc(%ebp),%esp
110acf: 5b pop %ebx
110ad0: 5e pop %esi
110ad1: 5f pop %edi
110ad2: c9 leave
110ad3: c3 ret
110ad4: 88 da mov %bl,%dl
110ad6: 89 fb mov %edi,%ebx
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
110ad8: 85 f6 test %esi,%esi
110ada: 75 14 jne 110af0 <IMFS_get_token+0x6c>
token[i] = c;
110adc: 88 17 mov %dl,(%edi)
if ( (token[i] != '\0') && pathlen ) {
110ade: 84 d2 test %dl,%dl
110ae0: 74 07 je 110ae9 <IMFS_get_token+0x65>
110ae2: 8b 45 0c mov 0xc(%ebp),%eax
110ae5: 85 c0 test %eax,%eax
110ae7: 75 63 jne 110b4c <IMFS_get_token+0xc8>
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
token[i] = '\0';
110ae9: 31 c0 xor %eax,%eax
110aeb: eb 68 jmp 110b55 <IMFS_get_token+0xd1>
110aed: 8d 76 00 lea 0x0(%esi),%esi
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
110af0: 80 7c 37 ff 00 cmpb $0x0,-0x1(%edi,%esi,1)
110af5: 74 04 je 110afb <IMFS_get_token+0x77> <== NEVER TAKEN
token[i] = '\0';
110af7: c6 04 37 00 movb $0x0,(%edi,%esi,1)
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
110afb: 8b 45 14 mov 0x14(%ebp),%eax
110afe: 89 30 mov %esi,(%eax)
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
110b00: bf 73 30 12 00 mov $0x123073,%edi
110b05: b9 03 00 00 00 mov $0x3,%ecx
110b0a: 89 de mov %ebx,%esi
110b0c: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
110b0e: 75 10 jne 110b20 <IMFS_get_token+0x9c>
110b10: b8 02 00 00 00 mov $0x2,%eax
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
110b15: 8d 65 f4 lea -0xc(%ebp),%esp
110b18: 5b pop %ebx
110b19: 5e pop %esi
110b1a: 5f pop %edi
110b1b: c9 leave
110b1c: c3 ret
110b1d: 8d 76 00 lea 0x0(%esi),%esi
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
110b20: bf 74 30 12 00 mov $0x123074,%edi
110b25: b9 02 00 00 00 mov $0x2,%ecx
110b2a: 89 de mov %ebx,%esi
110b2c: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
110b2e: 0f 97 c0 seta %al
110b31: 0f 92 c2 setb %dl
110b34: 28 d0 sub %dl,%al
110b36: 0f be c0 movsbl %al,%eax
110b39: 83 f8 01 cmp $0x1,%eax
110b3c: 19 c0 sbb %eax,%eax
110b3e: 83 e0 fe and $0xfffffffe,%eax
110b41: 83 c0 03 add $0x3,%eax
type = IMFS_CURRENT_DIR;
}
return type;
}
110b44: 8d 65 f4 lea -0xc(%ebp),%esp
110b47: 5b pop %ebx
110b48: 5e pop %esi
110b49: 5f pop %edi
110b4a: c9 leave
110b4b: c3 ret
*/
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
110b4c: b8 01 00 00 00 mov $0x1,%eax
110b51: 66 be 01 00 mov $0x1,%si
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
110b55: 8b 55 14 mov 0x14(%ebp),%edx
110b58: 89 32 mov %esi,(%edx)
110b5a: e9 6d ff ff ff jmp 110acc <IMFS_get_token+0x48>
00107c7c <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
)
{
107c7c: 55 push %ebp
107c7d: 89 e5 mov %esp,%ebp
107c7f: 57 push %edi
107c80: 56 push %esi
107c81: 53 push %ebx
107c82: 83 ec 0c sub $0xc,%esp
107c85: 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,
107c88: 8b 0d 50 51 12 00 mov 0x125150,%ecx
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
107c8e: 83 f9 10 cmp $0x10,%ecx
107c91: 74 18 je 107cab <IMFS_initialize_support+0x2f><== NEVER TAKEN
107c93: 31 d2 xor %edx,%edx
107c95: b8 20 00 00 00 mov $0x20,%eax
107c9a: 39 c1 cmp %eax,%ecx
107c9c: 74 0d je 107cab <IMFS_initialize_support+0x2f>
107c9e: d1 e0 shl %eax
107ca0: 42 inc %edx
107ca1: 83 fa 05 cmp $0x5,%edx
107ca4: 75 f4 jne 107c9a <IMFS_initialize_support+0x1e><== ALWAYS TAKEN
107ca6: b9 80 00 00 00 mov $0x80,%ecx <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
107cab: 89 0d 38 8f 12 00 mov %ecx,0x128f38
/*
* 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();
107cb1: e8 62 80 00 00 call 10fd18 <IMFS_create_root_node>
107cb6: 89 43 1c mov %eax,0x1c(%ebx)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
107cb9: 8b 45 14 mov 0x14(%ebp),%eax
107cbc: 89 43 24 mov %eax,0x24(%ebx)
temp_mt_entry->mt_fs_root.ops = op_table;
107cbf: 8b 45 0c mov 0xc(%ebp),%eax
107cc2: 89 43 28 mov %eax,0x28(%ebx)
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
107cc5: 8d 7b 38 lea 0x38(%ebx),%edi
107cc8: be 80 2e 12 00 mov $0x122e80,%esi
107ccd: b9 0c 00 00 00 mov $0xc,%ecx
107cd2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
107cd4: 83 ec 08 sub $0x8,%esp
107cd7: 6a 10 push $0x10
107cd9: 6a 01 push $0x1
107cdb: e8 ec 06 00 00 call 1083cc <calloc>
if ( !fs_info ) {
107ce0: 83 c4 10 add $0x10,%esp
107ce3: 85 c0 test %eax,%eax
107ce5: 74 3e je 107d25 <IMFS_initialize_support+0xa9><== NEVER TAKEN
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
107ce7: 89 43 34 mov %eax,0x34(%ebx)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
107cea: 8b 15 3c 8f 12 00 mov 0x128f3c,%edx
107cf0: 89 10 mov %edx,(%eax)
107cf2: 42 inc %edx
107cf3: 89 15 3c 8f 12 00 mov %edx,0x128f3c
fs_info->ino_count = 1;
107cf9: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
fs_info->memfile_handlers = memfile_handlers;
107d00: 8b 55 10 mov 0x10(%ebp),%edx
107d03: 89 50 08 mov %edx,0x8(%eax)
fs_info->directory_handlers = directory_handlers;
107d06: 8b 55 14 mov 0x14(%ebp),%edx
107d09: 89 50 0c mov %edx,0xc(%eax)
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
107d0c: 8b 43 1c mov 0x1c(%ebx),%eax
107d0f: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax)
/* Initialize POSIX FIFO/pipe module */
rtems_pipe_initialize();
107d16: e8 81 75 00 00 call 10f29c <rtems_pipe_initialize>
107d1b: 31 c0 xor %eax,%eax
return 0;
}
107d1d: 8d 65 f4 lea -0xc(%ebp),%esp
107d20: 5b pop %ebx
107d21: 5e pop %esi
107d22: 5f pop %edi
107d23: c9 leave
107d24: c3 ret
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
107d25: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107d28: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED
107d2b: e8 b4 08 00 00 call 1085e4 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
107d30: e8 cf d3 00 00 call 115104 <__errno> <== NOT EXECUTED
107d35: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107d3b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107d40: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107d43: eb d8 jmp 107d1d <IMFS_initialize_support+0xa1><== NOT EXECUTED
00107d48 <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 */
)
{
107d48: 55 push %ebp
107d49: 89 e5 mov %esp,%ebp
107d4b: 57 push %edi
107d4c: 53 push %ebx
107d4d: 83 ec 50 sub $0x50,%esp
107d50: 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;
107d53: 8b 45 08 mov 0x8(%ebp),%eax
107d56: 8b 00 mov (%eax),%eax
107d58: 89 45 d8 mov %eax,-0x28(%ebp)
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
107d5b: 66 83 78 34 07 cmpw $0x7,0x34(%eax)
107d60: 77 66 ja 107dc8 <IMFS_link+0x80>
rtems_set_errno_and_return_minus_one( EMLINK );
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
107d62: 31 c0 xor %eax,%eax
107d64: b9 ff ff ff ff mov $0xffffffff,%ecx
107d69: 89 d7 mov %edx,%edi
107d6b: f2 ae repnz scas %es:(%edi),%al
107d6d: f7 d1 not %ecx
107d6f: 49 dec %ecx
107d70: 8d 45 f4 lea -0xc(%ebp),%eax
107d73: 50 push %eax
107d74: 8d 5d b7 lea -0x49(%ebp),%ebx
107d77: 53 push %ebx
107d78: 51 push %ecx
107d79: 52 push %edx
107d7a: e8 05 8d 00 00 call 110a84 <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(
107d7f: 8d 45 d8 lea -0x28(%ebp),%eax
107d82: 89 04 24 mov %eax,(%esp)
107d85: 68 ff a1 00 00 push $0xa1ff
107d8a: 53 push %ebx
107d8b: 6a 03 push $0x3
107d8d: ff 75 0c pushl 0xc(%ebp)
107d90: e8 b7 7f 00 00 call 10fd4c <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
107d95: 83 c4 20 add $0x20,%esp
107d98: 85 c0 test %eax,%eax
107d9a: 74 3e je 107dda <IMFS_link+0x92> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
107d9c: 8b 45 d8 mov -0x28(%ebp),%eax
107d9f: 66 ff 40 34 incw 0x34(%eax)
IMFS_update_ctime( info.hard_link.link_node );
107da3: 83 ec 08 sub $0x8,%esp
107da6: 6a 00 push $0x0
107da8: 8d 45 ec lea -0x14(%ebp),%eax
107dab: 50 push %eax
107dac: e8 af 08 00 00 call 108660 <gettimeofday>
107db1: 8b 55 ec mov -0x14(%ebp),%edx
107db4: 8b 45 d8 mov -0x28(%ebp),%eax
107db7: 89 50 48 mov %edx,0x48(%eax)
107dba: 31 c0 xor %eax,%eax
return 0;
107dbc: 83 c4 10 add $0x10,%esp
}
107dbf: 8d 65 f8 lea -0x8(%ebp),%esp
107dc2: 5b pop %ebx
107dc3: 5f pop %edi
107dc4: c9 leave
107dc5: c3 ret
107dc6: 66 90 xchg %ax,%ax
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
rtems_set_errno_and_return_minus_one( EMLINK );
107dc8: e8 37 d3 00 00 call 115104 <__errno>
107dcd: c7 00 1f 00 00 00 movl $0x1f,(%eax)
107dd3: b8 ff ff ff ff mov $0xffffffff,%eax
107dd8: eb e5 jmp 107dbf <IMFS_link+0x77>
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
107dda: e8 25 d3 00 00 call 115104 <__errno> <== NOT EXECUTED
107ddf: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107de5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107dea: eb d3 jmp 107dbf <IMFS_link+0x77> <== NOT EXECUTED
0011304c <IMFS_memfile_addblock>:
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
11304c: 55 push %ebp
11304d: 89 e5 mov %esp,%ebp
11304f: 53 push %ebx
113050: 83 ec 04 sub $0x4,%esp
113053: 8b 45 08 mov 0x8(%ebp),%eax
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
113056: 85 c0 test %eax,%eax
113058: 74 50 je 1130aa <IMFS_memfile_addblock+0x5e><== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
11305a: 83 78 4c 05 cmpl $0x5,0x4c(%eax)
11305e: 75 31 jne 113091 <IMFS_memfile_addblock+0x45><== NEVER TAKEN
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 );
113060: 52 push %edx
113061: 6a 01 push $0x1
113063: ff 75 0c pushl 0xc(%ebp)
113066: 50 push %eax
113067: e8 b8 fa ff ff call 112b24 <IMFS_memfile_get_block_pointer>
11306c: 89 c3 mov %eax,%ebx
if ( *block_entry_ptr )
11306e: 83 c4 10 add $0x10,%esp
113071: 8b 00 mov (%eax),%eax
113073: 85 c0 test %eax,%eax
113075: 74 09 je 113080 <IMFS_memfile_addblock+0x34>
#endif
memory = memfile_alloc_block();
if ( !memory )
return 1;
*block_entry_ptr = memory;
113077: 31 c0 xor %eax,%eax
return 0;
}
113079: 8b 5d fc mov -0x4(%ebp),%ebx
11307c: c9 leave
11307d: c3 ret
11307e: 66 90 xchg %ax,%ax
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
113080: e8 7b fa ff ff call 112b00 <memfile_alloc_block>
if ( !memory )
113085: 85 c0 test %eax,%eax
113087: 74 04 je 11308d <IMFS_memfile_addblock+0x41><== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
113089: 89 03 mov %eax,(%ebx)
11308b: eb ea jmp 113077 <IMFS_memfile_addblock+0x2b>
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
if ( !memory )
11308d: b0 01 mov $0x1,%al <== NOT EXECUTED
11308f: eb e8 jmp 113079 <IMFS_memfile_addblock+0x2d><== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
113091: 68 88 34 12 00 push $0x123488 <== NOT EXECUTED
113096: 68 87 35 12 00 push $0x123587 <== NOT EXECUTED
11309b: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED
1130a0: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
1130a5: e8 fa 51 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
1130aa: 68 0c 34 12 00 push $0x12340c <== NOT EXECUTED
1130af: 68 87 35 12 00 push $0x123587 <== NOT EXECUTED
1130b4: 68 69 01 00 00 push $0x169 <== NOT EXECUTED
1130b9: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
1130be: e8 e1 51 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
001130c4 <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
1130c4: 55 push %ebp
1130c5: 89 e5 mov %esp,%ebp
1130c7: 57 push %edi
1130c8: 56 push %esi
1130c9: 53 push %ebx
1130ca: 83 ec 2c sub $0x2c,%esp
1130cd: 8b 5d 08 mov 0x8(%ebp),%ebx
1130d0: 8b 45 0c mov 0xc(%ebp),%eax
1130d3: 8b 55 10 mov 0x10(%ebp),%edx
1130d6: 89 45 d8 mov %eax,-0x28(%ebp)
1130d9: 89 55 dc mov %edx,-0x24(%ebp)
/*
* Perform internal consistency checks
*/
assert( the_jnode );
1130dc: 85 db test %ebx,%ebx
1130de: 0f 84 29 01 00 00 je 11320d <IMFS_memfile_extend+0x149><== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
1130e4: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx)
1130e8: 0f 85 06 01 00 00 jne 1131f4 <IMFS_memfile_extend+0x130><== NEVER TAKEN
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
1130ee: a1 38 8f 12 00 mov 0x128f38,%eax
1130f3: 89 c1 mov %eax,%ecx
1130f5: c1 e9 02 shr $0x2,%ecx
1130f8: 8d 51 01 lea 0x1(%ecx),%edx
1130fb: 0f af d1 imul %ecx,%edx
1130fe: 42 inc %edx
1130ff: 0f af d1 imul %ecx,%edx
113102: 4a dec %edx
113103: 0f af d0 imul %eax,%edx
113106: 31 c9 xor %ecx,%ecx
113108: 3b 4d dc cmp -0x24(%ebp),%ecx
11310b: 7f 1c jg 113129 <IMFS_memfile_extend+0x65><== NEVER TAKEN
11310d: 7d 15 jge 113124 <IMFS_memfile_extend+0x60><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
11310f: e8 f0 1f 00 00 call 115104 <__errno> <== NOT EXECUTED
113114: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
11311a: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
11311f: e9 9e 00 00 00 jmp 1131c2 <IMFS_memfile_extend+0xfe><== NOT EXECUTED
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
113124: 3b 55 d8 cmp -0x28(%ebp),%edx
113127: 76 e6 jbe 11310f <IMFS_memfile_extend+0x4b><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
113129: 8b 53 50 mov 0x50(%ebx),%edx
11312c: 8b 4b 54 mov 0x54(%ebx),%ecx
11312f: 89 55 e0 mov %edx,-0x20(%ebp)
113132: 89 4d e4 mov %ecx,-0x1c(%ebp)
113135: 39 4d dc cmp %ecx,-0x24(%ebp)
113138: 0f 8e 8e 00 00 00 jle 1131cc <IMFS_memfile_extend+0x108><== ALWAYS TAKEN
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
11313e: 89 45 d0 mov %eax,-0x30(%ebp)
113141: 89 c1 mov %eax,%ecx
113143: c1 f9 1f sar $0x1f,%ecx
113146: 89 4d d4 mov %ecx,-0x2c(%ebp)
113149: ff 75 d4 pushl -0x2c(%ebp)
11314c: ff 75 d0 pushl -0x30(%ebp)
11314f: ff 75 dc pushl -0x24(%ebp)
113152: ff 75 d8 pushl -0x28(%ebp)
113155: e8 e2 cf 00 00 call 12013c <__divdi3>
11315a: 83 c4 10 add $0x10,%esp
11315d: 89 c6 mov %eax,%esi
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
11315f: ff 75 d4 pushl -0x2c(%ebp)
113162: ff 75 d0 pushl -0x30(%ebp)
113165: ff 75 e4 pushl -0x1c(%ebp)
113168: ff 75 e0 pushl -0x20(%ebp)
11316b: e8 cc cf 00 00 call 12013c <__divdi3>
113170: 83 c4 10 add $0x10,%esp
113173: 89 45 e0 mov %eax,-0x20(%ebp)
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
113176: 39 c6 cmp %eax,%esi
113178: 72 6a jb 1131e4 <IMFS_memfile_extend+0x120><== NEVER TAKEN
11317a: 89 c7 mov %eax,%edi
11317c: eb 07 jmp 113185 <IMFS_memfile_extend+0xc1>
11317e: 66 90 xchg %ax,%ax
113180: 47 inc %edi
113181: 39 fe cmp %edi,%esi
113183: 72 5f jb 1131e4 <IMFS_memfile_extend+0x120>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
113185: 83 ec 08 sub $0x8,%esp
113188: 57 push %edi
113189: 53 push %ebx
11318a: e8 bd fe ff ff call 11304c <IMFS_memfile_addblock>
11318f: 83 c4 10 add $0x10,%esp
113192: 85 c0 test %eax,%eax
113194: 74 ea je 113180 <IMFS_memfile_extend+0xbc><== ALWAYS TAKEN
for ( ; block>=old_blocks ; block-- ) {
113196: 39 7d e0 cmp %edi,-0x20(%ebp) <== NOT EXECUTED
113199: 77 17 ja 1131b2 <IMFS_memfile_extend+0xee><== NOT EXECUTED
11319b: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED
11319e: 66 90 xchg %ax,%ax <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
1131a0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1131a3: 57 push %edi <== NOT EXECUTED
1131a4: 53 push %ebx <== NOT EXECUTED
1131a5: e8 d6 fb ff ff call 112d80 <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-- ) {
1131aa: 4f dec %edi <== NOT EXECUTED
1131ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1131ae: 39 fe cmp %edi,%esi <== NOT EXECUTED
1131b0: 76 ee jbe 1131a0 <IMFS_memfile_extend+0xdc><== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
1131b2: e8 4d 1f 00 00 call 115104 <__errno> <== NOT EXECUTED
1131b7: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
1131bd: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
1131c2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1131c5: 5b pop %ebx <== NOT EXECUTED
1131c6: 5e pop %esi <== NOT EXECUTED
1131c7: 5f pop %edi <== NOT EXECUTED
1131c8: c9 leave <== NOT EXECUTED
1131c9: c3 ret <== NOT EXECUTED
1131ca: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
1131cc: 7c 09 jl 1131d7 <IMFS_memfile_extend+0x113><== NEVER TAKEN
1131ce: 39 55 d8 cmp %edx,-0x28(%ebp)
1131d1: 0f 87 67 ff ff ff ja 11313e <IMFS_memfile_extend+0x7a>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
1131d7: 31 c0 xor %eax,%eax
return 0;
}
1131d9: 8d 65 f4 lea -0xc(%ebp),%esp
1131dc: 5b pop %ebx
1131dd: 5e pop %esi
1131de: 5f pop %edi
1131df: c9 leave
1131e0: c3 ret
1131e1: 8d 76 00 lea 0x0(%esi),%esi
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
1131e4: 8b 45 d8 mov -0x28(%ebp),%eax
1131e7: 8b 55 dc mov -0x24(%ebp),%edx
1131ea: 89 43 50 mov %eax,0x50(%ebx)
1131ed: 89 53 54 mov %edx,0x54(%ebx)
1131f0: 31 c0 xor %eax,%eax
1131f2: eb e5 jmp 1131d9 <IMFS_memfile_extend+0x115>
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
1131f4: 68 88 34 12 00 push $0x123488 <== NOT EXECUTED
1131f9: 68 9d 35 12 00 push $0x12359d <== NOT EXECUTED
1131fe: 68 35 01 00 00 push $0x135 <== NOT EXECUTED
113203: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
113208: e8 97 50 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
11320d: 68 0c 34 12 00 push $0x12340c <== NOT EXECUTED
113212: 68 9d 35 12 00 push $0x12359d <== NOT EXECUTED
113217: 68 31 01 00 00 push $0x131 <== NOT EXECUTED
11321c: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
113221: e8 7e 50 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
00112b24 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
112b24: 55 push %ebp
112b25: 89 e5 mov %esp,%ebp
112b27: 57 push %edi
112b28: 56 push %esi
112b29: 53 push %ebx
112b2a: 83 ec 1c sub $0x1c,%esp
112b2d: 8b 5d 08 mov 0x8(%ebp),%ebx
112b30: 8b 7d 0c mov 0xc(%ebp),%edi
112b33: 8b 75 10 mov 0x10(%ebp),%esi
/*
* Perform internal consistency checks
*/
assert( the_jnode );
112b36: 85 db test %ebx,%ebx
112b38: 0f 84 59 01 00 00 je 112c97 <IMFS_memfile_get_block_pointer+0x173><== NEVER TAKEN
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
112b3e: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx)
112b42: 0f 85 68 01 00 00 jne 112cb0 <IMFS_memfile_get_block_pointer+0x18c><== NEVER TAKEN
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
112b48: 8b 0d 38 8f 12 00 mov 0x128f38,%ecx
112b4e: c1 e9 02 shr $0x2,%ecx
112b51: 8d 41 ff lea -0x1(%ecx),%eax
112b54: 39 c7 cmp %eax,%edi
112b56: 76 44 jbe 112b9c <IMFS_memfile_get_block_pointer+0x78><== ALWAYS TAKEN
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
112b58: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED
112b5b: 0f af c1 imul %ecx,%eax <== NOT EXECUTED
112b5e: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED
112b61: 39 d7 cmp %edx,%edi <== NOT EXECUTED
112b63: 77 57 ja 112bbc <IMFS_memfile_get_block_pointer+0x98><== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
112b65: 89 f8 mov %edi,%eax <== NOT EXECUTED
112b67: 29 c8 sub %ecx,%eax <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
112b69: 31 d2 xor %edx,%edx <== NOT EXECUTED
112b6b: f7 f1 div %ecx <== NOT EXECUTED
112b6d: 89 c1 mov %eax,%ecx <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
112b6f: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED
if ( malloc_it ) {
112b72: 85 f6 test %esi,%esi <== NOT EXECUTED
112b74: 0f 84 96 00 00 00 je 112c10 <IMFS_memfile_get_block_pointer+0xec><== NOT EXECUTED
if ( !p ) {
112b7a: 85 c0 test %eax,%eax <== NOT EXECUTED
112b7c: 0f 84 dd 00 00 00 je 112c5f <IMFS_memfile_get_block_pointer+0x13b><== NOT EXECUTED
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
112b82: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED
112b85: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
if ( !p1 ) {
112b87: 85 c0 test %eax,%eax <== NOT EXECUTED
112b89: 0f 84 ba 00 00 00 je 112c49 <IMFS_memfile_get_block_pointer+0x125><== 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 ];
112b8f: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
112b92: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112b95: 5b pop %ebx <== NOT EXECUTED
112b96: 5e pop %esi <== NOT EXECUTED
112b97: 5f pop %edi <== NOT EXECUTED
112b98: c9 leave <== NOT EXECUTED
112b99: c3 ret <== NOT EXECUTED
112b9a: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( my_block <= LAST_INDIRECT ) {
#if 0
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
112b9c: 8b 43 58 mov 0x58(%ebx),%eax
if ( malloc_it ) {
112b9f: 85 f6 test %esi,%esi
112ba1: 0f 84 85 00 00 00 je 112c2c <IMFS_memfile_get_block_pointer+0x108>
if ( !p ) {
112ba7: 85 c0 test %eax,%eax
112ba9: 0f 84 89 00 00 00 je 112c38 <IMFS_memfile_get_block_pointer+0x114>
p2 = memfile_alloc_block();
if ( !p2 )
return 0;
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
112baf: 8d 04 b8 lea (%eax,%edi,4),%eax
/*
* This means the requested block number is out of range.
*/
return 0;
}
112bb2: 8d 65 f4 lea -0xc(%ebp),%esp
112bb5: 5b pop %ebx
112bb6: 5e pop %esi
112bb7: 5f pop %edi
112bb8: c9 leave
112bb9: c3 ret
112bba: 66 90 xchg %ax,%ax
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
112bbc: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED
112bbf: 0f af d1 imul %ecx,%edx <== NOT EXECUTED
112bc2: 4a dec %edx <== NOT EXECUTED
112bc3: 39 d7 cmp %edx,%edi <== NOT EXECUTED
112bc5: 77 59 ja 112c20 <IMFS_memfile_get_block_pointer+0xfc><== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
112bc7: 29 c7 sub %eax,%edi <== NOT EXECUTED
112bc9: 89 f8 mov %edi,%eax <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
112bcb: 31 d2 xor %edx,%edx <== NOT EXECUTED
112bcd: f7 f1 div %ecx <== NOT EXECUTED
112bcf: 89 d7 mov %edx,%edi <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
112bd1: 31 d2 xor %edx,%edx <== NOT EXECUTED
112bd3: f7 f1 div %ecx <== NOT EXECUTED
112bd5: 89 c1 mov %eax,%ecx <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
112bd7: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
if ( malloc_it ) {
112bda: 85 f6 test %esi,%esi <== NOT EXECUTED
112bdc: 0f 84 9a 00 00 00 je 112c7c <IMFS_memfile_get_block_pointer+0x158><== NOT EXECUTED
if ( !p ) {
112be2: 85 c0 test %eax,%eax <== NOT EXECUTED
112be4: 0f 84 df 00 00 00 je 112cc9 <IMFS_memfile_get_block_pointer+0x1a5><== NOT EXECUTED
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
112bea: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED
112bed: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
if ( !p1 ) {
112bef: 85 c0 test %eax,%eax <== NOT EXECUTED
112bf1: 0f 84 f3 00 00 00 je 112cea <IMFS_memfile_get_block_pointer+0x1c6><== NOT EXECUTED
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
112bf7: 8d 1c 90 lea (%eax,%edx,4),%ebx <== NOT EXECUTED
112bfa: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
if ( !p2 ) {
112bfc: 85 c0 test %eax,%eax <== NOT EXECUTED
112bfe: 75 af jne 112baf <IMFS_memfile_get_block_pointer+0x8b><== NOT EXECUTED
p2 = memfile_alloc_block();
112c00: e8 fb fe ff ff call 112b00 <memfile_alloc_block> <== NOT EXECUTED
if ( !p2 )
112c05: 85 c0 test %eax,%eax <== NOT EXECUTED
112c07: 74 17 je 112c20 <IMFS_memfile_get_block_pointer+0xfc><== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
112c09: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
112c0b: eb a2 jmp 112baf <IMFS_memfile_get_block_pointer+0x8b><== NOT EXECUTED
112c0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
}
if ( !p )
112c10: 85 c0 test %eax,%eax <== NOT EXECUTED
112c12: 74 0c je 112c20 <IMFS_memfile_get_block_pointer+0xfc><== NOT EXECUTED
return 0;
p = (block_p *)p[ doubly ];
112c14: 8b 04 88 mov (%eax,%ecx,4),%eax <== NOT EXECUTED
if ( !p )
112c17: 85 c0 test %eax,%eax <== NOT EXECUTED
112c19: 0f 85 70 ff ff ff jne 112b8f <IMFS_memfile_get_block_pointer+0x6b><== NOT EXECUTED
112c1f: 90 nop <== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
112c20: 31 c0 xor %eax,%eax <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
112c22: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112c25: 5b pop %ebx <== NOT EXECUTED
112c26: 5e pop %esi <== NOT EXECUTED
112c27: 5f pop %edi <== NOT EXECUTED
112c28: c9 leave <== NOT EXECUTED
112c29: c3 ret <== NOT EXECUTED
112c2a: 66 90 xchg %ax,%ax <== NOT EXECUTED
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
112c2c: 85 c0 test %eax,%eax
112c2e: 0f 85 7b ff ff ff jne 112baf <IMFS_memfile_get_block_pointer+0x8b><== ALWAYS TAKEN
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
112c34: 31 c0 xor %eax,%eax
112c36: eb ea jmp 112c22 <IMFS_memfile_get_block_pointer+0xfe><== NOT EXECUTED
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
112c38: e8 c3 fe ff ff call 112b00 <memfile_alloc_block>
if ( !p )
112c3d: 85 c0 test %eax,%eax
112c3f: 74 df je 112c20 <IMFS_memfile_get_block_pointer+0xfc><== NEVER TAKEN
return 0;
info->indirect = p;
112c41: 89 43 58 mov %eax,0x58(%ebx)
112c44: e9 66 ff ff ff jmp 112baf <IMFS_memfile_get_block_pointer+0x8b>
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
112c49: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
112c4c: e8 af fe ff ff call 112b00 <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
112c51: 85 c0 test %eax,%eax <== NOT EXECUTED
112c53: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
112c56: 74 c8 je 112c20 <IMFS_memfile_get_block_pointer+0xfc><== NOT EXECUTED
return 0;
p[ doubly ] = (block_p) p1;
112c58: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
112c5a: e9 30 ff ff ff jmp 112b8f <IMFS_memfile_get_block_pointer+0x6b><== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
112c5f: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
112c62: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED
112c65: e8 96 fe ff ff call 112b00 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
112c6a: 85 c0 test %eax,%eax <== NOT EXECUTED
112c6c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
112c6f: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
112c72: 74 ac je 112c20 <IMFS_memfile_get_block_pointer+0xfc><== NOT EXECUTED
return 0;
info->doubly_indirect = p;
112c74: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED
112c77: e9 06 ff ff ff jmp 112b82 <IMFS_memfile_get_block_pointer+0x5e><== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
112c7c: 85 c0 test %eax,%eax <== NOT EXECUTED
112c7e: 74 a0 je 112c20 <IMFS_memfile_get_block_pointer+0xfc><== 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 ];
112c80: 8b 04 88 mov (%eax,%ecx,4),%eax <== NOT EXECUTED
if ( !p1 )
112c83: 85 c0 test %eax,%eax <== NOT EXECUTED
112c85: 74 99 je 112c20 <IMFS_memfile_get_block_pointer+0xfc><== NOT EXECUTED
return 0;
p2 = (block_p *)p1[ doubly ];
112c87: 8b 14 90 mov (%eax,%edx,4),%edx <== NOT EXECUTED
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
112c8a: 8d 04 ba lea (%edx,%edi,4),%eax <== NOT EXECUTED
p1 = (block_p *) p[ triply ];
if ( !p1 )
return 0;
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
112c8d: 85 d2 test %edx,%edx <== NOT EXECUTED
112c8f: 0f 85 fd fe ff ff jne 112b92 <IMFS_memfile_get_block_pointer+0x6e><== NOT EXECUTED
112c95: eb 89 jmp 112c20 <IMFS_memfile_get_block_pointer+0xfc><== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
112c97: 68 0c 34 12 00 push $0x12340c <== NOT EXECUTED
112c9c: 68 f8 34 12 00 push $0x1234f8 <== NOT EXECUTED
112ca1: 68 88 03 00 00 push $0x388 <== NOT EXECUTED
112ca6: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
112cab: e8 f4 55 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
112cb0: 68 88 34 12 00 push $0x123488 <== NOT EXECUTED
112cb5: 68 f8 34 12 00 push $0x1234f8 <== NOT EXECUTED
112cba: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED
112cbf: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
112cc4: e8 db 55 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
112cc9: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
112ccc: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED
112ccf: e8 2c fe ff ff call 112b00 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
112cd4: 85 c0 test %eax,%eax <== NOT EXECUTED
112cd6: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
112cd9: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
112cdc: 0f 84 3e ff ff ff je 112c20 <IMFS_memfile_get_block_pointer+0xfc><== NOT EXECUTED
return 0;
info->triply_indirect = p;
112ce2: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED
112ce5: e9 00 ff ff ff jmp 112bea <IMFS_memfile_get_block_pointer+0xc6><== NOT EXECUTED
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
112cea: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
112ced: e8 0e fe ff ff call 112b00 <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
112cf2: 85 c0 test %eax,%eax <== NOT EXECUTED
112cf4: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
112cf7: 0f 84 23 ff ff ff je 112c20 <IMFS_memfile_get_block_pointer+0xfc><== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
112cfd: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
112cff: e9 f3 fe ff ff jmp 112bf7 <IMFS_memfile_get_block_pointer+0xd3><== NOT EXECUTED
00113644 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
113644: 55 push %ebp
113645: 89 e5 mov %esp,%ebp
113647: 57 push %edi
113648: 56 push %esi
113649: 53 push %ebx
11364a: 83 ec 4c sub $0x4c,%esp
11364d: 8b 75 0c mov 0xc(%ebp),%esi
113650: 8b 7d 10 mov 0x10(%ebp),%edi
113653: 8b 45 18 mov 0x18(%ebp),%eax
/*
* Perform internal consistency checks
*/
assert( the_jnode );
113656: 8b 55 08 mov 0x8(%ebp),%edx
113659: 85 d2 test %edx,%edx
11365b: 0f 84 8e 02 00 00 je 1138ef <IMFS_memfile_read+0x2ab><== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
113661: 8b 4d 08 mov 0x8(%ebp),%ecx
113664: 8b 51 4c mov 0x4c(%ecx),%edx
113667: 8d 4a fb lea -0x5(%edx),%ecx
11366a: 83 f9 01 cmp $0x1,%ecx
11366d: 0f 87 63 02 00 00 ja 1138d6 <IMFS_memfile_read+0x292><== NEVER TAKEN
/*
* Error checks on arguments
*/
assert( dest );
113673: 8b 5d 14 mov 0x14(%ebp),%ebx
113676: 85 db test %ebx,%ebx
113678: 0f 84 26 02 00 00 je 1138a4 <IMFS_memfile_read+0x260><== NEVER TAKEN
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
11367e: 85 c0 test %eax,%eax
113680: 0f 84 f0 01 00 00 je 113876 <IMFS_memfile_read+0x232><== NEVER TAKEN
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
113686: 83 fa 06 cmp $0x6,%edx
113689: 0f 84 5d 01 00 00 je 1137ec <IMFS_memfile_read+0x1a8><== NEVER TAKEN
/*
* 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;
11368f: 89 f2 mov %esi,%edx
if ( last_byte > the_jnode->info.file.size )
113691: 8b 4d 08 mov 0x8(%ebp),%ecx
113694: 8b 49 50 mov 0x50(%ecx),%ecx
113697: 89 4d cc mov %ecx,-0x34(%ebp)
11369a: 8d 1c 30 lea (%eax,%esi,1),%ebx
11369d: 89 5d d0 mov %ebx,-0x30(%ebp)
1136a0: 31 c9 xor %ecx,%ecx
1136a2: 8b 5d 08 mov 0x8(%ebp),%ebx
1136a5: 3b 4b 54 cmp 0x54(%ebx),%ecx
1136a8: 0f 8e e2 00 00 00 jle 113790 <IMFS_memfile_read+0x14c><== ALWAYS TAKEN
my_length = the_jnode->info.file.size - start;
1136ae: 8b 5d cc mov -0x34(%ebp),%ebx
1136b1: 29 d3 sub %edx,%ebx
1136b3: 89 5d cc mov %ebx,-0x34(%ebp)
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
1136b6: a1 38 8f 12 00 mov 0x128f38,%eax
1136bb: 89 45 d0 mov %eax,-0x30(%ebp)
1136be: 99 cltd
1136bf: 89 d3 mov %edx,%ebx
1136c1: 52 push %edx
1136c2: 50 push %eax
1136c3: 57 push %edi
1136c4: 56 push %esi
1136c5: 89 45 c0 mov %eax,-0x40(%ebp)
1136c8: e8 bf cb 00 00 call 12028c <__moddi3>
1136cd: 83 c4 10 add $0x10,%esp
1136d0: 89 45 c8 mov %eax,-0x38(%ebp)
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
1136d3: 8b 4d c0 mov -0x40(%ebp),%ecx
1136d6: 53 push %ebx
1136d7: 51 push %ecx
1136d8: 57 push %edi
1136d9: 56 push %esi
1136da: e8 5d ca 00 00 call 12013c <__divdi3>
1136df: 83 c4 10 add $0x10,%esp
1136e2: 89 c3 mov %eax,%ebx
if ( start_offset ) {
1136e4: 8b 4d c8 mov -0x38(%ebp),%ecx
1136e7: 85 c9 test %ecx,%ecx
1136e9: 0f 85 b1 00 00 00 jne 1137a0 <IMFS_memfile_read+0x15c>
1136ef: 8b 55 14 mov 0x14(%ebp),%edx
1136f2: 89 55 c8 mov %edx,-0x38(%ebp)
1136f5: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
1136fc: 8b 55 d0 mov -0x30(%ebp),%edx
1136ff: 39 55 cc cmp %edx,-0x34(%ebp)
113702: 72 39 jb 11373d <IMFS_memfile_read+0xf9>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
113704: 50 push %eax
113705: 6a 00 push $0x0
113707: 53 push %ebx
113708: ff 75 08 pushl 0x8(%ebp)
11370b: e8 14 f4 ff ff call 112b24 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
113710: 83 c4 10 add $0x10,%esp
113713: 85 c0 test %eax,%eax
113715: 0f 84 70 01 00 00 je 11388b <IMFS_memfile_read+0x247><== NEVER TAKEN
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
11371b: 8b 30 mov (%eax),%esi
11371d: 8b 7d c8 mov -0x38(%ebp),%edi
113720: 8b 4d d0 mov -0x30(%ebp),%ecx
113723: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
dest += to_copy;
113725: 89 7d c8 mov %edi,-0x38(%ebp)
block++;
113728: 43 inc %ebx
my_length -= to_copy;
113729: 8b 4d d0 mov -0x30(%ebp),%ecx
11372c: 29 4d cc sub %ecx,-0x34(%ebp)
copied += to_copy;
11372f: 01 4d c4 add %ecx,-0x3c(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
113732: 8b 7d cc mov -0x34(%ebp),%edi
113735: 39 3d 38 8f 12 00 cmp %edi,0x128f38
11373b: 76 c7 jbe 113704 <IMFS_memfile_read+0xc0>
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
11373d: 8b 7d cc mov -0x34(%ebp),%edi
113740: 85 ff test %edi,%edi
113742: 74 27 je 11376b <IMFS_memfile_read+0x127>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
113744: 56 push %esi
113745: 6a 00 push $0x0
113747: 53 push %ebx
113748: ff 75 08 pushl 0x8(%ebp)
11374b: e8 d4 f3 ff ff call 112b24 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
113750: 83 c4 10 add $0x10,%esp
113753: 85 c0 test %eax,%eax
113755: 0f 84 62 01 00 00 je 1138bd <IMFS_memfile_read+0x279><== NEVER TAKEN
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
11375b: 8b 30 mov (%eax),%esi
11375d: 8b 7d c8 mov -0x38(%ebp),%edi
113760: 8b 4d cc mov -0x34(%ebp),%ecx
113763: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
copied += my_length;
113765: 8b 45 cc mov -0x34(%ebp),%eax
113768: 01 45 c4 add %eax,-0x3c(%ebp)
}
IMFS_update_atime( the_jnode );
11376b: 83 ec 08 sub $0x8,%esp
11376e: 6a 00 push $0x0
113770: 8d 45 e0 lea -0x20(%ebp),%eax
113773: 50 push %eax
113774: e8 e7 4e ff ff call 108660 <gettimeofday>
113779: 8b 45 e0 mov -0x20(%ebp),%eax
11377c: 8b 55 08 mov 0x8(%ebp),%edx
11377f: 89 42 40 mov %eax,0x40(%edx)
return copied;
113782: 8b 45 c4 mov -0x3c(%ebp),%eax
113785: 83 c4 10 add $0x10,%esp
}
113788: 8d 65 f4 lea -0xc(%ebp),%esp
11378b: 5b pop %ebx
11378c: 5e pop %esi
11378d: 5f pop %edi
11378e: c9 leave
11378f: c3 ret
* 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;
if ( last_byte > the_jnode->info.file.size )
113790: 0f 8d ba 00 00 00 jge 113850 <IMFS_memfile_read+0x20c><== ALWAYS TAKEN
113796: 89 45 cc mov %eax,-0x34(%ebp)
113799: e9 18 ff ff ff jmp 1136b6 <IMFS_memfile_read+0x72>
11379e: 66 90 xchg %ax,%ax
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
1137a0: 52 push %edx
1137a1: 6a 00 push $0x0
1137a3: 53 push %ebx
1137a4: ff 75 08 pushl 0x8(%ebp)
1137a7: e8 78 f3 ff ff call 112b24 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
1137ac: 83 c4 10 add $0x10,%esp
1137af: 85 c0 test %eax,%eax
1137b1: 0f 84 51 01 00 00 je 113908 <IMFS_memfile_read+0x2c4><== NEVER TAKEN
*/
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;
1137b7: 8b 4d d0 mov -0x30(%ebp),%ecx
1137ba: 2b 4d c8 sub -0x38(%ebp),%ecx
1137bd: 8b 55 cc mov -0x34(%ebp),%edx
1137c0: 39 ca cmp %ecx,%edx
1137c2: 0f 87 9c 00 00 00 ja 113864 <IMFS_memfile_read+0x220>
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 );
1137c8: 8b 75 c8 mov -0x38(%ebp),%esi
1137cb: 03 30 add (%eax),%esi
dest += to_copy;
1137cd: 8b 7d 14 mov 0x14(%ebp),%edi
1137d0: 89 d1 mov %edx,%ecx
1137d2: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
1137d4: 89 7d c8 mov %edi,-0x38(%ebp)
block++;
1137d7: 43 inc %ebx
my_length -= to_copy;
1137d8: 29 55 cc sub %edx,-0x34(%ebp)
1137db: a1 38 8f 12 00 mov 0x128f38,%eax
1137e0: 89 45 d0 mov %eax,-0x30(%ebp)
1137e3: 89 55 c4 mov %edx,-0x3c(%ebp)
1137e6: e9 11 ff ff ff jmp 1136fc <IMFS_memfile_read+0xb8>
1137eb: 90 nop
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
1137ec: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
1137ef: 8b 5b 58 mov 0x58(%ebx),%ebx <== NOT EXECUTED
1137f2: 89 5d cc mov %ebx,-0x34(%ebp) <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
1137f5: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
1137f8: 8b 51 50 mov 0x50(%ecx),%edx <== NOT EXECUTED
1137fb: 8b 49 54 mov 0x54(%ecx),%ecx <== NOT EXECUTED
1137fe: 89 55 b0 mov %edx,-0x50(%ebp) <== NOT EXECUTED
113801: 89 4d b4 mov %ecx,-0x4c(%ebp) <== NOT EXECUTED
113804: 29 f2 sub %esi,%edx <== NOT EXECUTED
113806: 19 f9 sbb %edi,%ecx <== NOT EXECUTED
113808: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
11380b: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
11380e: 31 db xor %ebx,%ebx <== NOT EXECUTED
113810: 39 cb cmp %ecx,%ebx <== NOT EXECUTED
113812: 7e 58 jle 11386c <IMFS_memfile_read+0x228><== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
113814: 8b 55 b0 mov -0x50(%ebp),%edx <== NOT EXECUTED
113817: 29 f2 sub %esi,%edx <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
113819: 03 75 cc add -0x34(%ebp),%esi <== NOT EXECUTED
11381c: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
11381f: 89 d1 mov %edx,%ecx <== NOT EXECUTED
113821: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
IMFS_update_atime( the_jnode );
113823: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
113826: 6a 00 push $0x0 <== NOT EXECUTED
113828: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
11382b: 50 push %eax <== NOT EXECUTED
11382c: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED
11382f: e8 2c 4e ff ff call 108660 <gettimeofday> <== NOT EXECUTED
113834: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
113837: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
11383a: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED
return my_length;
11383d: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
113840: 89 d0 mov %edx,%eax <== NOT EXECUTED
113842: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
113845: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
113848: 5b pop %ebx <== NOT EXECUTED
113849: 5e pop %esi <== NOT EXECUTED
11384a: 5f pop %edi <== NOT EXECUTED
11384b: c9 leave <== NOT EXECUTED
11384c: c3 ret <== NOT EXECUTED
11384d: 8d 76 00 lea 0x0(%esi),%esi <== 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;
if ( last_byte > the_jnode->info.file.size )
113850: 8b 4d cc mov -0x34(%ebp),%ecx
113853: 39 4d d0 cmp %ecx,-0x30(%ebp)
113856: 0f 87 52 fe ff ff ja 1136ae <IMFS_memfile_read+0x6a>
11385c: e9 35 ff ff ff jmp 113796 <IMFS_memfile_read+0x152>
113861: 8d 76 00 lea 0x0(%esi),%esi
*/
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;
113864: 89 ca mov %ecx,%edx
113866: e9 5d ff ff ff jmp 1137c8 <IMFS_memfile_read+0x184>
11386b: 90 nop
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
11386c: 7c 04 jl 113872 <IMFS_memfile_read+0x22e><== NOT EXECUTED
11386e: 39 d0 cmp %edx,%eax <== NOT EXECUTED
113870: 77 a2 ja 113814 <IMFS_memfile_read+0x1d0><== NOT EXECUTED
113872: 89 c2 mov %eax,%edx <== NOT EXECUTED
113874: eb a3 jmp 113819 <IMFS_memfile_read+0x1d5><== NOT EXECUTED
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
113876: e8 89 18 00 00 call 115104 <__errno> <== NOT EXECUTED
11387b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
113881: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
113886: e9 fd fe ff ff jmp 113788 <IMFS_memfile_read+0x144><== NOT EXECUTED
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
11388b: 68 22 34 12 00 push $0x123422 <== NOT EXECUTED
113890: 68 2a 35 12 00 push $0x12352a <== NOT EXECUTED
113895: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED
11389a: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
11389f: e8 00 4a ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
1138a4: 68 33 34 12 00 push $0x123433 <== NOT EXECUTED
1138a9: 68 2a 35 12 00 push $0x12352a <== NOT EXECUTED
1138ae: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED
1138b3: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
1138b8: e8 e7 49 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
1138bd: 68 22 34 12 00 push $0x123422 <== NOT EXECUTED
1138c2: 68 2a 35 12 00 push $0x12352a <== NOT EXECUTED
1138c7: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED
1138cc: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
1138d1: e8 ce 49 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
1138d6: 68 ac 34 12 00 push $0x1234ac <== NOT EXECUTED
1138db: 68 2a 35 12 00 push $0x12352a <== NOT EXECUTED
1138e0: 68 51 02 00 00 push $0x251 <== NOT EXECUTED
1138e5: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
1138ea: e8 b5 49 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
1138ef: 68 0c 34 12 00 push $0x12340c <== NOT EXECUTED
1138f4: 68 2a 35 12 00 push $0x12352a <== NOT EXECUTED
1138f9: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED
1138fe: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
113903: e8 9c 49 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
113908: 68 22 34 12 00 push $0x123422 <== NOT EXECUTED
11390d: 68 2a 35 12 00 push $0x12352a <== NOT EXECUTED
113912: 68 96 02 00 00 push $0x296 <== NOT EXECUTED
113917: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
11391c: e8 83 49 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
00112dcc <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
112dcc: 55 push %ebp
112dcd: 89 e5 mov %esp,%ebp
112dcf: 57 push %edi
112dd0: 56 push %esi
112dd1: 53 push %ebx
112dd2: 83 ec 1c sub $0x1c,%esp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
112dd5: 8b 55 08 mov 0x8(%ebp),%edx
112dd8: 85 d2 test %edx,%edx
112dda: 0f 84 61 01 00 00 je 112f41 <IMFS_memfile_remove+0x175><== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
112de0: 8b 45 08 mov 0x8(%ebp),%eax
112de3: 83 78 4c 05 cmpl $0x5,0x4c(%eax)
112de7: 0f 85 6d 01 00 00 jne 112f5a <IMFS_memfile_remove+0x18e><== NEVER TAKEN
/*
* 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;
112ded: 8b 3d 38 8f 12 00 mov 0x128f38,%edi
112df3: c1 ef 02 shr $0x2,%edi
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
112df6: 8b 55 08 mov 0x8(%ebp),%edx
112df9: 8b 42 58 mov 0x58(%edx),%eax
112dfc: 85 c0 test %eax,%eax
112dfe: 74 12 je 112e12 <IMFS_memfile_remove+0x46>
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
112e00: 83 ec 08 sub $0x8,%esp
112e03: 57 push %edi
112e04: 89 d0 mov %edx,%eax
112e06: 83 c0 58 add $0x58,%eax
112e09: 50 push %eax
112e0a: e8 f5 fe ff ff call 112d04 <memfile_free_blocks_in_table>
112e0f: 83 c4 10 add $0x10,%esp
}
if ( info->doubly_indirect ) {
112e12: 8b 4d 08 mov 0x8(%ebp),%ecx
112e15: 8b 51 5c mov 0x5c(%ecx),%edx
112e18: 85 d2 test %edx,%edx
112e1a: 74 57 je 112e73 <IMFS_memfile_remove+0xa7><== ALWAYS TAKEN
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
112e1c: a1 38 8f 12 00 mov 0x128f38,%eax <== NOT EXECUTED
112e21: 89 c1 mov %eax,%ecx <== NOT EXECUTED
112e23: c1 e9 02 shr $0x2,%ecx <== NOT EXECUTED
112e26: 74 38 je 112e60 <IMFS_memfile_remove+0x94><== NOT EXECUTED
112e28: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
112e2a: 31 db xor %ebx,%ebx <== NOT EXECUTED
112e2c: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
112e2f: eb 06 jmp 112e37 <IMFS_memfile_remove+0x6b><== NOT EXECUTED
112e31: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
112e34: 8b 56 5c mov 0x5c(%esi),%edx <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
112e37: c1 e1 02 shl $0x2,%ecx <== NOT EXECUTED
112e3a: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1) <== NOT EXECUTED
112e3e: 74 14 je 112e54 <IMFS_memfile_remove+0x88><== NOT EXECUTED
memfile_free_blocks_in_table(
112e40: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
112e43: 57 push %edi <== NOT EXECUTED
112e44: 01 ca add %ecx,%edx <== NOT EXECUTED
112e46: 52 push %edx <== NOT EXECUTED
112e47: e8 b8 fe ff ff call 112d04 <memfile_free_blocks_in_table><== NOT EXECUTED
112e4c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112e4f: a1 38 8f 12 00 mov 0x128f38,%eax <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
112e54: 43 inc %ebx <== NOT EXECUTED
112e55: 89 d9 mov %ebx,%ecx <== NOT EXECUTED
112e57: 89 c2 mov %eax,%edx <== NOT EXECUTED
112e59: c1 ea 02 shr $0x2,%edx <== NOT EXECUTED
112e5c: 39 da cmp %ebx,%edx <== NOT EXECUTED
112e5e: 77 d4 ja 112e34 <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 );
112e60: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
112e63: 57 push %edi <== NOT EXECUTED
112e64: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
112e67: 83 c0 5c add $0x5c,%eax <== NOT EXECUTED
112e6a: 50 push %eax <== NOT EXECUTED
112e6b: e8 94 fe ff ff call 112d04 <memfile_free_blocks_in_table><== NOT EXECUTED
112e70: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
if ( info->triply_indirect ) {
112e73: 8b 45 08 mov 0x8(%ebp),%eax
112e76: 8b 50 60 mov 0x60(%eax),%edx
112e79: 85 d2 test %edx,%edx
112e7b: 0f 84 b6 00 00 00 je 112f37 <IMFS_memfile_remove+0x16b><== ALWAYS TAKEN
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
112e81: a1 38 8f 12 00 mov 0x128f38,%eax <== NOT EXECUTED
112e86: 89 c1 mov %eax,%ecx <== NOT EXECUTED
112e88: c1 e9 02 shr $0x2,%ecx <== NOT EXECUTED
112e8b: 0f 84 93 00 00 00 je 112f24 <IMFS_memfile_remove+0x158><== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
112e91: 8b 32 mov (%edx),%esi <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
112e93: 85 f6 test %esi,%esi <== NOT EXECUTED
112e95: 0f 84 89 00 00 00 je 112f24 <IMFS_memfile_remove+0x158><== NOT EXECUTED
112e9b: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
112ea2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
112ea9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
112eac: 89 c2 mov %eax,%edx <== NOT EXECUTED
112eae: c1 ea 02 shr $0x2,%edx <== NOT EXECUTED
112eb1: 74 30 je 112ee3 <IMFS_memfile_remove+0x117><== NOT EXECUTED
112eb3: 31 d2 xor %edx,%edx <== NOT EXECUTED
112eb5: 31 db xor %ebx,%ebx <== NOT EXECUTED
112eb7: 90 nop <== NOT EXECUTED
if ( p[j] ) {
112eb8: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED
112ebb: 8b 0c 16 mov (%esi,%edx,1),%ecx <== NOT EXECUTED
112ebe: 85 c9 test %ecx,%ecx <== NOT EXECUTED
112ec0: 74 15 je 112ed7 <IMFS_memfile_remove+0x10b><== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
112ec2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
112ec5: 57 push %edi <== NOT EXECUTED
112ec6: 8d 14 16 lea (%esi,%edx,1),%edx <== NOT EXECUTED
112ec9: 52 push %edx <== NOT EXECUTED
112eca: e8 35 fe ff ff call 112d04 <memfile_free_blocks_in_table><== NOT EXECUTED
112ecf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112ed2: a1 38 8f 12 00 mov 0x128f38,%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++ ) {
112ed7: 43 inc %ebx <== NOT EXECUTED
112ed8: 89 da mov %ebx,%edx <== NOT EXECUTED
112eda: 89 c1 mov %eax,%ecx <== NOT EXECUTED
112edc: c1 e9 02 shr $0x2,%ecx <== NOT EXECUTED
112edf: 39 d9 cmp %ebx,%ecx <== NOT EXECUTED
112ee1: 77 d5 ja 112eb8 <IMFS_memfile_remove+0xec><== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
112ee3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
112ee6: 57 push %edi <== NOT EXECUTED
112ee7: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
112eea: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
112eed: 03 41 60 add 0x60(%ecx),%eax <== NOT EXECUTED
112ef0: 50 push %eax <== NOT EXECUTED
112ef1: e8 0e fe ff ff call 112d04 <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++ ) {
112ef6: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED
112ef9: a1 38 8f 12 00 mov 0x128f38,%eax <== NOT EXECUTED
112efe: 89 c2 mov %eax,%edx <== NOT EXECUTED
112f00: c1 ea 02 shr $0x2,%edx <== NOT EXECUTED
112f03: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112f06: 3b 55 e4 cmp -0x1c(%ebp),%edx <== NOT EXECUTED
112f09: 76 19 jbe 112f24 <IMFS_memfile_remove+0x158><== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
112f0b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
112f0e: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED
112f11: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
112f14: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
112f17: 8b 51 60 mov 0x60(%ecx),%edx <== NOT EXECUTED
112f1a: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
112f1d: 8b 34 0a mov (%edx,%ecx,1),%esi <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
112f20: 85 f6 test %esi,%esi <== NOT EXECUTED
112f22: 75 88 jne 112eac <IMFS_memfile_remove+0xe0><== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
112f24: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
112f27: 57 push %edi <== NOT EXECUTED
112f28: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
112f2b: 83 c0 60 add $0x60,%eax <== NOT EXECUTED
112f2e: 50 push %eax <== NOT EXECUTED
112f2f: e8 d0 fd ff ff call 112d04 <memfile_free_blocks_in_table><== NOT EXECUTED
112f34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
112f37: 31 c0 xor %eax,%eax
112f39: 8d 65 f4 lea -0xc(%ebp),%esp
112f3c: 5b pop %ebx
112f3d: 5e pop %esi
112f3e: 5f pop %edi
112f3f: c9 leave
112f40: c3 ret
/*
* Perform internal consistency checks
*/
assert( the_jnode );
112f41: 68 0c 34 12 00 push $0x12340c <== NOT EXECUTED
112f46: 68 3c 35 12 00 push $0x12353c <== NOT EXECUTED
112f4b: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED
112f50: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
112f55: e8 4a 53 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
112f5a: 68 88 34 12 00 push $0x123488 <== NOT EXECUTED
112f5f: 68 3c 35 12 00 push $0x12353c <== NOT EXECUTED
112f64: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED
112f69: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
112f6e: e8 31 53 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
00112d80 <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
112d80: 55 push %ebp <== NOT EXECUTED
112d81: 89 e5 mov %esp,%ebp <== NOT EXECUTED
112d83: 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 );
112d86: 6a 00 push $0x0 <== NOT EXECUTED
112d88: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
112d8b: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
112d8e: e8 91 fd ff ff call 112b24 <IMFS_memfile_get_block_pointer><== NOT EXECUTED
assert( block_ptr );
112d93: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112d96: 85 c0 test %eax,%eax <== NOT EXECUTED
112d98: 74 18 je 112db2 <IMFS_memfile_remove_block+0x32><== NOT EXECUTED
if ( block_ptr ) {
ptr = *block_ptr;
112d9a: 8b 10 mov (%eax),%edx <== NOT EXECUTED
*block_ptr = 0;
112d9c: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
memfile_free_block( ptr );
112da2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112da5: 52 push %edx <== NOT EXECUTED
112da6: e8 39 fd ff ff call 112ae4 <memfile_free_block> <== NOT EXECUTED
}
return 1;
}
112dab: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
112db0: c9 leave <== NOT EXECUTED
112db1: c3 ret <== NOT EXECUTED
{
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
112db2: 68 22 34 12 00 push $0x123422 <== NOT EXECUTED
112db7: 68 6d 35 12 00 push $0x12356d <== NOT EXECUTED
112dbc: 68 96 01 00 00 push $0x196 <== NOT EXECUTED
112dc1: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
112dc6: e8 d9 54 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
00113314 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
113314: 55 push %ebp
113315: 89 e5 mov %esp,%ebp
113317: 57 push %edi
113318: 56 push %esi
113319: 53 push %ebx
11331a: 83 ec 3c sub $0x3c,%esp
11331d: 8b 5d 0c mov 0xc(%ebp),%ebx
113320: 8b 75 10 mov 0x10(%ebp),%esi
/*
* Perform internal consistency checks
*/
assert( the_jnode );
113323: 8b 4d 08 mov 0x8(%ebp),%ecx
113326: 85 c9 test %ecx,%ecx
113328: 0f 84 d8 01 00 00 je 113506 <IMFS_memfile_write+0x1f2><== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
11332e: 8b 45 08 mov 0x8(%ebp),%eax
113331: 83 78 4c 05 cmpl $0x5,0x4c(%eax)
113335: 0f 85 b2 01 00 00 jne 1134ed <IMFS_memfile_write+0x1d9><== NEVER TAKEN
/*
* Error check arguments
*/
assert( source );
11333b: 8b 55 14 mov 0x14(%ebp),%edx
11333e: 85 d2 test %edx,%edx
113340: 0f 84 d9 01 00 00 je 11351f <IMFS_memfile_write+0x20b><== NEVER TAKEN
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
113346: 8b 45 18 mov 0x18(%ebp),%eax
113349: 85 c0 test %eax,%eax
11334b: 0f 84 6c 01 00 00 je 1134bd <IMFS_memfile_write+0x1a9><== NEVER TAKEN
* 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 ) {
113351: 8b 45 18 mov 0x18(%ebp),%eax
113354: 01 d8 add %ebx,%eax
113356: 31 d2 xor %edx,%edx
113358: 8b 4d 08 mov 0x8(%ebp),%ecx
11335b: 3b 51 54 cmp 0x54(%ecx),%edx
11335e: 7c 10 jl 113370 <IMFS_memfile_write+0x5c><== NEVER TAKEN
113360: 0f 8f 26 01 00 00 jg 11348c <IMFS_memfile_write+0x178><== NEVER TAKEN
113366: 3b 41 50 cmp 0x50(%ecx),%eax
113369: 0f 87 1d 01 00 00 ja 11348c <IMFS_memfile_write+0x178><== ALWAYS TAKEN
11336f: 90 nop
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
113370: a1 38 8f 12 00 mov 0x128f38,%eax
113375: 89 45 d4 mov %eax,-0x2c(%ebp)
113378: 99 cltd
113379: 89 45 c8 mov %eax,-0x38(%ebp)
11337c: 89 55 cc mov %edx,-0x34(%ebp)
11337f: 52 push %edx
113380: 50 push %eax
113381: 56 push %esi
113382: 53 push %ebx
113383: e8 04 cf 00 00 call 12028c <__moddi3>
113388: 83 c4 10 add $0x10,%esp
11338b: 89 c7 mov %eax,%edi
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
11338d: ff 75 cc pushl -0x34(%ebp)
113390: ff 75 c8 pushl -0x38(%ebp)
113393: 56 push %esi
113394: 53 push %ebx
113395: e8 a2 cd 00 00 call 12013c <__divdi3>
11339a: 83 c4 10 add $0x10,%esp
11339d: 89 c3 mov %eax,%ebx
if ( start_offset ) {
11339f: 85 ff test %edi,%edi
1133a1: 0f 85 a1 00 00 00 jne 113448 <IMFS_memfile_write+0x134>
1133a7: 8b 75 14 mov 0x14(%ebp),%esi
1133aa: 8b 55 18 mov 0x18(%ebp),%edx
1133ad: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
1133b4: 3b 55 d4 cmp -0x2c(%ebp),%edx
1133b7: 72 3b jb 1133f4 <IMFS_memfile_write+0xe0>
1133b9: 8d 76 00 lea 0x0(%esi),%esi
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
1133bc: 51 push %ecx
1133bd: 6a 00 push $0x0
1133bf: 53 push %ebx
1133c0: ff 75 08 pushl 0x8(%ebp)
1133c3: 89 55 c4 mov %edx,-0x3c(%ebp)
1133c6: e8 59 f7 ff ff call 112b24 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
1133cb: 83 c4 10 add $0x10,%esp
1133ce: 85 c0 test %eax,%eax
1133d0: 8b 55 c4 mov -0x3c(%ebp),%edx
1133d3: 0f 84 fb 00 00 00 je 1134d4 <IMFS_memfile_write+0x1c0><== NEVER TAKEN
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 );
1133d9: 8b 00 mov (%eax),%eax
src += to_copy;
1133db: 89 c7 mov %eax,%edi
1133dd: 8b 4d d4 mov -0x2c(%ebp),%ecx
1133e0: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
1133e2: 43 inc %ebx
my_length -= to_copy;
1133e3: 2b 55 d4 sub -0x2c(%ebp),%edx
*
* 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(
1133e6: 8b 4d d4 mov -0x2c(%ebp),%ecx
1133e9: 01 4d c8 add %ecx,-0x38(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
1133ec: 39 15 38 8f 12 00 cmp %edx,0x128f38
1133f2: 76 c8 jbe 1133bc <IMFS_memfile_write+0xa8>
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
1133f4: 85 d2 test %edx,%edx
1133f6: 74 28 je 113420 <IMFS_memfile_write+0x10c>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
1133f8: 50 push %eax
1133f9: 6a 00 push $0x0
1133fb: 53 push %ebx
1133fc: ff 75 08 pushl 0x8(%ebp)
1133ff: 89 55 c4 mov %edx,-0x3c(%ebp)
113402: e8 1d f7 ff ff call 112b24 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
113407: 83 c4 10 add $0x10,%esp
11340a: 85 c0 test %eax,%eax
11340c: 8b 55 c4 mov -0x3c(%ebp),%edx
11340f: 0f 84 23 01 00 00 je 113538 <IMFS_memfile_write+0x224><== NEVER TAKEN
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 );
113415: 8b 00 mov (%eax),%eax
113417: 89 c7 mov %eax,%edi
113419: 89 d1 mov %edx,%ecx
11341b: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
my_length = 0;
copied += to_copy;
11341d: 01 55 c8 add %edx,-0x38(%ebp)
}
IMFS_mtime_ctime_update( the_jnode );
113420: 83 ec 08 sub $0x8,%esp
113423: 6a 00 push $0x0
113425: 8d 45 e0 lea -0x20(%ebp),%eax
113428: 50 push %eax
113429: e8 32 52 ff ff call 108660 <gettimeofday>
11342e: 8b 45 e0 mov -0x20(%ebp),%eax
113431: 8b 55 08 mov 0x8(%ebp),%edx
113434: 89 42 44 mov %eax,0x44(%edx)
113437: 89 42 48 mov %eax,0x48(%edx)
return copied;
11343a: 83 c4 10 add $0x10,%esp
}
11343d: 8b 45 c8 mov -0x38(%ebp),%eax
113440: 8d 65 f4 lea -0xc(%ebp),%esp
113443: 5b pop %ebx
113444: 5e pop %esi
113445: 5f pop %edi
113446: c9 leave
113447: c3 ret
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
113448: 56 push %esi
113449: 6a 00 push $0x0
11344b: 50 push %eax
11344c: ff 75 08 pushl 0x8(%ebp)
11344f: e8 d0 f6 ff ff call 112b24 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
113454: 83 c4 10 add $0x10,%esp
113457: 85 c0 test %eax,%eax
113459: 0f 84 f2 00 00 00 je 113551 <IMFS_memfile_write+0x23d><== NEVER TAKEN
*/
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;
11345f: 8b 55 d4 mov -0x2c(%ebp),%edx
113462: 29 fa sub %edi,%edx
113464: 89 55 c8 mov %edx,-0x38(%ebp)
113467: 8b 4d 18 mov 0x18(%ebp),%ecx
11346a: 39 ca cmp %ecx,%edx
11346c: 77 4a ja 1134b8 <IMFS_memfile_write+0x1a4>
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 );
11346e: 03 38 add (%eax),%edi
src += to_copy;
113470: 8b 75 14 mov 0x14(%ebp),%esi
113473: 8b 4d c8 mov -0x38(%ebp),%ecx
113476: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
113478: 43 inc %ebx
my_length -= to_copy;
113479: 8b 55 18 mov 0x18(%ebp),%edx
11347c: 2b 55 c8 sub -0x38(%ebp),%edx
copied += to_copy;
11347f: a1 38 8f 12 00 mov 0x128f38,%eax
113484: 89 45 d4 mov %eax,-0x2c(%ebp)
113487: e9 28 ff ff ff jmp 1133b4 <IMFS_memfile_write+0xa0>
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
status = IMFS_memfile_extend( the_jnode, last_byte );
11348c: 57 push %edi
11348d: 52 push %edx
11348e: 50 push %eax
11348f: ff 75 08 pushl 0x8(%ebp)
113492: e8 2d fc ff ff call 1130c4 <IMFS_memfile_extend>
if ( status )
113497: 83 c4 10 add $0x10,%esp
11349a: 85 c0 test %eax,%eax
11349c: 0f 84 ce fe ff ff je 113370 <IMFS_memfile_write+0x5c><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
1134a2: e8 5d 1c 00 00 call 115104 <__errno> <== NOT EXECUTED
1134a7: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
1134ad: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) <== NOT EXECUTED
1134b4: eb 87 jmp 11343d <IMFS_memfile_write+0x129><== NOT EXECUTED
1134b6: 66 90 xchg %ax,%ax <== 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;
1134b8: 89 4d c8 mov %ecx,-0x38(%ebp)
1134bb: eb b1 jmp 11346e <IMFS_memfile_write+0x15a>
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
1134bd: e8 42 1c 00 00 call 115104 <__errno> <== NOT EXECUTED
1134c2: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
1134c8: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) <== NOT EXECUTED
1134cf: e9 69 ff ff ff jmp 11343d <IMFS_memfile_write+0x129><== NOT EXECUTED
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
1134d4: 68 22 34 12 00 push $0x123422 <== NOT EXECUTED
1134d9: 68 17 35 12 00 push $0x123517 <== NOT EXECUTED
1134de: 68 30 03 00 00 push $0x330 <== NOT EXECUTED
1134e3: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
1134e8: e8 b7 4d ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
1134ed: 68 88 34 12 00 push $0x123488 <== NOT EXECUTED
1134f2: 68 17 35 12 00 push $0x123517 <== NOT EXECUTED
1134f7: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED
1134fc: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
113501: e8 9e 4d ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
113506: 68 0c 34 12 00 push $0x12340c <== NOT EXECUTED
11350b: 68 17 35 12 00 push $0x123517 <== NOT EXECUTED
113510: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED
113515: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
11351a: e8 85 4d ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
11351f: 68 2c 34 12 00 push $0x12342c <== NOT EXECUTED
113524: 68 17 35 12 00 push $0x123517 <== NOT EXECUTED
113529: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED
11352e: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
113533: e8 6c 4d ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
113538: 68 22 34 12 00 push $0x123422 <== NOT EXECUTED
11353d: 68 17 35 12 00 push $0x123517 <== NOT EXECUTED
113542: 68 46 03 00 00 push $0x346 <== NOT EXECUTED
113547: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
11354c: e8 53 4d ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
113551: 68 22 34 12 00 push $0x123422 <== NOT EXECUTED
113556: 68 17 35 12 00 push $0x123517 <== NOT EXECUTED
11355b: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED
113560: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
113565: e8 3a 4d ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
00107dec <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
107dec: 55 push %ebp
107ded: 89 e5 mov %esp,%ebp
107def: 57 push %edi
107df0: 56 push %esi
107df1: 53 push %ebx
107df2: 83 ec 5c sub $0x5c,%esp
107df5: 8b 55 08 mov 0x8(%ebp),%edx
107df8: 8b 5d 0c mov 0xc(%ebp),%ebx
107dfb: 8b 75 10 mov 0x10(%ebp),%esi
107dfe: 8b 45 14 mov 0x14(%ebp),%eax
107e01: 89 45 a4 mov %eax,-0x5c(%ebp)
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 );
107e04: 31 c0 xor %eax,%eax
107e06: b9 ff ff ff ff mov $0xffffffff,%ecx
107e0b: 89 d7 mov %edx,%edi
107e0d: f2 ae repnz scas %es:(%edi),%al
107e0f: f7 d1 not %ecx
107e11: 49 dec %ecx
107e12: 8d 45 e4 lea -0x1c(%ebp),%eax
107e15: 50 push %eax
107e16: 8d 7d af lea -0x51(%ebp),%edi
107e19: 57 push %edi
107e1a: 51 push %ecx
107e1b: 52 push %edx
107e1c: e8 63 8c 00 00 call 110a84 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
107e21: 89 d8 mov %ebx,%eax
107e23: 25 00 f0 00 00 and $0xf000,%eax
107e28: 83 c4 10 add $0x10,%esp
107e2b: 3d 00 40 00 00 cmp $0x4000,%eax
107e30: 74 5e je 107e90 <IMFS_mknod+0xa4>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
107e32: 3d 00 80 00 00 cmp $0x8000,%eax
107e37: 74 4f je 107e88 <IMFS_mknod+0x9c>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
107e39: 3d 00 60 00 00 cmp $0x6000,%eax
107e3e: 74 38 je 107e78 <IMFS_mknod+0x8c>
107e40: 3d 00 20 00 00 cmp $0x2000,%eax
107e45: 74 31 je 107e78 <IMFS_mknod+0x8c>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
107e47: 3d 00 10 00 00 cmp $0x1000,%eax
107e4c: 75 4a jne 107e98 <IMFS_mknod+0xac> <== NEVER TAKEN
107e4e: ba 07 00 00 00 mov $0x7,%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(
107e53: 83 ec 0c sub $0xc,%esp
107e56: 8d 45 d0 lea -0x30(%ebp),%eax
107e59: 50 push %eax
107e5a: 53 push %ebx
107e5b: 57 push %edi
107e5c: 52 push %edx
107e5d: ff 75 18 pushl 0x18(%ebp)
107e60: e8 e7 7e 00 00 call 10fd4c <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
107e65: 83 c4 20 add $0x20,%esp
107e68: 85 c0 test %eax,%eax
107e6a: 74 3e je 107eaa <IMFS_mknod+0xbe> <== NEVER TAKEN
107e6c: 31 c0 xor %eax,%eax
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
107e6e: 8d 65 f4 lea -0xc(%ebp),%esp
107e71: 5b pop %ebx
107e72: 5e pop %esi
107e73: 5f pop %edi
107e74: c9 leave
107e75: c3 ret
107e76: 66 90 xchg %ax,%ax
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
107e78: 89 75 d0 mov %esi,-0x30(%ebp)
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
107e7b: 8b 45 a4 mov -0x5c(%ebp),%eax
107e7e: 89 45 d4 mov %eax,-0x2c(%ebp)
107e81: ba 02 00 00 00 mov $0x2,%edx
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
107e86: eb cb jmp 107e53 <IMFS_mknod+0x67>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
107e88: ba 05 00 00 00 mov $0x5,%edx
107e8d: eb c4 jmp 107e53 <IMFS_mknod+0x67>
107e8f: 90 nop
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
107e90: ba 01 00 00 00 mov $0x1,%edx
107e95: eb bc jmp 107e53 <IMFS_mknod+0x67>
107e97: 90 nop
107e98: e8 67 d2 00 00 call 115104 <__errno> <== NOT EXECUTED
107e9d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107ea3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107ea8: eb c4 jmp 107e6e <IMFS_mknod+0x82> <== NOT EXECUTED
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
107eaa: e8 55 d2 00 00 call 115104 <__errno> <== NOT EXECUTED
107eaf: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107eb5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107eba: eb b2 jmp 107e6e <IMFS_mknod+0x82> <== NOT EXECUTED
00107ebc <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
107ebc: 55 push %ebp
107ebd: 89 e5 mov %esp,%ebp
107ebf: 83 ec 08 sub $0x8,%esp
107ec2: 8b 55 08 mov 0x8(%ebp),%edx
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
107ec5: 8b 42 08 mov 0x8(%edx),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
107ec8: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
107ecc: 75 0a jne 107ed8 <IMFS_mount+0x1c> <== NEVER TAKEN
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
107ece: 89 50 5c mov %edx,0x5c(%eax)
107ed1: 31 c0 xor %eax,%eax
return 0;
}
107ed3: c9 leave
107ed4: c3 ret
107ed5: 8d 76 00 lea 0x0(%esi),%esi
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
107ed8: e8 27 d2 00 00 call 115104 <__errno> <== NOT EXECUTED
107edd: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
107ee3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
107ee8: c9 leave <== NOT EXECUTED
107ee9: c3 ret <== NOT EXECUTED
00109bbc <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
109bbc: 55 push %ebp
109bbd: 89 e5 mov %esp,%ebp
109bbf: 53 push %ebx
109bc0: 83 ec 04 sub $0x4,%esp
109bc3: 8b 5d 08 mov 0x8(%ebp),%ebx
assert( the_jnode );
109bc6: 85 db test %ebx,%ebx
109bc8: 0f 84 7f 01 00 00 je 109d4d <IMFS_print_jnode+0x191><== NEVER TAKEN
fprintf(stdout, "%s", the_jnode->name );
109bce: 83 ec 08 sub $0x8,%esp
109bd1: a1 e0 d3 12 00 mov 0x12d3e0,%eax
109bd6: ff 70 08 pushl 0x8(%eax)
109bd9: 8d 43 0c lea 0xc(%ebx),%eax
109bdc: 50 push %eax
109bdd: e8 1a f1 00 00 call 118cfc <fputs>
switch( the_jnode->type ) {
109be2: 8b 43 4c mov 0x4c(%ebx),%eax
109be5: 83 c4 10 add $0x10,%esp
109be8: 83 f8 07 cmp $0x7,%eax
109beb: 76 2b jbe 109c18 <IMFS_print_jnode+0x5c> <== ALWAYS TAKEN
fprintf(stdout, " FIFO not printed\n" );
assert(0);
break;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
109bed: 52 push %edx <== NOT EXECUTED
109bee: 50 push %eax <== NOT EXECUTED
109bef: 68 ae 7e 12 00 push $0x127eae <== NOT EXECUTED
109bf4: a1 e0 d3 12 00 mov 0x12d3e0,%eax <== NOT EXECUTED
109bf9: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
109bfc: e8 d3 ef 00 00 call 118bd4 <fprintf> <== NOT EXECUTED
assert(0);
109c01: 68 df 57 12 00 push $0x1257df <== NOT EXECUTED
109c06: 68 18 80 12 00 push $0x128018 <== NOT EXECUTED
109c0b: 6a 6c push $0x6c <== NOT EXECUTED
109c0d: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED
109c12: e8 85 09 00 00 call 10a59c <__assert_func> <== NOT EXECUTED
109c17: 90 nop <== NOT EXECUTED
)
{
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
109c18: ff 24 85 e4 7f 12 00 jmp *0x127fe4(,%eax,4)
109c1f: 90 nop
fprintf(stdout, " links not printed\n" );
assert(0);
break;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
109c20: a1 e0 d3 12 00 mov 0x12d3e0,%eax <== NOT EXECUTED
109c25: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
109c28: 6a 12 push $0x12 <== NOT EXECUTED
109c2a: 6a 01 push $0x1 <== NOT EXECUTED
109c2c: 68 9b 7e 12 00 push $0x127e9b <== NOT EXECUTED
109c31: e8 fe fc 00 00 call 119934 <fwrite> <== NOT EXECUTED
assert(0);
109c36: 68 df 57 12 00 push $0x1257df <== NOT EXECUTED
109c3b: 68 18 80 12 00 push $0x128018 <== NOT EXECUTED
109c40: 6a 67 push $0x67 <== NOT EXECUTED
109c42: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED
109c47: e8 50 09 00 00 call 10a59c <__assert_func> <== NOT EXECUTED
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
109c4c: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED
109c4f: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED
109c52: 68 6c 7e 12 00 push $0x127e6c <== NOT EXECUTED
109c57: a1 e0 d3 12 00 mov 0x12d3e0,%eax <== NOT EXECUTED
109c5c: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
109c5f: e8 70 ef 00 00 call 118bd4 <fprintf> <== NOT EXECUTED
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
109c64: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
109c67: c7 45 08 95 82 12 00 movl $0x128295,0x8(%ebp) <== NOT EXECUTED
}
109c6e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
109c71: c9 leave <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
109c72: e9 19 09 01 00 jmp 11a590 <puts> <== NOT EXECUTED
109c77: 90 nop <== NOT EXECUTED
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
109c78: 51 push %ecx
109c79: ff 73 50 pushl 0x50(%ebx)
109c7c: 68 7b 7e 12 00 push $0x127e7b
109c81: a1 e0 d3 12 00 mov 0x12d3e0,%eax
109c86: ff 70 08 pushl 0x8(%eax)
109c89: e8 46 ef 00 00 call 118bd4 <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
109c8e: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
109c91: c7 45 08 95 82 12 00 movl $0x128295,0x8(%ebp)
}
109c98: 8b 5d fc mov -0x4(%ebp),%ebx
109c9b: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
109c9c: e9 ef 08 01 00 jmp 11a590 <puts>
109ca1: 8d 76 00 lea 0x0(%esi),%esi
fprintf(stdout, " links not printed\n" );
assert(0);
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
109ca4: a1 e0 d3 12 00 mov 0x12d3e0,%eax <== NOT EXECUTED
109ca9: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
109cac: 6a 13 push $0x13 <== NOT EXECUTED
109cae: 6a 01 push $0x1 <== NOT EXECUTED
109cb0: 68 87 7e 12 00 push $0x127e87 <== NOT EXECUTED
109cb5: e8 7a fc 00 00 call 119934 <fwrite> <== NOT EXECUTED
assert(0);
109cba: 68 df 57 12 00 push $0x1257df <== NOT EXECUTED
109cbf: 68 18 80 12 00 push $0x128018 <== NOT EXECUTED
109cc4: 6a 62 push $0x62 <== NOT EXECUTED
109cc6: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED
109ccb: e8 cc 08 00 00 call 10a59c <__assert_func> <== NOT EXECUTED
(uint32_t)the_jnode->info.file.size );
#endif
break;
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
109cd0: a1 e0 d3 12 00 mov 0x12d3e0,%eax <== NOT EXECUTED
109cd5: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
109cd8: 6a 13 push $0x13 <== NOT EXECUTED
109cda: 6a 01 push $0x1 <== NOT EXECUTED
109cdc: 68 87 7e 12 00 push $0x127e87 <== NOT EXECUTED
109ce1: e8 4e fc 00 00 call 119934 <fwrite> <== NOT EXECUTED
assert(0);
109ce6: 68 df 57 12 00 push $0x1257df <== NOT EXECUTED
109ceb: 68 18 80 12 00 push $0x128018 <== NOT EXECUTED
109cf0: 6a 5d push $0x5d <== NOT EXECUTED
109cf2: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED
109cf7: e8 a0 08 00 00 call 10a59c <__assert_func> <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
109cfc: ff 73 54 pushl 0x54(%ebx)
109cff: ff 73 50 pushl 0x50(%ebx)
109d02: 68 59 7e 12 00 push $0x127e59
109d07: a1 e0 d3 12 00 mov 0x12d3e0,%eax
109d0c: ff 70 08 pushl 0x8(%eax)
109d0f: e8 c0 ee 00 00 call 118bd4 <fprintf>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
109d14: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
109d17: c7 45 08 95 82 12 00 movl $0x128295,0x8(%ebp)
}
109d1e: 8b 5d fc mov -0x4(%ebp),%ebx
109d21: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
109d22: e9 69 08 01 00 jmp 11a590 <puts>
109d27: 90 nop
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
109d28: 83 ec 08 sub $0x8,%esp
109d2b: a1 e0 d3 12 00 mov 0x12d3e0,%eax
109d30: ff 70 08 pushl 0x8(%eax)
109d33: 6a 2f push $0x2f
109d35: e8 d6 ee 00 00 call 118c10 <fputc>
break;
109d3a: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
109d3d: c7 45 08 95 82 12 00 movl $0x128295,0x8(%ebp)
}
109d44: 8b 5d fc mov -0x4(%ebp),%ebx
109d47: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
109d48: e9 43 08 01 00 jmp 11a590 <puts>
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
assert( the_jnode );
109d4d: 68 4f 7e 12 00 push $0x127e4f <== NOT EXECUTED
109d52: 68 18 80 12 00 push $0x128018 <== NOT EXECUTED
109d57: 6a 38 push $0x38 <== NOT EXECUTED
109d59: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED
109d5e: e8 39 08 00 00 call 10a59c <__assert_func> <== NOT EXECUTED
00107efc <IMFS_readlink>:
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
107efc: 55 push %ebp
107efd: 89 e5 mov %esp,%ebp
107eff: 57 push %edi
107f00: 56 push %esi
107f01: 53 push %ebx
107f02: 83 ec 0c sub $0xc,%esp
107f05: 8b 7d 0c mov 0xc(%ebp),%edi
107f08: 8b 75 10 mov 0x10(%ebp),%esi
IMFS_jnode_t *node;
int i;
node = loc->node_access;
107f0b: 8b 45 08 mov 0x8(%ebp),%eax
107f0e: 8b 18 mov (%eax),%ebx
if ( node->type != IMFS_SYM_LINK )
107f10: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx)
107f14: 75 36 jne 107f4c <IMFS_readlink+0x50> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
107f16: 85 f6 test %esi,%esi
107f18: 74 2e je 107f48 <IMFS_readlink+0x4c> <== NEVER TAKEN
107f1a: 8b 43 50 mov 0x50(%ebx),%eax
107f1d: 8a 10 mov (%eax),%dl
107f1f: 84 d2 test %dl,%dl
107f21: 74 25 je 107f48 <IMFS_readlink+0x4c> <== NEVER TAKEN
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
107f23: 31 c9 xor %ecx,%ecx
107f25: 31 c0 xor %eax,%eax
107f27: eb 0d jmp 107f36 <IMFS_readlink+0x3a>
107f29: 8d 76 00 lea 0x0(%esi),%esi
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
107f2c: 8b 53 50 mov 0x50(%ebx),%edx
107f2f: 8a 14 02 mov (%edx,%eax,1),%dl
107f32: 84 d2 test %dl,%dl
107f34: 74 0a je 107f40 <IMFS_readlink+0x44>
buf[i] = node->info.sym_link.name[i];
107f36: 88 14 0f mov %dl,(%edi,%ecx,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++ )
107f39: 40 inc %eax
107f3a: 89 c1 mov %eax,%ecx
107f3c: 39 c6 cmp %eax,%esi
107f3e: 77 ec ja 107f2c <IMFS_readlink+0x30>
buf[i] = node->info.sym_link.name[i];
return i;
}
107f40: 83 c4 0c add $0xc,%esp
107f43: 5b pop %ebx
107f44: 5e pop %esi
107f45: 5f pop %edi
107f46: c9 leave
107f47: c3 ret
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++ )
107f48: 31 c0 xor %eax,%eax
107f4a: eb f4 jmp 107f40 <IMFS_readlink+0x44> <== NOT EXECUTED
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
107f4c: e8 b3 d1 00 00 call 115104 <__errno> <== NOT EXECUTED
107f51: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107f57: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107f5c: eb e2 jmp 107f40 <IMFS_readlink+0x44> <== NOT EXECUTED
00107f60 <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 */
)
{
107f60: 55 push %ebp
107f61: 89 e5 mov %esp,%ebp
107f63: 53 push %ebx
107f64: 83 ec 18 sub $0x18,%esp
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
107f67: 8b 45 0c mov 0xc(%ebp),%eax
107f6a: 8b 18 mov (%eax),%ebx
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
107f6c: 6a 20 push $0x20
107f6e: ff 75 14 pushl 0x14(%ebp)
107f71: 8d 43 0c lea 0xc(%ebx),%eax
107f74: 50 push %eax
107f75: e8 d2 dd 00 00 call 115d4c <strncpy>
if ( the_jnode->Parent != NULL )
107f7a: 83 c4 10 add $0x10,%esp
107f7d: 8b 4b 08 mov 0x8(%ebx),%ecx
107f80: 85 c9 test %ecx,%ecx
107f82: 74 0c je 107f90 <IMFS_rename+0x30> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
107f84: 83 ec 0c sub $0xc,%esp
107f87: 53 push %ebx
107f88: e8 6b 46 00 00 call 10c5f8 <_Chain_Extract>
107f8d: 83 c4 10 add $0x10,%esp
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
107f90: 8b 45 10 mov 0x10(%ebp),%eax
107f93: 8b 00 mov (%eax),%eax
the_jnode->Parent = new_parent;
107f95: 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 );
107f98: 83 ec 08 sub $0x8,%esp
107f9b: 53 push %ebx
107f9c: 83 c0 50 add $0x50,%eax
107f9f: 50 push %eax
107fa0: e8 2f 46 00 00 call 10c5d4 <_Chain_Append>
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
107fa5: 58 pop %eax
107fa6: 5a pop %edx
107fa7: 6a 00 push $0x0
107fa9: 8d 45 f0 lea -0x10(%ebp),%eax
107fac: 50 push %eax
107fad: e8 ae 06 00 00 call 108660 <gettimeofday>
107fb2: 8b 45 f0 mov -0x10(%ebp),%eax
107fb5: 89 43 48 mov %eax,0x48(%ebx)
return 0;
}
107fb8: 31 c0 xor %eax,%eax
107fba: 8b 5d fc mov -0x4(%ebp),%ebx
107fbd: c9 leave
107fbe: c3 ret
00110b60 <IMFS_rmnod>:
int IMFS_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
110b60: 55 push %ebp
110b61: 89 e5 mov %esp,%ebp
110b63: 56 push %esi
110b64: 53 push %ebx
110b65: 83 ec 10 sub $0x10,%esp
110b68: 8b 75 0c mov 0xc(%ebp),%esi
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
110b6b: 8b 1e mov (%esi),%ebx
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
110b6d: 8b 43 08 mov 0x8(%ebx),%eax
110b70: 85 c0 test %eax,%eax
110b72: 74 13 je 110b87 <IMFS_rmnod+0x27> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
110b74: 83 ec 0c sub $0xc,%esp
110b77: 53 push %ebx
110b78: e8 7b ba ff ff call 10c5f8 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
110b7d: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
110b84: 83 c4 10 add $0x10,%esp
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
110b87: 66 ff 4b 34 decw 0x34(%ebx)
IMFS_update_ctime( the_jnode );
110b8b: 83 ec 08 sub $0x8,%esp
110b8e: 6a 00 push $0x0
110b90: 8d 45 f0 lea -0x10(%ebp),%eax
110b93: 50 push %eax
110b94: e8 c7 7a ff ff call 108660 <gettimeofday>
110b99: 8b 45 f0 mov -0x10(%ebp),%eax
110b9c: 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) ) {
110b9f: 89 1c 24 mov %ebx,(%esp)
110ba2: e8 e5 02 00 00 call 110e8c <rtems_libio_is_file_open>
110ba7: 83 c4 10 add $0x10,%esp
110baa: 85 c0 test %eax,%eax
110bac: 75 25 jne 110bd3 <IMFS_rmnod+0x73> <== NEVER TAKEN
110bae: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx)
110bb3: 75 1e jne 110bd3 <IMFS_rmnod+0x73> <== NEVER TAKEN
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
110bb5: a1 24 70 12 00 mov 0x127024,%eax
110bba: 8b 50 04 mov 0x4(%eax),%edx
110bbd: 3b 16 cmp (%esi),%edx
110bbf: 74 33 je 110bf4 <IMFS_rmnod+0x94> <== NEVER TAKEN
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
110bc1: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx)
110bc5: 74 15 je 110bdc <IMFS_rmnod+0x7c>
if ( the_jnode->info.sym_link.name )
free( (void*) the_jnode->info.sym_link.name );
}
free( the_jnode );
110bc7: 83 ec 0c sub $0xc,%esp
110bca: 53 push %ebx
110bcb: e8 14 7a ff ff call 1085e4 <free>
110bd0: 83 c4 10 add $0x10,%esp
}
return 0;
}
110bd3: 31 c0 xor %eax,%eax
110bd5: 8d 65 f8 lea -0x8(%ebp),%esp
110bd8: 5b pop %ebx
110bd9: 5e pop %esi
110bda: c9 leave
110bdb: c3 ret
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
if ( the_jnode->info.sym_link.name )
110bdc: 8b 43 50 mov 0x50(%ebx),%eax
110bdf: 85 c0 test %eax,%eax
110be1: 74 e4 je 110bc7 <IMFS_rmnod+0x67> <== NEVER TAKEN
free( (void*) the_jnode->info.sym_link.name );
110be3: 83 ec 0c sub $0xc,%esp
110be6: 50 push %eax
110be7: e8 f8 79 ff ff call 1085e4 <free>
110bec: 83 c4 10 add $0x10,%esp
110bef: eb d6 jmp 110bc7 <IMFS_rmnod+0x67>
110bf1: 8d 76 00 lea 0x0(%esi),%esi
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
rtems_filesystem_current.node_access = NULL;
110bf4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED
110bfb: eb c4 jmp 110bc1 <IMFS_rmnod+0x61> <== NOT EXECUTED
00110c00 <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
110c00: 55 push %ebp
110c01: 89 e5 mov %esp,%ebp
110c03: 56 push %esi
110c04: 53 push %ebx
110c05: 8b 4d 08 mov 0x8(%ebp),%ecx
110c08: 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;
110c0b: 8b 11 mov (%ecx),%edx
switch ( the_jnode->type ) {
110c0d: 83 7a 4c 07 cmpl $0x7,0x4c(%edx)
110c11: 76 15 jbe 110c28 <IMFS_stat+0x28> <== ALWAYS TAKEN
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
110c13: e8 ec 44 00 00 call 115104 <__errno> <== NOT EXECUTED
110c18: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
110c1e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
return 0;
}
110c23: 5b pop %ebx <== NOT EXECUTED
110c24: 5e pop %esi <== NOT EXECUTED
110c25: c9 leave <== NOT EXECUTED
110c26: c3 ret <== NOT EXECUTED
110c27: 90 nop <== NOT EXECUTED
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
110c28: 8b 5a 4c mov 0x4c(%edx),%ebx
110c2b: ff 24 9d 78 31 12 00 jmp *0x123178(,%ebx,4)
110c32: 66 90 xchg %ax,%ax
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
110c34: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED
110c3b: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) <== 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 );
110c42: 8b 49 10 mov 0x10(%ecx),%ecx
110c45: 8b 49 34 mov 0x34(%ecx),%ecx
110c48: 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 =
110c4a: c7 00 fe ff 00 00 movl $0xfffe,(%eax)
110c50: 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;
110c53: 8b 4a 30 mov 0x30(%edx),%ecx
110c56: 89 48 0c mov %ecx,0xc(%eax)
buf->st_nlink = the_jnode->st_nlink;
110c59: 8b 4a 34 mov 0x34(%edx),%ecx
110c5c: 66 89 48 10 mov %cx,0x10(%eax)
buf->st_ino = the_jnode->st_ino;
110c60: 8b 4a 38 mov 0x38(%edx),%ecx
110c63: 89 48 08 mov %ecx,0x8(%eax)
buf->st_uid = the_jnode->st_uid;
110c66: 8b 4a 3c mov 0x3c(%edx),%ecx
110c69: 66 89 48 12 mov %cx,0x12(%eax)
buf->st_gid = the_jnode->st_gid;
110c6d: 66 8b 4a 3e mov 0x3e(%edx),%cx
110c71: 66 89 48 14 mov %cx,0x14(%eax)
buf->st_atime = the_jnode->stat_atime;
110c75: 8b 4a 40 mov 0x40(%edx),%ecx
110c78: 89 48 28 mov %ecx,0x28(%eax)
buf->st_mtime = the_jnode->stat_mtime;
110c7b: 8b 4a 44 mov 0x44(%edx),%ecx
110c7e: 89 48 30 mov %ecx,0x30(%eax)
buf->st_ctime = the_jnode->stat_ctime;
110c81: 8b 52 48 mov 0x48(%edx),%edx
110c84: 89 50 38 mov %edx,0x38(%eax)
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
110c87: 8b 15 50 51 12 00 mov 0x125150,%edx
110c8d: 89 50 40 mov %edx,0x40(%eax)
110c90: 31 c0 xor %eax,%eax
return 0;
}
110c92: 5b pop %ebx
110c93: 5e pop %esi
110c94: c9 leave
110c95: c3 ret
110c96: 66 90 xchg %ax,%ax
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
110c98: 8b 5a 54 mov 0x54(%edx),%ebx
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
110c9b: 8b 72 50 mov 0x50(%edx),%esi
110c9e: 89 70 18 mov %esi,0x18(%eax)
110ca1: 89 58 1c mov %ebx,0x1c(%eax)
break;
110ca4: eb 9c jmp 110c42 <IMFS_stat+0x42>
110ca6: 66 90 xchg %ax,%ax
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
110ca8: 8b 5a 50 mov 0x50(%edx),%ebx
110cab: 8b 72 54 mov 0x54(%edx),%esi
110cae: 89 58 20 mov %ebx,0x20(%eax)
110cb1: 89 70 24 mov %esi,0x24(%eax)
break;
110cb4: eb 8c jmp 110c42 <IMFS_stat+0x42>
00107fc0 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
107fc0: 55 push %ebp
107fc1: 89 e5 mov %esp,%ebp
107fc3: 57 push %edi
107fc4: 53 push %ebx
107fc5: 83 ec 40 sub $0x40,%esp
107fc8: 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 );
107fcb: 31 c0 xor %eax,%eax
107fcd: b9 ff ff ff ff mov $0xffffffff,%ecx
107fd2: 89 d7 mov %edx,%edi
107fd4: f2 ae repnz scas %es:(%edi),%al
107fd6: f7 d1 not %ecx
107fd8: 49 dec %ecx
107fd9: 8d 45 f4 lea -0xc(%ebp),%eax
107fdc: 50 push %eax
107fdd: 8d 5d bf lea -0x41(%ebp),%ebx
107fe0: 53 push %ebx
107fe1: 51 push %ecx
107fe2: 52 push %edx
107fe3: e8 9c 8a 00 00 call 110a84 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
107fe8: 58 pop %eax
107fe9: ff 75 0c pushl 0xc(%ebp)
107fec: e8 83 dc 00 00 call 115c74 <strdup>
107ff1: 89 45 e0 mov %eax,-0x20(%ebp)
if (info.sym_link.name == NULL) {
107ff4: 83 c4 10 add $0x10,%esp
107ff7: 85 c0 test %eax,%eax
107ff9: 74 27 je 108022 <IMFS_symlink+0x62> <== NEVER TAKEN
* 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(
107ffb: 83 ec 0c sub $0xc,%esp
107ffe: 8d 45 e0 lea -0x20(%ebp),%eax
108001: 50 push %eax
108002: 68 ff a1 00 00 push $0xa1ff
108007: 53 push %ebx
108008: 6a 04 push $0x4
10800a: ff 75 08 pushl 0x8(%ebp)
10800d: e8 3a 7d 00 00 call 10fd4c <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
108012: 83 c4 20 add $0x20,%esp
108015: 85 c0 test %eax,%eax
108017: 74 1b je 108034 <IMFS_symlink+0x74> <== NEVER TAKEN
108019: 31 c0 xor %eax,%eax
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
}
10801b: 8d 65 f8 lea -0x8(%ebp),%esp
10801e: 5b pop %ebx
10801f: 5f pop %edi
108020: c9 leave
108021: c3 ret
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
if (info.sym_link.name == NULL) {
rtems_set_errno_and_return_minus_one(ENOMEM);
108022: e8 dd d0 00 00 call 115104 <__errno> <== NOT EXECUTED
108027: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
10802d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
108032: eb e7 jmp 10801b <IMFS_symlink+0x5b> <== NOT EXECUTED
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
108034: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108037: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
10803a: e8 a5 05 00 00 call 1085e4 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
10803f: e8 c0 d0 00 00 call 115104 <__errno> <== NOT EXECUTED
108044: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
10804a: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10804f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108052: eb c7 jmp 10801b <IMFS_symlink+0x5b> <== NOT EXECUTED
00108054 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
108054: 55 push %ebp
108055: 89 e5 mov %esp,%ebp
108057: 57 push %edi
108058: 56 push %esi
108059: 53 push %ebx
10805a: 83 ec 3c sub $0x3c,%esp
10805d: 8b 5d 0c mov 0xc(%ebp),%ebx
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
108060: 8b 13 mov (%ebx),%edx
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
108062: 83 7a 4c 03 cmpl $0x3,0x4c(%edx)
108066: 74 18 je 108080 <IMFS_unlink+0x2c>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
108068: 83 ec 08 sub $0x8,%esp
10806b: 8b 43 08 mov 0x8(%ebx),%eax
10806e: 53 push %ebx
10806f: ff 75 08 pushl 0x8(%ebp)
108072: ff 50 34 call *0x34(%eax)
return result;
108075: 83 c4 10 add $0x10,%esp
}
108078: 8d 65 f4 lea -0xc(%ebp),%esp
10807b: 5b pop %ebx
10807c: 5e pop %esi
10807d: 5f pop %edi
10807e: c9 leave
10807f: c3 ret
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
108080: 8b 42 50 mov 0x50(%edx),%eax
108083: 85 c0 test %eax,%eax
108085: 74 79 je 108100 <IMFS_unlink+0xac> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
108087: 8d 7d cc lea -0x34(%ebp),%edi
10808a: b9 05 00 00 00 mov $0x5,%ecx
10808f: 89 de mov %ebx,%esi
108091: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_link.node_access = node->info.hard_link.link_node;
108093: 89 45 cc mov %eax,-0x34(%ebp)
IMFS_Set_handlers( &the_link );
108096: 83 ec 0c sub $0xc,%esp
108099: 8d 75 cc lea -0x34(%ebp),%esi
10809c: 56 push %esi
10809d: 89 55 c4 mov %edx,-0x3c(%ebp)
1080a0: e8 b3 7d 00 00 call 10fe58 <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)
1080a5: 8b 55 c4 mov -0x3c(%ebp),%edx
1080a8: 8b 42 50 mov 0x50(%edx),%eax
1080ab: 8b 48 34 mov 0x34(%eax),%ecx
1080ae: 83 c4 10 add $0x10,%esp
1080b1: 66 83 f9 01 cmp $0x1,%cx
1080b5: 74 27 je 1080de <IMFS_unlink+0x8a>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
1080b7: 49 dec %ecx
1080b8: 66 89 48 34 mov %cx,0x34(%eax)
IMFS_update_ctime( node->info.hard_link.link_node );
1080bc: 83 ec 08 sub $0x8,%esp
1080bf: 6a 00 push $0x0
1080c1: 8d 45 e0 lea -0x20(%ebp),%eax
1080c4: 50 push %eax
1080c5: 89 55 c4 mov %edx,-0x3c(%ebp)
1080c8: e8 93 05 00 00 call 108660 <gettimeofday>
1080cd: 8b 55 c4 mov -0x3c(%ebp),%edx
1080d0: 8b 42 50 mov 0x50(%edx),%eax
1080d3: 8b 55 e0 mov -0x20(%ebp),%edx
1080d6: 89 50 48 mov %edx,0x48(%eax)
1080d9: 83 c4 10 add $0x10,%esp
1080dc: eb 8a jmp 108068 <IMFS_unlink+0x14>
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
1080de: 83 ec 08 sub $0x8,%esp
1080e1: 56 push %esi
1080e2: ff 75 08 pushl 0x8(%ebp)
1080e5: 8b 45 d4 mov -0x2c(%ebp),%eax
1080e8: ff 50 34 call *0x34(%eax)
if ( result != 0 )
1080eb: 83 c4 10 add $0x10,%esp
1080ee: 85 c0 test %eax,%eax
1080f0: 0f 84 72 ff ff ff je 108068 <IMFS_unlink+0x14>
1080f6: b8 ff ff ff ff mov $0xffffffff,%eax
1080fb: e9 78 ff ff ff jmp 108078 <IMFS_unlink+0x24>
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
108100: e8 ff cf 00 00 call 115104 <__errno> <== NOT EXECUTED
108105: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
10810b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
108110: e9 63 ff ff ff jmp 108078 <IMFS_unlink+0x24> <== NOT EXECUTED
00108118 <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
108118: 55 push %ebp
108119: 89 e5 mov %esp,%ebp
10811b: 83 ec 08 sub $0x8,%esp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
10811e: 8b 45 08 mov 0x8(%ebp),%eax
108121: 8b 40 08 mov 0x8(%eax),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
108124: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
108128: 75 12 jne 10813c <IMFS_unmount+0x24> <== NEVER TAKEN
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
10812a: 8b 50 5c mov 0x5c(%eax),%edx
10812d: 85 d2 test %edx,%edx
10812f: 74 1d je 10814e <IMFS_unmount+0x36> <== NEVER TAKEN
/*
* 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;
108131: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
108138: 31 c0 xor %eax,%eax
return 0;
}
10813a: c9 leave
10813b: c3 ret
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
10813c: e8 c3 cf 00 00 call 115104 <__errno> <== NOT EXECUTED
108141: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
108147: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
10814c: c9 leave <== NOT EXECUTED
10814d: c3 ret <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
10814e: e8 b1 cf 00 00 call 115104 <__errno> <== NOT EXECUTED
108153: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
108159: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
10815e: c9 leave <== NOT EXECUTED
10815f: c3 ret <== NOT EXECUTED
00108810 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
108810: 55 push %ebp
108811: 89 e5 mov %esp,%ebp
108813: 57 push %edi
108814: 56 push %esi
108815: 53 push %ebx
108816: 83 ec 0c sub $0xc,%esp
108819: 8b 5d 08 mov 0x8(%ebp),%ebx
10881c: 8b 75 0c mov 0xc(%ebp),%esi
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
10881f: a1 48 76 12 00 mov 0x127648,%eax
108824: 85 c0 test %eax,%eax
108826: 74 02 je 10882a <RTEMS_Malloc_Initialize+0x1a>
(*rtems_malloc_statistics_helpers->initialize)();
108828: ff 10 call *(%eax)
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
10882a: e8 79 ff ff ff call 1087a8 <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
10882f: a1 4c 76 12 00 mov 0x12764c,%eax
108834: 85 c0 test %eax,%eax
108836: 74 13 je 10884b <RTEMS_Malloc_Initialize+0x3b><== ALWAYS TAKEN
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
108838: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10883b: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
10883e: 53 push %ebx <== NOT EXECUTED
10883f: ff 10 call *(%eax) <== NOT EXECUTED
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
108841: 8d 34 33 lea (%ebx,%esi,1),%esi <== NOT EXECUTED
108844: 29 c6 sub %eax,%esi <== NOT EXECUTED
108846: 89 c3 mov %eax,%ebx <== NOT EXECUTED
108848: 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 (
10884b: 80 3d 45 76 12 00 00 cmpb $0x0,0x127645
108852: 75 1f jne 108873 <RTEMS_Malloc_Initialize+0x63>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
108854: 80 3d 48 52 12 00 00 cmpb $0x0,0x125248
10885b: 75 3f jne 10889c <RTEMS_Malloc_Initialize+0x8c>
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
10885d: 6a 04 push $0x4
10885f: 56 push %esi
108860: 53 push %ebx
108861: ff 35 58 51 12 00 pushl 0x125158
108867: e8 20 43 00 00 call 10cb8c <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
10886c: 83 c4 10 add $0x10,%esp
10886f: 85 c0 test %eax,%eax
108871: 74 3c je 1088af <RTEMS_Malloc_Initialize+0x9f><== NEVER TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
108873: 8b 1d a0 92 12 00 mov 0x1292a0,%ebx
108879: 83 ec 0c sub $0xc,%esp
10887c: ff 35 58 51 12 00 pushl 0x125158
108882: e8 a5 4e 00 00 call 10d72c <_Protected_heap_Get_size>
108887: 8d 1c 18 lea (%eax,%ebx,1),%ebx
10888a: 89 1d a0 92 12 00 mov %ebx,0x1292a0
108890: 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
}
108893: 8d 65 f4 lea -0xc(%ebp),%esp
108896: 5b pop %ebx
108897: 5e pop %esi
108898: 5f pop %edi
108899: c9 leave
10889a: c3 ret
10889b: 90 nop
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
10889c: 31 c0 xor %eax,%eax
10889e: 89 df mov %ebx,%edi
1088a0: 89 f1 mov %esi,%ecx
1088a2: 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 ) {
1088a4: 80 3d 45 76 12 00 00 cmpb $0x0,0x127645
1088ab: 74 b0 je 10885d <RTEMS_Malloc_Initialize+0x4d><== ALWAYS TAKEN
1088ad: eb c4 jmp 108873 <RTEMS_Malloc_Initialize+0x63><== NOT EXECUTED
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
1088af: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1088b2: 6a 1a push $0x1a <== NOT EXECUTED
1088b4: e8 3f 3a 00 00 call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
0010cda8 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
10cda8: 55 push %ebp <== NOT EXECUTED
10cda9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10cdab: 57 push %edi <== NOT EXECUTED
10cdac: 56 push %esi <== NOT EXECUTED
10cdad: 53 push %ebx <== NOT EXECUTED
10cdae: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
10cdb1: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
10cdb4: 85 db test %ebx,%ebx <== NOT EXECUTED
10cdb6: 0f 84 c5 00 00 00 je 10ce81 <Stack_check_Dump_threads_usage+0xd9><== NOT EXECUTED
return;
if ( !print_handler )
10cdbc: a1 d4 20 17 00 mov 0x1720d4,%eax <== NOT EXECUTED
10cdc1: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
10cdc4: 85 c0 test %eax,%eax <== NOT EXECUTED
10cdc6: 0f 84 b5 00 00 00 je 10ce81 <Stack_check_Dump_threads_usage+0xd9><== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
10cdcc: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED
10cdcf: 0f 84 d7 00 00 00 je 10ceac <Stack_check_Dump_threads_usage+0x104><== NOT EXECUTED
current = 0;
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
10cdd5: 8d b3 c4 00 00 00 lea 0xc4(%ebx),%esi <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
10cddb: 8b 93 d8 00 00 00 mov 0xd8(%ebx),%edx <== NOT EXECUTED
10cde1: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
10cde4: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
10cde7: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
10cdea: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
10cded: 8b 3e mov (%esi),%edi <== NOT EXECUTED
10cdef: 83 ef 10 sub $0x10,%edi <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
10cdf2: 57 push %edi <== NOT EXECUTED
10cdf3: 50 push %eax <== NOT EXECUTED
10cdf4: e8 77 ff ff ff call 10cd70 <Stack_check_find_high_water_mark><== NOT EXECUTED
if ( high_water_mark )
10cdf9: 59 pop %ecx <== NOT EXECUTED
10cdfa: 5a pop %edx <== NOT EXECUTED
10cdfb: 85 c0 test %eax,%eax <== NOT EXECUTED
10cdfd: 0f 84 c9 00 00 00 je 10cecc <Stack_check_Dump_threads_usage+0x124><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
10ce03: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
10ce06: 01 fa add %edi,%edx <== NOT EXECUTED
10ce08: 29 c2 sub %eax,%edx <== NOT EXECUTED
10ce0a: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
else
used = 0;
if ( the_thread ) {
10ce0d: 85 db test %ebx,%ebx <== NOT EXECUTED
10ce0f: 0f 84 c7 00 00 00 je 10cedc <Stack_check_Dump_threads_usage+0x134><== NOT EXECUTED
(*print_handler)(
10ce15: 52 push %edx <== NOT EXECUTED
10ce16: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED
10ce19: 50 push %eax <== NOT EXECUTED
10ce1a: 6a 05 push $0x5 <== NOT EXECUTED
10ce1c: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
10ce1f: e8 f4 5d 00 00 call 112c18 <rtems_object_get_name> <== NOT EXECUTED
10ce24: 50 push %eax <== NOT EXECUTED
10ce25: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
10ce28: 68 2c 09 16 00 push $0x16092c <== NOT EXECUTED
10ce2d: ff 35 d0 20 17 00 pushl 0x1720d0 <== NOT EXECUTED
10ce33: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED
10ce36: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
10ce39: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
10ce3c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10ce3f: 57 push %edi <== NOT EXECUTED
10ce40: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
10ce43: 8b 16 mov (%esi),%edx <== NOT EXECUTED
10ce45: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED
10ce49: 52 push %edx <== NOT EXECUTED
10ce4a: 50 push %eax <== NOT EXECUTED
10ce4b: 68 47 09 16 00 push $0x160947 <== NOT EXECUTED
10ce50: ff 35 d0 20 17 00 pushl 0x1720d0 <== NOT EXECUTED
10ce56: ff 15 d4 20 17 00 call *0x1720d4 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
10ce5c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10ce5f: 8b 1d cc 20 17 00 mov 0x1720cc,%ebx <== NOT EXECUTED
10ce65: 85 db test %ebx,%ebx <== NOT EXECUTED
10ce67: 74 23 je 10ce8c <Stack_check_Dump_threads_usage+0xe4><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
10ce69: 51 push %ecx <== NOT EXECUTED
10ce6a: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
10ce6d: 68 72 09 16 00 push $0x160972 <== NOT EXECUTED
10ce72: ff 35 d0 20 17 00 pushl 0x1720d0 <== NOT EXECUTED
10ce78: ff 15 d4 20 17 00 call *0x1720d4 <== NOT EXECUTED
10ce7e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
10ce81: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10ce84: 5b pop %ebx <== NOT EXECUTED
10ce85: 5e pop %esi <== NOT EXECUTED
10ce86: 5f pop %edi <== NOT EXECUTED
10ce87: c9 leave <== NOT EXECUTED
10ce88: c3 ret <== NOT EXECUTED
10ce89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
10ce8c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10ce8f: 68 65 09 16 00 push $0x160965 <== NOT EXECUTED
10ce94: ff 35 d0 20 17 00 pushl 0x1720d0 <== NOT EXECUTED
10ce9a: ff 15 d4 20 17 00 call *0x1720d4 <== NOT EXECUTED
10cea0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
10cea3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10cea6: 5b pop %ebx <== NOT EXECUTED
10cea7: 5e pop %esi <== NOT EXECUTED
10cea8: 5f pop %edi <== NOT EXECUTED
10cea9: c9 leave <== NOT EXECUTED
10ceaa: c3 ret <== NOT EXECUTED
10ceab: 90 nop <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
if (Stack_check_Interrupt_stack.area) {
10ceac: 8b 0d d4 4d 17 00 mov 0x174dd4,%ecx <== NOT EXECUTED
10ceb2: 85 c9 test %ecx,%ecx <== NOT EXECUTED
10ceb4: 74 cb je 10ce81 <Stack_check_Dump_threads_usage+0xd9><== NOT EXECUTED
10ceb6: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED
10cebd: 31 db xor %ebx,%ebx <== NOT EXECUTED
10cebf: be d0 4d 17 00 mov $0x174dd0,%esi <== NOT EXECUTED
10cec4: e9 1b ff ff ff jmp 10cde4 <Stack_check_Dump_threads_usage+0x3c><== NOT EXECUTED
10cec9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
10cecc: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
10ced3: 85 db test %ebx,%ebx <== NOT EXECUTED
10ced5: 0f 85 3a ff ff ff jne 10ce15 <Stack_check_Dump_threads_usage+0x6d><== NOT EXECUTED
10cedb: 90 nop <== 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 );
10cedc: 50 push %eax <== NOT EXECUTED
10cedd: 6a ff push $0xffffffff <== NOT EXECUTED
10cedf: 68 39 09 16 00 push $0x160939 <== NOT EXECUTED
10cee4: ff 35 d0 20 17 00 pushl 0x1720d0 <== NOT EXECUTED
10ceea: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED
10ceed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10cef0: e9 44 ff ff ff jmp 10ce39 <Stack_check_Dump_threads_usage+0x91><== NOT EXECUTED
0010d100 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
10d100: 55 push %ebp
10d101: 89 e5 mov %esp,%ebp
10d103: 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)
10d104: 8b 3d cc 20 17 00 mov 0x1720cc,%edi
10d10a: 85 ff test %edi,%edi
10d10c: 75 4d jne 10d15b <Stack_check_Initialize+0x5b>
10d10e: 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 ];
10d110: 89 c2 mov %eax,%edx
10d112: 83 e2 03 and $0x3,%edx
10d115: 8b 14 95 b0 0a 16 00 mov 0x160ab0(,%edx,4),%edx
10d11c: 89 14 85 c0 4d 17 00 mov %edx,0x174dc0(,%eax,4)
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
10d123: 40 inc %eax
10d124: 83 f8 04 cmp $0x4,%eax
10d127: 75 e7 jne 10d110 <Stack_check_Initialize+0x10>
/*
* 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) {
10d129: 8b 15 68 4f 17 00 mov 0x174f68,%edx
10d12f: 85 d2 test %edx,%edx
10d131: 74 1e je 10d151 <Stack_check_Initialize+0x51><== NEVER TAKEN
10d133: 8b 0d 28 4f 17 00 mov 0x174f28,%ecx
10d139: 85 c9 test %ecx,%ecx
10d13b: 74 14 je 10d151 <Stack_check_Initialize+0x51><== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
10d13d: 89 15 d4 4d 17 00 mov %edx,0x174dd4
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
10d143: 29 d1 sub %edx,%ecx
10d145: 89 0d d0 4d 17 00 mov %ecx,0x174dd0
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
10d14b: b0 a5 mov $0xa5,%al
10d14d: 89 d7 mov %edx,%edi
10d14f: f3 aa rep stos %al,%es:(%edi)
}
#endif
Stack_check_Initialized = 1;
10d151: c7 05 cc 20 17 00 01 movl $0x1,0x1720cc
10d158: 00 00 00
}
10d15b: 5f pop %edi
10d15c: c9 leave
10d15d: c3 ret
0010cd70 <Stack_check_find_high_water_mark>:
*/
void *Stack_check_find_high_water_mark(
const void *s,
size_t n
)
{
10cd70: 55 push %ebp <== NOT EXECUTED
10cd71: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10cd73: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
10cd76: 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;
10cd79: 8d 41 10 lea 0x10(%ecx),%eax <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
10cd7c: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED
10cd7f: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED
10cd82: 39 d0 cmp %edx,%eax <== NOT EXECUTED
10cd84: 73 1d jae 10cda3 <Stack_check_find_high_water_mark+0x33><== NOT EXECUTED
if (*base != U32_PATTERN)
10cd86: 81 79 10 a5 a5 a5 a5 cmpl $0xa5a5a5a5,0x10(%ecx) <== NOT EXECUTED
10cd8d: 74 0d je 10cd9c <Stack_check_find_high_water_mark+0x2c><== NOT EXECUTED
10cd8f: eb 14 jmp 10cda5 <Stack_check_find_high_water_mark+0x35><== NOT EXECUTED
10cd91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10cd94: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED
10cd9a: 75 09 jne 10cda5 <Stack_check_find_high_water_mark+0x35><== 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++)
10cd9c: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
10cd9f: 39 c2 cmp %eax,%edx <== NOT EXECUTED
10cda1: 77 f1 ja 10cd94 <Stack_check_find_high_water_mark+0x24><== NOT EXECUTED
10cda3: 31 c0 xor %eax,%eax <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
10cda5: c9 leave <== NOT EXECUTED
10cda6: c3 ret <== NOT EXECUTED
0010cf74 <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)
{
10cf74: 55 push %ebp <== NOT EXECUTED
10cf75: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10cf77: 56 push %esi <== NOT EXECUTED
10cf78: 53 push %ebx <== NOT EXECUTED
10cf79: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
10cf7c: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
10cf7f: 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);
10cf82: 8b b3 c8 00 00 00 mov 0xc8(%ebx),%esi <== NOT EXECUTED
char name [32];
printk("BLOWN STACK!!!\n");
10cf88: 68 8f 09 16 00 push $0x16098f <== NOT EXECUTED
10cf8d: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED
10cf90: e8 17 2b 00 00 call 10faac <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
10cf95: 58 pop %eax <== NOT EXECUTED
10cf96: 5a pop %edx <== NOT EXECUTED
10cf97: 53 push %ebx <== NOT EXECUTED
10cf98: 68 9f 09 16 00 push $0x16099f <== NOT EXECUTED
10cf9d: e8 0a 2b 00 00 call 10faac <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
10cfa2: 5a pop %edx <== NOT EXECUTED
10cfa3: 59 pop %ecx <== NOT EXECUTED
10cfa4: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
10cfa7: 68 bc 09 16 00 push $0x1609bc <== NOT EXECUTED
10cfac: e8 fb 2a 00 00 call 10faac <printk> <== NOT EXECUTED
printk(
10cfb1: 59 pop %ecx <== NOT EXECUTED
10cfb2: 58 pop %eax <== NOT EXECUTED
10cfb3: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
10cfb6: 68 ce 09 16 00 push $0x1609ce <== NOT EXECUTED
10cfbb: e8 ec 2a 00 00 call 10faac <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
10cfc0: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10cfc3: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
10cfc6: 50 push %eax <== NOT EXECUTED
10cfc7: 6a 20 push $0x20 <== NOT EXECUTED
10cfc9: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
10cfcc: e8 47 5c 00 00 call 112c18 <rtems_object_get_name> <== NOT EXECUTED
10cfd1: 59 pop %ecx <== NOT EXECUTED
10cfd2: 5a pop %edx <== NOT EXECUTED
10cfd3: 50 push %eax <== NOT EXECUTED
10cfd4: 68 e2 09 16 00 push $0x1609e2 <== NOT EXECUTED
10cfd9: e8 ce 2a 00 00 call 10faac <printk> <== NOT EXECUTED
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
10cfde: 8b 8b c8 00 00 00 mov 0xc8(%ebx),%ecx <== NOT EXECUTED
10cfe4: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax <== NOT EXECUTED
10cfea: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED
10cfed: 53 push %ebx <== NOT EXECUTED
10cfee: 51 push %ecx <== NOT EXECUTED
10cfef: 50 push %eax <== NOT EXECUTED
10cff0: 68 44 0a 16 00 push $0x160a44 <== NOT EXECUTED
10cff5: e8 b2 2a 00 00 call 10faac <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) {
10cffa: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10cffd: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED
10d000: 84 d2 test %dl,%dl <== NOT EXECUTED
10d002: 74 10 je 10d014 <Stack_check_report_blown_task+0xa0><== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
10d004: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10d007: 68 81 00 00 00 push $0x81 <== NOT EXECUTED
10d00c: e8 2f 66 00 00 call 113640 <rtems_fatal_error_occurred><== NOT EXECUTED
10d011: 8d 76 00 lea 0x0(%esi),%esi <== 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);
10d014: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
10d017: 83 c6 18 add $0x18,%esi <== NOT EXECUTED
10d01a: 56 push %esi <== NOT EXECUTED
10d01b: 50 push %eax <== NOT EXECUTED
10d01c: 6a 10 push $0x10 <== NOT EXECUTED
10d01e: 68 78 0a 16 00 push $0x160a78 <== NOT EXECUTED
10d023: e8 84 2a 00 00 call 10faac <printk> <== NOT EXECUTED
10d028: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10d02b: eb d7 jmp 10d004 <Stack_check_report_blown_task+0x90><== NOT EXECUTED
001470a4 <T.58>:
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
1470a4: 55 push %ebp <== NOT EXECUTED
1470a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1470a7: 57 push %edi <== NOT EXECUTED
1470a8: 56 push %esi <== NOT EXECUTED
1470a9: 53 push %ebx <== NOT EXECUTED
1470aa: 83 ec 5c sub $0x5c,%esp <== NOT EXECUTED
1470ad: 89 45 b8 mov %eax,-0x48(%ebp) <== NOT EXECUTED
1470b0: 89 55 a4 mov %edx,-0x5c(%ebp) <== NOT EXECUTED
1470b3: 89 4d ac mov %ecx,-0x54(%ebp) <== NOT EXECUTED
1470b6: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
1470b9: c6 01 00 movb $0x0,(%ecx) <== NOT EXECUTED
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
1470bc: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
1470bf: e8 00 fc ff ff call 146cc4 <rtems_rfs_bitmap_load_map><== NOT EXECUTED
if (rc > 0)
1470c4: 85 c0 test %eax,%eax <== NOT EXECUTED
1470c6: 7e 08 jle 1470d0 <T.58+0x2c> <== NOT EXECUTED
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
return 0;
}
1470c8: 83 c4 5c add $0x5c,%esp <== NOT EXECUTED
1470cb: 5b pop %ebx <== NOT EXECUTED
1470cc: 5e pop %esi <== NOT EXECUTED
1470cd: 5f pop %edi <== NOT EXECUTED
1470ce: c9 leave <== NOT EXECUTED
1470cf: c3 ret <== NOT EXECUTED
return rc;
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
1470d0: 8b 45 a4 mov -0x5c(%ebp),%eax <== NOT EXECUTED
1470d3: 8b 10 mov (%eax),%edx <== NOT EXECUTED
end_bit = test_bit + (window * direction);
1470d5: 89 de mov %ebx,%esi <== NOT EXECUTED
1470d7: c1 e6 0b shl $0xb,%esi <== NOT EXECUTED
if (end_bit < 0)
1470da: 01 d6 add %edx,%esi <== NOT EXECUTED
1470dc: 0f 88 cf 01 00 00 js 1472b1 <T.58+0x20d> <== NOT EXECUTED
end_bit = 0;
else if (end_bit >= control->size)
1470e2: 8b 4d b8 mov -0x48(%ebp),%ecx <== NOT EXECUTED
1470e5: 8b 41 0c mov 0xc(%ecx),%eax <== NOT EXECUTED
1470e8: 39 c6 cmp %eax,%esi <== NOT EXECUTED
1470ea: 0f 83 94 01 00 00 jae 147284 <T.58+0x1e0> <== NOT EXECUTED
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
1470f0: 89 d7 mov %edx,%edi <== NOT EXECUTED
1470f2: c1 ff 05 sar $0x5,%edi <== NOT EXECUTED
1470f5: 89 7d c8 mov %edi,-0x38(%ebp) <== NOT EXECUTED
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
1470f8: 89 d7 mov %edx,%edi <== NOT EXECUTED
1470fa: 83 e7 1f and $0x1f,%edi <== NOT EXECUTED
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
1470fd: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
147100: 83 e1 1f and $0x1f,%ecx <== NOT EXECUTED
search_bits = &control->search_bits[search_index];
147103: 89 d0 mov %edx,%eax <== NOT EXECUTED
147105: c1 f8 0a sar $0xa,%eax <== NOT EXECUTED
147108: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
14710b: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
14710e: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
147111: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
147114: 01 45 b4 add %eax,-0x4c(%ebp) <== NOT EXECUTED
map_bits = &map[map_index];
147117: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
14711a: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
14711d: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
147120: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
147123: 01 45 cc add %eax,-0x34(%ebp) <== NOT EXECUTED
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
147126: 8d 04 9d 00 00 00 00 lea 0x0(,%ebx,4),%eax <== NOT EXECUTED
14712d: 89 45 b0 mov %eax,-0x50(%ebp) <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
147130: 89 d8 mov %ebx,%eax <== NOT EXECUTED
147132: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
147135: 89 45 a8 mov %eax,-0x58(%ebp) <== NOT EXECUTED
147138: 89 f8 mov %edi,%eax <== NOT EXECUTED
/*
* If any bit is clear find that bit and then search the map element. If
* all bits are set there are no map bits so move to the next search
* element.
*/
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
14713a: 8b 7d b4 mov -0x4c(%ebp),%edi <== NOT EXECUTED
14713d: 8b 3f mov (%edi),%edi <== NOT EXECUTED
14713f: 89 7d bc mov %edi,-0x44(%ebp) <== NOT EXECUTED
147142: 85 ff test %edi,%edi <== NOT EXECUTED
147144: 0f 84 a6 00 00 00 je 1471f0 <T.58+0x14c> <== NOT EXECUTED
14714a: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
14714d: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
147150: 01 d9 add %ebx,%ecx <== NOT EXECUTED
147152: c1 e1 05 shl $0x5,%ecx <== NOT EXECUTED
147155: 83 c1 1f add $0x1f,%ecx <== NOT EXECUTED
147158: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED
* all bits are set there are no map bits so move to the next search
* element.
*/
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
{
while ((search_offset >= 0)
14715b: 83 7d d0 1f cmpl $0x1f,-0x30(%ebp) <== NOT EXECUTED
14715f: 0f 87 b6 00 00 00 ja 14721b <T.58+0x177> <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
147165: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
14716a: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED
14716d: d3 e7 shl %cl,%edi <== NOT EXECUTED
14716f: 89 7d c0 mov %edi,-0x40(%ebp) <== NOT EXECUTED
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
{
while ((search_offset >= 0)
&& (search_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*search_bits, search_offset))
147172: 8b 4d bc mov -0x44(%ebp),%ecx <== NOT EXECUTED
147175: 85 cf test %ecx,%edi <== NOT EXECUTED
147177: 74 4b je 1471c4 <T.58+0x120> <== NOT EXECUTED
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
147179: 8b 7d cc mov -0x34(%ebp),%edi <== NOT EXECUTED
14717c: 8b 3f mov (%edi),%edi <== NOT EXECUTED
14717e: 89 7d d4 mov %edi,-0x2c(%ebp) <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
147181: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
147186: 88 c1 mov %al,%cl <== NOT EXECUTED
147188: d3 e7 shl %cl,%edi <== NOT EXECUTED
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
14718a: 85 7d d4 test %edi,-0x2c(%ebp) <== NOT EXECUTED
14718d: 0f 85 b9 00 00 00 jne 14724c <T.58+0x1a8> <== NOT EXECUTED
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
if (test_bit == end_bit)
147193: 39 d6 cmp %edx,%esi <== NOT EXECUTED
147195: 74 2d je 1471c4 <T.58+0x120> <== NOT EXECUTED
147197: 8d 0c 18 lea (%eax,%ebx,1),%ecx <== NOT EXECUTED
14719a: 8d 04 1a lea (%edx,%ebx,1),%eax <== NOT EXECUTED
14719d: eb 1f jmp 1471be <T.58+0x11a> <== NOT EXECUTED
14719f: 90 nop <== NOT EXECUTED
1471a0: 89 c2 mov %eax,%edx <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
1471a2: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
1471a7: d3 e7 shl %cl,%edi <== NOT EXECUTED
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
1471a9: 85 7d d4 test %edi,-0x2c(%ebp) <== NOT EXECUTED
1471ac: 0f 85 9a 00 00 00 jne 14724c <T.58+0x1a8> <== NOT EXECUTED
*search_bits = rtems_rfs_bitmap_set (*search_bits,
1 << search_offset);
control->free--;
*bit = test_bit;
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
1471b2: 01 d9 add %ebx,%ecx <== NOT EXECUTED
1471b4: 01 d8 add %ebx,%eax <== NOT EXECUTED
return 0;
}
if (test_bit == end_bit)
1471b6: 89 c2 mov %eax,%edx <== NOT EXECUTED
1471b8: 29 da sub %ebx,%edx <== NOT EXECUTED
1471ba: 39 d6 cmp %edx,%esi <== NOT EXECUTED
1471bc: 74 06 je 1471c4 <T.58+0x120> <== NOT EXECUTED
{
/*
* Find the clear bit in the map. Update the search map and map if
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
1471be: 83 f9 1f cmp $0x1f,%ecx <== NOT EXECUTED
1471c1: 76 dd jbe 1471a0 <T.58+0xfc> <== NOT EXECUTED
1471c3: 90 nop <== NOT EXECUTED
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
1471c4: 8b 4d b0 mov -0x50(%ebp),%ecx <== NOT EXECUTED
1471c7: 01 4d cc add %ecx,-0x34(%ebp) <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
1471ca: 01 5d c8 add %ebx,-0x38(%ebp) <== NOT EXECUTED
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
1471cd: 83 fb 00 cmp $0x0,%ebx <== NOT EXECUTED
1471d0: 7e 66 jle 147238 <T.58+0x194> <== NOT EXECUTED
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
1471d2: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
1471d5: 83 ea 1f sub $0x1f,%edx <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
1471d8: 39 d6 cmp %edx,%esi <== NOT EXECUTED
1471da: 0f 8e df 00 00 00 jle 1472bf <T.58+0x21b> <== NOT EXECUTED
1471e0: 31 c0 xor %eax,%eax <== NOT EXECUTED
1471e2: 01 5d d0 add %ebx,-0x30(%ebp) <== NOT EXECUTED
1471e5: 8b 7d a8 mov -0x58(%ebp),%edi <== NOT EXECUTED
1471e8: 01 7d c4 add %edi,-0x3c(%ebp) <== NOT EXECUTED
1471eb: e9 6b ff ff ff jmp 14715b <T.58+0xb7> <== NOT EXECUTED
*
* Align test_bit either up or down depending on the direction to next 32
* bit boundary.
*/
rtems_rfs_bitmap_bit bits_skipped;
test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1);
1471f0: 83 e2 e0 and $0xffffffe0,%edx <== NOT EXECUTED
if (direction > 0)
1471f3: 85 db test %ebx,%ebx <== NOT EXECUTED
1471f5: 0f 8e a1 00 00 00 jle 14729c <T.58+0x1f8> <== NOT EXECUTED
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
1471fb: bf 20 00 00 00 mov $0x20,%edi <== NOT EXECUTED
147200: 29 cf sub %ecx,%edi <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
147202: 89 f8 mov %edi,%eax <== NOT EXECUTED
147204: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
147207: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED
14720a: 31 c0 xor %eax,%eax <== NOT EXECUTED
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
14720c: 0f af fb imul %ebx,%edi <== NOT EXECUTED
14720f: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
147212: 8d 0c b9 lea (%ecx,%edi,4),%ecx <== NOT EXECUTED
147215: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED
map_index += direction * bits_skipped;
147218: 01 7d c8 add %edi,-0x38(%ebp) <== NOT EXECUTED
}
search_bits += direction;
14721b: 8b 7d b0 mov -0x50(%ebp),%edi <== NOT EXECUTED
14721e: 01 7d b4 add %edi,-0x4c(%ebp) <== NOT EXECUTED
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
147221: 83 fb 00 cmp $0x0,%ebx <== NOT EXECUTED
147224: 7e 66 jle 14728c <T.58+0x1e8> <== NOT EXECUTED
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
147226: 39 d6 cmp %edx,%esi <== NOT EXECUTED
147228: 0f 8c 8a 00 00 00 jl 1472b8 <T.58+0x214> <== NOT EXECUTED
14722e: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
147230: e9 05 ff ff ff jmp 14713a <T.58+0x96> <== NOT EXECUTED
147235: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
147238: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
14723b: 74 08 je 147245 <T.58+0x1a1> <== NOT EXECUTED
14723d: 39 d6 cmp %edx,%esi <== NOT EXECUTED
14723f: 0f 8d 87 00 00 00 jge 1472cc <T.58+0x228> <== NOT EXECUTED
147245: b8 1f 00 00 00 mov $0x1f,%eax <== NOT EXECUTED
14724a: eb 96 jmp 1471e2 <T.58+0x13e> <== NOT EXECUTED
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
14724c: f7 d7 not %edi <== NOT EXECUTED
14724e: 23 7d d4 and -0x2c(%ebp),%edi <== NOT EXECUTED
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
{
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
147251: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
147254: 89 38 mov %edi,(%eax) <== NOT EXECUTED
if (rtems_rfs_bitmap_match(*map_bits,
147256: 85 ff test %edi,%edi <== NOT EXECUTED
147258: 75 0a jne 147264 <T.58+0x1c0> <== NOT EXECUTED
RTEMS_RFS_BITMAP_ELEMENT_SET))
*search_bits = rtems_rfs_bitmap_set (*search_bits,
14725a: 8b 45 c0 mov -0x40(%ebp),%eax <== NOT EXECUTED
14725d: f7 d0 not %eax <== NOT EXECUTED
14725f: 8b 4d b4 mov -0x4c(%ebp),%ecx <== NOT EXECUTED
147262: 21 01 and %eax,(%ecx) <== NOT EXECUTED
1 << search_offset);
control->free--;
147264: 8b 7d b8 mov -0x48(%ebp),%edi <== NOT EXECUTED
147267: ff 4f 10 decl 0x10(%edi) <== NOT EXECUTED
*bit = test_bit;
14726a: 8b 45 a4 mov -0x5c(%ebp),%eax <== NOT EXECUTED
14726d: 89 10 mov %edx,(%eax) <== NOT EXECUTED
*found = true;
14726f: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED
147272: c6 02 01 movb $0x1,(%edx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
147275: 8b 07 mov (%edi),%eax <== NOT EXECUTED
147277: c6 00 01 movb $0x1,(%eax) <== NOT EXECUTED
14727a: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
return 0;
}
14727c: 83 c4 5c add $0x5c,%esp <== NOT EXECUTED
14727f: 5b pop %ebx <== NOT EXECUTED
147280: 5e pop %esi <== NOT EXECUTED
147281: 5f pop %edi <== NOT EXECUTED
147282: c9 leave <== NOT EXECUTED
147283: c3 ret <== NOT EXECUTED
end_bit = test_bit + (window * direction);
if (end_bit < 0)
end_bit = 0;
else if (end_bit >= control->size)
end_bit = control->size - 1;
147284: 8d 70 ff lea -0x1(%eax),%esi <== NOT EXECUTED
147287: e9 64 fe ff ff jmp 1470f0 <T.58+0x4c> <== NOT EXECUTED
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
14728c: 74 2a je 1472b8 <T.58+0x214> <== NOT EXECUTED
14728e: 39 d6 cmp %edx,%esi <== NOT EXECUTED
147290: 7f 26 jg 1472b8 <T.58+0x214> <== NOT EXECUTED
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
147292: b9 1f 00 00 00 mov $0x1f,%ecx <== NOT EXECUTED
147297: e9 9e fe ff ff jmp 14713a <T.58+0x96> <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
map_offset = 0;
}
else
{
bits_skipped = search_offset + 1;
14729c: 8d 79 01 lea 0x1(%ecx),%edi <== NOT EXECUTED
/*
* Need to remove 1 for the rounding up. The above rounds down and
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
14729f: c1 e1 05 shl $0x5,%ecx <== NOT EXECUTED
1472a2: f7 d1 not %ecx <== NOT EXECUTED
1472a4: 8d 14 11 lea (%ecx,%edx,1),%edx <== NOT EXECUTED
1472a7: b8 1f 00 00 00 mov $0x1f,%eax <== NOT EXECUTED
1472ac: e9 5b ff ff ff jmp 14720c <T.58+0x168> <== NOT EXECUTED
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
end_bit = test_bit + (window * direction);
if (end_bit < 0)
1472b1: 31 f6 xor %esi,%esi <== NOT EXECUTED
1472b3: e9 38 fe ff ff jmp 1470f0 <T.58+0x4c> <== NOT EXECUTED
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
1472b8: 31 c0 xor %eax,%eax <== NOT EXECUTED
1472ba: e9 09 fe ff ff jmp 1470c8 <T.58+0x24> <== NOT EXECUTED
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
1472bf: 8b 4d b0 mov -0x50(%ebp),%ecx <== NOT EXECUTED
1472c2: 01 4d b4 add %ecx,-0x4c(%ebp) <== NOT EXECUTED
1472c5: 31 c0 xor %eax,%eax <== NOT EXECUTED
1472c7: e9 5a ff ff ff jmp 147226 <T.58+0x182> <== NOT EXECUTED
1472cc: 8b 45 b0 mov -0x50(%ebp),%eax <== NOT EXECUTED
1472cf: 01 45 b4 add %eax,-0x4c(%ebp) <== NOT EXECUTED
1472d2: b8 1f 00 00 00 mov $0x1f,%eax <== NOT EXECUTED
1472d7: eb b5 jmp 14728e <T.58+0x1ea> <== NOT EXECUTED
0010c488 <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
10c488: 55 push %ebp
10c489: 89 e5 mov %esp,%ebp
10c48b: 53 push %ebx
10c48c: 83 ec 04 sub $0x4,%esp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10c48f: 8b 1d 58 96 12 00 mov 0x129658,%ebx
10c495: 81 fb 5c 96 12 00 cmp $0x12965c,%ebx
10c49b: 74 10 je 10c4ad <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN
10c49d: 8d 76 00 lea 0x0(%esi),%esi
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
10c4a0: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10c4a3: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10c4a5: 81 fb 5c 96 12 00 cmp $0x12965c,%ebx
10c4ab: 75 f3 jne 10c4a0 <_API_extensions_Run_postdriver+0x18>
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
10c4ad: 58 pop %eax
10c4ae: 5b pop %ebx
10c4af: c9 leave
10c4b0: c3 ret
0010c4b4 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
10c4b4: 55 push %ebp
10c4b5: 89 e5 mov %esp,%ebp
10c4b7: 53 push %ebx
10c4b8: 83 ec 04 sub $0x4,%esp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10c4bb: 8b 1d 58 96 12 00 mov 0x129658,%ebx
10c4c1: 81 fb 5c 96 12 00 cmp $0x12965c,%ebx
10c4c7: 74 1c je 10c4e5 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN
10c4c9: 8d 76 00 lea 0x0(%esi),%esi
* provide this hook.
*/
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
10c4cc: 83 ec 0c sub $0xc,%esp
10c4cf: ff 35 b8 94 12 00 pushl 0x1294b8
10c4d5: ff 53 0c call *0xc(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10c4d8: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10c4da: 83 c4 10 add $0x10,%esp
10c4dd: 81 fb 5c 96 12 00 cmp $0x12965c,%ebx
10c4e3: 75 e7 jne 10c4cc <_API_extensions_Run_postswitch+0x18>
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10c4e5: 8b 5d fc mov -0x4(%ebp),%ebx
10c4e8: c9 leave
10c4e9: c3 ret
00100200 <_Barrier_Manager_initialization>:
#include <rtems/rtems/support.h>
#include <rtems/score/object.h>
#include <rtems/rtems/barrier.h>
void _Barrier_Manager_initialization(void)
{
100200: 55 push %ebp
100201: 89 e5 mov %esp,%ebp
}
100203: c9 leave
100204: c3 ret
0010e7ac <_CORE_RWLock_Obtain_for_reading>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
10e7ac: 55 push %ebp
10e7ad: 89 e5 mov %esp,%ebp
10e7af: 57 push %edi
10e7b0: 56 push %esi
10e7b1: 53 push %ebx
10e7b2: 83 ec 1c sub $0x1c,%esp
10e7b5: 8b 5d 08 mov 0x8(%ebp),%ebx
10e7b8: 8b 7d 0c mov 0xc(%ebp),%edi
10e7bb: 8b 4d 14 mov 0x14(%ebp),%ecx
10e7be: 8a 55 10 mov 0x10(%ebp),%dl
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e7c1: 8b 35 98 c4 12 00 mov 0x12c498,%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 );
10e7c7: 9c pushf
10e7c8: fa cli
10e7c9: 8f 45 e4 popl -0x1c(%ebp)
switch ( the_rwlock->current_state ) {
10e7cc: 8b 43 44 mov 0x44(%ebx),%eax
10e7cf: 85 c0 test %eax,%eax
10e7d1: 75 1d jne 10e7f0 <_CORE_RWLock_Obtain_for_reading+0x44>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10e7d3: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
the_rwlock->number_of_readers += 1;
10e7da: ff 43 48 incl 0x48(%ebx)
_ISR_Enable( level );
10e7dd: ff 75 e4 pushl -0x1c(%ebp)
10e7e0: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e7e1: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e7e8: 8d 65 f4 lea -0xc(%ebp),%esp
10e7eb: 5b pop %ebx
10e7ec: 5e pop %esi
10e7ed: 5f pop %edi
10e7ee: c9 leave
10e7ef: c3 ret
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
10e7f0: 48 dec %eax
10e7f1: 74 51 je 10e844 <_CORE_RWLock_Obtain_for_reading+0x98>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
10e7f3: 84 d2 test %dl,%dl
10e7f5: 75 15 jne 10e80c <_CORE_RWLock_Obtain_for_reading+0x60>
_ISR_Enable( level );
10e7f7: ff 75 e4 pushl -0x1c(%ebp)
10e7fa: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e7fb: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e802: 8d 65 f4 lea -0xc(%ebp),%esp
10e805: 5b pop %ebx
10e806: 5e pop %esi
10e807: 5f pop %edi
10e808: c9 leave
10e809: c3 ret
10e80a: 66 90 xchg %ax,%ax
10e80c: 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;
10e813: 89 5e 44 mov %ebx,0x44(%esi)
executing->Wait.id = id;
10e816: 89 7e 20 mov %edi,0x20(%esi)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
10e819: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e820: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
_ISR_Enable( level );
10e827: ff 75 e4 pushl -0x1c(%ebp)
10e82a: 9d popf
_Thread_queue_Enqueue_with_handler(
10e82b: c7 45 10 b0 e9 10 00 movl $0x10e9b0,0x10(%ebp)
10e832: 89 4d 0c mov %ecx,0xc(%ebp)
10e835: 89 5d 08 mov %ebx,0x8(%ebp)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e838: 8d 65 f4 lea -0xc(%ebp),%esp
10e83b: 5b pop %ebx
10e83c: 5e pop %esi
10e83d: 5f pop %edi
10e83e: 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(
10e83f: e9 7c 19 00 00 jmp 1101c0 <_Thread_queue_Enqueue_with_handler>
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 );
10e844: 83 ec 0c sub $0xc,%esp
10e847: 53 push %ebx
10e848: 88 55 e0 mov %dl,-0x20(%ebp)
10e84b: 89 4d dc mov %ecx,-0x24(%ebp)
10e84e: e8 81 1c 00 00 call 1104d4 <_Thread_queue_First>
if ( !waiter ) {
10e853: 83 c4 10 add $0x10,%esp
10e856: 85 c0 test %eax,%eax
10e858: 8a 55 e0 mov -0x20(%ebp),%dl
10e85b: 8b 4d dc mov -0x24(%ebp),%ecx
10e85e: 75 93 jne 10e7f3 <_CORE_RWLock_Obtain_for_reading+0x47><== NEVER TAKEN
the_rwlock->number_of_readers += 1;
10e860: ff 43 48 incl 0x48(%ebx)
_ISR_Enable( level );
10e863: ff 75 e4 pushl -0x1c(%ebp)
10e866: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e867: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
return;
10e86e: e9 75 ff ff ff jmp 10e7e8 <_CORE_RWLock_Obtain_for_reading+0x3c>
0010e874 <_CORE_RWLock_Obtain_for_writing>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
10e874: 55 push %ebp
10e875: 89 e5 mov %esp,%ebp
10e877: 57 push %edi
10e878: 56 push %esi
10e879: 53 push %ebx
10e87a: 83 ec 0c sub $0xc,%esp
10e87d: 8b 45 08 mov 0x8(%ebp),%eax
10e880: 8b 7d 0c mov 0xc(%ebp),%edi
10e883: 8b 75 14 mov 0x14(%ebp),%esi
10e886: 8a 5d 10 mov 0x10(%ebp),%bl
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e889: 8b 15 98 c4 12 00 mov 0x12c498,%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 );
10e88f: 9c pushf
10e890: fa cli
10e891: 59 pop %ecx
switch ( the_rwlock->current_state ) {
10e892: 83 78 44 00 cmpl $0x0,0x44(%eax)
10e896: 75 18 jne 10e8b0 <_CORE_RWLock_Obtain_for_writing+0x3c>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
10e898: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax)
_ISR_Enable( level );
10e89f: 51 push %ecx
10e8a0: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e8a1: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e8a8: 83 c4 0c add $0xc,%esp
10e8ab: 5b pop %ebx
10e8ac: 5e pop %esi
10e8ad: 5f pop %edi
10e8ae: c9 leave
10e8af: c3 ret
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
10e8b0: 84 db test %bl,%bl
10e8b2: 75 14 jne 10e8c8 <_CORE_RWLock_Obtain_for_writing+0x54>
_ISR_Enable( level );
10e8b4: 51 push %ecx
10e8b5: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e8b6: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e8bd: 83 c4 0c add $0xc,%esp
10e8c0: 5b pop %ebx
10e8c1: 5e pop %esi
10e8c2: 5f pop %edi
10e8c3: c9 leave
10e8c4: c3 ret
10e8c5: 8d 76 00 lea 0x0(%esi),%esi
10e8c8: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax)
/*
* 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;
10e8cf: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
10e8d2: 89 7a 20 mov %edi,0x20(%edx)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
10e8d5: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e8dc: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_ISR_Enable( level );
10e8e3: 51 push %ecx
10e8e4: 9d popf
_Thread_queue_Enqueue_with_handler(
10e8e5: c7 45 10 b0 e9 10 00 movl $0x10e9b0,0x10(%ebp)
10e8ec: 89 75 0c mov %esi,0xc(%ebp)
10e8ef: 89 45 08 mov %eax,0x8(%ebp)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e8f2: 83 c4 0c add $0xc,%esp
10e8f5: 5b pop %ebx
10e8f6: 5e pop %esi
10e8f7: 5f pop %edi
10e8f8: c9 leave
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
10e8f9: e9 c2 18 00 00 jmp 1101c0 <_Thread_queue_Enqueue_with_handler>
0010e900 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
10e900: 55 push %ebp
10e901: 89 e5 mov %esp,%ebp
10e903: 53 push %ebx
10e904: 83 ec 04 sub $0x4,%esp
10e907: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e90a: 8b 0d 98 c4 12 00 mov 0x12c498,%ecx
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
10e910: 9c pushf
10e911: fa cli
10e912: 5a pop %edx
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
10e913: 8b 43 44 mov 0x44(%ebx),%eax
10e916: 85 c0 test %eax,%eax
10e918: 74 7a je 10e994 <_CORE_RWLock_Release+0x94>
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
10e91a: 48 dec %eax
10e91b: 74 63 je 10e980 <_CORE_RWLock_Release+0x80>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e91d: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
10e924: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
_ISR_Enable( level );
10e92b: 52 push %edx
10e92c: 9d popf
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
10e92d: 83 ec 0c sub $0xc,%esp
10e930: 53 push %ebx
10e931: e8 6e 17 00 00 call 1100a4 <_Thread_queue_Dequeue>
if ( next ) {
10e936: 83 c4 10 add $0x10,%esp
10e939: 85 c0 test %eax,%eax
10e93b: 74 39 je 10e976 <_CORE_RWLock_Release+0x76>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
10e93d: 83 78 30 01 cmpl $0x1,0x30(%eax)
10e941: 74 61 je 10e9a4 <_CORE_RWLock_Release+0xa4>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
10e943: ff 43 48 incl 0x48(%ebx)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10e946: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
10e94d: eb 17 jmp 10e966 <_CORE_RWLock_Release+0x66>
10e94f: 90 nop
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
10e950: 83 78 30 01 cmpl $0x1,0x30(%eax)
10e954: 74 20 je 10e976 <_CORE_RWLock_Release+0x76><== NEVER TAKEN
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
10e956: ff 43 48 incl 0x48(%ebx)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
10e959: 83 ec 08 sub $0x8,%esp
10e95c: 50 push %eax
10e95d: 53 push %ebx
10e95e: e8 65 1a 00 00 call 1103c8 <_Thread_queue_Extract>
}
10e963: 83 c4 10 add $0x10,%esp
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
10e966: 83 ec 0c sub $0xc,%esp
10e969: 53 push %ebx
10e96a: e8 65 1b 00 00 call 1104d4 <_Thread_queue_First>
if ( !next ||
10e96f: 83 c4 10 add $0x10,%esp
10e972: 85 c0 test %eax,%eax
10e974: 75 da jne 10e950 <_CORE_RWLock_Release+0x50>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e976: 31 c0 xor %eax,%eax
10e978: 8b 5d fc mov -0x4(%ebp),%ebx
10e97b: c9 leave
10e97c: c3 ret
10e97d: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
10e980: 8b 43 48 mov 0x48(%ebx),%eax
10e983: 48 dec %eax
10e984: 89 43 48 mov %eax,0x48(%ebx)
if ( the_rwlock->number_of_readers != 0 ) {
10e987: 85 c0 test %eax,%eax
10e989: 74 92 je 10e91d <_CORE_RWLock_Release+0x1d>
/* must be unlocked again */
_ISR_Enable( level );
10e98b: 52 push %edx
10e98c: 9d popf
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e98d: 31 c0 xor %eax,%eax
10e98f: 8b 5d fc mov -0x4(%ebp),%ebx
10e992: c9 leave
10e993: c3 ret
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
10e994: 52 push %edx
10e995: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e996: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e99d: 31 c0 xor %eax,%eax
10e99f: 8b 5d fc mov -0x4(%ebp),%ebx
10e9a2: c9 leave
10e9a3: c3 ret
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
if ( next ) {
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
10e9a4: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx)
return CORE_RWLOCK_SUCCESSFUL;
10e9ab: eb c9 jmp 10e976 <_CORE_RWLock_Release+0x76>
0010e9b0 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
10e9b0: 55 push %ebp
10e9b1: 89 e5 mov %esp,%ebp
10e9b3: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10e9b6: 8d 45 f4 lea -0xc(%ebp),%eax
10e9b9: 50 push %eax
10e9ba: ff 75 08 pushl 0x8(%ebp)
10e9bd: e8 ea 12 00 00 call 10fcac <_Thread_Get>
switch ( location ) {
10e9c2: 83 c4 10 add $0x10,%esp
10e9c5: 8b 55 f4 mov -0xc(%ebp),%edx
10e9c8: 85 d2 test %edx,%edx
10e9ca: 75 17 jne 10e9e3 <_CORE_RWLock_Timeout+0x33><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10e9cc: 83 ec 0c sub $0xc,%esp
10e9cf: 50 push %eax
10e9d0: e8 cf 1b 00 00 call 1105a4 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10e9d5: a1 d8 c3 12 00 mov 0x12c3d8,%eax
10e9da: 48 dec %eax
10e9db: a3 d8 c3 12 00 mov %eax,0x12c3d8
10e9e0: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10e9e3: c9 leave
10e9e4: c3 ret
0011a190 <_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
)
{
11a190: 55 push %ebp
11a191: 89 e5 mov %esp,%ebp
11a193: 57 push %edi
11a194: 56 push %esi
11a195: 53 push %ebx
11a196: 83 ec 1c sub $0x1c,%esp
11a199: 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 ) {
11a19c: 8b 45 10 mov 0x10(%ebp),%eax
11a19f: 39 43 4c cmp %eax,0x4c(%ebx)
11a1a2: 72 60 jb 11a204 <_CORE_message_queue_Broadcast+0x74><== NEVER TAKEN
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
11a1a4: 8b 43 48 mov 0x48(%ebx),%eax
11a1a7: 85 c0 test %eax,%eax
11a1a9: 75 45 jne 11a1f0 <_CORE_message_queue_Broadcast+0x60>
* 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))) {
11a1ab: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
11a1b2: eb 18 jmp 11a1cc <_CORE_message_queue_Broadcast+0x3c>
waitp = &the_thread->Wait;
number_broadcasted += 1;
11a1b4: ff 45 e4 incl -0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
11a1b7: 8b 42 2c mov 0x2c(%edx),%eax
11a1ba: 89 c7 mov %eax,%edi
11a1bc: 8b 75 0c mov 0xc(%ebp),%esi
11a1bf: 8b 4d 10 mov 0x10(%ebp),%ecx
11a1c2: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
11a1c4: 8b 42 28 mov 0x28(%edx),%eax
11a1c7: 8b 55 10 mov 0x10(%ebp),%edx
11a1ca: 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))) {
11a1cc: 83 ec 0c sub $0xc,%esp
11a1cf: 53 push %ebx
11a1d0: e8 ef 24 00 00 call 11c6c4 <_Thread_queue_Dequeue>
11a1d5: 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 =
11a1d7: 83 c4 10 add $0x10,%esp
11a1da: 85 c0 test %eax,%eax
11a1dc: 75 d6 jne 11a1b4 <_CORE_message_queue_Broadcast+0x24>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
11a1de: 8b 55 e4 mov -0x1c(%ebp),%edx
11a1e1: 8b 45 1c mov 0x1c(%ebp),%eax
11a1e4: 89 10 mov %edx,(%eax)
11a1e6: 31 c0 xor %eax,%eax
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
11a1e8: 8d 65 f4 lea -0xc(%ebp),%esp
11a1eb: 5b pop %ebx
11a1ec: 5e pop %esi
11a1ed: 5f pop %edi
11a1ee: c9 leave
11a1ef: c3 ret
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
*count = 0;
11a1f0: 8b 55 1c mov 0x1c(%ebp),%edx
11a1f3: c7 02 00 00 00 00 movl $0x0,(%edx)
11a1f9: 31 c0 xor %eax,%eax
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
11a1fb: 8d 65 f4 lea -0xc(%ebp),%esp
11a1fe: 5b pop %ebx
11a1ff: 5e pop %esi
11a200: 5f pop %edi
11a201: c9 leave
11a202: c3 ret
11a203: 90 nop
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
11a204: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
11a209: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11a20c: 5b pop %ebx <== NOT EXECUTED
11a20d: 5e pop %esi <== NOT EXECUTED
11a20e: 5f pop %edi <== NOT EXECUTED
11a20f: c9 leave <== NOT EXECUTED
11a210: c3 ret <== NOT EXECUTED
00115300 <_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
)
{
115300: 55 push %ebp
115301: 89 e5 mov %esp,%ebp
115303: 57 push %edi
115304: 56 push %esi
115305: 53 push %ebx
115306: 83 ec 0c sub $0xc,%esp
115309: 8b 5d 08 mov 0x8(%ebp),%ebx
11530c: 8b 75 10 mov 0x10(%ebp),%esi
11530f: 8b 45 14 mov 0x14(%ebp),%eax
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
115312: 89 73 44 mov %esi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
115315: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
11531c: 89 43 4c mov %eax,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;
11531f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
the_message_queue->notify_argument = the_argument;
115326: 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)) {
11532d: a8 03 test $0x3,%al
11532f: 75 1b jne 11534c <_CORE_message_queue_Initialize+0x4c>
115331: 89 c2 mov %eax,%edx
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
115333: 8d 7a 14 lea 0x14(%edx),%edi
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
115336: 89 f8 mov %edi,%eax
115338: 0f af c6 imul %esi,%eax
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
11533b: 39 d0 cmp %edx,%eax
11533d: 73 25 jae 115364 <_CORE_message_queue_Initialize+0x64><== ALWAYS TAKEN
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
11533f: 31 c0 xor %eax,%eax
}
115341: 8d 65 f4 lea -0xc(%ebp),%esp
115344: 5b pop %ebx
115345: 5e pop %esi
115346: 5f pop %edi
115347: c9 leave
115348: c3 ret
115349: 8d 76 00 lea 0x0(%esi),%esi
* 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)) {
allocated_message_size += sizeof(uint32_t);
11534c: 8d 50 04 lea 0x4(%eax),%edx
allocated_message_size &= ~(sizeof(uint32_t) - 1);
11534f: 83 e2 fc and $0xfffffffc,%edx
}
if (allocated_message_size < maximum_message_size)
115352: 39 d0 cmp %edx,%eax
115354: 77 e9 ja 11533f <_CORE_message_queue_Initialize+0x3f><== 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));
115356: 8d 7a 14 lea 0x14(%edx),%edi
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
115359: 89 f8 mov %edi,%eax
11535b: 0f af c6 imul %esi,%eax
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
11535e: 39 d0 cmp %edx,%eax
115360: 72 dd jb 11533f <_CORE_message_queue_Initialize+0x3f><== NEVER TAKEN
115362: 66 90 xchg %ax,%ax
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
115364: 83 ec 0c sub $0xc,%esp
115367: 50 push %eax
115368: e8 03 2a 00 00 call 117d70 <_Workspace_Allocate>
11536d: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
115370: 83 c4 10 add $0x10,%esp
115373: 85 c0 test %eax,%eax
115375: 74 c8 je 11533f <_CORE_message_queue_Initialize+0x3f>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
115377: 57 push %edi
115378: 56 push %esi
115379: 50 push %eax
11537a: 8d 43 68 lea 0x68(%ebx),%eax
11537d: 50 push %eax
11537e: e8 dd 5c 00 00 call 11b060 <_Chain_Initialize>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
115383: 8d 43 54 lea 0x54(%ebx),%eax
115386: 89 43 50 mov %eax,0x50(%ebx)
the_chain->permanent_null = NULL;
115389: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
the_chain->last = _Chain_Head(the_chain);
115390: 8d 43 50 lea 0x50(%ebx),%eax
115393: 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(
115396: 6a 06 push $0x6
115398: 68 80 00 00 00 push $0x80
11539d: 8b 45 0c mov 0xc(%ebp),%eax
1153a0: 83 38 01 cmpl $0x1,(%eax)
1153a3: 0f 94 c0 sete %al
1153a6: 0f b6 c0 movzbl %al,%eax
1153a9: 50 push %eax
1153aa: 53 push %ebx
1153ab: e8 b8 1f 00 00 call 117368 <_Thread_queue_Initialize>
1153b0: b0 01 mov $0x1,%al
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
1153b2: 83 c4 20 add $0x20,%esp
}
1153b5: 8d 65 f4 lea -0xc(%ebp),%esp
1153b8: 5b pop %ebx
1153b9: 5e pop %esi
1153ba: 5f pop %edi
1153bb: c9 leave
1153bc: c3 ret
001120cc <_CORE_message_queue_Insert_message>:
void _CORE_message_queue_Insert_message(
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message,
CORE_message_queue_Submit_types submit_type
)
{
1120cc: 55 push %ebp
1120cd: 89 e5 mov %esp,%ebp
1120cf: 56 push %esi
1120d0: 53 push %ebx
1120d1: 8b 45 08 mov 0x8(%ebp),%eax
1120d4: 8b 55 0c mov 0xc(%ebp),%edx
1120d7: 8b 4d 10 mov 0x10(%ebp),%ecx
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
1120da: 89 4a 08 mov %ecx,0x8(%edx)
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
else
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
1120dd: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx
1120e3: 74 53 je 112138 <_CORE_message_queue_Insert_message+0x6c>
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
1120e5: 81 f9 00 00 00 80 cmp $0x80000000,%ecx
1120eb: 74 6f je 11215c <_CORE_message_queue_Insert_message+0x90>
Chain_Control *the_header;
int the_priority;
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
1120ed: 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;
1120f0: 8d 70 54 lea 0x54(%eax),%esi
while ( !_Chain_Is_tail( the_header, the_node ) ) {
1120f3: 39 f3 cmp %esi,%ebx
1120f5: 74 05 je 1120fc <_CORE_message_queue_Insert_message+0x30>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
1120f7: 3b 4b 08 cmp 0x8(%ebx),%ecx
1120fa: 7d 2c jge 112128 <_CORE_message_queue_Insert_message+0x5c>
the_node = the_node->next;
continue;
}
break;
}
_ISR_Disable( level );
1120fc: 9c pushf
1120fd: fa cli
1120fe: 5e pop %esi
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
1120ff: ff 40 48 incl 0x48(%eax)
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
112102: 8b 4b 04 mov 0x4(%ebx),%ecx
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
112105: 89 4a 04 mov %ecx,0x4(%edx)
before_node = after_node->next;
112108: 8b 19 mov (%ecx),%ebx
after_node->next = the_node;
11210a: 89 11 mov %edx,(%ecx)
the_node->next = before_node;
11210c: 89 1a mov %ebx,(%edx)
before_node->previous = the_node;
11210e: 89 53 04 mov %edx,0x4(%ebx)
_ISR_Enable( level );
112111: 56 push %esi
112112: 9d popf
/*
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
112113: 8b 50 60 mov 0x60(%eax),%edx
112116: 85 d2 test %edx,%edx
112118: 74 3d je 112157 <_CORE_message_queue_Insert_message+0x8b>
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
11211a: 8b 40 64 mov 0x64(%eax),%eax
11211d: 89 45 08 mov %eax,0x8(%ebp)
#endif
}
112120: 5b pop %ebx
112121: 5e pop %esi
112122: c9 leave
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
112123: ff e2 jmp *%edx
112125: 8d 76 00 lea 0x0(%esi),%esi
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
the_node = the_node->next;
112128: 8b 1b mov (%ebx),%ebx
int the_priority;
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
while ( !_Chain_Is_tail( the_header, the_node ) ) {
11212a: 39 f3 cmp %esi,%ebx
11212c: 74 ce je 1120fc <_CORE_message_queue_Insert_message+0x30>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
11212e: 3b 4b 08 cmp 0x8(%ebx),%ecx
112131: 7c c9 jl 1120fc <_CORE_message_queue_Insert_message+0x30>
112133: eb f3 jmp 112128 <_CORE_message_queue_Insert_message+0x5c>
112135: 8d 76 00 lea 0x0(%esi),%esi
else
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
_ISR_Disable( level );
112138: 9c pushf
112139: fa cli
11213a: 5b pop %ebx
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
11213b: ff 40 48 incl 0x48(%eax)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
11213e: 8d 48 54 lea 0x54(%eax),%ecx
112141: 89 0a mov %ecx,(%edx)
old_last_node = the_chain->last;
112143: 8b 48 58 mov 0x58(%eax),%ecx
the_chain->last = the_node;
112146: 89 50 58 mov %edx,0x58(%eax)
old_last_node->next = the_node;
112149: 89 11 mov %edx,(%ecx)
the_node->previous = old_last_node;
11214b: 89 4a 04 mov %ecx,0x4(%edx)
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
11214e: 53 push %ebx
11214f: 9d popf
/*
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
112150: 8b 50 60 mov 0x60(%eax),%edx
112153: 85 d2 test %edx,%edx
112155: 75 c3 jne 11211a <_CORE_message_queue_Insert_message+0x4e><== NEVER TAKEN
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
#endif
}
112157: 5b pop %ebx
112158: 5e pop %esi
112159: c9 leave
11215a: c3 ret
11215b: 90 nop
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
_ISR_Disable( level );
11215c: 9c pushf
11215d: fa cli
11215e: 5b pop %ebx
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
11215f: ff 40 48 incl 0x48(%eax)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
112162: 8d 48 50 lea 0x50(%eax),%ecx
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
112165: 89 4a 04 mov %ecx,0x4(%edx)
before_node = after_node->next;
112168: 8b 48 50 mov 0x50(%eax),%ecx
after_node->next = the_node;
11216b: 89 50 50 mov %edx,0x50(%eax)
the_node->next = before_node;
11216e: 89 0a mov %ecx,(%edx)
before_node->previous = the_node;
112170: 89 51 04 mov %edx,0x4(%ecx)
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
112173: 53 push %ebx
112174: 9d popf
112175: eb 9c jmp 112113 <_CORE_message_queue_Insert_message+0x47>
001153c0 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
1153c0: 55 push %ebp
1153c1: 89 e5 mov %esp,%ebp
1153c3: 57 push %edi
1153c4: 56 push %esi
1153c5: 53 push %ebx
1153c6: 83 ec 2c sub $0x2c,%esp
1153c9: 8b 55 08 mov 0x8(%ebp),%edx
1153cc: 8b 45 0c mov 0xc(%ebp),%eax
1153cf: 89 45 dc mov %eax,-0x24(%ebp)
1153d2: 8b 4d 10 mov 0x10(%ebp),%ecx
1153d5: 89 4d e0 mov %ecx,-0x20(%ebp)
1153d8: 8b 45 14 mov 0x14(%ebp),%eax
1153db: 8b 5d 1c mov 0x1c(%ebp),%ebx
1153de: 89 5d d8 mov %ebx,-0x28(%ebp)
1153e1: 0f b6 7d 18 movzbl 0x18(%ebp),%edi
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
1153e5: 8b 0d b8 30 13 00 mov 0x1330b8,%ecx
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
1153eb: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
_ISR_Disable( level );
1153f2: 9c pushf
1153f3: fa cli
1153f4: 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));
1153f7: 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;
1153fa: 8d 72 54 lea 0x54(%edx),%esi
1153fd: 39 f3 cmp %esi,%ebx
1153ff: 74 7b je 11547c <_CORE_message_queue_Seize+0xbc>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
115401: 8b 0b mov (%ebx),%ecx
the_chain->first = new_first;
115403: 89 4a 50 mov %ecx,0x50(%edx)
new_first->previous = _Chain_Head(the_chain);
115406: 8d 72 50 lea 0x50(%edx),%esi
115409: 89 71 04 mov %esi,0x4(%ecx)
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
11540c: ff 4a 48 decl 0x48(%edx)
_ISR_Enable( level );
11540f: ff 75 e4 pushl -0x1c(%ebp)
115412: 9d popf
*size_p = the_message->Contents.size;
115413: 8b 4b 0c mov 0xc(%ebx),%ecx
115416: 89 08 mov %ecx,(%eax)
_Thread_Executing->Wait.count =
115418: 8b 73 08 mov 0x8(%ebx),%esi
11541b: 8b 0d b8 30 13 00 mov 0x1330b8,%ecx
115421: 89 71 24 mov %esi,0x24(%ecx)
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
115424: 8d 4b 10 lea 0x10(%ebx),%ecx
115427: 89 4d e4 mov %ecx,-0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
11542a: 8b 08 mov (%eax),%ecx
11542c: 8b 7d e0 mov -0x20(%ebp),%edi
11542f: 8b 75 e4 mov -0x1c(%ebp),%esi
115432: 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 );
115434: 83 ec 0c sub $0xc,%esp
115437: 52 push %edx
115438: 89 55 d4 mov %edx,-0x2c(%ebp)
11543b: e8 ac 1b 00 00 call 116fec <_Thread_queue_Dequeue>
if ( !the_thread ) {
115440: 83 c4 10 add $0x10,%esp
115443: 85 c0 test %eax,%eax
115445: 8b 55 d4 mov -0x2c(%ebp),%edx
115448: 0f 84 86 00 00 00 je 1154d4 <_CORE_message_queue_Seize+0x114>
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
11544e: 8b 48 24 mov 0x24(%eax),%ecx
115451: 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;
115454: 8b 48 30 mov 0x30(%eax),%ecx
115457: 89 4b 0c mov %ecx,0xc(%ebx)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
11545a: 8b 70 2c mov 0x2c(%eax),%esi
11545d: 8b 7d e4 mov -0x1c(%ebp),%edi
115460: 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(
115462: 8b 43 08 mov 0x8(%ebx),%eax
115465: 89 45 10 mov %eax,0x10(%ebp)
115468: 89 5d 0c mov %ebx,0xc(%ebp)
11546b: 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 );
}
11546e: 8d 65 f4 lea -0xc(%ebp),%esp
115471: 5b pop %ebx
115472: 5e pop %esi
115473: 5f pop %edi
115474: c9 leave
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
115475: e9 0e 5d 00 00 jmp 11b188 <_CORE_message_queue_Insert_message>
11547a: 66 90 xchg %ax,%ax
return;
}
#endif
}
if ( !wait ) {
11547c: 89 fb mov %edi,%ebx
11547e: 84 db test %bl,%bl
115480: 75 16 jne 115498 <_CORE_message_queue_Seize+0xd8>
_ISR_Enable( level );
115482: ff 75 e4 pushl -0x1c(%ebp)
115485: 9d popf
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
115486: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
11548d: 8d 65 f4 lea -0xc(%ebp),%esp
115490: 5b pop %ebx
115491: 5e pop %esi
115492: 5f pop %edi
115493: c9 leave
115494: c3 ret
115495: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
115498: 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;
11549f: 89 51 44 mov %edx,0x44(%ecx)
executing->Wait.id = id;
1154a2: 8b 5d dc mov -0x24(%ebp),%ebx
1154a5: 89 59 20 mov %ebx,0x20(%ecx)
executing->Wait.return_argument_second.mutable_object = buffer;
1154a8: 8b 5d e0 mov -0x20(%ebp),%ebx
1154ab: 89 59 2c mov %ebx,0x2c(%ecx)
executing->Wait.return_argument = size_p;
1154ae: 89 41 28 mov %eax,0x28(%ecx)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
1154b1: ff 75 e4 pushl -0x1c(%ebp)
1154b4: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
1154b5: c7 45 10 18 74 11 00 movl $0x117418,0x10(%ebp)
1154bc: 8b 45 d8 mov -0x28(%ebp),%eax
1154bf: 89 45 0c mov %eax,0xc(%ebp)
1154c2: 89 55 08 mov %edx,0x8(%ebp)
}
1154c5: 8d 65 f4 lea -0xc(%ebp),%esp
1154c8: 5b pop %ebx
1154c9: 5e pop %esi
1154ca: 5f pop %edi
1154cb: 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 );
1154cc: e9 37 1c 00 00 jmp 117108 <_Thread_queue_Enqueue_with_handler>
1154d1: 8d 76 00 lea 0x0(%esi),%esi
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 );
1154d4: 89 5d 0c mov %ebx,0xc(%ebp)
1154d7: 83 c2 68 add $0x68,%edx
1154da: 89 55 08 mov %edx,0x8(%ebp)
}
1154dd: 8d 65 f4 lea -0xc(%ebp),%esp
1154e0: 5b pop %ebx
1154e1: 5e pop %esi
1154e2: 5f pop %edi
1154e3: c9 leave
1154e4: e9 97 fd ff ff jmp 115280 <_Chain_Append>
0010c634 <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
10c634: 55 push %ebp
10c635: 89 e5 mov %esp,%ebp
10c637: 57 push %edi
10c638: 56 push %esi
10c639: 53 push %ebx
10c63a: 83 ec 0c sub $0xc,%esp
10c63d: 8b 5d 08 mov 0x8(%ebp),%ebx
10c640: 0f b6 75 20 movzbl 0x20(%ebp),%esi
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
10c644: 8b 45 10 mov 0x10(%ebp),%eax
10c647: 39 43 4c cmp %eax,0x4c(%ebx)
10c64a: 0f 82 84 00 00 00 jb 10c6d4 <_CORE_message_queue_Submit+0xa0>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
10c650: 8b 7b 48 mov 0x48(%ebx),%edi
10c653: 85 ff test %edi,%edi
10c655: 74 45 je 10c69c <_CORE_message_queue_Submit+0x68>
RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control *
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
10c657: 83 ec 0c sub $0xc,%esp
10c65a: 8d 43 68 lea 0x68(%ebx),%eax
10c65d: 50 push %eax
10c65e: e8 ad ff ff ff call 10c610 <_Chain_Get>
10c663: 89 c2 mov %eax,%edx
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
the_message =
_CORE_message_queue_Allocate_message_buffer( the_message_queue );
if ( the_message ) {
10c665: 83 c4 10 add $0x10,%esp
10c668: 85 c0 test %eax,%eax
10c66a: 74 78 je 10c6e4 <_CORE_message_queue_Submit+0xb0>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10c66c: 8d 40 10 lea 0x10(%eax),%eax
10c66f: 89 c7 mov %eax,%edi
10c671: 8b 75 0c mov 0xc(%ebp),%esi
10c674: 8b 4d 10 mov 0x10(%ebp),%ecx
10c677: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
10c679: 8b 4d 10 mov 0x10(%ebp),%ecx
10c67c: 89 4a 0c mov %ecx,0xc(%edx)
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
10c67f: 8b 45 1c mov 0x1c(%ebp),%eax
10c682: 89 42 08 mov %eax,0x8(%edx)
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
10c685: 51 push %ecx
10c686: 50 push %eax
10c687: 52 push %edx
10c688: 53 push %ebx
10c689: e8 3e 5a 00 00 call 1120cc <_CORE_message_queue_Insert_message>
10c68e: 31 c0 xor %eax,%eax
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
10c690: 83 c4 10 add $0x10,%esp
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c693: 8d 65 f4 lea -0xc(%ebp),%esp
10c696: 5b pop %ebx
10c697: 5e pop %esi
10c698: 5f pop %edi
10c699: c9 leave
10c69a: c3 ret
10c69b: 90 nop
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
10c69c: 83 ec 0c sub $0xc,%esp
10c69f: 53 push %ebx
10c6a0: e8 e3 19 00 00 call 10e088 <_Thread_queue_Dequeue>
10c6a5: 89 c2 mov %eax,%edx
if ( the_thread ) {
10c6a7: 83 c4 10 add $0x10,%esp
10c6aa: 85 c0 test %eax,%eax
10c6ac: 74 a9 je 10c657 <_CORE_message_queue_Submit+0x23>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10c6ae: 8b 40 2c mov 0x2c(%eax),%eax
10c6b1: 89 c7 mov %eax,%edi
10c6b3: 8b 75 0c mov 0xc(%ebp),%esi
10c6b6: 8b 4d 10 mov 0x10(%ebp),%ecx
10c6b9: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
10c6bb: 8b 42 28 mov 0x28(%edx),%eax
10c6be: 8b 4d 10 mov 0x10(%ebp),%ecx
10c6c1: 89 08 mov %ecx,(%eax)
the_thread->Wait.count = (uint32_t) submit_type;
10c6c3: 8b 45 1c mov 0x1c(%ebp),%eax
10c6c6: 89 42 24 mov %eax,0x24(%edx)
10c6c9: 31 c0 xor %eax,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c6cb: 8d 65 f4 lea -0xc(%ebp),%esp
10c6ce: 5b pop %ebx
10c6cf: 5e pop %esi
10c6d0: 5f pop %edi
10c6d1: c9 leave
10c6d2: c3 ret
10c6d3: 90 nop
)
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
10c6d4: b8 01 00 00 00 mov $0x1,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c6d9: 8d 65 f4 lea -0xc(%ebp),%esp
10c6dc: 5b pop %ebx
10c6dd: 5e pop %esi
10c6de: 5f pop %edi
10c6df: c9 leave
10c6e0: c3 ret
10c6e1: 8d 76 00 lea 0x0(%esi),%esi
/*
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
10c6e4: 89 f2 mov %esi,%edx
10c6e6: 84 d2 test %dl,%dl
10c6e8: 74 12 je 10c6fc <_CORE_message_queue_Submit+0xc8>
/*
* Do NOT block on a send if the caller is in an ISR. It is
* deadly to block in an ISR.
*/
if ( _ISR_Is_in_progress() ) {
10c6ea: a1 94 94 12 00 mov 0x129494,%eax
10c6ef: 85 c0 test %eax,%eax
10c6f1: 74 11 je 10c704 <_CORE_message_queue_Submit+0xd0>
10c6f3: b8 03 00 00 00 mov $0x3,%eax
10c6f8: eb 99 jmp 10c693 <_CORE_message_queue_Submit+0x5f>
10c6fa: 66 90 xchg %ax,%ax
/*
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
10c6fc: b8 02 00 00 00 mov $0x2,%eax
10c701: eb 90 jmp 10c693 <_CORE_message_queue_Submit+0x5f>
10c703: 90 nop
* Thus the unusual choice to open a new scope and declare
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
10c704: a1 b8 94 12 00 mov 0x1294b8,%eax
ISR_Level level;
_ISR_Disable( level );
10c709: 9c pushf
10c70a: fa cli
10c70b: 59 pop %ecx
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;
10c70c: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
10c713: 89 58 44 mov %ebx,0x44(%eax)
executing->Wait.id = id;
10c716: 8b 55 14 mov 0x14(%ebp),%edx
10c719: 89 50 20 mov %edx,0x20(%eax)
executing->Wait.return_argument_second.immutable_object = buffer;
10c71c: 8b 55 0c mov 0xc(%ebp),%edx
10c71f: 89 50 2c mov %edx,0x2c(%eax)
executing->Wait.option = (uint32_t) size;
10c722: 8b 55 10 mov 0x10(%ebp),%edx
10c725: 89 50 30 mov %edx,0x30(%eax)
executing->Wait.count = submit_type;
10c728: 8b 55 1c mov 0x1c(%ebp),%edx
10c72b: 89 50 24 mov %edx,0x24(%eax)
_ISR_Enable( level );
10c72e: 51 push %ecx
10c72f: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
10c730: 50 push %eax
10c731: 68 b4 e4 10 00 push $0x10e4b4
10c736: ff 75 24 pushl 0x24(%ebp)
10c739: 53 push %ebx
10c73a: e8 65 1a 00 00 call 10e1a4 <_Thread_queue_Enqueue_with_handler>
10c73f: b8 07 00 00 00 mov $0x7,%eax
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
10c744: 83 c4 10 add $0x10,%esp
10c747: e9 47 ff ff ff jmp 10c693 <_CORE_message_queue_Submit+0x5f>
0010c758 <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
10c758: 55 push %ebp
10c759: 89 e5 mov %esp,%ebp
10c75b: 57 push %edi
10c75c: 56 push %esi
10c75d: 53 push %ebx
10c75e: 83 ec 0c sub $0xc,%esp
10c761: 8b 45 08 mov 0x8(%ebp),%eax
10c764: 8b 5d 0c mov 0xc(%ebp),%ebx
10c767: 8b 55 10 mov 0x10(%ebp),%edx
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
10c76a: 8d 78 40 lea 0x40(%eax),%edi
10c76d: b9 04 00 00 00 mov $0x4,%ecx
10c772: 89 de mov %ebx,%esi
10c774: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_mutex->lock = initial_lock;
10c776: 89 50 50 mov %edx,0x50(%eax)
the_mutex->blocked_count = 0;
10c779: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
if ( initial_lock == CORE_MUTEX_LOCKED ) {
10c780: 85 d2 test %edx,%edx
10c782: 75 30 jne 10c7b4 <_CORE_mutex_Initialize+0x5c>
the_mutex->nest_count = 1;
10c784: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax)
the_mutex->holder = _Thread_Executing;
10c78b: 8b 15 b8 94 12 00 mov 0x1294b8,%edx
10c791: 89 50 5c mov %edx,0x5c(%eax)
the_mutex->holder_id = _Thread_Executing->Object.id;
10c794: 8b 4a 08 mov 0x8(%edx),%ecx
10c797: 89 48 60 mov %ecx,0x60(%eax)
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
10c79a: 8b 48 48 mov 0x48(%eax),%ecx
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10c79d: 83 f9 02 cmp $0x2,%ecx
10c7a0: 74 05 je 10c7a7 <_CORE_mutex_Initialize+0x4f>
10c7a2: 83 f9 03 cmp $0x3,%ecx
10c7a5: 75 22 jne 10c7c9 <_CORE_mutex_Initialize+0x71>
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
the_mutex->Attributes.priority_ceiling )
10c7a7: 8b 4a 14 mov 0x14(%edx),%ecx
10c7aa: 3b 48 4c cmp 0x4c(%eax),%ecx
10c7ad: 72 41 jb 10c7f0 <_CORE_mutex_Initialize+0x98>
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
10c7af: ff 42 1c incl 0x1c(%edx)
10c7b2: eb 15 jmp 10c7c9 <_CORE_mutex_Initialize+0x71>
}
} else {
the_mutex->nest_count = 0;
10c7b4: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
the_mutex->holder = NULL;
10c7bb: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
the_mutex->holder_id = 0;
10c7c2: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
}
_Thread_queue_Initialize(
10c7c9: 6a 05 push $0x5
10c7cb: 68 00 04 00 00 push $0x400
10c7d0: 31 d2 xor %edx,%edx
10c7d2: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10c7d6: 0f 95 c2 setne %dl
10c7d9: 52 push %edx
10c7da: 50 push %eax
10c7db: e8 24 1c 00 00 call 10e404 <_Thread_queue_Initialize>
10c7e0: 31 c0 xor %eax,%eax
THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c7e2: 83 c4 10 add $0x10,%esp
}
10c7e5: 8d 65 f4 lea -0xc(%ebp),%esp
10c7e8: 5b pop %ebx
10c7e9: 5e pop %esi
10c7ea: 5f pop %edi
10c7eb: c9 leave
10c7ec: c3 ret
10c7ed: 8d 76 00 lea 0x0(%esi),%esi
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
the_mutex->Attributes.priority_ceiling )
10c7f0: b8 06 00 00 00 mov $0x6,%eax
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c7f5: 8d 65 f4 lea -0xc(%ebp),%esp
10c7f8: 5b pop %ebx
10c7f9: 5e pop %esi
10c7fa: 5f pop %edi
10c7fb: c9 leave
10c7fc: c3 ret
0010c850 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10c850: 55 push %ebp
10c851: 89 e5 mov %esp,%ebp
10c853: 53 push %ebx
10c854: 83 ec 14 sub $0x14,%esp
10c857: 8b 5d 08 mov 0x8(%ebp),%ebx
10c85a: 8a 55 10 mov 0x10(%ebp),%dl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c85d: a1 f8 93 12 00 mov 0x1293f8,%eax
10c862: 85 c0 test %eax,%eax
10c864: 74 04 je 10c86a <_CORE_mutex_Seize+0x1a>
10c866: 84 d2 test %dl,%dl
10c868: 75 36 jne 10c8a0 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN
10c86a: 83 ec 08 sub $0x8,%esp
10c86d: 8d 45 18 lea 0x18(%ebp),%eax
10c870: 50 push %eax
10c871: 53 push %ebx
10c872: 88 55 f4 mov %dl,-0xc(%ebp)
10c875: e8 fe 58 00 00 call 112178 <_CORE_mutex_Seize_interrupt_trylock>
10c87a: 83 c4 10 add $0x10,%esp
10c87d: 85 c0 test %eax,%eax
10c87f: 8a 55 f4 mov -0xc(%ebp),%dl
10c882: 74 14 je 10c898 <_CORE_mutex_Seize+0x48>
10c884: 84 d2 test %dl,%dl
10c886: 75 30 jne 10c8b8 <_CORE_mutex_Seize+0x68>
10c888: ff 75 18 pushl 0x18(%ebp)
10c88b: 9d popf
10c88c: a1 b8 94 12 00 mov 0x1294b8,%eax
10c891: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
}
10c898: 8b 5d fc mov -0x4(%ebp),%ebx
10c89b: c9 leave
10c89c: c3 ret
10c89d: 8d 76 00 lea 0x0(%esi),%esi
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c8a0: 83 3d c0 95 12 00 01 cmpl $0x1,0x1295c0
10c8a7: 76 c1 jbe 10c86a <_CORE_mutex_Seize+0x1a>
10c8a9: 53 push %ebx
10c8aa: 6a 13 push $0x13
10c8ac: 6a 00 push $0x0
10c8ae: 6a 00 push $0x0
10c8b0: e8 fb 05 00 00 call 10ceb0 <_Internal_error_Occurred>
10c8b5: 8d 76 00 lea 0x0(%esi),%esi
10c8b8: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
10c8bf: a1 b8 94 12 00 mov 0x1294b8,%eax
10c8c4: 89 58 44 mov %ebx,0x44(%eax)
10c8c7: 8b 55 0c mov 0xc(%ebp),%edx
10c8ca: 89 50 20 mov %edx,0x20(%eax)
10c8cd: a1 f8 93 12 00 mov 0x1293f8,%eax
10c8d2: 40 inc %eax
10c8d3: a3 f8 93 12 00 mov %eax,0x1293f8
10c8d8: ff 75 18 pushl 0x18(%ebp)
10c8db: 9d popf
10c8dc: 83 ec 08 sub $0x8,%esp
10c8df: ff 75 14 pushl 0x14(%ebp)
10c8e2: 53 push %ebx
10c8e3: e8 18 ff ff ff call 10c800 <_CORE_mutex_Seize_interrupt_blocking>
10c8e8: 83 c4 10 add $0x10,%esp
}
10c8eb: 8b 5d fc mov -0x4(%ebp),%ebx
10c8ee: c9 leave
10c8ef: c3 ret
00112178 <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
112178: 55 push %ebp
112179: 89 e5 mov %esp,%ebp
11217b: 56 push %esi
11217c: 53 push %ebx
11217d: 8b 45 08 mov 0x8(%ebp),%eax
112180: 8b 4d 0c mov 0xc(%ebp),%ecx
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
112183: 8b 15 b8 94 12 00 mov 0x1294b8,%edx
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
112189: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
112190: 8b 58 50 mov 0x50(%eax),%ebx
112193: 85 db test %ebx,%ebx
112195: 74 31 je 1121c8 <_CORE_mutex_Seize_interrupt_trylock+0x50>
the_mutex->lock = CORE_MUTEX_LOCKED;
112197: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
the_mutex->holder = executing;
11219e: 89 50 5c mov %edx,0x5c(%eax)
the_mutex->holder_id = executing->Object.id;
1121a1: 8b 5a 08 mov 0x8(%edx),%ebx
1121a4: 89 58 60 mov %ebx,0x60(%eax)
the_mutex->nest_count = 1;
1121a7: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax)
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
1121ae: 8b 58 48 mov 0x48(%eax),%ebx
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
1121b1: 83 fb 02 cmp $0x2,%ebx
1121b4: 74 26 je 1121dc <_CORE_mutex_Seize_interrupt_trylock+0x64>
1121b6: 83 fb 03 cmp $0x3,%ebx
1121b9: 74 35 je 1121f0 <_CORE_mutex_Seize_interrupt_trylock+0x78>
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
1121bb: ff 31 pushl (%ecx)
1121bd: 9d popf
1121be: 31 c0 xor %eax,%eax
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
1121c0: 8d 65 f8 lea -0x8(%ebp),%esp
1121c3: 5b pop %ebx
1121c4: 5e pop %esi
1121c5: c9 leave
1121c6: c3 ret
1121c7: 90 nop
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
1121c8: 3b 50 5c cmp 0x5c(%eax),%edx
1121cb: 74 17 je 1121e4 <_CORE_mutex_Seize_interrupt_trylock+0x6c>
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
_ISR_Enable( *level_p );
1121cd: b8 01 00 00 00 mov $0x1,%eax
1121d2: 8d 65 f8 lea -0x8(%ebp),%esp
1121d5: 5b pop %ebx
1121d6: 5e pop %esi
1121d7: c9 leave
1121d8: c3 ret
1121d9: 8d 76 00 lea 0x0(%esi),%esi
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
1121dc: ff 42 1c incl 0x1c(%edx)
1121df: eb da jmp 1121bb <_CORE_mutex_Seize_interrupt_trylock+0x43>
1121e1: 8d 76 00 lea 0x0(%esi),%esi
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
1121e4: 8b 58 40 mov 0x40(%eax),%ebx
1121e7: 85 db test %ebx,%ebx
1121e9: 75 3d jne 112228 <_CORE_mutex_Seize_interrupt_trylock+0xb0>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
1121eb: ff 40 54 incl 0x54(%eax)
1121ee: eb cb jmp 1121bb <_CORE_mutex_Seize_interrupt_trylock+0x43>
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
1121f0: 8b 5a 1c mov 0x1c(%edx),%ebx
1121f3: 8d 73 01 lea 0x1(%ebx),%esi
1121f6: 89 72 1c mov %esi,0x1c(%edx)
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
1121f9: 8b 72 14 mov 0x14(%edx),%esi
if ( current == ceiling ) {
1121fc: 39 70 4c cmp %esi,0x4c(%eax)
1121ff: 74 ba je 1121bb <_CORE_mutex_Seize_interrupt_trylock+0x43>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
112201: 72 39 jb 11223c <_CORE_mutex_Seize_interrupt_trylock+0xc4>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
112203: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx)
the_mutex->lock = CORE_MUTEX_UNLOCKED;
11220a: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax)
the_mutex->nest_count = 0; /* undo locking above */
112211: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
executing->resource_count--; /* undo locking above */
112218: 89 5a 1c mov %ebx,0x1c(%edx)
_ISR_Enable( *level_p );
11221b: ff 31 pushl (%ecx)
11221d: 9d popf
11221e: 31 c0 xor %eax,%eax
112220: 8d 65 f8 lea -0x8(%ebp),%esp
112223: 5b pop %ebx
112224: 5e pop %esi
112225: c9 leave
112226: c3 ret
112227: 90 nop
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
112228: 4b dec %ebx
112229: 75 a2 jne 1121cd <_CORE_mutex_Seize_interrupt_trylock+0x55>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
11222b: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
_ISR_Enable( *level_p );
112232: ff 31 pushl (%ecx)
112234: 9d popf
112235: 31 c0 xor %eax,%eax
112237: eb 99 jmp 1121d2 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
112239: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
11223c: 8b 15 f8 93 12 00 mov 0x1293f8,%edx
112242: 42 inc %edx
112243: 89 15 f8 93 12 00 mov %edx,0x1293f8
return 0;
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
112249: ff 31 pushl (%ecx)
11224b: 9d popf
_Thread_Change_priority(
11224c: 52 push %edx
11224d: 6a 00 push $0x0
11224f: ff 70 4c pushl 0x4c(%eax)
112252: ff 70 5c pushl 0x5c(%eax)
112255: e8 2a b5 ff ff call 10d784 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
11225a: e8 0d ba ff ff call 10dc6c <_Thread_Enable_dispatch>
11225f: 31 c0 xor %eax,%eax
112261: 83 c4 10 add $0x10,%esp
112264: e9 69 ff ff ff jmp 1121d2 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
0010c8f0 <_CORE_mutex_Surrender>:
#else
Objects_Id id __attribute__((unused)),
CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused))
#endif
)
{
10c8f0: 55 push %ebp
10c8f1: 89 e5 mov %esp,%ebp
10c8f3: 53 push %ebx
10c8f4: 83 ec 04 sub $0x4,%esp
10c8f7: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *the_thread;
Thread_Control *holder;
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
Chain_Node *first_node;
#endif
holder = the_mutex->holder;
10c8fa: 8b 43 5c mov 0x5c(%ebx),%eax
* allowed when the mutex in quetion is FIFO or simple Priority
* discipline. But Priority Ceiling or Priority Inheritance mutexes
* must be released by the thread which acquired them.
*/
if ( the_mutex->Attributes.only_owner_release ) {
10c8fd: 80 7b 44 00 cmpb $0x0,0x44(%ebx)
10c901: 74 15 je 10c918 <_CORE_mutex_Surrender+0x28>
if ( !_Thread_Is_executing( holder ) )
10c903: 3b 05 b8 94 12 00 cmp 0x1294b8,%eax
10c909: 74 0d je 10c918 <_CORE_mutex_Surrender+0x28>
10c90b: b8 03 00 00 00 mov $0x3,%eax
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c910: 8b 5d fc mov -0x4(%ebp),%ebx
10c913: c9 leave
10c914: c3 ret
10c915: 8d 76 00 lea 0x0(%esi),%esi
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
10c918: 8b 53 54 mov 0x54(%ebx),%edx
10c91b: 85 d2 test %edx,%edx
10c91d: 74 65 je 10c984 <_CORE_mutex_Surrender+0x94>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
10c91f: 4a dec %edx
10c920: 89 53 54 mov %edx,0x54(%ebx)
if ( the_mutex->nest_count != 0 ) {
10c923: 85 d2 test %edx,%edx
10c925: 75 5d jne 10c984 <_CORE_mutex_Surrender+0x94>
10c927: 8b 53 48 mov 0x48(%ebx),%edx
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10c92a: 83 fa 02 cmp $0x2,%edx
10c92d: 0f 84 99 00 00 00 je 10c9cc <_CORE_mutex_Surrender+0xdc>
10c933: 83 fa 03 cmp $0x3,%edx
10c936: 0f 84 90 00 00 00 je 10c9cc <_CORE_mutex_Surrender+0xdc>
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
10c93c: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx)
the_mutex->holder_id = 0;
10c943: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
/*
* Whether or not someone is waiting for the mutex, an
* inherited priority must be lowered if this is the last
* mutex (i.e. resource) this task has.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10c94a: 83 fa 02 cmp $0x2,%edx
10c94d: 74 5d je 10c9ac <_CORE_mutex_Surrender+0xbc>
10c94f: 83 fa 03 cmp $0x3,%edx
10c952: 74 58 je 10c9ac <_CORE_mutex_Surrender+0xbc>
/*
* Now we check if another thread was waiting for this mutex. If so,
* transfer the mutex to that thread.
*/
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
10c954: 83 ec 0c sub $0xc,%esp
10c957: 53 push %ebx
10c958: e8 2b 17 00 00 call 10e088 <_Thread_queue_Dequeue>
10c95d: 83 c4 10 add $0x10,%esp
10c960: 85 c0 test %eax,%eax
10c962: 74 7c je 10c9e0 <_CORE_mutex_Surrender+0xf0>
} else
#endif
{
the_mutex->holder = the_thread;
10c964: 89 43 5c mov %eax,0x5c(%ebx)
the_mutex->holder_id = the_thread->Object.id;
10c967: 8b 50 08 mov 0x8(%eax),%edx
10c96a: 89 53 60 mov %edx,0x60(%ebx)
the_mutex->nest_count = 1;
10c96d: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx)
switch ( the_mutex->Attributes.discipline ) {
10c974: 8b 53 48 mov 0x48(%ebx),%edx
10c977: 83 fa 02 cmp $0x2,%edx
10c97a: 74 58 je 10c9d4 <_CORE_mutex_Surrender+0xe4>
10c97c: 83 fa 03 cmp $0x3,%edx
10c97f: 74 0b je 10c98c <_CORE_mutex_Surrender+0x9c>
10c981: 8d 76 00 lea 0x0(%esi),%esi
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10c984: 31 c0 xor %eax,%eax
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c986: 8b 5d fc mov -0x4(%ebp),%ebx
10c989: c9 leave
10c98a: c3 ret
10c98b: 90 nop
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
10c98c: ff 40 1c incl 0x1c(%eax)
if (the_mutex->Attributes.priority_ceiling <
10c98f: 8b 53 4c mov 0x4c(%ebx),%edx
the_thread->current_priority){
10c992: 3b 50 14 cmp 0x14(%eax),%edx
10c995: 73 ed jae 10c984 <_CORE_mutex_Surrender+0x94>
_Thread_Change_priority(
10c997: 51 push %ecx
10c998: 6a 00 push $0x0
10c99a: 52 push %edx
10c99b: 50 push %eax
10c99c: e8 e3 0d 00 00 call 10d784 <_Thread_Change_priority>
10c9a1: 31 c0 xor %eax,%eax
10c9a3: 83 c4 10 add $0x10,%esp
10c9a6: e9 65 ff ff ff jmp 10c910 <_CORE_mutex_Surrender+0x20>
10c9ab: 90 nop
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
if(the_mutex->queue.priority_before != holder->current_priority)
_Thread_Change_priority(holder,the_mutex->queue.priority_before,true);
#endif
if ( holder->resource_count == 0 &&
10c9ac: 8b 50 1c mov 0x1c(%eax),%edx
10c9af: 85 d2 test %edx,%edx
10c9b1: 75 a1 jne 10c954 <_CORE_mutex_Surrender+0x64>
holder->real_priority != holder->current_priority ) {
10c9b3: 8b 50 18 mov 0x18(%eax),%edx
10c9b6: 3b 50 14 cmp 0x14(%eax),%edx
10c9b9: 74 99 je 10c954 <_CORE_mutex_Surrender+0x64>
_Thread_Change_priority( holder, holder->real_priority, true );
10c9bb: 51 push %ecx
10c9bc: 6a 01 push $0x1
10c9be: 52 push %edx
10c9bf: 50 push %eax
10c9c0: e8 bf 0d 00 00 call 10d784 <_Thread_Change_priority>
10c9c5: 83 c4 10 add $0x10,%esp
10c9c8: eb 8a jmp 10c954 <_CORE_mutex_Surrender+0x64>
10c9ca: 66 90 xchg %ax,%ax
the_mutex->nest_count++;
return CORE_MUTEX_RELEASE_NOT_ORDER;
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
10c9cc: ff 48 1c decl 0x1c(%eax)
10c9cf: e9 68 ff ff ff jmp 10c93c <_CORE_mutex_Surrender+0x4c>
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
10c9d4: ff 40 1c incl 0x1c(%eax)
10c9d7: 31 c0 xor %eax,%eax
break;
10c9d9: e9 32 ff ff ff jmp 10c910 <_CORE_mutex_Surrender+0x20>
10c9de: 66 90 xchg %ax,%ax
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10c9e0: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx)
10c9e7: 31 c0 xor %eax,%eax
10c9e9: e9 22 ff ff ff jmp 10c910 <_CORE_mutex_Surrender+0x20>
001133d4 <_CORE_semaphore_Seize>:
CORE_semaphore_Control *the_semaphore,
Objects_Id id,
bool wait,
Watchdog_Interval timeout
)
{
1133d4: 55 push %ebp
1133d5: 89 e5 mov %esp,%ebp
1133d7: 57 push %edi
1133d8: 56 push %esi
1133d9: 53 push %ebx
1133da: 83 ec 1c sub $0x1c,%esp
1133dd: 8b 45 08 mov 0x8(%ebp),%eax
1133e0: 8b 7d 0c mov 0xc(%ebp),%edi
1133e3: 8b 75 14 mov 0x14(%ebp),%esi
1133e6: 8a 5d 10 mov 0x10(%ebp),%bl
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
1133e9: 8b 15 f8 94 12 00 mov 0x1294f8,%edx
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
1133ef: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_ISR_Disable( level );
1133f6: 9c pushf
1133f7: fa cli
1133f8: 8f 45 e4 popl -0x1c(%ebp)
if ( the_semaphore->count != 0 ) {
1133fb: 8b 48 48 mov 0x48(%eax),%ecx
1133fe: 85 c9 test %ecx,%ecx
113400: 75 46 jne 113448 <_CORE_semaphore_Seize+0x74>
/*
* If the semaphore was not available and the caller was not willing
* to block, then return immediately with a status indicating that
* the semaphore was not available and the caller never blocked.
*/
if ( !wait ) {
113402: 84 db test %bl,%bl
113404: 75 16 jne 11341c <_CORE_semaphore_Seize+0x48>
_ISR_Enable( level );
113406: ff 75 e4 pushl -0x1c(%ebp)
113409: 9d popf
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
11340a: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx)
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
}
113411: 83 c4 1c add $0x1c,%esp
113414: 5b pop %ebx
113415: 5e pop %esi
113416: 5f pop %edi
113417: c9 leave
113418: c3 ret
113419: 8d 76 00 lea 0x0(%esi),%esi
11341c: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax)
/*
* If the semaphore is not available and the caller is willing to
* block, then we now block the caller with optional timeout.
*/
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
113423: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
113426: 89 7a 20 mov %edi,0x20(%edx)
_ISR_Enable( level );
113429: ff 75 e4 pushl -0x1c(%ebp)
11342c: 9d popf
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
11342d: c7 45 10 1c f1 10 00 movl $0x10f11c,0x10(%ebp)
113434: 89 75 0c mov %esi,0xc(%ebp)
113437: 89 45 08 mov %eax,0x8(%ebp)
}
11343a: 83 c4 1c add $0x1c,%esp
11343d: 5b pop %ebx
11343e: 5e pop %esi
11343f: 5f pop %edi
113440: c9 leave
*/
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
113441: e9 c6 b9 ff ff jmp 10ee0c <_Thread_queue_Enqueue_with_handler>
113446: 66 90 xchg %ax,%ax
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
113448: 49 dec %ecx
113449: 89 48 48 mov %ecx,0x48(%eax)
_ISR_Enable( level );
11344c: ff 75 e4 pushl -0x1c(%ebp)
11344f: 9d popf
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
}
113450: 83 c4 1c add $0x1c,%esp
113453: 5b pop %ebx
113454: 5e pop %esi
113455: 5f pop %edi
113456: c9 leave
113457: c3 ret
0010ca3c <_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
)
{
10ca3c: 55 push %ebp
10ca3d: 89 e5 mov %esp,%ebp
10ca3f: 53 push %ebx
10ca40: 83 ec 10 sub $0x10,%esp
10ca43: 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)) ) {
10ca46: 53 push %ebx
10ca47: e8 3c 16 00 00 call 10e088 <_Thread_queue_Dequeue>
10ca4c: 83 c4 10 add $0x10,%esp
10ca4f: 85 c0 test %eax,%eax
10ca51: 74 09 je 10ca5c <_CORE_semaphore_Surrender+0x20>
10ca53: 31 c0 xor %eax,%eax
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
10ca55: 8b 5d fc mov -0x4(%ebp),%ebx
10ca58: c9 leave
10ca59: c3 ret
10ca5a: 66 90 xchg %ax,%ax
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10ca5c: 9c pushf
10ca5d: fa cli
10ca5e: 5a pop %edx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10ca5f: 8b 43 48 mov 0x48(%ebx),%eax
10ca62: 3b 43 40 cmp 0x40(%ebx),%eax
10ca65: 72 0d jb 10ca74 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN
10ca67: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
10ca6c: 52 push %edx
10ca6d: 9d popf
}
return status;
}
10ca6e: 8b 5d fc mov -0x4(%ebp),%ebx
10ca71: c9 leave
10ca72: c3 ret
10ca73: 90 nop
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
10ca74: 40 inc %eax
10ca75: 89 43 48 mov %eax,0x48(%ebx)
10ca78: 31 c0 xor %eax,%eax
10ca7a: eb f0 jmp 10ca6c <_CORE_semaphore_Surrender+0x30>
0010d414 <_CORE_spinlock_Wait>:
CORE_spinlock_Status _CORE_spinlock_Wait(
CORE_spinlock_Control *the_spinlock,
bool wait,
Watchdog_Interval timeout
)
{
10d414: 55 push %ebp
10d415: 89 e5 mov %esp,%ebp
10d417: 56 push %esi
10d418: 53 push %ebx
10d419: 8b 5d 08 mov 0x8(%ebp),%ebx
10d41c: 8a 4d 0c mov 0xc(%ebp),%cl
ISR_Level level;
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
#endif
_ISR_Disable( level );
10d41f: 9c pushf
10d420: fa cli
10d421: 58 pop %eax
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
10d422: 8b 53 04 mov 0x4(%ebx),%edx
10d425: 4a dec %edx
10d426: 74 60 je 10d488 <_CORE_spinlock_Wait+0x74>
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
10d428: 8b 53 08 mov 0x8(%ebx),%edx
10d42b: 42 inc %edx
10d42c: 89 53 08 mov %edx,0x8(%ebx)
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
10d42f: 8b 53 04 mov 0x4(%ebx),%edx
10d432: 85 d2 test %edx,%edx
10d434: 74 22 je 10d458 <_CORE_spinlock_Wait+0x44>
}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
10d436: 84 c9 test %cl,%cl
10d438: 74 39 je 10d473 <_CORE_spinlock_Wait+0x5f>
10d43a: 66 90 xchg %ax,%ax
*
* A spinlock cannot be deleted while it is being used so we are
* safe from deletion.
*/
_ISR_Enable( level );
10d43c: 50 push %eax
10d43d: 9d popf
/* An ISR could occur here */
_Thread_Enable_dispatch();
10d43e: e8 4d 12 00 00 call 10e690 <_Thread_Enable_dispatch>
10d443: a1 78 a8 12 00 mov 0x12a878,%eax
10d448: 40 inc %eax
10d449: a3 78 a8 12 00 mov %eax,0x12a878
/* Another thread could get dispatched here */
/* Reenter the critical sections so we can attempt the lock again. */
_Thread_Disable_dispatch();
_ISR_Disable( level );
10d44e: 9c pushf
10d44f: fa cli
10d450: 58 pop %eax
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
10d451: 8b 53 04 mov 0x4(%ebx),%edx
10d454: 85 d2 test %edx,%edx
10d456: 75 e4 jne 10d43c <_CORE_spinlock_Wait+0x28>
the_spinlock->lock = CORE_SPINLOCK_LOCKED;
10d458: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_spinlock->holder = _Thread_Executing->Object.id;
10d45f: 8b 15 38 a9 12 00 mov 0x12a938,%edx
10d465: 8b 52 08 mov 0x8(%edx),%edx
10d468: 89 53 0c mov %edx,0xc(%ebx)
_ISR_Enable( level );
10d46b: 50 push %eax
10d46c: 9d popf
10d46d: 31 c0 xor %eax,%eax
_Thread_Disable_dispatch();
_ISR_Disable( level );
}
}
10d46f: 5b pop %ebx
10d470: 5e pop %esi
10d471: c9 leave
10d472: c3 ret
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
the_spinlock->users -= 1;
10d473: 8b 53 08 mov 0x8(%ebx),%edx
10d476: 4a dec %edx
10d477: 89 53 08 mov %edx,0x8(%ebx)
_ISR_Enable( level );
10d47a: 50 push %eax
10d47b: 9d popf
10d47c: b8 05 00 00 00 mov $0x5,%eax
_Thread_Disable_dispatch();
_ISR_Disable( level );
}
}
10d481: 5b pop %ebx
10d482: 5e pop %esi
10d483: c9 leave
10d484: c3 ret
10d485: 8d 76 00 lea 0x0(%esi),%esi
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
#endif
_ISR_Disable( level );
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
10d488: 8b 73 0c mov 0xc(%ebx),%esi
10d48b: 8b 15 38 a9 12 00 mov 0x12a938,%edx
10d491: 3b 72 08 cmp 0x8(%edx),%esi
10d494: 75 92 jne 10d428 <_CORE_spinlock_Wait+0x14>
_ISR_Enable( level );
10d496: 50 push %eax
10d497: 9d popf
10d498: b8 01 00 00 00 mov $0x1,%eax
return CORE_SPINLOCK_HOLDER_RELOCKING;
10d49d: eb d0 jmp 10d46f <_CORE_spinlock_Wait+0x5b>
00111fa4 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
111fa4: 55 push %ebp
111fa5: 89 e5 mov %esp,%ebp
111fa7: 57 push %edi
111fa8: 56 push %esi
111fa9: 53 push %ebx
111faa: 8b 7d 08 mov 0x8(%ebp),%edi
111fad: 8b 4d 10 mov 0x10(%ebp),%ecx
111fb0: 8b 75 14 mov 0x14(%ebp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
111fb3: 89 fa mov %edi,%edx
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
111fb5: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
next = starting_address;
while ( count-- ) {
111fbc: 85 c9 test %ecx,%ecx
111fbe: 74 17 je 111fd7 <_Chain_Initialize+0x33><== NEVER TAKEN
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
111fc0: 8b 45 0c mov 0xc(%ebp),%eax
111fc3: eb 05 jmp 111fca <_Chain_Initialize+0x26>
111fc5: 8d 76 00 lea 0x0(%esi),%esi
while ( count-- ) {
111fc8: 89 d8 mov %ebx,%eax
current->next = next;
111fca: 89 02 mov %eax,(%edx)
next->previous = current;
111fcc: 89 50 04 mov %edx,0x4(%eax)
111fcf: 8d 1c 30 lea (%eax,%esi,1),%ebx
current = next;
next = (Chain_Node *)
111fd2: 89 c2 mov %eax,%edx
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
111fd4: 49 dec %ecx
111fd5: 75 f1 jne 111fc8 <_Chain_Initialize+0x24>
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
111fd7: 8d 47 04 lea 0x4(%edi),%eax
111fda: 89 02 mov %eax,(%edx)
the_chain->last = current;
111fdc: 89 57 08 mov %edx,0x8(%edi)
}
111fdf: 5b pop %ebx
111fe0: 5e pop %esi
111fe1: 5f pop %edi
111fe2: c9 leave
111fe3: c3 ret
00100208 <_Dual_ported_memory_Manager_initialization>:
#include <rtems/rtems/status.h>
#include <rtems/rtems/types.h>
#include <rtems/rtems/dpmem.h>
void _Dual_ported_memory_Manager_initialization(void)
{
100208: 55 push %ebp
100209: 89 e5 mov %esp,%ebp
}
10020b: c9 leave
10020c: c3 ret
00100210 <_Event_Manager_initialization>:
#include <rtems/score/states.h>
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Event_Manager_initialization(void)
{
100210: 55 push %ebp
100211: 89 e5 mov %esp,%ebp
}
100213: c9 leave
100214: c3 ret
0010b6bc <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
10b6bc: 55 push %ebp
10b6bd: 89 e5 mov %esp,%ebp
10b6bf: 57 push %edi
10b6c0: 56 push %esi
10b6c1: 53 push %ebx
10b6c2: 83 ec 2c sub $0x2c,%esp
10b6c5: 8b 45 08 mov 0x8(%ebp),%eax
10b6c8: 8b 4d 0c mov 0xc(%ebp),%ecx
10b6cb: 8b 55 10 mov 0x10(%ebp),%edx
10b6ce: 89 55 dc mov %edx,-0x24(%ebp)
10b6d1: 8b 7d 14 mov 0x14(%ebp),%edi
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
10b6d4: 8b 1d b8 94 12 00 mov 0x1294b8,%ebx
executing->Wait.return_code = RTEMS_SUCCESSFUL;
10b6da: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10b6e1: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi
_ISR_Disable( level );
10b6e7: 9c pushf
10b6e8: fa cli
10b6e9: 8f 45 e0 popl -0x20(%ebp)
pending_events = api->pending_events;
10b6ec: 8b 16 mov (%esi),%edx
10b6ee: 89 55 d4 mov %edx,-0x2c(%ebp)
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
10b6f1: 21 c2 and %eax,%edx
10b6f3: 89 55 e4 mov %edx,-0x1c(%ebp)
10b6f6: 74 0d je 10b705 <_Event_Seize+0x49>
10b6f8: 39 d0 cmp %edx,%eax
10b6fa: 0f 84 84 00 00 00 je 10b784 <_Event_Seize+0xc8>
10b700: f6 c1 02 test $0x2,%cl
10b703: 75 7f jne 10b784 <_Event_Seize+0xc8> <== ALWAYS TAKEN
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
10b705: f6 c1 01 test $0x1,%cl
10b708: 75 62 jne 10b76c <_Event_Seize+0xb0>
* set properly when we are marked as in the event critical section.
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
10b70a: 89 4b 30 mov %ecx,0x30(%ebx)
executing->Wait.count = (uint32_t) event_in;
10b70d: 89 43 24 mov %eax,0x24(%ebx)
executing->Wait.return_argument = event_out;
10b710: 89 7b 28 mov %edi,0x28(%ebx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10b713: c7 05 00 9e 12 00 01 movl $0x1,0x129e00
10b71a: 00 00 00
_ISR_Enable( level );
10b71d: ff 75 e0 pushl -0x20(%ebp)
10b720: 9d popf
if ( ticks ) {
10b721: 8b 45 dc mov -0x24(%ebp),%eax
10b724: 85 c0 test %eax,%eax
10b726: 0f 85 80 00 00 00 jne 10b7ac <_Event_Seize+0xf0>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
10b72c: 83 ec 08 sub $0x8,%esp
10b72f: 68 00 01 00 00 push $0x100
10b734: 53 push %ebx
10b735: e8 1e 2e 00 00 call 10e558 <_Thread_Set_state>
_ISR_Disable( level );
10b73a: 9c pushf
10b73b: fa cli
10b73c: 5a pop %edx
sync_state = _Event_Sync_state;
10b73d: a1 00 9e 12 00 mov 0x129e00,%eax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10b742: c7 05 00 9e 12 00 00 movl $0x0,0x129e00
10b749: 00 00 00
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
10b74c: 83 c4 10 add $0x10,%esp
10b74f: 83 f8 01 cmp $0x1,%eax
10b752: 74 4c je 10b7a0 <_Event_Seize+0xe4>
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
10b754: 89 55 10 mov %edx,0x10(%ebp)
10b757: 89 5d 0c mov %ebx,0xc(%ebp)
10b75a: 89 45 08 mov %eax,0x8(%ebp)
}
10b75d: 8d 65 f4 lea -0xc(%ebp),%esp
10b760: 5b pop %ebx
10b761: 5e pop %esi
10b762: 5f pop %edi
10b763: 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 );
10b764: e9 cf 1f 00 00 jmp 10d738 <_Thread_blocking_operation_Cancel>
10b769: 8d 76 00 lea 0x0(%esi),%esi
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
10b76c: ff 75 e0 pushl -0x20(%ebp)
10b76f: 9d popf
executing->Wait.return_code = RTEMS_UNSATISFIED;
10b770: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx)
*event_out = seized_events;
10b777: 8b 55 e4 mov -0x1c(%ebp),%edx
10b77a: 89 17 mov %edx,(%edi)
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
10b77c: 8d 65 f4 lea -0xc(%ebp),%esp
10b77f: 5b pop %ebx
10b780: 5e pop %esi
10b781: 5f pop %edi
10b782: c9 leave
10b783: c3 ret
pending_events = api->pending_events;
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
10b784: 8b 45 e4 mov -0x1c(%ebp),%eax
10b787: f7 d0 not %eax
10b789: 23 45 d4 and -0x2c(%ebp),%eax
10b78c: 89 06 mov %eax,(%esi)
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
10b78e: ff 75 e0 pushl -0x20(%ebp)
10b791: 9d popf
*event_out = seized_events;
10b792: 8b 45 e4 mov -0x1c(%ebp),%eax
10b795: 89 07 mov %eax,(%edi)
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
10b797: 8d 65 f4 lea -0xc(%ebp),%esp
10b79a: 5b pop %ebx
10b79b: 5e pop %esi
10b79c: 5f pop %edi
10b79d: c9 leave
10b79e: c3 ret
10b79f: 90 nop
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
_ISR_Enable( level );
10b7a0: 52 push %edx
10b7a1: 9d popf
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
10b7a2: 8d 65 f4 lea -0xc(%ebp),%esp
10b7a5: 5b pop %ebx
10b7a6: 5e pop %esi
10b7a7: 5f pop %edi
10b7a8: c9 leave
10b7a9: c3 ret
10b7aa: 66 90 xchg %ax,%ax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
10b7ac: 8b 43 08 mov 0x8(%ebx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b7af: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10b7b6: c7 43 64 4c b9 10 00 movl $0x10b94c,0x64(%ebx)
the_watchdog->id = id;
10b7bd: 89 43 68 mov %eax,0x68(%ebx)
the_watchdog->user_data = user_data;
10b7c0: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b7c7: 8b 45 dc mov -0x24(%ebp),%eax
10b7ca: 89 43 54 mov %eax,0x54(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b7cd: 83 ec 08 sub $0x8,%esp
10b7d0: 8d 43 48 lea 0x48(%ebx),%eax
10b7d3: 50 push %eax
10b7d4: 68 d8 94 12 00 push $0x1294d8
10b7d9: e8 02 34 00 00 call 10ebe0 <_Watchdog_Insert>
10b7de: 83 c4 10 add $0x10,%esp
10b7e1: e9 46 ff ff ff jmp 10b72c <_Event_Seize+0x70>
0010b83c <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
10b83c: 55 push %ebp
10b83d: 89 e5 mov %esp,%ebp
10b83f: 57 push %edi
10b840: 56 push %esi
10b841: 53 push %ebx
10b842: 83 ec 1c sub $0x1c,%esp
10b845: 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 ];
10b848: 8b 8b f4 00 00 00 mov 0xf4(%ebx),%ecx
option_set = (rtems_option) the_thread->Wait.option;
10b84e: 8b 73 30 mov 0x30(%ebx),%esi
_ISR_Disable( level );
10b851: 9c pushf
10b852: fa cli
10b853: 8f 45 e4 popl -0x1c(%ebp)
pending_events = api->pending_events;
10b856: 8b 11 mov (%ecx),%edx
event_condition = (rtems_event_set) the_thread->Wait.count;
10b858: 8b 43 24 mov 0x24(%ebx),%eax
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
10b85b: 89 c7 mov %eax,%edi
10b85d: 21 d7 and %edx,%edi
10b85f: 89 7d e0 mov %edi,-0x20(%ebp)
10b862: 0f 84 ac 00 00 00 je 10b914 <_Event_Surrender+0xd8>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
10b868: 8b 3d 94 94 12 00 mov 0x129494,%edi
10b86e: 85 ff test %edi,%edi
10b870: 74 08 je 10b87a <_Event_Surrender+0x3e>
10b872: 3b 1d b8 94 12 00 cmp 0x1294b8,%ebx
10b878: 74 5a je 10b8d4 <_Event_Surrender+0x98>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
10b87a: f6 43 11 01 testb $0x1,0x11(%ebx)
10b87e: 0f 84 90 00 00 00 je 10b914 <_Event_Surrender+0xd8>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
10b884: 3b 45 e0 cmp -0x20(%ebp),%eax
10b887: 74 09 je 10b892 <_Event_Surrender+0x56>
10b889: 83 e6 02 and $0x2,%esi
10b88c: 0f 84 82 00 00 00 je 10b914 <_Event_Surrender+0xd8> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
10b892: 8b 45 e0 mov -0x20(%ebp),%eax
10b895: f7 d0 not %eax
10b897: 21 d0 and %edx,%eax
10b899: 89 01 mov %eax,(%ecx)
the_thread->Wait.count = 0;
10b89b: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b8a2: 8b 43 28 mov 0x28(%ebx),%eax
10b8a5: 8b 7d e0 mov -0x20(%ebp),%edi
10b8a8: 89 38 mov %edi,(%eax)
_ISR_Flash( level );
10b8aa: ff 75 e4 pushl -0x1c(%ebp)
10b8ad: 9d popf
10b8ae: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10b8af: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10b8b3: 74 6b je 10b920 <_Event_Surrender+0xe4>
_ISR_Enable( level );
10b8b5: ff 75 e4 pushl -0x1c(%ebp)
10b8b8: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10b8b9: 83 ec 08 sub $0x8,%esp
10b8bc: 68 f8 ff 03 10 push $0x1003fff8
10b8c1: 53 push %ebx
10b8c2: e8 fd 1f 00 00 call 10d8c4 <_Thread_Clear_state>
10b8c7: 83 c4 10 add $0x10,%esp
}
return;
}
}
_ISR_Enable( level );
}
10b8ca: 8d 65 f4 lea -0xc(%ebp),%esp
10b8cd: 5b pop %ebx
10b8ce: 5e pop %esi
10b8cf: 5f pop %edi
10b8d0: c9 leave
10b8d1: c3 ret
10b8d2: 66 90 xchg %ax,%ax
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
10b8d4: 8b 3d 00 9e 12 00 mov 0x129e00,%edi
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
10b8da: 83 ff 02 cmp $0x2,%edi
10b8dd: 74 09 je 10b8e8 <_Event_Surrender+0xac> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
10b8df: 8b 3d 00 9e 12 00 mov 0x129e00,%edi
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
10b8e5: 4f dec %edi
10b8e6: 75 92 jne 10b87a <_Event_Surrender+0x3e>
_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) ) {
10b8e8: 3b 45 e0 cmp -0x20(%ebp),%eax
10b8eb: 74 05 je 10b8f2 <_Event_Surrender+0xb6> <== ALWAYS TAKEN
10b8ed: 83 e6 02 and $0x2,%esi <== NOT EXECUTED
10b8f0: 74 22 je 10b914 <_Event_Surrender+0xd8> <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
10b8f2: 8b 45 e0 mov -0x20(%ebp),%eax
10b8f5: f7 d0 not %eax
10b8f7: 21 d0 and %edx,%eax
10b8f9: 89 01 mov %eax,(%ecx)
the_thread->Wait.count = 0;
10b8fb: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b902: 8b 43 28 mov 0x28(%ebx),%eax
10b905: 8b 55 e0 mov -0x20(%ebp),%edx
10b908: 89 10 mov %edx,(%eax)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
10b90a: c7 05 00 9e 12 00 03 movl $0x3,0x129e00
10b911: 00 00 00
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
10b914: ff 75 e4 pushl -0x1c(%ebp)
10b917: 9d popf
}
10b918: 8d 65 f4 lea -0xc(%ebp),%esp
10b91b: 5b pop %ebx
10b91c: 5e pop %esi
10b91d: 5f pop %edi
10b91e: c9 leave
10b91f: c3 ret
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10b920: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10b927: ff 75 e4 pushl -0x1c(%ebp)
10b92a: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10b92b: 83 ec 0c sub $0xc,%esp
10b92e: 8d 43 48 lea 0x48(%ebx),%eax
10b931: 50 push %eax
10b932: e8 d1 33 00 00 call 10ed08 <_Watchdog_Remove>
10b937: 58 pop %eax
10b938: 5a pop %edx
10b939: 68 f8 ff 03 10 push $0x1003fff8
10b93e: 53 push %ebx
10b93f: e8 80 1f 00 00 call 10d8c4 <_Thread_Clear_state>
10b944: 83 c4 10 add $0x10,%esp
10b947: eb cf jmp 10b918 <_Event_Surrender+0xdc>
0010b94c <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
10b94c: 55 push %ebp
10b94d: 89 e5 mov %esp,%ebp
10b94f: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
10b952: 8d 45 f4 lea -0xc(%ebp),%eax
10b955: 50 push %eax
10b956: ff 75 08 pushl 0x8(%ebp)
10b959: e8 32 23 00 00 call 10dc90 <_Thread_Get>
switch ( location ) {
10b95e: 83 c4 10 add $0x10,%esp
10b961: 8b 55 f4 mov -0xc(%ebp),%edx
10b964: 85 d2 test %edx,%edx
10b966: 75 37 jne 10b99f <_Event_Timeout+0x53> <== NEVER TAKEN
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
10b968: 9c pushf
10b969: fa cli
10b96a: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
10b96b: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
10b972: 3b 05 b8 94 12 00 cmp 0x1294b8,%eax
10b978: 74 2a je 10b9a4 <_Event_Timeout+0x58>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
10b97a: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
10b981: 52 push %edx
10b982: 9d popf
10b983: 83 ec 08 sub $0x8,%esp
10b986: 68 f8 ff 03 10 push $0x1003fff8
10b98b: 50 push %eax
10b98c: e8 33 1f 00 00 call 10d8c4 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10b991: a1 f8 93 12 00 mov 0x1293f8,%eax
10b996: 48 dec %eax
10b997: a3 f8 93 12 00 mov %eax,0x1293f8
10b99c: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b99f: c9 leave
10b9a0: c3 ret
10b9a1: 8d 76 00 lea 0x0(%esi),%esi
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
10b9a4: 8b 0d 00 9e 12 00 mov 0x129e00,%ecx
10b9aa: 49 dec %ecx
10b9ab: 75 cd jne 10b97a <_Event_Timeout+0x2e>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
10b9ad: c7 05 00 9e 12 00 02 movl $0x2,0x129e00
10b9b4: 00 00 00
10b9b7: eb c1 jmp 10b97a <_Event_Timeout+0x2e>
00100248 <_Extension_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/extension.h>
#include <rtems/score/interr.h>
void _Extension_Manager_initialization(void)
{
100248: 55 push %ebp
100249: 89 e5 mov %esp,%ebp
}
10024b: c9 leave
10024c: c3 ret
001122c4 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
1122c4: 55 push %ebp
1122c5: 89 e5 mov %esp,%ebp
1122c7: 57 push %edi
1122c8: 56 push %esi
1122c9: 53 push %ebx
1122ca: 83 ec 2c sub $0x2c,%esp
1122cd: 8b 7d 0c mov 0xc(%ebp),%edi
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
1122d0: 8b 45 08 mov 0x8(%ebp),%eax
1122d3: 8b 48 08 mov 0x8(%eax),%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;
1122d6: 8b 50 10 mov 0x10(%eax),%edx
1122d9: 89 55 d4 mov %edx,-0x2c(%ebp)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
1122dc: 89 f8 mov %edi,%eax
1122de: 83 c0 04 add $0x4,%eax
1122e1: 89 45 e0 mov %eax,-0x20(%ebp)
1122e4: 0f 82 5a 01 00 00 jb 112444 <_Heap_Allocate_aligned_with_boundary+0x180>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
1122ea: 8b 75 14 mov 0x14(%ebp),%esi
1122ed: 85 f6 test %esi,%esi
1122ef: 0f 85 48 01 00 00 jne 11243d <_Heap_Allocate_aligned_with_boundary+0x179>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
1122f5: 39 4d 08 cmp %ecx,0x8(%ebp)
1122f8: 0f 84 50 01 00 00 je 11244e <_Heap_Allocate_aligned_with_boundary+0x18a>
1122fe: 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;
112305: 8b 55 d4 mov -0x2c(%ebp),%edx
112308: 83 c2 07 add $0x7,%edx
11230b: 89 55 c8 mov %edx,-0x38(%ebp)
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
11230e: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp)
112315: 29 7d d8 sub %edi,-0x28(%ebp)
112318: eb 19 jmp 112333 <_Heap_Allocate_aligned_with_boundary+0x6f>
11231a: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
11231c: 8d 59 08 lea 0x8(%ecx),%ebx
boundary
);
}
}
if ( alloc_begin != 0 ) {
11231f: 85 db test %ebx,%ebx
112321: 0f 85 e9 00 00 00 jne 112410 <_Heap_Allocate_aligned_with_boundary+0x14c><== ALWAYS TAKEN
break;
}
block = block->next;
112327: 8b 49 08 mov 0x8(%ecx),%ecx
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
11232a: 39 4d 08 cmp %ecx,0x8(%ebp)
11232d: 0f 84 25 01 00 00 je 112458 <_Heap_Allocate_aligned_with_boundary+0x194>
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
112333: 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 ) {
112336: 8b 59 04 mov 0x4(%ecx),%ebx
112339: 39 5d e0 cmp %ebx,-0x20(%ebp)
11233c: 73 e9 jae 112327 <_Heap_Allocate_aligned_with_boundary+0x63>
if ( alignment == 0 ) {
11233e: 8b 55 10 mov 0x10(%ebp),%edx
112341: 85 d2 test %edx,%edx
112343: 74 d7 je 11231c <_Heap_Allocate_aligned_with_boundary+0x58>
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
112345: 8b 45 08 mov 0x8(%ebp),%eax
112348: 8b 40 14 mov 0x14(%eax),%eax
11234b: 89 45 d0 mov %eax,-0x30(%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;
11234e: 83 e3 fe and $0xfffffffe,%ebx
112351: 8d 1c 19 lea (%ecx,%ebx,1),%ebx
112354: 8d 51 08 lea 0x8(%ecx),%edx
112357: 89 55 cc mov %edx,-0x34(%ebp)
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
11235a: 8b 75 c8 mov -0x38(%ebp),%esi
11235d: 29 c6 sub %eax,%esi
11235f: 01 de add %ebx,%esi
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
112361: 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);
112364: 89 d8 mov %ebx,%eax
112366: 31 d2 xor %edx,%edx
112368: f7 75 10 divl 0x10(%ebp)
11236b: 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 ) {
11236d: 39 de cmp %ebx,%esi
11236f: 73 0b jae 11237c <_Heap_Allocate_aligned_with_boundary+0xb8>
112371: 89 f0 mov %esi,%eax
112373: 31 d2 xor %edx,%edx
112375: f7 75 10 divl 0x10(%ebp)
112378: 89 f3 mov %esi,%ebx
11237a: 29 d3 sub %edx,%ebx
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
11237c: 8b 45 14 mov 0x14(%ebp),%eax
11237f: 85 c0 test %eax,%eax
112381: 74 59 je 1123dc <_Heap_Allocate_aligned_with_boundary+0x118>
/* 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;
112383: 8d 34 3b lea (%ebx,%edi,1),%esi
112386: 89 f0 mov %esi,%eax
112388: 31 d2 xor %edx,%edx
11238a: f7 75 14 divl 0x14(%ebp)
11238d: 89 f0 mov %esi,%eax
11238f: 29 d0 sub %edx,%eax
112391: 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 ) {
112393: 39 c3 cmp %eax,%ebx
112395: 73 45 jae 1123dc <_Heap_Allocate_aligned_with_boundary+0x118>
112397: 39 c6 cmp %eax,%esi
112399: 76 41 jbe 1123dc <_Heap_Allocate_aligned_with_boundary+0x118>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
11239b: 8b 45 cc mov -0x34(%ebp),%eax
11239e: 01 f8 add %edi,%eax
1123a0: 89 45 dc mov %eax,-0x24(%ebp)
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
1123a3: 39 d0 cmp %edx,%eax
1123a5: 77 80 ja 112327 <_Heap_Allocate_aligned_with_boundary+0x63>
1123a7: 89 ce mov %ecx,%esi
1123a9: eb 0e jmp 1123b9 <_Heap_Allocate_aligned_with_boundary+0xf5>
1123ab: 90 nop
/* 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 ) {
1123ac: 39 c1 cmp %eax,%ecx
1123ae: 76 2a jbe 1123da <_Heap_Allocate_aligned_with_boundary+0x116>
if ( boundary_line < boundary_floor ) {
1123b0: 39 55 dc cmp %edx,-0x24(%ebp)
1123b3: 0f 87 a3 00 00 00 ja 11245c <_Heap_Allocate_aligned_with_boundary+0x198><== NEVER TAKEN
return 0;
}
alloc_begin = boundary_line - alloc_size;
1123b9: 89 d3 mov %edx,%ebx
1123bb: 29 fb sub %edi,%ebx
1123bd: 89 d8 mov %ebx,%eax
1123bf: 31 d2 xor %edx,%edx
1123c1: f7 75 10 divl 0x10(%ebp)
1123c4: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
1123c6: 8d 0c 3b lea (%ebx,%edi,1),%ecx
1123c9: 89 c8 mov %ecx,%eax
1123cb: 31 d2 xor %edx,%edx
1123cd: f7 75 14 divl 0x14(%ebp)
1123d0: 89 c8 mov %ecx,%eax
1123d2: 29 d0 sub %edx,%eax
1123d4: 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 ) {
1123d6: 39 c3 cmp %eax,%ebx
1123d8: 72 d2 jb 1123ac <_Heap_Allocate_aligned_with_boundary+0xe8>
1123da: 89 f1 mov %esi,%ecx
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
1123dc: 39 5d cc cmp %ebx,-0x34(%ebp)
1123df: 0f 87 42 ff ff ff ja 112327 <_Heap_Allocate_aligned_with_boundary+0x63>
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;
1123e5: be f8 ff ff ff mov $0xfffffff8,%esi
1123ea: 29 ce sub %ecx,%esi
1123ec: 01 de add %ebx,%esi
1123ee: 89 d8 mov %ebx,%eax
1123f0: 31 d2 xor %edx,%edx
1123f2: f7 75 d4 divl -0x2c(%ebp)
1123f5: 29 d6 sub %edx,%esi
if ( free_size >= min_block_size || free_size == 0 ) {
1123f7: 39 75 d0 cmp %esi,-0x30(%ebp)
1123fa: 0f 86 1f ff ff ff jbe 11231f <_Heap_Allocate_aligned_with_boundary+0x5b>
112400: 85 f6 test %esi,%esi
112402: 0f 85 1f ff ff ff jne 112327 <_Heap_Allocate_aligned_with_boundary+0x63>
boundary
);
}
}
if ( alloc_begin != 0 ) {
112408: 85 db test %ebx,%ebx
11240a: 0f 84 17 ff ff ff je 112327 <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
112410: 8b 55 e4 mov -0x1c(%ebp),%edx
112413: 8b 45 08 mov 0x8(%ebp),%eax
112416: 01 50 4c add %edx,0x4c(%eax)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
112419: 57 push %edi
11241a: 53 push %ebx
11241b: 51 push %ecx
11241c: 50 push %eax
11241d: e8 9e a9 ff ff call 10cdc0 <_Heap_Block_allocate>
112422: 89 d8 mov %ebx,%eax
112424: 83 c4 10 add $0x10,%esp
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
112427: 8b 4d e4 mov -0x1c(%ebp),%ecx
11242a: 8b 55 08 mov 0x8(%ebp),%edx
11242d: 39 4a 44 cmp %ecx,0x44(%edx)
112430: 73 14 jae 112446 <_Heap_Allocate_aligned_with_boundary+0x182>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
112432: 89 4a 44 mov %ecx,0x44(%edx)
}
return (void *) alloc_begin;
}
112435: 8d 65 f4 lea -0xc(%ebp),%esp
112438: 5b pop %ebx
112439: 5e pop %esi
11243a: 5f pop %edi
11243b: c9 leave
11243c: c3 ret
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
11243d: 3b 7d 14 cmp 0x14(%ebp),%edi
112440: 76 21 jbe 112463 <_Heap_Allocate_aligned_with_boundary+0x19f>
112442: 66 90 xchg %ax,%ax
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
112444: 31 c0 xor %eax,%eax
}
return (void *) alloc_begin;
}
112446: 8d 65 f4 lea -0xc(%ebp),%esp
112449: 5b pop %ebx
11244a: 5e pop %esi
11244b: 5f pop %edi
11244c: c9 leave
11244d: c3 ret
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
11244e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
112455: 8d 76 00 lea 0x0(%esi),%esi
112458: 31 c0 xor %eax,%eax
11245a: eb cb jmp 112427 <_Heap_Allocate_aligned_with_boundary+0x163>
11245c: 89 f1 mov %esi,%ecx <== NOT EXECUTED
11245e: e9 c4 fe ff ff jmp 112327 <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
112463: 8b 5d 10 mov 0x10(%ebp),%ebx
112466: 85 db test %ebx,%ebx
112468: 0f 85 87 fe ff ff jne 1122f5 <_Heap_Allocate_aligned_with_boundary+0x31>
11246e: 89 55 10 mov %edx,0x10(%ebp)
112471: e9 7f fe ff ff jmp 1122f5 <_Heap_Allocate_aligned_with_boundary+0x31>
0010cdc0 <_Heap_Block_allocate>:
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
10cdc0: 55 push %ebp
10cdc1: 89 e5 mov %esp,%ebp
10cdc3: 57 push %edi
10cdc4: 56 push %esi
10cdc5: 53 push %ebx
10cdc6: 83 ec 10 sub $0x10,%esp
10cdc9: 8b 75 08 mov 0x8(%ebp),%esi
10cdcc: 8b 5d 0c mov 0xc(%ebp),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10cdcf: 89 5d ec mov %ebx,-0x14(%ebp)
10cdd2: 8b 7d 10 mov 0x10(%ebp),%edi
10cdd5: 83 ef 08 sub $0x8,%edi
Heap_Statistics *const stats = &heap->stats;
uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin;
10cdd8: 89 f8 mov %edi,%eax
10cdda: 29 d8 sub %ebx,%eax
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
10cddc: 8b 53 04 mov 0x4(%ebx),%edx
10cddf: 83 e2 fe and $0xfffffffe,%edx
10cde2: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1)
10cde7: 0f 85 8b 00 00 00 jne 10ce78 <_Heap_Block_allocate+0xb8>
free_list_anchor = block->prev;
10cded: 8b 4b 0c mov 0xc(%ebx),%ecx
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
10cdf0: 8b 53 08 mov 0x8(%ebx),%edx
Heap_Block *prev = block->prev;
prev->next = next;
10cdf3: 89 51 08 mov %edx,0x8(%ecx)
next->prev = prev;
10cdf6: 89 4a 0c mov %ecx,0xc(%edx)
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
10cdf9: ff 4e 38 decl 0x38(%esi)
++stats->used_blocks;
10cdfc: ff 46 40 incl 0x40(%esi)
stats->free_size -= _Heap_Block_size( block );
10cdff: 8b 53 04 mov 0x4(%ebx),%edx
10ce02: 83 e2 fe and $0xfffffffe,%edx
10ce05: 29 56 30 sub %edx,0x30(%esi)
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
10ce08: 8b 56 10 mov 0x10(%esi),%edx
10ce0b: 89 55 e4 mov %edx,-0x1c(%ebp)
10ce0e: 39 d0 cmp %edx,%eax
10ce10: 72 72 jb 10ce84 <_Heap_Block_allocate+0xc4>
- 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;
10ce12: 8b 43 04 mov 0x4(%ebx),%eax
10ce15: 89 45 f0 mov %eax,-0x10(%ebp)
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 )
10ce18: 8b 45 10 mov 0x10(%ebp),%eax
10ce1b: 31 d2 xor %edx,%edx
10ce1d: f7 75 e4 divl -0x1c(%ebp)
10ce20: 29 d7 sub %edx,%edi
_Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
uintptr_t const new_block_begin = (uintptr_t) new_block;
uintptr_t const new_block_size = block_end - new_block_begin;
block_end = new_block_begin;
block_size = block_end - block_begin;
10ce22: 89 f8 mov %edi,%eax
10ce24: 29 d8 sub %ebx,%eax
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
10ce26: 01 46 30 add %eax,0x30(%esi)
if ( _Heap_Is_prev_used( block ) ) {
10ce29: f6 43 04 01 testb $0x1,0x4(%ebx)
10ce2d: 75 69 jne 10ce98 <_Heap_Block_allocate+0xd8>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block(
const Heap_Block *block
)
{
return (Heap_Block *) ((uintptr_t) block - block->prev_size);
10ce2f: 2b 1b sub (%ebx),%ebx
Heap_Block *const prev_block = _Heap_Prev_block( block );
uintptr_t const prev_block_size = _Heap_Block_size( prev_block );
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
10ce31: 8b 53 04 mov 0x4(%ebx),%edx
10ce34: 83 e2 fe and $0xfffffffe,%edx
10ce37: 01 d0 add %edx,%eax
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
10ce39: 89 c2 mov %eax,%edx
10ce3b: 83 ca 01 or $0x1,%edx
10ce3e: 89 53 04 mov %edx,0x4(%ebx)
new_block->prev_size = block_size;
10ce41: 89 07 mov %eax,(%edi)
new_block->size_and_flag = new_block_size;
10ce43: 8b 45 f0 mov -0x10(%ebp),%eax
10ce46: 83 e0 fe and $0xfffffffe,%eax
10ce49: 03 45 ec add -0x14(%ebp),%eax
10ce4c: 29 f8 sub %edi,%eax
10ce4e: 89 47 04 mov %eax,0x4(%edi)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
10ce51: ff 75 14 pushl 0x14(%ebp)
10ce54: 51 push %ecx
10ce55: 57 push %edi
10ce56: 56 push %esi
10ce57: e8 80 fe ff ff call 10ccdc <_Heap_Block_split>
10ce5c: 89 fb mov %edi,%ebx
10ce5e: 83 c4 10 add $0x10,%esp
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
10ce61: 8b 46 30 mov 0x30(%esi),%eax
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
Heap_Statistics *const stats = &heap->stats;
10ce64: 39 46 34 cmp %eax,0x34(%esi)
10ce67: 76 03 jbe 10ce6c <_Heap_Block_allocate+0xac>
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
stats->min_free_size = stats->free_size;
10ce69: 89 46 34 mov %eax,0x34(%esi)
}
return block;
}
10ce6c: 89 d8 mov %ebx,%eax
10ce6e: 8d 65 f4 lea -0xc(%ebp),%esp
10ce71: 5b pop %ebx
10ce72: 5e pop %esi
10ce73: 5f pop %edi
10ce74: c9 leave
10ce75: c3 ret
10ce76: 66 90 xchg %ax,%ax
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
10ce78: 89 f1 mov %esi,%ecx
}
if ( alloc_area_offset < heap->page_size ) {
10ce7a: 8b 56 10 mov 0x10(%esi),%edx
10ce7d: 89 55 e4 mov %edx,-0x1c(%ebp)
10ce80: 39 d0 cmp %edx,%eax
10ce82: 73 8e jae 10ce12 <_Heap_Block_allocate+0x52><== NEVER TAKEN
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
10ce84: 03 45 14 add 0x14(%ebp),%eax
10ce87: 50 push %eax
10ce88: 51 push %ecx
10ce89: 53 push %ebx
10ce8a: 56 push %esi
10ce8b: e8 4c fe ff ff call 10ccdc <_Heap_Block_split>
10ce90: 83 c4 10 add $0x10,%esp
10ce93: eb cc jmp 10ce61 <_Heap_Block_allocate+0xa1>
10ce95: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
10ce98: 8b 51 08 mov 0x8(%ecx),%edx
new_block->next = next;
10ce9b: 89 53 08 mov %edx,0x8(%ebx)
new_block->prev = block_before;
10ce9e: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
10cea1: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
10cea4: 89 5a 0c mov %ebx,0xc(%edx)
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
10cea7: ff 46 38 incl 0x38(%esi)
10ceaa: 89 d9 mov %ebx,%ecx
10ceac: eb 8b jmp 10ce39 <_Heap_Block_allocate+0x79>
0010ccdc <_Heap_Block_split>:
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
10ccdc: 55 push %ebp
10ccdd: 89 e5 mov %esp,%ebp
10ccdf: 57 push %edi
10cce0: 56 push %esi
10cce1: 53 push %ebx
10cce2: 83 ec 14 sub $0x14,%esp
10cce5: 8b 4d 08 mov 0x8(%ebp),%ecx
10cce8: 8b 5d 0c mov 0xc(%ebp),%ebx
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
10cceb: 8b 79 10 mov 0x10(%ecx),%edi
uintptr_t const min_block_size = heap->min_block_size;
10ccee: 8b 41 14 mov 0x14(%ecx),%eax
10ccf1: 89 45 e8 mov %eax,-0x18(%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;
10ccf4: 8b 43 04 mov 0x4(%ebx),%eax
10ccf7: 89 45 e4 mov %eax,-0x1c(%ebp)
10ccfa: 89 c6 mov %eax,%esi
10ccfc: 83 e6 fe and $0xfffffffe,%esi
uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const used_size =
_Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE;
10ccff: 8b 55 e8 mov -0x18(%ebp),%edx
10cd02: 83 ea 08 sub $0x8,%edx
10cd05: 8b 45 14 mov 0x14(%ebp),%eax
10cd08: 39 d0 cmp %edx,%eax
10cd0a: 73 02 jae 10cd0e <_Heap_Block_split+0x32>
10cd0c: 89 d0 mov %edx,%eax
10cd0e: 83 c0 08 add $0x8,%eax
10cd11: 89 45 f0 mov %eax,-0x10(%ebp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
10cd14: 31 d2 xor %edx,%edx
10cd16: f7 f7 div %edi
if ( remainder != 0 ) {
10cd18: 85 d2 test %edx,%edx
10cd1a: 75 70 jne 10cd8c <_Heap_Block_split+0xb0>
10cd1c: 8b 7d f0 mov -0x10(%ebp),%edi
10cd1f: 89 7d ec mov %edi,-0x14(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10cd22: 8d 04 33 lea (%ebx,%esi,1),%eax
10cd25: 89 45 e0 mov %eax,-0x20(%ebp)
Heap_Block *next_block = _Heap_Block_at( block, block_size );
_HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET );
_HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET );
if ( free_size >= free_size_limit ) {
10cd28: 8d 56 04 lea 0x4(%esi),%edx
10cd2b: 2b 55 f0 sub -0x10(%ebp),%edx
10cd2e: 8b 7d e8 mov -0x18(%ebp),%edi
10cd31: 83 c7 04 add $0x4,%edi
10cd34: 39 fa cmp %edi,%edx
10cd36: 72 60 jb 10cd98 <_Heap_Block_split+0xbc>
10cd38: 8b 55 ec mov -0x14(%ebp),%edx
10cd3b: 01 da add %ebx,%edx
Heap_Block *const free_block = _Heap_Block_at( block, used_block_size );
uintptr_t free_block_size = block_size - used_block_size;
10cd3d: 2b 75 ec sub -0x14(%ebp),%esi
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
10cd40: 8b 7d e4 mov -0x1c(%ebp),%edi
10cd43: 83 e7 01 and $0x1,%edi
10cd46: 0b 7d ec or -0x14(%ebp),%edi
10cd49: 89 7b 04 mov %edi,0x4(%ebx)
_HAssert( used_block_size + free_block_size == block_size );
_Heap_Block_set_size( block, used_block_size );
/* Statistics */
stats->free_size += free_block_size;
10cd4c: 01 71 30 add %esi,0x30(%ecx)
- 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;
10cd4f: 8b 58 04 mov 0x4(%eax),%ebx
10cd52: 83 e3 fe and $0xfffffffe,%ebx
if ( _Heap_Is_used( next_block ) ) {
10cd55: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1)
10cd5a: 75 4c jne 10cda8 <_Heap_Block_split+0xcc>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
10cd5c: 8b 48 08 mov 0x8(%eax),%ecx
Heap_Block *prev = old_block->prev;
10cd5f: 8b 40 0c mov 0xc(%eax),%eax
new_block->next = next;
10cd62: 89 4a 08 mov %ecx,0x8(%edx)
new_block->prev = prev;
10cd65: 89 42 0c mov %eax,0xc(%edx)
next->prev = new_block;
10cd68: 89 51 0c mov %edx,0xc(%ecx)
prev->next = new_block;
10cd6b: 89 50 08 mov %edx,0x8(%eax)
} else {
uintptr_t const next_block_size = _Heap_Block_size( next_block );
_Heap_Free_list_replace( next_block, free_block );
free_block_size += next_block_size;
10cd6e: 01 de add %ebx,%esi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10cd70: 8d 04 16 lea (%esi,%edx,1),%eax
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
10cd73: 89 f1 mov %esi,%ecx
10cd75: 83 c9 01 or $0x1,%ecx
10cd78: 89 4a 04 mov %ecx,0x4(%edx)
next_block->prev_size = free_block_size;
10cd7b: 89 30 mov %esi,(%eax)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10cd7d: 83 60 04 fe andl $0xfffffffe,0x4(%eax)
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
}
}
10cd81: 83 c4 14 add $0x14,%esp
10cd84: 5b pop %ebx
10cd85: 5e pop %esi
10cd86: 5f pop %edi
10cd87: c9 leave
10cd88: c3 ret
10cd89: 8d 76 00 lea 0x0(%esi),%esi
)
{
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
return value - remainder + alignment;
10cd8c: 03 7d f0 add -0x10(%ebp),%edi
10cd8f: 29 d7 sub %edx,%edi
10cd91: 89 7d ec mov %edi,-0x14(%ebp)
10cd94: eb 8c jmp 10cd22 <_Heap_Block_split+0x46>
10cd96: 66 90 xchg %ax,%ax
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
10cd98: 8b 45 e0 mov -0x20(%ebp),%eax
10cd9b: 83 48 04 01 orl $0x1,0x4(%eax)
}
}
10cd9f: 83 c4 14 add $0x14,%esp
10cda2: 5b pop %ebx
10cda3: 5e pop %esi
10cda4: 5f pop %edi
10cda5: c9 leave
10cda6: c3 ret
10cda7: 90 nop
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
10cda8: 8b 7d 10 mov 0x10(%ebp),%edi
10cdab: 8b 5f 08 mov 0x8(%edi),%ebx
new_block->next = next;
10cdae: 89 5a 08 mov %ebx,0x8(%edx)
new_block->prev = block_before;
10cdb1: 89 7a 0c mov %edi,0xc(%edx)
block_before->next = new_block;
10cdb4: 89 57 08 mov %edx,0x8(%edi)
next->prev = new_block;
10cdb7: 89 53 0c mov %edx,0xc(%ebx)
if ( _Heap_Is_used( next_block ) ) {
_Heap_Free_list_insert_after( free_list_anchor, free_block );
/* Statistics */
++stats->free_blocks;
10cdba: ff 41 38 incl 0x38(%ecx)
10cdbd: eb b4 jmp 10cd73 <_Heap_Block_split+0x97>
00115c2c <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
115c2c: 55 push %ebp
115c2d: 89 e5 mov %esp,%ebp
115c2f: 56 push %esi
115c30: 53 push %ebx
115c31: 8b 4d 08 mov 0x8(%ebp),%ecx
115c34: 8b 45 0c mov 0xc(%ebp),%eax
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;
115c37: 8b 51 1c mov 0x1c(%ecx),%edx
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;
115c3a: 8b 59 24 mov 0x24(%ecx),%ebx
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;
115c3d: 3b 41 18 cmp 0x18(%ecx),%eax
115c40: 73 3a jae 115c7c <_Heap_Extend+0x50>
* 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 ) {
115c42: 39 d0 cmp %edx,%eax
115c44: 74 0e je 115c54 <_Heap_Extend+0x28>
115c46: b8 02 00 00 00 mov $0x2,%eax
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
115c4b: 8d 65 f8 lea -0x8(%ebp),%esp
115c4e: 5b pop %ebx
115c4f: 5e pop %esi
115c50: c9 leave
115c51: c3 ret
115c52: 66 90 xchg %ax,%ax
{
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;
115c54: 03 45 10 add 0x10(%ebp),%eax
* 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;
115c57: 89 41 1c mov %eax,0x1c(%ecx)
extend_size = new_heap_area_end
115c5a: 29 d8 sub %ebx,%eax
115c5c: 8d 70 f8 lea -0x8(%eax),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
115c5f: 89 f0 mov %esi,%eax
115c61: 31 d2 xor %edx,%edx
115c63: f7 71 10 divl 0x10(%ecx)
115c66: 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;
115c68: 8b 45 14 mov 0x14(%ebp),%eax
115c6b: 89 30 mov %esi,(%eax)
if( extend_size >= heap->min_block_size ) {
115c6d: 39 71 14 cmp %esi,0x14(%ecx)
115c70: 76 1a jbe 115c8c <_Heap_Extend+0x60> <== ALWAYS TAKEN
115c72: 31 c0 xor %eax,%eax
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
115c74: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
115c77: 5b pop %ebx <== NOT EXECUTED
115c78: 5e pop %esi <== NOT EXECUTED
115c79: c9 leave <== NOT EXECUTED
115c7a: c3 ret <== NOT EXECUTED
115c7b: 90 nop <== NOT EXECUTED
* 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 ) {
115c7c: 39 d0 cmp %edx,%eax
115c7e: 73 c2 jae 115c42 <_Heap_Extend+0x16>
115c80: b8 01 00 00 00 mov $0x1,%eax
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
115c85: 8d 65 f8 lea -0x8(%ebp),%esp
115c88: 5b pop %ebx
115c89: 5e pop %esi
115c8a: c9 leave
115c8b: c3 ret
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
115c8c: 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;
115c8f: 8b 43 04 mov 0x4(%ebx),%eax
115c92: 83 e0 01 and $0x1,%eax
115c95: 09 f0 or %esi,%eax
115c97: 89 43 04 mov %eax,0x4(%ebx)
if( extend_size >= heap->min_block_size ) {
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 =
115c9a: 8b 41 20 mov 0x20(%ecx),%eax
115c9d: 29 d0 sub %edx,%eax
115c9f: 83 c8 01 or $0x1,%eax
115ca2: 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;
115ca5: 89 51 24 mov %edx,0x24(%ecx)
/* Statistics */
stats->size += extend_size;
115ca8: 01 71 2c add %esi,0x2c(%ecx)
++stats->used_blocks;
115cab: ff 41 40 incl 0x40(%ecx)
--stats->frees; /* Do not count subsequent call as actual free() */
115cae: ff 49 50 decl 0x50(%ecx)
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
115cb1: 83 ec 08 sub $0x8,%esp
115cb4: 83 c3 08 add $0x8,%ebx
115cb7: 53 push %ebx
115cb8: 51 push %ecx
115cb9: e8 e6 9e ff ff call 10fba4 <_Heap_Free>
115cbe: 31 c0 xor %eax,%eax
115cc0: 83 c4 10 add $0x10,%esp
}
return HEAP_EXTEND_SUCCESSFUL;
}
115cc3: 8d 65 f8 lea -0x8(%ebp),%esp
115cc6: 5b pop %ebx
115cc7: 5e pop %esi
115cc8: c9 leave
115cc9: c3 ret
00112478 <_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 )
{
112478: 55 push %ebp
112479: 89 e5 mov %esp,%ebp
11247b: 57 push %edi
11247c: 56 push %esi
11247d: 53 push %ebx
11247e: 83 ec 18 sub $0x18,%esp
112481: 8b 5d 08 mov 0x8(%ebp),%ebx
112484: 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 )
112487: 8d 48 f8 lea -0x8(%eax),%ecx
11248a: 31 d2 xor %edx,%edx
11248c: f7 73 10 divl 0x10(%ebx)
11248f: 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;
112491: 8b 43 20 mov 0x20(%ebx),%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
112494: 39 c1 cmp %eax,%ecx
112496: 72 07 jb 11249f <_Heap_Free+0x27>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
112498: 8b 73 24 mov 0x24(%ebx),%esi
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
11249b: 39 f1 cmp %esi,%ecx
11249d: 76 0d jbe 1124ac <_Heap_Free+0x34>
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
11249f: 31 c0 xor %eax,%eax
}
1124a1: 83 c4 18 add $0x18,%esp
1124a4: 5b pop %ebx
1124a5: 5e pop %esi
1124a6: 5f pop %edi
1124a7: c9 leave
1124a8: c3 ret
1124a9: 8d 76 00 lea 0x0(%esi),%esi
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
1124ac: 8b 51 04 mov 0x4(%ecx),%edx
1124af: 89 55 f0 mov %edx,-0x10(%ebp)
1124b2: 83 e2 fe and $0xfffffffe,%edx
1124b5: 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);
1124b8: 01 ca add %ecx,%edx
1124ba: 89 55 dc mov %edx,-0x24(%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
1124bd: 39 d0 cmp %edx,%eax
1124bf: 77 de ja 11249f <_Heap_Free+0x27> <== NEVER TAKEN
1124c1: 39 d6 cmp %edx,%esi
1124c3: 72 da jb 11249f <_Heap_Free+0x27> <== 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;
1124c5: 8b 7a 04 mov 0x4(%edx),%edi
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
1124c8: f7 c7 01 00 00 00 test $0x1,%edi
1124ce: 74 cf je 11249f <_Heap_Free+0x27> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
1124d0: 83 e7 fe and $0xfffffffe,%edi
1124d3: 89 7d e8 mov %edi,-0x18(%ebp)
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
1124d6: 39 d6 cmp %edx,%esi
1124d8: 0f 84 e2 00 00 00 je 1125c0 <_Heap_Free+0x148>
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
1124de: 8b 55 dc mov -0x24(%ebp),%edx
1124e1: 8b 7d e8 mov -0x18(%ebp),%edi
1124e4: 8b 7c 3a 04 mov 0x4(%edx,%edi,1),%edi
1124e8: 89 7d e0 mov %edi,-0x20(%ebp)
1124eb: 8a 55 e0 mov -0x20(%ebp),%dl
1124ee: 83 e2 01 and $0x1,%edx
1124f1: 88 55 e7 mov %dl,-0x19(%ebp)
1124f4: 80 75 e7 01 xorb $0x1,-0x19(%ebp)
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
1124f8: f6 45 f0 01 testb $0x1,-0x10(%ebp)
1124fc: 75 46 jne 112544 <_Heap_Free+0xcc>
uintptr_t const prev_size = block->prev_size;
1124fe: 8b 39 mov (%ecx),%edi
112500: 89 7d f0 mov %edi,-0x10(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
112503: 29 f9 sub %edi,%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
112505: 39 c8 cmp %ecx,%eax
112507: 77 96 ja 11249f <_Heap_Free+0x27> <== NEVER TAKEN
112509: 39 ce cmp %ecx,%esi
11250b: 72 92 jb 11249f <_Heap_Free+0x27> <== NEVER TAKEN
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
11250d: f6 41 04 01 testb $0x1,0x4(%ecx)
112511: 74 8c je 11249f <_Heap_Free+0x27> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
112513: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
112517: 0f 84 af 00 00 00 je 1125cc <_Heap_Free+0x154>
uintptr_t const size = block_size + prev_size + next_block_size;
11251d: 8b 45 ec mov -0x14(%ebp),%eax
112520: 03 45 e8 add -0x18(%ebp),%eax
112523: 01 f8 add %edi,%eax
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
112525: 8b 55 dc mov -0x24(%ebp),%edx
112528: 8b 72 08 mov 0x8(%edx),%esi
Heap_Block *prev = block->prev;
11252b: 8b 52 0c mov 0xc(%edx),%edx
prev->next = next;
11252e: 89 72 08 mov %esi,0x8(%edx)
next->prev = prev;
112531: 89 56 0c mov %edx,0xc(%esi)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
112534: ff 4b 38 decl 0x38(%ebx)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
112537: 89 c2 mov %eax,%edx
112539: 83 ca 01 or $0x1,%edx
11253c: 89 51 04 mov %edx,0x4(%ecx)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
11253f: 89 04 01 mov %eax,(%ecx,%eax,1)
112542: eb 2c jmp 112570 <_Heap_Free+0xf8>
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
112544: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
112548: 74 3e je 112588 <_Heap_Free+0x110>
uintptr_t const size = block_size + next_block_size;
11254a: 8b 7d e8 mov -0x18(%ebp),%edi
11254d: 03 7d ec add -0x14(%ebp),%edi
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
112550: 8b 75 dc mov -0x24(%ebp),%esi
112553: 8b 46 08 mov 0x8(%esi),%eax
Heap_Block *prev = old_block->prev;
112556: 8b 56 0c mov 0xc(%esi),%edx
new_block->next = next;
112559: 89 41 08 mov %eax,0x8(%ecx)
new_block->prev = prev;
11255c: 89 51 0c mov %edx,0xc(%ecx)
next->prev = new_block;
11255f: 89 48 0c mov %ecx,0xc(%eax)
prev->next = new_block;
112562: 89 4a 08 mov %ecx,0x8(%edx)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
112565: 89 f8 mov %edi,%eax
112567: 83 c8 01 or $0x1,%eax
11256a: 89 41 04 mov %eax,0x4(%ecx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
11256d: 89 3c 39 mov %edi,(%ecx,%edi,1)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
112570: ff 4b 40 decl 0x40(%ebx)
++stats->frees;
112573: ff 43 50 incl 0x50(%ebx)
stats->free_size += block_size;
112576: 8b 55 ec mov -0x14(%ebp),%edx
112579: 01 53 30 add %edx,0x30(%ebx)
11257c: b0 01 mov $0x1,%al
return( true );
}
11257e: 83 c4 18 add $0x18,%esp
112581: 5b pop %ebx
112582: 5e pop %esi
112583: 5f pop %edi
112584: c9 leave
112585: c3 ret
112586: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
112588: 8b 43 08 mov 0x8(%ebx),%eax
new_block->next = next;
11258b: 89 41 08 mov %eax,0x8(%ecx)
new_block->prev = block_before;
11258e: 89 59 0c mov %ebx,0xc(%ecx)
block_before->next = new_block;
112591: 89 4b 08 mov %ecx,0x8(%ebx)
next->prev = new_block;
112594: 89 48 0c mov %ecx,0xc(%eax)
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
112597: 8b 45 ec mov -0x14(%ebp),%eax
11259a: 83 c8 01 or $0x1,%eax
11259d: 89 41 04 mov %eax,0x4(%ecx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
1125a0: 8b 7d dc mov -0x24(%ebp),%edi
1125a3: 83 67 04 fe andl $0xfffffffe,0x4(%edi)
next_block->prev_size = block_size;
1125a7: 8b 45 ec mov -0x14(%ebp),%eax
1125aa: 89 07 mov %eax,(%edi)
/* Statistics */
++stats->free_blocks;
1125ac: 8b 43 38 mov 0x38(%ebx),%eax
1125af: 40 inc %eax
1125b0: 89 43 38 mov %eax,0x38(%ebx)
#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;
1125b3: 3b 43 3c cmp 0x3c(%ebx),%eax
1125b6: 76 b8 jbe 112570 <_Heap_Free+0xf8>
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;
1125b8: 89 43 3c mov %eax,0x3c(%ebx)
1125bb: eb b3 jmp 112570 <_Heap_Free+0xf8>
1125bd: 8d 76 00 lea 0x0(%esi),%esi
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
1125c0: c6 45 e7 00 movb $0x0,-0x19(%ebp)
1125c4: e9 2f ff ff ff jmp 1124f8 <_Heap_Free+0x80>
1125c9: 8d 76 00 lea 0x0(%esi),%esi
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
1125cc: 8b 45 ec mov -0x14(%ebp),%eax
1125cf: 03 45 f0 add -0x10(%ebp),%eax
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
1125d2: 89 c6 mov %eax,%esi
1125d4: 83 ce 01 or $0x1,%esi
1125d7: 89 71 04 mov %esi,0x4(%ecx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
1125da: 8b 55 dc mov -0x24(%ebp),%edx
1125dd: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
1125e1: 89 02 mov %eax,(%edx)
1125e3: eb 8b jmp 112570 <_Heap_Free+0xf8>
00131dfc <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
131dfc: 55 push %ebp
131dfd: 89 e5 mov %esp,%ebp
131dff: 57 push %edi
131e00: 56 push %esi
131e01: 53 push %ebx
131e02: 8b 7d 08 mov 0x8(%ebp),%edi
131e05: 8b 75 0c mov 0xc(%ebp),%esi
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
131e08: c7 06 00 00 00 00 movl $0x0,(%esi)
info->largest = 0;
131e0e: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
info->total = 0;
131e15: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
131e1c: 8b 57 08 mov 0x8(%edi),%edx
for(the_block = _Heap_Free_list_first(the_heap);
131e1f: 39 d7 cmp %edx,%edi
131e21: 74 2a je 131e4d <_Heap_Get_free_information+0x51><== NEVER TAKEN
131e23: bb 01 00 00 00 mov $0x1,%ebx
131e28: 31 c9 xor %ecx,%ecx
131e2a: eb 02 jmp 131e2e <_Heap_Get_free_information+0x32>
131e2c: 89 c3 mov %eax,%ebx
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
131e2e: 8b 42 04 mov 0x4(%edx),%eax
131e31: 83 e0 fe and $0xfffffffe,%eax
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
131e34: 01 c1 add %eax,%ecx
if ( info->largest < the_size )
131e36: 39 46 04 cmp %eax,0x4(%esi)
131e39: 73 03 jae 131e3e <_Heap_Get_free_information+0x42>
info->largest = the_size;
131e3b: 89 46 04 mov %eax,0x4(%esi)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
131e3e: 8b 52 08 mov 0x8(%edx),%edx
131e41: 8d 43 01 lea 0x1(%ebx),%eax
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
131e44: 39 d7 cmp %edx,%edi
131e46: 75 e4 jne 131e2c <_Heap_Get_free_information+0x30>
131e48: 89 1e mov %ebx,(%esi)
131e4a: 89 4e 08 mov %ecx,0x8(%esi)
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
131e4d: 5b pop %ebx
131e4e: 5e pop %esi
131e4f: 5f pop %edi
131e50: c9 leave
131e51: c3 ret
00145104 <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
145104: 55 push %ebp
145105: 89 e5 mov %esp,%ebp
145107: 57 push %edi
145108: 56 push %esi
145109: 53 push %ebx
14510a: 83 ec 04 sub $0x4,%esp
14510d: 8b 45 08 mov 0x8(%ebp),%eax
145110: 8b 75 0c mov 0xc(%ebp),%esi
Heap_Block *the_block = the_heap->first_block;
145113: 8b 58 20 mov 0x20(%eax),%ebx
Heap_Block *const end = the_heap->last_block;
145116: 8b 78 24 mov 0x24(%eax),%edi
_HAssert(the_block->prev_size == the_heap->page_size);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
145119: c7 06 00 00 00 00 movl $0x0,(%esi)
the_info->Free.total = 0;
14511f: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi)
the_info->Free.largest = 0;
145126: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
the_info->Used.number = 0;
14512d: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
the_info->Used.total = 0;
145134: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi)
the_info->Used.largest = 0;
14513b: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi)
while ( the_block != end ) {
145142: 39 fb cmp %edi,%ebx
145144: 74 45 je 14518b <_Heap_Get_information+0x87><== NEVER TAKEN
145146: 8b 4b 04 mov 0x4(%ebx),%ecx
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
145149: 8d 46 0c lea 0xc(%esi),%eax
14514c: 89 45 f0 mov %eax,-0x10(%ebp)
14514f: eb 16 jmp 145167 <_Heap_Get_information+0x63>
145151: 8d 76 00 lea 0x0(%esi),%esi
while ( the_block != end ) {
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
145154: 89 f0 mov %esi,%eax
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
145156: ff 00 incl (%eax)
info->total += the_size;
145158: 01 50 08 add %edx,0x8(%eax)
if ( info->largest < the_size )
14515b: 39 50 04 cmp %edx,0x4(%eax)
14515e: 73 03 jae 145163 <_Heap_Get_information+0x5f>
info->largest = the_size;
145160: 89 50 04 mov %edx,0x4(%eax)
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
145163: 39 df cmp %ebx,%edi
145165: 74 15 je 14517c <_Heap_Get_information+0x78>
- 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;
145167: 89 ca mov %ecx,%edx
145169: 83 e2 fe and $0xfffffffe,%edx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
14516c: 01 d3 add %edx,%ebx
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
14516e: 8b 4b 04 mov 0x4(%ebx),%ecx
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
145171: f6 c1 01 test $0x1,%cl
145174: 74 de je 145154 <_Heap_Get_information+0x50>
145176: 8b 45 f0 mov -0x10(%ebp),%eax
145179: eb db jmp 145156 <_Heap_Get_information+0x52>
14517b: 90 nop
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
14517c: 8b 46 14 mov 0x14(%esi),%eax
14517f: 83 c0 08 add $0x8,%eax
/*
* Handle the last dummy block. Don't consider this block to be
* "used" as client never allocated it. Make 'Used.total' contain this
* blocks' overhead though.
*/
the_info->Used.total += HEAP_BLOCK_HEADER_SIZE;
145182: 89 46 14 mov %eax,0x14(%esi)
}
145185: 58 pop %eax
145186: 5b pop %ebx
145187: 5e pop %esi
145188: 5f pop %edi
145189: c9 leave
14518a: c3 ret
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
14518b: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED
145190: eb f0 jmp 145182 <_Heap_Get_information+0x7e><== NOT EXECUTED
00120c04 <_Heap_Resize_block>:
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
120c04: 55 push %ebp
120c05: 89 e5 mov %esp,%ebp
120c07: 57 push %edi
120c08: 56 push %esi
120c09: 53 push %ebx
120c0a: 83 ec 2c sub $0x2c,%esp
120c0d: 8b 5d 08 mov 0x8(%ebp),%ebx
120c10: 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 )
120c13: 8d 4e f8 lea -0x8(%esi),%ecx
120c16: 89 f0 mov %esi,%eax
120c18: 31 d2 xor %edx,%edx
120c1a: f7 73 10 divl 0x10(%ebx)
120c1d: 29 d1 sub %edx,%ecx
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
*old_size = 0;
120c1f: 8b 45 14 mov 0x14(%ebp),%eax
120c22: c7 00 00 00 00 00 movl $0x0,(%eax)
*new_size = 0;
120c28: 8b 55 18 mov 0x18(%ebp),%edx
120c2b: c7 02 00 00 00 00 movl $0x0,(%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
120c31: 39 4b 20 cmp %ecx,0x20(%ebx)
120c34: 76 0e jbe 120c44 <_Heap_Resize_block+0x40>
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
/* Statistics */
++stats->resizes;
120c36: b8 02 00 00 00 mov $0x2,%eax
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
120c3b: 8d 65 f4 lea -0xc(%ebp),%esp
120c3e: 5b pop %ebx
120c3f: 5e pop %esi
120c40: 5f pop %edi
120c41: c9 leave
120c42: c3 ret
120c43: 90 nop
120c44: 39 4b 24 cmp %ecx,0x24(%ebx)
120c47: 72 ed jb 120c36 <_Heap_Resize_block+0x32>
- 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;
120c49: 8b 41 04 mov 0x4(%ecx),%eax
120c4c: 83 e0 fe and $0xfffffffe,%eax
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
120c4f: 8d 3c 01 lea (%ecx,%eax,1),%edi
120c52: 89 7d d4 mov %edi,-0x2c(%ebp)
uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
120c55: 89 fa mov %edi,%edx
120c57: 29 f2 sub %esi,%edx
120c59: 83 c2 04 add $0x4,%edx
120c5c: 89 55 dc mov %edx,-0x24(%ebp)
120c5f: 8b 57 04 mov 0x4(%edi),%edx
120c62: 83 e2 fe and $0xfffffffe,%edx
120c65: 89 55 d0 mov %edx,-0x30(%ebp)
RTEMS_INLINE_ROUTINE bool _Heap_Is_free(
const Heap_Block *block
)
{
return !_Heap_Is_used( block );
120c68: 8b 54 17 04 mov 0x4(%edi,%edx,1),%edx
120c6c: 83 e2 01 and $0x1,%edx
120c6f: 89 55 e0 mov %edx,-0x20(%ebp)
bool next_block_is_free = _Heap_Is_free( next_block );;
_HAssert( _Heap_Is_block_in_heap( heap, next_block ) );
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
120c72: 8b 55 dc mov -0x24(%ebp),%edx
120c75: 8b 7d 14 mov 0x14(%ebp),%edi
120c78: 89 17 mov %edx,(%edi)
if ( next_block_is_free ) {
120c7a: 8a 55 e0 mov -0x20(%ebp),%dl
120c7d: 80 f2 01 xor $0x1,%dl
120c80: 88 55 e0 mov %dl,-0x20(%ebp)
120c83: 75 17 jne 120c9c <_Heap_Resize_block+0x98>
block_size += next_block_size;
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
120c85: 8b 55 dc mov -0x24(%ebp),%edx
120c88: 39 55 10 cmp %edx,0x10(%ebp)
120c8b: 76 20 jbe 120cad <_Heap_Resize_block+0xa9>
120c8d: b8 01 00 00 00 mov $0x1,%eax
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
120c92: 8d 65 f4 lea -0xc(%ebp),%esp
120c95: 5b pop %ebx
120c96: 5e pop %esi
120c97: 5f pop %edi
120c98: c9 leave
120c99: c3 ret
120c9a: 66 90 xchg %ax,%ax
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
if ( next_block_is_free ) {
block_size += next_block_size;
120c9c: 03 45 d0 add -0x30(%ebp),%eax
alloc_size += next_block_size;
120c9f: 8b 7d d0 mov -0x30(%ebp),%edi
120ca2: 01 7d dc add %edi,-0x24(%ebp)
}
if ( new_alloc_size > alloc_size ) {
120ca5: 8b 55 dc mov -0x24(%ebp),%edx
120ca8: 39 55 10 cmp %edx,0x10(%ebp)
120cab: 77 e0 ja 120c8d <_Heap_Resize_block+0x89>
return HEAP_RESIZE_UNSATISFIED;
}
if ( next_block_is_free ) {
120cad: 80 7d e0 00 cmpb $0x0,-0x20(%ebp)
120cb1: 74 31 je 120ce4 <_Heap_Resize_block+0xe0>
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
120cb3: 8b 79 04 mov 0x4(%ecx),%edi
120cb6: 83 e7 01 and $0x1,%edi
120cb9: 09 c7 or %eax,%edi
120cbb: 89 79 04 mov %edi,0x4(%ecx)
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
120cbe: 8b 7d d4 mov -0x2c(%ebp),%edi
120cc1: 8b 7f 08 mov 0x8(%edi),%edi
120cc4: 89 7d e4 mov %edi,-0x1c(%ebp)
Heap_Block *prev = block->prev;
120cc7: 8b 55 d4 mov -0x2c(%ebp),%edx
120cca: 8b 7a 0c mov 0xc(%edx),%edi
prev->next = next;
120ccd: 8b 55 e4 mov -0x1c(%ebp),%edx
120cd0: 89 57 08 mov %edx,0x8(%edi)
next->prev = prev;
120cd3: 89 7a 0c mov %edi,0xc(%edx)
_Heap_Block_set_size( block, block_size );
_Heap_Free_list_remove( next_block );
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
120cd6: 83 4c 08 04 01 orl $0x1,0x4(%eax,%ecx,1)
/* Statistics */
--stats->free_blocks;
120cdb: ff 4b 38 decl 0x38(%ebx)
stats->free_size -= next_block_size;
120cde: 8b 7d d0 mov -0x30(%ebp),%edi
120ce1: 29 7b 30 sub %edi,0x30(%ebx)
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
120ce4: ff 75 10 pushl 0x10(%ebp)
120ce7: 56 push %esi
120ce8: 51 push %ecx
120ce9: 53 push %ebx
120cea: e8 d1 c0 fe ff call 10cdc0 <_Heap_Block_allocate>
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
120cef: 8b 50 04 mov 0x4(%eax),%edx
120cf2: 83 e2 fe and $0xfffffffe,%edx
120cf5: 29 f0 sub %esi,%eax
120cf7: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax
120cfb: 8b 55 18 mov 0x18(%ebp),%edx
120cfe: 89 02 mov %eax,(%edx)
/* Statistics */
++stats->resizes;
120d00: ff 43 54 incl 0x54(%ebx)
120d03: 31 c0 xor %eax,%eax
120d05: 83 c4 10 add $0x10,%esp
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
120d08: 8d 65 f4 lea -0xc(%ebp),%esp
120d0b: 5b pop %ebx
120d0c: 5e pop %esi
120d0d: 5f pop %edi
120d0e: c9 leave
120d0f: c3 ret
00120d10 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
120d10: 55 push %ebp
120d11: 89 e5 mov %esp,%ebp
120d13: 56 push %esi
120d14: 53 push %ebx
120d15: 8b 5d 08 mov 0x8(%ebp),%ebx
120d18: 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 )
120d1b: 8d 4e f8 lea -0x8(%esi),%ecx
120d1e: 89 f0 mov %esi,%eax
120d20: 31 d2 xor %edx,%edx
120d22: f7 73 10 divl 0x10(%ebx)
120d25: 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;
120d27: 8b 43 20 mov 0x20(%ebx),%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
120d2a: 39 c1 cmp %eax,%ecx
120d2c: 72 07 jb 120d35 <_Heap_Size_of_alloc_area+0x25>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
120d2e: 8b 53 24 mov 0x24(%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
120d31: 39 d1 cmp %edx,%ecx
120d33: 76 07 jbe 120d3c <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
return true;
120d35: 31 c0 xor %eax,%eax
}
120d37: 5b pop %ebx
120d38: 5e pop %esi
120d39: c9 leave
120d3a: c3 ret
120d3b: 90 nop
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
120d3c: 8b 59 04 mov 0x4(%ecx),%ebx
120d3f: 83 e3 fe and $0xfffffffe,%ebx
120d42: 01 d9 add %ebx,%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
120d44: 39 c8 cmp %ecx,%eax
120d46: 77 ed ja 120d35 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
120d48: 39 ca cmp %ecx,%edx
120d4a: 72 e9 jb 120d35 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
120d4c: f6 41 04 01 testb $0x1,0x4(%ecx)
120d50: 74 e3 je 120d35 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
120d52: 29 f1 sub %esi,%ecx
120d54: 8d 51 04 lea 0x4(%ecx),%edx
120d57: 8b 45 10 mov 0x10(%ebp),%eax
120d5a: 89 10 mov %edx,(%eax)
120d5c: b0 01 mov $0x1,%al
return true;
}
120d5e: 5b pop %ebx
120d5f: 5e pop %esi
120d60: c9 leave
120d61: c3 ret
0010d900 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10d900: 55 push %ebp
10d901: 89 e5 mov %esp,%ebp
10d903: 57 push %edi
10d904: 56 push %esi
10d905: 53 push %ebx
10d906: 83 ec 3c sub $0x3c,%esp
10d909: 8b 5d 08 mov 0x8(%ebp),%ebx
uintptr_t const page_size = heap->page_size;
10d90c: 8b 43 10 mov 0x10(%ebx),%eax
10d90f: 89 45 e0 mov %eax,-0x20(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10d912: 8b 53 14 mov 0x14(%ebx),%edx
10d915: 89 55 dc mov %edx,-0x24(%ebp)
Heap_Block *const last_block = heap->last_block;
10d918: 8b 43 24 mov 0x24(%ebx),%eax
10d91b: 89 45 d8 mov %eax,-0x28(%ebp)
Heap_Block *block = heap->first_block;
10d91e: 8b 73 20 mov 0x20(%ebx),%esi
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d921: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10d925: 75 1d jne 10d944 <_Heap_Walk+0x44>
10d927: c7 45 e4 f8 d8 10 00 movl $0x10d8f8,-0x1c(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d92e: 83 3d c0 be 12 00 03 cmpl $0x3,0x12bec0
10d935: 74 1d je 10d954 <_Heap_Walk+0x54>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
10d937: b0 01 mov $0x1,%al
block = next_block;
}
return true;
}
10d939: 8d 65 f4 lea -0xc(%ebp),%esp
10d93c: 5b pop %ebx
10d93d: 5e pop %esi
10d93e: 5f pop %edi
10d93f: c9 leave
10d940: c3 ret
10d941: 8d 76 00 lea 0x0(%esi),%esi
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d944: c7 45 e4 c8 dc 10 00 movl $0x10dcc8,-0x1c(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d94b: 83 3d c0 be 12 00 03 cmpl $0x3,0x12bec0
10d952: 75 e3 jne 10d937 <_Heap_Walk+0x37> <== NEVER TAKEN
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)(
10d954: 52 push %edx
10d955: ff 73 0c pushl 0xc(%ebx)
10d958: ff 73 08 pushl 0x8(%ebx)
10d95b: ff 75 d8 pushl -0x28(%ebp)
10d95e: 56 push %esi
10d95f: ff 73 1c pushl 0x1c(%ebx)
10d962: ff 73 18 pushl 0x18(%ebx)
10d965: ff 75 dc pushl -0x24(%ebp)
10d968: ff 75 e0 pushl -0x20(%ebp)
10d96b: 68 b0 3d 12 00 push $0x123db0
10d970: 6a 00 push $0x0
10d972: ff 75 0c pushl 0xc(%ebp)
10d975: 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 ) {
10d978: 83 c4 30 add $0x30,%esp
10d97b: 8b 45 e0 mov -0x20(%ebp),%eax
10d97e: 85 c0 test %eax,%eax
10d980: 0f 84 b2 00 00 00 je 10da38 <_Heap_Walk+0x138>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10d986: f6 45 e0 03 testb $0x3,-0x20(%ebp)
10d98a: 0f 85 b0 00 00 00 jne 10da40 <_Heap_Walk+0x140>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10d990: 8b 45 dc mov -0x24(%ebp),%eax
10d993: 31 d2 xor %edx,%edx
10d995: f7 75 e0 divl -0x20(%ebp)
10d998: 85 d2 test %edx,%edx
10d99a: 0f 85 ac 00 00 00 jne 10da4c <_Heap_Walk+0x14c>
);
return false;
}
if (
10d9a0: 8d 46 08 lea 0x8(%esi),%eax
10d9a3: 31 d2 xor %edx,%edx
10d9a5: f7 75 e0 divl -0x20(%ebp)
10d9a8: 85 d2 test %edx,%edx
10d9aa: 0f 85 a8 00 00 00 jne 10da58 <_Heap_Walk+0x158>
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;
10d9b0: 8b 56 04 mov 0x4(%esi),%edx
10d9b3: 89 55 cc mov %edx,-0x34(%ebp)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10d9b6: 83 e2 01 and $0x1,%edx
10d9b9: 0f 84 a1 00 00 00 je 10da60 <_Heap_Walk+0x160>
);
return false;
}
if ( first_block->prev_size != page_size ) {
10d9bf: 8b 06 mov (%esi),%eax
10d9c1: 39 45 e0 cmp %eax,-0x20(%ebp)
10d9c4: 75 4e jne 10da14 <_Heap_Walk+0x114>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10d9c6: 8b 55 d8 mov -0x28(%ebp),%edx
10d9c9: 8b 42 04 mov 0x4(%edx),%eax
10d9cc: 83 e0 fe and $0xfffffffe,%eax
10d9cf: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1)
10d9d4: 0f 84 bd 02 00 00 je 10dc97 <_Heap_Walk+0x397>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10d9da: 8b 43 10 mov 0x10(%ebx),%eax
10d9dd: 89 45 d4 mov %eax,-0x2c(%ebp)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10d9e0: 8b 4b 08 mov 0x8(%ebx),%ecx
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10d9e3: 39 cb cmp %ecx,%ebx
10d9e5: 0f 84 09 01 00 00 je 10daf4 <_Heap_Walk+0x1f4>
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;
10d9eb: 8b 7b 20 mov 0x20(%ebx),%edi
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
10d9ee: 39 cf cmp %ecx,%edi
10d9f0: 76 76 jbe 10da68 <_Heap_Walk+0x168> <== ALWAYS TAKEN
10d9f2: 66 90 xchg %ax,%ax
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
10d9f4: 51 push %ecx
10d9f5: 68 f8 3e 12 00 push $0x123ef8
10d9fa: 66 90 xchg %ax,%ax
return false;
}
if ( !prev_used ) {
(*printer)(
10d9fc: 6a 01 push $0x1
10d9fe: ff 75 0c pushl 0xc(%ebp)
10da01: ff 55 e4 call *-0x1c(%ebp)
10da04: 31 c0 xor %eax,%eax
10da06: 83 c4 10 add $0x10,%esp
block = next_block;
}
return true;
}
10da09: 8d 65 f4 lea -0xc(%ebp),%esp
10da0c: 5b pop %ebx
10da0d: 5e pop %esi
10da0e: 5f pop %edi
10da0f: c9 leave
10da10: c3 ret
10da11: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
if ( first_block->prev_size != page_size ) {
(*printer)(
10da14: 83 ec 0c sub $0xc,%esp
10da17: ff 75 e0 pushl -0x20(%ebp)
10da1a: 50 push %eax
10da1b: 68 cc 3e 12 00 push $0x123ecc
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
10da20: 6a 01 push $0x1
10da22: ff 75 0c pushl 0xc(%ebp)
10da25: ff 55 e4 call *-0x1c(%ebp)
10da28: 31 c0 xor %eax,%eax
10da2a: 83 c4 20 add $0x20,%esp
block = next_block;
}
return true;
}
10da2d: 8d 65 f4 lea -0xc(%ebp),%esp
10da30: 5b pop %ebx
10da31: 5e pop %esi
10da32: 5f pop %edi
10da33: c9 leave
10da34: c3 ret
10da35: 8d 76 00 lea 0x0(%esi),%esi
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
10da38: 57 push %edi
10da39: 68 27 41 12 00 push $0x124127
10da3e: eb bc jmp 10d9fc <_Heap_Walk+0xfc>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
10da40: ff 75 e0 pushl -0x20(%ebp)
10da43: 68 3a 41 12 00 push $0x12413a
10da48: eb b2 jmp 10d9fc <_Heap_Walk+0xfc>
10da4a: 66 90 xchg %ax,%ax
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
10da4c: ff 75 dc pushl -0x24(%ebp)
10da4f: 68 44 3e 12 00 push $0x123e44
10da54: eb a6 jmp 10d9fc <_Heap_Walk+0xfc>
10da56: 66 90 xchg %ax,%ax
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10da58: 56 push %esi
10da59: 68 68 3e 12 00 push $0x123e68
10da5e: eb 9c jmp 10d9fc <_Heap_Walk+0xfc>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
10da60: 56 push %esi
10da61: 68 9c 3e 12 00 push $0x123e9c
10da66: eb 94 jmp 10d9fc <_Heap_Walk+0xfc>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10da68: 8b 53 24 mov 0x24(%ebx),%edx
10da6b: 89 55 d0 mov %edx,-0x30(%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
10da6e: 39 d1 cmp %edx,%ecx
10da70: 77 82 ja 10d9f4 <_Heap_Walk+0xf4> <== NEVER TAKEN
);
return false;
}
if (
10da72: 8d 41 08 lea 0x8(%ecx),%eax
10da75: 31 d2 xor %edx,%edx
10da77: f7 75 d4 divl -0x2c(%ebp)
10da7a: 85 d2 test %edx,%edx
10da7c: 0f 85 20 02 00 00 jne 10dca2 <_Heap_Walk+0x3a2> <== NEVER TAKEN
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10da82: 8b 41 04 mov 0x4(%ecx),%eax
10da85: 83 e0 fe and $0xfffffffe,%eax
10da88: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10da8d: 0f 85 29 02 00 00 jne 10dcbc <_Heap_Walk+0x3bc> <== NEVER TAKEN
);
return false;
}
if ( free_block->prev != prev_block ) {
10da93: 8b 41 0c mov 0xc(%ecx),%eax
10da96: 39 d8 cmp %ebx,%eax
10da98: 0f 85 0f 02 00 00 jne 10dcad <_Heap_Walk+0x3ad> <== NEVER TAKEN
10da9e: 89 75 c8 mov %esi,-0x38(%ebp)
10daa1: 89 c6 mov %eax,%esi
10daa3: 89 5d c4 mov %ebx,-0x3c(%ebp)
10daa6: eb 3d jmp 10dae5 <_Heap_Walk+0x1e5>
10daa8: 39 cf cmp %ecx,%edi
10daaa: 0f 87 44 ff ff ff ja 10d9f4 <_Heap_Walk+0xf4>
10dab0: 3b 4d d0 cmp -0x30(%ebp),%ecx
10dab3: 0f 87 3b ff ff ff ja 10d9f4 <_Heap_Walk+0xf4> <== NEVER TAKEN
);
return false;
}
if (
10dab9: 8d 41 08 lea 0x8(%ecx),%eax
10dabc: 31 d2 xor %edx,%edx
10dabe: f7 75 d4 divl -0x2c(%ebp)
10dac1: 85 d2 test %edx,%edx
10dac3: 0f 85 d9 01 00 00 jne 10dca2 <_Heap_Walk+0x3a2>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10dac9: 8b 41 04 mov 0x4(%ecx),%eax
10dacc: 83 e0 fe and $0xfffffffe,%eax
10dacf: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10dad4: 0f 85 e2 01 00 00 jne 10dcbc <_Heap_Walk+0x3bc>
);
return false;
}
if ( free_block->prev != prev_block ) {
10dada: 8b 41 0c mov 0xc(%ecx),%eax
10dadd: 39 d8 cmp %ebx,%eax
10dadf: 0f 85 c8 01 00 00 jne 10dcad <_Heap_Walk+0x3ad>
(*printer)(
10dae5: 89 cb mov %ecx,%ebx
return false;
}
prev_block = free_block;
free_block = free_block->next;
10dae7: 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 ) {
10daea: 39 ce cmp %ecx,%esi
10daec: 75 ba jne 10daa8 <_Heap_Walk+0x1a8>
10daee: 8b 75 c8 mov -0x38(%ebp),%esi
10daf1: 8b 5d c4 mov -0x3c(%ebp),%ebx
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
10daf4: 39 75 d8 cmp %esi,-0x28(%ebp)
10daf7: 0f 84 3a fe ff ff je 10d937 <_Heap_Walk+0x37> <== NEVER TAKEN
10dafd: 8b 45 cc mov -0x34(%ebp),%eax
- 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;
10db00: 89 c1 mov %eax,%ecx
10db02: 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);
10db05: 8d 3c 31 lea (%ecx,%esi,1),%edi
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 ) {
10db08: a8 01 test $0x1,%al
10db0a: 74 30 je 10db3c <_Heap_Walk+0x23c>
(*printer)(
10db0c: 83 ec 0c sub $0xc,%esp
10db0f: 51 push %ecx
10db10: 56 push %esi
10db11: 68 89 41 12 00 push $0x124189
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10db16: 6a 00 push $0x0
10db18: ff 75 0c pushl 0xc(%ebp)
10db1b: 89 4d c0 mov %ecx,-0x40(%ebp)
10db1e: ff 55 e4 call *-0x1c(%ebp)
10db21: 83 c4 20 add $0x20,%esp
10db24: 8b 4d c0 mov -0x40(%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
10db27: 39 7b 20 cmp %edi,0x20(%ebx)
10db2a: 76 20 jbe 10db4c <_Heap_Walk+0x24c> <== ALWAYS TAKEN
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
10db2c: 83 ec 0c sub $0xc,%esp
10db2f: 57 push %edi
10db30: 56 push %esi
10db31: 68 a4 3f 12 00 push $0x123fa4
10db36: e9 e5 fe ff ff jmp 10da20 <_Heap_Walk+0x120>
10db3b: 90 nop
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10db3c: 83 ec 08 sub $0x8,%esp
10db3f: ff 36 pushl (%esi)
10db41: 51 push %ecx
10db42: 56 push %esi
10db43: 68 7c 3f 12 00 push $0x123f7c
10db48: eb cc jmp 10db16 <_Heap_Walk+0x216>
10db4a: 66 90 xchg %ax,%ax
10db4c: 39 7b 24 cmp %edi,0x24(%ebx)
10db4f: 72 db jb 10db2c <_Heap_Walk+0x22c>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
10db51: 89 c8 mov %ecx,%eax
10db53: 31 d2 xor %edx,%edx
10db55: f7 75 e0 divl -0x20(%ebp)
10db58: 85 d2 test %edx,%edx
10db5a: 0f 85 02 01 00 00 jne 10dc62 <_Heap_Walk+0x362>
);
return false;
}
if ( block_size < min_block_size ) {
10db60: 39 4d dc cmp %ecx,-0x24(%ebp)
10db63: 0f 87 0b 01 00 00 ja 10dc74 <_Heap_Walk+0x374>
);
return false;
}
if ( next_block_begin <= block_begin ) {
10db69: 39 fe cmp %edi,%esi
10db6b: 0f 83 17 01 00 00 jae 10dc88 <_Heap_Walk+0x388>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10db71: f6 47 04 01 testb $0x1,0x4(%edi)
10db75: 0f 85 91 00 00 00 jne 10dc0c <_Heap_Walk+0x30c>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10db7b: 8b 4b 08 mov 0x8(%ebx),%ecx
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;
10db7e: 8b 46 04 mov 0x4(%esi),%eax
10db81: 89 45 cc mov %eax,-0x34(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10db84: 83 e0 fe and $0xfffffffe,%eax
10db87: 89 45 d4 mov %eax,-0x2c(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10db8a: 01 f0 add %esi,%eax
10db8c: 89 45 d0 mov %eax,-0x30(%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)(
10db8f: 8b 56 08 mov 0x8(%esi),%edx
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;
10db92: 39 53 0c cmp %edx,0xc(%ebx)
10db95: 0f 84 99 00 00 00 je 10dc34 <_Heap_Walk+0x334>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
10db9b: 39 da cmp %ebx,%edx
10db9d: 0f 84 a9 00 00 00 je 10dc4c <_Heap_Walk+0x34c>
10dba3: c7 45 c8 f5 3c 12 00 movl $0x123cf5,-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)(
10dbaa: 8b 46 0c mov 0xc(%esi),%eax
10dbad: 39 c1 cmp %eax,%ecx
10dbaf: 74 7b je 10dc2c <_Heap_Walk+0x32c>
"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)" : ""),
10dbb1: 39 d8 cmp %ebx,%eax
10dbb3: 0f 84 9f 00 00 00 je 10dc58 <_Heap_Walk+0x358>
10dbb9: b9 f5 3c 12 00 mov $0x123cf5,%ecx
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)(
10dbbe: ff 75 c8 pushl -0x38(%ebp)
10dbc1: 52 push %edx
10dbc2: 51 push %ecx
10dbc3: 50 push %eax
10dbc4: 56 push %esi
10dbc5: 68 64 40 12 00 push $0x124064
10dbca: 6a 00 push $0x0
10dbcc: ff 75 0c pushl 0xc(%ebp)
10dbcf: 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 ) {
10dbd2: 8b 55 d0 mov -0x30(%ebp),%edx
10dbd5: 8b 02 mov (%edx),%eax
10dbd7: 83 c4 20 add $0x20,%esp
10dbda: 39 45 d4 cmp %eax,-0x2c(%ebp)
10dbdd: 74 11 je 10dbf0 <_Heap_Walk+0x2f0>
(*printer)(
10dbdf: 51 push %ecx
10dbe0: 52 push %edx
10dbe1: 50 push %eax
10dbe2: ff 75 d4 pushl -0x2c(%ebp)
10dbe5: 56 push %esi
10dbe6: 68 90 40 12 00 push $0x124090
10dbeb: e9 30 fe ff ff jmp 10da20 <_Heap_Walk+0x120>
);
return false;
}
if ( !prev_used ) {
10dbf0: f6 45 cc 01 testb $0x1,-0x34(%ebp)
10dbf4: 74 4a je 10dc40 <_Heap_Walk+0x340>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10dbf6: 8b 43 08 mov 0x8(%ebx),%eax
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
10dbf9: 39 d8 cmp %ebx,%eax
10dbfb: 75 0a jne 10dc07 <_Heap_Walk+0x307> <== ALWAYS TAKEN
10dbfd: eb 21 jmp 10dc20 <_Heap_Walk+0x320> <== NOT EXECUTED
10dbff: 90 nop <== NOT EXECUTED
if ( free_block == block ) {
return true;
}
free_block = free_block->next;
10dc00: 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 ) {
10dc03: 39 d8 cmp %ebx,%eax
10dc05: 74 19 je 10dc20 <_Heap_Walk+0x320>
if ( free_block == block ) {
10dc07: 39 f0 cmp %esi,%eax
10dc09: 75 f5 jne 10dc00 <_Heap_Walk+0x300>
10dc0b: 90 nop
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
10dc0c: 39 7d d8 cmp %edi,-0x28(%ebp)
10dc0f: 0f 84 22 fd ff ff je 10d937 <_Heap_Walk+0x37>
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 ) {
10dc15: 8b 47 04 mov 0x4(%edi),%eax
10dc18: 89 fe mov %edi,%esi
10dc1a: e9 e1 fe ff ff jmp 10db00 <_Heap_Walk+0x200>
10dc1f: 90 nop
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10dc20: 56 push %esi
10dc21: 68 fc 40 12 00 push $0x1240fc
10dc26: e9 d1 fd ff ff jmp 10d9fc <_Heap_Walk+0xfc>
10dc2b: 90 nop
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10dc2c: b9 b4 41 12 00 mov $0x1241b4,%ecx
10dc31: eb 8b jmp 10dbbe <_Heap_Walk+0x2be>
10dc33: 90 nop
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
10dc34: c7 45 c8 a0 41 12 00 movl $0x1241a0,-0x38(%ebp)
10dc3b: e9 6a ff ff ff jmp 10dbaa <_Heap_Walk+0x2aa>
return false;
}
if ( !prev_used ) {
(*printer)(
10dc40: 56 push %esi
10dc41: 68 cc 40 12 00 push $0x1240cc
10dc46: e9 b1 fd ff ff jmp 10d9fc <_Heap_Walk+0xfc>
10dc4b: 90 nop
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
10dc4c: c7 45 c8 aa 41 12 00 movl $0x1241aa,-0x38(%ebp)
10dc53: e9 52 ff ff ff jmp 10dbaa <_Heap_Walk+0x2aa>
"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)" : ""),
10dc58: b9 bf 41 12 00 mov $0x1241bf,%ecx
10dc5d: e9 5c ff ff ff jmp 10dbbe <_Heap_Walk+0x2be>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
(*printer)(
10dc62: 83 ec 0c sub $0xc,%esp
10dc65: 51 push %ecx
10dc66: 56 push %esi
10dc67: 68 d4 3f 12 00 push $0x123fd4
10dc6c: e9 af fd ff ff jmp 10da20 <_Heap_Walk+0x120>
10dc71: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
if ( block_size < min_block_size ) {
(*printer)(
10dc74: 83 ec 08 sub $0x8,%esp
10dc77: ff 75 dc pushl -0x24(%ebp)
10dc7a: 51 push %ecx
10dc7b: 56 push %esi
10dc7c: 68 04 40 12 00 push $0x124004
10dc81: e9 9a fd ff ff jmp 10da20 <_Heap_Walk+0x120>
10dc86: 66 90 xchg %ax,%ax
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
10dc88: 83 ec 0c sub $0xc,%esp
10dc8b: 57 push %edi
10dc8c: 56 push %esi
10dc8d: 68 30 40 12 00 push $0x124030
10dc92: e9 89 fd ff ff jmp 10da20 <_Heap_Walk+0x120>
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
10dc97: 53 push %ebx
10dc98: 68 58 41 12 00 push $0x124158
10dc9d: e9 5a fd ff ff jmp 10d9fc <_Heap_Walk+0xfc>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10dca2: 51 push %ecx
10dca3: 68 18 3f 12 00 push $0x123f18
10dca8: e9 4f fd ff ff jmp 10d9fc <_Heap_Walk+0xfc>
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
10dcad: 83 ec 0c sub $0xc,%esp
10dcb0: 50 push %eax
10dcb1: 51 push %ecx
10dcb2: 68 48 3f 12 00 push $0x123f48
10dcb7: e9 64 fd ff ff jmp 10da20 <_Heap_Walk+0x120>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
10dcbc: 51 push %ecx
10dcbd: 68 6d 41 12 00 push $0x12416d
10dcc2: e9 35 fd ff ff jmp 10d9fc <_Heap_Walk+0xfc>
0010c30c <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
10c30c: 55 push %ebp
10c30d: 89 e5 mov %esp,%ebp
10c30f: 53 push %ebx
10c310: 83 ec 04 sub $0x4,%esp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10c313: 8b 15 60 9e 12 00 mov 0x129e60,%edx
10c319: 85 d2 test %edx,%edx
10c31b: 74 1a je 10c337 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN
10c31d: 31 db xor %ebx,%ebx
10c31f: 90 nop
(void) rtems_io_initialize( major, 0, NULL );
10c320: 50 push %eax
10c321: 6a 00 push $0x0
10c323: 6a 00 push $0x0
10c325: 53 push %ebx
10c326: e8 31 5c 00 00 call 111f5c <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10c32b: 43 inc %ebx
10c32c: 83 c4 10 add $0x10,%esp
10c32f: 39 1d 60 9e 12 00 cmp %ebx,0x129e60
10c335: 77 e9 ja 10c320 <_IO_Initialize_all_drivers+0x14>
(void) rtems_io_initialize( major, 0, NULL );
}
10c337: 8b 5d fc mov -0x4(%ebp),%ebx
10c33a: c9 leave
10c33b: c3 ret
0010c33c <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
10c33c: 55 push %ebp
10c33d: 89 e5 mov %esp,%ebp
10c33f: 57 push %edi
10c340: 56 push %esi
10c341: 53 push %ebx
10c342: 83 ec 1c sub $0x1c,%esp
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
10c345: 8b 1d 54 52 12 00 mov 0x125254,%ebx
drivers_in_table = Configuration.number_of_device_drivers;
10c34b: a1 50 52 12 00 mov 0x125250,%eax
10c350: 89 45 e4 mov %eax,-0x1c(%ebp)
number_of_drivers = Configuration.maximum_drivers;
10c353: 8b 35 4c 52 12 00 mov 0x12524c,%esi
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
10c359: 39 f0 cmp %esi,%eax
10c35b: 72 17 jb 10c374 <_IO_Manager_initialization+0x38>
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
10c35d: 89 1d 64 9e 12 00 mov %ebx,0x129e64
_IO_Number_of_drivers = number_of_drivers;
10c363: 8b 45 e4 mov -0x1c(%ebp),%eax
10c366: a3 60 9e 12 00 mov %eax,0x129e60
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
10c36b: 8d 65 f4 lea -0xc(%ebp),%esp
10c36e: 5b pop %ebx
10c36f: 5e pop %esi
10c370: 5f pop %edi
10c371: c9 leave
10c372: c3 ret
10c373: 90 nop
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
10c374: 8d 0c 76 lea (%esi,%esi,2),%ecx
10c377: c1 e1 03 shl $0x3,%ecx
10c37a: 83 ec 0c sub $0xc,%esp
10c37d: 51 push %ecx
10c37e: 89 4d dc mov %ecx,-0x24(%ebp)
10c381: e8 5a 2a 00 00 call 10ede0 <_Workspace_Allocate_or_fatal_error>
10c386: 89 c2 mov %eax,%edx
10c388: a3 64 9e 12 00 mov %eax,0x129e64
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
10c38d: 89 35 60 9e 12 00 mov %esi,0x129e60
memset(
10c393: 31 c0 xor %eax,%eax
10c395: 8b 4d dc mov -0x24(%ebp),%ecx
10c398: 89 d7 mov %edx,%edi
10c39a: f3 aa rep stos %al,%es:(%edi)
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10c39c: 83 c4 10 add $0x10,%esp
10c39f: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c3a2: 85 c9 test %ecx,%ecx
10c3a4: 74 c5 je 10c36b <_IO_Manager_initialization+0x2f><== NEVER TAKEN
10c3a6: a1 64 9e 12 00 mov 0x129e64,%eax
10c3ab: 89 45 e0 mov %eax,-0x20(%ebp)
10c3ae: 31 c0 xor %eax,%eax
10c3b0: 31 d2 xor %edx,%edx
10c3b2: 66 90 xchg %ax,%ax
_IO_Driver_address_table[index] = driver_table[index];
10c3b4: 8b 7d e0 mov -0x20(%ebp),%edi
10c3b7: 01 c7 add %eax,%edi
10c3b9: 8d 34 03 lea (%ebx,%eax,1),%esi
10c3bc: b9 06 00 00 00 mov $0x6,%ecx
10c3c1: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10c3c3: 42 inc %edx
10c3c4: 83 c0 18 add $0x18,%eax
10c3c7: 39 55 e4 cmp %edx,-0x1c(%ebp)
10c3ca: 77 e8 ja 10c3b4 <_IO_Manager_initialization+0x78>
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
10c3cc: 8d 65 f4 lea -0xc(%ebp),%esp
10c3cf: 5b pop %ebx
10c3d0: 5e pop %esi
10c3d1: 5f pop %edi
10c3d2: c9 leave
10c3d3: c3 ret
0010ceb0 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10ceb0: 55 push %ebp
10ceb1: 89 e5 mov %esp,%ebp
10ceb3: 53 push %ebx
10ceb4: 83 ec 08 sub $0x8,%esp
10ceb7: 8b 45 08 mov 0x8(%ebp),%eax
10ceba: 8b 55 0c mov 0xc(%ebp),%edx
10cebd: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10cec0: a3 a0 94 12 00 mov %eax,0x1294a0
_Internal_errors_What_happened.is_internal = is_internal;
10cec5: 88 15 a4 94 12 00 mov %dl,0x1294a4
_Internal_errors_What_happened.the_error = the_error;
10cecb: 89 1d a8 94 12 00 mov %ebx,0x1294a8
_User_extensions_Fatal( the_source, is_internal, the_error );
10ced1: 53 push %ebx
10ced2: 0f b6 d2 movzbl %dl,%edx
10ced5: 52 push %edx
10ced6: 50 push %eax
10ced7: e8 ac 1b 00 00 call 10ea88 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10cedc: c7 05 c0 95 12 00 05 movl $0x5,0x1295c0 <== NOT EXECUTED
10cee3: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10cee6: fa cli <== NOT EXECUTED
10cee7: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10cee9: f4 hlt <== NOT EXECUTED
10ceea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ceed: eb fe jmp 10ceed <_Internal_error_Occurred+0x3d><== NOT EXECUTED
00100218 <_Message_queue_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
#include <rtems/score/interr.h>
void _Message_queue_Manager_initialization(void)
{
100218: 55 push %ebp
100219: 89 e5 mov %esp,%ebp
}
10021b: c9 leave
10021c: c3 ret
001125e8 <_Objects_API_maximum_class>:
#include <rtems/score/object.h>
unsigned int _Objects_API_maximum_class(
uint32_t api
)
{
1125e8: 55 push %ebp
1125e9: 89 e5 mov %esp,%ebp
case OBJECTS_NO_API:
default:
break;
}
return 0;
}
1125eb: 8b 45 08 mov 0x8(%ebp),%eax
1125ee: 48 dec %eax
1125ef: 83 f8 03 cmp $0x3,%eax
1125f2: 77 0c ja 112600 <_Objects_API_maximum_class+0x18>
1125f4: 8b 04 85 fc 33 12 00 mov 0x1233fc(,%eax,4),%eax
1125fb: c9 leave
1125fc: c3 ret
1125fd: 8d 76 00 lea 0x0(%esi),%esi
112600: 31 c0 xor %eax,%eax
112602: c9 leave
112603: c3 ret
0010cf48 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10cf48: 55 push %ebp
10cf49: 89 e5 mov %esp,%ebp
10cf4b: 56 push %esi
10cf4c: 53 push %ebx
10cf4d: 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 )
10cf50: 8b 43 18 mov 0x18(%ebx),%eax
10cf53: 85 c0 test %eax,%eax
10cf55: 75 0d jne 10cf64 <_Objects_Allocate+0x1c><== ALWAYS TAKEN
10cf57: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
information->inactive--;
}
}
return the_object;
}
10cf59: 89 c8 mov %ecx,%eax
10cf5b: 8d 65 f8 lea -0x8(%ebp),%esp
10cf5e: 5b pop %ebx
10cf5f: 5e pop %esi
10cf60: c9 leave
10cf61: c3 ret
10cf62: 66 90 xchg %ax,%ax
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10cf64: 8d 73 20 lea 0x20(%ebx),%esi
10cf67: 83 ec 0c sub $0xc,%esp
10cf6a: 56 push %esi
10cf6b: e8 a0 f6 ff ff call 10c610 <_Chain_Get>
10cf70: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10cf72: 83 c4 10 add $0x10,%esp
10cf75: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10cf79: 74 de je 10cf59 <_Objects_Allocate+0x11>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10cf7b: 85 c0 test %eax,%eax
10cf7d: 74 29 je 10cfa8 <_Objects_Allocate+0x60>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10cf7f: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10cf83: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10cf87: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
10cf89: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10cf8d: 31 d2 xor %edx,%edx
10cf8f: f7 f6 div %esi
10cf91: c1 e0 02 shl $0x2,%eax
10cf94: 03 43 30 add 0x30(%ebx),%eax
10cf97: ff 08 decl (%eax)
information->inactive--;
10cf99: 66 ff 4b 2c decw 0x2c(%ebx)
}
}
return the_object;
}
10cf9d: 89 c8 mov %ecx,%eax
10cf9f: 8d 65 f8 lea -0x8(%ebp),%esp
10cfa2: 5b pop %ebx
10cfa3: 5e pop %esi
10cfa4: c9 leave
10cfa5: c3 ret
10cfa6: 66 90 xchg %ax,%ax
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
10cfa8: 83 ec 0c sub $0xc,%esp
10cfab: 53 push %ebx
10cfac: e8 3b 00 00 00 call 10cfec <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10cfb1: 89 34 24 mov %esi,(%esp)
10cfb4: e8 57 f6 ff ff call 10c610 <_Chain_Get>
10cfb9: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10cfbb: 83 c4 10 add $0x10,%esp
10cfbe: 85 c0 test %eax,%eax
10cfc0: 74 97 je 10cf59 <_Objects_Allocate+0x11>
10cfc2: eb bb jmp 10cf7f <_Objects_Allocate+0x37>
0010cfec <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10cfec: 55 push %ebp
10cfed: 89 e5 mov %esp,%ebp
10cfef: 57 push %edi
10cff0: 56 push %esi
10cff1: 53 push %ebx
10cff2: 83 ec 4c sub $0x4c,%esp
10cff5: 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 );
10cff8: 0f b7 43 08 movzwl 0x8(%ebx),%eax
10cffc: 89 45 d0 mov %eax,-0x30(%ebp)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10cfff: 8b 4b 34 mov 0x34(%ebx),%ecx
10d002: 85 c9 test %ecx,%ecx
10d004: 0f 84 72 02 00 00 je 10d27c <_Objects_Extend_information+0x290>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10d00a: 8b 7b 10 mov 0x10(%ebx),%edi
10d00d: 66 89 7d d4 mov %di,-0x2c(%ebp)
10d011: 8b 7b 14 mov 0x14(%ebx),%edi
10d014: 31 d2 xor %edx,%edx
10d016: 8b 45 d4 mov -0x2c(%ebp),%eax
10d019: 66 f7 f7 div %di
10d01c: 0f b7 f0 movzwl %ax,%esi
for ( ; block < block_count; block++ ) {
10d01f: 85 f6 test %esi,%esi
10d021: 0f 84 6c 02 00 00 je 10d293 <_Objects_Extend_information+0x2a7><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL )
10d027: 8b 01 mov (%ecx),%eax
10d029: 85 c0 test %eax,%eax
10d02b: 0f 84 72 02 00 00 je 10d2a3 <_Objects_Extend_information+0x2b7><== NEVER TAKEN
10d031: 0f b7 ff movzwl %di,%edi
10d034: 8b 55 d0 mov -0x30(%ebp),%edx
10d037: 89 55 cc mov %edx,-0x34(%ebp)
10d03a: 31 d2 xor %edx,%edx
10d03c: 8b 45 cc mov -0x34(%ebp),%eax
10d03f: eb 09 jmp 10d04a <_Objects_Extend_information+0x5e>
10d041: 8d 76 00 lea 0x0(%esi),%esi
10d044: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4)
10d048: 74 07 je 10d051 <_Objects_Extend_information+0x65>
break;
else
index_base += information->allocation_size;
10d04a: 01 f8 add %edi,%eax
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10d04c: 42 inc %edx
10d04d: 39 d6 cmp %edx,%esi
10d04f: 77 f3 ja 10d044 <_Objects_Extend_information+0x58>
10d051: 89 45 cc mov %eax,-0x34(%ebp)
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
10d054: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax
10d058: 01 f8 add %edi,%eax
10d05a: 89 45 d4 mov %eax,-0x2c(%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 ) {
10d05d: 3d ff ff 00 00 cmp $0xffff,%eax
10d062: 0f 87 b1 01 00 00 ja 10d219 <_Objects_Extend_information+0x22d><== 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;
10d068: 0f af 7b 18 imul 0x18(%ebx),%edi
if ( information->auto_extend ) {
10d06c: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10d070: 0f 85 ae 01 00 00 jne 10d224 <_Objects_Extend_information+0x238>
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
10d076: 83 ec 0c sub $0xc,%esp
10d079: 57 push %edi
10d07a: 89 55 b4 mov %edx,-0x4c(%ebp)
10d07d: e8 5e 1d 00 00 call 10ede0 <_Workspace_Allocate_or_fatal_error>
10d082: 89 45 c4 mov %eax,-0x3c(%ebp)
10d085: 83 c4 10 add $0x10,%esp
10d088: 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 ) {
10d08b: 0f b7 43 10 movzwl 0x10(%ebx),%eax
10d08f: 39 45 cc cmp %eax,-0x34(%ebp)
10d092: 0f 82 fe 00 00 00 jb 10d196 <_Objects_Extend_information+0x1aa>
*/
/*
* Up the block count and maximum
*/
block_count++;
10d098: 8d 7e 01 lea 0x1(%esi),%edi
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
10d09b: 83 ec 0c sub $0xc,%esp
10d09e: 8d 04 7f lea (%edi,%edi,2),%eax
10d0a1: 03 45 d4 add -0x2c(%ebp),%eax
10d0a4: 03 45 d0 add -0x30(%ebp),%eax
10d0a7: c1 e0 02 shl $0x2,%eax
10d0aa: 50 push %eax
10d0ab: 89 55 b4 mov %edx,-0x4c(%ebp)
10d0ae: e8 59 1d 00 00 call 10ee0c <_Workspace_Allocate>
10d0b3: 89 45 c8 mov %eax,-0x38(%ebp)
if ( !object_blocks ) {
10d0b6: 83 c4 10 add $0x10,%esp
10d0b9: 85 c0 test %eax,%eax
10d0bb: 8b 55 b4 mov -0x4c(%ebp),%edx
10d0be: 0f 84 ef 01 00 00 je 10d2b3 <_Objects_Extend_information+0x2c7>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
10d0c4: 8b 45 c8 mov -0x38(%ebp),%eax
10d0c7: 8d 04 b8 lea (%eax,%edi,4),%eax
10d0ca: 89 45 b8 mov %eax,-0x48(%ebp)
10d0cd: 8b 4d c8 mov -0x38(%ebp),%ecx
10d0d0: 8d 3c f9 lea (%ecx,%edi,8),%edi
10d0d3: 89 7d bc mov %edi,-0x44(%ebp)
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
10d0d6: 0f b7 43 10 movzwl 0x10(%ebx),%eax
10d0da: 39 45 d0 cmp %eax,-0x30(%ebp)
10d0dd: 0f 82 60 01 00 00 jb 10d243 <_Objects_Extend_information+0x257>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10d0e3: 8b 45 d0 mov -0x30(%ebp),%eax
10d0e6: 85 c0 test %eax,%eax
10d0e8: 74 16 je 10d100 <_Objects_Extend_information+0x114><== NEVER TAKEN
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10d0ea: 31 c0 xor %eax,%eax
10d0ec: 8b 4d bc mov -0x44(%ebp),%ecx
10d0ef: 8b 7d d0 mov -0x30(%ebp),%edi
10d0f2: 66 90 xchg %ax,%ax
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
10d0f4: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10d0fb: 40 inc %eax
10d0fc: 39 c7 cmp %eax,%edi
10d0fe: 77 f4 ja 10d0f4 <_Objects_Extend_information+0x108><== NEVER TAKEN
10d100: c1 e6 02 shl $0x2,%esi
10d103: 89 75 c0 mov %esi,-0x40(%ebp)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10d106: 8b 45 c8 mov -0x38(%ebp),%eax
10d109: 8b 7d c0 mov -0x40(%ebp),%edi
10d10c: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1)
inactive_per_block[block_count] = 0;
10d113: 8b 4d b8 mov -0x48(%ebp),%ecx
10d116: c7 04 39 00 00 00 00 movl $0x0,(%ecx,%edi,1)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10d11d: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10d121: 03 75 cc add -0x34(%ebp),%esi
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10d124: 39 75 cc cmp %esi,-0x34(%ebp)
10d127: 73 19 jae 10d142 <_Objects_Extend_information+0x156><== NEVER TAKEN
10d129: 8b 7d cc mov -0x34(%ebp),%edi
10d12c: 8b 45 bc mov -0x44(%ebp),%eax
10d12f: 8d 0c b8 lea (%eax,%edi,4),%ecx
10d132: 89 f8 mov %edi,%eax
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
10d134: 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++ ) {
10d13a: 40 inc %eax
10d13b: 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 ;
10d13e: 39 c6 cmp %eax,%esi
10d140: 77 f2 ja 10d134 <_Objects_Extend_information+0x148>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10d142: 9c pushf
10d143: fa cli
10d144: 5f pop %edi
old_tables = information->object_blocks;
10d145: 8b 4b 34 mov 0x34(%ebx),%ecx
information->object_blocks = object_blocks;
10d148: 8b 45 c8 mov -0x38(%ebp),%eax
10d14b: 89 43 34 mov %eax,0x34(%ebx)
information->inactive_per_block = inactive_per_block;
10d14e: 8b 45 b8 mov -0x48(%ebp),%eax
10d151: 89 43 30 mov %eax,0x30(%ebx)
information->local_table = local_table;
10d154: 8b 45 bc mov -0x44(%ebp),%eax
10d157: 89 43 1c mov %eax,0x1c(%ebx)
information->maximum = (Objects_Maximum) maximum;
10d15a: 8b 45 d4 mov -0x2c(%ebp),%eax
10d15d: 66 89 43 10 mov %ax,0x10(%ebx)
information->maximum_id = _Objects_Build_id(
10d161: 8b 33 mov (%ebx),%esi
10d163: c1 e6 18 shl $0x18,%esi
10d166: 81 ce 00 00 01 00 or $0x10000,%esi
10d16c: 0f b7 43 04 movzwl 0x4(%ebx),%eax
10d170: c1 e0 1b shl $0x1b,%eax
10d173: 09 c6 or %eax,%esi
10d175: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax
10d179: 09 c6 or %eax,%esi
10d17b: 89 73 0c mov %esi,0xc(%ebx)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10d17e: 57 push %edi
10d17f: 9d popf
if ( old_tables )
10d180: 85 c9 test %ecx,%ecx
10d182: 74 12 je 10d196 <_Objects_Extend_information+0x1aa>
_Workspace_Free( old_tables );
10d184: 83 ec 0c sub $0xc,%esp
10d187: 51 push %ecx
10d188: 89 55 b4 mov %edx,-0x4c(%ebp)
10d18b: e8 98 1c 00 00 call 10ee28 <_Workspace_Free>
10d190: 83 c4 10 add $0x10,%esp
10d193: 8b 55 b4 mov -0x4c(%ebp),%edx
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
10d196: c1 e2 02 shl $0x2,%edx
10d199: 89 55 d0 mov %edx,-0x30(%ebp)
10d19c: 8b 43 34 mov 0x34(%ebx),%eax
10d19f: 8b 4d c4 mov -0x3c(%ebp),%ecx
10d1a2: 89 0c 10 mov %ecx,(%eax,%edx,1)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10d1a5: ff 73 18 pushl 0x18(%ebx)
10d1a8: 0f b7 53 14 movzwl 0x14(%ebx),%edx
10d1ac: 52 push %edx
10d1ad: 8b 7d d0 mov -0x30(%ebp),%edi
10d1b0: ff 34 38 pushl (%eax,%edi,1)
10d1b3: 8d 7d dc lea -0x24(%ebp),%edi
10d1b6: 57 push %edi
10d1b7: e8 e8 4d 00 00 call 111fa4 <_Chain_Initialize>
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10d1bc: 8d 43 20 lea 0x20(%ebx),%eax
10d1bf: 89 45 d4 mov %eax,-0x2c(%ebp)
10d1c2: 8b 75 cc mov -0x34(%ebp),%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 ) {
10d1c5: 83 c4 10 add $0x10,%esp
10d1c8: eb 2b jmp 10d1f5 <_Objects_Extend_information+0x209>
10d1ca: 66 90 xchg %ax,%ax
the_object->id = _Objects_Build_id(
10d1cc: 8b 13 mov (%ebx),%edx
10d1ce: c1 e2 18 shl $0x18,%edx
10d1d1: 81 ca 00 00 01 00 or $0x10000,%edx
10d1d7: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
10d1db: c1 e1 1b shl $0x1b,%ecx
10d1de: 09 ca or %ecx,%edx
10d1e0: 09 f2 or %esi,%edx
10d1e2: 89 50 08 mov %edx,0x8(%eax)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10d1e5: 83 ec 08 sub $0x8,%esp
10d1e8: 50 push %eax
10d1e9: ff 75 d4 pushl -0x2c(%ebp)
10d1ec: e8 e3 f3 ff ff call 10c5d4 <_Chain_Append>
index++;
10d1f1: 46 inc %esi
10d1f2: 83 c4 10 add $0x10,%esp
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10d1f5: 83 ec 0c sub $0xc,%esp
10d1f8: 57 push %edi
10d1f9: e8 12 f4 ff ff call 10c610 <_Chain_Get>
10d1fe: 83 c4 10 add $0x10,%esp
10d201: 85 c0 test %eax,%eax
10d203: 75 c7 jne 10d1cc <_Objects_Extend_information+0x1e0>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10d205: 8b 43 30 mov 0x30(%ebx),%eax
10d208: 0f b7 53 14 movzwl 0x14(%ebx),%edx
10d20c: 8b 4d d0 mov -0x30(%ebp),%ecx
10d20f: 89 14 08 mov %edx,(%eax,%ecx,1)
information->inactive =
10d212: 8b 43 14 mov 0x14(%ebx),%eax
10d215: 66 01 43 2c add %ax,0x2c(%ebx)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
10d219: 8d 65 f4 lea -0xc(%ebp),%esp
10d21c: 5b pop %ebx
10d21d: 5e pop %esi
10d21e: 5f pop %edi
10d21f: c9 leave
10d220: c3 ret
10d221: 8d 76 00 lea 0x0(%esi),%esi
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
10d224: 83 ec 0c sub $0xc,%esp
10d227: 57 push %edi
10d228: 89 55 b4 mov %edx,-0x4c(%ebp)
10d22b: e8 dc 1b 00 00 call 10ee0c <_Workspace_Allocate>
10d230: 89 45 c4 mov %eax,-0x3c(%ebp)
if ( !new_object_block )
10d233: 83 c4 10 add $0x10,%esp
10d236: 85 c0 test %eax,%eax
10d238: 8b 55 b4 mov -0x4c(%ebp),%edx
10d23b: 0f 85 4a fe ff ff jne 10d08b <_Objects_Extend_information+0x9f>
10d241: eb d6 jmp 10d219 <_Objects_Extend_information+0x22d>
/*
* 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,
10d243: c1 e6 02 shl $0x2,%esi
10d246: 89 75 c0 mov %esi,-0x40(%ebp)
10d249: 8b 73 34 mov 0x34(%ebx),%esi
10d24c: 8b 7d c8 mov -0x38(%ebp),%edi
10d24f: 8b 4d c0 mov -0x40(%ebp),%ecx
10d252: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10d254: 8b 73 30 mov 0x30(%ebx),%esi
10d257: 8b 7d b8 mov -0x48(%ebp),%edi
10d25a: 8b 4d c0 mov -0x40(%ebp),%ecx
10d25d: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10d25f: 0f b7 43 10 movzwl 0x10(%ebx),%eax
10d263: 03 45 d0 add -0x30(%ebp),%eax
10d266: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx
10d26d: 8b 73 1c mov 0x1c(%ebx),%esi
10d270: 8b 7d bc mov -0x44(%ebp),%edi
10d273: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10d275: e9 8c fe ff ff jmp 10d106 <_Objects_Extend_information+0x11a>
10d27a: 66 90 xchg %ax,%ax
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10d27c: 8b 53 10 mov 0x10(%ebx),%edx
10d27f: 66 89 55 d4 mov %dx,-0x2c(%ebp)
10d283: 0f b7 7b 14 movzwl 0x14(%ebx),%edi
10d287: 89 45 cc mov %eax,-0x34(%ebp)
10d28a: 31 d2 xor %edx,%edx
10d28c: 31 f6 xor %esi,%esi
10d28e: e9 c1 fd ff ff jmp 10d054 <_Objects_Extend_information+0x68>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10d293: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED
10d296: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
10d299: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
10d29c: 31 d2 xor %edx,%edx <== NOT EXECUTED
10d29e: e9 b1 fd ff ff jmp 10d054 <_Objects_Extend_information+0x68><== NOT EXECUTED
if ( information->object_blocks[ block ] == NULL )
10d2a3: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED
10d2a6: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
10d2a9: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED
10d2ac: 31 d2 xor %edx,%edx <== NOT EXECUTED
10d2ae: e9 a1 fd ff ff jmp 10d054 <_Objects_Extend_information+0x68><== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
10d2b3: 83 ec 0c sub $0xc,%esp
10d2b6: ff 75 c4 pushl -0x3c(%ebp)
10d2b9: e8 6a 1b 00 00 call 10ee28 <_Workspace_Free>
return;
10d2be: 83 c4 10 add $0x10,%esp
10d2c1: e9 53 ff ff ff jmp 10d219 <_Objects_Extend_information+0x22d>
0010d358 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
10d358: 55 push %ebp
10d359: 89 e5 mov %esp,%ebp
10d35b: 56 push %esi
10d35c: 53 push %ebx
10d35d: 8b 75 08 mov 0x8(%ebp),%esi
10d360: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10d363: 85 db test %ebx,%ebx
10d365: 75 09 jne 10d370 <_Objects_Get_information+0x18>
* 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 )
10d367: 31 c0 xor %eax,%eax
return NULL;
#endif
return info;
}
10d369: 8d 65 f8 lea -0x8(%ebp),%esp
10d36c: 5b pop %ebx
10d36d: 5e pop %esi
10d36e: c9 leave
10d36f: c3 ret
/*
* 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 );
10d370: 83 ec 0c sub $0xc,%esp
10d373: 56 push %esi
10d374: e8 6f 52 00 00 call 1125e8 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10d379: 83 c4 10 add $0x10,%esp
10d37c: 85 c0 test %eax,%eax
10d37e: 74 e7 je 10d367 <_Objects_Get_information+0xf>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10d380: 39 c3 cmp %eax,%ebx
10d382: 77 e3 ja 10d367 <_Objects_Get_information+0xf>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10d384: 8b 04 b5 cc 93 12 00 mov 0x1293cc(,%esi,4),%eax
10d38b: 85 c0 test %eax,%eax
10d38d: 74 d8 je 10d367 <_Objects_Get_information+0xf><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10d38f: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !info )
10d392: 85 c0 test %eax,%eax
10d394: 74 d3 je 10d369 <_Objects_Get_information+0x11><== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
10d396: 66 83 78 10 00 cmpw $0x0,0x10(%eax)
10d39b: 75 cc jne 10d369 <_Objects_Get_information+0x11>
10d39d: eb c8 jmp 10d367 <_Objects_Get_information+0xf>
0010d3a0 <_Objects_Get_isr_disable>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location,
ISR_Level *level_p
)
{
10d3a0: 55 push %ebp
10d3a1: 89 e5 mov %esp,%ebp
10d3a3: 56 push %esi
10d3a4: 53 push %ebx
10d3a5: 8b 55 08 mov 0x8(%ebp),%edx
10d3a8: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Control *the_object;
uint32_t index;
ISR_Level level;
index = id - information->minimum_id + 1;
10d3ab: b8 01 00 00 00 mov $0x1,%eax
10d3b0: 2b 42 08 sub 0x8(%edx),%eax
10d3b3: 03 45 0c add 0xc(%ebp),%eax
_ISR_Disable( level );
10d3b6: 9c pushf
10d3b7: fa cli
10d3b8: 5e pop %esi
if ( information->maximum >= index ) {
10d3b9: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
10d3bd: 39 c8 cmp %ecx,%eax
10d3bf: 77 1b ja 10d3dc <_Objects_Get_isr_disable+0x3c>
if ( (the_object = information->local_table[ index ]) != NULL ) {
10d3c1: 8b 52 1c mov 0x1c(%edx),%edx
10d3c4: 8b 04 82 mov (%edx,%eax,4),%eax
10d3c7: 85 c0 test %eax,%eax
10d3c9: 74 21 je 10d3ec <_Objects_Get_isr_disable+0x4c>
*location = OBJECTS_LOCAL;
10d3cb: c7 03 00 00 00 00 movl $0x0,(%ebx)
*level_p = level;
10d3d1: 8b 55 14 mov 0x14(%ebp),%edx
10d3d4: 89 32 mov %esi,(%edx)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
10d3d6: 5b pop %ebx
10d3d7: 5e pop %esi
10d3d8: c9 leave
10d3d9: c3 ret
10d3da: 66 90 xchg %ax,%ax
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
return NULL;
}
_ISR_Enable( level );
10d3dc: 56 push %esi
10d3dd: 9d popf
*location = OBJECTS_ERROR;
10d3de: c7 03 01 00 00 00 movl $0x1,(%ebx)
10d3e4: 31 c0 xor %eax,%eax
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
10d3e6: 5b pop %ebx
10d3e7: 5e pop %esi
10d3e8: c9 leave
10d3e9: c3 ret
10d3ea: 66 90 xchg %ax,%ax
if ( (the_object = information->local_table[ index ]) != NULL ) {
*location = OBJECTS_LOCAL;
*level_p = level;
return the_object;
}
_ISR_Enable( level );
10d3ec: 56 push %esi
10d3ed: 9d popf
*location = OBJECTS_ERROR;
10d3ee: c7 03 01 00 00 00 movl $0x1,(%ebx)
return NULL;
10d3f4: eb e0 jmp 10d3d6 <_Objects_Get_isr_disable+0x36>
00119f20 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
119f20: 55 push %ebp
119f21: 89 e5 mov %esp,%ebp
119f23: 57 push %edi
119f24: 56 push %esi
119f25: 53 push %ebx
119f26: 83 ec 2c sub $0x2c,%esp
119f29: 8b 55 08 mov 0x8(%ebp),%edx
119f2c: 8b 75 0c mov 0xc(%ebp),%esi
119f2f: 8b 5d 10 mov 0x10(%ebp),%ebx
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
119f32: 85 f6 test %esi,%esi
119f34: 75 0e jne 119f44 <_Objects_Get_name_as_string+0x24>
}
}
*d = '\0';
_Thread_Enable_dispatch();
return name;
119f36: 31 db xor %ebx,%ebx
}
return NULL; /* unreachable path */
}
119f38: 89 d8 mov %ebx,%eax
119f3a: 8d 65 f4 lea -0xc(%ebp),%esp
119f3d: 5b pop %ebx
119f3e: 5e pop %esi
119f3f: 5f pop %edi
119f40: c9 leave
119f41: c3 ret
119f42: 66 90 xchg %ax,%ax
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
119f44: 85 db test %ebx,%ebx
119f46: 74 f0 je 119f38 <_Objects_Get_name_as_string+0x18>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
119f48: 85 d2 test %edx,%edx
119f4a: 75 08 jne 119f54 <_Objects_Get_name_as_string+0x34>
119f4c: a1 58 74 13 00 mov 0x137458,%eax
119f51: 8b 50 08 mov 0x8(%eax),%edx
information = _Objects_Get_information_id( tmpId );
119f54: 83 ec 0c sub $0xc,%esp
119f57: 52 push %edx
119f58: 89 55 cc mov %edx,-0x34(%ebp)
119f5b: e8 74 80 ff ff call 111fd4 <_Objects_Get_information_id>
119f60: 89 c7 mov %eax,%edi
if ( !information )
119f62: 83 c4 10 add $0x10,%esp
119f65: 85 c0 test %eax,%eax
119f67: 8b 55 cc mov -0x34(%ebp),%edx
119f6a: 74 ca je 119f36 <_Objects_Get_name_as_string+0x16>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
119f6c: 51 push %ecx
119f6d: 8d 45 e4 lea -0x1c(%ebp),%eax
119f70: 50 push %eax
119f71: 52 push %edx
119f72: 57 push %edi
119f73: e8 1c 81 ff ff call 112094 <_Objects_Get>
switch ( location ) {
119f78: 83 c4 10 add $0x10,%esp
119f7b: 8b 55 e4 mov -0x1c(%ebp),%edx
119f7e: 85 d2 test %edx,%edx
119f80: 75 b4 jne 119f36 <_Objects_Get_name_as_string+0x16>
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
119f82: 80 7f 38 00 cmpb $0x0,0x38(%edi)
119f86: 74 4e je 119fd6 <_Objects_Get_name_as_string+0xb6>
s = the_object->name.name_p;
119f88: 8b 78 0c mov 0xc(%eax),%edi
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
119f8b: 85 ff test %edi,%edi
119f8d: 74 6e je 119ffd <_Objects_Get_name_as_string+0xdd>
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
119f8f: 4e dec %esi
119f90: 89 75 d4 mov %esi,-0x2c(%ebp)
119f93: 74 68 je 119ffd <_Objects_Get_name_as_string+0xdd><== NEVER TAKEN
119f95: 8a 07 mov (%edi),%al
119f97: 84 c0 test %al,%al
119f99: 74 62 je 119ffd <_Objects_Get_name_as_string+0xdd>
119f9b: 89 d9 mov %ebx,%ecx
119f9d: 31 d2 xor %edx,%edx
119f9f: 89 5d d0 mov %ebx,-0x30(%ebp)
119fa2: eb 07 jmp 119fab <_Objects_Get_name_as_string+0x8b>
119fa4: 8a 04 17 mov (%edi,%edx,1),%al
119fa7: 84 c0 test %al,%al
119fa9: 74 1b je 119fc6 <_Objects_Get_name_as_string+0xa6>
*d = (isprint((unsigned char)*s)) ? *s : '*';
119fab: 0f b6 d8 movzbl %al,%ebx
119fae: 8b 35 98 49 13 00 mov 0x134998,%esi
119fb4: f6 44 1e 01 97 testb $0x97,0x1(%esi,%ebx,1)
119fb9: 75 02 jne 119fbd <_Objects_Get_name_as_string+0x9d>
119fbb: b0 2a mov $0x2a,%al
119fbd: 88 01 mov %al,(%ecx)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
119fbf: 42 inc %edx
119fc0: 41 inc %ecx
119fc1: 3b 55 d4 cmp -0x2c(%ebp),%edx
119fc4: 72 de jb 119fa4 <_Objects_Get_name_as_string+0x84>
119fc6: 8b 5d d0 mov -0x30(%ebp),%ebx
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
119fc9: c6 01 00 movb $0x0,(%ecx)
_Thread_Enable_dispatch();
119fcc: e8 a7 89 ff ff call 112978 <_Thread_Enable_dispatch>
return name;
119fd1: e9 62 ff ff ff jmp 119f38 <_Objects_Get_name_as_string+0x18>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
119fd6: 8b 40 0c mov 0xc(%eax),%eax
lname[ 0 ] = (u32_name >> 24) & 0xff;
119fd9: 89 c2 mov %eax,%edx
119fdb: c1 ea 18 shr $0x18,%edx
119fde: 88 55 df mov %dl,-0x21(%ebp)
lname[ 1 ] = (u32_name >> 16) & 0xff;
119fe1: 89 c2 mov %eax,%edx
119fe3: c1 ea 10 shr $0x10,%edx
119fe6: 88 55 e0 mov %dl,-0x20(%ebp)
lname[ 2 ] = (u32_name >> 8) & 0xff;
119fe9: 89 c2 mov %eax,%edx
119feb: c1 ea 08 shr $0x8,%edx
119fee: 88 55 e1 mov %dl,-0x1f(%ebp)
lname[ 3 ] = (u32_name >> 0) & 0xff;
119ff1: 88 45 e2 mov %al,-0x1e(%ebp)
lname[ 4 ] = '\0';
119ff4: c6 45 e3 00 movb $0x0,-0x1d(%ebp)
119ff8: 8d 7d df lea -0x21(%ebp),%edi
119ffb: eb 92 jmp 119f8f <_Objects_Get_name_as_string+0x6f>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
119ffd: 89 d9 mov %ebx,%ecx
119fff: eb c8 jmp 119fc9 <_Objects_Get_name_as_string+0xa9>
0011d5c4 <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
11d5c4: 55 push %ebp
11d5c5: 89 e5 mov %esp,%ebp
11d5c7: 57 push %edi
11d5c8: 56 push %esi
11d5c9: 53 push %ebx
11d5ca: 83 ec 0c sub $0xc,%esp
11d5cd: 8b 5d 08 mov 0x8(%ebp),%ebx
11d5d0: 8b 75 0c mov 0xc(%ebp),%esi
11d5d3: 8b 7d 10 mov 0x10(%ebp),%edi
Objects_Control *object;
Objects_Id next_id;
if ( !information )
11d5d6: 85 db test %ebx,%ebx
11d5d8: 75 0a jne 11d5e4 <_Objects_Get_next+0x20>
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
11d5da: 31 c0 xor %eax,%eax
}
11d5dc: 8d 65 f4 lea -0xc(%ebp),%esp
11d5df: 5b pop %ebx
11d5e0: 5e pop %esi
11d5e1: 5f pop %edi
11d5e2: c9 leave
11d5e3: c3 ret
Objects_Id next_id;
if ( !information )
return NULL;
if ( !location_p )
11d5e4: 85 ff test %edi,%edi
11d5e6: 74 f2 je 11d5da <_Objects_Get_next+0x16>
return NULL;
if ( !next_id_p )
11d5e8: 8b 45 14 mov 0x14(%ebp),%eax
11d5eb: 85 c0 test %eax,%eax
11d5ed: 74 eb je 11d5da <_Objects_Get_next+0x16>
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
11d5ef: 66 85 f6 test %si,%si
11d5f2: 75 04 jne 11d5f8 <_Objects_Get_next+0x34>
next_id = information->minimum_id;
11d5f4: 8b 73 08 mov 0x8(%ebx),%esi
11d5f7: 90 nop
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
11d5f8: 66 39 73 10 cmp %si,0x10(%ebx)
11d5fc: 72 22 jb 11d620 <_Objects_Get_next+0x5c>
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
11d5fe: 51 push %ecx
11d5ff: 57 push %edi
11d600: 56 push %esi
11d601: 53 push %ebx
11d602: e8 8d 4a ff ff call 112094 <_Objects_Get>
next_id++;
11d607: 46 inc %esi
} while (*location_p != OBJECTS_LOCAL);
11d608: 83 c4 10 add $0x10,%esp
11d60b: 8b 17 mov (%edi),%edx
11d60d: 85 d2 test %edx,%edx
11d60f: 75 e7 jne 11d5f8 <_Objects_Get_next+0x34>
*next_id_p = next_id;
11d611: 8b 55 14 mov 0x14(%ebp),%edx
11d614: 89 32 mov %esi,(%edx)
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
11d616: 8d 65 f4 lea -0xc(%ebp),%esp
11d619: 5b pop %ebx
11d61a: 5e pop %esi
11d61b: 5f pop %edi
11d61c: c9 leave
11d61d: c3 ret
11d61e: 66 90 xchg %ax,%ax
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
{
*location_p = OBJECTS_ERROR;
11d620: c7 07 01 00 00 00 movl $0x1,(%edi)
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
11d626: 8b 45 14 mov 0x14(%ebp),%eax
11d629: c7 00 ff ff ff ff movl $0xffffffff,(%eax)
11d62f: 31 c0 xor %eax,%eax
return 0;
11d631: eb a9 jmp 11d5dc <_Objects_Get_next+0x18>
0011b95c <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
11b95c: 55 push %ebp
11b95d: 89 e5 mov %esp,%ebp
11b95f: 53 push %ebx
11b960: 8b 55 08 mov 0x8(%ebp),%edx
11b963: 8b 5d 10 mov 0x10(%ebp),%ebx
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
11b966: b8 01 00 00 00 mov $0x1,%eax
11b96b: 2b 42 08 sub 0x8(%edx),%eax
11b96e: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
11b971: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
11b975: 39 c8 cmp %ecx,%eax
11b977: 77 13 ja 11b98c <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
11b979: 8b 52 1c mov 0x1c(%edx),%edx
11b97c: 8b 04 82 mov (%edx,%eax,4),%eax
11b97f: 85 c0 test %eax,%eax
11b981: 74 09 je 11b98c <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
11b983: c7 03 00 00 00 00 movl $0x0,(%ebx)
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
return NULL;
}
11b989: 5b pop %ebx
11b98a: c9 leave
11b98b: c3 ret
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
11b98c: c7 03 01 00 00 00 movl $0x1,(%ebx)
11b992: 31 c0 xor %eax,%eax
return NULL;
}
11b994: 5b pop %ebx
11b995: c9 leave
11b996: c3 ret
001120fc <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
1120fc: 55 push %ebp
1120fd: 89 e5 mov %esp,%ebp
1120ff: 83 ec 18 sub $0x18,%esp
112102: 8b 55 08 mov 0x8(%ebp),%edx
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
112105: 85 d2 test %edx,%edx
112107: 75 08 jne 112111 <_Objects_Id_to_name+0x15>
112109: a1 58 74 13 00 mov 0x137458,%eax
11210e: 8b 50 08 mov 0x8(%eax),%edx
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
112111: 89 d0 mov %edx,%eax
112113: c1 e8 18 shr $0x18,%eax
112116: 83 e0 07 and $0x7,%eax
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
112119: 8d 48 ff lea -0x1(%eax),%ecx
11211c: 83 f9 03 cmp $0x3,%ecx
11211f: 77 1d ja 11213e <_Objects_Id_to_name+0x42>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
112121: 8b 04 85 6c 73 13 00 mov 0x13736c(,%eax,4),%eax
112128: 85 c0 test %eax,%eax
11212a: 74 12 je 11213e <_Objects_Id_to_name+0x42>
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
11212c: 89 d1 mov %edx,%ecx
11212e: c1 e9 1b shr $0x1b,%ecx
112131: 8b 04 88 mov (%eax,%ecx,4),%eax
if ( !information )
112134: 85 c0 test %eax,%eax
112136: 74 06 je 11213e <_Objects_Id_to_name+0x42><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
112138: 80 78 38 00 cmpb $0x0,0x38(%eax)
11213c: 74 0a je 112148 <_Objects_Id_to_name+0x4c><== ALWAYS TAKEN
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
11213e: b8 03 00 00 00 mov $0x3,%eax
}
112143: c9 leave
112144: c3 ret
112145: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
112148: 51 push %ecx
112149: 8d 4d f4 lea -0xc(%ebp),%ecx
11214c: 51 push %ecx
11214d: 52 push %edx
11214e: 50 push %eax
11214f: e8 40 ff ff ff call 112094 <_Objects_Get>
if ( !the_object )
112154: 83 c4 10 add $0x10,%esp
112157: 85 c0 test %eax,%eax
112159: 74 e3 je 11213e <_Objects_Id_to_name+0x42>
return OBJECTS_INVALID_ID;
*name = the_object->name;
11215b: 8b 50 0c mov 0xc(%eax),%edx
11215e: 8b 45 0c mov 0xc(%ebp),%eax
112161: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
112163: e8 10 08 00 00 call 112978 <_Thread_Enable_dispatch>
112168: 31 c0 xor %eax,%eax
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
11216a: c9 leave
11216b: c3 ret
0010d460 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
10d460: 55 push %ebp
10d461: 89 e5 mov %esp,%ebp
10d463: 57 push %edi
10d464: 56 push %esi
10d465: 53 push %ebx
10d466: 83 ec 0c sub $0xc,%esp
10d469: 8b 45 08 mov 0x8(%ebp),%eax
10d46c: 8b 55 0c mov 0xc(%ebp),%edx
10d46f: 8b 5d 10 mov 0x10(%ebp),%ebx
10d472: 8b 75 20 mov 0x20(%ebp),%esi
10d475: 0f b7 7d 18 movzwl 0x18(%ebp),%edi
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
10d479: 89 10 mov %edx,(%eax)
information->the_class = the_class;
10d47b: 66 89 58 04 mov %bx,0x4(%eax)
information->size = size;
10d47f: 89 78 18 mov %edi,0x18(%eax)
information->local_table = 0;
10d482: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
information->inactive_per_block = 0;
10d489: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
information->object_blocks = 0;
10d490: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
information->inactive = 0;
10d497: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax)
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
information->is_string = is_string;
10d49d: 8b 7d 1c mov 0x1c(%ebp),%edi
10d4a0: 89 f9 mov %edi,%ecx
10d4a2: 88 48 38 mov %cl,0x38(%eax)
/*
* Set the maximum value to 0. It will be updated when objects are
* added to the inactive set from _Objects_Extend_information()
*/
information->maximum = 0;
10d4a5: 66 c7 40 10 00 00 movw $0x0,0x10(%eax)
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
10d4ab: 8b 3c 95 cc 93 12 00 mov 0x1293cc(,%edx,4),%edi
10d4b2: 89 04 9f mov %eax,(%edi,%ebx,4)
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
10d4b5: 8b 7d 14 mov 0x14(%ebp),%edi
10d4b8: c1 ef 1f shr $0x1f,%edi
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
10d4bb: 89 f9 mov %edi,%ecx
10d4bd: 88 48 12 mov %cl,0x12(%eax)
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
10d4c0: 8b 4d 14 mov 0x14(%ebp),%ecx
10d4c3: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
10d4c9: 85 ff test %edi,%edi
10d4cb: 74 04 je 10d4d1 <_Objects_Initialize_information+0x71>
10d4cd: 85 c9 test %ecx,%ecx
10d4cf: 74 6a je 10d53b <_Objects_Initialize_information+0xdb>
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
10d4d1: 66 89 48 14 mov %cx,0x14(%eax)
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
10d4d5: c7 40 1c 44 90 12 00 movl $0x129044,0x1c(%eax)
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
10d4dc: c1 e2 18 shl $0x18,%edx
10d4df: 81 ca 00 00 01 00 or $0x10000,%edx
10d4e5: c1 e3 1b shl $0x1b,%ebx
10d4e8: 09 da or %ebx,%edx
10d4ea: 31 db xor %ebx,%ebx
10d4ec: 85 c9 test %ecx,%ecx
10d4ee: 0f 95 c3 setne %bl
10d4f1: 09 da or %ebx,%edx
10d4f3: 89 50 08 mov %edx,0x8(%eax)
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
10d4f6: f7 c6 03 00 00 00 test $0x3,%esi
10d4fc: 75 26 jne 10d524 <_Objects_Initialize_information+0xc4>
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
10d4fe: 66 89 70 3a mov %si,0x3a(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10d502: 8d 50 24 lea 0x24(%eax),%edx
10d505: 89 50 20 mov %edx,0x20(%eax)
the_chain->permanent_null = NULL;
10d508: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
the_chain->last = _Chain_Head(the_chain);
10d50f: 8d 50 20 lea 0x20(%eax),%edx
10d512: 89 50 28 mov %edx,0x28(%eax)
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
10d515: 85 c9 test %ecx,%ecx
10d517: 75 13 jne 10d52c <_Objects_Initialize_information+0xcc>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10d519: 8d 65 f4 lea -0xc(%ebp),%esp
10d51c: 5b pop %ebx
10d51d: 5e pop %esi
10d51e: 5f pop %edi
10d51f: c9 leave
10d520: c3 ret
10d521: 8d 76 00 lea 0x0(%esi),%esi
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
10d524: 83 c6 04 add $0x4,%esi
10d527: 83 e6 fc and $0xfffffffc,%esi
10d52a: eb d2 jmp 10d4fe <_Objects_Initialize_information+0x9e>
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10d52c: 89 45 08 mov %eax,0x8(%ebp)
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10d52f: 8d 65 f4 lea -0xc(%ebp),%esp
10d532: 5b pop %ebx
10d533: 5e pop %esi
10d534: 5f pop %edi
10d535: c9 leave
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10d536: e9 b1 fa ff ff jmp 10cfec <_Objects_Extend_information>
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
_Internal_error_Occurred(
10d53b: 50 push %eax
10d53c: 6a 14 push $0x14
10d53e: 6a 01 push $0x1
10d540: 6a 00 push $0x0
10d542: e8 69 f9 ff ff call 10ceb0 <_Internal_error_Occurred>
00118a5c <_Objects_Name_to_id_string>:
Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string(
Objects_Information *information,
const char *name,
Objects_Id *id
)
{
118a5c: 55 push %ebp
118a5d: 89 e5 mov %esp,%ebp
118a5f: 57 push %edi
118a60: 56 push %esi
118a61: 53 push %ebx
118a62: 83 ec 1c sub $0x1c,%esp
118a65: 8b 7d 08 mov 0x8(%ebp),%edi
uint32_t index;
uint32_t name_length;
/* ASSERT: information->is_string == true */
if ( !id )
118a68: 8b 5d 10 mov 0x10(%ebp),%ebx
118a6b: 85 db test %ebx,%ebx
118a6d: 74 75 je 118ae4 <_Objects_Name_to_id_string+0x88>
return OBJECTS_INVALID_ADDRESS;
if ( !name )
118a6f: 8b 4d 0c mov 0xc(%ebp),%ecx
118a72: 85 c9 test %ecx,%ecx
118a74: 74 4b je 118ac1 <_Objects_Name_to_id_string+0x65>
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
118a76: 8b 47 10 mov 0x10(%edi),%eax
118a79: 66 85 c0 test %ax,%ax
118a7c: 74 43 je 118ac1 <_Objects_Name_to_id_string+0x65>
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
118a7e: 0f b7 c0 movzwl %ax,%eax
118a81: 89 45 e4 mov %eax,-0x1c(%ebp)
118a84: 8b 47 1c mov 0x1c(%edi),%eax
118a87: bb 01 00 00 00 mov $0x1,%ebx
118a8c: 89 7d e0 mov %edi,-0x20(%ebp)
118a8f: 89 c7 mov %eax,%edi
118a91: 8d 76 00 lea 0x0(%esi),%esi
the_object = information->local_table[ index ];
118a94: 8b 34 9f mov (%edi,%ebx,4),%esi
if ( !the_object )
118a97: 85 f6 test %esi,%esi
118a99: 74 20 je 118abb <_Objects_Name_to_id_string+0x5f>
continue;
if ( !the_object->name.name_p )
118a9b: 8b 46 0c mov 0xc(%esi),%eax
118a9e: 85 c0 test %eax,%eax
118aa0: 74 19 je 118abb <_Objects_Name_to_id_string+0x5f>
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
118aa2: 52 push %edx
118aa3: 8b 4d e0 mov -0x20(%ebp),%ecx
118aa6: 0f b7 51 3a movzwl 0x3a(%ecx),%edx
118aaa: 52 push %edx
118aab: 50 push %eax
118aac: ff 75 0c pushl 0xc(%ebp)
118aaf: e8 e8 3c 00 00 call 11c79c <strncmp>
118ab4: 83 c4 10 add $0x10,%esp
118ab7: 85 c0 test %eax,%eax
118ab9: 74 15 je 118ad0 <_Objects_Name_to_id_string+0x74>
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
118abb: 43 inc %ebx
118abc: 3b 5d e4 cmp -0x1c(%ebp),%ebx
118abf: 76 d3 jbe 118a94 <_Objects_Name_to_id_string+0x38>
118ac1: b8 01 00 00 00 mov $0x1,%eax
}
}
}
return OBJECTS_INVALID_NAME;
}
118ac6: 8d 65 f4 lea -0xc(%ebp),%esp
118ac9: 5b pop %ebx
118aca: 5e pop %esi
118acb: 5f pop %edi
118acc: c9 leave
118acd: c3 ret
118ace: 66 90 xchg %ax,%ax
if ( !the_object->name.name_p )
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
*id = the_object->id;
118ad0: 8b 46 08 mov 0x8(%esi),%eax
118ad3: 8b 55 10 mov 0x10(%ebp),%edx
118ad6: 89 02 mov %eax,(%edx)
118ad8: 31 c0 xor %eax,%eax
}
}
}
return OBJECTS_INVALID_NAME;
}
118ada: 8d 65 f4 lea -0xc(%ebp),%esp
118add: 5b pop %ebx
118ade: 5e pop %esi
118adf: 5f pop %edi
118ae0: c9 leave
118ae1: c3 ret
118ae2: 66 90 xchg %ax,%ax
uint32_t index;
uint32_t name_length;
/* ASSERT: information->is_string == true */
if ( !id )
118ae4: b8 02 00 00 00 mov $0x2,%eax
}
}
}
return OBJECTS_INVALID_NAME;
}
118ae9: 8d 65 f4 lea -0xc(%ebp),%esp
118aec: 5b pop %ebx
118aed: 5e pop %esi
118aee: 5f pop %edi
118aef: c9 leave
118af0: c3 ret
0010d57c <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
10d57c: 55 push %ebp
10d57d: 89 e5 mov %esp,%ebp
10d57f: 57 push %edi
10d580: 56 push %esi
10d581: 53 push %ebx
10d582: 8b 45 08 mov 0x8(%ebp),%eax
10d585: 8b 4d 0c mov 0xc(%ebp),%ecx
10d588: 8b 55 10 mov 0x10(%ebp),%edx
10d58b: 8b 7d 14 mov 0x14(%ebp),%edi
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
10d58e: 85 ff test %edi,%edi
10d590: 74 56 je 10d5e8 <_Objects_Name_to_id_u32+0x6c>
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
10d592: 85 c9 test %ecx,%ecx
10d594: 74 08 je 10d59e <_Objects_Name_to_id_u32+0x22>
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
10d596: 8b 70 10 mov 0x10(%eax),%esi
10d599: 66 85 f6 test %si,%si
10d59c: 75 0a jne 10d5a8 <_Objects_Name_to_id_u32+0x2c>
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
10d59e: b8 01 00 00 00 mov $0x1,%eax
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
10d5a3: 5b pop %ebx
10d5a4: 5e pop %esi
10d5a5: 5f pop %edi
10d5a6: c9 leave
10d5a7: c3 ret
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
10d5a8: 85 d2 test %edx,%edx
10d5aa: 75 20 jne 10d5cc <_Objects_Name_to_id_u32+0x50>
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
10d5ac: 0f b7 f6 movzwl %si,%esi
10d5af: 8b 58 1c mov 0x1c(%eax),%ebx
10d5b2: b8 01 00 00 00 mov $0x1,%eax
10d5b7: 90 nop
the_object = information->local_table[ index ];
10d5b8: 8b 14 83 mov (%ebx,%eax,4),%edx
if ( !the_object )
10d5bb: 85 d2 test %edx,%edx
10d5bd: 74 05 je 10d5c4 <_Objects_Name_to_id_u32+0x48>
continue;
if ( name == the_object->name.name_u32 ) {
10d5bf: 39 4a 0c cmp %ecx,0xc(%edx)
10d5c2: 74 18 je 10d5dc <_Objects_Name_to_id_u32+0x60>
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
10d5c4: 40 inc %eax
10d5c5: 39 c6 cmp %eax,%esi
10d5c7: 73 ef jae 10d5b8 <_Objects_Name_to_id_u32+0x3c>
10d5c9: eb d3 jmp 10d59e <_Objects_Name_to_id_u32+0x22>
10d5cb: 90 nop
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
10d5cc: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx
10d5d2: 74 d8 je 10d5ac <_Objects_Name_to_id_u32+0x30>
10d5d4: 4a dec %edx
10d5d5: 75 c7 jne 10d59e <_Objects_Name_to_id_u32+0x22>
10d5d7: eb d3 jmp 10d5ac <_Objects_Name_to_id_u32+0x30>
10d5d9: 8d 76 00 lea 0x0(%esi),%esi
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
10d5dc: 8b 42 08 mov 0x8(%edx),%eax
10d5df: 89 07 mov %eax,(%edi)
10d5e1: 31 c0 xor %eax,%eax
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
10d5e3: 5b pop %ebx
10d5e4: 5e pop %esi
10d5e5: 5f pop %edi
10d5e6: c9 leave
10d5e7: c3 ret
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
10d5e8: b8 02 00 00 00 mov $0x2,%eax
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
10d5ed: 5b pop %ebx
10d5ee: 5e pop %esi
10d5ef: 5f pop %edi
10d5f0: c9 leave
10d5f1: c3 ret
0010dc24 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
10dc24: 55 push %ebp
10dc25: 89 e5 mov %esp,%ebp
10dc27: 57 push %edi
10dc28: 56 push %esi
10dc29: 53 push %ebx
10dc2a: 83 ec 14 sub $0x14,%esp
10dc2d: 8b 7d 08 mov 0x8(%ebp),%edi
10dc30: 8b 5d 10 mov 0x10(%ebp),%ebx
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
10dc33: 0f b7 47 3a movzwl 0x3a(%edi),%eax
10dc37: 50 push %eax
10dc38: 53 push %ebx
10dc39: e8 7a 91 00 00 call 116db8 <strnlen>
10dc3e: 89 c6 mov %eax,%esi
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
10dc40: 83 c4 10 add $0x10,%esp
10dc43: 80 7f 38 00 cmpb $0x0,0x38(%edi)
10dc47: 75 53 jne 10dc9c <_Objects_Set_name+0x78>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10dc49: 0f be 13 movsbl (%ebx),%edx
10dc4c: c1 e2 18 shl $0x18,%edx
10dc4f: 83 f8 01 cmp $0x1,%eax
10dc52: 76 34 jbe 10dc88 <_Objects_Set_name+0x64>
10dc54: 0f be 43 01 movsbl 0x1(%ebx),%eax
10dc58: c1 e0 10 shl $0x10,%eax
10dc5b: 09 d0 or %edx,%eax
10dc5d: 83 fe 02 cmp $0x2,%esi
10dc60: 74 2d je 10dc8f <_Objects_Set_name+0x6b>
10dc62: 0f be 53 02 movsbl 0x2(%ebx),%edx
10dc66: c1 e2 08 shl $0x8,%edx
10dc69: 09 c2 or %eax,%edx
10dc6b: 83 fe 03 cmp $0x3,%esi
10dc6e: 74 24 je 10dc94 <_Objects_Set_name+0x70>
10dc70: 0f be 43 03 movsbl 0x3(%ebx),%eax
10dc74: 09 c2 or %eax,%edx
10dc76: 8b 45 0c mov 0xc(%ebp),%eax
10dc79: 89 50 0c mov %edx,0xc(%eax)
10dc7c: b0 01 mov $0x1,%al
);
}
return true;
}
10dc7e: 8d 65 f4 lea -0xc(%ebp),%esp
10dc81: 5b pop %ebx
10dc82: 5e pop %esi
10dc83: 5f pop %edi
10dc84: c9 leave
10dc85: c3 ret
10dc86: 66 90 xchg %ax,%ax
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10dc88: 89 d0 mov %edx,%eax
10dc8a: 0d 00 00 20 00 or $0x200000,%eax
10dc8f: 89 c2 mov %eax,%edx
10dc91: 80 ce 20 or $0x20,%dh
10dc94: b8 20 00 00 00 mov $0x20,%eax
10dc99: eb d9 jmp 10dc74 <_Objects_Set_name+0x50>
10dc9b: 90 nop
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
10dc9c: 83 ec 0c sub $0xc,%esp
10dc9f: 8d 40 01 lea 0x1(%eax),%eax
10dca2: 50 push %eax
10dca3: e8 68 18 00 00 call 10f510 <_Workspace_Allocate>
10dca8: 89 c7 mov %eax,%edi
if ( !d )
10dcaa: 83 c4 10 add $0x10,%esp
10dcad: 85 c0 test %eax,%eax
10dcaf: 74 43 je 10dcf4 <_Objects_Set_name+0xd0><== NEVER TAKEN
return false;
if ( the_object->name.name_p ) {
10dcb1: 8b 55 0c mov 0xc(%ebp),%edx
10dcb4: 8b 42 0c mov 0xc(%edx),%eax
10dcb7: 85 c0 test %eax,%eax
10dcb9: 74 16 je 10dcd1 <_Objects_Set_name+0xad>
_Workspace_Free( (void *)the_object->name.name_p );
10dcbb: 83 ec 0c sub $0xc,%esp
10dcbe: 50 push %eax
10dcbf: e8 68 18 00 00 call 10f52c <_Workspace_Free>
the_object->name.name_p = NULL;
10dcc4: 8b 45 0c mov 0xc(%ebp),%eax
10dcc7: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
10dcce: 83 c4 10 add $0x10,%esp
}
strncpy( d, name, length );
10dcd1: 50 push %eax
10dcd2: 56 push %esi
10dcd3: 53 push %ebx
10dcd4: 57 push %edi
10dcd5: e8 62 90 00 00 call 116d3c <strncpy>
d[length] = '\0';
10dcda: c6 04 37 00 movb $0x0,(%edi,%esi,1)
the_object->name.name_p = d;
10dcde: 8b 55 0c mov 0xc(%ebp),%edx
10dce1: 89 7a 0c mov %edi,0xc(%edx)
10dce4: b0 01 mov $0x1,%al
10dce6: 83 c4 10 add $0x10,%esp
);
}
return true;
}
10dce9: 8d 65 f4 lea -0xc(%ebp),%esp
10dcec: 5b pop %ebx
10dced: 5e pop %esi
10dcee: 5f pop %edi
10dcef: c9 leave
10dcf0: c3 ret
10dcf1: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
10dcf4: 31 c0 xor %eax,%eax
10dcf6: eb 86 jmp 10dc7e <_Objects_Set_name+0x5a><== NOT EXECUTED
0010d5f4 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
10d5f4: 55 push %ebp
10d5f5: 89 e5 mov %esp,%ebp
10d5f7: 57 push %edi
10d5f8: 56 push %esi
10d5f9: 53 push %ebx
10d5fa: 83 ec 1c sub $0x1c,%esp
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
10d5fd: 8b 45 08 mov 0x8(%ebp),%eax
10d600: 0f b7 58 08 movzwl 0x8(%eax),%ebx
block_count = (information->maximum - index_base) /
10d604: 0f b7 48 14 movzwl 0x14(%eax),%ecx
10d608: 0f b7 40 10 movzwl 0x10(%eax),%eax
10d60c: 29 d8 sub %ebx,%eax
10d60e: 31 d2 xor %edx,%edx
10d610: f7 f1 div %ecx
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d612: 85 c0 test %eax,%eax
10d614: 74 21 je 10d637 <_Objects_Shrink_information+0x43><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
10d616: 8b 55 08 mov 0x8(%ebp),%edx
10d619: 8b 7a 30 mov 0x30(%edx),%edi
10d61c: 3b 0f cmp (%edi),%ecx
10d61e: 74 1f je 10d63f <_Objects_Shrink_information+0x4b><== NEVER TAKEN
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
10d620: 31 d2 xor %edx,%edx
10d622: eb 0e jmp 10d632 <_Objects_Shrink_information+0x3e>
}
index_base += information->allocation_size;
10d624: 01 cb add %ecx,%ebx
10d626: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
10d62d: 3b 0c 97 cmp (%edi,%edx,4),%ecx
10d630: 74 12 je 10d644 <_Objects_Shrink_information+0x50>
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d632: 42 inc %edx
10d633: 39 d0 cmp %edx,%eax
10d635: 77 ed ja 10d624 <_Objects_Shrink_information+0x30>
return;
}
index_base += information->allocation_size;
}
}
10d637: 8d 65 f4 lea -0xc(%ebp),%esp
10d63a: 5b pop %ebx
10d63b: 5e pop %esi
10d63c: 5f pop %edi
10d63d: c9 leave
10d63e: c3 ret
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
10d63f: 31 f6 xor %esi,%esi
10d641: 8d 76 00 lea 0x0(%esi),%esi
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
10d644: 8b 55 08 mov 0x8(%ebp),%edx
10d647: 8b 42 20 mov 0x20(%edx),%eax
10d64a: 89 75 e4 mov %esi,-0x1c(%ebp)
10d64d: eb 07 jmp 10d656 <_Objects_Shrink_information+0x62>
10d64f: 90 nop
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
10d650: 85 ff test %edi,%edi
10d652: 74 2c je 10d680 <_Objects_Shrink_information+0x8c>
10d654: 89 f8 mov %edi,%eax
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
do {
index = _Objects_Get_index( the_object->id );
10d656: 0f b7 50 08 movzwl 0x8(%eax),%edx
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10d65a: 8b 38 mov (%eax),%edi
if ((index >= index_base) &&
10d65c: 39 da cmp %ebx,%edx
10d65e: 72 f0 jb 10d650 <_Objects_Shrink_information+0x5c>
(index < (index_base + information->allocation_size))) {
10d660: 8b 75 08 mov 0x8(%ebp),%esi
10d663: 0f b7 4e 14 movzwl 0x14(%esi),%ecx
10d667: 8d 0c 0b lea (%ebx,%ecx,1),%ecx
10d66a: 39 ca cmp %ecx,%edx
10d66c: 73 e2 jae 10d650 <_Objects_Shrink_information+0x5c>
_Chain_Extract( &extract_me->Node );
10d66e: 83 ec 0c sub $0xc,%esp
10d671: 50 push %eax
10d672: e8 81 ef ff ff call 10c5f8 <_Chain_Extract>
10d677: 83 c4 10 add $0x10,%esp
}
}
while ( the_object );
10d67a: 85 ff test %edi,%edi
10d67c: 75 d6 jne 10d654 <_Objects_Shrink_information+0x60>
10d67e: 66 90 xchg %ax,%ax
10d680: 8b 75 e4 mov -0x1c(%ebp),%esi
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
10d683: 83 ec 0c sub $0xc,%esp
10d686: 8b 55 08 mov 0x8(%ebp),%edx
10d689: 8b 42 34 mov 0x34(%edx),%eax
10d68c: ff 34 30 pushl (%eax,%esi,1)
10d68f: e8 94 17 00 00 call 10ee28 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
10d694: 8b 55 08 mov 0x8(%ebp),%edx
10d697: 8b 42 34 mov 0x34(%edx),%eax
10d69a: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1)
information->inactive_per_block[ block ] = 0;
10d6a1: 8b 42 30 mov 0x30(%edx),%eax
10d6a4: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1)
information->inactive -= information->allocation_size;
10d6ab: 8b 42 14 mov 0x14(%edx),%eax
10d6ae: 66 29 42 2c sub %ax,0x2c(%edx)
return;
10d6b2: 83 c4 10 add $0x10,%esp
}
index_base += information->allocation_size;
}
}
10d6b5: 8d 65 f4 lea -0xc(%ebp),%esp
10d6b8: 5b pop %ebx
10d6b9: 5e pop %esi
10d6ba: 5f pop %edi
10d6bb: c9 leave
10d6bc: c3 ret
0010dae8 <_POSIX_Absolute_timeout_to_ticks>:
*/
POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
const struct timespec *abstime,
Watchdog_Interval *ticks_out
)
{
10dae8: 55 push %ebp
10dae9: 89 e5 mov %esp,%ebp
10daeb: 57 push %edi
10daec: 56 push %esi
10daed: 53 push %ebx
10daee: 83 ec 38 sub $0x38,%esp
10daf1: 8b 5d 08 mov 0x8(%ebp),%ebx
10daf4: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Make sure there is always a value returned.
*/
*ticks_out = 0;
10daf7: c7 06 00 00 00 00 movl $0x0,(%esi)
/*
* Is the absolute time even valid?
*/
if ( !_Timespec_Is_valid(abstime) )
10dafd: 53 push %ebx
10dafe: e8 e1 3c 00 00 call 1117e4 <_Timespec_Is_valid>
10db03: 83 c4 10 add $0x10,%esp
10db06: 84 c0 test %al,%al
10db08: 75 0a jne 10db14 <_POSIX_Absolute_timeout_to_ticks+0x2c>
10db0a: 31 c0 xor %eax,%eax
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
10db0c: 8d 65 f4 lea -0xc(%ebp),%esp
10db0f: 5b pop %ebx
10db10: 5e pop %esi
10db11: 5f pop %edi
10db12: c9 leave
10db13: c3 ret
return POSIX_ABSOLUTE_TIMEOUT_INVALID;
/*
* Is the absolute time in the past?
*/
_TOD_Get( ¤t_time );
10db14: 83 ec 0c sub $0xc,%esp
10db17: 8d 7d e0 lea -0x20(%ebp),%edi
10db1a: 57 push %edi
10db1b: e8 c4 1d 00 00 call 10f8e4 <_TOD_Get>
if ( _Timespec_Less_than( abstime, ¤t_time ) )
10db20: 5a pop %edx
10db21: 59 pop %ecx
10db22: 57 push %edi
10db23: 53 push %ebx
10db24: e8 e3 3c 00 00 call 11180c <_Timespec_Less_than>
10db29: 83 c4 10 add $0x10,%esp
10db2c: 84 c0 test %al,%al
10db2e: 74 10 je 10db40 <_POSIX_Absolute_timeout_to_ticks+0x58>
10db30: b8 01 00 00 00 mov $0x1,%eax
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
10db35: 8d 65 f4 lea -0xc(%ebp),%esp
10db38: 5b pop %ebx
10db39: 5e pop %esi
10db3a: 5f pop %edi
10db3b: c9 leave
10db3c: c3 ret
10db3d: 8d 76 00 lea 0x0(%esi),%esi
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
/*
* How long until the requested absolute time?
*/
_Timespec_Subtract( ¤t_time, abstime, &difference );
10db40: 50 push %eax
10db41: 8d 45 d8 lea -0x28(%ebp),%eax
10db44: 50 push %eax
10db45: 53 push %ebx
10db46: 57 push %edi
10db47: 89 45 d4 mov %eax,-0x2c(%ebp)
10db4a: e8 e1 3c 00 00 call 111830 <_Timespec_Subtract>
/*
* Internally the SuperCore uses ticks, so convert to them.
*/
*ticks_out = _Timespec_To_ticks( &difference );
10db4f: 8b 45 d4 mov -0x2c(%ebp),%eax
10db52: 89 04 24 mov %eax,(%esp)
10db55: e8 12 3d 00 00 call 11186c <_Timespec_To_ticks>
10db5a: 89 06 mov %eax,(%esi)
/*
* If the difference was 0, then the future is now. It is so bright
* we better wear shades.
*/
if ( !*ticks_out )
10db5c: 83 c4 10 add $0x10,%esp
10db5f: 83 f8 01 cmp $0x1,%eax
10db62: 19 c0 sbb %eax,%eax
10db64: 83 c0 03 add $0x3,%eax
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
10db67: 8d 65 f4 lea -0xc(%ebp),%esp
10db6a: 5b pop %ebx
10db6b: 5e pop %esi
10db6c: 5f pop %edi
10db6d: c9 leave
10db6e: c3 ret
0010c6c8 <_POSIX_Condition_variables_Get>:
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
10c6c8: 55 push %ebp
10c6c9: 89 e5 mov %esp,%ebp
10c6cb: 56 push %esi
10c6cc: 53 push %ebx
10c6cd: 8b 5d 08 mov 0x8(%ebp),%ebx
10c6d0: 8b 75 0c mov 0xc(%ebp),%esi
int status;
if ( !cond ) {
10c6d3: 85 db test %ebx,%ebx
10c6d5: 74 39 je 10c710 <_POSIX_Condition_variables_Get+0x48>
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
}
if ( *cond == PTHREAD_COND_INITIALIZER ) {
10c6d7: 8b 03 mov (%ebx),%eax
10c6d9: 83 f8 ff cmp $0xffffffff,%eax
10c6dc: 74 1a je 10c6f8 <_POSIX_Condition_variables_Get+0x30>
}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)_Objects_Get(
10c6de: 52 push %edx
10c6df: 56 push %esi
10c6e0: 50 push %eax
10c6e1: 68 00 c4 12 00 push $0x12c400
10c6e6: e8 91 2b 00 00 call 10f27c <_Objects_Get>
10c6eb: 83 c4 10 add $0x10,%esp
&_POSIX_Condition_variables_Information,
(Objects_Id) *cond,
location
);
}
10c6ee: 8d 65 f8 lea -0x8(%ebp),%esp
10c6f1: 5b pop %ebx
10c6f2: 5e pop %esi
10c6f3: c9 leave
10c6f4: c3 ret
10c6f5: 8d 76 00 lea 0x0(%esi),%esi
if ( *cond == PTHREAD_COND_INITIALIZER ) {
/*
* Do an "auto-create" here.
*/
status = pthread_cond_init( cond, 0 );
10c6f8: 83 ec 08 sub $0x8,%esp
10c6fb: 6a 00 push $0x0
10c6fd: 53 push %ebx
10c6fe: e8 19 00 00 00 call 10c71c <pthread_cond_init>
if ( status ) {
10c703: 83 c4 10 add $0x10,%esp
10c706: 85 c0 test %eax,%eax
10c708: 75 06 jne 10c710 <_POSIX_Condition_variables_Get+0x48>
10c70a: 8b 03 mov (%ebx),%eax
10c70c: eb d0 jmp 10c6de <_POSIX_Condition_variables_Get+0x16>
10c70e: 66 90 xchg %ax,%ax
*location = OBJECTS_ERROR;
10c710: c7 06 01 00 00 00 movl $0x1,(%esi)
10c716: 31 c0 xor %eax,%eax
return (POSIX_Condition_variables_Control *) 0;
10c718: eb d4 jmp 10c6ee <_POSIX_Condition_variables_Get+0x26>
0010c7e4 <_POSIX_Condition_variables_Signal_support>:
int _POSIX_Condition_variables_Signal_support(
pthread_cond_t *cond,
bool is_broadcast
)
{
10c7e4: 55 push %ebp
10c7e5: 89 e5 mov %esp,%ebp
10c7e7: 57 push %edi
10c7e8: 56 push %esi
10c7e9: 53 push %ebx
10c7ea: 83 ec 24 sub $0x24,%esp
10c7ed: 8a 5d 0c mov 0xc(%ebp),%bl
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
Thread_Control *the_thread;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10c7f0: 8d 45 e4 lea -0x1c(%ebp),%eax
10c7f3: 50 push %eax
10c7f4: ff 75 08 pushl 0x8(%ebp)
10c7f7: e8 cc fe ff ff call 10c6c8 <_POSIX_Condition_variables_Get>
10c7fc: 89 c7 mov %eax,%edi
switch ( location ) {
10c7fe: 83 c4 10 add $0x10,%esp
10c801: 8b 45 e4 mov -0x1c(%ebp),%eax
10c804: 85 c0 test %eax,%eax
10c806: 74 10 je 10c818 <_POSIX_Condition_variables_Signal_support+0x34>
10c808: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c80d: 8d 65 f4 lea -0xc(%ebp),%esp
10c810: 5b pop %ebx
10c811: 5e pop %esi
10c812: 5f pop %edi
10c813: c9 leave
10c814: c3 ret
10c815: 8d 76 00 lea 0x0(%esi),%esi
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
do {
the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue );
10c818: 8d 77 18 lea 0x18(%edi),%esi
10c81b: eb 0b jmp 10c828 <_POSIX_Condition_variables_Signal_support+0x44>
10c81d: 8d 76 00 lea 0x0(%esi),%esi
if ( !the_thread )
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
} while ( is_broadcast && the_thread );
10c820: 84 db test %bl,%bl
10c822: 74 20 je 10c844 <_POSIX_Condition_variables_Signal_support+0x60>
10c824: 85 c0 test %eax,%eax
10c826: 74 1c je 10c844 <_POSIX_Condition_variables_Signal_support+0x60>
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
do {
the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue );
10c828: 83 ec 0c sub $0xc,%esp
10c82b: 56 push %esi
10c82c: e8 db 36 00 00 call 10ff0c <_Thread_queue_Dequeue>
if ( !the_thread )
10c831: 83 c4 10 add $0x10,%esp
10c834: 85 c0 test %eax,%eax
10c836: 75 e8 jne 10c820 <_POSIX_Condition_variables_Signal_support+0x3c>
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10c838: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi)
} while ( is_broadcast && the_thread );
10c83f: 84 db test %bl,%bl
10c841: 75 e1 jne 10c824 <_POSIX_Condition_variables_Signal_support+0x40>
10c843: 90 nop
_Thread_Enable_dispatch();
10c844: e8 a7 32 00 00 call 10faf0 <_Thread_Enable_dispatch>
10c849: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c84b: 8d 65 f4 lea -0xc(%ebp),%esp
10c84e: 5b pop %ebx
10c84f: 5e pop %esi
10c850: 5f pop %edi
10c851: c9 leave
10c852: c3 ret
0010c8ac <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
10c8ac: 55 push %ebp
10c8ad: 89 e5 mov %esp,%ebp
10c8af: 57 push %edi
10c8b0: 56 push %esi
10c8b1: 53 push %ebx
10c8b2: 83 ec 34 sub $0x34,%esp
10c8b5: 8b 7d 08 mov 0x8(%ebp),%edi
10c8b8: 8b 5d 0c mov 0xc(%ebp),%ebx
10c8bb: 8a 45 14 mov 0x14(%ebp),%al
10c8be: 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 ) ) {
10c8c1: 8d 75 e4 lea -0x1c(%ebp),%esi
10c8c4: 56 push %esi
10c8c5: 53 push %ebx
10c8c6: e8 b1 01 00 00 call 10ca7c <_POSIX_Mutex_Get>
10c8cb: 83 c4 10 add $0x10,%esp
10c8ce: 85 c0 test %eax,%eax
10c8d0: 74 21 je 10c8f3 <_POSIX_Condition_variables_Wait_support+0x47>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10c8d2: a1 18 bf 12 00 mov 0x12bf18,%eax
10c8d7: 48 dec %eax
10c8d8: a3 18 bf 12 00 mov %eax,0x12bf18
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10c8dd: 83 ec 08 sub $0x8,%esp
10c8e0: 56 push %esi
10c8e1: 57 push %edi
10c8e2: e8 e1 fd ff ff call 10c6c8 <_POSIX_Condition_variables_Get>
10c8e7: 89 c6 mov %eax,%esi
switch ( location ) {
10c8e9: 83 c4 10 add $0x10,%esp
10c8ec: 8b 55 e4 mov -0x1c(%ebp),%edx
10c8ef: 85 d2 test %edx,%edx
10c8f1: 74 11 je 10c904 <_POSIX_Condition_variables_Wait_support+0x58>
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
if ( mutex_status )
10c8f3: be 16 00 00 00 mov $0x16,%esi
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c8f8: 89 f0 mov %esi,%eax
10c8fa: 8d 65 f4 lea -0xc(%ebp),%esp
10c8fd: 5b pop %ebx
10c8fe: 5e pop %esi
10c8ff: 5f pop %edi
10c900: c9 leave
10c901: c3 ret
10c902: 66 90 xchg %ax,%ax
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
10c904: 8b 40 14 mov 0x14(%eax),%eax
10c907: 85 c0 test %eax,%eax
10c909: 74 19 je 10c924 <_POSIX_Condition_variables_Wait_support+0x78>
10c90b: 3b 03 cmp (%ebx),%eax
10c90d: 74 15 je 10c924 <_POSIX_Condition_variables_Wait_support+0x78>
_Thread_Enable_dispatch();
10c90f: e8 dc 31 00 00 call 10faf0 <_Thread_Enable_dispatch>
10c914: be 16 00 00 00 mov $0x16,%esi
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c919: 89 f0 mov %esi,%eax
10c91b: 8d 65 f4 lea -0xc(%ebp),%esp
10c91e: 5b pop %ebx
10c91f: 5e pop %esi
10c920: 5f pop %edi
10c921: c9 leave
10c922: c3 ret
10c923: 90 nop
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
_Thread_Enable_dispatch();
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
10c924: 83 ec 0c sub $0xc,%esp
10c927: 53 push %ebx
10c928: e8 73 03 00 00 call 10cca0 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
10c92d: 83 c4 10 add $0x10,%esp
10c930: 80 7d d7 00 cmpb $0x0,-0x29(%ebp)
10c934: 74 26 je 10c95c <_POSIX_Condition_variables_Wait_support+0xb0>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
10c936: e8 b5 31 00 00 call 10faf0 <_Thread_Enable_dispatch>
10c93b: be 74 00 00 00 mov $0x74,%esi
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
10c940: 83 ec 0c sub $0xc,%esp
10c943: 53 push %ebx
10c944: e8 cf 02 00 00 call 10cc18 <pthread_mutex_lock>
if ( mutex_status )
10c949: 83 c4 10 add $0x10,%esp
10c94c: 85 c0 test %eax,%eax
10c94e: 75 a3 jne 10c8f3 <_POSIX_Condition_variables_Wait_support+0x47>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c950: 89 f0 mov %esi,%eax
10c952: 8d 65 f4 lea -0xc(%ebp),%esp
10c955: 5b pop %ebx
10c956: 5e pop %esi
10c957: 5f pop %edi
10c958: c9 leave
10c959: c3 ret
10c95a: 66 90 xchg %ax,%ax
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
10c95c: 8b 03 mov (%ebx),%eax
10c95e: 89 46 14 mov %eax,0x14(%esi)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10c961: c7 46 48 01 00 00 00 movl $0x1,0x48(%esi)
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
10c968: a1 d8 bf 12 00 mov 0x12bfd8,%eax
10c96d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
10c974: 83 c6 18 add $0x18,%esi
10c977: 89 70 44 mov %esi,0x44(%eax)
_Thread_Executing->Wait.id = *cond;
10c97a: 8b 17 mov (%edi),%edx
10c97c: 89 50 20 mov %edx,0x20(%eax)
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
10c97f: 50 push %eax
10c980: 68 8c 03 11 00 push $0x11038c
10c985: ff 75 10 pushl 0x10(%ebp)
10c988: 56 push %esi
10c989: e8 9a 36 00 00 call 110028 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10c98e: e8 5d 31 00 00 call 10faf0 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
10c993: a1 d8 bf 12 00 mov 0x12bfd8,%eax
10c998: 8b 70 34 mov 0x34(%eax),%esi
if ( status && status != ETIMEDOUT )
10c99b: 83 c4 10 add $0x10,%esp
10c99e: 85 f6 test %esi,%esi
10c9a0: 74 9e je 10c940 <_POSIX_Condition_variables_Wait_support+0x94>
10c9a2: 83 fe 74 cmp $0x74,%esi
10c9a5: 0f 85 4d ff ff ff jne 10c8f8 <_POSIX_Condition_variables_Wait_support+0x4c><== NEVER TAKEN
10c9ab: eb 93 jmp 10c940 <_POSIX_Condition_variables_Wait_support+0x94>
001143d8 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
1143d8: 55 push %ebp
1143d9: 89 e5 mov %esp,%ebp
1143db: 57 push %edi
1143dc: 56 push %esi
1143dd: 53 push %ebx
1143de: 83 ec 1c sub $0x1c,%esp
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
1143e1: 8b 45 08 mov 0x8(%ebp),%eax
1143e4: 8b 50 08 mov 0x8(%eax),%edx
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
1143e7: 89 d0 mov %edx,%eax
1143e9: c1 e8 18 shr $0x18,%eax
1143ec: 83 e0 07 and $0x7,%eax
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
1143ef: 0f b7 d2 movzwl %dx,%edx
1143f2: c1 e2 02 shl $0x2,%edx
1143f5: 89 55 e4 mov %edx,-0x1c(%ebp)
1143f8: 83 c0 04 add $0x4,%eax
1143fb: 89 45 e0 mov %eax,-0x20(%ebp)
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
1143fe: 8b 1d b0 98 12 00 mov 0x1298b0,%ebx
done = true;
for ( index = 1 ; index <= max ; ++index ) {
114404: 66 85 db test %bx,%bx
114407: 75 0b jne 114414 <_POSIX_Keys_Run_destructors+0x3c>
done = false;
}
}
}
}
}
114409: 8d 65 f4 lea -0xc(%ebp),%esp
11440c: 5b pop %ebx
11440d: 5e pop %esi
11440e: 5f pop %edi
11440f: c9 leave
114410: c3 ret
114411: 8d 76 00 lea 0x0(%esi),%esi
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
114414: be 01 00 00 00 mov $0x1,%esi
114419: b2 01 mov $0x1,%dl
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
11441b: 0f b7 ce movzwl %si,%ecx
11441e: a1 bc 98 12 00 mov 0x1298bc,%eax
114423: 8b 04 88 mov (%eax,%ecx,4),%eax
if ( key != NULL && key->destructor != NULL ) {
114426: 85 c0 test %eax,%eax
114428: 74 29 je 114453 <_POSIX_Keys_Run_destructors+0x7b>
11442a: 8b 48 10 mov 0x10(%eax),%ecx
11442d: 85 c9 test %ecx,%ecx
11442f: 74 22 je 114453 <_POSIX_Keys_Run_destructors+0x7b>
void *value = key->Values [ thread_api ][ thread_index ];
114431: 8b 7d e4 mov -0x1c(%ebp),%edi
114434: 8b 4d e0 mov -0x20(%ebp),%ecx
114437: 03 7c 88 04 add 0x4(%eax,%ecx,4),%edi
11443b: 8b 0f mov (%edi),%ecx
if ( value != NULL ) {
11443d: 85 c9 test %ecx,%ecx
11443f: 74 12 je 114453 <_POSIX_Keys_Run_destructors+0x7b><== ALWAYS TAKEN
key->Values [ thread_api ][ thread_index ] = NULL;
114441: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED
(*key->destructor)( value );
114447: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11444a: 51 push %ecx <== NOT EXECUTED
11444b: ff 50 10 call *0x10(%eax) <== NOT EXECUTED
11444e: 31 d2 xor %edx,%edx <== NOT EXECUTED
114450: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
114453: 46 inc %esi
114454: 66 39 f3 cmp %si,%bx
114457: 73 c2 jae 11441b <_POSIX_Keys_Run_destructors+0x43>
* number of iterations. An infinite loop may happen if destructors set
* thread specific data. This can be considered dubious.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
114459: 84 d2 test %dl,%dl
11445b: 74 a1 je 1143fe <_POSIX_Keys_Run_destructors+0x26><== NEVER TAKEN
11445d: eb aa jmp 114409 <_POSIX_Keys_Run_destructors+0x31>
00117430 <_POSIX_Message_queue_Create_support>:
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
117430: 55 push %ebp
117431: 89 e5 mov %esp,%ebp
117433: 57 push %edi
117434: 56 push %esi
117435: 53 push %ebx
117436: 83 ec 34 sub $0x34,%esp
117439: 8b 75 10 mov 0x10(%ebp),%esi
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
11743c: 68 ff 00 00 00 push $0xff
117441: ff 75 08 pushl 0x8(%ebp)
117444: e8 4b 54 00 00 call 11c894 <strnlen>
117449: 89 c3 mov %eax,%ebx
11744b: a1 d8 23 13 00 mov 0x1323d8,%eax
117450: 40 inc %eax
117451: a3 d8 23 13 00 mov %eax,0x1323d8
* There is no real basis for the default values. They will work
* but were not compared against any existing implementation for
* compatibility. See README.mqueue for an example program we
* think will print out the defaults. Report anything you find with it.
*/
if ( attr_ptr == NULL ) {
117456: 83 c4 10 add $0x10,%esp
117459: 85 f6 test %esi,%esi
11745b: 0f 84 c3 00 00 00 je 117524 <_POSIX_Message_queue_Create_support+0xf4>
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
} else {
if ( attr_ptr->mq_maxmsg <= 0 ){
117461: 8b 4e 04 mov 0x4(%esi),%ecx
117464: 85 c9 test %ecx,%ecx
117466: 0f 8e fc 00 00 00 jle 117568 <_POSIX_Message_queue_Create_support+0x138>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
11746c: 8b 56 08 mov 0x8(%esi),%edx
11746f: 85 d2 test %edx,%edx
117471: 0f 8e f1 00 00 00 jle 117568 <_POSIX_Message_queue_Create_support+0x138>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
attr = *attr_ptr;
117477: 8d 7d d8 lea -0x28(%ebp),%edi
11747a: b9 04 00 00 00 mov $0x4,%ecx
11747f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
117481: 8b 45 dc mov -0x24(%ebp),%eax
117484: 89 45 d4 mov %eax,-0x2c(%ebp)
117487: 8b 45 e0 mov -0x20(%ebp),%eax
11748a: 89 45 d0 mov %eax,-0x30(%ebp)
*/
RTEMS_INLINE_ROUTINE
POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void )
{
return (POSIX_Message_queue_Control *)
11748d: 83 ec 0c sub $0xc,%esp
117490: 68 a0 27 13 00 push $0x1327a0
117495: e8 06 b9 ff ff call 112da0 <_Objects_Allocate>
11749a: 89 c6 mov %eax,%esi
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
11749c: 83 c4 10 add $0x10,%esp
11749f: 85 c0 test %eax,%eax
1174a1: 0f 84 03 01 00 00 je 1175aa <_POSIX_Message_queue_Create_support+0x17a>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
1174a7: 8b 45 0c mov 0xc(%ebp),%eax
1174aa: 89 46 10 mov %eax,0x10(%esi)
the_mq->named = true;
1174ad: c6 46 14 01 movb $0x1,0x14(%esi)
the_mq->open_count = 1;
1174b1: c7 46 18 01 00 00 00 movl $0x1,0x18(%esi)
the_mq->linked = true;
1174b8: c6 46 15 01 movb $0x1,0x15(%esi)
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n+1);
1174bc: 43 inc %ebx
1174bd: 83 ec 0c sub $0xc,%esp
1174c0: 53 push %ebx
1174c1: e8 c2 d8 ff ff call 114d88 <_Workspace_Allocate>
1174c6: 89 c7 mov %eax,%edi
if (!name) {
1174c8: 83 c4 10 add $0x10,%esp
1174cb: 85 c0 test %eax,%eax
1174cd: 0f 84 ac 00 00 00 je 11757f <_POSIX_Message_queue_Create_support+0x14f>
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
strncpy( name, name_arg, n+1 );
1174d3: 50 push %eax
1174d4: 53 push %ebx
1174d5: ff 75 08 pushl 0x8(%ebp)
1174d8: 57 push %edi
1174d9: e8 3a 53 00 00 call 11c818 <strncpy>
*
* Joel: Cite POSIX or OpenGroup on above statement so we can determine
* if it is a real requirement.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
1174de: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi)
if ( !_CORE_message_queue_Initialize(
1174e5: ff 75 d0 pushl -0x30(%ebp)
1174e8: ff 75 d4 pushl -0x2c(%ebp)
1174eb: 8d 46 5c lea 0x5c(%esi),%eax
1174ee: 50 push %eax
1174ef: 8d 46 1c lea 0x1c(%esi),%eax
1174f2: 50 push %eax
1174f3: e8 74 0f 00 00 call 11846c <_CORE_message_queue_Initialize>
1174f8: 83 c4 20 add $0x20,%esp
1174fb: 84 c0 test %al,%al
1174fd: 74 39 je 117538 <_POSIX_Message_queue_Create_support+0x108>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1174ff: 0f b7 56 08 movzwl 0x8(%esi),%edx
117503: a1 bc 27 13 00 mov 0x1327bc,%eax
117508: 89 34 90 mov %esi,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
11750b: 89 7e 0c mov %edi,0xc(%esi)
&_POSIX_Message_queue_Information,
&the_mq->Object,
name
);
*message_queue = the_mq;
11750e: 8b 45 14 mov 0x14(%ebp),%eax
117511: 89 30 mov %esi,(%eax)
_Thread_Enable_dispatch();
117513: e8 fc c5 ff ff call 113b14 <_Thread_Enable_dispatch>
117518: 31 c0 xor %eax,%eax
return 0;
}
11751a: 8d 65 f4 lea -0xc(%ebp),%esp
11751d: 5b pop %ebx
11751e: 5e pop %esi
11751f: 5f pop %edi
117520: c9 leave
117521: c3 ret
117522: 66 90 xchg %ax,%ax
* There is no real basis for the default values. They will work
* but were not compared against any existing implementation for
* compatibility. See README.mqueue for an example program we
* think will print out the defaults. Report anything you find with it.
*/
if ( attr_ptr == NULL ) {
117524: c7 45 d4 0a 00 00 00 movl $0xa,-0x2c(%ebp)
11752b: c7 45 d0 10 00 00 00 movl $0x10,-0x30(%ebp)
117532: e9 56 ff ff ff jmp 11748d <_POSIX_Message_queue_Create_support+0x5d>
117537: 90 nop
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
117538: 83 ec 08 sub $0x8,%esp
11753b: 56 push %esi
11753c: 68 a0 27 13 00 push $0x1327a0
117541: e8 da bb ff ff call 113120 <_Objects_Free>
attr.mq_maxmsg,
attr.mq_msgsize
) ) {
_POSIX_Message_queue_Free( the_mq );
_Workspace_Free(name);
117546: 89 3c 24 mov %edi,(%esp)
117549: e8 56 d8 ff ff call 114da4 <_Workspace_Free>
_Thread_Enable_dispatch();
11754e: e8 c1 c5 ff ff call 113b14 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
117553: e8 18 3d 00 00 call 11b270 <__errno>
117558: c7 00 1c 00 00 00 movl $0x1c,(%eax)
11755e: b8 ff ff ff ff mov $0xffffffff,%eax
117563: 83 c4 10 add $0x10,%esp
117566: eb b2 jmp 11751a <_POSIX_Message_queue_Create_support+0xea>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
_Thread_Enable_dispatch();
117568: e8 a7 c5 ff ff call 113b14 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
11756d: e8 fe 3c 00 00 call 11b270 <__errno>
117572: c7 00 16 00 00 00 movl $0x16,(%eax)
117578: b8 ff ff ff ff mov $0xffffffff,%eax
11757d: eb 9b jmp 11751a <_POSIX_Message_queue_Create_support+0xea>
11757f: 83 ec 08 sub $0x8,%esp
117582: 56 push %esi
117583: 68 a0 27 13 00 push $0x1327a0
117588: e8 93 bb ff ff call 113120 <_Objects_Free>
* dynamically constructed.
*/
name = _Workspace_Allocate(n+1);
if (!name) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
11758d: e8 82 c5 ff ff call 113b14 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOMEM );
117592: e8 d9 3c 00 00 call 11b270 <__errno>
117597: c7 00 0c 00 00 00 movl $0xc,(%eax)
11759d: b8 ff ff ff ff mov $0xffffffff,%eax
1175a2: 83 c4 10 add $0x10,%esp
1175a5: e9 70 ff ff ff jmp 11751a <_POSIX_Message_queue_Create_support+0xea>
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
_Thread_Enable_dispatch();
1175aa: e8 65 c5 ff ff call 113b14 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
1175af: e8 bc 3c 00 00 call 11b270 <__errno>
1175b4: c7 00 17 00 00 00 movl $0x17,(%eax)
1175ba: b8 ff ff ff ff mov $0xffffffff,%eax
1175bf: e9 56 ff ff ff jmp 11751a <_POSIX_Message_queue_Create_support+0xea>
001175c4 <_POSIX_Message_queue_Name_to_id>:
*/
int _POSIX_Message_queue_Name_to_id(
const char *name,
Objects_Id *id
)
{
1175c4: 55 push %ebp
1175c5: 89 e5 mov %esp,%ebp
1175c7: 53 push %ebx
1175c8: 83 ec 14 sub $0x14,%esp
1175cb: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Name_or_id_lookup_errors status;
Objects_Id the_id;
if ( !name )
1175ce: 85 db test %ebx,%ebx
1175d0: 74 05 je 1175d7 <_POSIX_Message_queue_Name_to_id+0x13>
return EINVAL;
if ( !name[0] )
1175d2: 80 3b 00 cmpb $0x0,(%ebx)
1175d5: 75 0d jne 1175e4 <_POSIX_Message_queue_Name_to_id+0x20>
name,
&the_id
);
*id = the_id;
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
1175d7: b8 16 00 00 00 mov $0x16,%eax
return 0;
return ENOENT;
}
1175dc: 8b 5d fc mov -0x4(%ebp),%ebx
1175df: c9 leave
1175e0: c3 ret
1175e1: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
if ( !name[0] )
return EINVAL;
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
1175e4: 83 ec 08 sub $0x8,%esp
1175e7: 68 ff 00 00 00 push $0xff
1175ec: 53 push %ebx
1175ed: e8 a2 52 00 00 call 11c894 <strnlen>
1175f2: 83 c4 10 add $0x10,%esp
1175f5: 3d fe 00 00 00 cmp $0xfe,%eax
1175fa: 76 0c jbe 117608 <_POSIX_Message_queue_Name_to_id+0x44>
1175fc: b8 5b 00 00 00 mov $0x5b,%eax
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
return ENOENT;
}
117601: 8b 5d fc mov -0x4(%ebp),%ebx
117604: c9 leave
117605: c3 ret
117606: 66 90 xchg %ax,%ax
return EINVAL;
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
return ENAMETOOLONG;
status = _Objects_Name_to_id_string(
117608: 50 push %eax
117609: 8d 45 f4 lea -0xc(%ebp),%eax
11760c: 50 push %eax
11760d: 53 push %ebx
11760e: 68 a0 27 13 00 push $0x1327a0
117613: e8 44 14 00 00 call 118a5c <_Objects_Name_to_id_string>
&_POSIX_Message_queue_Information,
name,
&the_id
);
*id = the_id;
117618: 8b 4d f4 mov -0xc(%ebp),%ecx
11761b: 8b 55 0c mov 0xc(%ebp),%edx
11761e: 89 0a mov %ecx,(%edx)
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
117620: 83 c4 10 add $0x10,%esp
117623: 83 f8 01 cmp $0x1,%eax
117626: 19 c0 sbb %eax,%eax
117628: f7 d0 not %eax
11762a: 83 e0 02 and $0x2,%eax
return 0;
return ENOENT;
}
11762d: 8b 5d fc mov -0x4(%ebp),%ebx
117630: c9 leave
117631: c3 ret
001102d0 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
1102d0: 55 push %ebp
1102d1: 89 e5 mov %esp,%ebp
1102d3: 56 push %esi
1102d4: 53 push %ebx
1102d5: 83 ec 24 sub $0x24,%esp
1102d8: 8b 75 08 mov 0x8(%ebp),%esi
1102db: 8b 5d 14 mov 0x14(%ebp),%ebx
1102de: 8a 45 18 mov 0x18(%ebp),%al
1102e1: 88 45 e7 mov %al,-0x19(%ebp)
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(
1102e4: 8d 45 f4 lea -0xc(%ebp),%eax
1102e7: 50 push %eax
1102e8: 56 push %esi
1102e9: 68 40 29 13 00 push $0x132940
1102ee: e8 5d 2f 00 00 call 113250 <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
1102f3: 83 c4 10 add $0x10,%esp
1102f6: 8b 55 f4 mov -0xc(%ebp),%edx
1102f9: 85 d2 test %edx,%edx
1102fb: 74 17 je 110314 <_POSIX_Message_queue_Receive_support+0x44>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
1102fd: e8 6e af 00 00 call 11b270 <__errno>
110302: c7 00 09 00 00 00 movl $0x9,(%eax)
110308: b8 ff ff ff ff mov $0xffffffff,%eax
}
11030d: 8d 65 f8 lea -0x8(%ebp),%esp
110310: 5b pop %ebx
110311: 5e pop %esi
110312: c9 leave
110313: c3 ret
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
110314: 8b 48 14 mov 0x14(%eax),%ecx
110317: 89 ca mov %ecx,%edx
110319: 83 e2 03 and $0x3,%edx
11031c: 4a dec %edx
11031d: 0f 84 bb 00 00 00 je 1103de <_POSIX_Message_queue_Receive_support+0x10e>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
110323: 8b 50 10 mov 0x10(%eax),%edx
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
110326: 8b 45 10 mov 0x10(%ebp),%eax
110329: 39 42 68 cmp %eax,0x68(%edx)
11032c: 77 6e ja 11039c <_POSIX_Message_queue_Receive_support+0xcc>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
11032e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
110332: 75 4c jne 110380 <_POSIX_Message_queue_Receive_support+0xb0><== ALWAYS TAKEN
110334: 31 c0 xor %eax,%eax
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
110336: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp)
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
11033d: 83 ec 08 sub $0x8,%esp
110340: ff 75 1c pushl 0x1c(%ebp)
110343: 50 push %eax
110344: 8d 45 f0 lea -0x10(%ebp),%eax
110347: 50 push %eax
110348: ff 75 0c pushl 0xc(%ebp)
11034b: 56 push %esi
11034c: 83 c2 1c add $0x1c,%edx
11034f: 52 push %edx
110350: e8 e7 1f 00 00 call 11233c <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
110355: 83 c4 20 add $0x20,%esp
110358: e8 b7 37 00 00 call 113b14 <_Thread_Enable_dispatch>
if (msg_prio) {
11035d: 85 db test %ebx,%ebx
11035f: 74 33 je 110394 <_POSIX_Message_queue_Receive_support+0xc4><== NEVER TAKEN
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
110361: a1 98 24 13 00 mov 0x132498,%eax
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
*msg_prio = _POSIX_Message_queue_Priority_from_core(
110366: 8b 50 24 mov 0x24(%eax),%edx
110369: 89 13 mov %edx,(%ebx)
11036b: 85 d2 test %edx,%edx
11036d: 78 21 js 110390 <_POSIX_Message_queue_Receive_support+0xc0>
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
11036f: 8b 40 34 mov 0x34(%eax),%eax
110372: 85 c0 test %eax,%eax
110374: 75 42 jne 1103b8 <_POSIX_Message_queue_Receive_support+0xe8>
return length_out;
110376: 8b 45 f0 mov -0x10(%ebp),%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
110379: 8d 65 f8 lea -0x8(%ebp),%esp
11037c: 5b pop %ebx
11037d: 5e pop %esi
11037e: c9 leave
11037f: c3 ret
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
110380: 89 c8 mov %ecx,%eax
110382: c1 e8 0e shr $0xe,%eax
110385: 83 f0 01 xor $0x1,%eax
110388: 83 e0 01 and $0x1,%eax
11038b: eb a9 jmp 110336 <_POSIX_Message_queue_Receive_support+0x66>
11038d: 8d 76 00 lea 0x0(%esi),%esi
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
*msg_prio = _POSIX_Message_queue_Priority_from_core(
110390: f7 1b negl (%ebx)
110392: eb db jmp 11036f <_POSIX_Message_queue_Receive_support+0x9f>
do_wait,
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
110394: a1 98 24 13 00 mov 0x132498,%eax <== NOT EXECUTED
110399: eb d4 jmp 11036f <_POSIX_Message_queue_Receive_support+0x9f><== NOT EXECUTED
11039b: 90 nop <== NOT EXECUTED
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
11039c: e8 73 37 00 00 call 113b14 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
1103a1: e8 ca ae 00 00 call 11b270 <__errno>
1103a6: c7 00 7a 00 00 00 movl $0x7a,(%eax)
1103ac: b8 ff ff ff ff mov $0xffffffff,%eax
1103b1: e9 57 ff ff ff jmp 11030d <_POSIX_Message_queue_Receive_support+0x3d>
1103b6: 66 90 xchg %ax,%ax
}
if ( !_Thread_Executing->Wait.return_code )
return length_out;
rtems_set_errno_and_return_minus_one(
1103b8: e8 b3 ae 00 00 call 11b270 <__errno>
1103bd: 89 c3 mov %eax,%ebx
1103bf: 83 ec 0c sub $0xc,%esp
1103c2: a1 98 24 13 00 mov 0x132498,%eax
1103c7: ff 70 34 pushl 0x34(%eax)
1103ca: e8 39 02 00 00 call 110608 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
1103cf: 89 03 mov %eax,(%ebx)
1103d1: b8 ff ff ff ff mov $0xffffffff,%eax
1103d6: 83 c4 10 add $0x10,%esp
1103d9: e9 2f ff ff ff jmp 11030d <_POSIX_Message_queue_Receive_support+0x3d>
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
1103de: e8 31 37 00 00 call 113b14 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
1103e3: e8 88 ae 00 00 call 11b270 <__errno>
1103e8: c7 00 09 00 00 00 movl $0x9,(%eax)
1103ee: b8 ff ff ff ff mov $0xffffffff,%eax
1103f3: e9 15 ff ff ff jmp 11030d <_POSIX_Message_queue_Receive_support+0x3d>
00110418 <_POSIX_Message_queue_Send_support>:
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
110418: 55 push %ebp
110419: 89 e5 mov %esp,%ebp
11041b: 57 push %edi
11041c: 56 push %esi
11041d: 53 push %ebx
11041e: 83 ec 2c sub $0x2c,%esp
110421: 8b 75 08 mov 0x8(%ebp),%esi
110424: 8b 5d 14 mov 0x14(%ebp),%ebx
110427: 8a 55 18 mov 0x18(%ebp),%dl
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
11042a: 83 fb 20 cmp $0x20,%ebx
11042d: 0f 87 9d 00 00 00 ja 1104d0 <_POSIX_Message_queue_Send_support+0xb8>
110433: 51 push %ecx
110434: 8d 45 e4 lea -0x1c(%ebp),%eax
110437: 50 push %eax
110438: 56 push %esi
110439: 68 40 29 13 00 push $0x132940
11043e: 88 55 d4 mov %dl,-0x2c(%ebp)
110441: e8 0a 2e 00 00 call 113250 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
110446: 83 c4 10 add $0x10,%esp
110449: 8b 55 e4 mov -0x1c(%ebp),%edx
11044c: 85 d2 test %edx,%edx
11044e: 8a 55 d4 mov -0x2c(%ebp),%dl
110451: 75 69 jne 1104bc <_POSIX_Message_queue_Send_support+0xa4>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
110453: 8b 48 14 mov 0x14(%eax),%ecx
110456: f6 c1 03 test $0x3,%cl
110459: 0f 84 85 00 00 00 je 1104e4 <_POSIX_Message_queue_Send_support+0xcc>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
11045f: 8b 78 10 mov 0x10(%eax),%edi
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
110462: 84 d2 test %dl,%dl
110464: 75 3a jne 1104a0 <_POSIX_Message_queue_Send_support+0x88>
110466: 31 c0 xor %eax,%eax
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
110468: ff 75 1c pushl 0x1c(%ebp)
11046b: 50 push %eax
11046c: f7 db neg %ebx
11046e: 53 push %ebx
11046f: 6a 00 push $0x0
110471: 56 push %esi
110472: ff 75 10 pushl 0x10(%ebp)
110475: ff 75 0c pushl 0xc(%ebp)
110478: 8d 47 1c lea 0x1c(%edi),%eax
11047b: 50 push %eax
11047c: e8 e7 1f 00 00 call 112468 <_CORE_message_queue_Submit>
110481: 89 c3 mov %eax,%ebx
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
110483: 83 c4 20 add $0x20,%esp
110486: e8 89 36 00 00 call 113b14 <_Thread_Enable_dispatch>
* after it wakes up. The returned status is correct for
* non-blocking operations but if we blocked, then we need
* to look at the status in our TCB.
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
11048b: 83 fb 07 cmp $0x7,%ebx
11048e: 74 20 je 1104b0 <_POSIX_Message_queue_Send_support+0x98>
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
110490: 85 db test %ebx,%ebx
110492: 75 68 jne 1104fc <_POSIX_Message_queue_Send_support+0xe4>
110494: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
110496: 8d 65 f4 lea -0xc(%ebp),%esp
110499: 5b pop %ebx
11049a: 5e pop %esi
11049b: 5f pop %edi
11049c: c9 leave
11049d: c3 ret
11049e: 66 90 xchg %ax,%ax
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
1104a0: 89 c8 mov %ecx,%eax
1104a2: c1 e8 0e shr $0xe,%eax
1104a5: 83 f0 01 xor $0x1,%eax
1104a8: 83 e0 01 and $0x1,%eax
1104ab: eb bb jmp 110468 <_POSIX_Message_queue_Send_support+0x50>
1104ad: 8d 76 00 lea 0x0(%esi),%esi
* non-blocking operations but if we blocked, then we need
* to look at the status in our TCB.
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
msg_status = _Thread_Executing->Wait.return_code;
1104b0: a1 98 24 13 00 mov 0x132498,%eax
1104b5: 8b 58 34 mov 0x34(%eax),%ebx
1104b8: eb d6 jmp 110490 <_POSIX_Message_queue_Send_support+0x78>
1104ba: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
1104bc: e8 af ad 00 00 call 11b270 <__errno>
1104c1: c7 00 09 00 00 00 movl $0x9,(%eax)
1104c7: b8 ff ff ff ff mov $0xffffffff,%eax
1104cc: eb c8 jmp 110496 <_POSIX_Message_queue_Send_support+0x7e>
1104ce: 66 90 xchg %ax,%ax
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
1104d0: e8 9b ad 00 00 call 11b270 <__errno>
1104d5: c7 00 16 00 00 00 movl $0x16,(%eax)
1104db: b8 ff ff ff ff mov $0xffffffff,%eax
1104e0: eb b4 jmp 110496 <_POSIX_Message_queue_Send_support+0x7e>
1104e2: 66 90 xchg %ax,%ax
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
_Thread_Enable_dispatch();
1104e4: e8 2b 36 00 00 call 113b14 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
1104e9: e8 82 ad 00 00 call 11b270 <__errno>
1104ee: c7 00 09 00 00 00 movl $0x9,(%eax)
1104f4: b8 ff ff ff ff mov $0xffffffff,%eax
1104f9: eb 9b jmp 110496 <_POSIX_Message_queue_Send_support+0x7e>
1104fb: 90 nop
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
1104fc: e8 6f ad 00 00 call 11b270 <__errno>
110501: 89 c6 mov %eax,%esi
110503: 83 ec 0c sub $0xc,%esp
110506: 53 push %ebx
110507: e8 fc 00 00 00 call 110608 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
11050c: 89 06 mov %eax,(%esi)
11050e: b8 ff ff ff ff mov $0xffffffff,%eax
110513: 83 c4 10 add $0x10,%esp
110516: e9 7b ff ff ff jmp 110496 <_POSIX_Message_queue_Send_support+0x7e>
0010d738 <_POSIX_Mutex_Get>:
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
10d738: 55 push %ebp
10d739: 89 e5 mov %esp,%ebp
10d73b: 56 push %esi
10d73c: 53 push %ebx
10d73d: 8b 5d 08 mov 0x8(%ebp),%ebx
10d740: 8b 75 0c mov 0xc(%ebp),%esi
___POSIX_Mutex_Get_support_error_check( mutex, location );
10d743: 85 db test %ebx,%ebx
10d745: 74 39 je 10d780 <_POSIX_Mutex_Get+0x48>
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d747: 8b 03 mov (%ebx),%eax
10d749: 83 f8 ff cmp $0xffffffff,%eax
10d74c: 74 1a je 10d768 <_POSIX_Mutex_Get+0x30>
return (POSIX_Mutex_Control *)
10d74e: 52 push %edx
10d74f: 56 push %esi
10d750: 50 push %eax
10d751: 68 a0 ea 12 00 push $0x12eaa0
10d756: e8 71 2b 00 00 call 1102cc <_Objects_Get>
10d75b: 83 c4 10 add $0x10,%esp
_Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location );
}
10d75e: 8d 65 f8 lea -0x8(%ebp),%esp
10d761: 5b pop %ebx
10d762: 5e pop %esi
10d763: c9 leave
10d764: c3 ret
10d765: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations *location
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d768: 83 ec 08 sub $0x8,%esp
10d76b: 6a 00 push $0x0
10d76d: 53 push %ebx
10d76e: e8 65 00 00 00 call 10d7d8 <pthread_mutex_init>
10d773: 83 c4 10 add $0x10,%esp
10d776: 85 c0 test %eax,%eax
10d778: 75 06 jne 10d780 <_POSIX_Mutex_Get+0x48>
10d77a: 8b 03 mov (%ebx),%eax
10d77c: eb d0 jmp 10d74e <_POSIX_Mutex_Get+0x16>
10d77e: 66 90 xchg %ax,%ax
10d780: c7 06 01 00 00 00 movl $0x1,(%esi)
10d786: 31 c0 xor %eax,%eax
10d788: eb d4 jmp 10d75e <_POSIX_Mutex_Get+0x26>
0010d6e4 <_POSIX_Mutex_Get_interrupt_disable>:
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
10d6e4: 55 push %ebp
10d6e5: 89 e5 mov %esp,%ebp
10d6e7: 56 push %esi
10d6e8: 53 push %ebx
10d6e9: 8b 5d 08 mov 0x8(%ebp),%ebx
10d6ec: 8b 75 0c mov 0xc(%ebp),%esi
___POSIX_Mutex_Get_support_error_check( mutex, location );
10d6ef: 85 db test %ebx,%ebx
10d6f1: 74 39 je 10d72c <_POSIX_Mutex_Get_interrupt_disable+0x48>
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d6f3: 8b 03 mov (%ebx),%eax
10d6f5: 83 f8 ff cmp $0xffffffff,%eax
10d6f8: 74 1a je 10d714 <_POSIX_Mutex_Get_interrupt_disable+0x30>
return (POSIX_Mutex_Control *) _Objects_Get_isr_disable(
10d6fa: ff 75 10 pushl 0x10(%ebp)
10d6fd: 56 push %esi
10d6fe: 50 push %eax
10d6ff: 68 a0 ea 12 00 push $0x12eaa0
10d704: e8 6b 2b 00 00 call 110274 <_Objects_Get_isr_disable>
10d709: 83 c4 10 add $0x10,%esp
&_POSIX_Mutex_Information,
(Objects_Id) *mutex,
location,
level
);
}
10d70c: 8d 65 f8 lea -0x8(%ebp),%esp
10d70f: 5b pop %ebx
10d710: 5e pop %esi
10d711: c9 leave
10d712: c3 ret
10d713: 90 nop
ISR_Level *level
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d714: 83 ec 08 sub $0x8,%esp
10d717: 6a 00 push $0x0
10d719: 53 push %ebx
10d71a: e8 b9 00 00 00 call 10d7d8 <pthread_mutex_init>
10d71f: 83 c4 10 add $0x10,%esp
10d722: 85 c0 test %eax,%eax
10d724: 75 06 jne 10d72c <_POSIX_Mutex_Get_interrupt_disable+0x48>
10d726: 8b 03 mov (%ebx),%eax
10d728: eb d0 jmp 10d6fa <_POSIX_Mutex_Get_interrupt_disable+0x16>
10d72a: 66 90 xchg %ax,%ax
10d72c: c7 06 01 00 00 00 movl $0x1,(%esi)
10d732: 31 c0 xor %eax,%eax
10d734: eb d6 jmp 10d70c <_POSIX_Mutex_Get_interrupt_disable+0x28>
0010d934 <_POSIX_Mutex_Lock_support>:
int _POSIX_Mutex_Lock_support(
pthread_mutex_t *mutex,
bool blocking,
Watchdog_Interval timeout
)
{
10d934: 55 push %ebp
10d935: 89 e5 mov %esp,%ebp
10d937: 53 push %ebx
10d938: 83 ec 18 sub $0x18,%esp
10d93b: 8a 5d 0c mov 0xc(%ebp),%bl
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
ISR_Level level;
the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level );
10d93e: 8d 45 f0 lea -0x10(%ebp),%eax
10d941: 50 push %eax
10d942: 8d 45 f4 lea -0xc(%ebp),%eax
10d945: 50 push %eax
10d946: ff 75 08 pushl 0x8(%ebp)
10d949: e8 96 fd ff ff call 10d6e4 <_POSIX_Mutex_Get_interrupt_disable>
switch ( location ) {
10d94e: 83 c4 10 add $0x10,%esp
10d951: 8b 55 f4 mov -0xc(%ebp),%edx
10d954: 85 d2 test %edx,%edx
10d956: 75 34 jne 10d98c <_POSIX_Mutex_Lock_support+0x58>
case OBJECTS_LOCAL:
_CORE_mutex_Seize(
10d958: 83 ec 0c sub $0xc,%esp
10d95b: ff 75 f0 pushl -0x10(%ebp)
10d95e: ff 75 10 pushl 0x10(%ebp)
10d961: 0f b6 db movzbl %bl,%ebx
10d964: 53 push %ebx
10d965: ff 70 08 pushl 0x8(%eax)
10d968: 83 c0 14 add $0x14,%eax
10d96b: 50 push %eax
10d96c: e8 47 1d 00 00 call 10f6b8 <_CORE_mutex_Seize>
the_mutex->Object.id,
blocking,
timeout,
level
);
return _POSIX_Mutex_Translate_core_mutex_return_code(
10d971: 83 c4 14 add $0x14,%esp
10d974: a1 58 e7 12 00 mov 0x12e758,%eax
10d979: ff 70 34 pushl 0x34(%eax)
10d97c: e8 f3 00 00 00 call 10da74 <_POSIX_Mutex_Translate_core_mutex_return_code>
10d981: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d984: 8b 5d fc mov -0x4(%ebp),%ebx
10d987: c9 leave
10d988: c3 ret
10d989: 8d 76 00 lea 0x0(%esi),%esi
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
ISR_Level level;
the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level );
switch ( location ) {
10d98c: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d991: 8b 5d fc mov -0x4(%ebp),%ebx
10d994: c9 leave
10d995: c3 ret
001128b4 <_POSIX_Semaphore_Create_support>:
const char *name,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
1128b4: 55 push %ebp
1128b5: 89 e5 mov %esp,%ebp
1128b7: 56 push %esi
1128b8: 53 push %ebx
1128b9: 8b 5d 08 mov 0x8(%ebp),%ebx
POSIX_Semaphore_Control *the_semaphore;
CORE_semaphore_Attributes *the_sem_attr;
char *name_p = (char *)name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
1128bc: 8b 55 0c mov 0xc(%ebp),%edx
1128bf: 85 d2 test %edx,%edx
1128c1: 0f 85 b9 00 00 00 jne 112980 <_POSIX_Semaphore_Create_support+0xcc>
rtems_set_errno_and_return_minus_one( ENOSYS );
if ( name ) {
1128c7: 85 db test %ebx,%ebx
1128c9: 74 1c je 1128e7 <_POSIX_Semaphore_Create_support+0x33>
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
1128cb: 83 ec 08 sub $0x8,%esp
1128ce: 68 ff 00 00 00 push $0xff
1128d3: 53 push %ebx
1128d4: e8 8f 41 00 00 call 116a68 <strnlen>
1128d9: 83 c4 10 add $0x10,%esp
1128dc: 3d fe 00 00 00 cmp $0xfe,%eax
1128e1: 0f 87 ad 00 00 00 ja 112994 <_POSIX_Semaphore_Create_support+0xe0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
1128e7: a1 38 94 12 00 mov 0x129438,%eax
1128ec: 40 inc %eax
1128ed: a3 38 94 12 00 mov %eax,0x129438
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
1128f2: 83 ec 0c sub $0xc,%esp
1128f5: 68 80 97 12 00 push $0x129780
1128fa: e8 b1 b2 ff ff call 10dbb0 <_Objects_Allocate>
1128ff: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
112901: 83 c4 10 add $0x10,%esp
112904: 85 c0 test %eax,%eax
112906: 0f 84 9a 00 00 00 je 1129a6 <_POSIX_Semaphore_Create_support+0xf2>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSPC );
}
the_semaphore->process_shared = pshared;
11290c: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
if ( name ) {
112913: 85 db test %ebx,%ebx
112915: 74 55 je 11296c <_POSIX_Semaphore_Create_support+0xb8>
the_semaphore->named = true;
112917: c6 40 14 01 movb $0x1,0x14(%eax)
the_semaphore->open_count = 1;
11291b: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax)
the_semaphore->linked = true;
112922: c6 40 15 01 movb $0x1,0x15(%eax)
* blocking tasks on this semaphore should be. It could somehow
* be derived from the current scheduling policy. One
* thing is certain, no matter what we decide, it won't be
* the same as all other POSIX implementations. :)
*/
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
112926: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi)
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
11292d: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi)
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
112934: 50 push %eax
112935: ff 75 10 pushl 0x10(%ebp)
112938: 8d 46 5c lea 0x5c(%esi),%eax
11293b: 50 push %eax
11293c: 8d 46 1c lea 0x1c(%esi),%eax
11293f: 50 push %eax
112940: e8 1f ad ff ff call 10d664 <_CORE_semaphore_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
112945: 0f b7 56 08 movzwl 0x8(%esi),%edx
112949: a1 9c 97 12 00 mov 0x12979c,%eax
11294e: 89 34 90 mov %esi,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
112951: 89 5e 0c mov %ebx,0xc(%esi)
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name_p
);
*the_sem = the_semaphore;
112954: 8b 45 14 mov 0x14(%ebp),%eax
112957: 89 30 mov %esi,(%eax)
_Thread_Enable_dispatch();
112959: e8 76 bf ff ff call 10e8d4 <_Thread_Enable_dispatch>
11295e: 31 c0 xor %eax,%eax
return 0;
112960: 83 c4 10 add $0x10,%esp
}
112963: 8d 65 f8 lea -0x8(%ebp),%esp
112966: 5b pop %ebx
112967: 5e pop %esi
112968: c9 leave
112969: c3 ret
11296a: 66 90 xchg %ax,%ax
if ( name ) {
the_semaphore->named = true;
the_semaphore->open_count = 1;
the_semaphore->linked = true;
} else {
the_semaphore->named = false;
11296c: c6 40 14 00 movb $0x0,0x14(%eax)
the_semaphore->open_count = 0;
112970: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_semaphore->linked = false;
112977: c6 40 15 00 movb $0x0,0x15(%eax)
11297b: eb a9 jmp 112926 <_POSIX_Semaphore_Create_support+0x72>
11297d: 8d 76 00 lea 0x0(%esi),%esi
CORE_semaphore_Attributes *the_sem_attr;
char *name_p = (char *)name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
rtems_set_errno_and_return_minus_one( ENOSYS );
112980: e8 bb 34 00 00 call 115e40 <__errno>
112985: c7 00 58 00 00 00 movl $0x58,(%eax)
11298b: b8 ff ff ff ff mov $0xffffffff,%eax
112990: eb d1 jmp 112963 <_POSIX_Semaphore_Create_support+0xaf>
112992: 66 90 xchg %ax,%ax
if ( name ) {
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
112994: e8 a7 34 00 00 call 115e40 <__errno>
112999: c7 00 5b 00 00 00 movl $0x5b,(%eax)
11299f: b8 ff ff ff ff mov $0xffffffff,%eax
1129a4: eb bd jmp 112963 <_POSIX_Semaphore_Create_support+0xaf>
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
1129a6: e8 29 bf ff ff call 10e8d4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
1129ab: e8 90 34 00 00 call 115e40 <__errno>
1129b0: c7 00 1c 00 00 00 movl $0x1c,(%eax)
1129b6: b8 ff ff ff ff mov $0xffffffff,%eax
1129bb: eb a6 jmp 112963 <_POSIX_Semaphore_Create_support+0xaf>
001156cc <_POSIX_Semaphore_Name_to_id>:
int _POSIX_Semaphore_Name_to_id(
const char *name,
sem_t *id
)
{
1156cc: 55 push %ebp
1156cd: 89 e5 mov %esp,%ebp
1156cf: 83 ec 18 sub $0x18,%esp
1156d2: 8b 45 08 mov 0x8(%ebp),%eax
Objects_Name_or_id_lookup_errors status;
Objects_Id the_id;
if ( !name )
1156d5: 85 c0 test %eax,%eax
1156d7: 74 05 je 1156de <_POSIX_Semaphore_Name_to_id+0x12>
return EINVAL;
if ( !name[0] )
1156d9: 80 38 00 cmpb $0x0,(%eax)
1156dc: 75 0a jne 1156e8 <_POSIX_Semaphore_Name_to_id+0x1c>
name,
&the_id
);
*id = the_id;
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
1156de: b8 16 00 00 00 mov $0x16,%eax
return 0;
return ENOENT;
}
1156e3: c9 leave
1156e4: c3 ret
1156e5: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
if ( !name[0] )
return EINVAL;
status = _Objects_Name_to_id_string(
1156e8: 52 push %edx
1156e9: 8d 55 f4 lea -0xc(%ebp),%edx
1156ec: 52 push %edx
1156ed: 50 push %eax
1156ee: 68 00 f6 12 00 push $0x12f600
1156f3: e8 04 0f 00 00 call 1165fc <_Objects_Name_to_id_string>
&_POSIX_Semaphore_Information,
name,
&the_id
);
*id = the_id;
1156f8: 8b 4d f4 mov -0xc(%ebp),%ecx
1156fb: 8b 55 0c mov 0xc(%ebp),%edx
1156fe: 89 0a mov %ecx,(%edx)
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
115700: 83 c4 10 add $0x10,%esp
115703: 83 f8 01 cmp $0x1,%eax
115706: 19 c0 sbb %eax,%eax
115708: f7 d0 not %eax
11570a: 83 e0 02 and $0x2,%eax
return 0;
return ENOENT;
}
11570d: c9 leave
11570e: c3 ret
001129e8 <_POSIX_Semaphore_Wait_support>:
int _POSIX_Semaphore_Wait_support(
sem_t *sem,
bool blocking,
Watchdog_Interval timeout
)
{
1129e8: 55 push %ebp
1129e9: 89 e5 mov %esp,%ebp
1129eb: 53 push %ebx
1129ec: 83 ec 18 sub $0x18,%esp
1129ef: 8a 5d 0c mov 0xc(%ebp),%bl
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
1129f2: 8d 45 f4 lea -0xc(%ebp),%eax
1129f5: 50 push %eax
1129f6: 8b 45 08 mov 0x8(%ebp),%eax
1129f9: ff 30 pushl (%eax)
1129fb: 68 80 97 12 00 push $0x129780
112a00: e8 5b b6 ff ff call 10e060 <_Objects_Get>
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
112a05: 83 c4 10 add $0x10,%esp
112a08: 8b 55 f4 mov -0xc(%ebp),%edx
112a0b: 85 d2 test %edx,%edx
112a0d: 74 15 je 112a24 <_POSIX_Semaphore_Wait_support+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
112a0f: e8 2c 34 00 00 call 115e40 <__errno>
112a14: c7 00 16 00 00 00 movl $0x16,(%eax)
112a1a: b8 ff ff ff ff mov $0xffffffff,%eax
}
112a1f: 8b 5d fc mov -0x4(%ebp),%ebx
112a22: c9 leave
112a23: c3 ret
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Seize(
112a24: ff 75 10 pushl 0x10(%ebp)
112a27: 0f b6 db movzbl %bl,%ebx
112a2a: 53 push %ebx
112a2b: ff 70 08 pushl 0x8(%eax)
112a2e: 83 c0 1c add $0x1c,%eax
112a31: 50 push %eax
112a32: e8 9d 09 00 00 call 1133d4 <_CORE_semaphore_Seize>
&the_semaphore->Semaphore,
the_semaphore->Object.id,
blocking,
timeout
);
_Thread_Enable_dispatch();
112a37: e8 98 be ff ff call 10e8d4 <_Thread_Enable_dispatch>
if ( !_Thread_Executing->Wait.return_code )
112a3c: 83 c4 10 add $0x10,%esp
112a3f: a1 f8 94 12 00 mov 0x1294f8,%eax
112a44: 8b 40 34 mov 0x34(%eax),%eax
112a47: 85 c0 test %eax,%eax
112a49: 75 09 jne 112a54 <_POSIX_Semaphore_Wait_support+0x6c>
112a4b: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
112a4d: 8b 5d fc mov -0x4(%ebp),%ebx
112a50: c9 leave
112a51: c3 ret
112a52: 66 90 xchg %ax,%ax
_Thread_Enable_dispatch();
if ( !_Thread_Executing->Wait.return_code )
return 0;
rtems_set_errno_and_return_minus_one(
112a54: e8 e7 33 00 00 call 115e40 <__errno>
112a59: 89 c3 mov %eax,%ebx
112a5b: 83 ec 0c sub $0xc,%esp
112a5e: a1 f8 94 12 00 mov 0x1294f8,%eax
112a63: ff 70 34 pushl 0x34(%eax)
112a66: e8 d1 2e 00 00 call 11593c <_POSIX_Semaphore_Translate_core_semaphore_return_code>
112a6b: 89 03 mov %eax,(%ebx)
112a6d: b8 ff ff ff ff mov $0xffffffff,%eax
112a72: 83 c4 10 add $0x10,%esp
112a75: eb a8 jmp 112a1f <_POSIX_Semaphore_Wait_support+0x37>
0011178c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
11178c: 55 push %ebp
11178d: 89 e5 mov %esp,%ebp
11178f: 83 ec 08 sub $0x8,%esp
111792: 8b 55 08 mov 0x8(%ebp),%edx
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
111795: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
11179b: 8b 88 d4 00 00 00 mov 0xd4(%eax),%ecx
1117a1: 85 c9 test %ecx,%ecx
1117a3: 75 09 jne 1117ae <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22><== NEVER TAKEN
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
1117a5: 83 b8 d8 00 00 00 01 cmpl $0x1,0xd8(%eax)
1117ac: 74 06 je 1117b4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28>
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
1117ae: 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();
1117af: e9 dc c8 ff ff jmp 10e090 <_Thread_Enable_dispatch>
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
1117b4: 8b 80 dc 00 00 00 mov 0xdc(%eax),%eax
1117ba: 85 c0 test %eax,%eax
1117bc: 74 f0 je 1117ae <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
1117be: a1 58 aa 12 00 mov 0x12aa58,%eax
1117c3: 48 dec %eax
1117c4: a3 58 aa 12 00 mov %eax,0x12aa58
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
1117c9: 83 ec 08 sub $0x8,%esp
1117cc: 6a ff push $0xffffffff
1117ce: 52 push %edx
1117cf: e8 58 06 00 00 call 111e2c <_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 &&
1117d4: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
1117d7: c9 leave
1117d8: c3 ret
001149d4 <_POSIX_Thread_Exit>:
void _POSIX_Thread_Exit(
Thread_Control *the_thread,
void *value_ptr
)
{
1149d4: 55 push %ebp
1149d5: 89 e5 mov %esp,%ebp
1149d7: 57 push %edi
1149d8: 56 push %esi
1149d9: 53 push %ebx
1149da: 83 ec 28 sub $0x28,%esp
1149dd: 8b 5d 08 mov 0x8(%ebp),%ebx
1149e0: 8b 75 0c mov 0xc(%ebp),%esi
Objects_Information *the_information;
Thread_Control *unblocked;
POSIX_API_Control *api;
the_information = _Objects_Get_information_id( the_thread->Object.id );
1149e3: ff 73 08 pushl 0x8(%ebx)
1149e6: e8 4d 89 ff ff call 10d338 <_Objects_Get_information_id>
1149eb: 89 c7 mov %eax,%edi
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
1149ed: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax
* are ready to be switched out. Otherwise, an ISR could
* occur and preempt us out while we still hold the
* allocator mutex.
*/
_RTEMS_Lock_allocator();
1149f3: 5a pop %edx
1149f4: ff 35 b0 94 12 00 pushl 0x1294b0
1149fa: 89 45 e0 mov %eax,-0x20(%ebp)
1149fd: e8 5a 7b ff ff call 10c55c <_API_Mutex_Lock>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
114a02: 8b 15 f8 93 12 00 mov 0x1293f8,%edx
114a08: 42 inc %edx
114a09: 89 15 f8 93 12 00 mov %edx,0x1293f8
_Thread_Disable_dispatch();
the_thread->Wait.return_argument = value_ptr;
114a0f: 89 73 28 mov %esi,0x28(%ebx)
/*
* Process join
*/
if ( api->detachstate == PTHREAD_CREATE_JOINABLE ) {
114a12: 83 c4 10 add $0x10,%esp
114a15: 8b 45 e0 mov -0x20(%ebp),%eax
114a18: 83 78 3c 01 cmpl $0x1,0x3c(%eax)
114a1c: 74 32 je 114a50 <_POSIX_Thread_Exit+0x7c>
}
/*
* Now shut down the thread
*/
_Thread_Close( the_information, the_thread );
114a1e: 83 ec 08 sub $0x8,%esp
114a21: 53 push %ebx
114a22: 57 push %edi
114a23: e8 30 8f ff ff call 10d958 <_Thread_Close>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
114a28: 5a pop %edx
114a29: 59 pop %ecx
114a2a: 53 push %ebx
114a2b: 68 c0 96 12 00 push $0x1296c0
114a30: e8 93 88 ff ff call 10d2c8 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
114a35: 58 pop %eax
114a36: ff 35 b0 94 12 00 pushl 0x1294b0
114a3c: e8 63 7b ff ff call 10c5a4 <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
114a41: 83 c4 10 add $0x10,%esp
}
114a44: 8d 65 f4 lea -0xc(%ebp),%esp
114a47: 5b pop %ebx
114a48: 5e pop %esi
114a49: 5f pop %edi
114a4a: c9 leave
_Thread_Close( the_information, the_thread );
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
_Thread_Enable_dispatch();
114a4b: e9 1c 92 ff ff jmp 10dc6c <_Thread_Enable_dispatch>
/*
* Process join
*/
if ( api->detachstate == PTHREAD_CREATE_JOINABLE ) {
unblocked = _Thread_queue_Dequeue( &api->Join_List );
114a50: 83 c0 40 add $0x40,%eax
114a53: 89 45 e4 mov %eax,-0x1c(%ebp)
114a56: 83 ec 0c sub $0xc,%esp
114a59: 50 push %eax
114a5a: e8 29 96 ff ff call 10e088 <_Thread_queue_Dequeue>
if ( unblocked ) {
114a5f: 83 c4 10 add $0x10,%esp
114a62: 85 c0 test %eax,%eax
114a64: 74 1e je 114a84 <_POSIX_Thread_Exit+0xb0>
114a66: 66 90 xchg %ax,%ax
do {
*(void **)unblocked->Wait.return_argument = value_ptr;
114a68: 8b 40 28 mov 0x28(%eax),%eax
114a6b: 89 30 mov %esi,(%eax)
} while ( (unblocked = _Thread_queue_Dequeue( &api->Join_List )) );
114a6d: 83 ec 0c sub $0xc,%esp
114a70: ff 75 e4 pushl -0x1c(%ebp)
114a73: e8 10 96 ff ff call 10e088 <_Thread_queue_Dequeue>
114a78: 83 c4 10 add $0x10,%esp
114a7b: 85 c0 test %eax,%eax
114a7d: 75 e9 jne 114a68 <_POSIX_Thread_Exit+0x94>
114a7f: eb 9d jmp 114a1e <_POSIX_Thread_Exit+0x4a>
114a81: 8d 76 00 lea 0x0(%esi),%esi
} else {
_Thread_Set_state(
114a84: 83 ec 08 sub $0x8,%esp
114a87: 68 04 10 00 00 push $0x1004
114a8c: 53 push %ebx
114a8d: e8 c6 9a ff ff call 10e558 <_Thread_Set_state>
the_thread,
STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT
);
_RTEMS_Unlock_allocator();
114a92: 58 pop %eax
114a93: ff 35 b0 94 12 00 pushl 0x1294b0
114a99: e8 06 7b ff ff call 10c5a4 <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
114a9e: e8 c9 91 ff ff call 10dc6c <_Thread_Enable_dispatch>
/* now waiting for thread to arrive */
_RTEMS_Lock_allocator();
114aa3: 5e pop %esi
114aa4: ff 35 b0 94 12 00 pushl 0x1294b0
114aaa: e8 ad 7a ff ff call 10c55c <_API_Mutex_Lock>
114aaf: a1 f8 93 12 00 mov 0x1293f8,%eax
114ab4: 40 inc %eax
114ab5: a3 f8 93 12 00 mov %eax,0x1293f8
RTEMS_COMPILER_MEMORY_BARRIER();
114aba: 83 c4 10 add $0x10,%esp
114abd: e9 5c ff ff ff jmp 114a1e <_POSIX_Thread_Exit+0x4a>
001128e8 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
1128e8: 55 push %ebp
1128e9: 89 e5 mov %esp,%ebp
1128eb: 57 push %edi
1128ec: 56 push %esi
1128ed: 53 push %ebx
1128ee: 83 ec 18 sub $0x18,%esp
1128f1: 8b 5d 08 mov 0x8(%ebp),%ebx
1128f4: 8b 75 0c mov 0xc(%ebp),%esi
1128f7: 8b 7d 10 mov 0x10(%ebp),%edi
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
1128fa: ff 36 pushl (%esi)
1128fc: e8 cb ff ff ff call 1128cc <_POSIX_Priority_Is_valid>
112901: 83 c4 10 add $0x10,%esp
112904: 84 c0 test %al,%al
112906: 74 2a je 112932 <_POSIX_Thread_Translate_sched_param+0x4a><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
112908: c7 07 00 00 00 00 movl $0x0,(%edi)
*budget_callout = NULL;
11290e: 8b 45 14 mov 0x14(%ebp),%eax
112911: c7 00 00 00 00 00 movl $0x0,(%eax)
if ( policy == SCHED_OTHER ) {
112917: 85 db test %ebx,%ebx
112919: 74 25 je 112940 <_POSIX_Thread_Translate_sched_param+0x58>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
11291b: 83 fb 01 cmp $0x1,%ebx
11291e: 0f 84 90 00 00 00 je 1129b4 <_POSIX_Thread_Translate_sched_param+0xcc>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
112924: 83 fb 02 cmp $0x2,%ebx
112927: 0f 84 97 00 00 00 je 1129c4 <_POSIX_Thread_Translate_sched_param+0xdc>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
11292d: 83 fb 04 cmp $0x4,%ebx
112930: 74 1e je 112950 <_POSIX_Thread_Translate_sched_param+0x68>
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
112932: b8 16 00 00 00 mov $0x16,%eax
}
return EINVAL;
}
112937: 8d 65 f4 lea -0xc(%ebp),%esp
11293a: 5b pop %ebx
11293b: 5e pop %esi
11293c: 5f pop %edi
11293d: c9 leave
11293e: c3 ret
11293f: 90 nop
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
112940: c7 07 01 00 00 00 movl $0x1,(%edi)
112946: 31 c0 xor %eax,%eax
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
112948: 8d 65 f4 lea -0xc(%ebp),%esp
11294b: 5b pop %ebx
11294c: 5e pop %esi
11294d: 5f pop %edi
11294e: c9 leave
11294f: c3 ret
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
112950: 8b 5e 08 mov 0x8(%esi),%ebx
112953: 85 db test %ebx,%ebx
112955: 75 07 jne 11295e <_POSIX_Thread_Translate_sched_param+0x76>
(param->sched_ss_repl_period.tv_nsec == 0) )
112957: 8b 4e 0c mov 0xc(%esi),%ecx
11295a: 85 c9 test %ecx,%ecx
11295c: 74 d4 je 112932 <_POSIX_Thread_Translate_sched_param+0x4a>
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
11295e: 8b 56 10 mov 0x10(%esi),%edx
112961: 85 d2 test %edx,%edx
112963: 75 07 jne 11296c <_POSIX_Thread_Translate_sched_param+0x84>
(param->sched_ss_init_budget.tv_nsec == 0) )
112965: 8b 46 14 mov 0x14(%esi),%eax
112968: 85 c0 test %eax,%eax
11296a: 74 c6 je 112932 <_POSIX_Thread_Translate_sched_param+0x4a>
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
11296c: 83 ec 0c sub $0xc,%esp
11296f: 8d 46 08 lea 0x8(%esi),%eax
112972: 50 push %eax
112973: e8 a8 d0 ff ff call 10fa20 <_Timespec_To_ticks>
112978: 89 c3 mov %eax,%ebx
11297a: 8d 46 10 lea 0x10(%esi),%eax
11297d: 89 04 24 mov %eax,(%esp)
112980: e8 9b d0 ff ff call 10fa20 <_Timespec_To_ticks>
112985: 83 c4 10 add $0x10,%esp
112988: 39 c3 cmp %eax,%ebx
11298a: 72 a6 jb 112932 <_POSIX_Thread_Translate_sched_param+0x4a>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
11298c: 83 ec 0c sub $0xc,%esp
11298f: ff 76 04 pushl 0x4(%esi)
112992: e8 35 ff ff ff call 1128cc <_POSIX_Priority_Is_valid>
112997: 83 c4 10 add $0x10,%esp
11299a: 84 c0 test %al,%al
11299c: 74 94 je 112932 <_POSIX_Thread_Translate_sched_param+0x4a>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
11299e: c7 07 03 00 00 00 movl $0x3,(%edi)
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
1129a4: 8b 45 14 mov 0x14(%ebp),%eax
1129a7: c7 00 4c c3 10 00 movl $0x10c34c,(%eax)
1129ad: 31 c0 xor %eax,%eax
return 0;
1129af: eb 86 jmp 112937 <_POSIX_Thread_Translate_sched_param+0x4f>
1129b1: 8d 76 00 lea 0x0(%esi),%esi
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
1129b4: c7 07 00 00 00 00 movl $0x0,(%edi)
1129ba: 31 c0 xor %eax,%eax
return 0;
1129bc: e9 76 ff ff ff jmp 112937 <_POSIX_Thread_Translate_sched_param+0x4f>
1129c1: 8d 76 00 lea 0x0(%esi),%esi
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
1129c4: c7 07 02 00 00 00 movl $0x2,(%edi)
1129ca: 31 c0 xor %eax,%eax
return 0;
1129cc: e9 66 ff ff ff jmp 112937 <_POSIX_Thread_Translate_sched_param+0x4f>
001117a0 <_POSIX_Threads_Create_extension>:
bool _POSIX_Threads_Create_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *created
)
{
1117a0: 55 push %ebp
1117a1: 89 e5 mov %esp,%ebp
1117a3: 57 push %edi
1117a4: 56 push %esi
1117a5: 53 push %ebx
1117a6: 83 ec 28 sub $0x28,%esp
1117a9: 8b 55 0c mov 0xc(%ebp),%edx
POSIX_API_Control *api;
POSIX_API_Control *executing_api;
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
1117ac: 68 ec 00 00 00 push $0xec
1117b1: 89 55 e4 mov %edx,-0x1c(%ebp)
1117b4: e8 53 d6 ff ff call 10ee0c <_Workspace_Allocate>
1117b9: 89 c3 mov %eax,%ebx
if ( !api )
1117bb: 83 c4 10 add $0x10,%esp
1117be: 85 c0 test %eax,%eax
1117c0: 8b 55 e4 mov -0x1c(%ebp),%edx
1117c3: 0f 84 2f 01 00 00 je 1118f8 <_POSIX_Threads_Create_extension+0x158>
return false;
created->API_Extensions[ THREAD_API_POSIX ] = api;
1117c9: 89 82 f8 00 00 00 mov %eax,0xf8(%edx)
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
1117cf: b9 3c 00 00 00 mov $0x3c,%ecx
1117d4: 31 c0 xor %eax,%eax
1117d6: 89 df mov %ebx,%edi
1117d8: f3 aa rep stos %al,%es:(%edi)
1117da: c7 03 01 00 00 00 movl $0x1,(%ebx)
1117e0: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
1117e7: c7 43 14 01 00 00 00 movl $0x1,0x14(%ebx)
1117ee: c7 43 18 02 00 00 00 movl $0x2,0x18(%ebx)
1117f5: c7 43 34 01 00 00 00 movl $0x1,0x34(%ebx)
1117fc: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx)
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
111803: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx)
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
11180a: c7 83 80 00 00 00 01 movl $0x1,0x80(%ebx)
111811: 00 00 00
api->schedparam = _POSIX_Threads_Default_attributes.schedparam;
111814: be d8 33 12 00 mov $0x1233d8,%esi
111819: 8d bb 84 00 00 00 lea 0x84(%ebx),%edi
11181f: b1 07 mov $0x7,%cl
111821: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->schedparam.sched_priority =
111823: 0f b6 05 14 52 12 00 movzbl 0x125214,%eax
11182a: 2b 42 14 sub 0x14(%edx),%eax
11182d: 89 83 84 00 00 00 mov %eax,0x84(%ebx)
_POSIX_Priority_From_core( created->current_priority );
/*
* POSIX 1003.1 1996, 18.2.2.2
*/
api->cancelation_requested = 0;
111833: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx)
11183a: 00 00 00
api->cancelability_state = PTHREAD_CANCEL_ENABLE;
11183d: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx)
111844: 00 00 00
api->cancelability_type = PTHREAD_CANCEL_DEFERRED;
111847: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx)
11184e: 00 00 00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
111851: 8d 83 e4 00 00 00 lea 0xe4(%ebx),%eax
111857: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx)
the_chain->permanent_null = NULL;
11185d: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
111864: 00 00 00
the_chain->last = _Chain_Head(the_chain);
111867: 8d 83 e0 00 00 00 lea 0xe0(%ebx),%eax
11186d: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx)
*
* The check for class == 1 is debug. Should never really happen.
*/
/* XXX use signal constants */
api->signals_pending = 0;
111873: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx)
11187a: 00 00 00
if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API
11187d: 0f b6 42 0b movzbl 0xb(%edx),%eax
111881: 83 e0 07 and $0x7,%eax
111884: 83 f8 03 cmp $0x3,%eax
111887: 74 53 je 1118dc <_POSIX_Threads_Create_extension+0x13c>
#endif
) {
executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
api->signals_blocked = executing_api->signals_blocked;
} else {
api->signals_blocked = 0xffffffff;
111889: c7 83 cc 00 00 00 ff movl $0xffffffff,0xcc(%ebx)
111890: ff ff ff
}
_Thread_queue_Initialize(
111893: 6a 00 push $0x0
111895: 68 00 10 00 10 push $0x10001000
11189a: 6a 00 push $0x0
11189c: 8d 43 40 lea 0x40(%ebx),%eax
11189f: 50 push %eax
1118a0: 89 55 e4 mov %edx,-0x1c(%ebp)
1118a3: e8 5c cb ff ff call 10e404 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_INTERRUPTIBLE_BY_SIGNAL,
0
);
_Watchdog_Initialize(
1118a8: 8b 55 e4 mov -0x1c(%ebp),%edx
1118ab: 8b 42 08 mov 0x8(%edx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1118ae: c7 83 ac 00 00 00 00 movl $0x0,0xac(%ebx)
1118b5: 00 00 00
the_watchdog->routine = routine;
1118b8: c7 83 c0 00 00 00 48 movl $0x111948,0xc0(%ebx)
1118bf: 19 11 00
the_watchdog->id = id;
1118c2: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx)
the_watchdog->user_data = user_data;
1118c8: 89 93 c8 00 00 00 mov %edx,0xc8(%ebx)
1118ce: b0 01 mov $0x1,%al
_POSIX_Threads_Sporadic_budget_TSR,
created->Object.id,
created
);
return true;
1118d0: 83 c4 10 add $0x10,%esp
}
1118d3: 8d 65 f4 lea -0xc(%ebp),%esp
1118d6: 5b pop %ebx
1118d7: 5e pop %esi
1118d8: 5f pop %edi
1118d9: c9 leave
1118da: c3 ret
1118db: 90 nop
#if defined(RTEMS_DEBUG)
&& _Objects_Get_class( created->Object.id ) == 1
#endif
) {
executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
api->signals_blocked = executing_api->signals_blocked;
1118dc: a1 b8 94 12 00 mov 0x1294b8,%eax
1118e1: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
1118e7: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax
1118ed: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx)
1118f3: eb 9e jmp 111893 <_POSIX_Threads_Create_extension+0xf3>
1118f5: 8d 76 00 lea 0x0(%esi),%esi
POSIX_API_Control *api;
POSIX_API_Control *executing_api;
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
if ( !api )
1118f8: 31 c0 xor %eax,%eax
created->Object.id,
created
);
return true;
}
1118fa: 8d 65 f4 lea -0xc(%ebp),%esp
1118fd: 5b pop %ebx
1118fe: 5e pop %esi
1118ff: 5f pop %edi
111900: c9 leave
111901: c3 ret
00111718 <_POSIX_Threads_Delete_extension>:
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
111718: 55 push %ebp
111719: 89 e5 mov %esp,%ebp
11171b: 57 push %edi
11171c: 56 push %esi
11171d: 53 push %ebx
11171e: 83 ec 28 sub $0x28,%esp
111721: 8b 7d 0c mov 0xc(%ebp),%edi
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
111724: 8b 87 f8 00 00 00 mov 0xf8(%edi),%eax
11172a: 89 45 e4 mov %eax,-0x1c(%ebp)
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
11172d: 57 push %edi
11172e: e8 41 2c 00 00 call 114374 <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
111733: 89 3c 24 mov %edi,(%esp)
111736: e8 9d 2c 00 00 call 1143d8 <_POSIX_Keys_Run_destructors>
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
11173b: 8b 77 28 mov 0x28(%edi),%esi
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
11173e: 8b 5d e4 mov -0x1c(%ebp),%ebx
111741: 83 c3 40 add $0x40,%ebx
111744: 83 c4 10 add $0x10,%esp
111747: eb 08 jmp 111751 <_POSIX_Threads_Delete_extension+0x39>
111749: 8d 76 00 lea 0x0(%esi),%esi
*(void **)the_thread->Wait.return_argument = value_ptr;
11174c: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED
11174f: 89 30 mov %esi,(%eax) <== NOT EXECUTED
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
111751: 83 ec 0c sub $0xc,%esp
111754: 53 push %ebx
111755: e8 2e c9 ff ff call 10e088 <_Thread_queue_Dequeue>
11175a: 83 c4 10 add $0x10,%esp
11175d: 85 c0 test %eax,%eax
11175f: 75 eb jne 11174c <_POSIX_Threads_Delete_extension+0x34><== NEVER TAKEN
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
111761: 8b 45 e4 mov -0x1c(%ebp),%eax
111764: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax)
11176b: 74 1f je 11178c <_POSIX_Threads_Delete_extension+0x74>
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
11176d: c7 87 f8 00 00 00 00 movl $0x0,0xf8(%edi)
111774: 00 00 00
(void) _Workspace_Free( api );
111777: 8b 45 e4 mov -0x1c(%ebp),%eax
11177a: 89 45 08 mov %eax,0x8(%ebp)
}
11177d: 8d 65 f4 lea -0xc(%ebp),%esp
111780: 5b pop %ebx
111781: 5e pop %esi
111782: 5f pop %edi
111783: c9 leave
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
(void) _Workspace_Free( api );
111784: e9 9f d6 ff ff jmp 10ee28 <_Workspace_Free>
111789: 8d 76 00 lea 0x0(%esi),%esi
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
11178c: 83 ec 0c sub $0xc,%esp
11178f: 05 a4 00 00 00 add $0xa4,%eax
111794: 50 push %eax
111795: e8 6e d5 ff ff call 10ed08 <_Watchdog_Remove>
11179a: 83 c4 10 add $0x10,%esp
11179d: eb ce jmp 11176d <_POSIX_Threads_Delete_extension+0x55>
00111698 <_POSIX_Threads_Initialize_user_threads>:
*
* This routine creates and starts all configured user
* initialzation threads.
*/
void _POSIX_Threads_Initialize_user_threads( void )
{
111698: 55 push %ebp
111699: 89 e5 mov %esp,%ebp
11169b: 83 ec 08 sub $0x8,%esp
if ( _POSIX_Threads_Initialize_user_threads_p )
11169e: a1 98 76 12 00 mov 0x127698,%eax
1116a3: 85 c0 test %eax,%eax
1116a5: 74 05 je 1116ac <_POSIX_Threads_Initialize_user_threads+0x14>
(*_POSIX_Threads_Initialize_user_threads_p)();
}
1116a7: c9 leave
* initialzation threads.
*/
void _POSIX_Threads_Initialize_user_threads( void )
{
if ( _POSIX_Threads_Initialize_user_threads_p )
(*_POSIX_Threads_Initialize_user_threads_p)();
1116a8: ff e0 jmp *%eax
1116aa: 66 90 xchg %ax,%ax
}
1116ac: c9 leave
1116ad: c3 ret
0010c06c <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
10c06c: 55 push %ebp
10c06d: 89 e5 mov %esp,%ebp
10c06f: 57 push %edi
10c070: 56 push %esi
10c071: 53 push %ebx
10c072: 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;
10c075: 8b 3d 74 67 12 00 mov 0x126774,%edi
maximum = Configuration_POSIX_API.number_of_initialization_threads;
10c07b: a1 70 67 12 00 mov 0x126770,%eax
10c080: 89 45 a4 mov %eax,-0x5c(%ebp)
if ( !user_threads || maximum == 0 )
10c083: 85 ff test %edi,%edi
10c085: 74 44 je 10c0cb <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN
10c087: 85 c0 test %eax,%eax
10c089: 74 40 je 10c0cb <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN
10c08b: 31 db xor %ebx,%ebx
10c08d: 8d 75 a8 lea -0x58(%ebp),%esi
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
10c090: 83 ec 0c sub $0xc,%esp
10c093: 56 push %esi
10c094: e8 3b 69 00 00 call 1129d4 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
10c099: 5a pop %edx
10c09a: 59 pop %ecx
10c09b: 6a 02 push $0x2
10c09d: 56 push %esi
10c09e: e8 59 69 00 00 call 1129fc <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
10c0a3: 59 pop %ecx
10c0a4: 58 pop %eax
10c0a5: ff 74 df 04 pushl 0x4(%edi,%ebx,8)
10c0a9: 56 push %esi
10c0aa: e8 81 69 00 00 call 112a30 <pthread_attr_setstacksize>
status = pthread_create(
10c0af: 6a 00 push $0x0
10c0b1: ff 34 df pushl (%edi,%ebx,8)
10c0b4: 56 push %esi
10c0b5: 8d 45 e4 lea -0x1c(%ebp),%eax
10c0b8: 50 push %eax
10c0b9: e8 0e fc ff ff call 10bccc <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
10c0be: 83 c4 20 add $0x20,%esp
10c0c1: 85 c0 test %eax,%eax
10c0c3: 75 0e jne 10c0d3 <_POSIX_Threads_Initialize_user_threads_body+0x67>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
10c0c5: 43 inc %ebx
10c0c6: 39 5d a4 cmp %ebx,-0x5c(%ebp)
10c0c9: 77 c5 ja 10c090 <_POSIX_Threads_Initialize_user_threads_body+0x24><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
10c0cb: 8d 65 f4 lea -0xc(%ebp),%esp
10c0ce: 5b pop %ebx
10c0cf: 5e pop %esi
10c0d0: 5f pop %edi
10c0d1: c9 leave
10c0d2: c3 ret
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
10c0d3: 52 push %edx
10c0d4: 50 push %eax
10c0d5: 6a 01 push $0x1
10c0d7: 6a 02 push $0x2
10c0d9: e8 32 1e 00 00 call 10df10 <_Internal_error_Occurred>
00111948 <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
111948: 55 push %ebp
111949: 89 e5 mov %esp,%ebp
11194b: 56 push %esi
11194c: 53 push %ebx
11194d: 8b 75 0c mov 0xc(%ebp),%esi
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
111950: 8b 9e f8 00 00 00 mov 0xf8(%esi),%ebx
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
111956: 83 ec 0c sub $0xc,%esp
111959: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax
11195f: 50 push %eax
111960: e8 ef 10 00 00 call 112a54 <_Timespec_To_ticks>
the_thread->cpu_time_budget = ticks;
111965: 89 46 78 mov %eax,0x78(%esi)
111968: 0f b6 05 14 52 12 00 movzbl 0x125214,%eax
11196f: 2b 83 84 00 00 00 sub 0x84(%ebx),%eax
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
111975: 89 46 18 mov %eax,0x18(%esi)
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
111978: 83 c4 10 add $0x10,%esp
11197b: 8b 4e 1c mov 0x1c(%esi),%ecx
11197e: 85 c9 test %ecx,%ecx
111980: 75 05 jne 111987 <_POSIX_Threads_Sporadic_budget_TSR+0x3f><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
111982: 39 46 14 cmp %eax,0x14(%esi)
111985: 77 35 ja 1119bc <_POSIX_Threads_Sporadic_budget_TSR+0x74>
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
111987: 83 ec 0c sub $0xc,%esp
11198a: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax
111990: 50 push %eax
111991: e8 be 10 00 00 call 112a54 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
111996: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
11199c: 83 c4 10 add $0x10,%esp
11199f: 81 c3 a4 00 00 00 add $0xa4,%ebx
1119a5: 89 5d 0c mov %ebx,0xc(%ebp)
1119a8: c7 45 08 d8 94 12 00 movl $0x1294d8,0x8(%ebp)
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
1119af: 8d 65 f8 lea -0x8(%ebp),%esp
1119b2: 5b pop %ebx
1119b3: 5e pop %esi
1119b4: c9 leave
1119b5: e9 26 d2 ff ff jmp 10ebe0 <_Watchdog_Insert>
1119ba: 66 90 xchg %ax,%ax
if ( the_thread->resource_count == 0 ) {
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
_Thread_Change_priority( the_thread, new_priority, true );
1119bc: 52 push %edx
1119bd: 6a 01 push $0x1
1119bf: 50 push %eax
1119c0: 56 push %esi
1119c1: e8 be bd ff ff call 10d784 <_Thread_Change_priority>
1119c6: 83 c4 10 add $0x10,%esp
1119c9: eb bc jmp 111987 <_POSIX_Threads_Sporadic_budget_TSR+0x3f>
00111904 <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
111904: 55 push %ebp
111905: 89 e5 mov %esp,%ebp
111907: 83 ec 08 sub $0x8,%esp
11190a: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
11190d: 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 */
111913: 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);
11191a: 0f b6 15 14 52 12 00 movzbl 0x125214,%edx
111921: 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;
111927: 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 ) {
11192a: 8b 48 1c mov 0x1c(%eax),%ecx
11192d: 85 c9 test %ecx,%ecx
11192f: 75 05 jne 111936 <_POSIX_Threads_Sporadic_budget_callout+0x32><== 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 ) {
111931: 39 50 14 cmp %edx,0x14(%eax)
111934: 72 02 jb 111938 <_POSIX_Threads_Sporadic_budget_callout+0x34><== ALWAYS TAKEN
#if 0
printk( "lower priority\n" );
#endif
}
}
}
111936: c9 leave <== NOT EXECUTED
111937: c3 ret <== NOT EXECUTED
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
_Thread_Change_priority( the_thread, new_priority, true );
111938: 51 push %ecx
111939: 6a 01 push $0x1
11193b: 52 push %edx
11193c: 50 push %eax
11193d: e8 42 be ff ff call 10d784 <_Thread_Change_priority>
111942: 83 c4 10 add $0x10,%esp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
111945: c9 leave
111946: c3 ret
00114374 <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
114374: 55 push %ebp
114375: 89 e5 mov %esp,%ebp
114377: 57 push %edi
114378: 56 push %esi
114379: 53 push %ebx
11437a: 83 ec 0c sub $0xc,%esp
POSIX_Cancel_Handler_control *handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
11437d: 8b 45 08 mov 0x8(%ebp),%eax
114380: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
114386: c7 86 d4 00 00 00 01 movl $0x1,0xd4(%esi)
11438d: 00 00 00
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
114390: 8d 9e e4 00 00 00 lea 0xe4(%esi),%ebx
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
114396: 39 9e e0 00 00 00 cmp %ebx,0xe0(%esi)
11439c: 74 30 je 1143ce <_POSIX_Threads_cancel_run+0x5a>
11439e: 66 90 xchg %ax,%ax
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
_ISR_Disable( level );
1143a0: 9c pushf
1143a1: fa cli
1143a2: 59 pop %ecx
handler = (POSIX_Cancel_Handler_control *)
1143a3: 8b 7b 04 mov 0x4(%ebx),%edi
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
1143a6: 8b 17 mov (%edi),%edx
previous = the_node->previous;
1143a8: 8b 47 04 mov 0x4(%edi),%eax
next->previous = previous;
1143ab: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
1143ae: 89 10 mov %edx,(%eax)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
1143b0: 51 push %ecx
1143b1: 9d popf
(*handler->routine)( handler->arg );
1143b2: 83 ec 0c sub $0xc,%esp
1143b5: ff 77 0c pushl 0xc(%edi)
1143b8: ff 57 08 call *0x8(%edi)
_Workspace_Free( handler );
1143bb: 89 3c 24 mov %edi,(%esp)
1143be: e8 65 aa ff ff call 10ee28 <_Workspace_Free>
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
1143c3: 83 c4 10 add $0x10,%esp
1143c6: 39 9e e0 00 00 00 cmp %ebx,0xe0(%esi)
1143cc: 75 d2 jne 1143a0 <_POSIX_Threads_cancel_run+0x2c><== NEVER TAKEN
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
1143ce: 8d 65 f4 lea -0xc(%ebp),%esp
1143d1: 5b pop %ebx
1143d2: 5e pop %esi
1143d3: 5f pop %edi
1143d4: c9 leave
1143d5: c3 ret
00112630 <_POSIX_Timer_Insert_helper>:
Watchdog_Interval ticks,
Objects_Id id,
Watchdog_Service_routine_entry TSR,
void *arg
)
{
112630: 55 push %ebp
112631: 89 e5 mov %esp,%ebp
112633: 56 push %esi
112634: 53 push %ebx
112635: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
(void) _Watchdog_Remove( timer );
112638: 83 ec 0c sub $0xc,%esp
11263b: 53 push %ebx
11263c: e8 5b d1 ff ff call 10f79c <_Watchdog_Remove>
_ISR_Disable( level );
112641: 9c pushf
112642: fa cli
112643: 5e pop %esi
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( timer->state != WATCHDOG_INACTIVE ) {
112644: 83 c4 10 add $0x10,%esp
112647: 8b 43 08 mov 0x8(%ebx),%eax
11264a: 85 c0 test %eax,%eax
11264c: 74 0e je 11265c <_POSIX_Timer_Insert_helper+0x2c>
_ISR_Enable( level );
11264e: 56 push %esi
11264f: 9d popf
112650: 31 c0 xor %eax,%eax
*/
_Watchdog_Initialize( timer, TSR, id, arg );
_Watchdog_Insert_ticks( timer, ticks );
_ISR_Enable( level );
return true;
}
112652: 8d 65 f8 lea -0x8(%ebp),%esp
112655: 5b pop %ebx
112656: 5e pop %esi
112657: c9 leave
112658: c3 ret
112659: 8d 76 00 lea 0x0(%esi),%esi
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
11265c: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
the_watchdog->routine = routine;
112663: 8b 45 14 mov 0x14(%ebp),%eax
112666: 89 43 1c mov %eax,0x1c(%ebx)
the_watchdog->id = id;
112669: 8b 45 10 mov 0x10(%ebp),%eax
11266c: 89 43 20 mov %eax,0x20(%ebx)
the_watchdog->user_data = user_data;
11266f: 8b 45 18 mov 0x18(%ebp),%eax
112672: 89 43 24 mov %eax,0x24(%ebx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
112675: 8b 45 0c mov 0xc(%ebp),%eax
112678: 89 43 0c mov %eax,0xc(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
11267b: 83 ec 08 sub $0x8,%esp
11267e: 53 push %ebx
11267f: 68 18 b6 12 00 push $0x12b618
112684: e8 eb cf ff ff call 10f674 <_Watchdog_Insert>
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
_Watchdog_Initialize( timer, TSR, id, arg );
_Watchdog_Insert_ticks( timer, ticks );
_ISR_Enable( level );
112689: 56 push %esi
11268a: 9d popf
11268b: b0 01 mov $0x1,%al
return true;
11268d: 83 c4 10 add $0x10,%esp
}
112690: 8d 65 f8 lea -0x8(%ebp),%esp
112693: 5b pop %ebx
112694: 5e pop %esi
112695: c9 leave
112696: c3 ret
0010bdec <_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)
{
10bdec: 55 push %ebp
10bded: 89 e5 mov %esp,%ebp
10bdef: 53 push %ebx
10bdf0: 83 ec 04 sub $0x4,%esp
10bdf3: 8b 5d 0c mov 0xc(%ebp),%ebx
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
10bdf6: ff 43 68 incl 0x68(%ebx)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
10bdf9: 8b 53 54 mov 0x54(%ebx),%edx
10bdfc: 85 d2 test %edx,%edx
10bdfe: 75 28 jne 10be28 <_POSIX_Timer_TSR+0x3c>
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
10be00: 8b 43 58 mov 0x58(%ebx),%eax
10be03: 85 c0 test %eax,%eax
10be05: 75 21 jne 10be28 <_POSIX_Timer_TSR+0x3c> <== ALWAYS TAKEN
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
10be07: 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 ) ) {
10be0b: 83 ec 08 sub $0x8,%esp
10be0e: ff 73 44 pushl 0x44(%ebx)
10be11: ff 73 38 pushl 0x38(%ebx)
10be14: e8 a7 63 00 00 call 1121c0 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
10be19: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
10be20: 83 c4 10 add $0x10,%esp
}
10be23: 8b 5d fc mov -0x4(%ebp),%ebx
10be26: c9 leave
10be27: c3 ret
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
10be28: 83 ec 0c sub $0xc,%esp
10be2b: 53 push %ebx
10be2c: 68 ec bd 10 00 push $0x10bdec
10be31: ff 73 08 pushl 0x8(%ebx)
10be34: ff 73 64 pushl 0x64(%ebx)
10be37: 8d 43 10 lea 0x10(%ebx),%eax
10be3a: 50 push %eax
10be3b: e8 f0 67 00 00 call 112630 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
10be40: 83 c4 20 add $0x20,%esp
10be43: 84 c0 test %al,%al
10be45: 74 dc je 10be23 <_POSIX_Timer_TSR+0x37> <== NEVER TAKEN
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
10be47: 83 ec 0c sub $0xc,%esp
10be4a: 8d 43 6c lea 0x6c(%ebx),%eax
10be4d: 50 push %eax
10be4e: e8 4d 16 00 00 call 10d4a0 <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10be53: 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 ) ||
10be57: 83 c4 10 add $0x10,%esp
10be5a: eb af jmp 10be0b <_POSIX_Timer_TSR+0x1f>
001146f0 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
1146f0: 55 push %ebp
1146f1: 89 e5 mov %esp,%ebp
1146f3: 57 push %edi
1146f4: 56 push %esi
1146f5: 53 push %ebx
1146f6: 83 ec 48 sub $0x48,%esp
1146f9: 8b 75 08 mov 0x8(%ebp),%esi
1146fc: 8b 5d 0c mov 0xc(%ebp),%ebx
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
1146ff: 6a 01 push $0x1
114701: 0f b6 45 10 movzbl 0x10(%ebp),%eax
114705: 50 push %eax
114706: 8d 7d dc lea -0x24(%ebp),%edi
114709: 57 push %edi
11470a: 53 push %ebx
11470b: 56 push %esi
11470c: e8 6b 00 00 00 call 11477c <_POSIX_signals_Clear_signals>
114711: 83 c4 20 add $0x20,%esp
114714: 84 c0 test %al,%al
114716: 74 58 je 114770 <_POSIX_signals_Check_signal+0x80>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
114718: 8d 04 5b lea (%ebx,%ebx,2),%eax
11471b: c1 e0 02 shl $0x2,%eax
11471e: 8b 90 e8 99 12 00 mov 0x1299e8(%eax),%edx
114724: 89 55 c4 mov %edx,-0x3c(%ebp)
114727: 4a dec %edx
114728: 74 46 je 114770 <_POSIX_signals_Check_signal+0x80><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
11472a: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
114730: 8b 90 e4 99 12 00 mov 0x1299e4(%eax),%edx
114736: 09 ca or %ecx,%edx
114738: 89 96 cc 00 00 00 mov %edx,0xcc(%esi)
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
11473e: 83 b8 e0 99 12 00 02 cmpl $0x2,0x1299e0(%eax)
114745: 74 21 je 114768 <_POSIX_signals_Check_signal+0x78>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
114747: 83 ec 0c sub $0xc,%esp
11474a: 53 push %ebx
11474b: 89 4d d4 mov %ecx,-0x2c(%ebp)
11474e: ff 55 c4 call *-0x3c(%ebp)
114751: 83 c4 10 add $0x10,%esp
114754: 8b 4d d4 mov -0x2c(%ebp),%ecx
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
114757: 89 8e cc 00 00 00 mov %ecx,0xcc(%esi)
11475d: b0 01 mov $0x1,%al
return true;
}
11475f: 8d 65 f4 lea -0xc(%ebp),%esp
114762: 5b pop %ebx
114763: 5e pop %esi
114764: 5f pop %edi
114765: c9 leave
114766: c3 ret
114767: 90 nop
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
114768: 50 push %eax
114769: 6a 00 push $0x0
11476b: 57 push %edi
11476c: eb dc jmp 11474a <_POSIX_signals_Check_signal+0x5a>
11476e: 66 90 xchg %ax,%ax
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
114770: 31 c0 xor %eax,%eax
}
114772: 8d 65 f4 lea -0xc(%ebp),%esp
114775: 5b pop %ebx
114776: 5e pop %esi
114777: 5f pop %edi
114778: c9 leave
114779: c3 ret
00115048 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
115048: 55 push %ebp
115049: 89 e5 mov %esp,%ebp
11504b: 53 push %ebx
11504c: 8b 4d 08 mov 0x8(%ebp),%ecx
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
11504f: 9c pushf
115050: fa cli
115051: 5a pop %edx
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
115052: 8d 04 49 lea (%ecx,%ecx,2),%eax
115055: c1 e0 02 shl $0x2,%eax
115058: 83 b8 e0 99 12 00 02 cmpl $0x2,0x1299e0(%eax)
11505f: 74 23 je 115084 <_POSIX_signals_Clear_process_signals+0x3c>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
115061: 49 dec %ecx
115062: b8 fe ff ff ff mov $0xfffffffe,%eax
115067: d3 c0 rol %cl,%eax
115069: 23 05 e8 9b 12 00 and 0x129be8,%eax
11506f: a3 e8 9b 12 00 mov %eax,0x129be8
if ( !_POSIX_signals_Pending )
115074: 85 c0 test %eax,%eax
115076: 75 06 jne 11507e <_POSIX_signals_Clear_process_signals+0x36><== NEVER TAKEN
_Thread_Do_post_task_switch_extension--;
115078: ff 0d 9c 94 12 00 decl 0x12949c
}
_ISR_Enable( level );
11507e: 52 push %edx
11507f: 9d popf
}
115080: 5b pop %ebx
115081: c9 leave
115082: c3 ret
115083: 90 nop
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
115084: 8d 98 04 9c 12 00 lea 0x129c04(%eax),%ebx
11508a: 39 98 00 9c 12 00 cmp %ebx,0x129c00(%eax)
115090: 75 ec jne 11507e <_POSIX_signals_Clear_process_signals+0x36><== NEVER TAKEN
115092: eb cd jmp 115061 <_POSIX_signals_Clear_process_signals+0x19>
0011477c <_POSIX_signals_Clear_signals>:
int signo,
siginfo_t *info,
bool is_global,
bool check_blocked
)
{
11477c: 55 push %ebp
11477d: 89 e5 mov %esp,%ebp
11477f: 57 push %edi
114780: 56 push %esi
114781: 53 push %ebx
114782: 83 ec 1c sub $0x1c,%esp
114785: 8b 5d 0c mov 0xc(%ebp),%ebx
114788: 0f b6 7d 14 movzbl 0x14(%ebp),%edi
11478c: 8d 4b ff lea -0x1(%ebx),%ecx
11478f: b8 01 00 00 00 mov $0x1,%eax
114794: d3 e0 shl %cl,%eax
/* set blocked signals based on if checking for them, SIGNAL_ALL_MASK
* insures that no signals are blocked and all are checked.
*/
if ( check_blocked )
114796: 80 7d 18 00 cmpb $0x0,0x18(%ebp)
11479a: 75 3c jne 1147d8 <_POSIX_signals_Clear_signals+0x5c>
11479c: b9 ff ff ff ff mov $0xffffffff,%ecx
signals_blocked = SIGNAL_ALL_MASK;
/* XXX is this right for siginfo type signals? */
/* XXX are we sure they can be cleared the same way? */
_ISR_Disable( level );
1147a1: 9c pushf
1147a2: fa cli
1147a3: 8f 45 e4 popl -0x1c(%ebp)
if ( is_global ) {
1147a6: 89 fa mov %edi,%edx
1147a8: 84 d2 test %dl,%dl
1147aa: 74 3c je 1147e8 <_POSIX_signals_Clear_signals+0x6c>
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
1147ac: 23 05 e8 9b 12 00 and 0x129be8,%eax
1147b2: 85 c8 test %ecx,%eax
1147b4: 74 5e je 114814 <_POSIX_signals_Clear_signals+0x98>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
1147b6: 8d 14 1b lea (%ebx,%ebx,1),%edx
1147b9: 8d 04 1a lea (%edx,%ebx,1),%eax
1147bc: 83 3c 85 e0 99 12 00 cmpl $0x2,0x1299e0(,%eax,4)
1147c3: 02
1147c4: 74 52 je 114818 <_POSIX_signals_Clear_signals+0x9c>
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
1147c6: 83 ec 0c sub $0xc,%esp
1147c9: 53 push %ebx
1147ca: e8 79 08 00 00 call 115048 <_POSIX_signals_Clear_process_signals>
1147cf: b0 01 mov $0x1,%al
1147d1: 83 c4 10 add $0x10,%esp
1147d4: eb 2f jmp 114805 <_POSIX_signals_Clear_signals+0x89>
1147d6: 66 90 xchg %ax,%ax
/* set blocked signals based on if checking for them, SIGNAL_ALL_MASK
* insures that no signals are blocked and all are checked.
*/
if ( check_blocked )
signals_blocked = ~api->signals_blocked;
1147d8: 8b 55 08 mov 0x8(%ebp),%edx
1147db: 8b 8a cc 00 00 00 mov 0xcc(%edx),%ecx
1147e1: f7 d1 not %ecx
1147e3: eb bc jmp 1147a1 <_POSIX_signals_Clear_signals+0x25>
1147e5: 8d 76 00 lea 0x0(%esi),%esi
}
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
1147e8: 8b 55 08 mov 0x8(%ebp),%edx
1147eb: 8b 9a d0 00 00 00 mov 0xd0(%edx),%ebx
1147f1: 89 c6 mov %eax,%esi
1147f3: 21 de and %ebx,%esi
1147f5: 85 ce test %ecx,%esi
1147f7: 74 1b je 114814 <_POSIX_signals_Clear_signals+0x98>
api->signals_pending &= ~mask;
1147f9: f7 d0 not %eax
1147fb: 21 d8 and %ebx,%eax
1147fd: 89 82 d0 00 00 00 mov %eax,0xd0(%edx)
114803: b0 01 mov $0x1,%al
do_callout = true;
}
}
_ISR_Enable( level );
114805: ff 75 e4 pushl -0x1c(%ebp)
114808: 9d popf
return do_callout;
}
114809: 8d 65 f4 lea -0xc(%ebp),%esp
11480c: 5b pop %ebx
11480d: 5e pop %esi
11480e: 5f pop %edi
11480f: c9 leave
114810: c3 ret
114811: 8d 76 00 lea 0x0(%esi),%esi
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
114814: 31 c0 xor %eax,%eax
114816: eb ed jmp 114805 <_POSIX_signals_Clear_signals+0x89>
_ISR_Disable( level );
if ( is_global ) {
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
114818: 89 c2 mov %eax,%edx
11481a: c1 e2 02 shl $0x2,%edx
11481d: 8d 8a 00 9c 12 00 lea 0x129c00(%edx),%ecx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
114823: 8b 82 00 9c 12 00 mov 0x129c00(%edx),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
114829: 8d 71 04 lea 0x4(%ecx),%esi
11482c: 39 f0 cmp %esi,%eax
11482e: 74 48 je 114878 <_POSIX_signals_Clear_signals+0xfc>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
114830: 8b 30 mov (%eax),%esi
the_chain->first = new_first;
114832: 89 b2 00 9c 12 00 mov %esi,0x129c00(%edx)
new_first->previous = _Chain_Head(the_chain);
114838: 89 4e 04 mov %ecx,0x4(%esi)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
_POSIX_signals_Clear_process_signals( signo );
11483b: 83 ec 0c sub $0xc,%esp
11483e: 53 push %ebx
11483f: 89 45 e0 mov %eax,-0x20(%ebp)
114842: e8 01 08 00 00 call 115048 <_POSIX_signals_Clear_process_signals>
* It may be impossible to get here with an empty chain
* BUT until that is proven we need to be defensive and
* protect against it.
*/
if ( psiginfo ) {
*info = psiginfo->Info;
114847: 8b 45 e0 mov -0x20(%ebp),%eax
11484a: 8d 70 08 lea 0x8(%eax),%esi
11484d: b9 03 00 00 00 mov $0x3,%ecx
114852: 8b 7d 10 mov 0x10(%ebp),%edi
114855: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
114857: c7 00 64 9b 12 00 movl $0x129b64,(%eax)
old_last_node = the_chain->last;
11485d: 8b 15 68 9b 12 00 mov 0x129b68,%edx
the_chain->last = the_node;
114863: a3 68 9b 12 00 mov %eax,0x129b68
old_last_node->next = the_node;
114868: 89 02 mov %eax,(%edx)
the_node->previous = old_last_node;
11486a: 89 50 04 mov %edx,0x4(%eax)
11486d: 83 c4 10 add $0x10,%esp
114870: e9 51 ff ff ff jmp 1147c6 <_POSIX_signals_Clear_signals+0x4a>
114875: 8d 76 00 lea 0x0(%esi),%esi
if ( is_global ) {
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
_POSIX_signals_Clear_process_signals( signo );
114878: 83 ec 0c sub $0xc,%esp
11487b: 53 push %ebx
11487c: e8 c7 07 00 00 call 115048 <_POSIX_signals_Clear_process_signals>
114881: 83 c4 10 add $0x10,%esp
114884: e9 3d ff ff ff jmp 1147c6 <_POSIX_signals_Clear_signals+0x4a>
0010c74c <_POSIX_signals_Get_highest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
10c74c: 55 push %ebp
10c74d: 89 e5 mov %esp,%ebp
10c74f: 56 push %esi
10c750: 53 push %ebx
10c751: 8b 55 08 mov 0x8(%ebp),%edx
10c754: b8 1b 00 00 00 mov $0x1b,%eax
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10c759: bb 01 00 00 00 mov $0x1,%ebx
10c75e: 8d 48 ff lea -0x1(%eax),%ecx
10c761: 89 de mov %ebx,%esi
10c763: d3 e6 shl %cl,%esi
10c765: 85 d6 test %edx,%esi
10c767: 75 20 jne 10c789 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10c769: 40 inc %eax
10c76a: 83 f8 20 cmp $0x20,%eax
10c76d: 75 ef jne 10c75e <_POSIX_signals_Get_highest+0x12>
10c76f: 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 ) ) {
10c771: bb 01 00 00 00 mov $0x1,%ebx
10c776: eb 06 jmp 10c77e <_POSIX_signals_Get_highest+0x32>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
10c778: 40 inc %eax
10c779: 83 f8 1b cmp $0x1b,%eax
10c77c: 74 0b je 10c789 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN
if ( set & signo_to_mask( signo ) ) {
10c77e: 8d 48 ff lea -0x1(%eax),%ecx
10c781: 89 de mov %ebx,%esi
10c783: d3 e6 shl %cl,%esi
10c785: 85 d6 test %edx,%esi
10c787: 74 ef je 10c778 <_POSIX_signals_Get_highest+0x2c>
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
10c789: 5b pop %ebx
10c78a: 5e pop %esi
10c78b: c9 leave
10c78c: c3 ret
001115c8 <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
1115c8: 55 push %ebp
1115c9: 89 e5 mov %esp,%ebp
1115cb: 57 push %edi
1115cc: 56 push %esi
1115cd: 53 push %ebx
1115ce: 83 ec 0c sub $0xc,%esp
POSIX_API_Control *api;
int signo;
ISR_Level level;
int hold_errno;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
1115d1: 8b 45 08 mov 0x8(%ebp),%eax
1115d4: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
1115da: a1 b8 94 12 00 mov 0x1294b8,%eax
1115df: 8b 78 34 mov 0x34(%eax),%edi
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
1115e2: 85 f6 test %esi,%esi
1115e4: 74 71 je 111657 <_POSIX_signals_Post_switch_extension+0x8f><== NEVER TAKEN
1115e6: 66 90 xchg %ax,%ax
*
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
1115e8: 9c pushf
1115e9: fa cli
1115ea: 59 pop %ecx
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
1115eb: 8b 15 e8 9b 12 00 mov 0x129be8,%edx
1115f1: 0b 96 d0 00 00 00 or 0xd0(%esi),%edx
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
1115f7: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax
1115fd: f7 d0 not %eax
1115ff: 85 c2 test %eax,%edx
111601: 74 4a je 11164d <_POSIX_signals_Post_switch_extension+0x85>
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
111603: 51 push %ecx
111604: 9d popf
111605: bb 1b 00 00 00 mov $0x1b,%ebx
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
11160a: 52 push %edx
11160b: 6a 00 push $0x0
11160d: 53 push %ebx
11160e: 56 push %esi
11160f: e8 dc 30 00 00 call 1146f0 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, true );
111614: 83 c4 0c add $0xc,%esp
111617: 6a 01 push $0x1
111619: 53 push %ebx
11161a: 56 push %esi
11161b: e8 d0 30 00 00 call 1146f0 <_POSIX_signals_Check_signal>
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
111620: 43 inc %ebx
111621: 83 c4 10 add $0x10,%esp
111624: 83 fb 20 cmp $0x20,%ebx
111627: 75 e1 jne 11160a <_POSIX_signals_Post_switch_extension+0x42>
111629: b3 01 mov $0x1,%bl
11162b: 90 nop
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
11162c: 50 push %eax
11162d: 6a 00 push $0x0
11162f: 53 push %ebx
111630: 56 push %esi
111631: e8 ba 30 00 00 call 1146f0 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, true );
111636: 83 c4 0c add $0xc,%esp
111639: 6a 01 push $0x1
11163b: 53 push %ebx
11163c: 56 push %esi
11163d: e8 ae 30 00 00 call 1146f0 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
111642: 43 inc %ebx
111643: 83 c4 10 add $0x10,%esp
111646: 83 fb 1b cmp $0x1b,%ebx
111649: 75 e1 jne 11162c <_POSIX_signals_Post_switch_extension+0x64>
11164b: eb 9b jmp 1115e8 <_POSIX_signals_Post_switch_extension+0x20>
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
11164d: 51 push %ecx
11164e: 9d popf
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
}
_Thread_Executing->Wait.return_code = hold_errno;
11164f: a1 b8 94 12 00 mov 0x1294b8,%eax
111654: 89 78 34 mov %edi,0x34(%eax)
}
111657: 8d 65 f4 lea -0xc(%ebp),%esp
11165a: 5b pop %ebx
11165b: 5e pop %esi
11165c: 5f pop %edi
11165d: c9 leave
11165e: c3 ret
001148b0 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
1148b0: 55 push %ebp
1148b1: 89 e5 mov %esp,%ebp
1148b3: 57 push %edi
1148b4: 56 push %esi
1148b5: 53 push %ebx
1148b6: 83 ec 0c sub $0xc,%esp
1148b9: 8b 5d 08 mov 0x8(%ebp),%ebx
1148bc: 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 ];
1148bf: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi
1148c5: 8d 4a ff lea -0x1(%edx),%ecx
1148c8: b8 01 00 00 00 mov $0x1,%eax
1148cd: d3 e0 shl %cl,%eax
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
1148cf: 8b 4b 10 mov 0x10(%ebx),%ecx
1148d2: 89 cf mov %ecx,%edi
1148d4: 81 e7 00 80 00 10 and $0x10008000,%edi
1148da: 81 ff 00 80 00 10 cmp $0x10008000,%edi
1148e0: 74 76 je 114958 <_POSIX_signals_Unblock_thread+0xa8>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
1148e2: 8b 96 cc 00 00 00 mov 0xcc(%esi),%edx
1148e8: f7 d2 not %edx
1148ea: 85 d0 test %edx,%eax
1148ec: 74 5e je 11494c <_POSIX_signals_Unblock_thread+0x9c>
* 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;
1148ee: c6 43 74 01 movb $0x1,0x74(%ebx)
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
1148f2: f7 c1 00 00 00 10 test $0x10000000,%ecx
1148f8: 74 3a je 114934 <_POSIX_signals_Unblock_thread+0x84>
the_thread->Wait.return_code = EINTR;
1148fa: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
114901: f7 c1 e0 be 03 00 test $0x3bee0,%ecx
114907: 0f 85 93 00 00 00 jne 1149a0 <_POSIX_signals_Unblock_thread+0xf0>
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ){
11490d: 83 e1 08 and $0x8,%ecx
114910: 74 3a je 11494c <_POSIX_signals_Unblock_thread+0x9c><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
114912: 83 ec 0c sub $0xc,%esp
114915: 8d 43 48 lea 0x48(%ebx),%eax
114918: 50 push %eax
114919: e8 ea a3 ff ff call 10ed08 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
11491e: 58 pop %eax
11491f: 5a pop %edx
114920: 68 f8 ff 03 10 push $0x1003fff8
114925: 53 push %ebx
114926: e8 99 8f ff ff call 10d8c4 <_Thread_Clear_state>
11492b: 31 c0 xor %eax,%eax
11492d: 83 c4 10 add $0x10,%esp
114930: eb 1c jmp 11494e <_POSIX_signals_Unblock_thread+0x9e>
114932: 66 90 xchg %ax,%ax
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
114934: 85 c9 test %ecx,%ecx
114936: 75 14 jne 11494c <_POSIX_signals_Unblock_thread+0x9c><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
114938: a1 94 94 12 00 mov 0x129494,%eax
11493d: 85 c0 test %eax,%eax
11493f: 74 0b je 11494c <_POSIX_signals_Unblock_thread+0x9c>
114941: 3b 1d b8 94 12 00 cmp 0x1294b8,%ebx
114947: 74 7b je 1149c4 <_POSIX_signals_Unblock_thread+0x114><== ALWAYS TAKEN
114949: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Signals_to_thread_executing = true;
11494c: 31 c0 xor %eax,%eax
}
}
return false;
}
11494e: 8d 65 f4 lea -0xc(%ebp),%esp
114951: 5b pop %ebx
114952: 5e pop %esi
114953: 5f pop %edi
114954: c9 leave
114955: c3 ret
114956: 66 90 xchg %ax,%ax
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
114958: 85 43 30 test %eax,0x30(%ebx)
11495b: 74 33 je 114990 <_POSIX_signals_Unblock_thread+0xe0>
the_thread->Wait.return_code = EINTR;
11495d: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
114964: 8b 43 28 mov 0x28(%ebx),%eax
if ( !info ) {
114967: 8b 4d 10 mov 0x10(%ebp),%ecx
11496a: 85 c9 test %ecx,%ecx
11496c: 74 42 je 1149b0 <_POSIX_signals_Unblock_thread+0x100>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
11496e: b9 03 00 00 00 mov $0x3,%ecx
114973: 89 c7 mov %eax,%edi
114975: 8b 75 10 mov 0x10(%ebp),%esi
114978: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
_Thread_queue_Extract_with_proxy( the_thread );
11497a: 83 ec 0c sub $0xc,%esp
11497d: 53 push %ebx
11497e: e8 29 9a ff ff call 10e3ac <_Thread_queue_Extract_with_proxy>
114983: b0 01 mov $0x1,%al
return true;
114985: 83 c4 10 add $0x10,%esp
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
}
}
return false;
}
114988: 8d 65 f4 lea -0xc(%ebp),%esp
11498b: 5b pop %ebx
11498c: 5e pop %esi
11498d: 5f pop %edi
11498e: c9 leave
11498f: c3 ret
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
114990: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx
114996: f7 d1 not %ecx
114998: 85 c8 test %ecx,%eax
11499a: 75 c1 jne 11495d <_POSIX_signals_Unblock_thread+0xad>
11499c: eb ae jmp 11494c <_POSIX_signals_Unblock_thread+0x9c>
11499e: 66 90 xchg %ax,%ax
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
1149a0: 83 ec 0c sub $0xc,%esp
1149a3: 53 push %ebx
1149a4: e8 03 9a ff ff call 10e3ac <_Thread_queue_Extract_with_proxy>
1149a9: 31 c0 xor %eax,%eax
1149ab: 83 c4 10 add $0x10,%esp
1149ae: eb 9e jmp 11494e <_POSIX_signals_Unblock_thread+0x9e>
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
1149b0: 89 10 mov %edx,(%eax)
the_info->si_code = SI_USER;
1149b2: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
the_info->si_value.sival_int = 0;
1149b9: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
1149c0: eb b8 jmp 11497a <_POSIX_signals_Unblock_thread+0xca>
1149c2: 66 90 xchg %ax,%ax
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
1149c4: c6 05 68 95 12 00 01 movb $0x1,0x129568
1149cb: 31 c0 xor %eax,%eax
1149cd: e9 7c ff ff ff jmp 11494e <_POSIX_signals_Unblock_thread+0x9e>
00100220 <_Partition_Manager_initialization>:
#include <rtems/rtems/part.h>
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Partition_Manager_initialization(void)
{
100220: 55 push %ebp
100221: 89 e5 mov %esp,%ebp
}
100223: c9 leave
100224: c3 ret
00131fd0 <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
131fd0: 55 push %ebp
131fd1: 89 e5 mov %esp,%ebp
131fd3: 56 push %esi
131fd4: 53 push %ebx
131fd5: 8b 5d 08 mov 0x8(%ebp),%ebx
131fd8: 8b 75 0c mov 0xc(%ebp),%esi
if ( !the_heap )
131fdb: 85 db test %ebx,%ebx
131fdd: 74 35 je 132014 <_Protected_heap_Get_information+0x44>
return false;
if ( !the_info )
131fdf: 85 f6 test %esi,%esi
131fe1: 74 31 je 132014 <_Protected_heap_Get_information+0x44>
return false;
_RTEMS_Lock_allocator();
131fe3: 83 ec 0c sub $0xc,%esp
131fe6: ff 35 10 50 17 00 pushl 0x175010
131fec: e8 f3 19 fe ff call 1139e4 <_API_Mutex_Lock>
_Heap_Get_information( the_heap, the_info );
131ff1: 5a pop %edx
131ff2: 59 pop %ecx
131ff3: 56 push %esi
131ff4: 53 push %ebx
131ff5: e8 0a 31 01 00 call 145104 <_Heap_Get_information>
_RTEMS_Unlock_allocator();
131ffa: 58 pop %eax
131ffb: ff 35 10 50 17 00 pushl 0x175010
132001: e8 26 1a fe ff call 113a2c <_API_Mutex_Unlock>
132006: b0 01 mov $0x1,%al
return true;
132008: 83 c4 10 add $0x10,%esp
}
13200b: 8d 65 f8 lea -0x8(%ebp),%esp
13200e: 5b pop %ebx
13200f: 5e pop %esi
132010: c9 leave
132011: c3 ret
132012: 66 90 xchg %ax,%ax
_RTEMS_Lock_allocator();
_Heap_Get_information( the_heap, the_info );
_RTEMS_Unlock_allocator();
return true;
132014: 31 c0 xor %eax,%eax
}
132016: 8d 65 f8 lea -0x8(%ebp),%esp
132019: 5b pop %ebx
13201a: 5e pop %esi
13201b: c9 leave
13201c: c3 ret
00110f28 <_Protected_heap_Walk>:
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
110f28: 55 push %ebp
110f29: 89 e5 mov %esp,%ebp
110f2b: 56 push %esi
110f2c: 53 push %ebx
110f2d: 83 ec 10 sub $0x10,%esp
110f30: 8b 5d 08 mov 0x8(%ebp),%ebx
110f33: 8b 75 0c mov 0xc(%ebp),%esi
110f36: 8a 45 10 mov 0x10(%ebp),%al
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
110f39: 8b 15 38 01 13 00 mov 0x130138,%edx
110f3f: 85 d2 test %edx,%edx
110f41: 74 19 je 110f5c <_Protected_heap_Walk+0x34>
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
110f43: 0f b6 c0 movzbl %al,%eax
110f46: 89 45 10 mov %eax,0x10(%ebp)
110f49: 89 75 0c mov %esi,0xc(%ebp)
110f4c: 89 5d 08 mov %ebx,0x8(%ebp)
}
return status;
}
110f4f: 8d 65 f8 lea -0x8(%ebp),%esp
110f52: 5b pop %ebx
110f53: 5e pop %esi
110f54: c9 leave
if ( !_Thread_Dispatch_disable_level ) {
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
110f55: e9 f2 f1 ff ff jmp 11014c <_Heap_Walk>
110f5a: 66 90 xchg %ax,%ax
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
_RTEMS_Lock_allocator();
110f5c: 83 ec 0c sub $0xc,%esp
110f5f: ff 35 f0 01 13 00 pushl 0x1301f0
110f65: 88 45 f4 mov %al,-0xc(%ebp)
110f68: e8 e7 e3 ff ff call 10f354 <_API_Mutex_Lock>
status = _Heap_Walk( the_heap, source, do_dump );
110f6d: 83 c4 0c add $0xc,%esp
110f70: 8a 45 f4 mov -0xc(%ebp),%al
110f73: 0f b6 c0 movzbl %al,%eax
110f76: 50 push %eax
110f77: 56 push %esi
110f78: 53 push %ebx
110f79: e8 ce f1 ff ff call 11014c <_Heap_Walk>
_RTEMS_Unlock_allocator();
110f7e: 5a pop %edx
110f7f: ff 35 f0 01 13 00 pushl 0x1301f0
110f85: 88 45 f4 mov %al,-0xc(%ebp)
110f88: e8 0f e4 ff ff call 10f39c <_API_Mutex_Unlock>
110f8d: 83 c4 10 add $0x10,%esp
} else {
status = _Heap_Walk( the_heap, source, do_dump );
}
return status;
}
110f90: 8a 45 f4 mov -0xc(%ebp),%al
110f93: 8d 65 f8 lea -0x8(%ebp),%esp
110f96: 5b pop %ebx
110f97: 5e pop %esi
110f98: c9 leave
110f99: c3 ret
00111ce4 <_RTEMS_tasks_Initialize_user_tasks>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
111ce4: 55 push %ebp
111ce5: 89 e5 mov %esp,%ebp
111ce7: 83 ec 08 sub $0x8,%esp
if ( _RTEMS_tasks_Initialize_user_tasks_p )
111cea: a1 60 52 12 00 mov 0x125260,%eax
111cef: 85 c0 test %eax,%eax
111cf1: 74 05 je 111cf8 <_RTEMS_tasks_Initialize_user_tasks+0x14>
(*_RTEMS_tasks_Initialize_user_tasks_p)();
}
111cf3: c9 leave
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
if ( _RTEMS_tasks_Initialize_user_tasks_p )
(*_RTEMS_tasks_Initialize_user_tasks_p)();
111cf4: ff e0 jmp *%eax
111cf6: 66 90 xchg %ax,%ax
}
111cf8: c9 leave
111cf9: c3 ret
0010c0b0 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
10c0b0: 55 push %ebp
10c0b1: 89 e5 mov %esp,%ebp
10c0b3: 57 push %edi
10c0b4: 56 push %esi
10c0b5: 53 push %ebx
10c0b6: 83 ec 1c sub $0x1c,%esp
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
10c0b9: 8b 1d 0c 52 12 00 mov 0x12520c,%ebx
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
10c0bf: 8b 3d 08 52 12 00 mov 0x125208,%edi
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
10c0c5: 85 db test %ebx,%ebx
10c0c7: 74 46 je 10c10f <_RTEMS_tasks_Initialize_user_tasks_body+0x5f>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10c0c9: 85 ff test %edi,%edi
10c0cb: 74 42 je 10c10f <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN
10c0cd: 31 f6 xor %esi,%esi
10c0cf: 90 nop
return_value = rtems_task_create(
10c0d0: 83 ec 08 sub $0x8,%esp
10c0d3: 8d 45 e4 lea -0x1c(%ebp),%eax
10c0d6: 50 push %eax
10c0d7: ff 73 0c pushl 0xc(%ebx)
10c0da: ff 73 14 pushl 0x14(%ebx)
10c0dd: ff 73 04 pushl 0x4(%ebx)
10c0e0: ff 73 08 pushl 0x8(%ebx)
10c0e3: ff 33 pushl (%ebx)
10c0e5: e8 96 fd ff ff call 10be80 <rtems_task_create>
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
10c0ea: 83 c4 20 add $0x20,%esp
10c0ed: 85 c0 test %eax,%eax
10c0ef: 75 26 jne 10c117 <_RTEMS_tasks_Initialize_user_tasks_body+0x67>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
10c0f1: 51 push %ecx
10c0f2: ff 73 18 pushl 0x18(%ebx)
10c0f5: ff 73 10 pushl 0x10(%ebx)
10c0f8: ff 75 e4 pushl -0x1c(%ebp)
10c0fb: e8 24 00 00 00 call 10c124 <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
10c100: 83 c4 10 add $0x10,%esp
10c103: 85 c0 test %eax,%eax
10c105: 75 10 jne 10c117 <_RTEMS_tasks_Initialize_user_tasks_body+0x67>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10c107: 46 inc %esi
10c108: 83 c3 1c add $0x1c,%ebx
10c10b: 39 f7 cmp %esi,%edi
10c10d: 77 c1 ja 10c0d0 <_RTEMS_tasks_Initialize_user_tasks_body+0x20><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
10c10f: 8d 65 f4 lea -0xc(%ebp),%esp
10c112: 5b pop %ebx
10c113: 5e pop %esi
10c114: 5f pop %edi
10c115: c9 leave
10c116: c3 ret
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
10c117: 52 push %edx
10c118: 50 push %eax
10c119: 6a 01 push $0x1
10c11b: 6a 01 push $0x1
10c11d: e8 8e 0d 00 00 call 10ceb0 <_Internal_error_Occurred>
00111d40 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
111d40: 55 push %ebp
111d41: 89 e5 mov %esp,%ebp
111d43: 57 push %edi
111d44: 56 push %esi
111d45: 53 push %ebx
111d46: 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 ];
111d49: 8b 45 08 mov 0x8(%ebp),%eax
111d4c: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx
if ( !api )
111d52: 85 db test %ebx,%ebx
111d54: 74 45 je 111d9b <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
111d56: 9c pushf
111d57: fa cli
111d58: 58 pop %eax
signal_set = asr->signals_posted;
111d59: 8b 73 14 mov 0x14(%ebx),%esi
asr->signals_posted = 0;
111d5c: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
_ISR_Enable( level );
111d63: 50 push %eax
111d64: 9d popf
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
111d65: 85 f6 test %esi,%esi
111d67: 74 32 je 111d9b <_RTEMS_tasks_Post_switch_extension+0x5b>
return;
asr->nest_level += 1;
111d69: ff 43 1c incl 0x1c(%ebx)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
111d6c: 50 push %eax
111d6d: 8d 7d e4 lea -0x1c(%ebp),%edi
111d70: 57 push %edi
111d71: 68 ff ff 00 00 push $0xffff
111d76: ff 73 10 pushl 0x10(%ebx)
111d79: e8 42 2e 00 00 call 114bc0 <rtems_task_mode>
(*asr->handler)( signal_set );
111d7e: 89 34 24 mov %esi,(%esp)
111d81: ff 53 0c call *0xc(%ebx)
asr->nest_level -= 1;
111d84: ff 4b 1c decl 0x1c(%ebx)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
111d87: 83 c4 0c add $0xc,%esp
111d8a: 57 push %edi
111d8b: 68 ff ff 00 00 push $0xffff
111d90: ff 75 e4 pushl -0x1c(%ebp)
111d93: e8 28 2e 00 00 call 114bc0 <rtems_task_mode>
111d98: 83 c4 10 add $0x10,%esp
}
111d9b: 8d 65 f4 lea -0xc(%ebp),%esp
111d9e: 5b pop %ebx
111d9f: 5e pop %esi
111da0: 5f pop %edi
111da1: c9 leave
111da2: c3 ret
00111c9c <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
111c9c: 55 push %ebp
111c9d: 89 e5 mov %esp,%ebp
/*
* Per Task Variables
*/
tvp = executing->task_variables;
111c9f: 8b 45 08 mov 0x8(%ebp),%eax
111ca2: 8b 80 04 01 00 00 mov 0x104(%eax),%eax
while (tvp) {
111ca8: 85 c0 test %eax,%eax
111caa: 74 13 je 111cbf <_RTEMS_tasks_Switch_extension+0x23>
tvp->tval = *tvp->ptr;
111cac: 8b 50 04 mov 0x4(%eax),%edx
111caf: 8b 0a mov (%edx),%ecx
111cb1: 89 48 0c mov %ecx,0xc(%eax)
*tvp->ptr = tvp->gval;
111cb4: 8b 48 08 mov 0x8(%eax),%ecx
111cb7: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
111cb9: 8b 00 mov (%eax),%eax
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
111cbb: 85 c0 test %eax,%eax
111cbd: 75 ed jne 111cac <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
111cbf: 8b 45 0c mov 0xc(%ebp),%eax
111cc2: 8b 80 04 01 00 00 mov 0x104(%eax),%eax
while (tvp) {
111cc8: 85 c0 test %eax,%eax
111cca: 74 13 je 111cdf <_RTEMS_tasks_Switch_extension+0x43>
tvp->gval = *tvp->ptr;
111ccc: 8b 50 04 mov 0x4(%eax),%edx
111ccf: 8b 0a mov (%edx),%ecx
111cd1: 89 48 08 mov %ecx,0x8(%eax)
*tvp->ptr = tvp->tval;
111cd4: 8b 48 0c mov 0xc(%eax),%ecx
111cd7: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
111cd9: 8b 00 mov (%eax),%eax
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
111cdb: 85 c0 test %eax,%eax
111cdd: 75 ed jne 111ccc <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
111cdf: c9 leave
111ce0: c3 ret
00144b2c <_Rate_monotonic_Initiate_statistics>:
}
void _Rate_monotonic_Initiate_statistics(
Rate_monotonic_Control *the_period
)
{
144b2c: 55 push %ebp
144b2d: 89 e5 mov %esp,%ebp
144b2f: 57 push %edi
144b30: 56 push %esi
144b31: 53 push %ebx
144b32: 83 ec 28 sub $0x28,%esp
144b35: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *owning_thread = the_period->owner;
144b38: 8b 73 40 mov 0x40(%ebx),%esi
* If using nanosecond statistics, we need to obtain the uptime.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
_TOD_Get_uptime( &uptime );
144b3b: 8d 7d e0 lea -0x20(%ebp),%edi
144b3e: 57 push %edi
144b3f: e8 ac ce fe ff call 1319f0 <_TOD_Get_uptime>
/*
* Set the starting point and the CPU time used for the statistics.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
the_period->time_period_initiated = uptime;
144b44: 8b 45 e0 mov -0x20(%ebp),%eax
144b47: 8b 55 e4 mov -0x1c(%ebp),%edx
144b4a: 89 43 4c mov %eax,0x4c(%ebx)
144b4d: 89 53 50 mov %edx,0x50(%ebx)
#else
the_period->time_period_initiated = _Watchdog_Ticks_since_boot;
#endif
the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used;
144b50: 8b 86 84 00 00 00 mov 0x84(%esi),%eax
144b56: 8b 96 88 00 00 00 mov 0x88(%esi),%edx
144b5c: 89 43 44 mov %eax,0x44(%ebx)
144b5f: 89 53 48 mov %edx,0x48(%ebx)
* routine is invoked from rtems_rate_monotonic_period, the owner will
* be the executing thread. When this routine is invoked from
* _Rate_monotonic_Timeout, it will not.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
144b62: 83 c4 10 add $0x10,%esp
144b65: 3b 35 18 50 17 00 cmp 0x175018,%esi
144b6b: 74 0b je 144b78 <_Rate_monotonic_Initiate_statistics+0x4c>
);
_Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran );
}
#endif
}
144b6d: 8d 65 f4 lea -0xc(%ebp),%esp
144b70: 5b pop %ebx
144b71: 5e pop %esi
144b72: 5f pop %edi
144b73: c9 leave
144b74: c3 ret
144b75: 8d 76 00 lea 0x0(%esi),%esi
/*
* Adjust the CPU time used to account for the time since last
* context switch.
*/
_Timespec_Subtract(
144b78: 51 push %ecx
144b79: 8d 75 d8 lea -0x28(%ebp),%esi
144b7c: 56 push %esi
144b7d: 57 push %edi
144b7e: 68 20 50 17 00 push $0x175020
144b83: e8 c8 16 fd ff call 116250 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &ran
);
_Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran );
144b88: 58 pop %eax
144b89: 5a pop %edx
144b8a: 56 push %esi
144b8b: 83 c3 44 add $0x44,%ebx
144b8e: 53 push %ebx
144b8f: e8 80 16 fd ff call 116214 <_Timespec_Add_to>
144b94: 83 c4 10 add $0x10,%esp
}
#endif
}
144b97: 8d 65 f4 lea -0xc(%ebp),%esp
144b9a: 5b pop %ebx
144b9b: 5e pop %esi
144b9c: 5f pop %edi
144b9d: c9 leave
144b9e: c3 ret
00100240 <_Rate_monotonic_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/ratemon.h>
void _Rate_monotonic_Manager_initialization(void)
{
100240: 55 push %ebp
100241: 89 e5 mov %esp,%ebp
}
100243: c9 leave
100244: c3 ret
00144ed8 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
144ed8: 55 push %ebp
144ed9: 89 e5 mov %esp,%ebp
144edb: 83 ec 2c sub $0x2c,%esp
144ede: 8d 45 f4 lea -0xc(%ebp),%eax
144ee1: 50 push %eax
144ee2: ff 75 08 pushl 0x8(%ebp)
144ee5: 68 60 5b 17 00 push $0x175b60
144eea: e8 6d fd fc ff call 114c5c <_Objects_Get>
/*
* 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 ) {
144eef: 83 c4 10 add $0x10,%esp
144ef2: 8b 55 f4 mov -0xc(%ebp),%edx
144ef5: 85 d2 test %edx,%edx
144ef7: 75 29 jne 144f22 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
144ef9: 8b 50 40 mov 0x40(%eax),%edx
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
144efc: f6 42 11 40 testb $0x40,0x11(%edx)
144f00: 74 08 je 144f0a <_Rate_monotonic_Timeout+0x32>
the_thread->Wait.id == the_period->Object.id ) {
144f02: 8b 4a 20 mov 0x20(%edx),%ecx
144f05: 3b 48 08 cmp 0x8(%eax),%ecx
144f08: 74 4e je 144f58 <_Rate_monotonic_Timeout+0x80>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
144f0a: 83 78 38 01 cmpl $0x1,0x38(%eax)
144f0e: 74 14 je 144f24 <_Rate_monotonic_Timeout+0x4c>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
144f10: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
144f17: a1 58 4f 17 00 mov 0x174f58,%eax
144f1c: 48 dec %eax
144f1d: a3 58 4f 17 00 mov %eax,0x174f58
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
144f22: c9 leave
144f23: c3 ret
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
144f24: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax)
_Rate_monotonic_Initiate_statistics( the_period );
144f2b: 83 ec 0c sub $0xc,%esp
144f2e: 50 push %eax
144f2f: 89 45 e4 mov %eax,-0x1c(%ebp)
144f32: e8 f5 fb ff ff call 144b2c <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
144f37: 8b 45 e4 mov -0x1c(%ebp),%eax
144f3a: 8b 50 3c mov 0x3c(%eax),%edx
144f3d: 89 50 1c mov %edx,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
144f40: 5a pop %edx
144f41: 59 pop %ecx
144f42: 83 c0 10 add $0x10,%eax
144f45: 50 push %eax
144f46: 68 38 50 17 00 push $0x175038
144f4b: e8 d0 15 fd ff call 116520 <_Watchdog_Insert>
144f50: 83 c4 10 add $0x10,%esp
144f53: eb c2 jmp 144f17 <_Rate_monotonic_Timeout+0x3f>
144f55: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
144f58: 83 ec 08 sub $0x8,%esp
144f5b: 68 f8 ff 03 10 push $0x1003fff8
144f60: 52 push %edx
144f61: 89 45 e4 mov %eax,-0x1c(%ebp)
144f64: e8 6f 02 fd ff call 1151d8 <_Thread_Clear_state>
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
144f69: 8b 45 e4 mov -0x1c(%ebp),%eax
144f6c: 89 04 24 mov %eax,(%esp)
144f6f: eb c1 jmp 144f32 <_Rate_monotonic_Timeout+0x5a>
00144c38 <_Rate_monotonic_Update_statistics>:
}
void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
144c38: 55 push %ebp
144c39: 89 e5 mov %esp,%ebp
144c3b: 57 push %edi
144c3c: 56 push %esi
144c3d: 53 push %ebx
144c3e: 83 ec 1c sub $0x1c,%esp
144c41: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
144c44: ff 43 54 incl 0x54(%ebx)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
144c47: 83 7b 38 04 cmpl $0x4,0x38(%ebx)
144c4b: 0f 84 bf 00 00 00 je 144d10 <_Rate_monotonic_Update_statistics+0xd8>
/*
* Grab status for time statistics.
*/
valid_status =
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
144c51: 52 push %edx
144c52: 8d 7d e0 lea -0x20(%ebp),%edi
144c55: 57 push %edi
144c56: 8d 75 d8 lea -0x28(%ebp),%esi
144c59: 56 push %esi
144c5a: 53 push %ebx
144c5b: e8 40 ff ff ff call 144ba0 <_Rate_monotonic_Get_status>
if (!valid_status)
144c60: 83 c4 10 add $0x10,%esp
144c63: 84 c0 test %al,%al
144c65: 75 09 jne 144c70 <_Rate_monotonic_Update_statistics+0x38>
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
144c67: 8d 65 f4 lea -0xc(%ebp),%esp
144c6a: 5b pop %ebx
144c6b: 5e pop %esi
144c6c: 5f pop %edi
144c6d: c9 leave
144c6e: c3 ret
144c6f: 90 nop
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
144c70: 83 ec 08 sub $0x8,%esp
144c73: 57 push %edi
144c74: 8d 43 6c lea 0x6c(%ebx),%eax
144c77: 50 push %eax
144c78: e8 97 15 fd ff call 116214 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
144c7d: 59 pop %ecx
144c7e: 58 pop %eax
144c7f: 8d 43 5c lea 0x5c(%ebx),%eax
144c82: 50 push %eax
144c83: 57 push %edi
144c84: e8 6b 06 00 00 call 1452f4 <_Timespec_Less_than>
144c89: 83 c4 10 add $0x10,%esp
144c8c: 84 c0 test %al,%al
144c8e: 74 0c je 144c9c <_Rate_monotonic_Update_statistics+0x64>
stats->min_cpu_time = executed;
144c90: 8b 45 e0 mov -0x20(%ebp),%eax
144c93: 8b 55 e4 mov -0x1c(%ebp),%edx
144c96: 89 43 5c mov %eax,0x5c(%ebx)
144c99: 89 53 60 mov %edx,0x60(%ebx)
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
144c9c: 83 ec 08 sub $0x8,%esp
144c9f: 8d 43 64 lea 0x64(%ebx),%eax
144ca2: 50 push %eax
144ca3: 57 push %edi
144ca4: e8 27 06 00 00 call 1452d0 <_Timespec_Greater_than>
144ca9: 83 c4 10 add $0x10,%esp
144cac: 84 c0 test %al,%al
144cae: 74 0c je 144cbc <_Rate_monotonic_Update_statistics+0x84>
stats->max_cpu_time = executed;
144cb0: 8b 45 e0 mov -0x20(%ebp),%eax
144cb3: 8b 55 e4 mov -0x1c(%ebp),%edx
144cb6: 89 43 64 mov %eax,0x64(%ebx)
144cb9: 89 53 68 mov %edx,0x68(%ebx)
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
144cbc: 83 ec 08 sub $0x8,%esp
144cbf: 56 push %esi
144cc0: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
144cc6: 50 push %eax
144cc7: e8 48 15 fd ff call 116214 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
144ccc: 58 pop %eax
144ccd: 5a pop %edx
144cce: 8d 43 74 lea 0x74(%ebx),%eax
144cd1: 50 push %eax
144cd2: 56 push %esi
144cd3: e8 1c 06 00 00 call 1452f4 <_Timespec_Less_than>
144cd8: 83 c4 10 add $0x10,%esp
144cdb: 84 c0 test %al,%al
144cdd: 75 39 jne 144d18 <_Rate_monotonic_Update_statistics+0xe0>
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
144cdf: 83 ec 08 sub $0x8,%esp
144ce2: 8d 43 7c lea 0x7c(%ebx),%eax
144ce5: 50 push %eax
144ce6: 56 push %esi
144ce7: e8 e4 05 00 00 call 1452d0 <_Timespec_Greater_than>
144cec: 83 c4 10 add $0x10,%esp
144cef: 84 c0 test %al,%al
144cf1: 0f 84 70 ff ff ff je 144c67 <_Rate_monotonic_Update_statistics+0x2f>
stats->max_wall_time = since_last_period;
144cf7: 8b 45 d8 mov -0x28(%ebp),%eax
144cfa: 8b 55 dc mov -0x24(%ebp),%edx
144cfd: 89 43 7c mov %eax,0x7c(%ebx)
144d00: 89 93 80 00 00 00 mov %edx,0x80(%ebx)
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
144d06: 8d 65 f4 lea -0xc(%ebp),%esp
144d09: 5b pop %ebx
144d0a: 5e pop %esi
144d0b: 5f pop %edi
144d0c: c9 leave
144d0d: c3 ret
144d0e: 66 90 xchg %ax,%ax
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
144d10: ff 43 58 incl 0x58(%ebx)
144d13: e9 39 ff ff ff jmp 144c51 <_Rate_monotonic_Update_statistics+0x19>
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
stats->min_wall_time = since_last_period;
144d18: 8b 45 d8 mov -0x28(%ebp),%eax
144d1b: 8b 55 dc mov -0x24(%ebp),%edx
144d1e: 89 43 74 mov %eax,0x74(%ebx)
144d21: 89 53 78 mov %edx,0x78(%ebx)
144d24: eb b9 jmp 144cdf <_Rate_monotonic_Update_statistics+0xa7>
00100228 <_Region_Manager_initialization>:
#include <rtems/score/states.h>
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Region_Manager_initialization(void)
{
100228: 55 push %ebp
100229: 89 e5 mov %esp,%ebp
}
10022b: c9 leave
10022c: c3 ret
0010e09c <_TOD_Set>:
*/
void _TOD_Set(
const struct timespec *time
)
{
10e09c: 55 push %ebp
10e09d: 89 e5 mov %esp,%ebp
10e09f: 53 push %ebx
10e0a0: 83 ec 04 sub $0x4,%esp
10e0a3: 8b 5d 08 mov 0x8(%ebp),%ebx
10e0a6: a1 78 ce 12 00 mov 0x12ce78,%eax
10e0ab: 40 inc %eax
10e0ac: a3 78 ce 12 00 mov %eax,0x12ce78
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
10e0b1: a1 0c cf 12 00 mov 0x12cf0c,%eax
if ( time->tv_sec < seconds )
10e0b6: 8b 13 mov (%ebx),%edx
10e0b8: 39 d0 cmp %edx,%eax
10e0ba: 7f 34 jg 10e0f0 <_TOD_Set+0x54>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
10e0bc: 51 push %ecx
10e0bd: 29 c2 sub %eax,%edx
10e0bf: 52 push %edx
10e0c0: 6a 00 push $0x0
10e0c2: 68 4c cf 12 00 push $0x12cf4c
10e0c7: e8 0c 25 00 00 call 1105d8 <_Watchdog_Adjust>
10e0cc: 83 c4 10 add $0x10,%esp
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
10e0cf: 8b 03 mov (%ebx),%eax
10e0d1: a3 0c cf 12 00 mov %eax,0x12cf0c
10e0d6: 8b 43 04 mov 0x4(%ebx),%eax
10e0d9: a3 10 cf 12 00 mov %eax,0x12cf10
_TOD_Is_set = true;
10e0de: c6 05 8c ce 12 00 01 movb $0x1,0x12ce8c
_TOD_Activate();
_Thread_Enable_dispatch();
}
10e0e5: 8b 5d fc mov -0x4(%ebp),%ebx
10e0e8: c9 leave
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
10e0e9: e9 ca 12 00 00 jmp 10f3b8 <_Thread_Enable_dispatch>
10e0ee: 66 90 xchg %ax,%ax
10e0f0: 51 push %ecx
10e0f1: 29 d0 sub %edx,%eax
10e0f3: 50 push %eax
10e0f4: 6a 01 push $0x1
10e0f6: 68 4c cf 12 00 push $0x12cf4c
10e0fb: e8 d8 24 00 00 call 1105d8 <_Watchdog_Adjust>
10e100: 83 c4 10 add $0x10,%esp
10e103: eb ca jmp 10e0cf <_TOD_Set+0x33>
0010c804 <_TOD_To_seconds>:
*/
uint32_t _TOD_To_seconds(
const rtems_time_of_day *the_tod
)
{
10c804: 55 push %ebp
10c805: 89 e5 mov %esp,%ebp
10c807: 56 push %esi
10c808: 53 push %ebx
10c809: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t time;
uint32_t year_mod_4;
time = the_tod->day - 1;
10c80c: 8b 72 08 mov 0x8(%edx),%esi
10c80f: 4e dec %esi
year_mod_4 = the_tod->year & 3;
10c810: 8b 02 mov (%edx),%eax
if ( year_mod_4 == 0 )
10c812: 89 c3 mov %eax,%ebx
10c814: 83 e3 03 and $0x3,%ebx
10c817: 74 67 je 10c880 <_TOD_To_seconds+0x7c>
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
else
time += _TOD_Days_to_date[ 0 ][ the_tod->month ];
10c819: 8b 4a 04 mov 0x4(%edx),%ecx
10c81c: 0f b7 8c 09 e0 55 12 movzwl 0x1255e0(%ecx,%ecx,1),%ecx
10c823: 00
10c824: 8d 34 31 lea (%ecx,%esi,1),%esi
time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) *
10c827: 0f b7 8c 1b 14 56 12 movzwl 0x125614(%ebx,%ebx,1),%ecx
10c82e: 00
10c82f: 2d c4 07 00 00 sub $0x7c4,%eax
10c834: c1 e8 02 shr $0x2,%eax
10c837: 8d 1c c0 lea (%eax,%eax,8),%ebx
10c83a: 8d 1c d8 lea (%eax,%ebx,8),%ebx
10c83d: 8d 1c 9b lea (%ebx,%ebx,4),%ebx
10c840: 8d 04 98 lea (%eax,%ebx,4),%eax
10c843: 01 c1 add %eax,%ecx
( (TOD_DAYS_PER_YEAR * 4) + 1);
time += _TOD_Days_since_last_leap_year[ year_mod_4 ];
10c845: 01 f1 add %esi,%ecx
time *= TOD_SECONDS_PER_DAY;
10c847: 8d 04 89 lea (%ecx,%ecx,4),%eax
10c84a: 8d 04 81 lea (%ecx,%eax,4),%eax
10c84d: 8d 04 c1 lea (%ecx,%eax,8),%eax
10c850: c1 e0 02 shl $0x2,%eax
10c853: 29 c8 sub %ecx,%eax
10c855: c1 e0 07 shl $0x7,%eax
time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute)
10c858: 8b 5a 14 mov 0x14(%edx),%ebx
* TOD_SECONDS_PER_MINUTE;
time += the_tod->second;
10c85b: 8b 4a 0c mov 0xc(%edx),%ecx
10c85e: 8d 0c 49 lea (%ecx,%ecx,2),%ecx
10c861: 8d 0c 89 lea (%ecx,%ecx,4),%ecx
10c864: c1 e1 02 shl $0x2,%ecx
10c867: 03 4a 10 add 0x10(%edx),%ecx
10c86a: 8d 14 49 lea (%ecx,%ecx,2),%edx
10c86d: 8d 14 92 lea (%edx,%edx,4),%edx
10c870: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx
10c877: 8d 04 02 lea (%edx,%eax,1),%eax
time += TOD_SECONDS_1970_THROUGH_1988;
return( time );
}
10c87a: 5b pop %ebx
10c87b: 5e pop %esi
10c87c: c9 leave
10c87d: c3 ret
10c87e: 66 90 xchg %ax,%ax
time = the_tod->day - 1;
year_mod_4 = the_tod->year & 3;
if ( year_mod_4 == 0 )
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
10c880: 8b 4a 04 mov 0x4(%edx),%ecx
10c883: 0f b7 8c 09 fa 55 12 movzwl 0x1255fa(%ecx,%ecx,1),%ecx
10c88a: 00
10c88b: 8d 34 31 lea (%ecx,%esi,1),%esi
10c88e: eb 97 jmp 10c827 <_TOD_To_seconds+0x23>
0010c890 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10c890: 55 push %ebp
10c891: 89 e5 mov %esp,%ebp
10c893: 53 push %ebx
10c894: 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();
10c897: 8b 1d 4c 88 12 00 mov 0x12884c,%ebx
if ((!the_tod) ||
10c89d: 85 c9 test %ecx,%ecx
10c89f: 74 53 je 10c8f4 <_TOD_Validate+0x64> <== NEVER TAKEN
10c8a1: b8 40 42 0f 00 mov $0xf4240,%eax
10c8a6: 31 d2 xor %edx,%edx
10c8a8: f7 f3 div %ebx
(the_tod->ticks >= ticks_per_second) ||
10c8aa: 3b 41 18 cmp 0x18(%ecx),%eax
10c8ad: 76 45 jbe 10c8f4 <_TOD_Validate+0x64>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10c8af: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10c8b3: 77 3f ja 10c8f4 <_TOD_Validate+0x64>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10c8b5: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10c8b9: 77 39 ja 10c8f4 <_TOD_Validate+0x64>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
10c8bb: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10c8bf: 77 33 ja 10c8f4 <_TOD_Validate+0x64>
(the_tod->month == 0) ||
10c8c1: 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) ||
10c8c4: 85 c0 test %eax,%eax
10c8c6: 74 2c je 10c8f4 <_TOD_Validate+0x64> <== NEVER TAKEN
10c8c8: 83 f8 0c cmp $0xc,%eax
10c8cb: 77 27 ja 10c8f4 <_TOD_Validate+0x64>
(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) ||
10c8cd: 8b 11 mov (%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) ||
10c8cf: 81 fa c3 07 00 00 cmp $0x7c3,%edx
10c8d5: 76 1d jbe 10c8f4 <_TOD_Validate+0x64>
(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) )
10c8d7: 8b 49 08 mov 0x8(%ecx),%ecx
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) ||
10c8da: 85 c9 test %ecx,%ecx
10c8dc: 74 16 je 10c8f4 <_TOD_Validate+0x64> <== 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 )
10c8de: 83 e2 03 and $0x3,%edx
10c8e1: 75 16 jne 10c8f9 <_TOD_Validate+0x69>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10c8e3: 8b 04 85 54 56 12 00 mov 0x125654(,%eax,4),%eax
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
10c8ea: 39 c8 cmp %ecx,%eax
10c8ec: 0f 93 c0 setae %al
10c8ef: eb 05 jmp 10c8f6 <_TOD_Validate+0x66>
10c8f1: 8d 76 00 lea 0x0(%esi),%esi
10c8f4: 31 c0 xor %eax,%eax
if ( the_tod->day > days_in_month )
return false;
return true;
}
10c8f6: 5b pop %ebx
10c8f7: c9 leave
10c8f8: c3 ret
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10c8f9: 8b 04 85 20 56 12 00 mov 0x125620(,%eax,4),%eax
10c900: eb e8 jmp 10c8ea <_TOD_Validate+0x5a>
0010d784 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10d784: 55 push %ebp
10d785: 89 e5 mov %esp,%ebp
10d787: 57 push %edi
10d788: 56 push %esi
10d789: 53 push %ebx
10d78a: 83 ec 28 sub $0x28,%esp
10d78d: 8b 5d 08 mov 0x8(%ebp),%ebx
10d790: 8b 75 0c mov 0xc(%ebp),%esi
10d793: 8a 45 10 mov 0x10(%ebp),%al
10d796: 88 45 e7 mov %al,-0x19(%ebp)
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
10d799: 8b 7b 10 mov 0x10(%ebx),%edi
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
10d79c: 53 push %ebx
10d79d: e8 92 0e 00 00 call 10e634 <_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 )
10d7a2: 83 c4 10 add $0x10,%esp
10d7a5: 39 73 14 cmp %esi,0x14(%ebx)
10d7a8: 74 0d je 10d7b7 <_Thread_Change_priority+0x33>
_Thread_Set_priority( the_thread, new_priority );
10d7aa: 83 ec 08 sub $0x8,%esp
10d7ad: 56 push %esi
10d7ae: 53 push %ebx
10d7af: e8 38 0d 00 00 call 10e4ec <_Thread_Set_priority>
10d7b4: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10d7b7: 9c pushf
10d7b8: fa cli
10d7b9: 5a pop %edx
/*
* 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;
10d7ba: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10d7bd: 83 f8 04 cmp $0x4,%eax
10d7c0: 74 26 je 10d7e8 <_Thread_Change_priority+0x64>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10d7c2: 83 e7 04 and $0x4,%edi
10d7c5: 74 15 je 10d7dc <_Thread_Change_priority+0x58><== ALWAYS TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10d7c7: 52 push %edx
10d7c8: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10d7c9: a9 e0 be 03 00 test $0x3bee0,%eax
10d7ce: 0f 85 bc 00 00 00 jne 10d890 <_Thread_Change_priority+0x10c>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
10d7d4: 8d 65 f4 lea -0xc(%ebp),%esp
10d7d7: 5b pop %ebx
10d7d8: 5e pop %esi
10d7d9: 5f pop %edi
10d7da: c9 leave
10d7db: c3 ret
*/
state = the_thread->current_state;
if ( state != STATES_TRANSIENT ) {
/* 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 );
10d7dc: 89 c1 mov %eax,%ecx
10d7de: 83 e1 fb and $0xfffffffb,%ecx
10d7e1: 89 4b 10 mov %ecx,0x10(%ebx)
10d7e4: eb e1 jmp 10d7c7 <_Thread_Change_priority+0x43>
10d7e6: 66 90 xchg %ax,%ax
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10d7e8: 83 e7 04 and $0x4,%edi
10d7eb: 75 45 jne 10d832 <_Thread_Change_priority+0xae><== 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 );
10d7ed: 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;
10d7f4: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax
10d7fa: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx
10d801: 66 09 08 or %cx,(%eax)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10d804: 66 a1 ac 94 12 00 mov 0x1294ac,%ax
10d80a: 0b 83 94 00 00 00 or 0x94(%ebx),%eax
10d810: 66 a3 ac 94 12 00 mov %ax,0x1294ac
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
10d816: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10d81a: 0f 84 88 00 00 00 je 10d8a8 <_Thread_Change_priority+0x124>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
10d820: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10d826: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10d829: 8b 08 mov (%eax),%ecx
after_node->next = the_node;
10d82b: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10d82d: 89 0b mov %ecx,(%ebx)
before_node->previous = the_node;
10d82f: 89 59 04 mov %ebx,0x4(%ecx)
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
10d832: 52 push %edx
10d833: 9d popf
10d834: 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 );
10d835: 66 8b 1d ac 94 12 00 mov 0x1294ac,%bx
10d83c: 31 c0 xor %eax,%eax
10d83e: 89 c1 mov %eax,%ecx
10d840: 66 0f bc cb bsf %bx,%cx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10d844: 0f b7 c9 movzwl %cx,%ecx
10d847: 66 8b 9c 09 40 95 12 mov 0x129540(%ecx,%ecx,1),%bx
10d84e: 00
10d84f: 66 0f bc c3 bsf %bx,%ax
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
10d853: c1 e1 04 shl $0x4,%ecx
10d856: 0f b7 c0 movzwl %ax,%eax
10d859: 8d 04 01 lea (%ecx,%eax,1),%eax
10d85c: 8d 0c 40 lea (%eax,%eax,2),%ecx
10d85f: a1 c0 93 12 00 mov 0x1293c0,%eax
10d864: 8b 04 88 mov (%eax,%ecx,4),%eax
10d867: a3 88 94 12 00 mov %eax,0x129488
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10d86c: 8b 0d b8 94 12 00 mov 0x1294b8,%ecx
* 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() &&
10d872: 39 c8 cmp %ecx,%eax
10d874: 74 0d je 10d883 <_Thread_Change_priority+0xff>
_Thread_Executing->is_preemptible )
10d876: 80 79 75 00 cmpb $0x0,0x75(%ecx)
10d87a: 74 07 je 10d883 <_Thread_Change_priority+0xff>
_Context_Switch_necessary = true;
10d87c: c6 05 c8 94 12 00 01 movb $0x1,0x1294c8
_ISR_Enable( level );
10d883: 52 push %edx
10d884: 9d popf
}
10d885: 8d 65 f4 lea -0xc(%ebp),%esp
10d888: 5b pop %ebx
10d889: 5e pop %esi
10d88a: 5f pop %edi
10d88b: c9 leave
10d88c: c3 ret
10d88d: 8d 76 00 lea 0x0(%esi),%esi
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10d890: 89 5d 0c mov %ebx,0xc(%ebp)
10d893: 8b 43 44 mov 0x44(%ebx),%eax
10d896: 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 );
}
10d899: 8d 65 f4 lea -0xc(%ebp),%esp
10d89c: 5b pop %ebx
10d89d: 5e pop %esi
10d89e: 5f pop %edi
10d89f: 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 );
10d8a0: e9 af 0b 00 00 jmp 10e454 <_Thread_queue_Requeue>
10d8a5: 8d 76 00 lea 0x0(%esi),%esi
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
10d8a8: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
10d8ae: 8d 48 04 lea 0x4(%eax),%ecx
10d8b1: 89 0b mov %ecx,(%ebx)
old_last_node = the_chain->last;
10d8b3: 8b 48 08 mov 0x8(%eax),%ecx
the_chain->last = the_node;
10d8b6: 89 58 08 mov %ebx,0x8(%eax)
old_last_node->next = the_node;
10d8b9: 89 19 mov %ebx,(%ecx)
the_node->previous = old_last_node;
10d8bb: 89 4b 04 mov %ecx,0x4(%ebx)
10d8be: e9 6f ff ff ff jmp 10d832 <_Thread_Change_priority+0xae>
0010d8c4 <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
10d8c4: 55 push %ebp
10d8c5: 89 e5 mov %esp,%ebp
10d8c7: 53 push %ebx
10d8c8: 8b 45 08 mov 0x8(%ebp),%eax
10d8cb: 8b 55 0c mov 0xc(%ebp),%edx
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10d8ce: 9c pushf
10d8cf: fa cli
10d8d0: 5b pop %ebx
current_state = the_thread->current_state;
10d8d1: 8b 48 10 mov 0x10(%eax),%ecx
if ( current_state & state ) {
10d8d4: 85 ca test %ecx,%edx
10d8d6: 74 70 je 10d948 <_Thread_Clear_state+0x84>
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10d8d8: f7 d2 not %edx
10d8da: 21 ca and %ecx,%edx
current_state =
10d8dc: 89 50 10 mov %edx,0x10(%eax)
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
10d8df: 85 d2 test %edx,%edx
10d8e1: 75 65 jne 10d948 <_Thread_Clear_state+0x84>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10d8e3: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
10d8e9: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx
10d8f0: 66 09 0a or %cx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10d8f3: 66 8b 15 ac 94 12 00 mov 0x1294ac,%dx
10d8fa: 0b 90 94 00 00 00 or 0x94(%eax),%edx
10d900: 66 89 15 ac 94 12 00 mov %dx,0x1294ac
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
10d907: 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);
10d90d: 8d 4a 04 lea 0x4(%edx),%ecx
10d910: 89 08 mov %ecx,(%eax)
old_last_node = the_chain->last;
10d912: 8b 4a 08 mov 0x8(%edx),%ecx
the_chain->last = the_node;
10d915: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10d918: 89 01 mov %eax,(%ecx)
the_node->previous = old_last_node;
10d91a: 89 48 04 mov %ecx,0x4(%eax)
_ISR_Flash( level );
10d91d: 53 push %ebx
10d91e: 9d popf
10d91f: 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 ) {
10d920: 8b 50 14 mov 0x14(%eax),%edx
10d923: 8b 0d 88 94 12 00 mov 0x129488,%ecx
10d929: 3b 51 14 cmp 0x14(%ecx),%edx
10d92c: 73 1a jae 10d948 <_Thread_Clear_state+0x84>
_Thread_Heir = the_thread;
10d92e: a3 88 94 12 00 mov %eax,0x129488
if ( _Thread_Executing->is_preemptible ||
10d933: a1 b8 94 12 00 mov 0x1294b8,%eax
10d938: 80 78 75 00 cmpb $0x0,0x75(%eax)
10d93c: 74 12 je 10d950 <_Thread_Clear_state+0x8c>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
10d93e: c6 05 c8 94 12 00 01 movb $0x1,0x1294c8
10d945: 8d 76 00 lea 0x0(%esi),%esi
}
}
}
_ISR_Enable( level );
10d948: 53 push %ebx
10d949: 9d popf
}
10d94a: 5b pop %ebx
10d94b: c9 leave
10d94c: c3 ret
10d94d: 8d 76 00 lea 0x0(%esi),%esi
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
10d950: 85 d2 test %edx,%edx
10d952: 74 ea je 10d93e <_Thread_Clear_state+0x7a><== NEVER TAKEN
10d954: eb f2 jmp 10d948 <_Thread_Clear_state+0x84>
0010d958 <_Thread_Close>:
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
10d958: 55 push %ebp
10d959: 89 e5 mov %esp,%ebp
10d95b: 56 push %esi
10d95c: 53 push %ebx
10d95d: 8b 75 08 mov 0x8(%ebp),%esi
10d960: 8b 5d 0c mov 0xc(%ebp),%ebx
10d963: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10d967: 8b 46 1c mov 0x1c(%esi),%eax
10d96a: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10d971: a1 f8 93 12 00 mov 0x1293f8,%eax
10d976: 48 dec %eax
10d977: a3 f8 93 12 00 mov %eax,0x1293f8
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
10d97c: 83 ec 0c sub $0xc,%esp
10d97f: 53 push %ebx
10d980: e8 9b 11 00 00 call 10eb20 <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10d985: a1 f8 93 12 00 mov 0x1293f8,%eax
10d98a: 40 inc %eax
10d98b: a3 f8 93 12 00 mov %eax,0x1293f8
/*
* Now we are in a dispatching critical section again and we
* can take the thread OUT of the published set. It is invalid
* to use this thread's Id OR name after this call.
*/
_Objects_Close( information, &the_thread->Object );
10d990: 59 pop %ecx
10d991: 58 pop %eax
10d992: 53 push %ebx
10d993: 56 push %esi
10d994: e8 2b f6 ff ff call 10cfc4 <_Objects_Close>
/*
* By setting the dormant state, the thread will not be considered
* for scheduling when we remove any blocking states.
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
10d999: 58 pop %eax
10d99a: 5a pop %edx
10d99b: 6a 01 push $0x1
10d99d: 53 push %ebx
10d99e: e8 b5 0b 00 00 call 10e558 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
10d9a3: 89 1c 24 mov %ebx,(%esp)
10d9a6: e8 01 0a 00 00 call 10e3ac <_Thread_queue_Extract_with_proxy>
10d9ab: 83 c4 10 add $0x10,%esp
10d9ae: 84 c0 test %al,%al
10d9b0: 75 06 jne 10d9b8 <_Thread_Close+0x60>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
10d9b2: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10d9b6: 74 68 je 10da20 <_Thread_Close+0xc8>
/*
* The thread might have been FP. So deal with that.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
10d9b8: 3b 1d 80 94 12 00 cmp 0x129480,%ebx
10d9be: 74 74 je 10da34 <_Thread_Close+0xdc>
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
10d9c0: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx)
10d9c7: 00 00 00
if ( the_thread->Start.fp_context )
10d9ca: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10d9d0: 85 c0 test %eax,%eax
10d9d2: 74 0c je 10d9e0 <_Thread_Close+0x88>
(void) _Workspace_Free( the_thread->Start.fp_context );
10d9d4: 83 ec 0c sub $0xc,%esp
10d9d7: 50 push %eax
10d9d8: e8 4b 14 00 00 call 10ee28 <_Workspace_Free>
10d9dd: 83 c4 10 add $0x10,%esp
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
10d9e0: 83 ec 0c sub $0xc,%esp
10d9e3: 53 push %ebx
10d9e4: e8 23 0d 00 00 call 10e70c <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
10d9e9: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx)
10d9f0: 00 00 00
if ( the_thread->extensions )
10d9f3: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax
10d9f9: 83 c4 10 add $0x10,%esp
10d9fc: 85 c0 test %eax,%eax
10d9fe: 74 0c je 10da0c <_Thread_Close+0xb4>
(void) _Workspace_Free( the_thread->extensions );
10da00: 83 ec 0c sub $0xc,%esp
10da03: 50 push %eax
10da04: e8 1f 14 00 00 call 10ee28 <_Workspace_Free>
10da09: 83 c4 10 add $0x10,%esp
the_thread->extensions = NULL;
10da0c: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx)
10da13: 00 00 00
}
10da16: 8d 65 f8 lea -0x8(%ebp),%esp
10da19: 5b pop %ebx
10da1a: 5e pop %esi
10da1b: c9 leave
10da1c: c3 ret
10da1d: 8d 76 00 lea 0x0(%esi),%esi
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
10da20: 83 ec 0c sub $0xc,%esp
10da23: 8d 43 48 lea 0x48(%ebx),%eax
10da26: 50 push %eax
10da27: e8 dc 12 00 00 call 10ed08 <_Watchdog_Remove>
10da2c: 83 c4 10 add $0x10,%esp
10da2f: eb 87 jmp 10d9b8 <_Thread_Close+0x60>
10da31: 8d 76 00 lea 0x0(%esi),%esi
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
{
_Thread_Allocated_fp = NULL;
10da34: c7 05 80 94 12 00 00 movl $0x0,0x129480
10da3b: 00 00 00
10da3e: eb 80 jmp 10d9c0 <_Thread_Close+0x68>
0010dad4 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10dad4: 55 push %ebp
10dad5: 89 e5 mov %esp,%ebp
10dad7: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10dada: 8d 45 f4 lea -0xc(%ebp),%eax
10dadd: 50 push %eax
10dade: ff 75 08 pushl 0x8(%ebp)
10dae1: e8 aa 01 00 00 call 10dc90 <_Thread_Get>
switch ( location ) {
10dae6: 83 c4 10 add $0x10,%esp
10dae9: 8b 55 f4 mov -0xc(%ebp),%edx
10daec: 85 d2 test %edx,%edx
10daee: 75 1c jne 10db0c <_Thread_Delay_ended+0x38><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10daf0: 83 ec 08 sub $0x8,%esp
10daf3: 68 18 00 00 10 push $0x10000018
10daf8: 50 push %eax
10daf9: e8 c6 fd ff ff call 10d8c4 <_Thread_Clear_state>
10dafe: a1 f8 93 12 00 mov 0x1293f8,%eax
10db03: 48 dec %eax
10db04: a3 f8 93 12 00 mov %eax,0x1293f8
10db09: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10db0c: c9 leave
10db0d: c3 ret
0010db10 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10db10: 55 push %ebp
10db11: 89 e5 mov %esp,%ebp
10db13: 57 push %edi
10db14: 56 push %esi
10db15: 53 push %ebx
10db16: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10db19: 8b 1d b8 94 12 00 mov 0x1294b8,%ebx
_ISR_Disable( level );
10db1f: 9c pushf
10db20: fa cli
10db21: 58 pop %eax
while ( _Context_Switch_necessary == true ) {
10db22: 8a 15 c8 94 12 00 mov 0x1294c8,%dl
10db28: 84 d2 test %dl,%dl
10db2a: 0f 84 10 01 00 00 je 10dc40 <_Thread_Dispatch+0x130>
10db30: 8d 7d d8 lea -0x28(%ebp),%edi
10db33: e9 d1 00 00 00 jmp 10dc09 <_Thread_Dispatch+0xf9>
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 )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
10db38: 50 push %eax
10db39: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10db3a: 83 ec 0c sub $0xc,%esp
10db3d: 8d 45 e0 lea -0x20(%ebp),%eax
10db40: 50 push %eax
10db41: e8 26 47 00 00 call 11226c <_TOD_Get_uptime>
_Timestamp_Subtract(
10db46: 83 c4 0c add $0xc,%esp
10db49: 57 push %edi
10db4a: 8d 45 e0 lea -0x20(%ebp),%eax
10db4d: 50 push %eax
10db4e: 68 c0 94 12 00 push $0x1294c0
10db53: e8 b8 0d 00 00 call 10e910 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
10db58: 5a pop %edx
10db59: 59 pop %ecx
10db5a: 57 push %edi
10db5b: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10db61: 50 push %eax
10db62: e8 6d 0d 00 00 call 10e8d4 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10db67: 8b 45 e0 mov -0x20(%ebp),%eax
10db6a: 8b 55 e4 mov -0x1c(%ebp),%edx
10db6d: a3 c0 94 12 00 mov %eax,0x1294c0
10db72: 89 15 c4 94 12 00 mov %edx,0x1294c4
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10db78: a1 84 94 12 00 mov 0x129484,%eax
10db7d: 83 c4 10 add $0x10,%esp
10db80: 85 c0 test %eax,%eax
10db82: 74 10 je 10db94 <_Thread_Dispatch+0x84> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10db84: 8b 10 mov (%eax),%edx
10db86: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx)
*_Thread_libc_reent = heir->libc_reent;
10db8c: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx
10db92: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10db94: 83 ec 08 sub $0x8,%esp
10db97: 56 push %esi
10db98: 53 push %ebx
10db99: e8 02 10 00 00 call 10eba0 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10db9e: 59 pop %ecx
10db9f: 58 pop %eax
10dba0: 81 c6 d4 00 00 00 add $0xd4,%esi
10dba6: 56 push %esi
10dba7: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax
10dbad: 50 push %eax
10dbae: e8 dd 12 00 00 call 10ee90 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10dbb3: 83 c4 10 add $0x10,%esp
10dbb6: 8b 93 ec 00 00 00 mov 0xec(%ebx),%edx
10dbbc: 85 d2 test %edx,%edx
10dbbe: 74 36 je 10dbf6 <_Thread_Dispatch+0xe6>
#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 );
10dbc0: a1 80 94 12 00 mov 0x129480,%eax
10dbc5: 39 c3 cmp %eax,%ebx
10dbc7: 74 2d je 10dbf6 <_Thread_Dispatch+0xe6>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10dbc9: 85 c0 test %eax,%eax
10dbcb: 74 11 je 10dbde <_Thread_Dispatch+0xce>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10dbcd: 83 ec 0c sub $0xc,%esp
10dbd0: 05 ec 00 00 00 add $0xec,%eax
10dbd5: 50 push %eax
10dbd6: e8 e9 12 00 00 call 10eec4 <_CPU_Context_save_fp>
10dbdb: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10dbde: 83 ec 0c sub $0xc,%esp
10dbe1: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax
10dbe7: 50 push %eax
10dbe8: e8 e1 12 00 00 call 10eece <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10dbed: 89 1d 80 94 12 00 mov %ebx,0x129480
10dbf3: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10dbf6: 8b 1d b8 94 12 00 mov 0x1294b8,%ebx
_ISR_Disable( level );
10dbfc: 9c pushf
10dbfd: fa cli
10dbfe: 58 pop %eax
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
10dbff: 8a 15 c8 94 12 00 mov 0x1294c8,%dl
10dc05: 84 d2 test %dl,%dl
10dc07: 74 37 je 10dc40 <_Thread_Dispatch+0x130>
heir = _Thread_Heir;
10dc09: 8b 35 88 94 12 00 mov 0x129488,%esi
_Thread_Dispatch_disable_level = 1;
10dc0f: c7 05 f8 93 12 00 01 movl $0x1,0x1293f8
10dc16: 00 00 00
_Context_Switch_necessary = false;
10dc19: c6 05 c8 94 12 00 00 movb $0x0,0x1294c8
_Thread_Executing = heir;
10dc20: 89 35 b8 94 12 00 mov %esi,0x1294b8
#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 )
10dc26: 83 7e 7c 01 cmpl $0x1,0x7c(%esi)
10dc2a: 0f 85 08 ff ff ff jne 10db38 <_Thread_Dispatch+0x28>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10dc30: 8b 15 c4 93 12 00 mov 0x1293c4,%edx
10dc36: 89 56 78 mov %edx,0x78(%esi)
10dc39: e9 fa fe ff ff jmp 10db38 <_Thread_Dispatch+0x28>
10dc3e: 66 90 xchg %ax,%ax
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
10dc40: c7 05 f8 93 12 00 00 movl $0x0,0x1293f8
10dc47: 00 00 00
_ISR_Enable( level );
10dc4a: 50 push %eax
10dc4b: 9d popf
if ( _Thread_Do_post_task_switch_extension ||
10dc4c: a1 9c 94 12 00 mov 0x12949c,%eax
10dc51: 85 c0 test %eax,%eax
10dc53: 75 06 jne 10dc5b <_Thread_Dispatch+0x14b>
executing->do_post_task_switch_extension ) {
10dc55: 80 7b 74 00 cmpb $0x0,0x74(%ebx)
10dc59: 74 09 je 10dc64 <_Thread_Dispatch+0x154>
executing->do_post_task_switch_extension = false;
10dc5b: c6 43 74 00 movb $0x0,0x74(%ebx)
_API_extensions_Run_postswitch();
10dc5f: e8 50 e8 ff ff call 10c4b4 <_API_extensions_Run_postswitch>
}
}
10dc64: 8d 65 f4 lea -0xc(%ebp),%esp
10dc67: 5b pop %ebx
10dc68: 5e pop %esi
10dc69: 5f pop %edi
10dc6a: c9 leave
10dc6b: c3 ret
00114e90 <_Thread_Evaluate_mode>:
*
* XXX
*/
bool _Thread_Evaluate_mode( void )
{
114e90: 55 push %ebp
114e91: 89 e5 mov %esp,%ebp
Thread_Control *executing;
executing = _Thread_Executing;
114e93: a1 b8 94 12 00 mov 0x1294b8,%eax
if ( !_States_Is_ready( executing->current_state ) ||
114e98: 8b 50 10 mov 0x10(%eax),%edx
114e9b: 85 d2 test %edx,%edx
114e9d: 75 0e jne 114ead <_Thread_Evaluate_mode+0x1d><== NEVER TAKEN
114e9f: 3b 05 88 94 12 00 cmp 0x129488,%eax
114ea5: 74 11 je 114eb8 <_Thread_Evaluate_mode+0x28>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
114ea7: 80 78 75 00 cmpb $0x0,0x75(%eax)
114eab: 74 0b je 114eb8 <_Thread_Evaluate_mode+0x28><== NEVER TAKEN
_Context_Switch_necessary = true;
114ead: c6 05 c8 94 12 00 01 movb $0x1,0x1294c8
114eb4: b0 01 mov $0x1,%al
return true;
}
return false;
}
114eb6: c9 leave
114eb7: c3 ret
executing = _Thread_Executing;
if ( !_States_Is_ready( executing->current_state ) ||
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = true;
return true;
114eb8: 31 c0 xor %eax,%eax
}
return false;
}
114eba: c9 leave
114ebb: c3 ret
0010dc90 <_Thread_Get>:
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
10dc90: 55 push %ebp
10dc91: 89 e5 mov %esp,%ebp
10dc93: 53 push %ebx
10dc94: 83 ec 04 sub $0x4,%esp
10dc97: 8b 45 08 mov 0x8(%ebp),%eax
10dc9a: 8b 4d 0c mov 0xc(%ebp),%ecx
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
10dc9d: 85 c0 test %eax,%eax
10dc9f: 74 4b je 10dcec <_Thread_Get+0x5c>
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
10dca1: 89 c2 mov %eax,%edx
10dca3: c1 ea 18 shr $0x18,%edx
10dca6: 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 )
10dca9: 8d 5a ff lea -0x1(%edx),%ebx
10dcac: 83 fb 03 cmp $0x3,%ebx
10dcaf: 77 2b ja 10dcdc <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
10dcb1: 89 c3 mov %eax,%ebx
10dcb3: c1 eb 1b shr $0x1b,%ebx
10dcb6: 4b dec %ebx
10dcb7: 75 23 jne 10dcdc <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
10dcb9: 8b 14 95 cc 93 12 00 mov 0x1293cc(,%edx,4),%edx
if ( !api_information ) {
10dcc0: 85 d2 test %edx,%edx
10dcc2: 74 18 je 10dcdc <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
information = api_information[ the_class ];
10dcc4: 8b 52 04 mov 0x4(%edx),%edx
if ( !information ) {
10dcc7: 85 d2 test %edx,%edx
10dcc9: 74 11 je 10dcdc <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
10dccb: 53 push %ebx
10dccc: 51 push %ecx
10dccd: 50 push %eax
10dcce: 52 push %edx
10dccf: e8 24 f7 ff ff call 10d3f8 <_Objects_Get>
10dcd4: 83 c4 10 add $0x10,%esp
done:
return tp;
}
10dcd7: 8b 5d fc mov -0x4(%ebp),%ebx
10dcda: c9 leave
10dcdb: c3 ret
goto done;
}
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
10dcdc: c7 01 01 00 00 00 movl $0x1,(%ecx)
10dce2: 31 c0 xor %eax,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10dce4: 8b 5d fc mov -0x4(%ebp),%ebx
10dce7: c9 leave
10dce8: c3 ret
10dce9: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10dcec: a1 f8 93 12 00 mov 0x1293f8,%eax
10dcf1: 40 inc %eax
10dcf2: a3 f8 93 12 00 mov %eax,0x1293f8
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
10dcf7: c7 01 00 00 00 00 movl $0x0,(%ecx)
tp = _Thread_Executing;
10dcfd: a1 b8 94 12 00 mov 0x1294b8,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10dd02: 8b 5d fc mov -0x4(%ebp),%ebx
10dd05: c9 leave
10dd06: c3 ret
00114ebc <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
114ebc: 55 push %ebp
114ebd: 89 e5 mov %esp,%ebp
114ebf: 53 push %ebx
114ec0: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
114ec3: 8b 1d b8 94 12 00 mov 0x1294b8,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
114ec9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
_ISR_Set_level(level);
114ecf: 85 c0 test %eax,%eax
114ed1: 74 79 je 114f4c <_Thread_Handler+0x90>
114ed3: fa cli
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
114ed4: a0 54 90 12 00 mov 0x129054,%al
114ed9: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = 1;
114edc: c6 05 54 90 12 00 01 movb $0x1,0x129054
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
114ee3: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax
114ee9: 85 c0 test %eax,%eax
114eeb: 74 24 je 114f11 <_Thread_Handler+0x55>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
114eed: a1 80 94 12 00 mov 0x129480,%eax
114ef2: 39 c3 cmp %eax,%ebx
114ef4: 74 1b je 114f11 <_Thread_Handler+0x55>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
114ef6: 85 c0 test %eax,%eax
114ef8: 74 11 je 114f0b <_Thread_Handler+0x4f>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
114efa: 83 ec 0c sub $0xc,%esp
114efd: 05 ec 00 00 00 add $0xec,%eax
114f02: 50 push %eax
114f03: e8 bc 9f ff ff call 10eec4 <_CPU_Context_save_fp>
114f08: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
114f0b: 89 1d 80 94 12 00 mov %ebx,0x129480
/*
* 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 );
114f11: 83 ec 0c sub $0xc,%esp
114f14: 53 push %ebx
114f15: e8 f6 9a ff ff call 10ea10 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
114f1a: e8 4d 8d ff ff call 10dc6c <_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) */ {
114f1f: 83 c4 10 add $0x10,%esp
114f22: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
114f26: 74 28 je 114f50 <_Thread_Handler+0x94>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
114f28: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
114f2e: 85 c0 test %eax,%eax
114f30: 74 2d je 114f5f <_Thread_Handler+0xa3>
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
114f32: 48 dec %eax
114f33: 74 43 je 114f78 <_Thread_Handler+0xbc> <== ALWAYS TAKEN
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
114f35: 83 ec 0c sub $0xc,%esp
114f38: 53 push %ebx
114f39: e8 0e 9b ff ff call 10ea4c <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
114f3e: 83 c4 0c add $0xc,%esp
114f41: 6a 06 push $0x6
114f43: 6a 01 push $0x1
114f45: 6a 00 push $0x0
114f47: e8 64 7f ff ff call 10ceb0 <_Internal_error_Occurred>
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
_ISR_Set_level(level);
114f4c: fb sti
114f4d: eb 85 jmp 114ed4 <_Thread_Handler+0x18>
114f4f: 90 nop
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
114f50: e8 1b c0 00 00 call 120f70 <__start_set_sysctl_set>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
114f55: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
114f5b: 85 c0 test %eax,%eax
114f5d: 75 d3 jne 114f32 <_Thread_Handler+0x76>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
114f5f: 83 ec 0c sub $0xc,%esp
114f62: ff b3 a8 00 00 00 pushl 0xa8(%ebx)
114f68: ff 93 9c 00 00 00 call *0x9c(%ebx)
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
114f6e: 89 43 28 mov %eax,0x28(%ebx)
114f71: 83 c4 10 add $0x10,%esp
114f74: eb bf jmp 114f35 <_Thread_Handler+0x79>
114f76: 66 90 xchg %ax,%ax
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
114f78: 83 ec 0c sub $0xc,%esp
114f7b: ff b3 a4 00 00 00 pushl 0xa4(%ebx)
114f81: 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 =
114f87: 89 43 28 mov %eax,0x28(%ebx)
114f8a: 83 c4 10 add $0x10,%esp
114f8d: eb a6 jmp 114f35 <_Thread_Handler+0x79>
0010dd08 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10dd08: 55 push %ebp
10dd09: 89 e5 mov %esp,%ebp
10dd0b: 57 push %edi
10dd0c: 56 push %esi
10dd0d: 53 push %ebx
10dd0e: 83 ec 1c sub $0x1c,%esp
10dd11: 8b 5d 0c mov 0xc(%ebp),%ebx
10dd14: 8b 4d 10 mov 0x10(%ebp),%ecx
10dd17: 8b 7d 14 mov 0x14(%ebp),%edi
10dd1a: 8b 75 1c mov 0x1c(%ebp),%esi
10dd1d: 8a 55 18 mov 0x18(%ebp),%dl
10dd20: 8a 45 20 mov 0x20(%ebp),%al
10dd23: 88 45 df mov %al,-0x21(%ebp)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
10dd26: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx)
10dd2d: 00 00 00
10dd30: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx)
10dd37: 00 00 00
10dd3a: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx)
10dd41: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10dd44: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx)
10dd4b: 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 ) {
10dd4e: 85 c9 test %ecx,%ecx
10dd50: 0f 84 13 02 00 00 je 10df69 <_Thread_Initialize+0x261>
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
10dd56: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx)
10dd5d: 89 f8 mov %edi,%eax
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10dd5f: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx)
the_stack->size = size;
10dd65: 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 ) {
10dd6b: 84 d2 test %dl,%dl
10dd6d: 0f 85 89 01 00 00 jne 10defc <_Thread_Initialize+0x1f4>
10dd73: 31 c0 xor %eax,%eax
10dd75: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10dd7c: 89 83 ec 00 00 00 mov %eax,0xec(%ebx)
the_thread->Start.fp_context = fp_area;
10dd82: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10dd88: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10dd8f: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10dd96: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10dd9d: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10dda4: a1 98 94 12 00 mov 0x129498,%eax
10dda9: 85 c0 test %eax,%eax
10ddab: 0f 85 6b 01 00 00 jne 10df1c <_Thread_Initialize+0x214>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10ddb1: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx)
10ddb8: 00 00 00
10ddbb: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10ddc2: 8a 45 df mov -0x21(%ebp),%al
10ddc5: 88 83 ac 00 00 00 mov %al,0xac(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10ddcb: 8b 45 24 mov 0x24(%ebp),%eax
10ddce: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
the_thread->Start.budget_callout = budget_callout;
10ddd4: 8b 45 28 mov 0x28(%ebp),%eax
10ddd7: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
switch ( budget_algorithm ) {
10dddd: 83 7d 24 02 cmpl $0x2,0x24(%ebp)
10dde1: 75 08 jne 10ddeb <_Thread_Initialize+0xe3>
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;
10dde3: a1 c4 93 12 00 mov 0x1293c4,%eax
10dde8: 89 43 78 mov %eax,0x78(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10ddeb: 8b 45 2c mov 0x2c(%ebp),%eax
10ddee: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
the_thread->current_state = STATES_DORMANT;
10ddf4: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10ddfb: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10de02: 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;
10de09: 89 73 18 mov %esi,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10de0c: 89 b3 bc 00 00 00 mov %esi,0xbc(%ebx)
_Thread_Set_priority( the_thread, priority );
10de12: 83 ec 08 sub $0x8,%esp
10de15: 56 push %esi
10de16: 53 push %ebx
10de17: e8 d0 06 00 00 call 10e4ec <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
10de1c: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10de23: 00 00 00
10de26: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10de2d: 00 00 00
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10de30: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10de34: 8b 45 08 mov 0x8(%ebp),%eax
10de37: 8b 40 1c mov 0x1c(%eax),%eax
10de3a: 89 1c 90 mov %ebx,(%eax,%edx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10de3d: 8b 45 30 mov 0x30(%ebp),%eax
10de40: 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 );
10de43: 89 1c 24 mov %ebx,(%esp)
10de46: e8 8d 0c 00 00 call 10ead8 <_User_extensions_Thread_create>
if ( extension_status )
10de4b: 83 c4 10 add $0x10,%esp
10de4e: 84 c0 test %al,%al
10de50: 0f 85 9a 00 00 00 jne 10def0 <_Thread_Initialize+0x1e8>
return true;
failed:
if ( the_thread->libc_reent )
10de56: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax
10de5c: 85 c0 test %eax,%eax
10de5e: 74 0c je 10de6c <_Thread_Initialize+0x164>
_Workspace_Free( the_thread->libc_reent );
10de60: 83 ec 0c sub $0xc,%esp
10de63: 50 push %eax
10de64: e8 bf 0f 00 00 call 10ee28 <_Workspace_Free>
10de69: 83 c4 10 add $0x10,%esp
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10de6c: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax
10de72: 85 c0 test %eax,%eax
10de74: 74 0c je 10de82 <_Thread_Initialize+0x17a>
_Workspace_Free( the_thread->API_Extensions[i] );
10de76: 83 ec 0c sub $0xc,%esp
10de79: 50 push %eax
10de7a: e8 a9 0f 00 00 call 10ee28 <_Workspace_Free>
10de7f: 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] )
10de82: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax
10de88: 85 c0 test %eax,%eax
10de8a: 74 0c je 10de98 <_Thread_Initialize+0x190>
_Workspace_Free( the_thread->API_Extensions[i] );
10de8c: 83 ec 0c sub $0xc,%esp
10de8f: 50 push %eax
10de90: e8 93 0f 00 00 call 10ee28 <_Workspace_Free>
10de95: 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] )
10de98: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax
10de9e: 85 c0 test %eax,%eax
10dea0: 74 0c je 10deae <_Thread_Initialize+0x1a6><== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
10dea2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10dea5: 50 push %eax <== NOT EXECUTED
10dea6: e8 7d 0f 00 00 call 10ee28 <_Workspace_Free> <== NOT EXECUTED
10deab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( extensions_area )
10deae: 8b 55 e4 mov -0x1c(%ebp),%edx
10deb1: 85 d2 test %edx,%edx
10deb3: 74 0e je 10dec3 <_Thread_Initialize+0x1bb>
(void) _Workspace_Free( extensions_area );
10deb5: 83 ec 0c sub $0xc,%esp
10deb8: ff 75 e4 pushl -0x1c(%ebp)
10debb: e8 68 0f 00 00 call 10ee28 <_Workspace_Free>
10dec0: 83 c4 10 add $0x10,%esp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
10dec3: 8b 45 e0 mov -0x20(%ebp),%eax
10dec6: 85 c0 test %eax,%eax
10dec8: 74 0e je 10ded8 <_Thread_Initialize+0x1d0>
(void) _Workspace_Free( fp_area );
10deca: 83 ec 0c sub $0xc,%esp
10decd: ff 75 e0 pushl -0x20(%ebp)
10ded0: e8 53 0f 00 00 call 10ee28 <_Workspace_Free>
10ded5: 83 c4 10 add $0x10,%esp
#endif
_Thread_Stack_Free( the_thread );
10ded8: 83 ec 0c sub $0xc,%esp
10dedb: 53 push %ebx
10dedc: e8 2b 08 00 00 call 10e70c <_Thread_Stack_Free>
10dee1: 31 c0 xor %eax,%eax
return false;
10dee3: 83 c4 10 add $0x10,%esp
}
10dee6: 8d 65 f4 lea -0xc(%ebp),%esp
10dee9: 5b pop %ebx
10deea: 5e pop %esi
10deeb: 5f pop %edi
10deec: c9 leave
10deed: c3 ret
10deee: 66 90 xchg %ax,%ax
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
10def0: b0 01 mov $0x1,%al
_Thread_Stack_Free( the_thread );
return false;
}
10def2: 8d 65 f4 lea -0xc(%ebp),%esp
10def5: 5b pop %ebx
10def6: 5e pop %esi
10def7: 5f pop %edi
10def8: c9 leave
10def9: c3 ret
10defa: 66 90 xchg %ax,%ax
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10defc: 83 ec 0c sub $0xc,%esp
10deff: 6a 6c push $0x6c
10df01: e8 06 0f 00 00 call 10ee0c <_Workspace_Allocate>
10df06: 89 45 e0 mov %eax,-0x20(%ebp)
if ( !fp_area )
10df09: 83 c4 10 add $0x10,%esp
10df0c: 85 c0 test %eax,%eax
10df0e: 0f 84 89 00 00 00 je 10df9d <_Thread_Initialize+0x295>
10df14: 8b 45 e0 mov -0x20(%ebp),%eax
10df17: e9 60 fe ff ff jmp 10dd7c <_Thread_Initialize+0x74>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
10df1c: 83 ec 0c sub $0xc,%esp
10df1f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10df26: 50 push %eax
10df27: e8 e0 0e 00 00 call 10ee0c <_Workspace_Allocate>
10df2c: 89 45 e4 mov %eax,-0x1c(%ebp)
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10df2f: 83 c4 10 add $0x10,%esp
10df32: 85 c0 test %eax,%eax
10df34: 0f 84 1c ff ff ff je 10de56 <_Thread_Initialize+0x14e>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10df3a: 89 c1 mov %eax,%ecx
10df3c: 89 83 00 01 00 00 mov %eax,0x100(%ebx)
* 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++ )
10df42: 8b 3d 98 94 12 00 mov 0x129498,%edi
10df48: 31 d2 xor %edx,%edx
10df4a: 31 c0 xor %eax,%eax
10df4c: eb 08 jmp 10df56 <_Thread_Initialize+0x24e>
10df4e: 66 90 xchg %ax,%ax
10df50: 8b 8b 00 01 00 00 mov 0x100(%ebx),%ecx
the_thread->extensions[i] = NULL;
10df56: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4)
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10df5d: 40 inc %eax
10df5e: 89 c2 mov %eax,%edx
10df60: 39 c7 cmp %eax,%edi
10df62: 73 ec jae 10df50 <_Thread_Initialize+0x248>
10df64: e9 59 fe ff ff jmp 10ddc2 <_Thread_Initialize+0xba>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10df69: 83 ec 08 sub $0x8,%esp
10df6c: 57 push %edi
10df6d: 53 push %ebx
10df6e: 88 55 d8 mov %dl,-0x28(%ebp)
10df71: e8 32 07 00 00 call 10e6a8 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10df76: 83 c4 10 add $0x10,%esp
10df79: 85 c0 test %eax,%eax
10df7b: 8a 55 d8 mov -0x28(%ebp),%dl
10df7e: 74 16 je 10df96 <_Thread_Initialize+0x28e>
10df80: 39 c7 cmp %eax,%edi
10df82: 77 12 ja 10df96 <_Thread_Initialize+0x28e><== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
10df84: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx
the_thread->Start.core_allocated_stack = true;
10df8a: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx)
10df91: e9 c9 fd ff ff jmp 10dd5f <_Thread_Initialize+0x57>
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
return false;
10df96: 31 c0 xor %eax,%eax
10df98: e9 49 ff ff ff jmp 10dee6 <_Thread_Initialize+0x1de>
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
10df9d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
10dfa4: e9 ad fe ff ff jmp 10de56 <_Thread_Initialize+0x14e>
001135a4 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
1135a4: 55 push %ebp
1135a5: 89 e5 mov %esp,%ebp
1135a7: 53 push %ebx
1135a8: 83 ec 10 sub $0x10,%esp
1135ab: 8b 5d 08 mov 0x8(%ebp),%ebx
the_thread->resource_count = 0;
1135ae: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->is_preemptible = the_thread->Start.is_preemptible;
1135b5: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al
1135bb: 88 43 75 mov %al,0x75(%ebx)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
1135be: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax
1135c4: 89 43 7c mov %eax,0x7c(%ebx)
the_thread->budget_callout = the_thread->Start.budget_callout;
1135c7: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax
1135cd: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
the_thread->Start.pointer_argument = pointer_argument;
1135d3: 8b 45 0c mov 0xc(%ebp),%eax
1135d6: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
the_thread->Start.numeric_argument = numeric_argument;
1135dc: 8b 45 10 mov 0x10(%ebp),%eax
1135df: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
1135e5: 53 push %ebx
1135e6: e8 e9 b8 ff ff call 10eed4 <_Thread_queue_Extract_with_proxy>
1135eb: 83 c4 10 add $0x10,%esp
1135ee: 84 c0 test %al,%al
1135f0: 75 06 jne 1135f8 <_Thread_Reset+0x54>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
1135f2: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
1135f6: 74 28 je 113620 <_Thread_Reset+0x7c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
1135f8: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax
1135fe: 39 43 14 cmp %eax,0x14(%ebx)
113601: 74 15 je 113618 <_Thread_Reset+0x74>
the_thread->real_priority = the_thread->Start.initial_priority;
113603: 89 43 18 mov %eax,0x18(%ebx)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
113606: 89 45 0c mov %eax,0xc(%ebp)
113609: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
11360c: 8b 5d fc mov -0x4(%ebp),%ebx
11360f: c9 leave
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
113610: e9 8b ba ff ff jmp 10f0a0 <_Thread_Set_priority>
113615: 8d 76 00 lea 0x0(%esi),%esi
}
}
113618: 8b 5d fc mov -0x4(%ebp),%ebx
11361b: c9 leave
11361c: c3 ret
11361d: 8d 76 00 lea 0x0(%esi),%esi
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
113620: 83 ec 0c sub $0xc,%esp
113623: 8d 43 48 lea 0x48(%ebx),%eax
113626: 50 push %eax
113627: e8 d0 c2 ff ff call 10f8fc <_Watchdog_Remove>
11362c: 83 c4 10 add $0x10,%esp
11362f: eb c7 jmp 1135f8 <_Thread_Reset+0x54>
00111870 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
111870: 55 push %ebp
111871: 89 e5 mov %esp,%ebp
111873: 53 push %ebx
111874: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
111877: 9c pushf
111878: fa cli
111879: 59 pop %ecx
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
11187a: 8b 50 10 mov 0x10(%eax),%edx
if ( current_state & STATES_SUSPENDED ) {
11187d: f6 c2 02 test $0x2,%dl
111880: 74 6e je 1118f0 <_Thread_Resume+0x80> <== NEVER TAKEN
111882: 83 e2 fd and $0xfffffffd,%edx
current_state =
111885: 89 50 10 mov %edx,0x10(%eax)
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
111888: 85 d2 test %edx,%edx
11188a: 75 64 jne 1118f0 <_Thread_Resume+0x80>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
11188c: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
111892: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx
111899: 66 09 1a or %bx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
11189c: 66 8b 15 ec c5 12 00 mov 0x12c5ec,%dx
1118a3: 0b 90 94 00 00 00 or 0x94(%eax),%edx
1118a9: 66 89 15 ec c5 12 00 mov %dx,0x12c5ec
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
1118b0: 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);
1118b6: 8d 5a 04 lea 0x4(%edx),%ebx
1118b9: 89 18 mov %ebx,(%eax)
old_last_node = the_chain->last;
1118bb: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
1118be: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
1118c1: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
1118c3: 89 58 04 mov %ebx,0x4(%eax)
_ISR_Flash( level );
1118c6: 51 push %ecx
1118c7: 9d popf
1118c8: fa cli
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
1118c9: 8b 50 14 mov 0x14(%eax),%edx
1118cc: 8b 1d c8 c5 12 00 mov 0x12c5c8,%ebx
1118d2: 3b 53 14 cmp 0x14(%ebx),%edx
1118d5: 73 19 jae 1118f0 <_Thread_Resume+0x80>
_Thread_Heir = the_thread;
1118d7: a3 c8 c5 12 00 mov %eax,0x12c5c8
if ( _Thread_Executing->is_preemptible ||
1118dc: a1 f8 c5 12 00 mov 0x12c5f8,%eax
1118e1: 80 78 75 00 cmpb $0x0,0x75(%eax)
1118e5: 74 11 je 1118f8 <_Thread_Resume+0x88>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
1118e7: c6 05 08 c6 12 00 01 movb $0x1,0x12c608
1118ee: 66 90 xchg %ax,%ax
}
}
}
_ISR_Enable( level );
1118f0: 51 push %ecx
1118f1: 9d popf
}
1118f2: 5b pop %ebx
1118f3: c9 leave
1118f4: c3 ret
1118f5: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
1118f8: 85 d2 test %edx,%edx
1118fa: 74 eb je 1118e7 <_Thread_Resume+0x77> <== NEVER TAKEN
1118fc: eb f2 jmp 1118f0 <_Thread_Resume+0x80>
0010e558 <_Thread_Set_state>:
void _Thread_Set_state(
Thread_Control *the_thread,
States_Control state
)
{
10e558: 55 push %ebp
10e559: 89 e5 mov %esp,%ebp
10e55b: 56 push %esi
10e55c: 53 push %ebx
10e55d: 8b 45 08 mov 0x8(%ebp),%eax
10e560: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
10e563: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
_ISR_Disable( level );
10e569: 9c pushf
10e56a: fa cli
10e56b: 59 pop %ecx
if ( !_States_Is_ready( the_thread->current_state ) ) {
10e56c: 8b 58 10 mov 0x10(%eax),%ebx
10e56f: 85 db test %ebx,%ebx
10e571: 75 2d jne 10e5a0 <_Thread_Set_state+0x48>
_States_Set( state, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = state;
10e573: 89 70 10 mov %esi,0x10(%eax)
if ( _Chain_Has_only_one_node( ready ) ) {
10e576: 8b 1a mov (%edx),%ebx
10e578: 3b 5a 08 cmp 0x8(%edx),%ebx
10e57b: 74 3b je 10e5b8 <_Thread_Set_state+0x60>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10e57d: 8b 18 mov (%eax),%ebx
previous = the_node->previous;
10e57f: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
10e582: 89 53 04 mov %edx,0x4(%ebx)
previous->next = next;
10e585: 89 1a mov %ebx,(%edx)
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
10e587: 51 push %ecx
10e588: 9d popf
10e589: fa cli
if ( _Thread_Is_heir( the_thread ) )
10e58a: 3b 05 88 94 12 00 cmp 0x129488,%eax
10e590: 74 62 je 10e5f4 <_Thread_Set_state+0x9c>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
10e592: 3b 05 b8 94 12 00 cmp 0x1294b8,%eax
10e598: 74 12 je 10e5ac <_Thread_Set_state+0x54>
_Context_Switch_necessary = true;
_ISR_Enable( level );
10e59a: 51 push %ecx
10e59b: 9d popf
}
10e59c: 5b pop %ebx
10e59d: 5e pop %esi
10e59e: c9 leave
10e59f: c3 ret
Chain_Control *ready;
ready = the_thread->ready;
_ISR_Disable( level );
if ( !_States_Is_ready( the_thread->current_state ) ) {
the_thread->current_state =
10e5a0: 09 f3 or %esi,%ebx
10e5a2: 89 58 10 mov %ebx,0x10(%eax)
_States_Set( state, the_thread->current_state );
_ISR_Enable( level );
10e5a5: 51 push %ecx
10e5a6: 9d popf
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
10e5a7: 5b pop %ebx
10e5a8: 5e pop %esi
10e5a9: c9 leave
10e5aa: c3 ret
10e5ab: 90 nop
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
10e5ac: c6 05 c8 94 12 00 01 movb $0x1,0x1294c8
10e5b3: eb e5 jmp 10e59a <_Thread_Set_state+0x42>
10e5b5: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10e5b8: 8d 5a 04 lea 0x4(%edx),%ebx
10e5bb: 89 1a mov %ebx,(%edx)
the_chain->permanent_null = NULL;
10e5bd: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
the_chain->last = _Chain_Head(the_chain);
10e5c4: 89 52 08 mov %edx,0x8(%edx)
RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
10e5c7: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
10e5cd: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx
10e5d4: 66 21 1a and %bx,(%edx)
the_thread->current_state = state;
if ( _Chain_Has_only_one_node( ready ) ) {
_Chain_Initialize_empty( ready );
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
10e5d7: 66 83 3a 00 cmpw $0x0,(%edx)
10e5db: 75 aa jne 10e587 <_Thread_Set_state+0x2f>
if ( *the_priority_map->minor == 0 )
_Priority_Major_bit_map &= the_priority_map->block_major;
10e5dd: 66 8b 15 ac 94 12 00 mov 0x1294ac,%dx
10e5e4: 23 90 98 00 00 00 and 0x98(%eax),%edx
10e5ea: 66 89 15 ac 94 12 00 mov %dx,0x1294ac
10e5f1: eb 94 jmp 10e587 <_Thread_Set_state+0x2f>
10e5f3: 90 nop
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 );
10e5f4: 66 8b 35 ac 94 12 00 mov 0x1294ac,%si
10e5fb: 31 d2 xor %edx,%edx
10e5fd: 89 d3 mov %edx,%ebx
10e5ff: 66 0f bc de bsf %si,%bx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10e603: 0f b7 db movzwl %bx,%ebx
10e606: 66 8b b4 1b 40 95 12 mov 0x129540(%ebx,%ebx,1),%si
10e60d: 00
10e60e: 66 0f bc d6 bsf %si,%dx
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
10e612: c1 e3 04 shl $0x4,%ebx
10e615: 0f b7 d2 movzwl %dx,%edx
10e618: 8d 14 13 lea (%ebx,%edx,1),%edx
10e61b: 8d 1c 52 lea (%edx,%edx,2),%ebx
10e61e: 8b 15 c0 93 12 00 mov 0x1293c0,%edx
10e624: 8b 14 9a mov (%edx,%ebx,4),%edx
10e627: 89 15 88 94 12 00 mov %edx,0x129488
10e62d: e9 60 ff ff ff jmp 10e592 <_Thread_Set_state+0x3a>
0010e6a8 <_Thread_Stack_Allocate>:
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
10e6a8: 55 push %ebp
10e6a9: 89 e5 mov %esp,%ebp
10e6ab: 53 push %ebx
10e6ac: 83 ec 04 sub $0x4,%esp
10e6af: a1 10 52 12 00 mov 0x125210,%eax
10e6b4: 8b 5d 0c mov 0xc(%ebp),%ebx
10e6b7: 39 c3 cmp %eax,%ebx
10e6b9: 73 02 jae 10e6bd <_Thread_Stack_Allocate+0x15>
10e6bb: 89 c3 mov %eax,%ebx
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( Configuration.stack_allocate_hook ) {
10e6bd: a1 40 52 12 00 mov 0x125240,%eax
10e6c2: 85 c0 test %eax,%eax
10e6c4: 74 32 je 10e6f8 <_Thread_Stack_Allocate+0x50>
stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size );
10e6c6: 83 ec 0c sub $0xc,%esp
10e6c9: 53 push %ebx
10e6ca: ff d0 call *%eax
10e6cc: 83 c4 10 add $0x10,%esp
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
10e6cf: 85 c0 test %eax,%eax
10e6d1: 74 11 je 10e6e4 <_Thread_Stack_Allocate+0x3c>
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
10e6d3: 8b 55 08 mov 0x8(%ebp),%edx
10e6d6: 89 82 d0 00 00 00 mov %eax,0xd0(%edx)
return the_stack_size;
}
10e6dc: 89 d8 mov %ebx,%eax
10e6de: 8b 5d fc mov -0x4(%ebp),%ebx
10e6e1: c9 leave
10e6e2: c3 ret
10e6e3: 90 nop
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
10e6e4: 31 db xor %ebx,%ebx
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
10e6e6: 8b 55 08 mov 0x8(%ebp),%edx
10e6e9: 89 82 d0 00 00 00 mov %eax,0xd0(%edx)
return the_stack_size;
}
10e6ef: 89 d8 mov %ebx,%eax
10e6f1: 8b 5d fc mov -0x4(%ebp),%ebx
10e6f4: c9 leave
10e6f5: c3 ret
10e6f6: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size (
size_t size
)
{
return size + CPU_STACK_ALIGNMENT;
10e6f8: 83 c3 10 add $0x10,%ebx
* get and keep the stack adjust factor, the stack alignment, and
* the context initialization sequence in sync.
*/
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
10e6fb: 83 ec 0c sub $0xc,%esp
10e6fe: 53 push %ebx
10e6ff: e8 08 07 00 00 call 10ee0c <_Workspace_Allocate>
10e704: 83 c4 10 add $0x10,%esp
10e707: eb c6 jmp 10e6cf <_Thread_Stack_Allocate+0x27>
0010e70c <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
10e70c: 55 push %ebp
10e70d: 89 e5 mov %esp,%ebp
10e70f: 83 ec 08 sub $0x8,%esp
10e712: 8b 45 08 mov 0x8(%ebp),%eax
#if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
10e715: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax)
10e71c: 74 16 je 10e734 <_Thread_Stack_Free+0x28><== NEVER TAKEN
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
10e71e: 8b 15 44 52 12 00 mov 0x125244,%edx
10e724: 85 d2 test %edx,%edx
10e726: 74 10 je 10e738 <_Thread_Stack_Free+0x2c>
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
10e728: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax
10e72e: 89 45 08 mov %eax,0x8(%ebp)
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10e731: c9 leave
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
10e732: ff e2 jmp *%edx
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10e734: c9 leave <== NOT EXECUTED
10e735: c3 ret <== NOT EXECUTED
10e736: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10e738: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax
10e73e: 89 45 08 mov %eax,0x8(%ebp)
}
10e741: c9 leave
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10e742: e9 e1 06 00 00 jmp 10ee28 <_Workspace_Free>
00112974 <_Thread_Suspend>:
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
112974: 55 push %ebp
112975: 89 e5 mov %esp,%ebp
112977: 56 push %esi
112978: 53 push %ebx
112979: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
11297c: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
_ISR_Disable( level );
112982: 9c pushf
112983: fa cli
112984: 59 pop %ecx
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count++;
#endif
if ( !_States_Is_ready( the_thread->current_state ) ) {
112985: 8b 58 10 mov 0x10(%eax),%ebx
112988: 85 db test %ebx,%ebx
11298a: 75 34 jne 1129c0 <_Thread_Suspend+0x4c>
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
11298c: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax)
if ( _Chain_Has_only_one_node( ready ) ) {
112993: 8b 1a mov (%edx),%ebx
112995: 3b 5a 08 cmp 0x8(%edx),%ebx
112998: 74 3e je 1129d8 <_Thread_Suspend+0x64>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
11299a: 8b 18 mov (%eax),%ebx
previous = the_node->previous;
11299c: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
11299f: 89 53 04 mov %edx,0x4(%ebx)
previous->next = next;
1129a2: 89 1a mov %ebx,(%edx)
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
1129a4: 51 push %ecx
1129a5: 9d popf
1129a6: fa cli
if ( _Thread_Is_heir( the_thread ) )
1129a7: 3b 05 88 94 12 00 cmp 0x129488,%eax
1129ad: 74 65 je 112a14 <_Thread_Suspend+0xa0>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
1129af: 3b 05 b8 94 12 00 cmp 0x1294b8,%eax
1129b5: 74 15 je 1129cc <_Thread_Suspend+0x58>
_Context_Switch_necessary = true;
_ISR_Enable( level );
1129b7: 51 push %ecx
1129b8: 9d popf
}
1129b9: 5b pop %ebx
1129ba: 5e pop %esi
1129bb: c9 leave
1129bc: c3 ret
1129bd: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Disable( level );
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count++;
#endif
if ( !_States_Is_ready( the_thread->current_state ) ) {
the_thread->current_state =
1129c0: 83 cb 02 or $0x2,%ebx
1129c3: 89 58 10 mov %ebx,0x10(%eax)
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
1129c6: 51 push %ecx
1129c7: 9d popf
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
1129c8: 5b pop %ebx
1129c9: 5e pop %esi
1129ca: c9 leave
1129cb: c3 ret
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
1129cc: c6 05 c8 94 12 00 01 movb $0x1,0x1294c8
1129d3: eb e2 jmp 1129b7 <_Thread_Suspend+0x43>
1129d5: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
1129d8: 8d 5a 04 lea 0x4(%edx),%ebx
1129db: 89 1a mov %ebx,(%edx)
the_chain->permanent_null = NULL;
1129dd: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
the_chain->last = _Chain_Head(the_chain);
1129e4: 89 52 08 mov %edx,0x8(%edx)
RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
1129e7: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
1129ed: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx
1129f4: 66 21 1a and %bx,(%edx)
the_thread->current_state = STATES_SUSPENDED;
if ( _Chain_Has_only_one_node( ready ) ) {
_Chain_Initialize_empty( ready );
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
1129f7: 66 83 3a 00 cmpw $0x0,(%edx)
1129fb: 75 a7 jne 1129a4 <_Thread_Suspend+0x30>
if ( *the_priority_map->minor == 0 )
_Priority_Major_bit_map &= the_priority_map->block_major;
1129fd: 66 8b 15 ac 94 12 00 mov 0x1294ac,%dx
112a04: 23 90 98 00 00 00 and 0x98(%eax),%edx
112a0a: 66 89 15 ac 94 12 00 mov %dx,0x1294ac
112a11: eb 91 jmp 1129a4 <_Thread_Suspend+0x30>
112a13: 90 nop
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 );
112a14: 66 8b 35 ac 94 12 00 mov 0x1294ac,%si
112a1b: 31 d2 xor %edx,%edx
112a1d: 89 d3 mov %edx,%ebx
112a1f: 66 0f bc de bsf %si,%bx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
112a23: 0f b7 db movzwl %bx,%ebx
112a26: 66 8b b4 1b 40 95 12 mov 0x129540(%ebx,%ebx,1),%si
112a2d: 00
112a2e: 66 0f bc d6 bsf %si,%dx
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
112a32: c1 e3 04 shl $0x4,%ebx
112a35: 0f b7 d2 movzwl %dx,%edx
112a38: 8d 14 13 lea (%ebx,%edx,1),%edx
112a3b: 8d 1c 52 lea (%edx,%edx,2),%ebx
112a3e: 8b 15 c0 93 12 00 mov 0x1293c0,%edx
112a44: 8b 14 9a mov (%edx,%ebx,4),%edx
112a47: 89 15 88 94 12 00 mov %edx,0x129488
112a4d: e9 5d ff ff ff jmp 1129af <_Thread_Suspend+0x3b>
0010e804 <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
10e804: 55 push %ebp
10e805: 89 e5 mov %esp,%ebp
10e807: 53 push %ebx
10e808: 83 ec 04 sub $0x4,%esp
Thread_Control *executing;
executing = _Thread_Executing;
10e80b: 8b 1d b8 94 12 00 mov 0x1294b8,%ebx
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
10e811: 80 7b 75 00 cmpb $0x0,0x75(%ebx)
10e815: 74 19 je 10e830 <_Thread_Tickle_timeslice+0x2c>
return;
if ( !_States_Is_ready( executing->current_state ) )
10e817: 8b 43 10 mov 0x10(%ebx),%eax
10e81a: 85 c0 test %eax,%eax
10e81c: 75 12 jne 10e830 <_Thread_Tickle_timeslice+0x2c>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
10e81e: 8b 43 7c mov 0x7c(%ebx),%eax
10e821: 83 f8 01 cmp $0x1,%eax
10e824: 72 0a jb 10e830 <_Thread_Tickle_timeslice+0x2c>
10e826: 83 f8 02 cmp $0x2,%eax
10e829: 76 29 jbe 10e854 <_Thread_Tickle_timeslice+0x50>
10e82b: 83 f8 03 cmp $0x3,%eax
10e82e: 74 08 je 10e838 <_Thread_Tickle_timeslice+0x34><== ALWAYS TAKEN
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
10e830: 8b 5d fc mov -0x4(%ebp),%ebx
10e833: c9 leave
10e834: c3 ret
10e835: 8d 76 00 lea 0x0(%esi),%esi
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
10e838: 8b 43 78 mov 0x78(%ebx),%eax
10e83b: 48 dec %eax
10e83c: 89 43 78 mov %eax,0x78(%ebx)
10e83f: 85 c0 test %eax,%eax
10e841: 75 ed jne 10e830 <_Thread_Tickle_timeslice+0x2c>
(*executing->budget_callout)( executing );
10e843: 83 ec 0c sub $0xc,%esp
10e846: 53 push %ebx
10e847: ff 93 80 00 00 00 call *0x80(%ebx)
10e84d: 83 c4 10 add $0x10,%esp
10e850: eb de jmp 10e830 <_Thread_Tickle_timeslice+0x2c>
10e852: 66 90 xchg %ax,%ax
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 ) {
10e854: 8b 43 78 mov 0x78(%ebx),%eax
10e857: 48 dec %eax
10e858: 89 43 78 mov %eax,0x78(%ebx)
10e85b: 85 c0 test %eax,%eax
10e85d: 7f d1 jg 10e830 <_Thread_Tickle_timeslice+0x2c>
_Thread_Reset_timeslice();
10e85f: e8 b8 40 00 00 call 11291c <_Thread_Reset_timeslice>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10e864: a1 c4 93 12 00 mov 0x1293c4,%eax
10e869: 89 43 78 mov %eax,0x78(%ebx)
10e86c: eb c2 jmp 10e830 <_Thread_Tickle_timeslice+0x2c>
0010e870 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
10e870: 55 push %ebp
10e871: 89 e5 mov %esp,%ebp
10e873: 56 push %esi
10e874: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10e875: a1 b8 94 12 00 mov 0x1294b8,%eax
ready = executing->ready;
10e87a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
_ISR_Disable( level );
10e880: 9c pushf
10e881: fa cli
10e882: 59 pop %ecx
if ( !_Chain_Has_only_one_node( ready ) ) {
10e883: 8b 1a mov (%edx),%ebx
10e885: 3b 5a 08 cmp 0x8(%edx),%ebx
10e888: 74 3e je 10e8c8 <_Thread_Yield_processor+0x58>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10e88a: 8b 30 mov (%eax),%esi
previous = the_node->previous;
10e88c: 8b 58 04 mov 0x4(%eax),%ebx
next->previous = previous;
10e88f: 89 5e 04 mov %ebx,0x4(%esi)
previous->next = next;
10e892: 89 33 mov %esi,(%ebx)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
10e894: 8d 5a 04 lea 0x4(%edx),%ebx
10e897: 89 18 mov %ebx,(%eax)
old_last_node = the_chain->last;
10e899: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
10e89c: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10e89f: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
10e8a1: 89 58 04 mov %ebx,0x4(%eax)
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10e8a4: 51 push %ecx
10e8a5: 9d popf
10e8a6: fa cli
if ( _Thread_Is_heir( executing ) )
10e8a7: 3b 05 88 94 12 00 cmp 0x129488,%eax
10e8ad: 74 0d je 10e8bc <_Thread_Yield_processor+0x4c><== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
10e8af: c6 05 c8 94 12 00 01 movb $0x1,0x1294c8
_ISR_Enable( level );
10e8b6: 51 push %ecx
10e8b7: 9d popf
}
10e8b8: 5b pop %ebx
10e8b9: 5e pop %esi
10e8ba: c9 leave
10e8bb: c3 ret
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
10e8bc: 8b 02 mov (%edx),%eax
10e8be: a3 88 94 12 00 mov %eax,0x129488
10e8c3: eb ea jmp 10e8af <_Thread_Yield_processor+0x3f>
10e8c5: 8d 76 00 lea 0x0(%esi),%esi
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
10e8c8: 3b 05 88 94 12 00 cmp 0x129488,%eax
10e8ce: 75 df jne 10e8af <_Thread_Yield_processor+0x3f><== NEVER TAKEN
10e8d0: eb e4 jmp 10e8b6 <_Thread_Yield_processor+0x46>
0010e0d4 <_Thread_queue_Dequeue_priority>:
*/
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
10e0d4: 55 push %ebp
10e0d5: 89 e5 mov %esp,%ebp
10e0d7: 57 push %edi
10e0d8: 56 push %esi
10e0d9: 53 push %ebx
10e0da: 83 ec 1c sub $0x1c,%esp
10e0dd: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
10e0e0: 9c pushf
10e0e1: fa cli
10e0e2: 58 pop %eax
10e0e3: 89 f2 mov %esi,%edx
10e0e5: 31 c9 xor %ecx,%ecx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10e0e7: 8d 5a 04 lea 0x4(%edx),%ebx
10e0ea: 39 1a cmp %ebx,(%edx)
10e0ec: 75 1a jne 10e108 <_Thread_queue_Dequeue_priority+0x34>
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
10e0ee: 41 inc %ecx
10e0ef: 83 c2 0c add $0xc,%edx
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
10e0f2: 83 f9 04 cmp $0x4,%ecx
10e0f5: 75 f0 jne 10e0e7 <_Thread_queue_Dequeue_priority+0x13>
}
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
10e0f7: 50 push %eax
10e0f8: 9d popf
10e0f9: 31 db xor %ebx,%ebx
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10e0fb: 89 d8 mov %ebx,%eax
10e0fd: 8d 65 f4 lea -0xc(%ebp),%esp
10e100: 5b pop %ebx
10e101: 5e pop %esi
10e102: 5f pop %edi
10e103: c9 leave
10e104: c3 ret
10e105: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
the_thread = (Thread_Control *)
10e108: 8d 14 49 lea (%ecx,%ecx,2),%edx
10e10b: 8b 1c 96 mov (%esi,%edx,4),%ebx
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
10e10e: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
new_first_node = the_thread->Wait.Block2n.first;
10e115: 8b 53 38 mov 0x38(%ebx),%edx
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
10e118: 8b 0b mov (%ebx),%ecx
previous_node = the_thread->Object.Node.previous;
10e11a: 8b 73 04 mov 0x4(%ebx),%esi
10e11d: 8d 7b 3c lea 0x3c(%ebx),%edi
10e120: 39 fa cmp %edi,%edx
10e122: 74 76 je 10e19a <_Thread_queue_Dequeue_priority+0xc6>
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = the_thread->Wait.Block2n.last;
10e124: 8b 7b 40 mov 0x40(%ebx),%edi
10e127: 89 7d e4 mov %edi,-0x1c(%ebp)
new_second_node = new_first_node->next;
10e12a: 8b 3a mov (%edx),%edi
previous_node->next = new_first_node;
10e12c: 89 16 mov %edx,(%esi)
next_node->previous = new_first_node;
10e12e: 89 51 04 mov %edx,0x4(%ecx)
new_first_node->next = next_node;
10e131: 89 0a mov %ecx,(%edx)
new_first_node->previous = previous_node;
10e133: 89 72 04 mov %esi,0x4(%edx)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
10e136: 8b 4b 38 mov 0x38(%ebx),%ecx
10e139: 3b 4b 40 cmp 0x40(%ebx),%ecx
10e13c: 74 14 je 10e152 <_Thread_queue_Dequeue_priority+0x7e>
/* > two threads on 2-n */
new_second_node->previous =
10e13e: 8d 4a 38 lea 0x38(%edx),%ecx
10e141: 89 4f 04 mov %ecx,0x4(%edi)
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
10e144: 89 7a 38 mov %edi,0x38(%edx)
new_first_thread->Wait.Block2n.last = last_node;
10e147: 8b 4d e4 mov -0x1c(%ebp),%ecx
10e14a: 89 4a 40 mov %ecx,0x40(%edx)
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
10e14d: 83 c2 3c add $0x3c,%edx
10e150: 89 11 mov %edx,(%ecx)
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10e152: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10e156: 74 18 je 10e170 <_Thread_queue_Dequeue_priority+0x9c>
_ISR_Enable( level );
10e158: 50 push %eax
10e159: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10e15a: 83 ec 08 sub $0x8,%esp
10e15d: 68 f8 ff 03 10 push $0x1003fff8
10e162: 53 push %ebx
10e163: e8 5c f7 ff ff call 10d8c4 <_Thread_Clear_state>
10e168: 83 c4 10 add $0x10,%esp
10e16b: eb 8e jmp 10e0fb <_Thread_queue_Dequeue_priority+0x27>
10e16d: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10e170: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10e177: 50 push %eax
10e178: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10e179: 83 ec 0c sub $0xc,%esp
10e17c: 8d 43 48 lea 0x48(%ebx),%eax
10e17f: 50 push %eax
10e180: e8 83 0b 00 00 call 10ed08 <_Watchdog_Remove>
10e185: 58 pop %eax
10e186: 5a pop %edx
10e187: 68 f8 ff 03 10 push $0x1003fff8
10e18c: 53 push %ebx
10e18d: e8 32 f7 ff ff call 10d8c4 <_Thread_Clear_state>
10e192: 83 c4 10 add $0x10,%esp
10e195: e9 61 ff ff ff jmp 10e0fb <_Thread_queue_Dequeue_priority+0x27>
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
10e19a: 89 0e mov %ecx,(%esi)
next_node->previous = previous_node;
10e19c: 89 71 04 mov %esi,0x4(%ecx)
10e19f: eb b1 jmp 10e152 <_Thread_queue_Dequeue_priority+0x7e>
0011270c <_Thread_queue_Enqueue_fifo>:
Thread_blocking_operation_States _Thread_queue_Enqueue_fifo (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
11270c: 55 push %ebp
11270d: 89 e5 mov %esp,%ebp
11270f: 56 push %esi
112710: 53 push %ebx
112711: 8b 55 08 mov 0x8(%ebp),%edx
112714: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_blocking_operation_States sync_state;
ISR_Level level;
_ISR_Disable( level );
112717: 9c pushf
112718: fa cli
112719: 59 pop %ecx
sync_state = the_thread_queue->sync_state;
11271a: 8b 42 30 mov 0x30(%edx),%eax
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
11271d: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) {
112724: 83 f8 01 cmp $0x1,%eax
112727: 74 0b je 112734 <_Thread_queue_Enqueue_fifo+0x28>
* 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;
112729: 8b 55 10 mov 0x10(%ebp),%edx
11272c: 89 0a mov %ecx,(%edx)
return sync_state;
}
11272e: 5b pop %ebx
11272f: 5e pop %esi
112730: c9 leave
112731: c3 ret
112732: 66 90 xchg %ax,%ax
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
112734: 8d 72 04 lea 0x4(%edx),%esi
112737: 89 33 mov %esi,(%ebx)
old_last_node = the_chain->last;
112739: 8b 72 08 mov 0x8(%edx),%esi
the_chain->last = the_node;
11273c: 89 5a 08 mov %ebx,0x8(%edx)
old_last_node->next = the_node;
11273f: 89 1e mov %ebx,(%esi)
the_node->previous = old_last_node;
112741: 89 73 04 mov %esi,0x4(%ebx)
if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) {
_Chain_Append_unprotected(
&the_thread_queue->Queues.Fifo,
&the_thread->Object.Node
);
the_thread->Wait.queue = the_thread_queue;
112744: 89 53 44 mov %edx,0x44(%ebx)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
_ISR_Enable( level );
112747: 51 push %ecx
112748: 9d popf
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return sync_state;
}
112749: 5b pop %ebx
11274a: 5e pop %esi
11274b: c9 leave
11274c: c3 ret
0010e23c <_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
)
{
10e23c: 55 push %ebp
10e23d: 89 e5 mov %esp,%ebp
10e23f: 57 push %edi
10e240: 56 push %esi
10e241: 53 push %ebx
10e242: 83 ec 08 sub $0x8,%esp
10e245: 8b 7d 0c mov 0xc(%ebp),%edi
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10e248: 8d 47 3c lea 0x3c(%edi),%eax
10e24b: 89 47 38 mov %eax,0x38(%edi)
the_chain->permanent_null = NULL;
10e24e: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi)
the_chain->last = _Chain_Head(the_chain);
10e255: 8d 47 38 lea 0x38(%edi),%eax
10e258: 89 47 40 mov %eax,0x40(%edi)
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
10e25b: 8b 57 14 mov 0x14(%edi),%edx
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
10e25e: 89 d0 mov %edx,%eax
10e260: c1 e8 06 shr $0x6,%eax
10e263: 8d 04 40 lea (%eax,%eax,2),%eax
10e266: 8b 4d 08 mov 0x8(%ebp),%ecx
10e269: 8d 34 81 lea (%ecx,%eax,4),%esi
block_state = the_thread_queue->state;
10e26c: 8b 59 38 mov 0x38(%ecx),%ebx
if ( _Thread_queue_Is_reverse_search( priority ) )
10e26f: f6 c2 20 test $0x20,%dl
10e272: 75 60 jne 10e2d4 <_Thread_queue_Enqueue_priority+0x98>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10e274: 8d 46 04 lea 0x4(%esi),%eax
10e277: 89 75 f0 mov %esi,-0x10(%ebp)
10e27a: 89 7d ec mov %edi,-0x14(%ebp)
10e27d: 89 c7 mov %eax,%edi
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
10e27f: 9c pushf
10e280: fa cli
10e281: 5e pop %esi
search_thread = (Thread_Control *) header->first;
10e282: 8b 4d f0 mov -0x10(%ebp),%ecx
10e285: 8b 01 mov (%ecx),%eax
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10e287: 39 f8 cmp %edi,%eax
10e289: 75 17 jne 10e2a2 <_Thread_queue_Enqueue_priority+0x66>
10e28b: e9 09 01 00 00 jmp 10e399 <_Thread_queue_Enqueue_priority+0x15d>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
10e290: 56 push %esi
10e291: 9d popf
10e292: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10e293: 85 58 10 test %ebx,0x10(%eax)
10e296: 0f 84 a8 00 00 00 je 10e344 <_Thread_queue_Enqueue_priority+0x108><== NEVER TAKEN
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
10e29c: 8b 00 mov (%eax),%eax
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 ) ) {
10e29e: 39 f8 cmp %edi,%eax
10e2a0: 74 07 je 10e2a9 <_Thread_queue_Enqueue_priority+0x6d>
search_priority = search_thread->current_priority;
10e2a2: 8b 48 14 mov 0x14(%eax),%ecx
if ( priority <= search_priority )
10e2a5: 39 ca cmp %ecx,%edx
10e2a7: 77 e7 ja 10e290 <_Thread_queue_Enqueue_priority+0x54>
10e2a9: 89 4d f0 mov %ecx,-0x10(%ebp)
10e2ac: 8b 7d ec mov -0x14(%ebp),%edi
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 ) ) {
10e2af: 89 f3 mov %esi,%ebx
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
10e2b1: 8b 4d 08 mov 0x8(%ebp),%ecx
10e2b4: 83 79 30 01 cmpl $0x1,0x30(%ecx)
10e2b8: 0f 84 8e 00 00 00 je 10e34c <_Thread_queue_Enqueue_priority+0x110>
* 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;
10e2be: 8b 45 10 mov 0x10(%ebp),%eax
10e2c1: 89 18 mov %ebx,(%eax)
return the_thread_queue->sync_state;
10e2c3: 8b 55 08 mov 0x8(%ebp),%edx
10e2c6: 8b 42 30 mov 0x30(%edx),%eax
}
10e2c9: 83 c4 08 add $0x8,%esp
10e2cc: 5b pop %ebx
10e2cd: 5e pop %esi
10e2ce: 5f pop %edi
10e2cf: c9 leave
10e2d0: c3 ret
10e2d1: 8d 76 00 lea 0x0(%esi),%esi
10e2d4: 89 7d f0 mov %edi,-0x10(%ebp)
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
10e2d7: 0f b6 0d 14 52 12 00 movzbl 0x125214,%ecx
10e2de: 41 inc %ecx
_ISR_Disable( level );
10e2df: 9c pushf
10e2e0: fa cli
10e2e1: 5f pop %edi
search_thread = (Thread_Control *) header->last;
10e2e2: 8b 46 08 mov 0x8(%esi),%eax
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10e2e5: 39 f0 cmp %esi,%eax
10e2e7: 75 12 jne 10e2fb <_Thread_queue_Enqueue_priority+0xbf>
10e2e9: eb 17 jmp 10e302 <_Thread_queue_Enqueue_priority+0xc6>
10e2eb: 90 nop
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
10e2ec: 57 push %edi
10e2ed: 9d popf
10e2ee: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10e2ef: 85 58 10 test %ebx,0x10(%eax)
10e2f2: 74 4c je 10e340 <_Thread_queue_Enqueue_priority+0x104>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
10e2f4: 8b 40 04 mov 0x4(%eax),%eax
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 ) ) {
10e2f7: 39 f0 cmp %esi,%eax
10e2f9: 74 07 je 10e302 <_Thread_queue_Enqueue_priority+0xc6>
search_priority = search_thread->current_priority;
10e2fb: 8b 48 14 mov 0x14(%eax),%ecx
if ( priority >= search_priority )
10e2fe: 39 ca cmp %ecx,%edx
10e300: 72 ea jb 10e2ec <_Thread_queue_Enqueue_priority+0xb0>
10e302: 89 fe mov %edi,%esi
10e304: 89 4d ec mov %ecx,-0x14(%ebp)
10e307: 8b 7d f0 mov -0x10(%ebp),%edi
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 ) ) {
10e30a: 89 f3 mov %esi,%ebx
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
10e30c: 8b 4d 08 mov 0x8(%ebp),%ecx
10e30f: 83 79 30 01 cmpl $0x1,0x30(%ecx)
10e313: 75 a9 jne 10e2be <_Thread_queue_Enqueue_priority+0x82>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10e315: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx)
if ( priority == search_priority )
10e31c: 3b 55 ec cmp -0x14(%ebp),%edx
10e31f: 74 56 je 10e377 <_Thread_queue_Enqueue_priority+0x13b>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
10e321: 8b 10 mov (%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
10e323: 89 17 mov %edx,(%edi)
the_node->previous = search_node;
10e325: 89 47 04 mov %eax,0x4(%edi)
search_node->next = the_node;
10e328: 89 38 mov %edi,(%eax)
next_node->previous = the_node;
10e32a: 89 7a 04 mov %edi,0x4(%edx)
the_thread->Wait.queue = the_thread_queue;
10e32d: 89 4f 44 mov %ecx,0x44(%edi)
_ISR_Enable( level );
10e330: 56 push %esi
10e331: 9d popf
10e332: b8 01 00 00 00 mov $0x1,%eax
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10e337: 83 c4 08 add $0x8,%esp
10e33a: 5b pop %ebx
10e33b: 5e pop %esi
10e33c: 5f pop %edi
10e33d: c9 leave
10e33e: c3 ret
10e33f: 90 nop
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
10e340: 57 push %edi
10e341: 9d popf
goto restart_reverse_search;
10e342: eb 93 jmp 10e2d7 <_Thread_queue_Enqueue_priority+0x9b>
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
10e344: 56 push %esi <== NOT EXECUTED
10e345: 9d popf <== NOT EXECUTED
goto restart_forward_search;
10e346: e9 34 ff ff ff jmp 10e27f <_Thread_queue_Enqueue_priority+0x43><== NOT EXECUTED
10e34b: 90 nop <== NOT EXECUTED
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10e34c: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx)
if ( priority == search_priority )
10e353: 3b 55 f0 cmp -0x10(%ebp),%edx
10e356: 74 1f je 10e377 <_Thread_queue_Enqueue_priority+0x13b>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
10e358: 8b 50 04 mov 0x4(%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10e35b: 89 07 mov %eax,(%edi)
the_node->previous = previous_node;
10e35d: 89 57 04 mov %edx,0x4(%edi)
previous_node->next = the_node;
10e360: 89 3a mov %edi,(%edx)
search_node->previous = the_node;
10e362: 89 78 04 mov %edi,0x4(%eax)
the_thread->Wait.queue = the_thread_queue;
10e365: 89 4f 44 mov %ecx,0x44(%edi)
_ISR_Enable( level );
10e368: 56 push %esi
10e369: 9d popf
10e36a: b8 01 00 00 00 mov $0x1,%eax
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10e36f: 83 c4 08 add $0x8,%esp
10e372: 5b pop %ebx
10e373: 5e pop %esi
10e374: 5f pop %edi
10e375: c9 leave
10e376: c3 ret
10e377: 83 c0 3c add $0x3c,%eax
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
10e37a: 8b 50 04 mov 0x4(%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10e37d: 89 07 mov %eax,(%edi)
the_node->previous = previous_node;
10e37f: 89 57 04 mov %edx,0x4(%edi)
previous_node->next = the_node;
10e382: 89 3a mov %edi,(%edx)
search_node->previous = the_node;
10e384: 89 78 04 mov %edi,0x4(%eax)
the_thread->Wait.queue = the_thread_queue;
10e387: 8b 45 08 mov 0x8(%ebp),%eax
10e38a: 89 47 44 mov %eax,0x44(%edi)
_ISR_Enable( level );
10e38d: 53 push %ebx
10e38e: 9d popf
10e38f: b8 01 00 00 00 mov $0x1,%eax
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10e394: e9 30 ff ff ff jmp 10e2c9 <_Thread_queue_Enqueue_priority+0x8d>
10e399: 8b 7d ec mov -0x14(%ebp),%edi
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 ) ) {
10e39c: 89 f3 mov %esi,%ebx
10e39e: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp)
10e3a5: e9 07 ff ff ff jmp 10e2b1 <_Thread_queue_Enqueue_priority+0x75>
00112750 <_Thread_queue_Extract>:
void _Thread_queue_Extract(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
112750: 55 push %ebp
112751: 89 e5 mov %esp,%ebp
112753: 83 ec 08 sub $0x8,%esp
112756: 8b 45 08 mov 0x8(%ebp),%eax
112759: 8b 55 0c mov 0xc(%ebp),%edx
/*
* Can not use indirect function pointer here since Extract priority
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
11275c: 83 78 34 01 cmpl $0x1,0x34(%eax)
112760: 74 0e je 112770 <_Thread_queue_Extract+0x20>
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
112762: 89 55 0c mov %edx,0xc(%ebp)
112765: 89 45 08 mov %eax,0x8(%ebp)
}
112768: c9 leave
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
112769: e9 22 28 00 00 jmp 114f90 <_Thread_queue_Extract_fifo>
11276e: 66 90 xchg %ax,%ax
/*
* Can not use indirect function pointer here since Extract priority
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
112770: 51 push %ecx
112771: 6a 00 push $0x0
112773: 52 push %edx
112774: 50 push %eax
112775: e8 06 00 00 00 call 112780 <_Thread_queue_Extract_priority_helper>
11277a: 83 c4 10 add $0x10,%esp
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
}
11277d: c9 leave
11277e: c3 ret
00114f90 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
114f90: 55 push %ebp
114f91: 89 e5 mov %esp,%ebp
114f93: 53 push %ebx
114f94: 83 ec 04 sub $0x4,%esp
114f97: 8b 5d 0c mov 0xc(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
114f9a: 9c pushf
114f9b: fa cli
114f9c: 58 pop %eax
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
114f9d: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
114fa4: 74 2e je 114fd4 <_Thread_queue_Extract_fifo+0x44>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
114fa6: 8b 0b mov (%ebx),%ecx
previous = the_node->previous;
114fa8: 8b 53 04 mov 0x4(%ebx),%edx
next->previous = previous;
114fab: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
114fae: 89 0a mov %ecx,(%edx)
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
114fb0: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
114fb7: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
114fbb: 74 1f je 114fdc <_Thread_queue_Extract_fifo+0x4c>
_ISR_Enable( level );
114fbd: 50 push %eax
114fbe: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
114fbf: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
114fc6: 89 5d 08 mov %ebx,0x8(%ebp)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
114fc9: 8b 5d fc mov -0x4(%ebp),%ebx
114fcc: c9 leave
114fcd: e9 f2 88 ff ff jmp 10d8c4 <_Thread_Clear_state>
114fd2: 66 90 xchg %ax,%ax
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
114fd4: 50 push %eax
114fd5: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
114fd6: 8b 5d fc mov -0x4(%ebp),%ebx
114fd9: c9 leave
114fda: c3 ret
114fdb: 90 nop
114fdc: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
114fe3: 50 push %eax
114fe4: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
114fe5: 83 ec 0c sub $0xc,%esp
114fe8: 8d 43 48 lea 0x48(%ebx),%eax
114feb: 50 push %eax
114fec: e8 17 9d ff ff call 10ed08 <_Watchdog_Remove>
114ff1: 83 c4 10 add $0x10,%esp
114ff4: eb c9 jmp 114fbf <_Thread_queue_Extract_fifo+0x2f>
00112780 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
112780: 55 push %ebp
112781: 89 e5 mov %esp,%ebp
112783: 57 push %edi
112784: 56 push %esi
112785: 53 push %ebx
112786: 83 ec 1c sub $0x1c,%esp
112789: 8b 5d 0c mov 0xc(%ebp),%ebx
11278c: 8a 45 10 mov 0x10(%ebp),%al
11278f: 88 45 e3 mov %al,-0x1d(%ebp)
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
112792: 9c pushf
112793: fa cli
112794: 8f 45 e4 popl -0x1c(%ebp)
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
112797: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
11279e: 74 60 je 112800 <_Thread_queue_Extract_priority_helper+0x80>
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
1127a0: 8b 13 mov (%ebx),%edx
previous_node = the_node->previous;
1127a2: 8b 4b 04 mov 0x4(%ebx),%ecx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
1127a5: 8b 43 38 mov 0x38(%ebx),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1127a8: 8d 73 3c lea 0x3c(%ebx),%esi
1127ab: 39 f0 cmp %esi,%eax
1127ad: 74 5d je 11280c <_Thread_queue_Extract_priority_helper+0x8c>
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
1127af: 8b 7b 40 mov 0x40(%ebx),%edi
new_second_node = new_first_node->next;
1127b2: 8b 30 mov (%eax),%esi
previous_node->next = new_first_node;
1127b4: 89 01 mov %eax,(%ecx)
next_node->previous = new_first_node;
1127b6: 89 42 04 mov %eax,0x4(%edx)
new_first_node->next = next_node;
1127b9: 89 10 mov %edx,(%eax)
new_first_node->previous = previous_node;
1127bb: 89 48 04 mov %ecx,0x4(%eax)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
1127be: 8b 53 38 mov 0x38(%ebx),%edx
1127c1: 3b 53 40 cmp 0x40(%ebx),%edx
1127c4: 74 11 je 1127d7 <_Thread_queue_Extract_priority_helper+0x57>
/* > two threads on 2-n */
new_second_node->previous =
1127c6: 8d 50 38 lea 0x38(%eax),%edx
1127c9: 89 56 04 mov %edx,0x4(%esi)
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
1127cc: 89 70 38 mov %esi,0x38(%eax)
new_first_thread->Wait.Block2n.last = last_node;
1127cf: 89 78 40 mov %edi,0x40(%eax)
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
1127d2: 83 c0 3c add $0x3c,%eax
1127d5: 89 07 mov %eax,(%edi)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
1127d7: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
1127db: 75 23 jne 112800 <_Thread_queue_Extract_priority_helper+0x80>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
1127dd: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
1127e1: 74 31 je 112814 <_Thread_queue_Extract_priority_helper+0x94>
_ISR_Enable( level );
1127e3: ff 75 e4 pushl -0x1c(%ebp)
1127e6: 9d popf
1127e7: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
1127ee: 89 5d 08 mov %ebx,0x8(%ebp)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
1127f1: 8d 65 f4 lea -0xc(%ebp),%esp
1127f4: 5b pop %ebx
1127f5: 5e pop %esi
1127f6: 5f pop %edi
1127f7: c9 leave
1127f8: e9 c7 b0 ff ff jmp 10d8c4 <_Thread_Clear_state>
1127fd: 8d 76 00 lea 0x0(%esi),%esi
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
112800: ff 75 e4 pushl -0x1c(%ebp)
112803: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
112804: 8d 65 f4 lea -0xc(%ebp),%esp
112807: 5b pop %ebx
112808: 5e pop %esi
112809: 5f pop %edi
11280a: c9 leave
11280b: c3 ret
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
11280c: 89 11 mov %edx,(%ecx)
next_node->previous = previous_node;
11280e: 89 4a 04 mov %ecx,0x4(%edx)
112811: eb c4 jmp 1127d7 <_Thread_queue_Extract_priority_helper+0x57>
112813: 90 nop
112814: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
11281b: ff 75 e4 pushl -0x1c(%ebp)
11281e: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
11281f: 83 ec 0c sub $0xc,%esp
112822: 8d 43 48 lea 0x48(%ebx),%eax
112825: 50 push %eax
112826: e8 dd c4 ff ff call 10ed08 <_Watchdog_Remove>
11282b: 83 c4 10 add $0x10,%esp
11282e: eb b7 jmp 1127e7 <_Thread_queue_Extract_priority_helper+0x67>
0010e3ac <_Thread_queue_Extract_with_proxy>:
*/
bool _Thread_queue_Extract_with_proxy(
Thread_Control *the_thread
)
{
10e3ac: 55 push %ebp
10e3ad: 89 e5 mov %esp,%ebp
10e3af: 83 ec 08 sub $0x8,%esp
10e3b2: 8b 45 08 mov 0x8(%ebp),%eax
States_Control state;
state = the_thread->current_state;
10e3b5: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax)
10e3bc: 75 06 jne 10e3c4 <_Thread_queue_Extract_with_proxy+0x18>
10e3be: 31 c0 xor %eax,%eax
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
return true;
}
return false;
}
10e3c0: c9 leave
10e3c1: c3 ret
10e3c2: 66 90 xchg %ax,%ax
if ( proxy_extract_callout )
(*proxy_extract_callout)( the_thread );
}
#endif
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
10e3c4: 83 ec 08 sub $0x8,%esp
10e3c7: 50 push %eax
10e3c8: ff 70 44 pushl 0x44(%eax)
10e3cb: e8 80 43 00 00 call 112750 <_Thread_queue_Extract>
10e3d0: b0 01 mov $0x1,%al
return true;
10e3d2: 83 c4 10 add $0x10,%esp
}
return false;
}
10e3d5: c9 leave
10e3d6: c3 ret
0011025c <_Thread_queue_First>:
*/
Thread_Control *_Thread_queue_First(
Thread_queue_Control *the_thread_queue
)
{
11025c: 55 push %ebp
11025d: 89 e5 mov %esp,%ebp
11025f: 83 ec 08 sub $0x8,%esp
110262: 8b 45 08 mov 0x8(%ebp),%eax
Thread_Control * (*first_p)(Thread_queue_Control *);
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
110265: 83 78 34 01 cmpl $0x1,0x34(%eax)
110269: 74 0d je 110278 <_Thread_queue_First+0x1c>
11026b: ba 64 48 11 00 mov $0x114864,%edx
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
110270: 89 45 08 mov %eax,0x8(%ebp)
}
110273: c9 leave
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
110274: ff e2 jmp *%edx
110276: 66 90 xchg %ax,%ax
Thread_queue_Control *the_thread_queue
)
{
Thread_Control * (*first_p)(Thread_queue_Control *);
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
110278: ba 84 02 11 00 mov $0x110284,%edx
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
11027d: 89 45 08 mov %eax,0x8(%ebp)
}
110280: c9 leave
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
110281: ff e2 jmp *%edx
00114864 <_Thread_queue_First_fifo>:
*/
Thread_Control *_Thread_queue_First_fifo(
Thread_queue_Control *the_thread_queue
)
{
114864: 55 push %ebp
114865: 89 e5 mov %esp,%ebp
114867: 8b 55 08 mov 0x8(%ebp),%edx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
11486a: 8b 02 mov (%edx),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11486c: 83 c2 04 add $0x4,%edx
11486f: 39 d0 cmp %edx,%eax
114871: 74 05 je 114878 <_Thread_queue_First_fifo+0x14>
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
return (Thread_Control *) the_thread_queue->Queues.Fifo.first;
return NULL;
}
114873: c9 leave
114874: c3 ret
114875: 8d 76 00 lea 0x0(%esi),%esi
114878: 31 c0 xor %eax,%eax
11487a: c9 leave
11487b: c3 ret
0010e3d8 <_Thread_queue_Flush>:
#else
Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)),
#endif
uint32_t status
)
{
10e3d8: 55 push %ebp
10e3d9: 89 e5 mov %esp,%ebp
10e3db: 56 push %esi
10e3dc: 53 push %ebx
10e3dd: 8b 5d 08 mov 0x8(%ebp),%ebx
10e3e0: 8b 75 10 mov 0x10(%ebp),%esi
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
10e3e3: eb 06 jmp 10e3eb <_Thread_queue_Flush+0x13>
10e3e5: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
( *remote_extract_callout )( the_thread );
else
#endif
the_thread->Wait.return_code = status;
10e3e8: 89 70 34 mov %esi,0x34(%eax)
uint32_t status
)
{
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
10e3eb: 83 ec 0c sub $0xc,%esp
10e3ee: 53 push %ebx
10e3ef: e8 94 fc ff ff call 10e088 <_Thread_queue_Dequeue>
10e3f4: 83 c4 10 add $0x10,%esp
10e3f7: 85 c0 test %eax,%eax
10e3f9: 75 ed jne 10e3e8 <_Thread_queue_Flush+0x10>
( *remote_extract_callout )( the_thread );
else
#endif
the_thread->Wait.return_code = status;
}
}
10e3fb: 8d 65 f8 lea -0x8(%ebp),%esp
10e3fe: 5b pop %ebx
10e3ff: 5e pop %esi
10e400: c9 leave
10e401: c3 ret
00112830 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
112830: 55 push %ebp
112831: 89 e5 mov %esp,%ebp
112833: 83 ec 08 sub $0x8,%esp
112836: 8b 45 08 mov 0x8(%ebp),%eax
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
112839: 8b 50 44 mov 0x44(%eax),%edx
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
11283c: 8b 4a 30 mov 0x30(%edx),%ecx
11283f: 85 c9 test %ecx,%ecx
112841: 74 08 je 11284b <_Thread_queue_Process_timeout+0x1b>
112843: 3b 05 b8 94 12 00 cmp 0x1294b8,%eax
112849: 74 19 je 112864 <_Thread_queue_Process_timeout+0x34>
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
11284b: 8b 52 3c mov 0x3c(%edx),%edx
11284e: 89 50 34 mov %edx,0x34(%eax)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
112851: 83 ec 08 sub $0x8,%esp
112854: 50 push %eax
112855: ff 70 44 pushl 0x44(%eax)
112858: e8 f3 fe ff ff call 112750 <_Thread_queue_Extract>
11285d: 83 c4 10 add $0x10,%esp
}
}
112860: c9 leave
112861: c3 ret
112862: 66 90 xchg %ax,%ax
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
112864: 83 f9 03 cmp $0x3,%ecx
112867: 74 f7 je 112860 <_Thread_queue_Process_timeout+0x30>
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
112869: 8b 4a 3c mov 0x3c(%edx),%ecx
11286c: 89 48 34 mov %ecx,0x34(%eax)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
11286f: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx)
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
}
}
112876: c9 leave
112877: c3 ret
0010e454 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10e454: 55 push %ebp
10e455: 89 e5 mov %esp,%ebp
10e457: 57 push %edi
10e458: 56 push %esi
10e459: 53 push %ebx
10e45a: 83 ec 1c sub $0x1c,%esp
10e45d: 8b 75 08 mov 0x8(%ebp),%esi
10e460: 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 )
10e463: 85 f6 test %esi,%esi
10e465: 74 06 je 10e46d <_Thread_queue_Requeue+0x19><== NEVER TAKEN
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
10e467: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10e46b: 74 0b je 10e478 <_Thread_queue_Requeue+0x24><== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
10e46d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10e470: 5b pop %ebx <== NOT EXECUTED
10e471: 5e pop %esi <== NOT EXECUTED
10e472: 5f pop %edi <== NOT EXECUTED
10e473: c9 leave <== NOT EXECUTED
10e474: c3 ret <== NOT EXECUTED
10e475: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
10e478: 9c pushf
10e479: fa cli
10e47a: 5b pop %ebx
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10e47b: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi)
10e482: 75 0c jne 10e490 <_Thread_queue_Requeue+0x3c><== ALWAYS TAKEN
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
10e484: 53 push %ebx
10e485: 9d popf
}
}
10e486: 8d 65 f4 lea -0xc(%ebp),%esp
10e489: 5b pop %ebx
10e48a: 5e pop %esi
10e48b: 5f pop %edi
10e48c: c9 leave
10e48d: c3 ret
10e48e: 66 90 xchg %ax,%ax
10e490: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi)
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
10e497: 50 push %eax
10e498: 6a 01 push $0x1
10e49a: 57 push %edi
10e49b: 56 push %esi
10e49c: e8 df 42 00 00 call 112780 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10e4a1: 83 c4 0c add $0xc,%esp
10e4a4: 8d 45 e4 lea -0x1c(%ebp),%eax
10e4a7: 50 push %eax
10e4a8: 57 push %edi
10e4a9: 56 push %esi
10e4aa: e8 8d fd ff ff call 10e23c <_Thread_queue_Enqueue_priority>
10e4af: 83 c4 10 add $0x10,%esp
10e4b2: eb d0 jmp 10e484 <_Thread_queue_Requeue+0x30>
0010e4b4 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10e4b4: 55 push %ebp
10e4b5: 89 e5 mov %esp,%ebp
10e4b7: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10e4ba: 8d 45 f4 lea -0xc(%ebp),%eax
10e4bd: 50 push %eax
10e4be: ff 75 08 pushl 0x8(%ebp)
10e4c1: e8 ca f7 ff ff call 10dc90 <_Thread_Get>
switch ( location ) {
10e4c6: 83 c4 10 add $0x10,%esp
10e4c9: 8b 55 f4 mov -0xc(%ebp),%edx
10e4cc: 85 d2 test %edx,%edx
10e4ce: 75 17 jne 10e4e7 <_Thread_queue_Timeout+0x33><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10e4d0: 83 ec 0c sub $0xc,%esp
10e4d3: 50 push %eax
10e4d4: e8 57 43 00 00 call 112830 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10e4d9: a1 f8 93 12 00 mov 0x1293f8,%eax
10e4de: 48 dec %eax
10e4df: a3 f8 93 12 00 mov %eax,0x1293f8
10e4e4: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10e4e7: c9 leave
10e4e8: c3 ret
00100238 <_Timer_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/timer.h>
void _Timer_Manager_initialization(void)
{
100238: 55 push %ebp
100239: 89 e5 mov %esp,%ebp
}
10023b: c9 leave
10023c: c3 ret
00119828 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
119828: 55 push %ebp
119829: 89 e5 mov %esp,%ebp
11982b: 57 push %edi
11982c: 56 push %esi
11982d: 53 push %ebx
11982e: 83 ec 4c sub $0x4c,%esp
119831: 8b 5d 08 mov 0x8(%ebp),%ebx
119834: 8d 45 e0 lea -0x20(%ebp),%eax
119837: 89 45 b4 mov %eax,-0x4c(%ebp)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
11983a: 89 45 dc mov %eax,-0x24(%ebp)
the_chain->permanent_null = NULL;
11983d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
the_chain->last = _Chain_Head(the_chain);
119844: 8d 4d dc lea -0x24(%ebp),%ecx
119847: 89 4d e4 mov %ecx,-0x1c(%ebp)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11984a: 8d 7d d0 lea -0x30(%ebp),%edi
11984d: 8d 45 d4 lea -0x2c(%ebp),%eax
119850: 89 45 b0 mov %eax,-0x50(%ebp)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
119853: 89 45 d0 mov %eax,-0x30(%ebp)
the_chain->permanent_null = NULL;
119856: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
the_chain->last = _Chain_Head(the_chain);
11985d: 89 7d d8 mov %edi,-0x28(%ebp)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
119860: 8d 73 30 lea 0x30(%ebx),%esi
/*
* 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 );
119863: 8d 4b 68 lea 0x68(%ebx),%ecx
119866: 89 4d c4 mov %ecx,-0x3c(%ebp)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
119869: 8d 43 08 lea 0x8(%ebx),%eax
11986c: 89 45 bc mov %eax,-0x44(%ebp)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
11986f: 8d 53 40 lea 0x40(%ebx),%edx
119872: 89 55 c0 mov %edx,-0x40(%ebp)
119875: 8d 76 00 lea 0x0(%esi),%esi
{
/*
* 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;
119878: 8d 4d dc lea -0x24(%ebp),%ecx
11987b: 89 4b 78 mov %ecx,0x78(%ebx)
11987e: 66 90 xchg %ax,%ax
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
119880: a1 c4 44 14 00 mov 0x1444c4,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
119885: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
119888: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
11988b: 51 push %ecx
11988c: 57 push %edi
11988d: 29 d0 sub %edx,%eax
11988f: 50 push %eax
119890: 56 push %esi
119891: e8 82 3c 00 00 call 11d518 <_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();
119896: a1 ec 43 14 00 mov 0x1443ec,%eax
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
11989b: 8b 53 74 mov 0x74(%ebx),%edx
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
11989e: 83 c4 10 add $0x10,%esp
1198a1: 39 d0 cmp %edx,%eax
1198a3: 77 63 ja 119908 <_Timer_server_Body+0xe0>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
1198a5: 72 7d jb 119924 <_Timer_server_Body+0xfc>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
1198a7: 89 43 74 mov %eax,0x74(%ebx)
1198aa: 66 90 xchg %ax,%ax
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
1198ac: 8b 43 78 mov 0x78(%ebx),%eax
1198af: 83 ec 0c sub $0xc,%esp
1198b2: 50 push %eax
1198b3: e8 74 08 00 00 call 11a12c <_Chain_Get>
if ( timer == NULL ) {
1198b8: 83 c4 10 add $0x10,%esp
1198bb: 85 c0 test %eax,%eax
1198bd: 74 35 je 1198f4 <_Timer_server_Body+0xcc>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
1198bf: 8b 50 38 mov 0x38(%eax),%edx
1198c2: 83 fa 01 cmp $0x1,%edx
1198c5: 74 19 je 1198e0 <_Timer_server_Body+0xb8>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
1198c7: 83 fa 03 cmp $0x3,%edx
1198ca: 75 e0 jne 1198ac <_Timer_server_Body+0x84><== NEVER TAKEN
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
1198cc: 83 ec 08 sub $0x8,%esp
1198cf: 83 c0 10 add $0x10,%eax
1198d2: 50 push %eax
1198d3: ff 75 c4 pushl -0x3c(%ebp)
1198d6: e8 d5 3c 00 00 call 11d5b0 <_Watchdog_Insert>
1198db: 83 c4 10 add $0x10,%esp
1198de: eb cc jmp 1198ac <_Timer_server_Body+0x84>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
1198e0: 83 ec 08 sub $0x8,%esp
1198e3: 83 c0 10 add $0x10,%eax
1198e6: 50 push %eax
1198e7: 56 push %esi
1198e8: e8 c3 3c 00 00 call 11d5b0 <_Watchdog_Insert>
1198ed: 83 c4 10 add $0x10,%esp
1198f0: eb ba jmp 1198ac <_Timer_server_Body+0x84>
1198f2: 66 90 xchg %ax,%ax
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
1198f4: 9c pushf
1198f5: fa cli
1198f6: 58 pop %eax
if ( _Chain_Is_empty( insert_chain ) ) {
1198f7: 8b 55 b4 mov -0x4c(%ebp),%edx
1198fa: 3b 55 dc cmp -0x24(%ebp),%edx
1198fd: 74 41 je 119940 <_Timer_server_Body+0x118><== ALWAYS TAKEN
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
1198ff: 50 push %eax <== NOT EXECUTED
119900: 9d popf <== NOT EXECUTED
119901: e9 7a ff ff ff jmp 119880 <_Timer_server_Body+0x58><== NOT EXECUTED
119906: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* 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 );
119908: 51 push %ecx
119909: 57 push %edi
11990a: 89 c1 mov %eax,%ecx
11990c: 29 d1 sub %edx,%ecx
11990e: 51 push %ecx
11990f: ff 75 c4 pushl -0x3c(%ebp)
119912: 89 45 b8 mov %eax,-0x48(%ebp)
119915: e8 fe 3b 00 00 call 11d518 <_Watchdog_Adjust_to_chain>
11991a: 83 c4 10 add $0x10,%esp
11991d: 8b 45 b8 mov -0x48(%ebp),%eax
119920: eb 85 jmp 1198a7 <_Timer_server_Body+0x7f>
119922: 66 90 xchg %ax,%ax
/*
* 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 );
119924: 51 push %ecx
119925: 29 c2 sub %eax,%edx
119927: 52 push %edx
119928: 6a 01 push $0x1
11992a: ff 75 c4 pushl -0x3c(%ebp)
11992d: 89 45 b8 mov %eax,-0x48(%ebp)
119930: e8 6b 3b 00 00 call 11d4a0 <_Watchdog_Adjust>
119935: 83 c4 10 add $0x10,%esp
119938: 8b 45 b8 mov -0x48(%ebp),%eax
11993b: e9 67 ff ff ff jmp 1198a7 <_Timer_server_Body+0x7f>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
119940: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
_ISR_Enable( level );
119947: 50 push %eax
119948: 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 ) ) {
119949: 8b 4d b0 mov -0x50(%ebp),%ecx
11994c: 3b 4d d0 cmp -0x30(%ebp),%ecx
11994f: 75 23 jne 119974 <_Timer_server_Body+0x14c>
119951: eb 33 jmp 119986 <_Timer_server_Body+0x15e>
119953: 90 nop
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
119954: 8b 10 mov (%eax),%edx
the_chain->first = new_first;
119956: 89 55 d0 mov %edx,-0x30(%ebp)
new_first->previous = _Chain_Head(the_chain);
119959: 89 7a 04 mov %edi,0x4(%edx)
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
11995c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
119963: 51 push %ecx
119964: 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 );
119965: 83 ec 08 sub $0x8,%esp
119968: ff 70 24 pushl 0x24(%eax)
11996b: ff 70 20 pushl 0x20(%eax)
11996e: ff 50 1c call *0x1c(%eax)
}
119971: 83 c4 10 add $0x10,%esp
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
119974: 9c pushf
119975: fa cli
119976: 59 pop %ecx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
119977: 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))
11997a: 39 45 b0 cmp %eax,-0x50(%ebp)
11997d: 75 d5 jne 119954 <_Timer_server_Body+0x12c>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
11997f: 51 push %ecx
119980: 9d popf
119981: e9 f2 fe ff ff jmp 119878 <_Timer_server_Body+0x50>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
119986: c6 43 7c 00 movb $0x0,0x7c(%ebx)
11998a: a1 58 43 14 00 mov 0x144358,%eax
11998f: 40 inc %eax
119990: a3 58 43 14 00 mov %eax,0x144358
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
119995: 83 ec 08 sub $0x8,%esp
119998: 6a 08 push $0x8
11999a: ff 33 pushl (%ebx)
11999c: e8 0f 33 00 00 call 11ccb0 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
1199a1: 89 d8 mov %ebx,%eax
1199a3: e8 e0 fd ff ff call 119788 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
1199a8: 89 d8 mov %ebx,%eax
1199aa: e8 29 fe ff ff call 1197d8 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
1199af: e8 c8 28 00 00 call 11c27c <_Thread_Enable_dispatch>
ts->active = true;
1199b4: 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 );
1199b8: 58 pop %eax
1199b9: ff 75 bc pushl -0x44(%ebp)
1199bc: e8 17 3d 00 00 call 11d6d8 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
1199c1: 59 pop %ecx
1199c2: ff 75 c0 pushl -0x40(%ebp)
1199c5: e8 0e 3d 00 00 call 11d6d8 <_Watchdog_Remove>
1199ca: 83 c4 10 add $0x10,%esp
1199cd: e9 a6 fe ff ff jmp 119878 <_Timer_server_Body+0x50>
001199d4 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
1199d4: 55 push %ebp
1199d5: 89 e5 mov %esp,%ebp
1199d7: 57 push %edi
1199d8: 56 push %esi
1199d9: 53 push %ebx
1199da: 83 ec 2c sub $0x2c,%esp
1199dd: 8b 5d 08 mov 0x8(%ebp),%ebx
1199e0: 8b 45 0c mov 0xc(%ebp),%eax
if ( ts->insert_chain == NULL ) {
1199e3: 8b 53 78 mov 0x78(%ebx),%edx
1199e6: 85 d2 test %edx,%edx
1199e8: 74 16 je 119a00 <_Timer_server_Schedule_operation_method+0x2c>
* 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 );
1199ea: 8b 53 78 mov 0x78(%ebx),%edx
1199ed: 89 45 0c mov %eax,0xc(%ebp)
1199f0: 89 55 08 mov %edx,0x8(%ebp)
}
}
1199f3: 8d 65 f4 lea -0xc(%ebp),%esp
1199f6: 5b pop %ebx
1199f7: 5e pop %esi
1199f8: 5f pop %edi
1199f9: c9 leave
* 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 );
1199fa: e9 f1 06 00 00 jmp 11a0f0 <_Chain_Append>
1199ff: 90 nop
119a00: 8b 15 58 43 14 00 mov 0x144358,%edx
119a06: 42 inc %edx
119a07: 89 15 58 43 14 00 mov %edx,0x144358
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
119a0d: 8b 50 38 mov 0x38(%eax),%edx
119a10: 83 fa 01 cmp $0x1,%edx
119a13: 74 77 je 119a8c <_Timer_server_Schedule_operation_method+0xb8>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
119a15: 83 fa 03 cmp $0x3,%edx
119a18: 74 0e je 119a28 <_Timer_server_Schedule_operation_method+0x54>
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
119a1a: 8d 65 f4 lea -0xc(%ebp),%esp
119a1d: 5b pop %ebx
119a1e: 5e pop %esi
119a1f: 5f pop %edi
119a20: c9 leave
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
119a21: e9 56 28 00 00 jmp 11c27c <_Thread_Enable_dispatch>
119a26: 66 90 xchg %ax,%ax
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
119a28: 9c pushf
119a29: fa cli
119a2a: 8f 45 e4 popl -0x1c(%ebp)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
119a2d: 8b 0d ec 43 14 00 mov 0x1443ec,%ecx
last_snapshot = ts->TOD_watchdogs.last_snapshot;
119a33: 8b 73 74 mov 0x74(%ebx),%esi
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
119a36: 8b 53 68 mov 0x68(%ebx),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
119a39: 8d 7b 6c lea 0x6c(%ebx),%edi
119a3c: 39 fa cmp %edi,%edx
119a3e: 74 22 je 119a62 <_Timer_server_Schedule_operation_method+0x8e>
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
119a40: 8b 7a 10 mov 0x10(%edx),%edi
119a43: 89 7d d4 mov %edi,-0x2c(%ebp)
if ( snapshot > last_snapshot ) {
119a46: 39 f1 cmp %esi,%ecx
119a48: 0f 86 9e 00 00 00 jbe 119aec <_Timer_server_Schedule_operation_method+0x118>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
119a4e: 89 cf mov %ecx,%edi
119a50: 29 f7 sub %esi,%edi
119a52: 89 fe mov %edi,%esi
if (delta_interval > delta) {
119a54: 39 7d d4 cmp %edi,-0x2c(%ebp)
119a57: 0f 87 9b 00 00 00 ja 119af8 <_Timer_server_Schedule_operation_method+0x124><== ALWAYS TAKEN
119a5d: 31 ff xor %edi,%edi <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
119a5f: 89 7a 10 mov %edi,0x10(%edx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
119a62: 89 4b 74 mov %ecx,0x74(%ebx)
_ISR_Enable( level );
119a65: ff 75 e4 pushl -0x1c(%ebp)
119a68: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
119a69: 83 ec 08 sub $0x8,%esp
119a6c: 83 c0 10 add $0x10,%eax
119a6f: 50 push %eax
119a70: 8d 43 68 lea 0x68(%ebx),%eax
119a73: 50 push %eax
119a74: e8 37 3b 00 00 call 11d5b0 <_Watchdog_Insert>
if ( !ts->active ) {
119a79: 8a 43 7c mov 0x7c(%ebx),%al
119a7c: 83 c4 10 add $0x10,%esp
119a7f: 84 c0 test %al,%al
119a81: 75 97 jne 119a1a <_Timer_server_Schedule_operation_method+0x46>
_Timer_server_Reset_tod_system_watchdog( ts );
119a83: 89 d8 mov %ebx,%eax
119a85: e8 4e fd ff ff call 1197d8 <_Timer_server_Reset_tod_system_watchdog>
119a8a: eb 8e jmp 119a1a <_Timer_server_Schedule_operation_method+0x46>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
119a8c: 9c pushf
119a8d: fa cli
119a8e: 8f 45 e4 popl -0x1c(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
119a91: 8b 0d c4 44 14 00 mov 0x1444c4,%ecx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
119a97: 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));
119a9a: 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;
119a9d: 8d 7b 34 lea 0x34(%ebx),%edi
119aa0: 39 fa cmp %edi,%edx
119aa2: 74 12 je 119ab6 <_Timer_server_Schedule_operation_method+0xe2>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
119aa4: 89 cf mov %ecx,%edi
119aa6: 29 f7 sub %esi,%edi
119aa8: 89 fe mov %edi,%esi
delta_interval = first_watchdog->delta_interval;
119aaa: 8b 7a 10 mov 0x10(%edx),%edi
if (delta_interval > delta) {
119aad: 39 fe cmp %edi,%esi
119aaf: 72 37 jb 119ae8 <_Timer_server_Schedule_operation_method+0x114>
119ab1: 31 ff xor %edi,%edi
delta_interval -= delta;
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
119ab3: 89 7a 10 mov %edi,0x10(%edx)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
119ab6: 89 4b 3c mov %ecx,0x3c(%ebx)
_ISR_Enable( level );
119ab9: ff 75 e4 pushl -0x1c(%ebp)
119abc: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
119abd: 83 ec 08 sub $0x8,%esp
119ac0: 83 c0 10 add $0x10,%eax
119ac3: 50 push %eax
119ac4: 8d 43 30 lea 0x30(%ebx),%eax
119ac7: 50 push %eax
119ac8: e8 e3 3a 00 00 call 11d5b0 <_Watchdog_Insert>
if ( !ts->active ) {
119acd: 8a 43 7c mov 0x7c(%ebx),%al
119ad0: 83 c4 10 add $0x10,%esp
119ad3: 84 c0 test %al,%al
119ad5: 0f 85 3f ff ff ff jne 119a1a <_Timer_server_Schedule_operation_method+0x46>
_Timer_server_Reset_interval_system_watchdog( ts );
119adb: 89 d8 mov %ebx,%eax
119add: e8 a6 fc ff ff call 119788 <_Timer_server_Reset_interval_system_watchdog>
119ae2: e9 33 ff ff ff jmp 119a1a <_Timer_server_Schedule_operation_method+0x46>
119ae7: 90 nop
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
119ae8: 29 f7 sub %esi,%edi
119aea: eb c7 jmp 119ab3 <_Timer_server_Schedule_operation_method+0xdf>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
119aec: 8b 7d d4 mov -0x2c(%ebp),%edi
119aef: 01 f7 add %esi,%edi
delta_interval += delta;
119af1: 29 cf sub %ecx,%edi
119af3: e9 67 ff ff ff jmp 119a5f <_Timer_server_Schedule_operation_method+0x8b>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
119af8: 8b 7d d4 mov -0x2c(%ebp),%edi
119afb: 29 f7 sub %esi,%edi
119afd: e9 5d ff ff ff jmp 119a5f <_Timer_server_Schedule_operation_method+0x8b>
0012b098 <_Timespec_Is_valid>:
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
const struct timespec *time
)
{
12b098: 55 push %ebp
12b099: 89 e5 mov %esp,%ebp
12b09b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !time )
12b09e: 85 c0 test %eax,%eax
12b0a0: 74 1a je 12b0bc <_Timespec_Is_valid+0x24>
return false;
if ( time->tv_sec < 0 )
12b0a2: 8b 10 mov (%eax),%edx
12b0a4: 85 d2 test %edx,%edx
12b0a6: 78 14 js 12b0bc <_Timespec_Is_valid+0x24>
return false;
if ( time->tv_nsec < 0 )
12b0a8: 8b 40 04 mov 0x4(%eax),%eax
12b0ab: 85 c0 test %eax,%eax
12b0ad: 78 0d js 12b0bc <_Timespec_Is_valid+0x24>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
12b0af: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
12b0b4: 0f 96 c0 setbe %al
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
12b0b7: c9 leave
12b0b8: c3 ret
12b0b9: 8d 76 00 lea 0x0(%esi),%esi
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
12b0bc: 31 c0 xor %eax,%eax
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
12b0be: c9 leave
12b0bf: c3 ret
0010ea88 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10ea88: 55 push %ebp
10ea89: 89 e5 mov %esp,%ebp
10ea8b: 57 push %edi
10ea8c: 56 push %esi
10ea8d: 53 push %ebx
10ea8e: 83 ec 1c sub $0x1c,%esp
10ea91: 8b 75 08 mov 0x8(%ebp),%esi
10ea94: 8b 7d 10 mov 0x10(%ebp),%edi
10ea97: 8a 45 0c mov 0xc(%ebp),%al
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10ea9a: 8b 1d 54 96 12 00 mov 0x129654,%ebx
10eaa0: 81 fb 4c 96 12 00 cmp $0x12964c,%ebx
10eaa6: 74 25 je 10eacd <_User_extensions_Fatal+0x45><== NEVER TAKEN
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10eaa8: 0f b6 c0 movzbl %al,%eax
10eaab: 89 45 e4 mov %eax,-0x1c(%ebp)
10eaae: 66 90 xchg %ax,%ax
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
10eab0: 8b 43 30 mov 0x30(%ebx),%eax
10eab3: 85 c0 test %eax,%eax
10eab5: 74 0b je 10eac2 <_User_extensions_Fatal+0x3a>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10eab7: 52 push %edx
10eab8: 57 push %edi
10eab9: ff 75 e4 pushl -0x1c(%ebp)
10eabc: 56 push %esi
10eabd: ff d0 call *%eax
10eabf: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10eac2: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10eac5: 81 fb 4c 96 12 00 cmp $0x12964c,%ebx
10eacb: 75 e3 jne 10eab0 <_User_extensions_Fatal+0x28>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10eacd: 8d 65 f4 lea -0xc(%ebp),%esp
10ead0: 5b pop %ebx
10ead1: 5e pop %esi
10ead2: 5f pop %edi
10ead3: c9 leave
10ead4: c3 ret
0010e94c <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10e94c: 55 push %ebp
10e94d: 89 e5 mov %esp,%ebp
10e94f: 57 push %edi
10e950: 56 push %esi
10e951: 53 push %ebx
10e952: 83 ec 1c sub $0x1c,%esp
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
10e955: a1 58 52 12 00 mov 0x125258,%eax
10e95a: 89 45 dc mov %eax,-0x24(%ebp)
initial_extensions = Configuration.User_extension_table;
10e95d: 8b 35 5c 52 12 00 mov 0x12525c,%esi
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10e963: c7 05 4c 96 12 00 50 movl $0x129650,0x12964c
10e96a: 96 12 00
the_chain->permanent_null = NULL;
10e96d: c7 05 50 96 12 00 00 movl $0x0,0x129650
10e974: 00 00 00
the_chain->last = _Chain_Head(the_chain);
10e977: c7 05 54 96 12 00 4c movl $0x12964c,0x129654
10e97e: 96 12 00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10e981: c7 05 fc 93 12 00 00 movl $0x129400,0x1293fc
10e988: 94 12 00
the_chain->permanent_null = NULL;
10e98b: c7 05 00 94 12 00 00 movl $0x0,0x129400
10e992: 00 00 00
the_chain->last = _Chain_Head(the_chain);
10e995: c7 05 04 94 12 00 fc movl $0x1293fc,0x129404
10e99c: 93 12 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10e99f: 85 f6 test %esi,%esi
10e9a1: 74 64 je 10ea07 <_User_extensions_Handler_initialization+0xbb>
extension = (User_extensions_Control *)
10e9a3: 89 c2 mov %eax,%edx
10e9a5: 8d 04 40 lea (%eax,%eax,2),%eax
10e9a8: 8d 0c 82 lea (%edx,%eax,4),%ecx
10e9ab: c1 e1 02 shl $0x2,%ecx
10e9ae: 83 ec 0c sub $0xc,%esp
10e9b1: 51 push %ecx
10e9b2: 89 4d d8 mov %ecx,-0x28(%ebp)
10e9b5: e8 26 04 00 00 call 10ede0 <_Workspace_Allocate_or_fatal_error>
10e9ba: 89 c3 mov %eax,%ebx
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10e9bc: 31 c0 xor %eax,%eax
10e9be: 8b 4d d8 mov -0x28(%ebp),%ecx
10e9c1: 89 df mov %ebx,%edi
10e9c3: f3 aa rep stos %al,%es:(%edi)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e9c5: 83 c4 10 add $0x10,%esp
10e9c8: 8b 45 dc mov -0x24(%ebp),%eax
10e9cb: 85 c0 test %eax,%eax
10e9cd: 74 38 je 10ea07 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN
10e9cf: 89 75 e4 mov %esi,-0x1c(%ebp)
10e9d2: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
10e9d9: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10e9dc: 8d 7b 14 lea 0x14(%ebx),%edi
10e9df: 8b 75 e4 mov -0x1c(%ebp),%esi
10e9e2: b9 08 00 00 00 mov $0x8,%ecx
10e9e7: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10e9e9: 83 ec 0c sub $0xc,%esp
10e9ec: 53 push %ebx
10e9ed: e8 ae 40 00 00 call 112aa0 <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10e9f2: 83 c3 34 add $0x34,%ebx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e9f5: ff 45 e0 incl -0x20(%ebp)
10e9f8: 83 45 e4 20 addl $0x20,-0x1c(%ebp)
10e9fc: 83 c4 10 add $0x10,%esp
10e9ff: 8b 45 e0 mov -0x20(%ebp),%eax
10ea02: 39 45 dc cmp %eax,-0x24(%ebp)
10ea05: 77 d5 ja 10e9dc <_User_extensions_Handler_initialization+0x90>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10ea07: 8d 65 f4 lea -0xc(%ebp),%esp
10ea0a: 5b pop %ebx
10ea0b: 5e pop %esi
10ea0c: 5f pop %edi
10ea0d: c9 leave
10ea0e: c3 ret
00113784 <_User_extensions_Remove_set>:
#include <rtems/score/userext.h>
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
113784: 55 push %ebp
113785: 89 e5 mov %esp,%ebp
113787: 53 push %ebx
113788: 83 ec 10 sub $0x10,%esp
11378b: 8b 5d 08 mov 0x8(%ebp),%ebx
_Chain_Extract( &the_extension->Node );
11378e: 53 push %ebx
11378f: e8 00 db ff ff call 111294 <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
113794: 83 c4 10 add $0x10,%esp
113797: 8b 43 24 mov 0x24(%ebx),%eax
11379a: 85 c0 test %eax,%eax
11379c: 74 12 je 1137b0 <_User_extensions_Remove_set+0x2c>
_Chain_Extract( &the_extension->Switch.Node );
11379e: 83 c3 08 add $0x8,%ebx
1137a1: 89 5d 08 mov %ebx,0x8(%ebp)
}
1137a4: 8b 5d fc mov -0x4(%ebp),%ebx
1137a7: c9 leave
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
_Chain_Extract( &the_extension->Switch.Node );
1137a8: e9 e7 da ff ff jmp 111294 <_Chain_Extract>
1137ad: 8d 76 00 lea 0x0(%esi),%esi
}
1137b0: 8b 5d fc mov -0x4(%ebp),%ebx
1137b3: c9 leave
1137b4: c3 ret
0010ea10 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
10ea10: 55 push %ebp
10ea11: 89 e5 mov %esp,%ebp
10ea13: 56 push %esi
10ea14: 53 push %ebx
10ea15: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10ea18: 8b 1d 4c 96 12 00 mov 0x12964c,%ebx
10ea1e: 81 fb 50 96 12 00 cmp $0x129650,%ebx
10ea24: 74 1c je 10ea42 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN
10ea26: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
10ea28: 8b 43 28 mov 0x28(%ebx),%eax
10ea2b: 85 c0 test %eax,%eax
10ea2d: 74 09 je 10ea38 <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
10ea2f: 83 ec 0c sub $0xc,%esp
10ea32: 56 push %esi
10ea33: ff d0 call *%eax
10ea35: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10ea38: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10ea3a: 81 fb 50 96 12 00 cmp $0x129650,%ebx
10ea40: 75 e6 jne 10ea28 <_User_extensions_Thread_begin+0x18>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
10ea42: 8d 65 f8 lea -0x8(%ebp),%esp
10ea45: 5b pop %ebx
10ea46: 5e pop %esi
10ea47: c9 leave
10ea48: c3 ret
0010ead8 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
10ead8: 55 push %ebp
10ead9: 89 e5 mov %esp,%ebp
10eadb: 56 push %esi
10eadc: 53 push %ebx
10eadd: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
10eae0: 8b 1d 4c 96 12 00 mov 0x12964c,%ebx
10eae6: 81 fb 50 96 12 00 cmp $0x129650,%ebx
10eaec: 74 26 je 10eb14 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
10eaee: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
10eaf0: 8b 43 14 mov 0x14(%ebx),%eax
10eaf3: 85 c0 test %eax,%eax
10eaf5: 74 13 je 10eb0a <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
10eaf7: 83 ec 08 sub $0x8,%esp
10eafa: 56 push %esi
10eafb: ff 35 b8 94 12 00 pushl 0x1294b8
10eb01: ff d0 call *%eax
_Thread_Executing,
the_thread
);
if ( !status )
10eb03: 83 c4 10 add $0x10,%esp
10eb06: 84 c0 test %al,%al
10eb08: 74 0c je 10eb16 <_User_extensions_Thread_create+0x3e>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10eb0a: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
10eb0c: 81 fb 50 96 12 00 cmp $0x129650,%ebx
10eb12: 75 dc jne 10eaf0 <_User_extensions_Thread_create+0x18>
10eb14: b0 01 mov $0x1,%al
return false;
}
}
return true;
}
10eb16: 8d 65 f8 lea -0x8(%ebp),%esp
10eb19: 5b pop %ebx
10eb1a: 5e pop %esi
10eb1b: c9 leave
10eb1c: c3 ret
0010eb20 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
10eb20: 55 push %ebp
10eb21: 89 e5 mov %esp,%ebp
10eb23: 56 push %esi
10eb24: 53 push %ebx
10eb25: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10eb28: 8b 1d 54 96 12 00 mov 0x129654,%ebx
10eb2e: 81 fb 4c 96 12 00 cmp $0x12964c,%ebx
10eb34: 74 23 je 10eb59 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN
10eb36: 66 90 xchg %ax,%ax
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
10eb38: 8b 43 20 mov 0x20(%ebx),%eax
10eb3b: 85 c0 test %eax,%eax
10eb3d: 74 0f je 10eb4e <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
10eb3f: 83 ec 08 sub $0x8,%esp
10eb42: 56 push %esi
10eb43: ff 35 b8 94 12 00 pushl 0x1294b8
10eb49: ff d0 call *%eax
10eb4b: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10eb4e: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10eb51: 81 fb 4c 96 12 00 cmp $0x12964c,%ebx
10eb57: 75 df jne 10eb38 <_User_extensions_Thread_delete+0x18>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
10eb59: 8d 65 f8 lea -0x8(%ebp),%esp
10eb5c: 5b pop %ebx
10eb5d: 5e pop %esi
10eb5e: c9 leave
10eb5f: c3 ret
0010ea4c <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
10ea4c: 55 push %ebp
10ea4d: 89 e5 mov %esp,%ebp
10ea4f: 56 push %esi
10ea50: 53 push %ebx
10ea51: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10ea54: 8b 1d 54 96 12 00 mov 0x129654,%ebx
10ea5a: 81 fb 4c 96 12 00 cmp $0x12964c,%ebx
10ea60: 74 1d je 10ea7f <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN
10ea62: 66 90 xchg %ax,%ax
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
10ea64: 8b 43 2c mov 0x2c(%ebx),%eax
10ea67: 85 c0 test %eax,%eax
10ea69: 74 09 je 10ea74 <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
10ea6b: 83 ec 0c sub $0xc,%esp
10ea6e: 56 push %esi
10ea6f: ff d0 call *%eax
10ea71: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10ea74: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10ea77: 81 fb 4c 96 12 00 cmp $0x12964c,%ebx
10ea7d: 75 e5 jne 10ea64 <_User_extensions_Thread_exitted+0x18>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
10ea7f: 8d 65 f8 lea -0x8(%ebp),%esp
10ea82: 5b pop %ebx
10ea83: 5e pop %esi
10ea84: c9 leave
10ea85: c3 ret
0010f714 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
10f714: 55 push %ebp
10f715: 89 e5 mov %esp,%ebp
10f717: 56 push %esi
10f718: 53 push %ebx
10f719: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10f71c: 8b 1d ac a6 12 00 mov 0x12a6ac,%ebx
10f722: 81 fb b0 a6 12 00 cmp $0x12a6b0,%ebx
10f728: 74 22 je 10f74c <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
10f72a: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
10f72c: 8b 43 1c mov 0x1c(%ebx),%eax
10f72f: 85 c0 test %eax,%eax
10f731: 74 0f je 10f742 <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
10f733: 83 ec 08 sub $0x8,%esp
10f736: 56 push %esi
10f737: ff 35 18 a5 12 00 pushl 0x12a518
10f73d: ff d0 call *%eax
10f73f: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10f742: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10f744: 81 fb b0 a6 12 00 cmp $0x12a6b0,%ebx
10f74a: 75 e0 jne 10f72c <_User_extensions_Thread_restart+0x18>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
10f74c: 8d 65 f8 lea -0x8(%ebp),%esp
10f74f: 5b pop %ebx
10f750: 5e pop %esi
10f751: c9 leave
10f752: c3 ret
0010eb60 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
10eb60: 55 push %ebp
10eb61: 89 e5 mov %esp,%ebp
10eb63: 56 push %esi
10eb64: 53 push %ebx
10eb65: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10eb68: 8b 1d 4c 96 12 00 mov 0x12964c,%ebx
10eb6e: 81 fb 50 96 12 00 cmp $0x129650,%ebx
10eb74: 74 22 je 10eb98 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
10eb76: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
10eb78: 8b 43 18 mov 0x18(%ebx),%eax
10eb7b: 85 c0 test %eax,%eax
10eb7d: 74 0f je 10eb8e <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
10eb7f: 83 ec 08 sub $0x8,%esp
10eb82: 56 push %esi
10eb83: ff 35 b8 94 12 00 pushl 0x1294b8
10eb89: ff d0 call *%eax
10eb8b: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10eb8e: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10eb90: 81 fb 50 96 12 00 cmp $0x129650,%ebx
10eb96: 75 e0 jne 10eb78 <_User_extensions_Thread_start+0x18>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
10eb98: 8d 65 f8 lea -0x8(%ebp),%esp
10eb9b: 5b pop %ebx
10eb9c: 5e pop %esi
10eb9d: c9 leave
10eb9e: c3 ret
0010eba0 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
10eba0: 55 push %ebp
10eba1: 89 e5 mov %esp,%ebp
10eba3: 57 push %edi
10eba4: 56 push %esi
10eba5: 53 push %ebx
10eba6: 83 ec 0c sub $0xc,%esp
10eba9: 8b 7d 08 mov 0x8(%ebp),%edi
10ebac: 8b 75 0c mov 0xc(%ebp),%esi
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
10ebaf: 8b 1d fc 93 12 00 mov 0x1293fc,%ebx
10ebb5: 81 fb 00 94 12 00 cmp $0x129400,%ebx
10ebbb: 74 18 je 10ebd5 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN
10ebbd: 8d 76 00 lea 0x0(%esi),%esi
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
10ebc0: 83 ec 08 sub $0x8,%esp
10ebc3: 56 push %esi
10ebc4: 57 push %edi
10ebc5: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
10ebc8: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
10ebca: 83 c4 10 add $0x10,%esp
10ebcd: 81 fb 00 94 12 00 cmp $0x129400,%ebx
10ebd3: 75 eb jne 10ebc0 <_User_extensions_Thread_switch+0x20>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
10ebd5: 8d 65 f4 lea -0xc(%ebp),%esp
10ebd8: 5b pop %ebx
10ebd9: 5e pop %esi
10ebda: 5f pop %edi
10ebdb: c9 leave
10ebdc: c3 ret
001105d8 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
1105d8: 55 push %ebp
1105d9: 89 e5 mov %esp,%ebp
1105db: 57 push %edi
1105dc: 56 push %esi
1105dd: 53 push %ebx
1105de: 83 ec 1c sub $0x1c,%esp
1105e1: 8b 75 08 mov 0x8(%ebp),%esi
1105e4: 8b 4d 0c mov 0xc(%ebp),%ecx
1105e7: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
1105ea: 9c pushf
1105eb: fa cli
1105ec: 58 pop %eax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
1105ed: 8b 16 mov (%esi),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1105ef: 8d 7e 04 lea 0x4(%esi),%edi
1105f2: 89 7d e4 mov %edi,-0x1c(%ebp)
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
1105f5: 39 fa cmp %edi,%edx
1105f7: 74 3d je 110636 <_Watchdog_Adjust+0x5e>
switch ( direction ) {
1105f9: 85 c9 test %ecx,%ecx
1105fb: 75 43 jne 110640 <_Watchdog_Adjust+0x68>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
1105fd: 85 db test %ebx,%ebx
1105ff: 74 35 je 110636 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
110601: 8b 7a 10 mov 0x10(%edx),%edi
110604: 39 fb cmp %edi,%ebx
110606: 73 0f jae 110617 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN
110608: eb 3e jmp 110648 <_Watchdog_Adjust+0x70> <== NOT EXECUTED
11060a: 66 90 xchg %ax,%ax <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
11060c: 29 fb sub %edi,%ebx
11060e: 74 26 je 110636 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
110610: 8b 7a 10 mov 0x10(%edx),%edi
110613: 39 df cmp %ebx,%edi
110615: 77 31 ja 110648 <_Watchdog_Adjust+0x70>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
110617: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
11061e: 50 push %eax
11061f: 9d popf
_Watchdog_Tickle( header );
110620: 83 ec 0c sub $0xc,%esp
110623: 56 push %esi
110624: e8 bb 01 00 00 call 1107e4 <_Watchdog_Tickle>
_ISR_Disable( level );
110629: 9c pushf
11062a: fa cli
11062b: 58 pop %eax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
11062c: 8b 16 mov (%esi),%edx
if ( _Chain_Is_empty( header ) )
11062e: 83 c4 10 add $0x10,%esp
110631: 39 55 e4 cmp %edx,-0x1c(%ebp)
110634: 75 d6 jne 11060c <_Watchdog_Adjust+0x34>
}
break;
}
}
_ISR_Enable( level );
110636: 50 push %eax
110637: 9d popf
}
110638: 8d 65 f4 lea -0xc(%ebp),%esp
11063b: 5b pop %ebx
11063c: 5e pop %esi
11063d: 5f pop %edi
11063e: c9 leave
11063f: c3 ret
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
110640: 49 dec %ecx
110641: 75 f3 jne 110636 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
110643: 01 5a 10 add %ebx,0x10(%edx)
break;
110646: eb ee jmp 110636 <_Watchdog_Adjust+0x5e>
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
110648: 29 df sub %ebx,%edi
11064a: 89 7a 10 mov %edi,0x10(%edx)
break;
11064d: eb e7 jmp 110636 <_Watchdog_Adjust+0x5e>
0011d518 <_Watchdog_Adjust_to_chain>:
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
11d518: 55 push %ebp
11d519: 89 e5 mov %esp,%ebp
11d51b: 57 push %edi
11d51c: 56 push %esi
11d51d: 53 push %ebx
11d51e: 83 ec 0c sub $0xc,%esp
11d521: 8b 75 08 mov 0x8(%ebp),%esi
11d524: 8b 55 0c mov 0xc(%ebp),%edx
11d527: 8b 5d 10 mov 0x10(%ebp),%ebx
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
11d52a: 85 d2 test %edx,%edx
11d52c: 74 63 je 11d591 <_Watchdog_Adjust_to_chain+0x79>
return;
}
_ISR_Disable( level );
11d52e: 9c pushf
11d52f: fa cli
11d530: 8f 45 ec popl -0x14(%ebp)
11d533: 8b 06 mov (%esi),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11d535: 8d 4e 04 lea 0x4(%esi),%ecx
11d538: 89 4d f0 mov %ecx,-0x10(%ebp)
11d53b: 8d 7b 04 lea 0x4(%ebx),%edi
11d53e: 89 55 e8 mov %edx,-0x18(%ebp)
11d541: 8d 76 00 lea 0x0(%esi),%esi
while ( 1 ) {
if ( units <= 0 ) {
break;
}
if ( _Chain_Is_empty( header ) ) {
11d544: 39 45 f0 cmp %eax,-0x10(%ebp)
11d547: 74 44 je 11d58d <_Watchdog_Adjust_to_chain+0x75>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
11d549: 8b 50 10 mov 0x10(%eax),%edx
11d54c: 3b 55 e8 cmp -0x18(%ebp),%edx
11d54f: 77 57 ja 11d5a8 <_Watchdog_Adjust_to_chain+0x90>
/*
* The first set happens in less than units, so take all of them
* off the chain and adjust units to reflect this.
*/
units -= first->delta_interval;
11d551: 29 55 e8 sub %edx,-0x18(%ebp)
first->delta_interval = 0;
11d554: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
11d55b: 90 nop
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
11d55c: 8b 08 mov (%eax),%ecx
previous = the_node->previous;
11d55e: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
11d561: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
11d564: 89 0a mov %ecx,(%edx)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
11d566: 89 38 mov %edi,(%eax)
old_last_node = the_chain->last;
11d568: 8b 53 08 mov 0x8(%ebx),%edx
the_chain->last = the_node;
11d56b: 89 43 08 mov %eax,0x8(%ebx)
old_last_node->next = the_node;
11d56e: 89 02 mov %eax,(%edx)
the_node->previous = old_last_node;
11d570: 89 50 04 mov %edx,0x4(%eax)
while ( 1 ) {
_Chain_Extract_unprotected( &first->Node );
_Chain_Append_unprotected( to_fire, &first->Node );
_ISR_Flash( level );
11d573: ff 75 ec pushl -0x14(%ebp)
11d576: 9d popf
11d577: fa cli
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
11d578: 8b 06 mov (%esi),%eax
if ( _Chain_Is_empty( header ) )
11d57a: 39 45 f0 cmp %eax,-0x10(%ebp)
11d57d: 74 1d je 11d59c <_Watchdog_Adjust_to_chain+0x84>
break;
first = _Watchdog_First( header );
if ( first->delta_interval != 0 )
11d57f: 8b 50 10 mov 0x10(%eax),%edx
11d582: 85 d2 test %edx,%edx
11d584: 74 d6 je 11d55c <_Watchdog_Adjust_to_chain+0x44>
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
11d586: 8b 4d e8 mov -0x18(%ebp),%ecx
11d589: 85 c9 test %ecx,%ecx
11d58b: 75 b7 jne 11d544 <_Watchdog_Adjust_to_chain+0x2c>
if ( first->delta_interval != 0 )
break;
}
}
_ISR_Enable( level );
11d58d: ff 75 ec pushl -0x14(%ebp)
11d590: 9d popf
}
11d591: 83 c4 0c add $0xc,%esp
11d594: 5b pop %ebx
11d595: 5e pop %esi
11d596: 5f pop %edi
11d597: c9 leave
11d598: c3 ret
11d599: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11d59c: 8b 45 f0 mov -0x10(%ebp),%eax
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
11d59f: 8b 4d e8 mov -0x18(%ebp),%ecx
11d5a2: 85 c9 test %ecx,%ecx
11d5a4: 75 9e jne 11d544 <_Watchdog_Adjust_to_chain+0x2c>
11d5a6: eb e5 jmp 11d58d <_Watchdog_Adjust_to_chain+0x75>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
first->delta_interval -= units;
11d5a8: 2b 55 e8 sub -0x18(%ebp),%edx
11d5ab: 89 50 10 mov %edx,0x10(%eax)
break;
11d5ae: eb dd jmp 11d58d <_Watchdog_Adjust_to_chain+0x75>
0010ebe0 <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
10ebe0: 55 push %ebp
10ebe1: 89 e5 mov %esp,%ebp
10ebe3: 57 push %edi
10ebe4: 56 push %esi
10ebe5: 53 push %ebx
10ebe6: 83 ec 04 sub $0x4,%esp
10ebe9: 8b 5d 0c mov 0xc(%ebp),%ebx
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
10ebec: 8b 3d 94 94 12 00 mov 0x129494,%edi
_ISR_Disable( level );
10ebf2: 9c pushf
10ebf3: fa cli
10ebf4: 8f 45 f0 popl -0x10(%ebp)
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
10ebf7: 8b 43 08 mov 0x8(%ebx),%eax
10ebfa: 85 c0 test %eax,%eax
10ebfc: 75 69 jne 10ec67 <_Watchdog_Insert+0x87>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
10ebfe: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx)
_Watchdog_Sync_count++;
10ec05: a1 60 95 12 00 mov 0x129560,%eax
10ec0a: 40 inc %eax
10ec0b: a3 60 95 12 00 mov %eax,0x129560
restart:
delta_interval = the_watchdog->initial;
10ec10: 8b 43 0c mov 0xc(%ebx),%eax
* cache *header!!
*
* Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc)
*
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
10ec13: 8b 4d 08 mov 0x8(%ebp),%ecx
10ec16: 8b 11 mov (%ecx),%edx
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10ec18: 85 c0 test %eax,%eax
10ec1a: 74 5d je 10ec79 <_Watchdog_Insert+0x99>
10ec1c: 8b 32 mov (%edx),%esi
10ec1e: 85 f6 test %esi,%esi
10ec20: 74 57 je 10ec79 <_Watchdog_Insert+0x99>
break;
if ( delta_interval < after->delta_interval ) {
10ec22: 8b 4a 10 mov 0x10(%edx),%ecx
10ec25: 39 c8 cmp %ecx,%eax
10ec27: 73 22 jae 10ec4b <_Watchdog_Insert+0x6b>
10ec29: eb 49 jmp 10ec74 <_Watchdog_Insert+0x94>
10ec2b: 90 nop
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
10ec2c: 8b 35 b4 94 12 00 mov 0x1294b4,%esi
10ec32: 39 f7 cmp %esi,%edi
10ec34: 72 66 jb 10ec9c <_Watchdog_Insert+0xbc>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
10ec36: 29 c8 sub %ecx,%eax
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
10ec38: 8b 12 mov (%edx),%edx
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10ec3a: 85 c0 test %eax,%eax
10ec3c: 74 3b je 10ec79 <_Watchdog_Insert+0x99>
10ec3e: 8b 0a mov (%edx),%ecx
10ec40: 85 c9 test %ecx,%ecx
10ec42: 74 35 je 10ec79 <_Watchdog_Insert+0x99>
break;
if ( delta_interval < after->delta_interval ) {
10ec44: 8b 4a 10 mov 0x10(%edx),%ecx
10ec47: 39 c1 cmp %eax,%ecx
10ec49: 77 29 ja 10ec74 <_Watchdog_Insert+0x94>
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
10ec4b: ff 75 f0 pushl -0x10(%ebp)
10ec4e: 9d popf
10ec4f: fa cli
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
10ec50: 83 7b 08 01 cmpl $0x1,0x8(%ebx)
10ec54: 74 d6 je 10ec2c <_Watchdog_Insert+0x4c>
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
10ec56: 89 3d b4 94 12 00 mov %edi,0x1294b4
_Watchdog_Sync_count--;
10ec5c: a1 60 95 12 00 mov 0x129560,%eax
10ec61: 48 dec %eax
10ec62: a3 60 95 12 00 mov %eax,0x129560
_ISR_Enable( level );
10ec67: ff 75 f0 pushl -0x10(%ebp)
10ec6a: 9d popf
}
10ec6b: 58 pop %eax
10ec6c: 5b pop %ebx
10ec6d: 5e pop %esi
10ec6e: 5f pop %edi
10ec6f: c9 leave
10ec70: c3 ret
10ec71: 8d 76 00 lea 0x0(%esi),%esi
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
10ec74: 29 c1 sub %eax,%ecx
10ec76: 89 4a 10 mov %ecx,0x10(%edx)
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
10ec79: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
10ec80: 89 43 10 mov %eax,0x10(%ebx)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
10ec83: 8b 42 04 mov 0x4(%edx),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10ec86: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10ec89: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10ec8b: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10ec8d: 89 13 mov %edx,(%ebx)
before_node->previous = the_node;
10ec8f: 89 5a 04 mov %ebx,0x4(%edx)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
10ec92: a1 64 95 12 00 mov 0x129564,%eax
10ec97: 89 43 14 mov %eax,0x14(%ebx)
10ec9a: eb ba jmp 10ec56 <_Watchdog_Insert+0x76>
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
10ec9c: 89 3d b4 94 12 00 mov %edi,0x1294b4
goto restart;
10eca2: e9 69 ff ff ff jmp 10ec10 <_Watchdog_Insert+0x30>
0010ed08 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10ed08: 55 push %ebp
10ed09: 89 e5 mov %esp,%ebp
10ed0b: 56 push %esi
10ed0c: 53 push %ebx
10ed0d: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10ed10: 9c pushf
10ed11: fa cli
10ed12: 59 pop %ecx
previous_state = the_watchdog->state;
10ed13: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10ed16: 83 f8 01 cmp $0x1,%eax
10ed19: 74 4d je 10ed68 <_Watchdog_Remove+0x60>
10ed1b: 73 0f jae 10ed2c <_Watchdog_Remove+0x24>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10ed1d: 8b 1d 64 95 12 00 mov 0x129564,%ebx
10ed23: 89 5a 18 mov %ebx,0x18(%edx)
_ISR_Enable( level );
10ed26: 51 push %ecx
10ed27: 9d popf
return( previous_state );
}
10ed28: 5b pop %ebx
10ed29: 5e pop %esi
10ed2a: c9 leave
10ed2b: c3 ret
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
10ed2c: 83 f8 03 cmp $0x3,%eax
10ed2f: 77 ec ja 10ed1d <_Watchdog_Remove+0x15> <== NEVER TAKEN
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10ed31: 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 );
10ed38: 8b 1a mov (%edx),%ebx
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10ed3a: 8b 33 mov (%ebx),%esi
10ed3c: 85 f6 test %esi,%esi
10ed3e: 74 06 je 10ed46 <_Watchdog_Remove+0x3e>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10ed40: 8b 72 10 mov 0x10(%edx),%esi
10ed43: 01 73 10 add %esi,0x10(%ebx)
if ( _Watchdog_Sync_count )
10ed46: 8b 35 60 95 12 00 mov 0x129560,%esi
10ed4c: 85 f6 test %esi,%esi
10ed4e: 74 0c je 10ed5c <_Watchdog_Remove+0x54>
_Watchdog_Sync_level = _ISR_Nest_level;
10ed50: 8b 35 94 94 12 00 mov 0x129494,%esi
10ed56: 89 35 b4 94 12 00 mov %esi,0x1294b4
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10ed5c: 8b 72 04 mov 0x4(%edx),%esi
next->previous = previous;
10ed5f: 89 73 04 mov %esi,0x4(%ebx)
previous->next = next;
10ed62: 89 1e mov %ebx,(%esi)
10ed64: eb b7 jmp 10ed1d <_Watchdog_Remove+0x15>
10ed66: 66 90 xchg %ax,%ax
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
10ed68: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10ed6f: eb ac jmp 10ed1d <_Watchdog_Remove+0x15>
0011016c <_Watchdog_Report>:
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
11016c: 55 push %ebp
11016d: 89 e5 mov %esp,%ebp
11016f: 57 push %edi
110170: 56 push %esi
110171: 53 push %ebx
110172: 83 ec 2c sub $0x2c,%esp
110175: 8b 55 08 mov 0x8(%ebp),%edx
110178: 8b 45 0c mov 0xc(%ebp),%eax
printk(
11017b: 8b 78 24 mov 0x24(%eax),%edi
11017e: 8b 70 20 mov 0x20(%eax),%esi
110181: 8b 58 1c mov 0x1c(%eax),%ebx
110184: 8b 48 0c mov 0xc(%eax),%ecx
110187: 89 4d d4 mov %ecx,-0x2c(%ebp)
11018a: 8b 48 10 mov 0x10(%eax),%ecx
11018d: 89 4d e0 mov %ecx,-0x20(%ebp)
110190: 85 d2 test %edx,%edx
110192: 74 2c je 1101c0 <_Watchdog_Report+0x54>
110194: b9 e3 48 12 00 mov $0x1248e3,%ecx
110199: 83 ec 0c sub $0xc,%esp
11019c: 57 push %edi
11019d: 56 push %esi
11019e: 53 push %ebx
11019f: 50 push %eax
1101a0: ff 75 d4 pushl -0x2c(%ebp)
1101a3: ff 75 e0 pushl -0x20(%ebp)
1101a6: 51 push %ecx
1101a7: 52 push %edx
1101a8: 68 e6 52 12 00 push $0x1252e6
1101ad: e8 0e 9e ff ff call 109fc0 <printk>
1101b2: 83 c4 30 add $0x30,%esp
watch,
watch->routine,
watch->id,
watch->user_data
);
}
1101b5: 8d 65 f4 lea -0xc(%ebp),%esp
1101b8: 5b pop %ebx
1101b9: 5e pop %esi
1101ba: 5f pop %edi
1101bb: c9 leave
1101bc: c3 ret
1101bd: 8d 76 00 lea 0x0(%esi),%esi
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
printk(
1101c0: b9 35 51 12 00 mov $0x125135,%ecx
1101c5: 89 ca mov %ecx,%edx
1101c7: eb d0 jmp 110199 <_Watchdog_Report+0x2d>
001100fc <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
1100fc: 55 push %ebp
1100fd: 89 e5 mov %esp,%ebp
1100ff: 57 push %edi
110100: 56 push %esi
110101: 53 push %ebx
110102: 83 ec 20 sub $0x20,%esp
110105: 8b 7d 08 mov 0x8(%ebp),%edi
110108: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
11010b: 9c pushf
11010c: fa cli
11010d: 8f 45 e4 popl -0x1c(%ebp)
printk( "Watchdog Chain: %s %p\n", name, header );
110110: 56 push %esi
110111: 57 push %edi
110112: 68 b0 52 12 00 push $0x1252b0
110117: e8 a4 9e ff ff call 109fc0 <printk>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
11011c: 8b 1e mov (%esi),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11011e: 83 c6 04 add $0x4,%esi
if ( !_Chain_Is_empty( header ) ) {
110121: 83 c4 10 add $0x10,%esp
110124: 39 f3 cmp %esi,%ebx
110126: 74 31 je 110159 <_Watchdog_Report_chain+0x5d>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
110128: 83 ec 08 sub $0x8,%esp
11012b: 53 push %ebx
11012c: 6a 00 push $0x0
11012e: e8 39 00 00 00 call 11016c <_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 )
110133: 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 ;
110135: 83 c4 10 add $0x10,%esp
110138: 39 f3 cmp %esi,%ebx
11013a: 75 ec jne 110128 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
11013c: 83 ec 08 sub $0x8,%esp
11013f: 57 push %edi
110140: 68 c7 52 12 00 push $0x1252c7
110145: e8 76 9e ff ff call 109fc0 <printk>
11014a: 83 c4 10 add $0x10,%esp
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
11014d: ff 75 e4 pushl -0x1c(%ebp)
110150: 9d popf
}
110151: 8d 65 f4 lea -0xc(%ebp),%esp
110154: 5b pop %ebx
110155: 5e pop %esi
110156: 5f pop %edi
110157: c9 leave
110158: c3 ret
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
110159: 83 ec 0c sub $0xc,%esp
11015c: 68 d6 52 12 00 push $0x1252d6
110161: e8 5a 9e ff ff call 109fc0 <printk>
110166: 83 c4 10 add $0x10,%esp
110169: eb e2 jmp 11014d <_Watchdog_Report_chain+0x51>
0010ee40 <_Workspace_Handler_initialization>:
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
10ee40: 55 push %ebp
10ee41: 89 e5 mov %esp,%ebp
10ee43: 57 push %edi
10ee44: 53 push %ebx
uintptr_t memory_available = 0;
void *starting_address = Configuration.work_space_start;
10ee45: 8b 1d 20 52 12 00 mov 0x125220,%ebx
uintptr_t size = Configuration.work_space_size;
10ee4b: 8b 15 24 52 12 00 mov 0x125224,%edx
if ( Configuration.do_zero_of_workspace )
10ee51: 80 3d 48 52 12 00 00 cmpb $0x0,0x125248
10ee58: 75 1e jne 10ee78 <_Workspace_Handler_initialization+0x38>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
10ee5a: 6a 04 push $0x4
10ee5c: 52 push %edx
10ee5d: 53 push %ebx
10ee5e: 68 20 94 12 00 push $0x129420
10ee63: e8 24 dd ff ff call 10cb8c <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
10ee68: 83 c4 10 add $0x10,%esp
10ee6b: 85 c0 test %eax,%eax
10ee6d: 74 13 je 10ee82 <_Workspace_Handler_initialization+0x42>
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
10ee6f: 8d 65 f8 lea -0x8(%ebp),%esp
10ee72: 5b pop %ebx
10ee73: 5f pop %edi
10ee74: c9 leave
10ee75: c3 ret
10ee76: 66 90 xchg %ax,%ax
uintptr_t memory_available = 0;
void *starting_address = Configuration.work_space_start;
uintptr_t size = Configuration.work_space_size;
if ( Configuration.do_zero_of_workspace )
memset( starting_address, 0, size );
10ee78: 31 c0 xor %eax,%eax
10ee7a: 89 df mov %ebx,%edi
10ee7c: 89 d1 mov %edx,%ecx
10ee7e: f3 aa rep stos %al,%es:(%edi)
10ee80: eb d8 jmp 10ee5a <_Workspace_Handler_initialization+0x1a>
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
10ee82: 52 push %edx
10ee83: 6a 03 push $0x3
10ee85: 6a 01 push $0x1
10ee87: 6a 00 push $0x0
10ee89: e8 22 e0 ff ff call 10ceb0 <_Internal_error_Occurred>
001208b4 <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
1208b4: 55 push %ebp
1208b5: 89 e5 mov %esp,%ebp
1208b7: 83 ec 08 sub $0x8,%esp
1208ba: e8 be 06 00 00 call 120f7d <_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();
1208bf: e8 88 ff ff ff call 12084c <libc_wrapup>
rtems_shutdown_executive(status);
1208c4: 83 ec 0c sub $0xc,%esp
1208c7: ff 75 08 pushl 0x8(%ebp)
1208ca: e8 fd 00 00 00 call 1209cc <rtems_shutdown_executive>
1208cf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1208d2: eb fe jmp 1208d2 <_exit+0x1e> <== NOT EXECUTED
0012bf9c <_fat_block_read>:
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
12bf9c: 55 push %ebp <== NOT EXECUTED
12bf9d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12bf9f: 57 push %edi <== NOT EXECUTED
12bfa0: 56 push %esi <== NOT EXECUTED
12bfa1: 53 push %ebx <== NOT EXECUTED
12bfa2: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
12bfa5: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12bfa8: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
12bfab: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
12bfae: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
12bfb1: 85 c9 test %ecx,%ecx <== NOT EXECUTED
12bfb3: 74 6c je 12c021 <_fat_block_read+0x85> <== NOT EXECUTED
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
12bfb5: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
12bfbc: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
12bfbf: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
12bfc2: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
12bfc5: 31 db xor %ebx,%ebx <== NOT EXECUTED
12bfc7: eb 31 jmp 12bffa <_fat_block_read+0x5e> <== NOT EXECUTED
12bfc9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
12bfcc: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
12bfcf: 0f b7 02 movzwl (%edx),%eax <== NOT EXECUTED
12bfd2: 29 f0 sub %esi,%eax <== NOT EXECUTED
12bfd4: 3b 45 14 cmp 0x14(%ebp),%eax <== NOT EXECUTED
12bfd7: 76 03 jbe 12bfdc <_fat_block_read+0x40> <== NOT EXECUTED
12bfd9: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
memcpy((buff + cmpltd), (block->buffer + ofs), c);
12bfdc: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED
12bfdf: 01 da add %ebx,%edx <== NOT EXECUTED
12bfe1: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
12bfe4: 03 71 20 add 0x20(%ecx),%esi <== NOT EXECUTED
12bfe7: 89 d7 mov %edx,%edi <== NOT EXECUTED
12bfe9: 89 c1 mov %eax,%ecx <== NOT EXECUTED
12bfeb: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
count -= c;
cmpltd += c;
12bfed: 8d 1c 18 lea (%eax,%ebx,1),%ebx <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
12bff0: 29 45 14 sub %eax,0x14(%ebp) <== NOT EXECUTED
12bff3: 74 22 je 12c017 <_fat_block_read+0x7b> <== NOT EXECUTED
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
count -= c;
cmpltd += c;
blk++;
12bff5: ff 45 d4 incl -0x2c(%ebp) <== NOT EXECUTED
12bff8: 31 f6 xor %esi,%esi <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
12bffa: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
12bffd: 52 push %edx <== NOT EXECUTED
12bffe: 6a 01 push $0x1 <== NOT EXECUTED
12c000: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
12c003: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
12c006: e8 09 fa ff ff call 12ba14 <fat_buf_access> <== NOT EXECUTED
if (rc != RC_OK)
12c00b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c00e: 85 c0 test %eax,%eax <== NOT EXECUTED
12c010: 74 ba je 12bfcc <_fat_block_read+0x30> <== NOT EXECUTED
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
count -= c;
cmpltd += c;
blk++;
12c012: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
ofs = 0;
}
return cmpltd;
}
12c017: 89 d8 mov %ebx,%eax <== NOT EXECUTED
12c019: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12c01c: 5b pop %ebx <== NOT EXECUTED
12c01d: 5e pop %esi <== NOT EXECUTED
12c01e: 5f pop %edi <== NOT EXECUTED
12c01f: c9 leave <== NOT EXECUTED
12c020: c3 ret <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
12c021: 31 db xor %ebx,%ebx <== NOT EXECUTED
12c023: eb f2 jmp 12c017 <_fat_block_read+0x7b> <== NOT EXECUTED
0012b9fc <_fat_block_release>:
* 0 on success, or -1 if error occured and errno set appropriately
*/
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
12b9fc: 55 push %ebp <== NOT EXECUTED
12b9fd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12b9ff: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
12ba02: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12ba05: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
12ba08: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
12ba0b: c9 leave <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
12ba0c: e9 93 fe ff ff jmp 12b8a4 <fat_buf_release> <== NOT EXECUTED
0012bc50 <_fat_block_write>:
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
12bc50: 55 push %ebp <== NOT EXECUTED
12bc51: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12bc53: 57 push %edi <== NOT EXECUTED
12bc54: 56 push %esi <== NOT EXECUTED
12bc55: 53 push %ebx <== NOT EXECUTED
12bc56: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
12bc59: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12bc5c: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
12bc5f: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
12bc62: 85 c0 test %eax,%eax <== NOT EXECUTED
12bc64: 0f 84 8c 00 00 00 je 12bcf6 <_fat_block_write+0xa6> <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
12bc6a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
12bc71: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
12bc74: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
12bc77: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
12bc7a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
12bc81: eb 45 jmp 12bcc8 <_fat_block_write+0x78> <== NOT EXECUTED
12bc83: 90 nop <== NOT EXECUTED
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
12bc84: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12bc87: 50 push %eax <== NOT EXECUTED
12bc88: 6a 01 push $0x1 <== NOT EXECUTED
12bc8a: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
12bc8d: 53 push %ebx <== NOT EXECUTED
12bc8e: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
12bc91: e8 7e fd ff ff call 12ba14 <fat_buf_access> <== NOT EXECUTED
12bc96: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12bc99: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
if (rc != RC_OK)
12bc9c: 85 c0 test %eax,%eax <== NOT EXECUTED
12bc9e: 75 44 jne 12bce4 <_fat_block_write+0x94> <== NOT EXECUTED
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
12bca0: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
12bca3: 03 70 20 add 0x20(%eax),%esi <== NOT EXECUTED
12bca6: 89 f0 mov %esi,%eax <== NOT EXECUTED
12bca8: 8b 75 18 mov 0x18(%ebp),%esi <== NOT EXECUTED
12bcab: 03 75 d4 add -0x2c(%ebp),%esi <== NOT EXECUTED
12bcae: 89 c7 mov %eax,%edi <== NOT EXECUTED
12bcb0: 89 d1 mov %edx,%ecx <== NOT EXECUTED
12bcb2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
12bcb4: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
12bcbb: 01 55 d4 add %edx,-0x2c(%ebp) <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
12bcbe: 29 55 14 sub %edx,0x14(%ebp) <== NOT EXECUTED
12bcc1: 74 28 je 12bceb <_fat_block_write+0x9b> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
blk++;
12bcc3: ff 45 d0 incl -0x30(%ebp) <== NOT EXECUTED
12bcc6: 31 f6 xor %esi,%esi <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
{
c = MIN(count, (fs_info->vol.bps - ofs));
12bcc8: 0f b7 03 movzwl (%ebx),%eax <== NOT EXECUTED
12bccb: 89 c2 mov %eax,%edx <== NOT EXECUTED
12bccd: 29 f2 sub %esi,%edx <== NOT EXECUTED
12bccf: 3b 55 14 cmp 0x14(%ebp),%edx <== NOT EXECUTED
12bcd2: 76 03 jbe 12bcd7 <_fat_block_write+0x87> <== NOT EXECUTED
12bcd4: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
if (c == fs_info->vol.bps)
12bcd7: 39 d0 cmp %edx,%eax <== NOT EXECUTED
12bcd9: 75 a9 jne 12bc84 <_fat_block_write+0x34> <== NOT EXECUTED
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
12bcdb: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12bcde: 50 push %eax <== NOT EXECUTED
12bcdf: 6a 02 push $0x2 <== NOT EXECUTED
12bce1: eb a7 jmp 12bc8a <_fat_block_write+0x3a> <== NOT EXECUTED
12bce3: 90 nop <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
blk++;
12bce4: c7 45 d4 ff ff ff ff movl $0xffffffff,-0x2c(%ebp) <== NOT EXECUTED
ofs = 0;
}
return cmpltd;
}
12bceb: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
12bcee: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12bcf1: 5b pop %ebx <== NOT EXECUTED
12bcf2: 5e pop %esi <== NOT EXECUTED
12bcf3: 5f pop %edi <== NOT EXECUTED
12bcf4: c9 leave <== NOT EXECUTED
12bcf5: c3 ret <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
12bcf6: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
12bcfd: eb ec jmp 12bceb <_fat_block_write+0x9b> <== NOT EXECUTED
00144154 <_fcntl_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
int cmd,
int arg
)
{
144154: 55 push %ebp <== NOT EXECUTED
144155: 89 e5 mov %esp,%ebp <== NOT EXECUTED
144157: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
14415a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
14415d: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
return fcntl( fd, cmd, arg );
144160: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
144163: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED
144166: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
144169: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
14416c: c9 leave <== NOT EXECUTED
int fd,
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
14416d: e9 4a fe ff ff jmp 143fbc <fcntl> <== NOT EXECUTED
00110e40 <_getpid_r>:
#include <reent.h>
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
{
110e40: 55 push %ebp <== NOT EXECUTED
110e41: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return getpid();
}
110e43: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
110e48: c9 leave <== NOT EXECUTED
110e49: c3 ret <== NOT EXECUTED
001086c4 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
1086c4: 55 push %ebp <== NOT EXECUTED
1086c5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1086c7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
return gettimeofday( tp, tzp );
}
1086ca: c9 leave <== NOT EXECUTED
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
1086cb: e9 90 ff ff ff jmp 108660 <gettimeofday> <== NOT EXECUTED
0012f308 <_link_r>:
int _link_r(
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
12f308: 55 push %ebp <== NOT EXECUTED
12f309: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12f30b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12f30e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
return link( existing, new );
12f311: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
12f314: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
12f317: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
12f31a: c9 leave <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
return link( existing, new );
12f31b: e9 30 fe ff ff jmp 12f150 <link> <== NOT EXECUTED
0012f524 <_lstat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
12f524: 55 push %ebp <== NOT EXECUTED
12f525: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12f527: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12f52a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
return _STAT_NAME( path, buf );
12f52d: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
12f530: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
12f533: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
12f536: c9 leave <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
12f537: e9 18 ff ff ff jmp 12f454 <lstat> <== NOT EXECUTED
00120994 <_realloc_r>:
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
120994: 55 push %ebp <== NOT EXECUTED
120995: 89 e5 mov %esp,%ebp <== NOT EXECUTED
120997: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12099a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
return realloc( ptr, size );
12099d: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
1209a0: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
1209a3: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
1209a6: c9 leave <== NOT EXECUTED
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
1209a7: e9 48 00 00 00 jmp 1209f4 <realloc> <== NOT EXECUTED
0015db7c <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
15db7c: 55 push %ebp
15db7d: 89 e5 mov %esp,%ebp
15db7f: 57 push %edi
15db80: 56 push %esi
15db81: 53 push %ebx
15db82: 83 ec 78 sub $0x78,%esp
15db85: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
15db88: 53 push %ebx
15db89: e8 4e 0b fb ff call 10e6dc <rtems_filesystem_dirname>
if ( old_parent_pathlen == 0 )
15db8e: 83 c4 10 add $0x10,%esp
15db91: 85 c0 test %eax,%eax
15db93: 0f 85 b7 01 00 00 jne 15dd50 <_rename_r+0x1d4> <== NEVER TAKEN
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
15db99: 56 push %esi
15db9a: 8d 45 b8 lea -0x48(%ebp),%eax
15db9d: 89 45 94 mov %eax,-0x6c(%ebp)
15dba0: 50 push %eax
15dba1: 8d 45 e4 lea -0x1c(%ebp),%eax
15dba4: 50 push %eax
15dba5: 53 push %ebx
15dba6: e8 bd 23 fb ff call 10ff68 <rtems_filesystem_get_start_loc>
15dbab: 31 d2 xor %edx,%edx
15dbad: c6 45 93 00 movb $0x0,-0x6d(%ebp)
15dbb1: 83 c4 10 add $0x10,%esp
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
15dbb4: 8d 7d cc lea -0x34(%ebp),%edi
15dbb7: b9 05 00 00 00 mov $0x5,%ecx
15dbbc: 8b 75 94 mov -0x6c(%ebp),%esi
15dbbf: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = old + old_parent_pathlen;
15dbc1: 01 d3 add %edx,%ebx
15dbc3: 89 5d e0 mov %ebx,-0x20(%ebp)
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
15dbc6: be ff ff ff ff mov $0xffffffff,%esi
15dbcb: 89 f1 mov %esi,%ecx
15dbcd: 89 df mov %ebx,%edi
15dbcf: 31 c0 xor %eax,%eax
15dbd1: f2 ae repnz scas %es:(%edi),%al
15dbd3: f7 d1 not %ecx
15dbd5: 49 dec %ecx
15dbd6: 83 ec 08 sub $0x8,%esp
15dbd9: 51 push %ecx
15dbda: 53 push %ebx
15dbdb: e8 ac 0a fb ff call 10e68c <rtems_filesystem_prefix_separators>
15dbe0: 01 c3 add %eax,%ebx
15dbe2: 89 5d e0 mov %ebx,-0x20(%ebp)
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
15dbe5: 89 f1 mov %esi,%ecx
15dbe7: 89 df mov %ebx,%edi
15dbe9: 31 c0 xor %eax,%eax
15dbeb: f2 ae repnz scas %es:(%edi),%al
15dbed: 89 ce mov %ecx,%esi
15dbef: f7 d6 not %esi
15dbf1: 4e dec %esi
15dbf2: c7 04 24 00 00 00 00 movl $0x0,(%esp)
15dbf9: 8d 7d cc lea -0x34(%ebp),%edi
15dbfc: 57 push %edi
15dbfd: 6a 00 push $0x0
15dbff: 56 push %esi
15dc00: 53 push %ebx
15dc01: e8 1e 0b fb ff call 10e724 <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
15dc06: 83 c4 20 add $0x20,%esp
15dc09: 85 c0 test %eax,%eax
15dc0b: 0f 85 23 01 00 00 jne 15dd34 <_rename_r+0x1b8>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
15dc11: 51 push %ecx
15dc12: 8d 5d a4 lea -0x5c(%ebp),%ebx
15dc15: 53 push %ebx
15dc16: 8d 45 e4 lea -0x1c(%ebp),%eax
15dc19: 50 push %eax
15dc1a: ff 75 10 pushl 0x10(%ebp)
15dc1d: e8 46 23 fb ff call 10ff68 <rtems_filesystem_get_start_loc>
if ( !new_parent_loc.ops->evalformake_h ) {
15dc22: 8b 45 b0 mov -0x50(%ebp),%eax
15dc25: 8b 40 04 mov 0x4(%eax),%eax
15dc28: 83 c4 10 add $0x10,%esp
15dc2b: 85 c0 test %eax,%eax
15dc2d: 0f 84 b5 01 00 00 je 15dde8 <_rename_r+0x26c>
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 );
15dc33: 52 push %edx
15dc34: 8d 55 e0 lea -0x20(%ebp),%edx
15dc37: 52 push %edx
15dc38: 53 push %ebx
15dc39: 8b 55 10 mov 0x10(%ebp),%edx
15dc3c: 03 55 e4 add -0x1c(%ebp),%edx
15dc3f: 52 push %edx
15dc40: ff d0 call *%eax
if ( result != 0 ) {
15dc42: 83 c4 10 add $0x10,%esp
15dc45: 85 c0 test %eax,%eax
15dc47: 0f 85 2f 01 00 00 jne 15dd7c <_rename_r+0x200>
/*
* 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 ) {
15dc4d: 8b 45 c8 mov -0x38(%ebp),%eax
15dc50: 3b 45 b4 cmp -0x4c(%ebp),%eax
15dc53: 75 77 jne 15dccc <_rename_r+0x150>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !new_parent_loc.ops->rename_h ) {
15dc55: 8b 55 b0 mov -0x50(%ebp),%edx
15dc58: 8b 42 40 mov 0x40(%edx),%eax
15dc5b: 85 c0 test %eax,%eax
15dc5d: 0f 84 75 01 00 00 je 15ddd8 <_rename_r+0x25c>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
15dc63: ff 75 e0 pushl -0x20(%ebp)
15dc66: 53 push %ebx
15dc67: 57 push %edi
15dc68: ff 75 94 pushl -0x6c(%ebp)
15dc6b: ff d0 call *%eax
15dc6d: 89 c6 mov %eax,%esi
rtems_filesystem_freenode( &new_parent_loc );
15dc6f: 8b 45 b0 mov -0x50(%ebp),%eax
15dc72: 83 c4 10 add $0x10,%esp
15dc75: 85 c0 test %eax,%eax
15dc77: 74 10 je 15dc89 <_rename_r+0x10d> <== NEVER TAKEN
15dc79: 8b 40 1c mov 0x1c(%eax),%eax
15dc7c: 85 c0 test %eax,%eax
15dc7e: 74 09 je 15dc89 <_rename_r+0x10d> <== NEVER TAKEN
15dc80: 83 ec 0c sub $0xc,%esp
15dc83: 53 push %ebx
15dc84: ff d0 call *%eax
15dc86: 83 c4 10 add $0x10,%esp
if ( free_old_parentloc )
15dc89: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp)
15dc8d: 74 19 je 15dca8 <_rename_r+0x12c>
rtems_filesystem_freenode( &old_parent_loc );
15dc8f: 8b 45 c4 mov -0x3c(%ebp),%eax
15dc92: 85 c0 test %eax,%eax
15dc94: 74 12 je 15dca8 <_rename_r+0x12c> <== NEVER TAKEN
15dc96: 8b 40 1c mov 0x1c(%eax),%eax
15dc99: 85 c0 test %eax,%eax
15dc9b: 74 0b je 15dca8 <_rename_r+0x12c> <== NEVER TAKEN
15dc9d: 83 ec 0c sub $0xc,%esp
15dca0: ff 75 94 pushl -0x6c(%ebp)
15dca3: ff d0 call *%eax
15dca5: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
15dca8: 8b 45 d8 mov -0x28(%ebp),%eax
15dcab: 85 c0 test %eax,%eax
15dcad: 74 10 je 15dcbf <_rename_r+0x143> <== NEVER TAKEN
15dcaf: 8b 40 1c mov 0x1c(%eax),%eax
15dcb2: 85 c0 test %eax,%eax
15dcb4: 74 09 je 15dcbf <_rename_r+0x143> <== NEVER TAKEN
15dcb6: 83 ec 0c sub $0xc,%esp
15dcb9: 57 push %edi
15dcba: ff d0 call *%eax
15dcbc: 83 c4 10 add $0x10,%esp
return result;
}
15dcbf: 89 f0 mov %esi,%eax
15dcc1: 8d 65 f4 lea -0xc(%ebp),%esp
15dcc4: 5b pop %ebx
15dcc5: 5e pop %esi
15dcc6: 5f pop %edi
15dcc7: c9 leave
15dcc8: c3 ret
15dcc9: 8d 76 00 lea 0x0(%esi),%esi
* 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 ) {
rtems_filesystem_freenode( &new_parent_loc );
15dccc: 8b 45 b0 mov -0x50(%ebp),%eax
15dccf: 85 c0 test %eax,%eax
15dcd1: 74 10 je 15dce3 <_rename_r+0x167> <== NEVER TAKEN
15dcd3: 8b 40 1c mov 0x1c(%eax),%eax
15dcd6: 85 c0 test %eax,%eax
15dcd8: 74 09 je 15dce3 <_rename_r+0x167> <== NEVER TAKEN
15dcda: 83 ec 0c sub $0xc,%esp
15dcdd: 53 push %ebx
15dcde: ff d0 call *%eax
15dce0: 83 c4 10 add $0x10,%esp
if ( free_old_parentloc )
15dce3: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp)
15dce7: 74 19 je 15dd02 <_rename_r+0x186>
rtems_filesystem_freenode( &old_parent_loc );
15dce9: 8b 45 c4 mov -0x3c(%ebp),%eax
15dcec: 85 c0 test %eax,%eax
15dcee: 74 12 je 15dd02 <_rename_r+0x186> <== NEVER TAKEN
15dcf0: 8b 40 1c mov 0x1c(%eax),%eax
15dcf3: 85 c0 test %eax,%eax
15dcf5: 74 0b je 15dd02 <_rename_r+0x186> <== NEVER TAKEN
15dcf7: 83 ec 0c sub $0xc,%esp
15dcfa: ff 75 94 pushl -0x6c(%ebp)
15dcfd: ff d0 call *%eax
15dcff: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
15dd02: 8b 45 d8 mov -0x28(%ebp),%eax
15dd05: 85 c0 test %eax,%eax
15dd07: 74 10 je 15dd19 <_rename_r+0x19d> <== NEVER TAKEN
15dd09: 8b 40 1c mov 0x1c(%eax),%eax
15dd0c: 85 c0 test %eax,%eax
15dd0e: 74 09 je 15dd19 <_rename_r+0x19d> <== NEVER TAKEN
15dd10: 83 ec 0c sub $0xc,%esp
15dd13: 57 push %edi
15dd14: ff d0 call *%eax
15dd16: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EXDEV );
15dd19: e8 62 9e fe ff call 147b80 <__errno>
15dd1e: c7 00 12 00 00 00 movl $0x12,(%eax)
15dd24: be ff ff ff ff mov $0xffffffff,%esi
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
15dd29: 89 f0 mov %esi,%eax
15dd2b: 8d 65 f4 lea -0xc(%ebp),%esp
15dd2e: 5b pop %ebx
15dd2f: 5e pop %esi
15dd30: 5f pop %edi
15dd31: c9 leave
15dd32: c3 ret
15dd33: 90 nop
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
15dd34: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp)
15dd38: 0f 85 f5 00 00 00 jne 15de33 <_rename_r+0x2b7> <== ALWAYS TAKEN
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
15dd3e: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
return result;
}
15dd43: 89 f0 mov %esi,%eax <== NOT EXECUTED
15dd45: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
15dd48: 5b pop %ebx <== NOT EXECUTED
15dd49: 5e pop %esi <== NOT EXECUTED
15dd4a: 5f pop %edi <== NOT EXECUTED
15dd4b: c9 leave <== NOT EXECUTED
15dd4c: c3 ret <== NOT EXECUTED
15dd4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
15dd50: 83 ec 0c sub $0xc,%esp
15dd53: 6a 00 push $0x0
15dd55: 8d 4d b8 lea -0x48(%ebp),%ecx
15dd58: 89 4d 94 mov %ecx,-0x6c(%ebp)
15dd5b: 51 push %ecx
15dd5c: 6a 02 push $0x2
15dd5e: 50 push %eax
15dd5f: 53 push %ebx
15dd60: 89 45 8c mov %eax,-0x74(%ebp)
15dd63: e8 90 0a fb ff call 10e7f8 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
15dd68: 83 c4 20 add $0x20,%esp
15dd6b: 85 c0 test %eax,%eax
15dd6d: 8b 55 8c mov -0x74(%ebp),%edx
15dd70: 75 cc jne 15dd3e <_rename_r+0x1c2> <== NEVER TAKEN
15dd72: c6 45 93 01 movb $0x1,-0x6d(%ebp)
15dd76: e9 39 fe ff ff jmp 15dbb4 <_rename_r+0x38>
15dd7b: 90 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
15dd7c: 8b 45 b0 mov -0x50(%ebp),%eax
15dd7f: 85 c0 test %eax,%eax
15dd81: 74 10 je 15dd93 <_rename_r+0x217> <== NEVER TAKEN
15dd83: 8b 40 1c mov 0x1c(%eax),%eax
15dd86: 85 c0 test %eax,%eax
15dd88: 74 09 je 15dd93 <_rename_r+0x217> <== NEVER TAKEN
15dd8a: 83 ec 0c sub $0xc,%esp
15dd8d: 53 push %ebx
15dd8e: ff d0 call *%eax
15dd90: 83 c4 10 add $0x10,%esp
if ( free_old_parentloc )
15dd93: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp)
15dd97: 74 19 je 15ddb2 <_rename_r+0x236> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
15dd99: 8b 45 c4 mov -0x3c(%ebp),%eax
15dd9c: 85 c0 test %eax,%eax
15dd9e: 74 12 je 15ddb2 <_rename_r+0x236> <== NEVER TAKEN
15dda0: 8b 40 1c mov 0x1c(%eax),%eax
15dda3: 85 c0 test %eax,%eax
15dda5: 74 0b je 15ddb2 <_rename_r+0x236> <== NEVER TAKEN
15dda7: 83 ec 0c sub $0xc,%esp
15ddaa: ff 75 94 pushl -0x6c(%ebp)
15ddad: ff d0 call *%eax
15ddaf: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
15ddb2: 8b 45 d8 mov -0x28(%ebp),%eax
15ddb5: 85 c0 test %eax,%eax
15ddb7: 74 85 je 15dd3e <_rename_r+0x1c2> <== NEVER TAKEN
15ddb9: 8b 40 1c mov 0x1c(%eax),%eax
15ddbc: 85 c0 test %eax,%eax
15ddbe: 0f 84 7a ff ff ff je 15dd3e <_rename_r+0x1c2> <== NEVER TAKEN
15ddc4: 83 ec 0c sub $0xc,%esp
15ddc7: 57 push %edi
15ddc8: ff d0 call *%eax
15ddca: 83 ce ff or $0xffffffff,%esi
15ddcd: 83 c4 10 add $0x10,%esp
15ddd0: e9 ea fe ff ff jmp 15dcbf <_rename_r+0x143>
15ddd5: 8d 76 00 lea 0x0(%esi),%esi
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !new_parent_loc.ops->rename_h ) {
rtems_filesystem_freenode( &new_parent_loc );
15ddd8: 8b 42 1c mov 0x1c(%edx),%eax
15dddb: 85 c0 test %eax,%eax
15dddd: 74 09 je 15dde8 <_rename_r+0x26c> <== NEVER TAKEN
15dddf: 83 ec 0c sub $0xc,%esp
15dde2: 53 push %ebx
15dde3: ff d0 call *%eax
15dde5: 83 c4 10 add $0x10,%esp
if ( free_old_parentloc )
15dde8: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp)
15ddec: 74 19 je 15de07 <_rename_r+0x28b> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
15ddee: 8b 45 c4 mov -0x3c(%ebp),%eax
15ddf1: 85 c0 test %eax,%eax
15ddf3: 74 12 je 15de07 <_rename_r+0x28b> <== NEVER TAKEN
15ddf5: 8b 40 1c mov 0x1c(%eax),%eax
15ddf8: 85 c0 test %eax,%eax
15ddfa: 74 0b je 15de07 <_rename_r+0x28b> <== NEVER TAKEN
15ddfc: 83 ec 0c sub $0xc,%esp
15ddff: ff 75 94 pushl -0x6c(%ebp)
15de02: ff d0 call *%eax
15de04: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
15de07: 8b 45 d8 mov -0x28(%ebp),%eax
15de0a: 85 c0 test %eax,%eax
15de0c: 74 10 je 15de1e <_rename_r+0x2a2> <== NEVER TAKEN
15de0e: 8b 40 1c mov 0x1c(%eax),%eax
15de11: 85 c0 test %eax,%eax
15de13: 74 09 je 15de1e <_rename_r+0x2a2> <== NEVER TAKEN
15de15: 83 ec 0c sub $0xc,%esp
15de18: 57 push %edi
15de19: ff d0 call *%eax
15de1b: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( ENOTSUP );
15de1e: e8 5d 9d fe ff call 147b80 <__errno>
15de23: c7 00 86 00 00 00 movl $0x86,(%eax)
15de29: be ff ff ff ff mov $0xffffffff,%esi
15de2e: e9 8c fe ff ff jmp 15dcbf <_rename_r+0x143>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
15de33: 8b 45 c4 mov -0x3c(%ebp),%eax
15de36: 85 c0 test %eax,%eax
15de38: 0f 84 00 ff ff ff je 15dd3e <_rename_r+0x1c2> <== NEVER TAKEN
15de3e: 8b 40 1c mov 0x1c(%eax),%eax
15de41: 85 c0 test %eax,%eax
15de43: 0f 84 f5 fe ff ff je 15dd3e <_rename_r+0x1c2> <== NEVER TAKEN
15de49: 83 ec 0c sub $0xc,%esp
15de4c: ff 75 94 pushl -0x6c(%ebp)
15de4f: ff d0 call *%eax
15de51: 83 ce ff or $0xffffffff,%esi
15de54: 83 c4 10 add $0x10,%esp
15de57: e9 63 fe ff ff jmp 15dcbf <_rename_r+0x143>
0010ff50 <_stat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
10ff50: 55 push %ebp <== NOT EXECUTED
10ff51: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10ff53: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10ff56: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
return _STAT_NAME( path, buf );
10ff59: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
10ff5c: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
10ff5f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
10ff62: c9 leave <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
10ff63: e9 18 ff ff ff jmp 10fe80 <stat> <== NOT EXECUTED
00114360 <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
114360: 55 push %ebp <== NOT EXECUTED
114361: 89 e5 mov %esp,%ebp <== NOT EXECUTED
114363: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
return unlink( path );
114366: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
114369: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
11436c: c9 leave <== NOT EXECUTED
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
11436d: e9 fa fd ff ff jmp 11416c <unlink> <== NOT EXECUTED
0012e190 <access>:
int access(
const char *path,
int amode
)
{
12e190: 55 push %ebp
12e191: 89 e5 mov %esp,%ebp
12e193: 53 push %ebx
12e194: 83 ec 5c sub $0x5c,%esp
12e197: 8b 5d 0c mov 0xc(%ebp),%ebx
struct stat statbuf;
if ( stat(path, &statbuf) )
12e19a: 8d 45 b0 lea -0x50(%ebp),%eax
12e19d: 50 push %eax
12e19e: ff 75 08 pushl 0x8(%ebp)
12e1a1: e8 da 1c fe ff call 10fe80 <stat>
12e1a6: 83 c4 10 add $0x10,%esp
12e1a9: 85 c0 test %eax,%eax
12e1ab: 75 1f jne 12e1cc <access+0x3c>
return -1;
if ( amode & R_OK ) {
12e1ad: f6 c3 04 test $0x4,%bl
12e1b0: 75 12 jne 12e1c4 <access+0x34>
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
12e1b2: f6 c3 02 test $0x2,%bl
12e1b5: 75 29 jne 12e1e0 <access+0x50>
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
12e1b7: 83 e3 01 and $0x1,%ebx
12e1ba: 75 1c jne 12e1d8 <access+0x48>
if ( !( statbuf.st_mode & S_IEXEC ) )
12e1bc: 31 c0 xor %eax,%eax
return -1;
}
return 0;
}
12e1be: 8b 5d fc mov -0x4(%ebp),%ebx
12e1c1: c9 leave
12e1c2: c3 ret
12e1c3: 90 nop
if ( stat(path, &statbuf) )
return -1;
if ( amode & R_OK ) {
if (!( statbuf.st_mode & S_IREAD ))
12e1c4: f6 45 bd 01 testb $0x1,-0x43(%ebp)
12e1c8: 75 e8 jne 12e1b2 <access+0x22>
12e1ca: 66 90 xchg %ax,%ax
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
12e1cc: b8 ff ff ff ff mov $0xffffffff,%eax
return -1;
}
return 0;
}
12e1d1: 8b 5d fc mov -0x4(%ebp),%ebx
12e1d4: c9 leave
12e1d5: c3 ret
12e1d6: 66 90 xchg %ax,%ax
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
12e1d8: f6 45 bc 40 testb $0x40,-0x44(%ebp)
12e1dc: 75 de jne 12e1bc <access+0x2c>
12e1de: eb ec jmp 12e1cc <access+0x3c>
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
if ( !( statbuf.st_mode & S_IWRITE ) )
12e1e0: 80 7d bc 00 cmpb $0x0,-0x44(%ebp)
12e1e4: 78 d1 js 12e1b7 <access+0x27>
12e1e6: eb e4 jmp 12e1cc <access+0x3c>
0010bab8 <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
10bab8: 55 push %ebp
10bab9: 89 e5 mov %esp,%ebp
10babb: 57 push %edi
10babc: 56 push %esi
10babd: 53 push %ebx
10babe: 83 ec 1c sub $0x1c,%esp
10bac1: 8b 5d 08 mov 0x8(%ebp),%ebx
10bac4: 8b 75 0c mov 0xc(%ebp),%esi
long adjustment;
/*
* Simple validations
*/
if ( !delta )
10bac7: 85 db test %ebx,%ebx
10bac9: 0f 84 f1 00 00 00 je 10bbc0 <adjtime+0x108>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
10bacf: 8b 53 04 mov 0x4(%ebx),%edx
10bad2: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx
10bad8: 0f 87 e2 00 00 00 ja 10bbc0 <adjtime+0x108>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
10bade: 85 f6 test %esi,%esi
10bae0: 74 10 je 10baf2 <adjtime+0x3a>
olddelta->tv_sec = 0;
10bae2: c7 06 00 00 00 00 movl $0x0,(%esi)
olddelta->tv_usec = 0;
10bae8: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
10baef: 8b 53 04 mov 0x4(%ebx),%edx
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
10baf2: 8b 03 mov (%ebx),%eax
10baf4: 8d 04 80 lea (%eax,%eax,4),%eax
10baf7: 8d 04 80 lea (%eax,%eax,4),%eax
10bafa: 8d 04 80 lea (%eax,%eax,4),%eax
10bafd: 8d 04 80 lea (%eax,%eax,4),%eax
10bb00: 8d 04 80 lea (%eax,%eax,4),%eax
10bb03: 8d 04 80 lea (%eax,%eax,4),%eax
10bb06: c1 e0 06 shl $0x6,%eax
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
10bb09: 8d 04 02 lea (%edx,%eax,1),%eax
10bb0c: 3b 05 ac 69 12 00 cmp 0x1269ac,%eax
10bb12: 73 0c jae 10bb20 <adjtime+0x68>
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
10bb14: 31 c0 xor %eax,%eax
return 0;
}
10bb16: 8d 65 f4 lea -0xc(%ebp),%esp
10bb19: 5b pop %ebx
10bb1a: 5e pop %esi
10bb1b: 5f pop %edi
10bb1c: c9 leave
10bb1d: c3 ret
10bb1e: 66 90 xchg %ax,%ax
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10bb20: a1 b8 ac 12 00 mov 0x12acb8,%eax
10bb25: 40 inc %eax
10bb26: a3 b8 ac 12 00 mov %eax,0x12acb8
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
10bb2b: 83 ec 0c sub $0xc,%esp
10bb2e: 8d 7d e0 lea -0x20(%ebp),%edi
10bb31: 57 push %edi
10bb32: e8 59 17 00 00 call 10d290 <_TOD_Get>
ts.tv_sec += delta->tv_sec;
10bb37: 8b 03 mov (%ebx),%eax
10bb39: 01 45 e0 add %eax,-0x20(%ebp)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
10bb3c: 8b 43 04 mov 0x4(%ebx),%eax
10bb3f: 8d 04 80 lea (%eax,%eax,4),%eax
10bb42: 8d 04 80 lea (%eax,%eax,4),%eax
10bb45: 8d 04 80 lea (%eax,%eax,4),%eax
10bb48: c1 e0 03 shl $0x3,%eax
10bb4b: 03 45 e4 add -0x1c(%ebp),%eax
10bb4e: 89 45 e4 mov %eax,-0x1c(%ebp)
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10bb51: 83 c4 10 add $0x10,%esp
10bb54: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
10bb59: 76 18 jbe 10bb73 <adjtime+0xbb>
10bb5b: 8b 55 e0 mov -0x20(%ebp),%edx
10bb5e: 66 90 xchg %ax,%ax
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
10bb60: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
int adjtime(
10bb65: 42 inc %edx
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10bb66: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
10bb6b: 77 f3 ja 10bb60 <adjtime+0xa8> <== NEVER TAKEN
10bb6d: 89 45 e4 mov %eax,-0x1c(%ebp)
10bb70: 89 55 e0 mov %edx,-0x20(%ebp)
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) ) {
10bb73: 3d 00 36 65 c4 cmp $0xc4653600,%eax
10bb78: 77 19 ja 10bb93 <adjtime+0xdb> <== NEVER TAKEN
10bb7a: 8b 55 e0 mov -0x20(%ebp),%edx
10bb7d: 8d 76 00 lea 0x0(%esi),%esi
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
10bb80: 05 00 ca 9a 3b add $0x3b9aca00,%eax
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
int adjtime(
10bb85: 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) ) {
10bb86: 3d 00 36 65 c4 cmp $0xc4653600,%eax
10bb8b: 76 f3 jbe 10bb80 <adjtime+0xc8>
10bb8d: 89 45 e4 mov %eax,-0x1c(%ebp)
10bb90: 89 55 e0 mov %edx,-0x20(%ebp)
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
10bb93: 83 ec 0c sub $0xc,%esp
10bb96: 57 push %edi
10bb97: e8 80 17 00 00 call 10d31c <_TOD_Set>
_Thread_Enable_dispatch();
10bb9c: e8 4b 29 00 00 call 10e4ec <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
10bba1: 83 c4 10 add $0x10,%esp
10bba4: 85 f6 test %esi,%esi
10bba6: 0f 84 68 ff ff ff je 10bb14 <adjtime+0x5c> <== NEVER TAKEN
*olddelta = *delta;
10bbac: 8b 03 mov (%ebx),%eax
10bbae: 8b 53 04 mov 0x4(%ebx),%edx
10bbb1: 89 06 mov %eax,(%esi)
10bbb3: 89 56 04 mov %edx,0x4(%esi)
10bbb6: 31 c0 xor %eax,%eax
return 0;
}
10bbb8: 8d 65 f4 lea -0xc(%ebp),%esp
10bbbb: 5b pop %ebx
10bbbc: 5e pop %esi
10bbbd: 5f pop %edi
10bbbe: c9 leave
10bbbf: c3 ret
*/
if ( !delta )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
10bbc0: e8 fb 9f 00 00 call 115bc0 <__errno>
10bbc5: c7 00 16 00 00 00 movl $0x16,(%eax)
10bbcb: b8 ff ff ff ff mov $0xffffffff,%eax
10bbd0: e9 41 ff ff ff jmp 10bb16 <adjtime+0x5e>
001083cc <calloc>:
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
1083cc: 55 push %ebp
1083cd: 89 e5 mov %esp,%ebp
1083cf: 57 push %edi
1083d0: 53 push %ebx
1083d1: 8b 5d 0c mov 0xc(%ebp),%ebx
1083d4: ff 05 b4 92 12 00 incl 0x1292b4
length = nelem * elsize;
1083da: 0f af 5d 08 imul 0x8(%ebp),%ebx
cptr = malloc( length );
1083de: 83 ec 0c sub $0xc,%esp
1083e1: 53 push %ebx
1083e2: e8 d5 04 00 00 call 1088bc <malloc>
1083e7: 89 c2 mov %eax,%edx
if ( cptr )
1083e9: 83 c4 10 add $0x10,%esp
1083ec: 85 c0 test %eax,%eax
1083ee: 74 08 je 1083f8 <calloc+0x2c> <== NEVER TAKEN
memset( cptr, '\0', length );
1083f0: 31 c0 xor %eax,%eax
1083f2: 89 d7 mov %edx,%edi
1083f4: 89 d9 mov %ebx,%ecx
1083f6: f3 aa rep stos %al,%es:(%edi)
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
1083f8: ff 0d a4 92 12 00 decl 0x1292a4
return cptr;
}
1083fe: 89 d0 mov %edx,%eax
108400: 8d 65 f8 lea -0x8(%ebp),%esp
108403: 5b pop %ebx
108404: 5f pop %edi
108405: c9 leave
108406: c3 ret
0012e338 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
12e338: 55 push %ebp
12e339: 89 e5 mov %esp,%ebp
12e33b: 57 push %edi
12e33c: 56 push %esi
12e33d: 83 ec 20 sub $0x20,%esp
12e340: 8b 55 08 mov 0x8(%ebp),%edx
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
12e343: 85 d2 test %edx,%edx
12e345: 0f 84 9d 00 00 00 je 12e3e8 <chdir+0xb0>
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
12e34b: 31 c0 xor %eax,%eax
12e34d: b9 ff ff ff ff mov $0xffffffff,%ecx
12e352: 89 d7 mov %edx,%edi
12e354: f2 ae repnz scas %es:(%edi),%al
12e356: f7 d1 not %ecx
12e358: 49 dec %ecx
12e359: 83 ec 0c sub $0xc,%esp
12e35c: 6a 01 push $0x1
12e35e: 8d 75 e4 lea -0x1c(%ebp),%esi
12e361: 56 push %esi
12e362: 6a 01 push $0x1
12e364: 51 push %ecx
12e365: 52 push %edx
12e366: e8 8d 04 fe ff call 10e7f8 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
12e36b: 83 c4 20 add $0x20,%esp
12e36e: 85 c0 test %eax,%eax
12e370: 75 6a jne 12e3dc <chdir+0xa4>
return -1;
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
12e372: 8b 55 f0 mov -0x10(%ebp),%edx
12e375: 8b 42 10 mov 0x10(%edx),%eax
12e378: 85 c0 test %eax,%eax
12e37a: 74 45 je 12e3c1 <chdir+0x89> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
12e37c: 83 ec 0c sub $0xc,%esp
12e37f: 56 push %esi
12e380: ff d0 call *%eax
12e382: 83 c4 10 add $0x10,%esp
12e385: 48 dec %eax
12e386: 75 78 jne 12e400 <chdir+0xc8>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
}
rtems_filesystem_freenode( &rtems_filesystem_current );
12e388: 8b 3d 20 f3 16 00 mov 0x16f320,%edi
12e38e: 8b 47 10 mov 0x10(%edi),%eax
12e391: 85 c0 test %eax,%eax
12e393: 74 19 je 12e3ae <chdir+0x76> <== NEVER TAKEN
12e395: 8b 40 1c mov 0x1c(%eax),%eax
12e398: 85 c0 test %eax,%eax
12e39a: 74 12 je 12e3ae <chdir+0x76> <== NEVER TAKEN
12e39c: 83 ec 0c sub $0xc,%esp
12e39f: 83 c7 04 add $0x4,%edi
12e3a2: 57 push %edi
12e3a3: ff d0 call *%eax
12e3a5: 8b 3d 20 f3 16 00 mov 0x16f320,%edi
12e3ab: 83 c4 10 add $0x10,%esp
rtems_filesystem_current = loc;
12e3ae: 83 c7 04 add $0x4,%edi
12e3b1: b9 05 00 00 00 mov $0x5,%ecx
12e3b6: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
12e3b8: 31 c0 xor %eax,%eax
return 0;
}
12e3ba: 8d 65 f8 lea -0x8(%ebp),%esp
12e3bd: 5e pop %esi
12e3be: 5f pop %edi
12e3bf: c9 leave
12e3c0: c3 ret
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
12e3c1: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
12e3c4: 85 c0 test %eax,%eax <== NOT EXECUTED
12e3c6: 74 09 je 12e3d1 <chdir+0x99> <== NOT EXECUTED
12e3c8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12e3cb: 56 push %esi <== NOT EXECUTED
12e3cc: ff d0 call *%eax <== NOT EXECUTED
12e3ce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
12e3d1: e8 aa 97 01 00 call 147b80 <__errno> <== NOT EXECUTED
12e3d6: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
12e3dc: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
12e3e1: 8d 65 f8 lea -0x8(%ebp),%esp
12e3e4: 5e pop %esi
12e3e5: 5f pop %edi
12e3e6: c9 leave
12e3e7: c3 ret
{
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
12e3e8: e8 93 97 01 00 call 147b80 <__errno>
12e3ed: c7 00 0e 00 00 00 movl $0xe,(%eax)
12e3f3: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
12e3f8: 8d 65 f8 lea -0x8(%ebp),%esp
12e3fb: 5e pop %esi
12e3fc: 5f pop %edi
12e3fd: c9 leave
12e3fe: c3 ret
12e3ff: 90 nop
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
12e400: 8b 45 f0 mov -0x10(%ebp),%eax
12e403: 85 c0 test %eax,%eax
12e405: 74 10 je 12e417 <chdir+0xdf> <== NEVER TAKEN
12e407: 8b 40 1c mov 0x1c(%eax),%eax
12e40a: 85 c0 test %eax,%eax
12e40c: 74 09 je 12e417 <chdir+0xdf> <== NEVER TAKEN
12e40e: 83 ec 0c sub $0xc,%esp
12e411: 56 push %esi
12e412: ff d0 call *%eax
12e414: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( ENOTDIR );
12e417: e8 64 97 01 00 call 147b80 <__errno>
12e41c: c7 00 14 00 00 00 movl $0x14,(%eax)
12e422: b8 ff ff ff ff mov $0xffffffff,%eax
12e427: eb 91 jmp 12e3ba <chdir+0x82>
0010e348 <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
10e348: 55 push %ebp
10e349: 89 e5 mov %esp,%ebp
10e34b: 57 push %edi
10e34c: 56 push %esi
10e34d: 53 push %ebx
10e34e: 83 ec 38 sub $0x38,%esp
10e351: 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 );
10e354: 31 c0 xor %eax,%eax
10e356: b9 ff ff ff ff mov $0xffffffff,%ecx
10e35b: 89 d7 mov %edx,%edi
10e35d: f2 ae repnz scas %es:(%edi),%al
10e35f: f7 d1 not %ecx
10e361: 49 dec %ecx
10e362: 6a 01 push $0x1
10e364: 8d 5d d4 lea -0x2c(%ebp),%ebx
10e367: 53 push %ebx
10e368: 6a 00 push $0x0
10e36a: 51 push %ecx
10e36b: 52 push %edx
10e36c: e8 87 04 00 00 call 10e7f8 <rtems_filesystem_evaluate_path>
if ( status != 0 )
10e371: 83 c4 20 add $0x20,%esp
10e374: 85 c0 test %eax,%eax
10e376: 75 60 jne 10e3d8 <chmod+0x90>
return -1;
if ( !loc.handlers ){
10e378: 8b 45 dc mov -0x24(%ebp),%eax
10e37b: 85 c0 test %eax,%eax
10e37d: 74 36 je 10e3b5 <chmod+0x6d> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
10e37f: 8b 40 1c mov 0x1c(%eax),%eax
10e382: 85 c0 test %eax,%eax
10e384: 74 62 je 10e3e8 <chmod+0xa0> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
10e386: 83 ec 08 sub $0x8,%esp
10e389: ff 75 0c pushl 0xc(%ebp)
10e38c: 53 push %ebx
10e38d: ff d0 call *%eax
10e38f: 89 c6 mov %eax,%esi
rtems_filesystem_freenode( &loc );
10e391: 8b 45 e0 mov -0x20(%ebp),%eax
10e394: 83 c4 10 add $0x10,%esp
10e397: 85 c0 test %eax,%eax
10e399: 74 10 je 10e3ab <chmod+0x63> <== NEVER TAKEN
10e39b: 8b 40 1c mov 0x1c(%eax),%eax
10e39e: 85 c0 test %eax,%eax
10e3a0: 74 09 je 10e3ab <chmod+0x63> <== NEVER TAKEN
10e3a2: 83 ec 0c sub $0xc,%esp
10e3a5: 53 push %ebx
10e3a6: ff d0 call *%eax
10e3a8: 83 c4 10 add $0x10,%esp
return result;
}
10e3ab: 89 f0 mov %esi,%eax
10e3ad: 8d 65 f4 lea -0xc(%ebp),%esp
10e3b0: 5b pop %ebx
10e3b1: 5e pop %esi
10e3b2: 5f pop %edi
10e3b3: c9 leave
10e3b4: c3 ret
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
if ( status != 0 )
return -1;
if ( !loc.handlers ){
rtems_filesystem_freenode( &loc );
10e3b5: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10e3b8: 85 c0 test %eax,%eax <== NOT EXECUTED
10e3ba: 74 10 je 10e3cc <chmod+0x84> <== NOT EXECUTED
10e3bc: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
10e3bf: 85 c0 test %eax,%eax <== NOT EXECUTED
10e3c1: 74 09 je 10e3cc <chmod+0x84> <== NOT EXECUTED
10e3c3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e3c6: 53 push %ebx <== NOT EXECUTED
10e3c7: ff d0 call *%eax <== NOT EXECUTED
10e3c9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
10e3cc: e8 af 97 03 00 call 147b80 <__errno> <== NOT EXECUTED
10e3d1: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
10e3d7: 90 nop <== NOT EXECUTED
10e3d8: be ff ff ff ff mov $0xffffffff,%esi
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );
return result;
}
10e3dd: 89 f0 mov %esi,%eax
10e3df: 8d 65 f4 lea -0xc(%ebp),%esp
10e3e2: 5b pop %ebx
10e3e3: 5e pop %esi
10e3e4: 5f pop %edi
10e3e5: c9 leave
10e3e6: c3 ret
10e3e7: 90 nop
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
10e3e8: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10e3eb: 85 c0 test %eax,%eax <== NOT EXECUTED
10e3ed: 74 10 je 10e3ff <chmod+0xb7> <== NOT EXECUTED
10e3ef: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
10e3f2: 85 c0 test %eax,%eax <== NOT EXECUTED
10e3f4: 74 09 je 10e3ff <chmod+0xb7> <== NOT EXECUTED
10e3f6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e3f9: 53 push %ebx <== NOT EXECUTED
10e3fa: ff d0 call *%eax <== NOT EXECUTED
10e3fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
10e3ff: e8 7c 97 03 00 call 147b80 <__errno> <== NOT EXECUTED
10e404: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10e40a: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
10e40f: eb 9a jmp 10e3ab <chmod+0x63> <== NOT EXECUTED
0012e42c <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
12e42c: 55 push %ebp
12e42d: 89 e5 mov %esp,%ebp
12e42f: 57 push %edi
12e430: 56 push %esi
12e431: 53 push %ebx
12e432: 83 ec 38 sub $0x38,%esp
12e435: 8b 55 08 mov 0x8(%ebp),%edx
12e438: 8b 75 0c mov 0xc(%ebp),%esi
12e43b: 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 ) )
12e43e: 31 c0 xor %eax,%eax
12e440: b9 ff ff ff ff mov $0xffffffff,%ecx
12e445: 89 d7 mov %edx,%edi
12e447: f2 ae repnz scas %es:(%edi),%al
12e449: f7 d1 not %ecx
12e44b: 49 dec %ecx
12e44c: 6a 01 push $0x1
12e44e: 8d 7d d4 lea -0x2c(%ebp),%edi
12e451: 57 push %edi
12e452: 6a 00 push $0x0
12e454: 51 push %ecx
12e455: 52 push %edx
12e456: e8 9d 03 fe ff call 10e7f8 <rtems_filesystem_evaluate_path>
12e45b: 83 c4 20 add $0x20,%esp
12e45e: 85 c0 test %eax,%eax
12e460: 75 5a jne 12e4bc <chown+0x90> <== NEVER TAKEN
return -1;
if ( !loc.ops->chown_h ) {
12e462: 8b 55 e0 mov -0x20(%ebp),%edx
12e465: 8b 42 18 mov 0x18(%edx),%eax
12e468: 85 c0 test %eax,%eax
12e46a: 74 34 je 12e4a0 <chown+0x74> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown_h)( &loc, owner, group );
12e46c: 52 push %edx
12e46d: 0f b7 db movzwl %bx,%ebx
12e470: 53 push %ebx
12e471: 0f b7 f6 movzwl %si,%esi
12e474: 56 push %esi
12e475: 57 push %edi
12e476: ff d0 call *%eax
12e478: 89 c3 mov %eax,%ebx
rtems_filesystem_freenode( &loc );
12e47a: 8b 45 e0 mov -0x20(%ebp),%eax
12e47d: 83 c4 10 add $0x10,%esp
12e480: 85 c0 test %eax,%eax
12e482: 74 10 je 12e494 <chown+0x68> <== NEVER TAKEN
12e484: 8b 40 1c mov 0x1c(%eax),%eax
12e487: 85 c0 test %eax,%eax
12e489: 74 09 je 12e494 <chown+0x68> <== NEVER TAKEN
12e48b: 83 ec 0c sub $0xc,%esp
12e48e: 57 push %edi
12e48f: ff d0 call *%eax
12e491: 83 c4 10 add $0x10,%esp
return result;
}
12e494: 89 d8 mov %ebx,%eax
12e496: 8d 65 f4 lea -0xc(%ebp),%esp
12e499: 5b pop %ebx
12e49a: 5e pop %esi
12e49b: 5f pop %edi
12e49c: c9 leave
12e49d: c3 ret
12e49e: 66 90 xchg %ax,%ax
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
return -1;
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
12e4a0: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
12e4a3: 85 c0 test %eax,%eax <== NOT EXECUTED
12e4a5: 74 09 je 12e4b0 <chown+0x84> <== NOT EXECUTED
12e4a7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12e4aa: 57 push %edi <== NOT EXECUTED
12e4ab: ff d0 call *%eax <== NOT EXECUTED
12e4ad: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
12e4b0: e8 cb 96 01 00 call 147b80 <__errno> <== NOT EXECUTED
12e4b5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
12e4bb: 90 nop <== NOT EXECUTED
12e4bc: bb ff ff ff ff mov $0xffffffff,%ebx
result = (*loc.ops->chown_h)( &loc, owner, group );
rtems_filesystem_freenode( &loc );
return result;
}
12e4c1: 89 d8 mov %ebx,%eax
12e4c3: 8d 65 f4 lea -0xc(%ebp),%esp
12e4c6: 5b pop %ebx
12e4c7: 5e pop %esi
12e4c8: 5f pop %edi
12e4c9: c9 leave
12e4ca: c3 ret
0012e4cc <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
12e4cc: 55 push %ebp
12e4cd: 89 e5 mov %esp,%ebp
12e4cf: 57 push %edi
12e4d0: 56 push %esi
12e4d1: 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) {
12e4d4: 81 3d 20 f3 16 00 40 cmpl $0x174e40,0x16f320
12e4db: 4e 17 00
12e4de: 74 6c je 12e54c <chroot+0x80> <== ALWAYS TAKEN
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = chdir(pathname);
12e4e0: 83 ec 0c sub $0xc,%esp
12e4e3: ff 75 08 pushl 0x8(%ebp)
12e4e6: e8 4d fe ff ff call 12e338 <chdir>
if (result) {
12e4eb: 83 c4 10 add $0x10,%esp
12e4ee: 85 c0 test %eax,%eax
12e4f0: 75 7e jne 12e570 <chroot+0xa4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
12e4f2: 83 ec 0c sub $0xc,%esp
12e4f5: 6a 00 push $0x0
12e4f7: 8d 75 e4 lea -0x1c(%ebp),%esi
12e4fa: 56 push %esi
12e4fb: 6a 00 push $0x0
12e4fd: 6a 01 push $0x1
12e4ff: 68 18 1c 16 00 push $0x161c18
12e504: e8 ef 02 fe ff call 10e7f8 <rtems_filesystem_evaluate_path>
12e509: 83 c4 20 add $0x20,%esp
12e50c: 85 c0 test %eax,%eax
12e50e: 75 60 jne 12e570 <chroot+0xa4> <== 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);
12e510: 8b 3d 20 f3 16 00 mov 0x16f320,%edi
12e516: 8b 47 24 mov 0x24(%edi),%eax
12e519: 85 c0 test %eax,%eax
12e51b: 74 19 je 12e536 <chroot+0x6a> <== NEVER TAKEN
12e51d: 8b 40 1c mov 0x1c(%eax),%eax
12e520: 85 c0 test %eax,%eax
12e522: 74 12 je 12e536 <chroot+0x6a> <== NEVER TAKEN
12e524: 83 ec 0c sub $0xc,%esp
12e527: 83 c7 18 add $0x18,%edi
12e52a: 57 push %edi
12e52b: ff d0 call *%eax
12e52d: 8b 3d 20 f3 16 00 mov 0x16f320,%edi
12e533: 83 c4 10 add $0x10,%esp
rtems_filesystem_root = loc;
12e536: 83 c7 18 add $0x18,%edi
12e539: b9 05 00 00 00 mov $0x5,%ecx
12e53e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
12e540: 31 c0 xor %eax,%eax
return 0;
}
12e542: 8d 65 f8 lea -0x8(%ebp),%esp
12e545: 5e pop %esi
12e546: 5f pop %edi
12e547: c9 leave
12e548: c3 ret
12e549: 8d 76 00 lea 0x0(%esi),%esi
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) {
rtems_libio_set_private_env(); /* try to set a new private env*/
12e54c: e8 ab 14 00 00 call 12f9fc <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
12e551: 81 3d 20 f3 16 00 40 cmpl $0x174e40,0x16f320
12e558: 4e 17 00
12e55b: 75 83 jne 12e4e0 <chroot+0x14> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
12e55d: e8 1e 96 01 00 call 147b80 <__errno> <== NOT EXECUTED
12e562: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
12e568: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
12e56b: eb d5 jmp 12e542 <chroot+0x76> <== NOT EXECUTED
12e56d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
12e570: e8 0b 96 01 00 call 147b80 <__errno> <== NOT EXECUTED
12e575: 89 c6 mov %eax,%esi <== NOT EXECUTED
12e577: e8 04 96 01 00 call 147b80 <__errno> <== NOT EXECUTED
12e57c: 8b 00 mov (%eax),%eax <== NOT EXECUTED
12e57e: 89 06 mov %eax,(%esi) <== NOT EXECUTED
12e580: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12e585: eb bb jmp 12e542 <chroot+0x76> <== NOT EXECUTED
0010ba58 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
10ba58: 55 push %ebp
10ba59: 89 e5 mov %esp,%ebp
10ba5b: 83 ec 08 sub $0x8,%esp
10ba5e: 8b 45 08 mov 0x8(%ebp),%eax
10ba61: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
10ba64: 85 d2 test %edx,%edx
10ba66: 74 14 je 10ba7c <clock_gettime+0x24>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
10ba68: 83 f8 01 cmp $0x1,%eax
10ba6b: 74 47 je 10bab4 <clock_gettime+0x5c>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
10ba6d: 83 f8 04 cmp $0x4,%eax
10ba70: 74 32 je 10baa4 <clock_gettime+0x4c> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
10ba72: 83 f8 02 cmp $0x2,%eax
10ba75: 74 2d je 10baa4 <clock_gettime+0x4c>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
10ba77: 83 f8 03 cmp $0x3,%eax
10ba7a: 74 14 je 10ba90 <clock_gettime+0x38>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
10ba7c: e8 cb a5 00 00 call 11604c <__errno>
10ba81: c7 00 16 00 00 00 movl $0x16,(%eax)
10ba87: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
10ba8c: c9 leave
10ba8d: c3 ret
10ba8e: 66 90 xchg %ax,%ax
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
10ba90: e8 b7 a5 00 00 call 11604c <__errno>
10ba95: c7 00 58 00 00 00 movl $0x58,(%eax)
10ba9b: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10baa0: c9 leave
10baa1: c3 ret
10baa2: 66 90 xchg %ax,%ax
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
_TOD_Get_uptime_as_timespec( tp );
10baa4: 83 ec 0c sub $0xc,%esp
10baa7: 52 push %edx
10baa8: e8 67 1e 00 00 call 10d914 <_TOD_Get_uptime_as_timespec>
10baad: 31 c0 xor %eax,%eax
return 0;
10baaf: 83 c4 10 add $0x10,%esp
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10bab2: c9 leave
10bab3: c3 ret
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
10bab4: 83 ec 0c sub $0xc,%esp
10bab7: 52 push %edx
10bab8: e8 ff 1d 00 00 call 10d8bc <_TOD_Get>
10babd: 31 c0 xor %eax,%eax
return 0;
10babf: 83 c4 10 add $0x10,%esp
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10bac2: c9 leave
10bac3: c3 ret
001302a0 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
1302a0: 55 push %ebp
1302a1: 89 e5 mov %esp,%ebp
1302a3: 83 ec 08 sub $0x8,%esp
1302a6: 8b 45 08 mov 0x8(%ebp),%eax
1302a9: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
1302ac: 85 d2 test %edx,%edx
1302ae: 74 0f je 1302bf <clock_settime+0x1f> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
1302b0: 83 f8 01 cmp $0x1,%eax
1302b3: 74 1f je 1302d4 <clock_settime+0x34>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
1302b5: 83 f8 02 cmp $0x2,%eax
1302b8: 74 42 je 1302fc <clock_settime+0x5c>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
1302ba: 83 f8 03 cmp $0x3,%eax
1302bd: 74 3d je 1302fc <clock_settime+0x5c>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
1302bf: e8 bc 78 01 00 call 147b80 <__errno>
1302c4: c7 00 16 00 00 00 movl $0x16,(%eax)
1302ca: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
1302cf: c9 leave
1302d0: c3 ret
1302d1: 8d 76 00 lea 0x0(%esi),%esi
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
1302d4: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx)
1302da: 76 e3 jbe 1302bf <clock_settime+0x1f>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
1302dc: a1 58 4f 17 00 mov 0x174f58,%eax
1302e1: 40 inc %eax
1302e2: a3 58 4f 17 00 mov %eax,0x174f58
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
1302e7: 83 ec 0c sub $0xc,%esp
1302ea: 52 push %edx
1302eb: e8 7c 17 00 00 call 131a6c <_TOD_Set>
_Thread_Enable_dispatch();
1302f0: e8 8b 52 fe ff call 115580 <_Thread_Enable_dispatch>
1302f5: 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;
1302f7: 83 c4 10 add $0x10,%esp
}
1302fa: c9 leave
1302fb: c3 ret
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
1302fc: e8 7f 78 01 00 call 147b80 <__errno>
130301: c7 00 58 00 00 00 movl $0x58,(%eax)
130307: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
13030c: c9 leave
13030d: c3 ret
00110cb8 <close>:
#include <rtems/libio_.h>
int close(
int fd
)
{
110cb8: 55 push %ebp
110cb9: 89 e5 mov %esp,%ebp
110cbb: 56 push %esi
110cbc: 53 push %ebx
110cbd: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
110cc0: 3b 1d 4c 51 12 00 cmp 0x12514c,%ebx
110cc6: 73 58 jae 110d20 <close+0x68>
iop = rtems_libio_iop(fd);
110cc8: c1 e3 06 shl $0x6,%ebx
110ccb: 03 1d 80 92 12 00 add 0x129280,%ebx
rtems_libio_check_is_open(iop);
110cd1: f6 43 15 01 testb $0x1,0x15(%ebx)
110cd5: 74 49 je 110d20 <close+0x68>
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
110cd7: 8b 43 3c mov 0x3c(%ebx),%eax
110cda: 8b 40 04 mov 0x4(%eax),%eax
110cdd: 85 c0 test %eax,%eax
110cdf: 74 3b je 110d1c <close+0x64> <== NEVER TAKEN
rc = (*iop->handlers->close_h)( iop );
110ce1: 83 ec 0c sub $0xc,%esp
110ce4: 53 push %ebx
110ce5: ff d0 call *%eax
110ce7: 89 c6 mov %eax,%esi
110ce9: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &iop->pathinfo );
110cec: 8b 43 24 mov 0x24(%ebx),%eax
110cef: 85 c0 test %eax,%eax
110cf1: 74 13 je 110d06 <close+0x4e> <== NEVER TAKEN
110cf3: 8b 40 1c mov 0x1c(%eax),%eax
110cf6: 85 c0 test %eax,%eax
110cf8: 74 0c je 110d06 <close+0x4e>
110cfa: 83 ec 0c sub $0xc,%esp
110cfd: 8d 53 18 lea 0x18(%ebx),%edx
110d00: 52 push %edx
110d01: ff d0 call *%eax
110d03: 83 c4 10 add $0x10,%esp
rtems_libio_free( iop );
110d06: 83 ec 0c sub $0xc,%esp
110d09: 53 push %ebx
110d0a: e8 45 02 00 00 call 110f54 <rtems_libio_free>
return rc;
110d0f: 83 c4 10 add $0x10,%esp
}
110d12: 89 f0 mov %esi,%eax
110d14: 8d 65 f8 lea -0x8(%ebp),%esp
110d17: 5b pop %ebx
110d18: 5e pop %esi
110d19: c9 leave
110d1a: c3 ret
110d1b: 90 nop
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
110d1c: 31 f6 xor %esi,%esi
110d1e: eb cc jmp 110cec <close+0x34> <== NOT EXECUTED
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
110d20: e8 df 43 00 00 call 115104 <__errno>
110d25: c7 00 09 00 00 00 movl $0x9,(%eax)
110d2b: be ff ff ff ff mov $0xffffffff,%esi
110d30: eb e0 jmp 110d12 <close+0x5a>
0010873c <create_disk>:
return disktab [major].minor + minor;
}
static rtems_status_code
create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr)
{
10873c: 55 push %ebp
10873d: 89 e5 mov %esp,%ebp
10873f: 57 push %edi
108740: 56 push %esi
108741: 53 push %ebx
108742: 83 ec 2c sub $0x2c,%esp
108745: 89 c3 mov %eax,%ebx
108747: 89 d6 mov %edx,%esi
108749: 89 4d d8 mov %ecx,-0x28(%ebp)
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
10874c: 89 c2 mov %eax,%edx
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
10874e: 89 75 e4 mov %esi,-0x1c(%ebp)
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
108751: 8b 3d a4 bf 12 00 mov 0x12bfa4,%edi
108757: 39 f8 cmp %edi,%eax
108759: 0f 83 41 01 00 00 jae 1088a0 <create_disk+0x164>
10875f: a1 a0 bf 12 00 mov 0x12bfa0,%eax
108764: 89 45 e0 mov %eax,-0x20(%ebp)
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab = table;
disktab_size = new_size;
}
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
108767: c1 e2 03 shl $0x3,%edx
10876a: 89 55 dc mov %edx,-0x24(%ebp)
10876d: 8b 45 e0 mov -0x20(%ebp),%eax
108770: 01 d0 add %edx,%eax
108772: 8b 10 mov (%eax),%edx
108774: 85 d2 test %edx,%edx
108776: 0f 84 bc 00 00 00 je 108838 <create_disk+0xfc>
10877c: 8b 78 04 mov 0x4(%eax),%edi
10877f: 39 7d e4 cmp %edi,-0x1c(%ebp)
108782: 0f 83 b4 00 00 00 jae 10883c <create_disk+0x100> <== NEVER TAKEN
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab [major].minor = table;
disktab [major].size = new_size;
}
return disktab [major].minor + minor;
108788: 8b 45 e4 mov -0x1c(%ebp),%eax
10878b: 8d 3c 82 lea (%edx,%eax,4),%edi
{
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
if (dd_entry == NULL) {
10878e: 85 ff test %edi,%edi
108790: 0f 84 6a 01 00 00 je 108900 <create_disk+0x1c4> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
if (*dd_entry != NULL) {
108796: 8b 07 mov (%edi),%eax
108798: 85 c0 test %eax,%eax
10879a: 74 10 je 1087ac <create_disk+0x70>
10879c: b8 0c 00 00 00 mov $0xc,%eax
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
}
1087a1: 8d 65 f4 lea -0xc(%ebp),%esp
1087a4: 5b pop %ebx
1087a5: 5e pop %esi
1087a6: 5f pop %edi
1087a7: c9 leave
1087a8: c3 ret
1087a9: 8d 76 00 lea 0x0(%esi),%esi
if (*dd_entry != NULL) {
return RTEMS_RESOURCE_IN_USE;
}
dd = malloc(sizeof(*dd));
1087ac: 83 ec 0c sub $0xc,%esp
1087af: 6a 34 push $0x34
1087b1: e8 ae 0f 00 00 call 109764 <malloc>
1087b6: 89 c2 mov %eax,%edx
if (dd == NULL) {
1087b8: 83 c4 10 add $0x10,%esp
1087bb: 85 c0 test %eax,%eax
1087bd: 0f 84 3d 01 00 00 je 108900 <create_disk+0x1c4> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
1087c3: 8b 4d d8 mov -0x28(%ebp),%ecx
1087c6: 85 c9 test %ecx,%ecx
1087c8: 0f 84 6e 01 00 00 je 10893c <create_disk+0x200>
alloc_name = strdup(name);
1087ce: 83 ec 0c sub $0xc,%esp
1087d1: ff 75 d8 pushl -0x28(%ebp)
1087d4: 89 45 d0 mov %eax,-0x30(%ebp)
1087d7: e8 fc 0f 01 00 call 1197d8 <strdup>
1087dc: 89 45 e4 mov %eax,-0x1c(%ebp)
if (alloc_name == NULL) {
1087df: 83 c4 10 add $0x10,%esp
1087e2: 85 c0 test %eax,%eax
1087e4: 8b 55 d0 mov -0x30(%ebp),%edx
1087e7: 0f 84 5b 01 00 00 je 108948 <create_disk+0x20c> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
1087ed: 56 push %esi
1087ee: 53 push %ebx
1087ef: 68 ff 61 00 00 push $0x61ff
1087f4: 50 push %eax
1087f5: 89 55 d0 mov %edx,-0x30(%ebp)
1087f8: 89 45 cc mov %eax,-0x34(%ebp)
1087fb: e8 40 10 00 00 call 109840 <mknod>
108800: 83 c4 10 add $0x10,%esp
108803: 85 c0 test %eax,%eax
108805: 8b 55 d0 mov -0x30(%ebp),%edx
108808: 8b 4d cc mov -0x34(%ebp),%ecx
10880b: 0f 88 07 01 00 00 js 108918 <create_disk+0x1dc> <== NEVER TAKEN
free(dd);
return RTEMS_UNSATISFIED;
}
}
dd->dev = dev;
108811: 89 1a mov %ebx,(%edx)
108813: 89 72 04 mov %esi,0x4(%edx)
dd->name = alloc_name;
108816: 8b 4d e4 mov -0x1c(%ebp),%ecx
108819: 89 4a 10 mov %ecx,0x10(%edx)
dd->uses = 0;
10881c: c7 42 14 00 00 00 00 movl $0x0,0x14(%edx)
dd->deleted = false;
108823: c6 42 30 00 movb $0x0,0x30(%edx)
*dd_entry = dd;
108827: 89 17 mov %edx,(%edi)
*dd_ptr = dd;
108829: 8b 45 08 mov 0x8(%ebp),%eax
10882c: 89 10 mov %edx,(%eax)
10882e: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
108830: e9 6c ff ff ff jmp 1087a1 <create_disk+0x65>
108835: 8d 76 00 lea 0x0(%esi),%esi
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab = table;
disktab_size = new_size;
}
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
108838: 8b 78 04 mov 0x4(%eax),%edi
10883b: 90 nop
rtems_disk_device **table = disktab [major].minor;
rtems_device_minor_number old_size = disktab [major].size;
rtems_device_minor_number new_size = 0;
if (old_size == 0) {
10883c: 85 ff test %edi,%edi
10883e: 0f 85 c8 00 00 00 jne 10890c <create_disk+0x1d0> <== NEVER TAKEN
108844: c7 45 e0 08 00 00 00 movl $0x8,-0x20(%ebp)
new_size = DISKTAB_INITIAL_SIZE;
} else {
new_size = 2 * old_size;
}
if (minor >= new_size) {
10884b: 8b 45 e0 mov -0x20(%ebp),%eax
10884e: 39 45 e4 cmp %eax,-0x1c(%ebp)
108851: 72 07 jb 10885a <create_disk+0x11e>
new_size = minor + 1;
108853: 8b 4d e4 mov -0x1c(%ebp),%ecx
108856: 41 inc %ecx
108857: 89 4d e0 mov %ecx,-0x20(%ebp)
}
table = realloc(table, new_size * sizeof(*table));
10885a: 83 ec 08 sub $0x8,%esp
10885d: 8b 45 e0 mov -0x20(%ebp),%eax
108860: c1 e0 02 shl $0x2,%eax
108863: 50 push %eax
108864: 52 push %edx
108865: e8 86 1a 00 00 call 10a2f0 <realloc>
10886a: 89 c2 mov %eax,%edx
if (table == NULL) {
10886c: 83 c4 10 add $0x10,%esp
10886f: 85 c0 test %eax,%eax
108871: 0f 84 89 00 00 00 je 108900 <create_disk+0x1c4>
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
108877: 8b 4d e0 mov -0x20(%ebp),%ecx
10887a: 29 f9 sub %edi,%ecx
10887c: c1 e1 02 shl $0x2,%ecx
10887f: 8d 3c b8 lea (%eax,%edi,4),%edi
108882: 89 7d d4 mov %edi,-0x2c(%ebp)
108885: 31 c0 xor %eax,%eax
108887: f3 aa rep stos %al,%es:(%edi)
disktab [major].minor = table;
108889: 8b 45 dc mov -0x24(%ebp),%eax
10888c: 03 05 a0 bf 12 00 add 0x12bfa0,%eax
108892: 89 10 mov %edx,(%eax)
disktab [major].size = new_size;
108894: 8b 4d e0 mov -0x20(%ebp),%ecx
108897: 89 48 04 mov %ecx,0x4(%eax)
10889a: e9 e9 fe ff ff jmp 108788 <create_disk+0x4c>
10889f: 90 nop
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
rtems_disk_device_table *table = disktab;
1088a0: 8b 0d a0 bf 12 00 mov 0x12bfa0,%ecx
rtems_device_major_number old_size = disktab_size;
rtems_device_major_number new_size = 2 * old_size;
1088a6: 8d 04 3f lea (%edi,%edi,1),%eax
1088a9: 89 45 dc mov %eax,-0x24(%ebp)
if (major >= new_size) {
1088ac: 39 c3 cmp %eax,%ebx
1088ae: 72 06 jb 1088b6 <create_disk+0x17a> <== NEVER TAKEN
new_size = major + 1;
1088b0: 8d 43 01 lea 0x1(%ebx),%eax
1088b3: 89 45 dc mov %eax,-0x24(%ebp)
}
table = realloc(table, new_size * sizeof(*table));
1088b6: 83 ec 08 sub $0x8,%esp
1088b9: 8b 45 dc mov -0x24(%ebp),%eax
1088bc: c1 e0 03 shl $0x3,%eax
1088bf: 50 push %eax
1088c0: 51 push %ecx
1088c1: 89 55 d0 mov %edx,-0x30(%ebp)
1088c4: e8 27 1a 00 00 call 10a2f0 <realloc>
1088c9: 89 45 e0 mov %eax,-0x20(%ebp)
if (table == NULL) {
1088cc: 83 c4 10 add $0x10,%esp
1088cf: 85 c0 test %eax,%eax
1088d1: 8b 55 d0 mov -0x30(%ebp),%edx
1088d4: 74 2a je 108900 <create_disk+0x1c4> <== ALWAYS TAKEN
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
1088d6: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED
1088d9: 29 f9 sub %edi,%ecx <== NOT EXECUTED
1088db: c1 e1 03 shl $0x3,%ecx <== NOT EXECUTED
1088de: 8d 3c f8 lea (%eax,%edi,8),%edi <== NOT EXECUTED
1088e1: 89 7d d4 mov %edi,-0x2c(%ebp) <== NOT EXECUTED
1088e4: 31 c0 xor %eax,%eax <== NOT EXECUTED
1088e6: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
disktab = table;
1088e8: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
1088eb: 89 0d a0 bf 12 00 mov %ecx,0x12bfa0 <== NOT EXECUTED
disktab_size = new_size;
1088f1: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
1088f4: a3 a4 bf 12 00 mov %eax,0x12bfa4 <== NOT EXECUTED
1088f9: e9 69 fe ff ff jmp 108767 <create_disk+0x2b> <== NOT EXECUTED
1088fe: 66 90 xchg %ax,%ax <== NOT EXECUTED
dd->deleted = false;
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
108900: b8 1a 00 00 00 mov $0x1a,%eax
108905: e9 97 fe ff ff jmp 1087a1 <create_disk+0x65>
10890a: 66 90 xchg %ax,%ax
rtems_device_minor_number new_size = 0;
if (old_size == 0) {
new_size = DISKTAB_INITIAL_SIZE;
} else {
new_size = 2 * old_size;
10890c: 8d 0c 3f lea (%edi,%edi,1),%ecx <== NOT EXECUTED
10890f: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED
108912: e9 34 ff ff ff jmp 10884b <create_disk+0x10f> <== NOT EXECUTED
108917: 90 nop <== NOT EXECUTED
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
free(alloc_name);
108918: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10891b: 51 push %ecx <== NOT EXECUTED
10891c: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
10891f: e8 68 0b 00 00 call 10948c <free> <== NOT EXECUTED
free(dd);
108924: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
108927: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
10892a: e8 5d 0b 00 00 call 10948c <free> <== NOT EXECUTED
10892f: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
return RTEMS_UNSATISFIED;
108934: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108937: e9 65 fe ff ff jmp 1087a1 <create_disk+0x65> <== NOT EXECUTED
10893c: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
108943: e9 c9 fe ff ff jmp 108811 <create_disk+0xd5>
if (name != NULL) {
alloc_name = strdup(name);
if (alloc_name == NULL) {
free(dd);
108948: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10894b: 52 push %edx <== NOT EXECUTED
10894c: e8 3b 0b 00 00 call 10948c <free> <== NOT EXECUTED
108951: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED
return RTEMS_NO_MEMORY;
108956: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108959: e9 43 fe ff ff jmp 1087a1 <create_disk+0x65> <== NOT EXECUTED
0010f020 <devFS_close>:
#include "devfs.h"
int devFS_close(
rtems_libio_t *iop
)
{
10f020: 55 push %ebp
10f021: 89 e5 mov %esp,%ebp
10f023: 83 ec 1c sub $0x1c,%esp
10f026: 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;
10f029: 8b 42 38 mov 0x38(%edx),%eax
args.iop = iop;
10f02c: 89 55 ec mov %edx,-0x14(%ebp)
args.flags = 0;
10f02f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
args.mode = 0;
10f036: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
status = rtems_io_close(
10f03d: 8d 55 ec lea -0x14(%ebp),%edx
10f040: 52 push %edx
10f041: ff 70 0c pushl 0xc(%eax)
10f044: ff 70 08 pushl 0x8(%eax)
10f047: e8 70 11 00 00 call 1101bc <rtems_io_close>
np->major,
np->minor,
(void *) &args
);
if ( status ) {
10f04c: 83 c4 10 add $0x10,%esp
10f04f: 85 c0 test %eax,%eax
10f051: 75 05 jne 10f058 <devFS_close+0x38> <== NEVER TAKEN
return rtems_deviceio_errno(status);
}
return 0;
}
10f053: c9 leave
10f054: c3 ret
10f055: 8d 76 00 lea 0x0(%esi),%esi
np->major,
np->minor,
(void *) &args
);
if ( status ) {
return rtems_deviceio_errno(status);
10f058: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f05b: 50 push %eax <== NOT EXECUTED
10f05c: e8 e7 00 00 00 call 10f148 <rtems_deviceio_errno> <== NOT EXECUTED
10f061: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
10f064: c9 leave <== NOT EXECUTED
10f065: c3 ret <== NOT EXECUTED
0010f078 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
10f078: 55 push %ebp
10f079: 89 e5 mov %esp,%ebp
10f07b: 57 push %edi
10f07c: 56 push %esi
10f07d: 53 push %ebx
10f07e: 83 ec 1c sub $0x1c,%esp
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
10f081: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp)
10f088: 0f 85 96 00 00 00 jne 10f124 <devFS_evaluate_path+0xac><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
10f08e: 8b 45 14 mov 0x14(%ebp),%eax
10f091: 8b 00 mov (%eax),%eax
10f093: 89 45 e4 mov %eax,-0x1c(%ebp)
if (!device_name_table)
10f096: 85 c0 test %eax,%eax
10f098: 0f 84 98 00 00 00 je 10f136 <devFS_evaluate_path+0xbe><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
10f09e: 8b 15 50 01 12 00 mov 0x120150,%edx
10f0a4: 89 55 e0 mov %edx,-0x20(%ebp)
10f0a7: 85 d2 test %edx,%edx
10f0a9: 74 38 je 10f0e3 <devFS_evaluate_path+0x6b><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
/* 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 );
10f0ab: 31 c0 xor %eax,%eax
10f0ad: 31 db xor %ebx,%ebx
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
10f0af: 8d 04 80 lea (%eax,%eax,4),%eax
10f0b2: 8b 55 e4 mov -0x1c(%ebp),%edx
10f0b5: 8d 3c 82 lea (%edx,%eax,4),%edi
10f0b8: 8b 37 mov (%edi),%esi
10f0ba: 85 f6 test %esi,%esi
10f0bc: 74 1d je 10f0db <devFS_evaluate_path+0x63>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
10f0be: 50 push %eax
10f0bf: ff 75 0c pushl 0xc(%ebp)
10f0c2: 56 push %esi
10f0c3: ff 75 08 pushl 0x8(%ebp)
10f0c6: e8 71 2f 00 00 call 11203c <strncmp>
10f0cb: 83 c4 10 add $0x10,%esp
10f0ce: 85 c0 test %eax,%eax
10f0d0: 75 09 jne 10f0db <devFS_evaluate_path+0x63><== NEVER TAKEN
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
10f0d2: 8b 45 0c mov 0xc(%ebp),%eax
10f0d5: 80 3c 06 00 cmpb $0x0,(%esi,%eax,1)
10f0d9: 74 21 je 10f0fc <devFS_evaluate_path+0x84><== ALWAYS TAKEN
/* 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++) {
10f0db: 43 inc %ebx
10f0dc: 89 d8 mov %ebx,%eax
10f0de: 39 5d e0 cmp %ebx,-0x20(%ebp)
10f0e1: 77 cc ja 10f0af <devFS_evaluate_path+0x37>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
10f0e3: e8 a4 23 00 00 call 11148c <__errno>
10f0e8: c7 00 02 00 00 00 movl $0x2,(%eax)
10f0ee: b8 ff ff ff ff mov $0xffffffff,%eax
}
10f0f3: 8d 65 f4 lea -0xc(%ebp),%esp
10f0f6: 5b pop %ebx
10f0f7: 5e pop %esi
10f0f8: 5f pop %edi
10f0f9: c9 leave
10f0fa: c3 ret
10f0fb: 90 nop
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
10f0fc: 8b 55 14 mov 0x14(%ebp),%edx
10f0ff: 89 3a mov %edi,(%edx)
pathloc->handlers = &devFS_file_handlers;
10f101: c7 42 08 80 20 12 00 movl $0x122080,0x8(%edx)
pathloc->ops = &devFS_ops;
10f108: c7 42 0c 20 20 12 00 movl $0x122020,0xc(%edx)
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
10f10f: a1 d8 20 12 00 mov 0x1220d8,%eax
10f114: 8b 40 28 mov 0x28(%eax),%eax
10f117: 89 42 10 mov %eax,0x10(%edx)
10f11a: 31 c0 xor %eax,%eax
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
10f11c: 8d 65 f4 lea -0xc(%ebp),%esp
10f11f: 5b pop %ebx
10f120: 5e pop %esi
10f121: 5f pop %edi
10f122: c9 leave
10f123: c3 ret
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
10f124: e8 63 23 00 00 call 11148c <__errno> <== NOT EXECUTED
10f129: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
10f12f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10f134: eb e6 jmp 10f11c <devFS_evaluate_path+0xa4><== NOT EXECUTED
/* 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 );
10f136: e8 51 23 00 00 call 11148c <__errno> <== NOT EXECUTED
10f13b: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
10f141: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10f144: eb d6 jmp 10f11c <devFS_evaluate_path+0xa4><== NOT EXECUTED
00107bec <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
107bec: 55 push %ebp
107bed: 89 e5 mov %esp,%ebp
107bef: 57 push %edi
107bf0: 53 push %ebx
107bf1: 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(
107bf4: 83 ec 0c sub $0xc,%esp
107bf7: a1 50 01 12 00 mov 0x120150,%eax
107bfc: 8d 04 80 lea (%eax,%eax,4),%eax
107bff: c1 e0 02 shl $0x2,%eax
107c02: 50 push %eax
107c03: e8 88 6f 00 00 call 10eb90 <_Workspace_Allocate>
107c08: 89 c2 mov %eax,%edx
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
107c0a: 83 c4 10 add $0x10,%esp
107c0d: 85 c0 test %eax,%eax
107c0f: 74 2b je 107c3c <devFS_initialize+0x50> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(
107c11: a1 50 01 12 00 mov 0x120150,%eax
107c16: 8d 0c 80 lea (%eax,%eax,4),%ecx
107c19: c1 e1 02 shl $0x2,%ecx
107c1c: 31 c0 xor %eax,%eax
107c1e: 89 d7 mov %edx,%edi
107c20: 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;
107c22: c7 43 24 80 20 12 00 movl $0x122080,0x24(%ebx)
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
107c29: c7 43 28 20 20 12 00 movl $0x122020,0x28(%ebx)
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
107c30: 89 53 1c mov %edx,0x1c(%ebx)
107c33: 31 c0 xor %eax,%eax
return 0;
}
107c35: 8d 65 f8 lea -0x8(%ebp),%esp
107c38: 5b pop %ebx
107c39: 5f pop %edi
107c3a: c9 leave
107c3b: c3 ret
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
rtems_set_errno_and_return_minus_one( ENOMEM );
107c3c: e8 4b 98 00 00 call 11148c <__errno> <== NOT EXECUTED
107c41: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107c47: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107c4c: eb e7 jmp 107c35 <devFS_initialize+0x49> <== NOT EXECUTED
00107da8 <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
107da8: 55 push %ebp
107da9: 89 e5 mov %esp,%ebp
107dab: 83 ec 1c sub $0x1c,%esp
107dae: 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;
107db1: 8b 42 38 mov 0x38(%edx),%eax
args.iop = iop;
107db4: 89 55 e8 mov %edx,-0x18(%ebp)
args.command = command;
107db7: 8b 55 0c mov 0xc(%ebp),%edx
107dba: 89 55 ec mov %edx,-0x14(%ebp)
args.buffer = buffer;
107dbd: 8b 55 10 mov 0x10(%ebp),%edx
107dc0: 89 55 f0 mov %edx,-0x10(%ebp)
status = rtems_io_control(
107dc3: 8d 55 e8 lea -0x18(%ebp),%edx
107dc6: 52 push %edx
107dc7: ff 70 0c pushl 0xc(%eax)
107dca: ff 70 08 pushl 0x8(%eax)
107dcd: e8 fe 41 00 00 call 10bfd0 <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
107dd2: 83 c4 10 add $0x10,%esp
107dd5: 85 c0 test %eax,%eax
107dd7: 75 07 jne 107de0 <devFS_ioctl+0x38> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return args.ioctl_return;
107dd9: 8b 45 f4 mov -0xc(%ebp),%eax
}
107ddc: c9 leave
107ddd: c3 ret
107dde: 66 90 xchg %ax,%ax
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
107de0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107de3: 50 push %eax <== NOT EXECUTED
107de4: e8 5f 73 00 00 call 10f148 <rtems_deviceio_errno> <== NOT EXECUTED
107de9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return args.ioctl_return;
}
107dec: c9 leave <== NOT EXECUTED
107ded: c3 ret <== NOT EXECUTED
00107c50 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
107c50: 55 push %ebp
107c51: 89 e5 mov %esp,%ebp
107c53: 57 push %edi
107c54: 56 push %esi
107c55: 53 push %ebx
107c56: 83 ec 1c sub $0x1c,%esp
107c59: 8b 7d 08 mov 0x8(%ebp),%edi
107c5c: 8b 4d 10 mov 0x10(%ebp),%ecx
107c5f: 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') &&
107c62: 80 3f 64 cmpb $0x64,(%edi)
107c65: 0f 84 dd 00 00 00 je 107d48 <devFS_mknod+0xf8> <== ALWAYS TAKEN
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
107c6b: 8b 45 0c mov 0xc(%ebp),%eax
107c6e: 25 00 f0 00 00 and $0xf000,%eax
107c73: 3d 00 60 00 00 cmp $0x6000,%eax
107c78: 74 0b je 107c85 <devFS_mknod+0x35> <== NEVER TAKEN
107c7a: 3d 00 20 00 00 cmp $0x2000,%eax
107c7f: 0f 85 e3 00 00 00 jne 107d68 <devFS_mknod+0x118> <== NEVER TAKEN
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
107c85: 89 4d d8 mov %ecx,-0x28(%ebp)
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
107c88: 89 55 dc mov %edx,-0x24(%ebp)
rtems_set_errno_and_return_minus_one( EINVAL );
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;
107c8b: 8b 45 18 mov 0x18(%ebp),%eax
107c8e: 8b 30 mov (%eax),%esi
if (!device_name_table)
107c90: 85 f6 test %esi,%esi
107c92: 0f 84 f2 00 00 00 je 107d8a <devFS_mknod+0x13a> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
107c98: 8b 15 50 01 12 00 mov 0x120150,%edx
107c9e: 85 d2 test %edx,%edx
107ca0: 0f 84 d4 00 00 00 je 107d7a <devFS_mknod+0x12a> <== NEVER TAKEN
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;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
107ca6: 31 c0 xor %eax,%eax
107ca8: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
107caf: 31 db xor %ebx,%ebx
107cb1: 89 7d e4 mov %edi,-0x1c(%ebp)
107cb4: 89 d7 mov %edx,%edi
107cb6: eb 1a jmp 107cd2 <devFS_mknod+0x82>
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
107cb8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107cbb: 50 push %eax <== NOT EXECUTED
107cbc: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
107cbf: e8 54 a2 00 00 call 111f18 <strcmp> <== NOT EXECUTED
107cc4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107cc7: 85 c0 test %eax,%eax <== NOT EXECUTED
107cc9: 74 65 je 107d30 <devFS_mknod+0xe0> <== NOT EXECUTED
/* 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++){
107ccb: 43 inc %ebx <== NOT EXECUTED
107ccc: 89 d8 mov %ebx,%eax <== NOT EXECUTED
107cce: 39 fb cmp %edi,%ebx <== NOT EXECUTED
107cd0: 73 16 jae 107ce8 <devFS_mknod+0x98> <== NOT EXECUTED
if (device_name_table[i].device_name == NULL)
107cd2: 8d 04 80 lea (%eax,%eax,4),%eax
107cd5: 8b 04 86 mov (%esi,%eax,4),%eax
107cd8: 85 c0 test %eax,%eax
107cda: 75 dc jne 107cb8 <devFS_mknod+0x68> <== NEVER TAKEN
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
107cdc: 89 5d e0 mov %ebx,-0x20(%ebp)
/* 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++){
107cdf: 43 inc %ebx
107ce0: 89 d8 mov %ebx,%eax
107ce2: 39 fb cmp %edi,%ebx
107ce4: 72 ec jb 107cd2 <devFS_mknod+0x82>
107ce6: 66 90 xchg %ax,%ax
107ce8: 8b 7d e4 mov -0x1c(%ebp),%edi
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
107ceb: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp)
107cef: 0f 84 85 00 00 00 je 107d7a <devFS_mknod+0x12a> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
107cf5: 9c pushf
107cf6: fa cli
107cf7: 5b pop %ebx
device_name_table[slot].device_name = (char *)path;
107cf8: 8b 55 e0 mov -0x20(%ebp),%edx
107cfb: 8d 04 92 lea (%edx,%edx,4),%eax
107cfe: 8d 14 86 lea (%esi,%eax,4),%edx
107d01: 89 3a mov %edi,(%edx)
device_name_table[slot].device_name_length = strlen(path);
107d03: 31 c0 xor %eax,%eax
107d05: b9 ff ff ff ff mov $0xffffffff,%ecx
107d0a: f2 ae repnz scas %es:(%edi),%al
107d0c: f7 d1 not %ecx
107d0e: 49 dec %ecx
107d0f: 89 4a 04 mov %ecx,0x4(%edx)
device_name_table[slot].major = major;
107d12: 8b 45 d8 mov -0x28(%ebp),%eax
107d15: 89 42 08 mov %eax,0x8(%edx)
device_name_table[slot].minor = minor;
107d18: 8b 45 dc mov -0x24(%ebp),%eax
107d1b: 89 42 0c mov %eax,0xc(%edx)
device_name_table[slot].mode = mode;
107d1e: 8b 45 0c mov 0xc(%ebp),%eax
107d21: 89 42 10 mov %eax,0x10(%edx)
_ISR_Enable(level);
107d24: 53 push %ebx
107d25: 9d popf
107d26: 31 c0 xor %eax,%eax
return 0;
}
107d28: 8d 65 f4 lea -0xc(%ebp),%esp
107d2b: 5b pop %ebx
107d2c: 5e pop %esi
107d2d: 5f pop %edi
107d2e: c9 leave
107d2f: c3 ret
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
107d30: e8 57 97 00 00 call 11148c <__errno> <== NOT EXECUTED
107d35: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED
107d3b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
107d40: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107d43: 5b pop %ebx <== NOT EXECUTED
107d44: 5e pop %esi <== NOT EXECUTED
107d45: 5f pop %edi <== NOT EXECUTED
107d46: c9 leave <== NOT EXECUTED
107d47: c3 ret <== NOT EXECUTED
* 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') &&
107d48: 80 7f 01 65 cmpb $0x65,0x1(%edi)
107d4c: 0f 85 19 ff ff ff jne 107c6b <devFS_mknod+0x1b> <== NEVER TAKEN
(path[2] == 'v') && (path[3] == '\0'))
107d52: 80 7f 02 76 cmpb $0x76,0x2(%edi)
107d56: 0f 85 0f ff ff ff jne 107c6b <devFS_mknod+0x1b> <== NEVER TAKEN
107d5c: 80 7f 03 00 cmpb $0x0,0x3(%edi)
107d60: 0f 85 05 ff ff ff jne 107c6b <devFS_mknod+0x1b>
107d66: eb be jmp 107d26 <devFS_mknod+0xd6>
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
rtems_set_errno_and_return_minus_one( EINVAL );
107d68: e8 1f 97 00 00 call 11148c <__errno> <== NOT EXECUTED
107d6d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107d73: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107d78: eb ae jmp 107d28 <devFS_mknod+0xd8> <== NOT EXECUTED
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
107d7a: e8 0d 97 00 00 call 11148c <__errno> <== NOT EXECUTED
107d7f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107d85: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
107d88: eb 9e jmp 107d28 <devFS_mknod+0xd8> <== NOT EXECUTED
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;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
107d8a: e8 fd 96 00 00 call 11148c <__errno> <== NOT EXECUTED
107d8f: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
107d95: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
107d98: eb 8e jmp 107d28 <devFS_mknod+0xd8> <== NOT EXECUTED
00107df0 <devFS_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
107df0: 55 push %ebp
107df1: 89 e5 mov %esp,%ebp
107df3: 83 ec 1c sub $0x1c,%esp
107df6: 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;
107df9: 8b 50 38 mov 0x38(%eax),%edx
args.iop = iop;
107dfc: 89 45 ec mov %eax,-0x14(%ebp)
args.flags = iop->flags;
107dff: 8b 40 14 mov 0x14(%eax),%eax
107e02: 89 45 f0 mov %eax,-0x10(%ebp)
args.mode = mode;
107e05: 8b 45 14 mov 0x14(%ebp),%eax
107e08: 89 45 f4 mov %eax,-0xc(%ebp)
status = rtems_io_open(
107e0b: 8d 45 ec lea -0x14(%ebp),%eax
107e0e: 50 push %eax
107e0f: ff 72 0c pushl 0xc(%edx)
107e12: ff 72 08 pushl 0x8(%edx)
107e15: e8 ca 42 00 00 call 10c0e4 <rtems_io_open>
np->major,
np->minor,
(void *) &args
);
if ( status )
107e1a: 83 c4 10 add $0x10,%esp
107e1d: 85 c0 test %eax,%eax
107e1f: 75 03 jne 107e24 <devFS_open+0x34> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return 0;
}
107e21: c9 leave
107e22: c3 ret
107e23: 90 nop
np->major,
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
107e24: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107e27: 50 push %eax <== NOT EXECUTED
107e28: e8 1b 73 00 00 call 10f148 <rtems_deviceio_errno> <== NOT EXECUTED
107e2d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return 0;
}
107e30: c9 leave <== NOT EXECUTED
107e31: c3 ret <== NOT EXECUTED
00107e34 <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
107e34: 55 push %ebp <== NOT EXECUTED
107e35: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107e37: 53 push %ebx <== NOT EXECUTED
107e38: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED
107e3b: 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;
107e3e: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
args.iop = iop;
107e41: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
args.offset = iop->offset;
107e44: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
107e47: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED
107e4a: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED
107e4d: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED
args.buffer = buffer;
107e50: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
107e53: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED
args.count = count;
107e56: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
107e59: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED
args.flags = iop->flags;
107e5c: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
107e5f: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
args.bytes_moved = 0;
107e62: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED
status = rtems_io_read(
107e69: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
107e6c: 50 push %eax <== NOT EXECUTED
107e6d: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED
107e70: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED
107e73: e8 b8 42 00 00 call 10c130 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
107e78: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107e7b: 85 c0 test %eax,%eax <== NOT EXECUTED
107e7d: 75 09 jne 107e88 <devFS_read+0x54> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
107e7f: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
}
107e82: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
107e85: c9 leave <== NOT EXECUTED
107e86: c3 ret <== NOT EXECUTED
107e87: 90 nop <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
107e88: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107e8b: 50 push %eax <== NOT EXECUTED
107e8c: e8 b7 72 00 00 call 10f148 <rtems_deviceio_errno> <== NOT EXECUTED
107e91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
107e94: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
107e97: c9 leave <== NOT EXECUTED
107e98: c3 ret <== NOT EXECUTED
00107e9c <devFS_stat>:
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
107e9c: 55 push %ebp
107e9d: 89 e5 mov %esp,%ebp
107e9f: 53 push %ebx
107ea0: 83 ec 04 sub $0x4,%esp
107ea3: 8b 55 0c mov 0xc(%ebp),%edx
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
107ea6: 8b 45 08 mov 0x8(%ebp),%eax
107ea9: 8b 00 mov (%eax),%eax
if (!the_dev)
107eab: 85 c0 test %eax,%eax
107ead: 74 18 je 107ec7 <devFS_stat+0x2b> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
107eaf: 8b 48 0c mov 0xc(%eax),%ecx
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
107eb2: 8b 58 08 mov 0x8(%eax),%ebx
107eb5: 89 5a 18 mov %ebx,0x18(%edx)
107eb8: 89 4a 1c mov %ecx,0x1c(%edx)
buf->st_mode = the_dev->mode;
107ebb: 8b 40 10 mov 0x10(%eax),%eax
107ebe: 89 42 0c mov %eax,0xc(%edx)
107ec1: 31 c0 xor %eax,%eax
return 0;
}
107ec3: 5a pop %edx
107ec4: 5b pop %ebx
107ec5: c9 leave
107ec6: c3 ret
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
107ec7: e8 c0 95 00 00 call 11148c <__errno> <== NOT EXECUTED
107ecc: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
107ed2: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107ed7: eb ea jmp 107ec3 <devFS_stat+0x27> <== NOT EXECUTED
00107edc <devFS_write>:
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
107edc: 55 push %ebp
107edd: 89 e5 mov %esp,%ebp
107edf: 53 push %ebx
107ee0: 83 ec 28 sub $0x28,%esp
107ee3: 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;
107ee6: 8b 50 38 mov 0x38(%eax),%edx
args.iop = iop;
107ee9: 89 45 dc mov %eax,-0x24(%ebp)
args.offset = iop->offset;
107eec: 8b 48 0c mov 0xc(%eax),%ecx
107eef: 8b 58 10 mov 0x10(%eax),%ebx
107ef2: 89 4d e0 mov %ecx,-0x20(%ebp)
107ef5: 89 5d e4 mov %ebx,-0x1c(%ebp)
args.buffer = (void *) buffer;
107ef8: 8b 4d 0c mov 0xc(%ebp),%ecx
107efb: 89 4d e8 mov %ecx,-0x18(%ebp)
args.count = count;
107efe: 8b 4d 10 mov 0x10(%ebp),%ecx
107f01: 89 4d ec mov %ecx,-0x14(%ebp)
args.flags = iop->flags;
107f04: 8b 40 14 mov 0x14(%eax),%eax
107f07: 89 45 f0 mov %eax,-0x10(%ebp)
args.bytes_moved = 0;
107f0a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
status = rtems_io_write(
107f11: 8d 45 dc lea -0x24(%ebp),%eax
107f14: 50 push %eax
107f15: ff 72 0c pushl 0xc(%edx)
107f18: ff 72 08 pushl 0x8(%edx)
107f1b: e8 5c 42 00 00 call 10c17c <rtems_io_write>
np->major,
np->minor,
(void *) &args
);
if ( status )
107f20: 83 c4 10 add $0x10,%esp
107f23: 85 c0 test %eax,%eax
107f25: 75 09 jne 107f30 <devFS_write+0x54> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
107f27: 8b 45 f4 mov -0xc(%ebp),%eax
}
107f2a: 8b 5d fc mov -0x4(%ebp),%ebx
107f2d: c9 leave
107f2e: c3 ret
107f2f: 90 nop
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
107f30: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107f33: 50 push %eax <== NOT EXECUTED
107f34: e8 0f 72 00 00 call 10f148 <rtems_deviceio_errno> <== NOT EXECUTED
107f39: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
107f3c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
107f3f: c9 leave <== NOT EXECUTED
107f40: c3 ret <== NOT EXECUTED
00113be8 <device_close>:
*/
int device_close(
rtems_libio_t *iop
)
{
113be8: 55 push %ebp
113be9: 89 e5 mov %esp,%ebp
113beb: 83 ec 1c sub $0x1c,%esp
113bee: 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;
113bf1: 8b 42 38 mov 0x38(%edx),%eax
args.iop = iop;
113bf4: 89 55 ec mov %edx,-0x14(%ebp)
args.flags = 0;
113bf7: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
args.mode = 0;
113bfe: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
status = rtems_io_close(
113c05: 8d 55 ec lea -0x14(%ebp),%edx
113c08: 52 push %edx
113c09: ff 70 54 pushl 0x54(%eax)
113c0c: ff 70 50 pushl 0x50(%eax)
113c0f: e8 ec 10 00 00 call 114d00 <rtems_io_close>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
113c14: 83 c4 10 add $0x10,%esp
113c17: 85 c0 test %eax,%eax
113c19: 75 05 jne 113c20 <device_close+0x38> <== NEVER TAKEN
return rtems_deviceio_errno(status);
}
return 0;
}
113c1b: c9 leave
113c1c: c3 ret
113c1d: 8d 76 00 lea 0x0(%esi),%esi
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
return rtems_deviceio_errno(status);
113c20: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
113c23: 50 push %eax <== NOT EXECUTED
113c24: e8 cf 13 00 00 call 114ff8 <rtems_deviceio_errno> <== NOT EXECUTED
113c29: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
113c2c: c9 leave <== NOT EXECUTED
113c2d: c3 ret <== NOT EXECUTED
00113ad0 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
113ad0: 55 push %ebp
113ad1: 89 e5 mov %esp,%ebp
113ad3: 83 ec 1c sub $0x1c,%esp
113ad6: 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;
113ad9: 89 45 e8 mov %eax,-0x18(%ebp)
args.command = command;
113adc: 8b 55 0c mov 0xc(%ebp),%edx
113adf: 89 55 ec mov %edx,-0x14(%ebp)
args.buffer = buffer;
113ae2: 8b 55 10 mov 0x10(%ebp),%edx
113ae5: 89 55 f0 mov %edx,-0x10(%ebp)
the_jnode = iop->file_info;
113ae8: 8b 40 38 mov 0x38(%eax),%eax
status = rtems_io_control(
113aeb: 8d 55 e8 lea -0x18(%ebp),%edx
113aee: 52 push %edx
113aef: ff 70 54 pushl 0x54(%eax)
113af2: ff 70 50 pushl 0x50(%eax)
113af5: e8 52 12 00 00 call 114d4c <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
113afa: 83 c4 10 add $0x10,%esp
113afd: 85 c0 test %eax,%eax
113aff: 75 07 jne 113b08 <device_ioctl+0x38> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return args.ioctl_return;
113b01: 8b 45 f4 mov -0xc(%ebp),%eax
}
113b04: c9 leave
113b05: c3 ret
113b06: 66 90 xchg %ax,%ax
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
113b08: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
113b0b: 50 push %eax <== NOT EXECUTED
113b0c: e8 e7 14 00 00 call 114ff8 <rtems_deviceio_errno> <== NOT EXECUTED
113b11: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return args.ioctl_return;
}
113b14: c9 leave <== NOT EXECUTED
113b15: c3 ret <== NOT EXECUTED
00113c30 <device_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
113c30: 55 push %ebp
113c31: 89 e5 mov %esp,%ebp
113c33: 83 ec 1c sub $0x1c,%esp
113c36: 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;
113c39: 8b 50 38 mov 0x38(%eax),%edx
args.iop = iop;
113c3c: 89 45 ec mov %eax,-0x14(%ebp)
args.flags = iop->flags;
113c3f: 8b 40 14 mov 0x14(%eax),%eax
113c42: 89 45 f0 mov %eax,-0x10(%ebp)
args.mode = mode;
113c45: 8b 45 14 mov 0x14(%ebp),%eax
113c48: 89 45 f4 mov %eax,-0xc(%ebp)
status = rtems_io_open(
113c4b: 8d 45 ec lea -0x14(%ebp),%eax
113c4e: 50 push %eax
113c4f: ff 72 54 pushl 0x54(%edx)
113c52: ff 72 50 pushl 0x50(%edx)
113c55: e8 3e 11 00 00 call 114d98 <rtems_io_open>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
113c5a: 83 c4 10 add $0x10,%esp
113c5d: 85 c0 test %eax,%eax
113c5f: 75 03 jne 113c64 <device_open+0x34> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return 0;
}
113c61: c9 leave
113c62: c3 ret
113c63: 90 nop
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
113c64: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
113c67: 50 push %eax <== NOT EXECUTED
113c68: e8 8b 13 00 00 call 114ff8 <rtems_deviceio_errno> <== NOT EXECUTED
113c6d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return 0;
}
113c70: c9 leave <== NOT EXECUTED
113c71: c3 ret <== NOT EXECUTED
00113b80 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
113b80: 55 push %ebp
113b81: 89 e5 mov %esp,%ebp
113b83: 53 push %ebx
113b84: 83 ec 28 sub $0x28,%esp
113b87: 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;
113b8a: 8b 50 38 mov 0x38(%eax),%edx
args.iop = iop;
113b8d: 89 45 dc mov %eax,-0x24(%ebp)
args.offset = iop->offset;
113b90: 8b 48 0c mov 0xc(%eax),%ecx
113b93: 8b 58 10 mov 0x10(%eax),%ebx
113b96: 89 4d e0 mov %ecx,-0x20(%ebp)
113b99: 89 5d e4 mov %ebx,-0x1c(%ebp)
args.buffer = buffer;
113b9c: 8b 4d 0c mov 0xc(%ebp),%ecx
113b9f: 89 4d e8 mov %ecx,-0x18(%ebp)
args.count = count;
113ba2: 8b 4d 10 mov 0x10(%ebp),%ecx
113ba5: 89 4d ec mov %ecx,-0x14(%ebp)
args.flags = iop->flags;
113ba8: 8b 40 14 mov 0x14(%eax),%eax
113bab: 89 45 f0 mov %eax,-0x10(%ebp)
args.bytes_moved = 0;
113bae: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
status = rtems_io_read(
113bb5: 8d 45 dc lea -0x24(%ebp),%eax
113bb8: 50 push %eax
113bb9: ff 72 54 pushl 0x54(%edx)
113bbc: ff 72 50 pushl 0x50(%edx)
113bbf: e8 20 12 00 00 call 114de4 <rtems_io_read>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
113bc4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
113bc7: 85 c0 test %eax,%eax <== NOT EXECUTED
113bc9: 75 09 jne 113bd4 <device_read+0x54> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
113bcb: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
}
113bce: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
113bd1: c9 leave <== NOT EXECUTED
113bd2: c3 ret <== NOT EXECUTED
113bd3: 90 nop <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
113bd4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
113bd7: 50 push %eax <== NOT EXECUTED
113bd8: e8 1b 14 00 00 call 114ff8 <rtems_deviceio_errno> <== NOT EXECUTED
113bdd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
113be0: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
113be3: c9 leave <== NOT EXECUTED
113be4: c3 ret <== NOT EXECUTED
00113b18 <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
113b18: 55 push %ebp
113b19: 89 e5 mov %esp,%ebp
113b1b: 53 push %ebx
113b1c: 83 ec 28 sub $0x28,%esp
113b1f: 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;
113b22: 8b 50 38 mov 0x38(%eax),%edx
args.iop = iop;
113b25: 89 45 dc mov %eax,-0x24(%ebp)
args.offset = iop->offset;
113b28: 8b 48 0c mov 0xc(%eax),%ecx
113b2b: 8b 58 10 mov 0x10(%eax),%ebx
113b2e: 89 4d e0 mov %ecx,-0x20(%ebp)
113b31: 89 5d e4 mov %ebx,-0x1c(%ebp)
args.buffer = (void *) buffer;
113b34: 8b 4d 0c mov 0xc(%ebp),%ecx
113b37: 89 4d e8 mov %ecx,-0x18(%ebp)
args.count = count;
113b3a: 8b 4d 10 mov 0x10(%ebp),%ecx
113b3d: 89 4d ec mov %ecx,-0x14(%ebp)
args.flags = iop->flags;
113b40: 8b 40 14 mov 0x14(%eax),%eax
113b43: 89 45 f0 mov %eax,-0x10(%ebp)
args.bytes_moved = 0;
113b46: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
status = rtems_io_write(
113b4d: 8d 45 dc lea -0x24(%ebp),%eax
113b50: 50 push %eax
113b51: ff 72 54 pushl 0x54(%edx)
113b54: ff 72 50 pushl 0x50(%edx)
113b57: e8 d4 12 00 00 call 114e30 <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
113b5c: 83 c4 10 add $0x10,%esp
113b5f: 85 c0 test %eax,%eax
113b61: 75 09 jne 113b6c <device_write+0x54> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
113b63: 8b 45 f4 mov -0xc(%ebp),%eax
}
113b66: 8b 5d fc mov -0x4(%ebp),%ebx
113b69: c9 leave
113b6a: c3 ret
113b6b: 90 nop
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
113b6c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
113b6f: 50 push %eax <== NOT EXECUTED
113b70: e8 83 14 00 00 call 114ff8 <rtems_deviceio_errno> <== NOT EXECUTED
113b75: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
113b78: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
113b7b: c9 leave <== NOT EXECUTED
113b7c: c3 ret <== NOT EXECUTED
001083fc <disk_lock>:
*/
static volatile bool diskdevs_protected;
static rtems_status_code
disk_lock(void)
{
1083fc: 55 push %ebp
1083fd: 89 e5 mov %esp,%ebp
1083ff: 83 ec 0c sub $0xc,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108402: 6a 00 push $0x0
108404: 6a 00 push $0x0
108406: ff 35 a8 bf 12 00 pushl 0x12bfa8
10840c: e8 73 4a 00 00 call 10ce84 <rtems_semaphore_obtain>
if (sc == RTEMS_SUCCESSFUL) {
108411: 83 c4 10 add $0x10,%esp
108414: 85 c0 test %eax,%eax
108416: 75 0c jne 108424 <disk_lock+0x28> <== NEVER TAKEN
diskdevs_protected = true;
108418: c6 05 ac bf 12 00 01 movb $0x1,0x12bfac
10841f: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
} else {
return RTEMS_NOT_CONFIGURED;
}
}
108421: c9 leave
108422: c3 ret
108423: 90 nop
disk_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc == RTEMS_SUCCESSFUL) {
108424: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
} else {
return RTEMS_NOT_CONFIGURED;
}
}
108429: c9 leave <== NOT EXECUTED
10842a: c3 ret <== NOT EXECUTED
0010842c <disk_unlock>:
static void
disk_unlock(void)
{
10842c: 55 push %ebp
10842d: 89 e5 mov %esp,%ebp
10842f: 83 ec 14 sub $0x14,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
108432: c6 05 ac bf 12 00 00 movb $0x0,0x12bfac
sc = rtems_semaphore_release(diskdevs_mutex);
108439: ff 35 a8 bf 12 00 pushl 0x12bfa8
10843f: e8 3c 4b 00 00 call 10cf80 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
108444: 83 c4 10 add $0x10,%esp
108447: 85 c0 test %eax,%eax
108449: 75 02 jne 10844d <disk_unlock+0x21> <== NEVER TAKEN
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
}
}
10844b: c9 leave
10844c: c3 ret
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
if (sc != RTEMS_SUCCESSFUL) {
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
10844d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108450: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED
108455: e8 fa 4f 00 00 call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
0010a324 <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
10a324: 55 push %ebp
10a325: 89 e5 mov %esp,%ebp
10a327: 53 push %ebx
10a328: 83 ec 04 sub $0x4,%esp
10a32b: 89 c3 mov %eax,%ebx
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
10a32d: 8b 90 b4 00 00 00 mov 0xb4(%eax),%edx
10a333: 85 d2 test %edx,%edx
10a335: 75 28 jne 10a35f <drainOutput+0x3b>
10a337: eb 3b jmp 10a374 <drainOutput+0x50>
10a339: 8d 76 00 lea 0x0(%esi),%esi
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
10a33c: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
10a343: 00 00 00
rtems_interrupt_enable (level);
10a346: 50 push %eax
10a347: 9d popf
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
10a348: 50 push %eax
10a349: 6a 00 push $0x0
10a34b: 6a 00 push $0x0
10a34d: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
10a353: e8 8c 19 00 00 call 10bce4 <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
10a358: 83 c4 10 add $0x10,%esp
10a35b: 85 c0 test %eax,%eax
10a35d: 75 1a jne 10a379 <drainOutput+0x55> <== NEVER TAKEN
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
10a35f: 9c pushf
10a360: fa cli
10a361: 58 pop %eax
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
10a362: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx
10a368: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
10a36e: 39 d1 cmp %edx,%ecx
10a370: 75 ca jne 10a33c <drainOutput+0x18>
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
10a372: 50 push %eax
10a373: 9d popf
}
}
10a374: 8b 5d fc mov -0x4(%ebp),%ebx
10a377: c9 leave
10a378: c3 ret
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
10a379: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a37c: 50 push %eax <== NOT EXECUTED
10a37d: e8 76 1f 00 00 call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
00108d68 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
108d68: 55 push %ebp
108d69: 89 e5 mov %esp,%ebp
108d6b: 57 push %edi
108d6c: 56 push %esi
108d6d: 53 push %ebx
108d6e: 83 ec 64 sub $0x64,%esp
108d71: 8b 75 08 mov 0x8(%ebp),%esi
108d74: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
108d77: 8d 5d a0 lea -0x60(%ebp),%ebx
108d7a: 53 push %ebx
108d7b: 56 push %esi
108d7c: e8 73 05 00 00 call 1092f4 <fstat>
if ( status == -1 )
108d81: 83 c4 10 add $0x10,%esp
108d84: 40 inc %eax
108d85: 75 0d jne 108d94 <dup2+0x2c> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
108d87: b8 ff ff ff ff mov $0xffffffff,%eax
}
108d8c: 8d 65 f4 lea -0xc(%ebp),%esp
108d8f: 5b pop %ebx
108d90: 5e pop %esi
108d91: 5f pop %edi
108d92: c9 leave
108d93: c3 ret
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
108d94: 83 ec 08 sub $0x8,%esp
108d97: 53 push %ebx
108d98: 57 push %edi
108d99: e8 56 05 00 00 call 1092f4 <fstat>
if ( status == -1 )
108d9e: 83 c4 10 add $0x10,%esp
108da1: 40 inc %eax
108da2: 74 e3 je 108d87 <dup2+0x1f> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
108da4: 50 push %eax <== NOT EXECUTED
108da5: 57 push %edi <== NOT EXECUTED
108da6: 6a 00 push $0x0 <== NOT EXECUTED
108da8: 56 push %esi <== NOT EXECUTED
108da9: e8 f6 01 00 00 call 108fa4 <fcntl> <== NOT EXECUTED
108dae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108db1: eb d9 jmp 108d8c <dup2+0x24> <== NOT EXECUTED
00109e98 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
109e98: 55 push %ebp <== NOT EXECUTED
109e99: 89 e5 mov %esp,%ebp <== NOT EXECUTED
109e9b: 53 push %ebx <== NOT EXECUTED
109e9c: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
109e9f: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED
109ea3: 74 1b je 109ec0 <echo+0x28> <== NOT EXECUTED
109ea5: 0f b6 c8 movzbl %al,%ecx <== NOT EXECUTED
109ea8: 8b 1d 24 71 12 00 mov 0x127124,%ebx <== NOT EXECUTED
109eae: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) <== NOT EXECUTED
109eb3: 74 0b je 109ec0 <echo+0x28> <== NOT EXECUTED
109eb5: 3c 09 cmp $0x9,%al <== NOT EXECUTED
109eb7: 74 07 je 109ec0 <echo+0x28> <== NOT EXECUTED
109eb9: 3c 0a cmp $0xa,%al <== NOT EXECUTED
109ebb: 75 13 jne 109ed0 <echo+0x38> <== NOT EXECUTED
109ebd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
109ec0: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
109ec3: e8 94 fe ff ff call 109d5c <oproc> <== NOT EXECUTED
}
}
109ec8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
109ecb: c9 leave <== NOT EXECUTED
109ecc: c3 ret <== NOT EXECUTED
109ecd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
109ed0: c6 45 f6 5e movb $0x5e,-0xa(%ebp) <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
109ed4: 83 f0 40 xor $0x40,%eax <== NOT EXECUTED
109ed7: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
109eda: 50 push %eax <== NOT EXECUTED
109edb: 52 push %edx <== NOT EXECUTED
109edc: 6a 02 push $0x2 <== NOT EXECUTED
109ede: 8d 45 f6 lea -0xa(%ebp),%eax <== NOT EXECUTED
109ee1: 50 push %eax <== NOT EXECUTED
109ee2: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
109ee5: e8 3e fd ff ff call 109c28 <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
109eea: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
109eed: 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')) {
109ef1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
tty->column += 2;
}
else {
oproc (c, tty);
}
}
109ef4: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
109ef7: c9 leave <== NOT EXECUTED
109ef8: c3 ret <== NOT EXECUTED
0012e880 <endgrent>:
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
12e880: 55 push %ebp <== NOT EXECUTED
12e881: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12e883: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
if (group_fp != NULL)
12e886: a1 c4 49 17 00 mov 0x1749c4,%eax <== NOT EXECUTED
12e88b: 85 c0 test %eax,%eax <== NOT EXECUTED
12e88d: 74 0c je 12e89b <endgrent+0x1b> <== NOT EXECUTED
fclose(group_fp);
12e88f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12e892: 50 push %eax <== NOT EXECUTED
12e893: e8 34 94 01 00 call 147ccc <fclose> <== NOT EXECUTED
12e898: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
12e89b: c9 leave <== NOT EXECUTED
12e89c: c3 ret <== NOT EXECUTED
0012e8a0 <endpwent>:
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
12e8a0: 55 push %ebp <== NOT EXECUTED
12e8a1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12e8a3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
if (passwd_fp != NULL)
12e8a6: a1 c4 48 17 00 mov 0x1748c4,%eax <== NOT EXECUTED
12e8ab: 85 c0 test %eax,%eax <== NOT EXECUTED
12e8ad: 74 0c je 12e8bb <endpwent+0x1b> <== NOT EXECUTED
fclose(passwd_fp);
12e8af: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12e8b2: 50 push %eax <== NOT EXECUTED
12e8b3: e8 14 94 01 00 call 147ccc <fclose> <== NOT EXECUTED
12e8b8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
12e8bb: c9 leave <== NOT EXECUTED
12e8bc: c3 ret <== NOT EXECUTED
00109efc <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)
{
109efc: 55 push %ebp <== NOT EXECUTED
109efd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
109eff: 57 push %edi <== NOT EXECUTED
109f00: 56 push %esi <== NOT EXECUTED
109f01: 53 push %ebx <== NOT EXECUTED
109f02: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
109f05: 89 c3 mov %eax,%ebx <== NOT EXECUTED
109f07: 89 d7 mov %edx,%edi <== NOT EXECUTED
if (tty->ccount == 0)
109f09: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED
109f0c: 85 c9 test %ecx,%ecx <== NOT EXECUTED
109f0e: 0f 84 84 00 00 00 je 109f98 <erase+0x9c> <== NOT EXECUTED
return;
if (lineFlag) {
109f14: 85 d2 test %edx,%edx <== NOT EXECUTED
109f16: 0f 85 84 00 00 00 jne 109fa0 <erase+0xa4> <== NOT EXECUTED
109f1c: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED
109f1f: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED
109f22: eb 1d jmp 109f41 <erase+0x45> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
109f24: 80 e6 02 and $0x2,%dh <== NOT EXECUTED
109f27: 0f 85 37 01 00 00 jne 10a064 <erase+0x168> <== NOT EXECUTED
109f2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
109f30: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
109f33: 85 d2 test %edx,%edx <== NOT EXECUTED
109f35: 74 61 je 109f98 <erase+0x9c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
109f37: 8b 4b 20 mov 0x20(%ebx),%ecx <== NOT EXECUTED
109f3a: 85 c9 test %ecx,%ecx <== NOT EXECUTED
109f3c: 74 5a je 109f98 <erase+0x9c> <== NOT EXECUTED
109f3e: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED
unsigned char c = tty->cbuf[--tty->ccount];
109f41: 8b 7b 1c mov 0x1c(%ebx),%edi <== NOT EXECUTED
109f44: 49 dec %ecx <== NOT EXECUTED
109f45: 89 4b 20 mov %ecx,0x20(%ebx) <== NOT EXECUTED
109f48: 8a 04 0f mov (%edi,%ecx,1),%al <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
109f4b: f6 c2 08 test $0x8,%dl <== NOT EXECUTED
109f4e: 74 e0 je 109f30 <erase+0x34> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
109f50: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED
109f53: 85 f6 test %esi,%esi <== NOT EXECUTED
109f55: 75 09 jne 109f60 <erase+0x64> <== NOT EXECUTED
109f57: f6 c2 10 test $0x10,%dl <== NOT EXECUTED
109f5a: 0f 84 f0 00 00 00 je 10a050 <erase+0x154> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
109f60: 3c 09 cmp $0x9,%al <== NOT EXECUTED
109f62: 74 58 je 109fbc <erase+0xc0> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
109f64: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
109f67: 8d 70 01 lea 0x1(%eax),%esi <== NOT EXECUTED
109f6a: a1 24 71 12 00 mov 0x127124,%eax <== NOT EXECUTED
109f6f: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED
109f73: 75 af jne 109f24 <erase+0x28> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
109f75: 51 push %ecx <== NOT EXECUTED
109f76: 53 push %ebx <== NOT EXECUTED
109f77: 6a 03 push $0x3 <== NOT EXECUTED
109f79: 68 32 2b 12 00 push $0x122b32 <== NOT EXECUTED
109f7e: e8 a5 fc ff ff call 109c28 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
109f83: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
109f86: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109f89: 85 c0 test %eax,%eax <== NOT EXECUTED
109f8b: 74 a3 je 109f30 <erase+0x34> <== NOT EXECUTED
tty->column--;
109f8d: 48 dec %eax <== NOT EXECUTED
109f8e: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
}
}
}
if (!lineFlag)
109f91: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
109f94: 85 d2 test %edx,%edx <== NOT EXECUTED
109f96: 75 9f jne 109f37 <erase+0x3b> <== NOT EXECUTED
break;
}
}
109f98: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
109f9b: 5b pop %ebx <== NOT EXECUTED
109f9c: 5e pop %esi <== NOT EXECUTED
109f9d: 5f pop %edi <== NOT EXECUTED
109f9e: c9 leave <== NOT EXECUTED
109f9f: c3 ret <== NOT EXECUTED
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
109fa0: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED
109fa3: f6 c2 08 test $0x8,%dl <== NOT EXECUTED
109fa6: 0f 84 94 00 00 00 je 10a040 <erase+0x144> <== NOT EXECUTED
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
109fac: f6 c2 10 test $0x10,%dl <== NOT EXECUTED
109faf: 0f 84 eb 00 00 00 je 10a0a0 <erase+0x1a4> <== NOT EXECUTED
109fb5: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED
109fb8: eb 87 jmp 109f41 <erase+0x45> <== NOT EXECUTED
109fba: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
int col = tty->read_start_column;
109fbc: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
109fbf: 85 c9 test %ecx,%ecx <== NOT EXECUTED
109fc1: 74 46 je 10a009 <erase+0x10d> <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
109fc3: a1 24 71 12 00 mov 0x127124,%eax <== NOT EXECUTED
109fc8: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
109fcb: 31 c0 xor %eax,%eax <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
109fcd: 81 e2 00 02 00 00 and $0x200,%edx <== NOT EXECUTED
109fd3: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
109fd6: 89 5d d8 mov %ebx,-0x28(%ebp) <== NOT EXECUTED
109fd9: 8b 5d dc mov -0x24(%ebp),%ebx <== NOT EXECUTED
109fdc: eb 10 jmp 109fee <erase+0xf2> <== NOT EXECUTED
109fde: 66 90 xchg %ax,%ax <== NOT EXECUTED
109fe0: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
109fe3: 85 d2 test %edx,%edx <== NOT EXECUTED
109fe5: 74 03 je 109fea <erase+0xee> <== NOT EXECUTED
col += 2;
109fe7: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
109fea: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
109fec: 74 18 je 10a006 <erase+0x10a> <== NOT EXECUTED
c = tty->cbuf[i++];
109fee: 8a 14 07 mov (%edi,%eax,1),%dl <== NOT EXECUTED
109ff1: 40 inc %eax <== NOT EXECUTED
if (c == '\t') {
109ff2: 80 fa 09 cmp $0x9,%dl <== NOT EXECUTED
109ff5: 74 41 je 10a038 <erase+0x13c> <== NOT EXECUTED
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
109ff7: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
109ffa: f6 44 13 01 20 testb $0x20,0x1(%ebx,%edx,1) <== NOT EXECUTED
109fff: 75 df jne 109fe0 <erase+0xe4> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
}
else {
col++;
10a001: 46 inc %esi <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
10a002: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
10a004: 75 e8 jne 109fee <erase+0xf2> <== NOT EXECUTED
10a006: 8b 5d d8 mov -0x28(%ebp),%ebx <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
10a009: 3b 73 28 cmp 0x28(%ebx),%esi <== NOT EXECUTED
10a00c: 0f 8d 1e ff ff ff jge 109f30 <erase+0x34> <== NOT EXECUTED
10a012: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
10a014: 50 push %eax <== NOT EXECUTED
10a015: 53 push %ebx <== NOT EXECUTED
10a016: 6a 01 push $0x1 <== NOT EXECUTED
10a018: 68 34 2b 12 00 push $0x122b34 <== NOT EXECUTED
10a01d: e8 06 fc ff ff call 109c28 <rtems_termios_puts> <== NOT EXECUTED
tty->column--;
10a022: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
10a025: 48 dec %eax <== NOT EXECUTED
10a026: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
10a029: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a02c: 39 c6 cmp %eax,%esi <== NOT EXECUTED
10a02e: 7c e4 jl 10a014 <erase+0x118> <== NOT EXECUTED
10a030: e9 fb fe ff ff jmp 109f30 <erase+0x34> <== NOT EXECUTED
10a035: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
10a038: 83 ce 07 or $0x7,%esi <== NOT EXECUTED
10a03b: 46 inc %esi <== NOT EXECUTED
10a03c: eb ac jmp 109fea <erase+0xee> <== NOT EXECUTED
10a03e: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
10a040: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
10a047: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10a04a: 5b pop %ebx <== NOT EXECUTED
10a04b: 5e pop %esi <== NOT EXECUTED
10a04c: 5f pop %edi <== NOT EXECUTED
10a04d: c9 leave <== NOT EXECUTED
10a04e: c3 ret <== NOT EXECUTED
10a04f: 90 nop <== 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);
10a050: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED
10a054: 89 da mov %ebx,%edx <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
10a056: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10a059: 5b pop %ebx <== NOT EXECUTED
10a05a: 5e pop %esi <== NOT EXECUTED
10a05b: 5f pop %edi <== NOT EXECUTED
10a05c: 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);
10a05d: e9 36 fe ff ff jmp 109e98 <echo> <== NOT EXECUTED
10a062: 66 90 xchg %ax,%ax <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
10a064: 57 push %edi <== NOT EXECUTED
10a065: 53 push %ebx <== NOT EXECUTED
10a066: 6a 03 push $0x3 <== NOT EXECUTED
10a068: 68 32 2b 12 00 push $0x122b32 <== NOT EXECUTED
10a06d: e8 b6 fb ff ff call 109c28 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
10a072: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
10a075: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a078: 85 c0 test %eax,%eax <== NOT EXECUTED
10a07a: 74 04 je 10a080 <erase+0x184> <== NOT EXECUTED
tty->column--;
10a07c: 48 dec %eax <== NOT EXECUTED
10a07d: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
10a080: a1 24 71 12 00 mov 0x127124,%eax <== NOT EXECUTED
10a085: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED
10a089: 0f 84 e6 fe ff ff je 109f75 <erase+0x79> <== NOT EXECUTED
10a08f: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED
10a093: 0f 85 dc fe ff ff jne 109f75 <erase+0x79> <== NOT EXECUTED
10a099: e9 92 fe ff ff jmp 109f30 <erase+0x34> <== NOT EXECUTED
10a09e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
10a0a0: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
10a0a7: 0f b6 40 44 movzbl 0x44(%eax),%eax <== NOT EXECUTED
10a0ab: 89 da mov %ebx,%edx <== NOT EXECUTED
10a0ad: e8 e6 fd ff ff call 109e98 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
10a0b2: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED
10a0b6: 0f 84 dc fe ff ff je 109f98 <erase+0x9c> <== NOT EXECUTED
echo ('\n', tty);
10a0bc: 89 da mov %ebx,%edx <== NOT EXECUTED
10a0be: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
10a0c3: eb 91 jmp 10a056 <erase+0x15a> <== NOT EXECUTED
0012ba14 <fat_buf_access>:
#include "fat_fat_operations.h"
int
fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type,
rtems_bdbuf_buffer **buf)
{
12ba14: 55 push %ebp <== NOT EXECUTED
12ba15: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12ba17: 57 push %edi <== NOT EXECUTED
12ba18: 56 push %esi <== NOT EXECUTED
12ba19: 53 push %ebx <== NOT EXECUTED
12ba1a: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
12ba1d: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
12ba20: 80 bb 81 00 00 00 00 cmpb $0x0,0x81(%ebx) <== NOT EXECUTED
12ba27: 0f 84 bf 00 00 00 je 12baec <fat_buf_access+0xd8> <== NOT EXECUTED
12ba2d: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
12ba30: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED
12ba34: 39 c2 cmp %eax,%edx <== NOT EXECUTED
12ba36: 0f 86 f9 00 00 00 jbe 12bb35 <fat_buf_access+0x121> <== NOT EXECUTED
12ba3c: 31 d2 xor %edx,%edx <== NOT EXECUTED
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.blk_num != blk)
12ba3e: 39 45 0c cmp %eax,0xc(%ebp) <== NOT EXECUTED
12ba41: 0f 84 8d 00 00 00 je 12bad4 <fat_buf_access+0xc0> <== NOT EXECUTED
{
if (fs_info->c.modified)
12ba47: 80 bb 80 00 00 00 00 cmpb $0x0,0x80(%ebx) <== NOT EXECUTED
12ba4e: 0f 84 ec 00 00 00 je 12bb40 <fat_buf_access+0x12c> <== NOT EXECUTED
{
if (sec_of_fat && !fs_info->vol.mirror)
12ba54: 84 d2 test %dl,%dl <== NOT EXECUTED
12ba56: 74 0a je 12ba62 <fat_buf_access+0x4e> <== NOT EXECUTED
12ba58: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED
12ba5c: 0f 84 b2 01 00 00 je 12bc14 <fat_buf_access+0x200> <== NOT EXECUTED
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
12ba62: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12ba65: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED
12ba6b: 88 55 d0 mov %dl,-0x30(%ebp) <== NOT EXECUTED
12ba6e: e8 89 f9 fd ff call 10b3fc <rtems_bdbuf_release_modified><== NOT EXECUTED
fs_info->c.state = FAT_CACHE_EMPTY;
12ba73: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED
fs_info->c.modified = 0;
12ba7a: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
12ba81: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12ba84: 85 c0 test %eax,%eax <== NOT EXECUTED
12ba86: 8a 55 d0 mov -0x30(%ebp),%dl <== NOT EXECUTED
12ba89: 0f 85 d1 00 00 00 jne 12bb60 <fat_buf_access+0x14c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
if (sec_of_fat && !fs_info->vol.mirror)
12ba8f: 84 d2 test %dl,%dl <== NOT EXECUTED
12ba91: 74 0a je 12ba9d <fat_buf_access+0x89> <== NOT EXECUTED
12ba93: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED
12ba97: 0f 84 fb 00 00 00 je 12bb98 <fat_buf_access+0x184> <== NOT EXECUTED
fs_info->c.state = FAT_CACHE_EMPTY;
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
12ba9d: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED
12baa1: 0f 84 89 01 00 00 je 12bc30 <fat_buf_access+0x21c> <== NOT EXECUTED
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
12baa7: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED
12baad: 50 push %eax <== NOT EXECUTED
12baae: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
12bab1: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED
12bab4: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
12bab7: e8 6c 09 fe ff call 10c428 <rtems_bdbuf_get> <== NOT EXECUTED
12babc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
12babf: 85 c0 test %eax,%eax <== NOT EXECUTED
12bac1: 0f 85 99 00 00 00 jne 12bb60 <fat_buf_access+0x14c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
12bac7: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
12baca: 89 43 7c mov %eax,0x7c(%ebx) <== NOT EXECUTED
fs_info->c.state = FAT_CACHE_ACTUAL;
12bacd: c6 83 81 00 00 00 01 movb $0x1,0x81(%ebx) <== NOT EXECUTED
}
*buf = fs_info->c.buf;
12bad4: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx <== NOT EXECUTED
12bada: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
12badd: 89 10 mov %edx,(%eax) <== NOT EXECUTED
12badf: 31 c0 xor %eax,%eax <== NOT EXECUTED
return RC_OK;
}
12bae1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12bae4: 5b pop %ebx <== NOT EXECUTED
12bae5: 5e pop %esi <== NOT EXECUTED
12bae6: 5f pop %edi <== NOT EXECUTED
12bae7: c9 leave <== NOT EXECUTED
12bae8: c3 ret <== NOT EXECUTED
12bae9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
{
if (op_type == FAT_OP_TYPE_READ)
12baec: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED
12baf0: 0f 84 82 00 00 00 je 12bb78 <fat_buf_access+0x164> <== NOT EXECUTED
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
12baf6: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED
12bafc: 50 push %eax <== NOT EXECUTED
12bafd: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
12bb00: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED
12bb03: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
12bb06: e8 1d 09 fe ff call 10c428 <rtems_bdbuf_get> <== NOT EXECUTED
12bb0b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
12bb0e: 85 c0 test %eax,%eax <== NOT EXECUTED
12bb10: 75 4e jne 12bb60 <fat_buf_access+0x14c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
12bb12: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
12bb15: 89 43 7c mov %eax,0x7c(%ebx) <== NOT EXECUTED
fs_info->c.modified = 0;
12bb18: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED
fs_info->c.state = FAT_CACHE_ACTUAL;
12bb1f: c6 83 81 00 00 00 01 movb $0x1,0x81(%ebx) <== NOT EXECUTED
12bb26: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
12bb29: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED
12bb2d: 39 c2 cmp %eax,%edx <== NOT EXECUTED
12bb2f: 0f 87 07 ff ff ff ja 12ba3c <fat_buf_access+0x28> <== NOT EXECUTED
12bb35: 39 43 1c cmp %eax,0x1c(%ebx) <== NOT EXECUTED
12bb38: 0f 97 c2 seta %dl <== NOT EXECUTED
12bb3b: e9 fe fe ff ff jmp 12ba3e <fat_buf_access+0x2a> <== NOT EXECUTED
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
12bb40: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12bb43: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED
12bb49: e8 2a f9 fd ff call 10b478 <rtems_bdbuf_release> <== NOT EXECUTED
fs_info->c.state = FAT_CACHE_EMPTY;
12bb4e: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
12bb55: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12bb58: 85 c0 test %eax,%eax <== NOT EXECUTED
12bb5a: 0f 84 3d ff ff ff je 12ba9d <fat_buf_access+0x89> <== NOT EXECUTED
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
12bb60: e8 1b c0 01 00 call 147b80 <__errno> <== NOT EXECUTED
12bb65: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
12bb6b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12bb70: e9 6c ff ff ff jmp 12bae1 <fat_buf_access+0xcd> <== NOT EXECUTED
12bb75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (fs_info->c.state == FAT_CACHE_EMPTY)
{
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
12bb78: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED
12bb7e: 50 push %eax <== NOT EXECUTED
12bb7f: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
12bb82: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED
12bb85: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
12bb88: e8 67 09 fe ff call 10c4f4 <rtems_bdbuf_read> <== NOT EXECUTED
12bb8d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12bb90: e9 79 ff ff ff jmp 12bb0e <fat_buf_access+0xfa> <== NOT EXECUTED
12bb95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
12bb98: 80 7b 09 01 cmpb $0x1,0x9(%ebx) <== NOT EXECUTED
12bb9c: 0f 86 fb fe ff ff jbe 12ba9d <fat_buf_access+0x89> <== NOT EXECUTED
12bba2: c6 45 d7 01 movb $0x1,-0x29(%ebp) <== NOT EXECUTED
12bba6: eb 34 jmp 12bbdc <fat_buf_access+0x1c8> <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
12bba8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
12bbab: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
12bbae: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED
12bbb1: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi <== NOT EXECUTED
12bbb7: 89 c7 mov %eax,%edi <== NOT EXECUTED
12bbb9: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
sc = rtems_bdbuf_release_modified(b);
12bbbb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12bbbe: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
12bbc1: e8 36 f8 fd ff call 10b3fc <rtems_bdbuf_release_modified><== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL)
12bbc6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12bbc9: 85 c0 test %eax,%eax <== NOT EXECUTED
12bbcb: 75 31 jne 12bbfe <fat_buf_access+0x1ea> <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
12bbcd: fe 45 d7 incb -0x29(%ebp) <== NOT EXECUTED
12bbd0: 8a 45 d7 mov -0x29(%ebp),%al <== NOT EXECUTED
12bbd3: 38 43 09 cmp %al,0x9(%ebx) <== NOT EXECUTED
12bbd6: 0f 86 c1 fe ff ff jbe 12ba9d <fat_buf_access+0x89> <== NOT EXECUTED
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
12bbdc: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12bbdf: 50 push %eax <== NOT EXECUTED
12bbe0: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED
12bbe4: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED
12bbe8: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
12bbeb: 50 push %eax <== NOT EXECUTED
12bbec: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED
12bbef: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
12bbf2: e8 31 08 fe ff call 10c428 <rtems_bdbuf_get> <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
12bbf7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12bbfa: 85 c0 test %eax,%eax <== NOT EXECUTED
12bbfc: 74 aa je 12bba8 <fat_buf_access+0x194> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
12bbfe: e8 7d bf 01 00 call 147b80 <__errno> <== NOT EXECUTED
12bc03: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
12bc09: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12bc0e: e9 ce fe ff ff jmp 12bae1 <fat_buf_access+0xcd> <== NOT EXECUTED
12bc13: 90 nop <== NOT EXECUTED
if (fs_info->c.blk_num != blk)
{
if (fs_info->c.modified)
{
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
12bc14: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED
12bc17: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED
12bc1d: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED
12bc20: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi <== NOT EXECUTED
12bc26: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
12bc28: e9 35 fe ff ff jmp 12ba62 <fat_buf_access+0x4e> <== NOT EXECUTED
12bc2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
12bc30: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED
12bc36: 50 push %eax <== NOT EXECUTED
12bc37: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
12bc3a: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED
12bc3d: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
12bc40: e8 af 08 fe ff call 10c4f4 <rtems_bdbuf_read> <== NOT EXECUTED
12bc45: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12bc48: e9 72 fe ff ff jmp 12babf <fat_buf_access+0xab> <== NOT EXECUTED
0012b8a4 <fat_buf_release>:
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
{
12b8a4: 55 push %ebp <== NOT EXECUTED
12b8a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12b8a7: 57 push %edi <== NOT EXECUTED
12b8a8: 56 push %esi <== NOT EXECUTED
12b8a9: 53 push %ebx <== NOT EXECUTED
12b8aa: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
12b8ad: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
12b8b0: 80 bb 81 00 00 00 00 cmpb $0x0,0x81(%ebx) <== NOT EXECUTED
12b8b7: 0f 84 f7 00 00 00 je 12b9b4 <fat_buf_release+0x110> <== NOT EXECUTED
return RC_OK;
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
12b8bd: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
12b8c0: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED
12b8c4: 39 d0 cmp %edx,%eax <== NOT EXECUTED
12b8c6: 0f 83 f4 00 00 00 jae 12b9c0 <fat_buf_release+0x11c> <== NOT EXECUTED
12b8cc: 31 d2 xor %edx,%edx <== NOT EXECUTED
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
12b8ce: 80 bb 80 00 00 00 00 cmpb $0x0,0x80(%ebx) <== NOT EXECUTED
12b8d5: 0f 84 bd 00 00 00 je 12b998 <fat_buf_release+0xf4> <== NOT EXECUTED
{
if (sec_of_fat && !fs_info->vol.mirror)
12b8db: 84 d2 test %dl,%dl <== NOT EXECUTED
12b8dd: 74 0a je 12b8e9 <fat_buf_release+0x45> <== NOT EXECUTED
12b8df: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED
12b8e3: 0f 84 e3 00 00 00 je 12b9cc <fat_buf_release+0x128> <== NOT EXECUTED
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
12b8e9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b8ec: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED
12b8f2: 88 55 d0 mov %dl,-0x30(%ebp) <== NOT EXECUTED
12b8f5: e8 02 fb fd ff call 10b3fc <rtems_bdbuf_release_modified><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
12b8fa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b8fd: 85 c0 test %eax,%eax <== NOT EXECUTED
12b8ff: 8a 55 d0 mov -0x30(%ebp),%dl <== NOT EXECUTED
12b902: 0f 85 df 00 00 00 jne 12b9e7 <fat_buf_release+0x143> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.modified = 0;
12b908: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
12b90f: 84 d2 test %dl,%dl <== NOT EXECUTED
12b911: 0f 84 96 00 00 00 je 12b9ad <fat_buf_release+0x109> <== NOT EXECUTED
12b917: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED
12b91b: 0f 85 8c 00 00 00 jne 12b9ad <fat_buf_release+0x109> <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
12b921: 80 7b 09 01 cmpb $0x1,0x9(%ebx) <== NOT EXECUTED
12b925: 0f 86 82 00 00 00 jbe 12b9ad <fat_buf_release+0x109> <== NOT EXECUTED
12b92b: c6 45 d7 01 movb $0x1,-0x29(%ebp) <== NOT EXECUTED
12b92f: eb 33 jmp 12b964 <fat_buf_release+0xc0> <== NOT EXECUTED
12b931: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
12b934: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
12b937: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
12b93a: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED
12b93d: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi <== NOT EXECUTED
12b943: 89 c7 mov %eax,%edi <== NOT EXECUTED
12b945: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
sc = rtems_bdbuf_release_modified(b);
12b947: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b94a: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
12b94d: e8 aa fa fd ff call 10b3fc <rtems_bdbuf_release_modified><== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL)
12b952: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b955: 85 c0 test %eax,%eax <== NOT EXECUTED
12b957: 75 2d jne 12b986 <fat_buf_release+0xe2> <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
12b959: fe 45 d7 incb -0x29(%ebp) <== NOT EXECUTED
12b95c: 8a 45 d7 mov -0x29(%ebp),%al <== NOT EXECUTED
12b95f: 38 43 09 cmp %al,0x9(%ebx) <== NOT EXECUTED
12b962: 76 49 jbe 12b9ad <fat_buf_release+0x109> <== NOT EXECUTED
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
12b964: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12b967: 50 push %eax <== NOT EXECUTED
12b968: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED
12b96c: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED
12b970: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
12b973: 50 push %eax <== NOT EXECUTED
12b974: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED
12b977: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
12b97a: e8 a9 0a fe ff call 10c428 <rtems_bdbuf_get> <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
12b97f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b982: 85 c0 test %eax,%eax <== NOT EXECUTED
12b984: 74 ae je 12b934 <fat_buf_release+0x90> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
12b986: e8 f5 c1 01 00 call 147b80 <__errno> <== NOT EXECUTED
12b98b: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
12b991: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12b996: eb 1e jmp 12b9b6 <fat_buf_release+0x112> <== NOT EXECUTED
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
12b998: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b99b: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED
12b9a1: e8 d2 fa fd ff call 10b478 <rtems_bdbuf_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
12b9a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b9a9: 85 c0 test %eax,%eax <== NOT EXECUTED
12b9ab: 75 3a jne 12b9e7 <fat_buf_release+0x143> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
}
fs_info->c.state = FAT_CACHE_EMPTY;
12b9ad: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED
12b9b4: 31 c0 xor %eax,%eax <== NOT EXECUTED
return RC_OK;
}
12b9b6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12b9b9: 5b pop %ebx <== NOT EXECUTED
12b9ba: 5e pop %esi <== NOT EXECUTED
12b9bb: 5f pop %edi <== NOT EXECUTED
12b9bc: c9 leave <== NOT EXECUTED
12b9bd: c3 ret <== NOT EXECUTED
12b9be: 66 90 xchg %ax,%ax <== NOT EXECUTED
*buf = fs_info->c.buf;
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
12b9c0: 3b 43 1c cmp 0x1c(%ebx),%eax <== NOT EXECUTED
12b9c3: 0f 92 c2 setb %dl <== NOT EXECUTED
12b9c6: e9 03 ff ff ff jmp 12b8ce <fat_buf_release+0x2a> <== NOT EXECUTED
12b9cb: 90 nop <== NOT EXECUTED
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
{
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
12b9cc: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax <== NOT EXECUTED
12b9d2: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED
12b9d5: 8b b3 84 00 00 00 mov 0x84(%ebx),%esi <== NOT EXECUTED
12b9db: 8b 76 20 mov 0x20(%esi),%esi <== NOT EXECUTED
12b9de: 89 c7 mov %eax,%edi <== NOT EXECUTED
12b9e0: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
12b9e2: e9 02 ff ff ff jmp 12b8e9 <fat_buf_release+0x45> <== NOT EXECUTED
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
12b9e7: e8 94 c1 01 00 call 147b80 <__errno> <== NOT EXECUTED
12b9ec: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
12b9f2: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12b9f7: eb bd jmp 12b9b6 <fat_buf_release+0x112> <== NOT EXECUTED
0012c718 <fat_cluster_read>:
fat_cluster_read(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
void *buff
)
{
12c718: 55 push %ebp <== NOT EXECUTED
12c719: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12c71b: 56 push %esi <== NOT EXECUTED
12c71c: 53 push %ebx <== NOT EXECUTED
12c71d: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
12c720: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
12c723: 8b 46 34 mov 0x34(%esi),%eax <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12c726: 85 d2 test %edx,%edx <== NOT EXECUTED
12c728: 75 06 jne 12c730 <fat_cluster_read+0x18> <== NOT EXECUTED
12c72a: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED
12c72e: 75 30 jne 12c760 <fat_cluster_read+0x48> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
12c730: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED
12c733: 0f b6 48 05 movzbl 0x5(%eax),%ecx <== NOT EXECUTED
12c737: d3 e2 shl %cl,%edx <== NOT EXECUTED
12c739: 03 50 30 add 0x30(%eax),%edx <== NOT EXECUTED
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
12c73c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c73f: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
12c742: 0f b6 58 04 movzbl 0x4(%eax),%ebx <== NOT EXECUTED
12c746: 0f b6 48 02 movzbl 0x2(%eax),%ecx <== NOT EXECUTED
12c74a: d3 e3 shl %cl,%ebx <== NOT EXECUTED
12c74c: 53 push %ebx <== NOT EXECUTED
12c74d: 6a 00 push $0x0 <== NOT EXECUTED
12c74f: 52 push %edx <== NOT EXECUTED
12c750: 56 push %esi <== NOT EXECUTED
12c751: e8 46 f8 ff ff call 12bf9c <_fat_block_read> <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
}
12c756: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
12c759: 5b pop %ebx <== NOT EXECUTED
12c75a: 5e pop %esi <== NOT EXECUTED
12c75b: c9 leave <== NOT EXECUTED
12c75c: c3 ret <== NOT EXECUTED
12c75d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
12c760: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
12c763: eb d7 jmp 12c73c <fat_cluster_read+0x24> <== NOT EXECUTED
0012be90 <fat_cluster_write>:
fat_cluster_write(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
const void *buff
)
{
12be90: 55 push %ebp <== NOT EXECUTED
12be91: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12be93: 56 push %esi <== NOT EXECUTED
12be94: 53 push %ebx <== NOT EXECUTED
12be95: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
12be98: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
12be9b: 8b 46 34 mov 0x34(%esi),%eax <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12be9e: 85 d2 test %edx,%edx <== NOT EXECUTED
12bea0: 75 06 jne 12bea8 <fat_cluster_write+0x18><== NOT EXECUTED
12bea2: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED
12bea6: 75 30 jne 12bed8 <fat_cluster_write+0x48><== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
12bea8: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED
12beab: 0f b6 48 05 movzbl 0x5(%eax),%ecx <== NOT EXECUTED
12beaf: d3 e2 shl %cl,%edx <== NOT EXECUTED
12beb1: 03 50 30 add 0x30(%eax),%edx <== NOT EXECUTED
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
12beb4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12beb7: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
12beba: 0f b6 58 04 movzbl 0x4(%eax),%ebx <== NOT EXECUTED
12bebe: 0f b6 48 02 movzbl 0x2(%eax),%ecx <== NOT EXECUTED
12bec2: d3 e3 shl %cl,%ebx <== NOT EXECUTED
12bec4: 53 push %ebx <== NOT EXECUTED
12bec5: 6a 00 push $0x0 <== NOT EXECUTED
12bec7: 52 push %edx <== NOT EXECUTED
12bec8: 56 push %esi <== NOT EXECUTED
12bec9: e8 82 fd ff ff call 12bc50 <_fat_block_write> <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
}
12bece: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
12bed1: 5b pop %ebx <== NOT EXECUTED
12bed2: 5e pop %esi <== NOT EXECUTED
12bed3: c9 leave <== NOT EXECUTED
12bed4: c3 ret <== NOT EXECUTED
12bed5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
12bed8: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
12bedb: eb d7 jmp 12beb4 <fat_cluster_write+0x24><== NOT EXECUTED
0012bd00 <fat_fat32_update_fsinfo_sector>:
fat_fat32_update_fsinfo_sector(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t free_count,
uint32_t next_free
)
{
12bd00: 55 push %ebp <== NOT EXECUTED
12bd01: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12bd03: 57 push %edi <== NOT EXECUTED
12bd04: 56 push %esi <== NOT EXECUTED
12bd05: 53 push %ebx <== NOT EXECUTED
12bd06: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED
12bd09: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
12bd0c: 8b 73 34 mov 0x34(%ebx),%esi <== NOT EXECUTED
uint32_t le_free_count = 0;
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
12bd0f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
12bd12: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
le_next_free = CT_LE_L(next_free);
12bd15: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
12bd18: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
ret1 = _fat_block_write(mt_entry,
12bd1b: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12bd1e: 50 push %eax <== NOT EXECUTED
12bd1f: 6a 04 push $0x4 <== NOT EXECUTED
12bd21: 68 e8 01 00 00 push $0x1e8 <== NOT EXECUTED
12bd26: 0f b7 46 3c movzwl 0x3c(%esi),%eax <== NOT EXECUTED
12bd2a: 50 push %eax <== NOT EXECUTED
12bd2b: 53 push %ebx <== NOT EXECUTED
12bd2c: e8 1f ff ff ff call 12bc50 <_fat_block_write> <== NOT EXECUTED
12bd31: 89 c7 mov %eax,%edi <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
4,
(char *)(&le_free_count));
ret2 = _fat_block_write(mt_entry,
12bd33: 83 c4 14 add $0x14,%esp <== NOT EXECUTED
12bd36: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
12bd39: 50 push %eax <== NOT EXECUTED
12bd3a: 6a 04 push $0x4 <== NOT EXECUTED
12bd3c: 68 ec 01 00 00 push $0x1ec <== NOT EXECUTED
12bd41: 0f b7 46 3c movzwl 0x3c(%esi),%eax <== NOT EXECUTED
12bd45: 50 push %eax <== NOT EXECUTED
12bd46: 53 push %ebx <== NOT EXECUTED
12bd47: e8 04 ff ff ff call 12bc50 <_fat_block_write> <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET,
4,
(char *)(&le_next_free));
if ( (ret1 < 0) || (ret2 < 0) )
12bd4c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12bd4f: 85 ff test %edi,%edi <== NOT EXECUTED
12bd51: 79 0d jns 12bd60 <fat_fat32_update_fsinfo_sector+0x60><== NOT EXECUTED
12bd53: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
return RC_OK;
}
12bd58: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12bd5b: 5b pop %ebx <== NOT EXECUTED
12bd5c: 5e pop %esi <== NOT EXECUTED
12bd5d: 5f pop %edi <== NOT EXECUTED
12bd5e: c9 leave <== NOT EXECUTED
12bd5f: c3 ret <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET,
4,
(char *)(&le_next_free));
if ( (ret1 < 0) || (ret2 < 0) )
12bd60: 85 c0 test %eax,%eax <== NOT EXECUTED
12bd62: 78 ef js 12bd53 <fat_fat32_update_fsinfo_sector+0x53><== NOT EXECUTED
12bd64: 31 c0 xor %eax,%eax <== NOT EXECUTED
12bd66: eb f0 jmp 12bd58 <fat_fat32_update_fsinfo_sector+0x58><== NOT EXECUTED
0012b4b0 <fat_file_close>:
int
fat_file_close(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
12b4b0: 55 push %ebp <== NOT EXECUTED
12b4b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12b4b3: 57 push %edi <== NOT EXECUTED
12b4b4: 56 push %esi <== NOT EXECUTED
12b4b5: 53 push %ebx <== NOT EXECUTED
12b4b6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b4b9: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
12b4bc: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
12b4bf: 8b 7e 34 mov 0x34(%esi),%edi <== NOT EXECUTED
/*
* if links_num field of fat-file descriptor is greater than 1
* decrement the count of links and return
*/
if (fat_fd->links_num > 1)
12b4c2: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
12b4c5: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
12b4c8: 76 0e jbe 12b4d8 <fat_file_close+0x28> <== NOT EXECUTED
{
fat_fd->links_num--;
12b4ca: 48 dec %eax <== NOT EXECUTED
12b4cb: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
12b4ce: 31 c0 xor %eax,%eax <== NOT EXECUTED
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
return rc;
}
12b4d0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12b4d3: 5b pop %ebx <== NOT EXECUTED
12b4d4: 5e pop %esi <== NOT EXECUTED
12b4d5: 5f pop %edi <== NOT EXECUTED
12b4d6: c9 leave <== NOT EXECUTED
12b4d7: c3 ret <== NOT EXECUTED
return rc;
}
key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname);
if (fat_fd->flags & FAT_FILE_REMOVED)
12b4d8: f6 43 30 01 testb $0x1,0x30(%ebx) <== NOT EXECUTED
12b4dc: 74 3a je 12b518 <fat_file_close+0x68> <== NOT EXECUTED
{
rc = fat_file_truncate(mt_entry, fat_fd, 0);
12b4de: 51 push %ecx <== NOT EXECUTED
12b4df: 6a 00 push $0x0 <== NOT EXECUTED
12b4e1: 53 push %ebx <== NOT EXECUTED
12b4e2: 56 push %esi <== NOT EXECUTED
12b4e3: e8 a4 f8 ff ff call 12ad8c <fat_file_truncate> <== NOT EXECUTED
if ( rc != RC_OK )
12b4e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b4eb: 85 c0 test %eax,%eax <== NOT EXECUTED
12b4ed: 75 e1 jne 12b4d0 <fat_file_close+0x20> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
12b4ef: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b4f2: 53 push %ebx <== NOT EXECUTED
12b4f3: e8 88 85 fe ff call 113a80 <_Chain_Extract> <== NOT EXECUTED
return rc;
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
if ( fat_ino_is_unique(mt_entry, fat_fd->ino) )
12b4f8: 58 pop %eax <== NOT EXECUTED
12b4f9: 5a pop %edx <== NOT EXECUTED
12b4fa: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
12b4fd: 56 push %esi <== NOT EXECUTED
12b4fe: e8 bd 02 00 00 call 12b7c0 <fat_ino_is_unique> <== NOT EXECUTED
12b503: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b506: 84 c0 test %al,%al <== NOT EXECUTED
12b508: 75 52 jne 12b55c <fat_file_close+0xac> <== NOT EXECUTED
fat_free_unique_ino(mt_entry, fat_fd->ino);
free(fat_fd);
12b50a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b50d: 53 push %ebx <== NOT EXECUTED
12b50e: e8 55 33 fe ff call 10e868 <free> <== NOT EXECUTED
12b513: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b516: eb 1a jmp 12b532 <fat_file_close+0x82> <== NOT EXECUTED
}
else
{
if (fat_ino_is_unique(mt_entry, fat_fd->ino))
12b518: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12b51b: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
12b51e: 56 push %esi <== NOT EXECUTED
12b51f: e8 9c 02 00 00 call 12b7c0 <fat_ino_is_unique> <== NOT EXECUTED
12b524: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b527: 84 c0 test %al,%al <== NOT EXECUTED
12b529: 74 19 je 12b544 <fat_file_close+0x94> <== NOT EXECUTED
{
fat_fd->links_num = 0;
12b52b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
12b532: 89 7d 08 mov %edi,0x8(%ebp) <== NOT EXECUTED
return rc;
}
12b535: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12b538: 5b pop %ebx <== NOT EXECUTED
12b539: 5e pop %esi <== NOT EXECUTED
12b53a: 5f pop %edi <== NOT EXECUTED
12b53b: c9 leave <== NOT EXECUTED
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
12b53c: e9 63 03 00 00 jmp 12b8a4 <fat_buf_release> <== NOT EXECUTED
12b541: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
12b544: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b547: 53 push %ebx <== NOT EXECUTED
12b548: e8 33 85 fe ff call 113a80 <_Chain_Extract> <== NOT EXECUTED
fat_fd->links_num = 0;
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
12b54d: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
12b550: e8 13 33 fe ff call 10e868 <free> <== NOT EXECUTED
12b555: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b558: eb d8 jmp 12b532 <fat_file_close+0x82> <== NOT EXECUTED
12b55a: 66 90 xchg %ax,%ax <== NOT EXECUTED
return rc;
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
if ( fat_ino_is_unique(mt_entry, fat_fd->ino) )
fat_free_unique_ino(mt_entry, fat_fd->ino);
12b55c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12b55f: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
12b562: 56 push %esi <== NOT EXECUTED
12b563: e8 30 02 00 00 call 12b798 <fat_free_unique_ino> <== NOT EXECUTED
12b568: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b56b: eb 9d jmp 12b50a <fat_file_close+0x5a> <== NOT EXECUTED
0012ab8c <fat_file_datasync>:
int
fat_file_datasync(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
12ab8c: 55 push %ebp <== NOT EXECUTED
12ab8d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12ab8f: 57 push %edi <== NOT EXECUTED
12ab90: 56 push %esi <== NOT EXECUTED
12ab91: 53 push %ebx <== NOT EXECUTED
12ab92: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
12ab95: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
12ab98: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
12ab9b: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED
uint32_t cur_cln = fat_fd->cln;
12ab9e: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
uint32_t sec = 0;
uint32_t i = 0;
if (fat_fd->fat_file_size == 0)
12aba1: 8b 78 18 mov 0x18(%eax),%edi <== NOT EXECUTED
12aba4: 85 ff test %edi,%edi <== NOT EXECUTED
12aba6: 75 0c jne 12abb4 <fat_file_datasync+0x28><== NOT EXECUTED
12aba8: 31 c0 xor %eax,%eax <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
}
return rc;
}
12abaa: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12abad: 5b pop %ebx <== NOT EXECUTED
12abae: 5e pop %esi <== NOT EXECUTED
12abaf: 5f pop %edi <== NOT EXECUTED
12abb0: c9 leave <== NOT EXECUTED
12abb1: c3 ret <== NOT EXECUTED
12abb2: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
rtems_bdbuf_buffer *block = NULL;
12abb4: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
12abbb: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
/*
* we can use only one bdbuf :( and we also know that cache is useless
* for sync operation, so don't use it
*/
rc = fat_buf_release(fs_info);
12abbe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12abc1: 53 push %ebx <== NOT EXECUTED
12abc2: e8 dd 0c 00 00 call 12b8a4 <fat_buf_release> <== NOT EXECUTED
12abc7: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
if (rc != RC_OK)
12abca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12abcd: 85 c0 test %eax,%eax <== NOT EXECUTED
12abcf: 0f 85 97 00 00 00 jne 12ac6c <fat_file_datasync+0xe0><== NOT EXECUTED
12abd5: 8d 7d e0 lea -0x20(%ebp),%edi <== NOT EXECUTED
return rc;
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
12abd8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
12abdb: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
12abde: 21 c2 and %eax,%edx <== NOT EXECUTED
12abe0: 3b 53 10 cmp 0x10(%ebx),%edx <== NOT EXECUTED
12abe3: 0f 83 83 00 00 00 jae 12ac6c <fat_file_datasync+0xe0><== NOT EXECUTED
fat_cluster_num_to_sector_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
12abe9: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
12abec: 8b 51 34 mov 0x34(%ecx),%edx <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12abef: 85 c0 test %eax,%eax <== NOT EXECUTED
12abf1: 74 6d je 12ac60 <fat_file_datasync+0xd4><== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
12abf3: 8d 70 fe lea -0x2(%eax),%esi <== NOT EXECUTED
12abf6: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED
12abfa: d3 e6 shl %cl,%esi <== NOT EXECUTED
12abfc: 03 72 30 add 0x30(%edx),%esi <== NOT EXECUTED
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
12abff: 80 7b 04 00 cmpb $0x0,0x4(%ebx) <== NOT EXECUTED
12ac03: 74 76 je 12ac7b <fat_file_datasync+0xef><== NOT EXECUTED
12ac05: 31 c0 xor %eax,%eax <== NOT EXECUTED
12ac07: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED
12ac0a: 89 c6 mov %eax,%esi <== NOT EXECUTED
12ac0c: eb 1d jmp 12ac2b <fat_file_datasync+0x9f><== NOT EXECUTED
12ac0e: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
12ac10: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12ac13: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
12ac16: e8 65 11 fe ff call 10bd80 <rtems_bdbuf_sync> <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL )
12ac1b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12ac1e: 85 c0 test %eax,%eax <== NOT EXECUTED
12ac20: 75 23 jne 12ac45 <fat_file_datasync+0xb9><== NOT EXECUTED
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
12ac22: 46 inc %esi <== NOT EXECUTED
12ac23: 0f b6 43 04 movzbl 0x4(%ebx),%eax <== NOT EXECUTED
12ac27: 39 f0 cmp %esi,%eax <== NOT EXECUTED
12ac29: 76 4d jbe 12ac78 <fat_file_datasync+0xec><== NOT EXECUTED
{
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
12ac2b: 57 push %edi <== NOT EXECUTED
12ac2c: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
12ac2f: 8d 04 16 lea (%esi,%edx,1),%eax <== NOT EXECUTED
12ac32: 50 push %eax <== NOT EXECUTED
12ac33: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED
12ac36: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
12ac39: e8 b6 18 fe ff call 10c4f4 <rtems_bdbuf_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
12ac3e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12ac41: 85 c0 test %eax,%eax <== NOT EXECUTED
12ac43: 74 cb je 12ac10 <fat_file_datasync+0x84><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
12ac45: e8 36 cf 01 00 call 147b80 <__errno> <== NOT EXECUTED
12ac4a: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
12ac50: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
}
return rc;
}
12ac55: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12ac58: 5b pop %ebx <== NOT EXECUTED
12ac59: 5e pop %esi <== NOT EXECUTED
12ac5a: 5f pop %edi <== NOT EXECUTED
12ac5b: c9 leave <== NOT EXECUTED
12ac5c: c3 ret <== NOT EXECUTED
12ac5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12ac60: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED
12ac64: 74 8d je 12abf3 <fat_file_datasync+0x67><== NOT EXECUTED
return fs_info->vol.rdir_loc;
12ac66: 8b 72 1c mov 0x1c(%edx),%esi <== NOT EXECUTED
12ac69: eb 94 jmp 12abff <fat_file_datasync+0x73><== NOT EXECUTED
12ac6b: 90 nop <== NOT EXECUTED
rc = fat_buf_release(fs_info);
if (rc != RC_OK)
return rc;
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
12ac6c: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
}
return rc;
}
12ac6f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12ac72: 5b pop %ebx <== NOT EXECUTED
12ac73: 5e pop %esi <== NOT EXECUTED
12ac74: 5f pop %edi <== NOT EXECUTED
12ac75: c9 leave <== NOT EXECUTED
12ac76: c3 ret <== NOT EXECUTED
12ac77: 90 nop <== NOT EXECUTED
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
12ac78: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
12ac7b: 56 push %esi <== NOT EXECUTED
12ac7c: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED
12ac7f: 51 push %ecx <== NOT EXECUTED
12ac80: 50 push %eax <== NOT EXECUTED
12ac81: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12ac84: e8 a3 89 01 00 call 14362c <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
12ac89: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12ac8c: 85 c0 test %eax,%eax <== NOT EXECUTED
12ac8e: 0f 84 44 ff ff ff je 12abd8 <fat_file_datasync+0x4c><== NOT EXECUTED
12ac94: e9 11 ff ff ff jmp 12abaa <fat_file_datasync+0x1e><== NOT EXECUTED
0012ae6c <fat_file_extend>:
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length,
uint32_t *a_length
)
{
12ae6c: 55 push %ebp <== NOT EXECUTED
12ae6d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12ae6f: 57 push %edi <== NOT EXECUTED
12ae70: 56 push %esi <== NOT EXECUTED
12ae71: 53 push %ebx <== NOT EXECUTED
12ae72: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
12ae75: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
12ae78: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
12ae7b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12ae7e: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED
uint32_t chain = 0;
12ae81: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
uint32_t bytes2add = 0;
uint32_t cls2add = 0;
uint32_t old_last_cl;
uint32_t last_cl = 0;
12ae88: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
uint32_t bytes_remain = 0;
uint32_t cls_added;
*a_length = new_length;
12ae8f: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
12ae92: 89 39 mov %edi,(%ecx) <== NOT EXECUTED
if (new_length <= fat_fd->fat_file_size)
12ae94: 8b 43 18 mov 0x18(%ebx),%eax <== NOT EXECUTED
12ae97: 39 c7 cmp %eax,%edi <== NOT EXECUTED
12ae99: 0f 86 d5 00 00 00 jbe 12af74 <fat_file_extend+0x108> <== NOT EXECUTED
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
12ae9f: 83 7b 20 01 cmpl $0x1,0x20(%ebx) <== NOT EXECUTED
12aea3: 0f 84 d7 00 00 00 je 12af80 <fat_file_extend+0x114> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
12aea9: 0f b7 56 06 movzwl 0x6(%esi),%edx <== NOT EXECUTED
12aead: 8d 4a ff lea -0x1(%edx),%ecx <== NOT EXECUTED
12aeb0: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
12aeb3: 21 c1 and %eax,%ecx <== NOT EXECUTED
12aeb5: 29 ca sub %ecx,%edx <== NOT EXECUTED
12aeb7: 23 55 c4 and -0x3c(%ebp),%edx <== NOT EXECUTED
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
12aeba: 89 f9 mov %edi,%ecx <== NOT EXECUTED
12aebc: 29 c1 sub %eax,%ecx <== NOT EXECUTED
12aebe: 89 c8 mov %ecx,%eax <== NOT EXECUTED
if (bytes2add > bytes_remain)
12aec0: 39 ca cmp %ecx,%edx <== NOT EXECUTED
12aec2: 0f 83 ac 00 00 00 jae 12af74 <fat_file_extend+0x108> <== NOT EXECUTED
/*
* if in last cluster allocated for the file there is enough room to
* handle extention (hence we don't need to add even one cluster to the
* file ) - return
*/
if (bytes2add == 0)
12aec8: 29 d0 sub %edx,%eax <== NOT EXECUTED
12aeca: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
12aecd: 0f 84 a1 00 00 00 je 12af74 <fat_file_extend+0x108> <== NOT EXECUTED
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
12aed3: 48 dec %eax <== NOT EXECUTED
12aed4: 0f b6 4e 08 movzbl 0x8(%esi),%ecx <== NOT EXECUTED
12aed8: d3 e8 shr %cl,%eax <== NOT EXECUTED
12aeda: 8d 48 01 lea 0x1(%eax),%ecx <== NOT EXECUTED
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
12aedd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12aee0: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
12aee3: 50 push %eax <== NOT EXECUTED
12aee4: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
12aee7: 50 push %eax <== NOT EXECUTED
12aee8: 51 push %ecx <== NOT EXECUTED
12aee9: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12aeec: 50 push %eax <== NOT EXECUTED
12aeed: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12aef0: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
12aef3: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED
12aef6: e8 91 89 01 00 call 14388c <fat_scan_fat_for_free_clusters><== NOT EXECUTED
&cls_added, &last_cl);
/* this means that low level I/O error occured */
if (rc != RC_OK)
12aefb: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12aefe: 85 c0 test %eax,%eax <== NOT EXECUTED
12af00: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
12af03: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
12af06: 0f 85 9c 00 00 00 jne 12afa8 <fat_file_extend+0x13c> <== NOT EXECUTED
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
12af0c: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED
12af0f: 85 c0 test %eax,%eax <== NOT EXECUTED
12af11: 75 04 jne 12af17 <fat_file_extend+0xab> <== NOT EXECUTED
12af13: 85 d2 test %edx,%edx <== NOT EXECUTED
12af15: 74 7e je 12af95 <fat_file_extend+0x129> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
12af17: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
12af19: 74 1d je 12af38 <fat_file_extend+0xcc> <== NOT EXECUTED
*a_length = new_length -
12af1b: f7 d0 not %eax <== NOT EXECUTED
12af1d: 01 c8 add %ecx,%eax <== NOT EXECUTED
12af1f: 0f b6 4e 08 movzbl 0x8(%esi),%ecx <== NOT EXECUTED
12af23: d3 e0 shl %cl,%eax <== NOT EXECUTED
12af25: 89 f9 mov %edi,%ecx <== NOT EXECUTED
12af27: 29 c1 sub %eax,%ecx <== NOT EXECUTED
12af29: 0f b7 46 06 movzwl 0x6(%esi),%eax <== NOT EXECUTED
12af2d: 48 dec %eax <== NOT EXECUTED
12af2e: 23 45 d4 and -0x2c(%ebp),%eax <== NOT EXECUTED
12af31: 29 c1 sub %eax,%ecx <== NOT EXECUTED
12af33: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
12af36: 89 08 mov %ecx,(%eax) <== NOT EXECUTED
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
(bytes2add & (fs_info->vol.bpc - 1));
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
12af38: 8b 43 18 mov 0x18(%ebx),%eax <== NOT EXECUTED
12af3b: 85 c0 test %eax,%eax <== NOT EXECUTED
12af3d: 75 6d jne 12afac <fat_file_extend+0x140> <== NOT EXECUTED
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
12af3f: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
12af42: 89 43 1c mov %eax,0x1c(%ebx) <== NOT EXECUTED
12af45: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED
fat_fd->map.file_cln = 0;
12af48: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) <== NOT EXECUTED
}
fat_buf_release(fs_info);
}
/* update number of the last cluster of the file if it changed */
if (cls_added != 0)
12af4f: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED
12af52: 85 d2 test %edx,%edx <== NOT EXECUTED
12af54: 74 0c je 12af62 <fat_file_extend+0xf6> <== NOT EXECUTED
{
fat_fd->map.last_cln = last_cl;
12af56: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
12af59: 89 43 3c mov %eax,0x3c(%ebx) <== NOT EXECUTED
if (fat_fd->fat_file_type == FAT_DIRECTORY)
12af5c: 83 7b 10 01 cmpl $0x1,0x10(%ebx) <== NOT EXECUTED
12af60: 74 7c je 12afde <fat_file_extend+0x172> <== NOT EXECUTED
return rc;
}
}
}
fat_fd->fat_file_size = new_length;
12af62: 89 7b 18 mov %edi,0x18(%ebx) <== NOT EXECUTED
12af65: 31 d2 xor %edx,%edx <== NOT EXECUTED
return RC_OK;
}
12af67: 89 d0 mov %edx,%eax <== NOT EXECUTED
12af69: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12af6c: 5b pop %ebx <== NOT EXECUTED
12af6d: 5e pop %esi <== NOT EXECUTED
12af6e: 5f pop %edi <== NOT EXECUTED
12af6f: c9 leave <== NOT EXECUTED
12af70: c3 ret <== NOT EXECUTED
12af71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
}
fat_fd->fat_file_size = new_length;
return RC_OK;
12af74: 31 d2 xor %edx,%edx <== NOT EXECUTED
}
12af76: 89 d0 mov %edx,%eax <== NOT EXECUTED
12af78: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12af7b: 5b pop %ebx <== NOT EXECUTED
12af7c: 5e pop %esi <== NOT EXECUTED
12af7d: 5f pop %edi <== NOT EXECUTED
12af7e: c9 leave <== NOT EXECUTED
12af7f: c3 ret <== NOT EXECUTED
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
12af80: 8b 53 24 mov 0x24(%ebx),%edx <== NOT EXECUTED
12af83: 85 d2 test %edx,%edx <== NOT EXECUTED
12af85: 0f 85 1e ff ff ff jne 12aea9 <fat_file_extend+0x3d> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
12af8b: f6 46 0a 03 testb $0x3,0xa(%esi) <== NOT EXECUTED
12af8f: 0f 84 14 ff ff ff je 12aea9 <fat_file_extend+0x3d> <== NOT EXECUTED
if (rc != RC_OK)
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
rtems_set_errno_and_return_minus_one(ENOSPC);
12af95: e8 e6 cb 01 00 call 147b80 <__errno> <== NOT EXECUTED
12af9a: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
12afa0: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
12afa5: eb cf jmp 12af76 <fat_file_extend+0x10a> <== NOT EXECUTED
12afa7: 90 nop <== NOT EXECUTED
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
&cls_added, &last_cl);
/* this means that low level I/O error occured */
if (rc != RC_OK)
12afa8: 89 c2 mov %eax,%edx <== NOT EXECUTED
12afaa: eb ca jmp 12af76 <fat_file_extend+0x10a> <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln = chain;
fat_fd->map.file_cln = 0;
}
else
{
if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE)
12afac: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED
12afaf: 83 fa ff cmp $0xffffffff,%edx <== NOT EXECUTED
12afb2: 74 64 je 12b018 <fat_file_extend+0x1ac> <== NOT EXECUTED
{
old_last_cl = fat_fd->map.last_cln;
12afb4: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
}
rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain);
12afb7: 51 push %ecx <== NOT EXECUTED
12afb8: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
12afbb: 52 push %edx <== NOT EXECUTED
12afbc: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12afbf: e8 40 84 01 00 call 143404 <fat_set_fat_cluster> <== NOT EXECUTED
12afc4: 89 c2 mov %eax,%edx <== NOT EXECUTED
if ( rc != RC_OK )
12afc6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12afc9: 85 c0 test %eax,%eax <== NOT EXECUTED
12afcb: 75 2f jne 12affc <fat_file_extend+0x190> <== NOT EXECUTED
{
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
fat_buf_release(fs_info);
12afcd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12afd0: 56 push %esi <== NOT EXECUTED
12afd1: e8 ce 08 00 00 call 12b8a4 <fat_buf_release> <== NOT EXECUTED
12afd6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12afd9: e9 71 ff ff ff jmp 12af4f <fat_file_extend+0xe3> <== NOT EXECUTED
if (cls_added != 0)
{
fat_fd->map.last_cln = last_cl;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
{
rc = fat_init_clusters_chain(mt_entry, chain);
12afde: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12afe1: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
12afe4: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12afe7: e8 f4 0e 00 00 call 12bee0 <fat_init_clusters_chain><== NOT EXECUTED
12afec: 89 c2 mov %eax,%edx <== NOT EXECUTED
if ( rc != RC_OK )
12afee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12aff1: 85 c0 test %eax,%eax <== NOT EXECUTED
12aff3: 0f 84 69 ff ff ff je 12af62 <fat_file_extend+0xf6> <== NOT EXECUTED
12aff9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
fat_free_fat_clusters_chain(mt_entry, chain);
12affc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12afff: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
12b002: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12b005: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
12b008: e8 a3 87 01 00 call 1437b0 <fat_free_fat_clusters_chain><== NOT EXECUTED
return rc;
12b00d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b010: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
12b013: e9 5e ff ff ff jmp 12af76 <fat_file_extend+0x10a> <== NOT EXECUTED
{
old_last_cl = fat_fd->map.last_cln;
}
else
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
12b018: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b01b: 8d 55 e0 lea -0x20(%ebp),%edx <== NOT EXECUTED
12b01e: 52 push %edx <== NOT EXECUTED
12b01f: 48 dec %eax <== NOT EXECUTED
12b020: 50 push %eax <== NOT EXECUTED
12b021: 6a 01 push $0x1 <== NOT EXECUTED
12b023: 53 push %ebx <== NOT EXECUTED
12b024: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12b027: e8 c4 fc ff ff call 12acf0 <fat_file_ioctl> <== NOT EXECUTED
12b02c: 89 c2 mov %eax,%edx <== NOT EXECUTED
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
12b02e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12b031: 85 c0 test %eax,%eax <== NOT EXECUTED
12b033: 75 c7 jne 12affc <fat_file_extend+0x190> <== NOT EXECUTED
{
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
12b035: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
12b038: e9 7a ff ff ff jmp 12afb7 <fat_file_extend+0x14b> <== NOT EXECUTED
0012acf0 <fat_file_ioctl>:
fat_file_ioctl(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
int cmd,
...)
{
12acf0: 55 push %ebp <== NOT EXECUTED
12acf1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12acf3: 56 push %esi <== NOT EXECUTED
12acf4: 53 push %ebx <== NOT EXECUTED
12acf5: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
12acf8: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12acfb: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
12acfe: 8b 48 34 mov 0x34(%eax),%ecx <== NOT EXECUTED
uint32_t cur_cln = 0;
12ad01: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
switch (cmd)
12ad08: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED
12ad0c: 74 1a je 12ad28 <fat_file_ioctl+0x38> <== NOT EXECUTED
*ret = cur_cln;
break;
default:
errno = EINVAL;
12ad0e: e8 6d ce 01 00 call 147b80 <__errno> <== NOT EXECUTED
12ad13: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
12ad19: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
12ad1e: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
12ad21: 5b pop %ebx <== NOT EXECUTED
12ad22: 5e pop %esi <== NOT EXECUTED
12ad23: c9 leave <== NOT EXECUTED
12ad24: c3 ret <== NOT EXECUTED
12ad25: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
va_start(ap, cmd);
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t );
12ad28: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED
ret = va_arg(ap, uint32_t *);
12ad2b: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED
/* sanity check */
if ( pos >= fat_fd->fat_file_size )
12ad2e: 3b 72 18 cmp 0x18(%edx),%esi <== NOT EXECUTED
12ad31: 73 45 jae 12ad78 <fat_file_ioctl+0x88> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
12ad33: 83 7a 20 01 cmpl $0x1,0x20(%edx) <== NOT EXECUTED
12ad37: 74 27 je 12ad60 <fat_file_ioctl+0x70> <== NOT EXECUTED
return RC_OK;
}
cl_start = pos >> fs_info->vol.bpc_log2;
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
12ad39: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12ad3c: 0f b6 49 08 movzbl 0x8(%ecx),%ecx <== NOT EXECUTED
12ad40: d3 ee shr %cl,%esi <== NOT EXECUTED
12ad42: 89 f1 mov %esi,%ecx <== NOT EXECUTED
12ad44: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED
12ad47: 56 push %esi <== NOT EXECUTED
12ad48: e8 a3 fd ff ff call 12aaf0 <fat_file_lseek> <== NOT EXECUTED
if ( rc != RC_OK )
12ad4d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12ad50: 85 c0 test %eax,%eax <== NOT EXECUTED
12ad52: 75 ca jne 12ad1e <fat_file_ioctl+0x2e> <== NOT EXECUTED
return rc;
*ret = cur_cln;
12ad54: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED
12ad57: 89 13 mov %edx,(%ebx) <== NOT EXECUTED
errno = EINVAL;
rc = -1;
break;
}
return rc;
}
12ad59: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
12ad5c: 5b pop %ebx <== NOT EXECUTED
12ad5d: 5e pop %esi <== NOT EXECUTED
12ad5e: c9 leave <== NOT EXECUTED
12ad5f: c3 ret <== NOT EXECUTED
/* sanity check */
if ( pos >= fat_fd->fat_file_size )
rtems_set_errno_and_return_minus_one( EIO );
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
12ad60: 83 7a 24 00 cmpl $0x0,0x24(%edx) <== NOT EXECUTED
12ad64: 75 d3 jne 12ad39 <fat_file_ioctl+0x49> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
12ad66: f6 41 0a 03 testb $0x3,0xa(%ecx) <== NOT EXECUTED
12ad6a: 74 cd je 12ad39 <fat_file_ioctl+0x49> <== NOT EXECUTED
{
/* cluster 0 (zero) reserved for root dir */
*ret = 0;
12ad6c: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
12ad72: 31 c0 xor %eax,%eax <== NOT EXECUTED
return RC_OK;
12ad74: eb a8 jmp 12ad1e <fat_file_ioctl+0x2e> <== NOT EXECUTED
12ad76: 66 90 xchg %ax,%ax <== NOT EXECUTED
pos = va_arg(ap, uint32_t );
ret = va_arg(ap, uint32_t *);
/* sanity check */
if ( pos >= fat_fd->fat_file_size )
rtems_set_errno_and_return_minus_one( EIO );
12ad78: e8 03 ce 01 00 call 147b80 <__errno> <== NOT EXECUTED
12ad7d: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
12ad83: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12ad88: eb 94 jmp 12ad1e <fat_file_ioctl+0x2e> <== NOT EXECUTED
0012aaf0 <fat_file_lseek>:
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t file_cln,
uint32_t *disk_cln
)
{
12aaf0: 55 push %ebp <== NOT EXECUTED
12aaf1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12aaf3: 57 push %edi <== NOT EXECUTED
12aaf4: 56 push %esi <== NOT EXECUTED
12aaf5: 53 push %ebx <== NOT EXECUTED
12aaf6: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
12aaf9: 89 c3 mov %eax,%ebx <== NOT EXECUTED
12aafb: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
12aafe: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
12ab01: 8b 7a 34 mov 0x34(%edx),%edi <== NOT EXECUTED
12ab04: 39 cf cmp %ecx,%edi <== NOT EXECUTED
12ab06: 74 70 je 12ab78 <fat_file_lseek+0x88> <== NOT EXECUTED
{
uint32_t cur_cln;
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
12ab08: 72 3a jb 12ab44 <fat_file_lseek+0x54> <== NOT EXECUTED
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
12ab0a: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
12ab0d: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED
12ab10: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
12ab13: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
12ab16: 85 ff test %edi,%edi <== NOT EXECUTED
12ab18: 74 41 je 12ab5b <fat_file_lseek+0x6b> <== NOT EXECUTED
12ab1a: 31 f6 xor %esi,%esi <== NOT EXECUTED
12ab1c: eb 0a jmp 12ab28 <fat_file_lseek+0x38> <== NOT EXECUTED
12ab1e: 66 90 xchg %ax,%ax <== NOT EXECUTED
12ab20: 46 inc %esi <== NOT EXECUTED
12ab21: 39 f7 cmp %esi,%edi <== NOT EXECUTED
12ab23: 76 33 jbe 12ab58 <fat_file_lseek+0x68> <== NOT EXECUTED
12ab25: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
12ab28: 51 push %ecx <== NOT EXECUTED
12ab29: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
12ab2c: 52 push %edx <== NOT EXECUTED
12ab2d: 50 push %eax <== NOT EXECUTED
12ab2e: 53 push %ebx <== NOT EXECUTED
12ab2f: e8 f8 8a 01 00 call 14362c <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
12ab34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12ab37: 85 c0 test %eax,%eax <== NOT EXECUTED
12ab39: 74 e5 je 12ab20 <fat_file_lseek+0x30> <== NOT EXECUTED
return rc;
12ab3b: 99 cltd <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
}
12ab3c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12ab3f: 5b pop %ebx <== NOT EXECUTED
12ab40: 5e pop %esi <== NOT EXECUTED
12ab41: 5f pop %edi <== NOT EXECUTED
12ab42: c9 leave <== NOT EXECUTED
12ab43: c3 ret <== NOT EXECUTED
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
12ab44: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
12ab47: 8b 41 38 mov 0x38(%ecx),%eax <== NOT EXECUTED
12ab4a: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
count = file_cln - fat_fd->map.file_cln;
12ab4d: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
12ab50: 29 fa sub %edi,%edx <== NOT EXECUTED
12ab52: 89 d7 mov %edx,%edi <== NOT EXECUTED
12ab54: eb c0 jmp 12ab16 <fat_file_lseek+0x26> <== NOT EXECUTED
12ab56: 66 90 xchg %ax,%ax <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
12ab58: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
12ab5b: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
12ab5e: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
12ab61: 89 51 34 mov %edx,0x34(%ecx) <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
12ab64: 89 41 38 mov %eax,0x38(%ecx) <== NOT EXECUTED
*disk_cln = cur_cln;
12ab67: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
12ab6a: 89 01 mov %eax,(%ecx) <== NOT EXECUTED
12ab6c: 31 c0 xor %eax,%eax <== NOT EXECUTED
12ab6e: 31 d2 xor %edx,%edx <== NOT EXECUTED
}
return RC_OK;
}
12ab70: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12ab73: 5b pop %ebx <== NOT EXECUTED
12ab74: 5e pop %esi <== NOT EXECUTED
12ab75: 5f pop %edi <== NOT EXECUTED
12ab76: c9 leave <== NOT EXECUTED
12ab77: c3 ret <== NOT EXECUTED
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
*disk_cln = fat_fd->map.disk_cln;
12ab78: 8b 42 38 mov 0x38(%edx),%eax <== NOT EXECUTED
12ab7b: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
12ab7e: 89 02 mov %eax,(%edx) <== NOT EXECUTED
12ab80: 31 c0 xor %eax,%eax <== NOT EXECUTED
12ab82: 31 d2 xor %edx,%edx <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
}
12ab84: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12ab87: 5b pop %ebx <== NOT EXECUTED
12ab88: 5e pop %esi <== NOT EXECUTED
12ab89: 5f pop %edi <== NOT EXECUTED
12ab8a: c9 leave <== NOT EXECUTED
12ab8b: c3 ret <== NOT EXECUTED
0012ac9c <fat_file_mark_removed>:
void
fat_file_mark_removed(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
12ac9c: 55 push %ebp <== NOT EXECUTED
12ac9d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12ac9f: 57 push %edi <== NOT EXECUTED
12aca0: 56 push %esi <== NOT EXECUTED
12aca1: 53 push %ebx <== NOT EXECUTED
12aca2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12aca5: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
12aca8: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12acab: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
12acae: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
12acb1: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
12acb4: 74 02 je 12acb8 <fat_file_mark_removed+0x1c><== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12acb6: 85 c0 test %eax,%eax <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
12acb8: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
12acbb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12acbe: 53 push %ebx <== NOT EXECUTED
12acbf: e8 bc 8d fe ff call 113a80 <_Chain_Extract> <== 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 );
12acc4: 58 pop %eax <== NOT EXECUTED
12acc5: 5a pop %edx <== NOT EXECUTED
12acc6: 53 push %ebx <== NOT EXECUTED
12acc7: 89 f8 mov %edi,%eax <== NOT EXECUTED
12acc9: c1 e8 05 shr $0x5,%eax <== NOT EXECUTED
12accc: 83 e0 01 and $0x1,%eax <== NOT EXECUTED
12accf: 8d 14 00 lea (%eax,%eax,1),%edx <== NOT EXECUTED
12acd2: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED
12acd5: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
12acd8: 03 46 68 add 0x68(%esi),%eax <== NOT EXECUTED
12acdb: 50 push %eax <== NOT EXECUTED
12acdc: e8 7b 8d fe ff call 113a5c <_Chain_Append> <== NOT EXECUTED
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
_hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd);
fat_fd->flags |= FAT_FILE_REMOVED;
12ace1: 80 4b 30 01 orb $0x1,0x30(%ebx) <== NOT EXECUTED
12ace5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
12ace8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12aceb: 5b pop %ebx <== NOT EXECUTED
12acec: 5e pop %esi <== NOT EXECUTED
12aced: 5f pop %edi <== NOT EXECUTED
12acee: c9 leave <== NOT EXECUTED
12acef: c3 ret <== NOT EXECUTED
0012b570 <fat_file_open>:
fat_file_open(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
fat_file_fd_t **fat_fd
)
{
12b570: 55 push %ebp <== NOT EXECUTED
12b571: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12b573: 57 push %edi <== NOT EXECUTED
12b574: 56 push %esi <== NOT EXECUTED
12b575: 53 push %ebx <== NOT EXECUTED
12b576: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
12b579: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12b57c: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
12b57f: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
12b582: 8b 02 mov (%edx),%eax <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
12b584: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
12b587: 74 1a je 12b5a3 <fat_file_open+0x33> <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12b589: 85 c0 test %eax,%eax <== NOT EXECUTED
12b58b: 0f 84 97 01 00 00 je 12b728 <fat_file_open+0x1b8> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
12b591: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED
12b594: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED
12b598: d3 e0 shl %cl,%eax <== NOT EXECUTED
12b59a: 03 43 30 add 0x30(%ebx),%eax <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
12b59d: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED
12b5a1: d3 e0 shl %cl,%eax <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
12b5a3: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
12b5a6: 8b 51 04 mov 0x4(%ecx),%edx <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
12b5a9: 89 d6 mov %edx,%esi <== NOT EXECUTED
12b5ab: c1 ee 09 shr $0x9,%esi <== NOT EXECUTED
12b5ae: 01 f0 add %esi,%eax <== NOT EXECUTED
12b5b0: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED
12b5b3: c1 ea 05 shr $0x5,%edx <== NOT EXECUTED
12b5b6: 83 e2 0f and $0xf,%edx <== NOT EXECUTED
12b5b9: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first;
12b5bc: 89 d0 mov %edx,%eax <== NOT EXECUTED
12b5be: 83 e0 01 and $0x1,%eax <== NOT EXECUTED
12b5c1: 8d 0c 00 lea (%eax,%eax,1),%ecx <== NOT EXECUTED
12b5c4: 8d 04 01 lea (%ecx,%eax,1),%eax <== NOT EXECUTED
12b5c7: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
12b5ca: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
12b5cd: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED
12b5d0: 01 c1 add %eax,%ecx <== NOT EXECUTED
12b5d2: 8b 01 mov (%ecx),%eax <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
12b5d4: 83 c1 04 add $0x4,%ecx <== NOT EXECUTED
12b5d7: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
12b5da: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
12b5dc: 75 35 jne 12b613 <fat_file_open+0xa3> <== NOT EXECUTED
12b5de: eb 50 jmp 12b630 <fat_file_open+0xc0> <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12b5e0: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED
12b5e4: 74 39 je 12b61f <fat_file_open+0xaf> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
12b5e6: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
12b5e9: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED
12b5ed: d3 e6 shl %cl,%esi <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
12b5ef: 8b 78 24 mov 0x24(%eax),%edi <== NOT EXECUTED
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
12b5f2: 89 f9 mov %edi,%ecx <== NOT EXECUTED
12b5f4: c1 e9 09 shr $0x9,%ecx <== NOT EXECUTED
12b5f7: 01 ce add %ecx,%esi <== NOT EXECUTED
12b5f9: c1 e6 04 shl $0x4,%esi <== NOT EXECUTED
12b5fc: c1 ef 05 shr $0x5,%edi <== NOT EXECUTED
12b5ff: 83 e7 0f and $0xf,%edi <== NOT EXECUTED
12b602: 01 fe add %edi,%esi <== NOT EXECUTED
12b604: 39 f2 cmp %esi,%edx <== NOT EXECUTED
12b606: 0f 84 30 01 00 00 je 12b73c <fat_file_open+0x1cc> <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
12b60c: 8b 00 mov (%eax),%eax <== NOT EXECUTED
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first;
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
12b60e: 39 45 e4 cmp %eax,-0x1c(%ebp) <== NOT EXECUTED
12b611: 74 1d je 12b630 <fat_file_open+0xc0> <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
12b613: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
12b616: 83 fe 01 cmp $0x1,%esi <== NOT EXECUTED
12b619: 74 d4 je 12b5ef <fat_file_open+0x7f> <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12b61b: 85 f6 test %esi,%esi <== NOT EXECUTED
12b61d: 74 c1 je 12b5e0 <fat_file_open+0x70> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
12b61f: 83 ee 02 sub $0x2,%esi <== NOT EXECUTED
12b622: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED
12b626: d3 e6 shl %cl,%esi <== NOT EXECUTED
12b628: 03 73 30 add 0x30(%ebx),%esi <== NOT EXECUTED
12b62b: eb bc jmp 12b5e9 <fat_file_open+0x79> <== NOT EXECUTED
12b62d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first;
12b630: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
12b633: 03 4b 68 add 0x68(%ebx),%ecx <== NOT EXECUTED
12b636: 8b 01 mov (%ecx),%eax <== NOT EXECUTED
12b638: 83 c1 04 add $0x4,%ecx <== NOT EXECUTED
12b63b: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
12b63e: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
12b640: 75 3d jne 12b67f <fat_file_open+0x10f> <== NOT EXECUTED
12b642: 66 90 xchg %ax,%ax <== NOT EXECUTED
12b644: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
12b64b: eb 5f jmp 12b6ac <fat_file_open+0x13c> <== NOT EXECUTED
12b64d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12b650: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED
12b654: 74 35 je 12b68b <fat_file_open+0x11b> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
12b656: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
12b659: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED
12b65d: d3 e6 shl %cl,%esi <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
12b65f: 8b 78 24 mov 0x24(%eax),%edi <== NOT EXECUTED
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
12b662: 89 f9 mov %edi,%ecx <== NOT EXECUTED
12b664: c1 e9 09 shr $0x9,%ecx <== NOT EXECUTED
12b667: 01 ce add %ecx,%esi <== NOT EXECUTED
12b669: c1 e6 04 shl $0x4,%esi <== NOT EXECUTED
12b66c: c1 ef 05 shr $0x5,%edi <== NOT EXECUTED
12b66f: 83 e7 0f and $0xf,%edi <== NOT EXECUTED
12b672: 01 fe add %edi,%esi <== NOT EXECUTED
12b674: 39 f2 cmp %esi,%edx <== NOT EXECUTED
12b676: 74 24 je 12b69c <fat_file_open+0x12c> <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
12b678: 8b 00 mov (%eax),%eax <== NOT EXECUTED
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first;
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
12b67a: 39 45 e4 cmp %eax,-0x1c(%ebp) <== NOT EXECUTED
12b67d: 74 c5 je 12b644 <fat_file_open+0xd4> <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
12b67f: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
12b682: 83 fe 01 cmp $0x1,%esi <== NOT EXECUTED
12b685: 74 d8 je 12b65f <fat_file_open+0xef> <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12b687: 85 f6 test %esi,%esi <== NOT EXECUTED
12b689: 74 c5 je 12b650 <fat_file_open+0xe0> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
12b68b: 83 ee 02 sub $0x2,%esi <== NOT EXECUTED
12b68e: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED
12b692: d3 e6 shl %cl,%esi <== NOT EXECUTED
12b694: 03 73 30 add 0x30(%ebx),%esi <== NOT EXECUTED
12b697: eb c0 jmp 12b659 <fat_file_open+0xe9> <== NOT EXECUTED
12b699: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
12b69c: 85 d2 test %edx,%edx <== NOT EXECUTED
12b69e: 74 05 je 12b6a5 <fat_file_open+0x135> <== NOT EXECUTED
12b6a0: 3b 50 0c cmp 0xc(%eax),%edx <== NOT EXECUTED
12b6a3: 75 d3 jne 12b678 <fat_file_open+0x108> <== NOT EXECUTED
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first;
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
12b6a5: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
}
/* access "removed-but-still-open" hash table */
rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd);
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
12b6ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b6af: 6a 44 push $0x44 <== NOT EXECUTED
12b6b1: 89 55 d8 mov %edx,-0x28(%ebp) <== NOT EXECUTED
12b6b4: e8 4f 37 fe ff call 10ee08 <malloc> <== NOT EXECUTED
12b6b9: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
12b6bc: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
12b6bf: 89 01 mov %eax,(%ecx) <== NOT EXECUTED
if ( lfat_fd == NULL )
12b6c1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b6c4: 85 c0 test %eax,%eax <== NOT EXECUTED
12b6c6: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED
12b6c9: 0f 84 b9 00 00 00 je 12b788 <fat_file_open+0x218> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
12b6cf: b9 44 00 00 00 mov $0x44,%ecx <== NOT EXECUTED
12b6d4: 31 c0 xor %eax,%eax <== NOT EXECUTED
12b6d6: 8b 7d e4 mov -0x1c(%ebp),%edi <== NOT EXECUTED
12b6d9: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
lfat_fd->links_num = 1;
12b6db: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
12b6de: c7 40 08 01 00 00 00 movl $0x1,0x8(%eax) <== NOT EXECUTED
lfat_fd->flags &= ~FAT_FILE_REMOVED;
12b6e5: 80 60 30 fe andb $0xfe,0x30(%eax) <== NOT EXECUTED
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
12b6e9: c7 40 3c ff ff ff ff movl $0xffffffff,0x3c(%eax) <== NOT EXECUTED
lfat_fd->dir_pos = *dir_pos;
12b6f0: 89 c7 mov %eax,%edi <== NOT EXECUTED
12b6f2: 83 c7 20 add $0x20,%edi <== NOT EXECUTED
12b6f5: b1 04 mov $0x4,%cl <== NOT EXECUTED
12b6f7: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
12b6fa: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
if ( rc != RC_OK )
12b6fc: 8b 75 dc mov -0x24(%ebp),%esi <== NOT EXECUTED
12b6ff: 85 f6 test %esi,%esi <== NOT EXECUTED
12b701: 74 4d je 12b750 <fat_file_open+0x1e0> <== NOT EXECUTED
lfat_fd->ino = key;
12b703: 89 50 0c mov %edx,0xc(%eax) <== 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 );
12b706: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12b709: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
12b70c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
12b70f: 03 43 64 add 0x64(%ebx),%eax <== NOT EXECUTED
12b712: 50 push %eax <== NOT EXECUTED
12b713: e8 44 83 fe ff call 113a5c <_Chain_Append> <== NOT EXECUTED
12b718: 31 c0 xor %eax,%eax <== NOT EXECUTED
/*
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
12b71a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
12b71d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12b720: 5b pop %ebx <== NOT EXECUTED
12b721: 5e pop %esi <== NOT EXECUTED
12b722: 5f pop %edi <== NOT EXECUTED
12b723: c9 leave <== NOT EXECUTED
12b724: c3 ret <== NOT EXECUTED
12b725: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12b728: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED
12b72c: 0f 84 5f fe ff ff je 12b591 <fat_file_open+0x21> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
12b732: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
12b735: e9 63 fe ff ff jmp 12b59d <fat_file_open+0x2d> <== NOT EXECUTED
12b73a: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* access "valid" hash table */
rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd);
if ( rc == RC_OK )
{
/* return pointer to fat_file_descriptor allocated before */
(*fat_fd) = lfat_fd;
12b73c: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
12b73f: 89 02 mov %eax,(%edx) <== NOT EXECUTED
lfat_fd->links_num++;
12b741: ff 40 08 incl 0x8(%eax) <== NOT EXECUTED
12b744: 31 c0 xor %eax,%eax <== NOT EXECUTED
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
}
12b746: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12b749: 5b pop %ebx <== NOT EXECUTED
12b74a: 5e pop %esi <== NOT EXECUTED
12b74b: 5f pop %edi <== NOT EXECUTED
12b74c: c9 leave <== NOT EXECUTED
12b74d: c3 ret <== NOT EXECUTED
12b74e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( rc != RC_OK )
lfat_fd->ino = key;
else
{
lfat_fd->ino = fat_get_unique_ino(mt_entry);
12b750: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b753: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12b756: e8 79 00 00 00 call 12b7d4 <fat_get_unique_ino> <== NOT EXECUTED
12b75b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
12b75e: 89 42 0c mov %eax,0xc(%edx) <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
12b761: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b764: 85 c0 test %eax,%eax <== NOT EXECUTED
12b766: 75 9e jne 12b706 <fat_file_open+0x196> <== NOT EXECUTED
{
free((*fat_fd));
12b768: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b76b: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
12b76e: ff 31 pushl (%ecx) <== NOT EXECUTED
12b770: e8 f3 30 fe ff call 10e868 <free> <== NOT EXECUTED
/*
* XXX: kernel resource is unsufficient, but not the memory,
* but there is no suitable errno :(
*/
rtems_set_errno_and_return_minus_one( ENOMEM );
12b775: e8 06 c4 01 00 call 147b80 <__errno> <== NOT EXECUTED
12b77a: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
12b780: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
12b783: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b786: eb 95 jmp 12b71d <fat_file_open+0x1ad> <== NOT EXECUTED
/* access "removed-but-still-open" hash table */
rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd);
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
if ( lfat_fd == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
12b788: e8 f3 c3 01 00 call 147b80 <__errno> <== NOT EXECUTED
12b78d: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
12b793: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
12b796: eb 85 jmp 12b71d <fat_file_open+0x1ad> <== NOT EXECUTED
0012b2ac <fat_file_read>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
12b2ac: 55 push %ebp <== NOT EXECUTED
12b2ad: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12b2af: 57 push %edi <== NOT EXECUTED
12b2b0: 56 push %esi <== NOT EXECUTED
12b2b1: 53 push %ebx <== NOT EXECUTED
12b2b2: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
12b2b5: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
12b2b8: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12b2bb: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
/* it couldn't be removed - otherwise cache update will be broken */
if (count == 0)
12b2be: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
12b2c1: 85 c9 test %ecx,%ecx <== NOT EXECUTED
12b2c3: 0f 84 33 01 00 00 je 12b3fc <fat_file_read+0x150> <== NOT EXECUTED
/*
* >= because start is offset and computed from 0 and file_size
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
12b2c9: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
12b2cc: 8b 42 18 mov 0x18(%edx),%eax <== NOT EXECUTED
12b2cf: 39 f8 cmp %edi,%eax <== NOT EXECUTED
12b2d1: 0f 86 25 01 00 00 jbe 12b3fc <fat_file_read+0x150> <== NOT EXECUTED
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
12b2d7: 39 45 14 cmp %eax,0x14(%ebp) <== NOT EXECUTED
12b2da: 0f 86 28 01 00 00 jbe 12b408 <fat_file_read+0x15c> <== NOT EXECUTED
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
12b2e0: 29 f8 sub %edi,%eax <== NOT EXECUTED
12b2e2: 89 45 14 mov %eax,0x14(%ebp) <== NOT EXECUTED
{
int rc = RC_OK;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
12b2e5: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
if ((count > fat_fd->fat_file_size) ||
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
12b2ec: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
12b2ef: 83 79 20 01 cmpl $0x1,0x20(%ecx) <== NOT EXECUTED
12b2f3: 0f 84 23 01 00 00 je 12b41c <fat_file_read+0x170> <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
12b2f9: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED
12b2fd: 89 fe mov %edi,%esi <== NOT EXECUTED
12b2ff: d3 ee shr %cl,%esi <== NOT EXECUTED
12b301: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
12b304: 66 8b 73 06 mov 0x6(%ebx),%si <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
12b308: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b30b: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12b30e: 50 push %eax <== NOT EXECUTED
12b30f: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
12b312: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
12b315: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12b318: e8 d3 f7 ff ff call 12aaf0 <fat_file_lseek> <== NOT EXECUTED
if (rc != RC_OK)
12b31d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b320: 85 c0 test %eax,%eax <== NOT EXECUTED
12b322: 0f 85 d6 00 00 00 jne 12b3fe <fat_file_read+0x152> <== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
12b328: 0f b7 f6 movzwl %si,%esi <== NOT EXECUTED
12b32b: 4e dec %esi <== NOT EXECUTED
12b32c: 21 fe and %edi,%esi <== NOT EXECUTED
12b32e: 89 75 c8 mov %esi,-0x38(%ebp) <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
12b331: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED
12b334: 85 f6 test %esi,%esi <== NOT EXECUTED
12b336: 0f 84 58 01 00 00 je 12b494 <fat_file_read+0x1e8> <== NOT EXECUTED
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
12b33c: 8a 53 02 mov 0x2(%ebx),%dl <== NOT EXECUTED
12b33f: 88 55 cf mov %dl,-0x31(%ebp) <== NOT EXECUTED
12b342: 8b 13 mov (%ebx),%edx <== NOT EXECUTED
12b344: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
12b347: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
12b34a: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
12b351: 89 df mov %ebx,%edi <== NOT EXECUTED
12b353: eb 74 jmp 12b3c9 <fat_file_read+0x11d> <== NOT EXECUTED
12b355: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12b358: f6 46 0a 03 testb $0x3,0xa(%esi) <== NOT EXECUTED
12b35c: 0f 84 87 00 00 00 je 12b3e9 <fat_file_read+0x13d> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
12b362: 8b 46 1c mov 0x1c(%esi),%eax <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
12b365: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b368: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED
12b36b: 03 4d d0 add -0x30(%ebp),%ecx <== NOT EXECUTED
12b36e: 51 push %ecx <== NOT EXECUTED
12b36f: 53 push %ebx <== NOT EXECUTED
12b370: 0f b7 d2 movzwl %dx,%edx <== NOT EXECUTED
12b373: 4a dec %edx <== NOT EXECUTED
12b374: 23 55 d4 and -0x2c(%ebp),%edx <== NOT EXECUTED
12b377: 52 push %edx <== NOT EXECUTED
12b378: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
12b37b: 8a 4d cf mov -0x31(%ebp),%cl <== NOT EXECUTED
12b37e: d3 ea shr %cl,%edx <== NOT EXECUTED
12b380: 01 d0 add %edx,%eax <== NOT EXECUTED
12b382: 50 push %eax <== NOT EXECUTED
12b383: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12b386: e8 11 0c 00 00 call 12bf9c <_fat_block_read> <== NOT EXECUTED
if ( ret < 0 )
12b38b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12b38e: 85 c0 test %eax,%eax <== NOT EXECUTED
12b390: 0f 88 ce 00 00 00 js 12b464 <fat_file_read+0x1b8> <== NOT EXECUTED
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
12b396: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
12b399: 50 push %eax <== NOT EXECUTED
12b39a: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12b39d: 50 push %eax <== NOT EXECUTED
12b39e: 56 push %esi <== NOT EXECUTED
12b39f: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12b3a2: e8 85 82 01 00 call 14362c <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
12b3a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b3aa: 85 c0 test %eax,%eax <== NOT EXECUTED
12b3ac: 75 50 jne 12b3fe <fat_file_read+0x152> <== NOT EXECUTED
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
cmpltd += c;
12b3ae: 01 5d d0 add %ebx,-0x30(%ebp) <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
12b3b1: 29 5d 14 sub %ebx,0x14(%ebp) <== NOT EXECUTED
12b3b4: 0f 84 b2 00 00 00 je 12b46c <fat_file_read+0x1c0> <== NOT EXECUTED
12b3ba: 8a 57 02 mov 0x2(%edi),%dl <== NOT EXECUTED
12b3bd: 88 55 cf mov %dl,-0x31(%ebp) <== NOT EXECUTED
12b3c0: 8b 17 mov (%edi),%edx <== NOT EXECUTED
12b3c2: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bpc - ofs));
12b3c9: 0f b7 5f 06 movzwl 0x6(%edi),%ebx <== NOT EXECUTED
12b3cd: 2b 5d d4 sub -0x2c(%ebp),%ebx <== NOT EXECUTED
12b3d0: 3b 5d 14 cmp 0x14(%ebp),%ebx <== NOT EXECUTED
12b3d3: 76 03 jbe 12b3d8 <fat_file_read+0x12c> <== NOT EXECUTED
12b3d5: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
12b3d8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
fat_cluster_num_to_sector_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
12b3db: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
12b3de: 8b 71 34 mov 0x34(%ecx),%esi <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12b3e1: 85 c0 test %eax,%eax <== NOT EXECUTED
12b3e3: 0f 84 6f ff ff ff je 12b358 <fat_file_read+0xac> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
12b3e9: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED
12b3ec: 0f b6 4e 05 movzbl 0x5(%esi),%ecx <== NOT EXECUTED
12b3f0: d3 e0 shl %cl,%eax <== NOT EXECUTED
12b3f2: 03 46 30 add 0x30(%esi),%eax <== NOT EXECUTED
12b3f5: e9 6b ff ff ff jmp 12b365 <fat_file_read+0xb9> <== NOT EXECUTED
12b3fa: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
12b3fc: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
12b3fe: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12b401: 5b pop %ebx <== NOT EXECUTED
12b402: 5e pop %esi <== NOT EXECUTED
12b403: 5f pop %edi <== NOT EXECUTED
12b404: c9 leave <== NOT EXECUTED
12b405: c3 ret <== NOT EXECUTED
12b406: 66 90 xchg %ax,%ax <== NOT EXECUTED
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
12b408: 89 c2 mov %eax,%edx <== NOT EXECUTED
12b40a: 2b 55 14 sub 0x14(%ebp),%edx <== NOT EXECUTED
12b40d: 39 d7 cmp %edx,%edi <== NOT EXECUTED
12b40f: 0f 86 d0 fe ff ff jbe 12b2e5 <fat_file_read+0x39> <== NOT EXECUTED
12b415: e9 c6 fe ff ff jmp 12b2e0 <fat_file_read+0x34> <== NOT EXECUTED
12b41a: 66 90 xchg %ax,%ax <== NOT EXECUTED
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
12b41c: 8b 51 24 mov 0x24(%ecx),%edx <== NOT EXECUTED
12b41f: 85 d2 test %edx,%edx <== NOT EXECUTED
12b421: 0f 85 d2 fe ff ff jne 12b2f9 <fat_file_read+0x4d> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
12b427: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED
12b42b: 0f 84 c8 fe ff ff je 12b2f9 <fat_file_read+0x4d> <== NOT EXECUTED
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
12b431: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12b434: 85 c0 test %eax,%eax <== NOT EXECUTED
12b436: 75 69 jne 12b4a1 <fat_file_read+0x1f5> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
12b438: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, count, buf);
12b43b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b43e: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED
12b441: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
12b444: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED
12b447: 4a dec %edx <== NOT EXECUTED
12b448: 21 fa and %edi,%edx <== NOT EXECUTED
12b44a: 52 push %edx <== NOT EXECUTED
12b44b: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED
12b44f: d3 ef shr %cl,%edi <== NOT EXECUTED
12b451: 01 f8 add %edi,%eax <== NOT EXECUTED
12b453: 50 push %eax <== NOT EXECUTED
12b454: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12b457: e8 40 0b 00 00 call 12bf9c <_fat_block_read> <== NOT EXECUTED
if ( ret < 0 )
12b45c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12b45f: 85 c0 test %eax,%eax <== NOT EXECUTED
12b461: 79 9b jns 12b3fe <fat_file_read+0x152> <== NOT EXECUTED
12b463: 90 nop <== NOT EXECUTED
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
12b464: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12b469: eb 93 jmp 12b3fe <fat_file_read+0x152> <== NOT EXECUTED
12b46b: 90 nop <== NOT EXECUTED
12b46c: 89 fb mov %edi,%ebx <== NOT EXECUTED
12b46e: 89 f7 mov %esi,%edi <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
12b470: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
12b473: 8b 75 c8 mov -0x38(%ebp),%esi <== NOT EXECUTED
12b476: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
12b479: 8d 54 0e ff lea -0x1(%esi,%ecx,1),%edx <== NOT EXECUTED
12b47d: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED
12b481: d3 ea shr %cl,%edx <== NOT EXECUTED
12b483: 03 55 c4 add -0x3c(%ebp),%edx <== NOT EXECUTED
12b486: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
12b489: 89 51 34 mov %edx,0x34(%ecx) <== NOT EXECUTED
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
12b48c: 89 79 38 mov %edi,0x38(%ecx) <== NOT EXECUTED
return cmpltd;
12b48f: e9 6a ff ff ff jmp 12b3fe <fat_file_read+0x152> <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
12b494: 31 c0 xor %eax,%eax <== NOT EXECUTED
12b496: 31 ff xor %edi,%edi <== NOT EXECUTED
12b498: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
12b49f: eb d2 jmp 12b473 <fat_file_read+0x1c7> <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
12b4a1: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED
12b4a4: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED
12b4a8: d3 e0 shl %cl,%eax <== NOT EXECUTED
12b4aa: 03 43 30 add 0x30(%ebx),%eax <== NOT EXECUTED
12b4ad: eb 8c jmp 12b43b <fat_file_read+0x18f> <== NOT EXECUTED
0012aa4c <fat_file_reopen>:
* RETURNS:
* RC_OK
*/
int
fat_file_reopen(fat_file_fd_t *fat_fd)
{
12aa4c: 55 push %ebp <== NOT EXECUTED
12aa4d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12aa4f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
fat_fd->links_num++;
12aa52: ff 40 08 incl 0x8(%eax) <== NOT EXECUTED
return RC_OK;
}
12aa55: 31 c0 xor %eax,%eax <== NOT EXECUTED
12aa57: c9 leave <== NOT EXECUTED
12aa58: c3 ret <== NOT EXECUTED
0012aa5c <fat_file_size>:
int
fat_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
12aa5c: 55 push %ebp <== NOT EXECUTED
12aa5d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12aa5f: 57 push %edi <== NOT EXECUTED
12aa60: 56 push %esi <== NOT EXECUTED
12aa61: 53 push %ebx <== NOT EXECUTED
12aa62: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
12aa65: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
12aa68: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12aa6b: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED
uint32_t cur_cln = fat_fd->cln;
12aa6e: 8b 7e 1c mov 0x1c(%esi),%edi <== NOT EXECUTED
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
12aa71: 83 7e 20 01 cmpl $0x1,0x20(%esi) <== NOT EXECUTED
12aa75: 74 61 je 12aad8 <fat_file_size+0x7c> <== NOT EXECUTED
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
return rc;
}
fat_fd->fat_file_size = 0;
12aa77: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi) <== NOT EXECUTED
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
12aa7e: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
12aa81: 21 f8 and %edi,%eax <== NOT EXECUTED
12aa83: 3b 43 10 cmp 0x10(%ebx),%eax <== NOT EXECUTED
12aa86: 73 3b jae 12aac3 <fat_file_size+0x67> <== NOT EXECUTED
fat_file_fd_t *fat_fd
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
12aa88: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED
12aa8b: eb 19 jmp 12aaa6 <fat_file_size+0x4a> <== NOT EXECUTED
12aa8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
12aa90: 0f b7 43 06 movzwl 0x6(%ebx),%eax <== NOT EXECUTED
12aa94: 01 46 18 add %eax,0x18(%esi) <== NOT EXECUTED
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
12aa97: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
12aa9a: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
12aa9d: 21 c2 and %eax,%edx <== NOT EXECUTED
12aa9f: 3b 53 10 cmp 0x10(%ebx),%edx <== NOT EXECUTED
12aaa2: 73 24 jae 12aac8 <fat_file_size+0x6c> <== NOT EXECUTED
12aaa4: 89 c7 mov %eax,%edi <== NOT EXECUTED
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
12aaa6: 50 push %eax <== NOT EXECUTED
12aaa7: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12aaaa: 50 push %eax <== NOT EXECUTED
12aaab: 57 push %edi <== NOT EXECUTED
12aaac: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12aaaf: e8 78 8b 01 00 call 14362c <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
12aab4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12aab7: 85 c0 test %eax,%eax <== NOT EXECUTED
12aab9: 74 d5 je 12aa90 <fat_file_size+0x34> <== NOT EXECUTED
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
return rc;
}
12aabb: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12aabe: 5b pop %ebx <== NOT EXECUTED
12aabf: 5e pop %esi <== NOT EXECUTED
12aac0: 5f pop %edi <== NOT EXECUTED
12aac1: c9 leave <== NOT EXECUTED
12aac2: c3 ret <== NOT EXECUTED
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
12aac3: 31 ff xor %edi,%edi <== NOT EXECUTED
12aac5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
12aac8: 89 7e 3c mov %edi,0x3c(%esi) <== NOT EXECUTED
12aacb: 31 c0 xor %eax,%eax <== NOT EXECUTED
return rc;
}
12aacd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12aad0: 5b pop %ebx <== NOT EXECUTED
12aad1: 5e pop %esi <== NOT EXECUTED
12aad2: 5f pop %edi <== NOT EXECUTED
12aad3: c9 leave <== NOT EXECUTED
12aad4: c3 ret <== NOT EXECUTED
12aad5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
12aad8: 8b 56 24 mov 0x24(%esi),%edx <== NOT EXECUTED
12aadb: 85 d2 test %edx,%edx <== NOT EXECUTED
12aadd: 75 98 jne 12aa77 <fat_file_size+0x1b> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
12aadf: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED
12aae3: 74 92 je 12aa77 <fat_file_size+0x1b> <== NOT EXECUTED
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
12aae5: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
12aae8: 89 46 18 mov %eax,0x18(%esi) <== NOT EXECUTED
12aaeb: 31 c0 xor %eax,%eax <== NOT EXECUTED
return rc;
12aaed: eb cc jmp 12aabb <fat_file_size+0x5f> <== NOT EXECUTED
0012ad8c <fat_file_truncate>:
fat_file_truncate(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
12ad8c: 55 push %ebp <== NOT EXECUTED
12ad8d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12ad8f: 57 push %edi <== NOT EXECUTED
12ad90: 56 push %esi <== NOT EXECUTED
12ad91: 53 push %ebx <== NOT EXECUTED
12ad92: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
12ad95: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
12ad98: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED
12ad9b: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
12ad9e: 8b 5e 34 mov 0x34(%esi),%ebx <== NOT EXECUTED
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
if ( new_length >= fat_fd->fat_file_size )
12ada1: 8b 47 18 mov 0x18(%edi),%eax <== NOT EXECUTED
12ada4: 39 d0 cmp %edx,%eax <== NOT EXECUTED
12ada6: 0f 86 9c 00 00 00 jbe 12ae48 <fat_file_truncate+0xbc><== NOT EXECUTED
uint32_t new_length
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = 0;
12adac: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
12adb3: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) <== NOT EXECUTED
if ( new_length >= fat_fd->fat_file_size )
return rc;
assert(fat_fd->fat_file_size);
12adba: 85 c0 test %eax,%eax <== NOT EXECUTED
12adbc: 0f 84 90 00 00 00 je 12ae52 <fat_file_truncate+0xc6><== NOT EXECUTED
cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2;
12adc2: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED
12adc6: 0f b7 5b 06 movzwl 0x6(%ebx),%ebx <== NOT EXECUTED
12adca: 8d 5c 1a ff lea -0x1(%edx,%ebx,1),%ebx <== NOT EXECUTED
12adce: d3 eb shr %cl,%ebx <== NOT EXECUTED
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
12add0: 89 da mov %ebx,%edx <== NOT EXECUTED
12add2: d3 e2 shl %cl,%edx <== NOT EXECUTED
12add4: 39 d0 cmp %edx,%eax <== NOT EXECUTED
12add6: 76 70 jbe 12ae48 <fat_file_truncate+0xbc><== NOT EXECUTED
return RC_OK;
if (cl_start != 0)
12add8: 85 db test %ebx,%ebx <== NOT EXECUTED
12adda: 74 1a je 12adf6 <fat_file_truncate+0x6a><== NOT EXECUTED
{
rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln);
12addc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12addf: 8d 4b ff lea -0x1(%ebx),%ecx <== NOT EXECUTED
12ade2: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
12ade5: 50 push %eax <== NOT EXECUTED
12ade6: 89 fa mov %edi,%edx <== NOT EXECUTED
12ade8: 89 f0 mov %esi,%eax <== NOT EXECUTED
12adea: e8 01 fd ff ff call 12aaf0 <fat_file_lseek> <== NOT EXECUTED
if (rc != RC_OK)
12adef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12adf2: 85 c0 test %eax,%eax <== NOT EXECUTED
12adf4: 75 54 jne 12ae4a <fat_file_truncate+0xbe><== NOT EXECUTED
return rc;
}
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
12adf6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12adf9: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12adfc: 50 push %eax <== NOT EXECUTED
12adfd: 89 d9 mov %ebx,%ecx <== NOT EXECUTED
12adff: 89 fa mov %edi,%edx <== NOT EXECUTED
12ae01: 89 f0 mov %esi,%eax <== NOT EXECUTED
12ae03: e8 e8 fc ff ff call 12aaf0 <fat_file_lseek> <== NOT EXECUTED
if (rc != RC_OK)
12ae08: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12ae0b: 85 c0 test %eax,%eax <== NOT EXECUTED
12ae0d: 75 3b jne 12ae4a <fat_file_truncate+0xbe><== NOT EXECUTED
return rc;
rc = fat_free_fat_clusters_chain(mt_entry, cur_cln);
12ae0f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12ae12: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
12ae15: 56 push %esi <== NOT EXECUTED
12ae16: e8 95 89 01 00 call 1437b0 <fat_free_fat_clusters_chain><== NOT EXECUTED
if (rc != RC_OK)
12ae1b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12ae1e: 85 c0 test %eax,%eax <== NOT EXECUTED
12ae20: 75 28 jne 12ae4a <fat_file_truncate+0xbe><== NOT EXECUTED
return rc;
if (cl_start != 0)
12ae22: 85 db test %ebx,%ebx <== NOT EXECUTED
12ae24: 74 24 je 12ae4a <fat_file_truncate+0xbe><== NOT EXECUTED
{
rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC);
12ae26: 50 push %eax <== NOT EXECUTED
12ae27: 6a ff push $0xffffffff <== NOT EXECUTED
12ae29: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
12ae2c: 56 push %esi <== NOT EXECUTED
12ae2d: e8 d2 85 01 00 call 143404 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
12ae32: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12ae35: 85 c0 test %eax,%eax <== NOT EXECUTED
12ae37: 75 11 jne 12ae4a <fat_file_truncate+0xbe><== NOT EXECUTED
return rc;
fat_fd->map.file_cln = cl_start - 1;
12ae39: 4b dec %ebx <== NOT EXECUTED
12ae3a: 89 5f 34 mov %ebx,0x34(%edi) <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
12ae3d: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
12ae40: 89 57 38 mov %edx,0x38(%edi) <== NOT EXECUTED
fat_fd->map.last_cln = new_last_cln;
12ae43: 89 57 3c mov %edx,0x3c(%edi) <== NOT EXECUTED
12ae46: eb 02 jmp 12ae4a <fat_file_truncate+0xbe><== NOT EXECUTED
12ae48: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
return RC_OK;
}
12ae4a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12ae4d: 5b pop %ebx <== NOT EXECUTED
12ae4e: 5e pop %esi <== NOT EXECUTED
12ae4f: 5f pop %edi <== NOT EXECUTED
12ae50: c9 leave <== NOT EXECUTED
12ae51: c3 ret <== NOT EXECUTED
if ( new_length >= fat_fd->fat_file_size )
return rc;
assert(fat_fd->fat_file_size);
12ae52: 68 eb 57 16 00 push $0x1657eb <== NOT EXECUTED
12ae57: 68 53 58 16 00 push $0x165853 <== NOT EXECUTED
12ae5c: 68 6d 02 00 00 push $0x26d <== NOT EXECUTED
12ae61: 68 04 58 16 00 push $0x165804 <== NOT EXECUTED
12ae66: e8 79 33 fe ff call 10e1e4 <__assert_func> <== NOT EXECUTED
0012b040 <fat_file_write>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
12b040: 55 push %ebp <== NOT EXECUTED
12b041: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12b043: 57 push %edi <== NOT EXECUTED
12b044: 56 push %esi <== NOT EXECUTED
12b045: 53 push %ebx <== NOT EXECUTED
12b046: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
12b049: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
12b04c: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
int rc = 0;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
12b04f: 8b 5e 34 mov 0x34(%esi),%ebx <== NOT EXECUTED
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
if ( count == 0 )
12b052: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
12b055: 85 c9 test %ecx,%ecx <== NOT EXECUTED
12b057: 0f 84 eb 01 00 00 je 12b248 <fat_file_write+0x208> <== NOT EXECUTED
{
int rc = 0;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
12b05d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
uint32_t cl_start = 0;
uint32_t ofs = 0;
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
12b064: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
if ( count == 0 )
return cmpltd;
if ( start > fat_fd->fat_file_size )
12b06b: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
12b06e: 39 78 18 cmp %edi,0x18(%eax) <== NOT EXECUTED
12b071: 0f 82 dd 01 00 00 jb 12b254 <fat_file_write+0x214> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
if ((count > fat_fd->size_limit) ||
12b077: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
12b07a: 8b 42 14 mov 0x14(%edx),%eax <== NOT EXECUTED
12b07d: 39 45 14 cmp %eax,0x14(%ebp) <== NOT EXECUTED
12b080: 0f 87 ce 01 00 00 ja 12b254 <fat_file_write+0x214> <== NOT EXECUTED
12b086: 2b 45 14 sub 0x14(%ebp),%eax <== NOT EXECUTED
12b089: 39 c7 cmp %eax,%edi <== NOT EXECUTED
12b08b: 0f 87 c3 01 00 00 ja 12b254 <fat_file_write+0x214> <== NOT EXECUTED
(start > fat_fd->size_limit - count))
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_extend(mt_entry, fat_fd, start + count, &c);
12b091: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
12b094: 01 fa add %edi,%edx <== NOT EXECUTED
12b096: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
12b099: 50 push %eax <== NOT EXECUTED
12b09a: 52 push %edx <== NOT EXECUTED
12b09b: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
12b09e: 56 push %esi <== NOT EXECUTED
12b09f: 89 55 bc mov %edx,-0x44(%ebp) <== NOT EXECUTED
12b0a2: e8 c5 fd ff ff call 12ae6c <fat_file_extend> <== NOT EXECUTED
if (rc != RC_OK)
12b0a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b0aa: 85 c0 test %eax,%eax <== NOT EXECUTED
12b0ac: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED
12b0af: 0f 85 8b 01 00 00 jne 12b240 <fat_file_write+0x200> <== NOT EXECUTED
/*
* check whether there was enough room on device to locate
* file of 'start + count' bytes
*/
if (c != (start + count))
12b0b5: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
12b0b8: 39 c2 cmp %eax,%edx <== NOT EXECUTED
12b0ba: 74 05 je 12b0c1 <fat_file_write+0x81> <== NOT EXECUTED
count = c - start;
12b0bc: 29 f8 sub %edi,%eax <== NOT EXECUTED
12b0be: 89 45 14 mov %eax,0x14(%ebp) <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
12b0c1: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
12b0c4: 83 79 20 01 cmpl $0x1,0x20(%ecx) <== NOT EXECUTED
12b0c8: 0f 84 12 01 00 00 je 12b1e0 <fat_file_write+0x1a0> <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
12b0ce: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED
12b0d2: 89 f8 mov %edi,%eax <== NOT EXECUTED
12b0d4: d3 e8 shr %cl,%eax <== NOT EXECUTED
12b0d6: 89 45 c0 mov %eax,-0x40(%ebp) <== NOT EXECUTED
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
12b0d9: 66 8b 53 06 mov 0x6(%ebx),%dx <== NOT EXECUTED
12b0dd: 66 89 55 d4 mov %dx,-0x2c(%ebp) <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
12b0e1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b0e4: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED
12b0e7: 51 push %ecx <== NOT EXECUTED
12b0e8: 89 c1 mov %eax,%ecx <== NOT EXECUTED
12b0ea: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
12b0ed: 89 f0 mov %esi,%eax <== NOT EXECUTED
12b0ef: e8 fc f9 ff ff call 12aaf0 <fat_file_lseek> <== NOT EXECUTED
if (rc != RC_OK)
12b0f4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b0f7: 85 c0 test %eax,%eax <== NOT EXECUTED
12b0f9: 0f 85 41 01 00 00 jne 12b240 <fat_file_write+0x200> <== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
12b0ff: 0f b7 55 d4 movzwl -0x2c(%ebp),%edx <== NOT EXECUTED
12b103: 4a dec %edx <== NOT EXECUTED
12b104: 21 fa and %edi,%edx <== NOT EXECUTED
12b106: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
12b109: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
12b10c: 85 c9 test %ecx,%ecx <== NOT EXECUTED
12b10e: 0f 84 7a 01 00 00 je 12b28e <fat_file_write+0x24e> <== NOT EXECUTED
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
12b114: 8a 43 02 mov 0x2(%ebx),%al <== NOT EXECUTED
12b117: 88 45 cb mov %al,-0x35(%ebp) <== NOT EXECUTED
12b11a: 8b 13 mov (%ebx),%edx <== NOT EXECUTED
12b11c: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
12b11f: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
12b122: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
12b129: 89 5d cc mov %ebx,-0x34(%ebp) <== NOT EXECUTED
12b12c: 89 f7 mov %esi,%edi <== NOT EXECUTED
12b12e: eb 7d jmp 12b1ad <fat_file_write+0x16d> <== NOT EXECUTED
12b130: f6 46 0a 03 testb $0x3,0xa(%esi) <== NOT EXECUTED
12b134: 0f 84 93 00 00 00 je 12b1cd <fat_file_write+0x18d> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
12b13a: 8b 5e 1c mov 0x1c(%esi),%ebx <== NOT EXECUTED
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
12b13d: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
12b140: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b143: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED
12b146: 03 4d d0 add -0x30(%ebp),%ecx <== NOT EXECUTED
12b149: 51 push %ecx <== NOT EXECUTED
12b14a: 50 push %eax <== NOT EXECUTED
12b14b: 0f b7 d2 movzwl %dx,%edx <== NOT EXECUTED
12b14e: 4a dec %edx <== NOT EXECUTED
12b14f: 23 55 d4 and -0x2c(%ebp),%edx <== NOT EXECUTED
12b152: 52 push %edx <== NOT EXECUTED
12b153: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
12b156: 8a 4d cb mov -0x35(%ebp),%cl <== NOT EXECUTED
12b159: d3 e8 shr %cl,%eax <== NOT EXECUTED
12b15b: 01 c3 add %eax,%ebx <== NOT EXECUTED
12b15d: 53 push %ebx <== NOT EXECUTED
12b15e: 57 push %edi <== NOT EXECUTED
12b15f: e8 ec 0a 00 00 call 12bc50 <_fat_block_write> <== NOT EXECUTED
if ( ret < 0 )
12b164: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12b167: 85 c0 test %eax,%eax <== NOT EXECUTED
12b169: 0f 88 c9 00 00 00 js 12b238 <fat_file_write+0x1f8> <== NOT EXECUTED
return -1;
count -= c;
12b16f: 8b 5d e0 mov -0x20(%ebp),%ebx <== NOT EXECUTED
cmpltd += c;
save_cln = cur_cln;
12b172: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
12b175: 50 push %eax <== NOT EXECUTED
12b176: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12b179: 50 push %eax <== NOT EXECUTED
12b17a: 56 push %esi <== NOT EXECUTED
12b17b: 57 push %edi <== NOT EXECUTED
12b17c: e8 ab 84 01 00 call 14362c <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
12b181: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b184: 85 c0 test %eax,%eax <== NOT EXECUTED
12b186: 0f 85 b4 00 00 00 jne 12b240 <fat_file_write+0x200> <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
cmpltd += c;
12b18c: 01 5d d0 add %ebx,-0x30(%ebp) <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
12b18f: 29 5d 14 sub %ebx,0x14(%ebp) <== NOT EXECUTED
12b192: 0f 84 d0 00 00 00 je 12b268 <fat_file_write+0x228> <== NOT EXECUTED
12b198: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
12b19b: 8a 52 02 mov 0x2(%edx),%dl <== NOT EXECUTED
12b19e: 88 55 cb mov %dl,-0x35(%ebp) <== NOT EXECUTED
12b1a1: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
12b1a4: 8b 11 mov (%ecx),%edx <== NOT EXECUTED
12b1a6: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bpc - ofs));
12b1ad: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
12b1b0: 0f b7 41 06 movzwl 0x6(%ecx),%eax <== NOT EXECUTED
12b1b4: 2b 45 d4 sub -0x2c(%ebp),%eax <== NOT EXECUTED
12b1b7: 3b 45 14 cmp 0x14(%ebp),%eax <== NOT EXECUTED
12b1ba: 76 03 jbe 12b1bf <fat_file_write+0x17f> <== NOT EXECUTED
12b1bc: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
12b1bf: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED
fat_cluster_num_to_sector_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
12b1c2: 8b 77 34 mov 0x34(%edi),%esi <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12b1c5: 85 db test %ebx,%ebx <== NOT EXECUTED
12b1c7: 0f 84 63 ff ff ff je 12b130 <fat_file_write+0xf0> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
12b1cd: 83 eb 02 sub $0x2,%ebx <== NOT EXECUTED
12b1d0: 0f b6 4e 05 movzbl 0x5(%esi),%ecx <== NOT EXECUTED
12b1d4: d3 e3 shl %cl,%ebx <== NOT EXECUTED
12b1d6: 03 5e 30 add 0x30(%esi),%ebx <== NOT EXECUTED
12b1d9: e9 5f ff ff ff jmp 12b13d <fat_file_write+0xfd> <== NOT EXECUTED
12b1de: 66 90 xchg %ax,%ax <== NOT EXECUTED
* file of 'start + count' bytes
*/
if (c != (start + count))
count = c - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
12b1e0: 8b 51 24 mov 0x24(%ecx),%edx <== NOT EXECUTED
12b1e3: 85 d2 test %edx,%edx <== NOT EXECUTED
12b1e5: 0f 85 e3 fe ff ff jne 12b0ce <fat_file_write+0x8e> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
12b1eb: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED
12b1ef: 0f 84 d9 fe ff ff je 12b0ce <fat_file_write+0x8e> <== NOT EXECUTED
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
12b1f5: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED
fat_cluster_num_to_sector_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
12b1f8: 8b 56 34 mov 0x34(%esi),%edx <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
12b1fb: 85 c0 test %eax,%eax <== NOT EXECUTED
12b1fd: 0f 85 96 00 00 00 jne 12b299 <fat_file_write+0x259> <== NOT EXECUTED
12b203: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED
12b207: 0f 84 8c 00 00 00 je 12b299 <fat_file_write+0x259> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
12b20d: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, count, buf);
12b210: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12b213: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED
12b216: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
12b219: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED
12b21c: 4a dec %edx <== NOT EXECUTED
12b21d: 21 fa and %edi,%edx <== NOT EXECUTED
12b21f: 52 push %edx <== NOT EXECUTED
12b220: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED
12b224: d3 ef shr %cl,%edi <== NOT EXECUTED
12b226: 01 f8 add %edi,%eax <== NOT EXECUTED
12b228: 50 push %eax <== NOT EXECUTED
12b229: 56 push %esi <== NOT EXECUTED
12b22a: e8 21 0a 00 00 call 12bc50 <_fat_block_write> <== NOT EXECUTED
if ( ret < 0 )
12b22f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12b232: 85 c0 test %eax,%eax <== NOT EXECUTED
12b234: 79 0a jns 12b240 <fat_file_write+0x200> <== NOT EXECUTED
12b236: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
12b238: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12b23d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
12b240: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12b243: 5b pop %ebx <== NOT EXECUTED
12b244: 5e pop %esi <== NOT EXECUTED
12b245: 5f pop %edi <== NOT EXECUTED
12b246: c9 leave <== NOT EXECUTED
12b247: c3 ret <== NOT EXECUTED
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
if ( count == 0 )
12b248: 31 c0 xor %eax,%eax <== NOT EXECUTED
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
12b24a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12b24d: 5b pop %ebx <== NOT EXECUTED
12b24e: 5e pop %esi <== NOT EXECUTED
12b24f: 5f pop %edi <== NOT EXECUTED
12b250: c9 leave <== NOT EXECUTED
12b251: c3 ret <== NOT EXECUTED
12b252: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( start > fat_fd->fat_file_size )
rtems_set_errno_and_return_minus_one( EIO );
if ((count > fat_fd->size_limit) ||
(start > fat_fd->size_limit - count))
rtems_set_errno_and_return_minus_one( EIO );
12b254: e8 27 c9 01 00 call 147b80 <__errno> <== NOT EXECUTED
12b259: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
12b25f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12b264: eb da jmp 12b240 <fat_file_write+0x200> <== NOT EXECUTED
12b266: 66 90 xchg %ax,%ax <== NOT EXECUTED
12b268: 89 f2 mov %esi,%edx <== NOT EXECUTED
12b26a: 8b 5d cc mov -0x34(%ebp),%ebx <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
12b26d: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
12b270: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
12b273: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED
12b276: 8d 74 39 ff lea -0x1(%ecx,%edi,1),%esi <== NOT EXECUTED
12b27a: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED
12b27e: d3 ee shr %cl,%esi <== NOT EXECUTED
12b280: 03 75 c0 add -0x40(%ebp),%esi <== NOT EXECUTED
12b283: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED
12b286: 89 77 34 mov %esi,0x34(%edi) <== NOT EXECUTED
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
12b289: 89 57 38 mov %edx,0x38(%edi) <== NOT EXECUTED
return cmpltd;
12b28c: eb b2 jmp 12b240 <fat_file_write+0x200> <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
12b28e: 31 d2 xor %edx,%edx <== NOT EXECUTED
12b290: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
12b297: eb d7 jmp 12b270 <fat_file_write+0x230> <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
12b299: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED
12b29c: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED
12b2a0: d3 e0 shl %cl,%eax <== NOT EXECUTED
12b2a2: 03 42 30 add 0x30(%edx),%eax <== NOT EXECUTED
12b2a5: e9 66 ff ff ff jmp 12b210 <fat_file_write+0x1d0> <== NOT EXECUTED
001437b0 <fat_free_fat_clusters_chain>:
int
fat_free_fat_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
1437b0: 55 push %ebp <== NOT EXECUTED
1437b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1437b3: 57 push %edi <== NOT EXECUTED
1437b4: 56 push %esi <== NOT EXECUTED
1437b5: 53 push %ebx <== NOT EXECUTED
1437b6: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
1437b9: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
int rc = RC_OK, rc1 = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
1437bc: 8b 77 34 mov 0x34(%edi),%esi <== NOT EXECUTED
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
1437bf: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
1437c6: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
1437c9: 23 46 0c and 0xc(%esi),%eax <== NOT EXECUTED
1437cc: 39 46 10 cmp %eax,0x10(%esi) <== NOT EXECUTED
1437cf: 0f 86 a9 00 00 00 jbe 14387e <fat_free_fat_clusters_chain+0xce><== NOT EXECUTED
1437d5: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
1437d8: 31 d2 xor %edx,%edx <== NOT EXECUTED
1437da: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
1437e1: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED
1437e4: 89 d6 mov %edx,%esi <== NOT EXECUTED
1437e6: eb 25 jmp 14380d <fat_free_fat_clusters_chain+0x5d><== NOT EXECUTED
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
1437e8: 50 push %eax <== NOT EXECUTED
1437e9: 6a 00 push $0x0 <== NOT EXECUTED
1437eb: 53 push %ebx <== NOT EXECUTED
1437ec: 57 push %edi <== NOT EXECUTED
1437ed: e8 12 fc ff ff call 143404 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
1437f2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1437f5: 85 c0 test %eax,%eax <== NOT EXECUTED
1437f7: 74 03 je 1437fc <fat_free_fat_clusters_chain+0x4c><== NOT EXECUTED
1437f9: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
rc1 = rc;
freed_cls_cnt++;
1437fc: 46 inc %esi <== NOT EXECUTED
cur_cln = next_cln;
1437fd: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
143800: 89 d8 mov %ebx,%eax <== NOT EXECUTED
143802: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
143805: 23 42 0c and 0xc(%edx),%eax <== NOT EXECUTED
143808: 3b 42 10 cmp 0x10(%edx),%eax <== NOT EXECUTED
14380b: 73 3f jae 14384c <fat_free_fat_clusters_chain+0x9c><== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
14380d: 52 push %edx <== NOT EXECUTED
14380e: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
143811: 50 push %eax <== NOT EXECUTED
143812: 53 push %ebx <== NOT EXECUTED
143813: 57 push %edi <== NOT EXECUTED
143814: e8 13 fe ff ff call 14362c <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
143819: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14381c: 85 c0 test %eax,%eax <== NOT EXECUTED
14381e: 74 c8 je 1437e8 <fat_free_fat_clusters_chain+0x38><== NOT EXECUTED
143820: 89 f2 mov %esi,%edx <== NOT EXECUTED
143822: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED
143825: 89 c7 mov %eax,%edi <== NOT EXECUTED
{
if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
143827: 8b 46 40 mov 0x40(%esi),%eax <== NOT EXECUTED
14382a: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
14382d: 74 06 je 143835 <fat_free_fat_clusters_chain+0x85><== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
14382f: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED
143832: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED
fat_buf_release(fs_info);
143835: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
143838: 56 push %esi <== NOT EXECUTED
143839: e8 66 80 fe ff call 12b8a4 <fat_buf_release> <== NOT EXECUTED
return rc;
14383e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
fat_buf_release(fs_info);
if (rc1 != RC_OK)
return rc1;
return RC_OK;
}
143841: 89 f8 mov %edi,%eax <== NOT EXECUTED
143843: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
143846: 5b pop %ebx <== NOT EXECUTED
143847: 5e pop %esi <== NOT EXECUTED
143848: 5f pop %edi <== NOT EXECUTED
143849: c9 leave <== NOT EXECUTED
14384a: c3 ret <== NOT EXECUTED
14384b: 90 nop <== NOT EXECUTED
14384c: 89 f2 mov %esi,%edx <== NOT EXECUTED
14384e: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
143851: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
143854: 89 46 44 mov %eax,0x44(%esi) <== NOT EXECUTED
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
143857: 8b 46 40 mov 0x40(%esi),%eax <== NOT EXECUTED
14385a: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
14385d: 74 06 je 143865 <fat_free_fat_clusters_chain+0xb5><== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
14385f: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED
143862: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED
fat_buf_release(fs_info);
143865: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
143868: 56 push %esi <== NOT EXECUTED
143869: e8 36 80 fe ff call 12b8a4 <fat_buf_release> <== NOT EXECUTED
14386e: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED
143871: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (rc1 != RC_OK)
return rc1;
return RC_OK;
}
143874: 89 f8 mov %edi,%eax <== NOT EXECUTED
143876: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
143879: 5b pop %ebx <== NOT EXECUTED
14387a: 5e pop %esi <== NOT EXECUTED
14387b: 5f pop %edi <== NOT EXECUTED
14387c: c9 leave <== NOT EXECUTED
14387d: c3 ret <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
14387e: 31 d2 xor %edx,%edx <== NOT EXECUTED
143880: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
143887: eb c8 jmp 143851 <fat_free_fat_clusters_chain+0xa1><== NOT EXECUTED
0012b798 <fat_free_unique_ino>:
void
fat_free_unique_ino(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t ino
)
{
12b798: 55 push %ebp <== NOT EXECUTED
12b799: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12b79b: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
12b79e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12b7a1: 8b 50 34 mov 0x34(%eax),%edx <== NOT EXECUTED
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
12b7a4: 2b 4a 78 sub 0x78(%edx),%ecx <== NOT EXECUTED
12b7a7: 89 c8 mov %ecx,%eax <== NOT EXECUTED
12b7a9: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED
12b7ac: 03 42 6c add 0x6c(%edx),%eax <== NOT EXECUTED
12b7af: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED
12b7b2: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
12b7b7: d3 e2 shl %cl,%edx <== NOT EXECUTED
12b7b9: f7 d2 not %edx <== NOT EXECUTED
12b7bb: 20 10 and %dl,(%eax) <== NOT EXECUTED
}
12b7bd: c9 leave <== NOT EXECUTED
12b7be: c3 ret <== NOT EXECUTED
0014362c <fat_get_fat_cluster>:
fat_get_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t *ret_val
)
{
14362c: 55 push %ebp <== NOT EXECUTED
14362d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14362f: 57 push %edi <== NOT EXECUTED
143630: 56 push %esi <== NOT EXECUTED
143631: 53 push %ebx <== NOT EXECUTED
143632: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
143635: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
143638: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
14363b: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED
rtems_bdbuf_buffer *block0 = NULL;
14363e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
143645: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
143648: 76 67 jbe 1436b1 <fat_get_fat_cluster+0x85><== NOT EXECUTED
14364a: 8b 43 34 mov 0x34(%ebx),%eax <== NOT EXECUTED
14364d: 40 inc %eax <== NOT EXECUTED
14364e: 39 c2 cmp %eax,%edx <== NOT EXECUTED
143650: 77 5f ja 1436b1 <fat_get_fat_cluster+0x85><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
143652: 0f b6 43 0a movzbl 0xa(%ebx),%eax <== NOT EXECUTED
143656: a8 01 test $0x1,%al <== NOT EXECUTED
143658: 75 72 jne 1436cc <fat_get_fat_cluster+0xa0><== NOT EXECUTED
14365a: a8 02 test $0x2,%al <== NOT EXECUTED
14365c: 74 76 je 1436d4 <fat_get_fat_cluster+0xa8><== NOT EXECUTED
14365e: 8d 04 12 lea (%edx,%edx,1),%eax <== NOT EXECUTED
143661: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
143664: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED
143668: 89 c6 mov %eax,%esi <== NOT EXECUTED
14366a: d3 ee shr %cl,%esi <== NOT EXECUTED
14366c: 03 73 4c add 0x4c(%ebx),%esi <== NOT EXECUTED
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
14366f: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
143671: 66 89 45 d0 mov %ax,-0x30(%ebp) <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
143675: 8d 7d e4 lea -0x1c(%ebp),%edi <== NOT EXECUTED
143678: 57 push %edi <== NOT EXECUTED
143679: 6a 01 push $0x1 <== NOT EXECUTED
14367b: 56 push %esi <== NOT EXECUTED
14367c: 53 push %ebx <== NOT EXECUTED
14367d: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
143680: e8 8f 83 fe ff call 12ba14 <fat_buf_access> <== NOT EXECUTED
if (rc != RC_OK)
143685: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
143688: 85 c0 test %eax,%eax <== NOT EXECUTED
14368a: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
14368d: 75 32 jne 1436c1 <fat_get_fat_cluster+0x95><== NOT EXECUTED
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
14368f: 0f b7 45 d0 movzwl -0x30(%ebp),%eax <== NOT EXECUTED
143693: 48 dec %eax <== NOT EXECUTED
143694: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
143697: 21 c8 and %ecx,%eax <== NOT EXECUTED
143699: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
14369c: 8a 4b 0a mov 0xa(%ebx),%cl <== NOT EXECUTED
14369f: 80 f9 02 cmp $0x2,%cl <== NOT EXECUTED
1436a2: 74 48 je 1436ec <fat_get_fat_cluster+0xc0><== NOT EXECUTED
1436a4: 80 f9 04 cmp $0x4,%cl <== NOT EXECUTED
1436a7: 0f 84 a3 00 00 00 je 143750 <fat_get_fat_cluster+0x124><== NOT EXECUTED
1436ad: fe c9 dec %cl <== NOT EXECUTED
1436af: 74 57 je 143708 <fat_get_fat_cluster+0xdc><== NOT EXECUTED
*ret_val = *((uint32_t *)(block0->buffer + ofs));
*ret_val = CF_LE_L(*ret_val);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
1436b1: e8 ca 44 00 00 call 147b80 <__errno> <== NOT EXECUTED
1436b6: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
1436bc: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
break;
}
return RC_OK;
}
1436c1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1436c4: 5b pop %ebx <== NOT EXECUTED
1436c5: 5e pop %esi <== NOT EXECUTED
1436c6: 5f pop %edi <== NOT EXECUTED
1436c7: c9 leave <== NOT EXECUTED
1436c8: c3 ret <== NOT EXECUTED
1436c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
1436cc: 89 d0 mov %edx,%eax <== NOT EXECUTED
1436ce: d1 e8 shr %eax <== NOT EXECUTED
1436d0: 01 d0 add %edx,%eax <== NOT EXECUTED
1436d2: eb 8d jmp 143661 <fat_get_fat_cluster+0x35><== NOT EXECUTED
1436d4: 8d 0c 95 00 00 00 00 lea 0x0(,%edx,4),%ecx <== NOT EXECUTED
1436db: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
1436de: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED
1436e2: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED
1436e5: d3 ee shr %cl,%esi <== NOT EXECUTED
1436e7: 03 73 4c add 0x4c(%ebx),%esi <== NOT EXECUTED
1436ea: eb 83 jmp 14366f <fat_get_fat_cluster+0x43><== NOT EXECUTED
*ret_val = (*ret_val) & FAT_FAT12_MASK;
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
*ret_val = CF_LE_W(*ret_val);
1436ec: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
1436ef: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
1436f2: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
1436f5: 0f b7 04 0a movzwl (%edx,%ecx,1),%eax <== NOT EXECUTED
1436f9: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED
1436fc: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
1436fe: 31 c0 xor %eax,%eax <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
143700: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
143703: 5b pop %ebx <== NOT EXECUTED
143704: 5e pop %esi <== NOT EXECUTED
143705: 5f pop %edi <== NOT EXECUTED
143706: c9 leave <== NOT EXECUTED
143707: c3 ret <== NOT EXECUTED
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
143708: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
14370b: 8b 49 20 mov 0x20(%ecx),%ecx <== NOT EXECUTED
14370e: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED
143711: 0f b6 04 01 movzbl (%ecx,%eax,1),%eax <== NOT EXECUTED
143715: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
143718: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
14371b: 89 01 mov %eax,(%ecx) <== NOT EXECUTED
if ( ofs == (fs_info->vol.bps - 1) )
14371d: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED
143720: 49 dec %ecx <== NOT EXECUTED
143721: 3b 4d c4 cmp -0x3c(%ebp),%ecx <== NOT EXECUTED
143724: 74 5a je 143780 <fat_get_fat_cluster+0x154><== NOT EXECUTED
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
}
else
{
*ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8;
143726: 8b 5d d0 mov -0x30(%ebp),%ebx <== NOT EXECUTED
143729: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
14372c: 0f b6 44 0b 01 movzbl 0x1(%ebx,%ecx,1),%eax <== NOT EXECUTED
143731: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
143734: 0b 45 d4 or -0x2c(%ebp),%eax <== NOT EXECUTED
143737: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
14373a: 89 01 mov %eax,(%ecx) <== NOT EXECUTED
}
if ( FAT_CLUSTER_IS_ODD(cln) )
14373c: 83 e2 01 and $0x1,%edx <== NOT EXECUTED
14373f: 74 2b je 14376c <fat_get_fat_cluster+0x140><== NOT EXECUTED
*ret_val = (*ret_val) >> FAT12_SHIFT;
143741: c1 e8 04 shr $0x4,%eax <== NOT EXECUTED
143744: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED
143747: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
143749: 31 c0 xor %eax,%eax <== NOT EXECUTED
14374b: e9 71 ff ff ff jmp 1436c1 <fat_get_fat_cluster+0x95><== NOT EXECUTED
*ret_val = CF_LE_W(*ret_val);
break;
case FAT_FAT32:
*ret_val = *((uint32_t *)(block0->buffer + ofs));
*ret_val = CF_LE_L(*ret_val);
143750: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
143753: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
143756: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
143759: 8b 04 0a mov (%edx,%ecx,1),%eax <== NOT EXECUTED
14375c: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED
14375f: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
143761: 31 c0 xor %eax,%eax <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
143763: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
143766: 5b pop %ebx <== NOT EXECUTED
143767: 5e pop %esi <== NOT EXECUTED
143768: 5f pop %edi <== NOT EXECUTED
143769: c9 leave <== NOT EXECUTED
14376a: c3 ret <== NOT EXECUTED
14376b: 90 nop <== NOT EXECUTED
}
if ( FAT_CLUSTER_IS_ODD(cln) )
*ret_val = (*ret_val) >> FAT12_SHIFT;
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
14376c: 25 ff 0f 00 00 and $0xfff,%eax <== NOT EXECUTED
143771: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
143774: 89 02 mov %eax,(%edx) <== NOT EXECUTED
143776: 31 c0 xor %eax,%eax <== NOT EXECUTED
143778: e9 44 ff ff ff jmp 1436c1 <fat_get_fat_cluster+0x95><== NOT EXECUTED
14377d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
143780: 57 push %edi <== NOT EXECUTED
143781: 6a 01 push $0x1 <== NOT EXECUTED
143783: 46 inc %esi <== NOT EXECUTED
143784: 56 push %esi <== NOT EXECUTED
143785: 53 push %ebx <== NOT EXECUTED
143786: e8 89 82 fe ff call 12ba14 <fat_buf_access> <== NOT EXECUTED
&block0);
if (rc != RC_OK)
14378b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14378e: 85 c0 test %eax,%eax <== NOT EXECUTED
143790: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
143793: 0f 85 28 ff ff ff jne 1436c1 <fat_get_fat_cluster+0x95><== NOT EXECUTED
return rc;
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
143799: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
14379c: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
14379f: 0f b6 00 movzbl (%eax),%eax <== NOT EXECUTED
1437a2: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
1437a5: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED
1437a8: 0b 03 or (%ebx),%eax <== NOT EXECUTED
1437aa: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
1437ac: eb 8e jmp 14373c <fat_get_fat_cluster+0x110><== NOT EXECUTED
0012b7d4 <fat_get_unique_ino>:
* 0 means FAILED !!!
*
*/
uint32_t
fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
{
12b7d4: 55 push %ebp <== NOT EXECUTED
12b7d5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12b7d7: 57 push %edi <== NOT EXECUTED
12b7d8: 56 push %esi <== NOT EXECUTED
12b7d9: 53 push %ebx <== NOT EXECUTED
12b7da: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
12b7dd: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12b7e0: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED
12b7e3: 8b 43 74 mov 0x74(%ebx),%eax <== NOT EXECUTED
12b7e6: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
12b7e9: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
12b7ec: 85 c0 test %eax,%eax <== NOT EXECUTED
12b7ee: 74 5d je 12b84d <fat_get_unique_ino+0x79><== NOT EXECUTED
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
12b7f0: 8b 53 70 mov 0x70(%ebx),%edx <== NOT EXECUTED
12b7f3: 89 d0 mov %edx,%eax <== NOT EXECUTED
12b7f5: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED
12b7f8: 03 43 6c add 0x6c(%ebx),%eax <== NOT EXECUTED
12b7fb: 8a 08 mov (%eax),%cl <== NOT EXECUTED
12b7fd: 88 4d e3 mov %cl,-0x1d(%ebp) <== NOT EXECUTED
12b800: 89 d1 mov %edx,%ecx <== NOT EXECUTED
12b802: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED
12b805: 0f be 75 e3 movsbl -0x1d(%ebp),%esi <== NOT EXECUTED
12b809: d3 fe sar %cl,%esi <== NOT EXECUTED
12b80b: 83 e6 01 and $0x1,%esi <== NOT EXECUTED
12b80e: 74 50 je 12b860 <fat_get_unique_ino+0x8c><== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
return (fs_info->uino_base + fs_info->index);
12b810: 31 ff xor %edi,%edi <== NOT EXECUTED
12b812: eb 20 jmp 12b834 <fat_get_unique_ino+0x60><== NOT EXECUTED
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
12b814: 8b 53 70 mov 0x70(%ebx),%edx <== NOT EXECUTED
12b817: 89 d0 mov %edx,%eax <== NOT EXECUTED
12b819: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED
12b81c: 03 43 6c add 0x6c(%ebx),%eax <== NOT EXECUTED
12b81f: 8a 08 mov (%eax),%cl <== NOT EXECUTED
12b821: 88 4d e3 mov %cl,-0x1d(%ebp) <== NOT EXECUTED
12b824: 89 d1 mov %edx,%ecx <== NOT EXECUTED
12b826: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED
12b829: 0f be 75 e3 movsbl -0x1d(%ebp),%esi <== NOT EXECUTED
12b82d: d3 fe sar %cl,%esi <== NOT EXECUTED
12b82f: 83 e6 01 and $0x1,%esi <== NOT EXECUTED
12b832: 74 2c je 12b860 <fat_get_unique_ino+0x8c><== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
return (fs_info->uino_base + fs_info->index);
}
fs_info->index++;
12b834: 42 inc %edx <== NOT EXECUTED
12b835: 89 53 70 mov %edx,0x70(%ebx) <== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
12b838: 39 55 e4 cmp %edx,-0x1c(%ebp) <== NOT EXECUTED
12b83b: 77 07 ja 12b844 <fat_get_unique_ino+0x70><== NOT EXECUTED
fs_info->index = 0;
12b83d: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
12b844: 47 inc %edi <== NOT EXECUTED
12b845: 3b 7d e4 cmp -0x1c(%ebp),%edi <== NOT EXECUTED
12b848: 72 ca jb 12b814 <fat_get_unique_ino+0x40><== NOT EXECUTED
12b84a: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
fs_info->index++;
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
12b84d: d1 e0 shl %eax <== NOT EXECUTED
12b84f: ba ff ff ff 0f mov $0xfffffff,%edx <== NOT EXECUTED
12b854: 2b 53 78 sub 0x78(%ebx),%edx <== NOT EXECUTED
12b857: 39 d0 cmp %edx,%eax <== NOT EXECUTED
12b859: 72 1f jb 12b87a <fat_get_unique_ino+0xa6><== NOT EXECUTED
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
12b85b: 31 c0 xor %eax,%eax <== NOT EXECUTED
12b85d: eb 13 jmp 12b872 <fat_get_unique_ino+0x9e><== NOT EXECUTED
12b85f: 90 nop <== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
12b860: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
12b865: d3 e2 shl %cl,%edx <== NOT EXECUTED
12b867: 0a 55 e3 or -0x1d(%ebp),%dl <== NOT EXECUTED
12b86a: 88 10 mov %dl,(%eax) <== NOT EXECUTED
return (fs_info->uino_base + fs_info->index);
12b86c: 8b 43 70 mov 0x70(%ebx),%eax <== NOT EXECUTED
12b86f: 03 43 78 add 0x78(%ebx),%eax <== NOT EXECUTED
}
else
resrc_unsuff = true;
}
return 0;
}
12b872: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12b875: 5b pop %ebx <== NOT EXECUTED
12b876: 5e pop %esi <== NOT EXECUTED
12b877: 5f pop %edi <== NOT EXECUTED
12b878: c9 leave <== NOT EXECUTED
12b879: c3 ret <== NOT EXECUTED
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
12b87a: 89 43 74 mov %eax,0x74(%ebx) <== NOT EXECUTED
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
12b87d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12b880: 50 push %eax <== NOT EXECUTED
12b881: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED
12b884: e8 13 43 fe ff call 10fb9c <realloc> <== NOT EXECUTED
12b889: 89 43 6c mov %eax,0x6c(%ebx) <== NOT EXECUTED
if (fs_info->uino != NULL)
12b88c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12b88f: 85 c0 test %eax,%eax <== NOT EXECUTED
12b891: 74 c8 je 12b85b <fat_get_unique_ino+0x87><== NOT EXECUTED
fs_info->index = fs_info->uino_pool_size;
12b893: 8b 43 74 mov 0x74(%ebx),%eax <== NOT EXECUTED
12b896: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
12b899: 89 43 70 mov %eax,0x70(%ebx) <== NOT EXECUTED
12b89c: e9 48 ff ff ff jmp 12b7e9 <fat_get_unique_ino+0x15><== NOT EXECUTED
0012bee0 <fat_init_clusters_chain>:
int
fat_init_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start_cln
)
{
12bee0: 55 push %ebp <== NOT EXECUTED
12bee1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12bee3: 57 push %edi <== NOT EXECUTED
12bee4: 56 push %esi <== NOT EXECUTED
12bee5: 53 push %ebx <== NOT EXECUTED
12bee6: 83 ec 34 sub $0x34,%esp <== NOT EXECUTED
12bee9: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
12beec: 8b 5e 34 mov 0x34(%esi),%ebx <== NOT EXECUTED
uint32_t cur_cln = start_cln;
12beef: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
12bef2: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
12bef5: 6a 01 push $0x1 <== NOT EXECUTED
12bef7: 0f b7 43 06 movzwl 0x6(%ebx),%eax <== NOT EXECUTED
12befb: 50 push %eax <== NOT EXECUTED
12befc: e8 0b 24 fe ff call 10e30c <calloc> <== NOT EXECUTED
12bf01: 89 c7 mov %eax,%edi <== NOT EXECUTED
if ( buf == NULL )
12bf03: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12bf06: 85 c0 test %eax,%eax <== NOT EXECUTED
12bf08: 74 7f je 12bf89 <fat_init_clusters_chain+0xa9><== NOT EXECUTED
12bf0a: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
12bf0c: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
12bf0f: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
12bf12: 21 c2 and %eax,%edx <== NOT EXECUTED
12bf14: 3b 53 10 cmp 0x10(%ebx),%edx <== NOT EXECUTED
12bf17: 73 3f jae 12bf58 <fat_init_clusters_chain+0x78><== NOT EXECUTED
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
12bf19: 52 push %edx <== NOT EXECUTED
12bf1a: 57 push %edi <== NOT EXECUTED
12bf1b: 50 push %eax <== NOT EXECUTED
12bf1c: 56 push %esi <== NOT EXECUTED
12bf1d: e8 6e ff ff ff call 12be90 <fat_cluster_write> <== NOT EXECUTED
if ( ret == -1 )
12bf22: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12bf25: 40 inc %eax <== NOT EXECUTED
12bf26: 74 48 je 12bf70 <fat_init_clusters_chain+0x90><== NOT EXECUTED
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
12bf28: 50 push %eax <== NOT EXECUTED
12bf29: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12bf2c: 50 push %eax <== NOT EXECUTED
12bf2d: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
12bf30: 56 push %esi <== NOT EXECUTED
12bf31: e8 f6 76 01 00 call 14362c <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
12bf36: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12bf39: 85 c0 test %eax,%eax <== NOT EXECUTED
12bf3b: 74 cf je 12bf0c <fat_init_clusters_chain+0x2c><== NOT EXECUTED
{
free(buf);
12bf3d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12bf40: 57 push %edi <== NOT EXECUTED
12bf41: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
12bf44: e8 1f 29 fe ff call 10e868 <free> <== NOT EXECUTED
return rc;
12bf49: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12bf4c: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
}
}
free(buf);
return rc;
}
12bf4f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12bf52: 5b pop %ebx <== NOT EXECUTED
12bf53: 5e pop %esi <== NOT EXECUTED
12bf54: 5f pop %edi <== NOT EXECUTED
12bf55: c9 leave <== NOT EXECUTED
12bf56: c3 ret <== NOT EXECUTED
12bf57: 90 nop <== NOT EXECUTED
free(buf);
return rc;
}
}
free(buf);
12bf58: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12bf5b: 57 push %edi <== NOT EXECUTED
12bf5c: e8 07 29 fe ff call 10e868 <free> <== NOT EXECUTED
12bf61: 31 c0 xor %eax,%eax <== NOT EXECUTED
return rc;
12bf63: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
12bf66: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12bf69: 5b pop %ebx <== NOT EXECUTED
12bf6a: 5e pop %esi <== NOT EXECUTED
12bf6b: 5f pop %edi <== NOT EXECUTED
12bf6c: c9 leave <== NOT EXECUTED
12bf6d: c3 ret <== NOT EXECUTED
12bf6e: 66 90 xchg %ax,%ax <== NOT EXECUTED
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
if ( ret == -1 )
{
free(buf);
12bf70: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12bf73: 57 push %edi <== NOT EXECUTED
12bf74: e8 ef 28 fe ff call 10e868 <free> <== NOT EXECUTED
12bf79: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
12bf7e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
free(buf);
return rc;
}
12bf81: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12bf84: 5b pop %ebx <== NOT EXECUTED
12bf85: 5e pop %esi <== NOT EXECUTED
12bf86: 5f pop %edi <== NOT EXECUTED
12bf87: c9 leave <== NOT EXECUTED
12bf88: c3 ret <== NOT EXECUTED
uint32_t cur_cln = start_cln;
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
if ( buf == NULL )
rtems_set_errno_and_return_minus_one( EIO );
12bf89: e8 f2 bb 01 00 call 147b80 <__errno> <== NOT EXECUTED
12bf8e: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
12bf94: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
12bf97: eb b6 jmp 12bf4f <fat_init_clusters_chain+0x6f><== NOT EXECUTED
0012c028 <fat_init_volume_info>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
12c028: 55 push %ebp <== NOT EXECUTED
12c029: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12c02b: 57 push %edi <== NOT EXECUTED
12c02c: 56 push %esi <== NOT EXECUTED
12c02d: 53 push %ebx <== NOT EXECUTED
12c02e: 81 ec e4 00 00 00 sub $0xe4,%esp <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
12c034: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12c037: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED
char boot_rec[FAT_MAX_BPB_SIZE];
char fs_info_sector[FAT_USEFUL_INFO_SIZE];
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
12c03a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
rc = stat(mt_entry->dev, &stat_buf);
12c041: 8d 45 90 lea -0x70(%ebp),%eax <== NOT EXECUTED
12c044: 50 push %eax <== NOT EXECUTED
12c045: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
12c048: ff 72 70 pushl 0x70(%edx) <== NOT EXECUTED
12c04b: e8 30 3e fe ff call 10fe80 <stat> <== NOT EXECUTED
12c050: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc == -1)
12c052: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c055: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
12c058: 0f 84 52 03 00 00 je 12c3b0 <fat_init_volume_info+0x388><== NOT EXECUTED
return rc;
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
12c05e: 8b 45 9c mov -0x64(%ebp),%eax <== NOT EXECUTED
12c061: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
12c066: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED
12c06b: 0f 85 5b 05 00 00 jne 12c5cc <fat_init_volume_info+0x5a4><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTTY);
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
12c071: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12c074: ff 75 ac pushl -0x54(%ebp) <== NOT EXECUTED
12c077: ff 75 a8 pushl -0x58(%ebp) <== NOT EXECUTED
12c07a: e8 05 14 fe ff call 10d484 <rtems_disk_obtain> <== NOT EXECUTED
12c07f: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED
if (vol->dd == NULL)
12c082: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c085: 85 c0 test %eax,%eax <== NOT EXECUTED
12c087: 0f 84 b2 05 00 00 je 12c63f <fat_init_volume_info+0x617><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
vol->dev = stat_buf.st_rdev;
12c08d: 8b 45 a8 mov -0x58(%ebp),%eax <== NOT EXECUTED
12c090: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED
12c093: 89 43 54 mov %eax,0x54(%ebx) <== NOT EXECUTED
12c096: 89 53 58 mov %edx,0x58(%ebx) <== NOT EXECUTED
/* Read boot record */
/* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */
sc = rtems_bdbuf_read( vol->dev, 0, &block);
12c099: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED
12c09c: 51 push %ecx <== NOT EXECUTED
12c09d: 6a 00 push $0x0 <== NOT EXECUTED
12c09f: 52 push %edx <== NOT EXECUTED
12c0a0: 50 push %eax <== NOT EXECUTED
12c0a1: e8 4e 04 fe ff call 10c4f4 <rtems_bdbuf_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
12c0a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c0a9: 85 c0 test %eax,%eax <== NOT EXECUTED
12c0ab: 0f 85 37 05 00 00 jne 12c5e8 <fat_init_volume_info+0x5c0><== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
12c0b1: 8d 95 36 ff ff ff lea -0xca(%ebp),%edx <== NOT EXECUTED
12c0b7: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
12c0ba: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED
12c0bd: b9 5a 00 00 00 mov $0x5a,%ecx <== NOT EXECUTED
12c0c2: 89 d7 mov %edx,%edi <== NOT EXECUTED
12c0c4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
sc = rtems_bdbuf_release( block);
12c0c6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c0c9: 50 push %eax <== NOT EXECUTED
12c0ca: e8 a9 f3 fd ff call 10b478 <rtems_bdbuf_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
12c0cf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c0d2: 85 c0 test %eax,%eax <== NOT EXECUTED
12c0d4: 0f 85 0e 05 00 00 jne 12c5e8 <fat_init_volume_info+0x5c0><== NOT EXECUTED
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO );
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
12c0da: 0f b6 85 42 ff ff ff movzbl -0xbe(%ebp),%eax <== NOT EXECUTED
12c0e1: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
12c0e4: 0f b6 95 41 ff ff ff movzbl -0xbf(%ebp),%edx <== NOT EXECUTED
12c0eb: 09 c2 or %eax,%edx <== NOT EXECUTED
12c0ed: 66 89 13 mov %dx,(%ebx) <== NOT EXECUTED
if ( (vol->bps != 512) &&
12c0f0: 66 81 fa 00 02 cmp $0x200,%dx <== NOT EXECUTED
12c0f5: 0f 84 a1 04 00 00 je 12c59c <fat_init_volume_info+0x574><== NOT EXECUTED
12c0fb: 66 81 fa 00 04 cmp $0x400,%dx <== NOT EXECUTED
12c100: 74 12 je 12c114 <fat_init_volume_info+0xec><== NOT EXECUTED
12c102: 66 81 fa 00 08 cmp $0x800,%dx <== NOT EXECUTED
12c107: 74 0b je 12c114 <fat_init_volume_info+0xec><== NOT EXECUTED
12c109: 66 81 fa 00 10 cmp $0x1000,%dx <== NOT EXECUTED
12c10e: 0f 85 f7 04 00 00 jne 12c60b <fat_init_volume_info+0x5e3><== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
12c114: 66 c1 ea 09 shr $0x9,%dx <== NOT EXECUTED
12c118: 0f b7 d2 movzwl %dx,%edx <== NOT EXECUTED
12c11b: b0 01 mov $0x1,%al <== NOT EXECUTED
12c11d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
12c120: d1 fa sar %edx <== NOT EXECUTED
12c122: 88 c1 mov %al,%cl <== NOT EXECUTED
12c124: 40 inc %eax <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
12c125: f6 c2 01 test $0x1,%dl <== NOT EXECUTED
12c128: 74 f6 je 12c120 <fat_init_volume_info+0xf8><== NOT EXECUTED
12c12a: 88 4b 03 mov %cl,0x3(%ebx) <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
12c12d: c6 43 02 00 movb $0x0,0x2(%ebx) <== NOT EXECUTED
12c131: 0f b7 3b movzwl (%ebx),%edi <== NOT EXECUTED
12c134: 89 f8 mov %edi,%eax <== NOT EXECUTED
12c136: f7 c7 01 00 00 00 test $0x1,%edi <== NOT EXECUTED
12c13c: 75 14 jne 12c152 <fat_init_volume_info+0x12a><== NOT EXECUTED
12c13e: b2 01 mov $0x1,%dl <== NOT EXECUTED
12c140: eb 04 jmp 12c146 <fat_init_volume_info+0x11e><== NOT EXECUTED
12c142: 66 90 xchg %ax,%ax <== NOT EXECUTED
12c144: 88 ca mov %cl,%dl <== NOT EXECUTED
i >>= 1, vol->sec_log2++);
12c146: d1 f8 sar %eax <== NOT EXECUTED
12c148: 8d 4a 01 lea 0x1(%edx),%ecx <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
12c14b: a8 01 test $0x1,%al <== NOT EXECUTED
12c14d: 74 f5 je 12c144 <fat_init_volume_info+0x11c><== NOT EXECUTED
12c14f: 88 53 02 mov %dl,0x2(%ebx) <== NOT EXECUTED
if ( (ret1 < 0) || (ret2 < 0) )
return -1;
return RC_OK;
}
12c152: 8a 85 43 ff ff ff mov -0xbd(%ebp),%al <== NOT EXECUTED
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
i >>= 1, vol->sec_log2++);
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
12c158: 88 43 04 mov %al,0x4(%ebx) <== NOT EXECUTED
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
12c15b: 84 c0 test %al,%al <== NOT EXECUTED
12c15d: 0f 84 a8 04 00 00 je 12c60b <fat_init_volume_info+0x5e3><== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
12c163: c6 43 05 00 movb $0x0,0x5(%ebx) <== NOT EXECUTED
12c167: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
12c16a: a8 01 test $0x1,%al <== NOT EXECUTED
12c16c: 0f 85 6f 04 00 00 jne 12c5e1 <fat_init_volume_info+0x5b9><== NOT EXECUTED
12c172: b1 01 mov $0x1,%cl <== NOT EXECUTED
12c174: eb 04 jmp 12c17a <fat_init_volume_info+0x152><== NOT EXECUTED
12c176: 66 90 xchg %ax,%ax <== NOT EXECUTED
12c178: 88 d1 mov %dl,%cl <== NOT EXECUTED
i >>= 1, vol->spc_log2++);
12c17a: d1 f8 sar %eax <== NOT EXECUTED
12c17c: 8d 51 01 lea 0x1(%ecx),%edx <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
12c17f: a8 01 test $0x1,%al <== NOT EXECUTED
12c181: 74 f5 je 12c178 <fat_init_volume_info+0x150><== NOT EXECUTED
12c183: 88 4b 05 mov %cl,0x5(%ebx) <== NOT EXECUTED
12c186: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED
i >>= 1, vol->spc_log2++);
/*
* "bytes per cluster" value greater than 32K is invalid
*/
if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT)
12c189: 89 f8 mov %edi,%eax <== NOT EXECUTED
12c18b: d3 e0 shl %cl,%eax <== NOT EXECUTED
12c18d: 89 c1 mov %eax,%ecx <== NOT EXECUTED
12c18f: 66 89 4b 06 mov %cx,0x6(%ebx) <== NOT EXECUTED
12c193: 66 3d 00 80 cmp $0x8000,%ax <== NOT EXECUTED
12c197: 0f 87 6e 04 00 00 ja 12c60b <fat_init_volume_info+0x5e3><== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
12c19d: c6 43 08 00 movb $0x0,0x8(%ebx) <== NOT EXECUTED
12c1a1: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED
12c1a4: a8 01 test $0x1,%al <== NOT EXECUTED
12c1a6: 75 12 jne 12c1ba <fat_init_volume_info+0x192><== NOT EXECUTED
12c1a8: b2 01 mov $0x1,%dl <== NOT EXECUTED
12c1aa: eb 02 jmp 12c1ae <fat_init_volume_info+0x186><== NOT EXECUTED
12c1ac: 88 ca mov %cl,%dl <== NOT EXECUTED
i >>= 1, vol->bpc_log2++);
12c1ae: d1 f8 sar %eax <== NOT EXECUTED
12c1b0: 8d 4a 01 lea 0x1(%edx),%ecx <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
12c1b3: a8 01 test $0x1,%al <== NOT EXECUTED
12c1b5: 74 f5 je 12c1ac <fat_init_volume_info+0x184><== NOT EXECUTED
12c1b7: 88 53 08 mov %dl,0x8(%ebx) <== NOT EXECUTED
if ( (ret1 < 0) || (ret2 < 0) )
return -1;
return RC_OK;
}
12c1ba: 8a 95 46 ff ff ff mov -0xba(%ebp),%dl <== NOT EXECUTED
12c1c0: 88 95 27 ff ff ff mov %dl,-0xd9(%ebp) <== NOT EXECUTED
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
12c1c6: 88 53 09 mov %dl,0x9(%ebx) <== NOT EXECUTED
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
12c1c9: 0f b6 85 45 ff ff ff movzbl -0xbb(%ebp),%eax <== NOT EXECUTED
12c1d0: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
12c1d3: 0f b6 b5 44 ff ff ff movzbl -0xbc(%ebp),%esi <== NOT EXECUTED
12c1da: 09 c6 or %eax,%esi <== NOT EXECUTED
12c1dc: 66 89 73 14 mov %si,0x14(%ebx) <== NOT EXECUTED
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
12c1e0: 0f b6 95 48 ff ff ff movzbl -0xb8(%ebp),%edx <== NOT EXECUTED
12c1e7: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
12c1ea: 0f b6 85 47 ff ff ff movzbl -0xb9(%ebp),%eax <== NOT EXECUTED
12c1f1: 09 d0 or %edx,%eax <== NOT EXECUTED
12c1f3: 66 89 43 20 mov %ax,0x20(%ebx) <== NOT EXECUTED
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
12c1f7: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED
12c1fa: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
12c1fd: 8d 44 38 ff lea -0x1(%eax,%edi,1),%eax <== NOT EXECUTED
12c201: 99 cltd <== NOT EXECUTED
12c202: f7 ff idiv %edi <== NOT EXECUTED
12c204: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
12c207: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED
12c20b: 89 c2 mov %eax,%edx <== NOT EXECUTED
12c20d: d3 e2 shl %cl,%edx <== NOT EXECUTED
12c20f: 89 53 28 mov %edx,0x28(%ebx) <== NOT EXECUTED
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
12c212: 0f b6 95 4d ff ff ff movzbl -0xb3(%ebp),%edx <== NOT EXECUTED
12c219: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
12c21c: 0f b6 8d 4c ff ff ff movzbl -0xb4(%ebp),%ecx <== NOT EXECUTED
12c223: 66 09 d1 or %dx,%cx <== NOT EXECUTED
12c226: 0f 84 3c 03 00 00 je 12c568 <fat_init_volume_info+0x540><== NOT EXECUTED
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
12c22c: 0f b7 c9 movzwl %cx,%ecx <== NOT EXECUTED
12c22f: 89 4b 18 mov %ecx,0x18(%ebx) <== NOT EXECUTED
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
12c232: 0f b7 f6 movzwl %si,%esi <== NOT EXECUTED
12c235: 01 f0 add %esi,%eax <== NOT EXECUTED
12c237: 0f b6 95 27 ff ff ff movzbl -0xd9(%ebp),%edx <== NOT EXECUTED
12c23e: 0f af ca imul %edx,%ecx <== NOT EXECUTED
12c241: 8d 0c 08 lea (%eax,%ecx,1),%ecx <== NOT EXECUTED
12c244: 89 4b 30 mov %ecx,0x30(%ebx) <== NOT EXECUTED
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
12c247: 0f b6 53 09 movzbl 0x9(%ebx),%edx <== NOT EXECUTED
12c24b: 0f af 53 18 imul 0x18(%ebx),%edx <== NOT EXECUTED
12c24f: 0f b7 43 14 movzwl 0x14(%ebx),%eax <== NOT EXECUTED
12c253: 01 c2 add %eax,%edx <== NOT EXECUTED
12c255: 89 53 1c mov %edx,0x1c(%ebx) <== NOT EXECUTED
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
12c258: 0f b6 95 4a ff ff ff movzbl -0xb6(%ebp),%edx <== NOT EXECUTED
12c25f: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
12c262: 0f b6 85 49 ff ff ff movzbl -0xb7(%ebp),%eax <== NOT EXECUTED
12c269: 66 09 d0 or %dx,%ax <== NOT EXECUTED
12c26c: 0f 84 c2 02 00 00 je 12c534 <fat_init_volume_info+0x50c><== NOT EXECUTED
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
12c272: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED
12c275: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
data_secs = vol->tot_secs - vol->data_fsec;
vol->data_cls = data_secs / vol->spc;
12c278: 29 c8 sub %ecx,%eax <== NOT EXECUTED
12c27a: 0f b6 73 04 movzbl 0x4(%ebx),%esi <== NOT EXECUTED
12c27e: 31 d2 xor %edx,%edx <== NOT EXECUTED
12c280: f7 f6 div %esi <== NOT EXECUTED
12c282: 89 43 34 mov %eax,0x34(%ebx) <== NOT EXECUTED
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
12c285: 3d f4 0f 00 00 cmp $0xff4,%eax <== NOT EXECUTED
12c28a: 0f 87 2c 01 00 00 ja 12c3bc <fat_init_volume_info+0x394><== NOT EXECUTED
{
vol->type = FAT_FAT12;
12c290: c6 43 0a 01 movb $0x1,0xa(%ebx) <== NOT EXECUTED
vol->mask = FAT_FAT12_MASK;
12c294: c7 43 0c ff 0f 00 00 movl $0xfff,0xc(%ebx) <== NOT EXECUTED
vol->eoc_val = FAT_FAT12_EOC;
12c29b: c7 43 10 f8 0f 00 00 movl $0xff8,0x10(%ebx) <== NOT EXECUTED
}
}
}
else
{
vol->rdir_cl = 0;
12c2a2: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) <== NOT EXECUTED
vol->mirror = 0;
12c2a9: c6 43 48 00 movb $0x0,0x48(%ebx) <== NOT EXECUTED
vol->afat = 0;
12c2ad: c6 43 50 00 movb $0x0,0x50(%ebx) <== NOT EXECUTED
vol->free_cls = 0xFFFFFFFF;
12c2b1: c7 43 40 ff ff ff ff movl $0xffffffff,0x40(%ebx) <== NOT EXECUTED
vol->next_cl = 0xFFFFFFFF;
12c2b8: c7 43 44 ff ff ff ff movl $0xffffffff,0x44(%ebx) <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
12c2bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c2c2: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
12c2c5: ff 72 34 pushl 0x34(%edx) <== NOT EXECUTED
12c2c8: e8 d7 f5 ff ff call 12b8a4 <fat_buf_release> <== NOT EXECUTED
vol->next_cl = 0xFFFFFFFF;
}
_fat_block_release(mt_entry);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
12c2cd: 0f b6 43 50 movzbl 0x50(%ebx),%eax <== NOT EXECUTED
12c2d1: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED
12c2d5: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED
12c2d9: 01 d0 add %edx,%eax <== NOT EXECUTED
12c2db: 89 43 4c mov %eax,0x4c(%ebx) <== NOT EXECUTED
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
12c2de: 5f pop %edi <== NOT EXECUTED
12c2df: 58 pop %eax <== NOT EXECUTED
12c2e0: 6a 0c push $0xc <== NOT EXECUTED
12c2e2: 6a 02 push $0x2 <== NOT EXECUTED
12c2e4: e8 23 20 fe ff call 10e30c <calloc> <== NOT EXECUTED
12c2e9: 89 43 64 mov %eax,0x64(%ebx) <== NOT EXECUTED
if ( fs_info->vhash == NULL )
12c2ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c2ef: 85 c0 test %eax,%eax <== NOT EXECUTED
12c2f1: 0f 84 d5 03 00 00 je 12c6cc <fat_init_volume_info+0x6a4><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12c2f7: 8d 50 04 lea 0x4(%eax),%edx <== NOT EXECUTED
12c2fa: 89 10 mov %edx,(%eax) <== NOT EXECUTED
the_chain->permanent_null = NULL;
12c2fc: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
12c303: 89 40 08 mov %eax,0x8(%eax) <== NOT EXECUTED
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->vhash + i);
12c306: 8d 50 0c lea 0xc(%eax),%edx <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12c309: 8d 48 10 lea 0x10(%eax),%ecx <== NOT EXECUTED
12c30c: 89 48 0c mov %ecx,0xc(%eax) <== NOT EXECUTED
the_chain->permanent_null = NULL;
12c30f: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
12c316: 89 52 08 mov %edx,0x8(%edx) <== NOT EXECUTED
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
12c319: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12c31c: 6a 0c push $0xc <== NOT EXECUTED
12c31e: 6a 02 push $0x2 <== NOT EXECUTED
12c320: e8 e7 1f fe ff call 10e30c <calloc> <== NOT EXECUTED
12c325: 89 43 68 mov %eax,0x68(%ebx) <== NOT EXECUTED
if ( fs_info->rhash == NULL )
12c328: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c32b: 85 c0 test %eax,%eax <== NOT EXECUTED
12c32d: 0f 84 ba 03 00 00 je 12c6ed <fat_init_volume_info+0x6c5><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12c333: 8d 50 04 lea 0x4(%eax),%edx <== NOT EXECUTED
12c336: 89 10 mov %edx,(%eax) <== NOT EXECUTED
the_chain->permanent_null = NULL;
12c338: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
12c33f: 89 40 08 mov %eax,0x8(%eax) <== NOT EXECUTED
rtems_disk_release(vol->dd);
free(fs_info->vhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
12c342: 8d 50 0c lea 0xc(%eax),%edx <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12c345: 8d 48 10 lea 0x10(%eax),%ecx <== NOT EXECUTED
12c348: 89 48 0c mov %ecx,0xc(%eax) <== NOT EXECUTED
the_chain->permanent_null = NULL;
12c34b: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
12c352: 89 52 08 mov %edx,0x8(%edx) <== NOT EXECUTED
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
12c355: c7 43 74 00 01 00 00 movl $0x100,0x74(%ebx) <== NOT EXECUTED
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
12c35c: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED
12c360: 8b 43 2c mov 0x2c(%ebx),%eax <== NOT EXECUTED
12c363: d3 e0 shl %cl,%eax <== NOT EXECUTED
12c365: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED
12c368: 89 43 78 mov %eax,0x78(%ebx) <== NOT EXECUTED
fs_info->index = 0;
12c36b: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) <== NOT EXECUTED
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
12c372: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12c375: 6a 01 push $0x1 <== NOT EXECUTED
12c377: 68 00 01 00 00 push $0x100 <== NOT EXECUTED
12c37c: e8 8b 1f fe ff call 10e30c <calloc> <== NOT EXECUTED
12c381: 89 43 6c mov %eax,0x6c(%ebx) <== NOT EXECUTED
if ( fs_info->uino == NULL )
12c384: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c387: 85 c0 test %eax,%eax <== NOT EXECUTED
12c389: 0f 84 c3 02 00 00 je 12c652 <fat_init_volume_info+0x62a><== NOT EXECUTED
rtems_disk_release(vol->dd);
free(fs_info->vhash);
free(fs_info->rhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
12c38f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12c392: 6a 01 push $0x1 <== NOT EXECUTED
12c394: 0f b7 03 movzwl (%ebx),%eax <== NOT EXECUTED
12c397: 50 push %eax <== NOT EXECUTED
12c398: e8 6f 1f fe ff call 10e30c <calloc> <== NOT EXECUTED
12c39d: 89 83 88 00 00 00 mov %eax,0x88(%ebx) <== NOT EXECUTED
if (fs_info->sec_buf == NULL)
12c3a3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c3a6: 85 c0 test %eax,%eax <== NOT EXECUTED
12c3a8: 0f 84 fb 02 00 00 je 12c6a9 <fat_init_volume_info+0x681><== NOT EXECUTED
12c3ae: 31 f6 xor %esi,%esi <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
12c3b0: 89 f0 mov %esi,%eax <== NOT EXECUTED
12c3b2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12c3b5: 5b pop %ebx <== NOT EXECUTED
12c3b6: 5e pop %esi <== NOT EXECUTED
12c3b7: 5f pop %edi <== NOT EXECUTED
12c3b8: c9 leave <== NOT EXECUTED
12c3b9: c3 ret <== NOT EXECUTED
12c3ba: 66 90 xchg %ax,%ax <== NOT EXECUTED
vol->mask = FAT_FAT12_MASK;
vol->eoc_val = FAT_FAT12_EOC;
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
12c3bc: 3d f4 ff 00 00 cmp $0xfff4,%eax <== NOT EXECUTED
12c3c1: 0f 86 e1 01 00 00 jbe 12c5a8 <fat_init_volume_info+0x580><== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
12c3c7: c6 43 0a 04 movb $0x4,0xa(%ebx) <== NOT EXECUTED
vol->mask = FAT_FAT32_MASK;
12c3cb: c7 43 0c ff ff ff 0f movl $0xfffffff,0xc(%ebx) <== NOT EXECUTED
vol->eoc_val = FAT_FAT32_EOC;
12c3d2: c7 43 10 f8 ff ff 0f movl $0xffffff8,0x10(%ebx) <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
12c3d9: 0f b6 85 63 ff ff ff movzbl -0x9d(%ebp),%eax <== NOT EXECUTED
12c3e0: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
12c3e3: 0f b6 95 64 ff ff ff movzbl -0x9c(%ebp),%edx <== NOT EXECUTED
12c3ea: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
12c3ed: 09 d0 or %edx,%eax <== NOT EXECUTED
12c3ef: 0f b6 95 62 ff ff ff movzbl -0x9e(%ebp),%edx <== NOT EXECUTED
12c3f6: 09 d0 or %edx,%eax <== NOT EXECUTED
12c3f8: 0f b6 95 65 ff ff ff movzbl -0x9b(%ebp),%edx <== NOT EXECUTED
12c3ff: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
12c402: 09 d0 or %edx,%eax <== NOT EXECUTED
12c404: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
12c407: 8a 85 5e ff ff ff mov -0xa2(%ebp),%al <== NOT EXECUTED
12c40d: 83 e0 80 and $0xffffff80,%eax <== NOT EXECUTED
12c410: 88 43 48 mov %al,0x48(%ebx) <== NOT EXECUTED
if (vol->mirror)
12c413: 84 c0 test %al,%al <== NOT EXECUTED
12c415: 0f 84 a5 01 00 00 je 12c5c0 <fat_init_volume_info+0x598><== NOT EXECUTED
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
12c41b: 8a 85 5e ff ff ff mov -0xa2(%ebp),%al <== NOT EXECUTED
12c421: 83 e0 0f and $0xf,%eax <== NOT EXECUTED
12c424: 88 43 50 mov %al,0x50(%ebx) <== NOT EXECUTED
else
vol->afat = 0;
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
12c427: 0f b6 95 67 ff ff ff movzbl -0x99(%ebp),%edx <== NOT EXECUTED
12c42e: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
12c431: 0f b6 85 66 ff ff ff movzbl -0x9a(%ebp),%eax <== NOT EXECUTED
12c438: 09 d0 or %edx,%eax <== NOT EXECUTED
12c43a: 66 89 43 3c mov %ax,0x3c(%ebx) <== NOT EXECUTED
if( vol->info_sec == 0 )
12c43e: 66 85 c0 test %ax,%ax <== NOT EXECUTED
12c441: 0f 84 c4 01 00 00 je 12c60b <fat_init_volume_info+0x5e3><== NOT EXECUTED
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , 0,
12c447: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c44a: 8d 75 d8 lea -0x28(%ebp),%esi <== NOT EXECUTED
12c44d: 56 push %esi <== NOT EXECUTED
12c44e: 6a 04 push $0x4 <== NOT EXECUTED
12c450: 6a 00 push $0x0 <== NOT EXECUTED
12c452: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED
12c455: 50 push %eax <== NOT EXECUTED
12c456: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12c459: e8 3e fb ff ff call 12bf9c <_fat_block_read> <== NOT EXECUTED
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
12c45e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12c461: 85 c0 test %eax,%eax <== NOT EXECUTED
12c463: 0f 88 98 02 00 00 js 12c701 <fat_init_volume_info+0x6d9><== NOT EXECUTED
{
rtems_disk_release(vol->dd);
return -1;
}
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
12c469: 0f b6 45 d9 movzbl -0x27(%ebp),%eax <== NOT EXECUTED
12c46d: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
12c470: 0f b6 55 da movzbl -0x26(%ebp),%edx <== NOT EXECUTED
12c474: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
12c477: 09 d0 or %edx,%eax <== NOT EXECUTED
12c479: 0f b6 55 d8 movzbl -0x28(%ebp),%edx <== NOT EXECUTED
12c47d: 09 d0 or %edx,%eax <== NOT EXECUTED
12c47f: 0f b6 55 db movzbl -0x25(%ebp),%edx <== NOT EXECUTED
12c483: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
12c486: 09 d0 or %edx,%eax <== NOT EXECUTED
12c488: 3d 52 52 61 41 cmp $0x41615252,%eax <== NOT EXECUTED
12c48d: 0f 85 9b 01 00 00 jne 12c62e <fat_init_volume_info+0x606><== NOT EXECUTED
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO,
12c493: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c496: 56 push %esi <== NOT EXECUTED
12c497: 6a 0c push $0xc <== NOT EXECUTED
12c499: 68 e4 01 00 00 push $0x1e4 <== NOT EXECUTED
12c49e: 0f b7 43 3c movzwl 0x3c(%ebx),%eax <== NOT EXECUTED
12c4a2: 50 push %eax <== NOT EXECUTED
12c4a3: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12c4a6: e8 f1 fa ff ff call 12bf9c <_fat_block_read> <== NOT EXECUTED
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
12c4ab: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12c4ae: 85 c0 test %eax,%eax <== NOT EXECUTED
12c4b0: 0f 88 d1 01 00 00 js 12c687 <fat_init_volume_info+0x65f><== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
12c4b6: 0f b6 45 dd movzbl -0x23(%ebp),%eax <== NOT EXECUTED
12c4ba: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
12c4bd: 0f b6 55 de movzbl -0x22(%ebp),%edx <== NOT EXECUTED
12c4c1: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
12c4c4: 09 d0 or %edx,%eax <== NOT EXECUTED
12c4c6: 0f b6 55 dc movzbl -0x24(%ebp),%edx <== NOT EXECUTED
12c4ca: 09 d0 or %edx,%eax <== NOT EXECUTED
12c4cc: 0f b6 55 df movzbl -0x21(%ebp),%edx <== NOT EXECUTED
12c4d0: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
12c4d3: 09 d0 or %edx,%eax <== NOT EXECUTED
12c4d5: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
12c4d8: 0f b6 45 e1 movzbl -0x1f(%ebp),%eax <== NOT EXECUTED
12c4dc: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
12c4df: 0f b6 55 e2 movzbl -0x1e(%ebp),%edx <== NOT EXECUTED
12c4e3: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
12c4e6: 09 d0 or %edx,%eax <== NOT EXECUTED
12c4e8: 0f b6 55 e0 movzbl -0x20(%ebp),%edx <== NOT EXECUTED
12c4ec: 09 d0 or %edx,%eax <== NOT EXECUTED
12c4ee: 0f b6 55 e3 movzbl -0x1d(%ebp),%edx <== NOT EXECUTED
12c4f2: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
12c4f5: 09 d0 or %edx,%eax <== NOT EXECUTED
12c4f7: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
12c4fa: 51 push %ecx <== NOT EXECUTED
12c4fb: 6a ff push $0xffffffff <== NOT EXECUTED
12c4fd: 6a ff push $0xffffffff <== NOT EXECUTED
12c4ff: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12c502: e8 f9 f7 ff ff call 12bd00 <fat_fat32_update_fsinfo_sector><== NOT EXECUTED
12c507: 89 c6 mov %eax,%esi <== NOT EXECUTED
0xFFFFFFFF);
if ( rc != RC_OK )
12c509: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c50c: 85 c0 test %eax,%eax <== NOT EXECUTED
12c50e: 0f 84 ab fd ff ff je 12c2bf <fat_init_volume_info+0x297><== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
12c514: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c517: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12c51a: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED
12c51d: e8 82 f3 ff ff call 12b8a4 <fat_buf_release> <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
0xFFFFFFFF);
if ( rc != RC_OK )
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
12c522: 5a pop %edx <== NOT EXECUTED
12c523: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED
12c526: e8 35 11 fe ff call 10d660 <rtems_disk_release> <== NOT EXECUTED
return rc;
12c52b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c52e: e9 7d fe ff ff jmp 12c3b0 <fat_init_volume_info+0x388><== NOT EXECUTED
12c533: 90 nop <== NOT EXECUTED
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
12c534: 0f b6 85 57 ff ff ff movzbl -0xa9(%ebp),%eax <== NOT EXECUTED
12c53b: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
12c53e: 0f b6 95 58 ff ff ff movzbl -0xa8(%ebp),%edx <== NOT EXECUTED
12c545: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
12c548: 09 d0 or %edx,%eax <== NOT EXECUTED
12c54a: 0f b6 95 56 ff ff ff movzbl -0xaa(%ebp),%edx <== NOT EXECUTED
12c551: 09 d0 or %edx,%eax <== NOT EXECUTED
12c553: 0f b6 95 59 ff ff ff movzbl -0xa7(%ebp),%edx <== NOT EXECUTED
12c55a: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
12c55d: 09 d0 or %edx,%eax <== NOT EXECUTED
12c55f: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED
12c562: e9 11 fd ff ff jmp 12c278 <fat_init_volume_info+0x250><== NOT EXECUTED
12c567: 90 nop <== NOT EXECUTED
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
12c568: 0f b6 8d 5b ff ff ff movzbl -0xa5(%ebp),%ecx <== NOT EXECUTED
12c56f: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
12c572: 0f b6 95 5c ff ff ff movzbl -0xa4(%ebp),%edx <== NOT EXECUTED
12c579: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
12c57c: 09 d1 or %edx,%ecx <== NOT EXECUTED
12c57e: 0f b6 95 5a ff ff ff movzbl -0xa6(%ebp),%edx <== NOT EXECUTED
12c585: 09 d1 or %edx,%ecx <== NOT EXECUTED
12c587: 0f b6 95 5d ff ff ff movzbl -0xa3(%ebp),%edx <== NOT EXECUTED
12c58e: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
12c591: 09 d1 or %edx,%ecx <== NOT EXECUTED
12c593: 89 4b 18 mov %ecx,0x18(%ebx) <== NOT EXECUTED
12c596: e9 97 fc ff ff jmp 12c232 <fat_init_volume_info+0x20a><== NOT EXECUTED
12c59b: 90 nop <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
12c59c: c6 43 03 00 movb $0x0,0x3(%ebx) <== NOT EXECUTED
12c5a0: e9 88 fb ff ff jmp 12c12d <fat_init_volume_info+0x105><== NOT EXECUTED
12c5a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
12c5a8: c6 43 0a 02 movb $0x2,0xa(%ebx) <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
12c5ac: c7 43 0c ff ff 00 00 movl $0xffff,0xc(%ebx) <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
12c5b3: c7 43 10 f8 ff 00 00 movl $0xfff8,0x10(%ebx) <== NOT EXECUTED
12c5ba: e9 e3 fc ff ff jmp 12c2a2 <fat_init_volume_info+0x27a><== NOT EXECUTED
12c5bf: 90 nop <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
if (vol->mirror)
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
else
vol->afat = 0;
12c5c0: c6 43 50 00 movb $0x0,0x50(%ebx) <== NOT EXECUTED
12c5c4: e9 5e fe ff ff jmp 12c427 <fat_init_volume_info+0x3ff><== NOT EXECUTED
12c5c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (rc == -1)
return rc;
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
rtems_set_errno_and_return_minus_one(ENOTTY);
12c5cc: e8 af b5 01 00 call 147b80 <__errno> <== NOT EXECUTED
12c5d1: c7 00 19 00 00 00 movl $0x19,(%eax) <== NOT EXECUTED
12c5d7: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
12c5dc: e9 cf fd ff ff jmp 12c3b0 <fat_init_volume_info+0x388><== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
12c5e1: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
12c5e3: e9 a1 fb ff ff jmp 12c189 <fat_init_volume_info+0x161><== NOT EXECUTED
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
sc = rtems_bdbuf_release( block);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_disk_release(vol->dd);
12c5e8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c5eb: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED
12c5ee: e8 6d 10 fe ff call 10d660 <rtems_disk_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
12c5f3: e8 88 b5 01 00 call 147b80 <__errno> <== NOT EXECUTED
12c5f8: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
12c5fe: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
12c603: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c606: e9 a5 fd ff ff jmp 12c3b0 <fat_init_volume_info+0x388><== NOT EXECUTED
vol->afat = 0;
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
if( vol->info_sec == 0 )
{
rtems_disk_release(vol->dd);
12c60b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
FAT_FSINFO_LEAD_SIGNATURE_VALUE)
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
12c60e: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED
12c611: e8 4a 10 fe ff call 10d660 <rtems_disk_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
12c616: e8 65 b5 01 00 call 147b80 <__errno> <== NOT EXECUTED
12c61b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
12c621: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
12c626: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c629: e9 82 fd ff ff jmp 12c3b0 <fat_init_volume_info+0x388><== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
12c62e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c631: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12c634: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED
12c637: e8 68 f2 ff ff call 12b8a4 <fat_buf_release> <== NOT EXECUTED
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
FAT_FSINFO_LEAD_SIGNATURE_VALUE)
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
12c63c: 5f pop %edi <== NOT EXECUTED
12c63d: eb cf jmp 12c60e <fat_init_volume_info+0x5e6><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTTY);
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
if (vol->dd == NULL)
rtems_set_errno_and_return_minus_one(EIO);
12c63f: e8 3c b5 01 00 call 147b80 <__errno> <== NOT EXECUTED
12c644: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
12c64a: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
12c64d: e9 5e fd ff ff jmp 12c3b0 <fat_init_volume_info+0x388><== NOT EXECUTED
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
if ( fs_info->uino == NULL )
{
rtems_disk_release(vol->dd);
12c652: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c655: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED
12c658: e8 03 10 fe ff call 10d660 <rtems_disk_release> <== NOT EXECUTED
free(fs_info->vhash);
12c65d: 59 pop %ecx <== NOT EXECUTED
12c65e: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED
12c661: e8 02 22 fe ff call 10e868 <free> <== NOT EXECUTED
free(fs_info->rhash);
12c666: 5a pop %edx <== NOT EXECUTED
12c667: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED
if (fs_info->sec_buf == NULL)
{
rtems_disk_release(vol->dd);
free(fs_info->vhash);
free(fs_info->rhash);
free(fs_info->uino);
12c66a: e8 f9 21 fe ff call 10e868 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
12c66f: e8 0c b5 01 00 call 147b80 <__errno> <== NOT EXECUTED
12c674: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
12c67a: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
12c67f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c682: e9 29 fd ff ff jmp 12c3b0 <fat_init_volume_info+0x388><== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
12c687: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c68a: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
12c68d: ff 72 34 pushl 0x34(%edx) <== NOT EXECUTED
12c690: e8 0f f2 ff ff call 12b8a4 <fat_buf_release> <== NOT EXECUTED
ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO,
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
12c695: 5e pop %esi <== NOT EXECUTED
12c696: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED
12c699: e8 c2 0f fe ff call 10d660 <rtems_disk_release> <== NOT EXECUTED
12c69e: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
return -1;
12c6a1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c6a4: e9 07 fd ff ff jmp 12c3b0 <fat_init_volume_info+0x388><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
if (fs_info->sec_buf == NULL)
{
rtems_disk_release(vol->dd);
12c6a9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c6ac: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED
12c6af: e8 ac 0f fe ff call 10d660 <rtems_disk_release> <== NOT EXECUTED
free(fs_info->vhash);
12c6b4: 58 pop %eax <== NOT EXECUTED
12c6b5: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED
12c6b8: e8 ab 21 fe ff call 10e868 <free> <== NOT EXECUTED
free(fs_info->rhash);
12c6bd: 5f pop %edi <== NOT EXECUTED
12c6be: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED
12c6c1: e8 a2 21 fe ff call 10e868 <free> <== NOT EXECUTED
free(fs_info->uino);
12c6c6: 5e pop %esi <== NOT EXECUTED
12c6c7: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED
12c6ca: eb 9e jmp 12c66a <fat_init_volume_info+0x642><== NOT EXECUTED
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->vhash == NULL )
{
rtems_disk_release(vol->dd);
12c6cc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c6cf: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED
12c6d2: e8 89 0f fe ff call 10d660 <rtems_disk_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
12c6d7: e8 a4 b4 01 00 call 147b80 <__errno> <== NOT EXECUTED
12c6dc: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
12c6e2: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
12c6e5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c6e8: e9 c3 fc ff ff jmp 12c3b0 <fat_init_volume_info+0x388><== NOT EXECUTED
rtems_chain_initialize_empty(fs_info->vhash + i);
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->rhash == NULL )
{
rtems_disk_release(vol->dd);
12c6ed: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c6f0: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED
12c6f3: e8 68 0f fe ff call 10d660 <rtems_disk_release> <== NOT EXECUTED
free(fs_info->vhash);
12c6f8: 5e pop %esi <== NOT EXECUTED
12c6f9: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED
12c6fc: e9 69 ff ff ff jmp 12c66a <fat_init_volume_info+0x642><== NOT EXECUTED
{
ret = _fat_block_read(mt_entry, vol->info_sec , 0,
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
{
rtems_disk_release(vol->dd);
12c701: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c704: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED
12c707: e8 54 0f fe ff call 10d660 <rtems_disk_release> <== NOT EXECUTED
12c70c: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
return -1;
12c70f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12c712: e9 99 fc ff ff jmp 12c3b0 <fat_init_volume_info+0x388><== NOT EXECUTED
0012b7c0 <fat_ino_is_unique>:
inline bool
fat_ino_is_unique(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t ino
)
{
12b7c0: 55 push %ebp <== NOT EXECUTED
12b7c1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12b7c3: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12b7c6: 8b 50 34 mov 0x34(%eax),%edx <== NOT EXECUTED
12b7c9: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
12b7cc: 39 42 78 cmp %eax,0x78(%edx) <== NOT EXECUTED
12b7cf: 0f 96 c0 setbe %al <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
return (ino >= fs_info->uino_base);
}
12b7d2: c9 leave <== NOT EXECUTED
12b7d3: c3 ret <== NOT EXECUTED
0014388c <fat_scan_fat_for_free_clusters>:
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
14388c: 55 push %ebp <== NOT EXECUTED
14388d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14388f: 57 push %edi <== NOT EXECUTED
143890: 56 push %esi <== NOT EXECUTED
143891: 53 push %ebx <== NOT EXECUTED
143892: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
143895: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
143898: 8b 47 34 mov 0x34(%edi),%eax <== NOT EXECUTED
14389b: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
uint32_t cl4find = 2;
uint32_t next_cln = 0;
14389e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
1438a5: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
uint32_t i = 2;
*cls_added = 0;
1438a8: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
1438ab: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
if (count == 0)
1438b1: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
1438b4: 85 d2 test %edx,%edx <== NOT EXECUTED
1438b6: 0f 84 e8 00 00 00 je 1439a4 <fat_scan_fat_for_free_clusters+0x118><== NOT EXECUTED
return rc;
if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)
1438bc: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
1438bf: 8b 5a 44 mov 0x44(%edx),%ebx <== NOT EXECUTED
1438c2: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED
1438c5: 0f 84 e5 00 00 00 je 1439b0 <fat_scan_fat_for_free_clusters+0x124><== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
1438cb: 83 c0 02 add $0x2,%eax <== NOT EXECUTED
1438ce: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
/*
* fs_info->vol.data_cls is exactly the count of data clusters
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
1438d1: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
1438d4: 0f 86 e0 00 00 00 jbe 1439ba <fat_scan_fat_for_free_clusters+0x12e><== NOT EXECUTED
1438da: be 02 00 00 00 mov $0x2,%esi <== NOT EXECUTED
1438df: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
1438e6: eb 43 jmp 14392b <fat_scan_fat_for_free_clusters+0x9f><== NOT EXECUTED
* by separate 'if' statement because otherwise undo function
* wouldn't work properly
*/
if (*cls_added == 0)
{
*chain = cl4find;
1438e8: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
1438eb: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
1438ed: 51 push %ecx <== NOT EXECUTED
1438ee: 6a ff push $0xffffffff <== NOT EXECUTED
1438f0: 53 push %ebx <== NOT EXECUTED
1438f1: 57 push %edi <== NOT EXECUTED
1438f2: e8 0d fb ff ff call 143404 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
1438f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1438fa: 85 c0 test %eax,%eax <== NOT EXECUTED
1438fc: 0f 85 40 01 00 00 jne 143a42 <fat_scan_fat_for_free_clusters+0x1b6><== NOT EXECUTED
return rc;
}
}
save_cln = cl4find;
(*cls_added)++;
143902: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
143905: 8b 02 mov (%edx),%eax <== NOT EXECUTED
143907: 40 inc %eax <== NOT EXECUTED
143908: 89 02 mov %eax,(%edx) <== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
14390a: 39 45 10 cmp %eax,0x10(%ebp) <== NOT EXECUTED
14390d: 0f 84 0f 01 00 00 je 143a22 <fat_scan_fat_for_free_clusters+0x196><== NOT EXECUTED
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
fs_info->vol.free_cls -= (*cls_added);
*last_cl = save_cln;
fat_buf_release(fs_info);
return rc;
143913: 89 5d d0 mov %ebx,-0x30(%ebp) <== NOT EXECUTED
}
}
i++;
143916: 46 inc %esi <== NOT EXECUTED
cl4find++;
143917: 43 inc %ebx <== NOT EXECUTED
if (cl4find >= data_cls_val)
143918: 39 5d d4 cmp %ebx,-0x2c(%ebp) <== NOT EXECUTED
14391b: 77 05 ja 143922 <fat_scan_fat_for_free_clusters+0x96><== NOT EXECUTED
14391d: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED
/*
* fs_info->vol.data_cls is exactly the count of data clusters
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
143922: 39 75 d4 cmp %esi,-0x2c(%ebp) <== NOT EXECUTED
143925: 0f 86 99 00 00 00 jbe 1439c4 <fat_scan_fat_for_free_clusters+0x138><== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
14392b: 50 push %eax <== NOT EXECUTED
14392c: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
14392f: 50 push %eax <== NOT EXECUTED
143930: 53 push %ebx <== NOT EXECUTED
143931: 57 push %edi <== NOT EXECUTED
143932: e8 f5 fc ff ff call 14362c <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
143937: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14393a: 85 c0 test %eax,%eax <== NOT EXECUTED
14393c: 0f 85 c2 00 00 00 jne 143a04 <fat_scan_fat_for_free_clusters+0x178><== NOT EXECUTED
if (*cls_added != 0)
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
if (next_cln == FAT_GENFAT_FREE)
143942: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
143945: 85 d2 test %edx,%edx <== NOT EXECUTED
143947: 75 cd jne 143916 <fat_scan_fat_for_free_clusters+0x8a><== NOT EXECUTED
/*
* We are enforced to process allocation of the first free cluster
* by separate 'if' statement because otherwise undo function
* wouldn't work properly
*/
if (*cls_added == 0)
143949: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
14394c: 8b 02 mov (%edx),%eax <== NOT EXECUTED
14394e: 85 c0 test %eax,%eax <== NOT EXECUTED
143950: 74 96 je 1438e8 <fat_scan_fat_for_free_clusters+0x5c><== NOT EXECUTED
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
143952: 52 push %edx <== NOT EXECUTED
143953: 6a ff push $0xffffffff <== NOT EXECUTED
143955: 53 push %ebx <== NOT EXECUTED
143956: 57 push %edi <== NOT EXECUTED
143957: e8 a8 fa ff ff call 143404 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
14395c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14395f: 85 c0 test %eax,%eax <== NOT EXECUTED
143961: 0f 85 e2 00 00 00 jne 143a49 <fat_scan_fat_for_free_clusters+0x1bd><== NOT EXECUTED
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find);
143967: 50 push %eax <== NOT EXECUTED
143968: 53 push %ebx <== NOT EXECUTED
143969: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
14396c: 57 push %edi <== NOT EXECUTED
14396d: e8 92 fa ff ff call 143404 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
143972: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
143975: 85 c0 test %eax,%eax <== NOT EXECUTED
143977: 74 89 je 143902 <fat_scan_fat_for_free_clusters+0x76><== NOT EXECUTED
143979: 89 c6 mov %eax,%esi <== NOT EXECUTED
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
14397b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
14397e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
143981: ff 30 pushl (%eax) <== NOT EXECUTED
143983: 57 push %edi <== NOT EXECUTED
143984: e8 27 fe ff ff call 1437b0 <fat_free_fat_clusters_chain><== NOT EXECUTED
/* trying to save last allocated cluster for future use */
fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE);
143989: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
14398c: 6a 00 push $0x0 <== NOT EXECUTED
14398e: 53 push %ebx <== NOT EXECUTED
14398f: 57 push %edi <== NOT EXECUTED
143990: e8 6f fa ff ff call 143404 <fat_set_fat_cluster> <== NOT EXECUTED
fat_buf_release(fs_info);
143995: 59 pop %ecx <== NOT EXECUTED
143996: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
143999: e8 06 7f fe ff call 12b8a4 <fat_buf_release> <== NOT EXECUTED
return rc;
14399e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1439a1: eb 03 jmp 1439a6 <fat_scan_fat_for_free_clusters+0x11a><== NOT EXECUTED
1439a3: 90 nop <== NOT EXECUTED
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
uint32_t i = 2;
*cls_added = 0;
if (count == 0)
1439a4: 31 f6 xor %esi,%esi <== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
*last_cl = save_cln;
fat_buf_release(fs_info);
return RC_OK;
}
1439a6: 89 f0 mov %esi,%eax <== NOT EXECUTED
1439a8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1439ab: 5b pop %ebx <== NOT EXECUTED
1439ac: 5e pop %esi <== NOT EXECUTED
1439ad: 5f pop %edi <== NOT EXECUTED
1439ae: c9 leave <== NOT EXECUTED
1439af: c3 ret <== NOT EXECUTED
*cls_added = 0;
if (count == 0)
return rc;
if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)
1439b0: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED
1439b5: e9 11 ff ff ff jmp 1438cb <fat_scan_fat_for_free_clusters+0x3f><== NOT EXECUTED
/*
* fs_info->vol.data_cls is exactly the count of data clusters
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
1439ba: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
1439c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
cl4find++;
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
1439c4: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
1439c7: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
1439ca: 89 42 44 mov %eax,0x44(%edx) <== NOT EXECUTED
if (fs_info->vol.free_cls != 0xFFFFFFFF)
1439cd: 8b 42 40 mov 0x40(%edx),%eax <== NOT EXECUTED
1439d0: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
1439d3: 74 0b je 1439e0 <fat_scan_fat_for_free_clusters+0x154><== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
1439d5: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
1439d8: 2b 02 sub (%edx),%eax <== NOT EXECUTED
1439da: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
1439dd: 89 42 40 mov %eax,0x40(%edx) <== NOT EXECUTED
*last_cl = save_cln;
1439e0: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
1439e3: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
1439e6: 89 10 mov %edx,(%eax) <== NOT EXECUTED
fat_buf_release(fs_info);
1439e8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1439eb: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
1439ee: e8 b1 7e fe ff call 12b8a4 <fat_buf_release> <== NOT EXECUTED
1439f3: 31 f6 xor %esi,%esi <== NOT EXECUTED
return RC_OK;
1439f5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1439f8: 89 f0 mov %esi,%eax <== NOT EXECUTED
1439fa: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1439fd: 5b pop %ebx <== NOT EXECUTED
1439fe: 5e pop %esi <== NOT EXECUTED
1439ff: 5f pop %edi <== NOT EXECUTED
143a00: c9 leave <== NOT EXECUTED
143a01: c3 ret <== NOT EXECUTED
143a02: 66 90 xchg %ax,%ax <== NOT EXECUTED
143a04: 89 c6 mov %eax,%esi <== NOT EXECUTED
while (i < data_cls_val)
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
if ( rc != RC_OK )
{
if (*cls_added != 0)
143a06: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
143a09: 8b 0a mov (%edx),%ecx <== NOT EXECUTED
143a0b: 85 c9 test %ecx,%ecx <== NOT EXECUTED
143a0d: 74 97 je 1439a6 <fat_scan_fat_for_free_clusters+0x11a><== NOT EXECUTED
fat_free_fat_clusters_chain(mt_entry, (*chain));
143a0f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
143a12: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
143a15: ff 30 pushl (%eax) <== NOT EXECUTED
143a17: 57 push %edi <== NOT EXECUTED
143a18: e8 93 fd ff ff call 1437b0 <fat_free_fat_clusters_chain><== NOT EXECUTED
143a1d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
143a20: eb 84 jmp 1439a6 <fat_scan_fat_for_free_clusters+0x11a><== NOT EXECUTED
(*cls_added)++;
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
143a22: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
143a25: 89 58 44 mov %ebx,0x44(%eax) <== NOT EXECUTED
if (fs_info->vol.free_cls != 0xFFFFFFFF)
143a28: 8b 40 40 mov 0x40(%eax),%eax <== NOT EXECUTED
143a2b: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
143a2e: 74 0b je 143a3b <fat_scan_fat_for_free_clusters+0x1af><== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
143a30: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
143a33: 2b 02 sub (%edx),%eax <== NOT EXECUTED
143a35: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
143a38: 89 42 40 mov %eax,0x40(%edx) <== NOT EXECUTED
*last_cl = save_cln;
143a3b: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
143a3e: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
143a40: eb a6 jmp 1439e8 <fat_scan_fat_for_free_clusters+0x15c><== NOT EXECUTED
143a42: 89 c6 mov %eax,%esi <== NOT EXECUTED
143a44: e9 5d ff ff ff jmp 1439a6 <fat_scan_fat_for_free_clusters+0x11a><== NOT EXECUTED
143a49: 89 c6 mov %eax,%esi <== NOT EXECUTED
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
if ( rc != RC_OK )
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
143a4b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
143a4e: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
143a51: ff 32 pushl (%edx) <== NOT EXECUTED
143a53: 57 push %edi <== NOT EXECUTED
143a54: e8 57 fd ff ff call 1437b0 <fat_free_fat_clusters_chain><== NOT EXECUTED
return rc;
143a59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
143a5c: e9 45 ff ff ff jmp 1439a6 <fat_scan_fat_for_free_clusters+0x11a><== NOT EXECUTED
00143404 <fat_set_fat_cluster>:
fat_set_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t in_val
)
{
143404: 55 push %ebp <== NOT EXECUTED
143405: 89 e5 mov %esp,%ebp <== NOT EXECUTED
143407: 57 push %edi <== NOT EXECUTED
143408: 56 push %esi <== NOT EXECUTED
143409: 53 push %ebx <== NOT EXECUTED
14340a: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
14340d: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
143410: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
143413: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED
uint32_t sec = 0;
uint32_t ofs = 0;
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
rtems_bdbuf_buffer *block0 = NULL;
143416: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
14341d: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
143420: 76 6b jbe 14348d <fat_set_fat_cluster+0x89><== NOT EXECUTED
143422: 8b 43 34 mov 0x34(%ebx),%eax <== NOT EXECUTED
143425: 40 inc %eax <== NOT EXECUTED
143426: 39 c2 cmp %eax,%edx <== NOT EXECUTED
143428: 77 63 ja 14348d <fat_set_fat_cluster+0x89><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
14342a: 0f b6 43 0a movzbl 0xa(%ebx),%eax <== NOT EXECUTED
14342e: a8 01 test $0x1,%al <== NOT EXECUTED
143430: 75 76 jne 1434a8 <fat_set_fat_cluster+0xa4><== NOT EXECUTED
143432: a8 02 test $0x2,%al <== NOT EXECUTED
143434: 74 7a je 1434b0 <fat_set_fat_cluster+0xac><== NOT EXECUTED
143436: 8d 04 12 lea (%edx,%edx,1),%eax <== NOT EXECUTED
143439: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
14343c: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED
143440: 89 c6 mov %eax,%esi <== NOT EXECUTED
143442: d3 ee shr %cl,%esi <== NOT EXECUTED
143444: 03 73 4c add 0x4c(%ebx),%esi <== NOT EXECUTED
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
143447: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
143449: 66 89 45 d2 mov %ax,-0x2e(%ebp) <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
14344d: 8d 7d e4 lea -0x1c(%ebp),%edi <== NOT EXECUTED
143450: 57 push %edi <== NOT EXECUTED
143451: 6a 01 push $0x1 <== NOT EXECUTED
143453: 56 push %esi <== NOT EXECUTED
143454: 53 push %ebx <== NOT EXECUTED
143455: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
143458: e8 b7 85 fe ff call 12ba14 <fat_buf_access> <== NOT EXECUTED
if (rc != RC_OK)
14345d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
143460: 85 c0 test %eax,%eax <== NOT EXECUTED
143462: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
143465: 75 36 jne 14349d <fat_set_fat_cluster+0x99><== NOT EXECUTED
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
143467: 0f b7 4d d2 movzwl -0x2e(%ebp),%ecx <== NOT EXECUTED
14346b: 49 dec %ecx <== NOT EXECUTED
14346c: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED
14346f: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
143472: 21 4d c4 and %ecx,-0x3c(%ebp) <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
143475: 8a 4b 0a mov 0xa(%ebx),%cl <== NOT EXECUTED
143478: 88 4d d4 mov %cl,-0x2c(%ebp) <== NOT EXECUTED
14347b: 80 f9 02 cmp $0x2,%cl <== NOT EXECUTED
14347e: 74 4c je 1434cc <fat_set_fat_cluster+0xc8><== NOT EXECUTED
143480: 80 f9 04 cmp $0x4,%cl <== NOT EXECUTED
143483: 0f 84 cb 00 00 00 je 143554 <fat_set_fat_cluster+0x150><== NOT EXECUTED
143489: fe c9 dec %cl <== NOT EXECUTED
14348b: 74 5f je 1434ec <fat_set_fat_cluster+0xe8><== NOT EXECUTED
fat_buf_mark_modified(fs_info);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
14348d: e8 ee 46 00 00 call 147b80 <__errno> <== NOT EXECUTED
143492: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
143498: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
break;
}
return RC_OK;
}
14349d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1434a0: 5b pop %ebx <== NOT EXECUTED
1434a1: 5e pop %esi <== NOT EXECUTED
1434a2: 5f pop %edi <== NOT EXECUTED
1434a3: c9 leave <== NOT EXECUTED
1434a4: c3 ret <== NOT EXECUTED
1434a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
1434a8: 89 d0 mov %edx,%eax <== NOT EXECUTED
1434aa: d1 e8 shr %eax <== NOT EXECUTED
1434ac: 01 d0 add %edx,%eax <== NOT EXECUTED
1434ae: eb 89 jmp 143439 <fat_set_fat_cluster+0x35><== NOT EXECUTED
1434b0: 8d 0c 95 00 00 00 00 lea 0x0(,%edx,4),%ecx <== NOT EXECUTED
1434b7: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
1434ba: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED
1434be: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED
1434c1: d3 ee shr %cl,%esi <== NOT EXECUTED
1434c3: 03 73 4c add 0x4c(%ebx),%esi <== NOT EXECUTED
1434c6: e9 7c ff ff ff jmp 143447 <fat_set_fat_cluster+0x43><== NOT EXECUTED
1434cb: 90 nop <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
1434cc: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
1434cf: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
1434d2: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
1434d5: 8b 75 c4 mov -0x3c(%ebp),%esi <== NOT EXECUTED
1434d8: 66 89 0c 32 mov %cx,(%edx,%esi,1) <== NOT EXECUTED
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
1434dc: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED
break;
}
return RC_OK;
}
1434e3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1434e6: 5b pop %ebx <== NOT EXECUTED
1434e7: 5e pop %esi <== NOT EXECUTED
1434e8: 5f pop %edi <== NOT EXECUTED
1434e9: c9 leave <== NOT EXECUTED
1434ea: c3 ret <== NOT EXECUTED
1434eb: 90 nop <== NOT EXECUTED
return rc;
switch ( fs_info->vol.type )
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
1434ec: 83 e2 01 and $0x1,%edx <== NOT EXECUTED
1434ef: 0f 84 8b 00 00 00 je 143580 <fat_set_fat_cluster+0x17c><== NOT EXECUTED
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
1434f5: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
1434f8: c1 e2 04 shl $0x4,%edx <== NOT EXECUTED
1434fb: 66 89 55 d4 mov %dx,-0x2c(%ebp) <== NOT EXECUTED
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
1434ff: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
143502: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
143505: 03 55 c4 add -0x3c(%ebp),%edx <== NOT EXECUTED
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
143508: 80 22 0f andb $0xf,(%edx) <== NOT EXECUTED
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
14350b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
14350e: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
143511: 03 55 c4 add -0x3c(%ebp),%edx <== NOT EXECUTED
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
143514: 8a 4d d4 mov -0x2c(%ebp),%cl <== NOT EXECUTED
143517: 08 0a or %cl,(%edx) <== NOT EXECUTED
143519: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED
(*((uint8_t *)(block0->buffer + ofs))) |
(uint8_t )(fat16_clv & 0x00FF);
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
143520: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED
143523: 4a dec %edx <== NOT EXECUTED
143524: 3b 55 c4 cmp -0x3c(%ebp),%edx <== NOT EXECUTED
143527: 0f 84 9f 00 00 00 je 1435cc <fat_set_fat_cluster+0x1c8><== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
14352d: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
143530: 41 inc %ecx <== NOT EXECUTED
143531: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
143534: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
143537: c6 04 0a 00 movb $0x0,(%edx,%ecx,1) <== NOT EXECUTED
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
(*((uint8_t *)(block0->buffer + ofs+1))) |
14353b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
14353e: 03 4a 20 add 0x20(%edx),%ecx <== NOT EXECUTED
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
143541: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
143544: 66 c1 ea 08 shr $0x8,%dx <== NOT EXECUTED
143548: 08 11 or %dl,(%ecx) <== NOT EXECUTED
break;
}
return RC_OK;
}
14354a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
14354d: 5b pop %ebx <== NOT EXECUTED
14354e: 5e pop %esi <== NOT EXECUTED
14354f: 5f pop %edi <== NOT EXECUTED
143550: c9 leave <== NOT EXECUTED
143551: c3 ret <== NOT EXECUTED
143552: 66 90 xchg %ax,%ax <== NOT EXECUTED
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
143554: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
143557: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
14355a: 03 4a 20 add 0x20(%edx),%ecx <== NOT EXECUTED
break;
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
*((uint32_t *)(block0->buffer + ofs)) =
14355d: 81 21 00 00 00 f0 andl $0xf0000000,(%ecx) <== NOT EXECUTED
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
*((uint32_t *)(block0->buffer + ofs)) =
143563: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
143566: 81 e2 ff ff ff 0f and $0xfffffff,%edx <== NOT EXECUTED
14356c: 09 11 or %edx,(%ecx) <== NOT EXECUTED
14356e: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED
break;
}
return RC_OK;
}
143575: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
143578: 5b pop %ebx <== NOT EXECUTED
143579: 5e pop %esi <== NOT EXECUTED
14357a: 5f pop %edi <== NOT EXECUTED
14357b: c9 leave <== NOT EXECUTED
14357c: c3 ret <== NOT EXECUTED
14357d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
(uint8_t )((fat16_clv & 0xFF00)>>8);
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
143580: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
143583: 81 e2 ff 0f 00 00 and $0xfff,%edx <== NOT EXECUTED
143589: 66 89 55 d4 mov %dx,-0x2c(%ebp) <== NOT EXECUTED
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
14358d: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
143590: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
143593: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
143596: c6 04 0a 00 movb $0x0,(%edx,%ecx,1) <== NOT EXECUTED
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
14359a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
14359d: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
1435a0: 01 ca add %ecx,%edx <== NOT EXECUTED
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs)) =
1435a2: 8a 4d d4 mov -0x2c(%ebp),%cl <== NOT EXECUTED
1435a5: 08 0a or %cl,(%edx) <== NOT EXECUTED
1435a7: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED
(*((uint8_t *)(block0->buffer + ofs))) |
(uint8_t )(fat16_clv & 0x00FF);
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
1435ae: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED
1435b1: 4a dec %edx <== NOT EXECUTED
1435b2: 3b 55 c4 cmp -0x3c(%ebp),%edx <== NOT EXECUTED
1435b5: 74 51 je 143608 <fat_set_fat_cluster+0x204><== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
1435b7: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
1435ba: 41 inc %ecx <== NOT EXECUTED
1435bb: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
1435be: 8b 5a 20 mov 0x20(%edx),%ebx <== NOT EXECUTED
1435c1: 8d 14 19 lea (%ecx,%ebx,1),%edx <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
1435c4: 80 22 f0 andb $0xf0,(%edx) <== NOT EXECUTED
1435c7: e9 6f ff ff ff jmp 14353b <fat_set_fat_cluster+0x137><== NOT EXECUTED
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
1435cc: 57 push %edi <== NOT EXECUTED
1435cd: 6a 01 push $0x1 <== NOT EXECUTED
1435cf: 46 inc %esi <== NOT EXECUTED
1435d0: 56 push %esi <== NOT EXECUTED
1435d1: 53 push %ebx <== NOT EXECUTED
1435d2: e8 3d 84 fe ff call 12ba14 <fat_buf_access> <== NOT EXECUTED
&block0);
if (rc != RC_OK)
1435d7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1435da: 85 c0 test %eax,%eax <== NOT EXECUTED
1435dc: 0f 85 bb fe ff ff jne 14349d <fat_set_fat_cluster+0x99><== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
1435e2: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
1435e5: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
1435e8: c6 02 00 movb $0x0,(%edx) <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
1435eb: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
1435ee: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
1435f1: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
1435f4: 66 c1 e9 08 shr $0x8,%cx <== NOT EXECUTED
1435f8: 08 0a or %cl,(%edx) <== NOT EXECUTED
1435fa: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED
143601: e9 97 fe ff ff jmp 14349d <fat_set_fat_cluster+0x99><== NOT EXECUTED
143606: 66 90 xchg %ax,%ax <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
143608: 57 push %edi <== NOT EXECUTED
143609: 6a 01 push $0x1 <== NOT EXECUTED
14360b: 46 inc %esi <== NOT EXECUTED
14360c: 56 push %esi <== NOT EXECUTED
14360d: 53 push %ebx <== NOT EXECUTED
14360e: e8 01 84 fe ff call 12ba14 <fat_buf_access> <== NOT EXECUTED
&block0);
if (rc != RC_OK)
143613: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
143616: 85 c0 test %eax,%eax <== NOT EXECUTED
143618: 0f 85 7f fe ff ff jne 14349d <fat_set_fat_cluster+0x99><== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
14361e: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
143621: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) =
143624: 80 22 f0 andb $0xf0,(%edx) <== NOT EXECUTED
143627: eb c2 jmp 1435eb <fat_set_fat_cluster+0x1e7><== NOT EXECUTED
0012bd68 <fat_shutdown_drive>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry)
{
12bd68: 55 push %ebp <== NOT EXECUTED
12bd69: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12bd6b: 57 push %edi <== NOT EXECUTED
12bd6c: 56 push %esi <== NOT EXECUTED
12bd6d: 53 push %ebx <== NOT EXECUTED
12bd6e: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
12bd71: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
12bd74: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
12bd77: f6 46 0a 04 testb $0x4,0xa(%esi) <== NOT EXECUTED
12bd7b: 0f 85 df 00 00 00 jne 12be60 <fat_shutdown_drive+0xf8><== NOT EXECUTED
12bd81: 31 ff xor %edi,%edi <== NOT EXECUTED
fs_info->vol.next_cl);
if ( rc != RC_OK )
rc = -1;
}
fat_buf_release(fs_info);
12bd83: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12bd86: 56 push %esi <== NOT EXECUTED
12bd87: e8 18 fb ff ff call 12b8a4 <fat_buf_release> <== NOT EXECUTED
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
12bd8c: 5a pop %edx <== NOT EXECUTED
12bd8d: 59 pop %ecx <== NOT EXECUTED
12bd8e: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED
12bd91: ff 76 54 pushl 0x54(%esi) <== NOT EXECUTED
12bd94: e8 bf ec fd ff call 10aa58 <rtems_bdbuf_syncdev> <== NOT EXECUTED
12bd99: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12bd9c: 85 c0 test %eax,%eax <== NOT EXECUTED
12bd9e: 0f 85 e0 00 00 00 jne 12be84 <fat_shutdown_drive+0x11c><== NOT EXECUTED
12bda4: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
rc = -1;
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
12bdab: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED
12bdae: 03 5e 64 add 0x64(%esi),%ebx <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
12bdb1: eb 0d jmp 12bdc0 <fat_shutdown_drive+0x58><== NOT EXECUTED
12bdb3: 90 nop <== NOT EXECUTED
free(node);
12bdb4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12bdb7: 50 push %eax <== NOT EXECUTED
12bdb8: e8 ab 2a fe ff call 10e868 <free> <== NOT EXECUTED
12bdbd: 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 );
12bdc0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12bdc3: 53 push %ebx <== NOT EXECUTED
12bdc4: e8 cf 7c fe ff call 113a98 <_Chain_Get> <== NOT EXECUTED
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
while ( (node = rtems_chain_get(the_chain)) != NULL )
12bdc9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12bdcc: 85 c0 test %eax,%eax <== NOT EXECUTED
12bdce: 75 e4 jne 12bdb4 <fat_shutdown_drive+0x4c><== NOT EXECUTED
12bdd0: 83 45 e4 0c addl $0xc,-0x1c(%ebp) <== NOT EXECUTED
fat_buf_release(fs_info);
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
rc = -1;
for (i = 0; i < FAT_HASH_SIZE; i++)
12bdd4: 83 7d e4 18 cmpl $0x18,-0x1c(%ebp) <== NOT EXECUTED
12bdd8: 75 d1 jne 12bdab <fat_shutdown_drive+0x43><== NOT EXECUTED
12bdda: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
}
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
12bde1: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED
12bde4: 03 5e 68 add 0x68(%esi),%ebx <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
12bde7: eb 0f jmp 12bdf8 <fat_shutdown_drive+0x90><== NOT EXECUTED
12bde9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
free(node);
12bdec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12bdef: 50 push %eax <== NOT EXECUTED
12bdf0: e8 73 2a fe ff call 10e868 <free> <== NOT EXECUTED
12bdf5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12bdf8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12bdfb: 53 push %ebx <== NOT EXECUTED
12bdfc: e8 97 7c fe ff call 113a98 <_Chain_Get> <== NOT EXECUTED
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
while ( (node = rtems_chain_get(the_chain)) != NULL )
12be01: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12be04: 85 c0 test %eax,%eax <== NOT EXECUTED
12be06: 75 e4 jne 12bdec <fat_shutdown_drive+0x84><== NOT EXECUTED
12be08: 83 45 e4 0c addl $0xc,-0x1c(%ebp) <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
for (i = 0; i < FAT_HASH_SIZE; i++)
12be0c: 83 7d e4 18 cmpl $0x18,-0x1c(%ebp) <== NOT EXECUTED
12be10: 75 cf jne 12bde1 <fat_shutdown_drive+0x79><== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
free(fs_info->vhash);
12be12: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12be15: ff 76 64 pushl 0x64(%esi) <== NOT EXECUTED
12be18: e8 4b 2a fe ff call 10e868 <free> <== NOT EXECUTED
free(fs_info->rhash);
12be1d: 58 pop %eax <== NOT EXECUTED
12be1e: ff 76 68 pushl 0x68(%esi) <== NOT EXECUTED
12be21: e8 42 2a fe ff call 10e868 <free> <== NOT EXECUTED
free(fs_info->uino);
12be26: 5b pop %ebx <== NOT EXECUTED
12be27: ff 76 6c pushl 0x6c(%esi) <== NOT EXECUTED
12be2a: e8 39 2a fe ff call 10e868 <free> <== NOT EXECUTED
free(fs_info->sec_buf);
12be2f: 59 pop %ecx <== NOT EXECUTED
12be30: ff b6 88 00 00 00 pushl 0x88(%esi) <== NOT EXECUTED
12be36: e8 2d 2a fe ff call 10e868 <free> <== NOT EXECUTED
rtems_disk_release(fs_info->vol.dd);
12be3b: 5a pop %edx <== NOT EXECUTED
12be3c: ff 76 5c pushl 0x5c(%esi) <== NOT EXECUTED
12be3f: e8 1c 18 fe ff call 10d660 <rtems_disk_release> <== NOT EXECUTED
if (rc)
12be44: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12be47: 85 ff test %edi,%edi <== NOT EXECUTED
12be49: 74 0b je 12be56 <fat_shutdown_drive+0xee><== NOT EXECUTED
errno = EIO;
12be4b: e8 30 bd 01 00 call 147b80 <__errno> <== NOT EXECUTED
12be50: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
return rc;
}
12be56: 89 f8 mov %edi,%eax <== NOT EXECUTED
12be58: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12be5b: 5b pop %ebx <== NOT EXECUTED
12be5c: 5e pop %esi <== NOT EXECUTED
12be5d: 5f pop %edi <== NOT EXECUTED
12be5e: c9 leave <== NOT EXECUTED
12be5f: c3 ret <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
{
rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls,
12be60: 53 push %ebx <== NOT EXECUTED
12be61: ff 76 44 pushl 0x44(%esi) <== NOT EXECUTED
12be64: ff 76 40 pushl 0x40(%esi) <== NOT EXECUTED
12be67: 50 push %eax <== NOT EXECUTED
12be68: e8 93 fe ff ff call 12bd00 <fat_fat32_update_fsinfo_sector><== NOT EXECUTED
12be6d: 89 c7 mov %eax,%edi <== NOT EXECUTED
fs_info->vol.next_cl);
if ( rc != RC_OK )
12be6f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12be72: 85 c0 test %eax,%eax <== NOT EXECUTED
12be74: 0f 84 09 ff ff ff je 12bd83 <fat_shutdown_drive+0x1b><== NOT EXECUTED
12be7a: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
12be7f: e9 ff fe ff ff jmp 12bd83 <fat_shutdown_drive+0x1b><== NOT EXECUTED
rc = -1;
}
fat_buf_release(fs_info);
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
12be84: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
12be89: e9 16 ff ff ff jmp 12bda4 <fat_shutdown_drive+0x3c><== NOT EXECUTED
00143ea4 <fchdir>:
#include <rtems/seterr.h>
int fchdir(
int fd
)
{
143ea4: 55 push %ebp <== NOT EXECUTED
143ea5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
143ea7: 57 push %edi <== NOT EXECUTED
143ea8: 56 push %esi <== NOT EXECUTED
143ea9: 53 push %ebx <== NOT EXECUTED
143eaa: 83 ec 4c sub $0x4c,%esp <== NOT EXECUTED
143ead: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc, saved;
rtems_libio_check_fd( fd );
143eb0: 3b 1d 4c d1 16 00 cmp 0x16d14c,%ebx <== NOT EXECUTED
143eb6: 0f 83 c0 00 00 00 jae 143f7c <fchdir+0xd8> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
143ebc: c1 e3 06 shl $0x6,%ebx <== NOT EXECUTED
143ebf: 03 1d dc 4d 17 00 add 0x174ddc,%ebx <== NOT EXECUTED
rtems_libio_check_is_open(iop);
143ec5: f6 43 15 01 testb $0x1,0x15(%ebx) <== NOT EXECUTED
143ec9: 0f 84 ad 00 00 00 je 143f7c <fchdir+0xd8> <== NOT EXECUTED
/*
* Verify you can change directory into this node.
*/
if ( !iop->pathinfo.ops ) {
143ecf: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
143ed2: 85 c0 test %eax,%eax <== NOT EXECUTED
143ed4: 0f 84 d0 00 00 00 je 143faa <fchdir+0x106> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( !iop->pathinfo.ops->node_type_h ) {
143eda: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED
143edd: 85 c0 test %eax,%eax <== NOT EXECUTED
143edf: 0f 84 c5 00 00 00 je 143faa <fchdir+0x106> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
143ee5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
143ee8: 83 c3 18 add $0x18,%ebx <== NOT EXECUTED
143eeb: 53 push %ebx <== NOT EXECUTED
143eec: ff d0 call *%eax <== NOT EXECUTED
143eee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
143ef1: 48 dec %eax <== NOT EXECUTED
143ef2: 75 74 jne 143f68 <fchdir+0xc4> <== NOT EXECUTED
* but note the race condition. Threads who
* share their rtems_filesystem_current better
* be synchronized!
*/
saved = rtems_filesystem_current;
143ef4: a1 20 f3 16 00 mov 0x16f320,%eax <== NOT EXECUTED
143ef9: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED
143efc: 89 55 b4 mov %edx,-0x4c(%ebp) <== NOT EXECUTED
143eff: 8d 70 04 lea 0x4(%eax),%esi <== NOT EXECUTED
143f02: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED
143f07: 89 d7 mov %edx,%edi <== NOT EXECUTED
143f09: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo;
143f0b: 8d 78 04 lea 0x4(%eax),%edi <== NOT EXECUTED
143f0e: b1 05 mov $0x5,%cl <== NOT EXECUTED
143f10: 89 de mov %ebx,%esi <== NOT EXECUTED
143f12: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
/* clone the current node */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
143f14: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
143f17: 6a 00 push $0x0 <== NOT EXECUTED
143f19: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED
143f1c: 56 push %esi <== NOT EXECUTED
143f1d: 6a 00 push $0x0 <== NOT EXECUTED
143f1f: 6a 01 push $0x1 <== NOT EXECUTED
143f21: 68 18 1c 16 00 push $0x161c18 <== NOT EXECUTED
143f26: e8 cd a8 fc ff call 10e7f8 <rtems_filesystem_evaluate_path><== NOT EXECUTED
143f2b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
143f2e: 85 c0 test %eax,%eax <== NOT EXECUTED
143f30: 75 5e jne 143f90 <fchdir+0xec> <== NOT EXECUTED
/* cloning failed; restore original and bail out */
rtems_filesystem_current = saved;
return -1;
}
/* release the old one */
rtems_filesystem_freenode( &saved );
143f32: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
143f35: 85 c0 test %eax,%eax <== NOT EXECUTED
143f37: 74 13 je 143f4c <fchdir+0xa8> <== NOT EXECUTED
143f39: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
143f3c: 85 c0 test %eax,%eax <== NOT EXECUTED
143f3e: 74 0c je 143f4c <fchdir+0xa8> <== NOT EXECUTED
143f40: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
143f43: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED
143f46: 52 push %edx <== NOT EXECUTED
143f47: ff d0 call *%eax <== NOT EXECUTED
143f49: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_filesystem_current = loc;
143f4c: 8b 3d 20 f3 16 00 mov 0x16f320,%edi <== NOT EXECUTED
143f52: 83 c7 04 add $0x4,%edi <== NOT EXECUTED
143f55: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED
143f5a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
143f5c: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
}
143f5e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
143f61: 5b pop %ebx <== NOT EXECUTED
143f62: 5e pop %esi <== NOT EXECUTED
143f63: 5f pop %edi <== NOT EXECUTED
143f64: c9 leave <== NOT EXECUTED
143f65: c3 ret <== NOT EXECUTED
143f66: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_set_errno_and_return_minus_one( ENOTDIR );
143f68: e8 13 3c 00 00 call 147b80 <__errno> <== NOT EXECUTED
143f6d: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
143f73: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
143f78: eb e4 jmp 143f5e <fchdir+0xba> <== NOT EXECUTED
143f7a: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc, saved;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
143f7c: e8 ff 3b 00 00 call 147b80 <__errno> <== NOT EXECUTED
143f81: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
143f87: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
143f8c: eb d0 jmp 143f5e <fchdir+0xba> <== NOT EXECUTED
143f8e: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo;
/* clone the current node */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* cloning failed; restore original and bail out */
rtems_filesystem_current = saved;
143f90: 8b 3d 20 f3 16 00 mov 0x16f320,%edi <== NOT EXECUTED
143f96: 83 c7 04 add $0x4,%edi <== NOT EXECUTED
143f99: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED
143f9e: 8b 75 b4 mov -0x4c(%ebp),%esi <== NOT EXECUTED
143fa1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
143fa3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
143fa8: eb b4 jmp 143f5e <fchdir+0xba> <== NOT EXECUTED
if ( !iop->pathinfo.ops ) {
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( !iop->pathinfo.ops->node_type_h ) {
rtems_set_errno_and_return_minus_one( ENOTSUP );
143faa: e8 d1 3b 00 00 call 147b80 <__errno> <== NOT EXECUTED
143faf: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
143fb5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
143fba: eb a2 jmp 143f5e <fchdir+0xba> <== NOT EXECUTED
0012e588 <fchmod>:
int fchmod(
int fd,
mode_t mode
)
{
12e588: 55 push %ebp <== NOT EXECUTED
12e589: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12e58b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12e58e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12e591: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
12e594: 3b 05 4c d1 16 00 cmp 0x16d14c,%eax <== NOT EXECUTED
12e59a: 73 2c jae 12e5c8 <fchmod+0x40> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
12e59c: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED
12e59f: 03 05 dc 4d 17 00 add 0x174ddc,%eax <== NOT EXECUTED
rtems_libio_check_is_open(iop);
12e5a5: f6 40 15 01 testb $0x1,0x15(%eax) <== NOT EXECUTED
12e5a9: 74 1d je 12e5c8 <fchmod+0x40> <== NOT EXECUTED
/*
* Now process the fchmod().
*/
if ( !iop->handlers->fchmod_h )
12e5ab: 8b 48 3c mov 0x3c(%eax),%ecx <== NOT EXECUTED
12e5ae: 8b 49 1c mov 0x1c(%ecx),%ecx <== NOT EXECUTED
12e5b1: 85 c9 test %ecx,%ecx <== NOT EXECUTED
12e5b3: 74 25 je 12e5da <fchmod+0x52> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
12e5b5: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED
12e5b8: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
12e5bb: 83 c0 18 add $0x18,%eax <== NOT EXECUTED
12e5be: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
12e5c1: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED
}
12e5c4: c9 leave <== NOT EXECUTED
* Now process the fchmod().
*/
if ( !iop->handlers->fchmod_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
12e5c5: ff e0 jmp *%eax <== NOT EXECUTED
12e5c7: 90 nop <== NOT EXECUTED
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
12e5c8: e8 b3 95 01 00 call 147b80 <__errno> <== NOT EXECUTED
12e5cd: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
*/
if ( !iop->handlers->fchmod_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
}
12e5d3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12e5d8: c9 leave <== NOT EXECUTED
12e5d9: c3 ret <== NOT EXECUTED
/*
* Now process the fchmod().
*/
if ( !iop->handlers->fchmod_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
12e5da: e8 a1 95 01 00 call 147b80 <__errno> <== NOT EXECUTED
12e5df: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
12e5e5: eb ec jmp 12e5d3 <fchmod+0x4b> <== NOT EXECUTED
0012e5e8 <fchown>:
int fchown(
int fd,
uid_t owner,
gid_t group
)
{
12e5e8: 55 push %ebp <== NOT EXECUTED
12e5e9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12e5eb: 53 push %ebx <== NOT EXECUTED
12e5ec: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
12e5ef: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12e5f2: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
12e5f5: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
12e5f8: 3b 05 4c d1 16 00 cmp 0x16d14c,%eax <== NOT EXECUTED
12e5fe: 73 38 jae 12e638 <fchown+0x50> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
12e600: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED
12e603: 03 05 dc 4d 17 00 add 0x174ddc,%eax <== NOT EXECUTED
rtems_libio_check_is_open(iop);
12e609: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED
12e60c: f6 c6 01 test $0x1,%dh <== NOT EXECUTED
12e60f: 74 27 je 12e638 <fchown+0x50> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
12e611: 83 e2 04 and $0x4,%edx <== NOT EXECUTED
12e614: 74 36 je 12e64c <fchown+0x64> <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h )
12e616: 8b 50 24 mov 0x24(%eax),%edx <== NOT EXECUTED
12e619: 8b 52 18 mov 0x18(%edx),%edx <== NOT EXECUTED
12e61c: 85 d2 test %edx,%edx <== NOT EXECUTED
12e61e: 74 39 je 12e659 <fchown+0x71> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
12e620: 0f b7 db movzwl %bx,%ebx <== NOT EXECUTED
12e623: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED
12e626: 0f b7 c9 movzwl %cx,%ecx <== NOT EXECUTED
12e629: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED
12e62c: 83 c0 18 add $0x18,%eax <== NOT EXECUTED
12e62f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
12e632: 59 pop %ecx <== NOT EXECUTED
12e633: 5b pop %ebx <== NOT EXECUTED
12e634: c9 leave <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->pathinfo.ops->chown_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
12e635: ff e2 jmp *%edx <== NOT EXECUTED
12e637: 90 nop <== NOT EXECUTED
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
12e638: e8 43 95 01 00 call 147b80 <__errno> <== NOT EXECUTED
12e63d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
}
12e643: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12e648: 5a pop %edx <== NOT EXECUTED
12e649: 5b pop %ebx <== NOT EXECUTED
12e64a: c9 leave <== NOT EXECUTED
12e64b: c3 ret <== NOT EXECUTED
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
12e64c: e8 2f 95 01 00 call 147b80 <__errno> <== NOT EXECUTED
12e651: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
12e657: eb ea jmp 12e643 <fchown+0x5b> <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
12e659: e8 22 95 01 00 call 147b80 <__errno> <== NOT EXECUTED
12e65e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
12e664: eb dd jmp 12e643 <fchown+0x5b> <== NOT EXECUTED
00143fbc <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
143fbc: 55 push %ebp
143fbd: 89 e5 mov %esp,%ebp
143fbf: 57 push %edi
143fc0: 56 push %esi
143fc1: 53 push %ebx
143fc2: 83 ec 1c sub $0x1c,%esp
143fc5: 8b 5d 08 mov 0x8(%ebp),%ebx
143fc8: 8b 55 0c mov 0xc(%ebp),%edx
#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, ...));
143fcb: 8d 7d 10 lea 0x10(%ebp),%edi
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
143fce: 8b 35 4c d1 16 00 mov 0x16d14c,%esi
143fd4: 39 f3 cmp %esi,%ebx
143fd6: 0f 83 3c 01 00 00 jae 144118 <fcntl+0x15c> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
143fdc: a1 dc 4d 17 00 mov 0x174ddc,%eax
143fe1: c1 e3 06 shl $0x6,%ebx
143fe4: 8d 1c 18 lea (%eax,%ebx,1),%ebx
rtems_libio_check_is_open(iop);
143fe7: 8b 4b 14 mov 0x14(%ebx),%ecx
143fea: f6 c5 01 test $0x1,%ch
143fed: 0f 84 25 01 00 00 je 144118 <fcntl+0x15c> <== NEVER TAKEN
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
143ff3: 83 fa 09 cmp $0x9,%edx
143ff6: 76 14 jbe 14400c <fcntl+0x50>
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
143ff8: e8 83 3b 00 00 call 147b80 <__errno>
143ffd: c7 00 16 00 00 00 movl $0x16,(%eax)
144003: be ff ff ff ff mov $0xffffffff,%esi
144008: eb 1a jmp 144024 <fcntl+0x68>
14400a: 66 90 xchg %ax,%ax
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
14400c: ff 24 95 c4 9b 16 00 jmp *0x169bc4(,%edx,4)
144013: 90 nop
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
144014: e8 67 3b 00 00 call 147b80 <__errno>
144019: c7 00 86 00 00 00 movl $0x86,(%eax)
14401f: be ff ff ff ff mov $0xffffffff,%esi
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
144024: 89 f0 mov %esi,%eax
144026: 8d 65 f4 lea -0xc(%ebp),%esp
144029: 5b pop %ebx
14402a: 5e pop %esi
14402b: 5f pop %edi
14402c: c9 leave
14402d: c3 ret
14402e: 66 90 xchg %ax,%ax
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
144030: 83 ec 0c sub $0xc,%esp
144033: ff 37 pushl (%edi)
144035: 89 55 e0 mov %edx,-0x20(%ebp)
144038: e8 47 ac fc ff call 10ec84 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
14403d: 25 01 02 00 00 and $0x201,%eax
144042: 8b 4b 14 mov 0x14(%ebx),%ecx
144045: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx
14404b: 09 c8 or %ecx,%eax
14404d: 89 43 14 mov %eax,0x14(%ebx)
144050: 31 f6 xor %esi,%esi
144052: 83 c4 10 add $0x10,%esp
144055: 8b 55 e0 mov -0x20(%ebp),%edx
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
144058: 8b 43 3c mov 0x3c(%ebx),%eax
14405b: 8b 40 30 mov 0x30(%eax),%eax
14405e: 85 c0 test %eax,%eax
144060: 74 c2 je 144024 <fcntl+0x68> <== NEVER TAKEN
int err = (*iop->handlers->fcntl_h)( cmd, iop );
144062: 83 ec 08 sub $0x8,%esp
144065: 53 push %ebx
144066: 52 push %edx
144067: ff d0 call *%eax
144069: 89 c3 mov %eax,%ebx
if (err) {
14406b: 83 c4 10 add $0x10,%esp
14406e: 85 c0 test %eax,%eax
144070: 74 b2 je 144024 <fcntl+0x68> <== ALWAYS TAKEN
errno = err;
144072: e8 09 3b 00 00 call 147b80 <__errno> <== NOT EXECUTED
144077: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
144079: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
14407e: 89 f0 mov %esi,%eax <== NOT EXECUTED
144080: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
144083: 5b pop %ebx <== NOT EXECUTED
144084: 5e pop %esi <== NOT EXECUTED
144085: 5f pop %edi <== NOT EXECUTED
144086: c9 leave <== NOT EXECUTED
144087: c3 ret <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
144088: 83 ec 0c sub $0xc,%esp
14408b: 51 push %ecx
14408c: 89 55 e0 mov %edx,-0x20(%ebp)
14408f: e8 04 aa fc ff call 10ea98 <rtems_libio_to_fcntl_flags>
144094: 89 c6 mov %eax,%esi
144096: 83 c4 10 add $0x10,%esp
144099: 8b 55 e0 mov -0x20(%ebp),%edx
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
14409c: 85 f6 test %esi,%esi
14409e: 79 b8 jns 144058 <fcntl+0x9c> <== ALWAYS TAKEN
1440a0: eb 82 jmp 144024 <fcntl+0x68> <== NOT EXECUTED
1440a2: 66 90 xchg %ax,%ax <== NOT EXECUTED
* if a new process is exec()'ed. Since RTEMS does not support
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
1440a4: 8b 07 mov (%edi),%eax
1440a6: 85 c0 test %eax,%eax
1440a8: 74 52 je 1440fc <fcntl+0x140> <== NEVER TAKEN
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
1440aa: 80 cd 08 or $0x8,%ch
1440ad: 89 4b 14 mov %ecx,0x14(%ebx)
1440b0: 31 f6 xor %esi,%esi
1440b2: eb a4 jmp 144058 <fcntl+0x9c>
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
1440b4: 89 ce mov %ecx,%esi
1440b6: c1 ee 0b shr $0xb,%esi
1440b9: 83 e6 01 and $0x1,%esi
1440bc: eb 9a jmp 144058 <fcntl+0x9c>
1440be: 66 90 xchg %ax,%ax
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
1440c0: 8b 3f mov (%edi),%edi
if ( fd2 )
1440c2: 85 ff test %edi,%edi
1440c4: 74 6a je 144130 <fcntl+0x174> <== ALWAYS TAKEN
diop = rtems_libio_iop( fd2 );
1440c6: 39 fe cmp %edi,%esi <== NOT EXECUTED
1440c8: 77 42 ja 14410c <fcntl+0x150> <== NOT EXECUTED
1440ca: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
1440d1: 31 ff xor %edi,%edi <== NOT EXECUTED
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
1440d3: 8b 73 3c mov 0x3c(%ebx),%esi
1440d6: 89 77 3c mov %esi,0x3c(%edi)
diop->file_info = iop->file_info;
1440d9: 8b 73 38 mov 0x38(%ebx),%esi
1440dc: 89 77 38 mov %esi,0x38(%edi)
diop->flags = iop->flags;
1440df: 89 4f 14 mov %ecx,0x14(%edi)
diop->pathinfo = iop->pathinfo;
1440e2: 83 c7 18 add $0x18,%edi
1440e5: 8d 73 18 lea 0x18(%ebx),%esi
1440e8: b9 05 00 00 00 mov $0x5,%ecx
1440ed: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ret = (int) (diop - rtems_libio_iops);
1440ef: 8b 75 e4 mov -0x1c(%ebp),%esi
1440f2: 29 c6 sub %eax,%esi
1440f4: c1 fe 06 sar $0x6,%esi
1440f7: eb a3 jmp 14409c <fcntl+0xe0>
1440f9: 8d 76 00 lea 0x0(%esi),%esi
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
1440fc: 80 e5 f7 and $0xf7,%ch <== NOT EXECUTED
1440ff: 89 4b 14 mov %ecx,0x14(%ebx) <== NOT EXECUTED
144102: 31 f6 xor %esi,%esi <== NOT EXECUTED
144104: e9 4f ff ff ff jmp 144058 <fcntl+0x9c> <== NOT EXECUTED
144109: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
14410c: c1 e7 06 shl $0x6,%edi <== NOT EXECUTED
14410f: 8d 3c 38 lea (%eax,%edi,1),%edi <== NOT EXECUTED
144112: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED
144115: eb bc jmp 1440d3 <fcntl+0x117> <== NOT EXECUTED
144117: 90 nop <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
144118: e8 63 3a 00 00 call 147b80 <__errno> <== NOT EXECUTED
14411d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
144123: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
144128: e9 f7 fe ff ff jmp 144024 <fcntl+0x68> <== NOT EXECUTED
14412d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
144130: 89 55 e0 mov %edx,-0x20(%ebp)
144133: e8 c0 aa fc ff call 10ebf8 <rtems_libio_allocate>
144138: 89 c7 mov %eax,%edi
if ( diop == 0 ) {
14413a: 85 c0 test %eax,%eax
14413c: 8b 55 e0 mov -0x20(%ebp),%edx
14413f: 0f 84 34 ff ff ff je 144079 <fcntl+0xbd> <== NEVER TAKEN
144145: 89 45 e4 mov %eax,-0x1c(%ebp)
144148: a1 dc 4d 17 00 mov 0x174ddc,%eax
14414d: 8b 4b 14 mov 0x14(%ebx),%ecx
144150: eb 81 jmp 1440d3 <fcntl+0x117>
0010915c <fdatasync>:
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
10915c: 55 push %ebp
10915d: 89 e5 mov %esp,%ebp
10915f: 83 ec 08 sub $0x8,%esp
109162: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
109165: 3b 05 ec 70 12 00 cmp 0x1270ec,%eax
10916b: 73 27 jae 109194 <fdatasync+0x38> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
10916d: c1 e0 06 shl $0x6,%eax
109170: 03 05 20 b2 12 00 add 0x12b220,%eax
rtems_libio_check_is_open(iop);
109176: 8b 50 14 mov 0x14(%eax),%edx
109179: f6 c6 01 test $0x1,%dh
10917c: 74 16 je 109194 <fdatasync+0x38> <== NEVER TAKEN
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
10917e: 83 e2 04 and $0x4,%edx
109181: 74 11 je 109194 <fdatasync+0x38>
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
109183: 8b 50 3c mov 0x3c(%eax),%edx
109186: 8b 52 2c mov 0x2c(%edx),%edx
109189: 85 d2 test %edx,%edx
10918b: 74 19 je 1091a6 <fdatasync+0x4a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
10918d: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
109190: c9 leave <== NOT EXECUTED
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
109191: ff e2 jmp *%edx <== NOT EXECUTED
109193: 90 nop <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
109194: e8 bf d1 00 00 call 116358 <__errno>
109199: c7 00 09 00 00 00 movl $0x9,(%eax)
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
}
10919f: b8 ff ff ff ff mov $0xffffffff,%eax
1091a4: c9 leave
1091a5: c3 ret
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
1091a6: e8 ad d1 00 00 call 116358 <__errno>
1091ab: c7 00 86 00 00 00 movl $0x86,(%eax)
1091b1: eb ec jmp 10919f <fdatasync+0x43>
0010f824 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
10f824: 55 push %ebp
10f825: 89 e5 mov %esp,%ebp
10f827: 57 push %edi
10f828: 56 push %esi
10f829: 53 push %ebx
10f82a: 83 ec 30 sub $0x30,%esp
10f82d: 8b 75 08 mov 0x8(%ebp),%esi
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
10f830: 6a 00 push $0x0
10f832: 6a 00 push $0x0
10f834: ff 35 48 90 12 00 pushl 0x129048
10f83a: e8 a5 c4 ff ff call 10bce4 <rtems_semaphore_obtain>
10f83f: 83 c4 10 add $0x10,%esp
10f842: 85 c0 test %eax,%eax
10f844: 74 12 je 10f858 <fifo_open+0x34> <== NEVER TAKEN
10f846: bf fc ff ff ff mov $0xfffffffc,%edi
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
10f84b: 89 f8 mov %edi,%eax
10f84d: 8d 65 f4 lea -0xc(%ebp),%esp
10f850: 5b pop %ebx
10f851: 5e pop %esi
10f852: 5f pop %edi
10f853: c9 leave
10f854: c3 ret
10f855: 8d 76 00 lea 0x0(%esi),%esi
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL)
return -EINTR;
pipe = *pipep;
10f858: 8b 1e mov (%esi),%ebx <== NOT EXECUTED
if (pipe == NULL) {
10f85a: 85 db test %ebx,%ebx <== NOT EXECUTED
10f85c: 74 7a je 10f8d8 <fifo_open+0xb4> <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
10f85e: 52 push %edx <== NOT EXECUTED
10f85f: 6a 00 push $0x0 <== NOT EXECUTED
10f861: 6a 00 push $0x0 <== NOT EXECUTED
10f863: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f866: e8 79 c4 ff ff call 10bce4 <rtems_semaphore_obtain><== NOT EXECUTED
10f86b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f86e: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
10f871: 19 ff sbb %edi,%edi <== NOT EXECUTED
10f873: f7 d7 not %edi <== NOT EXECUTED
10f875: 83 e7 fc and $0xfffffffc,%edi <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
10f878: 8b 06 mov (%esi),%eax <== NOT EXECUTED
10f87a: 85 c0 test %eax,%eax <== NOT EXECUTED
10f87c: 0f 84 b2 02 00 00 je 10fb34 <fifo_open+0x310> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
10f882: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f885: ff 35 48 90 12 00 pushl 0x129048 <== NOT EXECUTED
10f88b: e8 50 c5 ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
10f890: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f893: 85 ff test %edi,%edi <== NOT EXECUTED
10f895: 75 b4 jne 10f84b <fifo_open+0x27> <== NOT EXECUTED
return err;
pipe = *pipep;
10f897: 8b 1e mov (%esi),%ebx <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
10f899: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
10f89c: 8b 42 14 mov 0x14(%edx),%eax <== NOT EXECUTED
10f89f: 83 e0 06 and $0x6,%eax <== NOT EXECUTED
10f8a2: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
10f8a5: 0f 84 11 02 00 00 je 10fabc <fifo_open+0x298> <== NOT EXECUTED
10f8ab: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
10f8ae: 0f 84 c8 01 00 00 je 10fa7c <fifo_open+0x258> <== NOT EXECUTED
10f8b4: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
10f8b7: 0f 84 37 01 00 00 je 10f9f4 <fifo_open+0x1d0> <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
10f8bd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f8c0: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f8c3: e8 18 c5 ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
10f8c8: 31 ff xor %edi,%edi <== NOT EXECUTED
return 0;
10f8ca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
return err;
}
10f8cd: 89 f8 mov %edi,%eax <== NOT EXECUTED
10f8cf: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10f8d2: 5b pop %ebx <== NOT EXECUTED
10f8d3: 5e pop %esi <== NOT EXECUTED
10f8d4: 5f pop %edi <== NOT EXECUTED
10f8d5: c9 leave <== NOT EXECUTED
10f8d6: c3 ret <== NOT EXECUTED
10f8d7: 90 nop <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
10f8d8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f8db: 6a 34 push $0x34 <== NOT EXECUTED
10f8dd: e8 da 8f ff ff call 1088bc <malloc> <== NOT EXECUTED
10f8e2: 89 c3 mov %eax,%ebx <== NOT EXECUTED
10f8e4: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
if (pipe == NULL)
10f8e7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f8ea: 85 c0 test %eax,%eax <== NOT EXECUTED
10f8ec: 0f 84 46 03 00 00 je 10fc38 <fifo_open+0x414> <== NOT EXECUTED
return err;
memset(pipe, 0, sizeof(pipe_control_t));
10f8f2: b9 34 00 00 00 mov $0x34,%ecx <== NOT EXECUTED
10f8f7: 31 c0 xor %eax,%eax <== NOT EXECUTED
10f8f9: 89 df mov %ebx,%edi <== NOT EXECUTED
10f8fb: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
pipe->Size = PIPE_BUF;
10f8fd: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
10f904: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f907: 68 00 02 00 00 push $0x200 <== NOT EXECUTED
10f90c: e8 ab 8f ff ff call 1088bc <malloc> <== NOT EXECUTED
10f911: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
if (! pipe->Buffer)
10f913: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f916: 85 c0 test %eax,%eax <== NOT EXECUTED
10f918: 0f 84 0c 03 00 00 je 10fc2a <fifo_open+0x406> <== NOT EXECUTED
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
10f91e: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED
10f921: 50 push %eax <== NOT EXECUTED
10f922: 6a 00 push $0x0 <== NOT EXECUTED
10f924: 6a 00 push $0x0 <== NOT EXECUTED
10f926: 0f be 05 48 70 12 00 movsbl 0x127048,%eax <== NOT EXECUTED
10f92d: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED
10f932: 50 push %eax <== NOT EXECUTED
10f933: e8 10 21 00 00 call 111a48 <rtems_barrier_create> <== NOT EXECUTED
10f938: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f93b: 85 c0 test %eax,%eax <== NOT EXECUTED
10f93d: 0f 85 d7 02 00 00 jne 10fc1a <fifo_open+0x3f6> <== 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(
10f943: 8d 43 30 lea 0x30(%ebx),%eax <== NOT EXECUTED
10f946: 50 push %eax <== NOT EXECUTED
10f947: 6a 00 push $0x0 <== NOT EXECUTED
10f949: 6a 00 push $0x0 <== NOT EXECUTED
10f94b: 0f be 05 48 70 12 00 movsbl 0x127048,%eax <== NOT EXECUTED
10f952: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED
10f957: 50 push %eax <== NOT EXECUTED
10f958: e8 eb 20 00 00 call 111a48 <rtems_barrier_create> <== NOT EXECUTED
10f95d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f960: 85 c0 test %eax,%eax <== NOT EXECUTED
10f962: 0f 85 a1 02 00 00 jne 10fc09 <fifo_open+0x3e5> <== 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(
10f968: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f96b: 8d 43 28 lea 0x28(%ebx),%eax <== NOT EXECUTED
10f96e: 50 push %eax <== NOT EXECUTED
10f96f: 6a 00 push $0x0 <== NOT EXECUTED
10f971: 6a 10 push $0x10 <== NOT EXECUTED
10f973: 6a 01 push $0x1 <== NOT EXECUTED
10f975: 0f be 05 48 70 12 00 movsbl 0x127048,%eax <== NOT EXECUTED
10f97c: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED
10f981: 50 push %eax <== NOT EXECUTED
10f982: e8 e5 c0 ff ff call 10ba6c <rtems_semaphore_create><== NOT EXECUTED
10f987: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10f98a: 85 c0 test %eax,%eax <== NOT EXECUTED
10f98c: 0f 85 66 02 00 00 jne 10fbf8 <fifo_open+0x3d4> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
10f992: 51 push %ecx <== NOT EXECUTED
10f993: 8d 7d e0 lea -0x20(%ebp),%edi <== NOT EXECUTED
10f996: 57 push %edi <== NOT EXECUTED
10f997: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10f99a: 68 c0 9d 12 00 push $0x129dc0 <== NOT EXECUTED
10f99f: e8 54 da ff ff call 10d3f8 <_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
10f9a4: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
10f9ab: e8 bc e2 ff ff call 10dc6c <_Thread_Enable_dispatch><== NOT EXECUTED
10f9b0: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10f9b3: 57 push %edi <== NOT EXECUTED
10f9b4: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10f9b7: 68 c0 9d 12 00 push $0x129dc0 <== NOT EXECUTED
10f9bc: e8 37 da ff ff call 10d3f8 <_Objects_Get> <== NOT EXECUTED
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
10f9c1: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
10f9c8: e8 9f e2 ff ff call 10dc6c <_Thread_Enable_dispatch><== NOT EXECUTED
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
10f9cd: a0 48 70 12 00 mov 0x127048,%al <== NOT EXECUTED
10f9d2: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED
10f9d5: 88 15 48 70 12 00 mov %dl,0x127048 <== NOT EXECUTED
10f9db: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f9de: 3c 7a cmp $0x7a,%al <== NOT EXECUTED
10f9e0: 0f 85 78 fe ff ff jne 10f85e <fifo_open+0x3a> <== NOT EXECUTED
c = 'a';
10f9e6: c6 05 48 70 12 00 61 movb $0x61,0x127048 <== NOT EXECUTED
10f9ed: e9 6c fe ff ff jmp 10f85e <fifo_open+0x3a> <== NOT EXECUTED
10f9f2: 66 90 xchg %ax,%ax <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
10f9f4: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
10f9f7: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
10f9fa: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED
10f9fd: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED
10fa00: 85 c0 test %eax,%eax <== NOT EXECUTED
10fa02: 0f 84 90 01 00 00 je 10fb98 <fifo_open+0x374> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
10fa08: 8b 7b 14 mov 0x14(%ebx),%edi <== NOT EXECUTED
10fa0b: 85 ff test %edi,%edi <== NOT EXECUTED
10fa0d: 0f 85 aa fe ff ff jne 10f8bd <fifo_open+0x99> <== NOT EXECUTED
/* Not an error */
if (LIBIO_NODELAY(iop))
10fa13: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10fa16: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED
10fa1a: 0f 85 9d fe ff ff jne 10f8bd <fifo_open+0x99> <== NOT EXECUTED
break;
prevCounter = pipe->writerCounter;
10fa20: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED
10fa23: eb 20 jmp 10fa45 <fifo_open+0x221> <== NOT EXECUTED
10fa25: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
10fa28: 50 push %eax <== NOT EXECUTED
10fa29: 6a 00 push $0x0 <== NOT EXECUTED
10fa2b: 6a 00 push $0x0 <== NOT EXECUTED
10fa2d: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10fa30: e8 af c2 ff ff call 10bce4 <rtems_semaphore_obtain><== NOT EXECUTED
10fa35: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fa38: 85 c0 test %eax,%eax <== NOT EXECUTED
10fa3a: 75 27 jne 10fa63 <fifo_open+0x23f> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->writerCounter);
10fa3c: 39 7b 24 cmp %edi,0x24(%ebx) <== NOT EXECUTED
10fa3f: 0f 85 78 fe ff ff jne 10f8bd <fifo_open+0x99> <== NOT EXECUTED
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
10fa45: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fa48: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10fa4b: e8 90 c3 ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
10fa50: 5a pop %edx <== NOT EXECUTED
10fa51: 59 pop %ecx <== NOT EXECUTED
10fa52: 6a 00 push $0x0 <== NOT EXECUTED
10fa54: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10fa57: e8 a0 21 00 00 call 111bfc <rtems_barrier_wait> <== NOT EXECUTED
10fa5c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fa5f: 85 c0 test %eax,%eax <== NOT EXECUTED
10fa61: 74 c5 je 10fa28 <fifo_open+0x204> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
return 0;
10fa63: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
10fa68: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10fa6b: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
10fa6e: 56 push %esi <== NOT EXECUTED
10fa6f: e8 9c fc ff ff call 10f710 <pipe_release> <== NOT EXECUTED
return err;
10fa74: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fa77: e9 cf fd ff ff jmp 10f84b <fifo_open+0x27> <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
10fa7c: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
10fa7f: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
10fa82: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED
10fa85: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED
10fa88: 85 c0 test %eax,%eax <== NOT EXECUTED
10fa8a: 0f 84 38 01 00 00 je 10fbc8 <fifo_open+0x3a4> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
10fa90: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
10fa93: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
10fa96: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED
10fa99: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED
10fa9c: 85 c0 test %eax,%eax <== NOT EXECUTED
10fa9e: 0f 85 19 fe ff ff jne 10f8bd <fifo_open+0x99> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
10faa4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10faa7: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10faaa: 50 push %eax <== NOT EXECUTED
10faab: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10faae: e8 e5 20 00 00 call 111b98 <rtems_barrier_release> <== NOT EXECUTED
10fab3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fab6: e9 02 fe ff ff jmp 10f8bd <fifo_open+0x99> <== NOT EXECUTED
10fabb: 90 nop <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
10fabc: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
10fabf: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
10fac2: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED
10fac5: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED
10fac8: 85 c0 test %eax,%eax <== NOT EXECUTED
10faca: 0f 84 e0 00 00 00 je 10fbb0 <fifo_open+0x38c> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
10fad0: 8b 7b 10 mov 0x10(%ebx),%edi <== NOT EXECUTED
10fad3: 85 ff test %edi,%edi <== NOT EXECUTED
10fad5: 0f 85 e2 fd ff ff jne 10f8bd <fifo_open+0x99> <== NOT EXECUTED
10fadb: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
10fade: f6 42 14 01 testb $0x1,0x14(%edx) <== NOT EXECUTED
10fae2: 0f 85 f8 00 00 00 jne 10fbe0 <fifo_open+0x3bc> <== NOT EXECUTED
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
10fae8: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED
10faeb: eb 24 jmp 10fb11 <fifo_open+0x2ed> <== NOT EXECUTED
10faed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
10faf0: 50 push %eax <== NOT EXECUTED
10faf1: 6a 00 push $0x0 <== NOT EXECUTED
10faf3: 6a 00 push $0x0 <== NOT EXECUTED
10faf5: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10faf8: e8 e7 c1 ff ff call 10bce4 <rtems_semaphore_obtain><== NOT EXECUTED
10fafd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fb00: 85 c0 test %eax,%eax <== NOT EXECUTED
10fb02: 0f 85 5b ff ff ff jne 10fa63 <fifo_open+0x23f> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->readerCounter);
10fb08: 39 7b 20 cmp %edi,0x20(%ebx) <== NOT EXECUTED
10fb0b: 0f 85 ac fd ff ff jne 10f8bd <fifo_open+0x99> <== NOT EXECUTED
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
10fb11: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fb14: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10fb17: e8 c4 c2 ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
10fb1c: 5a pop %edx <== NOT EXECUTED
10fb1d: 59 pop %ecx <== NOT EXECUTED
10fb1e: 6a 00 push $0x0 <== NOT EXECUTED
10fb20: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10fb23: e8 d4 20 00 00 call 111bfc <rtems_barrier_wait> <== NOT EXECUTED
10fb28: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fb2b: 85 c0 test %eax,%eax <== NOT EXECUTED
10fb2d: 74 c1 je 10faf0 <fifo_open+0x2cc> <== NOT EXECUTED
10fb2f: e9 2f ff ff ff jmp 10fa63 <fifo_open+0x23f> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
10fb34: 85 ff test %edi,%edi <== NOT EXECUTED
10fb36: 75 18 jne 10fb50 <fifo_open+0x32c> <== NOT EXECUTED
pipe_free(pipe);
else
*pipep = pipe;
10fb38: 89 1e mov %ebx,(%esi) <== NOT EXECUTED
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
10fb3a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fb3d: ff 35 48 90 12 00 pushl 0x129048 <== NOT EXECUTED
10fb43: e8 98 c2 ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
10fb48: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fb4b: e9 47 fd ff ff jmp 10f897 <fifo_open+0x73> <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
10fb50: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fb53: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10fb56: e8 d5 1f 00 00 call 111b30 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
10fb5b: 59 pop %ecx <== NOT EXECUTED
10fb5c: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10fb5f: e8 cc 1f 00 00 call 111b30 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
10fb64: 5a pop %edx <== NOT EXECUTED
10fb65: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10fb68: e8 d3 c0 ff ff call 10bc40 <rtems_semaphore_delete><== NOT EXECUTED
free(pipe->Buffer);
10fb6d: 58 pop %eax <== NOT EXECUTED
10fb6e: ff 33 pushl (%ebx) <== NOT EXECUTED
10fb70: e8 6f 8a ff ff call 1085e4 <free> <== NOT EXECUTED
free(pipe);
10fb75: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10fb78: e8 67 8a ff ff call 1085e4 <free> <== NOT EXECUTED
10fb7d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
10fb80: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fb83: ff 35 48 90 12 00 pushl 0x129048 <== NOT EXECUTED
10fb89: e8 52 c2 ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
10fb8e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fb91: e9 b5 fc ff ff jmp 10f84b <fifo_open+0x27> <== NOT EXECUTED
10fb96: 66 90 xchg %ax,%ax <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
10fb98: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10fb9b: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10fb9e: 50 push %eax <== NOT EXECUTED
10fb9f: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10fba2: e8 f1 1f 00 00 call 111b98 <rtems_barrier_release> <== NOT EXECUTED
10fba7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fbaa: e9 59 fe ff ff jmp 10fa08 <fifo_open+0x1e4> <== NOT EXECUTED
10fbaf: 90 nop <== NOT EXECUTED
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
10fbb0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10fbb3: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10fbb6: 50 push %eax <== NOT EXECUTED
10fbb7: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10fbba: e8 d9 1f 00 00 call 111b98 <rtems_barrier_release> <== NOT EXECUTED
10fbbf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fbc2: e9 09 ff ff ff jmp 10fad0 <fifo_open+0x2ac> <== NOT EXECUTED
10fbc7: 90 nop <== NOT EXECUTED
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
10fbc8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10fbcb: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10fbce: 50 push %eax <== NOT EXECUTED
10fbcf: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10fbd2: e8 c1 1f 00 00 call 111b98 <rtems_barrier_release> <== NOT EXECUTED
10fbd7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fbda: e9 b1 fe ff ff jmp 10fa90 <fifo_open+0x26c> <== NOT EXECUTED
10fbdf: 90 nop <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
10fbe0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fbe3: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10fbe6: e8 f5 c1 ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
10fbeb: bf fa ff ff ff mov $0xfffffffa,%edi <== NOT EXECUTED
err = -ENXIO;
goto out_error;
10fbf0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fbf3: e9 70 fe ff ff jmp 10fa68 <fifo_open+0x244> <== NOT EXECUTED
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
10fbf8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fbfb: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
10fbfe: ff 70 30 pushl 0x30(%eax) <== NOT EXECUTED
10fc01: e8 2a 1f 00 00 call 111b30 <rtems_barrier_delete> <== NOT EXECUTED
10fc06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
10fc09: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fc0c: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
10fc0f: ff 72 2c pushl 0x2c(%edx) <== NOT EXECUTED
10fc12: e8 19 1f 00 00 call 111b30 <rtems_barrier_delete> <== NOT EXECUTED
10fc17: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
err_rbar:
free(pipe->Buffer);
10fc1a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fc1d: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
10fc20: ff 30 pushl (%eax) <== NOT EXECUTED
10fc22: e8 bd 89 ff ff call 1085e4 <free> <== NOT EXECUTED
10fc27: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
err_buf:
free(pipe);
10fc2a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fc2d: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
10fc30: e8 af 89 ff ff call 1085e4 <free> <== NOT EXECUTED
10fc35: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fc38: bf f4 ff ff ff mov $0xfffffff4,%edi <== NOT EXECUTED
10fc3d: e9 3e ff ff ff jmp 10fb80 <fifo_open+0x35c> <== NOT EXECUTED
00111070 <find_handler>:
const char *type;
rtems_filesystem_fsmount_me_t mount_h;
} find_arg;
static bool find_handler(const rtems_filesystem_table_t *entry, void *arg)
{
111070: 55 push %ebp
111071: 89 e5 mov %esp,%ebp
111073: 56 push %esi
111074: 53 push %ebx
111075: 8b 75 08 mov 0x8(%ebp),%esi
111078: 8b 5d 0c mov 0xc(%ebp),%ebx
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
11107b: 83 ec 08 sub $0x8,%esp
11107e: ff 33 pushl (%ebx)
111080: ff 36 pushl (%esi)
111082: e8 45 4b 00 00 call 115bcc <strcmp>
111087: 83 c4 10 add $0x10,%esp
11108a: 85 c0 test %eax,%eax
11108c: 75 12 jne 1110a0 <find_handler+0x30>
return false;
} else {
fa->mount_h = entry->mount_h;
11108e: 8b 46 04 mov 0x4(%esi),%eax
111091: 89 43 04 mov %eax,0x4(%ebx)
111094: b0 01 mov $0x1,%al
return true;
}
}
111096: 8d 65 f8 lea -0x8(%ebp),%esp
111099: 5b pop %ebx
11109a: 5e pop %esi
11109b: c9 leave
11109c: c3 ret
11109d: 8d 76 00 lea 0x0(%esi),%esi
static bool find_handler(const rtems_filesystem_table_t *entry, void *arg)
{
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
1110a0: 31 c0 xor %eax,%eax
} else {
fa->mount_h = entry->mount_h;
return true;
}
}
1110a2: 8d 65 f8 lea -0x8(%ebp),%esp
1110a5: 5b pop %ebx
1110a6: 5e pop %esi
1110a7: c9 leave
1110a8: c3 ret
001091b4 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
1091b4: 55 push %ebp
1091b5: 89 e5 mov %esp,%ebp
1091b7: 83 ec 08 sub $0x8,%esp
1091ba: 8b 45 08 mov 0x8(%ebp),%eax
1091bd: 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);
1091c0: 3b 05 ec 70 12 00 cmp 0x1270ec,%eax
1091c6: 0f 83 98 00 00 00 jae 109264 <fpathconf+0xb0>
iop = rtems_libio_iop(fd);
1091cc: c1 e0 06 shl $0x6,%eax
1091cf: 03 05 20 b2 12 00 add 0x12b220,%eax
rtems_libio_check_is_open(iop);
1091d5: f6 40 15 01 testb $0x1,0x15(%eax)
1091d9: 0f 84 85 00 00 00 je 109264 <fpathconf+0xb0> <== NEVER TAKEN
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
1091df: 8b 40 28 mov 0x28(%eax),%eax
switch ( name ) {
1091e2: 83 fa 0b cmp $0xb,%edx
1091e5: 76 15 jbe 1091fc <fpathconf+0x48>
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
1091e7: e8 6c d1 00 00 call 116358 <__errno>
1091ec: c7 00 16 00 00 00 movl $0x16,(%eax)
1091f2: b8 ff ff ff ff mov $0xffffffff,%eax
break;
}
return return_value;
}
1091f7: c9 leave
1091f8: c3 ret
1091f9: 8d 76 00 lea 0x0(%esi),%esi
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
1091fc: ff 24 95 98 47 12 00 jmp *0x124798(,%edx,4)
109203: 90 nop
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
109204: 8b 40 5c mov 0x5c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
109207: c9 leave
109208: c3 ret
109209: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
10920c: 8b 40 50 mov 0x50(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
10920f: c9 leave
109210: c3 ret
109211: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
109214: 8b 40 64 mov 0x64(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
109217: c9 leave
109218: c3 ret
109219: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
10921c: 8b 40 58 mov 0x58(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
10921f: c9 leave
109220: c3 ret
109221: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
109224: 8b 40 54 mov 0x54(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
109227: c9 leave
109228: c3 ret
109229: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
10922c: 8b 40 4c mov 0x4c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
10922f: c9 leave
109230: c3 ret
109231: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
109234: 8b 40 48 mov 0x48(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
109237: c9 leave
109238: c3 ret
109239: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
10923c: 8b 40 44 mov 0x44(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
10923f: c9 leave
109240: c3 ret
109241: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
109244: 8b 40 40 mov 0x40(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
109247: c9 leave
109248: c3 ret
109249: 8d 76 00 lea 0x0(%esi),%esi
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
10924c: 8b 40 3c mov 0x3c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
10924f: c9 leave
109250: c3 ret
109251: 8d 76 00 lea 0x0(%esi),%esi
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
109254: 8b 40 38 mov 0x38(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
109257: c9 leave
109258: c3 ret
109259: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
10925c: 8b 40 60 mov 0x60(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
10925f: c9 leave
109260: c3 ret
109261: 8d 76 00 lea 0x0(%esi),%esi
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
109264: e8 ef d0 00 00 call 116358 <__errno>
109269: c7 00 09 00 00 00 movl $0x9,(%eax)
10926f: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
109274: c9 leave
109275: c3 ret
001085e4 <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
1085e4: 55 push %ebp
1085e5: 89 e5 mov %esp,%ebp
1085e7: 53 push %ebx
1085e8: 83 ec 04 sub $0x4,%esp
1085eb: 8b 5d 08 mov 0x8(%ebp),%ebx
1085ee: ff 05 ac 92 12 00 incl 0x1292ac
if ( !ptr )
1085f4: 85 db test %ebx,%ebx
1085f6: 74 4b je 108643 <free+0x5f>
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
1085f8: 83 3d c0 95 12 00 03 cmpl $0x3,0x1295c0
1085ff: 74 47 je 108648 <free+0x64>
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
108601: a1 48 76 12 00 mov 0x127648,%eax
108606: 85 c0 test %eax,%eax
108608: 74 0a je 108614 <free+0x30>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
10860a: 83 ec 0c sub $0xc,%esp
10860d: 53 push %ebx
10860e: ff 50 08 call *0x8(%eax)
108611: 83 c4 10 add $0x10,%esp
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
108614: 83 ec 08 sub $0x8,%esp
108617: 53 push %ebx
108618: ff 35 58 51 12 00 pushl 0x125158
10861e: e8 d5 50 00 00 call 10d6f8 <_Protected_heap_Free>
108623: 83 c4 10 add $0x10,%esp
108626: 84 c0 test %al,%al
108628: 75 19 jne 108643 <free+0x5f> <== 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
10862a: a1 58 51 12 00 mov 0x125158,%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",
10862f: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED
108632: ff 70 18 pushl 0x18(%eax) <== NOT EXECUTED
108635: 53 push %ebx <== NOT EXECUTED
108636: 68 b0 2a 12 00 push $0x122ab0 <== NOT EXECUTED
10863b: e8 f0 0d 00 00 call 109430 <printk> <== NOT EXECUTED
108640: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
108643: 8b 5d fc mov -0x4(%ebp),%ebx
108646: c9 leave
108647: c3 ret
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
108648: e8 3f 01 00 00 call 10878c <malloc_is_system_state_OK>
10864d: 84 c0 test %al,%al
10864f: 75 b0 jne 108601 <free+0x1d> <== ALWAYS TAKEN
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
108651: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
108654: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
108657: 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);
108658: e9 6f 01 00 00 jmp 1087cc <malloc_deferred_free> <== NOT EXECUTED
0012f908 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
12f908: 55 push %ebp <== NOT EXECUTED
12f909: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12f90b: 53 push %ebx <== NOT EXECUTED
12f90c: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
12f90f: 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
12f912: 81 fb 40 4e 17 00 cmp $0x174e40,%ebx <== NOT EXECUTED
12f918: 74 42 je 12f95c <free_user_env+0x54> <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
12f91a: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
12f91d: 85 c0 test %eax,%eax <== NOT EXECUTED
12f91f: 74 13 je 12f934 <free_user_env+0x2c> <== NOT EXECUTED
12f921: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
12f924: 85 c0 test %eax,%eax <== NOT EXECUTED
12f926: 74 0c je 12f934 <free_user_env+0x2c> <== NOT EXECUTED
12f928: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12f92b: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED
12f92e: 52 push %edx <== NOT EXECUTED
12f92f: ff d0 call *%eax <== NOT EXECUTED
12f931: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
12f934: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
12f937: 85 c0 test %eax,%eax <== NOT EXECUTED
12f939: 74 13 je 12f94e <free_user_env+0x46> <== NOT EXECUTED
12f93b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
12f93e: 85 c0 test %eax,%eax <== NOT EXECUTED
12f940: 74 0c je 12f94e <free_user_env+0x46> <== NOT EXECUTED
12f942: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12f945: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED
12f948: 52 push %edx <== NOT EXECUTED
12f949: ff d0 call *%eax <== NOT EXECUTED
12f94b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
free(env);
12f94e: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
}
}
12f951: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
12f954: c9 leave <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
12f955: e9 0e ef fd ff jmp 10e868 <free> <== NOT EXECUTED
12f95a: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
}
12f95c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
12f95f: c9 leave <== NOT EXECUTED
12f960: c3 ret <== NOT EXECUTED
00120654 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
120654: 55 push %ebp
120655: 89 e5 mov %esp,%ebp
120657: 57 push %edi
120658: 53 push %ebx
120659: 8b 55 08 mov 0x8(%ebp),%edx
12065c: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
12065f: 85 db test %ebx,%ebx
120661: 74 66 je 1206c9 <fstat+0x75>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
120663: 3b 15 4c 51 12 00 cmp 0x12514c,%edx
120669: 73 3d jae 1206a8 <fstat+0x54>
12066b: c1 e2 06 shl $0x6,%edx
12066e: 03 15 80 92 12 00 add 0x129280,%edx
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
120674: f6 42 15 01 testb $0x1,0x15(%edx)
120678: 74 2e je 1206a8 <fstat+0x54> <== NEVER TAKEN
if ( !iop->handlers )
12067a: 8b 42 3c mov 0x3c(%edx),%eax
12067d: 85 c0 test %eax,%eax
12067f: 74 27 je 1206a8 <fstat+0x54> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
120681: 8b 40 18 mov 0x18(%eax),%eax
120684: 85 c0 test %eax,%eax
120686: 74 34 je 1206bc <fstat+0x68> <== NEVER TAKEN
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
120688: b9 48 00 00 00 mov $0x48,%ecx
12068d: 31 c0 xor %eax,%eax
12068f: 89 df mov %ebx,%edi
120691: f3 aa rep stos %al,%es:(%edi)
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
120693: 8b 42 3c mov 0x3c(%edx),%eax
120696: 89 5d 0c mov %ebx,0xc(%ebp)
120699: 83 c2 18 add $0x18,%edx
12069c: 89 55 08 mov %edx,0x8(%ebp)
12069f: 8b 40 18 mov 0x18(%eax),%eax
}
1206a2: 5b pop %ebx
1206a3: 5f pop %edi
1206a4: 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 );
1206a5: ff e0 jmp *%eax
1206a7: 90 nop
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
1206a8: e8 57 4a ff ff call 115104 <__errno>
1206ad: c7 00 09 00 00 00 movl $0x9,(%eax)
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
1206b3: b8 ff ff ff ff mov $0xffffffff,%eax
1206b8: 5b pop %ebx
1206b9: 5f pop %edi
1206ba: c9 leave
1206bb: c3 ret
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
1206bc: e8 43 4a ff ff call 115104 <__errno> <== NOT EXECUTED
1206c1: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
1206c7: eb ea jmp 1206b3 <fstat+0x5f> <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
1206c9: e8 36 4a ff ff call 115104 <__errno>
1206ce: c7 00 0e 00 00 00 movl $0xe,(%eax)
1206d4: eb dd jmp 1206b3 <fstat+0x5f>
0012e704 <fsync>:
#include <rtems/seterr.h>
int fsync(
int fd
)
{
12e704: 55 push %ebp
12e705: 89 e5 mov %esp,%ebp
12e707: 83 ec 08 sub $0x8,%esp
12e70a: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
12e70d: 3b 05 4c d1 16 00 cmp 0x16d14c,%eax
12e713: 73 23 jae 12e738 <fsync+0x34> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
12e715: c1 e0 06 shl $0x6,%eax
12e718: 03 05 dc 4d 17 00 add 0x174ddc,%eax
rtems_libio_check_is_open(iop);
12e71e: f6 40 15 01 testb $0x1,0x15(%eax)
12e722: 74 14 je 12e738 <fsync+0x34> <== NEVER TAKEN
/*
* Now process the fsync().
*/
if ( !iop->handlers )
12e724: 8b 50 3c mov 0x3c(%eax),%edx
12e727: 85 d2 test %edx,%edx
12e729: 74 0d je 12e738 <fsync+0x34> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
12e72b: 8b 52 28 mov 0x28(%edx),%edx
12e72e: 85 d2 test %edx,%edx
12e730: 74 18 je 12e74a <fsync+0x46>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
12e732: 89 45 08 mov %eax,0x8(%ebp)
}
12e735: 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 );
12e736: ff e2 jmp *%edx
/*
* Now process the fsync().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
12e738: e8 43 94 01 00 call 147b80 <__errno> <== NOT EXECUTED
12e73d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
}
12e743: b8 ff ff ff ff mov $0xffffffff,%eax
12e748: c9 leave
12e749: c3 ret
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
12e74a: e8 31 94 01 00 call 147b80 <__errno>
12e74f: c7 00 86 00 00 00 movl $0x86,(%eax)
12e755: eb ec jmp 12e743 <fsync+0x3f>
00110d48 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
110d48: 55 push %ebp
110d49: 89 e5 mov %esp,%ebp
110d4b: 57 push %edi
110d4c: 56 push %esi
110d4d: 53 push %ebx
110d4e: 83 ec 3c sub $0x3c,%esp
110d51: 8b 5d 08 mov 0x8(%ebp),%ebx
110d54: 8b 45 0c mov 0xc(%ebp),%eax
110d57: 8b 55 10 mov 0x10(%ebp),%edx
110d5a: 89 45 c0 mov %eax,-0x40(%ebp)
110d5d: 89 55 c4 mov %edx,-0x3c(%ebp)
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
110d60: 3b 1d 4c 51 12 00 cmp 0x12514c,%ebx
110d66: 73 60 jae 110dc8 <ftruncate+0x80> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
110d68: c1 e3 06 shl $0x6,%ebx
110d6b: 03 1d 80 92 12 00 add 0x129280,%ebx
rtems_libio_check_is_open(iop);
110d71: 8b 43 14 mov 0x14(%ebx),%eax
110d74: f6 c4 01 test $0x1,%ah
110d77: 74 4f je 110dc8 <ftruncate+0x80> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
110d79: a8 04 test $0x4,%al
110d7b: 74 5f je 110ddc <ftruncate+0x94> <== NEVER TAKEN
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
110d7d: 8d 45 d4 lea -0x2c(%ebp),%eax
110d80: 8d 73 18 lea 0x18(%ebx),%esi
110d83: b9 05 00 00 00 mov $0x5,%ecx
110d88: 89 c7 mov %eax,%edi
110d8a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !loc.ops->node_type_h )
110d8c: 8b 55 e0 mov -0x20(%ebp),%edx
110d8f: 8b 52 10 mov 0x10(%edx),%edx
110d92: 85 d2 test %edx,%edx
110d94: 74 5a je 110df0 <ftruncate+0xa8> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
110d96: 83 ec 0c sub $0xc,%esp
110d99: 50 push %eax
110d9a: ff d2 call *%edx
110d9c: 83 c4 10 add $0x10,%esp
110d9f: 48 dec %eax
110da0: 74 60 je 110e02 <ftruncate+0xba>
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
110da2: f6 43 14 04 testb $0x4,0x14(%ebx)
110da6: 74 34 je 110ddc <ftruncate+0x94> <== NEVER TAKEN
if ( !iop->handlers->ftruncate_h )
110da8: 8b 43 3c mov 0x3c(%ebx),%eax
110dab: 8b 40 20 mov 0x20(%eax),%eax
110dae: 85 c0 test %eax,%eax
110db0: 74 3e je 110df0 <ftruncate+0xa8> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
110db2: 52 push %edx
110db3: ff 75 c4 pushl -0x3c(%ebp)
110db6: ff 75 c0 pushl -0x40(%ebp)
110db9: 53 push %ebx
110dba: ff d0 call *%eax
110dbc: 83 c4 10 add $0x10,%esp
}
110dbf: 8d 65 f4 lea -0xc(%ebp),%esp
110dc2: 5b pop %ebx
110dc3: 5e pop %esi
110dc4: 5f pop %edi
110dc5: c9 leave
110dc6: c3 ret
110dc7: 90 nop
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
110dc8: e8 37 43 00 00 call 115104 <__errno> <== NOT EXECUTED
110dcd: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
110dd3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
110dd8: eb e5 jmp 110dbf <ftruncate+0x77> <== NOT EXECUTED
110dda: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
110ddc: e8 23 43 00 00 call 115104 <__errno> <== NOT EXECUTED
110de1: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
110de7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
110dec: eb d1 jmp 110dbf <ftruncate+0x77> <== NOT EXECUTED
110dee: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
110df0: e8 0f 43 00 00 call 115104 <__errno> <== NOT EXECUTED
110df5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
110dfb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
110e00: eb bd jmp 110dbf <ftruncate+0x77> <== NOT EXECUTED
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
110e02: e8 fd 42 00 00 call 115104 <__errno>
110e07: c7 00 15 00 00 00 movl $0x15,(%eax)
110e0d: b8 ff ff ff ff mov $0xffffffff,%eax
110e12: eb ab jmp 110dbf <ftruncate+0x77>
0010821c <get_disk_entry>:
}
}
static rtems_disk_device *
get_disk_entry(dev_t dev, bool lookup_only)
{
10821c: 55 push %ebp
10821d: 89 e5 mov %esp,%ebp
10821f: 53 push %ebx
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major < disktab_size && disktab != NULL) {
108220: 39 05 a4 bf 12 00 cmp %eax,0x12bfa4
108226: 77 08 ja 108230 <get_disk_entry+0x14> <== ALWAYS TAKEN
if (minor < dtab->size && dtab->minor != NULL) {
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL && !lookup_only) {
if (!dd->deleted) {
++dd->uses;
108228: 31 c0 xor %eax,%eax
return dd;
}
}
return NULL;
}
10822a: 5b pop %ebx
10822b: c9 leave
10822c: c3 ret
10822d: 8d 76 00 lea 0x0(%esi),%esi
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major < disktab_size && disktab != NULL) {
108230: 8b 1d a0 bf 12 00 mov 0x12bfa0,%ebx
108236: 85 db test %ebx,%ebx
108238: 74 ee je 108228 <get_disk_entry+0xc> <== NEVER TAKEN
rtems_disk_device_table *dtab = disktab + major;
10823a: 8d 04 c3 lea (%ebx,%eax,8),%eax
if (minor < dtab->size && dtab->minor != NULL) {
10823d: 39 50 04 cmp %edx,0x4(%eax)
108240: 76 e6 jbe 108228 <get_disk_entry+0xc> <== NEVER TAKEN
108242: 8b 00 mov (%eax),%eax
108244: 85 c0 test %eax,%eax
108246: 74 e0 je 108228 <get_disk_entry+0xc> <== NEVER TAKEN
rtems_disk_device *dd = dtab->minor [minor];
108248: 8b 04 90 mov (%eax,%edx,4),%eax
if (dd != NULL && !lookup_only) {
10824b: 85 c0 test %eax,%eax
10824d: 74 db je 10822a <get_disk_entry+0xe>
10824f: 84 c9 test %cl,%cl
108251: 75 d7 jne 10822a <get_disk_entry+0xe>
if (!dd->deleted) {
108253: 80 78 30 00 cmpb $0x0,0x30(%eax)
108257: 75 cf jne 108228 <get_disk_entry+0xc>
++dd->uses;
108259: ff 40 14 incl 0x14(%eax)
10825c: eb cc jmp 10822a <get_disk_entry+0xe>
0015daac <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
15daac: 55 push %ebp
15daad: 89 e5 mov %esp,%ebp
15daaf: 57 push %edi
15dab0: 56 push %esi
15dab1: 53 push %ebx
15dab2: 83 ec 2c sub $0x2c,%esp
15dab5: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
15dab8: 3b 1d 4c d1 16 00 cmp 0x16d14c,%ebx
15dabe: 72 48 jb 15db08 <getdents+0x5c> <== ALWAYS TAKEN
15dac0: 31 db xor %ebx,%ebx
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
15dac2: 8d 45 d4 lea -0x2c(%ebp),%eax
15dac5: 8d 73 18 lea 0x18(%ebx),%esi
15dac8: b9 05 00 00 00 mov $0x5,%ecx
15dacd: 89 c7 mov %eax,%edi
15dacf: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !loc.ops->node_type_h )
15dad1: 8b 55 e0 mov -0x20(%ebp),%edx
15dad4: 8b 52 10 mov 0x10(%edx),%edx
15dad7: 85 d2 test %edx,%edx
15dad9: 74 4d je 15db28 <getdents+0x7c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
15dadb: 83 ec 0c sub $0xc,%esp
15dade: 50 push %eax
15dadf: ff d2 call *%edx
15dae1: 83 c4 10 add $0x10,%esp
15dae4: 48 dec %eax
15dae5: 75 2d jne 15db14 <getdents+0x68>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
15dae7: 8b 43 3c mov 0x3c(%ebx),%eax
15daea: 8b 40 08 mov 0x8(%eax),%eax
15daed: 85 c0 test %eax,%eax
15daef: 74 37 je 15db28 <getdents+0x7c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
15daf1: 52 push %edx
15daf2: ff 75 10 pushl 0x10(%ebp)
15daf5: ff 75 0c pushl 0xc(%ebp)
15daf8: 53 push %ebx
15daf9: ff d0 call *%eax
15dafb: 83 c4 10 add $0x10,%esp
}
15dafe: 8d 65 f4 lea -0xc(%ebp),%esp
15db01: 5b pop %ebx
15db02: 5e pop %esi
15db03: 5f pop %edi
15db04: c9 leave
15db05: c3 ret
15db06: 66 90 xchg %ax,%ax
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
15db08: c1 e3 06 shl $0x6,%ebx
15db0b: 03 1d dc 4d 17 00 add 0x174ddc,%ebx
15db11: eb af jmp 15dac2 <getdents+0x16>
15db13: 90 nop
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
15db14: e8 67 a0 fe ff call 147b80 <__errno>
15db19: c7 00 14 00 00 00 movl $0x14,(%eax)
15db1f: b8 ff ff ff ff mov $0xffffffff,%eax
15db24: eb d8 jmp 15dafe <getdents+0x52>
15db26: 66 90 xchg %ax,%ax
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
15db28: e8 53 a0 fe ff call 147b80 <__errno> <== NOT EXECUTED
15db2d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
15db33: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
15db38: eb c4 jmp 15dafe <getdents+0x52> <== NOT EXECUTED
0012e844 <getgid>:
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
* P1003.1b-1993, p. 84
*/
gid_t getgid( void )
{
12e844: 55 push %ebp <== NOT EXECUTED
12e845: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12e847: a1 20 f3 16 00 mov 0x16f320,%eax <== NOT EXECUTED
12e84c: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
return _POSIX_types_Gid;
}
12e84f: c9 leave <== NOT EXECUTED
12e850: c3 ret <== NOT EXECUTED
0012edf4 <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
12edf4: 55 push %ebp
12edf5: 89 e5 mov %esp,%ebp
12edf7: 57 push %edi
12edf8: 56 push %esi
12edf9: 53 push %ebx
12edfa: 83 ec 1c sub $0x1c,%esp
12edfd: 89 c3 mov %eax,%ebx
12edff: 89 55 e4 mov %edx,-0x1c(%ebp)
12ee02: 89 ce mov %ecx,%esi
FILE *fp;
int match;
init_etc_passwd_group();
12ee04: e8 af fe ff ff call 12ecb8 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
12ee09: 83 ec 08 sub $0x8,%esp
12ee0c: 68 e9 1d 16 00 push $0x161de9
12ee11: 68 dc e1 15 00 push $0x15e1dc
12ee16: e8 c9 96 01 00 call 1484e4 <fopen>
12ee1b: 89 c7 mov %eax,%edi
12ee1d: 83 c4 10 add $0x10,%esp
12ee20: 85 c0 test %eax,%eax
12ee22: 75 22 jne 12ee46 <getgr_r+0x52> <== ALWAYS TAKEN
12ee24: e9 8b 00 00 00 jmp 12eeb4 <getgr_r+0xc0> <== NOT EXECUTED
12ee29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
12ee2c: 83 ec 08 sub $0x8,%esp
12ee2f: 53 push %ebx
12ee30: ff 36 pushl (%esi)
12ee32: e8 f5 e5 01 00 call 14d42c <strcmp>
12ee37: 83 c4 10 add $0x10,%esp
12ee3a: 85 c0 test %eax,%eax
12ee3c: 0f 94 c0 sete %al
12ee3f: 0f b6 c0 movzbl %al,%eax
}
else {
match = (grp->gr_gid == gid);
}
if (match) {
12ee42: 85 c0 test %eax,%eax
12ee44: 75 2e jne 12ee74 <getgr_r+0x80>
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
12ee46: 83 ec 0c sub $0xc,%esp
12ee49: ff 75 0c pushl 0xc(%ebp)
12ee4c: 8b 4d 08 mov 0x8(%ebp),%ecx
12ee4f: 89 f2 mov %esi,%edx
12ee51: 89 f8 mov %edi,%eax
12ee53: e8 d4 fb ff ff call 12ea2c <scangr>
12ee58: 83 c4 10 add $0x10,%esp
12ee5b: 85 c0 test %eax,%eax
12ee5d: 74 31 je 12ee90 <getgr_r+0x9c> <== NEVER TAKEN
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
12ee5f: 85 db test %ebx,%ebx
12ee61: 75 c9 jne 12ee2c <getgr_r+0x38> <== ALWAYS TAKEN
match = (strcmp(grp->gr_name, name) == 0);
}
else {
match = (grp->gr_gid == gid);
12ee63: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED
12ee67: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED
12ee6a: 0f 94 c0 sete %al <== NOT EXECUTED
12ee6d: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
}
if (match) {
12ee70: 85 c0 test %eax,%eax <== NOT EXECUTED
12ee72: 74 d2 je 12ee46 <getgr_r+0x52> <== NOT EXECUTED
fclose(fp);
12ee74: 83 ec 0c sub $0xc,%esp
12ee77: 57 push %edi
12ee78: e8 4f 8e 01 00 call 147ccc <fclose>
*result = grp;
12ee7d: 8b 45 10 mov 0x10(%ebp),%eax
12ee80: 89 30 mov %esi,(%eax)
12ee82: 31 c0 xor %eax,%eax
return 0;
12ee84: 83 c4 10 add $0x10,%esp
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
12ee87: 8d 65 f4 lea -0xc(%ebp),%esp
12ee8a: 5b pop %ebx
12ee8b: 5e pop %esi
12ee8c: 5f pop %edi
12ee8d: c9 leave
12ee8e: c3 ret
12ee8f: 90 nop
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
errno = EINVAL;
12ee90: e8 eb 8c 01 00 call 147b80 <__errno> <== NOT EXECUTED
12ee95: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
fclose(fp);
12ee9b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12ee9e: 57 push %edi <== NOT EXECUTED
12ee9f: e8 28 8e 01 00 call 147ccc <fclose> <== NOT EXECUTED
12eea4: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
12eea9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
12eeac: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12eeaf: 5b pop %ebx <== NOT EXECUTED
12eeb0: 5e pop %esi <== NOT EXECUTED
12eeb1: 5f pop %edi <== NOT EXECUTED
12eeb2: c9 leave <== NOT EXECUTED
12eeb3: c3 ret <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
12eeb4: e8 c7 8c 01 00 call 147b80 <__errno> <== NOT EXECUTED
12eeb9: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
12eebf: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
return -1;
12eec2: eb c3 jmp 12ee87 <getgr_r+0x93> <== NOT EXECUTED
0012eb44 <getgrent>:
return NULL;
return p;
}
struct group *getgrent(void)
{
12eb44: 55 push %ebp <== NOT EXECUTED
12eb45: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12eb47: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
if (group_fp == NULL)
12eb4a: a1 c4 49 17 00 mov 0x1749c4,%eax <== NOT EXECUTED
12eb4f: 85 c0 test %eax,%eax <== NOT EXECUTED
12eb51: 75 05 jne 12eb58 <getgrent+0x14> <== NOT EXECUTED
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
12eb53: 31 c0 xor %eax,%eax <== NOT EXECUTED
return NULL;
return &grent;
}
12eb55: c9 leave <== NOT EXECUTED
12eb56: c3 ret <== NOT EXECUTED
12eb57: 90 nop <== NOT EXECUTED
struct group *getgrent(void)
{
if (group_fp == NULL)
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
12eb58: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12eb5b: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED
12eb60: b9 e0 49 17 00 mov $0x1749e0,%ecx <== NOT EXECUTED
12eb65: ba a8 4a 17 00 mov $0x174aa8,%edx <== NOT EXECUTED
12eb6a: e8 bd fe ff ff call 12ea2c <scangr> <== NOT EXECUTED
12eb6f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12eb72: 85 c0 test %eax,%eax <== NOT EXECUTED
12eb74: 74 dd je 12eb53 <getgrent+0xf> <== NOT EXECUTED
12eb76: b8 a8 4a 17 00 mov $0x174aa8,%eax <== NOT EXECUTED
return NULL;
return &grent;
}
12eb7b: c9 leave <== NOT EXECUTED
12eb7c: c3 ret <== NOT EXECUTED
0012eef0 <getgrgid>:
}
struct group *getgrgid(
gid_t gid
)
{
12eef0: 55 push %ebp <== NOT EXECUTED
12eef1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12eef3: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
12eef6: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
12eef9: 50 push %eax <== NOT EXECUTED
12eefa: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED
12eeff: 68 e0 49 17 00 push $0x1749e0 <== NOT EXECUTED
12ef04: 68 a8 4a 17 00 push $0x174aa8 <== NOT EXECUTED
12ef09: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED
12ef0d: 50 push %eax <== NOT EXECUTED
12ef0e: e8 b1 ff ff ff call 12eec4 <getgrgid_r> <== NOT EXECUTED
12ef13: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12ef16: 85 c0 test %eax,%eax <== NOT EXECUTED
12ef18: 75 06 jne 12ef20 <getgrgid+0x30> <== NOT EXECUTED
return NULL;
return p;
12ef1a: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
}
12ef1d: c9 leave <== NOT EXECUTED
12ef1e: c3 ret <== NOT EXECUTED
12ef1f: 90 nop <== NOT EXECUTED
gid_t gid
)
{
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
12ef20: 31 c0 xor %eax,%eax <== NOT EXECUTED
return NULL;
return p;
}
12ef22: c9 leave <== NOT EXECUTED
12ef23: c3 ret <== NOT EXECUTED
0012eec4 <getgrgid_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
12eec4: 55 push %ebp <== NOT EXECUTED
12eec5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12eec7: 53 push %ebx <== NOT EXECUTED
12eec8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
12eecb: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
12eece: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
12eed1: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED
12eed5: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED
12eed8: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED
12eedb: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED
12eede: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED
12eee1: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
12eee4: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
12eee6: 5b pop %ebx <== NOT EXECUTED
12eee7: 5b pop %ebx <== NOT EXECUTED
12eee8: c9 leave <== NOT EXECUTED
char *buffer,
size_t bufsize,
struct group **result
)
{
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
12eee9: e9 06 ff ff ff jmp 12edf4 <getgr_r> <== NOT EXECUTED
0012ef50 <getgrnam>:
}
struct group *getgrnam(
const char *name
)
{
12ef50: 55 push %ebp
12ef51: 89 e5 mov %esp,%ebp
12ef53: 83 ec 24 sub $0x24,%esp
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
12ef56: 8d 45 f4 lea -0xc(%ebp),%eax
12ef59: 50 push %eax
12ef5a: 68 c8 00 00 00 push $0xc8
12ef5f: 68 e0 49 17 00 push $0x1749e0
12ef64: 68 a8 4a 17 00 push $0x174aa8
12ef69: ff 75 08 pushl 0x8(%ebp)
12ef6c: e8 b3 ff ff ff call 12ef24 <getgrnam_r>
12ef71: 83 c4 20 add $0x20,%esp
12ef74: 85 c0 test %eax,%eax
12ef76: 75 08 jne 12ef80 <getgrnam+0x30> <== NEVER TAKEN
return NULL;
return p;
12ef78: 8b 45 f4 mov -0xc(%ebp),%eax
}
12ef7b: c9 leave
12ef7c: c3 ret
12ef7d: 8d 76 00 lea 0x0(%esi),%esi
const char *name
)
{
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
12ef80: 31 c0 xor %eax,%eax
return NULL;
return p;
}
12ef82: c9 leave <== NOT EXECUTED
12ef83: c3 ret <== NOT EXECUTED
0010b838 <getitimer>:
int getitimer(
int which,
struct itimerval *value
)
{
10b838: 55 push %ebp
10b839: 89 e5 mov %esp,%ebp
10b83b: 83 ec 08 sub $0x8,%esp
if ( !value )
10b83e: 8b 45 0c mov 0xc(%ebp),%eax
10b841: 85 c0 test %eax,%eax
10b843: 74 2f je 10b874 <getitimer+0x3c>
rtems_set_errno_and_return_minus_one( EFAULT );
switch ( which ) {
10b845: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
10b849: 76 15 jbe 10b860 <getitimer+0x28>
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b84b: e8 d8 a0 00 00 call 115928 <__errno>
10b850: c7 00 16 00 00 00 movl $0x16,(%eax)
}
10b856: b8 ff ff ff ff mov $0xffffffff,%eax
10b85b: c9 leave
10b85c: c3 ret
10b85d: 8d 76 00 lea 0x0(%esi),%esi
switch ( which ) {
case ITIMER_REAL:
case ITIMER_VIRTUAL:
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
10b860: e8 c3 a0 00 00 call 115928 <__errno>
10b865: c7 00 58 00 00 00 movl $0x58,(%eax)
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b86b: b8 ff ff ff ff mov $0xffffffff,%eax
10b870: c9 leave
10b871: c3 ret
10b872: 66 90 xchg %ax,%ax
int which,
struct itimerval *value
)
{
if ( !value )
rtems_set_errno_and_return_minus_one( EFAULT );
10b874: e8 af a0 00 00 call 115928 <__errno>
10b879: c7 00 0e 00 00 00 movl $0xe,(%eax)
10b87f: eb d5 jmp 10b856 <getitimer+0x1e>
0012efc0 <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
12efc0: 55 push %ebp
12efc1: 89 e5 mov %esp,%ebp
12efc3: 57 push %edi
12efc4: 56 push %esi
12efc5: 53 push %ebx
12efc6: 83 ec 1c sub $0x1c,%esp
12efc9: 89 c3 mov %eax,%ebx
12efcb: 89 55 e4 mov %edx,-0x1c(%ebp)
12efce: 89 ce mov %ecx,%esi
FILE *fp;
int match;
init_etc_passwd_group();
12efd0: e8 e3 fc ff ff call 12ecb8 <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
12efd5: 83 ec 08 sub $0x8,%esp
12efd8: 68 e9 1d 16 00 push $0x161de9
12efdd: 68 d0 e1 15 00 push $0x15e1d0
12efe2: e8 fd 94 01 00 call 1484e4 <fopen>
12efe7: 89 c7 mov %eax,%edi
12efe9: 83 c4 10 add $0x10,%esp
12efec: 85 c0 test %eax,%eax
12efee: 75 22 jne 12f012 <getpw_r+0x52> <== ALWAYS TAKEN
12eff0: e9 8b 00 00 00 jmp 12f080 <getpw_r+0xc0> <== NOT EXECUTED
12eff5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
12eff8: 83 ec 08 sub $0x8,%esp
12effb: 53 push %ebx
12effc: ff 36 pushl (%esi)
12effe: e8 29 e4 01 00 call 14d42c <strcmp>
12f003: 83 c4 10 add $0x10,%esp
12f006: 85 c0 test %eax,%eax
12f008: 0f 94 c0 sete %al
12f00b: 0f b6 c0 movzbl %al,%eax
}
else {
match = (pwd->pw_uid == uid);
}
if (match) {
12f00e: 85 c0 test %eax,%eax
12f010: 75 2e jne 12f040 <getpw_r+0x80>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
12f012: 83 ec 0c sub $0xc,%esp
12f015: ff 75 0c pushl 0xc(%ebp)
12f018: 8b 4d 08 mov 0x8(%ebp),%ecx
12f01b: 89 f2 mov %esi,%edx
12f01d: 89 f8 mov %edi,%eax
12f01f: e8 5c fb ff ff call 12eb80 <scanpw>
12f024: 83 c4 10 add $0x10,%esp
12f027: 85 c0 test %eax,%eax
12f029: 74 31 je 12f05c <getpw_r+0x9c> <== NEVER TAKEN
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
12f02b: 85 db test %ebx,%ebx
12f02d: 75 c9 jne 12eff8 <getpw_r+0x38> <== ALWAYS TAKEN
match = (strcmp(pwd->pw_name, name) == 0);
}
else {
match = (pwd->pw_uid == uid);
12f02f: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED
12f033: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED
12f036: 0f 94 c0 sete %al <== NOT EXECUTED
12f039: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
}
if (match) {
12f03c: 85 c0 test %eax,%eax <== NOT EXECUTED
12f03e: 74 d2 je 12f012 <getpw_r+0x52> <== NOT EXECUTED
fclose(fp);
12f040: 83 ec 0c sub $0xc,%esp
12f043: 57 push %edi
12f044: e8 83 8c 01 00 call 147ccc <fclose>
*result = pwd;
12f049: 8b 45 10 mov 0x10(%ebp),%eax
12f04c: 89 30 mov %esi,(%eax)
12f04e: 31 c0 xor %eax,%eax
return 0;
12f050: 83 c4 10 add $0x10,%esp
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
12f053: 8d 65 f4 lea -0xc(%ebp),%esp
12f056: 5b pop %ebx
12f057: 5e pop %esi
12f058: 5f pop %edi
12f059: c9 leave
12f05a: c3 ret
12f05b: 90 nop
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
errno = EINVAL;
12f05c: e8 1f 8b 01 00 call 147b80 <__errno> <== NOT EXECUTED
12f061: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
fclose(fp);
12f067: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12f06a: 57 push %edi <== NOT EXECUTED
12f06b: e8 5c 8c 01 00 call 147ccc <fclose> <== NOT EXECUTED
12f070: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
12f075: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
12f078: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12f07b: 5b pop %ebx <== NOT EXECUTED
12f07c: 5e pop %esi <== NOT EXECUTED
12f07d: 5f pop %edi <== NOT EXECUTED
12f07e: c9 leave <== NOT EXECUTED
12f07f: c3 ret <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
12f080: e8 fb 8a 01 00 call 147b80 <__errno> <== NOT EXECUTED
12f085: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
12f08b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
return -1;
12f08e: eb c3 jmp 12f053 <getpw_r+0x93> <== NOT EXECUTED
0012ec7c <getpwent>:
return NULL;
return p;
}
struct passwd *getpwent(void)
{
12ec7c: 55 push %ebp <== NOT EXECUTED
12ec7d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12ec7f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
if (passwd_fp == NULL)
12ec82: a1 c4 48 17 00 mov 0x1748c4,%eax <== NOT EXECUTED
12ec87: 85 c0 test %eax,%eax <== NOT EXECUTED
12ec89: 75 05 jne 12ec90 <getpwent+0x14> <== NOT EXECUTED
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
12ec8b: 31 c0 xor %eax,%eax <== NOT EXECUTED
return NULL;
return &pwent;
}
12ec8d: c9 leave <== NOT EXECUTED
12ec8e: c3 ret <== NOT EXECUTED
12ec8f: 90 nop <== NOT EXECUTED
struct passwd *getpwent(void)
{
if (passwd_fp == NULL)
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
12ec90: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12ec93: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED
12ec98: b9 e0 48 17 00 mov $0x1748e0,%ecx <== NOT EXECUTED
12ec9d: ba a8 49 17 00 mov $0x1749a8,%edx <== NOT EXECUTED
12eca2: e8 d9 fe ff ff call 12eb80 <scanpw> <== NOT EXECUTED
12eca7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12ecaa: 85 c0 test %eax,%eax <== NOT EXECUTED
12ecac: 74 dd je 12ec8b <getpwent+0xf> <== NOT EXECUTED
12ecae: b8 a8 49 17 00 mov $0x1749a8,%eax <== NOT EXECUTED
return NULL;
return &pwent;
}
12ecb3: c9 leave <== NOT EXECUTED
12ecb4: c3 ret <== NOT EXECUTED
0012f11c <getpwnam>:
}
struct passwd *getpwnam(
const char *name
)
{
12f11c: 55 push %ebp
12f11d: 89 e5 mov %esp,%ebp
12f11f: 83 ec 24 sub $0x24,%esp
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
12f122: 8d 45 f4 lea -0xc(%ebp),%eax
12f125: 50 push %eax
12f126: 68 c8 00 00 00 push $0xc8
12f12b: 68 e0 48 17 00 push $0x1748e0
12f130: 68 a8 49 17 00 push $0x1749a8
12f135: ff 75 08 pushl 0x8(%ebp)
12f138: e8 b3 ff ff ff call 12f0f0 <getpwnam_r>
12f13d: 83 c4 20 add $0x20,%esp
12f140: 85 c0 test %eax,%eax
12f142: 75 08 jne 12f14c <getpwnam+0x30> <== NEVER TAKEN
return NULL;
return p;
12f144: 8b 45 f4 mov -0xc(%ebp),%eax
}
12f147: c9 leave
12f148: c3 ret
12f149: 8d 76 00 lea 0x0(%esi),%esi
const char *name
)
{
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
12f14c: 31 c0 xor %eax,%eax
return NULL;
return p;
}
12f14e: c9 leave <== NOT EXECUTED
12f14f: c3 ret <== NOT EXECUTED
0012f0bc <getpwuid>:
}
struct passwd *getpwuid(
uid_t uid
)
{
12f0bc: 55 push %ebp <== NOT EXECUTED
12f0bd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12f0bf: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
12f0c2: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
12f0c5: 50 push %eax <== NOT EXECUTED
12f0c6: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED
12f0cb: 68 e0 48 17 00 push $0x1748e0 <== NOT EXECUTED
12f0d0: 68 a8 49 17 00 push $0x1749a8 <== NOT EXECUTED
12f0d5: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED
12f0d9: 50 push %eax <== NOT EXECUTED
12f0da: e8 b1 ff ff ff call 12f090 <getpwuid_r> <== NOT EXECUTED
12f0df: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12f0e2: 85 c0 test %eax,%eax <== NOT EXECUTED
12f0e4: 75 06 jne 12f0ec <getpwuid+0x30> <== NOT EXECUTED
return NULL;
return p;
12f0e6: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
}
12f0e9: c9 leave <== NOT EXECUTED
12f0ea: c3 ret <== NOT EXECUTED
12f0eb: 90 nop <== NOT EXECUTED
uid_t uid
)
{
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
12f0ec: 31 c0 xor %eax,%eax <== NOT EXECUTED
return NULL;
return p;
}
12f0ee: c9 leave <== NOT EXECUTED
12f0ef: c3 ret <== NOT EXECUTED
0012f090 <getpwuid_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
12f090: 55 push %ebp <== NOT EXECUTED
12f091: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12f093: 53 push %ebx <== NOT EXECUTED
12f094: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
12f097: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
12f09a: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
12f09d: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED
12f0a1: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED
12f0a4: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED
12f0a7: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED
12f0aa: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED
12f0ad: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
12f0b0: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
12f0b2: 5b pop %ebx <== NOT EXECUTED
12f0b3: 5b pop %ebx <== NOT EXECUTED
12f0b4: c9 leave <== NOT EXECUTED
char *buffer,
size_t bufsize,
struct passwd **result
)
{
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
12f0b5: e9 06 ff ff ff jmp 12efc0 <getpw_r> <== NOT EXECUTED
00108660 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
108660: 55 push %ebp
108661: 89 e5 mov %esp,%ebp
108663: 56 push %esi
108664: 53 push %ebx
108665: 83 ec 20 sub $0x20,%esp
108668: 8b 5d 08 mov 0x8(%ebp),%ebx
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
10866b: 85 db test %ebx,%ebx
10866d: 74 42 je 1086b1 <gettimeofday+0x51> <== NEVER TAKEN
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
10866f: 9c pushf
108670: fa cli
108671: 5e pop %esi
_TOD_Get( &now );
108672: 83 ec 0c sub $0xc,%esp
108675: 8d 45 f0 lea -0x10(%ebp),%eax
108678: 50 push %eax
108679: e8 fe 43 00 00 call 10ca7c <_TOD_Get>
_ISR_Enable(level);
10867e: 56 push %esi
10867f: 9d popf
useconds = (suseconds_t)now.tv_nsec;
108680: 8b 4d f4 mov -0xc(%ebp),%ecx
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
108683: 8b 45 f0 mov -0x10(%ebp),%eax
108686: 89 03 mov %eax,(%ebx)
time->tv_usec = useconds;
108688: be d3 4d 62 10 mov $0x10624dd3,%esi
10868d: 89 c8 mov %ecx,%eax
10868f: f7 ee imul %esi
108691: 89 45 e0 mov %eax,-0x20(%ebp)
108694: 89 55 e4 mov %edx,-0x1c(%ebp)
108697: 8b 75 e4 mov -0x1c(%ebp),%esi
10869a: c1 fe 06 sar $0x6,%esi
10869d: 89 c8 mov %ecx,%eax
10869f: 99 cltd
1086a0: 29 d6 sub %edx,%esi
1086a2: 89 73 04 mov %esi,0x4(%ebx)
1086a5: 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;
1086a7: 83 c4 10 add $0x10,%esp
}
1086aa: 8d 65 f8 lea -0x8(%ebp),%esp
1086ad: 5b pop %ebx
1086ae: 5e pop %esi
1086af: c9 leave
1086b0: c3 ret
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
errno = EFAULT;
1086b1: e8 4e ca 00 00 call 115104 <__errno> <== NOT EXECUTED
1086b6: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
1086bc: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
1086c1: eb e7 jmp 1086aa <gettimeofday+0x4a> <== NOT EXECUTED
0010e96c <getuid>:
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
* P1003.1b-1993, p. 84
*/
uid_t getuid( void )
{
10e96c: 55 push %ebp <== NOT EXECUTED
10e96d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10e96f: a1 20 f3 16 00 mov 0x16f320,%eax <== NOT EXECUTED
10e974: 66 8b 40 32 mov 0x32(%eax),%ax <== NOT EXECUTED
return _POSIX_types_Uid;
}
10e978: c9 leave <== NOT EXECUTED
10e979: c3 ret <== NOT EXECUTED
00113c74 <imfs_dir_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
113c74: 55 push %ebp
113c75: 89 e5 mov %esp,%ebp
113c77: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
113c7a: 8b 50 38 mov 0x38(%eax),%edx
113c7d: 83 7a 4c 01 cmpl $0x1,0x4c(%edx)
113c81: 74 09 je 113c8c <imfs_dir_open+0x18> <== ALWAYS TAKEN
113c83: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
return 0;
}
113c88: c9 leave <== NOT EXECUTED
113c89: c3 ret <== NOT EXECUTED
113c8a: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_jnode = (IMFS_jnode_t *) iop->file_info;
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
113c8c: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
113c93: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
113c9a: 31 c0 xor %eax,%eax
return 0;
}
113c9c: c9 leave
113c9d: c3 ret
00113eac <imfs_dir_read>:
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
113eac: 55 push %ebp
113ead: 89 e5 mov %esp,%ebp
113eaf: 57 push %edi
113eb0: 56 push %esi
113eb1: 53 push %ebx
113eb2: 81 ec 4c 01 00 00 sub $0x14c,%esp
int current_entry;
int first_entry;
int last_entry;
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->file_info;
113eb8: 8b 55 08 mov 0x8(%ebp),%edx
113ebb: 8b 42 38 mov 0x38(%edx),%eax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
113ebe: 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;
113ec1: 83 c0 54 add $0x54,%eax
113ec4: 89 85 cc fe ff ff mov %eax,-0x134(%ebp)
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
113eca: 39 c3 cmp %eax,%ebx
113ecc: 0f 84 2a 01 00 00 je 113ffc <imfs_dir_read+0x150>
/* Move to the first of the desired directory entries */
the_node = the_chain->first;
bytes_transferred = 0;
first_entry = iop->offset;
113ed2: 8b 45 08 mov 0x8(%ebp),%eax
113ed5: 8b 40 0c mov 0xc(%eax),%eax
113ed8: 89 85 d0 fe ff ff mov %eax,-0x130(%ebp)
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
113ede: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx
113ee3: 8b 45 10 mov 0x10(%ebp),%eax
113ee6: f7 e2 mul %edx
113ee8: c1 ea 08 shr $0x8,%edx
113eeb: 89 d0 mov %edx,%eax
113eed: c1 e0 04 shl $0x4,%eax
113ef0: c1 e2 08 shl $0x8,%edx
113ef3: 8d 14 10 lea (%eax,%edx,1),%edx
113ef6: 03 95 d0 fe ff ff add -0x130(%ebp),%edx
113efc: 89 95 d4 fe ff ff mov %edx,-0x12c(%ebp)
/* The directory was not empty so try to move to the desired entry in chain*/
for (
113f02: 85 d2 test %edx,%edx
113f04: 0f 8e f2 00 00 00 jle 113ffc <imfs_dir_read+0x150> <== NEVER TAKEN
113f0a: 31 d2 xor %edx,%edx
113f0c: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp)
113f13: 00 00 00
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
strcpy( tmp_dirent.d_name, the_jnode->name );
113f16: 8d 85 d8 fe ff ff lea -0x128(%ebp),%eax
113f1c: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp)
113f22: eb 20 jmp 113f44 <imfs_dir_read+0x98>
);
iop->offset = iop->offset + sizeof(struct dirent);
bytes_transferred = bytes_transferred + sizeof( struct dirent );
}
the_node = the_node->next;
113f24: 8b 1b mov (%ebx),%ebx
* to the end of the exisiting file, the remaining entries will be placed in
* the buffer and the returned value will be equal to -m actual- times the
* size of a directory entry.
*/
ssize_t imfs_dir_read(
113f26: 81 c2 10 01 00 00 add $0x110,%edx
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
113f2c: 3b 95 d4 fe ff ff cmp -0x12c(%ebp),%edx
113f32: 0f 8d b4 00 00 00 jge 113fec <imfs_dir_read+0x140> <== NEVER TAKEN
current_entry = 0;
current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
113f38: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx
113f3e: 0f 84 a8 00 00 00 je 113fec <imfs_dir_read+0x140>
/* entry in the read */
return bytes_transferred; /* Indicate that there are no more */
/* entries to return */
}
if( current_entry >= first_entry ) {
113f44: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp)
113f4a: 7f d8 jg 113f24 <imfs_dir_read+0x78>
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
113f4c: 89 95 dc fe ff ff mov %edx,-0x124(%ebp)
113f52: 89 d0 mov %edx,%eax
113f54: c1 f8 1f sar $0x1f,%eax
113f57: 89 85 e0 fe ff ff mov %eax,-0x120(%ebp)
tmp_dirent.d_reclen = sizeof( struct dirent );
113f5d: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp)
113f64: 10 01
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
113f66: 8b 43 38 mov 0x38(%ebx),%eax
113f69: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp)
tmp_dirent.d_namlen = strlen( the_jnode->name );
113f6f: 8d 73 0c lea 0xc(%ebx),%esi
113f72: 31 c0 xor %eax,%eax
113f74: b9 ff ff ff ff mov $0xffffffff,%ecx
113f79: 89 f7 mov %esi,%edi
113f7b: f2 ae repnz scas %es:(%edi),%al
113f7d: f7 d1 not %ecx
113f7f: 49 dec %ecx
113f80: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp)
strcpy( tmp_dirent.d_name, the_jnode->name );
113f87: 83 ec 08 sub $0x8,%esp
113f8a: 56 push %esi
113f8b: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax
113f91: 50 push %eax
113f92: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp)
113f98: e8 87 1c 00 00 call 115c24 <strcpy>
memcpy(
113f9d: 8b 45 0c mov 0xc(%ebp),%eax
113fa0: 03 85 c8 fe ff ff add -0x138(%ebp),%eax
113fa6: b9 44 00 00 00 mov $0x44,%ecx
113fab: 89 c7 mov %eax,%edi
113fad: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi
113fb3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
113fb5: 8b 45 08 mov 0x8(%ebp),%eax
113fb8: 81 40 0c 10 01 00 00 addl $0x110,0xc(%eax)
113fbf: 83 50 10 00 adcl $0x0,0x10(%eax)
bytes_transferred = bytes_transferred + sizeof( struct dirent );
113fc3: 81 85 c8 fe ff ff 10 addl $0x110,-0x138(%ebp)
113fca: 01 00 00
113fcd: 83 c4 10 add $0x10,%esp
113fd0: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx
}
the_node = the_node->next;
113fd6: 8b 1b mov (%ebx),%ebx
* to the end of the exisiting file, the remaining entries will be placed in
* the buffer and the returned value will be equal to -m actual- times the
* size of a directory entry.
*/
ssize_t imfs_dir_read(
113fd8: 81 c2 10 01 00 00 add $0x110,%edx
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
113fde: 3b 95 d4 fe ff ff cmp -0x12c(%ebp),%edx
113fe4: 0f 8c 4e ff ff ff jl 113f38 <imfs_dir_read+0x8c> <== NEVER TAKEN
113fea: 66 90 xchg %ax,%ax
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
113fec: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax
113ff2: 8d 65 f4 lea -0xc(%ebp),%esp
113ff5: 5b pop %ebx
113ff6: 5e pop %esi
113ff7: 5f pop %edi
113ff8: c9 leave
113ff9: c3 ret
113ffa: 66 90 xchg %ax,%ax
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
113ffc: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp)
114003: 00 00 00
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
114006: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax
11400c: 8d 65 f4 lea -0xc(%ebp),%esp
11400f: 5b pop %ebx
114010: 5e pop %esi
114011: 5f pop %edi
114012: c9 leave
114013: c3 ret
00113dd0 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
113dd0: 55 push %ebp
113dd1: 89 e5 mov %esp,%ebp
113dd3: 56 push %esi
113dd4: 53 push %ebx
113dd5: 83 ec 10 sub $0x10,%esp
113dd8: 8b 75 0c mov 0xc(%ebp),%esi
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
113ddb: 8b 1e mov (%esi),%ebx
113ddd: 8d 43 54 lea 0x54(%ebx),%eax
113de0: 39 43 50 cmp %eax,0x50(%ebx)
113de3: 0f 85 8f 00 00 00 jne 113e78 <imfs_dir_rmnod+0xa8>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
113de9: 8b 46 10 mov 0x10(%esi),%eax
113dec: 3b 58 1c cmp 0x1c(%eax),%ebx
113def: 0f 84 97 00 00 00 je 113e8c <imfs_dir_rmnod+0xbc>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
113df5: 8b 43 5c mov 0x5c(%ebx),%eax
113df8: 85 c0 test %eax,%eax
113dfa: 0f 85 8c 00 00 00 jne 113e8c <imfs_dir_rmnod+0xbc> <== NEVER TAKEN
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
113e00: 8b 4b 08 mov 0x8(%ebx),%ecx
113e03: 85 c9 test %ecx,%ecx
113e05: 74 13 je 113e1a <imfs_dir_rmnod+0x4a>
113e07: 83 ec 0c sub $0xc,%esp
113e0a: 53 push %ebx
113e0b: e8 e8 87 ff ff call 10c5f8 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
113e10: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
113e17: 83 c4 10 add $0x10,%esp
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
113e1a: 66 ff 4b 34 decw 0x34(%ebx)
IMFS_update_ctime( the_jnode );
113e1e: 83 ec 08 sub $0x8,%esp
113e21: 6a 00 push $0x0
113e23: 8d 45 f0 lea -0x10(%ebp),%eax
113e26: 50 push %eax
113e27: e8 34 48 ff ff call 108660 <gettimeofday>
113e2c: 8b 45 f0 mov -0x10(%ebp),%eax
113e2f: 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) ) {
113e32: 89 1c 24 mov %ebx,(%esp)
113e35: e8 52 d0 ff ff call 110e8c <rtems_libio_is_file_open>
113e3a: 83 c4 10 add $0x10,%esp
113e3d: 85 c0 test %eax,%eax
113e3f: 75 2b jne 113e6c <imfs_dir_rmnod+0x9c>
113e41: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx)
113e46: 75 24 jne 113e6c <imfs_dir_rmnod+0x9c>
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
113e48: a1 24 70 12 00 mov 0x127024,%eax
113e4d: 8b 50 04 mov 0x4(%eax),%edx
113e50: 3b 16 cmp (%esi),%edx
113e52: 74 4c je 113ea0 <imfs_dir_rmnod+0xd0> <== NEVER TAKEN
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
113e54: 83 ec 0c sub $0xc,%esp
113e57: 53 push %ebx
113e58: e8 87 47 ff ff call 1085e4 <free>
113e5d: 31 c0 xor %eax,%eax
113e5f: 83 c4 10 add $0x10,%esp
}
return 0;
}
113e62: 8d 65 f8 lea -0x8(%ebp),%esp
113e65: 5b pop %ebx
113e66: 5e pop %esi
113e67: c9 leave
113e68: c3 ret
113e69: 8d 76 00 lea 0x0(%esi),%esi
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
113e6c: 31 c0 xor %eax,%eax
}
return 0;
}
113e6e: 8d 65 f8 lea -0x8(%ebp),%esp
113e71: 5b pop %ebx
113e72: 5e pop %esi
113e73: c9 leave
113e74: c3 ret
113e75: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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 );
113e78: e8 87 12 00 00 call 115104 <__errno>
113e7d: c7 00 5a 00 00 00 movl $0x5a,(%eax)
113e83: b8 ff ff ff ff mov $0xffffffff,%eax
113e88: eb e4 jmp 113e6e <imfs_dir_rmnod+0x9e>
113e8a: 66 90 xchg %ax,%ax
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
113e8c: e8 73 12 00 00 call 115104 <__errno>
113e91: c7 00 10 00 00 00 movl $0x10,(%eax)
113e97: b8 ff ff ff ff mov $0xffffffff,%eax
113e9c: eb d0 jmp 113e6e <imfs_dir_rmnod+0x9e>
113e9e: 66 90 xchg %ax,%ax
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
rtems_filesystem_current.node_access = NULL;
113ea0: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED
113ea7: eb ab jmp 113e54 <imfs_dir_rmnod+0x84> <== NOT EXECUTED
0012ecb8 <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
12ecb8: 55 push %ebp
12ecb9: 89 e5 mov %esp,%ebp
12ecbb: 53 push %ebx
12ecbc: 83 ec 04 sub $0x4,%esp
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
12ecbf: 80 3d c0 48 17 00 00 cmpb $0x0,0x1748c0
12ecc6: 74 08 je 12ecd0 <init_etc_passwd_group+0x18>
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
12ecc8: 8b 5d fc mov -0x4(%ebp),%ebx
12eccb: c9 leave
12eccc: c3 ret
12eccd: 8d 76 00 lea 0x0(%esi),%esi
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
12ecd0: c6 05 c0 48 17 00 01 movb $0x1,0x1748c0
mkdir("/etc", 0777);
12ecd7: 83 ec 08 sub $0x8,%esp
12ecda: 68 ff 01 00 00 push $0x1ff
12ecdf: 68 ba e1 15 00 push $0x15e1ba
12ece4: e8 87 02 fe ff call 10ef70 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
12ece9: 59 pop %ecx
12ecea: 5b pop %ebx
12eceb: 68 e9 1d 16 00 push $0x161de9
12ecf0: 68 d0 e1 15 00 push $0x15e1d0
12ecf5: e8 ea 97 01 00 call 1484e4 <fopen>
12ecfa: 83 c4 10 add $0x10,%esp
12ecfd: 85 c0 test %eax,%eax
12ecff: 74 77 je 12ed78 <init_etc_passwd_group+0xc0><== ALWAYS TAKEN
fclose(fp);
12ed01: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12ed04: 50 push %eax <== NOT EXECUTED
12ed05: e8 c2 8f 01 00 call 147ccc <fclose> <== NOT EXECUTED
12ed0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
12ed0d: 83 ec 08 sub $0x8,%esp
12ed10: 68 e9 1d 16 00 push $0x161de9
12ed15: 68 dc e1 15 00 push $0x15e1dc
12ed1a: e8 c5 97 01 00 call 1484e4 <fopen>
12ed1f: 83 c4 10 add $0x10,%esp
12ed22: 85 c0 test %eax,%eax
12ed24: 74 12 je 12ed38 <init_etc_passwd_group+0x80><== ALWAYS TAKEN
fclose(fp);
12ed26: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12ed29: 50 push %eax <== NOT EXECUTED
12ed2a: e8 9d 8f 01 00 call 147ccc <fclose> <== NOT EXECUTED
12ed2f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
12ed32: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
12ed35: c9 leave <== NOT EXECUTED
12ed36: c3 ret <== NOT EXECUTED
12ed37: 90 nop <== NOT EXECUTED
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
12ed38: 83 ec 08 sub $0x8,%esp
12ed3b: 68 70 19 16 00 push $0x161970
12ed40: 68 dc e1 15 00 push $0x15e1dc
12ed45: e8 9a 97 01 00 call 1484e4 <fopen>
12ed4a: 89 c3 mov %eax,%ebx
12ed4c: 83 c4 10 add $0x10,%esp
12ed4f: 85 c0 test %eax,%eax
12ed51: 0f 84 71 ff ff ff je 12ecc8 <init_etc_passwd_group+0x10><== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
12ed57: 50 push %eax
12ed58: 6a 2a push $0x2a
12ed5a: 6a 01 push $0x1
12ed5c: 68 0c 5c 16 00 push $0x165c0c
12ed61: e8 fa a9 01 00 call 149760 <fwrite>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
12ed66: 89 1c 24 mov %ebx,(%esp)
12ed69: e8 5e 8f 01 00 call 147ccc <fclose>
12ed6e: 83 c4 10 add $0x10,%esp
12ed71: e9 52 ff ff ff jmp 12ecc8 <init_etc_passwd_group+0x10>
12ed76: 66 90 xchg %ax,%ax
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
12ed78: 83 ec 08 sub $0x8,%esp
12ed7b: 68 70 19 16 00 push $0x161970
12ed80: 68 d0 e1 15 00 push $0x15e1d0
12ed85: e8 5a 97 01 00 call 1484e4 <fopen>
12ed8a: 89 c3 mov %eax,%ebx
12ed8c: 83 c4 10 add $0x10,%esp
12ed8f: 85 c0 test %eax,%eax
12ed91: 0f 84 76 ff ff ff je 12ed0d <init_etc_passwd_group+0x55><== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
12ed97: 50 push %eax
12ed98: 6a 66 push $0x66
12ed9a: 6a 01 push $0x1
12ed9c: 68 a4 5b 16 00 push $0x165ba4
12eda1: e8 ba a9 01 00 call 149760 <fwrite>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
12eda6: 89 1c 24 mov %ebx,(%esp)
12eda9: e8 1e 8f 01 00 call 147ccc <fclose>
12edae: 83 c4 10 add $0x10,%esp
12edb1: e9 57 ff ff ff jmp 12ed0d <init_etc_passwd_group+0x55>
0010b868 <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
10b868: 55 push %ebp
10b869: 89 e5 mov %esp,%ebp
10b86b: 83 ec 08 sub $0x8,%esp
10b86e: 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 );
10b871: 3b 05 4c 81 12 00 cmp 0x12814c,%eax
10b877: 73 2f jae 10b8a8 <ioctl+0x40>
iop = rtems_libio_iop( fd );
10b879: c1 e0 06 shl $0x6,%eax
10b87c: 03 05 c0 c3 12 00 add 0x12c3c0,%eax
rtems_libio_check_is_open(iop);
10b882: f6 40 15 01 testb $0x1,0x15(%eax)
10b886: 74 20 je 10b8a8 <ioctl+0x40> <== NEVER TAKEN
va_start(ap, command);
buffer = va_arg(ap, void *);
10b888: 8b 4d 10 mov 0x10(%ebp),%ecx
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
10b88b: 8b 50 3c mov 0x3c(%eax),%edx
10b88e: 85 d2 test %edx,%edx
10b890: 74 16 je 10b8a8 <ioctl+0x40> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
10b892: 8b 52 10 mov 0x10(%edx),%edx
10b895: 85 d2 test %edx,%edx
10b897: 74 21 je 10b8ba <ioctl+0x52> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
10b899: 83 ec 04 sub $0x4,%esp
10b89c: 51 push %ecx
10b89d: ff 75 0c pushl 0xc(%ebp)
10b8a0: 50 push %eax
10b8a1: ff d2 call *%edx
return rc;
10b8a3: 83 c4 10 add $0x10,%esp
}
10b8a6: c9 leave
10b8a7: c3 ret
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
10b8a8: e8 6b d6 00 00 call 118f18 <__errno>
10b8ad: c7 00 09 00 00 00 movl $0x9,(%eax)
10b8b3: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}
10b8b8: c9 leave
10b8b9: c3 ret
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
10b8ba: e8 59 d6 00 00 call 118f18 <__errno> <== NOT EXECUTED
10b8bf: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10b8c5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}
10b8ca: c9 leave <== NOT EXECUTED
10b8cb: c3 ret <== NOT EXECUTED
0010a0c8 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
10a0c8: 55 push %ebp <== NOT EXECUTED
10a0c9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10a0cb: 56 push %esi <== NOT EXECUTED
10a0cc: 53 push %ebx <== NOT EXECUTED
10a0cd: 89 d6 mov %edx,%esi <== NOT EXECUTED
10a0cf: 88 c3 mov %al,%bl <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
10a0d1: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED
10a0d4: a8 20 test $0x20,%al <== NOT EXECUTED
10a0d6: 74 03 je 10a0db <iproc+0x13> <== NOT EXECUTED
c &= 0x7f;
10a0d8: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
10a0db: f6 c4 02 test $0x2,%ah <== NOT EXECUTED
10a0de: 74 18 je 10a0f8 <iproc+0x30> <== NOT EXECUTED
c = tolower (c);
10a0e0: 0f b6 db movzbl %bl,%ebx <== NOT EXECUTED
10a0e3: 8b 15 24 71 12 00 mov 0x127124,%edx <== NOT EXECUTED
10a0e9: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx <== NOT EXECUTED
10a0ee: 83 e2 03 and $0x3,%edx <== NOT EXECUTED
10a0f1: 4a dec %edx <== NOT EXECUTED
10a0f2: 0f 84 98 00 00 00 je 10a190 <iproc+0xc8> <== NOT EXECUTED
if (c == '\r') {
10a0f8: 80 fb 0d cmp $0xd,%bl <== NOT EXECUTED
10a0fb: 74 33 je 10a130 <iproc+0x68> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
10a0fd: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED
10a100: 0f 84 82 00 00 00 je 10a188 <iproc+0xc0> <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
10a106: 84 db test %bl,%bl <== NOT EXECUTED
10a108: 75 3a jne 10a144 <iproc+0x7c> <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
10a10a: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
10a10d: 8b 15 14 70 12 00 mov 0x127014,%edx <== NOT EXECUTED
10a113: 4a dec %edx <== NOT EXECUTED
10a114: 39 d0 cmp %edx,%eax <== NOT EXECUTED
10a116: 7d 1c jge 10a134 <iproc+0x6c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
10a118: f6 46 3c 08 testb $0x8,0x3c(%esi) <== NOT EXECUTED
10a11c: 75 7a jne 10a198 <iproc+0xd0> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
10a11e: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED
10a121: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED
10a124: 40 inc %eax <== NOT EXECUTED
10a125: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED
10a128: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
return 0;
}
10a12a: 5b pop %ebx <== NOT EXECUTED
10a12b: 5e pop %esi <== NOT EXECUTED
10a12c: c9 leave <== NOT EXECUTED
10a12d: c3 ret <== NOT EXECUTED
10a12e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
10a130: 84 c0 test %al,%al <== NOT EXECUTED
10a132: 79 08 jns 10a13c <iproc+0x74> <== NOT EXECUTED
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
10a134: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
return 0;
}
10a136: 5b pop %ebx <== NOT EXECUTED
10a137: 5e pop %esi <== NOT EXECUTED
10a138: c9 leave <== NOT EXECUTED
10a139: c3 ret <== NOT EXECUTED
10a13a: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
10a13c: f6 c4 01 test $0x1,%ah <== NOT EXECUTED
10a13f: 74 03 je 10a144 <iproc+0x7c> <== NOT EXECUTED
10a141: b3 0a mov $0xa,%bl <== NOT EXECUTED
10a143: 90 nop <== NOT EXECUTED
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
10a144: 8b 46 3c mov 0x3c(%esi),%eax <== NOT EXECUTED
10a147: a8 02 test $0x2,%al <== NOT EXECUTED
10a149: 74 bf je 10a10a <iproc+0x42> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
10a14b: 38 5e 43 cmp %bl,0x43(%esi) <== NOT EXECUTED
10a14e: 0f 84 a0 00 00 00 je 10a1f4 <iproc+0x12c> <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
10a154: 38 5e 44 cmp %bl,0x44(%esi) <== NOT EXECUTED
10a157: 74 5f je 10a1b8 <iproc+0xf0> <== NOT EXECUTED
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
10a159: 38 5e 45 cmp %bl,0x45(%esi) <== NOT EXECUTED
10a15c: 74 20 je 10a17e <iproc+0xb6> <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
10a15e: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED
10a161: 74 69 je 10a1cc <iproc+0x104> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
return 1;
}
else if ((c == tty->termios.c_cc[VEOL])
10a163: 38 5e 4c cmp %bl,0x4c(%esi) <== NOT EXECUTED
10a166: 74 05 je 10a16d <iproc+0xa5> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
10a168: 38 5e 51 cmp %bl,0x51(%esi) <== NOT EXECUTED
10a16b: 75 9d jne 10a10a <iproc+0x42> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
10a16d: a8 08 test $0x8,%al <== NOT EXECUTED
10a16f: 75 3b jne 10a1ac <iproc+0xe4> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
10a171: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
10a174: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED
10a177: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED
10a17a: 40 inc %eax <== NOT EXECUTED
10a17b: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED
10a17e: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
10a183: eb a5 jmp 10a12a <iproc+0x62> <== NOT EXECUTED
10a185: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
10a188: a8 40 test $0x40,%al <== NOT EXECUTED
10a18a: 74 b8 je 10a144 <iproc+0x7c> <== NOT EXECUTED
10a18c: b3 0d mov $0xd,%bl <== NOT EXECUTED
10a18e: eb b4 jmp 10a144 <iproc+0x7c> <== NOT EXECUTED
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
10a190: 83 c3 20 add $0x20,%ebx <== NOT EXECUTED
10a193: e9 60 ff ff ff jmp 10a0f8 <iproc+0x30> <== NOT EXECUTED
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
10a198: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED
10a19b: 89 f2 mov %esi,%edx <== NOT EXECUTED
10a19d: e8 f6 fc ff ff call 109e98 <echo> <== NOT EXECUTED
10a1a2: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
10a1a5: e9 74 ff ff ff jmp 10a11e <iproc+0x56> <== NOT EXECUTED
10a1aa: 66 90 xchg %ax,%ax <== NOT EXECUTED
return 1;
}
else if ((c == tty->termios.c_cc[VEOL])
|| (c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
10a1ac: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED
10a1af: 89 f2 mov %esi,%edx <== NOT EXECUTED
10a1b1: e8 e2 fc ff ff call 109e98 <echo> <== NOT EXECUTED
10a1b6: eb b9 jmp 10a171 <iproc+0xa9> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
10a1b8: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
10a1bd: 89 f0 mov %esi,%eax <== NOT EXECUTED
10a1bf: e8 38 fd ff ff call 109efc <erase> <== NOT EXECUTED
10a1c4: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
10a1c6: e9 5f ff ff ff jmp 10a12a <iproc+0x62> <== NOT EXECUTED
10a1cb: 90 nop <== NOT EXECUTED
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
10a1cc: a8 48 test $0x48,%al <== NOT EXECUTED
10a1ce: 74 0c je 10a1dc <iproc+0x114> <== NOT EXECUTED
echo (c, tty);
10a1d0: 89 f2 mov %esi,%edx <== NOT EXECUTED
10a1d2: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
10a1d7: e8 bc fc ff ff call 109e98 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
10a1dc: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
10a1df: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED
10a1e2: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED
10a1e6: 40 inc %eax <== NOT EXECUTED
10a1e7: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED
10a1ea: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
10a1ef: e9 36 ff ff ff jmp 10a12a <iproc+0x62> <== NOT EXECUTED
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
10a1f4: 31 d2 xor %edx,%edx <== NOT EXECUTED
10a1f6: 89 f0 mov %esi,%eax <== NOT EXECUTED
10a1f8: e8 ff fc ff ff call 109efc <erase> <== NOT EXECUTED
10a1fd: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
10a1ff: e9 26 ff ff ff jmp 10a12a <iproc+0x62> <== NOT EXECUTED
00114460 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
114460: 55 push %ebp
114461: 89 e5 mov %esp,%ebp
114463: 57 push %edi
114464: 56 push %esi
114465: 53 push %ebx
114466: 83 ec 3c sub $0x3c,%esp
114469: 8b 75 0c mov 0xc(%ebp),%esi
11446c: 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() )
11446f: e8 c0 c9 ff ff call 110e34 <getpid>
114474: 3b 45 08 cmp 0x8(%ebp),%eax
114477: 0f 85 2f 02 00 00 jne 1146ac <killinfo+0x24c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
11447d: 85 f6 test %esi,%esi
11447f: 0f 84 3c 02 00 00 je 1146c1 <killinfo+0x261> <== NEVER TAKEN
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
114485: 8d 4e ff lea -0x1(%esi),%ecx
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
114488: 83 f9 1f cmp $0x1f,%ecx
11448b: 0f 87 30 02 00 00 ja 1146c1 <killinfo+0x261> <== NEVER TAKEN
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 )
114491: 8d 04 76 lea (%esi,%esi,2),%eax
114494: 83 3c 85 e8 99 12 00 cmpl $0x1,0x1299e8(,%eax,4)
11449b: 01
11449c: 0f 84 cf 00 00 00 je 114571 <killinfo+0x111>
/*
* 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 ) )
1144a2: 83 fe 08 cmp $0x8,%esi
1144a5: 0f 84 d1 00 00 00 je 11457c <killinfo+0x11c>
1144ab: 83 fe 04 cmp $0x4,%esi
1144ae: 0f 84 c8 00 00 00 je 11457c <killinfo+0x11c>
1144b4: 83 fe 0b cmp $0xb,%esi
1144b7: 0f 84 bf 00 00 00 je 11457c <killinfo+0x11c>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
1144bd: bb 01 00 00 00 mov $0x1,%ebx
1144c2: d3 e3 shl %cl,%ebx
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
1144c4: 89 75 dc mov %esi,-0x24(%ebp)
siginfo->si_code = SI_USER;
1144c7: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
if ( !value ) {
1144ce: 85 ff test %edi,%edi
1144d0: 0f 84 ca 01 00 00 je 1146a0 <killinfo+0x240>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
1144d6: 8b 07 mov (%edi),%eax
1144d8: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
1144db: a1 f8 93 12 00 mov 0x1293f8,%eax
1144e0: 40 inc %eax
1144e1: a3 f8 93 12 00 mov %eax,0x1293f8
/*
* 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;
1144e6: 8b 0d b8 94 12 00 mov 0x1294b8,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
1144ec: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax
1144f2: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax
1144f8: f7 d0 not %eax
1144fa: 85 c3 test %eax,%ebx
1144fc: 75 34 jne 114532 <killinfo+0xd2>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
1144fe: a1 80 9b 12 00 mov 0x129b80,%eax
114503: 3d 84 9b 12 00 cmp $0x129b84,%eax
114508: 75 1b jne 114525 <killinfo+0xc5>
11450a: e9 89 00 00 00 jmp 114598 <killinfo+0x138>
11450f: 90 nop
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
114510: 8b 92 cc 00 00 00 mov 0xcc(%edx),%edx
114516: f7 d2 not %edx
114518: 85 d3 test %edx,%ebx
11451a: 75 16 jne 114532 <killinfo+0xd2>
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 ) {
11451c: 8b 00 mov (%eax),%eax
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
11451e: 3d 84 9b 12 00 cmp $0x129b84,%eax
114523: 74 73 je 114598 <killinfo+0x138> <== ALWAYS TAKEN
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
114525: 89 c1 mov %eax,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
114527: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
11452d: 85 58 30 test %ebx,0x30(%eax)
114530: 74 de je 114510 <killinfo+0xb0>
* 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;
114532: c6 41 74 01 movb $0x1,0x74(%ecx)
/*
* 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 ) ) {
114536: 50 push %eax
114537: 8d 45 dc lea -0x24(%ebp),%eax
11453a: 50 push %eax
11453b: 56 push %esi
11453c: 51 push %ecx
11453d: e8 6e 03 00 00 call 1148b0 <_POSIX_signals_Unblock_thread>
114542: 83 c4 10 add $0x10,%esp
114545: 84 c0 test %al,%al
114547: 0f 85 47 01 00 00 jne 114694 <killinfo+0x234>
/*
* 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 );
11454d: 83 ec 0c sub $0xc,%esp
114550: 53 push %ebx
114551: e8 36 03 00 00 call 11488c <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
114556: 8d 1c 76 lea (%esi,%esi,2),%ebx
114559: c1 e3 02 shl $0x2,%ebx
11455c: 83 c4 10 add $0x10,%esp
11455f: 83 bb e0 99 12 00 02 cmpl $0x2,0x1299e0(%ebx)
114566: 0f 84 ec 00 00 00 je 114658 <killinfo+0x1f8>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
11456c: e8 fb 96 ff ff call 10dc6c <_Thread_Enable_dispatch>
114571: 31 c0 xor %eax,%eax
return 0;
}
114573: 8d 65 f4 lea -0xc(%ebp),%esp
114576: 5b pop %ebx
114577: 5e pop %esi
114578: 5f pop %edi
114579: c9 leave
11457a: c3 ret
11457b: 90 nop
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
11457c: e8 1f 06 00 00 call 114ba0 <pthread_self>
114581: 83 ec 08 sub $0x8,%esp
114584: 56 push %esi
114585: 50 push %eax
114586: e8 55 05 00 00 call 114ae0 <pthread_kill>
11458b: 83 c4 10 add $0x10,%esp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
11458e: 8d 65 f4 lea -0xc(%ebp),%esp
114591: 5b pop %ebx
114592: 5e pop %esi
114593: 5f pop %edi
114594: c9 leave
114595: c3 ret
114596: 66 90 xchg %ax,%ax
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
114598: 0f b6 05 14 52 12 00 movzbl 0x125214,%eax
11459f: 40 inc %eax
1145a0: 89 45 d4 mov %eax,-0x2c(%ebp)
1145a3: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
1145aa: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp)
1145b1: 89 5d cc mov %ebx,-0x34(%ebp)
1145b4: 89 75 c0 mov %esi,-0x40(%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 ] )
1145b7: 8b 55 d0 mov -0x30(%ebp),%edx
1145ba: 8b 04 95 cc 93 12 00 mov 0x1293cc(,%edx,4),%eax
1145c1: 85 c0 test %eax,%eax
1145c3: 74 6c je 114631 <killinfo+0x1d1>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
1145c5: 8b 40 04 mov 0x4(%eax),%eax
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
1145c8: 0f b7 70 10 movzwl 0x10(%eax),%esi
object_table = the_info->local_table;
1145cc: 8b 78 1c mov 0x1c(%eax),%edi
for ( index = 1 ; index <= maximum ; index++ ) {
1145cf: 85 f6 test %esi,%esi
1145d1: 74 5e je 114631 <killinfo+0x1d1>
1145d3: b8 01 00 00 00 mov $0x1,%eax
the_thread = (Thread_Control *) object_table[ index ];
1145d8: 8b 14 87 mov (%edi,%eax,4),%edx
if ( !the_thread )
1145db: 85 d2 test %edx,%edx
1145dd: 74 4d je 11462c <killinfo+0x1cc>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
1145df: 8b 4a 14 mov 0x14(%edx),%ecx
1145e2: 3b 4d d4 cmp -0x2c(%ebp),%ecx
1145e5: 77 45 ja 11462c <killinfo+0x1cc>
DEBUG_STEP("2");
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
1145e7: 8b 9a f8 00 00 00 mov 0xf8(%edx),%ebx
1145ed: 8b 9b cc 00 00 00 mov 0xcc(%ebx),%ebx
1145f3: f7 d3 not %ebx
1145f5: 85 5d cc test %ebx,-0x34(%ebp)
1145f8: 74 32 je 11462c <killinfo+0x1cc>
*
* 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 ) {
1145fa: 3b 4d d4 cmp -0x2c(%ebp),%ecx
1145fd: 72 25 jb 114624 <killinfo+0x1c4>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
1145ff: 8b 5d c8 mov -0x38(%ebp),%ebx
114602: 8b 5b 10 mov 0x10(%ebx),%ebx
114605: 89 5d c4 mov %ebx,-0x3c(%ebp)
114608: 85 db test %ebx,%ebx
11460a: 74 20 je 11462c <killinfo+0x1cc> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
11460c: 8b 5a 10 mov 0x10(%edx),%ebx
11460f: 85 db test %ebx,%ebx
114611: 74 11 je 114624 <killinfo+0x1c4>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
114613: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp)
11461a: 75 10 jne 11462c <killinfo+0x1cc>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
11461c: 81 e3 00 00 00 10 and $0x10000000,%ebx
114622: 74 08 je 11462c <killinfo+0x1cc>
114624: 89 4d d4 mov %ecx,-0x2c(%ebp)
114627: 89 55 c8 mov %edx,-0x38(%ebp)
11462a: 66 90 xchg %ax,%ax
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
11462c: 40 inc %eax
11462d: 39 c6 cmp %eax,%esi
11462f: 73 a7 jae 1145d8 <killinfo+0x178>
* + 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++) {
114631: ff 45 d0 incl -0x30(%ebp)
114634: 83 7d d0 05 cmpl $0x5,-0x30(%ebp)
114638: 0f 85 79 ff ff ff jne 1145b7 <killinfo+0x157>
11463e: 8b 5d cc mov -0x34(%ebp),%ebx
114641: 8b 75 c0 mov -0x40(%ebp),%esi
}
}
}
}
if ( interested ) {
114644: 8b 55 c8 mov -0x38(%ebp),%edx
114647: 85 d2 test %edx,%edx
114649: 0f 84 fe fe ff ff je 11454d <killinfo+0xed>
11464f: 8b 4d c8 mov -0x38(%ebp),%ecx
114652: e9 db fe ff ff jmp 114532 <killinfo+0xd2>
114657: 90 nop
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
114658: 83 ec 0c sub $0xc,%esp
11465b: 68 60 9b 12 00 push $0x129b60
114660: e8 ab 7f ff ff call 10c610 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
114665: 83 c4 10 add $0x10,%esp
114668: 85 c0 test %eax,%eax
11466a: 74 6a je 1146d6 <killinfo+0x276>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
11466c: 8d 78 08 lea 0x8(%eax),%edi
11466f: 8d 75 dc lea -0x24(%ebp),%esi
114672: b9 03 00 00 00 mov $0x3,%ecx
114677: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
114679: 83 ec 08 sub $0x8,%esp
11467c: 50 push %eax
11467d: 81 c3 00 9c 12 00 add $0x129c00,%ebx
114683: 53 push %ebx
114684: e8 4b 7f ff ff call 10c5d4 <_Chain_Append>
114689: 83 c4 10 add $0x10,%esp
11468c: e9 db fe ff ff jmp 11456c <killinfo+0x10c>
114691: 8d 76 00 lea 0x0(%esi),%esi
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
_Thread_Enable_dispatch();
114694: e8 d3 95 ff ff call 10dc6c <_Thread_Enable_dispatch>
114699: 31 c0 xor %eax,%eax
return 0;
11469b: e9 ee fe ff ff jmp 11458e <killinfo+0x12e>
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
1146a0: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
1146a7: e9 2f fe ff ff jmp 1144db <killinfo+0x7b>
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
1146ac: e8 53 0a 00 00 call 115104 <__errno> <== NOT EXECUTED
1146b1: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED
1146b7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1146bc: e9 cd fe ff ff jmp 11458e <killinfo+0x12e> <== NOT EXECUTED
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
1146c1: e8 3e 0a 00 00 call 115104 <__errno> <== NOT EXECUTED
1146c6: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
1146cc: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1146d1: e9 b8 fe ff ff jmp 11458e <killinfo+0x12e> <== NOT EXECUTED
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
1146d6: e8 91 95 ff ff call 10dc6c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
1146db: e8 24 0a 00 00 call 115104 <__errno>
1146e0: c7 00 0b 00 00 00 movl $0xb,(%eax)
1146e6: 83 c8 ff or $0xffffffff,%eax
1146e9: e9 a0 fe ff ff jmp 11458e <killinfo+0x12e>
0012084c <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
12084c: 55 push %ebp
12084d: 89 e5 mov %esp,%ebp
12084f: 53 push %ebx
120850: 83 ec 04 sub $0x4,%esp
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
120853: 83 3d c0 95 12 00 03 cmpl $0x3,0x1295c0
12085a: 74 08 je 120864 <libc_wrapup+0x18>
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
}
12085c: 8b 5d fc mov -0x4(%ebp),%ebx
12085f: c9 leave
120860: c3 ret
120861: 8d 76 00 lea 0x0(%esi),%esi
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
120864: 8b 1d 80 39 12 00 mov 0x123980,%ebx
12086a: 39 1d 40 71 12 00 cmp %ebx,0x127140
120870: 74 12 je 120884 <libc_wrapup+0x38>
_wrapup_reent(_global_impure_ptr);
120872: 83 ec 0c sub $0xc,%esp
120875: 53 push %ebx
120876: e8 f5 04 00 00 call 120d70 <_wrapup_reent>
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = _global_impure_ptr;
12087b: 89 1d 40 71 12 00 mov %ebx,0x127140
120881: 83 c4 10 add $0x10,%esp
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
120884: 83 ec 0c sub $0xc,%esp
120887: ff 73 04 pushl 0x4(%ebx)
12088a: e8 c1 49 ff ff call 115250 <fclose>
fclose (stdout);
12088f: 5a pop %edx
120890: a1 40 71 12 00 mov 0x127140,%eax
120895: ff 70 08 pushl 0x8(%eax)
120898: e8 b3 49 ff ff call 115250 <fclose>
fclose (stderr);
12089d: 58 pop %eax
12089e: a1 40 71 12 00 mov 0x127140,%eax
1208a3: ff 70 0c pushl 0xc(%eax)
1208a6: e8 a5 49 ff ff call 115250 <fclose>
1208ab: 83 c4 10 add $0x10,%esp
}
1208ae: 8b 5d fc mov -0x4(%ebp),%ebx
1208b1: c9 leave
1208b2: c3 ret
0012f150 <link>:
int link(
const char *existing,
const char *new
)
{
12f150: 55 push %ebp
12f151: 89 e5 mov %esp,%ebp
12f153: 57 push %edi
12f154: 56 push %esi
12f155: 53 push %ebx
12f156: 83 ec 48 sub $0x48,%esp
12f159: 8b 55 08 mov 0x8(%ebp),%edx
12f15c: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
12f15f: 31 c0 xor %eax,%eax
12f161: b9 ff ff ff ff mov $0xffffffff,%ecx
12f166: 89 d7 mov %edx,%edi
12f168: f2 ae repnz scas %es:(%edi),%al
12f16a: f7 d1 not %ecx
12f16c: 49 dec %ecx
12f16d: 6a 01 push $0x1
12f16f: 8d 75 cc lea -0x34(%ebp),%esi
12f172: 56 push %esi
12f173: 6a 00 push $0x0
12f175: 51 push %ecx
12f176: 52 push %edx
12f177: e8 7c f6 fd ff call 10e7f8 <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
12f17c: 83 c4 20 add $0x20,%esp
12f17f: 85 c0 test %eax,%eax
12f181: 74 11 je 12f194 <link+0x44>
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
12f183: bb ff ff ff ff mov $0xffffffff,%ebx
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
12f188: 89 d8 mov %ebx,%eax
12f18a: 8d 65 f4 lea -0xc(%ebp),%esp
12f18d: 5b pop %ebx
12f18e: 5e pop %esi
12f18f: 5f pop %edi
12f190: c9 leave
12f191: c3 ret
12f192: 66 90 xchg %ax,%ax
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
12f194: 57 push %edi
12f195: 8d 7d b8 lea -0x48(%ebp),%edi
12f198: 57 push %edi
12f199: 8d 45 e4 lea -0x1c(%ebp),%eax
12f19c: 50 push %eax
12f19d: 53 push %ebx
12f19e: e8 c5 0d fe ff call 10ff68 <rtems_filesystem_get_start_loc>
if ( !parent_loc.ops->evalformake_h ) {
12f1a3: 8b 45 c4 mov -0x3c(%ebp),%eax
12f1a6: 8b 40 04 mov 0x4(%eax),%eax
12f1a9: 83 c4 10 add $0x10,%esp
12f1ac: 85 c0 test %eax,%eax
12f1ae: 0f 84 e8 00 00 00 je 12f29c <link+0x14c> <== NEVER TAKEN
rtems_filesystem_freenode( &existing_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
12f1b4: 51 push %ecx
12f1b5: 8d 55 e0 lea -0x20(%ebp),%edx
12f1b8: 52 push %edx
12f1b9: 57 push %edi
12f1ba: 03 5d e4 add -0x1c(%ebp),%ebx
12f1bd: 53 push %ebx
12f1be: ff d0 call *%eax
12f1c0: 89 c3 mov %eax,%ebx
if ( result != 0 ) {
12f1c2: 83 c4 10 add $0x10,%esp
12f1c5: 85 c0 test %eax,%eax
12f1c7: 0f 85 a7 00 00 00 jne 12f274 <link+0x124>
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
12f1cd: 8b 45 c8 mov -0x38(%ebp),%eax
12f1d0: 3b 45 dc cmp -0x24(%ebp),%eax
12f1d3: 75 5b jne 12f230 <link+0xe0>
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
12f1d5: 8b 55 c4 mov -0x3c(%ebp),%edx
12f1d8: 8b 42 08 mov 0x8(%edx),%eax
12f1db: 85 c0 test %eax,%eax
12f1dd: 0f 84 e0 00 00 00 je 12f2c3 <link+0x173> <== NEVER TAKEN
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
12f1e3: 52 push %edx
12f1e4: ff 75 e0 pushl -0x20(%ebp)
12f1e7: 57 push %edi
12f1e8: 56 push %esi
12f1e9: ff d0 call *%eax
12f1eb: 89 c3 mov %eax,%ebx
rtems_filesystem_freenode( &existing_loc );
12f1ed: 8b 45 d8 mov -0x28(%ebp),%eax
12f1f0: 83 c4 10 add $0x10,%esp
12f1f3: 85 c0 test %eax,%eax
12f1f5: 74 10 je 12f207 <link+0xb7> <== NEVER TAKEN
12f1f7: 8b 40 1c mov 0x1c(%eax),%eax
12f1fa: 85 c0 test %eax,%eax
12f1fc: 74 09 je 12f207 <link+0xb7> <== NEVER TAKEN
12f1fe: 83 ec 0c sub $0xc,%esp
12f201: 56 push %esi
12f202: ff d0 call *%eax
12f204: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &parent_loc );
12f207: 8b 45 c4 mov -0x3c(%ebp),%eax
12f20a: 85 c0 test %eax,%eax
12f20c: 0f 84 76 ff ff ff je 12f188 <link+0x38> <== NEVER TAKEN
12f212: 8b 40 1c mov 0x1c(%eax),%eax
12f215: 85 c0 test %eax,%eax
12f217: 0f 84 6b ff ff ff je 12f188 <link+0x38> <== NEVER TAKEN
12f21d: 83 ec 0c sub $0xc,%esp
12f220: 57 push %edi
12f221: ff d0 call *%eax
12f223: 83 c4 10 add $0x10,%esp
return result;
}
12f226: 89 d8 mov %ebx,%eax
12f228: 8d 65 f4 lea -0xc(%ebp),%esp
12f22b: 5b pop %ebx
12f22c: 5e pop %esi
12f22d: 5f pop %edi
12f22e: c9 leave
12f22f: c3 ret
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
rtems_filesystem_freenode( &existing_loc );
12f230: 8b 45 d8 mov -0x28(%ebp),%eax
12f233: 85 c0 test %eax,%eax
12f235: 74 10 je 12f247 <link+0xf7> <== NEVER TAKEN
12f237: 8b 40 1c mov 0x1c(%eax),%eax
12f23a: 85 c0 test %eax,%eax
12f23c: 74 09 je 12f247 <link+0xf7> <== NEVER TAKEN
12f23e: 83 ec 0c sub $0xc,%esp
12f241: 56 push %esi
12f242: ff d0 call *%eax
12f244: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &parent_loc );
12f247: 8b 45 c4 mov -0x3c(%ebp),%eax
12f24a: 85 c0 test %eax,%eax
12f24c: 74 10 je 12f25e <link+0x10e> <== NEVER TAKEN
12f24e: 8b 40 1c mov 0x1c(%eax),%eax
12f251: 85 c0 test %eax,%eax
12f253: 74 09 je 12f25e <link+0x10e> <== NEVER TAKEN
12f255: 83 ec 0c sub $0xc,%esp
12f258: 57 push %edi
12f259: ff d0 call *%eax
12f25b: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EXDEV );
12f25e: e8 1d 89 01 00 call 147b80 <__errno>
12f263: c7 00 12 00 00 00 movl $0x12,(%eax)
12f269: bb ff ff ff ff mov $0xffffffff,%ebx
12f26e: e9 15 ff ff ff jmp 12f188 <link+0x38>
12f273: 90 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
12f274: 8b 45 d8 mov -0x28(%ebp),%eax
12f277: 85 c0 test %eax,%eax
12f279: 74 10 je 12f28b <link+0x13b> <== NEVER TAKEN
12f27b: 8b 40 1c mov 0x1c(%eax),%eax
12f27e: 85 c0 test %eax,%eax
12f280: 74 09 je 12f28b <link+0x13b> <== NEVER TAKEN
12f282: 83 ec 0c sub $0xc,%esp
12f285: 56 push %esi
12f286: ff d0 call *%eax
12f288: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( result );
12f28b: e8 f0 88 01 00 call 147b80 <__errno>
12f290: 89 18 mov %ebx,(%eax)
12f292: bb ff ff ff ff mov $0xffffffff,%ebx
12f297: e9 ec fe ff ff jmp 12f188 <link+0x38>
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
12f29c: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED
12f29f: 85 c0 test %eax,%eax <== NOT EXECUTED
12f2a1: 74 10 je 12f2b3 <link+0x163> <== NOT EXECUTED
12f2a3: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
12f2a6: 85 c0 test %eax,%eax <== NOT EXECUTED
12f2a8: 74 09 je 12f2b3 <link+0x163> <== NOT EXECUTED
12f2aa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12f2ad: 56 push %esi <== NOT EXECUTED
12f2ae: ff d0 call *%eax <== NOT EXECUTED
12f2b0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
12f2b3: e8 c8 88 01 00 call 147b80 <__errno> <== NOT EXECUTED
12f2b8: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
12f2be: e9 c0 fe ff ff jmp 12f183 <link+0x33> <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
12f2c3: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED
12f2c6: 85 c0 test %eax,%eax <== NOT EXECUTED
12f2c8: 74 13 je 12f2dd <link+0x18d> <== NOT EXECUTED
12f2ca: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
12f2cd: 85 c0 test %eax,%eax <== NOT EXECUTED
12f2cf: 74 0c je 12f2dd <link+0x18d> <== NOT EXECUTED
12f2d1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12f2d4: 56 push %esi <== NOT EXECUTED
12f2d5: ff d0 call *%eax <== NOT EXECUTED
12f2d7: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
12f2da: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
12f2dd: 85 d2 test %edx,%edx <== NOT EXECUTED
12f2df: 74 10 je 12f2f1 <link+0x1a1> <== NOT EXECUTED
12f2e1: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
12f2e4: 85 c0 test %eax,%eax <== NOT EXECUTED
12f2e6: 74 09 je 12f2f1 <link+0x1a1> <== NOT EXECUTED
12f2e8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12f2eb: 57 push %edi <== NOT EXECUTED
12f2ec: ff d0 call *%eax <== NOT EXECUTED
12f2ee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
12f2f1: e8 8a 88 01 00 call 147b80 <__errno> <== NOT EXECUTED
12f2f6: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
12f2fc: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
12f301: e9 82 fe ff ff jmp 12f188 <link+0x38> <== NOT EXECUTED
00120704 <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
120704: 55 push %ebp
120705: 89 e5 mov %esp,%ebp
120707: 57 push %edi
120708: 56 push %esi
120709: 53 push %ebx
12070a: 83 ec 2c sub $0x2c,%esp
12070d: 8b 5d 08 mov 0x8(%ebp),%ebx
120710: 8b 75 0c mov 0xc(%ebp),%esi
120713: 8b 7d 10 mov 0x10(%ebp),%edi
120716: 8b 45 14 mov 0x14(%ebp),%eax
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
120719: 3b 1d 4c 51 12 00 cmp 0x12514c,%ebx
12071f: 0f 83 b7 00 00 00 jae 1207dc <lseek+0xd8> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
120725: c1 e3 06 shl $0x6,%ebx
120728: 03 1d 80 92 12 00 add 0x129280,%ebx
rtems_libio_check_is_open(iop);
12072e: f6 43 15 01 testb $0x1,0x15(%ebx)
120732: 0f 84 a4 00 00 00 je 1207dc <lseek+0xd8> <== NEVER TAKEN
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
120738: 8b 53 3c mov 0x3c(%ebx),%edx
12073b: 89 55 d4 mov %edx,-0x2c(%ebp)
12073e: 8b 52 14 mov 0x14(%edx),%edx
120741: 85 d2 test %edx,%edx
120743: 0f 84 aa 00 00 00 je 1207f3 <lseek+0xef> <== NEVER TAKEN
/*
* Now process the lseek().
*/
old_offset = iop->offset;
120749: 8b 53 0c mov 0xc(%ebx),%edx
12074c: 8b 4b 10 mov 0x10(%ebx),%ecx
12074f: 89 55 e0 mov %edx,-0x20(%ebp)
120752: 89 4d e4 mov %ecx,-0x1c(%ebp)
switch ( whence ) {
120755: 83 f8 01 cmp $0x1,%eax
120758: 74 6e je 1207c8 <lseek+0xc4>
12075a: 83 f8 02 cmp $0x2,%eax
12075d: 74 35 je 120794 <lseek+0x90>
12075f: 85 c0 test %eax,%eax
120761: 75 45 jne 1207a8 <lseek+0xa4>
case SEEK_SET:
iop->offset = offset;
120763: 89 73 0c mov %esi,0xc(%ebx)
120766: 89 7b 10 mov %edi,0x10(%ebx)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
120769: 50 push %eax
12076a: 57 push %edi
12076b: 56 push %esi
12076c: 53 push %ebx
12076d: 8b 4d d4 mov -0x2c(%ebp),%ecx
120770: ff 51 14 call *0x14(%ecx)
if ( status == (off_t) -1 )
120773: 83 c4 10 add $0x10,%esp
120776: 89 c1 mov %eax,%ecx
120778: 21 d1 and %edx,%ecx
12077a: 41 inc %ecx
12077b: 75 0c jne 120789 <lseek+0x85>
iop->offset = old_offset;
12077d: 8b 75 e0 mov -0x20(%ebp),%esi
120780: 8b 7d e4 mov -0x1c(%ebp),%edi
120783: 89 73 0c mov %esi,0xc(%ebx)
120786: 89 7b 10 mov %edi,0x10(%ebx)
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
120789: 8d 65 f4 lea -0xc(%ebp),%esp
12078c: 5b pop %ebx
12078d: 5e pop %esi
12078e: 5f pop %edi
12078f: c9 leave
120790: c3 ret
120791: 8d 76 00 lea 0x0(%esi),%esi
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
120794: 89 f2 mov %esi,%edx
120796: 89 f9 mov %edi,%ecx
120798: 03 53 04 add 0x4(%ebx),%edx
12079b: 13 4b 08 adc 0x8(%ebx),%ecx
12079e: 89 53 0c mov %edx,0xc(%ebx)
1207a1: 89 4b 10 mov %ecx,0x10(%ebx)
break;
1207a4: eb c3 jmp 120769 <lseek+0x65>
1207a6: 66 90 xchg %ax,%ax
default:
rtems_set_errno_and_return_minus_one( EINVAL );
1207a8: e8 57 49 ff ff call 115104 <__errno>
1207ad: c7 00 16 00 00 00 movl $0x16,(%eax)
1207b3: b8 ff ff ff ff mov $0xffffffff,%eax
1207b8: ba ff ff ff ff mov $0xffffffff,%edx
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
1207bd: 8d 65 f4 lea -0xc(%ebp),%esp
1207c0: 5b pop %ebx
1207c1: 5e pop %esi
1207c2: 5f pop %edi
1207c3: c9 leave
1207c4: c3 ret
1207c5: 8d 76 00 lea 0x0(%esi),%esi
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
1207c8: 8b 55 e0 mov -0x20(%ebp),%edx
1207cb: 8b 4d e4 mov -0x1c(%ebp),%ecx
1207ce: 01 f2 add %esi,%edx
1207d0: 11 f9 adc %edi,%ecx
1207d2: 89 53 0c mov %edx,0xc(%ebx)
1207d5: 89 4b 10 mov %ecx,0x10(%ebx)
break;
1207d8: eb 8f jmp 120769 <lseek+0x65>
1207da: 66 90 xchg %ax,%ax
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
1207dc: e8 23 49 ff ff call 115104 <__errno> <== NOT EXECUTED
1207e1: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
1207e7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1207ec: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
1207f1: eb 96 jmp 120789 <lseek+0x85> <== NOT EXECUTED
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
1207f3: e8 0c 49 ff ff call 115104 <__errno> <== NOT EXECUTED
1207f8: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
1207fe: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
120803: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
120808: e9 7c ff ff ff jmp 120789 <lseek+0x85> <== NOT EXECUTED
0012f454 <lstat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
12f454: 55 push %ebp <== NOT EXECUTED
12f455: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12f457: 57 push %edi <== NOT EXECUTED
12f458: 56 push %esi <== NOT EXECUTED
12f459: 53 push %ebx <== NOT EXECUTED
12f45a: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
12f45d: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
12f460: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
12f463: 85 f6 test %esi,%esi <== NOT EXECUTED
12f465: 0f 84 9d 00 00 00 je 12f508 <lstat+0xb4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
12f46b: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
12f470: 89 d7 mov %edx,%edi <== NOT EXECUTED
12f472: 31 c0 xor %eax,%eax <== NOT EXECUTED
12f474: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
12f476: f7 d1 not %ecx <== NOT EXECUTED
12f478: 49 dec %ecx <== NOT EXECUTED
12f479: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12f47c: 6a 00 push $0x0 <== NOT EXECUTED
12f47e: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED
12f481: 53 push %ebx <== NOT EXECUTED
12f482: 6a 00 push $0x0 <== NOT EXECUTED
12f484: 51 push %ecx <== NOT EXECUTED
12f485: 52 push %edx <== NOT EXECUTED
12f486: e8 6d f3 fd ff call 10e7f8 <rtems_filesystem_evaluate_path><== NOT EXECUTED
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
12f48b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12f48e: 85 c0 test %eax,%eax <== NOT EXECUTED
12f490: 75 66 jne 12f4f8 <lstat+0xa4> <== NOT EXECUTED
return -1;
if ( !loc.handlers->fstat_h ){
12f492: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
12f495: 8b 42 18 mov 0x18(%edx),%eax <== NOT EXECUTED
12f498: 85 c0 test %eax,%eax <== NOT EXECUTED
12f49a: 74 39 je 12f4d5 <lstat+0x81> <== NOT EXECUTED
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
12f49c: b9 48 00 00 00 mov $0x48,%ecx <== NOT EXECUTED
12f4a1: 89 f7 mov %esi,%edi <== NOT EXECUTED
12f4a3: 31 c0 xor %eax,%eax <== NOT EXECUTED
12f4a5: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
12f4a7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12f4aa: 56 push %esi <== NOT EXECUTED
12f4ab: 53 push %ebx <== NOT EXECUTED
12f4ac: ff 52 18 call *0x18(%edx) <== NOT EXECUTED
12f4af: 89 c6 mov %eax,%esi <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
12f4b1: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
12f4b4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12f4b7: 85 c0 test %eax,%eax <== NOT EXECUTED
12f4b9: 74 10 je 12f4cb <lstat+0x77> <== NOT EXECUTED
12f4bb: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
12f4be: 85 c0 test %eax,%eax <== NOT EXECUTED
12f4c0: 74 09 je 12f4cb <lstat+0x77> <== NOT EXECUTED
12f4c2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12f4c5: 53 push %ebx <== NOT EXECUTED
12f4c6: ff d0 call *%eax <== NOT EXECUTED
12f4c8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return status;
}
12f4cb: 89 f0 mov %esi,%eax <== NOT EXECUTED
12f4cd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12f4d0: 5b pop %ebx <== NOT EXECUTED
12f4d1: 5e pop %esi <== NOT EXECUTED
12f4d2: 5f pop %edi <== NOT EXECUTED
12f4d3: c9 leave <== NOT EXECUTED
12f4d4: c3 ret <== NOT EXECUTED
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
12f4d5: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
12f4d8: 85 c0 test %eax,%eax <== NOT EXECUTED
12f4da: 74 10 je 12f4ec <lstat+0x98> <== NOT EXECUTED
12f4dc: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
12f4df: 85 c0 test %eax,%eax <== NOT EXECUTED
12f4e1: 74 09 je 12f4ec <lstat+0x98> <== NOT EXECUTED
12f4e3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12f4e6: 53 push %ebx <== NOT EXECUTED
12f4e7: ff d0 call *%eax <== NOT EXECUTED
12f4e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
12f4ec: e8 8f 86 01 00 call 147b80 <__errno> <== NOT EXECUTED
12f4f1: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
12f4f7: 90 nop <== NOT EXECUTED
12f4f8: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
12f4fd: 89 f0 mov %esi,%eax <== NOT EXECUTED
12f4ff: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12f502: 5b pop %ebx <== NOT EXECUTED
12f503: 5e pop %esi <== NOT EXECUTED
12f504: 5f pop %edi <== NOT EXECUTED
12f505: c9 leave <== NOT EXECUTED
12f506: c3 ret <== NOT EXECUTED
12f507: 90 nop <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
12f508: e8 73 86 01 00 call 147b80 <__errno> <== NOT EXECUTED
12f50d: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
12f513: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
12f518: 89 f0 mov %esi,%eax <== NOT EXECUTED
12f51a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12f51d: 5b pop %ebx <== NOT EXECUTED
12f51e: 5e pop %esi <== NOT EXECUTED
12f51f: 5f pop %edi <== NOT EXECUTED
12f520: c9 leave <== NOT EXECUTED
12f521: c3 ret <== NOT EXECUTED
001088bc <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
1088bc: 55 push %ebp
1088bd: 89 e5 mov %esp,%ebp
1088bf: 57 push %edi
1088c0: 56 push %esi
1088c1: 53 push %ebx
1088c2: 83 ec 0c sub $0xc,%esp
1088c5: 8b 75 08 mov 0x8(%ebp),%esi
1088c8: ff 05 a4 92 12 00 incl 0x1292a4
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
1088ce: e8 11 ff ff ff call 1087e4 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
1088d3: 85 f6 test %esi,%esi
1088d5: 74 65 je 10893c <malloc+0x80> <== 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()) &&
1088d7: 83 3d c0 95 12 00 03 cmpl $0x3,0x1295c0
1088de: 74 50 je 108930 <malloc+0x74>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
1088e0: 6a 00 push $0x0
1088e2: 6a 00 push $0x0
1088e4: 56 push %esi
1088e5: ff 35 58 51 12 00 pushl 0x125158
1088eb: e8 d0 4d 00 00 call 10d6c0 <_Protected_heap_Allocate_aligned_with_boundary>
1088f0: 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 ) {
1088f2: 83 c4 10 add $0x10,%esp
1088f5: 85 c0 test %eax,%eax
1088f7: 74 5b je 108954 <malloc+0x98>
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
return (void *) 0;
1088f9: 89 c7 mov %eax,%edi
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
1088fb: a1 50 76 12 00 mov 0x127650,%eax
108900: 85 c0 test %eax,%eax
108902: 74 0a je 10890e <malloc+0x52> <== ALWAYS TAKEN
(*rtems_malloc_dirty_helper)( return_this, size );
108904: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
108907: 56 push %esi <== NOT EXECUTED
108908: 57 push %edi <== NOT EXECUTED
108909: ff d0 call *%eax <== NOT EXECUTED
10890b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
10890e: a1 48 76 12 00 mov 0x127648,%eax
108913: 85 c0 test %eax,%eax
108915: 74 31 je 108948 <malloc+0x8c>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
108917: 83 ec 0c sub $0xc,%esp
10891a: 57 push %edi
10891b: ff 50 04 call *0x4(%eax)
10891e: 89 fb mov %edi,%ebx
108920: 83 c4 10 add $0x10,%esp
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
108923: 89 d8 mov %ebx,%eax
108925: 8d 65 f4 lea -0xc(%ebp),%esp
108928: 5b pop %ebx
108929: 5e pop %esi
10892a: 5f pop %edi
10892b: c9 leave
10892c: c3 ret
10892d: 8d 76 00 lea 0x0(%esi),%esi
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
108930: e8 57 fe ff ff call 10878c <malloc_is_system_state_OK>
108935: 84 c0 test %al,%al
108937: 75 a7 jne 1088e0 <malloc+0x24> <== ALWAYS TAKEN
108939: 8d 76 00 lea 0x0(%esi),%esi
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
10893c: 31 db xor %ebx,%ebx
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
10893e: 89 d8 mov %ebx,%eax <== NOT EXECUTED
108940: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108943: 5b pop %ebx <== NOT EXECUTED
108944: 5e pop %esi <== NOT EXECUTED
108945: 5f pop %edi <== NOT EXECUTED
108946: c9 leave <== NOT EXECUTED
108947: c3 ret <== NOT EXECUTED
(*rtems_malloc_dirty_helper)( return_this, size );
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
108948: 89 fb mov %edi,%ebx
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
10894a: 89 d8 mov %ebx,%eax
10894c: 8d 65 f4 lea -0xc(%ebp),%esp
10894f: 5b pop %ebx
108950: 5e pop %esi
108951: 5f pop %edi
108952: c9 leave
108953: c3 ret
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
108954: a1 4c 76 12 00 mov 0x12764c,%eax
108959: 85 c0 test %eax,%eax
10895b: 74 10 je 10896d <malloc+0xb1> <== ALWAYS TAKEN
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
10895d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108960: 56 push %esi <== NOT EXECUTED
108961: ff 50 04 call *0x4(%eax) <== NOT EXECUTED
108964: 89 c7 mov %eax,%edi <== NOT EXECUTED
if ( !return_this ) {
108966: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108969: 85 c0 test %eax,%eax <== NOT EXECUTED
10896b: 75 8e jne 1088fb <malloc+0x3f> <== NOT EXECUTED
errno = ENOMEM;
10896d: e8 92 c7 00 00 call 115104 <__errno>
108972: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
108978: eb a9 jmp 108923 <malloc+0x67>
001087cc <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
1087cc: 55 push %ebp <== NOT EXECUTED
1087cd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1087cf: 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 );
1087d2: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
1087d5: 68 8c 92 12 00 push $0x12928c <== NOT EXECUTED
1087da: e8 f5 3d 00 00 call 10c5d4 <_Chain_Append> <== NOT EXECUTED
1087df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer);
}
1087e2: c9 leave <== NOT EXECUTED
1087e3: c3 ret <== NOT EXECUTED
001087e4 <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
1087e4: 55 push %ebp
1087e5: 89 e5 mov %esp,%ebp
1087e7: 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)
1087ea: eb 0c jmp 1087f8 <malloc_deferred_frees_process+0x14>
free(to_be_freed);
1087ec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1087ef: 50 push %eax <== NOT EXECUTED
1087f0: e8 ef fd ff ff call 1085e4 <free> <== NOT EXECUTED
1087f5: 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 );
1087f8: 83 ec 0c sub $0xc,%esp
1087fb: 68 8c 92 12 00 push $0x12928c
108800: e8 0b 3e 00 00 call 10c610 <_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)
108805: 83 c4 10 add $0x10,%esp
108808: 85 c0 test %eax,%eax
10880a: 75 e0 jne 1087ec <malloc_deferred_frees_process+0x8><== NEVER TAKEN
free(to_be_freed);
}
10880c: c9 leave
10880d: c3 ret
0010878c <malloc_is_system_state_OK>:
#include "malloc_p.h"
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
{
10878c: 55 push %ebp
10878d: 89 e5 mov %esp,%ebp
if ( _Thread_Dispatch_disable_level > 0 )
10878f: a1 f8 93 12 00 mov 0x1293f8,%eax
108794: 85 c0 test %eax,%eax
108796: 75 0c jne 1087a4 <malloc_is_system_state_OK+0x18><== NEVER TAKEN
return false;
if ( _ISR_Nest_level > 0 )
108798: a1 94 94 12 00 mov 0x129494,%eax
#include "malloc_p.h"
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
10879d: 85 c0 test %eax,%eax
10879f: 0f 94 c0 sete %al
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
1087a2: c9 leave
1087a3: c3 ret
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
{
if ( _Thread_Dispatch_disable_level > 0 )
1087a4: 31 c0 xor %eax,%eax
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
1087a6: c9 leave <== NOT EXECUTED
1087a7: c3 ret <== NOT EXECUTED
00112b00 <memfile_alloc_block>:
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
112b00: 55 push %ebp
112b01: 89 e5 mov %esp,%ebp
112b03: 83 ec 10 sub $0x10,%esp
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
112b06: ff 35 38 8f 12 00 pushl 0x128f38
112b0c: 6a 01 push $0x1
112b0e: e8 b9 58 ff ff call 1083cc <calloc>
if ( memory )
112b13: 83 c4 10 add $0x10,%esp
112b16: 85 c0 test %eax,%eax
112b18: 74 06 je 112b20 <memfile_alloc_block+0x20><== NEVER TAKEN
memfile_blocks_allocated++;
112b1a: ff 05 4c 90 12 00 incl 0x12904c
return memory;
}
112b20: c9 leave
112b21: c3 ret
00112f74 <memfile_check_rmnod>:
return memfile_check_rmnod( the_jnode );
}
int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){
112f74: 55 push %ebp
112f75: 89 e5 mov %esp,%ebp
112f77: 53 push %ebx
112f78: 83 ec 10 sub $0x10,%esp
112f7b: 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) ) {
112f7e: 53 push %ebx
112f7f: e8 08 df ff ff call 110e8c <rtems_libio_is_file_open>
112f84: 83 c4 10 add $0x10,%esp
112f87: 85 c0 test %eax,%eax
112f89: 75 2f jne 112fba <memfile_check_rmnod+0x46>
112f8b: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx)
112f90: 75 28 jne 112fba <memfile_check_rmnod+0x46><== NEVER TAKEN
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
112f92: a1 24 70 12 00 mov 0x127024,%eax
112f97: 39 58 04 cmp %ebx,0x4(%eax)
112f9a: 74 28 je 112fc4 <memfile_check_rmnod+0x50><== NEVER TAKEN
rtems_filesystem_current.node_access = NULL;
/*
* Free memory associated with a memory file.
*/
if (the_jnode->type != IMFS_LINEAR_FILE)
112f9c: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx)
112fa0: 74 0c je 112fae <memfile_check_rmnod+0x3a><== NEVER TAKEN
IMFS_memfile_remove( the_jnode );
112fa2: 83 ec 0c sub $0xc,%esp
112fa5: 53 push %ebx
112fa6: e8 21 fe ff ff call 112dcc <IMFS_memfile_remove>
112fab: 83 c4 10 add $0x10,%esp
free( the_jnode );
112fae: 83 ec 0c sub $0xc,%esp
112fb1: 53 push %ebx
112fb2: e8 2d 56 ff ff call 1085e4 <free>
112fb7: 83 c4 10 add $0x10,%esp
}
return 0;
}
112fba: 31 c0 xor %eax,%eax
112fbc: 8b 5d fc mov -0x4(%ebp),%ebx
112fbf: c9 leave
112fc0: c3 ret
112fc1: 8d 76 00 lea 0x0(%esi),%esi
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
rtems_filesystem_current.node_access = NULL;
112fc4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED
112fcb: eb cf jmp 112f9c <memfile_check_rmnod+0x28><== NOT EXECUTED
00112d04 <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
112d04: 55 push %ebp
112d05: 89 e5 mov %esp,%ebp
112d07: 57 push %edi
112d08: 56 push %esi
112d09: 53 push %ebx
112d0a: 83 ec 0c sub $0xc,%esp
112d0d: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* Perform internal consistency checks
*/
assert( block_table );
112d10: 8b 45 08 mov 0x8(%ebp),%eax
112d13: 85 c0 test %eax,%eax
112d15: 74 4e je 112d65 <memfile_free_blocks_in_table+0x61><== NEVER TAKEN
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
112d17: 8b 45 08 mov 0x8(%ebp),%eax
112d1a: 8b 30 mov (%eax),%esi
for ( i=0 ; i<entries ; i++ ) {
112d1c: 85 ff test %edi,%edi
112d1e: 7e 28 jle 112d48 <memfile_free_blocks_in_table+0x44><== NEVER TAKEN
112d20: 31 db xor %ebx,%ebx
112d22: 66 90 xchg %ax,%ax
if ( b[i] ) {
112d24: 8b 04 9e mov (%esi,%ebx,4),%eax
112d27: 85 c0 test %eax,%eax
112d29: 74 13 je 112d3e <memfile_free_blocks_in_table+0x3a>
memfile_free_block( b[i] );
112d2b: 83 ec 0c sub $0xc,%esp
112d2e: 50 push %eax
112d2f: e8 b0 fd ff ff call 112ae4 <memfile_free_block>
b[i] = 0;
112d34: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4)
112d3b: 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++ ) {
112d3e: 43 inc %ebx
112d3f: 39 df cmp %ebx,%edi
112d41: 7f e1 jg 112d24 <memfile_free_blocks_in_table+0x20>
112d43: 8b 45 08 mov 0x8(%ebp),%eax
112d46: 8b 30 mov (%eax),%esi
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
112d48: 83 ec 0c sub $0xc,%esp
112d4b: 56 push %esi
112d4c: e8 93 fd ff ff call 112ae4 <memfile_free_block>
*block_table = 0;
112d51: 8b 45 08 mov 0x8(%ebp),%eax
112d54: c7 00 00 00 00 00 movl $0x0,(%eax)
112d5a: 83 c4 10 add $0x10,%esp
}
112d5d: 8d 65 f4 lea -0xc(%ebp),%esp
112d60: 5b pop %ebx
112d61: 5e pop %esi
112d62: 5f pop %edi
112d63: c9 leave
112d64: c3 ret
/*
* Perform internal consistency checks
*/
assert( block_table );
112d65: 68 16 34 12 00 push $0x123416 <== NOT EXECUTED
112d6a: 68 50 35 12 00 push $0x123550 <== NOT EXECUTED
112d6f: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED
112d74: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED
112d79: e8 26 55 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED
00113228 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
113228: 55 push %ebp
113229: 89 e5 mov %esp,%ebp
11322b: 53 push %ebx
11322c: 83 ec 14 sub $0x14,%esp
11322f: 8b 4d 08 mov 0x8(%ebp),%ecx
113232: 8b 45 0c mov 0xc(%ebp),%eax
113235: 8b 55 10 mov 0x10(%ebp),%edx
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
113238: 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 )
11323b: 39 53 54 cmp %edx,0x54(%ebx)
11323e: 7f 19 jg 113259 <memfile_ftruncate+0x31><== NEVER TAKEN
113240: 7d 12 jge 113254 <memfile_ftruncate+0x2c><== ALWAYS TAKEN
return IMFS_memfile_extend( the_jnode, length );
113242: 51 push %ecx <== NOT EXECUTED
113243: 52 push %edx <== NOT EXECUTED
113244: 50 push %eax <== NOT EXECUTED
113245: 53 push %ebx <== NOT EXECUTED
113246: e8 79 fe ff ff call 1130c4 <IMFS_memfile_extend> <== NOT EXECUTED
11324b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
return 0;
}
11324e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
113251: c9 leave <== NOT EXECUTED
113252: c3 ret <== NOT EXECUTED
113253: 90 nop <== NOT EXECUTED
* 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 )
113254: 39 43 50 cmp %eax,0x50(%ebx)
113257: 72 e9 jb 113242 <memfile_ftruncate+0x1a><== NEVER TAKEN
* 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;
113259: 89 43 50 mov %eax,0x50(%ebx)
11325c: 89 53 54 mov %edx,0x54(%ebx)
iop->size = the_jnode->info.file.size;
11325f: 89 41 04 mov %eax,0x4(%ecx)
113262: 89 51 08 mov %edx,0x8(%ecx)
IMFS_update_atime( the_jnode );
113265: 83 ec 08 sub $0x8,%esp
113268: 6a 00 push $0x0
11326a: 8d 45 f0 lea -0x10(%ebp),%eax
11326d: 50 push %eax
11326e: e8 ed 53 ff ff call 108660 <gettimeofday>
113273: 8b 45 f0 mov -0x10(%ebp),%eax
113276: 89 43 40 mov %eax,0x40(%ebx)
113279: 31 c0 xor %eax,%eax
return 0;
11327b: 83 c4 10 add $0x10,%esp
}
11327e: 8b 5d fc mov -0x4(%ebp),%ebx
113281: c9 leave
113282: c3 ret
00113284 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
113284: 55 push %ebp
113285: 89 e5 mov %esp,%ebp
113287: 57 push %edi
113288: 56 push %esi
113289: 53 push %ebx
11328a: 83 ec 0c sub $0xc,%esp
11328d: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
113290: 8b 73 38 mov 0x38(%ebx),%esi
if (the_jnode->type == IMFS_LINEAR_FILE) {
113293: 83 7e 4c 06 cmpl $0x6,0x4c(%esi)
113297: 74 2f je 1132c8 <memfile_lseek+0x44> <== NEVER TAKEN
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
113299: 57 push %edi
11329a: ff 73 10 pushl 0x10(%ebx)
11329d: ff 73 0c pushl 0xc(%ebx)
1132a0: 56 push %esi
1132a1: e8 1e fe ff ff call 1130c4 <IMFS_memfile_extend>
1132a6: 83 c4 10 add $0x10,%esp
1132a9: 85 c0 test %eax,%eax
1132ab: 75 4d jne 1132fa <memfile_lseek+0x76> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
1132ad: 8b 46 50 mov 0x50(%esi),%eax
1132b0: 8b 56 54 mov 0x54(%esi),%edx
1132b3: 89 43 04 mov %eax,0x4(%ebx)
1132b6: 89 53 08 mov %edx,0x8(%ebx)
1132b9: 8b 43 0c mov 0xc(%ebx),%eax
1132bc: 8b 53 10 mov 0x10(%ebx),%edx
}
return iop->offset;
}
1132bf: 8d 65 f4 lea -0xc(%ebp),%esp
1132c2: 5b pop %ebx
1132c3: 5e pop %esi
1132c4: 5f pop %edi
1132c5: c9 leave
1132c6: c3 ret
1132c7: 90 nop
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
1132c8: 8b 7b 0c mov 0xc(%ebx),%edi <== NOT EXECUTED
1132cb: 8b 4b 10 mov 0x10(%ebx),%ecx <== NOT EXECUTED
1132ce: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED
1132d1: 8b 56 54 mov 0x54(%esi),%edx <== NOT EXECUTED
1132d4: 39 d1 cmp %edx,%ecx <== NOT EXECUTED
1132d6: 7f 14 jg 1132ec <memfile_lseek+0x68> <== NOT EXECUTED
1132d8: 7d 0e jge 1132e8 <memfile_lseek+0x64> <== NOT EXECUTED
1132da: 89 f8 mov %edi,%eax <== NOT EXECUTED
1132dc: 89 ca mov %ecx,%edx <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
1132de: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1132e1: 5b pop %ebx <== NOT EXECUTED
1132e2: 5e pop %esi <== NOT EXECUTED
1132e3: 5f pop %edi <== NOT EXECUTED
1132e4: c9 leave <== NOT EXECUTED
1132e5: c3 ret <== NOT EXECUTED
1132e6: 66 90 xchg %ax,%ax <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
1132e8: 39 c7 cmp %eax,%edi <== NOT EXECUTED
1132ea: 76 ee jbe 1132da <memfile_lseek+0x56> <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
1132ec: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
1132ef: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
1132f2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1132f5: 5b pop %ebx <== NOT EXECUTED
1132f6: 5e pop %esi <== NOT EXECUTED
1132f7: 5f pop %edi <== NOT EXECUTED
1132f8: c9 leave <== NOT EXECUTED
1132f9: c3 ret <== NOT EXECUTED
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
1132fa: e8 05 1e 00 00 call 115104 <__errno> <== NOT EXECUTED
1132ff: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
113305: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
11330a: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
11330f: eb ae jmp 1132bf <memfile_lseek+0x3b> <== NOT EXECUTED
001135a0 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
1135a0: 55 push %ebp
1135a1: 89 e5 mov %esp,%ebp
1135a3: 56 push %esi
1135a4: 53 push %ebx
1135a5: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
1135a8: 8b 73 38 mov 0x38(%ebx),%esi
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
1135ab: 8b 43 14 mov 0x14(%ebx),%eax
1135ae: a9 04 02 00 00 test $0x204,%eax
1135b3: 74 06 je 1135bb <memfile_open+0x1b>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
1135b5: 83 7e 4c 06 cmpl $0x6,0x4c(%esi)
1135b9: 74 2d je 1135e8 <memfile_open+0x48> <== NEVER TAKEN
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)
1135bb: 8b 56 50 mov 0x50(%esi),%edx
1135be: 8b 4e 54 mov 0x54(%esi),%ecx
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
1135c1: f6 c4 02 test $0x2,%ah
1135c4: 75 12 jne 1135d8 <memfile_open+0x38>
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
1135c6: 89 53 04 mov %edx,0x4(%ebx)
1135c9: 89 4b 08 mov %ecx,0x8(%ebx)
1135cc: 31 c0 xor %eax,%eax
return 0;
}
1135ce: 8d 65 f8 lea -0x8(%ebp),%esp
1135d1: 5b pop %ebx
1135d2: 5e pop %esi
1135d3: c9 leave
1135d4: c3 ret
1135d5: 8d 76 00 lea 0x0(%esi),%esi
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
1135d8: 89 53 0c mov %edx,0xc(%ebx)
1135db: 89 4b 10 mov %ecx,0x10(%ebx)
1135de: 8b 56 50 mov 0x50(%esi),%edx
1135e1: 8b 4e 54 mov 0x54(%esi),%ecx
1135e4: eb e0 jmp 1135c6 <memfile_open+0x26>
1135e6: 66 90 xchg %ax,%ax
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
1135e8: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
1135eb: 8b 56 58 mov 0x58(%esi),%edx <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
1135ee: c7 46 4c 05 00 00 00 movl $0x5,0x4c(%esi) <== NOT EXECUTED
the_jnode->info.file.size = 0;
1135f5: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) <== NOT EXECUTED
1135fc: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
113603: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
11360a: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
113611: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) <== NOT EXECUTED
if ((count != 0)
113618: 85 c0 test %eax,%eax <== NOT EXECUTED
11361a: 75 09 jne 113625 <memfile_open+0x85> <== NOT EXECUTED
11361c: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
11361f: 31 d2 xor %edx,%edx <== NOT EXECUTED
113621: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
113623: eb 9c jmp 1135c1 <memfile_open+0x21> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
113625: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
113628: 50 push %eax <== NOT EXECUTED
113629: 52 push %edx <== NOT EXECUTED
11362a: 6a 00 push $0x0 <== NOT EXECUTED
11362c: 6a 00 push $0x0 <== NOT EXECUTED
11362e: 56 push %esi <== NOT EXECUTED
11362f: e8 e0 fc ff ff call 113314 <IMFS_memfile_write> <== 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)
113634: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
113637: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
11363a: 74 92 je 1135ce <memfile_open+0x2e> <== NOT EXECUTED
11363c: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
11363f: e9 77 ff ff ff jmp 1135bb <memfile_open+0x1b> <== NOT EXECUTED
00112fd0 <memfile_rmnod>:
int memfile_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
112fd0: 55 push %ebp
112fd1: 89 e5 mov %esp,%ebp
112fd3: 53 push %ebx
112fd4: 83 ec 14 sub $0x14,%esp
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
112fd7: 8b 45 0c mov 0xc(%ebp),%eax
112fda: 8b 18 mov (%eax),%ebx
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
112fdc: 8b 4b 08 mov 0x8(%ebx),%ecx
112fdf: 85 c9 test %ecx,%ecx
112fe1: 74 13 je 112ff6 <memfile_rmnod+0x26> <== NEVER TAKEN
112fe3: 83 ec 0c sub $0xc,%esp
112fe6: 53 push %ebx
112fe7: e8 0c 96 ff ff call 10c5f8 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
112fec: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
112ff3: 83 c4 10 add $0x10,%esp
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
112ff6: 66 ff 4b 34 decw 0x34(%ebx)
IMFS_update_ctime( the_jnode );
112ffa: 83 ec 08 sub $0x8,%esp
112ffd: 6a 00 push $0x0
112fff: 8d 45 f0 lea -0x10(%ebp),%eax
113002: 50 push %eax
113003: e8 58 56 ff ff call 108660 <gettimeofday>
113008: 8b 45 f0 mov -0x10(%ebp),%eax
11300b: 89 43 48 mov %eax,0x48(%ebx)
return memfile_check_rmnod( the_jnode );
11300e: 89 1c 24 mov %ebx,(%esp)
113011: e8 5e ff ff ff call 112f74 <memfile_check_rmnod>
}
113016: 8b 5d fc mov -0x4(%ebp),%ebx
113019: c9 leave
11301a: c3 ret
00108998 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
108998: 55 push %ebp
108999: 89 e5 mov %esp,%ebp
10899b: 57 push %edi
10899c: 56 push %esi
10899d: 53 push %ebx
10899e: 83 ec 2c sub $0x2c,%esp
1089a1: 8b 75 10 mov 0x10(%ebp),%esi
1089a4: 8b 7d 14 mov 0x14(%ebp),%edi
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
1089a7: 8b 45 0c mov 0xc(%ebp),%eax
1089aa: 25 00 f0 00 00 and $0xf000,%eax
1089af: 3d 00 40 00 00 cmp $0x4000,%eax
1089b4: 74 32 je 1089e8 <mknod+0x50>
1089b6: 76 20 jbe 1089d8 <mknod+0x40>
1089b8: 3d 00 60 00 00 cmp $0x6000,%eax
1089bd: 74 29 je 1089e8 <mknod+0x50>
1089bf: 3d 00 80 00 00 cmp $0x8000,%eax
1089c4: 74 22 je 1089e8 <mknod+0x50> <== ALWAYS TAKEN
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
1089c6: e8 39 c7 00 00 call 115104 <__errno> <== NOT EXECUTED
1089cb: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
1089d1: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
1089d6: eb 78 jmp 108a50 <mknod+0xb8> <== NOT EXECUTED
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
1089d8: 3d 00 10 00 00 cmp $0x1000,%eax
1089dd: 74 09 je 1089e8 <mknod+0x50>
1089df: 3d 00 20 00 00 cmp $0x2000,%eax
1089e4: 75 e0 jne 1089c6 <mknod+0x2e> <== NEVER TAKEN
1089e6: 66 90 xchg %ax,%ax
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
1089e8: 51 push %ecx
1089e9: 8d 5d cc lea -0x34(%ebp),%ebx
1089ec: 53 push %ebx
1089ed: 8d 45 e4 lea -0x1c(%ebp),%eax
1089f0: 50 push %eax
1089f1: ff 75 08 pushl 0x8(%ebp)
1089f4: e8 4f 0a 00 00 call 109448 <rtems_filesystem_get_start_loc>
if ( !temp_loc.ops->evalformake_h ) {
1089f9: 8b 45 d8 mov -0x28(%ebp),%eax
1089fc: 8b 40 04 mov 0x4(%eax),%eax
1089ff: 83 c4 10 add $0x10,%esp
108a02: 85 c0 test %eax,%eax
108a04: 74 66 je 108a6c <mknod+0xd4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->evalformake_h)(
108a06: 52 push %edx
108a07: 8d 55 e0 lea -0x20(%ebp),%edx
108a0a: 52 push %edx
108a0b: 53 push %ebx
108a0c: 8b 55 08 mov 0x8(%ebp),%edx
108a0f: 03 55 e4 add -0x1c(%ebp),%edx
108a12: 52 push %edx
108a13: ff d0 call *%eax
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
108a15: 83 c4 10 add $0x10,%esp
108a18: 85 c0 test %eax,%eax
108a1a: 75 5b jne 108a77 <mknod+0xdf>
return -1;
if ( !temp_loc.ops->mknod_h ) {
108a1c: 8b 55 d8 mov -0x28(%ebp),%edx
108a1f: 8b 42 14 mov 0x14(%edx),%eax
108a22: 85 c0 test %eax,%eax
108a24: 74 34 je 108a5a <mknod+0xc2> <== NEVER TAKEN
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
108a26: 83 ec 0c sub $0xc,%esp
108a29: 53 push %ebx
108a2a: 57 push %edi
108a2b: 56 push %esi
108a2c: ff 75 0c pushl 0xc(%ebp)
108a2f: ff 75 e0 pushl -0x20(%ebp)
108a32: ff d0 call *%eax
108a34: 89 c6 mov %eax,%esi
rtems_filesystem_freenode( &temp_loc );
108a36: 8b 45 d8 mov -0x28(%ebp),%eax
108a39: 83 c4 20 add $0x20,%esp
108a3c: 85 c0 test %eax,%eax
108a3e: 74 10 je 108a50 <mknod+0xb8> <== NEVER TAKEN
108a40: 8b 40 1c mov 0x1c(%eax),%eax
108a43: 85 c0 test %eax,%eax
108a45: 74 09 je 108a50 <mknod+0xb8>
108a47: 83 ec 0c sub $0xc,%esp
108a4a: 53 push %ebx
108a4b: ff d0 call *%eax
108a4d: 83 c4 10 add $0x10,%esp
return result;
}
108a50: 89 f0 mov %esi,%eax
108a52: 8d 65 f4 lea -0xc(%ebp),%esp
108a55: 5b pop %ebx
108a56: 5e pop %esi
108a57: 5f pop %edi
108a58: c9 leave
108a59: c3 ret
);
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
108a5a: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
108a5d: 85 c0 test %eax,%eax <== NOT EXECUTED
108a5f: 74 0b je 108a6c <mknod+0xd4> <== NOT EXECUTED
108a61: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108a64: 53 push %ebx <== NOT EXECUTED
108a65: ff d0 call *%eax <== NOT EXECUTED
108a67: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108a6a: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
108a6c: e8 93 c6 00 00 call 115104 <__errno> <== NOT EXECUTED
108a71: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
108a77: be ff ff ff ff mov $0xffffffff,%esi
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
108a7c: 89 f0 mov %esi,%eax
108a7e: 8d 65 f4 lea -0xc(%ebp),%esp
108a81: 5b pop %ebx
108a82: 5e pop %esi
108a83: 5f pop %edi
108a84: c9 leave
108a85: c3 ret
00108b0c <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
108b0c: 55 push %ebp
108b0d: 89 e5 mov %esp,%ebp
108b0f: 57 push %edi
108b10: 56 push %esi
108b11: 53 push %ebx
108b12: 83 ec 4c sub $0x4c,%esp
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
108b15: 83 7d 14 01 cmpl $0x1,0x14(%ebp)
108b19: 0f 87 61 02 00 00 ja 108d80 <mount+0x274>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
108b1f: 83 ec 0c sub $0xc,%esp
108b22: ff 75 10 pushl 0x10(%ebp)
108b25: e8 da 86 00 00 call 111204 <rtems_filesystem_get_mount_handler>
108b2a: 89 45 c0 mov %eax,-0x40(%ebp)
if ( !mount_h )
108b2d: 83 c4 10 add $0x10,%esp
108b30: 85 c0 test %eax,%eax
108b32: 0f 84 48 02 00 00 je 108d80 <mount+0x274>
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
bool has_target = target != NULL;
108b38: 8b 5d 0c mov 0xc(%ebp),%ebx
108b3b: 85 db test %ebx,%ebx
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
108b3d: 0f 95 45 bf setne -0x41(%ebp)
108b41: 0f 84 25 02 00 00 je 108d6c <mount+0x260>
* 4) The mount point exists with the proper permissions to allow mounting
* 5) The selected mount point already has a file system mounted to it
*
*/
int mount(
108b47: 31 c0 xor %eax,%eax
108b49: b9 ff ff ff ff mov $0xffffffff,%ecx
108b4e: 8b 7d 0c mov 0xc(%ebp),%edi
108b51: f2 ae repnz scas %es:(%edi),%al
108b53: f7 d1 not %ecx
108b55: 49 dec %ecx
108b56: 89 4d b8 mov %ecx,-0x48(%ebp)
108b59: 8b 45 0c mov 0xc(%ebp),%eax
108b5c: 89 45 b4 mov %eax,-0x4c(%ebp)
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
108b5f: ba ff ff ff ff mov $0xffffffff,%edx
108b64: 31 c0 xor %eax,%eax
108b66: 89 d1 mov %edx,%ecx
108b68: 8b 7d 10 mov 0x10(%ebp),%edi
108b6b: f2 ae repnz scas %es:(%edi),%al
108b6d: f7 d1 not %ecx
108b6f: 89 4d c4 mov %ecx,-0x3c(%ebp)
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
108b72: 8b 4d 08 mov 0x8(%ebp),%ecx
108b75: 85 c9 test %ecx,%ecx
108b77: 0f 84 e7 01 00 00 je 108d64 <mount+0x258>
108b7d: 89 d1 mov %edx,%ecx
108b7f: 8b 7d 08 mov 0x8(%ebp),%edi
108b82: f2 ae repnz scas %es:(%edi),%al
108b84: 89 ce mov %ecx,%esi
108b86: f7 d6 not %esi
size_t target_length = strlen( target );
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
108b88: 83 ec 08 sub $0x8,%esp
108b8b: 8b 4d b8 mov -0x48(%ebp),%ecx
108b8e: 8b 55 c4 mov -0x3c(%ebp),%edx
108b91: 8d 44 11 75 lea 0x75(%ecx,%edx,1),%eax
108b95: 01 f0 add %esi,%eax
108b97: 50 push %eax
108b98: 6a 01 push $0x1
108b9a: e8 2d f8 ff ff call 1083cc <calloc>
108b9f: 89 c3 mov %eax,%ebx
if ( mt_entry != NULL ) {
108ba1: 83 c4 10 add $0x10,%esp
108ba4: 85 c0 test %eax,%eax
108ba6: 0f 84 a0 01 00 00 je 108d4c <mount+0x240> <== NEVER TAKEN
char *str = (char *) mt_entry + sizeof( *mt_entry );
108bac: 8d 78 74 lea 0x74(%eax),%edi
strcpy( str, filesystemtype );
108baf: 83 ec 08 sub $0x8,%esp
108bb2: ff 75 10 pushl 0x10(%ebp)
108bb5: 57 push %edi
108bb6: e8 69 d0 00 00 call 115c24 <strcpy>
mt_entry->type = str;
108bbb: 89 7b 6c mov %edi,0x6c(%ebx)
str += filesystemtype_size;
108bbe: 03 7d c4 add -0x3c(%ebp),%edi
if ( source_or_null != NULL ) {
108bc1: 83 c4 10 add $0x10,%esp
108bc4: 8b 45 08 mov 0x8(%ebp),%eax
108bc7: 85 c0 test %eax,%eax
108bc9: 74 14 je 108bdf <mount+0xd3>
strcpy( str, source_or_null );
108bcb: 83 ec 08 sub $0x8,%esp
108bce: ff 75 08 pushl 0x8(%ebp)
108bd1: 57 push %edi
108bd2: e8 4d d0 00 00 call 115c24 <strcpy>
mt_entry->dev = str;
108bd7: 89 7b 70 mov %edi,0x70(%ebx)
str += source_size;
108bda: 01 f7 add %esi,%edi
108bdc: 83 c4 10 add $0x10,%esp
}
strcpy( str, target );
108bdf: 83 ec 08 sub $0x8,%esp
108be2: ff 75 b4 pushl -0x4c(%ebp)
108be5: 57 push %edi
108be6: e8 39 d0 00 00 call 115c24 <strcpy>
mt_entry->target = str;
108beb: 89 7b 68 mov %edi,0x68(%ebx)
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
108bee: 89 5b 2c mov %ebx,0x2c(%ebx)
mt_entry->options = options;
108bf1: 8b 45 14 mov 0x14(%ebp),%eax
108bf4: 89 43 30 mov %eax,0x30(%ebx)
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
108bf7: 8d 7b 38 lea 0x38(%ebx),%edi
108bfa: be 00 2b 12 00 mov $0x122b00,%esi
108bff: b9 0c 00 00 00 mov $0xc,%ecx
108c04: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
108c06: 83 c4 10 add $0x10,%esp
108c09: 80 7d bf 00 cmpb $0x0,-0x41(%ebp)
108c0d: 75 7d jne 108c8c <mount+0x180>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
108c0f: 81 3d 04 70 12 00 08 cmpl $0x127008,0x127004
108c16: 70 12 00
108c19: 0f 85 a9 01 00 00 jne 108dc8 <mount+0x2bc> <== NEVER TAKEN
108c1f: 31 f6 xor %esi,%esi
* mt_point_node.node_access will be left to null to indicate that this
* is the root of the entire file system.
*/
}
if ( (*mount_h)( mt_entry, data ) ) {
108c21: 83 ec 08 sub $0x8,%esp
108c24: ff 75 18 pushl 0x18(%ebp)
108c27: 53 push %ebx
108c28: ff 55 c0 call *-0x40(%ebp)
108c2b: 83 c4 10 add $0x10,%esp
108c2e: 85 c0 test %eax,%eax
108c30: 0f 85 62 01 00 00 jne 108d98 <mount+0x28c> <== NEVER TAKEN
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 );
108c36: 56 push %esi
108c37: 6a 00 push $0x0
108c39: 6a 00 push $0x0
108c3b: ff 35 88 92 12 00 pushl 0x129288
108c41: e8 9e 30 00 00 call 10bce4 <rtems_semaphore_obtain>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
108c46: 5a pop %edx
108c47: 59 pop %ecx
108c48: 53 push %ebx
108c49: 68 04 70 12 00 push $0x127004
108c4e: e8 81 39 00 00 call 10c5d4 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
108c53: 58 pop %eax
108c54: ff 35 88 92 12 00 pushl 0x129288
108c5a: e8 81 31 00 00 call 10bde0 <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
108c5f: 83 c4 10 add $0x10,%esp
108c62: 80 7d bf 00 cmpb $0x0,-0x41(%ebp)
108c66: 74 0c je 108c74 <mount+0x168>
rtems_filesystem_root = mt_entry->mt_fs_root;
108c68: 31 c0 xor %eax,%eax
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
108c6a: 8d 65 f4 lea -0xc(%ebp),%esp
108c6d: 5b pop %ebx
108c6e: 5e pop %esi
108c6f: 5f pop %edi
108c70: c9 leave
108c71: c3 ret
108c72: 66 90 xchg %ax,%ax
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
rtems_filesystem_root = mt_entry->mt_fs_root;
108c74: 8b 3d 24 70 12 00 mov 0x127024,%edi
108c7a: 83 c7 18 add $0x18,%edi
108c7d: 8d 73 1c lea 0x1c(%ebx),%esi
108c80: b9 05 00 00 00 mov $0x5,%ecx
108c85: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
108c87: eb df jmp 108c68 <mount+0x15c>
108c89: 8d 76 00 lea 0x0(%esi),%esi
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
108c8c: 83 ec 0c sub $0xc,%esp
108c8f: 6a 01 push $0x1
108c91: 8d 75 d4 lea -0x2c(%ebp),%esi
108c94: 56 push %esi
108c95: 6a 07 push $0x7
108c97: ff 75 b8 pushl -0x48(%ebp)
108c9a: ff 75 0c pushl 0xc(%ebp)
108c9d: e8 d2 f8 ff ff call 108574 <rtems_filesystem_evaluate_path>
108ca2: 83 c4 20 add $0x20,%esp
108ca5: 40 inc %eax
108ca6: 0f 84 27 01 00 00 je 108dd3 <mount+0x2c7> <== NEVER TAKEN
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
108cac: 8b 45 e0 mov -0x20(%ebp),%eax
108caf: 8b 40 10 mov 0x10(%eax),%eax
108cb2: 85 c0 test %eax,%eax
108cb4: 0f 84 52 01 00 00 je 108e0c <mount+0x300> <== NEVER TAKEN
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
108cba: 83 ec 0c sub $0xc,%esp
108cbd: 56 push %esi
108cbe: ff d0 call *%eax
108cc0: 83 c4 10 add $0x10,%esp
108cc3: 48 dec %eax
108cc4: 0f 85 22 01 00 00 jne 108dec <mount+0x2e0>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
108cca: 83 ec 08 sub $0x8,%esp
108ccd: ff 75 d4 pushl -0x2c(%ebp)
108cd0: 68 88 8a 10 00 push $0x108a88
108cd5: e8 c2 fd ff ff call 108a9c <rtems_filesystem_mount_iterate>
108cda: 83 c4 10 add $0x10,%esp
108cdd: 84 c0 test %al,%al
108cdf: 0f 85 17 01 00 00 jne 108dfc <mount+0x2f0>
* may have been allocated in loc should not be sent to freenode
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
108ce5: 8b 45 d4 mov -0x2c(%ebp),%eax
108ce8: 89 43 08 mov %eax,0x8(%ebx)
mt_entry->mt_point_node.handlers = loc.handlers;
108ceb: 8b 45 dc mov -0x24(%ebp),%eax
108cee: 89 43 10 mov %eax,0x10(%ebx)
mt_entry->mt_point_node.ops = loc.ops;
108cf1: 8b 45 e0 mov -0x20(%ebp),%eax
108cf4: 89 43 14 mov %eax,0x14(%ebx)
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
108cf7: 8b 55 e4 mov -0x1c(%ebp),%edx
108cfa: 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 ){
108cfd: 8b 40 20 mov 0x20(%eax),%eax
108d00: 85 c0 test %eax,%eax
108d02: 0f 84 04 01 00 00 je 108e0c <mount+0x300> <== NEVER TAKEN
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( loc.ops->mount_h( mt_entry ) ) {
108d08: 83 ec 0c sub $0xc,%esp
108d0b: 53 push %ebx
108d0c: ff d0 call *%eax
108d0e: 83 c4 10 add $0x10,%esp
108d11: 85 c0 test %eax,%eax
108d13: 0f 84 08 ff ff ff je 108c21 <mount+0x115> <== ALWAYS TAKEN
return 0;
cleanup_and_bail:
free( mt_entry );
108d19: 83 ec 0c sub $0xc,%esp
108d1c: 53 push %ebx
108d1d: e8 c2 f8 ff ff call 1085e4 <free>
108d22: 83 c4 10 add $0x10,%esp
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
108d25: 8b 46 0c mov 0xc(%esi),%eax
108d28: 85 c0 test %eax,%eax
108d2a: 0f 84 8f 00 00 00 je 108dbf <mount+0x2b3> <== NEVER TAKEN
108d30: 8b 40 1c mov 0x1c(%eax),%eax
108d33: 85 c0 test %eax,%eax
108d35: 0f 84 84 00 00 00 je 108dbf <mount+0x2b3> <== NEVER TAKEN
108d3b: 83 ec 0c sub $0xc,%esp
108d3e: 56 push %esi
108d3f: ff d0 call *%eax
108d41: 83 c8 ff or $0xffffffff,%eax
108d44: 83 c4 10 add $0x10,%esp
108d47: e9 1e ff ff ff jmp 108c6a <mount+0x15e>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
108d4c: e8 b3 c3 00 00 call 115104 <__errno> <== NOT EXECUTED
108d51: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
108d57: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
108d5c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108d5f: 5b pop %ebx <== NOT EXECUTED
108d60: 5e pop %esi <== NOT EXECUTED
108d61: 5f pop %edi <== NOT EXECUTED
108d62: c9 leave <== NOT EXECUTED
108d63: c3 ret <== NOT EXECUTED
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
108d64: 31 f6 xor %esi,%esi
108d66: e9 1d fe ff ff jmp 108b88 <mount+0x7c>
108d6b: 90 nop
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
108d6c: c7 45 b8 01 00 00 00 movl $0x1,-0x48(%ebp)
108d73: c7 45 b4 a7 2a 12 00 movl $0x122aa7,-0x4c(%ebp)
108d7a: e9 e0 fd ff ff jmp 108b5f <mount+0x53>
108d7f: 90 nop
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
108d80: e8 7f c3 00 00 call 115104 <__errno>
108d85: c7 00 16 00 00 00 movl $0x16,(%eax)
108d8b: b8 ff ff ff ff mov $0xffffffff,%eax
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
108d90: 8d 65 f4 lea -0xc(%ebp),%esp
108d93: 5b pop %ebx
108d94: 5e pop %esi
108d95: 5f pop %edi
108d96: c9 leave
108d97: c3 ret
if ( (*mount_h)( mt_entry, data ) ) {
/*
* Try to undo the mount operation
*/
if ( loc.ops->unmount_h ) {
108d98: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
108d9b: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED
108d9e: 85 c0 test %eax,%eax <== NOT EXECUTED
108da0: 74 09 je 108dab <mount+0x29f> <== NOT EXECUTED
loc.ops->unmount_h( mt_entry );
108da2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108da5: 53 push %ebx <== NOT EXECUTED
108da6: ff d0 call *%eax <== NOT EXECUTED
108da8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
108dab: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108dae: 53 push %ebx <== NOT EXECUTED
108daf: e8 30 f8 ff ff call 1085e4 <free> <== NOT EXECUTED
if ( loc_to_free )
108db4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108db7: 85 f6 test %esi,%esi <== NOT EXECUTED
108db9: 0f 85 66 ff ff ff jne 108d25 <mount+0x219> <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
108dbf: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
108dc2: e9 a3 fe ff ff jmp 108c6a <mount+0x15e> <== NOT EXECUTED
108dc7: 90 nop <== NOT EXECUTED
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
108dc8: e8 37 c3 00 00 call 115104 <__errno> <== NOT EXECUTED
108dcd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
108dd3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108dd6: 53 push %ebx <== NOT EXECUTED
108dd7: e8 08 f8 ff ff call 1085e4 <free> <== NOT EXECUTED
108ddc: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
108de1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108de4: e9 81 fe ff ff jmp 108c6a <mount+0x15e> <== NOT EXECUTED
108de9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
108dec: e8 13 c3 00 00 call 115104 <__errno>
108df1: c7 00 14 00 00 00 movl $0x14,(%eax)
goto cleanup_and_bail;
108df7: e9 1d ff ff ff jmp 108d19 <mount+0x20d>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
errno = EBUSY;
108dfc: e8 03 c3 00 00 call 115104 <__errno>
108e01: c7 00 10 00 00 00 movl $0x10,(%eax)
goto cleanup_and_bail;
108e07: e9 0d ff ff ff jmp 108d19 <mount+0x20d>
* 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;
108e0c: e8 f3 c2 00 00 call 115104 <__errno> <== NOT EXECUTED
108e11: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
goto cleanup_and_bail;
108e17: e9 fd fe ff ff jmp 108d19 <mount+0x20d> <== NOT EXECUTED
0010ffa4 <mq_getattr>:
int mq_getattr(
mqd_t mqdes,
struct mq_attr *mqstat
)
{
10ffa4: 55 push %ebp
10ffa5: 89 e5 mov %esp,%ebp
10ffa7: 53 push %ebx
10ffa8: 83 ec 14 sub $0x14,%esp
10ffab: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Message_queue_Control *the_mq;
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
CORE_message_queue_Attributes *the_mq_attr;
if ( !mqstat )
10ffae: 85 db test %ebx,%ebx
10ffb0: 74 54 je 110006 <mq_getattr+0x62> <== NEVER TAKEN
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(
10ffb2: 51 push %ecx
10ffb3: 8d 45 f4 lea -0xc(%ebp),%eax
10ffb6: 50 push %eax
10ffb7: ff 75 08 pushl 0x8(%ebp)
10ffba: 68 40 29 13 00 push $0x132940
10ffbf: e8 8c 32 00 00 call 113250 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
10ffc4: 83 c4 10 add $0x10,%esp
10ffc7: 8b 55 f4 mov -0xc(%ebp),%edx
10ffca: 85 d2 test %edx,%edx
10ffcc: 75 26 jne 10fff4 <mq_getattr+0x50>
case OBJECTS_LOCAL:
the_mq = the_mq_fd->Queue;
10ffce: 8b 50 10 mov 0x10(%eax),%edx
* Return the old values.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
mqstat->mq_flags = the_mq_fd->oflag;
10ffd1: 8b 40 14 mov 0x14(%eax),%eax
10ffd4: 89 03 mov %eax,(%ebx)
mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size;
10ffd6: 8b 42 68 mov 0x68(%edx),%eax
10ffd9: 89 43 08 mov %eax,0x8(%ebx)
mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages;
10ffdc: 8b 42 60 mov 0x60(%edx),%eax
10ffdf: 89 43 04 mov %eax,0x4(%ebx)
mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages;
10ffe2: 8b 42 64 mov 0x64(%edx),%eax
10ffe5: 89 43 0c mov %eax,0xc(%ebx)
_Thread_Enable_dispatch();
10ffe8: e8 27 3b 00 00 call 113b14 <_Thread_Enable_dispatch>
10ffed: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
10ffef: 8b 5d fc mov -0x4(%ebp),%ebx
10fff2: c9 leave
10fff3: c3 ret
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10fff4: e8 77 b2 00 00 call 11b270 <__errno>
10fff9: c7 00 09 00 00 00 movl $0x9,(%eax)
10ffff: b8 ff ff ff ff mov $0xffffffff,%eax
110004: eb e9 jmp 10ffef <mq_getattr+0x4b>
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
CORE_message_queue_Attributes *the_mq_attr;
if ( !mqstat )
rtems_set_errno_and_return_minus_one( EINVAL );
110006: e8 65 b2 00 00 call 11b270 <__errno>
11000b: c7 00 16 00 00 00 movl $0x16,(%eax)
110011: b8 ff ff ff ff mov $0xffffffff,%eax
110016: eb d7 jmp 10ffef <mq_getattr+0x4b>
001100fc <mq_open>:
int oflag,
...
/* mode_t mode, */
/* struct mq_attr attr */
)
{
1100fc: 55 push %ebp
1100fd: 89 e5 mov %esp,%ebp
1100ff: 57 push %edi
110100: 56 push %esi
110101: 53 push %ebx
110102: 83 ec 2c sub $0x2c,%esp
110105: 8b 75 0c mov 0xc(%ebp),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
110108: a1 d8 23 13 00 mov 0x1323d8,%eax
11010d: 40 inc %eax
11010e: a3 d8 23 13 00 mov %eax,0x1323d8
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
110113: 89 f0 mov %esi,%eax
110115: 25 00 02 00 00 and $0x200,%eax
11011a: 89 45 d4 mov %eax,-0x2c(%ebp)
11011d: 0f 85 c9 00 00 00 jne 1101ec <mq_open+0xf0>
110123: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
*/
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
11012a: 83 ec 0c sub $0xc,%esp
11012d: 68 40 29 13 00 push $0x132940
110132: e8 69 2c 00 00 call 112da0 <_Objects_Allocate>
110137: 89 c3 mov %eax,%ebx
attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
110139: 83 c4 10 add $0x10,%esp
11013c: 85 c0 test %eax,%eax
11013e: 0f 84 b4 00 00 00 je 1101f8 <mq_open+0xfc>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq_fd->oflag = oflag;
110144: 89 70 14 mov %esi,0x14(%eax)
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
110147: 83 ec 08 sub $0x8,%esp
11014a: 8d 45 e4 lea -0x1c(%ebp),%eax
11014d: 50 push %eax
11014e: ff 75 08 pushl 0x8(%ebp)
110151: e8 6e 74 00 00 call 1175c4 <_POSIX_Message_queue_Name_to_id>
110156: 89 c7 mov %eax,%edi
* If the name to id translation worked, then the message queue exists
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "message queue does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
110158: 83 c4 10 add $0x10,%esp
11015b: 85 c0 test %eax,%eax
11015d: 75 59 jne 1101b8 <mq_open+0xbc>
} else { /* name -> ID translation succeeded */
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
11015f: 81 e6 00 0a 00 00 and $0xa00,%esi
110165: 81 fe 00 0a 00 00 cmp $0xa00,%esi
11016b: 0f 84 a7 00 00 00 je 110218 <mq_open+0x11c>
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control *)
110171: 50 push %eax
110172: 8d 45 dc lea -0x24(%ebp),%eax
110175: 50 push %eax
110176: ff 75 e4 pushl -0x1c(%ebp)
110179: 68 a0 27 13 00 push $0x1327a0
11017e: e8 cd 30 00 00 call 113250 <_Objects_Get>
/*
* In this case we need to do an ID->pointer conversion to
* check the mode.
*/
the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
110183: 89 45 e0 mov %eax,-0x20(%ebp)
the_mq->open_count += 1;
110186: ff 40 18 incl 0x18(%eax)
the_mq_fd->Queue = the_mq;
110189: 89 43 10 mov %eax,0x10(%ebx)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
11018c: 0f b7 53 08 movzwl 0x8(%ebx),%edx
110190: a1 5c 29 13 00 mov 0x13295c,%eax
110195: 89 1c 90 mov %ebx,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
110198: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
_Objects_Open_string(
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
11019f: e8 70 39 00 00 call 113b14 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
1101a4: e8 6b 39 00 00 call 113b14 <_Thread_Enable_dispatch>
return (mqd_t)the_mq_fd->Object.id;
1101a9: 8b 43 08 mov 0x8(%ebx),%eax
1101ac: 83 c4 10 add $0x10,%esp
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
1101af: 8d 65 f4 lea -0xc(%ebp),%esp
1101b2: 5b pop %ebx
1101b3: 5e pop %esi
1101b4: 5f pop %edi
1101b5: c9 leave
1101b6: c3 ret
1101b7: 90 nop
if ( status ) {
/*
* 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) ) ) {
1101b8: 83 f8 02 cmp $0x2,%eax
1101bb: 0f 84 87 00 00 00 je 110248 <mq_open+0x14c>
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd (
POSIX_Message_queue_Control_fd *the_mq_fd
)
{
_Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
1101c1: 83 ec 08 sub $0x8,%esp
1101c4: 53 push %ebx
1101c5: 68 40 29 13 00 push $0x132940
1101ca: e8 51 2f 00 00 call 113120 <_Objects_Free>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
1101cf: e8 40 39 00 00 call 113b14 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
1101d4: e8 97 b0 00 00 call 11b270 <__errno>
1101d9: 89 38 mov %edi,(%eax)
1101db: b8 ff ff ff ff mov $0xffffffff,%eax
1101e0: 83 c4 10 add $0x10,%esp
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
1101e3: 8d 65 f4 lea -0xc(%ebp),%esp
1101e6: 5b pop %ebx
1101e7: 5e pop %esi
1101e8: 5f pop %edi
1101e9: c9 leave
1101ea: c3 ret
1101eb: 90 nop
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
1101ec: 8b 45 14 mov 0x14(%ebp),%eax
1101ef: 89 45 d0 mov %eax,-0x30(%ebp)
1101f2: e9 33 ff ff ff jmp 11012a <mq_open+0x2e>
1101f7: 90 nop
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
_Thread_Enable_dispatch();
1101f8: e8 17 39 00 00 call 113b14 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
1101fd: e8 6e b0 00 00 call 11b270 <__errno>
110202: c7 00 17 00 00 00 movl $0x17,(%eax)
110208: b8 ff ff ff ff mov $0xffffffff,%eax
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
11020d: 8d 65 f4 lea -0xc(%ebp),%esp
110210: 5b pop %ebx
110211: 5e pop %esi
110212: 5f pop %edi
110213: c9 leave
110214: c3 ret
110215: 8d 76 00 lea 0x0(%esi),%esi
110218: 83 ec 08 sub $0x8,%esp
11021b: 53 push %ebx
11021c: 68 40 29 13 00 push $0x132940
110221: e8 fa 2e 00 00 call 113120 <_Objects_Free>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
110226: e8 e9 38 00 00 call 113b14 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
11022b: e8 40 b0 00 00 call 11b270 <__errno>
110230: c7 00 11 00 00 00 movl $0x11,(%eax)
110236: b8 ff ff ff ff mov $0xffffffff,%eax
11023b: 83 c4 10 add $0x10,%esp
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
11023e: 8d 65 f4 lea -0xc(%ebp),%esp
110241: 5b pop %ebx
110242: 5e pop %esi
110243: 5f pop %edi
110244: c9 leave
110245: c3 ret
110246: 66 90 xchg %ax,%ax
if ( status ) {
/*
* 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) ) ) {
110248: 8b 55 d4 mov -0x2c(%ebp),%edx
11024b: 85 d2 test %edx,%edx
11024d: 0f 84 6e ff ff ff je 1101c1 <mq_open+0xc5>
/*
* At this point, the message queue does not exist and everything has been
* checked. We should go ahead and create a message queue.
*/
status = _POSIX_Message_queue_Create_support(
110253: 8d 45 e0 lea -0x20(%ebp),%eax
110256: 50 push %eax
110257: ff 75 d0 pushl -0x30(%ebp)
11025a: 6a 01 push $0x1
11025c: ff 75 08 pushl 0x8(%ebp)
11025f: e8 cc 71 00 00 call 117430 <_POSIX_Message_queue_Create_support>
);
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
110264: 83 c4 10 add $0x10,%esp
110267: 40 inc %eax
110268: 74 26 je 110290 <mq_open+0x194>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
return (mqd_t) -1;
}
the_mq_fd->Queue = the_mq;
11026a: 8b 45 e0 mov -0x20(%ebp),%eax
11026d: 89 43 10 mov %eax,0x10(%ebx)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
110270: 0f b7 53 08 movzwl 0x8(%ebx),%edx
110274: a1 5c 29 13 00 mov 0x13295c,%eax
110279: 89 1c 90 mov %ebx,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
11027c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
110283: e8 8c 38 00 00 call 113b14 <_Thread_Enable_dispatch>
return (mqd_t) the_mq_fd->Object.id;
110288: 8b 43 08 mov 0x8(%ebx),%eax
11028b: e9 1f ff ff ff jmp 1101af <mq_open+0xb3>
110290: 83 ec 08 sub $0x8,%esp
110293: 53 push %ebx
110294: 68 40 29 13 00 push $0x132940
110299: e8 82 2e 00 00 call 113120 <_Objects_Free>
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
11029e: e8 71 38 00 00 call 113b14 <_Thread_Enable_dispatch>
1102a3: b8 ff ff ff ff mov $0xffffffff,%eax
return (mqd_t) -1;
1102a8: 83 c4 10 add $0x10,%esp
1102ab: e9 ff fe ff ff jmp 1101af <mq_open+0xb3>
0013a8d8 <msdos_creat_node>:
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
13a8d8: 55 push %ebp <== NOT EXECUTED
13a8d9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13a8db: 57 push %edi <== NOT EXECUTED
13a8dc: 56 push %esi <== NOT EXECUTED
13a8dd: 53 push %ebx <== NOT EXECUTED
13a8de: 81 ec cc 00 00 00 sub $0xcc,%esp <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
13a8e4: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13a8e7: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED
13a8ea: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
13a8ed: 89 85 40 ff ff ff mov %eax,-0xc0(%ebp) <== NOT EXECUTED
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
13a8f3: 8b 0a mov (%edx),%ecx <== NOT EXECUTED
13a8f5: 89 8d 44 ff ff ff mov %ecx,-0xbc(%ebp) <== NOT EXECUTED
fat_file_fd_t *fat_fd = NULL;
13a8fb: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
time_t time_ret = 0;
uint16_t time_val = 0;
13a902: 66 c7 45 e6 00 00 movw $0x0,-0x1a(%ebp) <== NOT EXECUTED
uint16_t date = 0;
13a908: 66 c7 45 e4 00 00 movw $0x0,-0x1c(%ebp) <== NOT EXECUTED
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
13a90e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
dir_pos->sname.ofs = 0;
13a915: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
13a91c: c7 45 d8 ff ff ff ff movl $0xffffffff,-0x28(%ebp) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
13a923: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
13a92a: 8d 5d b0 lea -0x50(%ebp),%ebx <== NOT EXECUTED
13a92d: 31 c0 xor %eax,%eax <== NOT EXECUTED
13a92f: b9 20 00 00 00 mov $0x20,%ecx <== NOT EXECUTED
13a934: 89 df mov %ebx,%edi <== NOT EXECUTED
13a936: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
13a938: 8d 95 50 ff ff ff lea -0xb0(%ebp),%edx <== NOT EXECUTED
13a93e: 89 95 34 ff ff ff mov %edx,-0xcc(%ebp) <== NOT EXECUTED
13a944: b1 40 mov $0x40,%cl <== NOT EXECUTED
13a946: 89 d7 mov %edx,%edi <== NOT EXECUTED
13a948: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
name_type = msdos_long_to_short (name, name_len,
13a94a: 6a 0b push $0xb <== NOT EXECUTED
13a94c: 53 push %ebx <== NOT EXECUTED
13a94d: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
13a950: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13a953: e8 74 1f 00 00 call 13c8cc <msdos_long_to_short> <== NOT EXECUTED
13a958: 89 c6 mov %eax,%esi <== NOT EXECUTED
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
13a95a: c6 45 bc 00 movb $0x0,-0x44(%ebp) <== NOT EXECUTED
/* set up last write date and time */
time_ret = time(NULL);
13a95e: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED
13a965: e8 f6 7e 01 00 call 152860 <time> <== NOT EXECUTED
if ( time_ret == -1 )
13a96a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13a96d: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
13a970: 74 76 je 13a9e8 <msdos_creat_node+0x110><== NOT EXECUTED
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
13a972: 52 push %edx <== NOT EXECUTED
13a973: 8d 55 e6 lea -0x1a(%ebp),%edx <== NOT EXECUTED
13a976: 52 push %edx <== NOT EXECUTED
13a977: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
13a97a: 52 push %edx <== NOT EXECUTED
13a97b: 50 push %eax <== NOT EXECUTED
13a97c: e8 53 b5 00 00 call 145ed4 <msdos_date_unix2dos> <== NOT EXECUTED
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
13a981: 66 8b 45 e6 mov -0x1a(%ebp),%ax <== NOT EXECUTED
13a985: 66 89 45 c6 mov %ax,-0x3a(%ebp) <== NOT EXECUTED
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
13a989: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13a98c: 66 89 45 c8 mov %ax,-0x38(%ebp) <== NOT EXECUTED
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
13a990: 8d 7d cc lea -0x34(%ebp),%edi <== NOT EXECUTED
13a993: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED
if (type == MSDOS_DIRECTORY) {
13a99a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13a99d: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) <== NOT EXECUTED
13a9a1: 74 55 je 13a9f8 <msdos_creat_node+0x120><== NOT EXECUTED
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
}
else if (type == MSDOS_HARD_LINK) {
13a9a3: 83 7d 0c 03 cmpl $0x3,0xc(%ebp) <== NOT EXECUTED
13a9a7: 0f 84 df 01 00 00 je 13ab8c <msdos_creat_node+0x2b4><== NOT EXECUTED
* set "last access" date to today
*/
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
}
else { /* regular file... */
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
13a9ad: 8a 45 bb mov -0x45(%ebp),%al <== NOT EXECUTED
13a9b0: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
13a9b3: 88 43 0b mov %al,0xb(%ebx) <== NOT EXECUTED
/*
* find free space in the parent directory and write new initialized
* FAT 32 Bytes Directory Entry Structure to the disk
*/
rc = msdos_get_name_node(parent_loc, true, name, name_len,
13a9b6: 57 push %edi <== NOT EXECUTED
13a9b7: 53 push %ebx <== NOT EXECUTED
13a9b8: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED
13a9bb: 52 push %edx <== NOT EXECUTED
13a9bc: 56 push %esi <== NOT EXECUTED
13a9bd: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
13a9c0: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13a9c3: 6a 01 push $0x1 <== NOT EXECUTED
13a9c5: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13a9c8: e8 cb 22 00 00 call 13cc98 <msdos_get_name_node> <== NOT EXECUTED
13a9cd: 89 c6 mov %eax,%esi <== NOT EXECUTED
name_type, &dir_pos, short_node);
if ( rc != RC_OK )
13a9cf: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13a9d2: 85 c0 test %eax,%eax <== NOT EXECUTED
13a9d4: 75 06 jne 13a9dc <msdos_creat_node+0x104><== NOT EXECUTED
/*
* if we create a new file we are done, if directory there are more steps
* to do
*/
if (type == MSDOS_DIRECTORY)
13a9d6: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) <== NOT EXECUTED
13a9da: 74 28 je 13aa04 <msdos_creat_node+0x12c><== NOT EXECUTED
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
return rc;
}
13a9dc: 89 f0 mov %esi,%eax <== NOT EXECUTED
13a9de: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13a9e1: 5b pop %ebx <== NOT EXECUTED
13a9e2: 5e pop %esi <== NOT EXECUTED
13a9e3: 5f pop %edi <== NOT EXECUTED
13a9e4: c9 leave <== NOT EXECUTED
13a9e5: c3 ret <== NOT EXECUTED
13a9e6: 66 90 xchg %ax,%ax <== NOT EXECUTED
fat_file_close(parent_loc->mt_entry, fat_fd);
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
return rc;
13a9e8: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
}
13a9ed: 89 f0 mov %esi,%eax <== NOT EXECUTED
13a9ef: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13a9f2: 5b pop %ebx <== NOT EXECUTED
13a9f3: 5e pop %esi <== NOT EXECUTED
13a9f4: 5f pop %edi <== NOT EXECUTED
13a9f5: c9 leave <== NOT EXECUTED
13a9f6: c3 ret <== NOT EXECUTED
13a9f7: 90 nop <== NOT EXECUTED
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
13a9f8: 8a 45 bb mov -0x45(%ebp),%al <== NOT EXECUTED
13a9fb: 83 c8 10 or $0x10,%eax <== NOT EXECUTED
13a9fe: 88 43 0b mov %al,0xb(%ebx) <== NOT EXECUTED
13aa01: eb b3 jmp 13a9b6 <msdos_creat_node+0xde> <== NOT EXECUTED
13aa03: 90 nop <== NOT EXECUTED
* to do
*/
if (type == MSDOS_DIRECTORY)
{
/* open new directory as fat-file */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
13aa04: 51 push %ecx <== NOT EXECUTED
13aa05: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
13aa08: 50 push %eax <== NOT EXECUTED
13aa09: 8d 4d d0 lea -0x30(%ebp),%ecx <== NOT EXECUTED
13aa0c: 51 push %ecx <== NOT EXECUTED
13aa0d: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13aa10: ff 70 10 pushl 0x10(%eax) <== NOT EXECUTED
13aa13: e8 58 0b ff ff call 12b570 <fat_file_open> <== NOT EXECUTED
13aa18: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc != RC_OK)
13aa1a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13aa1d: 85 c0 test %eax,%eax <== NOT EXECUTED
13aa1f: 0f 85 13 01 00 00 jne 13ab38 <msdos_creat_node+0x260><== NOT EXECUTED
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
13aa25: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13aa28: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
13aa2f: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
13aa36: c7 40 14 00 00 20 00 movl $0x200000,0x14(%eax) <== NOT EXECUTED
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
13aa3d: b9 08 00 00 00 mov $0x8,%ecx <== NOT EXECUTED
13aa42: 8b bd 34 ff ff ff mov -0xcc(%ebp),%edi <== NOT EXECUTED
13aa48: 89 de mov %ebx,%esi <== NOT EXECUTED
13aa4a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
13aa4c: 8d 85 70 ff ff ff lea -0x90(%ebp),%eax <== NOT EXECUTED
13aa52: b1 08 mov $0x8,%cl <== NOT EXECUTED
13aa54: 89 c7 mov %eax,%edi <== NOT EXECUTED
13aa56: 89 de mov %ebx,%esi <== NOT EXECUTED
13aa58: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
13aa5a: 8b 35 c4 fa 16 00 mov 0x16fac4,%esi <== NOT EXECUTED
13aa60: b1 0b mov $0xb,%cl <== NOT EXECUTED
13aa62: 8b bd 34 ff ff ff mov -0xcc(%ebp),%edi <== NOT EXECUTED
13aa68: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
MSDOS_NAME_MAX);
memcpy(MSDOS_DIR_NAME(DOTDOT_NODE_P(dot_dotdot)), MSDOS_DOTDOT_NAME,
13aa6a: 8b 35 c8 fa 16 00 mov 0x16fac8,%esi <== NOT EXECUTED
13aa70: b1 0b mov $0xb,%cl <== NOT EXECUTED
13aa72: 89 c7 mov %eax,%edi <== NOT EXECUTED
13aa74: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
13aa76: 8b 95 44 ff ff ff mov -0xbc(%ebp),%edx <== NOT EXECUTED
13aa7c: 83 7a 20 01 cmpl $0x1,0x20(%edx) <== NOT EXECUTED
13aa80: 0f 84 da 00 00 00 je 13ab60 <msdos_creat_node+0x288><== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
13aa86: 8b 95 44 ff ff ff mov -0xbc(%ebp),%edx <== NOT EXECUTED
13aa8c: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
13aa8f: 66 89 45 8a mov %ax,-0x76(%ebp) <== NOT EXECUTED
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
13aa93: c1 e8 10 shr $0x10,%eax <== NOT EXECUTED
13aa96: 66 89 45 84 mov %ax,-0x7c(%ebp) <== NOT EXECUTED
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
13aa9a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13aa9d: 8d 8d 50 ff ff ff lea -0xb0(%ebp),%ecx <== NOT EXECUTED
13aaa3: 51 push %ecx <== NOT EXECUTED
13aaa4: 6a 40 push $0x40 <== NOT EXECUTED
13aaa6: 6a 00 push $0x0 <== NOT EXECUTED
13aaa8: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13aaab: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13aaae: ff 70 10 pushl 0x10(%eax) <== NOT EXECUTED
13aab1: e8 8a 05 ff ff call 12b040 <fat_file_write> <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
if (ret < 0)
13aab6: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13aab9: 85 c0 test %eax,%eax <== NOT EXECUTED
13aabb: 0f 88 97 00 00 00 js 13ab58 <msdos_creat_node+0x280><== NOT EXECUTED
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
13aac1: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13aac4: 8b 8d 40 ff ff ff mov -0xc0(%ebp),%ecx <== NOT EXECUTED
13aaca: 0f b7 51 06 movzwl 0x6(%ecx),%edx <== NOT EXECUTED
13aace: 01 50 18 add %edx,0x18(%eax) <== NOT EXECUTED
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
13aad1: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
13aad4: 66 89 95 6a ff ff ff mov %dx,-0x96(%ebp) <== NOT EXECUTED
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
13aadb: c1 ea 10 shr $0x10,%edx <== NOT EXECUTED
13aade: 66 89 95 64 ff ff ff mov %dx,-0x9c(%ebp) <== NOT EXECUTED
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
13aae5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13aae8: 8d 95 50 ff ff ff lea -0xb0(%ebp),%edx <== NOT EXECUTED
13aaee: 52 push %edx <== NOT EXECUTED
13aaef: 6a 20 push $0x20 <== NOT EXECUTED
13aaf1: 6a 00 push $0x0 <== NOT EXECUTED
13aaf3: 50 push %eax <== NOT EXECUTED
13aaf4: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13aaf7: ff 71 10 pushl 0x10(%ecx) <== NOT EXECUTED
13aafa: e8 41 05 ff ff call 12b040 <fat_file_write> <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
13aaff: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13ab02: 85 c0 test %eax,%eax <== NOT EXECUTED
13ab04: 78 52 js 13ab58 <msdos_creat_node+0x280><== NOT EXECUTED
rc = -1;
goto error;
}
/* write first cluster num of a new directory to disk */
rc = msdos_set_first_cluster_num(parent_loc->mt_entry, fat_fd);
13ab06: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13ab09: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13ab0c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13ab0f: ff 70 10 pushl 0x10(%eax) <== NOT EXECUTED
13ab12: e8 c1 19 00 00 call 13c4d8 <msdos_set_first_cluster_num><== NOT EXECUTED
13ab17: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc != RC_OK)
13ab19: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ab1c: 85 c0 test %eax,%eax <== NOT EXECUTED
13ab1e: 0f 84 2d 01 00 00 je 13ac51 <msdos_creat_node+0x379><== NOT EXECUTED
fat_file_close(parent_loc->mt_entry, fat_fd);
}
return RC_OK;
error:
fat_file_close(parent_loc->mt_entry, fat_fd);
13ab24: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13ab27: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13ab2a: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13ab2d: ff 71 10 pushl 0x10(%ecx) <== NOT EXECUTED
13ab30: e8 7b 09 ff ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
13ab35: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
13ab38: 50 push %eax <== NOT EXECUTED
13ab39: 68 e5 00 00 00 push $0xe5 <== NOT EXECUTED
13ab3e: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED
13ab41: 50 push %eax <== NOT EXECUTED
13ab42: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13ab45: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED
13ab48: e8 3b 1a 00 00 call 13c588 <msdos_set_first_char4file_name><== NOT EXECUTED
return rc;
13ab4d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ab50: e9 87 fe ff ff jmp 13a9dc <msdos_creat_node+0x104><== NOT EXECUTED
13ab55: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* write first cluster num of a new directory to disk */
rc = msdos_set_first_cluster_num(parent_loc->mt_entry, fat_fd);
if (rc != RC_OK)
goto error;
fat_file_close(parent_loc->mt_entry, fat_fd);
13ab58: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
13ab5d: eb c5 jmp 13ab24 <msdos_creat_node+0x24c><== NOT EXECUTED
13ab5f: 90 nop <== NOT EXECUTED
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
13ab60: 8b 52 24 mov 0x24(%edx),%edx <== NOT EXECUTED
13ab63: 85 d2 test %edx,%edx <== NOT EXECUTED
13ab65: 0f 85 1b ff ff ff jne 13aa86 <msdos_creat_node+0x1ae><== NOT EXECUTED
(fs_info->fat.vol.type & FAT_FAT32))
13ab6b: 8b 8d 40 ff ff ff mov -0xc0(%ebp),%ecx <== NOT EXECUTED
13ab71: f6 41 0a 04 testb $0x4,0xa(%ecx) <== NOT EXECUTED
13ab75: 0f 84 0b ff ff ff je 13aa86 <msdos_creat_node+0x1ae><== NOT EXECUTED
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
13ab7b: 66 c7 45 8a 00 00 movw $0x0,-0x76(%ebp) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
13ab81: 66 c7 45 84 00 00 movw $0x0,-0x7c(%ebp) <== NOT EXECUTED
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
13ab87: e9 0e ff ff ff jmp 13aa9a <msdos_creat_node+0x1c2><== NOT EXECUTED
* node to the newly created
*/
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
13ab8c: 8b 4d 1c mov 0x1c(%ebp),%ecx <== NOT EXECUTED
13ab8f: 8b 51 20 mov 0x20(%ecx),%edx <== NOT EXECUTED
13ab92: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13ab95: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED
13ab98: 89 85 38 ff ff ff mov %eax,-0xc8(%ebp) <== NOT EXECUTED
fat_cluster_num_to_sector_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
13ab9e: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
13aba1: 85 d2 test %edx,%edx <== NOT EXECUTED
13aba3: 0f 85 97 00 00 00 jne 13ac40 <msdos_creat_node+0x368><== NOT EXECUTED
13aba9: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED
13abad: 0f 84 8d 00 00 00 je 13ac40 <msdos_creat_node+0x368><== NOT EXECUTED
return fs_info->vol.rdir_loc;
13abb3: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
13abb6: 8b 45 1c mov 0x1c(%ebp),%eax <== NOT EXECUTED
13abb9: 8b 40 24 mov 0x24(%eax),%eax <== NOT EXECUTED
13abbc: 89 85 3c ff ff ff mov %eax,-0xc4(%ebp) <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_read(parent_loc->mt_entry,
13abc2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13abc5: 8d 45 90 lea -0x70(%ebp),%eax <== NOT EXECUTED
13abc8: 50 push %eax <== NOT EXECUTED
13abc9: 6a 20 push $0x20 <== NOT EXECUTED
13abcb: 8b 8d 40 ff ff ff mov -0xc0(%ebp),%ecx <== NOT EXECUTED
13abd1: 0f b7 01 movzwl (%ecx),%eax <== NOT EXECUTED
13abd4: 48 dec %eax <== NOT EXECUTED
13abd5: 23 85 3c ff ff ff and -0xc4(%ebp),%eax <== NOT EXECUTED
13abdb: 50 push %eax <== NOT EXECUTED
13abdc: 0f b6 49 02 movzbl 0x2(%ecx),%ecx <== NOT EXECUTED
13abe0: 8b 85 3c ff ff ff mov -0xc4(%ebp),%eax <== NOT EXECUTED
13abe6: d3 e8 shr %cl,%eax <== NOT EXECUTED
13abe8: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED
13abeb: 50 push %eax <== NOT EXECUTED
13abec: ff b5 38 ff ff ff pushl -0xc8(%ebp) <== NOT EXECUTED
13abf2: e8 a5 13 ff ff call 12bf9c <_fat_block_read> <== NOT EXECUTED
sec, byte, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
link_node);
if (ret < 0) {
13abf7: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13abfa: 85 c0 test %eax,%eax <== NOT EXECUTED
13abfc: 0f 88 e6 fd ff ff js 13a9e8 <msdos_creat_node+0x110><== NOT EXECUTED
return -1;
}
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
13ac02: 8a 45 9b mov -0x65(%ebp),%al <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
13ac05: 8a 55 9d mov -0x63(%ebp),%dl <== NOT EXECUTED
13ac08: 88 55 bd mov %dl,-0x43(%ebp) <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
13ac0b: 66 8b 55 9e mov -0x62(%ebp),%dx <== NOT EXECUTED
13ac0f: 66 89 55 be mov %dx,-0x42(%ebp) <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
13ac13: 8b 55 a0 mov -0x60(%ebp),%edx <== NOT EXECUTED
13ac16: 66 89 55 c0 mov %dx,-0x40(%ebp) <== NOT EXECUTED
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
13ac1a: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED
13ac1d: 89 17 mov %edx,(%edi) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
13ac1f: 66 8b 55 aa mov -0x56(%ebp),%dx <== NOT EXECUTED
13ac23: 66 89 55 ca mov %dx,-0x36(%ebp) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
13ac27: 8b 55 a4 mov -0x5c(%ebp),%edx <== NOT EXECUTED
13ac2a: 66 89 55 c4 mov %dx,-0x3c(%ebp) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
13ac2e: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
13ac31: 88 45 bb mov %al,-0x45(%ebp) <== NOT EXECUTED
/*
* set "last access" date to today
*/
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
13ac34: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13ac37: 66 89 45 c2 mov %ax,-0x3e(%ebp) <== NOT EXECUTED
13ac3b: e9 76 fd ff ff jmp 13a9b6 <msdos_creat_node+0xde> <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
13ac40: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED
13ac43: 0f b6 48 05 movzbl 0x5(%eax),%ecx <== NOT EXECUTED
13ac47: d3 e2 shl %cl,%edx <== NOT EXECUTED
13ac49: 03 50 30 add 0x30(%eax),%edx <== NOT EXECUTED
13ac4c: e9 65 ff ff ff jmp 13abb6 <msdos_creat_node+0x2de><== NOT EXECUTED
/* write first cluster num of a new directory to disk */
rc = msdos_set_first_cluster_num(parent_loc->mt_entry, fat_fd);
if (rc != RC_OK)
goto error;
fat_file_close(parent_loc->mt_entry, fat_fd);
13ac51: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13ac54: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13ac57: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13ac5a: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED
13ac5d: e8 4e 08 ff ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
13ac62: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ac65: e9 72 fd ff ff jmp 13a9dc <msdos_creat_node+0x104><== NOT EXECUTED
00145ff8 <msdos_date_dos2unix>:
* called from the stat(), and fstat() system calls and so probably need
* not be too efficient.
*/
unsigned int
msdos_date_dos2unix(unsigned int dd, unsigned int dt)
{
145ff8: 55 push %ebp <== NOT EXECUTED
145ff9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
145ffb: 57 push %edi <== NOT EXECUTED
145ffc: 56 push %esi <== NOT EXECUTED
145ffd: 53 push %ebx <== NOT EXECUTED
145ffe: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
146001: 0f b7 05 e4 4a 17 00 movzwl 0x174ae4,%eax <== NOT EXECUTED
146008: 39 f8 cmp %edi,%eax <== NOT EXECUTED
14600a: 0f 84 dc 00 00 00 je 1460ec <msdos_date_dos2unix+0xf4><== NOT EXECUTED
lastdosdate = dd;
146010: 66 89 3d e4 4a 17 00 mov %di,0x174ae4 <== NOT EXECUTED
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
146017: 89 fb mov %edi,%ebx <== NOT EXECUTED
146019: 81 e3 00 fe 00 00 and $0xfe00,%ebx <== NOT EXECUTED
for (y = 0; y < year; y++)
14601f: c1 eb 09 shr $0x9,%ebx <== NOT EXECUTED
146022: 0f 84 cb 00 00 00 je 1460f3 <msdos_date_dos2unix+0xfb><== NOT EXECUTED
146028: 31 c0 xor %eax,%eax <== NOT EXECUTED
14602a: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
14602c: ba 6e 01 00 00 mov $0x16e,%edx <== NOT EXECUTED
146031: eb 13 jmp 146046 <msdos_date_dos2unix+0x4e><== NOT EXECUTED
146033: 90 nop <== NOT EXECUTED
days += y & 0x03 ? 365 : 366;
146034: 89 ca mov %ecx,%edx <== NOT EXECUTED
146036: 83 e2 03 and $0x3,%edx <== NOT EXECUTED
146039: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
14603c: 19 d2 sbb %edx,%edx <== NOT EXECUTED
14603e: f7 d2 not %edx <== NOT EXECUTED
146040: 81 c2 6e 01 00 00 add $0x16e,%edx <== NOT EXECUTED
146046: 01 d0 add %edx,%eax <== NOT EXECUTED
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
146048: 41 inc %ecx <== NOT EXECUTED
146049: 39 cb cmp %ecx,%ebx <== NOT EXECUTED
14604b: 77 e7 ja 146034 <msdos_date_dos2unix+0x3c><== NOT EXECUTED
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
14604d: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED
146050: 0f 84 8a 00 00 00 je 1460e0 <msdos_date_dos2unix+0xe8><== NOT EXECUTED
146056: bb 18 fb 16 00 mov $0x16fb18,%ebx <== NOT EXECUTED
/*
* Prevent going from 0 to 0xffffffff in the following
* loop.
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
14605b: 89 fe mov %edi,%esi <== NOT EXECUTED
14605d: 81 e6 e0 01 00 00 and $0x1e0,%esi <== NOT EXECUTED
if (month == 0) {
146063: c1 ee 05 shr $0x5,%esi <== NOT EXECUTED
146066: 74 13 je 14607b <msdos_date_dos2unix+0x83><== NOT EXECUTED
month = 1;
}
for (m = 0; m < month - 1; m++)
146068: 4e dec %esi <== NOT EXECUTED
146069: 74 10 je 14607b <msdos_date_dos2unix+0x83><== NOT EXECUTED
14606b: 31 d2 xor %edx,%edx <== NOT EXECUTED
14606d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
days += months[m];
146070: 0f b7 0c 53 movzwl (%ebx,%edx,2),%ecx <== NOT EXECUTED
146074: 01 c8 add %ecx,%eax <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
146076: 42 inc %edx <== NOT EXECUTED
146077: 39 f2 cmp %esi,%edx <== NOT EXECUTED
146079: 72 f5 jb 146070 <msdos_date_dos2unix+0x78><== NOT EXECUTED
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
14607b: 83 e7 1f and $0x1f,%edi <== NOT EXECUTED
14607e: 8d 54 38 ff lea -0x1(%eax,%edi,1),%edx <== NOT EXECUTED
146082: 8d 04 92 lea (%edx,%edx,4),%eax <== NOT EXECUTED
146085: 8d 04 82 lea (%edx,%eax,4),%eax <== NOT EXECUTED
146088: 8d 04 c2 lea (%edx,%eax,8),%eax <== NOT EXECUTED
14608b: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
14608e: 29 d0 sub %edx,%eax <== NOT EXECUTED
146090: c1 e0 07 shl $0x7,%eax <== NOT EXECUTED
146093: 05 00 a6 ce 12 add $0x12cea600,%eax <== NOT EXECUTED
146098: a3 e8 4a 17 00 mov %eax,0x174ae8 <== NOT EXECUTED
14609d: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
1460a0: 81 e2 00 f8 00 00 and $0xf800,%edx <== NOT EXECUTED
1460a6: c1 ea 0b shr $0xb,%edx <== NOT EXECUTED
1460a9: 8d 14 52 lea (%edx,%edx,2),%edx <== NOT EXECUTED
1460ac: 8d 0c 92 lea (%edx,%edx,4),%ecx <== NOT EXECUTED
1460af: 89 ca mov %ecx,%edx <== NOT EXECUTED
1460b1: c1 e2 04 shl $0x4,%edx <== NOT EXECUTED
1460b4: 29 ca sub %ecx,%edx <== NOT EXECUTED
1460b6: c1 e2 04 shl $0x4,%edx <== NOT EXECUTED
1460b9: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
1460bc: 81 e1 e0 07 00 00 and $0x7e0,%ecx <== NOT EXECUTED
1460c2: c1 e9 05 shr $0x5,%ecx <== NOT EXECUTED
1460c5: 8d 0c 49 lea (%ecx,%ecx,2),%ecx <== NOT EXECUTED
1460c8: 8d 0c 89 lea (%ecx,%ecx,4),%ecx <== NOT EXECUTED
1460cb: 8d 0c 8a lea (%edx,%ecx,4),%ecx <== NOT EXECUTED
1460ce: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
1460d1: 83 e2 1f and $0x1f,%edx <== NOT EXECUTED
1460d4: 8d 14 11 lea (%ecx,%edx,1),%edx <== NOT EXECUTED
1460d7: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED
}
return seconds + lastseconds;
}
1460da: 5b pop %ebx <== NOT EXECUTED
1460db: 5e pop %esi <== NOT EXECUTED
1460dc: 5f pop %edi <== NOT EXECUTED
1460dd: c9 leave <== NOT EXECUTED
1460de: c3 ret <== NOT EXECUTED
1460df: 90 nop <== NOT EXECUTED
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
1460e0: bb 30 fb 16 00 mov $0x16fb30,%ebx <== NOT EXECUTED
1460e5: e9 71 ff ff ff jmp 14605b <msdos_date_dos2unix+0x63><== NOT EXECUTED
1460ea: 66 90 xchg %ax,%ax <== NOT EXECUTED
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
1460ec: a1 e8 4a 17 00 mov 0x174ae8,%eax <== NOT EXECUTED
1460f1: eb aa jmp 14609d <msdos_date_dos2unix+0xa5><== NOT EXECUTED
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
1460f3: 31 c0 xor %eax,%eax <== NOT EXECUTED
1460f5: bb 30 fb 16 00 mov $0x16fb30,%ebx <== NOT EXECUTED
1460fa: e9 5c ff ff ff jmp 14605b <msdos_date_dos2unix+0x63><== NOT EXECUTED
00145ed4 <msdos_date_unix2dos>:
* file timestamps. The passed in unix time is assumed to be in GMT.
*/
void
msdos_date_unix2dos(unsigned int t, uint16_t *ddp,
uint16_t *dtp)
{
145ed4: 55 push %ebp <== NOT EXECUTED
145ed5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
145ed7: 57 push %edi <== NOT EXECUTED
145ed8: 56 push %esi <== NOT EXECUTED
145ed9: 53 push %ebx <== NOT EXECUTED
145eda: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
145edd: 39 0d d8 4a 17 00 cmp %ecx,0x174ad8 <== NOT EXECUTED
145ee3: 0f 84 f3 00 00 00 je 145fdc <msdos_date_unix2dos+0x108><== NOT EXECUTED
lasttime = t;
145ee9: 89 0d d8 4a 17 00 mov %ecx,0x174ad8 <== NOT EXECUTED
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
145eef: be 89 88 88 88 mov $0x88888889,%esi <== NOT EXECUTED
145ef4: 89 c8 mov %ecx,%eax <== NOT EXECUTED
145ef6: f7 e6 mul %esi <== NOT EXECUTED
145ef8: 89 d3 mov %edx,%ebx <== NOT EXECUTED
145efa: c1 eb 05 shr $0x5,%ebx <== NOT EXECUTED
145efd: 89 d8 mov %ebx,%eax <== NOT EXECUTED
145eff: f7 e6 mul %esi <== NOT EXECUTED
145f01: c1 ea 05 shr $0x5,%edx <== NOT EXECUTED
145f04: 8d 04 52 lea (%edx,%edx,2),%eax <== NOT EXECUTED
145f07: 8d 04 80 lea (%eax,%eax,4),%eax <== NOT EXECUTED
145f0a: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
145f0d: 29 c3 sub %eax,%ebx <== NOT EXECUTED
145f0f: c1 e3 05 shl $0x5,%ebx <== NOT EXECUTED
145f12: ba c5 b3 a2 91 mov $0x91a2b3c5,%edx <== NOT EXECUTED
145f17: 89 c8 mov %ecx,%eax <== NOT EXECUTED
145f19: f7 e2 mul %edx <== NOT EXECUTED
145f1b: c1 ea 0b shr $0xb,%edx <== NOT EXECUTED
145f1e: be 18 00 00 00 mov $0x18,%esi <== NOT EXECUTED
145f23: 89 d0 mov %edx,%eax <== NOT EXECUTED
145f25: 31 d2 xor %edx,%edx <== NOT EXECUTED
145f27: f7 f6 div %esi <== NOT EXECUTED
145f29: c1 e2 0b shl $0xb,%edx <== NOT EXECUTED
145f2c: 01 d3 add %edx,%ebx <== NOT EXECUTED
145f2e: 66 be 3c 00 mov $0x3c,%si <== NOT EXECUTED
145f32: 89 c8 mov %ecx,%eax <== NOT EXECUTED
145f34: 31 d2 xor %edx,%edx <== NOT EXECUTED
145f36: f7 f6 div %esi <== NOT EXECUTED
145f38: d1 ea shr %edx <== NOT EXECUTED
145f3a: 01 d3 add %edx,%ebx <== NOT EXECUTED
145f3c: 66 89 1d e2 4a 17 00 mov %bx,0x174ae2 <== NOT EXECUTED
/*
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
145f43: ba 07 45 2e c2 mov $0xc22e4507,%edx <== NOT EXECUTED
145f48: 89 c8 mov %ecx,%eax <== NOT EXECUTED
145f4a: f7 e2 mul %edx <== NOT EXECUTED
145f4c: c1 ea 10 shr $0x10,%edx <== NOT EXECUTED
if (days != lastday) {
145f4f: 3b 15 dc 4a 17 00 cmp 0x174adc,%edx <== NOT EXECUTED
145f55: 0f 84 91 00 00 00 je 145fec <msdos_date_unix2dos+0x118><== NOT EXECUTED
lastday = days;
145f5b: 89 15 dc 4a 17 00 mov %edx,0x174adc <== NOT EXECUTED
145f61: be b2 07 00 00 mov $0x7b2,%esi <== NOT EXECUTED
145f66: eb 03 jmp 145f6b <msdos_date_unix2dos+0x97><== NOT EXECUTED
for (year = 1970;; year++) {
inc = year & 0x03 ? 365 : 366;
if (days < inc)
break;
days -= inc;
145f68: 29 c2 sub %eax,%edx <== NOT EXECUTED
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
lastday = days;
for (year = 1970;; year++) {
145f6a: 46 inc %esi <== NOT EXECUTED
inc = year & 0x03 ? 365 : 366;
145f6b: 89 f1 mov %esi,%ecx <== NOT EXECUTED
145f6d: 83 e1 03 and $0x3,%ecx <== NOT EXECUTED
145f70: 83 f9 01 cmp $0x1,%ecx <== NOT EXECUTED
145f73: 19 c0 sbb %eax,%eax <== NOT EXECUTED
145f75: f7 d0 not %eax <== NOT EXECUTED
145f77: 05 6e 01 00 00 add $0x16e,%eax <== NOT EXECUTED
if (days < inc)
145f7c: 39 c2 cmp %eax,%edx <== NOT EXECUTED
145f7e: 73 e8 jae 145f68 <msdos_date_unix2dos+0x94><== NOT EXECUTED
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
145f80: 85 c9 test %ecx,%ecx <== NOT EXECUTED
145f82: 74 50 je 145fd4 <msdos_date_unix2dos+0x100><== NOT EXECUTED
145f84: bf 18 fb 16 00 mov $0x16fb18,%edi <== NOT EXECUTED
145f89: 31 c0 xor %eax,%eax <== NOT EXECUTED
145f8b: 90 nop <== NOT EXECUTED
for (month = 0; month < 12; month++) {
if (days < months[month])
145f8c: 0f b7 0c 47 movzwl (%edi,%eax,2),%ecx <== NOT EXECUTED
145f90: 39 d1 cmp %edx,%ecx <== NOT EXECUTED
145f92: 77 08 ja 145f9c <msdos_date_unix2dos+0xc8><== NOT EXECUTED
break;
days -= months[month];
145f94: 29 ca sub %ecx,%edx <== NOT EXECUTED
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
145f96: 40 inc %eax <== NOT EXECUTED
145f97: 83 f8 0c cmp $0xc,%eax <== NOT EXECUTED
145f9a: 75 f0 jne 145f8c <msdos_date_unix2dos+0xb8><== NOT EXECUTED
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
145f9c: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
145f9f: 8d 54 10 21 lea 0x21(%eax,%edx,1),%edx <== NOT EXECUTED
145fa3: 66 89 15 e0 4a 17 00 mov %dx,0x174ae0 <== NOT EXECUTED
* Remember dos's idea of time is relative to 1980.
* unix's is relative to 1970. If somehow we get a
* time before 1980 then don't give totally crazy
* results.
*/
if (year > 1980)
145faa: 81 fe bc 07 00 00 cmp $0x7bc,%esi <== NOT EXECUTED
145fb0: 76 11 jbe 145fc3 <msdos_date_unix2dos+0xef><== NOT EXECUTED
lastddate += (year - 1980) <<
145fb2: c1 e6 09 shl $0x9,%esi <== NOT EXECUTED
145fb5: 8d 94 16 00 88 ff ff lea -0x7800(%esi,%edx,1),%edx <== NOT EXECUTED
145fbc: 66 89 15 e0 4a 17 00 mov %dx,0x174ae0 <== NOT EXECUTED
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
145fc3: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
145fc6: 66 89 18 mov %bx,(%eax) <== NOT EXECUTED
*ddp = lastddate;
145fc9: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
145fcc: 66 89 10 mov %dx,(%eax) <== NOT EXECUTED
}
145fcf: 5b pop %ebx <== NOT EXECUTED
145fd0: 5e pop %esi <== NOT EXECUTED
145fd1: 5f pop %edi <== NOT EXECUTED
145fd2: c9 leave <== NOT EXECUTED
145fd3: c3 ret <== NOT EXECUTED
inc = year & 0x03 ? 365 : 366;
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
145fd4: bf 30 fb 16 00 mov $0x16fb30,%edi <== NOT EXECUTED
145fd9: eb ae jmp 145f89 <msdos_date_unix2dos+0xb5><== NOT EXECUTED
145fdb: 90 nop <== NOT EXECUTED
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
145fdc: 66 8b 1d e2 4a 17 00 mov 0x174ae2,%bx <== NOT EXECUTED
145fe3: 66 8b 15 e0 4a 17 00 mov 0x174ae0,%dx <== NOT EXECUTED
145fea: eb d7 jmp 145fc3 <msdos_date_unix2dos+0xef><== NOT EXECUTED
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
145fec: 66 8b 15 e0 4a 17 00 mov 0x174ae0,%dx <== NOT EXECUTED
145ff3: eb ce jmp 145fc3 <msdos_date_unix2dos+0xef><== NOT EXECUTED
00146234 <msdos_dir_chmod>:
* RC_OK always
*/
int
msdos_dir_chmod(rtems_filesystem_location_info_t *pathloc,
mode_t mode)
{
146234: 55 push %ebp <== NOT EXECUTED
146235: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return RC_OK;
}
146237: 31 c0 xor %eax,%eax <== NOT EXECUTED
146239: c9 leave <== NOT EXECUTED
14623a: c3 ret <== NOT EXECUTED
00146b8c <msdos_dir_close>:
* RC_OK, if directory closed successfully, or -1 if error occured (errno
* set apropriately.
*/
int
msdos_dir_close(rtems_libio_t *iop)
{
146b8c: 55 push %ebp <== NOT EXECUTED
146b8d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
146b8f: 57 push %edi <== NOT EXECUTED
146b90: 56 push %esi <== NOT EXECUTED
146b91: 53 push %ebx <== NOT EXECUTED
146b92: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
146b95: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
146b98: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
146b9b: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
146b9e: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
146ba1: 6a 00 push $0x0 <== NOT EXECUTED
146ba3: 6a 00 push $0x0 <== NOT EXECUTED
146ba5: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
146bab: e8 48 c3 fc ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
146bb0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
146bb3: 85 c0 test %eax,%eax <== NOT EXECUTED
146bb5: 75 29 jne 146be0 <msdos_dir_close+0x54> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
146bb7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
146bba: 57 push %edi <== NOT EXECUTED
146bbb: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
146bbe: e8 ed 48 fe ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
146bc3: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc != RC_OK)
146bc5: 58 pop %eax <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rtems_semaphore_release(fs_info->vol_sema);
146bc6: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
146bcc: e8 23 c4 fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return RC_OK;
146bd1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
146bd4: 89 d8 mov %ebx,%eax <== NOT EXECUTED
146bd6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
146bd9: 5b pop %ebx <== NOT EXECUTED
146bda: 5e pop %esi <== NOT EXECUTED
146bdb: 5f pop %edi <== NOT EXECUTED
146bdc: c9 leave <== NOT EXECUTED
146bdd: c3 ret <== NOT EXECUTED
146bde: 66 90 xchg %ax,%ax <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
146be0: e8 9b 0f 00 00 call 147b80 <__errno> <== NOT EXECUTED
146be5: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
146beb: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
146bf0: eb e2 jmp 146bd4 <msdos_dir_close+0x48> <== NOT EXECUTED
0013c330 <msdos_dir_is_empty>:
msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
13c330: 55 push %ebp <== NOT EXECUTED
13c331: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13c333: 57 push %edi <== NOT EXECUTED
13c334: 56 push %esi <== NOT EXECUTED
13c335: 53 push %ebx <== NOT EXECUTED
13c336: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
13c339: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13c33c: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
13c33f: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
13c342: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
13c345: c6 00 00 movb $0x0,(%eax) <== NOT EXECUTED
13c348: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13c34b: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
13c351: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
13c354: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
13c35b: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13c35e: 0f b7 00 movzwl (%eax),%eax <== NOT EXECUTED
13c361: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
while ((ret = fat_file_read(mt_entry, fat_fd, j * fs_info->fat.vol.bps,
13c364: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13c367: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
13c36a: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13c36d: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13c370: 0f af 45 d8 imul -0x28(%ebp),%eax <== NOT EXECUTED
13c374: 50 push %eax <== NOT EXECUTED
13c375: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13c378: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13c37b: e8 2c ef fe ff call 12b2ac <fat_file_read> <== NOT EXECUTED
13c380: 89 c7 mov %eax,%edi <== NOT EXECUTED
13c382: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13c385: 85 c0 test %eax,%eax <== NOT EXECUTED
13c387: 0f 84 b1 00 00 00 je 13c43e <msdos_dir_is_empty+0x10e><== NOT EXECUTED
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
13c38d: 83 ff 1f cmp $0x1f,%edi <== NOT EXECUTED
13c390: 0f 8e b0 00 00 00 jle 13c446 <msdos_dir_is_empty+0x116><== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
13c396: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13c399: 0f b7 00 movzwl (%eax),%eax <== NOT EXECUTED
13c39c: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
13c39f: 39 c7 cmp %eax,%edi <== NOT EXECUTED
13c3a1: 0f 85 a6 00 00 00 jne 13c44d <msdos_dir_is_empty+0x11d><== NOT EXECUTED
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
13c3a7: 85 c0 test %eax,%eax <== NOT EXECUTED
13c3a9: 0f 84 81 00 00 00 je 13c430 <msdos_dir_is_empty+0x100><== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
assert(ret == fs_info->fat.vol.bps);
13c3af: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13c3b2: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
13c3b8: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
13c3bb: 89 c3 mov %eax,%ebx <== NOT EXECUTED
13c3bd: 31 f6 xor %esi,%esi <== NOT EXECUTED
13c3bf: 90 nop <== NOT EXECUTED
* then consider it as empty.
*
* Just ignore long file name entries. They must have a short entry to
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
13c3c0: 80 3b e5 cmpb $0xe5,(%ebx) <== NOT EXECUTED
13c3c3: 74 47 je 13c40c <msdos_dir_is_empty+0xdc><== NOT EXECUTED
13c3c5: 0f b6 43 0b movzbl 0xb(%ebx),%eax <== NOT EXECUTED
13c3c9: 83 e0 3f and $0x3f,%eax <== NOT EXECUTED
13c3cc: 83 f8 0f cmp $0xf,%eax <== NOT EXECUTED
13c3cf: 74 3b je 13c40c <msdos_dir_is_empty+0xdc><== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
13c3d1: 51 push %ecx <== NOT EXECUTED
13c3d2: 6a 0b push $0xb <== NOT EXECUTED
13c3d4: ff 35 c4 fa 16 00 pushl 0x16fac4 <== NOT EXECUTED
13c3da: 53 push %ebx <== NOT EXECUTED
13c3db: e8 b4 14 01 00 call 14d894 <strncmp> <== NOT EXECUTED
13c3e0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
* then consider it as empty.
*
* Just ignore long file name entries. They must have a short entry to
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
13c3e3: 85 c0 test %eax,%eax <== NOT EXECUTED
13c3e5: 74 25 je 13c40c <msdos_dir_is_empty+0xdc><== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
13c3e7: 52 push %edx <== NOT EXECUTED
13c3e8: 6a 0b push $0xb <== NOT EXECUTED
13c3ea: ff 35 c8 fa 16 00 pushl 0x16fac8 <== NOT EXECUTED
13c3f0: 53 push %ebx <== NOT EXECUTED
13c3f1: e8 9e 14 01 00 call 14d894 <strncmp> <== NOT EXECUTED
13c3f6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
* then consider it as empty.
*
* Just ignore long file name entries. They must have a short entry to
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
13c3f9: 85 c0 test %eax,%eax <== NOT EXECUTED
13c3fb: 74 0f je 13c40c <msdos_dir_is_empty+0xdc><== NOT EXECUTED
continue;
/*
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
13c3fd: 80 3b 00 cmpb $0x0,(%ebx) <== NOT EXECUTED
13c400: 74 1e je 13c420 <msdos_dir_is_empty+0xf0><== NOT EXECUTED
*/
return RC_OK;
}
j++;
}
*ret_val = true;
13c402: 31 c0 xor %eax,%eax <== NOT EXECUTED
return RC_OK;
}
13c404: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13c407: 5b pop %ebx <== NOT EXECUTED
13c408: 5e pop %esi <== NOT EXECUTED
13c409: 5f pop %edi <== NOT EXECUTED
13c40a: c9 leave <== NOT EXECUTED
13c40b: c3 ret <== NOT EXECUTED
assert(ret == fs_info->fat.vol.bps);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
i < fs_info->fat.vol.bps;
i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
13c40c: 83 c6 20 add $0x20,%esi <== NOT EXECUTED
13c40f: 83 c3 20 add $0x20,%ebx <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
13c412: 39 f7 cmp %esi,%edi <== NOT EXECUTED
13c414: 77 aa ja 13c3c0 <msdos_dir_is_empty+0x90><== NOT EXECUTED
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
13c416: ff 45 d8 incl -0x28(%ebp) <== NOT EXECUTED
13c419: e9 46 ff ff ff jmp 13c364 <msdos_dir_is_empty+0x34><== NOT EXECUTED
13c41e: 66 90 xchg %ax,%ax <== NOT EXECUTED
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
13c420: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
13c423: c6 00 01 movb $0x1,(%eax) <== NOT EXECUTED
13c426: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
j++;
}
*ret_val = true;
return RC_OK;
}
13c428: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13c42b: 5b pop %ebx <== NOT EXECUTED
13c42c: 5e pop %esi <== NOT EXECUTED
13c42d: 5f pop %edi <== NOT EXECUTED
13c42e: c9 leave <== NOT EXECUTED
13c42f: c3 ret <== NOT EXECUTED
*/
if ((*MSDOS_DIR_NAME(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
return RC_OK;
13c430: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13c433: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
13c439: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
13c43c: eb d8 jmp 13c416 <msdos_dir_is_empty+0xe6><== NOT EXECUTED
*/
return RC_OK;
}
j++;
}
*ret_val = true;
13c43e: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
13c441: c6 00 01 movb $0x1,(%eax) <== NOT EXECUTED
13c444: eb bc jmp 13c402 <msdos_dir_is_empty+0xd2><== NOT EXECUTED
while ((ret = fat_file_read(mt_entry, fat_fd, j * fs_info->fat.vol.bps,
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
13c446: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
13c44b: eb b7 jmp 13c404 <msdos_dir_is_empty+0xd4><== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
13c44d: 68 d3 8f 16 00 push $0x168fd3 <== NOT EXECUTED
13c452: 68 cc 90 16 00 push $0x1690cc <== NOT EXECUTED
13c457: 68 b5 03 00 00 push $0x3b5 <== NOT EXECUTED
13c45c: 68 20 90 16 00 push $0x169020 <== NOT EXECUTED
13c461: e8 7e 1d fd ff call 10e1e4 <__assert_func> <== NOT EXECUTED
0014623c <msdos_dir_lseek>:
* RC_OK on success, or -1 if error occured (errno
* set apropriately).
*/
rtems_off64_t
msdos_dir_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
14623c: 55 push %ebp <== NOT EXECUTED
14623d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14623f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
switch (whence)
146242: 83 7d 14 01 cmpl $0x1,0x14(%ebp) <== NOT EXECUTED
146246: 76 18 jbe 146260 <msdos_dir_lseek+0x24> <== NOT EXECUTED
* Movement past the end of the directory via lseek is not a
* permitted operation
*/
case SEEK_END:
default:
rtems_set_errno_and_return_minus_one( EINVAL );
146248: e8 33 19 00 00 call 147b80 <__errno> <== NOT EXECUTED
14624d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
146253: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
146258: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
break;
}
return RC_OK;
}
14625d: c9 leave <== NOT EXECUTED
14625e: c3 ret <== NOT EXECUTED
14625f: 90 nop <== NOT EXECUTED
* set apropriately).
*/
rtems_off64_t
msdos_dir_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
switch (whence)
146260: 31 c0 xor %eax,%eax <== NOT EXECUTED
146262: 31 d2 xor %edx,%edx <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return RC_OK;
}
146264: c9 leave <== NOT EXECUTED
146265: c3 ret <== NOT EXECUTED
00146bf4 <msdos_dir_open>:
* set apropriately)
*/
int
msdos_dir_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
146bf4: 55 push %ebp <== NOT EXECUTED
146bf5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
146bf7: 57 push %edi <== NOT EXECUTED
146bf8: 56 push %esi <== NOT EXECUTED
146bf9: 53 push %ebx <== NOT EXECUTED
146bfa: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
146bfd: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
146c00: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
146c03: 8b 78 34 mov 0x34(%eax),%edi <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
146c06: 8b 73 38 mov 0x38(%ebx),%esi <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
146c09: 6a 00 push $0x0 <== NOT EXECUTED
146c0b: 6a 00 push $0x0 <== NOT EXECUTED
146c0d: ff b7 94 00 00 00 pushl 0x94(%edi) <== NOT EXECUTED
146c13: e8 e0 c2 fc ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
146c18: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
146c1b: 85 c0 test %eax,%eax <== NOT EXECUTED
146c1d: 75 3d jne 146c5c <msdos_dir_open+0x68> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_reopen(fat_fd);
146c1f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
146c22: 56 push %esi <== NOT EXECUTED
146c23: e8 24 3e fe ff call 12aa4c <fat_file_reopen> <== NOT EXECUTED
146c28: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc != RC_OK)
146c2a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
146c2d: 85 c0 test %eax,%eax <== NOT EXECUTED
146c2f: 75 0e jne 146c3f <msdos_dir_open+0x4b> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
iop->offset = 0;
146c31: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) <== NOT EXECUTED
146c38: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
146c3f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
146c42: ff b7 94 00 00 00 pushl 0x94(%edi) <== NOT EXECUTED
146c48: e8 a7 c3 fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return RC_OK;
146c4d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
146c50: 89 f0 mov %esi,%eax <== NOT EXECUTED
146c52: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
146c55: 5b pop %ebx <== NOT EXECUTED
146c56: 5e pop %esi <== NOT EXECUTED
146c57: 5f pop %edi <== NOT EXECUTED
146c58: c9 leave <== NOT EXECUTED
146c59: c3 ret <== NOT EXECUTED
146c5a: 66 90 xchg %ax,%ax <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
146c5c: e8 1f 0f 00 00 call 147b80 <__errno> <== NOT EXECUTED
146c61: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
146c67: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
146c6c: eb e2 jmp 146c50 <msdos_dir_open+0x5c> <== NOT EXECUTED
001464b0 <msdos_dir_read>:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
1464b0: 55 push %ebp <== NOT EXECUTED
1464b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1464b3: 57 push %edi <== NOT EXECUTED
1464b4: 56 push %esi <== NOT EXECUTED
1464b5: 53 push %ebx <== NOT EXECUTED
1464b6: 81 ec 8c 01 00 00 sub $0x18c,%esp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
1464bc: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
1464bf: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED
1464c2: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
1464c5: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp) <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
1464cb: 8b 4a 38 mov 0x38(%edx),%ecx <== NOT EXECUTED
1464ce: 89 8d 88 fe ff ff mov %ecx,-0x178(%ebp) <== NOT EXECUTED
/*
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
1464d4: 8b 5a 0c mov 0xc(%edx),%ebx <== NOT EXECUTED
1464d7: 8b 72 10 mov 0x10(%edx),%esi <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
1464da: 83 79 20 01 cmpl $0x1,0x20(%ecx) <== NOT EXECUTED
1464de: 0f 84 0a 05 00 00 je 1469ee <msdos_dir_read+0x53e> <== NOT EXECUTED
1464e4: 8b 85 b4 fe ff ff mov -0x14c(%ebp),%eax <== NOT EXECUTED
1464ea: 0f b7 40 06 movzwl 0x6(%eax),%eax <== NOT EXECUTED
1464ee: 89 85 84 fe ff ff mov %eax,-0x17c(%ebp) <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
1464f4: 8b 95 b4 fe ff ff mov -0x14c(%ebp),%edx <== NOT EXECUTED
1464fa: 8b 82 94 00 00 00 mov 0x94(%edx),%eax <== NOT EXECUTED
uint32_t start = 0;
ssize_t ret = 0;
uint32_t cmpltd = 0;
uint32_t j = 0, i = 0;
uint32_t bts2rd = 0;
uint32_t cur_cln = 0;
146500: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
fat_file_fd_t *tmp_fat_fd = NULL;
146507: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
14650e: 52 push %edx <== NOT EXECUTED
14650f: 6a 00 push $0x0 <== NOT EXECUTED
146511: 6a 00 push $0x0 <== NOT EXECUTED
146513: 50 push %eax <== NOT EXECUTED
146514: e8 df c9 fc ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
146519: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14651c: 85 c0 test %eax,%eax <== NOT EXECUTED
14651e: 0f 85 4b 06 00 00 jne 146b6f <msdos_dir_read+0x6bf> <== NOT EXECUTED
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
146524: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx <== NOT EXECUTED
146529: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
14652c: f7 e2 mul %edx <== NOT EXECUTED
14652e: c1 ea 08 shr $0x8,%edx <== NOT EXECUTED
146531: 89 d0 mov %edx,%eax <== NOT EXECUTED
146533: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED
146536: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
146539: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED
14653c: 89 95 98 fe ff ff mov %edx,-0x168(%ebp) <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
146542: 85 d2 test %edx,%edx <== NOT EXECUTED
146544: 0f 84 38 06 00 00 je 146b82 <msdos_dir_read+0x6d2> <== NOT EXECUTED
/*
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
14654a: 6a 00 push $0x0 <== NOT EXECUTED
14654c: 68 10 01 00 00 push $0x110 <== NOT EXECUTED
146551: 56 push %esi <== NOT EXECUTED
146552: 53 push %ebx <== NOT EXECUTED
146553: e8 3c 70 01 00 call 15d594 <__divdi3> <== NOT EXECUTED
146558: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14655b: 89 85 ac fe ff ff mov %eax,-0x154(%ebp) <== NOT EXECUTED
146561: c7 85 8c fe ff ff 00 movl $0x0,-0x174(%ebp) <== NOT EXECUTED
146568: 00 00 00
14656b: c7 85 a4 fe ff ff 00 movl $0x0,-0x15c(%ebp) <== NOT EXECUTED
146572: 00 00 00
146575: c6 85 97 fe ff ff 00 movb $0x0,-0x169(%ebp) <== NOT EXECUTED
14657c: c7 85 a8 fe ff ff ff movl $0xffffffff,-0x158(%ebp) <== NOT EXECUTED
146583: ff ff ff
146586: c7 85 9c fe ff ff 00 movl $0x0,-0x164(%ebp) <== NOT EXECUTED
14658d: 00 00 00
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
146590: 8d 95 c0 fe ff ff lea -0x140(%ebp),%edx <== NOT EXECUTED
146596: 89 95 70 fe ff ff mov %edx,-0x190(%ebp) <== NOT EXECUTED
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
14659c: 8d 8d d0 fe ff ff lea -0x130(%ebp),%ecx <== NOT EXECUTED
1465a2: 89 8d 74 fe ff ff mov %ecx,-0x18c(%ebp) <== NOT EXECUTED
* fat-file is already opened by open call, so read it
* Always read directory fat-file from the beggining because of MSDOS
* directories feature :( - we should count elements currently
* present in the directory because there may be holes :)
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
1465a8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1465ab: 8b 85 b4 fe ff ff mov -0x14c(%ebp),%eax <== NOT EXECUTED
1465b1: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
1465b7: ff b5 84 fe ff ff pushl -0x17c(%ebp) <== NOT EXECUTED
1465bd: ff b5 8c fe ff ff pushl -0x174(%ebp) <== NOT EXECUTED
1465c3: ff b5 88 fe ff ff pushl -0x178(%ebp) <== NOT EXECUTED
1465c9: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
1465cc: ff 72 28 pushl 0x28(%edx) <== NOT EXECUTED
1465cf: e8 d8 4c fe ff call 12b2ac <fat_file_read> <== NOT EXECUTED
1465d4: 89 85 b0 fe ff ff mov %eax,-0x150(%ebp) <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
1465da: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1465dd: 83 f8 1f cmp $0x1f,%eax <== NOT EXECUTED
1465e0: 0f 8e 53 05 00 00 jle 146b39 <msdos_dir_read+0x689> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
1465e6: 8b 8d b4 fe ff ff mov -0x14c(%ebp),%ecx <== NOT EXECUTED
1465ec: 8b 99 98 00 00 00 mov 0x98(%ecx),%ebx <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
1465f2: 8a 03 mov (%ebx),%al <== NOT EXECUTED
1465f4: 84 c0 test %al,%al <== NOT EXECUTED
1465f6: 0f 84 5c 03 00 00 je 146958 <msdos_dir_read+0x4a8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
1465fc: 89 de mov %ebx,%esi <== NOT EXECUTED
1465fe: 31 d2 xor %edx,%edx <== NOT EXECUTED
146600: eb 2f jmp 146631 <msdos_dir_read+0x181> <== NOT EXECUTED
146602: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
146604: 83 e1 3f and $0x3f,%ecx <== NOT EXECUTED
146607: 83 f9 0f cmp $0xf,%ecx <== NOT EXECUTED
14660a: 74 74 je 146680 <msdos_dir_read+0x1d0> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
14660c: 83 c2 20 add $0x20,%edx <== NOT EXECUTED
14660f: 3b 95 b0 fe ff ff cmp -0x150(%ebp),%edx <== NOT EXECUTED
146615: 73 58 jae 14666f <msdos_dir_read+0x1bf> <== NOT EXECUTED
{
char* entry = (char*) fs_info->cl_buf + i;
146617: 89 d6 mov %edx,%esi <== NOT EXECUTED
146619: 8b 8d b4 fe ff ff mov -0x14c(%ebp),%ecx <== NOT EXECUTED
14661f: 03 b1 98 00 00 00 add 0x98(%ecx),%esi <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
146625: 89 f3 mov %esi,%ebx <== NOT EXECUTED
146627: 8a 06 mov (%esi),%al <== NOT EXECUTED
146629: 84 c0 test %al,%al <== NOT EXECUTED
14662b: 0f 84 27 03 00 00 je 146958 <msdos_dir_read+0x4a8> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
146631: 3c e5 cmp $0xe5,%al <== NOT EXECUTED
146633: 74 d7 je 14660c <msdos_dir_read+0x15c> <== NOT EXECUTED
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
146635: 0f b6 4b 0b movzbl 0xb(%ebx),%ecx <== NOT EXECUTED
146639: f6 c1 08 test $0x8,%cl <== NOT EXECUTED
14663c: 75 c6 jne 146604 <msdos_dir_read+0x154> <== NOT EXECUTED
/*
* Check the attribute to see if the entry is for a long file
* name.
*/
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
14663e: 83 e1 3f and $0x3f,%ecx <== NOT EXECUTED
146641: 83 f9 0f cmp $0xf,%ecx <== NOT EXECUTED
146644: 74 3a je 146680 <msdos_dir_read+0x1d0> <== NOT EXECUTED
fat_dir_pos_t dir_pos;
/*
* Skip active entries until get the entry to start from.
*/
if (start)
146646: 8b bd ac fe ff ff mov -0x154(%ebp),%edi <== NOT EXECUTED
14664c: 85 ff test %edi,%edi <== NOT EXECUTED
14664e: 0f 84 8c 00 00 00 je 1466e0 <msdos_dir_read+0x230> <== NOT EXECUTED
{
lfn_start = FAT_FILE_SHORT_NAME;
start--;
146654: ff 8d ac fe ff ff decl -0x154(%ebp) <== NOT EXECUTED
14665a: c7 85 a8 fe ff ff ff movl $0xffffffff,-0x158(%ebp) <== NOT EXECUTED
146661: ff ff ff
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
146664: 83 c2 20 add $0x20,%edx <== NOT EXECUTED
146667: 3b 95 b0 fe ff ff cmp -0x150(%ebp),%edx <== NOT EXECUTED
14666d: 72 a8 jb 146617 <msdos_dir_read+0x167> <== NOT EXECUTED
14666f: 8b 95 84 fe ff ff mov -0x17c(%ebp),%edx <== NOT EXECUTED
146675: 01 95 8c fe ff ff add %edx,-0x174(%ebp) <== NOT EXECUTED
14667b: e9 28 ff ff ff jmp 1465a8 <msdos_dir_read+0xf8> <== NOT EXECUTED
int q;
/*
* Is this is the first entry of a LFN ?
*/
if (lfn_start == FAT_FILE_SHORT_NAME)
146680: 83 bd a8 fe ff ff ff cmpl $0xffffffff,-0x158(%ebp) <== NOT EXECUTED
146687: 0f 84 33 02 00 00 je 1468c0 <msdos_dir_read+0x410> <== NOT EXECUTED
14668d: 8b 8d a4 fe ff ff mov -0x15c(%ebp),%ecx <== NOT EXECUTED
146693: 89 8d a0 fe ff ff mov %ecx,-0x160(%ebp) <== NOT EXECUTED
146699: 8a 85 97 fe ff ff mov -0x169(%ebp),%al <== NOT EXECUTED
14669f: 88 85 90 fe ff ff mov %al,-0x170(%ebp) <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
1466a5: 0f b6 0b movzbl (%ebx),%ecx <== NOT EXECUTED
1466a8: 83 e1 3f and $0x3f,%ecx <== NOT EXECUTED
1466ab: 89 8d a4 fe ff ff mov %ecx,-0x15c(%ebp) <== NOT EXECUTED
1466b1: 8b 85 a0 fe ff ff mov -0x160(%ebp),%eax <== NOT EXECUTED
1466b7: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
1466b9: 0f 84 71 02 00 00 je 146930 <msdos_dir_read+0x480> <== NOT EXECUTED
1466bf: 89 85 a4 fe ff ff mov %eax,-0x15c(%ebp) <== NOT EXECUTED
1466c5: 8a 8d 90 fe ff ff mov -0x170(%ebp),%cl <== NOT EXECUTED
1466cb: 88 8d 97 fe ff ff mov %cl,-0x169(%ebp) <== NOT EXECUTED
1466d1: c7 85 a8 fe ff ff ff movl $0xffffffff,-0x158(%ebp) <== NOT EXECUTED
1466d8: ff ff ff
1466db: e9 2c ff ff ff jmp 14660c <msdos_dir_read+0x15c> <== NOT EXECUTED
* unfortunately there is no method to extract ino except to
* open fat-file descriptor :( ... so, open it
*/
/* get number of cluster we are working with */
rc = fat_file_ioctl(iop->pathinfo.mt_entry, fat_fd, F_CLU_NUM,
1466e0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1466e3: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
1466e6: 50 push %eax <== NOT EXECUTED
1466e7: ff b5 8c fe ff ff pushl -0x174(%ebp) <== NOT EXECUTED
1466ed: 6a 01 push $0x1 <== NOT EXECUTED
1466ef: ff b5 88 fe ff ff pushl -0x178(%ebp) <== NOT EXECUTED
1466f5: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
1466f8: ff 71 28 pushl 0x28(%ecx) <== NOT EXECUTED
1466fb: 89 95 80 fe ff ff mov %edx,-0x180(%ebp) <== NOT EXECUTED
146701: e8 ea 45 fe ff call 12acf0 <fat_file_ioctl> <== NOT EXECUTED
j * bts2rd, &cur_cln);
if (rc != RC_OK)
146706: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
146709: 85 c0 test %eax,%eax <== NOT EXECUTED
14670b: 8b 95 80 fe ff ff mov -0x180(%ebp),%edx <== NOT EXECUTED
146711: 0f 85 62 03 00 00 jne 146a79 <msdos_dir_read+0x5c9> <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
146717: c7 45 d8 ff ff ff ff movl $0xffffffff,-0x28(%ebp) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
14671e: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
146725: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
146728: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
dir_pos.sname.ofs = i;
14672b: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
14672e: 51 push %ecx <== NOT EXECUTED
14672f: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED
146732: 51 push %ecx <== NOT EXECUTED
146733: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED
146736: 50 push %eax <== NOT EXECUTED
146737: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
14673a: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED
14673d: 89 95 80 fe ff ff mov %edx,-0x180(%ebp) <== NOT EXECUTED
146743: e8 28 4e fe ff call 12b570 <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
146748: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14674b: 85 c0 test %eax,%eax <== NOT EXECUTED
14674d: 8b 95 80 fe ff ff mov -0x180(%ebp),%edx <== NOT EXECUTED
146753: 0f 85 43 03 00 00 jne 146a9c <msdos_dir_read+0x5ec> <== NOT EXECUTED
return rc;
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
146759: 8b 8d 9c fe ff ff mov -0x164(%ebp),%ecx <== NOT EXECUTED
14675f: 89 8d c4 fe ff ff mov %ecx,-0x13c(%ebp) <== NOT EXECUTED
146765: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) <== NOT EXECUTED
14676c: 00 00 00
tmp_dirent.d_reclen = sizeof(struct dirent);
14676f: 66 c7 85 cc fe ff ff movw $0x110,-0x134(%ebp) <== NOT EXECUTED
146776: 10 01
tmp_dirent.d_ino = tmp_fat_fd->ino;
146778: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
14677b: 8b 40 0c mov 0xc(%eax),%eax <== NOT EXECUTED
14677e: 89 85 c0 fe ff ff mov %eax,-0x140(%ebp) <== NOT EXECUTED
/*
* If a long file name check if the correct number of
* entries have been found and if the checksum is correct.
* If not return the short file name.
*/
if (lfn_start != FAT_FILE_SHORT_NAME)
146784: 83 bd a8 fe ff ff ff cmpl $0xffffffff,-0x158(%ebp) <== NOT EXECUTED
14678b: 74 41 je 1467ce <msdos_dir_read+0x31e> <== NOT EXECUTED
14678d: 31 c0 xor %eax,%eax <== NOT EXECUTED
14678f: 31 ff xor %edi,%edi <== NOT EXECUTED
146791: c6 85 90 fe ff ff 00 movb $0x0,-0x170(%ebp) <== NOT EXECUTED
146798: 89 f9 mov %edi,%ecx <== NOT EXECUTED
14679a: 88 8d a0 fe ff ff mov %cl,-0x160(%ebp) <== NOT EXECUTED
1467a0: 89 df mov %ebx,%edi <== NOT EXECUTED
1467a2: 31 db xor %ebx,%ebx <== NOT EXECUTED
1467a4: eb 0c jmp 1467b2 <msdos_dir_read+0x302> <== NOT EXECUTED
1467a6: 66 90 xchg %ax,%ax <== NOT EXECUTED
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
1467a8: 89 d9 mov %ebx,%ecx <== NOT EXECUTED
1467aa: 83 e1 01 and $0x1,%ecx <== NOT EXECUTED
1467ad: f7 d9 neg %ecx <== NOT EXECUTED
1467af: 83 e1 80 and $0xffffff80,%ecx <== NOT EXECUTED
1467b2: d0 eb shr %bl <== NOT EXECUTED
1467b4: 02 0c 07 add (%edi,%eax,1),%cl <== NOT EXECUTED
1467b7: 8d 1c 19 lea (%ecx,%ebx,1),%ebx <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
1467ba: 40 inc %eax <== NOT EXECUTED
1467bb: 83 f8 0b cmp $0xb,%eax <== NOT EXECUTED
1467be: 75 e8 jne 1467a8 <msdos_dir_read+0x2f8> <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entries || (lfn_checksum != cs))
1467c0: 8b 85 a4 fe ff ff mov -0x15c(%ebp),%eax <== NOT EXECUTED
1467c6: 85 c0 test %eax,%eax <== NOT EXECUTED
1467c8: 0f 84 36 01 00 00 je 146904 <msdos_dir_read+0x454> <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
1467ce: c7 85 a8 fe ff ff 08 movl $0x8,-0x158(%ebp) <== NOT EXECUTED
1467d5: 00 00 00
1467d8: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED
1467dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
1467e0: 80 7c 06 ff 20 cmpb $0x20,-0x1(%esi,%eax,1) <== NOT EXECUTED
1467e5: 0f 85 2c 02 00 00 jne 146a17 <msdos_dir_read+0x567> <== NOT EXECUTED
1467eb: 48 dec %eax <== NOT EXECUTED
1467ec: 75 f2 jne 1467e0 <msdos_dir_read+0x330> <== NOT EXECUTED
1467ee: 89 85 a8 fe ff ff mov %eax,-0x158(%ebp) <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
1467f4: 8d 85 d0 fe ff ff lea -0x130(%ebp),%eax <== NOT EXECUTED
1467fa: 66 90 xchg %ax,%ax <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
}
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
1467fc: 80 7e 0a 20 cmpb $0x20,0xa(%esi) <== NOT EXECUTED
146800: 0f 85 2c 03 00 00 jne 146b32 <msdos_dir_read+0x682> <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN+MSDOS_SHORT_EXT_LEN-1);
((i > 0) &&
(*src_tmp == ' '));
i--,src_tmp--)
146806: 8d 4e 09 lea 0x9(%esi),%ecx <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
}
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
146809: 80 7e 09 20 cmpb $0x20,0x9(%esi) <== NOT EXECUTED
14680d: 0f 85 a7 02 00 00 jne 146aba <msdos_dir_read+0x60a> <== NOT EXECUTED
146813: 80 79 ff 20 cmpb $0x20,-0x1(%ecx) <== NOT EXECUTED
146817: 0f 85 48 03 00 00 jne 146b65 <msdos_dir_read+0x6b5> <== NOT EXECUTED
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
len++;
}
}
*dst = '\0'; /* terminate string */
14681d: c6 00 00 movb $0x0,(%eax) <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
146820: 8b 85 a8 fe ff ff mov -0x158(%ebp),%eax <== NOT EXECUTED
146826: 66 89 85 ce fe ff ff mov %ax,-0x132(%ebp) <== NOT EXECUTED
14682d: c7 85 a8 fe ff ff ff movl $0xffffffff,-0x158(%ebp) <== NOT EXECUTED
146834: ff ff ff
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
146837: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
14683a: 03 85 9c fe ff ff add -0x164(%ebp),%eax <== NOT EXECUTED
146840: b9 44 00 00 00 mov $0x44,%ecx <== NOT EXECUTED
146845: 89 c7 mov %eax,%edi <== NOT EXECUTED
146847: 8b b5 70 fe ff ff mov -0x190(%ebp),%esi <== NOT EXECUTED
14684d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
iop->offset = iop->offset + sizeof(struct dirent);
14684f: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
146852: 81 41 0c 10 01 00 00 addl $0x110,0xc(%ecx) <== NOT EXECUTED
146859: 83 51 10 00 adcl $0x0,0x10(%ecx) <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
14685d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
146860: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
146863: ff 71 28 pushl 0x28(%ecx) <== NOT EXECUTED
146866: 89 95 80 fe ff ff mov %edx,-0x180(%ebp) <== NOT EXECUTED
14686c: e8 3f 4c fe ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
146871: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
146874: 85 c0 test %eax,%eax <== NOT EXECUTED
146876: 8b 95 80 fe ff ff mov -0x180(%ebp),%edx <== NOT EXECUTED
14687c: 0f 85 f7 01 00 00 jne 146a79 <msdos_dir_read+0x5c9> <== NOT EXECUTED
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
146882: 81 85 9c fe ff ff 10 addl $0x110,-0x164(%ebp) <== NOT EXECUTED
146889: 01 00 00
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
if (count <= 0)
14688c: 81 ad 98 fe ff ff 10 subl $0x110,-0x168(%ebp) <== NOT EXECUTED
146893: 01 00 00
146896: 0f 85 70 fd ff ff jne 14660c <msdos_dir_read+0x15c> <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
14689c: 8b bd 9c fe ff ff mov -0x164(%ebp),%edi <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
1468a2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1468a5: 8b 8d b4 fe ff ff mov -0x14c(%ebp),%ecx <== NOT EXECUTED
1468ab: ff b1 94 00 00 00 pushl 0x94(%ecx) <== NOT EXECUTED
1468b1: e8 3e c7 fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return cmpltd;
1468b6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1468b9: e9 b7 00 00 00 jmp 146975 <msdos_dir_read+0x4c5> <== NOT EXECUTED
1468be: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (lfn_start == FAT_FILE_SHORT_NAME)
{
/*
* The first entry must have the last long entry flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
1468c0: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
1468c3: a8 40 test $0x40,%al <== NOT EXECUTED
1468c5: 0f 84 41 fd ff ff je 14660c <msdos_dir_read+0x15c> <== NOT EXECUTED
continue;
/*
* Remember the start location of the long file name.
*/
lfn_start =
1468cb: 8b 8d 8c fe ff ff mov -0x174(%ebp),%ecx <== NOT EXECUTED
1468d1: 01 d1 add %edx,%ecx <== NOT EXECUTED
1468d3: c1 e9 05 shr $0x5,%ecx <== NOT EXECUTED
1468d6: 89 8d a8 fe ff ff mov %ecx,-0x158(%ebp) <== NOT EXECUTED
/*
* Get the number of entries so we can count down and
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
1468dc: 83 e0 3f and $0x3f,%eax <== NOT EXECUTED
1468df: 89 85 a0 fe ff ff mov %eax,-0x160(%ebp) <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
1468e5: 8a 43 0d mov 0xd(%ebx),%al <== NOT EXECUTED
1468e8: 88 85 90 fe ff ff mov %al,-0x170(%ebp) <== NOT EXECUTED
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
1468ee: b9 00 01 00 00 mov $0x100,%ecx <== NOT EXECUTED
1468f3: 31 c0 xor %eax,%eax <== NOT EXECUTED
1468f5: 8b bd 74 fe ff ff mov -0x18c(%ebp),%edi <== NOT EXECUTED
1468fb: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
1468fd: e9 a3 fd ff ff jmp 1466a5 <msdos_dir_read+0x1f5> <== NOT EXECUTED
146902: 66 90 xchg %ax,%ax <== NOT EXECUTED
int i;
for (i = 0; i < 11; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entries || (lfn_checksum != cs))
146904: 38 9d 97 fe ff ff cmp %bl,-0x169(%ebp) <== NOT EXECUTED
14690a: 0f 85 be fe ff ff jne 1467ce <msdos_dir_read+0x31e> <== NOT EXECUTED
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
tmp_dirent.d_name, entry); /* src text */
}
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
146910: 31 c0 xor %eax,%eax <== NOT EXECUTED
146912: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
146917: 8b bd 74 fe ff ff mov -0x18c(%ebp),%edi <== NOT EXECUTED
14691d: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
14691f: f7 d1 not %ecx <== NOT EXECUTED
146921: 49 dec %ecx <== NOT EXECUTED
146922: 66 89 8d ce fe ff ff mov %cx,-0x132(%ebp) <== NOT EXECUTED
146929: e9 09 ff ff ff jmp 146837 <msdos_dir_read+0x387> <== NOT EXECUTED
14692e: 66 90 xchg %ax,%ax <== NOT EXECUTED
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK)) ||
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
146930: 8a 5b 0d mov 0xd(%ebx),%bl <== NOT EXECUTED
146933: 88 9d 97 fe ff ff mov %bl,-0x169(%ebp) <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
146939: 8a 85 90 fe ff ff mov -0x170(%ebp),%al <== NOT EXECUTED
14693f: 38 c3 cmp %al,%bl <== NOT EXECUTED
146941: 74 3c je 14697f <msdos_dir_read+0x4cf> <== NOT EXECUTED
146943: 88 85 97 fe ff ff mov %al,-0x169(%ebp) <== NOT EXECUTED
146949: c7 85 a8 fe ff ff ff movl $0xffffffff,-0x158(%ebp) <== NOT EXECUTED
146950: ff ff ff
146953: e9 b4 fc ff ff jmp 14660c <msdos_dir_read+0x15c> <== NOT EXECUTED
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
rtems_semaphore_release(fs_info->vol_sema);
146958: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
14695b: 8b 85 b4 fe ff ff mov -0x14c(%ebp),%eax <== NOT EXECUTED
146961: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
146967: e8 88 c6 fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return cmpltd;
14696c: 8b bd 9c fe ff ff mov -0x164(%ebp),%edi <== NOT EXECUTED
146972: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
146975: 89 f8 mov %edi,%eax <== NOT EXECUTED
146977: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
14697a: 5b pop %ebx <== NOT EXECUTED
14697b: 5e pop %esi <== NOT EXECUTED
14697c: 5f pop %edi <== NOT EXECUTED
14697d: c9 leave <== NOT EXECUTED
14697e: c3 ret <== NOT EXECUTED
* The DOS maximum length is 255 characters without the
* trailing nul character. We need to range check the length to
* fit in the directory entry name field.
*/
lfn_entries--;
14697f: 8b 8d a0 fe ff ff mov -0x160(%ebp),%ecx <== NOT EXECUTED
146985: 49 dec %ecx <== NOT EXECUTED
146986: 89 8d a4 fe ff ff mov %ecx,-0x15c(%ebp) <== NOT EXECUTED
p = entry + 1;
14698c: 46 inc %esi <== NOT EXECUTED
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
14698d: 8d 04 49 lea (%ecx,%ecx,2),%eax <== NOT EXECUTED
146990: 8d 3c 81 lea (%ecx,%eax,4),%edi <== NOT EXECUTED
146993: 8d 8c 3d d0 fe ff ff lea -0x130(%ebp,%edi,1),%ecx <== NOT EXECUTED
14699a: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
14699f: 89 95 a0 fe ff ff mov %edx,-0x160(%ebp) <== NOT EXECUTED
1469a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
1469a8: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
1469ab: 81 ff fe 00 00 00 cmp $0xfe,%edi <== NOT EXECUTED
1469b1: 77 30 ja 1469e3 <msdos_dir_read+0x533> <== NOT EXECUTED
break;
tmp_dirent.d_name[o++] = *p;
1469b3: 8a 1e mov (%esi),%bl <== NOT EXECUTED
1469b5: 88 19 mov %bl,(%ecx) <== NOT EXECUTED
1469b7: 47 inc %edi <== NOT EXECUTED
if (*p == '\0')
1469b8: 80 3e 00 cmpb $0x0,(%esi) <== NOT EXECUTED
1469bb: 74 26 je 1469e3 <msdos_dir_read+0x533> <== NOT EXECUTED
break;
switch (q)
1469bd: 83 fa 04 cmp $0x4,%edx <== NOT EXECUTED
1469c0: 74 1a je 1469dc <msdos_dir_read+0x52c> <== NOT EXECUTED
1469c2: 83 fa 0a cmp $0xa,%edx <== NOT EXECUTED
1469c5: 74 0d je 1469d4 <msdos_dir_read+0x524> <== NOT EXECUTED
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
1469c7: 83 f8 0c cmp $0xc,%eax <== NOT EXECUTED
1469ca: 7f 17 jg 1469e3 <msdos_dir_read+0x533> <== NOT EXECUTED
break;
case 10:
p += 4;
break;
default:
p += 2;
1469cc: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
1469cf: 40 inc %eax <== NOT EXECUTED
1469d0: 41 inc %ecx <== NOT EXECUTED
1469d1: eb d5 jmp 1469a8 <msdos_dir_read+0x4f8> <== NOT EXECUTED
1469d3: 90 nop <== NOT EXECUTED
{
case 4:
p += 5;
break;
case 10:
p += 4;
1469d4: 83 c6 04 add $0x4,%esi <== NOT EXECUTED
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
1469d7: 40 inc %eax <== NOT EXECUTED
1469d8: 41 inc %ecx <== NOT EXECUTED
1469d9: eb cd jmp 1469a8 <msdos_dir_read+0x4f8> <== NOT EXECUTED
1469db: 90 nop <== NOT EXECUTED
break;
switch (q)
{
case 4:
p += 5;
1469dc: 83 c6 05 add $0x5,%esi <== NOT EXECUTED
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
1469df: 40 inc %eax <== NOT EXECUTED
1469e0: 41 inc %ecx <== NOT EXECUTED
1469e1: eb c5 jmp 1469a8 <msdos_dir_read+0x4f8> <== NOT EXECUTED
1469e3: 8b 95 a0 fe ff ff mov -0x160(%ebp),%edx <== NOT EXECUTED
1469e9: e9 1e fc ff ff jmp 14660c <msdos_dir_read+0x15c> <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
1469ee: 8b 79 24 mov 0x24(%ecx),%edi <== NOT EXECUTED
1469f1: 85 ff test %edi,%edi <== NOT EXECUTED
1469f3: 0f 85 eb fa ff ff jne 1464e4 <msdos_dir_read+0x34> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
1469f9: 8b 95 b4 fe ff ff mov -0x14c(%ebp),%edx <== NOT EXECUTED
1469ff: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED
146a03: 0f 84 db fa ff ff je 1464e4 <msdos_dir_read+0x34> <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
146a09: 8b 49 18 mov 0x18(%ecx),%ecx <== NOT EXECUTED
146a0c: 89 8d 84 fe ff ff mov %ecx,-0x17c(%ebp) <== NOT EXECUTED
146a12: e9 dd fa ff ff jmp 1464f4 <msdos_dir_read+0x44> <== NOT EXECUTED
146a17: 89 85 a8 fe ff ff mov %eax,-0x158(%ebp) <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
146a1d: 85 c0 test %eax,%eax <== NOT EXECUTED
146a1f: 0f 8e cf fd ff ff jle 1467f4 <msdos_dir_read+0x344> <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
146a25: 8d bd d0 fe ff ff lea -0x130(%ebp),%edi <== NOT EXECUTED
146a2b: 03 bd a8 fe ff ff add -0x158(%ebp),%edi <== NOT EXECUTED
146a31: 89 f3 mov %esi,%ebx <== NOT EXECUTED
146a33: 8d 85 d0 fe ff ff lea -0x130(%ebp),%eax <== NOT EXECUTED
146a39: 89 b5 a0 fe ff ff mov %esi,-0x160(%ebp) <== NOT EXECUTED
146a3f: eb 0c jmp 146a4d <msdos_dir_read+0x59d> <== NOT EXECUTED
146a41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
146a44: 89 f1 mov %esi,%ecx <== NOT EXECUTED
146a46: 88 08 mov %cl,(%eax) <== NOT EXECUTED
146a48: 40 inc %eax <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
146a49: 39 f8 cmp %edi,%eax <== NOT EXECUTED
146a4b: 74 21 je 146a6e <msdos_dir_read+0x5be> <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
146a4d: 8a 0b mov (%ebx),%cl <== NOT EXECUTED
146a4f: 43 inc %ebx <== NOT EXECUTED
146a50: 0f b6 f1 movzbl %cl,%esi <== NOT EXECUTED
146a53: 8b 0d 48 fb 16 00 mov 0x16fb48,%ecx <== NOT EXECUTED
146a59: 0f be 4c 31 01 movsbl 0x1(%ecx,%esi,1),%ecx <== NOT EXECUTED
146a5e: 83 e1 03 and $0x3,%ecx <== NOT EXECUTED
146a61: 49 dec %ecx <== NOT EXECUTED
146a62: 75 e0 jne 146a44 <msdos_dir_read+0x594> <== NOT EXECUTED
146a64: 8d 4e 20 lea 0x20(%esi),%ecx <== NOT EXECUTED
146a67: 88 08 mov %cl,(%eax) <== NOT EXECUTED
146a69: 40 inc %eax <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
146a6a: 39 f8 cmp %edi,%eax <== NOT EXECUTED
146a6c: 75 df jne 146a4d <msdos_dir_read+0x59d> <== NOT EXECUTED
146a6e: 8b b5 a0 fe ff ff mov -0x160(%ebp),%esi <== NOT EXECUTED
146a74: e9 83 fd ff ff jmp 1467fc <msdos_dir_read+0x34c> <== NOT EXECUTED
146a79: 89 c7 mov %eax,%edi <== NOT EXECUTED
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
146a7b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
146a7e: 8b 85 b4 fe ff ff mov -0x14c(%ebp),%eax <== NOT EXECUTED
146a84: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
146a8a: e8 65 c5 fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
146a8f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
146a92: 89 f8 mov %edi,%eax <== NOT EXECUTED
146a94: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
146a97: 5b pop %ebx <== NOT EXECUTED
146a98: 5e pop %esi <== NOT EXECUTED
146a99: 5f pop %edi <== NOT EXECUTED
146a9a: c9 leave <== NOT EXECUTED
146a9b: c3 ret <== NOT EXECUTED
146a9c: 89 c7 mov %eax,%edi <== NOT EXECUTED
dir_pos.sname.cln = cur_cln;
dir_pos.sname.ofs = i;
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
146a9e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
146aa1: 8b 95 b4 fe ff ff mov -0x14c(%ebp),%edx <== NOT EXECUTED
146aa7: ff b2 94 00 00 00 pushl 0x94(%edx) <== NOT EXECUTED
146aad: e8 42 c5 fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
146ab2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
146ab5: e9 bb fe ff ff jmp 146975 <msdos_dir_read+0x4c5> <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
}
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
146aba: bf 02 00 00 00 mov $0x2,%edi <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
146abf: c6 00 2e movb $0x2e,(%eax) <== NOT EXECUTED
146ac2: 8d 48 01 lea 0x1(%eax),%ecx <== NOT EXECUTED
146ac5: 89 8d a0 fe ff ff mov %ecx,-0x160(%ebp) <== NOT EXECUTED
len += i + 1; /* extension + dot */
146acb: 8b 8d a8 fe ff ff mov -0x158(%ebp),%ecx <== NOT EXECUTED
146ad1: 8d 4c 39 01 lea 0x1(%ecx,%edi,1),%ecx <== NOT EXECUTED
146ad5: 89 8d a8 fe ff ff mov %ecx,-0x158(%ebp) <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
146adb: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
146add: 89 95 90 fe ff ff mov %edx,-0x170(%ebp) <== NOT EXECUTED
146ae3: eb 0c jmp 146af1 <msdos_dir_read+0x641> <== NOT EXECUTED
146ae5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
146ae8: 88 5c 08 01 mov %bl,0x1(%eax,%ecx,1) <== NOT EXECUTED
146aec: 41 inc %ecx <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
146aed: 39 f9 cmp %edi,%ecx <== NOT EXECUTED
146aef: 74 22 je 146b13 <msdos_dir_read+0x663> <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
146af1: 0f b6 5c 0e 08 movzbl 0x8(%esi,%ecx,1),%ebx <== NOT EXECUTED
146af6: 8b 15 48 fb 16 00 mov 0x16fb48,%edx <== NOT EXECUTED
146afc: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx <== NOT EXECUTED
146b01: 83 e2 03 and $0x3,%edx <== NOT EXECUTED
146b04: 4a dec %edx <== NOT EXECUTED
146b05: 75 e1 jne 146ae8 <msdos_dir_read+0x638> <== NOT EXECUTED
146b07: 83 c3 20 add $0x20,%ebx <== NOT EXECUTED
146b0a: 88 5c 08 01 mov %bl,0x1(%eax,%ecx,1) <== NOT EXECUTED
146b0e: 41 inc %ecx <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
146b0f: 39 f9 cmp %edi,%ecx <== NOT EXECUTED
146b11: 75 de jne 146af1 <msdos_dir_read+0x641> <== NOT EXECUTED
146b13: 8b 95 90 fe ff ff mov -0x170(%ebp),%edx <== NOT EXECUTED
146b19: 8b 85 a0 fe ff ff mov -0x160(%ebp),%eax <== NOT EXECUTED
146b1f: 01 c8 add %ecx,%eax <== NOT EXECUTED
146b21: 03 8d a8 fe ff ff add -0x158(%ebp),%ecx <== NOT EXECUTED
146b27: 89 8d a8 fe ff ff mov %ecx,-0x158(%ebp) <== NOT EXECUTED
146b2d: e9 eb fc ff ff jmp 14681d <msdos_dir_read+0x36d> <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
}
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
146b32: bf 03 00 00 00 mov $0x3,%edi <== NOT EXECUTED
146b37: eb 86 jmp 146abf <msdos_dir_read+0x60f> <== NOT EXECUTED
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
rtems_semaphore_release(fs_info->vol_sema);
146b39: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
146b3c: 8b 85 b4 fe ff ff mov -0x14c(%ebp),%eax <== NOT EXECUTED
146b42: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
146b48: e8 a7 c4 fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
146b4d: e8 2e 10 00 00 call 147b80 <__errno> <== NOT EXECUTED
146b52: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
146b58: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
146b5d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
146b60: e9 10 fe ff ff jmp 146975 <msdos_dir_read+0x4c5> <== NOT EXECUTED
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
tmp_dirent.d_name, entry); /* src text */
}
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
146b65: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
146b6a: e9 50 ff ff ff jmp 146abf <msdos_dir_read+0x60f> <== NOT EXECUTED
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
146b6f: e8 0c 10 00 00 call 147b80 <__errno> <== NOT EXECUTED
146b74: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
146b7a: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED
146b7d: e9 f3 fd ff ff jmp 146975 <msdos_dir_read+0x4c5> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
146b82: 31 ff xor %edi,%edi <== NOT EXECUTED
146b84: e9 19 fd ff ff jmp 1468a2 <msdos_dir_read+0x3f2> <== NOT EXECUTED
0014630c <msdos_dir_rmnod>:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*/
int
msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
14630c: 55 push %ebp <== NOT EXECUTED
14630d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14630f: 57 push %edi <== NOT EXECUTED
146310: 56 push %esi <== NOT EXECUTED
146311: 53 push %ebx <== NOT EXECUTED
146312: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED
146315: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
146318: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
14631b: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
14631e: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
146321: 8b 3b mov (%ebx),%edi <== NOT EXECUTED
bool is_empty = false;
146323: c6 45 e7 00 movb $0x0,-0x19(%ebp) <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
146327: 6a 00 push $0x0 <== NOT EXECUTED
146329: 6a 00 push $0x0 <== NOT EXECUTED
14632b: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
146331: e8 c2 cb fc ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
146336: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
146339: 85 c0 test %eax,%eax <== NOT EXECUTED
14633b: 0f 85 c7 00 00 00 jne 146408 <msdos_dir_rmnod+0xfc> <== NOT EXECUTED
/*
* We deny attempts to delete open directory (if directory is current
* directory we assume it is open one)
*/
if (fat_fd->links_num > 1)
146341: 83 7f 08 01 cmpl $0x1,0x8(%edi) <== NOT EXECUTED
146345: 0f 87 8d 00 00 00 ja 1463d8 <msdos_dir_rmnod+0xcc> <== NOT EXECUTED
}
/*
* You cannot remove a node that still has children
*/
rc = msdos_dir_is_empty(pathloc->mt_entry, fat_fd, &is_empty);
14634b: 51 push %ecx <== NOT EXECUTED
14634c: 8d 45 e7 lea -0x19(%ebp),%eax <== NOT EXECUTED
14634f: 50 push %eax <== NOT EXECUTED
146350: 57 push %edi <== NOT EXECUTED
146351: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
146354: e8 d7 5f ff ff call 13c330 <msdos_dir_is_empty> <== NOT EXECUTED
146359: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc != RC_OK)
14635b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14635e: 85 c0 test %eax,%eax <== NOT EXECUTED
146360: 75 56 jne 1463b8 <msdos_dir_rmnod+0xac> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (!is_empty)
146362: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) <== NOT EXECUTED
146366: 0f 84 b0 00 00 00 je 14641c <msdos_dir_rmnod+0x110> <== NOT EXECUTED
}
/*
* You cannot remove the file system root node.
*/
if (pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access)
14636c: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
14636f: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
146372: 3b 13 cmp (%ebx),%edx <== NOT EXECUTED
146374: 74 62 je 1463d8 <msdos_dir_rmnod+0xcc> <== NOT EXECUTED
* You cannot remove a mountpoint.
* not used - mount() not implemenetd yet.
*/
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
146376: 52 push %edx <== NOT EXECUTED
146377: 68 e5 00 00 00 push $0xe5 <== NOT EXECUTED
14637c: 8d 57 20 lea 0x20(%edi),%edx <== NOT EXECUTED
14637f: 52 push %edx <== NOT EXECUTED
146380: 50 push %eax <== NOT EXECUTED
146381: e8 02 62 ff ff call 13c588 <msdos_set_first_char4file_name><== NOT EXECUTED
146386: 89 c6 mov %eax,%esi <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
146388: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14638b: 85 c0 test %eax,%eax <== NOT EXECUTED
14638d: 75 29 jne 1463b8 <msdos_dir_rmnod+0xac> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
14638f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
146392: 57 push %edi <== NOT EXECUTED
146393: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
146396: e8 01 49 fe ff call 12ac9c <fat_file_mark_removed> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
14639b: 58 pop %eax <== NOT EXECUTED
14639c: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
14639f: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
1463a5: e8 4a cc fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
1463aa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1463ad: 89 f0 mov %esi,%eax <== NOT EXECUTED
1463af: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1463b2: 5b pop %ebx <== NOT EXECUTED
1463b3: 5e pop %esi <== NOT EXECUTED
1463b4: 5f pop %edi <== NOT EXECUTED
1463b5: c9 leave <== NOT EXECUTED
1463b6: c3 ret <== NOT EXECUTED
1463b7: 90 nop <== NOT EXECUTED
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
1463b8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1463bb: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
1463be: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
1463c4: e8 2b cc fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
1463c9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
1463cc: 89 f0 mov %esi,%eax <== NOT EXECUTED
1463ce: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1463d1: 5b pop %ebx <== NOT EXECUTED
1463d2: 5e pop %esi <== NOT EXECUTED
1463d3: 5f pop %edi <== NOT EXECUTED
1463d4: c9 leave <== NOT EXECUTED
1463d5: c3 ret <== NOT EXECUTED
1463d6: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* You cannot remove the file system root node.
*/
if (pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access)
{
rtems_semaphore_release(fs_info->vol_sema);
1463d8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1463db: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
1463de: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
1463e4: e8 0b cc fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EBUSY);
1463e9: e8 92 17 00 00 call 147b80 <__errno> <== NOT EXECUTED
1463ee: c7 00 10 00 00 00 movl $0x10,(%eax) <== NOT EXECUTED
1463f4: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
1463f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
1463fc: 89 f0 mov %esi,%eax <== NOT EXECUTED
1463fe: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
146401: 5b pop %ebx <== NOT EXECUTED
146402: 5e pop %esi <== NOT EXECUTED
146403: 5f pop %edi <== NOT EXECUTED
146404: c9 leave <== NOT EXECUTED
146405: c3 ret <== NOT EXECUTED
146406: 66 90 xchg %ax,%ax <== NOT EXECUTED
bool is_empty = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
146408: e8 73 17 00 00 call 147b80 <__errno> <== NOT EXECUTED
14640d: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
146413: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
146418: eb 93 jmp 1463ad <msdos_dir_rmnod+0xa1> <== NOT EXECUTED
14641a: 66 90 xchg %ax,%ax <== NOT EXECUTED
return rc;
}
if (!is_empty)
{
rtems_semaphore_release(fs_info->vol_sema);
14641c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
14641f: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
146422: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
146428: e8 c7 cb fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
14642d: e8 4e 17 00 00 call 147b80 <__errno> <== NOT EXECUTED
146432: c7 00 5a 00 00 00 movl $0x5a,(%eax) <== NOT EXECUTED
146438: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
14643d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
146440: e9 68 ff ff ff jmp 1463ad <msdos_dir_rmnod+0xa1> <== NOT EXECUTED
00146268 <msdos_dir_stat>:
int
msdos_dir_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
146268: 55 push %ebp <== NOT EXECUTED
146269: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14626b: 57 push %edi <== NOT EXECUTED
14626c: 56 push %esi <== NOT EXECUTED
14626d: 53 push %ebx <== NOT EXECUTED
14626e: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
146271: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
146274: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
146277: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
14627a: 8b 72 34 mov 0x34(%edx),%esi <== NOT EXECUTED
fat_file_fd_t *fat_fd = loc->node_access;
14627d: 8b 38 mov (%eax),%edi <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
14627f: 6a 00 push $0x0 <== NOT EXECUTED
146281: 6a 00 push $0x0 <== NOT EXECUTED
146283: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
146289: e8 6a cc fc ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
14628e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
146291: 85 c0 test %eax,%eax <== NOT EXECUTED
146293: 75 63 jne 1462f8 <msdos_dir_stat+0x90> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
146295: 8b 46 54 mov 0x54(%esi),%eax <== NOT EXECUTED
146298: 8b 56 58 mov 0x58(%esi),%edx <== NOT EXECUTED
14629b: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
14629d: 89 53 04 mov %edx,0x4(%ebx) <== NOT EXECUTED
buf->st_ino = fat_fd->ino;
1462a0: 8b 47 0c mov 0xc(%edi),%eax <== NOT EXECUTED
1462a3: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
1462a6: c7 43 0c ff 41 00 00 movl $0x41ff,0xc(%ebx) <== NOT EXECUTED
buf->st_rdev = 0ll;
1462ad: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) <== NOT EXECUTED
1462b4: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) <== NOT EXECUTED
buf->st_size = fat_fd->fat_file_size;
1462bb: 8b 47 18 mov 0x18(%edi),%eax <== NOT EXECUTED
1462be: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED
1462c1: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
1462c8: c1 e8 09 shr $0x9,%eax <== NOT EXECUTED
1462cb: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED
buf->st_blksize = fs_info->fat.vol.bps;
1462ce: 0f b7 06 movzwl (%esi),%eax <== NOT EXECUTED
1462d1: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED
buf->st_mtime = fat_fd->mtime;
1462d4: 8b 47 40 mov 0x40(%edi),%eax <== NOT EXECUTED
1462d7: 89 43 30 mov %eax,0x30(%ebx) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
1462da: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1462dd: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
1462e3: e8 0c cd fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
1462e8: 31 c0 xor %eax,%eax <== NOT EXECUTED
return RC_OK;
1462ea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1462ed: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1462f0: 5b pop %ebx <== NOT EXECUTED
1462f1: 5e pop %esi <== NOT EXECUTED
1462f2: 5f pop %edi <== NOT EXECUTED
1462f3: c9 leave <== NOT EXECUTED
1462f4: c3 ret <== NOT EXECUTED
1462f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
1462f8: e8 83 18 00 00 call 147b80 <__errno> <== NOT EXECUTED
1462fd: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
146303: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
146308: eb e3 jmp 1462ed <msdos_dir_stat+0x85> <== NOT EXECUTED
00146448 <msdos_dir_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*/
int
msdos_dir_sync(rtems_libio_t *iop)
{
146448: 55 push %ebp <== NOT EXECUTED
146449: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14644b: 57 push %edi <== NOT EXECUTED
14644c: 56 push %esi <== NOT EXECUTED
14644d: 53 push %ebx <== NOT EXECUTED
14644e: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
146451: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
146454: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
146457: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
14645a: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
14645d: 6a 00 push $0x0 <== NOT EXECUTED
14645f: 6a 00 push $0x0 <== NOT EXECUTED
146461: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
146467: e8 8c ca fc ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
14646c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14646f: 85 c0 test %eax,%eax <== NOT EXECUTED
146471: 75 29 jne 14649c <msdos_dir_sync+0x54> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
146473: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
146476: 57 push %edi <== NOT EXECUTED
146477: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
14647a: e8 0d 47 fe ff call 12ab8c <fat_file_datasync> <== NOT EXECUTED
14647f: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
146481: 5f pop %edi <== NOT EXECUTED
146482: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
146488: e8 67 cb fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
14648d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
146490: 89 d8 mov %ebx,%eax <== NOT EXECUTED
146492: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
146495: 5b pop %ebx <== NOT EXECUTED
146496: 5e pop %esi <== NOT EXECUTED
146497: 5f pop %edi <== NOT EXECUTED
146498: c9 leave <== NOT EXECUTED
146499: c3 ret <== NOT EXECUTED
14649a: 66 90 xchg %ax,%ax <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
14649c: e8 df 16 00 00 call 147b80 <__errno> <== NOT EXECUTED
1464a1: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
1464a7: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
1464ac: eb e2 jmp 146490 <msdos_dir_sync+0x48> <== NOT EXECUTED
0013aeb4 <msdos_eval4make>:
msdos_eval4make(
const char *path,
rtems_filesystem_location_info_t *pathloc,
const char **name
)
{
13aeb4: 55 push %ebp <== NOT EXECUTED
13aeb5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13aeb7: 57 push %edi <== NOT EXECUTED
13aeb8: 56 push %esi <== NOT EXECUTED
13aeb9: 53 push %ebx <== NOT EXECUTED
13aeba: 83 ec 40 sub $0x40,%esp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
13aebd: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
13aec0: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED
13aec3: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
13aec6: 89 45 c0 mov %eax,-0x40(%ebp) <== NOT EXECUTED
int i = 0;
int token_len;
const char *token;
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
13aec9: 6a 00 push $0x0 <== NOT EXECUTED
13aecb: 6a 00 push $0x0 <== NOT EXECUTED
13aecd: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
13aed3: e8 20 80 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
13aed8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13aedb: 85 c0 test %eax,%eax <== NOT EXECUTED
13aedd: 0f 85 75 02 00 00 jne 13b158 <msdos_eval4make+0x2a4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
13aee3: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
13aee6: 8b 01 mov (%ecx),%eax <== NOT EXECUTED
13aee8: 85 c0 test %eax,%eax <== NOT EXECUTED
13aeea: 0f 84 9c 01 00 00 je 13b08c <msdos_eval4make+0x1d8> <== NOT EXECUTED
goto err;
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
13aef0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13aef3: 50 push %eax <== NOT EXECUTED
13aef4: e8 53 fb fe ff call 12aa4c <fat_file_reopen> <== NOT EXECUTED
13aef9: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc != RC_OK)
13aefb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13aefe: 85 c0 test %eax,%eax <== NOT EXECUTED
13af00: 75 72 jne 13af74 <msdos_eval4make+0xc0> <== NOT EXECUTED
13af02: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) <== NOT EXECUTED
13af09: 8d 75 e4 lea -0x1c(%ebp),%esi <== NOT EXECUTED
goto err;
while (!done)
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
13af0c: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13af0f: 03 55 c4 add -0x3c(%ebp),%edx <== NOT EXECUTED
13af12: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
13af17: 89 d7 mov %edx,%edi <== NOT EXECUTED
13af19: 31 c0 xor %eax,%eax <== NOT EXECUTED
13af1b: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
13af1d: f7 d1 not %ecx <== NOT EXECUTED
13af1f: 49 dec %ecx <== NOT EXECUTED
13af20: 56 push %esi <== NOT EXECUTED
13af21: 8d 7d e0 lea -0x20(%ebp),%edi <== NOT EXECUTED
13af24: 57 push %edi <== NOT EXECUTED
13af25: 51 push %ecx <== NOT EXECUTED
13af26: 52 push %edx <== NOT EXECUTED
13af27: e8 c8 18 00 00 call 13c7f4 <msdos_get_token> <== NOT EXECUTED
i += token_len;
13af2c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
13af2f: 01 55 c4 add %edx,-0x3c(%ebp) <== NOT EXECUTED
fat_fd = pathloc->node_access;
13af32: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
13af35: 8b 39 mov (%ecx),%edi <== NOT EXECUTED
switch (type)
13af37: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13af3a: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
13af3d: 0f 84 09 01 00 00 je 13b04c <msdos_eval4make+0x198> <== NOT EXECUTED
13af43: 77 53 ja 13af98 <msdos_eval4make+0xe4> <== NOT EXECUTED
13af45: 85 c0 test %eax,%eax <== NOT EXECUTED
13af47: 75 c3 jne 13af0c <msdos_eval4make+0x58> <== NOT EXECUTED
done = true;
}
break;
case MSDOS_NO_MORE_PATH:
errno = EEXIST;
13af49: 89 7d bc mov %edi,-0x44(%ebp) <== NOT EXECUTED
13af4c: e8 2f cc 00 00 call 147b80 <__errno> <== NOT EXECUTED
13af51: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED
13af57: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
rc = -1;
goto error;
13af5c: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
13af5f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13af62: 52 push %edx <== NOT EXECUTED
13af63: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
13af66: ff 70 10 pushl 0x10(%eax) <== NOT EXECUTED
13af69: e8 42 05 ff ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
13af6e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13af71: eb 03 jmp 13af76 <msdos_eval4make+0xc2> <== NOT EXECUTED
13af73: 90 nop <== NOT EXECUTED
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
13af74: 89 c7 mov %eax,%edi <== NOT EXECUTED
error:
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
13af76: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13af79: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
13af7c: ff b2 94 00 00 00 pushl 0x94(%edx) <== NOT EXECUTED
13af82: e8 6d 80 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
13af87: 89 fb mov %edi,%ebx <== NOT EXECUTED
return rc;
13af89: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13af8c: 89 d8 mov %ebx,%eax <== NOT EXECUTED
13af8e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13af91: 5b pop %ebx <== NOT EXECUTED
13af92: 5e pop %esi <== NOT EXECUTED
13af93: 5f pop %edi <== NOT EXECUTED
13af94: c9 leave <== NOT EXECUTED
13af95: c3 ret <== NOT EXECUTED
13af96: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
i += token_len;
fat_fd = pathloc->node_access;
switch (type)
13af98: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
13af9b: 74 23 je 13afc0 <msdos_eval4make+0x10c> <== NOT EXECUTED
13af9d: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
13afa0: 0f 85 66 ff ff ff jne 13af0c <msdos_eval4make+0x58> <== NOT EXECUTED
case MSDOS_CURRENT_DIR:
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
13afa6: 89 7d bc mov %edi,-0x44(%ebp) <== NOT EXECUTED
13afa9: e8 d2 cb 00 00 call 147b80 <__errno> <== NOT EXECUTED
13afae: c7 00 5b 00 00 00 movl $0x5b,(%eax) <== NOT EXECUTED
13afb4: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
rc = -1;
goto error;
13afb9: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED
13afbc: eb a1 jmp 13af5f <msdos_eval4make+0xab> <== NOT EXECUTED
13afbe: 66 90 xchg %ax,%ax <== NOT EXECUTED
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
13afc0: 83 7f 10 01 cmpl $0x1,0x10(%edi) <== NOT EXECUTED
13afc4: 0f 85 a3 01 00 00 jne 13b16d <msdos_eval4make+0x2b9> <== NOT EXECUTED
/*
* Otherwise find the token name in the present location and
* set the node access to the point we have found.
*/
rc = msdos_find_name(pathloc, token, token_len);
13afca: 51 push %ecx <== NOT EXECUTED
13afcb: 52 push %edx <== NOT EXECUTED
13afcc: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13afcf: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13afd2: e8 89 1d 00 00 call 13cd60 <msdos_find_name> <== NOT EXECUTED
if (rc)
13afd7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13afda: 85 c0 test %eax,%eax <== NOT EXECUTED
13afdc: 0f 84 2a ff ff ff je 13af0c <msdos_eval4make+0x58> <== NOT EXECUTED
13afe2: 89 fa mov %edi,%edx <== NOT EXECUTED
{
if (rc != MSDOS_NAME_NOT_FOUND_ERR)
13afe4: 3d 01 7d 00 00 cmp $0x7d01,%eax <== NOT EXECUTED
13afe9: 75 46 jne 13b031 <msdos_eval4make+0x17d> <== NOT EXECUTED
break;
}
}
*name = &path[i - token_len];
13afeb: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
13afee: 2b 45 e4 sub -0x1c(%ebp),%eax <== NOT EXECUTED
13aff1: 03 45 08 add 0x8(%ebp),%eax <== NOT EXECUTED
13aff4: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
13aff7: 89 07 mov %eax,(%edi) <== NOT EXECUTED
/*
* 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++)
13aff9: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
13affc: 03 75 c4 add -0x3c(%ebp),%esi <== NOT EXECUTED
13afff: 8a 06 mov (%esi),%al <== NOT EXECUTED
13b001: 84 c0 test %al,%al <== NOT EXECUTED
13b003: 0f 84 17 01 00 00 je 13b120 <msdos_eval4make+0x26c> <== NOT EXECUTED
13b009: 89 d7 mov %edx,%edi <== NOT EXECUTED
13b00b: eb 0f jmp 13b01c <msdos_eval4make+0x168> <== NOT EXECUTED
13b00d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
13b010: 8a 46 01 mov 0x1(%esi),%al <== NOT EXECUTED
13b013: 46 inc %esi <== NOT EXECUTED
13b014: 84 c0 test %al,%al <== NOT EXECUTED
13b016: 0f 84 04 01 00 00 je 13b120 <msdos_eval4make+0x26c> <== NOT EXECUTED
{
if (!msdos_is_separator(path[i]))
13b01c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b01f: 0f be c0 movsbl %al,%eax <== NOT EXECUTED
13b022: 50 push %eax <== NOT EXECUTED
13b023: e8 a4 4f fd ff call 10ffcc <rtems_filesystem_is_separator><== NOT EXECUTED
13b028: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b02b: 85 c0 test %eax,%eax <== NOT EXECUTED
13b02d: 75 e1 jne 13b010 <msdos_eval4make+0x15c> <== NOT EXECUTED
13b02f: 89 fa mov %edi,%edx <== NOT EXECUTED
{
errno = ENOENT;
13b031: 89 55 bc mov %edx,-0x44(%ebp) <== NOT EXECUTED
13b034: e8 47 cb 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b039: c7 00 02 00 00 00 movl $0x2,(%eax) <== NOT EXECUTED
13b03f: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
rc = -1;
goto error;
13b044: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED
13b047: e9 13 ff ff ff jmp 13af5f <msdos_eval4make+0xab> <== NOT EXECUTED
{
case MSDOS_UP_DIR:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
13b04c: 83 7f 10 01 cmpl $0x1,0x10(%edi) <== NOT EXECUTED
13b050: 0f 85 17 01 00 00 jne 13b16d <msdos_eval4make+0x2b9> <== NOT EXECUTED
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access)
13b056: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
13b059: 8b 41 10 mov 0x10(%ecx),%eax <== NOT EXECUTED
}
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
13b05c: 3b 78 1c cmp 0x1c(%eax),%edi <== NOT EXECUTED
13b05f: 74 43 je 13b0a4 <msdos_eval4make+0x1f0> <== NOT EXECUTED
pathloc, name);
}
}
else
{
rc = msdos_find_name(pathloc, token, token_len);
13b061: 50 push %eax <== NOT EXECUTED
13b062: 52 push %edx <== NOT EXECUTED
13b063: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13b066: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13b069: e8 f2 1c 00 00 call 13cd60 <msdos_find_name> <== NOT EXECUTED
if (rc != RC_OK)
13b06e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b071: 85 c0 test %eax,%eax <== NOT EXECUTED
13b073: 0f 84 93 fe ff ff je 13af0c <msdos_eval4make+0x58> <== NOT EXECUTED
13b079: 89 fa mov %edi,%edx <== NOT EXECUTED
13b07b: 89 c7 mov %eax,%edi <== NOT EXECUTED
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
13b07d: 3d 01 7d 00 00 cmp $0x7d01,%eax <== NOT EXECUTED
13b082: 0f 85 d7 fe ff ff jne 13af5f <msdos_eval4make+0xab> <== NOT EXECUTED
13b088: eb a7 jmp 13b031 <msdos_eval4make+0x17d> <== NOT EXECUTED
13b08a: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
{
errno = ENOENT;
13b08c: e8 ef ca 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b091: c7 00 02 00 00 00 movl $0x2,(%eax) <== NOT EXECUTED
13b097: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
rc = -1;
goto err;
13b09c: e9 d5 fe ff ff jmp 13af76 <msdos_eval4make+0xc2> <== NOT EXECUTED
13b0a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
rtems_filesystem_root.node_access)
13b0a4: 8b 15 20 f3 16 00 mov 0x16f320,%edx <== NOT EXECUTED
13b0aa: 3b 7a 18 cmp 0x18(%edx),%edi <== NOT EXECUTED
13b0ad: 0f 84 59 fe ff ff je 13af0c <msdos_eval4make+0x58> <== NOT EXECUTED
13b0b3: 89 fa mov %edi,%edx <== NOT EXECUTED
13b0b5: 89 c7 mov %eax,%edi <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
13b0b7: 8d 45 cc lea -0x34(%ebp),%eax <== NOT EXECUTED
13b0ba: 8d 77 08 lea 0x8(%edi),%esi <== NOT EXECUTED
13b0bd: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED
13b0c2: 89 c7 mov %eax,%edi <== NOT EXECUTED
13b0c4: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
*pathloc = newloc;
13b0c6: 89 c6 mov %eax,%esi <== NOT EXECUTED
13b0c8: b1 05 mov $0x5,%cl <== NOT EXECUTED
13b0ca: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED
13b0cd: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
13b0cf: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13b0d2: 52 push %edx <== NOT EXECUTED
13b0d3: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
13b0d6: ff 70 10 pushl 0x10(%eax) <== NOT EXECUTED
13b0d9: e8 d2 03 ff ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
13b0de: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
13b0e0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b0e3: 85 c0 test %eax,%eax <== NOT EXECUTED
13b0e5: 0f 85 8b fe ff ff jne 13af76 <msdos_eval4make+0xc2> <== NOT EXECUTED
goto err;
rtems_semaphore_release(fs_info->vol_sema);
13b0eb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b0ee: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
13b0f1: ff b2 94 00 00 00 pushl 0x94(%edx) <== NOT EXECUTED
13b0f7: e8 f8 7e fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(&path[i-token_len],
13b0fc: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
13b0ff: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
13b102: 8b 41 0c mov 0xc(%ecx),%eax <== NOT EXECUTED
13b105: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13b108: 51 push %ecx <== NOT EXECUTED
13b109: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
13b10c: 2b 55 e4 sub -0x1c(%ebp),%edx <== NOT EXECUTED
13b10f: 03 55 08 add 0x8(%ebp),%edx <== NOT EXECUTED
13b112: 52 push %edx <== NOT EXECUTED
13b113: ff 50 04 call *0x4(%eax) <== NOT EXECUTED
13b116: 89 c3 mov %eax,%ebx <== NOT EXECUTED
13b118: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b11b: e9 6c fe ff ff jmp 13af8c <msdos_eval4make+0xd8> <== NOT EXECUTED
rc = -1;
goto error;
}
}
fat_fd = pathloc->node_access;
13b120: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
13b123: 8b 10 mov (%eax),%edx <== NOT EXECUTED
if (fat_fd->fat_file_type != FAT_DIRECTORY)
13b125: 83 7a 10 01 cmpl $0x1,0x10(%edx) <== NOT EXECUTED
13b129: 75 44 jne 13b16f <msdos_eval4make+0x2bb> <== NOT EXECUTED
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
loc->handlers = fs_info->directory_handlers;
13b12b: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
13b12e: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED
13b131: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
13b134: 8b 80 8c 00 00 00 mov 0x8c(%eax),%eax <== NOT EXECUTED
13b13a: 89 42 08 mov %eax,0x8(%edx) <== NOT EXECUTED
goto error;
}
msdos_set_handlers(pathloc);
rtems_semaphore_release(fs_info->vol_sema);
13b13d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b140: 8b 4d c0 mov -0x40(%ebp),%ecx <== NOT EXECUTED
13b143: ff b1 94 00 00 00 pushl 0x94(%ecx) <== NOT EXECUTED
13b149: e8 a6 7e fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return RC_OK;
13b14e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b151: e9 36 fe ff ff jmp 13af8c <msdos_eval4make+0xd8> <== NOT EXECUTED
13b156: 66 90 xchg %ax,%ax <== NOT EXECUTED
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
13b158: e8 23 ca 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b15d: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13b163: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
13b168: e9 1f fe ff ff jmp 13af8c <msdos_eval4make+0xd8> <== NOT EXECUTED
13b16d: 89 fa mov %edi,%edx <== NOT EXECUTED
fat_fd = pathloc->node_access;
if (fat_fd->fat_file_type != FAT_DIRECTORY)
{
errno = ENOTDIR;
13b16f: 89 55 bc mov %edx,-0x44(%ebp) <== NOT EXECUTED
13b172: e8 09 ca 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b177: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
13b17d: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
rc = -1;
goto error;
13b182: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED
13b185: e9 d5 fd ff ff jmp 13af5f <msdos_eval4make+0xab> <== NOT EXECUTED
0013ac6c <msdos_eval_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
13ac6c: 55 push %ebp <== NOT EXECUTED
13ac6d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13ac6f: 57 push %edi <== NOT EXECUTED
13ac70: 56 push %esi <== NOT EXECUTED
13ac71: 53 push %ebx <== NOT EXECUTED
13ac72: 83 ec 40 sub $0x40,%esp <== NOT EXECUTED
13ac75: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
13ac78: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
13ac7b: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
13ac7e: 89 45 c0 mov %eax,-0x40(%ebp) <== NOT EXECUTED
fat_file_fd_t *fat_fd = NULL;
rtems_filesystem_location_info_t newloc;
int i = 0;
int token_len = 0;
13ac81: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
msdos_token_types_t type = MSDOS_CURRENT_DIR;
const char *token;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
13ac88: 6a 00 push $0x0 <== NOT EXECUTED
13ac8a: 6a 00 push $0x0 <== NOT EXECUTED
13ac8c: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
13ac92: e8 61 82 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
13ac97: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ac9a: 85 c0 test %eax,%eax <== NOT EXECUTED
13ac9c: 0f 85 fa 01 00 00 jne 13ae9c <msdos_eval_path+0x230> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
13aca2: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
13aca4: 85 c0 test %eax,%eax <== NOT EXECUTED
13aca6: 0f 84 4c 01 00 00 je 13adf8 <msdos_eval_path+0x18c> <== NOT EXECUTED
goto err;
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
13acac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13acaf: 50 push %eax <== NOT EXECUTED
13acb0: e8 97 fd fe ff call 12aa4c <fat_file_reopen> <== NOT EXECUTED
13acb5: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc != RC_OK)
13acb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13acba: 85 c0 test %eax,%eax <== NOT EXECUTED
13acbc: 75 7e jne 13ad3c <msdos_eval_path+0xd0> <== NOT EXECUTED
13acbe: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) <== NOT EXECUTED
13acc5: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
{
type = msdos_get_token(&pathname[i], pathnamelen, &token, &token_len);
13acc8: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
13accb: 50 push %eax <== NOT EXECUTED
13accc: 8d 4d e0 lea -0x20(%ebp),%ecx <== NOT EXECUTED
13accf: 51 push %ecx <== NOT EXECUTED
13acd0: 57 push %edi <== NOT EXECUTED
13acd1: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13acd4: 03 45 c4 add -0x3c(%ebp),%eax <== NOT EXECUTED
13acd7: 50 push %eax <== NOT EXECUTED
13acd8: e8 17 1b 00 00 call 13c7f4 <msdos_get_token> <== NOT EXECUTED
pathnamelen -= token_len;
13acdd: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
13ace0: 29 cf sub %ecx,%edi <== NOT EXECUTED
i += token_len;
13ace2: 01 4d c4 add %ecx,-0x3c(%ebp) <== NOT EXECUTED
fat_fd = pathloc->node_access;
13ace5: 8b 13 mov (%ebx),%edx <== NOT EXECUTED
switch (type)
13ace7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13acea: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
13aced: 0f 84 e5 00 00 00 je 13add8 <msdos_eval_path+0x16c> <== NOT EXECUTED
13acf3: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
13acf6: 0f 84 b0 00 00 00 je 13adac <msdos_eval_path+0x140> <== NOT EXECUTED
13acfc: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
13acff: 74 5f je 13ad60 <msdos_eval_path+0xf4> <== NOT EXECUTED
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
13ad01: 85 c0 test %eax,%eax <== NOT EXECUTED
13ad03: 74 05 je 13ad0a <msdos_eval_path+0x9e> <== NOT EXECUTED
13ad05: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
13ad08: 75 be jne 13acc8 <msdos_eval_path+0x5c> <== NOT EXECUTED
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
13ad0a: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
13ad0d: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
13ad10: 83 7a 10 01 cmpl $0x1,0x10(%edx) <== NOT EXECUTED
13ad14: 0f 84 72 01 00 00 je 13ae8c <msdos_eval_path+0x220> <== NOT EXECUTED
loc->handlers = fs_info->directory_handlers;
else
loc->handlers = fs_info->file_handlers;
13ad1a: 8b 80 90 00 00 00 mov 0x90(%eax),%eax <== NOT EXECUTED
13ad20: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
*/
fat_fd = pathloc->node_access;
msdos_set_handlers(pathloc);
rtems_semaphore_release(fs_info->vol_sema);
13ad23: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13ad26: 8b 7d c0 mov -0x40(%ebp),%edi <== NOT EXECUTED
13ad29: ff b7 94 00 00 00 pushl 0x94(%edi) <== NOT EXECUTED
13ad2f: e8 c0 82 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return RC_OK;
13ad34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ad37: eb 1b jmp 13ad54 <msdos_eval_path+0xe8> <== NOT EXECUTED
13ad39: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
13ad3c: 89 c7 mov %eax,%edi <== NOT EXECUTED
error:
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
13ad3e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13ad41: 8b 45 c0 mov -0x40(%ebp),%eax <== NOT EXECUTED
13ad44: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
13ad4a: e8 a5 82 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
13ad4f: 89 fe mov %edi,%esi <== NOT EXECUTED
return rc;
13ad51: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13ad54: 89 f0 mov %esi,%eax <== NOT EXECUTED
13ad56: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13ad59: 5b pop %ebx <== NOT EXECUTED
13ad5a: 5e pop %esi <== NOT EXECUTED
13ad5b: 5f pop %edi <== NOT EXECUTED
13ad5c: c9 leave <== NOT EXECUTED
13ad5d: c3 ret <== NOT EXECUTED
13ad5e: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
case MSDOS_UP_DIR:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
13ad60: 83 7a 10 01 cmpl $0x1,0x10(%edx) <== NOT EXECUTED
13ad64: 75 78 jne 13adde <msdos_eval_path+0x172> <== NOT EXECUTED
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access)
13ad66: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
}
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
13ad69: 3b 50 1c cmp 0x1c(%eax),%edx <== NOT EXECUTED
13ad6c: 0f 84 9e 00 00 00 je 13ae10 <msdos_eval_path+0x1a4> <== NOT EXECUTED
/*
* Otherwise find the token name in the present location and
* set the node access to the point we have found.
*/
rc = msdos_find_name(pathloc, token, token_len);
13ad72: 50 push %eax <== NOT EXECUTED
13ad73: 51 push %ecx <== NOT EXECUTED
13ad74: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13ad77: 53 push %ebx <== NOT EXECUTED
13ad78: 89 55 bc mov %edx,-0x44(%ebp) <== NOT EXECUTED
13ad7b: e8 e0 1f 00 00 call 13cd60 <msdos_find_name> <== NOT EXECUTED
if (rc != RC_OK)
13ad80: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ad83: 85 c0 test %eax,%eax <== NOT EXECUTED
13ad85: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED
13ad88: 0f 84 3a ff ff ff je 13acc8 <msdos_eval_path+0x5c> <== NOT EXECUTED
13ad8e: 89 c7 mov %eax,%edi <== NOT EXECUTED
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
13ad90: 3d 01 7d 00 00 cmp $0x7d01,%eax <== NOT EXECUTED
13ad95: 75 2b jne 13adc2 <msdos_eval_path+0x156> <== NOT EXECUTED
{
errno = ENOENT;
13ad97: e8 e4 cd 00 00 call 147b80 <__errno> <== NOT EXECUTED
13ad9c: c7 00 02 00 00 00 movl $0x2,(%eax) <== NOT EXECUTED
13ada2: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
13ada7: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED
13adaa: eb 16 jmp 13adc2 <msdos_eval_path+0x156> <== NOT EXECUTED
case MSDOS_NO_MORE_PATH:
case MSDOS_CURRENT_DIR:
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
13adac: 89 55 bc mov %edx,-0x44(%ebp) <== NOT EXECUTED
13adaf: e8 cc cd 00 00 call 147b80 <__errno> <== NOT EXECUTED
13adb4: c7 00 5b 00 00 00 movl $0x5b,(%eax) <== NOT EXECUTED
13adba: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
rc = -1;
goto error;
13adbf: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
13adc2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13adc5: 52 push %edx <== NOT EXECUTED
13adc6: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
13adc9: e8 e2 06 ff ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
13adce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13add1: e9 68 ff ff ff jmp 13ad3e <msdos_eval_path+0xd2> <== NOT EXECUTED
13add6: 66 90 xchg %ax,%ax <== NOT EXECUTED
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
13add8: 83 7a 10 01 cmpl $0x1,0x10(%edx) <== NOT EXECUTED
13addc: 74 94 je 13ad72 <msdos_eval_path+0x106> <== NOT EXECUTED
{
errno = ENOTSUP;
13adde: 89 55 bc mov %edx,-0x44(%ebp) <== NOT EXECUTED
13ade1: e8 9a cd 00 00 call 147b80 <__errno> <== NOT EXECUTED
13ade6: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
13adec: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
rc = -1;
goto error;
13adf1: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED
13adf4: eb cc jmp 13adc2 <msdos_eval_path+0x156> <== NOT EXECUTED
13adf6: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
{
errno = ENOENT;
13adf8: e8 83 cd 00 00 call 147b80 <__errno> <== NOT EXECUTED
13adfd: c7 00 02 00 00 00 movl $0x2,(%eax) <== NOT EXECUTED
13ae03: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
rc = -1;
goto err;
13ae08: e9 31 ff ff ff jmp 13ad3e <msdos_eval_path+0xd2> <== NOT EXECUTED
13ae0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
rtems_filesystem_root.node_access)
13ae10: 8b 0d 20 f3 16 00 mov 0x16f320,%ecx <== NOT EXECUTED
13ae16: 3b 51 18 cmp 0x18(%ecx),%edx <== NOT EXECUTED
13ae19: 0f 84 a9 fe ff ff je 13acc8 <msdos_eval_path+0x5c> <== NOT EXECUTED
13ae1f: 89 7d 0c mov %edi,0xc(%ebp) <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
13ae22: 8d 7d cc lea -0x34(%ebp),%edi <== NOT EXECUTED
13ae25: 8d 70 08 lea 0x8(%eax),%esi <== NOT EXECUTED
13ae28: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED
13ae2d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
*pathloc = newloc;
13ae2f: 8d 75 cc lea -0x34(%ebp),%esi <== NOT EXECUTED
13ae32: b1 05 mov $0x5,%cl <== NOT EXECUTED
13ae34: 89 df mov %ebx,%edi <== NOT EXECUTED
13ae36: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
13ae38: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13ae3b: 52 push %edx <== NOT EXECUTED
13ae3c: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
13ae3f: e8 6c 06 ff ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
13ae44: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
13ae46: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ae49: 85 c0 test %eax,%eax <== NOT EXECUTED
13ae4b: 0f 85 ed fe ff ff jne 13ad3e <msdos_eval_path+0xd2> <== NOT EXECUTED
goto err;
rtems_semaphore_release(fs_info->vol_sema);
13ae51: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13ae54: 8b 45 c0 mov -0x40(%ebp),%eax <== NOT EXECUTED
13ae57: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
13ae5d: e8 92 81 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return (*pathloc->ops->evalpath_h)(&(pathname[i-token_len]),
13ae62: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13ae65: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
13ae68: 53 push %ebx <== NOT EXECUTED
13ae69: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13ae6c: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
13ae6f: 01 c1 add %eax,%ecx <== NOT EXECUTED
13ae71: 51 push %ecx <== NOT EXECUTED
13ae72: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
13ae75: 29 c1 sub %eax,%ecx <== NOT EXECUTED
13ae77: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13ae7a: 01 c8 add %ecx,%eax <== NOT EXECUTED
13ae7c: 50 push %eax <== NOT EXECUTED
13ae7d: ff 12 call *(%edx) <== NOT EXECUTED
13ae7f: 89 c6 mov %eax,%esi <== NOT EXECUTED
13ae81: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13ae84: e9 cb fe ff ff jmp 13ad54 <msdos_eval_path+0xe8> <== NOT EXECUTED
13ae89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
loc->handlers = fs_info->directory_handlers;
13ae8c: 8b 80 8c 00 00 00 mov 0x8c(%eax),%eax <== NOT EXECUTED
13ae92: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
13ae95: e9 89 fe ff ff jmp 13ad23 <msdos_eval_path+0xb7> <== NOT EXECUTED
13ae9a: 66 90 xchg %ax,%ax <== NOT EXECUTED
const char *token;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
13ae9c: e8 df cc 00 00 call 147b80 <__errno> <== NOT EXECUTED
13aea1: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13aea7: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
13aeac: e9 a3 fe ff ff jmp 13ad54 <msdos_eval_path+0xe8> <== NOT EXECUTED
0013b194 <msdos_file_chmod>:
* RC_OK always
*/
int
msdos_file_chmod(rtems_filesystem_location_info_t *pathloc,
mode_t mode)
{
13b194: 55 push %ebp <== NOT EXECUTED
13b195: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return RC_OK;
}
13b197: 31 c0 xor %eax,%eax <== NOT EXECUTED
13b199: c9 leave <== NOT EXECUTED
13b19a: c3 ret <== NOT EXECUTED
0013b744 <msdos_file_close>:
* RC_OK, if file closed successfully, or -1 if error occured (errno set
* appropriately)
*/
int
msdos_file_close(rtems_libio_t *iop)
{
13b744: 55 push %ebp <== NOT EXECUTED
13b745: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13b747: 57 push %edi <== NOT EXECUTED
13b748: 56 push %esi <== NOT EXECUTED
13b749: 53 push %ebx <== NOT EXECUTED
13b74a: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED
13b74d: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
13b750: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
13b753: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
13b756: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
13b759: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
13b75c: 6a 00 push $0x0 <== NOT EXECUTED
13b75e: 6a 00 push $0x0 <== NOT EXECUTED
13b760: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
13b766: e8 8d 77 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
13b76b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b76e: 85 c0 test %eax,%eax <== NOT EXECUTED
13b770: 0f 85 92 00 00 00 jne 13b808 <msdos_file_close+0xc4> <== NOT EXECUTED
/*
* if fat-file descriptor is not marked as "removed", synchronize
* size, first cluster number, write time and date fields of the file
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
13b776: f6 47 30 01 testb $0x1,0x30(%edi) <== NOT EXECUTED
13b77a: 75 3f jne 13b7bb <msdos_file_close+0x77> <== NOT EXECUTED
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
13b77c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13b77f: 57 push %edi <== NOT EXECUTED
13b780: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
13b783: e8 50 0d 00 00 call 13c4d8 <msdos_set_first_cluster_num><== NOT EXECUTED
13b788: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc != RC_OK)
13b78a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b78d: 85 c0 test %eax,%eax <== NOT EXECUTED
13b78f: 75 57 jne 13b7e8 <msdos_file_close+0xa4> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
13b791: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13b794: 57 push %edi <== NOT EXECUTED
13b795: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
13b798: e8 cb 0c 00 00 call 13c468 <msdos_set_file_size> <== NOT EXECUTED
13b79d: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc != RC_OK)
13b79f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b7a2: 85 c0 test %eax,%eax <== NOT EXECUTED
13b7a4: 75 42 jne 13b7e8 <msdos_file_close+0xa4> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
13b7a6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13b7a9: 57 push %edi <== NOT EXECUTED
13b7aa: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
13b7ad: e8 2a 0f 00 00 call 13c6dc <msdos_set_dir_wrt_time_and_date><== NOT EXECUTED
13b7b2: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc != RC_OK)
13b7b4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b7b7: 85 c0 test %eax,%eax <== NOT EXECUTED
13b7b9: 75 2d jne 13b7e8 <msdos_file_close+0xa4> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
13b7bb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13b7be: 57 push %edi <== NOT EXECUTED
13b7bf: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
13b7c2: e8 e9 fc fe ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
13b7c7: 89 c6 mov %eax,%esi <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
13b7c9: 5a pop %edx <== NOT EXECUTED
13b7ca: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13b7cd: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
13b7d3: e8 1c 78 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
13b7d8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13b7db: 89 f0 mov %esi,%eax <== NOT EXECUTED
13b7dd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b7e0: 5b pop %ebx <== NOT EXECUTED
13b7e1: 5e pop %esi <== NOT EXECUTED
13b7e2: 5f pop %edi <== NOT EXECUTED
13b7e3: c9 leave <== NOT EXECUTED
13b7e4: c3 ret <== NOT EXECUTED
13b7e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
13b7e8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b7eb: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13b7ee: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
13b7f4: e8 fb 77 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
13b7f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
13b7fc: 89 f0 mov %esi,%eax <== NOT EXECUTED
13b7fe: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b801: 5b pop %ebx <== NOT EXECUTED
13b802: 5e pop %esi <== NOT EXECUTED
13b803: 5f pop %edi <== NOT EXECUTED
13b804: c9 leave <== NOT EXECUTED
13b805: c3 ret <== NOT EXECUTED
13b806: 66 90 xchg %ax,%ax <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
13b808: e8 73 c3 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b80d: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13b813: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
13b818: eb c1 jmp 13b7db <msdos_file_close+0x97> <== NOT EXECUTED
0013b2e4 <msdos_file_datasync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_datasync(rtems_libio_t *iop)
{
13b2e4: 55 push %ebp <== NOT EXECUTED
13b2e5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13b2e7: 57 push %edi <== NOT EXECUTED
13b2e8: 56 push %esi <== NOT EXECUTED
13b2e9: 53 push %ebx <== NOT EXECUTED
13b2ea: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
13b2ed: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
13b2f0: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
13b2f3: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
13b2f6: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
13b2f9: 6a 00 push $0x0 <== NOT EXECUTED
13b2fb: 6a 00 push $0x0 <== NOT EXECUTED
13b2fd: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
13b303: e8 f0 7b fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
13b308: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b30b: 85 c0 test %eax,%eax <== NOT EXECUTED
13b30d: 75 25 jne 13b334 <msdos_file_datasync+0x50><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
13b30f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13b312: 57 push %edi <== NOT EXECUTED
13b313: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
13b316: e8 71 f8 fe ff call 12ab8c <fat_file_datasync> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
13b31b: 59 pop %ecx <== NOT EXECUTED
13b31c: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
13b322: e8 cd 7c fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
13b327: 31 c0 xor %eax,%eax <== NOT EXECUTED
return RC_OK;
13b329: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13b32c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b32f: 5b pop %ebx <== NOT EXECUTED
13b330: 5e pop %esi <== NOT EXECUTED
13b331: 5f pop %edi <== NOT EXECUTED
13b332: c9 leave <== NOT EXECUTED
13b333: c3 ret <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
13b334: e8 47 c8 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b339: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13b33f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
13b344: eb e6 jmp 13b32c <msdos_file_datasync+0x48><== NOT EXECUTED
0013b428 <msdos_file_ftruncate>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, rtems_off64_t length)
{
13b428: 55 push %ebp <== NOT EXECUTED
13b429: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13b42b: 57 push %edi <== NOT EXECUTED
13b42c: 56 push %esi <== NOT EXECUTED
13b42d: 53 push %ebx <== NOT EXECUTED
13b42e: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
13b431: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
13b434: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
13b437: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED
13b43a: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
13b43d: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
13b440: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
13b443: 8b 48 34 mov 0x34(%eax),%ecx <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
13b446: 8b 73 38 mov 0x38(%ebx),%esi <== NOT EXECUTED
if (length >= fat_fd->fat_file_size)
13b449: 8b 46 18 mov 0x18(%esi),%eax <== NOT EXECUTED
13b44c: 31 d2 xor %edx,%edx <== NOT EXECUTED
13b44e: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
13b451: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
13b454: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
13b457: 39 c2 cmp %eax,%edx <== NOT EXECUTED
13b459: 7e 71 jle 13b4cc <msdos_file_ftruncate+0xa4><== NOT EXECUTED
return RC_OK;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
13b45b: 50 push %eax <== NOT EXECUTED
13b45c: 6a 00 push $0x0 <== NOT EXECUTED
13b45e: 6a 00 push $0x0 <== NOT EXECUTED
13b460: ff b1 94 00 00 00 pushl 0x94(%ecx) <== NOT EXECUTED
13b466: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED
13b469: e8 8a 7a fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
13b46e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b471: 85 c0 test %eax,%eax <== NOT EXECUTED
13b473: 8b 4d d8 mov -0x28(%ebp),%ecx <== NOT EXECUTED
13b476: 0f 85 84 00 00 00 jne 13b500 <msdos_file_ftruncate+0xd8><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_truncate(iop->pathinfo.mt_entry, fat_fd, length);
13b47c: 57 push %edi <== NOT EXECUTED
13b47d: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
13b480: 56 push %esi <== NOT EXECUTED
13b481: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
13b484: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED
13b487: e8 00 f9 fe ff call 12ad8c <fat_file_truncate> <== NOT EXECUTED
13b48c: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
13b48e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b491: 85 c0 test %eax,%eax <== NOT EXECUTED
13b493: 8b 4d d8 mov -0x28(%ebp),%ecx <== NOT EXECUTED
13b496: 75 18 jne 13b4b0 <msdos_file_ftruncate+0x88><== NOT EXECUTED
/*
* fat_file_truncate do nothing if new length >= fat-file size, so update
* file size only if length < fat-file size
*/
if (length < fat_fd->fat_file_size)
13b498: 8b 46 18 mov 0x18(%esi),%eax <== NOT EXECUTED
13b49b: 31 d2 xor %edx,%edx <== NOT EXECUTED
13b49d: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
13b4a0: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
13b4a3: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) <== NOT EXECUTED
13b4a7: 7f 07 jg 13b4b0 <msdos_file_ftruncate+0x88><== NOT EXECUTED
13b4a9: 7c 41 jl 13b4ec <msdos_file_ftruncate+0xc4><== NOT EXECUTED
13b4ab: 39 45 c4 cmp %eax,-0x3c(%ebp) <== NOT EXECUTED
13b4ae: 72 3c jb 13b4ec <msdos_file_ftruncate+0xc4><== NOT EXECUTED
iop->size = fat_fd->fat_file_size = length;
rtems_semaphore_release(fs_info->vol_sema);
13b4b0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b4b3: ff b1 94 00 00 00 pushl 0x94(%ecx) <== NOT EXECUTED
13b4b9: e8 36 7b fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return RC_OK;
13b4be: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13b4c1: 89 f8 mov %edi,%eax <== NOT EXECUTED
13b4c3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b4c6: 5b pop %ebx <== NOT EXECUTED
13b4c7: 5e pop %esi <== NOT EXECUTED
13b4c8: 5f pop %edi <== NOT EXECUTED
13b4c9: c9 leave <== NOT EXECUTED
13b4ca: c3 ret <== NOT EXECUTED
13b4cb: 90 nop <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
if (length >= fat_fd->fat_file_size)
13b4cc: 7d 0e jge 13b4dc <msdos_file_ftruncate+0xb4><== NOT EXECUTED
13b4ce: 31 ff xor %edi,%edi <== NOT EXECUTED
if (length < fat_fd->fat_file_size)
iop->size = fat_fd->fat_file_size = length;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
13b4d0: 89 f8 mov %edi,%eax <== NOT EXECUTED
13b4d2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b4d5: 5b pop %ebx <== NOT EXECUTED
13b4d6: 5e pop %esi <== NOT EXECUTED
13b4d7: 5f pop %edi <== NOT EXECUTED
13b4d8: c9 leave <== NOT EXECUTED
13b4d9: c3 ret <== NOT EXECUTED
13b4da: 66 90 xchg %ax,%ax <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->file_info;
if (length >= fat_fd->fat_file_size)
13b4dc: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
13b4df: 39 55 e0 cmp %edx,-0x20(%ebp) <== NOT EXECUTED
13b4e2: 0f 87 73 ff ff ff ja 13b45b <msdos_file_ftruncate+0x33><== NOT EXECUTED
13b4e8: eb e4 jmp 13b4ce <msdos_file_ftruncate+0xa6><== NOT EXECUTED
13b4ea: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* fat_file_truncate do nothing if new length >= fat-file size, so update
* file size only if length < fat-file size
*/
if (length < fat_fd->fat_file_size)
iop->size = fat_fd->fat_file_size = length;
13b4ec: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
13b4ef: 89 56 18 mov %edx,0x18(%esi) <== NOT EXECUTED
13b4f2: 89 53 04 mov %edx,0x4(%ebx) <== NOT EXECUTED
13b4f5: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED
13b4fc: eb b2 jmp 13b4b0 <msdos_file_ftruncate+0x88><== NOT EXECUTED
13b4fe: 66 90 xchg %ax,%ax <== NOT EXECUTED
return RC_OK;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
13b500: e8 7b c6 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b505: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13b50b: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
13b510: eb be jmp 13b4d0 <msdos_file_ftruncate+0xa8><== NOT EXECUTED
0013b18c <msdos_file_ioctl>:
* RETURNS:
*
*/
int
msdos_file_ioctl(rtems_libio_t *iop,uint32_t command, void *buffer)
{
13b18c: 55 push %ebp <== NOT EXECUTED
13b18d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
int rc = RC_OK;
return rc;
}
13b18f: 31 c0 xor %eax,%eax <== NOT EXECUTED
13b191: c9 leave <== NOT EXECUTED
13b192: c3 ret <== NOT EXECUTED
0013b514 <msdos_file_lseek>:
* new offset on success, or -1 if error occured (errno set
* appropriately).
*/
rtems_off64_t
msdos_file_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
13b514: 55 push %ebp <== NOT EXECUTED
13b515: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13b517: 57 push %edi <== NOT EXECUTED
13b518: 56 push %esi <== NOT EXECUTED
13b519: 53 push %ebx <== NOT EXECUTED
13b51a: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED
13b51d: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
13b520: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
13b523: 8b 78 34 mov 0x34(%eax),%edi <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
13b526: 8b 73 38 mov 0x38(%ebx),%esi <== NOT EXECUTED
uint32_t real_size = 0;
13b529: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
13b530: 6a 00 push $0x0 <== NOT EXECUTED
13b532: 6a 00 push $0x0 <== NOT EXECUTED
13b534: ff b7 94 00 00 00 pushl 0x94(%edi) <== NOT EXECUTED
13b53a: e8 b9 79 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
13b53f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b542: 85 c0 test %eax,%eax <== NOT EXECUTED
13b544: 0f 85 82 00 00 00 jne 13b5cc <msdos_file_lseek+0xb8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_extend(iop->pathinfo.mt_entry, fat_fd, iop->offset,
13b54a: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
13b54d: 50 push %eax <== NOT EXECUTED
13b54e: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
13b551: 56 push %esi <== NOT EXECUTED
13b552: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
13b555: e8 12 f9 fe ff call 12ae6c <fat_file_extend> <== NOT EXECUTED
&real_size);
if (rc != RC_OK)
13b55a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b55d: 85 c0 test %eax,%eax <== NOT EXECUTED
13b55f: 75 47 jne 13b5a8 <msdos_file_lseek+0x94> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
13b561: 8b 56 18 mov 0x18(%esi),%edx <== NOT EXECUTED
13b564: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13b567: 39 c2 cmp %eax,%edx <== NOT EXECUTED
13b569: 72 2d jb 13b598 <msdos_file_lseek+0x84> <== NOT EXECUTED
13b56b: 89 d0 mov %edx,%eax <== NOT EXECUTED
fat_fd->fat_file_size = iop->offset = real_size;
iop->size = fat_fd->fat_file_size;
13b56d: 89 43 04 mov %eax,0x4(%ebx) <== NOT EXECUTED
13b570: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
13b577: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b57a: ff b7 94 00 00 00 pushl 0x94(%edi) <== NOT EXECUTED
13b580: e8 6f 7a fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return iop->offset;
13b585: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
13b588: 8b 53 10 mov 0x10(%ebx),%edx <== NOT EXECUTED
13b58b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13b58e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b591: 5b pop %ebx <== NOT EXECUTED
13b592: 5e pop %esi <== NOT EXECUTED
13b593: 5f pop %edi <== NOT EXECUTED
13b594: c9 leave <== NOT EXECUTED
13b595: c3 ret <== NOT EXECUTED
13b596: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset = real_size;
13b598: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
13b59b: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
13b5a2: 89 46 18 mov %eax,0x18(%esi) <== NOT EXECUTED
13b5a5: eb c6 jmp 13b56d <msdos_file_lseek+0x59> <== NOT EXECUTED
13b5a7: 90 nop <== NOT EXECUTED
rc = fat_file_extend(iop->pathinfo.mt_entry, fat_fd, iop->offset,
&real_size);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
13b5a8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b5ab: ff b7 94 00 00 00 pushl 0x94(%edi) <== NOT EXECUTED
13b5b1: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
13b5b4: e8 3b 7a fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
13b5b9: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
13b5bc: 89 d0 mov %edx,%eax <== NOT EXECUTED
13b5be: 99 cltd <== NOT EXECUTED
13b5bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
return iop->offset;
}
13b5c2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b5c5: 5b pop %ebx <== NOT EXECUTED
13b5c6: 5e pop %esi <== NOT EXECUTED
13b5c7: 5f pop %edi <== NOT EXECUTED
13b5c8: c9 leave <== NOT EXECUTED
13b5c9: c3 ret <== NOT EXECUTED
13b5ca: 66 90 xchg %ax,%ax <== NOT EXECUTED
uint32_t real_size = 0;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
13b5cc: e8 af c5 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b5d1: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13b5d7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
13b5dc: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
13b5e1: eb ab jmp 13b58e <msdos_file_lseek+0x7a> <== NOT EXECUTED
0013b81c <msdos_file_open>:
* and errno set appropriately
*/
int
msdos_file_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
13b81c: 55 push %ebp <== NOT EXECUTED
13b81d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13b81f: 57 push %edi <== NOT EXECUTED
13b820: 56 push %esi <== NOT EXECUTED
13b821: 53 push %ebx <== NOT EXECUTED
13b822: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED
13b825: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
13b828: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
13b82b: 8b 78 34 mov 0x34(%eax),%edi <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
13b82e: 8b 43 38 mov 0x38(%ebx),%eax <== NOT EXECUTED
13b831: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
13b834: 6a 00 push $0x0 <== NOT EXECUTED
13b836: 6a 00 push $0x0 <== NOT EXECUTED
13b838: ff b7 94 00 00 00 pushl 0x94(%edi) <== NOT EXECUTED
13b83e: e8 b5 76 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
13b843: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b846: 85 c0 test %eax,%eax <== NOT EXECUTED
13b848: 75 56 jne 13b8a0 <msdos_file_open+0x84> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_reopen(fat_fd);
13b84a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b84d: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13b850: e8 f7 f1 fe ff call 12aa4c <fat_file_reopen> <== NOT EXECUTED
13b855: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc != RC_OK)
13b857: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b85a: 85 c0 test %eax,%eax <== NOT EXECUTED
13b85c: 75 14 jne 13b872 <msdos_file_open+0x56> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
13b85e: f6 43 15 02 testb $0x2,0x15(%ebx) <== NOT EXECUTED
13b862: 75 2c jne 13b890 <msdos_file_open+0x74> <== NOT EXECUTED
13b864: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
13b867: 8b 41 18 mov 0x18(%ecx),%eax <== NOT EXECUTED
13b86a: 31 d2 xor %edx,%edx <== NOT EXECUTED
iop->offset = fat_fd->fat_file_size;
iop->size = fat_fd->fat_file_size;
13b86c: 89 43 04 mov %eax,0x4(%ebx) <== NOT EXECUTED
13b86f: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
13b872: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b875: ff b7 94 00 00 00 pushl 0x94(%edi) <== NOT EXECUTED
13b87b: e8 74 77 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return RC_OK;
13b880: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13b883: 89 f0 mov %esi,%eax <== NOT EXECUTED
13b885: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b888: 5b pop %ebx <== NOT EXECUTED
13b889: 5e pop %esi <== NOT EXECUTED
13b88a: 5f pop %edi <== NOT EXECUTED
13b88b: c9 leave <== NOT EXECUTED
13b88c: c3 ret <== NOT EXECUTED
13b88d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = fat_fd->fat_file_size;
13b890: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
13b893: 8b 41 18 mov 0x18(%ecx),%eax <== NOT EXECUTED
13b896: 31 d2 xor %edx,%edx <== NOT EXECUTED
13b898: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
13b89b: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED
13b89e: eb cc jmp 13b86c <msdos_file_open+0x50> <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
13b8a0: e8 db c2 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b8a5: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13b8ab: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
13b8b0: eb d1 jmp 13b883 <msdos_file_open+0x67> <== NOT EXECUTED
0013b6d0 <msdos_file_read>:
* the number of bytes read on success, or -1 if error occured (errno set
* appropriately)
*/
ssize_t
msdos_file_read(rtems_libio_t *iop, void *buffer, size_t count)
{
13b6d0: 55 push %ebp <== NOT EXECUTED
13b6d1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13b6d3: 57 push %edi <== NOT EXECUTED
13b6d4: 56 push %esi <== NOT EXECUTED
13b6d5: 53 push %ebx <== NOT EXECUTED
13b6d6: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
13b6d9: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
13b6dc: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
13b6df: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
13b6e2: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
13b6e5: 6a 00 push $0x0 <== NOT EXECUTED
13b6e7: 6a 00 push $0x0 <== NOT EXECUTED
13b6e9: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
13b6ef: e8 04 78 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
13b6f4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b6f7: 85 c0 test %eax,%eax <== NOT EXECUTED
13b6f9: 75 35 jne 13b730 <msdos_file_read+0x60> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
13b6fb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b6fe: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13b701: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13b704: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
13b707: 57 push %edi <== NOT EXECUTED
13b708: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
13b70b: e8 9c fb fe ff call 12b2ac <fat_file_read> <== NOT EXECUTED
13b710: 89 c3 mov %eax,%ebx <== NOT EXECUTED
buffer);
rtems_semaphore_release(fs_info->vol_sema);
13b712: 83 c4 14 add $0x14,%esp <== NOT EXECUTED
13b715: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
13b71b: e8 d4 78 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return ret;
13b720: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13b723: 89 d8 mov %ebx,%eax <== NOT EXECUTED
13b725: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b728: 5b pop %ebx <== NOT EXECUTED
13b729: 5e pop %esi <== NOT EXECUTED
13b72a: 5f pop %edi <== NOT EXECUTED
13b72b: c9 leave <== NOT EXECUTED
13b72c: c3 ret <== NOT EXECUTED
13b72d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
13b730: e8 4b c4 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b735: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13b73b: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
13b740: eb e1 jmp 13b723 <msdos_file_read+0x53> <== NOT EXECUTED
0013b240 <msdos_file_rmnod>:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
13b240: 55 push %ebp <== NOT EXECUTED
13b241: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13b243: 57 push %edi <== NOT EXECUTED
13b244: 56 push %esi <== NOT EXECUTED
13b245: 53 push %ebx <== NOT EXECUTED
13b246: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED
13b249: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
13b24c: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
13b24f: 8b 78 34 mov 0x34(%eax),%edi <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
13b252: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
13b254: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
13b257: 6a 00 push $0x0 <== NOT EXECUTED
13b259: 6a 00 push $0x0 <== NOT EXECUTED
13b25b: ff b7 94 00 00 00 pushl 0x94(%edi) <== NOT EXECUTED
13b261: e8 92 7c fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
13b266: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b269: 85 c0 test %eax,%eax <== NOT EXECUTED
13b26b: 75 63 jne 13b2d0 <msdos_file_rmnod+0x90> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry,
13b26d: 52 push %edx <== NOT EXECUTED
13b26e: 68 e5 00 00 00 push $0xe5 <== NOT EXECUTED
13b273: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13b276: 83 c0 20 add $0x20,%eax <== NOT EXECUTED
13b279: 50 push %eax <== NOT EXECUTED
13b27a: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
13b27d: e8 06 13 00 00 call 13c588 <msdos_set_first_char4file_name><== NOT EXECUTED
13b282: 89 c6 mov %eax,%esi <== NOT EXECUTED
&fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
13b284: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b287: 85 c0 test %eax,%eax <== NOT EXECUTED
13b289: 75 29 jne 13b2b4 <msdos_file_rmnod+0x74> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
13b28b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13b28e: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13b291: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
13b294: e8 03 fa fe ff call 12ac9c <fat_file_mark_removed> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
13b299: 58 pop %eax <== NOT EXECUTED
13b29a: ff b7 94 00 00 00 pushl 0x94(%edi) <== NOT EXECUTED
13b2a0: e8 4f 7d fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return RC_OK;
13b2a5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13b2a8: 89 f0 mov %esi,%eax <== NOT EXECUTED
13b2aa: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b2ad: 5b pop %ebx <== NOT EXECUTED
13b2ae: 5e pop %esi <== NOT EXECUTED
13b2af: 5f pop %edi <== NOT EXECUTED
13b2b0: c9 leave <== NOT EXECUTED
13b2b1: c3 ret <== NOT EXECUTED
13b2b2: 66 90 xchg %ax,%ax <== NOT EXECUTED
rc = msdos_set_first_char4file_name(pathloc->mt_entry,
&fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
13b2b4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b2b7: ff b7 94 00 00 00 pushl 0x94(%edi) <== NOT EXECUTED
13b2bd: e8 32 7d fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
13b2c2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
13b2c5: 89 f0 mov %esi,%eax <== NOT EXECUTED
13b2c7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b2ca: 5b pop %ebx <== NOT EXECUTED
13b2cb: 5e pop %esi <== NOT EXECUTED
13b2cc: 5f pop %edi <== NOT EXECUTED
13b2cd: c9 leave <== NOT EXECUTED
13b2ce: c3 ret <== NOT EXECUTED
13b2cf: 90 nop <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
13b2d0: e8 ab c8 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b2d5: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13b2db: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
13b2e0: eb c6 jmp 13b2a8 <msdos_file_rmnod+0x68> <== NOT EXECUTED
0013b19c <msdos_file_stat>:
int
msdos_file_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
13b19c: 55 push %ebp <== NOT EXECUTED
13b19d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13b19f: 57 push %edi <== NOT EXECUTED
13b1a0: 56 push %esi <== NOT EXECUTED
13b1a1: 53 push %ebx <== NOT EXECUTED
13b1a2: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
13b1a5: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13b1a8: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
13b1ab: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
13b1ae: 8b 72 34 mov 0x34(%edx),%esi <== NOT EXECUTED
fat_file_fd_t *fat_fd = loc->node_access;
13b1b1: 8b 38 mov (%eax),%edi <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
13b1b3: 6a 00 push $0x0 <== NOT EXECUTED
13b1b5: 6a 00 push $0x0 <== NOT EXECUTED
13b1b7: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
13b1bd: e8 36 7d fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
13b1c2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b1c5: 85 c0 test %eax,%eax <== NOT EXECUTED
13b1c7: 75 63 jne 13b22c <msdos_file_stat+0x90> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
13b1c9: 8b 46 54 mov 0x54(%esi),%eax <== NOT EXECUTED
13b1cc: 8b 56 58 mov 0x58(%esi),%edx <== NOT EXECUTED
13b1cf: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
13b1d1: 89 53 04 mov %edx,0x4(%ebx) <== NOT EXECUTED
buf->st_ino = fat_fd->ino;
13b1d4: 8b 47 0c mov 0xc(%edi),%eax <== NOT EXECUTED
13b1d7: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
13b1da: c7 43 0c ff 81 00 00 movl $0x81ff,0xc(%ebx) <== NOT EXECUTED
buf->st_rdev = 0ll;
13b1e1: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) <== NOT EXECUTED
13b1e8: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) <== NOT EXECUTED
buf->st_size = fat_fd->fat_file_size;
13b1ef: 8b 47 18 mov 0x18(%edi),%eax <== NOT EXECUTED
13b1f2: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED
13b1f5: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
13b1fc: c1 e8 09 shr $0x9,%eax <== NOT EXECUTED
13b1ff: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED
buf->st_blksize = fs_info->fat.vol.bps;
13b202: 0f b7 06 movzwl (%esi),%eax <== NOT EXECUTED
13b205: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED
buf->st_mtime = fat_fd->mtime;
13b208: 8b 47 40 mov 0x40(%edi),%eax <== NOT EXECUTED
13b20b: 89 43 30 mov %eax,0x30(%ebx) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
13b20e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b211: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
13b217: e8 d8 7d fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
13b21c: 31 c0 xor %eax,%eax <== NOT EXECUTED
return RC_OK;
13b21e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13b221: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b224: 5b pop %ebx <== NOT EXECUTED
13b225: 5e pop %esi <== NOT EXECUTED
13b226: 5f pop %edi <== NOT EXECUTED
13b227: c9 leave <== NOT EXECUTED
13b228: c3 ret <== NOT EXECUTED
13b229: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
13b22c: e8 4f c9 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b231: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13b237: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
13b23c: eb e3 jmp 13b221 <msdos_file_stat+0x85> <== NOT EXECUTED
0013b348 <msdos_file_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_sync(rtems_libio_t *iop)
{
13b348: 55 push %ebp <== NOT EXECUTED
13b349: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13b34b: 57 push %edi <== NOT EXECUTED
13b34c: 56 push %esi <== NOT EXECUTED
13b34d: 53 push %ebx <== NOT EXECUTED
13b34e: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED
13b351: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->file_info;
13b354: 8b 73 38 mov 0x38(%ebx),%esi <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
13b357: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
13b35a: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
13b35d: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
13b360: 6a 00 push $0x0 <== NOT EXECUTED
13b362: 6a 00 push $0x0 <== NOT EXECUTED
13b364: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
13b36a: e8 89 7b fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
13b36f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b372: 85 c0 test %eax,%eax <== NOT EXECUTED
13b374: 0f 85 9a 00 00 00 jne 13b414 <msdos_file_sync+0xcc> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
13b37a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13b37d: 56 push %esi <== NOT EXECUTED
13b37e: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
13b381: e8 06 f8 fe ff call 12ab8c <fat_file_datasync> <== NOT EXECUTED
13b386: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
13b388: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b38b: 85 c0 test %eax,%eax <== NOT EXECUTED
13b38d: 75 65 jne 13b3f4 <msdos_file_sync+0xac> <== NOT EXECUTED
/*
* if fat-file descriptor is not marked "removed" - synchronize file
* metadata
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
13b38f: f6 46 30 01 testb $0x1,0x30(%esi) <== NOT EXECUTED
13b393: 75 3f jne 13b3d4 <msdos_file_sync+0x8c> <== NOT EXECUTED
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
13b395: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13b398: 56 push %esi <== NOT EXECUTED
13b399: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
13b39c: e8 37 11 00 00 call 13c4d8 <msdos_set_first_cluster_num><== NOT EXECUTED
13b3a1: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
13b3a3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b3a6: 85 c0 test %eax,%eax <== NOT EXECUTED
13b3a8: 75 4a jne 13b3f4 <msdos_file_sync+0xac> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
13b3aa: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13b3ad: 56 push %esi <== NOT EXECUTED
13b3ae: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
13b3b1: e8 b2 10 00 00 call 13c468 <msdos_set_file_size> <== NOT EXECUTED
13b3b6: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
13b3b8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b3bb: 85 c0 test %eax,%eax <== NOT EXECUTED
13b3bd: 75 35 jne 13b3f4 <msdos_file_sync+0xac> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
13b3bf: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13b3c2: 56 push %esi <== NOT EXECUTED
13b3c3: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
13b3c6: e8 11 13 00 00 call 13c6dc <msdos_set_dir_wrt_time_and_date><== NOT EXECUTED
13b3cb: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
13b3cd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b3d0: 85 c0 test %eax,%eax <== NOT EXECUTED
13b3d2: 75 20 jne 13b3f4 <msdos_file_sync+0xac> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
rtems_semaphore_release(fs_info->vol_sema);
13b3d4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b3d7: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13b3da: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
13b3e0: e8 0f 7c fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
13b3e5: 31 ff xor %edi,%edi <== NOT EXECUTED
return RC_OK;
13b3e7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13b3ea: 89 f8 mov %edi,%eax <== NOT EXECUTED
13b3ec: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b3ef: 5b pop %ebx <== NOT EXECUTED
13b3f0: 5e pop %esi <== NOT EXECUTED
13b3f1: 5f pop %edi <== NOT EXECUTED
13b3f2: c9 leave <== NOT EXECUTED
13b3f3: c3 ret <== NOT EXECUTED
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
13b3f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b3f7: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13b3fa: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
13b400: e8 ef 7b fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
13b405: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
13b408: 89 f8 mov %edi,%eax <== NOT EXECUTED
13b40a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b40d: 5b pop %ebx <== NOT EXECUTED
13b40e: 5e pop %esi <== NOT EXECUTED
13b40f: 5f pop %edi <== NOT EXECUTED
13b410: c9 leave <== NOT EXECUTED
13b411: c3 ret <== NOT EXECUTED
13b412: 66 90 xchg %ax,%ax <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
13b414: e8 67 c7 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b419: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13b41f: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
13b424: eb c4 jmp 13b3ea <msdos_file_sync+0xa2> <== NOT EXECUTED
0013b5e4 <msdos_file_write>:
* the number of bytes written on success, or -1 if error occured
* and errno set appropriately
*/
ssize_t
msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
{
13b5e4: 55 push %ebp <== NOT EXECUTED
13b5e5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13b5e7: 57 push %edi <== NOT EXECUTED
13b5e8: 56 push %esi <== NOT EXECUTED
13b5e9: 53 push %ebx <== NOT EXECUTED
13b5ea: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED
13b5ed: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
13b5f0: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
13b5f3: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
13b5f6: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
13b5f9: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
13b5fc: 6a 00 push $0x0 <== NOT EXECUTED
13b5fe: 6a 00 push $0x0 <== NOT EXECUTED
13b600: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
13b606: e8 ed 78 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
13b60b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b60e: 85 c0 test %eax,%eax <== NOT EXECUTED
13b610: 0f 85 8a 00 00 00 jne 13b6a0 <msdos_file_write+0xbc> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
13b616: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b619: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13b61c: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13b61f: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
13b622: 57 push %edi <== NOT EXECUTED
13b623: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
13b626: e8 15 fa fe ff call 12b040 <fat_file_write> <== NOT EXECUTED
13b62b: 89 c6 mov %eax,%esi <== NOT EXECUTED
buffer);
if (ret < 0)
13b62d: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13b630: 85 c0 test %eax,%eax <== NOT EXECUTED
13b632: 78 7e js 13b6b2 <msdos_file_write+0xce> <== NOT EXECUTED
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
13b634: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
13b637: 8b 53 10 mov 0x10(%ebx),%edx <== NOT EXECUTED
13b63a: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
13b63d: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
13b640: 8b 47 18 mov 0x18(%edi),%eax <== NOT EXECUTED
13b643: 31 d2 xor %edx,%edx <== NOT EXECUTED
13b645: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED
13b648: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
13b64b: 89 f0 mov %esi,%eax <== NOT EXECUTED
13b64d: 99 cltd <== NOT EXECUTED
13b64e: 03 45 d0 add -0x30(%ebp),%eax <== NOT EXECUTED
13b651: 13 55 d4 adc -0x2c(%ebp),%edx <== NOT EXECUTED
13b654: 83 fa 00 cmp $0x0,%edx <== NOT EXECUTED
13b657: 7d 2b jge 13b684 <msdos_file_write+0xa0> <== NOT EXECUTED
fat_fd->fat_file_size = iop->offset + ret;
iop->size = fat_fd->fat_file_size;
13b659: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED
13b65c: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
13b65f: 89 43 04 mov %eax,0x4(%ebx) <== NOT EXECUTED
13b662: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
13b665: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b668: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
13b66b: ff b2 94 00 00 00 pushl 0x94(%edx) <== NOT EXECUTED
13b671: e8 7e 79 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return ret;
13b676: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13b679: 89 f0 mov %esi,%eax <== NOT EXECUTED
13b67b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b67e: 5b pop %ebx <== NOT EXECUTED
13b67f: 5e pop %esi <== NOT EXECUTED
13b680: 5f pop %edi <== NOT EXECUTED
13b681: c9 leave <== NOT EXECUTED
13b682: c3 ret <== NOT EXECUTED
13b683: 90 nop <== NOT EXECUTED
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
13b684: 7f 05 jg 13b68b <msdos_file_write+0xa7> <== NOT EXECUTED
13b686: 3b 45 d8 cmp -0x28(%ebp),%eax <== NOT EXECUTED
13b689: 76 ce jbe 13b659 <msdos_file_write+0x75> <== NOT EXECUTED
fat_fd->fat_file_size = iop->offset + ret;
13b68b: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
13b68e: 8d 04 16 lea (%esi,%edx,1),%eax <== NOT EXECUTED
13b691: 89 47 18 mov %eax,0x18(%edi) <== NOT EXECUTED
13b694: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED
13b697: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
13b69e: eb b9 jmp 13b659 <msdos_file_write+0x75> <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
13b6a0: e8 db c4 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b6a5: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13b6ab: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
13b6b0: eb c7 jmp 13b679 <msdos_file_write+0x95> <== NOT EXECUTED
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
buffer);
if (ret < 0)
{
rtems_semaphore_release(fs_info->vol_sema);
13b6b2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b6b5: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13b6b8: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
13b6be: e8 31 79 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
13b6c3: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
return -1;
13b6c8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b6cb: eb ac jmp 13b679 <msdos_file_write+0x95> <== NOT EXECUTED
00146100 <msdos_filename_unix2dos>:
* Convert a unix filename to a DOS filename. Return -1 if wrong name is
* supplied.
*/
int
msdos_filename_unix2dos(const char *un, int unlen, char *dn)
{
146100: 55 push %ebp <== NOT EXECUTED
146101: 89 e5 mov %esp,%ebp <== NOT EXECUTED
146103: 57 push %edi <== NOT EXECUTED
146104: 56 push %esi <== NOT EXECUTED
146105: 53 push %ebx <== NOT EXECUTED
146106: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
146109: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
14610c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
14610f: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
146112: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
dn[i] = ' ';
146114: c6 04 0e 20 movb $0x20,(%esi,%ecx,1) <== NOT EXECUTED
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
146118: 41 inc %ecx <== NOT EXECUTED
146119: 83 f9 0b cmp $0xb,%ecx <== NOT EXECUTED
14611c: 75 f6 jne 146114 <msdos_filename_unix2dos+0x14><== NOT EXECUTED
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
14611e: 8a 1a mov (%edx),%bl <== NOT EXECUTED
146120: 80 fb 2e cmp $0x2e,%bl <== NOT EXECUTED
146123: 0f 84 e3 00 00 00 je 14620c <msdos_filename_unix2dos+0x10c><== NOT EXECUTED
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
146129: 85 c0 test %eax,%eax <== NOT EXECUTED
14612b: 75 11 jne 14613e <msdos_filename_unix2dos+0x3e><== NOT EXECUTED
14612d: e9 cd 00 00 00 jmp 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
146132: 66 90 xchg %ax,%ax <== NOT EXECUTED
146134: 48 dec %eax <== NOT EXECUTED
146135: 0f 84 c4 00 00 00 je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
un++;
14613b: 42 inc %edx <== NOT EXECUTED
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
14613c: 8a 1a mov (%edx),%bl <== NOT EXECUTED
14613e: 80 fb 2e cmp $0x2e,%bl <== NOT EXECUTED
146141: 74 f1 je 146134 <msdos_filename_unix2dos+0x34><== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
146143: 88 d9 mov %bl,%cl <== NOT EXECUTED
146145: 84 db test %bl,%bl <== NOT EXECUTED
146147: 0f 84 b2 00 00 00 je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
if (msdos_map[c] == 0)
14614d: 0f b6 db movzbl %bl,%ebx <== NOT EXECUTED
146150: 8a 9b 40 a0 16 00 mov 0x16a040(%ebx),%bl <== NOT EXECUTED
146156: 84 db test %bl,%bl <== NOT EXECUTED
146158: 74 4c je 1461a6 <msdos_filename_unix2dos+0xa6><== NOT EXECUTED
break;
dn[i] = msdos_map[c];
14615a: 88 1e mov %bl,(%esi) <== NOT EXECUTED
un++;
14615c: 42 inc %edx <== NOT EXECUTED
unlen--;
14615d: 48 dec %eax <== NOT EXECUTED
14615e: c7 45 ec 01 00 00 00 movl $0x1,-0x14(%ebp) <== NOT EXECUTED
146165: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
146168: 85 c0 test %eax,%eax <== NOT EXECUTED
14616a: 0f 84 8f 00 00 00 je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
146170: 8a 0a mov (%edx),%cl <== NOT EXECUTED
146172: 84 c9 test %cl,%cl <== NOT EXECUTED
146174: 0f 84 85 00 00 00 je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
14617a: 80 f9 2e cmp $0x2e,%cl <== NOT EXECUTED
14617d: 74 27 je 1461a6 <msdos_filename_unix2dos+0xa6><== NOT EXECUTED
if (msdos_map[c] == 0)
14617f: 0f b6 f9 movzbl %cl,%edi <== NOT EXECUTED
146182: 0f b6 bf 40 a0 16 00 movzbl 0x16a040(%edi),%edi <== NOT EXECUTED
146189: 89 fb mov %edi,%ebx <== NOT EXECUTED
14618b: 84 db test %bl,%bl <== NOT EXECUTED
14618d: 74 17 je 1461a6 <msdos_filename_unix2dos+0xa6><== NOT EXECUTED
break;
dn[i] = msdos_map[c];
14618f: 8b 4d ec mov -0x14(%ebp),%ecx <== NOT EXECUTED
146192: 88 1c 0e mov %bl,(%esi,%ecx,1) <== NOT EXECUTED
un++;
146195: 42 inc %edx <== NOT EXECUTED
unlen--;
146196: 48 dec %eax <== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
146197: 41 inc %ecx <== NOT EXECUTED
146198: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED
14619b: 83 f9 08 cmp $0x8,%ecx <== NOT EXECUTED
14619e: 75 c8 jne 146168 <msdos_filename_unix2dos+0x68><== NOT EXECUTED
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
1461a0: 85 c0 test %eax,%eax <== NOT EXECUTED
1461a2: 74 5b je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
1461a4: 8a 0a mov (%edx),%cl <== NOT EXECUTED
1461a6: 84 c9 test %cl,%cl <== NOT EXECUTED
1461a8: 74 55 je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
un++;
1461aa: 42 inc %edx <== NOT EXECUTED
unlen--;
1461ab: 48 dec %eax <== NOT EXECUTED
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
1461ac: 80 f9 2e cmp $0x2e,%cl <== NOT EXECUTED
1461af: 75 ef jne 1461a0 <msdos_filename_unix2dos+0xa0><== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
1461b1: 85 c0 test %eax,%eax <== NOT EXECUTED
1461b3: 74 4a je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
1461b5: 8a 0a mov (%edx),%cl <== NOT EXECUTED
1461b7: 84 c9 test %cl,%cl <== NOT EXECUTED
1461b9: 74 44 je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
if (msdos_map[c] == 0)
1461bb: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED
1461be: 8a 89 40 a0 16 00 mov 0x16a040(%ecx),%cl <== NOT EXECUTED
1461c4: 84 c9 test %cl,%cl <== NOT EXECUTED
1461c6: 74 37 je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
break;
dn[i] = msdos_map[c];
1461c8: 88 4e 08 mov %cl,0x8(%esi) <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
1461cb: 48 dec %eax <== NOT EXECUTED
1461cc: 74 31 je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
1461ce: 8a 4a 01 mov 0x1(%edx),%cl <== NOT EXECUTED
1461d1: 84 c9 test %cl,%cl <== NOT EXECUTED
1461d3: 74 2a je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
if (msdos_map[c] == 0)
1461d5: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED
1461d8: 8a 89 40 a0 16 00 mov 0x16a040(%ecx),%cl <== NOT EXECUTED
1461de: 84 c9 test %cl,%cl <== NOT EXECUTED
1461e0: 74 1d je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
break;
dn[i] = msdos_map[c];
1461e2: 88 4e 09 mov %cl,0x9(%esi) <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
1461e5: 48 dec %eax <== NOT EXECUTED
1461e6: 74 17 je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
1461e8: 8a 42 02 mov 0x2(%edx),%al <== NOT EXECUTED
1461eb: 84 c0 test %al,%al <== NOT EXECUTED
1461ed: 74 10 je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
if (msdos_map[c] == 0)
1461ef: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
1461f2: 8a 80 40 a0 16 00 mov 0x16a040(%eax),%al <== NOT EXECUTED
1461f8: 84 c0 test %al,%al <== NOT EXECUTED
1461fa: 74 03 je 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
break;
dn[i] = msdos_map[c];
1461fc: 88 46 0a mov %al,0xa(%esi) <== NOT EXECUTED
un++;
unlen--;
}
return 0;
}
1461ff: 31 c0 xor %eax,%eax <== NOT EXECUTED
146201: 83 c4 08 add $0x8,%esp <== NOT EXECUTED
146204: 5b pop %ebx <== NOT EXECUTED
146205: 5e pop %esi <== NOT EXECUTED
146206: 5f pop %edi <== NOT EXECUTED
146207: c9 leave <== NOT EXECUTED
146208: c3 ret <== NOT EXECUTED
146209: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
14620c: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
14620f: 74 1c je 14622d <msdos_filename_unix2dos+0x12d><== NOT EXECUTED
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
146211: 80 7a 01 2e cmpb $0x2e,0x1(%edx) <== NOT EXECUTED
146215: 0f 85 0e ff ff ff jne 146129 <msdos_filename_unix2dos+0x29><== NOT EXECUTED
14621b: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
14621e: 0f 85 05 ff ff ff jne 146129 <msdos_filename_unix2dos+0x29><== NOT EXECUTED
dn[0] = '.';
146224: c6 06 2e movb $0x2e,(%esi) <== NOT EXECUTED
dn[1] = '.';
146227: c6 46 01 2e movb $0x2e,0x1(%esi) <== NOT EXECUTED
return 0;
14622b: eb d2 jmp 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
14622d: c6 06 2e movb $0x2e,(%esi) <== NOT EXECUTED
return 0;
146230: eb cd jmp 1461ff <msdos_filename_unix2dos+0xff><== NOT EXECUTED
0013cd60 <msdos_find_name>:
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
13cd60: 55 push %ebp <== NOT EXECUTED
13cd61: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13cd63: 57 push %edi <== NOT EXECUTED
13cd64: 56 push %esi <== NOT EXECUTED
13cd65: 53 push %ebx <== NOT EXECUTED
13cd66: 83 ec 5c sub $0x5c,%esp <== NOT EXECUTED
13cd69: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
13cd6c: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13cd6f: 8b 41 10 mov 0x10(%ecx),%eax <== NOT EXECUTED
13cd72: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
13cd75: 89 45 a4 mov %eax,-0x5c(%ebp) <== NOT EXECUTED
fat_file_fd_t *fat_fd = NULL;
13cd78: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
13cd7f: 8d 5d b4 lea -0x4c(%ebp),%ebx <== NOT EXECUTED
13cd82: b9 20 00 00 00 mov $0x20,%ecx <== NOT EXECUTED
13cd87: 31 c0 xor %eax,%eax <== NOT EXECUTED
13cd89: 89 df mov %ebx,%edi <== NOT EXECUTED
13cd8b: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
name_type = msdos_long_to_short (name,
13cd8d: 6a 0b push $0xb <== NOT EXECUTED
13cd8f: 53 push %ebx <== NOT EXECUTED
13cd90: 52 push %edx <== NOT EXECUTED
13cd91: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13cd94: 89 55 a0 mov %edx,-0x60(%ebp) <== NOT EXECUTED
13cd97: e8 30 fb ff ff call 13c8cc <msdos_long_to_short> <== NOT EXECUTED
/*
* find the node which correspondes to the name in the directory pointed by
* 'parent_loc'
*/
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
13cd9c: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
13cd9f: 53 push %ebx <== NOT EXECUTED
13cda0: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED
13cda3: 56 push %esi <== NOT EXECUTED
13cda4: 50 push %eax <== NOT EXECUTED
13cda5: 8b 55 a0 mov -0x60(%ebp),%edx <== NOT EXECUTED
13cda8: 52 push %edx <== NOT EXECUTED
13cda9: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13cdac: 6a 00 push $0x0 <== NOT EXECUTED
13cdae: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13cdb1: e8 e2 fe ff ff call 13cc98 <msdos_get_name_node> <== NOT EXECUTED
13cdb6: 89 c7 mov %eax,%edi <== NOT EXECUTED
&dir_pos, node_entry);
if (rc != RC_OK)
13cdb8: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13cdbb: 85 c0 test %eax,%eax <== NOT EXECUTED
13cdbd: 75 62 jne 13ce21 <msdos_find_name+0xc1> <== NOT EXECUTED
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
13cdbf: 0f b6 45 bf movzbl -0x41(%ebp),%eax <== NOT EXECUTED
13cdc3: a8 08 test $0x8,%al <== NOT EXECUTED
13cdc5: 75 65 jne 13ce2c <msdos_find_name+0xcc> <== NOT EXECUTED
13cdc7: 83 e0 3f and $0x3f,%eax <== NOT EXECUTED
13cdca: 83 f8 0f cmp $0xf,%eax <== NOT EXECUTED
13cdcd: 74 5d je 13ce2c <msdos_find_name+0xcc> <== NOT EXECUTED
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
13cdcf: 51 push %ecx <== NOT EXECUTED
13cdd0: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
13cdd3: 50 push %eax <== NOT EXECUTED
13cdd4: 56 push %esi <== NOT EXECUTED
13cdd5: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13cdd8: ff 70 10 pushl 0x10(%eax) <== NOT EXECUTED
13cddb: e8 90 e7 fe ff call 12b570 <fat_file_open> <== NOT EXECUTED
13cde0: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
13cde2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13cde5: 85 c0 test %eax,%eax <== NOT EXECUTED
13cde7: 75 38 jne 13ce21 <msdos_find_name+0xc1> <== NOT EXECUTED
return rc;
fat_fd->dir_pos = dir_pos;
13cde9: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
13cdec: 8d 7a 20 lea 0x20(%edx),%edi <== NOT EXECUTED
13cdef: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED
13cdf4: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
* size and first cluster num to the disk after each write operation
* (even if one byte is written - that is TOO slow) because
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
13cdf6: 83 7a 08 01 cmpl $0x1,0x8(%edx) <== NOT EXECUTED
13cdfa: 74 40 je 13ce3c <msdos_find_name+0xdc> <== NOT EXECUTED
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
}
}
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(parent_loc->mt_entry, parent_loc->node_access);
13cdfc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13cdff: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13ce02: ff 30 pushl (%eax) <== NOT EXECUTED
13ce04: ff 70 10 pushl 0x10(%eax) <== NOT EXECUTED
13ce07: e8 a4 e6 fe ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
13ce0c: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
13ce0e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ce11: 85 c0 test %eax,%eax <== NOT EXECUTED
13ce13: 0f 85 97 00 00 00 jne 13ceb0 <msdos_find_name+0x150> <== NOT EXECUTED
fat_file_close(parent_loc->mt_entry, fat_fd);
return rc;
}
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
13ce19: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13ce1c: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13ce1f: 89 01 mov %eax,(%ecx) <== NOT EXECUTED
return rc;
}
13ce21: 89 f8 mov %edi,%eax <== NOT EXECUTED
13ce23: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13ce26: 5b pop %ebx <== NOT EXECUTED
13ce27: 5e pop %esi <== NOT EXECUTED
13ce28: 5f pop %edi <== NOT EXECUTED
13ce29: c9 leave <== NOT EXECUTED
13ce2a: c3 ret <== NOT EXECUTED
13ce2b: 90 nop <== NOT EXECUTED
}
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
return rc;
13ce2c: bf 01 7d 00 00 mov $0x7d01,%edi <== NOT EXECUTED
}
13ce31: 89 f8 mov %edi,%eax <== NOT EXECUTED
13ce33: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13ce36: 5b pop %ebx <== NOT EXECUTED
13ce37: 5e pop %esi <== NOT EXECUTED
13ce38: 5f pop %edi <== NOT EXECUTED
13ce39: c9 leave <== NOT EXECUTED
13ce3a: c3 ret <== NOT EXECUTED
13ce3b: 90 nop <== NOT EXECUTED
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
13ce3c: 0f b7 43 14 movzwl 0x14(%ebx),%eax <== NOT EXECUTED
13ce40: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
13ce43: 0f b7 4b 1a movzwl 0x1a(%ebx),%ecx <== NOT EXECUTED
13ce47: 09 c8 or %ecx,%eax <== NOT EXECUTED
13ce49: 89 42 1c mov %eax,0x1c(%edx) <== NOT EXECUTED
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
13ce4c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13ce4f: 0f b7 43 16 movzwl 0x16(%ebx),%eax <== NOT EXECUTED
13ce53: 50 push %eax <== NOT EXECUTED
13ce54: 0f b7 43 18 movzwl 0x18(%ebx),%eax <== NOT EXECUTED
13ce58: 50 push %eax <== NOT EXECUTED
13ce59: 89 55 a0 mov %edx,-0x60(%ebp) <== NOT EXECUTED
13ce5c: e8 97 91 00 00 call 145ff8 <msdos_date_dos2unix> <== NOT EXECUTED
13ce61: 8b 55 a0 mov -0x60(%ebp),%edx <== NOT EXECUTED
13ce64: 89 42 40 mov %eax,0x40(%edx) <== NOT EXECUTED
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
13ce67: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ce6a: f6 45 bf 10 testb $0x10,-0x41(%ebp) <== NOT EXECUTED
13ce6e: 75 68 jne 13ced8 <msdos_find_name+0x178> <== NOT EXECUTED
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
13ce70: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13ce73: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
13ce76: 89 50 18 mov %edx,0x18(%eax) <== NOT EXECUTED
fat_fd->fat_file_type = FAT_FILE;
13ce79: c7 40 10 05 00 00 00 movl $0x5,0x10(%eax) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
13ce80: c7 40 14 ff ff ff ff movl $0xffffffff,0x14(%eax) <== NOT EXECUTED
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
13ce87: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
13ce8e: 8b 48 1c mov 0x1c(%eax),%ecx <== NOT EXECUTED
13ce91: 89 48 38 mov %ecx,0x38(%eax) <== NOT EXECUTED
if ((fat_fd->fat_file_size != 0) &&
13ce94: 8b 50 18 mov 0x18(%eax),%edx <== NOT EXECUTED
13ce97: 85 d2 test %edx,%edx <== NOT EXECUTED
13ce99: 74 31 je 13cecc <msdos_find_name+0x16c> <== NOT EXECUTED
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
13ce9b: 8b 75 a4 mov -0x5c(%ebp),%esi <== NOT EXECUTED
13ce9e: 0f b7 5e 06 movzwl 0x6(%esi),%ebx <== NOT EXECUTED
13cea2: 39 da cmp %ebx,%edx <== NOT EXECUTED
13cea4: 77 26 ja 13cecc <msdos_find_name+0x16c> <== NOT EXECUTED
{
fat_fd->map.last_cln = fat_fd->cln;
13cea6: 89 48 3c mov %ecx,0x3c(%eax) <== NOT EXECUTED
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
13cea9: e9 4e ff ff ff jmp 13cdfc <msdos_find_name+0x9c> <== NOT EXECUTED
13ceae: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(parent_loc->mt_entry, parent_loc->node_access);
if (rc != RC_OK)
{
fat_file_close(parent_loc->mt_entry, fat_fd);
13ceb0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13ceb3: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13ceb6: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13ceb9: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED
13cebc: e8 ef e5 fe ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
return rc;
13cec1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13cec4: e9 58 ff ff ff jmp 13ce21 <msdos_find_name+0xc1> <== NOT EXECUTED
13cec9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
fat_fd->map.last_cln = fat_fd->cln;
}
else
{
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
13cecc: c7 40 3c ff ff ff ff movl $0xffffffff,0x3c(%eax) <== NOT EXECUTED
13ced3: e9 24 ff ff ff jmp 13cdfc <msdos_find_name+0x9c> <== NOT EXECUTED
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
13ced8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13cedb: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
13cee2: c7 40 14 00 00 20 00 movl $0x200000,0x14(%eax) <== NOT EXECUTED
rc = fat_file_size(parent_loc->mt_entry, fat_fd);
13cee9: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13ceec: 50 push %eax <== NOT EXECUTED
13ceed: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13cef0: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED
13cef3: e8 64 db fe ff call 12aa5c <fat_file_size> <== NOT EXECUTED
13cef8: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
13cefa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13cefd: 85 c0 test %eax,%eax <== NOT EXECUTED
13ceff: 75 05 jne 13cf06 <msdos_find_name+0x1a6> <== NOT EXECUTED
13cf01: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13cf04: eb 81 jmp 13ce87 <msdos_find_name+0x127> <== NOT EXECUTED
{
fat_file_close(parent_loc->mt_entry, fat_fd);
13cf06: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13cf09: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13cf0c: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13cf0f: ff 71 10 pushl 0x10(%ecx) <== NOT EXECUTED
13cf12: e8 99 e5 fe ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
return rc;
13cf17: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13cf1a: e9 02 ff ff ff jmp 13ce21 <msdos_find_name+0xc1> <== NOT EXECUTED
0013bab0 <msdos_find_name_in_fat_file>:
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
13bab0: 55 push %ebp <== NOT EXECUTED
13bab1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13bab3: 57 push %edi <== NOT EXECUTED
13bab4: 56 push %esi <== NOT EXECUTED
13bab5: 53 push %ebx <== NOT EXECUTED
13bab6: 81 ec 8c 00 00 00 sub $0x8c,%esp <== NOT EXECUTED
13babc: 8a 45 10 mov 0x10(%ebp),%al <== NOT EXECUTED
13babf: 88 45 cc mov %al,-0x34(%ebp) <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
13bac2: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13bac5: 8b 52 34 mov 0x34(%edx),%edx <== NOT EXECUTED
13bac8: 89 55 90 mov %edx,-0x70(%ebp) <== NOT EXECUTED
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
13bacb: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
13bace: 85 c0 test %eax,%eax <== NOT EXECUTED
13bad0: 0f 8e 40 08 00 00 jle 13c316 <msdos_find_name_in_fat_file+0x866><== NOT EXECUTED
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
13bad6: 8b 4d 20 mov 0x20(%ebp),%ecx <== NOT EXECUTED
13bad9: c7 01 00 00 00 00 movl $0x0,(%ecx) <== NOT EXECUTED
dir_pos->sname.ofs = 0;
13badf: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
13bae6: c7 41 08 ff ff ff ff movl $0xffffffff,0x8(%ecx) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
13baed: c7 41 0c ff ff ff ff movl $0xffffffff,0xc(%ecx) <== NOT EXECUTED
* is short still check for possible long entries with the short name.
*
* In PR1491 we need to have a LFN for a short file name entry. To
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
13baf4: 80 7d cc 00 cmpb $0x0,-0x34(%ebp) <== NOT EXECUTED
13baf8: 74 0a je 13bb04 <msdos_find_name_in_fat_file+0x54><== NOT EXECUTED
13bafa: 83 7d 1c 01 cmpl $0x1,0x1c(%ebp) <== NOT EXECUTED
13bafe: 0f 84 13 05 00 00 je 13c017 <msdos_find_name_in_fat_file+0x567><== NOT EXECUTED
lfn_entries = 0;
else
lfn_entries =
13bb04: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED
13bb07: 83 c1 0c add $0xc,%ecx <== NOT EXECUTED
13bb0a: bb 4f ec c4 4e mov $0x4ec4ec4f,%ebx <== NOT EXECUTED
13bb0f: 89 c8 mov %ecx,%eax <== NOT EXECUTED
13bb11: f7 eb imul %ebx <== NOT EXECUTED
13bb13: c1 fa 02 sar $0x2,%edx <== NOT EXECUTED
13bb16: c1 f9 1f sar $0x1f,%ecx <== NOT EXECUTED
13bb19: 29 ca sub %ecx,%edx <== NOT EXECUTED
13bb1b: 89 55 88 mov %edx,-0x78(%ebp) <== NOT EXECUTED
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
13bb1e: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
13bb21: 83 79 20 01 cmpl $0x1,0x20(%ecx) <== NOT EXECUTED
13bb25: 0f 84 ba 04 00 00 je 13bfe5 <msdos_find_name_in_fat_file+0x535><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
13bb2b: 8b 45 90 mov -0x70(%ebp),%eax <== NOT EXECUTED
13bb2e: 0f b7 40 06 movzwl 0x6(%eax),%eax <== NOT EXECUTED
13bb32: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED
assert(name_len > 0);
fat_dir_pos_init(dir_pos);
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
13bb35: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) <== NOT EXECUTED
13bb3c: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
13bb43: 8b 55 90 mov -0x70(%ebp),%edx <== NOT EXECUTED
13bb46: 8b 92 98 00 00 00 mov 0x98(%edx),%edx <== NOT EXECUTED
13bb4c: 89 55 8c mov %edx,-0x74(%ebp) <== NOT EXECUTED
13bb4f: c7 45 80 00 00 00 00 movl $0x0,-0x80(%ebp) <== NOT EXECUTED
13bb56: c6 45 98 00 movb $0x0,-0x68(%ebp) <== NOT EXECUTED
13bb5a: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
13bb61: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) <== NOT EXECUTED
13bb68: c7 45 9c 00 00 00 00 movl $0x0,-0x64(%ebp) <== NOT EXECUTED
13bb6f: c7 45 a0 00 00 00 00 movl $0x0,-0x60(%ebp) <== NOT EXECUTED
13bb76: c6 45 a4 00 movb $0x0,-0x5c(%ebp) <== NOT EXECUTED
13bb7a: 31 d2 xor %edx,%edx <== NOT EXECUTED
13bb7c: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) <== NOT EXECUTED
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
13bb83: 8b 4d 88 mov -0x78(%ebp),%ecx <== NOT EXECUTED
13bb86: 41 inc %ecx <== NOT EXECUTED
13bb87: 89 4d 84 mov %ecx,-0x7c(%ebp) <== NOT EXECUTED
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(mt_entry, fat_fd, (dir_offset * bts2rd),
13bb8a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13bb8d: ff 75 8c pushl -0x74(%ebp) <== NOT EXECUTED
13bb90: ff 75 c8 pushl -0x38(%ebp) <== NOT EXECUTED
13bb93: ff 75 80 pushl -0x80(%ebp) <== NOT EXECUTED
13bb96: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13bb99: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13bb9c: 88 95 70 ff ff ff mov %dl,-0x90(%ebp) <== NOT EXECUTED
13bba2: e8 05 f7 fe ff call 12b2ac <fat_file_read> <== NOT EXECUTED
13bba7: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13bbaa: 85 c0 test %eax,%eax <== NOT EXECUTED
13bbac: 8a 95 70 ff ff ff mov -0x90(%ebp),%dl <== NOT EXECUTED
13bbb2: 0f 84 99 06 00 00 je 13c251 <msdos_find_name_in_fat_file+0x7a1><== NOT EXECUTED
bool remainder_empty = false;
#if MSDOS_FIND_PRINT
printf ("MSFS:[2] dir_offset:%li\n", dir_offset);
#endif
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
13bbb8: 83 f8 1f cmp $0x1f,%eax <== NOT EXECUTED
13bbbb: 0f 8e e0 05 00 00 jle 13c1a1 <msdos_find_name_in_fat_file+0x6f1><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
13bbc1: 3b 45 c8 cmp -0x38(%ebp),%eax <== NOT EXECUTED
13bbc4: 0f 85 33 07 00 00 jne 13c2fd <msdos_find_name_in_fat_file+0x84d><== NOT EXECUTED
13bbca: 8b 75 90 mov -0x70(%ebp),%esi <== NOT EXECUTED
13bbcd: 8b b6 98 00 00 00 mov 0x98(%esi),%esi <== NOT EXECUTED
13bbd3: 89 75 8c mov %esi,-0x74(%ebp) <== NOT EXECUTED
13bbd6: 89 f3 mov %esi,%ebx <== NOT EXECUTED
13bbd8: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
13bbdf: 90 nop <== NOT EXECUTED
13bbe0: 89 d8 mov %ebx,%eax <== NOT EXECUTED
/*
* See if the entry is empty or the remainder of the directory is
* empty ? Localise to make the code read better.
*/
bool entry_empty = (*MSDOS_DIR_ENTRY_TYPE(entry) ==
13bbe2: 8a 0b mov (%ebx),%cl <== NOT EXECUTED
* to here and write the long file name if this is the start of
* a series of empty entries. If empty_space_count is 0 then
* we are currently not inside an empty series of entries. It
* is a count of empty entries.
*/
if (empty_space_count == 0)
13bbe4: 8b 75 d0 mov -0x30(%ebp),%esi <== NOT EXECUTED
13bbe7: 85 f6 test %esi,%esi <== NOT EXECUTED
13bbe9: 75 0c jne 13bbf7 <msdos_find_name_in_fat_file+0x147><== NOT EXECUTED
13bbeb: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED
13bbee: 89 7d c0 mov %edi,-0x40(%ebp) <== NOT EXECUTED
13bbf1: 8b 75 c4 mov -0x3c(%ebp),%esi <== NOT EXECUTED
13bbf4: 89 75 9c mov %esi,-0x64(%ebp) <== NOT EXECUTED
{
empty_space_entry = dir_entry;
empty_space_offset = dir_offset;
}
if (remainder_empty)
13bbf7: 84 c9 test %cl,%cl <== NOT EXECUTED
13bbf9: 0f 84 53 02 00 00 je 13be52 <msdos_find_name_in_fat_file+0x3a2><== NOT EXECUTED
printf ("MSFS:[3.2] esf:%i esc%i\n", empty_space_found, empty_space_count);
#endif
}
break;
}
else if (entry_empty)
13bbff: 80 f9 e5 cmp $0xe5,%cl <== NOT EXECUTED
13bc02: 0f 84 a0 00 00 00 je 13bca8 <msdos_find_name_in_fat_file+0x1f8><== NOT EXECUTED
* A valid entry so handle it.
*
* If empty space has not been found we need to start the
* count again.
*/
if (create_node && !empty_space_found)
13bc08: 80 7d cc 00 cmpb $0x0,-0x34(%ebp) <== NOT EXECUTED
13bc0c: 74 14 je 13bc22 <msdos_find_name_in_fat_file+0x172><== NOT EXECUTED
13bc0e: 80 7d 98 00 cmpb $0x0,-0x68(%ebp) <== NOT EXECUTED
13bc12: 75 0e jne 13bc22 <msdos_find_name_in_fat_file+0x172><== NOT EXECUTED
13bc14: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
13bc1b: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) <== NOT EXECUTED
/*
* Check the attribute to see if the entry is for a long
* file name.
*/
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
13bc22: 0f b6 73 0b movzbl 0xb(%ebx),%esi <== NOT EXECUTED
13bc26: 83 e6 3f and $0x3f,%esi <== NOT EXECUTED
13bc29: 83 fe 0f cmp $0xf,%esi <== NOT EXECUTED
13bc2c: 0f 84 8e 00 00 00 je 13bcc0 <msdos_find_name_in_fat_file+0x210><== NOT EXECUTED
* If a LFN has been found and it matched check the
* entries have all been found and the checksum is
* correct. If this is the case return the short file
* name entry.
*/
if (lfn_matched)
13bc32: 84 d2 test %dl,%dl <== NOT EXECUTED
13bc34: 74 42 je 13bc78 <msdos_find_name_in_fat_file+0x1c8><== NOT EXECUTED
13bc36: 8d 7b 0a lea 0xa(%ebx),%edi <== NOT EXECUTED
13bc39: 31 f6 xor %esi,%esi <== NOT EXECUTED
13bc3b: c6 45 94 00 movb $0x0,-0x6c(%ebp) <== NOT EXECUTED
13bc3f: 89 f2 mov %esi,%edx <== NOT EXECUTED
13bc41: 88 55 a8 mov %dl,-0x58(%ebp) <== NOT EXECUTED
13bc44: 89 de mov %ebx,%esi <== NOT EXECUTED
13bc46: 88 cb mov %cl,%bl <== NOT EXECUTED
13bc48: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
13bc4a: eb 0d jmp 13bc59 <msdos_find_name_in_fat_file+0x1a9><== NOT EXECUTED
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
13bc4c: 89 ca mov %ecx,%edx <== NOT EXECUTED
13bc4e: 83 e2 01 and $0x1,%edx <== NOT EXECUTED
13bc51: f7 da neg %edx <== NOT EXECUTED
13bc53: 83 e2 80 and $0xffffff80,%edx <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
13bc56: 40 inc %eax <== NOT EXECUTED
13bc57: 8a 18 mov (%eax),%bl <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
13bc59: d0 e9 shr %cl <== NOT EXECUTED
13bc5b: 01 da add %ebx,%edx <== NOT EXECUTED
13bc5d: 8d 0c 0a lea (%edx,%ecx,1),%ecx <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
13bc60: 39 f8 cmp %edi,%eax <== NOT EXECUTED
13bc62: 75 e8 jne 13bc4c <msdos_find_name_in_fat_file+0x19c><== NOT EXECUTED
13bc64: 89 f3 mov %esi,%ebx <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entry || (lfn_checksum != cs))
13bc66: 8b 75 a0 mov -0x60(%ebp),%esi <== NOT EXECUTED
13bc69: 85 f6 test %esi,%esi <== NOT EXECUTED
13bc6b: 75 0b jne 13bc78 <msdos_find_name_in_fat_file+0x1c8><== NOT EXECUTED
13bc6d: 38 4d a4 cmp %cl,-0x5c(%ebp) <== NOT EXECUTED
13bc70: 0f 84 8e 00 00 00 je 13bd04 <msdos_find_name_in_fat_file+0x254><== NOT EXECUTED
13bc76: 66 90 xchg %ax,%ax <== NOT EXECUTED
* short and they match then we have the entry. We will not
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
13bc78: 83 7d 1c 01 cmpl $0x1,0x1c(%ebp) <== NOT EXECUTED
13bc7c: 74 6e je 13bcec <msdos_find_name_in_fat_file+0x23c><== NOT EXECUTED
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
13bc7e: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
13bc85: 31 d2 xor %edx,%edx <== NOT EXECUTED
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
13bc87: 83 45 d4 20 addl $0x20,-0x2c(%ebp) <== NOT EXECUTED
13bc8b: 83 c3 20 add $0x20,%ebx <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
13bc8e: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
13bc91: 39 45 c8 cmp %eax,-0x38(%ebp) <== NOT EXECUTED
13bc94: 0f 87 46 ff ff ff ja 13bbe0 <msdos_find_name_in_fat_file+0x130><== NOT EXECUTED
13bc9a: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
13bc9d: 01 4d 80 add %ecx,-0x80(%ebp) <== NOT EXECUTED
}
if (remainder_empty)
break;
dir_offset++;
13bca0: ff 45 c4 incl -0x3c(%ebp) <== NOT EXECUTED
13bca3: e9 e2 fe ff ff jmp 13bb8a <msdos_find_name_in_fat_file+0xda><== NOT EXECUTED
}
break;
}
else if (entry_empty)
{
if (create_node)
13bca8: 80 7d cc 00 cmpb $0x0,-0x34(%ebp) <== NOT EXECUTED
13bcac: 74 d9 je 13bc87 <msdos_find_name_in_fat_file+0x1d7><== NOT EXECUTED
{
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
13bcae: ff 45 d0 incl -0x30(%ebp) <== NOT EXECUTED
if (empty_space_count == (lfn_entries + 1))
13bcb1: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED
13bcb4: 39 7d 84 cmp %edi,-0x7c(%ebp) <== NOT EXECUTED
13bcb7: 75 ce jne 13bc87 <msdos_find_name_in_fat_file+0x1d7><== NOT EXECUTED
13bcb9: c6 45 98 01 movb $0x1,-0x68(%ebp) <== NOT EXECUTED
13bcbd: eb c8 jmp 13bc87 <msdos_find_name_in_fat_file+0x1d7><== NOT EXECUTED
13bcbf: 90 nop <== NOT EXECUTED
#endif
/*
* If we are not already processing a LFN see if this is
* the first entry of a LFN ?
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
13bcc0: 83 7d dc ff cmpl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
13bcc4: 0f 84 ae 00 00 00 je 13bd78 <msdos_find_name_in_fat_file+0x2c8><== NOT EXECUTED
13bcca: 8a 45 a4 mov -0x5c(%ebp),%al <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
13bccd: be 3f 00 00 00 mov $0x3f,%esi <== NOT EXECUTED
13bcd2: 21 ce and %ecx,%esi <== NOT EXECUTED
13bcd4: 3b 75 a0 cmp -0x60(%ebp),%esi <== NOT EXECUTED
13bcd7: 0f 84 b7 00 00 00 je 13bd94 <msdos_find_name_in_fat_file+0x2e4><== NOT EXECUTED
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
{
#if MSDOS_FIND_PRINT
printf ("MSFS:[4.4] no match\n");
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
13bcdd: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
13bce4: 88 45 a4 mov %al,-0x5c(%ebp) <== NOT EXECUTED
continue;
13bce7: eb 9e jmp 13bc87 <msdos_find_name_in_fat_file+0x1d7><== NOT EXECUTED
13bce9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* short and they match then we have the entry. We will not
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
13bcec: 83 7d dc ff cmpl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
13bcf0: 75 8c jne 13bc7e <msdos_find_name_in_fat_file+0x1ce><== NOT EXECUTED
((name_type == MSDOS_NAME_SHORT) &&
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
(memcmp(MSDOS_DIR_NAME(entry),
13bcf2: b9 0b 00 00 00 mov $0xb,%ecx <== NOT EXECUTED
13bcf7: 89 de mov %ebx,%esi <== NOT EXECUTED
13bcf9: 8b 7d 24 mov 0x24(%ebp),%edi <== NOT EXECUTED
* short and they match then we have the entry. We will not
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
13bcfc: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED
13bcfe: 0f 85 7a ff ff ff jne 13bc7e <msdos_find_name_in_fat_file+0x1ce><== NOT EXECUTED
#endif
/*
* We get the entry we looked for - fill the position
* structure and the 32 bytes of the short entry
*/
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
13bd04: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13bd07: ff 75 20 pushl 0x20(%ebp) <== NOT EXECUTED
13bd0a: ff 75 80 pushl -0x80(%ebp) <== NOT EXECUTED
13bd0d: 6a 01 push $0x1 <== NOT EXECUTED
13bd0f: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13bd12: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13bd15: e8 d6 ef fe ff call 12acf0 <fat_file_ioctl> <== NOT EXECUTED
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
13bd1a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13bd1d: 85 c0 test %eax,%eax <== NOT EXECUTED
13bd1f: 75 4e jne 13bd6f <msdos_find_name_in_fat_file+0x2bf><== NOT EXECUTED
return rc;
dir_pos->sname.ofs = dir_entry;
13bd21: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED
13bd24: 8b 4d 20 mov 0x20(%ebp),%ecx <== NOT EXECUTED
13bd27: 89 71 04 mov %esi,0x4(%ecx) <== NOT EXECUTED
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
13bd2a: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
13bd2d: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
13bd30: 74 23 je 13bd55 <msdos_find_name_in_fat_file+0x2a5><== NOT EXECUTED
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
13bd32: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13bd35: 8d 55 dc lea -0x24(%ebp),%edx <== NOT EXECUTED
13bd38: 52 push %edx <== NOT EXECUTED
13bd39: 0f af 45 c8 imul -0x38(%ebp),%eax <== NOT EXECUTED
13bd3d: 50 push %eax <== NOT EXECUTED
13bd3e: 6a 01 push $0x1 <== NOT EXECUTED
13bd40: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13bd43: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13bd46: e8 a5 ef fe ff call 12acf0 <fat_file_ioctl> <== NOT EXECUTED
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
13bd4b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13bd4e: 85 c0 test %eax,%eax <== NOT EXECUTED
13bd50: 75 1d jne 13bd6f <msdos_find_name_in_fat_file+0x2bf><== NOT EXECUTED
13bd52: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
13bd55: 8b 7d 20 mov 0x20(%ebp),%edi <== NOT EXECUTED
13bd58: 89 47 08 mov %eax,0x8(%edi) <== NOT EXECUTED
dir_pos->lname.ofs = lfn_start.ofs;
13bd5b: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13bd5e: 89 47 0c mov %eax,0xc(%edi) <== NOT EXECUTED
memcpy(name_dir_entry, entry,
13bd61: b9 08 00 00 00 mov $0x8,%ecx <== NOT EXECUTED
13bd66: 8b 7d 24 mov 0x24(%ebp),%edi <== NOT EXECUTED
13bd69: 89 de mov %ebx,%esi <== NOT EXECUTED
13bd6b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
13bd6d: 31 c0 xor %eax,%eax <== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
13bd6f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13bd72: 5b pop %ebx <== NOT EXECUTED
13bd73: 5e pop %esi <== NOT EXECUTED
13bd74: 5f pop %edi <== NOT EXECUTED
13bd75: c9 leave <== NOT EXECUTED
13bd76: c3 ret <== NOT EXECUTED
13bd77: 90 nop <== NOT EXECUTED
/*
* The first entry must have the last long entry
* flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
13bd78: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED
13bd7b: f6 c1 40 test $0x40,%cl <== NOT EXECUTED
13bd7e: 74 0c je 13bd8c <msdos_find_name_in_fat_file+0x2dc><== NOT EXECUTED
* entry match the number we expect for this
* file name. Note we do not know the number of
* characters in the entry so this is check further
* on when the characters are checked.
*/
if (lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
13bd80: 83 e1 3f and $0x3f,%ecx <== NOT EXECUTED
13bd83: 3b 4d 88 cmp -0x78(%ebp),%ecx <== NOT EXECUTED
13bd86: 0f 84 1e 02 00 00 je 13bfaa <msdos_find_name_in_fat_file+0x4fa><== NOT EXECUTED
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
13bd8c: 31 d2 xor %edx,%edx <== NOT EXECUTED
13bd8e: e9 f4 fe ff ff jmp 13bc87 <msdos_find_name_in_fat_file+0x1d7><== NOT EXECUTED
13bd93: 90 nop <== NOT EXECUTED
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK)) ||
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
13bd94: 8a 4b 0d mov 0xd(%ebx),%cl <== NOT EXECUTED
13bd97: 88 4d a4 mov %cl,-0x5c(%ebp) <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
13bd9a: 38 c1 cmp %al,%cl <== NOT EXECUTED
13bd9c: 0f 85 3b ff ff ff jne 13bcdd <msdos_find_name_in_fat_file+0x22d><== NOT EXECUTED
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
13bda2: ff 4d a0 decl -0x60(%ebp) <== NOT EXECUTED
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
13bda5: 8b 7d a0 mov -0x60(%ebp),%edi <== NOT EXECUTED
13bda8: 8d 04 7f lea (%edi,%edi,2),%eax <== NOT EXECUTED
13bdab: 8d 04 87 lea (%edi,%eax,4),%eax <== NOT EXECUTED
13bdae: 89 85 7c ff ff ff mov %eax,-0x84(%ebp) <== NOT EXECUTED
13bdb4: 8d 4b 01 lea 0x1(%ebx),%ecx <== NOT EXECUTED
13bdb7: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
13bdbc: 31 c0 xor %eax,%eax <== NOT EXECUTED
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
13bdbe: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
13bdc1: 03 bd 7c ff ff ff add -0x84(%ebp),%edi <== NOT EXECUTED
13bdc7: 89 7d a8 mov %edi,-0x58(%ebp) <== NOT EXECUTED
13bdca: 89 b5 74 ff ff ff mov %esi,-0x8c(%ebp) <== NOT EXECUTED
13bdd0: 89 9d 78 ff ff ff mov %ebx,-0x88(%ebp) <== NOT EXECUTED
13bdd6: 89 d3 mov %edx,%ebx <== NOT EXECUTED
13bdd8: 8b bd 7c ff ff ff mov -0x84(%ebp),%edi <== NOT EXECUTED
{
#if MSDOS_FIND_PRINT > 1
printf ("MSFS:[6] o:%i i:%i *p:%c(%02x) name[o + i]:%c(%02x)\n",
o, i, *p, *p, name[o + i], name[o + i]);
#endif
if (*p == '\0')
13bdde: 8a 11 mov (%ecx),%dl <== NOT EXECUTED
13bde0: 84 d2 test %dl,%dl <== NOT EXECUTED
13bde2: 74 36 je 13be1a <msdos_find_name_in_fat_file+0x36a><== NOT EXECUTED
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
13bde4: 8d 34 38 lea (%eax,%edi,1),%esi <== NOT EXECUTED
13bde7: 39 75 18 cmp %esi,0x18(%ebp) <== NOT EXECUTED
13bdea: 0f 8e 18 02 00 00 jle 13c008 <msdos_find_name_in_fat_file+0x558><== NOT EXECUTED
13bdf0: 8b 75 a8 mov -0x58(%ebp),%esi <== NOT EXECUTED
13bdf3: 3a 14 06 cmp (%esi,%eax,1),%dl <== NOT EXECUTED
13bdf6: 0f 85 0c 02 00 00 jne 13c008 <msdos_find_name_in_fat_file+0x558><== NOT EXECUTED
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
switch (i)
13bdfc: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
13bdff: 74 4a je 13be4b <msdos_find_name_in_fat_file+0x39b><== NOT EXECUTED
13be01: 83 f8 0a cmp $0xa,%eax <== NOT EXECUTED
13be04: 74 3e je 13be44 <msdos_find_name_in_fat_file+0x394><== NOT EXECUTED
p = entry + 1;
#if MSDOS_FIND_PRINT
printf ("MSFS:[5] lfne:%i\n", lfn_entry);
#endif
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
13be06: 83 fb 0c cmp $0xc,%ebx <== NOT EXECUTED
13be09: 0f 8f b9 01 00 00 jg 13bfc8 <msdos_find_name_in_fat_file+0x518><== NOT EXECUTED
break;
case 10:
p += 4;
break;
default:
p += 2;
13be0f: 83 c1 02 add $0x2,%ecx <== NOT EXECUTED
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
13be12: 40 inc %eax <== NOT EXECUTED
13be13: 43 inc %ebx <== NOT EXECUTED
{
#if MSDOS_FIND_PRINT > 1
printf ("MSFS:[6] o:%i i:%i *p:%c(%02x) name[o + i]:%c(%02x)\n",
o, i, *p, *p, name[o + i], name[o + i]);
#endif
if (*p == '\0')
13be14: 8a 11 mov (%ecx),%dl <== NOT EXECUTED
13be16: 84 d2 test %dl,%dl <== NOT EXECUTED
13be18: 75 ca jne 13bde4 <msdos_find_name_in_fat_file+0x334><== NOT EXECUTED
13be1a: 8b b5 74 ff ff ff mov -0x8c(%ebp),%esi <== NOT EXECUTED
13be20: 8b 9d 78 ff ff ff mov -0x88(%ebp),%ebx <== NOT EXECUTED
/*
* If this is the first entry, ie the last part of the
* long file name and the length does not match then
* the file names do not match.
*/
if (((lfn_entry + 1) == lfn_entries) &&
13be26: 39 75 88 cmp %esi,-0x78(%ebp) <== NOT EXECUTED
13be29: 0f 85 9f 01 00 00 jne 13bfce <msdos_find_name_in_fat_file+0x51e><== NOT EXECUTED
13be2f: 03 85 7c ff ff ff add -0x84(%ebp),%eax <== NOT EXECUTED
13be35: 3b 45 18 cmp 0x18(%ebp),%eax <== NOT EXECUTED
13be38: 0f 85 d0 01 00 00 jne 13c00e <msdos_find_name_in_fat_file+0x55e><== NOT EXECUTED
13be3e: e9 8b 01 00 00 jmp 13bfce <msdos_find_name_in_fat_file+0x51e><== NOT EXECUTED
13be43: 90 nop <== NOT EXECUTED
{
case 4:
p += 5;
break;
case 10:
p += 4;
13be44: 83 c1 04 add $0x4,%ecx <== NOT EXECUTED
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
13be47: 40 inc %eax <== NOT EXECUTED
13be48: 43 inc %ebx <== NOT EXECUTED
13be49: eb c9 jmp 13be14 <msdos_find_name_in_fat_file+0x364><== NOT EXECUTED
}
switch (i)
{
case 4:
p += 5;
13be4b: 83 c1 05 add $0x5,%ecx <== NOT EXECUTED
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
13be4e: 40 inc %eax <== NOT EXECUTED
13be4f: 43 inc %ebx <== NOT EXECUTED
13be50: eb c2 jmp 13be14 <msdos_find_name_in_fat_file+0x364><== NOT EXECUTED
#endif
/*
* If just looking and there is no more entries in the
* directory - return name-not-found
*/
if (!create_node)
13be52: 80 7d cc 00 cmpb $0x0,-0x34(%ebp) <== NOT EXECUTED
13be56: 0f 84 ff 03 00 00 je 13c25b <msdos_find_name_in_fat_file+0x7ab><== NOT EXECUTED
* Lets go and write the directory entries. If we have not found
* any available space add the remaining number of entries to any that
* we may have already found that are just before this entry. If more
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
13be5c: 80 7d 98 00 cmpb $0x0,-0x68(%ebp) <== NOT EXECUTED
13be60: 75 12 jne 13be74 <msdos_find_name_in_fat_file+0x3c4><== NOT EXECUTED
{
empty_space_count +=
entries_per_block - (dir_entry / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
13be62: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
13be65: c1 e8 05 shr $0x5,%eax <== NOT EXECUTED
13be68: 01 45 d0 add %eax,-0x30(%ebp) <== NOT EXECUTED
* we may have already found that are just before this entry. If more
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
{
empty_space_count +=
13be6b: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
13be6e: c1 e8 05 shr $0x5,%eax <== NOT EXECUTED
13be71: 29 45 d0 sub %eax,-0x30(%ebp) <== NOT EXECUTED
* data to place in each long file name entry. First set the short
* file name to the slot of the SFN entry. This will mean no clashes
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
13be74: 83 7d 1c 02 cmpl $0x2,0x1c(%ebp) <== NOT EXECUTED
13be78: 0f 84 0d 04 00 00 je 13c28b <msdos_find_name_in_fat_file+0x7db><== NOT EXECUTED
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
msdos_short_name_hex(MSDOS_DIR_NAME(name_dir_entry), slot);
}
if (lfn_entries)
13be7e: c6 45 a8 00 movb $0x0,-0x58(%ebp) <== NOT EXECUTED
13be82: 83 7d 88 00 cmpl $0x0,-0x78(%ebp) <== NOT EXECUTED
13be86: 74 28 je 13beb0 <msdos_find_name_in_fat_file+0x400><== NOT EXECUTED
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
13be88: 8b 45 24 mov 0x24(%ebp),%eax <== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
13be8b: 89 c3 mov %eax,%ebx <== NOT EXECUTED
13be8d: 83 c3 0b add $0xb,%ebx <== NOT EXECUTED
13be90: 31 d2 xor %edx,%edx <== NOT EXECUTED
13be92: eb 0b jmp 13be9f <msdos_find_name_in_fat_file+0x3ef><== NOT EXECUTED
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
13be94: 8a 55 a8 mov -0x58(%ebp),%dl <== NOT EXECUTED
13be97: 83 e2 01 and $0x1,%edx <== NOT EXECUTED
13be9a: f7 da neg %edx <== NOT EXECUTED
13be9c: 83 e2 80 and $0xffffff80,%edx <== NOT EXECUTED
13be9f: 8a 4d a8 mov -0x58(%ebp),%cl <== NOT EXECUTED
13bea2: d0 e9 shr %cl <== NOT EXECUTED
13bea4: 02 10 add (%eax),%dl <== NOT EXECUTED
13bea6: 01 ca add %ecx,%edx <== NOT EXECUTED
13bea8: 88 55 a8 mov %dl,-0x58(%ebp) <== NOT EXECUTED
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
13beab: 40 inc %eax <== NOT EXECUTED
13beac: 39 d8 cmp %ebx,%eax <== NOT EXECUTED
13beae: 75 e4 jne 13be94 <msdos_find_name_in_fat_file+0x3e4><== NOT EXECUTED
* empty_space_count is a count of empty entries in the currently
* read cluster so if 0 there is no space. Note, dir_offset will
* be at the next cluster so we can just make empty_space_offset
* that value.
*/
if (empty_space_count == 0)
13beb0: 83 7d d0 00 cmpl $0x0,-0x30(%ebp) <== NOT EXECUTED
13beb4: 0f 85 ab 03 00 00 jne 13c265 <msdos_find_name_in_fat_file+0x7b5><== NOT EXECUTED
13beba: b0 01 mov $0x1,%al <== NOT EXECUTED
13bebc: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) <== NOT EXECUTED
}
/*
* Have we read past the empty block ? If so go back and read it again.
*/
if (dir_offset != empty_space_offset)
13bec3: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
13bec6: 89 4d 9c mov %ecx,-0x64(%ebp) <== NOT EXECUTED
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
13bec9: 83 7d 88 00 cmpl $0x0,-0x78(%ebp) <== NOT EXECUTED
13becd: 0f 88 23 04 00 00 js 13c2f6 <msdos_find_name_in_fat_file+0x846><== NOT EXECUTED
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
13bed3: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) <== NOT EXECUTED
13beda: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
{
/* get current cluster number */
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
13bee1: 8b 75 9c mov -0x64(%ebp),%esi <== NOT EXECUTED
13bee4: 0f af 75 c8 imul -0x38(%ebp),%esi <== NOT EXECUTED
13bee8: 89 75 98 mov %esi,-0x68(%ebp) <== NOT EXECUTED
13beeb: 31 f6 xor %esi,%esi <== NOT EXECUTED
*/
while (lfn_entry < (lfn_entries + 1))
{
int length = 0;
if (read_cluster)
13beed: 84 c0 test %al,%al <== NOT EXECUTED
13beef: 0f 85 11 02 00 00 jne 13c106 <msdos_find_name_in_fat_file+0x656><== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.4] clear write: %d\n", ret);
#endif
if (ret == -1)
return ret;
else if (ret != bts2rd)
13bef5: 8b 55 98 mov -0x68(%ebp),%edx <== NOT EXECUTED
13bef8: 89 55 94 mov %edx,-0x6c(%ebp) <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
13befb: 8b 4d c0 mov -0x40(%ebp),%ecx <== NOT EXECUTED
13befe: 39 4d c8 cmp %ecx,-0x38(%ebp) <== NOT EXECUTED
13bf01: 0f 86 73 03 00 00 jbe 13c27a <msdos_find_name_in_fat_file+0x7ca><== NOT EXECUTED
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
13bf07: 8b 5d c0 mov -0x40(%ebp),%ebx <== NOT EXECUTED
13bf0a: 8b 7d 90 mov -0x70(%ebp),%edi <== NOT EXECUTED
13bf0d: 03 9f 98 00 00 00 add 0x98(%edi),%ebx <== NOT EXECUTED
char* p;
const char* n;
int i;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
13bf13: 8d 46 01 lea 0x1(%esi),%eax <== NOT EXECUTED
13bf16: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
13bf19: 8b 55 88 mov -0x78(%ebp),%edx <== NOT EXECUTED
13bf1c: 42 inc %edx <== NOT EXECUTED
13bf1d: 89 55 a4 mov %edx,-0x5c(%ebp) <== NOT EXECUTED
13bf20: 39 c2 cmp %eax,%edx <== NOT EXECUTED
13bf22: 0f 84 fb 00 00 00 je 13c023 <msdos_find_name_in_fat_file+0x573><== NOT EXECUTED
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
break;
13bf28: 8a 45 88 mov -0x78(%ebp),%al <== NOT EXECUTED
13bf2b: 40 inc %eax <== NOT EXECUTED
13bf2c: 88 45 a0 mov %al,-0x60(%ebp) <== NOT EXECUTED
13bf2f: f7 d6 not %esi <== NOT EXECUTED
13bf31: 8b 4d 88 mov -0x78(%ebp),%ecx <== NOT EXECUTED
13bf34: 8d 14 0e lea (%esi,%ecx,1),%edx <== NOT EXECUTED
13bf37: 8d 04 52 lea (%edx,%edx,2),%eax <== NOT EXECUTED
13bf3a: 8d 04 82 lea (%edx,%eax,4),%eax <== NOT EXECUTED
13bf3d: 03 45 14 add 0x14(%ebp),%eax <== NOT EXECUTED
13bf40: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
13bf43: 8b 75 c0 mov -0x40(%ebp),%esi <== NOT EXECUTED
13bf46: 89 75 d0 mov %esi,-0x30(%ebp) <== NOT EXECUTED
13bf49: c7 45 c4 20 00 00 00 movl $0x20,-0x3c(%ebp) <== NOT EXECUTED
* This is a long file name and we need to write
* a long file name entry. See if this is the
* first entry written and if so remember the
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
13bf50: 83 7d dc ff cmpl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
13bf54: 0f 84 bf 02 00 00 je 13c219 <msdos_find_name_in_fat_file+0x769><== NOT EXECUTED
13bf5a: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
13bf5c: 89 df mov %ebx,%edi <== NOT EXECUTED
13bf5e: b9 20 00 00 00 mov $0x20,%ecx <== NOT EXECUTED
13bf63: 31 c0 xor %eax,%eax <== NOT EXECUTED
13bf65: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
13bf67: 8a 55 a8 mov -0x58(%ebp),%dl <== NOT EXECUTED
13bf6a: 88 53 0d mov %dl,0xd(%ebx) <== NOT EXECUTED
p = entry + 1;
13bf6d: 8d 4b 01 lea 0x1(%ebx),%ecx <== NOT EXECUTED
13bf70: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
13bf73: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
13bf78: 89 df mov %ebx,%edi <== NOT EXECUTED
13bf7a: 66 90 xchg %ax,%ax <== NOT EXECUTED
13bf7c: 8d 72 ff lea -0x1(%edx),%esi <== NOT EXECUTED
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
*p = *n;
13bf7f: 8a 18 mov (%eax),%bl <== NOT EXECUTED
13bf81: 88 19 mov %bl,(%ecx) <== NOT EXECUTED
if (*n != 0)
n++;
13bf83: 80 38 01 cmpb $0x1,(%eax) <== NOT EXECUTED
13bf86: 83 d8 ff sbb $0xffffffff,%eax <== NOT EXECUTED
switch (i)
13bf89: 83 fe 04 cmp $0x4,%esi <== NOT EXECUTED
13bf8c: 0f 84 2e 02 00 00 je 13c1c0 <msdos_find_name_in_fat_file+0x710><== NOT EXECUTED
13bf92: 83 fe 0a cmp $0xa,%esi <== NOT EXECUTED
13bf95: 0f 84 19 02 00 00 je 13c1b4 <msdos_find_name_in_fat_file+0x704><== NOT EXECUTED
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
13bf9b: 83 fa 0c cmp $0xc,%edx <== NOT EXECUTED
13bf9e: 0f 8f 28 02 00 00 jg 13c1cc <msdos_find_name_in_fat_file+0x71c><== NOT EXECUTED
break;
case 10:
p += 4;
break;
default:
p += 2;
13bfa4: 83 c1 02 add $0x2,%ecx <== NOT EXECUTED
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
13bfa7: 42 inc %edx <== NOT EXECUTED
13bfa8: eb d2 jmp 13bf7c <msdos_find_name_in_fat_file+0x4cc><== NOT EXECUTED
continue;
/*
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
13bfaa: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
13bfad: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
lfn_start.ofs = dir_entry;
13bfb0: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
13bfb3: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
lfn_entry = lfn_entries;
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
13bfb6: 8a 43 0d mov 0xd(%ebx),%al <== NOT EXECUTED
13bfb9: 8a 0b mov (%ebx),%cl <== NOT EXECUTED
13bfbb: 8b 75 88 mov -0x78(%ebp),%esi <== NOT EXECUTED
13bfbe: 89 75 a0 mov %esi,-0x60(%ebp) <== NOT EXECUTED
13bfc1: 31 d2 xor %edx,%edx <== NOT EXECUTED
13bfc3: e9 05 fd ff ff jmp 13bccd <msdos_find_name_in_fat_file+0x21d><== NOT EXECUTED
13bfc8: 8b 9d 78 ff ff ff mov -0x88(%ebp),%ebx <== NOT EXECUTED
p += 2;
break;
}
}
lfn_matched = ((lfn_entry == 0) &&
13bfce: 8b 7d a0 mov -0x60(%ebp),%edi <== NOT EXECUTED
13bfd1: 85 ff test %edi,%edi <== NOT EXECUTED
13bfd3: 0f 85 b3 fd ff ff jne 13bd8c <msdos_find_name_in_fat_file+0x2dc><== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
13bfd9: 83 7d dc ff cmpl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
13bfdd: 0f 95 c2 setne %dl <== NOT EXECUTED
13bfe0: e9 a2 fc ff ff jmp 13bc87 <msdos_find_name_in_fat_file+0x1d7><== NOT EXECUTED
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
13bfe5: 8b 79 24 mov 0x24(%ecx),%edi <== NOT EXECUTED
13bfe8: 85 ff test %edi,%edi <== NOT EXECUTED
13bfea: 0f 85 3b fb ff ff jne 13bb2b <msdos_find_name_in_fat_file+0x7b><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
13bff0: 8b 75 90 mov -0x70(%ebp),%esi <== NOT EXECUTED
13bff3: f6 46 0a 03 testb $0x3,0xa(%esi) <== NOT EXECUTED
13bff7: 0f 84 2e fb ff ff je 13bb2b <msdos_find_name_in_fat_file+0x7b><== NOT EXECUTED
bts2rd = fat_fd->fat_file_size;
13bffd: 8b 79 18 mov 0x18(%ecx),%edi <== NOT EXECUTED
13c000: 89 7d c8 mov %edi,-0x38(%ebp) <== NOT EXECUTED
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
13c003: e9 2d fb ff ff jmp 13bb35 <msdos_find_name_in_fat_file+0x85><== NOT EXECUTED
13c008: 8b 9d 78 ff ff ff mov -0x88(%ebp),%ebx <== NOT EXECUTED
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
13c00e: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
break;
13c015: eb b7 jmp 13bfce <msdos_find_name_in_fat_file+0x51e><== NOT EXECUTED
* is short still check for possible long entries with the short name.
*
* In PR1491 we need to have a LFN for a short file name entry. To
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
13c017: c7 45 88 00 00 00 00 movl $0x0,-0x78(%ebp) <== NOT EXECUTED
13c01e: e9 fb fa ff ff jmp 13bb1e <msdos_find_name_in_fat_file+0x6e><== NOT EXECUTED
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
13c023: 8b 4d c0 mov -0x40(%ebp),%ecx <== NOT EXECUTED
13c026: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED
13c029: c7 45 c4 20 00 00 00 movl $0x20,-0x3c(%ebp) <== NOT EXECUTED
{
/* get current cluster number */
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
13c030: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13c033: ff 75 20 pushl 0x20(%ebp) <== NOT EXECUTED
13c036: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED
13c039: 6a 01 push $0x1 <== NOT EXECUTED
13c03b: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13c03e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13c041: e8 aa ec fe ff call 12acf0 <fat_file_ioctl> <== NOT EXECUTED
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
13c046: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13c049: 85 c0 test %eax,%eax <== NOT EXECUTED
13c04b: 0f 85 1e fd ff ff jne 13bd6f <msdos_find_name_in_fat_file+0x2bf><== NOT EXECUTED
return rc;
dir_pos->sname.ofs = dir_entry;
13c051: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
13c054: 8b 45 20 mov 0x20(%ebp),%eax <== NOT EXECUTED
13c057: 89 50 04 mov %edx,0x4(%eax) <== NOT EXECUTED
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
13c05a: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
13c05d: 83 fa ff cmp $0xffffffff,%edx <== NOT EXECUTED
13c060: 0f 84 e3 01 00 00 je 13c249 <msdos_find_name_in_fat_file+0x799><== NOT EXECUTED
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
13c066: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13c069: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
13c06c: 50 push %eax <== NOT EXECUTED
13c06d: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
13c070: 0f af c2 imul %edx,%eax <== NOT EXECUTED
13c073: 50 push %eax <== NOT EXECUTED
13c074: 6a 01 push $0x1 <== NOT EXECUTED
13c076: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13c079: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13c07c: e8 6f ec fe ff call 12acf0 <fat_file_ioctl> <== NOT EXECUTED
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
13c081: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13c084: 85 c0 test %eax,%eax <== NOT EXECUTED
13c086: 0f 85 e3 fc ff ff jne 13bd6f <msdos_find_name_in_fat_file+0x2bf><== NOT EXECUTED
13c08c: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
13c08f: 8b 4d 20 mov 0x20(%ebp),%ecx <== NOT EXECUTED
13c092: 89 41 08 mov %eax,0x8(%ecx) <== NOT EXECUTED
dir_pos->lname.ofs = lfn_start.ofs;
13c095: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13c098: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
13c09b: b9 08 00 00 00 mov $0x8,%ecx <== NOT EXECUTED
13c0a0: 89 df mov %ebx,%edi <== NOT EXECUTED
13c0a2: 8b 75 24 mov 0x24(%ebp),%esi <== NOT EXECUTED
13c0a5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
13c0a7: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
13c0aa: 8b 75 a4 mov -0x5c(%ebp),%esi <== NOT EXECUTED
13c0ad: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
}
ret = fat_file_write(mt_entry, fat_fd,
13c0b0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13c0b3: 8b 45 c0 mov -0x40(%ebp),%eax <== NOT EXECUTED
13c0b6: 8b 75 90 mov -0x70(%ebp),%esi <== NOT EXECUTED
13c0b9: 03 86 98 00 00 00 add 0x98(%esi),%eax <== NOT EXECUTED
13c0bf: 50 push %eax <== NOT EXECUTED
13c0c0: 52 push %edx <== NOT EXECUTED
13c0c1: 8b 45 94 mov -0x6c(%ebp),%eax <== NOT EXECUTED
13c0c4: 03 45 c0 add -0x40(%ebp),%eax <== NOT EXECUTED
13c0c7: 50 push %eax <== NOT EXECUTED
13c0c8: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13c0cb: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13c0ce: e8 6d ef fe ff call 12b040 <fat_file_write> <== NOT EXECUTED
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
13c0d3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13c0d6: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
13c0d9: 0f 84 0f 02 00 00 je 13c2ee <msdos_find_name_in_fat_file+0x83e><== NOT EXECUTED
return ret;
else if (ret != length)
13c0df: 39 45 c4 cmp %eax,-0x3c(%ebp) <== NOT EXECUTED
13c0e2: 0f 85 b9 00 00 00 jne 13c1a1 <msdos_find_name_in_fat_file+0x6f1><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
13c0e8: 8b 7d c8 mov -0x38(%ebp),%edi <== NOT EXECUTED
13c0eb: 01 7d 98 add %edi,-0x68(%ebp) <== NOT EXECUTED
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
13c0ee: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
13c0f1: 39 45 88 cmp %eax,-0x78(%ebp) <== NOT EXECUTED
13c0f4: 0f 8c fc 01 00 00 jl 13c2f6 <msdos_find_name_in_fat_file+0x846><== NOT EXECUTED
if (ret == -1)
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
13c0fa: ff 45 9c incl -0x64(%ebp) <== NOT EXECUTED
13c0fd: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) <== NOT EXECUTED
13c104: 89 c6 mov %eax,%esi <== NOT EXECUTED
{
uint32_t new_length;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.1] eso:%li\n", empty_space_offset);
#endif
ret = fat_file_read(mt_entry, fat_fd,
13c106: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13c109: 8b 7d 90 mov -0x70(%ebp),%edi <== NOT EXECUTED
13c10c: ff b7 98 00 00 00 pushl 0x98(%edi) <== NOT EXECUTED
13c112: ff 75 c8 pushl -0x38(%ebp) <== NOT EXECUTED
13c115: ff 75 98 pushl -0x68(%ebp) <== NOT EXECUTED
13c118: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13c11b: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13c11e: e8 89 f1 fe ff call 12b2ac <fat_file_read> <== NOT EXECUTED
(empty_space_offset * bts2rd), bts2rd,
fs_info->cl_buf);
if (ret != bts2rd)
13c123: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13c126: 3b 45 c8 cmp -0x38(%ebp),%eax <== NOT EXECUTED
13c129: 0f 84 c6 fd ff ff je 13bef5 <msdos_find_name_in_fat_file+0x445><== NOT EXECUTED
{
if (ret != FAT_EOF)
13c12f: 85 c0 test %eax,%eax <== NOT EXECUTED
13c131: 75 6e jne 13c1a1 <msdos_find_name_in_fat_file+0x6f1><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.2] extending file:%li\n", empty_space_offset);
#endif
ret = fat_file_extend (mt_entry, fat_fd, empty_space_offset * bts2rd,
13c133: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
13c136: 50 push %eax <== NOT EXECUTED
13c137: ff 75 98 pushl -0x68(%ebp) <== NOT EXECUTED
13c13a: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13c13d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13c140: e8 27 ed fe ff call 12ae6c <fat_file_extend> <== NOT EXECUTED
&new_length);
if (ret != RC_OK)
13c145: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13c148: 85 c0 test %eax,%eax <== NOT EXECUTED
13c14a: 0f 85 1f fc ff ff jne 13bd6f <msdos_find_name_in_fat_file+0x2bf><== NOT EXECUTED
return ret;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.3] extended: %d <-> %d\n", new_length, empty_space_offset * bts2rd);
#endif
if (new_length != (empty_space_offset * bts2rd))
13c150: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13c153: 89 45 94 mov %eax,-0x6c(%ebp) <== NOT EXECUTED
13c156: 8b 55 98 mov -0x68(%ebp),%edx <== NOT EXECUTED
13c159: 39 d0 cmp %edx,%eax <== NOT EXECUTED
13c15b: 75 44 jne 13c1a1 <msdos_find_name_in_fat_file+0x6f1><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
memset(fs_info->cl_buf, 0, bts2rd);
13c15d: 8b 4d 90 mov -0x70(%ebp),%ecx <== NOT EXECUTED
13c160: 8b 91 98 00 00 00 mov 0x98(%ecx),%edx <== NOT EXECUTED
13c166: 31 c0 xor %eax,%eax <== NOT EXECUTED
13c168: 89 d7 mov %edx,%edi <== NOT EXECUTED
13c16a: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
13c16d: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
ret = fat_file_write(mt_entry, fat_fd,
13c16f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13c172: 8b 45 90 mov -0x70(%ebp),%eax <== NOT EXECUTED
13c175: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
13c17b: ff 75 c8 pushl -0x38(%ebp) <== NOT EXECUTED
13c17e: ff 75 98 pushl -0x68(%ebp) <== NOT EXECUTED
13c181: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13c184: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13c187: e8 b4 ee fe ff call 12b040 <fat_file_write> <== NOT EXECUTED
empty_space_offset * bts2rd,
bts2rd, fs_info->cl_buf);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.4] clear write: %d\n", ret);
#endif
if (ret == -1)
13c18c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13c18f: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
13c192: 0f 84 56 01 00 00 je 13c2ee <msdos_find_name_in_fat_file+0x83e><== NOT EXECUTED
return ret;
else if (ret != bts2rd)
13c198: 3b 45 c8 cmp -0x38(%ebp),%eax <== NOT EXECUTED
13c19b: 0f 84 5a fd ff ff je 13befb <msdos_find_name_in_fat_file+0x44b><== NOT EXECUTED
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
13c1a1: e8 da b9 00 00 call 147b80 <__errno> <== NOT EXECUTED
13c1a6: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13c1ac: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
13c1af: e9 bb fb ff ff jmp 13bd6f <msdos_find_name_in_fat_file+0x2bf><== NOT EXECUTED
{
case 4:
p += 5;
break;
case 10:
p += 4;
13c1b4: 83 c1 04 add $0x4,%ecx <== NOT EXECUTED
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
13c1b7: 42 inc %edx <== NOT EXECUTED
13c1b8: e9 bf fd ff ff jmp 13bf7c <msdos_find_name_in_fat_file+0x4cc><== NOT EXECUTED
13c1bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
n++;
switch (i)
{
case 4:
p += 5;
13c1c0: 83 c1 05 add $0x5,%ecx <== NOT EXECUTED
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
13c1c3: 42 inc %edx <== NOT EXECUTED
13c1c4: e9 b3 fd ff ff jmp 13bf7c <msdos_find_name_in_fat_file+0x4cc><== NOT EXECUTED
13c1c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
13c1cc: 89 fb mov %edi,%ebx <== NOT EXECUTED
break;
case 10:
p += 4;
break;
default:
p += 2;
13c1ce: 8a 45 a0 mov -0x60(%ebp),%al <== NOT EXECUTED
13c1d1: 2a 45 d4 sub -0x2c(%ebp),%al <== NOT EXECUTED
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
13c1d4: 88 07 mov %al,(%edi) <== NOT EXECUTED
if (lfn_entry == 1)
13c1d6: 83 7d d4 01 cmpl $0x1,-0x2c(%ebp) <== NOT EXECUTED
13c1da: 74 50 je 13c22c <msdos_find_name_in_fat_file+0x77c><== NOT EXECUTED
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
13c1dc: 80 4b 0b 0f orb $0xf,0xb(%ebx) <== NOT EXECUTED
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
13c1e0: 83 45 d0 20 addl $0x20,-0x30(%ebp) <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
13c1e4: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
13c1e7: 39 4d c8 cmp %ecx,-0x38(%ebp) <== NOT EXECUTED
13c1ea: 76 55 jbe 13c241 <msdos_find_name_in_fat_file+0x791><== NOT EXECUTED
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
13c1ec: 8b 5d d0 mov -0x30(%ebp),%ebx <== NOT EXECUTED
13c1ef: 8b 75 90 mov -0x70(%ebp),%esi <== NOT EXECUTED
13c1f2: 03 9e 98 00 00 00 add 0x98(%esi),%ebx <== NOT EXECUTED
char* p;
const char* n;
int i;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
13c1f8: 83 45 c4 20 addl $0x20,-0x3c(%ebp) <== NOT EXECUTED
lfn_entry++;
13c1fc: ff 45 d4 incl -0x2c(%ebp) <== NOT EXECUTED
13c1ff: 83 6d cc 0d subl $0xd,-0x34(%ebp) <== NOT EXECUTED
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
13c203: 8b 7d a4 mov -0x5c(%ebp),%edi <== NOT EXECUTED
13c206: 39 7d d4 cmp %edi,-0x2c(%ebp) <== NOT EXECUTED
13c209: 0f 84 21 fe ff ff je 13c030 <msdos_find_name_in_fat_file+0x580><== NOT EXECUTED
* This is a long file name and we need to write
* a long file name entry. See if this is the
* first entry written and if so remember the
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
13c20f: 83 7d dc ff cmpl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
13c213: 0f 85 43 fd ff ff jne 13bf5c <msdos_find_name_in_fat_file+0x4ac><== NOT EXECUTED
{
lfn_start.cln = empty_space_offset;
13c219: 8b 7d 9c mov -0x64(%ebp),%edi <== NOT EXECUTED
13c21c: 89 7d dc mov %edi,-0x24(%ebp) <== NOT EXECUTED
lfn_start.ofs = dir_entry;
13c21f: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
13c222: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
13c225: e9 32 fd ff ff jmp 13bf5c <msdos_find_name_in_fat_file+0x4ac><== NOT EXECUTED
13c22a: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
13c22c: 83 c8 40 or $0x40,%eax <== NOT EXECUTED
13c22f: 88 07 mov %al,(%edi) <== NOT EXECUTED
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
13c231: 80 4b 0b 0f orb $0xf,0xb(%ebx) <== NOT EXECUTED
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
13c235: 83 45 d0 20 addl $0x20,-0x30(%ebp) <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
13c239: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
13c23c: 39 4d c8 cmp %ecx,-0x38(%ebp) <== NOT EXECUTED
13c23f: 77 ab ja 13c1ec <msdos_find_name_in_fat_file+0x73c><== NOT EXECUTED
13c241: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
13c244: e9 67 fe ff ff jmp 13c0b0 <msdos_find_name_in_fat_file+0x600><== NOT EXECUTED
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
13c249: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
13c24c: e9 3e fe ff ff jmp 13c08f <msdos_find_name_in_fat_file+0x5df><== NOT EXECUTED
}
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
13c251: 80 7d cc 00 cmpb $0x0,-0x34(%ebp) <== NOT EXECUTED
13c255: 0f 85 19 fc ff ff jne 13be74 <msdos_find_name_in_fat_file+0x3c4><== NOT EXECUTED
if (ret == -1)
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
13c25b: b8 01 7d 00 00 mov $0x7d01,%eax <== NOT EXECUTED
13c260: e9 0a fb ff ff jmp 13bd6f <msdos_find_name_in_fat_file+0x2bf><== NOT EXECUTED
}
/*
* Have we read past the empty block ? If so go back and read it again.
*/
if (dir_offset != empty_space_offset)
13c265: b0 01 mov $0x1,%al <== NOT EXECUTED
13c267: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
13c26a: 39 55 9c cmp %edx,-0x64(%ebp) <== NOT EXECUTED
13c26d: 0f 85 56 fc ff ff jne 13bec9 <msdos_find_name_in_fat_file+0x419><== NOT EXECUTED
13c273: 31 c0 xor %eax,%eax <== NOT EXECUTED
13c275: e9 49 fc ff ff jmp 13bec3 <msdos_find_name_in_fat_file+0x413><== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
13c27a: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED
13c27d: 31 d2 xor %edx,%edx <== NOT EXECUTED
13c27f: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) <== NOT EXECUTED
13c286: e9 25 fe ff ff jmp 13c0b0 <msdos_find_name_in_fat_file+0x600><== NOT EXECUTED
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
13c28b: 8b 45 9c mov -0x64(%ebp),%eax <== NOT EXECUTED
13c28e: 0f af 45 c8 imul -0x38(%ebp),%eax <== NOT EXECUTED
13c292: 03 45 c0 add -0x40(%ebp),%eax <== NOT EXECUTED
13c295: c1 e8 05 shr $0x5,%eax <== NOT EXECUTED
13c298: 8b 7d 88 mov -0x78(%ebp),%edi <== NOT EXECUTED
13c29b: 8d 74 07 01 lea 0x1(%edi,%eax,1),%esi <== NOT EXECUTED
13c29f: 31 c0 xor %eax,%eax <== NOT EXECUTED
13c2a1: 8b 4d 24 mov 0x24(%ebp),%ecx <== NOT EXECUTED
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 3; i++, c++)
if ((*c == ' ') || (*c == '.'))
13c2a4: 8a 14 01 mov (%ecx,%eax,1),%dl <== NOT EXECUTED
13c2a7: 80 fa 20 cmp $0x20,%dl <== NOT EXECUTED
13c2aa: 74 3c je 13c2e8 <msdos_find_name_in_fat_file+0x838><== NOT EXECUTED
13c2ac: 80 fa 2e cmp $0x2e,%dl <== NOT EXECUTED
13c2af: 74 37 je 13c2e8 <msdos_find_name_in_fat_file+0x838><== NOT EXECUTED
msdos_short_name_hex(char* sfn, int num)
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 3; i++, c++)
13c2b1: 40 inc %eax <== NOT EXECUTED
13c2b2: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
13c2b5: 75 ed jne 13c2a4 <msdos_find_name_in_fat_file+0x7f4><== NOT EXECUTED
if ((*c == ' ') || (*c == '.'))
*c = '~';
*c++ = '~';
13c2b7: 8b 45 24 mov 0x24(%ebp),%eax <== NOT EXECUTED
13c2ba: c6 40 03 7e movb $0x7e,0x3(%eax) <== NOT EXECUTED
13c2be: 89 c2 mov %eax,%edx <== NOT EXECUTED
13c2c0: 83 c2 04 add $0x4,%edx <== NOT EXECUTED
13c2c3: 8b 1d c8 90 16 00 mov 0x1690c8,%ebx <== NOT EXECUTED
13c2c9: b9 0c 00 00 00 mov $0xc,%ecx <== NOT EXECUTED
for (i = 0; i < 4; i++, c++)
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
13c2ce: 89 f0 mov %esi,%eax <== NOT EXECUTED
13c2d0: d3 f8 sar %cl,%eax <== NOT EXECUTED
13c2d2: 83 e0 0f and $0xf,%eax <== NOT EXECUTED
13c2d5: 8a 04 03 mov (%ebx,%eax,1),%al <== NOT EXECUTED
13c2d8: 88 02 mov %al,(%edx) <== NOT EXECUTED
int i;
for (i = 0; i < 3; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '~';
*c++ = '~';
for (i = 0; i < 4; i++, c++)
13c2da: 42 inc %edx <== NOT EXECUTED
13c2db: 83 e9 04 sub $0x4,%ecx <== NOT EXECUTED
13c2de: 83 f9 fc cmp $0xfffffffc,%ecx <== NOT EXECUTED
13c2e1: 75 eb jne 13c2ce <msdos_find_name_in_fat_file+0x81e><== NOT EXECUTED
13c2e3: e9 96 fb ff ff jmp 13be7e <msdos_find_name_in_fat_file+0x3ce><== NOT EXECUTED
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 3; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '~';
13c2e8: c6 04 01 7e movb $0x7e,(%ecx,%eax,1) <== NOT EXECUTED
13c2ec: eb c3 jmp 13c2b1 <msdos_find_name_in_fat_file+0x801><== NOT EXECUTED
if (ret == -1)
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
13c2ee: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
13c2f1: e9 79 fa ff ff jmp 13bd6f <msdos_find_name_in_fat_file+0x2bf><== NOT EXECUTED
13c2f6: 31 c0 xor %eax,%eax <== NOT EXECUTED
13c2f8: e9 72 fa ff ff jmp 13bd6f <msdos_find_name_in_fat_file+0x2bf><== NOT EXECUTED
#endif
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
13c2fd: 68 b8 8f 16 00 push $0x168fb8 <== NOT EXECUTED
13c302: 68 ab 90 16 00 push $0x1690ab <== NOT EXECUTED
13c307: 68 49 04 00 00 push $0x449 <== NOT EXECUTED
13c30c: 68 20 90 16 00 push $0x169020 <== NOT EXECUTED
13c311: e8 ce 1e fd ff call 10e1e4 <__assert_func> <== NOT EXECUTED
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
13c316: 68 c6 8f 16 00 push $0x168fc6 <== NOT EXECUTED
13c31b: 68 ab 90 16 00 push $0x1690ab <== NOT EXECUTED
13c320: 68 19 04 00 00 push $0x419 <== NOT EXECUTED
13c325: 68 20 90 16 00 push $0x169020 <== NOT EXECUTED
13c32a: e8 b5 1e fd ff call 10e1e4 <__assert_func> <== NOT EXECUTED
0013b978 <msdos_find_node_by_cluster_num_in_fat_file>:
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
13b978: 55 push %ebp <== NOT EXECUTED
13b979: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13b97b: 57 push %edi <== NOT EXECUTED
13b97c: 56 push %esi <== NOT EXECUTED
13b97d: 53 push %ebx <== NOT EXECUTED
13b97e: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
13b981: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13b984: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
13b987: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
13b98a: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
13b98d: 83 7a 20 01 cmpl $0x1,0x20(%edx) <== NOT EXECUTED
13b991: 0f 84 d1 00 00 00 je 13ba68 <msdos_find_node_by_cluster_num_in_fat_file+0xf0><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
13b997: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
13b99a: 0f b7 5a 06 movzwl 0x6(%edx),%ebx <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
13b99e: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13b9a1: 8b 90 98 00 00 00 mov 0x98(%eax),%edx <== NOT EXECUTED
13b9a7: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
while ((ret = fat_file_read(mt_entry, fat_fd, j * bts2rd, bts2rd,
13b9ae: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b9b1: 52 push %edx <== NOT EXECUTED
13b9b2: 53 push %ebx <== NOT EXECUTED
13b9b3: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13b9b6: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13b9b9: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13b9bc: e8 eb f8 fe ff call 12b2ac <fat_file_read> <== NOT EXECUTED
13b9c1: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13b9c4: 85 c0 test %eax,%eax <== NOT EXECUTED
13b9c6: 74 4c je 13ba14 <msdos_find_node_by_cluster_num_in_fat_file+0x9c><== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
13b9c8: 83 f8 1f cmp $0x1f,%eax <== NOT EXECUTED
13b9cb: 0f 8e b4 00 00 00 jle 13ba85 <msdos_find_node_by_cluster_num_in_fat_file+0x10d><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
13b9d1: 39 d8 cmp %ebx,%eax <== NOT EXECUTED
13b9d3: 0f 85 be 00 00 00 jne 13ba97 <msdos_find_node_by_cluster_num_in_fat_file+0x11f><== NOT EXECUTED
13b9d9: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13b9dc: 8b 90 98 00 00 00 mov 0x98(%eax),%edx <== NOT EXECUTED
13b9e2: 31 ff xor %edi,%edi <== NOT EXECUTED
13b9e4: 8d 34 3a lea (%edx,%edi,1),%esi <== NOT EXECUTED
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
13b9e7: 8a 04 3a mov (%edx,%edi,1),%al <== NOT EXECUTED
13b9ea: 84 c0 test %al,%al <== NOT EXECUTED
13b9ec: 74 26 je 13ba14 <msdos_find_node_by_cluster_num_in_fat_file+0x9c><== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
return MSDOS_NAME_NOT_FOUND_ERR;
/* if this entry is empty - skip it */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
13b9ee: 3c e5 cmp $0xe5,%al <== NOT EXECUTED
13b9f0: 74 14 je 13ba06 <msdos_find_node_by_cluster_num_in_fat_file+0x8e><== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
13b9f2: 0f b7 44 3a 14 movzwl 0x14(%edx,%edi,1),%eax <== NOT EXECUTED
13b9f7: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
13b9fa: 0f b7 4c 3a 1a movzwl 0x1a(%edx,%edi,1),%ecx <== NOT EXECUTED
13b9ff: 09 c8 or %ecx,%eax <== NOT EXECUTED
13ba01: 3b 45 10 cmp 0x10(%ebp),%eax <== NOT EXECUTED
13ba04: 74 1e je 13ba24 <msdos_find_node_by_cluster_num_in_fat_file+0xac><== NOT EXECUTED
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
13ba06: 83 c7 20 add $0x20,%edi <== NOT EXECUTED
13ba09: 39 fb cmp %edi,%ebx <== NOT EXECUTED
13ba0b: 77 d7 ja 13b9e4 <msdos_find_node_by_cluster_num_in_fat_file+0x6c><== NOT EXECUTED
13ba0d: 01 5d e0 add %ebx,-0x20(%ebp) <== NOT EXECUTED
13ba10: eb 9c jmp 13b9ae <msdos_find_node_by_cluster_num_in_fat_file+0x36><== NOT EXECUTED
13ba12: 66 90 xchg %ax,%ax <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
while ((ret = fat_file_read(mt_entry, fat_fd, j * bts2rd, bts2rd,
13ba14: b8 01 7d 00 00 mov $0x7d01,%eax <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
13ba19: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13ba1c: 5b pop %ebx <== NOT EXECUTED
13ba1d: 5e pop %esi <== NOT EXECUTED
13ba1e: 5f pop %edi <== NOT EXECUTED
13ba1f: c9 leave <== NOT EXECUTED
13ba20: c3 ret <== NOT EXECUTED
13ba21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
{
/* on success fill aux structure and copy all 32 bytes */
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, j * bts2rd,
13ba24: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13ba27: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
13ba2a: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13ba2d: 6a 01 push $0x1 <== NOT EXECUTED
13ba2f: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13ba32: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13ba35: e8 b6 f2 fe ff call 12acf0 <fat_file_ioctl> <== NOT EXECUTED
&dir_pos->sname.cln);
if (rc != RC_OK)
13ba3a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13ba3d: 85 c0 test %eax,%eax <== NOT EXECUTED
13ba3f: 75 d8 jne 13ba19 <msdos_find_node_by_cluster_num_in_fat_file+0xa1><== NOT EXECUTED
return rc;
dir_pos->sname.ofs = i;
13ba41: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
13ba44: 89 7a 04 mov %edi,0x4(%edx) <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
13ba47: c7 42 08 ff ff ff ff movl $0xffffffff,0x8(%edx) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
13ba4e: c7 42 0c ff ff ff ff movl $0xffffffff,0xc(%edx) <== NOT EXECUTED
memcpy(dir_entry, entry,
13ba55: b9 08 00 00 00 mov $0x8,%ecx <== NOT EXECUTED
13ba5a: 8b 7d 18 mov 0x18(%ebp),%edi <== NOT EXECUTED
13ba5d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
13ba5f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13ba62: 5b pop %ebx <== NOT EXECUTED
13ba63: 5e pop %esi <== NOT EXECUTED
13ba64: 5f pop %edi <== NOT EXECUTED
13ba65: c9 leave <== NOT EXECUTED
13ba66: c3 ret <== NOT EXECUTED
13ba67: 90 nop <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
13ba68: 8b 4a 24 mov 0x24(%edx),%ecx <== NOT EXECUTED
13ba6b: 85 c9 test %ecx,%ecx <== NOT EXECUTED
13ba6d: 0f 85 24 ff ff ff jne 13b997 <msdos_find_node_by_cluster_num_in_fat_file+0x1f><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
13ba73: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED
13ba77: 0f 84 1a ff ff ff je 13b997 <msdos_find_node_by_cluster_num_in_fat_file+0x1f><== NOT EXECUTED
bts2rd = fat_fd->fat_file_size;
13ba7d: 8b 5a 18 mov 0x18(%edx),%ebx <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
13ba80: e9 19 ff ff ff jmp 13b99e <msdos_find_node_by_cluster_num_in_fat_file+0x26><== NOT EXECUTED
while ((ret = fat_file_read(mt_entry, fat_fd, j * bts2rd, bts2rd,
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
13ba85: e8 f6 c0 00 00 call 147b80 <__errno> <== NOT EXECUTED
13ba8a: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13ba90: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
13ba95: eb 82 jmp 13ba19 <msdos_find_node_by_cluster_num_in_fat_file+0xa1><== NOT EXECUTED
assert(ret == bts2rd);
13ba97: 68 b8 8f 16 00 push $0x168fb8 <== NOT EXECUTED
13ba9c: 68 80 90 16 00 push $0x169080 <== NOT EXECUTED
13baa1: 68 95 06 00 00 push $0x695 <== NOT EXECUTED
13baa6: 68 20 90 16 00 push $0x169020 <== NOT EXECUTED
13baab: e8 34 27 fd ff call 10e1e4 <__assert_func> <== NOT EXECUTED
00124c4c <msdos_format>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
124c4c: 55 push %ebp <== NOT EXECUTED
124c4d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
124c4f: 57 push %edi <== NOT EXECUTED
124c50: 56 push %esi <== NOT EXECUTED
124c51: 53 push %ebx <== NOT EXECUTED
124c52: 81 ec 2c 03 00 00 sub $0x32c,%esp <== NOT EXECUTED
124c58: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
124c5b: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
int ret_val = 0;
int fd = -1;
int i;
msdos_format_param_t fmt_params;
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
124c5e: 57 push %edi <== NOT EXECUTED
124c5f: 68 8c 46 16 00 push $0x16468c <== NOT EXECUTED
124c64: 6a 01 push $0x1 <== NOT EXECUTED
124c66: 53 push %ebx <== NOT EXECUTED
124c67: e8 08 fe ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
"formating: %s\n", devname);
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
124c6c: 57 push %edi <== NOT EXECUTED
124c6d: 68 9b 46 16 00 push $0x16469b <== NOT EXECUTED
124c72: 6a 02 push $0x2 <== NOT EXECUTED
124c74: 53 push %ebx <== NOT EXECUTED
124c75: e8 fa fd ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
"stat check: %s\n", devname);
if (ret_val == 0) {
rc = stat(devname, &stat_buf);
124c7a: 83 c4 18 add $0x18,%esp <== NOT EXECUTED
124c7d: 8d 45 94 lea -0x6c(%ebp),%eax <== NOT EXECUTED
124c80: 50 push %eax <== NOT EXECUTED
124c81: 57 push %edi <== NOT EXECUTED
124c82: e8 f9 b1 fe ff call 10fe80 <stat> <== NOT EXECUTED
ret_val = rc;
}
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) &&
124c87: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
124c8a: 85 c0 test %eax,%eax <== NOT EXECUTED
124c8c: 74 0e je 124c9c <msdos_format+0x50> <== NOT EXECUTED
124c8e: 89 c6 mov %eax,%esi <== NOT EXECUTED
}
if (dd != NULL) {
rtems_disk_release(dd);
}
return ret_val;
}
124c90: 89 f0 mov %esi,%eax <== NOT EXECUTED
124c92: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
124c95: 5b pop %ebx <== NOT EXECUTED
124c96: 5e pop %esi <== NOT EXECUTED
124c97: 5f pop %edi <== NOT EXECUTED
124c98: c9 leave <== NOT EXECUTED
124c99: c3 ret <== NOT EXECUTED
124c9a: 66 90 xchg %ax,%ax <== NOT EXECUTED
ret_val = rc;
}
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) &&
(!S_ISBLK(stat_buf.st_mode))) {
124c9c: 8b 45 a0 mov -0x60(%ebp),%eax <== NOT EXECUTED
124c9f: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
124ca4: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED
124ca9: 74 1d je 124cc8 <msdos_format+0x7c> <== NOT EXECUTED
/* check that device is registered as block device and lock it */
if (ret_val == 0) {
dd = rtems_disk_obtain(stat_buf.st_rdev);
if (dd == NULL) {
errno = ENOTTY;
124cab: e8 d0 2e 02 00 call 147b80 <__errno> <== NOT EXECUTED
124cb0: c7 00 19 00 00 00 movl $0x19,(%eax) <== NOT EXECUTED
124cb6: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
}
if (dd != NULL) {
rtems_disk_release(dd);
}
return ret_val;
}
124cbb: 89 f0 mov %esi,%eax <== NOT EXECUTED
124cbd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
124cc0: 5b pop %ebx <== NOT EXECUTED
124cc1: 5e pop %esi <== NOT EXECUTED
124cc2: 5f pop %edi <== NOT EXECUTED
124cc3: c9 leave <== NOT EXECUTED
124cc4: c3 ret <== NOT EXECUTED
124cc5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
ret_val = -1;
}
/* check that device is registered as block device and lock it */
if (ret_val == 0) {
dd = rtems_disk_obtain(stat_buf.st_rdev);
124cc8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
124ccb: ff 75 b0 pushl -0x50(%ebp) <== NOT EXECUTED
124cce: ff 75 ac pushl -0x54(%ebp) <== NOT EXECUTED
124cd1: e8 ae 87 fe ff call 10d484 <rtems_disk_obtain> <== NOT EXECUTED
124cd6: 89 85 2c fd ff ff mov %eax,-0x2d4(%ebp) <== NOT EXECUTED
if (dd == NULL) {
124cdc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
124cdf: 85 c0 test %eax,%eax <== NOT EXECUTED
124ce1: 74 c8 je 124cab <msdos_format+0x5f> <== NOT EXECUTED
/*
* open device for writing
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
124ce3: 52 push %edx <== NOT EXECUTED
124ce4: 68 27 47 16 00 push $0x164727 <== NOT EXECUTED
124ce9: 6a 02 push $0x2 <== NOT EXECUTED
124ceb: 53 push %ebx <== NOT EXECUTED
124cec: e8 83 fd ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
"open device\n");
fd = open(devname, O_RDWR);
124cf1: 5e pop %esi <== NOT EXECUTED
124cf2: 58 pop %eax <== NOT EXECUTED
124cf3: 6a 02 push $0x2 <== NOT EXECUTED
124cf5: 57 push %edi <== NOT EXECUTED
124cf6: e8 55 ab fe ff call 10f850 <open> <== NOT EXECUTED
124cfb: 89 85 30 fd ff ff mov %eax,-0x2d0(%ebp) <== NOT EXECUTED
if (fd == -1)
124d01: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
124d04: 40 inc %eax <== NOT EXECUTED
124d05: 0f 84 51 01 00 00 je 124e5c <msdos_format+0x210> <== NOT EXECUTED
uint32_t fatdata_sect_cnt;
uint32_t onebit;
uint32_t sectors_per_cluster_adj = 0;
uint64_t total_size = 0;
memset(fmt_params,0,sizeof(*fmt_params));
124d0b: 8d 85 44 ff ff ff lea -0xbc(%ebp),%eax <== NOT EXECUTED
124d11: 89 85 cc fc ff ff mov %eax,-0x334(%ebp) <== NOT EXECUTED
124d17: b9 50 00 00 00 mov $0x50,%ecx <== NOT EXECUTED
124d1c: 31 c0 xor %eax,%eax <== NOT EXECUTED
124d1e: 8b bd cc fc ff ff mov -0x334(%ebp),%edi <== NOT EXECUTED
124d24: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
/*
* this one is fixed in this implementation.
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
124d26: 8b 95 2c fd ff ff mov -0x2d4(%ebp),%edx <== NOT EXECUTED
124d2c: 8b 42 20 mov 0x20(%edx),%eax <== NOT EXECUTED
124d2f: 89 85 44 ff ff ff mov %eax,-0xbc(%ebp) <== NOT EXECUTED
fmt_params->totl_sector_cnt = dd->size;
124d35: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED
124d38: 89 95 48 ff ff ff mov %edx,-0xb8(%ebp) <== NOT EXECUTED
total_size = dd->block_size * dd->size;
124d3e: 89 d6 mov %edx,%esi <== NOT EXECUTED
124d40: 0f af f0 imul %eax,%esi <== NOT EXECUTED
124d43: 31 ff xor %edi,%edi <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
124d45: 51 push %ecx <== NOT EXECUTED
124d46: 57 push %edi <== NOT EXECUTED
124d47: 56 push %esi <== NOT EXECUTED
124d48: 52 push %edx <== NOT EXECUTED
124d49: 50 push %eax <== NOT EXECUTED
124d4a: 68 4c 47 16 00 push $0x16474c <== NOT EXECUTED
124d4f: 6a 02 push $0x2 <== NOT EXECUTED
124d51: 53 push %ebx <== NOT EXECUTED
124d52: e8 1d fd ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
124d57: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
124d5a: 85 db test %ebx,%ebx <== NOT EXECUTED
124d5c: 0f 84 12 07 00 00 je 125474 <msdos_format+0x828> <== NOT EXECUTED
(rqdata->fat_num == 0)) {
124d62: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
124d65: 85 c0 test %eax,%eax <== NOT EXECUTED
124d67: 0f 84 df 00 00 00 je 124e4c <msdos_format+0x200> <== NOT EXECUTED
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
}
else if (rqdata->fat_num <= 6) {
124d6d: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
124d70: 0f 87 1a 01 00 00 ja 124e90 <msdos_format+0x244> <== NOT EXECUTED
fmt_params->fat_num = rqdata->fat_num;
124d76: 88 85 74 ff ff ff mov %al,-0x8c(%ebp) <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
124d7c: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
124d7f: 50 push %eax <== NOT EXECUTED
124d80: 68 ab 46 16 00 push $0x1646ab <== NOT EXECUTED
124d85: 6a 02 push $0x2 <== NOT EXECUTED
124d87: 53 push %ebx <== NOT EXECUTED
124d88: e8 e7 fc ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
/*
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
124d8d: c7 85 50 ff ff ff 01 movl $0x1,-0xb0(%ebp) <== NOT EXECUTED
124d94: 00 00 00
124d97: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT12)) {
124d9a: 8a 43 14 mov 0x14(%ebx),%al <== NOT EXECUTED
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
if ((rqdata != NULL) &&
124d9d: 3c 01 cmp $0x1,%al <== NOT EXECUTED
124d9f: 0f 84 73 0b 00 00 je 125918 <msdos_format+0xccc> <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT12)) {
fmt_params->fattype = FAT_FAT12;
}
else if ((rqdata != NULL) &&
124da5: 3c 02 cmp $0x2,%al <== NOT EXECUTED
124da7: 0f 84 83 0b 00 00 je 125930 <msdos_format+0xce4> <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
}
else if ((rqdata != NULL) &&
124dad: 3c 03 cmp $0x3,%al <== NOT EXECUTED
124daf: 0f 84 07 0d 00 00 je 125abc <msdos_format+0xe70> <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
124db5: 84 c0 test %al,%al <== NOT EXECUTED
124db7: 0f 85 03 07 00 00 jne 1254c0 <msdos_format+0x874> <== NOT EXECUTED
/*
* limiting values for disk size, fat type, sectors per cluster
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
if (fmt_params->totl_sector_cnt
124dbd: 8b 85 48 ff ff ff mov -0xb8(%ebp),%eax <== NOT EXECUTED
124dc3: 3d a7 7f 00 00 cmp $0x7fa7,%eax <== NOT EXECUTED
124dc8: 0f 87 8a 0b 00 00 ja 125958 <msdos_format+0xd0c> <== NOT EXECUTED
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
124dce: c6 85 76 ff ff ff 01 movb $0x1,-0x8a(%ebp) <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
124dd5: c7 85 50 ff ff ff 02 movl $0x2,-0xb0(%ebp) <== NOT EXECUTED
124ddc: 00 00 00
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
124ddf: 85 db test %ebx,%ebx <== NOT EXECUTED
124de1: 0f 84 bd 0c 00 00 je 125aa4 <msdos_format+0xe58> <== NOT EXECUTED
124de7: c7 85 f8 fc ff ff 00 movl $0x0,-0x308(%ebp) <== NOT EXECUTED
124dee: 00 00 00
(rqdata->sectors_per_cluster > 0)) {
124df1: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
124df4: 85 c0 test %eax,%eax <== NOT EXECUTED
124df6: 0f 85 f8 09 00 00 jne 1257f4 <msdos_format+0xba8> <== NOT EXECUTED
124dfc: 8b 95 50 ff ff ff mov -0xb0(%ebp),%edx <== NOT EXECUTED
124e02: 89 d0 mov %edx,%eax <== NOT EXECUTED
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
124e04: 8b 8d 44 ff ff ff mov -0xbc(%ebp),%ecx <== NOT EXECUTED
124e0a: 89 8d 34 fd ff ff mov %ecx,-0x2cc(%ebp) <== NOT EXECUTED
124e10: 31 f6 xor %esi,%esi <== NOT EXECUTED
124e12: b9 80 00 00 00 mov $0x80,%ecx <== NOT EXECUTED
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
124e17: bf 00 80 00 00 mov $0x8000,%edi <== NOT EXECUTED
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
124e1c: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
124e1e: 76 14 jbe 124e34 <msdos_format+0x1e8> <== NOT EXECUTED
124e20: 89 d0 mov %edx,%eax <== NOT EXECUTED
* check sectors per cluster.
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
124e22: d1 e9 shr %ecx <== NOT EXECUTED
124e24: 46 inc %esi <== NOT EXECUTED
124e25: 83 fe 08 cmp $0x8,%esi <== NOT EXECUTED
124e28: 0f 84 1c 0d 00 00 je 125b4a <msdos_format+0xefe> <== NOT EXECUTED
124e2e: 89 c2 mov %eax,%edx <== NOT EXECUTED
if (fmt_params->sectors_per_cluster >= onebit) {
124e30: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
124e32: 77 ec ja 124e20 <msdos_format+0x1d4> <== NOT EXECUTED
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
124e34: 89 f8 mov %edi,%eax <== NOT EXECUTED
124e36: 31 d2 xor %edx,%edx <== NOT EXECUTED
124e38: f7 b5 34 fd ff ff divl -0x2cc(%ebp) <== NOT EXECUTED
124e3e: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
124e40: 0f 83 96 06 00 00 jae 1254dc <msdos_format+0x890> <== NOT EXECUTED
124e46: 89 c8 mov %ecx,%eax <== NOT EXECUTED
124e48: eb d8 jmp 124e22 <msdos_format+0x1d6> <== NOT EXECUTED
124e4a: 66 90 xchg %ax,%ax <== NOT EXECUTED
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
124e4c: c6 85 74 ff ff ff 02 movb $0x2,-0x8c(%ebp) <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
124e53: 6a 02 push $0x2 <== NOT EXECUTED
124e55: e9 26 ff ff ff jmp 124d80 <msdos_format+0x134> <== NOT EXECUTED
124e5a: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"open device\n");
fd = open(devname, O_RDWR);
if (fd == -1)
124e5c: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
124e61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* free any data structures (not needed now)
*/
if (fd != -1) {
close(fd);
}
if (dd != NULL) {
124e64: 8b 8d 2c fd ff ff mov -0x2d4(%ebp),%ecx <== NOT EXECUTED
124e6a: 85 c9 test %ecx,%ecx <== NOT EXECUTED
124e6c: 0f 84 1e fe ff ff je 124c90 <msdos_format+0x44> <== NOT EXECUTED
rtems_disk_release(dd);
124e72: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
124e75: ff b5 2c fd ff ff pushl -0x2d4(%ebp) <== NOT EXECUTED
124e7b: e8 e0 87 fe ff call 10d660 <rtems_disk_release> <== NOT EXECUTED
124e80: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return ret_val;
}
124e83: 89 f0 mov %esi,%eax <== NOT EXECUTED
124e85: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
124e88: 5b pop %ebx <== NOT EXECUTED
124e89: 5e pop %esi <== NOT EXECUTED
124e8a: 5f pop %edi <== NOT EXECUTED
124e8b: c9 leave <== NOT EXECUTED
124e8c: c3 ret <== NOT EXECUTED
124e8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
124e90: c7 85 f8 fc ff ff 16 movl $0x16,-0x308(%ebp) <== NOT EXECUTED
124e97: 00 00 00
}
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
124e9a: 8b b5 60 ff ff ff mov -0xa0(%ebp),%esi <== NOT EXECUTED
124ea0: 85 f6 test %esi,%esi <== NOT EXECUTED
124ea2: 0f 84 64 05 00 00 je 12540c <msdos_format+0x7c0> <== NOT EXECUTED
fmt_params->root_dir_start_sec =
124ea8: 0f b6 85 74 ff ff ff movzbl -0x8c(%ebp),%eax <== NOT EXECUTED
124eaf: 0f af 85 54 ff ff ff imul -0xac(%ebp),%eax <== NOT EXECUTED
124eb6: 03 85 4c ff ff ff add -0xb4(%ebp),%eax <== NOT EXECUTED
124ebc: 89 85 64 ff ff ff mov %eax,-0x9c(%ebp) <== NOT EXECUTED
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
fmt_params->root_dir_fmt_sec_cnt = fmt_params->root_dir_sectors;
124ec2: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax <== NOT EXECUTED
124ec8: 89 85 68 ff ff ff mov %eax,-0x98(%ebp) <== NOT EXECUTED
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
}
/*
* determine usable OEMName
*/
if (ret_val == 0) {
124ece: 8b 8d f8 fc ff ff mov -0x308(%ebp),%ecx <== NOT EXECUTED
124ed4: 85 c9 test %ecx,%ecx <== NOT EXECUTED
124ed6: 0f 85 84 00 00 00 jne 124f60 <msdos_format+0x314> <== NOT EXECUTED
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
124edc: 85 db test %ebx,%ebx <== NOT EXECUTED
124ede: 0f 84 58 09 00 00 je 12583c <msdos_format+0xbf0> <== NOT EXECUTED
(rqdata->OEMName != NULL)) {
124ee4: 8b 0b mov (%ebx),%ecx <== NOT EXECUTED
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
124ee6: 85 c9 test %ecx,%ecx <== NOT EXECUTED
124ee8: 0f 84 4e 09 00 00 je 12583c <msdos_format+0xbf0> <== NOT EXECUTED
124eee: 8b 35 48 fb 16 00 mov 0x16fb48,%esi <== NOT EXECUTED
124ef4: 8d 85 78 ff ff ff lea -0x88(%ebp),%eax <== NOT EXECUTED
}
/*=========================================================================*\
| Function: |
\*-------------------------------------------------------------------------*/
int msdos_format
124efa: 8d 55 80 lea -0x80(%ebp),%edx <== NOT EXECUTED
124efd: 89 95 d4 fc ff ff mov %edx,-0x32c(%ebp) <== NOT EXECUTED
124f03: eb 13 jmp 124f18 <msdos_format+0x2cc> <== NOT EXECUTED
124f05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
*to++ = *from++;
124f08: 88 50 ff mov %dl,-0x1(%eax) <== NOT EXECUTED
124f0b: 41 inc %ecx <== NOT EXECUTED
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
124f0c: c6 00 00 movb $0x0,(%eax) <== NOT EXECUTED
124f0f: 40 inc %eax <== NOT EXECUTED
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
(rqdata->OEMName != NULL)) {
from = rqdata->OEMName;
}
for (cnt = 0;
124f10: 3b 85 d4 fc ff ff cmp -0x32c(%ebp),%eax <== NOT EXECUTED
124f16: 74 1c je 124f34 <msdos_format+0x2e8> <== NOT EXECUTED
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
124f18: 8a 11 mov (%ecx),%dl <== NOT EXECUTED
124f1a: 0f b6 fa movzbl %dl,%edi <== NOT EXECUTED
124f1d: f6 44 3e 01 97 testb $0x97,0x1(%esi,%edi,1) <== NOT EXECUTED
124f22: 75 e4 jne 124f08 <msdos_format+0x2bc> <== NOT EXECUTED
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
124f24: c6 40 ff 20 movb $0x20,-0x1(%eax) <== NOT EXECUTED
}
*to = '\0';
124f28: c6 00 00 movb $0x0,(%eax) <== NOT EXECUTED
124f2b: 40 inc %eax <== NOT EXECUTED
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
(rqdata->OEMName != NULL)) {
from = rqdata->OEMName;
}
for (cnt = 0;
124f2c: 3b 85 d4 fc ff ff cmp -0x32c(%ebp),%eax <== NOT EXECUTED
124f32: 75 e4 jne 124f18 <msdos_format+0x2cc> <== NOT EXECUTED
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
124f34: 85 db test %ebx,%ebx <== NOT EXECUTED
124f36: 0f 84 0c 09 00 00 je 125848 <msdos_format+0xbfc> <== NOT EXECUTED
(rqdata->VolLabel != NULL)) {
124f3c: 8b 4b 04 mov 0x4(%ebx),%ecx <== NOT EXECUTED
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
124f3f: 85 c9 test %ecx,%ecx <== NOT EXECUTED
124f41: 0f 84 01 09 00 00 je 125848 <msdos_format+0xbfc> <== NOT EXECUTED
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
124f47: c6 45 8c 01 movb $0x1,-0x74(%ebp) <== NOT EXECUTED
124f4b: 8d 45 81 lea -0x7f(%ebp),%eax <== NOT EXECUTED
}
/*=========================================================================*\
| Function: |
\*-------------------------------------------------------------------------*/
int msdos_format
124f4e: 8d bd 44 ff ff ff lea -0xbc(%ebp),%edi <== NOT EXECUTED
124f54: 83 c7 48 add $0x48,%edi <== NOT EXECUTED
124f57: 89 9d 34 fd ff ff mov %ebx,-0x2cc(%ebp) <== NOT EXECUTED
124f5d: eb 45 jmp 124fa4 <msdos_format+0x358> <== NOT EXECUTED
124f5f: 90 nop <== NOT EXECUTED
}
/*
* Phuuu.... That's it.
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
124f60: e8 1b 2c 02 00 call 147b80 <__errno> <== NOT EXECUTED
124f65: 8b 8d f8 fc ff ff mov -0x308(%ebp),%ecx <== NOT EXECUTED
124f6b: 89 08 mov %ecx,(%eax) <== NOT EXECUTED
124f6d: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
124f72: 83 bd 30 fd ff ff ff cmpl $0xffffffff,-0x2d0(%ebp) <== NOT EXECUTED
124f79: 0f 84 e5 fe ff ff je 124e64 <msdos_format+0x218> <== NOT EXECUTED
124f7f: 90 nop <== NOT EXECUTED
close(fd);
124f80: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
124f83: ff b5 30 fd ff ff pushl -0x2d0(%ebp) <== NOT EXECUTED
124f89: e8 86 94 fe ff call 10e414 <close> <== NOT EXECUTED
124f8e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
124f91: e9 ce fe ff ff jmp 124e64 <msdos_format+0x218> <== NOT EXECUTED
124f96: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
*to++ = *from++;
124f98: 88 50 ff mov %dl,-0x1(%eax) <== NOT EXECUTED
124f9b: 41 inc %ecx <== NOT EXECUTED
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
124f9c: c6 00 00 movb $0x0,(%eax) <== NOT EXECUTED
124f9f: 40 inc %eax <== NOT EXECUTED
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
124fa0: 39 f8 cmp %edi,%eax <== NOT EXECUTED
124fa2: 74 18 je 124fbc <msdos_format+0x370> <== NOT EXECUTED
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
124fa4: 8a 11 mov (%ecx),%dl <== NOT EXECUTED
124fa6: 0f b6 da movzbl %dl,%ebx <== NOT EXECUTED
124fa9: f6 44 1e 01 97 testb $0x97,0x1(%esi,%ebx,1) <== NOT EXECUTED
124fae: 75 e8 jne 124f98 <msdos_format+0x34c> <== NOT EXECUTED
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
124fb0: c6 40 ff 20 movb $0x20,-0x1(%eax) <== NOT EXECUTED
}
*to = '\0';
124fb4: c6 00 00 movb $0x0,(%eax) <== NOT EXECUTED
124fb7: 40 inc %eax <== NOT EXECUTED
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
124fb8: 39 f8 cmp %edi,%eax <== NOT EXECUTED
124fba: 75 e8 jne 124fa4 <msdos_format+0x358> <== NOT EXECUTED
124fbc: 8b 9d 34 fd ff ff mov -0x2cc(%ebp),%ebx <== NOT EXECUTED
{
int ret_val = 0;
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
124fc2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
124fc5: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
124fc8: 50 push %eax <== NOT EXECUTED
124fc9: e8 7e d5 fe ff call 11254c <rtems_clock_get_tod_timeval><== NOT EXECUTED
if (rc == RTEMS_SUCCESSFUL) {
124fce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
124fd1: 85 c0 test %eax,%eax <== NOT EXECUTED
124fd3: 0f 85 6f 09 00 00 jne 125948 <msdos_format+0xcfc> <== NOT EXECUTED
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
124fd9: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
124fdc: d1 e0 shl %eax <== NOT EXECUTED
124fde: 89 45 90 mov %eax,-0x70(%ebp) <== NOT EXECUTED
ret_val = msdos_format_determine_fmt_params(dd,rqdata,&fmt_params);
}
/*
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
124fe1: 85 db test %ebx,%ebx <== NOT EXECUTED
124fe3: 74 0a je 124fef <msdos_format+0x3a3> <== NOT EXECUTED
(rqdata != NULL) &&
!(rqdata->quick_format)) {
124fe5: 80 7b 16 00 cmpb $0x0,0x16(%ebx) <== NOT EXECUTED
124fe9: 0f 84 55 04 00 00 je 125444 <msdos_format+0x7f8> <== NOT EXECUTED
*/
if (ret_val == 0) {
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
124fef: 50 push %eax <== NOT EXECUTED
124ff0: 68 d8 46 16 00 push $0x1646d8 <== NOT EXECUTED
124ff5: 6a 02 push $0x2 <== NOT EXECUTED
124ff7: 53 push %ebx <== NOT EXECUTED
124ff8: e8 77 fa ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
"read MRB sector\n");
ret_val = msdos_format_read_sec(fd,
124ffd: 8b b5 44 ff ff ff mov -0xbc(%ebp),%esi <== NOT EXECUTED
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
125003: 6a 00 push $0x0 <== NOT EXECUTED
125005: 6a 00 push $0x0 <== NOT EXECUTED
125007: 6a 00 push $0x0 <== NOT EXECUTED
125009: ff b5 30 fd ff ff pushl -0x2d0(%ebp) <== NOT EXECUTED
12500f: e8 0c a3 00 00 call 12f320 <lseek> <== NOT EXECUTED
125014: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
125017: 85 d2 test %edx,%edx <== NOT EXECUTED
125019: 0f 88 19 04 00 00 js 125438 <msdos_format+0x7ec> <== NOT EXECUTED
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
12501f: 57 push %edi <== NOT EXECUTED
125020: 56 push %esi <== NOT EXECUTED
125021: 8d 85 44 fd ff ff lea -0x2bc(%ebp),%eax <== NOT EXECUTED
125027: 89 85 d0 fc ff ff mov %eax,-0x330(%ebp) <== NOT EXECUTED
12502d: 50 push %eax <== NOT EXECUTED
12502e: ff b5 30 fd ff ff pushl -0x2d0(%ebp) <== NOT EXECUTED
125034: e8 a3 aa fe ff call 10fadc <read> <== NOT EXECUTED
125039: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12503c: 85 c0 test %eax,%eax <== NOT EXECUTED
12503e: 0f 88 f4 03 00 00 js 125438 <msdos_format+0x7ec> <== NOT EXECUTED
ret_val = msdos_format_read_sec(fd,
0,
fmt_params.bytes_per_sector,
tmp_sec);
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
125044: 57 push %edi <== NOT EXECUTED
125045: 68 34 47 16 00 push $0x164734 <== NOT EXECUTED
12504a: 6a 02 push $0x2 <== NOT EXECUTED
12504c: 53 push %ebx <== NOT EXECUTED
12504d: e8 22 fa ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
125052: 8b 85 48 ff ff ff mov -0xb8(%ebp),%eax <== NOT EXECUTED
125058: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12505b: 3d ff ff 00 00 cmp $0xffff,%eax <== NOT EXECUTED
125060: 0f 86 2e 04 00 00 jbe 125494 <msdos_format+0x848> <== NOT EXECUTED
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
125066: 88 85 34 fd ff ff mov %al,-0x2cc(%ebp) <== NOT EXECUTED
12506c: 89 c1 mov %eax,%ecx <== NOT EXECUTED
12506e: c1 e9 08 shr $0x8,%ecx <== NOT EXECUTED
125071: 88 8d f8 fc ff ff mov %cl,-0x308(%ebp) <== NOT EXECUTED
125077: 89 c2 mov %eax,%edx <== NOT EXECUTED
125079: c1 ea 10 shr $0x10,%edx <== NOT EXECUTED
12507c: 88 95 08 fd ff ff mov %dl,-0x2f8(%ebp) <== NOT EXECUTED
125082: c1 e8 18 shr $0x18,%eax <== NOT EXECUTED
125085: 88 85 18 fd ff ff mov %al,-0x2e8(%ebp) <== NOT EXECUTED
12508b: c6 85 e8 fc ff ff 00 movb $0x0,-0x318(%ebp) <== NOT EXECUTED
125092: 31 f6 xor %esi,%esi <== NOT EXECUTED
* finally we are there: let's fill in the values into the MBR
* but first clear the MRB leaving the partition table.
*/
#define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be
#define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16)
memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET);
125094: 31 d2 xor %edx,%edx <== NOT EXECUTED
125096: b9 be 01 00 00 mov $0x1be,%ecx <== NOT EXECUTED
12509b: 8b bd d0 fc ff ff mov -0x330(%ebp),%edi <== NOT EXECUTED
1250a1: 88 d0 mov %dl,%al <== NOT EXECUTED
1250a3: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
memset(mbr + RTEMS_IDE_PARTITION_TABLE_OFFSET + RTEMS_IDE_PARTITION_TABLE_SIZE,
1250a5: 66 c7 85 42 ff ff ff movw $0x0,-0xbe(%ebp) <== NOT EXECUTED
1250ac: 00 00
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
1250ae: 8b 85 77 ff ff ff mov -0x89(%ebp),%eax <== NOT EXECUTED
1250b4: 89 85 47 fd ff ff mov %eax,-0x2b9(%ebp) <== NOT EXECUTED
1250ba: 8b 85 7b ff ff ff mov -0x85(%ebp),%eax <== NOT EXECUTED
1250c0: 89 85 4b fd ff ff mov %eax,-0x2b5(%ebp) <== NOT EXECUTED
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
1250c6: 8b 85 44 ff ff ff mov -0xbc(%ebp),%eax <== NOT EXECUTED
1250cc: 88 85 4f fd ff ff mov %al,-0x2b1(%ebp) <== NOT EXECUTED
1250d2: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
1250d5: 88 85 50 fd ff ff mov %al,-0x2b0(%ebp) <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
1250db: 8b 85 50 ff ff ff mov -0xb0(%ebp),%eax <== NOT EXECUTED
1250e1: 88 85 51 fd ff ff mov %al,-0x2af(%ebp) <== NOT EXECUTED
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
1250e7: 8b 85 4c ff ff ff mov -0xb4(%ebp),%eax <== NOT EXECUTED
1250ed: 88 85 52 fd ff ff mov %al,-0x2ae(%ebp) <== NOT EXECUTED
1250f3: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
1250f6: 88 85 53 fd ff ff mov %al,-0x2ad(%ebp) <== NOT EXECUTED
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
1250fc: c6 85 54 fd ff ff 02 movb $0x2,-0x2ac(%ebp) <== NOT EXECUTED
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
125103: 8b 85 5c ff ff ff mov -0xa4(%ebp),%eax <== NOT EXECUTED
125109: 88 85 55 fd ff ff mov %al,-0x2ab(%ebp) <== NOT EXECUTED
12510f: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
125112: 88 85 56 fd ff ff mov %al,-0x2aa(%ebp) <== NOT EXECUTED
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
125118: 89 f1 mov %esi,%ecx <== NOT EXECUTED
12511a: 88 8d 57 fd ff ff mov %cl,-0x2a9(%ebp) <== NOT EXECUTED
125120: 8a 85 e8 fc ff ff mov -0x318(%ebp),%al <== NOT EXECUTED
125126: 88 85 58 fd ff ff mov %al,-0x2a8(%ebp) <== NOT EXECUTED
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
12512c: 8a 85 75 ff ff ff mov -0x8b(%ebp),%al <== NOT EXECUTED
125132: 88 85 59 fd ff ff mov %al,-0x2a7(%ebp) <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
125138: c6 85 5c fd ff ff ff movb $0xff,-0x2a4(%ebp) <== NOT EXECUTED
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
12513f: c6 85 5e fd ff ff 06 movb $0x6,-0x2a2(%ebp) <== NOT EXECUTED
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
125146: c6 85 60 fd ff ff 01 movb $0x1,-0x2a0(%ebp) <== NOT EXECUTED
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
12514d: 8a 8d 34 fd ff ff mov -0x2cc(%ebp),%cl <== NOT EXECUTED
125153: 88 8d 64 fd ff ff mov %cl,-0x29c(%ebp) <== NOT EXECUTED
125159: 8a 85 f8 fc ff ff mov -0x308(%ebp),%al <== NOT EXECUTED
12515f: 88 85 65 fd ff ff mov %al,-0x29b(%ebp) <== NOT EXECUTED
125165: 8a 8d 08 fd ff ff mov -0x2f8(%ebp),%cl <== NOT EXECUTED
12516b: 88 8d 66 fd ff ff mov %cl,-0x29a(%ebp) <== NOT EXECUTED
125171: 8a 85 18 fd ff ff mov -0x2e8(%ebp),%al <== NOT EXECUTED
125177: 88 85 67 fd ff ff mov %al,-0x299(%ebp) <== NOT EXECUTED
if (fmt_params->fattype != FAT_FAT32) {
12517d: 80 bd 76 ff ff ff 04 cmpb $0x4,-0x8a(%ebp) <== NOT EXECUTED
125184: 0f 84 2e 08 00 00 je 1259b8 <msdos_format+0xd6c> <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
12518a: 8b 85 54 ff ff ff mov -0xac(%ebp),%eax <== NOT EXECUTED
125190: 88 85 5a fd ff ff mov %al,-0x2a6(%ebp) <== NOT EXECUTED
125196: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
125199: 88 85 5b fd ff ff mov %al,-0x2a5(%ebp) <== NOT EXECUTED
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
12519f: c6 85 68 fd ff ff 00 movb $0x0,-0x298(%ebp) <== NOT EXECUTED
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
1251a6: c6 85 69 fd ff ff 00 movb $0x0,-0x297(%ebp) <== NOT EXECUTED
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
1251ad: c6 85 6a fd ff ff 29 movb $0x29,-0x296(%ebp) <== NOT EXECUTED
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
1251b4: 8b 45 90 mov -0x70(%ebp),%eax <== NOT EXECUTED
1251b7: 88 85 6b fd ff ff mov %al,-0x295(%ebp) <== NOT EXECUTED
1251bd: 0f b6 d4 movzbl %ah,%edx <== NOT EXECUTED
1251c0: 88 95 6c fd ff ff mov %dl,-0x294(%ebp) <== NOT EXECUTED
1251c6: 89 c2 mov %eax,%edx <== NOT EXECUTED
1251c8: c1 ea 10 shr $0x10,%edx <== NOT EXECUTED
1251cb: 88 95 6d fd ff ff mov %dl,-0x293(%ebp) <== NOT EXECUTED
1251d1: c1 e8 18 shr $0x18,%eax <== NOT EXECUTED
1251d4: 88 85 6e fd ff ff mov %al,-0x292(%ebp) <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
1251da: 8d 85 6f fd ff ff lea -0x291(%ebp),%eax <== NOT EXECUTED
1251e0: b9 0b 00 00 00 mov $0xb,%ecx <== NOT EXECUTED
1251e5: 89 c7 mov %eax,%edi <== NOT EXECUTED
1251e7: 8b b5 d4 fc ff ff mov -0x32c(%ebp),%esi <== NOT EXECUTED
1251ed: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
1251ef: 80 bd 76 ff ff ff 01 cmpb $0x1,-0x8a(%ebp) <== NOT EXECUTED
1251f6: 0f 84 d6 08 00 00 je 125ad2 <msdos_format+0xe86> <== NOT EXECUTED
1251fc: b8 e9 46 16 00 mov $0x1646e9,%eax <== NOT EXECUTED
125201: 8b 10 mov (%eax),%edx <== NOT EXECUTED
125203: 89 95 7a fd ff ff mov %edx,-0x286(%ebp) <== NOT EXECUTED
125209: 8b 40 04 mov 0x4(%eax),%eax <== NOT EXECUTED
12520c: 89 85 7e fd ff ff mov %eax,-0x282(%ebp) <== NOT EXECUTED
FAT_BR_FILSYSTYPE_SIZE);
}
/*
* add boot record signature
*/
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
125212: c6 85 42 ff ff ff 55 movb $0x55,-0xbe(%ebp) <== NOT EXECUTED
125219: c6 85 43 ff ff ff aa movb $0xaa,-0xbd(%ebp) <== NOT EXECUTED
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
125220: c6 85 44 fd ff ff eb movb $0xeb,-0x2bc(%ebp) <== NOT EXECUTED
FAT_SET_VAL8(mbr,1,0x3c);
125227: c6 85 45 fd ff ff 3c movb $0x3c,-0x2bb(%ebp) <== NOT EXECUTED
FAT_SET_VAL8(mbr,2,0x90);
12522e: c6 85 46 fd ff ff 90 movb $0x90,-0x2ba(%ebp) <== NOT EXECUTED
/*
* write master boot record to disk
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
125235: 56 push %esi <== NOT EXECUTED
125236: 68 fb 46 16 00 push $0x1646fb <== NOT EXECUTED
12523b: 6a 02 push $0x2 <== NOT EXECUTED
12523d: 53 push %ebx <== NOT EXECUTED
12523e: e8 31 f8 ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
125243: 8d 95 44 fd ff ff lea -0x2bc(%ebp),%edx <== NOT EXECUTED
125249: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
12524c: 8b 8d 44 ff ff ff mov -0xbc(%ebp),%ecx <== NOT EXECUTED
125252: 31 d2 xor %edx,%edx <== NOT EXECUTED
125254: 8b 85 30 fd ff ff mov -0x2d0(%ebp),%eax <== NOT EXECUTED
12525a: e8 59 f8 ff ff call 124ab8 <msdos_format_write_sec><== NOT EXECUTED
12525f: 89 c6 mov %eax,%esi <== NOT EXECUTED
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
125261: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125264: 85 c0 test %eax,%eax <== NOT EXECUTED
125266: 0f 85 06 fd ff ff jne 124f72 <msdos_format+0x326> <== NOT EXECUTED
12526c: 8b 8d 6c ff ff ff mov -0x94(%ebp),%ecx <== NOT EXECUTED
125272: 85 c9 test %ecx,%ecx <== NOT EXECUTED
125274: 0f 85 82 05 00 00 jne 1257fc <msdos_format+0xbb0> <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
12527a: 8b 85 70 ff ff ff mov -0x90(%ebp),%eax <== NOT EXECUTED
125280: 85 c0 test %eax,%eax <== NOT EXECUTED
125282: 0f 85 98 04 00 00 jne 125720 <msdos_format+0xad4> <== NOT EXECUTED
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
125288: 57 push %edi <== NOT EXECUTED
125289: 6a 00 push $0x0 <== NOT EXECUTED
12528b: ff b5 44 ff ff ff pushl -0xbc(%ebp) <== NOT EXECUTED
125291: 0f b6 85 74 ff ff ff movzbl -0x8c(%ebp),%eax <== NOT EXECUTED
125298: 0f af 85 54 ff ff ff imul -0xac(%ebp),%eax <== NOT EXECUTED
12529f: 50 push %eax <== NOT EXECUTED
1252a0: 8b 8d 4c ff ff ff mov -0xb4(%ebp),%ecx <== NOT EXECUTED
1252a6: 8b 95 30 fd ff ff mov -0x2d0(%ebp),%edx <== NOT EXECUTED
1252ac: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1252ae: e8 55 f8 ff ff call 124b08 <msdos_format_fill_sectors><== NOT EXECUTED
1252b3: 89 c6 mov %eax,%esi <== NOT EXECUTED
}
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
1252b5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1252b8: 85 c0 test %eax,%eax <== NOT EXECUTED
1252ba: 0f 85 b2 fc ff ff jne 124f72 <msdos_format+0x326> <== NOT EXECUTED
ret_val = msdos_format_fill_sectors
1252c0: 56 push %esi <== NOT EXECUTED
1252c1: 6a 00 push $0x0 <== NOT EXECUTED
1252c3: ff b5 44 ff ff ff pushl -0xbc(%ebp) <== NOT EXECUTED
1252c9: ff b5 68 ff ff ff pushl -0x98(%ebp) <== NOT EXECUTED
1252cf: 8b 8d 64 ff ff ff mov -0x9c(%ebp),%ecx <== NOT EXECUTED
1252d5: 8b 95 30 fd ff ff mov -0x2d0(%ebp),%edx <== NOT EXECUTED
1252db: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1252dd: e8 26 f8 ff ff call 124b08 <msdos_format_fill_sectors><== NOT EXECUTED
1252e2: 89 c6 mov %eax,%esi <== NOT EXECUTED
0x00);
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
1252e4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1252e7: 85 c0 test %eax,%eax <== NOT EXECUTED
1252e9: 0f 85 91 fc ff ff jne 124f80 <msdos_format+0x334> <== NOT EXECUTED
1252ef: 80 7d 8c 00 cmpb $0x0,-0x74(%ebp) <== NOT EXECUTED
1252f3: 0f 84 87 fc ff ff je 124f80 <msdos_format+0x334> <== NOT EXECUTED
memset(tmp_sec,0,sizeof(tmp_sec));
1252f9: b9 00 02 00 00 mov $0x200,%ecx <== NOT EXECUTED
1252fe: 8b bd d0 fc ff ff mov -0x330(%ebp),%edi <== NOT EXECUTED
125304: 31 c0 xor %eax,%eax <== NOT EXECUTED
125306: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
125308: b1 0b mov $0xb,%cl <== NOT EXECUTED
12530a: 8b bd d0 fc ff ff mov -0x330(%ebp),%edi <== NOT EXECUTED
125310: 8b b5 d4 fc ff ff mov -0x32c(%ebp),%esi <== NOT EXECUTED
125316: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
125318: 8d 9d 4f fd ff ff lea -0x2b1(%ebp),%ebx <== NOT EXECUTED
12531e: c6 85 4f fd ff ff 08 movb $0x8,-0x2b1(%ebp) <== NOT EXECUTED
ret_val = msdos_format_write_sec
125325: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
125328: 8d 95 44 fd ff ff lea -0x2bc(%ebp),%edx <== NOT EXECUTED
12532e: 52 push %edx <== NOT EXECUTED
12532f: 8b 8d 44 ff ff ff mov -0xbc(%ebp),%ecx <== NOT EXECUTED
125335: 8b 95 64 ff ff ff mov -0x9c(%ebp),%edx <== NOT EXECUTED
12533b: 8b 85 30 fd ff ff mov -0x2d0(%ebp),%eax <== NOT EXECUTED
125341: e8 72 f7 ff ff call 124ab8 <msdos_format_write_sec><== NOT EXECUTED
125346: 89 c6 mov %eax,%esi <== NOT EXECUTED
/*
* write FAT entry 0 as (0xffffff00|Media_type)EOC,
* write FAT entry 1 as EOC
* allocate directory in a FAT32 FS
*/
if ((ret_val == 0) && fmt_params.VolLabel_present){
125348: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12534b: 85 c0 test %eax,%eax <== NOT EXECUTED
12534d: 0f 85 2d fc ff ff jne 124f80 <msdos_format+0x334> <== NOT EXECUTED
125353: 80 7d 8c 00 cmpb $0x0,-0x74(%ebp) <== NOT EXECUTED
125357: 0f 84 23 fc ff ff je 124f80 <msdos_format+0x334> <== NOT EXECUTED
/*
* empty sector: all clusters are free/do not link further on
*/
memset(tmp_sec,0,sizeof(tmp_sec));
12535d: b9 00 02 00 00 mov $0x200,%ecx <== NOT EXECUTED
125362: 8b bd d0 fc ff ff mov -0x330(%ebp),%edi <== NOT EXECUTED
125368: 31 c0 xor %eax,%eax <== NOT EXECUTED
12536a: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
switch(fmt_params.fattype) {
12536c: 8a 85 76 ff ff ff mov -0x8a(%ebp),%al <== NOT EXECUTED
125372: 3c 02 cmp $0x2,%al <== NOT EXECUTED
125374: 0f 84 da 04 00 00 je 125854 <msdos_format+0xc08> <== NOT EXECUTED
12537a: 3c 04 cmp $0x4,%al <== NOT EXECUTED
12537c: 0f 84 1a 05 00 00 je 12589c <msdos_format+0xc50> <== NOT EXECUTED
125382: fe c8 dec %al <== NOT EXECUTED
125384: 0f 84 f2 04 00 00 je 12587c <msdos_format+0xc30> <== NOT EXECUTED
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
errno = EINVAL;
12538a: e8 f1 27 02 00 call 147b80 <__errno> <== NOT EXECUTED
12538f: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
}
if (fmt_params.fattype == FAT_FAT32) {
125395: 80 bd 76 ff ff ff 04 cmpb $0x4,-0x8a(%ebp) <== NOT EXECUTED
12539c: 0f 84 84 07 00 00 je 125b26 <msdos_format+0xeda> <== NOT EXECUTED
1253a2: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
1253a7: 80 bd 74 ff ff ff 00 cmpb $0x0,-0x8c(%ebp) <== NOT EXECUTED
1253ae: 0f 84 cc fb ff ff je 124f80 <msdos_format+0x334> <== NOT EXECUTED
1253b4: 85 f6 test %esi,%esi <== NOT EXECUTED
1253b6: 0f 85 c4 fb ff ff jne 124f80 <msdos_format+0x334> <== NOT EXECUTED
1253bc: 8b 95 54 ff ff ff mov -0xac(%ebp),%edx <== NOT EXECUTED
1253c2: 31 ff xor %edi,%edi <== NOT EXECUTED
1253c4: 8b 9d 30 fd ff ff mov -0x2d0(%ebp),%ebx <== NOT EXECUTED
1253ca: eb 0a jmp 1253d6 <msdos_format+0x78a> <== NOT EXECUTED
1253cc: 85 c0 test %eax,%eax <== NOT EXECUTED
1253ce: 75 35 jne 125405 <msdos_format+0x7b9> <== NOT EXECUTED
1253d0: 8b 95 54 ff ff ff mov -0xac(%ebp),%edx <== NOT EXECUTED
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
1253d6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1253d9: 0f af d7 imul %edi,%edx <== NOT EXECUTED
1253dc: 03 95 4c ff ff ff add -0xb4(%ebp),%edx <== NOT EXECUTED
1253e2: 8d 8d 44 fd ff ff lea -0x2bc(%ebp),%ecx <== NOT EXECUTED
1253e8: 51 push %ecx <== NOT EXECUTED
1253e9: 8b 8d 44 ff ff ff mov -0xbc(%ebp),%ecx <== NOT EXECUTED
1253ef: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1253f1: e8 c2 f6 ff ff call 124ab8 <msdos_format_write_sec><== NOT EXECUTED
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
1253f6: 47 inc %edi <== NOT EXECUTED
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
1253f7: 0f b6 95 74 ff ff ff movzbl -0x8c(%ebp),%edx <== NOT EXECUTED
1253fe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125401: 39 fa cmp %edi,%edx <== NOT EXECUTED
125403: 7f c7 jg 1253cc <msdos_format+0x780> <== NOT EXECUTED
125405: 89 c6 mov %eax,%esi <== NOT EXECUTED
125407: e9 74 fb ff ff jmp 124f80 <msdos_format+0x334> <== NOT EXECUTED
}
else {
/*
* for FAT32: root directory is in cluster 2
*/
fmt_params->root_dir_start_sec =
12540c: 0f b6 85 74 ff ff ff movzbl -0x8c(%ebp),%eax <== NOT EXECUTED
125413: 0f af 85 54 ff ff ff imul -0xac(%ebp),%eax <== NOT EXECUTED
12541a: 03 85 4c ff ff ff add -0xb4(%ebp),%eax <== NOT EXECUTED
125420: 89 85 64 ff ff ff mov %eax,-0x9c(%ebp) <== NOT EXECUTED
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
125426: 8b 85 50 ff ff ff mov -0xb0(%ebp),%eax <== NOT EXECUTED
12542c: 89 85 68 ff ff ff mov %eax,-0x98(%ebp) <== NOT EXECUTED
125432: e9 97 fa ff ff jmp 124ece <msdos_format+0x282> <== NOT EXECUTED
125437: 90 nop <== NOT EXECUTED
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
125438: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
12543d: e9 30 fb ff ff jmp 124f72 <msdos_format+0x326> <== NOT EXECUTED
125442: 66 90 xchg %ax,%ax <== NOT EXECUTED
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
(rqdata != NULL) &&
!(rqdata->quick_format)) {
ret_val = msdos_format_fill_sectors
125444: 52 push %edx <== NOT EXECUTED
125445: 6a e5 push $0xffffffe5 <== NOT EXECUTED
125447: ff b5 44 ff ff ff pushl -0xbc(%ebp) <== NOT EXECUTED
12544d: ff b5 48 ff ff ff pushl -0xb8(%ebp) <== NOT EXECUTED
125453: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
125455: 8b 95 30 fd ff ff mov -0x2d0(%ebp),%edx <== NOT EXECUTED
12545b: 89 d8 mov %ebx,%eax <== NOT EXECUTED
12545d: e8 a6 f6 ff ff call 124b08 <msdos_format_fill_sectors><== NOT EXECUTED
125462: 89 c6 mov %eax,%esi <== NOT EXECUTED
0xe5);
}
/*
* create master boot record
*/
if (ret_val == 0) {
125464: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125467: 85 c0 test %eax,%eax <== NOT EXECUTED
125469: 0f 85 03 fb ff ff jne 124f72 <msdos_format+0x326> <== NOT EXECUTED
12546f: e9 7b fb ff ff jmp 124fef <msdos_format+0x3a3> <== NOT EXECUTED
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
125474: c6 85 74 ff ff ff 02 movb $0x2,-0x8c(%ebp) <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
12547b: 6a 02 push $0x2 <== NOT EXECUTED
12547d: 68 ab 46 16 00 push $0x1646ab <== NOT EXECUTED
125482: 6a 02 push $0x2 <== NOT EXECUTED
125484: 6a 00 push $0x0 <== NOT EXECUTED
125486: e8 e9 f5 ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
/*
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
12548b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12548e: e9 2a f9 ff ff jmp 124dbd <msdos_format+0x171> <== NOT EXECUTED
125493: 90 nop <== NOT EXECUTED
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
125494: 89 c6 mov %eax,%esi <== NOT EXECUTED
125496: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
125499: 88 85 e8 fc ff ff mov %al,-0x318(%ebp) <== NOT EXECUTED
12549f: c6 85 18 fd ff ff 00 movb $0x0,-0x2e8(%ebp) <== NOT EXECUTED
1254a6: c6 85 08 fd ff ff 00 movb $0x0,-0x2f8(%ebp) <== NOT EXECUTED
1254ad: c6 85 f8 fc ff ff 00 movb $0x0,-0x308(%ebp) <== NOT EXECUTED
1254b4: c6 85 34 fd ff ff 00 movb $0x0,-0x2cc(%ebp) <== NOT EXECUTED
1254bb: e9 d4 fb ff ff jmp 125094 <msdos_format+0x448> <== NOT EXECUTED
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
(rqdata->fattype != MSDOS_FMT_FATANY)) {
ret_val = -1;
errno = EINVAL;
1254c0: e8 bb 26 02 00 call 147b80 <__errno> <== NOT EXECUTED
1254c5: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
1254cb: c7 85 f8 fc ff ff ff movl $0xffffffff,-0x308(%ebp) <== NOT EXECUTED
1254d2: ff ff ff
1254d5: e9 17 f9 ff ff jmp 124df1 <msdos_format+0x1a5> <== NOT EXECUTED
1254da: 66 90 xchg %ax,%ax <== NOT EXECUTED
* check sectors per cluster.
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
1254dc: 89 8d 50 ff ff ff mov %ecx,-0xb0(%ebp) <== NOT EXECUTED
}
}
}
}
if (ret_val == 0) {
1254e2: 8b 85 f8 fc ff ff mov -0x308(%ebp),%eax <== NOT EXECUTED
1254e8: 85 c0 test %eax,%eax <== NOT EXECUTED
1254ea: 0f 85 aa f9 ff ff jne 124e9a <msdos_format+0x24e> <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1254f0: ff b5 50 ff ff ff pushl -0xb0(%ebp) <== NOT EXECUTED
1254f6: 68 bf 46 16 00 push $0x1646bf <== NOT EXECUTED
1254fb: 6a 02 push $0x2 <== NOT EXECUTED
1254fd: 53 push %ebx <== NOT EXECUTED
1254fe: e8 71 f5 ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
125503: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125506: 80 bd 76 ff ff ff 04 cmpb $0x4,-0x8a(%ebp) <== NOT EXECUTED
12550d: 0f 84 69 04 00 00 je 12597c <msdos_format+0xd30> <== NOT EXECUTED
fmt_params->fsinfo_sec = 1;
}
else {
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
125513: c7 85 4c ff ff ff 01 movl $0x1,-0xb4(%ebp) <== NOT EXECUTED
12551a: 00 00 00
/* recommended: for FAT16, set files per root directory to 512 */
/* for FAT12/FAT16, set files per root directory */
/* must fill up an even count of sectors */
if ((rqdata != NULL) &&
12551d: 85 db test %ebx,%ebx <== NOT EXECUTED
12551f: 0f 84 db 03 00 00 je 125900 <msdos_format+0xcb4> <== NOT EXECUTED
(rqdata->files_per_root_dir > 0)) {
125525: 8b 4b 10 mov 0x10(%ebx),%ecx <== NOT EXECUTED
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
/* recommended: for FAT16, set files per root directory to 512 */
/* for FAT12/FAT16, set files per root directory */
/* must fill up an even count of sectors */
if ((rqdata != NULL) &&
125528: 85 c9 test %ecx,%ecx <== NOT EXECUTED
12552a: 0f 84 d0 03 00 00 je 125900 <msdos_format+0xcb4> <== NOT EXECUTED
(rqdata->files_per_root_dir > 0)) {
fmt_params->files_per_root_dir = rqdata->files_per_root_dir;
125530: 49 dec %ecx <== NOT EXECUTED
}
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
125531: 8b 85 44 ff ff ff mov -0xbc(%ebp),%eax <== NOT EXECUTED
125537: 89 85 34 fd ff ff mov %eax,-0x2cc(%ebp) <== NOT EXECUTED
12553d: 89 c7 mov %eax,%edi <== NOT EXECUTED
12553f: d1 e7 shl %edi <== NOT EXECUTED
125541: c1 ef 05 shr $0x5,%edi <== NOT EXECUTED
125544: 01 f9 add %edi,%ecx <== NOT EXECUTED
(2*fmt_params->bytes_per_sector/
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
125546: 89 c8 mov %ecx,%eax <== NOT EXECUTED
125548: 31 d2 xor %edx,%edx <== NOT EXECUTED
12554a: f7 f7 div %edi <== NOT EXECUTED
12554c: 29 d1 sub %edx,%ecx <== NOT EXECUTED
12554e: 89 8d 5c ff ff ff mov %ecx,-0xa4(%ebp) <== NOT EXECUTED
125554: 89 c8 mov %ecx,%eax <== NOT EXECUTED
125556: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
125559: 8b 8d 34 fd ff ff mov -0x2cc(%ebp),%ecx <== NOT EXECUTED
12555f: 49 dec %ecx <== NOT EXECUTED
125560: 89 8d e8 fc ff ff mov %ecx,-0x318(%ebp) <== NOT EXECUTED
125566: 01 c8 add %ecx,%eax <== NOT EXECUTED
125568: 31 d2 xor %edx,%edx <== NOT EXECUTED
12556a: f7 b5 34 fd ff ff divl -0x2cc(%ebp) <== NOT EXECUTED
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
125570: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp) <== NOT EXECUTED
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
125576: 8b bd 48 ff ff ff mov -0xb8(%ebp),%edi <== NOT EXECUTED
12557c: 2b bd 4c ff ff ff sub -0xb4(%ebp),%edi <== NOT EXECUTED
125582: 29 c7 sub %eax,%edi <== NOT EXECUTED
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster
125584: 8b 8d 50 ff ff ff mov -0xb0(%ebp),%ecx <== NOT EXECUTED
(fmt_params->fattype,
fmt_params->bytes_per_sector,
fatdata_sect_cnt,
fmt_params->fat_num,
12558a: 0f b6 b5 74 ff ff ff movzbl -0x8c(%ebp),%esi <== NOT EXECUTED
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster
125591: 0f b6 85 76 ff ff ff movzbl -0x8a(%ebp),%eax <== NOT EXECUTED
125598: 89 85 18 fd ff ff mov %eax,-0x2e8(%ebp) <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
12559e: b8 00 80 00 00 mov $0x8000,%eax <== NOT EXECUTED
1255a3: 31 d2 xor %edx,%edx <== NOT EXECUTED
1255a5: f7 b5 34 fd ff ff divl -0x2cc(%ebp) <== NOT EXECUTED
1255ab: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
1255ad: 76 07 jbe 1255b6 <msdos_format+0x96a> <== NOT EXECUTED
1255af: 90 nop <== NOT EXECUTED
sectors_per_cluster /= 2;
1255b0: d1 e9 shr %ecx <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
1255b2: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
1255b4: 77 fa ja 1255b0 <msdos_format+0x964> <== NOT EXECUTED
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
1255b6: 89 f2 mov %esi,%edx <== NOT EXECUTED
1255b8: 0f b6 f2 movzbl %dl,%esi <== NOT EXECUTED
1255bb: 89 b5 e4 fc ff ff mov %esi,-0x31c(%ebp) <== NOT EXECUTED
1255c1: 89 de mov %ebx,%esi <== NOT EXECUTED
* compute number of data clusters for current data:
* - compute cluster count for data AND fat
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
1255c3: 89 f8 mov %edi,%eax <== NOT EXECUTED
1255c5: 31 d2 xor %edx,%edx <== NOT EXECUTED
1255c7: f7 f1 div %ecx <== NOT EXECUTED
1255c9: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (fattype == FAT_FAT12) {
1255cb: 83 bd 18 fd ff ff 01 cmpl $0x1,-0x2e8(%ebp) <== NOT EXECUTED
1255d2: 0f 84 cc 00 00 00 je 1256a4 <msdos_format+0xa58> <== NOT EXECUTED
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
1255d8: 83 bd 18 fd ff ff 02 cmpl $0x2,-0x2e8(%ebp) <== NOT EXECUTED
1255df: 0f 84 fb 00 00 00 je 1256e0 <msdos_format+0xa94> <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
1255e5: 8b 95 e8 fc ff ff mov -0x318(%ebp),%edx <== NOT EXECUTED
1255eb: 8d 04 82 lea (%edx,%eax,4),%eax <== NOT EXECUTED
1255ee: 31 d2 xor %edx,%edx <== NOT EXECUTED
1255f0: f7 b5 34 fd ff ff divl -0x2cc(%ebp) <== NOT EXECUTED
1255f6: 89 85 08 fd ff ff mov %eax,-0x2f8(%ebp) <== NOT EXECUTED
1255fc: b2 01 mov $0x1,%dl <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
1255fe: 8b 85 34 fd ff ff mov -0x2cc(%ebp),%eax <== NOT EXECUTED
125604: 0f af c1 imul %ecx,%eax <== NOT EXECUTED
125607: 3d 00 80 00 00 cmp $0x8000,%eax <== NOT EXECUTED
12560c: 76 26 jbe 125634 <msdos_format+0x9e8> <== NOT EXECUTED
12560e: 89 f3 mov %esi,%ebx <== NOT EXECUTED
finished = true;
}
} while (!finished);
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
125610: e8 6b 25 02 00 call 147b80 <__errno> <== NOT EXECUTED
125615: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
12561b: c7 85 50 ff ff ff 00 movl $0x0,-0xb0(%ebp) <== NOT EXECUTED
125622: 00 00 00
125625: c7 85 f8 fc ff ff ff movl $0xffffffff,-0x308(%ebp) <== NOT EXECUTED
12562c: ff ff ff
12562f: e9 66 f8 ff ff jmp 124e9a <msdos_format+0x24e> <== NOT EXECUTED
if ((sectors_per_cluster * bytes_per_sector)
> MS_BYTES_PER_CLUSTER_LIMIT) {
ret_val = EINVAL;
finished = true;
}
} while (!finished);
125634: 84 d2 test %dl,%dl <== NOT EXECUTED
125636: 74 8b je 1255c3 <msdos_format+0x977> <== NOT EXECUTED
125638: 89 f3 mov %esi,%ebx <== NOT EXECUTED
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
}
else {
*sectors_per_cluster_adj = sectors_per_cluster;
*sectors_per_fat_ptr = sectors_per_fat;
12563a: 8b 85 08 fd ff ff mov -0x2f8(%ebp),%eax <== NOT EXECUTED
125640: 89 85 54 ff ff ff mov %eax,-0xac(%ebp) <== NOT EXECUTED
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
125646: 89 8d 50 ff ff ff mov %ecx,-0xb0(%ebp) <== NOT EXECUTED
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
12564c: 85 f6 test %esi,%esi <== NOT EXECUTED
12564e: 0f 84 94 01 00 00 je 1257e8 <msdos_format+0xb9c> <== NOT EXECUTED
125654: 80 7e 15 00 cmpb $0x0,0x15(%esi) <== NOT EXECUTED
125658: 0f 84 8a 01 00 00 je 1257e8 <msdos_format+0xb9c> <== NOT EXECUTED
(rqdata->media != 0)) {
const char valid_media_codes[] =
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
12565e: 8d 7d dc lea -0x24(%ebp),%edi <== NOT EXECUTED
125661: be 84 47 16 00 mov $0x164784,%esi <== NOT EXECUTED
125666: b9 09 00 00 00 mov $0x9,%ecx <== NOT EXECUTED
12566b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
if (NULL==memchr(valid_media_codes,
rqdata->media,
12566d: 8a 53 15 mov 0x15(%ebx),%dl <== NOT EXECUTED
if (ret_val == 0) {
if ((rqdata != NULL) &&
(rqdata->media != 0)) {
const char valid_media_codes[] =
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
125670: 57 push %edi <== NOT EXECUTED
125671: 6a 09 push $0x9 <== NOT EXECUTED
125673: 0f b6 c2 movzbl %dl,%eax <== NOT EXECUTED
125676: 50 push %eax <== NOT EXECUTED
125677: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
12567a: 50 push %eax <== NOT EXECUTED
12567b: 88 95 e0 fc ff ff mov %dl,-0x320(%ebp) <== NOT EXECUTED
125681: e8 5a 54 02 00 call 14aae0 <memchr> <== NOT EXECUTED
125686: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125689: 85 c0 test %eax,%eax <== NOT EXECUTED
12568b: 8a 95 e0 fc ff ff mov -0x320(%ebp),%dl <== NOT EXECUTED
125691: 0f 84 99 04 00 00 je 125b30 <msdos_format+0xee4> <== NOT EXECUTED
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
}
else {
fmt_params->media_code = rqdata->media;
125697: 88 95 75 ff ff ff mov %dl,-0x8b(%ebp) <== NOT EXECUTED
12569d: e9 f8 f7 ff ff jmp 124e9a <msdos_format+0x24e> <== NOT EXECUTED
1256a2: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
1256a4: 8d 04 40 lea (%eax,%eax,2),%eax <== NOT EXECUTED
1256a7: d1 e8 shr %eax <== NOT EXECUTED
1256a9: 03 85 e8 fc ff ff add -0x318(%ebp),%eax <== NOT EXECUTED
1256af: 31 d2 xor %edx,%edx <== NOT EXECUTED
1256b1: f7 b5 34 fd ff ff divl -0x2cc(%ebp) <== NOT EXECUTED
1256b7: 89 85 08 fd ff ff mov %eax,-0x2f8(%ebp) <== NOT EXECUTED
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
1256bd: 0f af 85 e4 fc ff ff imul -0x31c(%ebp),%eax <== NOT EXECUTED
1256c4: 8d 44 01 ff lea -0x1(%ecx,%eax,1),%eax <== NOT EXECUTED
1256c8: 31 d2 xor %edx,%edx <== NOT EXECUTED
1256ca: f7 f1 div %ecx <== NOT EXECUTED
1256cc: 29 c3 sub %eax,%ebx <== NOT EXECUTED
1256ce: 81 fb f5 0f 00 00 cmp $0xff5,%ebx <== NOT EXECUTED
1256d4: 76 40 jbe 125716 <msdos_format+0xaca> <== NOT EXECUTED
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
1256d6: d1 e1 shl %ecx <== NOT EXECUTED
1256d8: 31 d2 xor %edx,%edx <== NOT EXECUTED
1256da: e9 1f ff ff ff jmp 1255fe <msdos_format+0x9b2> <== NOT EXECUTED
1256df: 90 nop <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
1256e0: 8b 95 e8 fc ff ff mov -0x318(%ebp),%edx <== NOT EXECUTED
1256e6: 8d 04 42 lea (%edx,%eax,2),%eax <== NOT EXECUTED
1256e9: 31 d2 xor %edx,%edx <== NOT EXECUTED
1256eb: f7 b5 34 fd ff ff divl -0x2cc(%ebp) <== NOT EXECUTED
1256f1: 89 85 08 fd ff ff mov %eax,-0x2f8(%ebp) <== NOT EXECUTED
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
1256f7: 8b 85 e4 fc ff ff mov -0x31c(%ebp),%eax <== NOT EXECUTED
1256fd: 0f af 85 08 fd ff ff imul -0x2f8(%ebp),%eax <== NOT EXECUTED
125704: 8d 44 01 ff lea -0x1(%ecx,%eax,1),%eax <== NOT EXECUTED
125708: 31 d2 xor %edx,%edx <== NOT EXECUTED
12570a: f7 f1 div %ecx <== NOT EXECUTED
12570c: 29 c3 sub %eax,%ebx <== NOT EXECUTED
12570e: 81 fb f5 ff 00 00 cmp $0xfff5,%ebx <== NOT EXECUTED
125714: 77 c0 ja 1256d6 <msdos_format+0xa8a> <== NOT EXECUTED
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
125716: b2 01 mov $0x1,%dl <== NOT EXECUTED
125718: e9 e1 fe ff ff jmp 1255fe <msdos_format+0x9b2> <== NOT EXECUTED
12571d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
125720: b9 00 02 00 00 mov $0x200,%ecx <== NOT EXECUTED
125725: b0 00 mov $0x0,%al <== NOT EXECUTED
125727: 8b bd d0 fc ff ff mov -0x330(%ebp),%edi <== NOT EXECUTED
12572d: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
12572f: c6 85 44 fd ff ff 52 movb $0x52,-0x2bc(%ebp) <== NOT EXECUTED
125736: c6 85 45 fd ff ff 52 movb $0x52,-0x2bb(%ebp) <== NOT EXECUTED
12573d: c6 85 46 fd ff ff 61 movb $0x61,-0x2ba(%ebp) <== NOT EXECUTED
125744: c6 85 47 fd ff ff 41 movb $0x41,-0x2b9(%ebp) <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
12574b: c6 85 28 ff ff ff 72 movb $0x72,-0xd8(%ebp) <== NOT EXECUTED
125752: c6 85 29 ff ff ff 72 movb $0x72,-0xd7(%ebp) <== NOT EXECUTED
125759: c6 85 2a ff ff ff 41 movb $0x41,-0xd6(%ebp) <== NOT EXECUTED
125760: c6 85 2b ff ff ff 61 movb $0x61,-0xd5(%ebp) <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
125767: c6 85 42 ff ff ff 55 movb $0x55,-0xbe(%ebp) <== NOT EXECUTED
12576e: c6 85 43 ff ff ff aa movb $0xaa,-0xbd(%ebp) <== NOT EXECUTED
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
125775: c6 85 2c ff ff ff ff movb $0xff,-0xd4(%ebp) <== NOT EXECUTED
12577c: c6 85 2d ff ff ff ff movb $0xff,-0xd3(%ebp) <== NOT EXECUTED
125783: c6 85 2e ff ff ff ff movb $0xff,-0xd2(%ebp) <== NOT EXECUTED
12578a: c6 85 2f ff ff ff ff movb $0xff,-0xd1(%ebp) <== NOT EXECUTED
0xffffffff);
FAT_SET_FSINFO_NEXT_FREE_CLUSTER (fsinfo+FAT_FSI_INFO,
125791: c6 85 30 ff ff ff ff movb $0xff,-0xd0(%ebp) <== NOT EXECUTED
125798: c6 85 31 ff ff ff ff movb $0xff,-0xcf(%ebp) <== NOT EXECUTED
12579f: c6 85 32 ff ff ff ff movb $0xff,-0xce(%ebp) <== NOT EXECUTED
1257a6: c6 85 33 ff ff ff ff movb $0xff,-0xcd(%ebp) <== NOT EXECUTED
}
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
1257ad: 8b 95 70 ff ff ff mov -0x90(%ebp),%edx <== NOT EXECUTED
ret_val = msdos_format_gen_fsinfo(tmp_sec);
}
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
1257b3: 0f 84 cf fa ff ff je 125288 <msdos_format+0x63c> <== NOT EXECUTED
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
1257b9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1257bc: 8d 85 44 fd ff ff lea -0x2bc(%ebp),%eax <== NOT EXECUTED
1257c2: 50 push %eax <== NOT EXECUTED
1257c3: 8b 8d 44 ff ff ff mov -0xbc(%ebp),%ecx <== NOT EXECUTED
1257c9: 8b 85 30 fd ff ff mov -0x2d0(%ebp),%eax <== NOT EXECUTED
1257cf: e8 e4 f2 ff ff call 124ab8 <msdos_format_write_sec><== NOT EXECUTED
1257d4: 89 c6 mov %eax,%esi <== NOT EXECUTED
}
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
1257d6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1257d9: 85 c0 test %eax,%eax <== NOT EXECUTED
1257db: 0f 85 91 f7 ff ff jne 124f72 <msdos_format+0x326> <== NOT EXECUTED
1257e1: e9 a2 fa ff ff jmp 125288 <msdos_format+0x63c> <== NOT EXECUTED
1257e6: 66 90 xchg %ax,%ax <== NOT EXECUTED
else {
fmt_params->media_code = rqdata->media;
}
}
else {
fmt_params->media_code = FAT_BR_MEDIA_FIXED;
1257e8: c6 85 75 ff ff ff f8 movb $0xf8,-0x8b(%ebp) <== NOT EXECUTED
1257ef: e9 a6 f6 ff ff jmp 124e9a <msdos_format+0x24e> <== NOT EXECUTED
1257f4: 89 c2 mov %eax,%edx <== NOT EXECUTED
1257f6: e9 09 f6 ff ff jmp 124e04 <msdos_format+0x1b8> <== NOT EXECUTED
1257fb: 90 nop <== NOT EXECUTED
if ((ret_val == 0) &&
(fmt_params.mbr_copy_sec != 0)) {
/*
* write copy of MBR
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1257fc: 52 push %edx <== NOT EXECUTED
1257fd: 68 0d 47 16 00 push $0x16470d <== NOT EXECUTED
125802: 6a 02 push $0x2 <== NOT EXECUTED
125804: 53 push %ebx <== NOT EXECUTED
125805: e8 6a f2 ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
"write back up MRB sector\n");
ret_val = msdos_format_write_sec(fd,
12580a: 8d 8d 44 fd ff ff lea -0x2bc(%ebp),%ecx <== NOT EXECUTED
125810: 89 0c 24 mov %ecx,(%esp) <== NOT EXECUTED
125813: 8b 8d 44 ff ff ff mov -0xbc(%ebp),%ecx <== NOT EXECUTED
125819: 8b 95 6c ff ff ff mov -0x94(%ebp),%edx <== NOT EXECUTED
12581f: 8b 85 30 fd ff ff mov -0x2d0(%ebp),%eax <== NOT EXECUTED
125825: e8 8e f2 ff ff call 124ab8 <msdos_format_write_sec><== NOT EXECUTED
12582a: 89 c6 mov %eax,%esi <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
12582c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12582f: 85 c0 test %eax,%eax <== NOT EXECUTED
125831: 0f 84 43 fa ff ff je 12527a <msdos_format+0x62e> <== NOT EXECUTED
125837: e9 36 f7 ff ff jmp 124f72 <msdos_format+0x326> <== NOT EXECUTED
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
12583c: b9 12 2d 16 00 mov $0x162d12,%ecx <== NOT EXECUTED
125841: e9 a8 f6 ff ff jmp 124eee <msdos_format+0x2a2> <== NOT EXECUTED
125846: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
125848: b9 95 11 16 00 mov $0x161195,%ecx <== NOT EXECUTED
12584d: e9 f9 f6 ff ff jmp 124f4b <msdos_format+0x2ff> <== NOT EXECUTED
125852: 66 90 xchg %ax,%ax <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
break;
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL16(tmp_sec,0,0xff00|fmt_params.media_code);
125854: 8a 85 75 ff ff ff mov -0x8b(%ebp),%al <== NOT EXECUTED
12585a: 88 85 44 fd ff ff mov %al,-0x2bc(%ebp) <== NOT EXECUTED
125860: c6 85 45 fd ff ff ff movb $0xff,-0x2bb(%ebp) <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
125867: c6 85 46 fd ff ff f8 movb $0xf8,-0x2ba(%ebp) <== NOT EXECUTED
12586e: c6 85 47 fd ff ff ff movb $0xff,-0x2b9(%ebp) <== NOT EXECUTED
break;
125875: e9 2d fb ff ff jmp 1253a7 <msdos_format+0x75b> <== NOT EXECUTED
12587a: 66 90 xchg %ax,%ax <== NOT EXECUTED
memset(tmp_sec,0,sizeof(tmp_sec));
switch(fmt_params.fattype) {
case FAT_FAT12:
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
12587c: 8a 85 75 ff ff ff mov -0x8b(%ebp),%al <== NOT EXECUTED
125882: 88 85 44 fd ff ff mov %al,-0x2bc(%ebp) <== NOT EXECUTED
/* MSBits of FAT entry 0:0xf, LSBits of FAT entry 1: LSB of EOC */
FAT_SET_VAL8(tmp_sec,1,(0x0f | (FAT_FAT12_EOC << 4)));
125888: c6 85 45 fd ff ff 8f movb $0x8f,-0x2bb(%ebp) <== NOT EXECUTED
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
12588f: c6 85 46 fd ff ff ff movb $0xff,-0x2ba(%ebp) <== NOT EXECUTED
break;
125896: e9 0c fb ff ff jmp 1253a7 <msdos_format+0x75b> <== NOT EXECUTED
12589b: 90 nop <== NOT EXECUTED
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
break;
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
12589c: 0f b6 85 75 ff ff ff movzbl -0x8b(%ebp),%eax <== NOT EXECUTED
1258a3: 0d 00 ff ff ff or $0xffffff00,%eax <== NOT EXECUTED
1258a8: 88 85 44 fd ff ff mov %al,-0x2bc(%ebp) <== NOT EXECUTED
1258ae: c1 e8 18 shr $0x18,%eax <== NOT EXECUTED
1258b1: 88 85 45 fd ff ff mov %al,-0x2bb(%ebp) <== NOT EXECUTED
1258b7: c6 85 46 fd ff ff ff movb $0xff,-0x2ba(%ebp) <== NOT EXECUTED
1258be: c6 85 47 fd ff ff ff movb $0xff,-0x2b9(%ebp) <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
1258c5: c6 85 48 fd ff ff f8 movb $0xf8,-0x2b8(%ebp) <== NOT EXECUTED
1258cc: c6 85 49 fd ff ff ff movb $0xff,-0x2b7(%ebp) <== NOT EXECUTED
1258d3: c6 85 4a fd ff ff ff movb $0xff,-0x2b6(%ebp) <== NOT EXECUTED
1258da: c6 85 4b fd ff ff 0f movb $0xf,-0x2b5(%ebp) <== NOT EXECUTED
/*
* only first valid cluster (cluster number 2) belongs
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
1258e1: c6 85 4c fd ff ff f8 movb $0xf8,-0x2b4(%ebp) <== NOT EXECUTED
1258e8: c6 85 4d fd ff ff ff movb $0xff,-0x2b3(%ebp) <== NOT EXECUTED
1258ef: c6 85 4e fd ff ff ff movb $0xff,-0x2b2(%ebp) <== NOT EXECUTED
1258f6: c6 03 0f movb $0xf,(%ebx) <== NOT EXECUTED
1258f9: e9 a9 fa ff ff jmp 1253a7 <msdos_format+0x75b> <== NOT EXECUTED
1258fe: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ((rqdata != NULL) &&
(rqdata->files_per_root_dir > 0)) {
fmt_params->files_per_root_dir = rqdata->files_per_root_dir;
}
else {
if (fmt_params->fattype == FAT_FAT16) {
125900: 80 bd 76 ff ff ff 02 cmpb $0x2,-0x8a(%ebp) <== NOT EXECUTED
125907: 0f 84 08 02 00 00 je 125b15 <msdos_format+0xec9> <== NOT EXECUTED
fmt_params->files_per_root_dir = 512;
}
else {
fmt_params->files_per_root_dir = 64;
12590d: b9 3f 00 00 00 mov $0x3f,%ecx <== NOT EXECUTED
125912: e9 1a fc ff ff jmp 125531 <msdos_format+0x8e5> <== NOT EXECUTED
125917: 90 nop <== NOT EXECUTED
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT12)) {
fmt_params->fattype = FAT_FAT12;
125918: c6 85 76 ff ff ff 01 movb $0x1,-0x8a(%ebp) <== NOT EXECUTED
12591f: c7 85 f8 fc ff ff 00 movl $0x0,-0x308(%ebp) <== NOT EXECUTED
125926: 00 00 00
125929: e9 c3 f4 ff ff jmp 124df1 <msdos_format+0x1a5> <== NOT EXECUTED
12592e: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
else if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
125930: c6 85 76 ff ff ff 02 movb $0x2,-0x8a(%ebp) <== NOT EXECUTED
125937: c7 85 f8 fc ff ff 00 movl $0x0,-0x308(%ebp) <== NOT EXECUTED
12593e: 00 00 00
125941: e9 ab f4 ff ff jmp 124df1 <msdos_format+0x1a5> <== NOT EXECUTED
125946: 66 90 xchg %ax,%ax <== NOT EXECUTED
rc = rtems_clock_get_tod_timeval(&time_value);
if (rc == RTEMS_SUCCESSFUL) {
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
}
else {
*volid_ptr = rand();
125948: e8 fb 6b 02 00 call 14c548 <rand> <== NOT EXECUTED
12594d: 89 45 90 mov %eax,-0x70(%ebp) <== NOT EXECUTED
125950: e9 8c f6 ff ff jmp 124fe1 <msdos_format+0x395> <== NOT EXECUTED
125955: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt
125958: 3d 9f fe 1f 00 cmp $0x1ffe9f,%eax <== NOT EXECUTED
12595d: 0f 87 79 01 00 00 ja 125adc <msdos_format+0xe90> <== NOT EXECUTED
< ((uint32_t)FAT_FAT16_MAX_CLN)*32) {
fmt_params->fattype = FAT_FAT16;
125963: c6 85 76 ff ff ff 02 movb $0x2,-0x8a(%ebp) <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
12596a: c7 85 50 ff ff ff 02 movl $0x2,-0xb0(%ebp) <== NOT EXECUTED
125971: 00 00 00
125974: e9 66 f4 ff ff jmp 124ddf <msdos_format+0x193> <== NOT EXECUTED
125979: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
12597c: c7 85 4c ff ff ff 20 movl $0x20,-0xb4(%ebp) <== NOT EXECUTED
125983: 00 00 00
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
125986: c7 85 5c ff ff ff 00 movl $0x0,-0xa4(%ebp) <== NOT EXECUTED
12598d: 00 00 00
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
125990: c7 85 6c ff ff ff 06 movl $0x6,-0x94(%ebp) <== NOT EXECUTED
125997: 00 00 00
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
12599a: c7 85 70 ff ff ff 01 movl $0x1,-0x90(%ebp) <== NOT EXECUTED
1259a1: 00 00 00
1259a4: 31 c0 xor %eax,%eax <== NOT EXECUTED
1259a6: 8b 95 44 ff ff ff mov -0xbc(%ebp),%edx <== NOT EXECUTED
1259ac: 89 95 34 fd ff ff mov %edx,-0x2cc(%ebp) <== NOT EXECUTED
1259b2: e9 a2 fb ff ff jmp 125559 <msdos_format+0x90d> <== NOT EXECUTED
1259b7: 90 nop <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
1259b8: 8b 8d 54 ff ff ff mov -0xac(%ebp),%ecx <== NOT EXECUTED
1259be: 88 8d 68 fd ff ff mov %cl,-0x298(%ebp) <== NOT EXECUTED
1259c4: 0f b6 c5 movzbl %ch,%eax <== NOT EXECUTED
1259c7: 88 85 69 fd ff ff mov %al,-0x297(%ebp) <== NOT EXECUTED
1259cd: 89 c8 mov %ecx,%eax <== NOT EXECUTED
1259cf: c1 e8 10 shr $0x10,%eax <== NOT EXECUTED
1259d2: 88 85 6a fd ff ff mov %al,-0x296(%ebp) <== NOT EXECUTED
1259d8: c1 e9 18 shr $0x18,%ecx <== NOT EXECUTED
1259db: 88 8d 6b fd ff ff mov %cl,-0x295(%ebp) <== NOT EXECUTED
FAT_SET_BR_EXT_FLAGS(mbr , 0);
1259e1: c6 85 6c fd ff ff 00 movb $0x0,-0x294(%ebp) <== NOT EXECUTED
1259e8: c6 85 6d fd ff ff 00 movb $0x0,-0x293(%ebp) <== NOT EXECUTED
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
1259ef: c6 85 6e fd ff ff 00 movb $0x0,-0x292(%ebp) <== NOT EXECUTED
1259f6: c6 85 6f fd ff ff 00 movb $0x0,-0x291(%ebp) <== NOT EXECUTED
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
1259fd: c6 85 70 fd ff ff 02 movb $0x2,-0x290(%ebp) <== NOT EXECUTED
125a04: c6 85 71 fd ff ff 00 movb $0x0,-0x28f(%ebp) <== NOT EXECUTED
125a0b: c6 85 72 fd ff ff 00 movb $0x0,-0x28e(%ebp) <== NOT EXECUTED
125a12: c6 85 73 fd ff ff 00 movb $0x0,-0x28d(%ebp) <== NOT EXECUTED
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
125a19: c6 85 74 fd ff ff 01 movb $0x1,-0x28c(%ebp) <== NOT EXECUTED
125a20: c6 85 75 fd ff ff 00 movb $0x0,-0x28b(%ebp) <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
125a27: 8b 85 6c ff ff ff mov -0x94(%ebp),%eax <== NOT EXECUTED
125a2d: 88 85 76 fd ff ff mov %al,-0x28a(%ebp) <== NOT EXECUTED
125a33: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
125a36: 88 85 77 fd ff ff mov %al,-0x289(%ebp) <== NOT EXECUTED
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
125a3c: 8d b5 78 fd ff ff lea -0x288(%ebp),%esi <== NOT EXECUTED
125a42: b9 0c 00 00 00 mov $0xc,%ecx <== NOT EXECUTED
125a47: 89 f7 mov %esi,%edi <== NOT EXECUTED
125a49: 88 d0 mov %dl,%al <== NOT EXECUTED
125a4b: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
125a4d: c6 85 84 fd ff ff 00 movb $0x0,-0x27c(%ebp) <== NOT EXECUTED
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
125a54: c6 85 85 fd ff ff 00 movb $0x0,-0x27b(%ebp) <== NOT EXECUTED
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
125a5b: c6 85 86 fd ff ff 29 movb $0x29,-0x27a(%ebp) <== NOT EXECUTED
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
125a62: c6 85 87 fd ff ff 00 movb $0x0,-0x279(%ebp) <== NOT EXECUTED
125a69: c6 85 88 fd ff ff 00 movb $0x0,-0x278(%ebp) <== NOT EXECUTED
125a70: c6 85 89 fd ff ff 00 movb $0x0,-0x277(%ebp) <== NOT EXECUTED
125a77: c6 85 8a fd ff ff 00 movb $0x0,-0x276(%ebp) <== NOT EXECUTED
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
125a7e: 8d b5 8b fd ff ff lea -0x275(%ebp),%esi <== NOT EXECUTED
125a84: b1 0b mov $0xb,%cl <== NOT EXECUTED
125a86: 89 f7 mov %esi,%edi <== NOT EXECUTED
125a88: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
125a8a: c7 85 96 fd ff ff 46 movl $0x33544146,-0x26a(%ebp) <== NOT EXECUTED
125a91: 41 54 33
125a94: c7 85 9a fd ff ff 32 movl $0x20202032,-0x266(%ebp) <== NOT EXECUTED
125a9b: 20 20 20
125a9e: e9 6f f7 ff ff jmp 125212 <msdos_format+0x5c6> <== NOT EXECUTED
125aa3: 90 nop <== NOT EXECUTED
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
125aa4: 8b 95 50 ff ff ff mov -0xb0(%ebp),%edx <== NOT EXECUTED
125aaa: 89 d0 mov %edx,%eax <== NOT EXECUTED
125aac: c7 85 f8 fc ff ff 00 movl $0x0,-0x308(%ebp) <== NOT EXECUTED
125ab3: 00 00 00
125ab6: e9 49 f3 ff ff jmp 124e04 <msdos_format+0x1b8> <== NOT EXECUTED
125abb: 90 nop <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
}
else if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
125abc: c6 85 76 ff ff ff 04 movb $0x4,-0x8a(%ebp) <== NOT EXECUTED
125ac3: c7 85 f8 fc ff ff 00 movl $0x0,-0x308(%ebp) <== NOT EXECUTED
125aca: 00 00 00
125acd: e9 1f f3 ff ff jmp 124df1 <msdos_format+0x1a5> <== NOT EXECUTED
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
125ad2: b8 f2 46 16 00 mov $0x1646f2,%eax <== NOT EXECUTED
125ad7: e9 25 f7 ff ff jmp 125201 <msdos_format+0x5b5> <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
125adc: 81 c6 00 00 00 40 add $0x40000000,%esi <== NOT EXECUTED
125ae2: 83 d7 00 adc $0x0,%edi <== NOT EXECUTED
125ae5: 0f ac fe 1e shrd $0x1e,%edi,%esi <== NOT EXECUTED
125ae9: c1 ef 1e shr $0x1e,%edi <== NOT EXECUTED
125aec: b9 1f 00 00 00 mov $0x1f,%ecx <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
125af1: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
125af6: eb 03 jmp 125afb <msdos_format+0xeaf> <== NOT EXECUTED
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
125af8: 49 dec %ecx <== NOT EXECUTED
125af9: 74 24 je 125b1f <msdos_format+0xed3> <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
125afb: 89 d0 mov %edx,%eax <== NOT EXECUTED
125afd: d3 e0 shl %cl,%eax <== NOT EXECUTED
125aff: 85 f0 test %esi,%eax <== NOT EXECUTED
125b01: 74 f5 je 125af8 <msdos_format+0xeac> <== NOT EXECUTED
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
int b;
fmt_params->fattype = FAT_FAT32;
125b03: c6 85 76 ff ff ff 04 movb $0x4,-0x8a(%ebp) <== NOT EXECUTED
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
break;
fmt_params->sectors_per_cluster = 1 << b;
125b0a: 89 85 50 ff ff ff mov %eax,-0xb0(%ebp) <== NOT EXECUTED
125b10: e9 ca f2 ff ff jmp 124ddf <msdos_format+0x193> <== NOT EXECUTED
(rqdata->files_per_root_dir > 0)) {
fmt_params->files_per_root_dir = rqdata->files_per_root_dir;
}
else {
if (fmt_params->fattype == FAT_FAT16) {
fmt_params->files_per_root_dir = 512;
125b15: b9 ff 01 00 00 mov $0x1ff,%ecx <== NOT EXECUTED
125b1a: e9 12 fa ff ff jmp 125531 <msdos_format+0x8e5> <== NOT EXECUTED
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
125b1f: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
125b24: eb dd jmp 125b03 <msdos_format+0xeb7> <== NOT EXECUTED
default:
ret_val = -1;
errno = EINVAL;
}
if (fmt_params.fattype == FAT_FAT32) {
125b26: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
125b2b: e9 b1 fd ff ff jmp 1258e1 <msdos_format+0xc95> <== NOT EXECUTED
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
125b30: e8 4b 20 02 00 call 147b80 <__errno> <== NOT EXECUTED
125b35: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
125b3b: c7 85 f8 fc ff ff ff movl $0xffffffff,-0x308(%ebp) <== NOT EXECUTED
125b42: ff ff ff
125b45: e9 50 f3 ff ff jmp 124e9a <msdos_format+0x24e> <== NOT EXECUTED
* check sectors per cluster.
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
125b4a: 89 85 50 ff ff ff mov %eax,-0xb0(%ebp) <== NOT EXECUTED
125b50: e9 8d f9 ff ff jmp 1254e2 <msdos_format+0x896> <== NOT EXECUTED
00124b08 <msdos_format_fill_sectors>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
124b08: 55 push %ebp <== NOT EXECUTED
124b09: 89 e5 mov %esp,%ebp <== NOT EXECUTED
124b0b: 57 push %edi <== NOT EXECUTED
124b0c: 56 push %esi <== NOT EXECUTED
124b0d: 53 push %ebx <== NOT EXECUTED
124b0e: 83 ec 38 sub $0x38,%esp <== NOT EXECUTED
124b11: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED
124b14: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
124b17: 89 cb mov %ecx,%ebx <== NOT EXECUTED
124b19: 0f b6 75 10 movzbl 0x10(%ebp),%esi <== NOT EXECUTED
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
124b1d: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
124b20: e8 e3 a2 fe ff call 10ee08 <malloc> <== NOT EXECUTED
124b25: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
if (fill_buffer == NULL) {
124b28: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
124b2b: 85 c0 test %eax,%eax <== NOT EXECUTED
124b2d: 0f 84 91 00 00 00 je 124bc4 <msdos_format_fill_sectors+0xbc><== NOT EXECUTED
errno = ENOMEM;
ret_val = -1;
}
else {
memset(fill_buffer,fill_byte,sector_size);
124b33: 8b 7d e0 mov -0x20(%ebp),%edi <== NOT EXECUTED
124b36: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
124b39: 89 f0 mov %esi,%eax <== NOT EXECUTED
124b3b: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
124b3d: 51 push %ecx <== NOT EXECUTED
124b3e: 68 64 46 16 00 push $0x164664 <== NOT EXECUTED
124b43: 6a 02 push $0x2 <== NOT EXECUTED
124b45: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
124b48: e8 27 ff ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
124b4d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
124b50: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
124b53: 85 d2 test %edx,%edx <== NOT EXECUTED
124b55: 0f 84 d9 00 00 00 je 124c34 <msdos_format_fill_sectors+0x12c><== NOT EXECUTED
124b5b: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
124b5e: 8d 04 92 lea (%edx,%edx,4),%eax <== NOT EXECUTED
124b61: 8d 04 80 lea (%eax,%eax,4),%eax <== NOT EXECUTED
124b64: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
124b67: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
124b6a: 89 d7 mov %edx,%edi <== NOT EXECUTED
124b6c: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
124b71: eb 29 jmp 124b9c <msdos_format_fill_sectors+0x94><== NOT EXECUTED
124b73: 90 nop <== NOT EXECUTED
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
124b74: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
124b77: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
124b7a: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
124b7d: 89 da mov %ebx,%edx <== NOT EXECUTED
124b7f: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
124b82: e8 31 ff ff ff call 124ab8 <msdos_format_write_sec><== NOT EXECUTED
start_sector++;
124b87: 43 inc %ebx <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
124b88: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
124b8b: 85 c0 test %eax,%eax <== NOT EXECUTED
124b8d: 75 58 jne 124be7 <msdos_format_fill_sectors+0xdf><== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
124b8f: 83 6d e4 64 subl $0x64,-0x1c(%ebp) <== NOT EXECUTED
124b93: 89 f1 mov %esi,%ecx <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
124b95: 4f dec %edi <== NOT EXECUTED
124b96: 0f 84 98 00 00 00 je 124c34 <msdos_format_fill_sectors+0x12c><== NOT EXECUTED
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
124b9c: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
124b9f: 31 d2 xor %edx,%edx <== NOT EXECUTED
124ba1: f7 75 08 divl 0x8(%ebp) <== NOT EXECUTED
124ba4: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (percent != last_percent) {
124ba6: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
124ba8: 74 ca je 124b74 <msdos_format_fill_sectors+0x6c><== NOT EXECUTED
if ((percent & 1) == 0)
124baa: a8 01 test $0x1,%al <== NOT EXECUTED
124bac: 75 c6 jne 124b74 <msdos_format_fill_sectors+0x6c><== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
124bae: 50 push %eax <== NOT EXECUTED
124baf: 68 18 1c 16 00 push $0x161c18 <== NOT EXECUTED
124bb4: 6a 02 push $0x2 <== NOT EXECUTED
124bb6: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
124bb9: e8 b6 fe ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
124bbe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
124bc1: eb b1 jmp 124b74 <msdos_format_fill_sectors+0x6c><== NOT EXECUTED
124bc3: 90 nop <== NOT EXECUTED
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
if (fill_buffer == NULL) {
errno = ENOMEM;
124bc4: e8 b7 2f 02 00 call 147b80 <__errno> <== NOT EXECUTED
124bc9: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
124bcf: 56 push %esi <== NOT EXECUTED
124bd0: 68 64 46 16 00 push $0x164664 <== NOT EXECUTED
124bd5: 6a 02 push $0x2 <== NOT EXECUTED
124bd7: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
124bda: e8 95 fe ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
124bdf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
124be4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
124be7: 57 push %edi <== NOT EXECUTED
124be8: 68 69 7d 16 00 push $0x167d69 <== NOT EXECUTED
124bed: 6a 02 push $0x2 <== NOT EXECUTED
124bef: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
124bf2: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
124bf5: e8 7a fe ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
if (ret_val)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
124bfa: 53 push %ebx <== NOT EXECUTED
124bfb: 68 6f 46 16 00 push $0x16466f <== NOT EXECUTED
124c00: 6a 01 push $0x1 <== NOT EXECUTED
124c02: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
124c05: e8 6a fe ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
"filling error on sector: %d\n", start_sector);
/*
* cleanup
*/
if (fill_buffer != NULL) {
124c0a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
124c0d: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED
124c10: 85 f6 test %esi,%esi <== NOT EXECUTED
124c12: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
124c15: 74 14 je 124c2b <msdos_format_fill_sectors+0x123><== NOT EXECUTED
free(fill_buffer);
124c17: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
124c1a: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
124c1d: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
124c20: e8 43 9c fe ff call 10e868 <free> <== NOT EXECUTED
124c25: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
124c28: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
fill_buffer = NULL;
}
return ret_val;
}
124c2b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
124c2e: 5b pop %ebx <== NOT EXECUTED
124c2f: 5e pop %esi <== NOT EXECUTED
124c30: 5f pop %edi <== NOT EXECUTED
124c31: c9 leave <== NOT EXECUTED
124c32: c3 ret <== NOT EXECUTED
124c33: 90 nop <== NOT EXECUTED
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
124c34: 53 push %ebx <== NOT EXECUTED
124c35: 68 69 7d 16 00 push $0x167d69 <== NOT EXECUTED
124c3a: 6a 02 push $0x2 <== NOT EXECUTED
124c3c: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
124c3f: e8 30 fe ff ff call 124a74 <msdos_format_printf> <== NOT EXECUTED
124c44: 31 c0 xor %eax,%eax <== NOT EXECUTED
124c46: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
124c49: eb cc jmp 124c17 <msdos_format_fill_sectors+0x10f><== NOT EXECUTED
00124a74 <msdos_format_printf>:
*/
static void
msdos_format_printf (const msdos_format_request_param_t *rqdata,
int info_level,
const char *format, ...)
{
124a74: 55 push %ebp <== NOT EXECUTED
124a75: 89 e5 mov %esp,%ebp <== NOT EXECUTED
124a77: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
124a7a: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
/*
* Formatted output.
*/
static void
msdos_format_printf (const msdos_format_request_param_t *rqdata,
124a7d: 8d 4d 14 lea 0x14(%ebp),%ecx <== NOT EXECUTED
int info_level,
const char *format, ...)
{
va_list args;
va_start (args, format);
if (rqdata != NULL && rqdata->info_level >= info_level)
124a80: 85 c0 test %eax,%eax <== NOT EXECUTED
124a82: 74 08 je 124a8c <msdos_format_printf+0x18><== NOT EXECUTED
124a84: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
124a87: 39 50 1c cmp %edx,0x1c(%eax) <== NOT EXECUTED
124a8a: 7d 04 jge 124a90 <msdos_format_printf+0x1c><== NOT EXECUTED
{
vfprintf (stdout, format, args);
fflush (stdout);
}
va_end (args);
}
124a8c: c9 leave <== NOT EXECUTED
124a8d: c3 ret <== NOT EXECUTED
124a8e: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
va_list args;
va_start (args, format);
if (rqdata != NULL && rqdata->info_level >= info_level)
{
vfprintf (stdout, format, args);
124a90: 52 push %edx <== NOT EXECUTED
124a91: 51 push %ecx <== NOT EXECUTED
124a92: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
124a95: a1 60 fb 16 00 mov 0x16fb60,%eax <== NOT EXECUTED
124a9a: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
124a9d: e8 02 09 03 00 call 1553a4 <vfprintf> <== NOT EXECUTED
fflush (stdout);
124aa2: 58 pop %eax <== NOT EXECUTED
124aa3: a1 60 fb 16 00 mov 0x16fb60,%eax <== NOT EXECUTED
124aa8: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
124aab: e8 4c 34 02 00 call 147efc <fflush> <== NOT EXECUTED
124ab0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
va_end (args);
}
124ab3: c9 leave <== NOT EXECUTED
124ab4: c3 ret <== NOT EXECUTED
00124ab8 <msdos_format_write_sec>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
124ab8: 55 push %ebp <== NOT EXECUTED
124ab9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
124abb: 57 push %edi <== NOT EXECUTED
124abc: 56 push %esi <== NOT EXECUTED
124abd: 53 push %ebx <== NOT EXECUTED
124abe: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
124ac1: 89 c3 mov %eax,%ebx <== NOT EXECUTED
124ac3: 89 ce mov %ecx,%esi <== NOT EXECUTED
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
124ac5: 6a 00 push $0x0 <== NOT EXECUTED
124ac7: 89 c8 mov %ecx,%eax <== NOT EXECUTED
124ac9: f7 e2 mul %edx <== NOT EXECUTED
124acb: 52 push %edx <== NOT EXECUTED
124acc: 50 push %eax <== NOT EXECUTED
124acd: 53 push %ebx <== NOT EXECUTED
124ace: e8 4d a8 00 00 call 12f320 <lseek> <== NOT EXECUTED
124ad3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
124ad6: 85 d2 test %edx,%edx <== NOT EXECUTED
124ad8: 78 1e js 124af8 <msdos_format_write_sec+0x40><== NOT EXECUTED
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
124ada: 51 push %ecx <== NOT EXECUTED
124adb: 56 push %esi <== NOT EXECUTED
124adc: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
124adf: 53 push %ebx <== NOT EXECUTED
124ae0: e8 3f d8 fe ff call 112324 <write> <== NOT EXECUTED
124ae5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
124ae8: 85 c0 test %eax,%eax <== NOT EXECUTED
124aea: 78 0c js 124af8 <msdos_format_write_sec+0x40><== NOT EXECUTED
124aec: 31 c0 xor %eax,%eax <== NOT EXECUTED
ret_val = -1;
}
}
return ret_val;
}
124aee: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
124af1: 5b pop %ebx <== NOT EXECUTED
124af2: 5e pop %esi <== NOT EXECUTED
124af3: 5f pop %edi <== NOT EXECUTED
124af4: c9 leave <== NOT EXECUTED
124af5: c3 ret <== NOT EXECUTED
124af6: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
124af8: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
ret_val = -1;
}
}
return ret_val;
}
124afd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
124b00: 5b pop %ebx <== NOT EXECUTED
124b01: 5e pop %esi <== NOT EXECUTED
124b02: 5f pop %edi <== NOT EXECUTED
124b03: c9 leave <== NOT EXECUTED
124b04: c3 ret <== NOT EXECUTED
0013b8b4 <msdos_free_node_info>:
* RC_OK on success, or -1 code if error occured
*
*/
int
msdos_free_node_info(rtems_filesystem_location_info_t *pathloc)
{
13b8b4: 55 push %ebp <== NOT EXECUTED
13b8b5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13b8b7: 56 push %esi <== NOT EXECUTED
13b8b8: 53 push %ebx <== NOT EXECUTED
13b8b9: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
13b8bc: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
13b8bf: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
13b8c2: 52 push %edx <== NOT EXECUTED
13b8c3: 6a 00 push $0x0 <== NOT EXECUTED
13b8c5: 6a 00 push $0x0 <== NOT EXECUTED
13b8c7: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
13b8cd: e8 26 76 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
13b8d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b8d5: 85 c0 test %eax,%eax <== NOT EXECUTED
13b8d7: 75 27 jne 13b900 <msdos_free_node_info+0x4c><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_close(pathloc->mt_entry, pathloc->node_access);
13b8d9: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13b8dc: ff 33 pushl (%ebx) <== NOT EXECUTED
13b8de: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
13b8e1: e8 ca fb fe ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
13b8e6: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
13b8e8: 58 pop %eax <== NOT EXECUTED
13b8e9: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
13b8ef: e8 00 77 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
13b8f4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13b8f7: 89 d8 mov %ebx,%eax <== NOT EXECUTED
13b8f9: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
13b8fc: 5b pop %ebx <== NOT EXECUTED
13b8fd: 5e pop %esi <== NOT EXECUTED
13b8fe: c9 leave <== NOT EXECUTED
13b8ff: c3 ret <== NOT EXECUTED
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
13b900: e8 7b c2 00 00 call 147b80 <__errno> <== NOT EXECUTED
13b905: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
13b90b: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
13b910: eb e5 jmp 13b8f7 <msdos_free_node_info+0x43><== NOT EXECUTED
0013ca64 <msdos_get_dotdot_dir_info_cluster_num_and_offset>:
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
13ca64: 55 push %ebp <== NOT EXECUTED
13ca65: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13ca67: 57 push %edi <== NOT EXECUTED
13ca68: 56 push %esi <== NOT EXECUTED
13ca69: 53 push %ebx <== NOT EXECUTED
13ca6a: 81 ec 90 00 00 00 sub $0x90,%esp <== NOT EXECUTED
13ca70: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
13ca73: 8b 43 34 mov 0x34(%ebx),%eax <== NOT EXECUTED
13ca76: 89 45 84 mov %eax,-0x7c(%ebp) <== NOT EXECUTED
fat_file_fd_t *fat_fd = NULL;
13ca79: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
13ca80: 8d 75 e4 lea -0x1c(%ebp),%esi <== NOT EXECUTED
13ca83: 56 push %esi <== NOT EXECUTED
13ca84: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13ca87: 53 push %ebx <== NOT EXECUTED
13ca88: e8 e3 ea fe ff call 12b570 <fat_file_open> <== NOT EXECUTED
13ca8d: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
13ca8f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ca92: 85 c0 test %eax,%eax <== NOT EXECUTED
13ca94: 74 0a je 13caa0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x3c><== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
rc = fat_file_close(mt_entry, fat_fd);
return rc;
}
13ca96: 89 f8 mov %edi,%eax <== NOT EXECUTED
13ca98: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13ca9b: 5b pop %ebx <== NOT EXECUTED
13ca9c: 5e pop %esi <== NOT EXECUTED
13ca9d: 5f pop %edi <== NOT EXECUTED
13ca9e: c9 leave <== NOT EXECUTED
13ca9f: c3 ret <== NOT EXECUTED
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
13caa0: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13caa3: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
13caa6: 89 50 1c mov %edx,0x1c(%eax) <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
13caa9: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
13cab0: c7 40 14 00 00 20 00 movl $0x200000,0x14(%eax) <== NOT EXECUTED
fat_fd->map.file_cln = 0;
13cab7: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
13cabe: 89 50 38 mov %edx,0x38(%eax) <== NOT EXECUTED
rc = fat_file_size(mt_entry, fat_fd);
13cac1: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13cac4: 50 push %eax <== NOT EXECUTED
13cac5: 53 push %ebx <== NOT EXECUTED
13cac6: e8 91 df fe ff call 12aa5c <fat_file_size> <== NOT EXECUTED
13cacb: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
13cacd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13cad0: 85 c0 test %eax,%eax <== NOT EXECUTED
13cad2: 0f 85 98 01 00 00 jne 13cc70 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x20c><== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
13cad8: 8d 4d c4 lea -0x3c(%ebp),%ecx <== NOT EXECUTED
13cadb: 89 8d 74 ff ff ff mov %ecx,-0x8c(%ebp) <== NOT EXECUTED
13cae1: b9 20 00 00 00 mov $0x20,%ecx <== NOT EXECUTED
13cae6: 8b bd 74 ff ff ff mov -0x8c(%ebp),%edi <== NOT EXECUTED
13caec: 31 c0 xor %eax,%eax <== NOT EXECUTED
13caee: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
13caf0: 6a 0b push $0xb <== NOT EXECUTED
13caf2: 8d 55 c4 lea -0x3c(%ebp),%edx <== NOT EXECUTED
13caf5: 52 push %edx <== NOT EXECUTED
13caf6: 6a 01 push $0x1 <== NOT EXECUTED
13caf8: 68 18 1c 16 00 push $0x161c18 <== NOT EXECUTED
13cafd: e8 ca fd ff ff call 13c8cc <msdos_long_to_short> <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
13cb02: 8d 4d c4 lea -0x3c(%ebp),%ecx <== NOT EXECUTED
13cb05: 51 push %ecx <== NOT EXECUTED
13cb06: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13cb09: 6a 01 push $0x1 <== NOT EXECUTED
13cb0b: 6a 01 push $0x1 <== NOT EXECUTED
13cb0d: 68 18 1c 16 00 push $0x161c18 <== NOT EXECUTED
13cb12: 6a 00 push $0x0 <== NOT EXECUTED
13cb14: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13cb17: 53 push %ebx <== NOT EXECUTED
13cb18: e8 93 ef ff ff call 13bab0 <msdos_find_name_in_fat_file><== NOT EXECUTED
13cb1d: 89 c7 mov %eax,%edi <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
13cb1f: 83 c4 30 add $0x30,%esp <== NOT EXECUTED
13cb22: 85 c0 test %eax,%eax <== NOT EXECUTED
13cb24: 0f 85 46 01 00 00 jne 13cc70 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x20c><== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
13cb2a: 8d 55 a4 lea -0x5c(%ebp),%edx <== NOT EXECUTED
13cb2d: b9 20 00 00 00 mov $0x20,%ecx <== NOT EXECUTED
13cb32: 89 d7 mov %edx,%edi <== NOT EXECUTED
13cb34: 31 c0 xor %eax,%eax <== NOT EXECUTED
13cb36: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
13cb38: 6a 0b push $0xb <== NOT EXECUTED
13cb3a: 52 push %edx <== NOT EXECUTED
13cb3b: 6a 02 push $0x2 <== NOT EXECUTED
13cb3d: 68 03 33 16 00 push $0x163303 <== NOT EXECUTED
13cb42: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) <== NOT EXECUTED
13cb48: e8 7f fd ff ff call 13c8cc <msdos_long_to_short> <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
13cb4d: 8b 95 7c ff ff ff mov -0x84(%ebp),%edx <== NOT EXECUTED
13cb53: 52 push %edx <== NOT EXECUTED
13cb54: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13cb57: 6a 01 push $0x1 <== NOT EXECUTED
13cb59: 6a 02 push $0x2 <== NOT EXECUTED
13cb5b: 68 03 33 16 00 push $0x163303 <== NOT EXECUTED
13cb60: 6a 00 push $0x0 <== NOT EXECUTED
13cb62: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13cb65: 53 push %ebx <== NOT EXECUTED
13cb66: e8 45 ef ff ff call 13bab0 <msdos_find_name_in_fat_file><== NOT EXECUTED
13cb6b: 89 c7 mov %eax,%edi <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
13cb6d: 83 c4 30 add $0x30,%esp <== NOT EXECUTED
13cb70: 85 c0 test %eax,%eax <== NOT EXECUTED
13cb72: 0f 85 f8 00 00 00 jne 13cc70 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x20c><== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
13cb78: 66 8b 55 de mov -0x22(%ebp),%dx <== NOT EXECUTED
13cb7c: 66 89 55 82 mov %dx,-0x7e(%ebp) <== NOT EXECUTED
13cb80: 8b 4d d8 mov -0x28(%ebp),%ecx <== NOT EXECUTED
13cb83: 66 89 4d 88 mov %cx,-0x78(%ebp) <== NOT EXECUTED
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(mt_entry, fat_fd);
13cb87: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13cb8a: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13cb8d: 53 push %ebx <== NOT EXECUTED
13cb8e: e8 1d e9 fe ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
13cb93: 89 c7 mov %eax,%edi <== NOT EXECUTED
if ( rc != RC_OK )
13cb95: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13cb98: 85 c0 test %eax,%eax <== NOT EXECUTED
13cb9a: 0f 85 f6 fe ff ff jne 13ca96 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x32><== NOT EXECUTED
return rc;
if ( (MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
13cba0: 66 83 7d b8 00 cmpw $0x0,-0x48(%ebp) <== NOT EXECUTED
13cba5: 75 25 jne 13cbcc <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x168><== NOT EXECUTED
13cba7: 66 83 7d be 00 cmpw $0x0,-0x42(%ebp) <== NOT EXECUTED
13cbac: 75 1e jne 13cbcc <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x168><== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
13cbae: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
13cbb1: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
13cbb8: c7 40 08 ff ff ff ff movl $0xffffffff,0x8(%eax) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
13cbbf: c7 40 0c ff ff ff ff movl $0xffffffff,0xc(%eax) <== NOT EXECUTED
/*
* we handle root dir for all FAT types in the same way with the
* ordinary directories ( through fat_file_* calls )
*/
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
13cbc6: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
}
/* open fat-file corresponded to second ".." */
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
13cbcc: 52 push %edx <== NOT EXECUTED
13cbcd: 56 push %esi <== NOT EXECUTED
13cbce: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13cbd1: 53 push %ebx <== NOT EXECUTED
13cbd2: e8 99 e9 fe ff call 12b570 <fat_file_open> <== NOT EXECUTED
13cbd7: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
13cbd9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13cbdc: 85 c0 test %eax,%eax <== NOT EXECUTED
13cbde: 0f 85 b2 fe ff ff jne 13ca96 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x32><== NOT EXECUTED
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
13cbe4: 0f b7 55 b8 movzwl -0x48(%ebp),%edx <== NOT EXECUTED
13cbe8: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
13cbeb: 0f b7 45 be movzwl -0x42(%ebp),%eax <== NOT EXECUTED
13cbef: 09 c2 or %eax,%edx <== NOT EXECUTED
13cbf1: 0f 85 95 00 00 00 jne 13cc8c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x228><== NOT EXECUTED
fat_fd->cln = fs_info->fat.vol.rdir_cl;
13cbf7: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13cbfa: 8b 4d 84 mov -0x7c(%ebp),%ecx <== NOT EXECUTED
13cbfd: 8b 51 38 mov 0x38(%ecx),%edx <== NOT EXECUTED
13cc00: 89 50 1c mov %edx,0x1c(%eax) <== NOT EXECUTED
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
fat_fd->fat_file_type = FAT_DIRECTORY;
13cc03: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
13cc0a: c7 40 14 00 00 20 00 movl $0x200000,0x14(%eax) <== NOT EXECUTED
fat_fd->map.file_cln = 0;
13cc11: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
13cc18: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
13cc1b: 89 50 38 mov %edx,0x38(%eax) <== NOT EXECUTED
rc = fat_file_size(mt_entry, fat_fd);
13cc1e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13cc21: 50 push %eax <== NOT EXECUTED
13cc22: 53 push %ebx <== NOT EXECUTED
13cc23: e8 34 de fe ff call 12aa5c <fat_file_size> <== NOT EXECUTED
13cc28: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
13cc2a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13cc2d: 85 c0 test %eax,%eax <== NOT EXECUTED
13cc2f: 75 3f jne 13cc70 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x20c><== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
13cc31: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13cc34: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
13cc37: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13cc3a: 8b 45 88 mov -0x78(%ebp),%eax <== NOT EXECUTED
13cc3d: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
13cc40: 0f b7 55 82 movzwl -0x7e(%ebp),%edx <== NOT EXECUTED
13cc44: 09 d0 or %edx,%eax <== NOT EXECUTED
13cc46: 50 push %eax <== NOT EXECUTED
13cc47: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13cc4a: 53 push %ebx <== NOT EXECUTED
13cc4b: e8 28 ed ff ff call 13b978 <msdos_find_node_by_cluster_num_in_fat_file><== NOT EXECUTED
13cc50: 89 c7 mov %eax,%edi <== NOT EXECUTED
dir_pos, dir_entry);
if (rc != RC_OK)
13cc52: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13cc55: 85 c0 test %eax,%eax <== NOT EXECUTED
13cc57: 75 17 jne 13cc70 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x20c><== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
rc = fat_file_close(mt_entry, fat_fd);
13cc59: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13cc5c: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13cc5f: 53 push %ebx <== NOT EXECUTED
13cc60: e8 4b e8 fe ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
13cc65: 89 c7 mov %eax,%edi <== NOT EXECUTED
return rc;
13cc67: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13cc6a: e9 27 fe ff ff jmp 13ca96 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x32><== NOT EXECUTED
13cc6f: 90 nop <== NOT EXECUTED
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
dir_pos, dir_entry);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
13cc70: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13cc73: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13cc76: 53 push %ebx <== NOT EXECUTED
13cc77: e8 34 e8 fe ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
return rc;
13cc7c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rc = fat_file_close(mt_entry, fat_fd);
return rc;
}
13cc7f: 89 f8 mov %edi,%eax <== NOT EXECUTED
13cc81: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13cc84: 5b pop %ebx <== NOT EXECUTED
13cc85: 5e pop %esi <== NOT EXECUTED
13cc86: 5f pop %edi <== NOT EXECUTED
13cc87: c9 leave <== NOT EXECUTED
13cc88: c3 ret <== NOT EXECUTED
13cc89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
13cc8c: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13cc8f: 89 50 1c mov %edx,0x1c(%eax) <== NOT EXECUTED
13cc92: e9 6c ff ff ff jmp 13cc03 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x19f><== NOT EXECUTED
0013cc98 <msdos_get_name_node>:
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
13cc98: 55 push %ebp <== NOT EXECUTED
13cc99: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13cc9b: 57 push %edi <== NOT EXECUTED
13cc9c: 56 push %esi <== NOT EXECUTED
13cc9d: 53 push %ebx <== NOT EXECUTED
13cc9e: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
13cca1: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
13cca4: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
13cca7: 8b 45 1c mov 0x1c(%ebp),%eax <== NOT EXECUTED
13ccaa: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
13ccad: 8b 55 20 mov 0x20(%ebp),%edx <== NOT EXECUTED
13ccb0: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
13ccb3: 8a 55 0c mov 0xc(%ebp),%dl <== NOT EXECUTED
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
13ccb6: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13ccb9: 50 push %eax <== NOT EXECUTED
13ccba: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED
13ccbd: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
13ccc0: 56 push %esi <== NOT EXECUTED
13ccc1: 0f b6 c2 movzbl %dl,%eax <== NOT EXECUTED
13ccc4: 50 push %eax <== NOT EXECUTED
13ccc5: ff 33 pushl (%ebx) <== NOT EXECUTED
13ccc7: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
13ccca: 88 55 dc mov %dl,-0x24(%ebp) <== NOT EXECUTED
13cccd: e8 de ed ff ff call 13bab0 <msdos_find_name_in_fat_file><== NOT EXECUTED
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
13ccd2: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13ccd5: 85 c0 test %eax,%eax <== NOT EXECUTED
13ccd7: 8a 55 dc mov -0x24(%ebp),%dl <== NOT EXECUTED
13ccda: 74 10 je 13ccec <msdos_get_name_node+0x54><== NOT EXECUTED
13ccdc: 3d 01 7d 00 00 cmp $0x7d01,%eax <== NOT EXECUTED
13cce1: 74 09 je 13ccec <msdos_get_name_node+0x54><== NOT EXECUTED
}
}
}
}
return rc;
}
13cce3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13cce6: 5b pop %ebx <== NOT EXECUTED
13cce7: 5e pop %esi <== NOT EXECUTED
13cce8: 5f pop %edi <== NOT EXECUTED
13cce9: c9 leave <== NOT EXECUTED
13ccea: c3 ret <== NOT EXECUTED
13cceb: 90 nop <== NOT EXECUTED
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
return rc;
if (!create_node)
13ccec: 84 d2 test %dl,%dl <== NOT EXECUTED
13ccee: 75 f3 jne 13cce3 <msdos_get_name_node+0x4b><== NOT EXECUTED
{
/* if we search for valid name and name not found -> return */
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
13ccf0: 3d 01 7d 00 00 cmp $0x7d01,%eax <== NOT EXECUTED
13ccf5: 74 ec je 13cce3 <msdos_get_name_node+0x4b><== NOT EXECUTED
* if we have deal with ".." - it is a special case :(((
*
* Really, we should return cluster num and offset not of ".." slot, but
* slot which correspondes to real directory name.
*/
if (rc == RC_OK)
13ccf7: 85 c0 test %eax,%eax <== NOT EXECUTED
13ccf9: 75 e8 jne 13cce3 <msdos_get_name_node+0x4b><== NOT EXECUTED
{
if (strncmp(name, "..", 2) == 0)
13ccfb: bf 03 33 16 00 mov $0x163303,%edi <== NOT EXECUTED
13cd00: b9 02 00 00 00 mov $0x2,%ecx <== NOT EXECUTED
13cd05: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED
13cd07: 75 da jne 13cce3 <msdos_get_name_node+0x4b><== NOT EXECUTED
{
dotdot_cln = MSDOS_EXTRACT_CLUSTER_NUM((name_dir_entry));
13cd09: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
13cd0c: 0f b7 51 14 movzwl 0x14(%ecx),%edx <== NOT EXECUTED
13cd10: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
13cd13: 0f b7 49 1a movzwl 0x1a(%ecx),%ecx <== NOT EXECUTED
/* are we right under root dir ? */
if (dotdot_cln == 0)
13cd17: 09 ca or %ecx,%edx <== NOT EXECUTED
13cd19: 75 21 jne 13cd3c <msdos_get_name_node+0xa4><== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
13cd1b: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED
13cd1e: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
13cd25: c7 46 08 ff ff ff ff movl $0xffffffff,0x8(%esi) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
13cd2c: c7 46 0c ff ff ff ff movl $0xffffffff,0xc(%esi) <== NOT EXECUTED
/*
* we can relax about first_char field - it never should be
* used for root dir
*/
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
13cd33: c7 06 01 00 00 00 movl $0x1,(%esi) <== NOT EXECUTED
13cd39: eb a8 jmp 13cce3 <msdos_get_name_node+0x4b><== NOT EXECUTED
13cd3b: 90 nop <== NOT EXECUTED
}
else
{
rc =
msdos_get_dotdot_dir_info_cluster_num_and_offset(parent_loc->mt_entry,
13cd3c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13cd3f: 89 45 14 mov %eax,0x14(%ebp) <== NOT EXECUTED
13cd42: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
13cd45: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED
13cd48: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
13cd4b: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
13cd4e: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
}
}
}
return rc;
}
13cd51: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13cd54: 5b pop %ebx <== NOT EXECUTED
13cd55: 5e pop %esi <== NOT EXECUTED
13cd56: 5f pop %edi <== NOT EXECUTED
13cd57: c9 leave <== NOT EXECUTED
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
}
else
{
rc =
msdos_get_dotdot_dir_info_cluster_num_and_offset(parent_loc->mt_entry,
13cd58: e9 07 fd ff ff jmp 13ca64 <msdos_get_dotdot_dir_info_cluster_num_and_offset><== NOT EXECUTED
0013c7f4 <msdos_get_token>:
msdos_token_types_t
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
13c7f4: 55 push %ebp <== NOT EXECUTED
13c7f5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13c7f7: 57 push %edi <== NOT EXECUTED
13c7f8: 56 push %esi <== NOT EXECUTED
13c7f9: 53 push %ebx <== NOT EXECUTED
13c7fa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13c7fd: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
13c800: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED
msdos_token_types_t type = MSDOS_NAME;
int i = 0;
*ret_token = NULL;
13c803: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
13c806: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
*ret_token_len = 0;
13c80c: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
13c80f: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
if (pathlen == 0)
13c815: 85 ff test %edi,%edi <== NOT EXECUTED
13c817: 74 57 je 13c870 <msdos_get_token+0x7c> <== NOT EXECUTED
13c819: 31 db xor %ebx,%ebx <== NOT EXECUTED
13c81b: eb 1d jmp 13c83a <msdos_get_token+0x46> <== NOT EXECUTED
13c81d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return MSDOS_NO_MORE_PATH;
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
13c820: 39 fb cmp %edi,%ebx <== NOT EXECUTED
13c822: 7d 2a jge 13c84e <msdos_get_token+0x5a> <== NOT EXECUTED
{
if ( !msdos_is_valid_name_char(path[i]) )
13c824: 0f be 04 1e movsbl (%esi,%ebx,1),%eax <== NOT EXECUTED
13c828: e8 5b ff ff ff call 13c788 <msdos_is_valid_name_char><== NOT EXECUTED
13c82d: 85 c0 test %eax,%eax <== NOT EXECUTED
13c82f: 74 4b je 13c87c <msdos_get_token+0x88> <== NOT EXECUTED
return MSDOS_INVALID_TOKEN;
++i;
13c831: 43 inc %ebx <== NOT EXECUTED
if ( i == MSDOS_NAME_MAX_LFN_WITH_DOT )
13c832: 81 fb 04 01 00 00 cmp $0x104,%ebx <== NOT EXECUTED
13c838: 74 42 je 13c87c <msdos_get_token+0x88> <== NOT EXECUTED
return MSDOS_NO_MORE_PATH;
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
13c83a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13c83d: 0f be 04 1e movsbl (%esi,%ebx,1),%eax <== NOT EXECUTED
13c841: 50 push %eax <== NOT EXECUTED
13c842: e8 85 37 fd ff call 10ffcc <rtems_filesystem_is_separator><== NOT EXECUTED
13c847: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13c84a: 85 c0 test %eax,%eax <== NOT EXECUTED
13c84c: 74 d2 je 13c820 <msdos_get_token+0x2c> <== NOT EXECUTED
++i;
if ( i == MSDOS_NAME_MAX_LFN_WITH_DOT )
return MSDOS_INVALID_TOKEN;
}
*ret_token = path;
13c84e: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
13c851: 89 30 mov %esi,(%eax) <== NOT EXECUTED
/*
* If it is just a separator then it is the current dir.
*/
if ( i == 0 )
13c853: 85 db test %ebx,%ebx <== NOT EXECUTED
13c855: 75 35 jne 13c88c <msdos_get_token+0x98> <== NOT EXECUTED
{
if ( (*path != '\0') && pathlen )
13c857: 80 3e 00 cmpb $0x0,(%esi) <== NOT EXECUTED
13c85a: 74 4c je 13c8a8 <msdos_get_token+0xb4> <== NOT EXECUTED
13c85c: b3 01 mov $0x1,%bl <== NOT EXECUTED
13c85e: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
}
/*
* Set the token and token_len to the token start and length.
*/
*ret_token_len = i;
13c863: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
13c866: 89 1a mov %ebx,(%edx) <== NOT EXECUTED
return type;
}
}
return type;
}
13c868: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13c86b: 5b pop %ebx <== NOT EXECUTED
13c86c: 5e pop %esi <== NOT EXECUTED
13c86d: 5f pop %edi <== NOT EXECUTED
13c86e: c9 leave <== NOT EXECUTED
13c86f: c3 ret <== NOT EXECUTED
int i = 0;
*ret_token = NULL;
*ret_token_len = 0;
if (pathlen == 0)
13c870: 31 c0 xor %eax,%eax <== NOT EXECUTED
return type;
}
}
return type;
}
13c872: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13c875: 5b pop %ebx <== NOT EXECUTED
13c876: 5e pop %esi <== NOT EXECUTED
13c877: 5f pop %edi <== NOT EXECUTED
13c878: c9 leave <== NOT EXECUTED
13c879: c3 ret <== NOT EXECUTED
13c87a: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
type = MSDOS_UP_DIR;
return type;
}
if ((i == 1) && ((*ret_token)[0] == '.'))
13c87c: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
return type;
}
}
return type;
}
13c881: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13c884: 5b pop %ebx <== NOT EXECUTED
13c885: 5e pop %esi <== NOT EXECUTED
13c886: 5f pop %edi <== NOT EXECUTED
13c887: c9 leave <== NOT EXECUTED
13c888: c3 ret <== NOT EXECUTED
13c889: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
/*
* Set the token and token_len to the token start and length.
*/
*ret_token_len = i;
13c88c: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
13c88f: 89 1a mov %ebx,(%edx) <== NOT EXECUTED
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == MSDOS_NAME )
{
if ((i == 2) && ((*ret_token)[0] == '.') && ((*ret_token)[1] == '.'))
13c891: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED
13c894: 74 22 je 13c8b8 <msdos_get_token+0xc4> <== NOT EXECUTED
{
type = MSDOS_UP_DIR;
return type;
}
if ((i == 1) && ((*ret_token)[0] == '.'))
13c896: 4b dec %ebx <== NOT EXECUTED
13c897: 74 13 je 13c8ac <msdos_get_token+0xb8> <== NOT EXECUTED
13c899: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED
return type;
}
}
return type;
}
13c89e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13c8a1: 5b pop %ebx <== NOT EXECUTED
13c8a2: 5e pop %esi <== NOT EXECUTED
13c8a3: 5f pop %edi <== NOT EXECUTED
13c8a4: c9 leave <== NOT EXECUTED
13c8a5: c3 ret <== NOT EXECUTED
13c8a6: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
type = MSDOS_UP_DIR;
return type;
}
if ((i == 1) && ((*ret_token)[0] == '.'))
13c8a8: 31 c0 xor %eax,%eax <== NOT EXECUTED
13c8aa: eb b7 jmp 13c863 <msdos_get_token+0x6f> <== NOT EXECUTED
13c8ac: 80 3e 2e cmpb $0x2e,(%esi) <== NOT EXECUTED
13c8af: 75 e8 jne 13c899 <msdos_get_token+0xa5> <== NOT EXECUTED
13c8b1: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
13c8b6: eb ba jmp 13c872 <msdos_get_token+0x7e> <== NOT EXECUTED
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == MSDOS_NAME )
{
if ((i == 2) && ((*ret_token)[0] == '.') && ((*ret_token)[1] == '.'))
13c8b8: 80 3e 2e cmpb $0x2e,(%esi) <== NOT EXECUTED
13c8bb: 75 dc jne 13c899 <msdos_get_token+0xa5> <== NOT EXECUTED
13c8bd: 80 7e 01 2e cmpb $0x2e,0x1(%esi) <== NOT EXECUTED
13c8c1: 75 d6 jne 13c899 <msdos_get_token+0xa5> <== NOT EXECUTED
13c8c3: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED
13c8c8: eb a8 jmp 13c872 <msdos_get_token+0x7e> <== NOT EXECUTED
00125b78 <msdos_initialize_support>:
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *file_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
125b78: 55 push %ebp <== NOT EXECUTED
125b79: 89 e5 mov %esp,%ebp <== NOT EXECUTED
125b7b: 57 push %edi <== NOT EXECUTED
125b7c: 56 push %esi <== NOT EXECUTED
125b7d: 53 push %ebx <== NOT EXECUTED
125b7e: 83 ec 34 sub $0x34,%esp <== NOT EXECUTED
125b81: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
125b84: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
125b8b: 68 9c 00 00 00 push $0x9c <== NOT EXECUTED
125b90: 6a 01 push $0x1 <== NOT EXECUTED
125b92: e8 75 87 fe ff call 10e30c <calloc> <== NOT EXECUTED
125b97: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (!fs_info)
125b99: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125b9c: 85 c0 test %eax,%eax <== NOT EXECUTED
125b9e: 0f 84 a3 01 00 00 je 125d47 <msdos_initialize_support+0x1cf><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
temp_mt_entry->fs_info = fs_info;
125ba4: 89 46 34 mov %eax,0x34(%esi) <== NOT EXECUTED
rc = fat_init_volume_info(temp_mt_entry);
125ba7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
125baa: 56 push %esi <== NOT EXECUTED
125bab: e8 78 64 00 00 call 12c028 <fat_init_volume_info> <== NOT EXECUTED
125bb0: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
125bb2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125bb5: 85 c0 test %eax,%eax <== NOT EXECUTED
125bb7: 0f 85 e3 00 00 00 jne 125ca0 <msdos_initialize_support+0x128><== NOT EXECUTED
{
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
125bbd: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
125bc0: 89 83 90 00 00 00 mov %eax,0x90(%ebx) <== NOT EXECUTED
fs_info->directory_handlers = directory_handlers;
125bc6: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
125bc9: 89 83 8c 00 00 00 mov %eax,0x8c(%ebx) <== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
125bcf: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
125bd6: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
125bdd: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) <== NOT EXECUTED
/*
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
125be4: c7 45 d4 01 00 00 00 movl $0x1,-0x2c(%ebp) <== NOT EXECUTED
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
125beb: 51 push %ecx <== NOT EXECUTED
125bec: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
125bef: 50 push %eax <== NOT EXECUTED
125bf0: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED
125bf3: 50 push %eax <== NOT EXECUTED
125bf4: 56 push %esi <== NOT EXECUTED
125bf5: e8 76 59 00 00 call 12b570 <fat_file_open> <== NOT EXECUTED
125bfa: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc != RC_OK)
125bfc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125bff: 85 c0 test %eax,%eax <== NOT EXECUTED
125c01: 0f 85 b5 00 00 00 jne 125cbc <msdos_initialize_support+0x144><== NOT EXECUTED
free(fs_info);
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
125c07: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
125c0a: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
125c11: c7 40 14 00 00 20 00 movl $0x200000,0x14(%eax) <== NOT EXECUTED
fat_fd->cln = fs_info->fat.vol.rdir_cl;
125c18: 8b 53 38 mov 0x38(%ebx),%edx <== NOT EXECUTED
125c1b: 89 50 1c mov %edx,0x1c(%eax) <== NOT EXECUTED
fat_fd->map.file_cln = 0;
125c1e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
125c25: 89 50 38 mov %edx,0x38(%eax) <== NOT EXECUTED
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
125c28: 85 d2 test %edx,%edx <== NOT EXECUTED
125c2a: 0f 85 ac 00 00 00 jne 125cdc <msdos_initialize_support+0x164><== NOT EXECUTED
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
125c30: 8b 53 28 mov 0x28(%ebx),%edx <== NOT EXECUTED
125c33: 89 50 18 mov %edx,0x18(%eax) <== NOT EXECUTED
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
125c36: 0f b7 43 06 movzwl 0x6(%ebx),%eax <== NOT EXECUTED
125c3a: 8b 53 28 mov 0x28(%ebx),%edx <== NOT EXECUTED
125c3d: 39 d0 cmp %edx,%eax <== NOT EXECUTED
125c3f: 72 77 jb 125cb8 <msdos_initialize_support+0x140><== NOT EXECUTED
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
125c41: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
125c44: 6a 01 push $0x1 <== NOT EXECUTED
125c46: 50 push %eax <== NOT EXECUTED
125c47: e8 c0 86 fe ff call 10e30c <calloc> <== NOT EXECUTED
125c4c: 89 83 98 00 00 00 mov %eax,0x98(%ebx) <== NOT EXECUTED
if (fs_info->cl_buf == NULL)
125c52: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125c55: 85 c0 test %eax,%eax <== NOT EXECUTED
125c57: 0f 84 ff 00 00 00 je 125d5c <msdos_initialize_support+0x1e4><== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
sc = rtems_semaphore_create(3,
125c5d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
125c60: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax <== NOT EXECUTED
125c66: 50 push %eax <== NOT EXECUTED
125c67: 6a 00 push $0x0 <== NOT EXECUTED
125c69: 6a 10 push $0x10 <== NOT EXECUTED
125c6b: 6a 01 push $0x1 <== NOT EXECUTED
125c6d: 6a 03 push $0x3 <== NOT EXECUTED
125c6f: e8 b0 cf fe ff call 112c24 <rtems_semaphore_create><== NOT EXECUTED
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
125c74: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
125c77: 85 c0 test %eax,%eax <== NOT EXECUTED
125c79: 0f 85 88 00 00 00 jne 125d07 <msdos_initialize_support+0x18f><== NOT EXECUTED
free(fs_info->cl_buf);
free(fs_info);
rtems_set_errno_and_return_minus_one( EIO );
}
temp_mt_entry->mt_fs_root.node_access = fat_fd;
125c7f: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
125c82: 89 46 1c mov %eax,0x1c(%esi) <== NOT EXECUTED
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
125c85: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
125c88: 89 46 24 mov %eax,0x24(%esi) <== NOT EXECUTED
temp_mt_entry->mt_fs_root.ops = op_table;
125c8b: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
125c8e: 89 46 28 mov %eax,0x28(%esi) <== NOT EXECUTED
125c91: 31 ff xor %edi,%edi <== NOT EXECUTED
return rc;
}
125c93: 89 f8 mov %edi,%eax <== NOT EXECUTED
125c95: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
125c98: 5b pop %ebx <== NOT EXECUTED
125c99: 5e pop %esi <== NOT EXECUTED
125c9a: 5f pop %edi <== NOT EXECUTED
125c9b: c9 leave <== NOT EXECUTED
125c9c: c3 ret <== NOT EXECUTED
125c9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
temp_mt_entry->fs_info = fs_info;
rc = fat_init_volume_info(temp_mt_entry);
if (rc != RC_OK)
{
free(fs_info);
125ca0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
125ca3: 53 push %ebx <== NOT EXECUTED
125ca4: e8 bf 8b fe ff call 10e868 <free> <== NOT EXECUTED
return rc;
125ca9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
}
125cac: 89 f8 mov %edi,%eax <== NOT EXECUTED
125cae: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
125cb1: 5b pop %ebx <== NOT EXECUTED
125cb2: 5e pop %esi <== NOT EXECUTED
125cb3: 5f pop %edi <== NOT EXECUTED
125cb4: c9 leave <== NOT EXECUTED
125cb5: c3 ret <== NOT EXECUTED
125cb6: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
125cb8: 89 d0 mov %edx,%eax <== NOT EXECUTED
125cba: eb 85 jmp 125c41 <msdos_initialize_support+0xc9><== NOT EXECUTED
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
if (rc != RC_OK)
{
fat_shutdown_drive(temp_mt_entry);
125cbc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
{
rc = fat_file_size(temp_mt_entry, fat_fd);
if ( rc != RC_OK )
{
fat_file_close(temp_mt_entry, fat_fd);
fat_shutdown_drive(temp_mt_entry);
125cbf: 56 push %esi <== NOT EXECUTED
125cc0: e8 a3 60 00 00 call 12bd68 <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
125cc5: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
125cc8: e8 9b 8b fe ff call 10e868 <free> <== NOT EXECUTED
return rc;
125ccd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
}
125cd0: 89 f8 mov %edi,%eax <== NOT EXECUTED
125cd2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
125cd5: 5b pop %ebx <== NOT EXECUTED
125cd6: 5e pop %esi <== NOT EXECUTED
125cd7: 5f pop %edi <== NOT EXECUTED
125cd8: c9 leave <== NOT EXECUTED
125cd9: c3 ret <== NOT EXECUTED
125cda: 66 90 xchg %ax,%ax <== NOT EXECUTED
fs_info->fat.vol.bpc :
fs_info->fat.vol.rdir_size;
}
else
{
rc = fat_file_size(temp_mt_entry, fat_fd);
125cdc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
125cdf: 50 push %eax <== NOT EXECUTED
125ce0: 56 push %esi <== NOT EXECUTED
125ce1: e8 76 4d 00 00 call 12aa5c <fat_file_size> <== NOT EXECUTED
125ce6: 89 c7 mov %eax,%edi <== NOT EXECUTED
if ( rc != RC_OK )
125ce8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125ceb: 85 c0 test %eax,%eax <== NOT EXECUTED
125ced: 75 09 jne 125cf8 <msdos_initialize_support+0x180><== NOT EXECUTED
fat_file_close(temp_mt_entry, fat_fd);
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
125cef: 0f b7 43 06 movzwl 0x6(%ebx),%eax <== NOT EXECUTED
125cf3: e9 49 ff ff ff jmp 125c41 <msdos_initialize_support+0xc9><== NOT EXECUTED
else
{
rc = fat_file_size(temp_mt_entry, fat_fd);
if ( rc != RC_OK )
{
fat_file_close(temp_mt_entry, fat_fd);
125cf8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
125cfb: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
125cfe: 56 push %esi <== NOT EXECUTED
125cff: e8 ac 57 00 00 call 12b4b0 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
125d04: 5a pop %edx <== NOT EXECUTED
125d05: eb b8 jmp 125cbf <msdos_initialize_support+0x147><== NOT EXECUTED
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
{
fat_file_close(temp_mt_entry, fat_fd);
125d07: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
125d0a: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
125d0d: 56 push %esi <== NOT EXECUTED
125d0e: e8 9d 57 00 00 call 12b4b0 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
125d13: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
125d16: e8 4d 60 00 00 call 12bd68 <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info->cl_buf);
125d1b: 58 pop %eax <== NOT EXECUTED
125d1c: ff b3 98 00 00 00 pushl 0x98(%ebx) <== NOT EXECUTED
125d22: e8 41 8b fe ff call 10e868 <free> <== NOT EXECUTED
free(fs_info);
125d27: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
125d2a: e8 39 8b fe ff call 10e868 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
125d2f: e8 4c 1e 02 00 call 147b80 <__errno> <== NOT EXECUTED
125d34: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
125d3a: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
125d3f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125d42: e9 4c ff ff ff jmp 125c93 <msdos_initialize_support+0x11b><== NOT EXECUTED
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
if (!fs_info)
rtems_set_errno_and_return_minus_one(ENOMEM);
125d47: e8 34 1e 02 00 call 147b80 <__errno> <== NOT EXECUTED
125d4c: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
125d52: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
125d57: e9 37 ff ff ff jmp 125c93 <msdos_initialize_support+0x11b><== NOT EXECUTED
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
if (fs_info->cl_buf == NULL)
{
fat_file_close(temp_mt_entry, fat_fd);
125d5c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
125d5f: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
125d62: 56 push %esi <== NOT EXECUTED
125d63: e8 48 57 00 00 call 12b4b0 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
125d68: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
125d6b: e8 f8 5f 00 00 call 12bd68 <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
125d70: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
125d73: e8 f0 8a fe ff call 10e868 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
125d78: e8 03 1e 02 00 call 147b80 <__errno> <== NOT EXECUTED
125d7d: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
125d83: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
125d88: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125d8b: e9 03 ff ff ff jmp 125c93 <msdos_initialize_support+0x11b><== NOT EXECUTED
0013c788 <msdos_is_valid_name_char>:
* MSDOS_NAME_LONG - Valid in a long name only.
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
13c788: 55 push %ebp <== NOT EXECUTED
13c789: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13c78b: 56 push %esi <== NOT EXECUTED
13c78c: 53 push %ebx <== NOT EXECUTED
13c78d: 88 c3 mov %al,%bl <== NOT EXECUTED
if (strchr(" +,;=[]", ch) != NULL)
13c78f: 0f be f0 movsbl %al,%esi <== NOT EXECUTED
13c792: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13c795: 56 push %esi <== NOT EXECUTED
13c796: 68 ef 8f 16 00 push $0x168fef <== NOT EXECUTED
13c79b: e8 90 0b 01 00 call 14d330 <strchr> <== NOT EXECUTED
13c7a0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13c7a3: 85 c0 test %eax,%eax <== NOT EXECUTED
13c7a5: 74 0d je 13c7b4 <msdos_is_valid_name_char+0x2c><== NOT EXECUTED
13c7a7: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED
if ((ch == '.') || isalnum((unsigned char)ch) ||
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
return MSDOS_NAME_SHORT;
return MSDOS_NAME_INVALID;
}
13c7ac: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
13c7af: 5b pop %ebx <== NOT EXECUTED
13c7b0: 5e pop %esi <== NOT EXECUTED
13c7b1: c9 leave <== NOT EXECUTED
13c7b2: c3 ret <== NOT EXECUTED
13c7b3: 90 nop <== NOT EXECUTED
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
13c7b4: 80 fb 2e cmp $0x2e,%bl <== NOT EXECUTED
13c7b7: 74 2f je 13c7e8 <msdos_is_valid_name_char+0x60><== NOT EXECUTED
13c7b9: 0f b6 db movzbl %bl,%ebx <== NOT EXECUTED
13c7bc: a1 48 fb 16 00 mov 0x16fb48,%eax <== NOT EXECUTED
13c7c1: f6 44 18 01 07 testb $0x7,0x1(%eax,%ebx,1) <== NOT EXECUTED
13c7c6: 75 20 jne 13c7e8 <msdos_is_valid_name_char+0x60><== NOT EXECUTED
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
13c7c8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13c7cb: 56 push %esi <== NOT EXECUTED
13c7cc: 68 f7 8f 16 00 push $0x168ff7 <== NOT EXECUTED
13c7d1: e8 5a 0b 01 00 call 14d330 <strchr> <== NOT EXECUTED
13c7d6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13c7d9: 85 c0 test %eax,%eax <== NOT EXECUTED
13c7db: 0f 95 c0 setne %al <== NOT EXECUTED
13c7de: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
return MSDOS_NAME_SHORT;
return MSDOS_NAME_INVALID;
}
13c7e1: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
13c7e4: 5b pop %ebx <== NOT EXECUTED
13c7e5: 5e pop %esi <== NOT EXECUTED
13c7e6: c9 leave <== NOT EXECUTED
13c7e7: c3 ret <== NOT EXECUTED
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
13c7e8: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return MSDOS_NAME_SHORT;
return MSDOS_NAME_INVALID;
}
13c7ed: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
13c7f0: 5b pop %ebx <== NOT EXECUTED
13c7f1: 5e pop %esi <== NOT EXECUTED
13c7f2: c9 leave <== NOT EXECUTED
13c7f3: c3 ret <== NOT EXECUTED
0013c8cc <msdos_long_to_short>:
*
*/
#define MSDOS_L2S_PRINT 0
msdos_name_type_t
msdos_long_to_short(const char *lfn, int lfn_len, char* sfn, int sfn_len)
{
13c8cc: 55 push %ebp <== NOT EXECUTED
13c8cd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13c8cf: 57 push %edi <== NOT EXECUTED
13c8d0: 56 push %esi <== NOT EXECUTED
13c8d1: 53 push %ebx <== NOT EXECUTED
13c8d2: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
13c8d5: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
13c8d8: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
13c8db: b0 20 mov $0x20,%al <== NOT EXECUTED
13c8dd: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
13c8e0: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
13c8e2: 8a 13 mov (%ebx),%dl <== NOT EXECUTED
13c8e4: 80 fa 2e cmp $0x2e,%dl <== NOT EXECUTED
13c8e7: 0f 84 f7 00 00 00 je 13c9e4 <msdos_long_to_short+0x118><== NOT EXECUTED
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
13c8ed: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
13c8f0: 85 c0 test %eax,%eax <== NOT EXECUTED
13c8f2: 0f 8e 64 01 00 00 jle 13ca5c <msdos_long_to_short+0x190><== NOT EXECUTED
{
sfn[0] = sfn[1] = '.';
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
13c8f8: 31 c0 xor %eax,%eax <== NOT EXECUTED
13c8fa: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
13c8fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
13c900: 8a 0c 03 mov (%ebx,%eax,1),%cl <== NOT EXECUTED
13c903: 80 f9 20 cmp $0x20,%cl <== NOT EXECUTED
13c906: 74 05 je 13c90d <msdos_long_to_short+0x41><== NOT EXECUTED
13c908: 80 f9 2e cmp $0x2e,%cl <== NOT EXECUTED
13c90b: 75 0e jne 13c91b <msdos_long_to_short+0x4f><== NOT EXECUTED
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
13c90d: 40 inc %eax <== NOT EXECUTED
13c90e: 39 c6 cmp %eax,%esi <== NOT EXECUTED
13c910: 7f ee jg 13c900 <msdos_long_to_short+0x34><== NOT EXECUTED
if ((lfn[i] != ' ') && (lfn[i] != '.'))
break;
if (i == lfn_len)
13c912: 3b 45 0c cmp 0xc(%ebp),%eax <== NOT EXECUTED
13c915: 0f 84 15 01 00 00 je 13ca30 <msdos_long_to_short+0x164><== NOT EXECUTED
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
13c91b: 84 d2 test %dl,%dl <== NOT EXECUTED
13c91d: 0f 84 ed 00 00 00 je 13ca10 <msdos_long_to_short+0x144><== NOT EXECUTED
13c923: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED
13c926: 85 ff test %edi,%edi <== NOT EXECUTED
13c928: 0f 8e e2 00 00 00 jle 13ca10 <msdos_long_to_short+0x144><== NOT EXECUTED
13c92e: c6 45 e3 00 movb $0x0,-0x1d(%ebp) <== NOT EXECUTED
13c932: c6 45 e2 00 movb $0x0,-0x1e(%ebp) <== NOT EXECUTED
13c936: 31 f6 xor %esi,%esi <== NOT EXECUTED
13c938: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
13c93d: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED
13c940: 88 d3 mov %dl,%bl <== NOT EXECUTED
13c942: eb 31 jmp 13c975 <msdos_long_to_short+0xa9><== NOT EXECUTED
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
return type;
if (dot_at >= 0)
{
if (is_dot || ((count - dot_at) > 3))
13c944: 84 c0 test %al,%al <== NOT EXECUTED
13c946: 0f 85 90 00 00 00 jne 13c9dc <msdos_long_to_short+0x110><== NOT EXECUTED
13c94c: 89 f0 mov %esi,%eax <== NOT EXECUTED
13c94e: 29 f8 sub %edi,%eax <== NOT EXECUTED
13c950: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
13c953: 0f 8f 83 00 00 00 jg 13c9dc <msdos_long_to_short+0x110><== NOT EXECUTED
}
}
if (is_dot)
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
13c959: 8d 43 bf lea -0x41(%ebx),%eax <== NOT EXECUTED
13c95c: 3c 19 cmp $0x19,%al <== NOT EXECUTED
13c95e: 77 68 ja 13c9c8 <msdos_long_to_short+0xfc><== NOT EXECUTED
13c960: c6 45 e3 01 movb $0x1,-0x1d(%ebp) <== NOT EXECUTED
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
13c964: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13c967: 8a 5c 30 01 mov 0x1(%eax,%esi,1),%bl <== NOT EXECUTED
13c96b: 84 db test %bl,%bl <== NOT EXECUTED
13c96d: 74 40 je 13c9af <msdos_long_to_short+0xe3><== NOT EXECUTED
else if ((*name >= 'A') && (*name <= 'Z'))
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
lowercase = true;
count++;
13c96f: 46 inc %esi <== NOT EXECUTED
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
13c970: 39 75 0c cmp %esi,0xc(%ebp) <== NOT EXECUTED
13c973: 7e 3a jle 13c9af <msdos_long_to_short+0xe3><== NOT EXECUTED
{
bool is_dot = *name == '.';
msdos_name_type_t type = msdos_is_valid_name_char(*name);
13c975: 0f be c3 movsbl %bl,%eax <== NOT EXECUTED
13c978: e8 0b fe ff ff call 13c788 <msdos_is_valid_name_char><== NOT EXECUTED
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: c:%02x type:%d\n", *name, type);
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
13c97d: 85 c0 test %eax,%eax <== NOT EXECUTED
13c97f: 0f 84 b7 00 00 00 je 13ca3c <msdos_long_to_short+0x170><== NOT EXECUTED
13c985: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
13c988: 0f 84 ba 00 00 00 je 13ca48 <msdos_long_to_short+0x17c><== NOT EXECUTED
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
{
bool is_dot = *name == '.';
13c98e: 80 fb 2e cmp $0x2e,%bl <== NOT EXECUTED
13c991: 0f 94 c0 sete %al <== NOT EXECUTED
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
return type;
if (dot_at >= 0)
13c994: 83 ff ff cmp $0xffffffff,%edi <== NOT EXECUTED
13c997: 75 ab jne 13c944 <msdos_long_to_short+0x78><== NOT EXECUTED
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
13c999: 83 fe 08 cmp $0x8,%esi <== NOT EXECUTED
13c99c: 74 3a je 13c9d8 <msdos_long_to_short+0x10c><== NOT EXECUTED
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
13c99e: 84 c0 test %al,%al <== NOT EXECUTED
13c9a0: 74 b7 je 13c959 <msdos_long_to_short+0x8d><== NOT EXECUTED
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
13c9a2: 89 f7 mov %esi,%edi <== NOT EXECUTED
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
13c9a4: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13c9a7: 8a 5c 30 01 mov 0x1(%eax,%esi,1),%bl <== NOT EXECUTED
13c9ab: 84 db test %bl,%bl <== NOT EXECUTED
13c9ad: 75 c0 jne 13c96f <msdos_long_to_short+0xa3><== NOT EXECUTED
13c9af: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED
count++;
name++;
}
if (lowercase && uppercase)
13c9b2: 80 7d e2 00 cmpb $0x0,-0x1e(%ebp) <== NOT EXECUTED
13c9b6: 74 58 je 13ca10 <msdos_long_to_short+0x144><== NOT EXECUTED
13c9b8: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) <== NOT EXECUTED
13c9bc: 74 52 je 13ca10 <msdos_long_to_short+0x144><== NOT EXECUTED
13c9be: bf 02 00 00 00 mov $0x2,%edi <== NOT EXECUTED
13c9c3: eb 50 jmp 13ca15 <msdos_long_to_short+0x149><== NOT EXECUTED
13c9c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (is_dot)
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
13c9c8: 83 eb 61 sub $0x61,%ebx <== NOT EXECUTED
13c9cb: 80 fb 19 cmp $0x19,%bl <== NOT EXECUTED
13c9ce: 77 94 ja 13c964 <msdos_long_to_short+0x98><== NOT EXECUTED
13c9d0: c6 45 e2 01 movb $0x1,-0x1e(%ebp) <== NOT EXECUTED
13c9d4: eb 8e jmp 13c964 <msdos_long_to_short+0x98><== NOT EXECUTED
13c9d6: 66 90 xchg %ax,%ax <== NOT EXECUTED
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
13c9d8: 84 c0 test %al,%al <== NOT EXECUTED
13c9da: 75 c6 jne 13c9a2 <msdos_long_to_short+0xd6><== NOT EXECUTED
13c9dc: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED
13c9df: eb dd jmp 13c9be <msdos_long_to_short+0xf2><== NOT EXECUTED
13c9e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
memset (sfn, ' ', sfn_len);
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
13c9e4: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) <== NOT EXECUTED
13c9e8: 74 65 je 13ca4f <msdos_long_to_short+0x183><== NOT EXECUTED
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
13c9ea: 80 7b 01 2e cmpb $0x2e,0x1(%ebx) <== NOT EXECUTED
13c9ee: 0f 85 f9 fe ff ff jne 13c8ed <msdos_long_to_short+0x21><== NOT EXECUTED
13c9f4: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) <== NOT EXECUTED
13c9f8: 0f 85 ef fe ff ff jne 13c8ed <msdos_long_to_short+0x21><== NOT EXECUTED
{
sfn[0] = sfn[1] = '.';
13c9fe: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
13ca01: c6 40 01 2e movb $0x2e,0x1(%eax) <== NOT EXECUTED
13ca05: c6 00 2e movb $0x2e,(%eax) <== NOT EXECUTED
13ca08: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
13ca0d: eb 16 jmp 13ca25 <msdos_long_to_short+0x159><== NOT EXECUTED
13ca0f: 90 nop <== NOT EXECUTED
count++;
name++;
}
if (lowercase && uppercase)
13ca10: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
}
msdos_filename_unix2dos (lfn, lfn_len, sfn);
13ca15: 56 push %esi <== NOT EXECUTED
13ca16: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13ca19: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13ca1c: 53 push %ebx <== NOT EXECUTED
13ca1d: e8 de 96 00 00 call 146100 <msdos_filename_unix2dos><== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
13ca22: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13ca25: 89 f8 mov %edi,%eax <== NOT EXECUTED
13ca27: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13ca2a: 5b pop %ebx <== NOT EXECUTED
13ca2b: 5e pop %esi <== NOT EXECUTED
13ca2c: 5f pop %edi <== NOT EXECUTED
13ca2d: c9 leave <== NOT EXECUTED
13ca2e: c3 ret <== NOT EXECUTED
13ca2f: 90 nop <== NOT EXECUTED
count++;
name++;
}
if (lowercase && uppercase)
13ca30: 31 ff xor %edi,%edi <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
13ca32: 89 f8 mov %edi,%eax <== NOT EXECUTED
13ca34: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13ca37: 5b pop %ebx <== NOT EXECUTED
13ca38: 5e pop %esi <== NOT EXECUTED
13ca39: 5f pop %edi <== NOT EXECUTED
13ca3a: c9 leave <== NOT EXECUTED
13ca3b: c3 ret <== NOT EXECUTED
13ca3c: 89 c7 mov %eax,%edi <== NOT EXECUTED
13ca3e: 89 f8 mov %edi,%eax <== NOT EXECUTED
13ca40: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13ca43: 5b pop %ebx <== NOT EXECUTED
13ca44: 5e pop %esi <== NOT EXECUTED
13ca45: 5f pop %edi <== NOT EXECUTED
13ca46: c9 leave <== NOT EXECUTED
13ca47: c3 ret <== NOT EXECUTED
13ca48: 89 c7 mov %eax,%edi <== NOT EXECUTED
13ca4a: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED
13ca4d: eb c6 jmp 13ca15 <msdos_long_to_short+0x149><== NOT EXECUTED
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
{
sfn[0] = '.';
13ca4f: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
13ca52: c6 00 2e movb $0x2e,(%eax) <== NOT EXECUTED
13ca55: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
13ca5a: eb c9 jmp 13ca25 <msdos_long_to_short+0x159><== NOT EXECUTED
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
13ca5c: 31 c0 xor %eax,%eax <== NOT EXECUTED
13ca5e: e9 af fe ff ff jmp 13c912 <msdos_long_to_short+0x46><== NOT EXECUTED
00125d90 <msdos_mknod>:
const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
125d90: 55 push %ebp <== NOT EXECUTED
125d91: 89 e5 mov %esp,%ebp <== NOT EXECUTED
125d93: 57 push %edi <== NOT EXECUTED
125d94: 56 push %esi <== NOT EXECUTED
125d95: 53 push %ebx <== NOT EXECUTED
125d96: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
125d99: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
125d9c: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
125d9f: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED
msdos_token_types_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
125da2: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
125da5: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
125daa: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
125daf: 74 6b je 125e1c <msdos_mknod+0x8c> <== NOT EXECUTED
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
125db1: 3d 00 80 00 00 cmp $0x8000,%eax <== NOT EXECUTED
125db6: 0f 85 80 00 00 00 jne 125e3c <msdos_mknod+0xac> <== NOT EXECUTED
125dbc: c7 45 e4 05 00 00 00 movl $0x5,-0x1c(%ebp) <== NOT EXECUTED
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
125dc3: 50 push %eax <== NOT EXECUTED
125dc4: 6a 00 push $0x0 <== NOT EXECUTED
125dc6: 6a 00 push $0x0 <== NOT EXECUTED
125dc8: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
125dce: e8 25 d1 fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
125dd3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125dd6: 85 c0 test %eax,%eax <== NOT EXECUTED
125dd8: 75 4e jne 125e28 <msdos_mknod+0x98> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* Create an MSDOS node */
rc = msdos_creat_node(pathloc, type, name, strlen(name), mode, NULL);
125dda: 31 c0 xor %eax,%eax <== NOT EXECUTED
125ddc: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
125de1: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
125de4: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
125de6: f7 d1 not %ecx <== NOT EXECUTED
125de8: 49 dec %ecx <== NOT EXECUTED
125de9: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
125dec: 6a 00 push $0x0 <== NOT EXECUTED
125dee: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
125df1: 51 push %ecx <== NOT EXECUTED
125df2: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
125df5: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
125df8: 53 push %ebx <== NOT EXECUTED
125df9: e8 da 4a 01 00 call 13a8d8 <msdos_creat_node> <== NOT EXECUTED
125dfe: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
125e00: 83 c4 14 add $0x14,%esp <== NOT EXECUTED
125e03: ff b6 94 00 00 00 pushl 0x94(%esi) <== NOT EXECUTED
125e09: e8 e6 d1 fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
125e0e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
125e11: 89 d8 mov %ebx,%eax <== NOT EXECUTED
125e13: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
125e16: 5b pop %ebx <== NOT EXECUTED
125e17: 5e pop %esi <== NOT EXECUTED
125e18: 5f pop %edi <== NOT EXECUTED
125e19: c9 leave <== NOT EXECUTED
125e1a: c3 ret <== NOT EXECUTED
125e1b: 90 nop <== NOT EXECUTED
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
125e1c: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) <== NOT EXECUTED
125e23: eb 9e jmp 125dc3 <msdos_mknod+0x33> <== NOT EXECUTED
125e25: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
125e28: e8 53 1d 02 00 call 147b80 <__errno> <== NOT EXECUTED
125e2d: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
125e33: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
125e38: eb d7 jmp 125e11 <msdos_mknod+0x81> <== NOT EXECUTED
125e3a: 66 90 xchg %ax,%ax <== NOT EXECUTED
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
125e3c: e8 3f 1d 02 00 call 147b80 <__errno> <== NOT EXECUTED
125e41: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
125e47: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
125e4c: eb c3 jmp 125e11 <msdos_mknod+0x81> <== NOT EXECUTED
00125e50 <msdos_node_type>:
* node type
*
*/
rtems_filesystem_node_types_t
msdos_node_type(rtems_filesystem_location_info_t *pathloc)
{
125e50: 55 push %ebp <== NOT EXECUTED
125e51: 89 e5 mov %esp,%ebp <== NOT EXECUTED
125e53: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
125e56: 8b 00 mov (%eax),%eax <== NOT EXECUTED
125e58: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED
* call
*/
fat_fd = pathloc->node_access;
return fat_fd->fat_file_type;
}
125e5b: c9 leave <== NOT EXECUTED
125e5c: c3 ret <== NOT EXECUTED
00125e60 <msdos_rename>:
int
msdos_rename(rtems_filesystem_location_info_t *old_parent_loc,
rtems_filesystem_location_info_t *old_loc,
rtems_filesystem_location_info_t *new_parent_loc,
const char *new_name)
{
125e60: 55 push %ebp <== NOT EXECUTED
125e61: 89 e5 mov %esp,%ebp <== NOT EXECUTED
125e63: 57 push %edi <== NOT EXECUTED
125e64: 56 push %esi <== NOT EXECUTED
125e65: 53 push %ebx <== NOT EXECUTED
125e66: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
125e69: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
125e6c: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = new_parent_loc->mt_entry->fs_info;
125e6f: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED
125e72: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
125e75: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
fat_file_fd_t *old_fat_fd = old_loc->node_access;
125e78: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
125e7b: 8b 00 mov (%eax),%eax <== NOT EXECUTED
125e7d: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
int len;
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
125e80: 31 c0 xor %eax,%eax <== NOT EXECUTED
125e82: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
125e87: 89 df mov %ebx,%edi <== NOT EXECUTED
125e89: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
125e8b: f7 d1 not %ecx <== NOT EXECUTED
125e8d: 49 dec %ecx <== NOT EXECUTED
125e8e: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
125e91: 50 push %eax <== NOT EXECUTED
125e92: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
125e95: 50 push %eax <== NOT EXECUTED
125e96: 51 push %ecx <== NOT EXECUTED
125e97: 53 push %ebx <== NOT EXECUTED
125e98: e8 57 69 01 00 call 13c7f4 <msdos_get_token> <== NOT EXECUTED
125e9d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125ea0: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
125ea3: 0f 85 97 00 00 00 jne 125f40 <msdos_rename+0xe0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
}
/*
* lock volume
*/
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
125ea9: 51 push %ecx <== NOT EXECUTED
125eaa: 6a 00 push $0x0 <== NOT EXECUTED
125eac: 6a 00 push $0x0 <== NOT EXECUTED
125eae: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
125eb1: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
125eb7: e8 3c d0 fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
125ebc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
125ebf: 85 c0 test %eax,%eax <== NOT EXECUTED
125ec1: 0f 85 8d 00 00 00 jne 125f54 <msdos_rename+0xf4> <== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
125ec7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
125eca: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
125ecd: 68 00 80 00 00 push $0x8000 <== NOT EXECUTED
125ed2: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
125ed5: 53 push %ebx <== NOT EXECUTED
125ed6: 6a 03 push $0x3 <== NOT EXECUTED
125ed8: 56 push %esi <== NOT EXECUTED
125ed9: e8 fa 49 01 00 call 13a8d8 <msdos_creat_node> <== NOT EXECUTED
125ede: 89 c3 mov %eax,%ebx <== NOT EXECUTED
MSDOS_HARD_LINK,new_name,len,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
125ee0: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
125ee3: 85 c0 test %eax,%eax <== NOT EXECUTED
125ee5: 75 39 jne 125f20 <msdos_rename+0xc0> <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
125ee7: 52 push %edx <== NOT EXECUTED
125ee8: 68 e5 00 00 00 push $0xe5 <== NOT EXECUTED
125eed: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
125ef0: 83 c0 20 add $0x20,%eax <== NOT EXECUTED
125ef3: 50 push %eax <== NOT EXECUTED
125ef4: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
125ef7: ff 70 10 pushl 0x10(%eax) <== NOT EXECUTED
125efa: e8 89 66 01 00 call 13c588 <msdos_set_first_char4file_name><== NOT EXECUTED
125eff: 89 c3 mov %eax,%ebx <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
rtems_semaphore_release(fs_info->vol_sema);
125f01: 58 pop %eax <== NOT EXECUTED
125f02: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
125f05: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
125f0b: e8 e4 d0 fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
125f10: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
125f13: 89 d8 mov %ebx,%eax <== NOT EXECUTED
125f15: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
125f18: 5b pop %ebx <== NOT EXECUTED
125f19: 5e pop %esi <== NOT EXECUTED
125f1a: 5f pop %edi <== NOT EXECUTED
125f1b: c9 leave <== NOT EXECUTED
125f1c: c3 ret <== NOT EXECUTED
125f1d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rc = msdos_creat_node(new_parent_loc,
MSDOS_HARD_LINK,new_name,len,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
125f20: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
125f23: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
125f26: ff b0 94 00 00 00 pushl 0x94(%eax) <== NOT EXECUTED
125f2c: e8 c3 d0 fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
125f31: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
125f34: 89 d8 mov %ebx,%eax <== NOT EXECUTED
125f36: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
125f39: 5b pop %ebx <== NOT EXECUTED
125f3a: 5e pop %esi <== NOT EXECUTED
125f3b: 5f pop %edi <== NOT EXECUTED
125f3c: c9 leave <== NOT EXECUTED
125f3d: c3 ret <== NOT EXECUTED
125f3e: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
125f40: e8 3b 1c 02 00 call 147b80 <__errno> <== NOT EXECUTED
125f45: c7 00 5b 00 00 00 movl $0x5b,(%eax) <== NOT EXECUTED
125f4b: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
125f50: eb c1 jmp 125f13 <msdos_rename+0xb3> <== NOT EXECUTED
125f52: 66 90 xchg %ax,%ax <== NOT EXECUTED
* lock volume
*/
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
125f54: e8 27 1c 02 00 call 147b80 <__errno> <== NOT EXECUTED
125f59: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
125f5f: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
125f64: eb ad jmp 125f13 <msdos_rename+0xb3> <== NOT EXECUTED
0013c6dc <msdos_set_dir_wrt_time_and_date>:
int
msdos_set_dir_wrt_time_and_date(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
13c6dc: 55 push %ebp <== NOT EXECUTED
13c6dd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13c6df: 57 push %edi <== NOT EXECUTED
13c6e0: 56 push %esi <== NOT EXECUTED
13c6e1: 53 push %ebx <== NOT EXECUTED
13c6e2: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED
13c6e5: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
13c6e8: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
13c6eb: 8b 7b 34 mov 0x34(%ebx),%edi <== NOT EXECUTED
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
13c6ee: 8d 45 e6 lea -0x1a(%ebp),%eax <== NOT EXECUTED
13c6f1: 50 push %eax <== NOT EXECUTED
13c6f2: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
13c6f5: 50 push %eax <== NOT EXECUTED
13c6f6: ff 76 40 pushl 0x40(%esi) <== NOT EXECUTED
13c6f9: e8 d6 97 00 00 call 145ed4 <msdos_date_unix2dos> <== NOT EXECUTED
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
13c6fe: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
fat_cluster_num_to_sector_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
13c701: 8b 53 34 mov 0x34(%ebx),%edx <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
13c704: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13c707: 85 c0 test %eax,%eax <== NOT EXECUTED
13c709: 75 06 jne 13c711 <msdos_set_dir_wrt_time_and_date+0x35><== NOT EXECUTED
13c70b: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED
13c70f: 75 67 jne 13c778 <msdos_set_dir_wrt_time_and_date+0x9c><== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
13c711: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED
13c714: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED
13c718: d3 e0 shl %cl,%eax <== NOT EXECUTED
13c71a: 03 42 30 add 0x30(%edx),%eax <== NOT EXECUTED
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
13c71d: 8b 56 24 mov 0x24(%esi),%edx <== NOT EXECUTED
13c720: 0f b6 4f 02 movzbl 0x2(%edi),%ecx <== NOT EXECUTED
13c724: 89 d6 mov %edx,%esi <== NOT EXECUTED
13c726: d3 ee shr %cl,%esi <== NOT EXECUTED
13c728: 8d 34 30 lea (%eax,%esi,1),%esi <== NOT EXECUTED
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
13c72b: 0f b7 3f movzwl (%edi),%edi <== NOT EXECUTED
13c72e: 4f dec %edi <== NOT EXECUTED
13c72f: 21 d7 and %edx,%edi <== NOT EXECUTED
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
13c731: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13c734: 8d 45 e6 lea -0x1a(%ebp),%eax <== NOT EXECUTED
13c737: 50 push %eax <== NOT EXECUTED
13c738: 6a 02 push $0x2 <== NOT EXECUTED
13c73a: 8d 47 16 lea 0x16(%edi),%eax <== NOT EXECUTED
13c73d: 50 push %eax <== NOT EXECUTED
13c73e: 56 push %esi <== NOT EXECUTED
13c73f: 53 push %ebx <== NOT EXECUTED
13c740: e8 0b f5 fe ff call 12bc50 <_fat_block_write> <== NOT EXECUTED
13c745: 89 c2 mov %eax,%edx <== NOT EXECUTED
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
13c747: 83 c4 14 add $0x14,%esp <== NOT EXECUTED
13c74a: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
13c74d: 50 push %eax <== NOT EXECUTED
13c74e: 6a 02 push $0x2 <== NOT EXECUTED
13c750: 83 c7 18 add $0x18,%edi <== NOT EXECUTED
13c753: 57 push %edi <== NOT EXECUTED
13c754: 56 push %esi <== NOT EXECUTED
13c755: 53 push %ebx <== NOT EXECUTED
13c756: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
13c759: e8 f2 f4 fe ff call 12bc50 <_fat_block_write> <== NOT EXECUTED
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) )
13c75e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13c761: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
13c764: 85 d2 test %edx,%edx <== NOT EXECUTED
13c766: 79 18 jns 13c780 <msdos_set_dir_wrt_time_and_date+0xa4><== NOT EXECUTED
13c768: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
return RC_OK;
}
13c76d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13c770: 5b pop %ebx <== NOT EXECUTED
13c771: 5e pop %esi <== NOT EXECUTED
13c772: 5f pop %edi <== NOT EXECUTED
13c773: c9 leave <== NOT EXECUTED
13c774: c3 ret <== NOT EXECUTED
13c775: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
13c778: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
13c77b: eb a0 jmp 13c71d <msdos_set_dir_wrt_time_and_date+0x41><== NOT EXECUTED
13c77d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) )
13c780: 85 c0 test %eax,%eax <== NOT EXECUTED
13c782: 78 e4 js 13c768 <msdos_set_dir_wrt_time_and_date+0x8c><== NOT EXECUTED
13c784: 31 c0 xor %eax,%eax <== NOT EXECUTED
13c786: eb e5 jmp 13c76d <msdos_set_dir_wrt_time_and_date+0x91><== NOT EXECUTED
0013c468 <msdos_set_file_size>:
int
msdos_set_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
13c468: 55 push %ebp <== NOT EXECUTED
13c469: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13c46b: 57 push %edi <== NOT EXECUTED
13c46c: 56 push %esi <== NOT EXECUTED
13c46d: 53 push %ebx <== NOT EXECUTED
13c46e: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
13c471: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
13c474: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
13c477: 8b 46 34 mov 0x34(%esi),%eax <== NOT EXECUTED
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
13c47a: 8b 53 20 mov 0x20(%ebx),%edx <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
13c47d: 85 d2 test %edx,%edx <== NOT EXECUTED
13c47f: 75 06 jne 13c487 <msdos_set_file_size+0x1f><== NOT EXECUTED
13c481: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED
13c485: 75 49 jne 13c4d0 <msdos_set_file_size+0x68><== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
13c487: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED
13c48a: 0f b6 48 05 movzbl 0x5(%eax),%ecx <== NOT EXECUTED
13c48e: d3 e2 shl %cl,%edx <== NOT EXECUTED
13c490: 03 50 30 add 0x30(%eax),%edx <== NOT EXECUTED
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
13c493: 0f b6 48 02 movzbl 0x2(%eax),%ecx <== NOT EXECUTED
13c497: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED
13c49a: d3 ef shr %cl,%edi <== NOT EXECUTED
13c49c: 01 fa add %edi,%edx <== NOT EXECUTED
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
13c49e: 0f b7 00 movzwl (%eax),%eax <== NOT EXECUTED
13c4a1: 48 dec %eax <== NOT EXECUTED
13c4a2: 23 43 24 and 0x24(%ebx),%eax <== NOT EXECUTED
le_new_length = CT_LE_L((fat_fd->fat_file_size));
13c4a5: 8b 4b 18 mov 0x18(%ebx),%ecx <== NOT EXECUTED
13c4a8: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
13c4ab: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13c4ae: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED
13c4b1: 51 push %ecx <== NOT EXECUTED
13c4b2: 6a 04 push $0x4 <== NOT EXECUTED
13c4b4: 83 c0 1c add $0x1c,%eax <== NOT EXECUTED
13c4b7: 50 push %eax <== NOT EXECUTED
13c4b8: 52 push %edx <== NOT EXECUTED
13c4b9: 56 push %esi <== NOT EXECUTED
13c4ba: e8 91 f7 fe ff call 12bc50 <_fat_block_write> <== NOT EXECUTED
(char *)(&le_new_length));
if ( ret < 0 )
13c4bf: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13c4c2: c1 f8 1f sar $0x1f,%eax <== NOT EXECUTED
return -1;
return RC_OK;
}
13c4c5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13c4c8: 5b pop %ebx <== NOT EXECUTED
13c4c9: 5e pop %esi <== NOT EXECUTED
13c4ca: 5f pop %edi <== NOT EXECUTED
13c4cb: c9 leave <== NOT EXECUTED
13c4cc: c3 ret <== NOT EXECUTED
13c4cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
13c4d0: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
13c4d3: eb be jmp 13c493 <msdos_set_file_size+0x2b><== NOT EXECUTED
0013c588 <msdos_set_first_char4file_name>:
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
13c588: 55 push %ebp <== NOT EXECUTED
13c589: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13c58b: 57 push %edi <== NOT EXECUTED
13c58c: 56 push %esi <== NOT EXECUTED
13c58d: 53 push %ebx <== NOT EXECUTED
13c58e: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
13c591: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
13c594: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
13c597: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
13c59a: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13c59d: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED
13c5a0: 89 df mov %ebx,%edi <== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
13c5a2: 8b 50 08 mov 0x8(%eax),%edx <== NOT EXECUTED
13c5a5: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
13c5a8: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
13c5ab: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
fat_pos_t end = dir_pos->sname;
13c5ae: 8b 48 04 mov 0x4(%eax),%ecx <== NOT EXECUTED
13c5b1: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED
13c5b4: 8b 10 mov (%eax),%edx <== NOT EXECUTED
13c5b6: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
13c5b9: 39 53 38 cmp %edx,0x38(%ebx) <== NOT EXECUTED
13c5bc: 0f 84 02 01 00 00 je 13c6c4 <msdos_set_first_char4file_name+0x13c><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
13c5c2: 0f b7 53 06 movzwl 0x6(%ebx),%edx <== NOT EXECUTED
13c5c6: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
13c5c9: 83 78 08 ff cmpl $0xffffffff,0x8(%eax) <== NOT EXECUTED
13c5cd: 0f 84 e1 00 00 00 je 13c6b4 <msdos_set_first_char4file_name+0x12c><== NOT EXECUTED
start = dir_pos->sname;
13c5d3: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13c5d6: 8a 4b 02 mov 0x2(%ebx),%cl <== NOT EXECUTED
13c5d9: 88 4d d3 mov %cl,-0x2d(%ebp) <== NOT EXECUTED
13c5dc: 8b 33 mov (%ebx),%esi <== NOT EXECUTED
13c5de: eb 59 jmp 13c639 <msdos_set_first_char4file_name+0xb1><== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
13c5e0: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED
13c5e4: 74 5a je 13c640 <msdos_set_first_char4file_name+0xb8><== NOT EXECUTED
return fs_info->vol.rdir_loc;
13c5e6: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
13c5e9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13c5ec: 8d 4d d4 lea -0x2c(%ebp),%ecx <== NOT EXECUTED
13c5ef: 51 push %ecx <== NOT EXECUTED
13c5f0: 6a 01 push $0x1 <== NOT EXECUTED
13c5f2: 0f b7 f6 movzwl %si,%esi <== NOT EXECUTED
13c5f5: 4e dec %esi <== NOT EXECUTED
13c5f6: 21 c6 and %eax,%esi <== NOT EXECUTED
13c5f8: 56 push %esi <== NOT EXECUTED
13c5f9: 8a 4d d3 mov -0x2d(%ebp),%cl <== NOT EXECUTED
13c5fc: d3 e8 shr %cl,%eax <== NOT EXECUTED
13c5fe: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED
13c601: 50 push %eax <== NOT EXECUTED
13c602: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13c605: e8 46 f6 fe ff call 12bc50 <_fat_block_write> <== NOT EXECUTED
&fchar);
if (ret < 0)
13c60a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13c60d: 85 c0 test %eax,%eax <== NOT EXECUTED
13c60f: 0f 88 8f 00 00 00 js 13c6a4 <msdos_set_first_char4file_name+0x11c><== NOT EXECUTED
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
13c615: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
13c618: 39 45 e0 cmp %eax,-0x20(%ebp) <== NOT EXECUTED
13c61b: 74 33 je 13c650 <msdos_set_first_char4file_name+0xc8><== NOT EXECUTED
13c61d: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
break;
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
13c620: 83 c0 20 add $0x20,%eax <== NOT EXECUTED
13c623: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
if (start.ofs >= dir_block_size)
13c626: 39 45 c8 cmp %eax,-0x38(%ebp) <== NOT EXECUTED
13c629: 76 39 jbe 13c664 <msdos_set_first_char4file_name+0xdc><== NOT EXECUTED
13c62b: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13c62e: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED
13c631: 8a 4f 02 mov 0x2(%edi),%cl <== NOT EXECUTED
13c634: 88 4d d3 mov %cl,-0x2d(%ebp) <== NOT EXECUTED
13c637: 8b 37 mov (%edi),%esi <== NOT EXECUTED
* name code was written rather than use the fat_file_write
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
13c639: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
13c63c: 85 d2 test %edx,%edx <== NOT EXECUTED
13c63e: 74 a0 je 13c5e0 <msdos_set_first_char4file_name+0x58><== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
13c640: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED
13c643: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED
13c647: d3 e2 shl %cl,%edx <== NOT EXECUTED
13c649: 03 53 30 add 0x30(%ebx),%edx <== NOT EXECUTED
13c64c: eb 9b jmp 13c5e9 <msdos_set_first_char4file_name+0x61><== NOT EXECUTED
13c64e: 66 90 xchg %ax,%ax <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
&fchar);
if (ret < 0)
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
13c650: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13c653: 3b 45 c4 cmp -0x3c(%ebp),%eax <== NOT EXECUTED
13c656: 75 c8 jne 13c620 <msdos_set_first_char4file_name+0x98><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(mt_entry, start.cln, &start.cln);
if ( rc != RC_OK )
return rc;
start.ofs = 0;
13c658: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
}
return RC_OK;
}
13c65a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13c65d: 5b pop %ebx <== NOT EXECUTED
13c65e: 5e pop %esi <== NOT EXECUTED
13c65f: 5f pop %edi <== NOT EXECUTED
13c660: c9 leave <== NOT EXECUTED
13c661: c3 ret <== NOT EXECUTED
13c662: 66 90 xchg %ax,%ax <== NOT EXECUTED
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
if (start.ofs >= dir_block_size)
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
13c664: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
13c667: 39 47 38 cmp %eax,0x38(%edi) <== NOT EXECUTED
13c66a: 75 06 jne 13c672 <msdos_set_first_char4file_name+0xea><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
13c66c: f6 47 0a 03 testb $0x3,0xa(%edi) <== NOT EXECUTED
13c670: 75 e6 jne 13c658 <msdos_set_first_char4file_name+0xd0><== NOT EXECUTED
break;
rc = fat_get_fat_cluster(mt_entry, start.cln, &start.cln);
13c672: 53 push %ebx <== NOT EXECUTED
13c673: 8d 55 e0 lea -0x20(%ebp),%edx <== NOT EXECUTED
13c676: 52 push %edx <== NOT EXECUTED
13c677: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13c67a: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13c67d: e8 aa 6f 00 00 call 14362c <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
13c682: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13c685: 85 c0 test %eax,%eax <== NOT EXECUTED
13c687: 75 d1 jne 13c65a <msdos_set_first_char4file_name+0xd2><== NOT EXECUTED
return rc;
start.ofs = 0;
13c689: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
13c690: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13c693: 8b 59 34 mov 0x34(%ecx),%ebx <== NOT EXECUTED
13c696: 8a 47 02 mov 0x2(%edi),%al <== NOT EXECUTED
13c699: 88 45 d3 mov %al,-0x2d(%ebp) <== NOT EXECUTED
13c69c: 8b 37 mov (%edi),%esi <== NOT EXECUTED
13c69e: 31 c0 xor %eax,%eax <== NOT EXECUTED
13c6a0: eb 97 jmp 13c639 <msdos_set_first_char4file_name+0xb1><== NOT EXECUTED
13c6a2: 66 90 xchg %ax,%ax <== NOT EXECUTED
13c6a4: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
}
}
return RC_OK;
}
13c6a9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13c6ac: 5b pop %ebx <== NOT EXECUTED
13c6ad: 5e pop %esi <== NOT EXECUTED
13c6ae: 5f pop %edi <== NOT EXECUTED
13c6af: c9 leave <== NOT EXECUTED
13c6b0: c3 ret <== NOT EXECUTED
13c6b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
start = dir_pos->sname;
13c6b4: 8b 50 04 mov 0x4(%eax),%edx <== NOT EXECUTED
13c6b7: 8b 00 mov (%eax),%eax <== NOT EXECUTED
13c6b9: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
13c6bc: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
13c6bf: e9 0f ff ff ff jmp 13c5d3 <msdos_set_first_char4file_name+0x4b><== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
13c6c4: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED
13c6c8: 0f 84 f4 fe ff ff je 13c5c2 <msdos_set_first_char4file_name+0x3a><== NOT EXECUTED
dir_block_size = fs_info->fat.vol.rdir_size;
13c6ce: 8b 4b 28 mov 0x28(%ebx),%ecx <== NOT EXECUTED
13c6d1: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
13c6d4: e9 f0 fe ff ff jmp 13c5c9 <msdos_set_first_char4file_name+0x41><== NOT EXECUTED
0013c4d8 <msdos_set_first_cluster_num>:
int
msdos_set_first_cluster_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
13c4d8: 55 push %ebp <== NOT EXECUTED
13c4d9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13c4db: 57 push %edi <== NOT EXECUTED
13c4dc: 56 push %esi <== NOT EXECUTED
13c4dd: 53 push %ebx <== NOT EXECUTED
13c4de: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
13c4e1: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
13c4e4: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13c4e7: 8b 42 34 mov 0x34(%edx),%eax <== NOT EXECUTED
uint32_t new_cln = fat_fd->cln;
13c4ea: 8b 5e 1c mov 0x1c(%esi),%ebx <== NOT EXECUTED
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
13c4ed: 8b 56 20 mov 0x20(%esi),%edx <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
13c4f0: 85 d2 test %edx,%edx <== NOT EXECUTED
13c4f2: 75 06 jne 13c4fa <msdos_set_first_cluster_num+0x22><== NOT EXECUTED
13c4f4: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED
13c4f8: 75 7e jne 13c578 <msdos_set_first_cluster_num+0xa0><== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
13c4fa: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED
13c4fd: 0f b6 48 05 movzbl 0x5(%eax),%ecx <== NOT EXECUTED
13c501: d3 e2 shl %cl,%edx <== NOT EXECUTED
13c503: 03 50 30 add 0x30(%eax),%edx <== NOT EXECUTED
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
13c506: 8b 76 24 mov 0x24(%esi),%esi <== NOT EXECUTED
13c509: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED
13c50c: 0f b6 48 02 movzbl 0x2(%eax),%ecx <== NOT EXECUTED
13c510: 89 f7 mov %esi,%edi <== NOT EXECUTED
13c512: d3 ef shr %cl,%edi <== NOT EXECUTED
13c514: 8d 3c 3a lea (%edx,%edi,1),%edi <== NOT EXECUTED
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
13c517: 0f b7 30 movzwl (%eax),%esi <== NOT EXECUTED
13c51a: 4e dec %esi <== NOT EXECUTED
13c51b: 23 75 d4 and -0x2c(%ebp),%esi <== NOT EXECUTED
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
13c51e: 66 89 5d e6 mov %bx,-0x1a(%ebp) <== NOT EXECUTED
{
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t new_cln = fat_fd->cln;
uint16_t le_cl_low = 0;
uint16_t le_cl_hi = 0;
13c522: 66 c7 45 e4 00 00 movw $0x0,-0x1c(%ebp) <== NOT EXECUTED
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
13c528: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13c52b: 8d 45 e6 lea -0x1a(%ebp),%eax <== NOT EXECUTED
13c52e: 50 push %eax <== NOT EXECUTED
13c52f: 6a 02 push $0x2 <== NOT EXECUTED
13c531: 8d 46 1a lea 0x1a(%esi),%eax <== NOT EXECUTED
13c534: 50 push %eax <== NOT EXECUTED
13c535: 57 push %edi <== NOT EXECUTED
13c536: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13c539: e8 12 f7 fe ff call 12bc50 <_fat_block_write> <== NOT EXECUTED
13c53e: 89 c2 mov %eax,%edx <== NOT EXECUTED
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
13c540: c1 eb 10 shr $0x10,%ebx <== NOT EXECUTED
13c543: 66 89 5d e4 mov %bx,-0x1c(%ebp) <== NOT EXECUTED
ret2 = _fat_block_write(mt_entry, sec,
13c547: 83 c4 14 add $0x14,%esp <== NOT EXECUTED
13c54a: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
13c54d: 50 push %eax <== NOT EXECUTED
13c54e: 6a 02 push $0x2 <== NOT EXECUTED
13c550: 83 c6 14 add $0x14,%esi <== NOT EXECUTED
13c553: 56 push %esi <== NOT EXECUTED
13c554: 57 push %edi <== NOT EXECUTED
13c555: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13c558: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
13c55b: e8 f0 f6 fe ff call 12bc50 <_fat_block_write> <== NOT EXECUTED
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
13c560: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13c563: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
13c566: 85 d2 test %edx,%edx <== NOT EXECUTED
13c568: 79 16 jns 13c580 <msdos_set_first_cluster_num+0xa8><== NOT EXECUTED
13c56a: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
return RC_OK;
}
13c56f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13c572: 5b pop %ebx <== NOT EXECUTED
13c573: 5e pop %esi <== NOT EXECUTED
13c574: 5f pop %edi <== NOT EXECUTED
13c575: c9 leave <== NOT EXECUTED
13c576: c3 ret <== NOT EXECUTED
13c577: 90 nop <== NOT EXECUTED
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
13c578: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
13c57b: eb 89 jmp 13c506 <msdos_set_first_cluster_num+0x2e><== NOT EXECUTED
13c57d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
ret2 = _fat_block_write(mt_entry, sec,
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
13c580: 85 c0 test %eax,%eax <== NOT EXECUTED
13c582: 78 e6 js 13c56a <msdos_set_first_cluster_num+0x92><== NOT EXECUTED
13c584: 31 c0 xor %eax,%eax <== NOT EXECUTED
13c586: eb e7 jmp 13c56f <msdos_set_first_cluster_num+0x97><== NOT EXECUTED
0013b914 <msdos_shut_down>:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
13b914: 55 push %ebp <== NOT EXECUTED
13b915: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13b917: 57 push %edi <== NOT EXECUTED
13b918: 56 push %esi <== NOT EXECUTED
13b919: 53 push %ebx <== NOT EXECUTED
13b91a: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
13b91d: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
13b920: 8b 7b 34 mov 0x34(%ebx),%edi <== NOT EXECUTED
fat_file_fd_t *fat_fd = temp_mt_entry->mt_fs_root.node_access;
/* close fat-file which correspondes to root directory */
if (fat_file_close(temp_mt_entry, fat_fd) != RC_OK)
13b923: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED
13b926: 53 push %ebx <== NOT EXECUTED
13b927: e8 84 fb fe ff call 12b4b0 <fat_file_close> <== NOT EXECUTED
13b92c: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
13b92f: 19 f6 sbb %esi,%esi <== NOT EXECUTED
13b931: f7 d6 not %esi <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
if (fat_shutdown_drive(temp_mt_entry) != RC_OK)
13b933: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
13b936: e8 2d 04 ff ff call 12bd68 <fat_shutdown_drive> <== NOT EXECUTED
13b93b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13b93e: 85 c0 test %eax,%eax <== NOT EXECUTED
13b940: 75 2e jne 13b970 <msdos_shut_down+0x5c> <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
rtems_semaphore_delete(fs_info->vol_sema);
13b942: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13b945: ff b7 94 00 00 00 pushl 0x94(%edi) <== NOT EXECUTED
13b94b: e8 a8 74 fd ff call 112df8 <rtems_semaphore_delete><== NOT EXECUTED
free(fs_info->cl_buf);
13b950: 5a pop %edx <== NOT EXECUTED
13b951: ff b7 98 00 00 00 pushl 0x98(%edi) <== NOT EXECUTED
13b957: e8 0c 2f fd ff call 10e868 <free> <== NOT EXECUTED
free(temp_mt_entry->fs_info);
13b95c: 58 pop %eax <== NOT EXECUTED
13b95d: ff 73 34 pushl 0x34(%ebx) <== NOT EXECUTED
13b960: e8 03 2f fd ff call 10e868 <free> <== NOT EXECUTED
return rc;
}
13b965: 89 f0 mov %esi,%eax <== NOT EXECUTED
13b967: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13b96a: 5b pop %ebx <== NOT EXECUTED
13b96b: 5e pop %esi <== NOT EXECUTED
13b96c: 5f pop %edi <== NOT EXECUTED
13b96d: c9 leave <== NOT EXECUTED
13b96e: c3 ret <== NOT EXECUTED
13b96f: 90 nop <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
if (fat_shutdown_drive(temp_mt_entry) != RC_OK)
13b970: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
13b975: eb cb jmp 13b942 <msdos_shut_down+0x2e> <== NOT EXECUTED
0012af24 <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
12af24: 55 push %ebp
12af25: 89 e5 mov %esp,%ebp
12af27: 56 push %esi
12af28: 53 push %ebx
12af29: 8b 5d 08 mov 0x8(%ebp),%ebx
12af2c: 8b 75 0c mov 0xc(%ebp),%esi
Watchdog_Interval ticks;
if ( !_Timespec_Is_valid( rqtp ) )
12af2f: 83 ec 0c sub $0xc,%esp
12af32: 53 push %ebx
12af33: e8 60 01 00 00 call 12b098 <_Timespec_Is_valid>
12af38: 83 c4 10 add $0x10,%esp
12af3b: 84 c0 test %al,%al
12af3d: 0f 84 e1 00 00 00 je 12b024 <nanosleep+0x100>
* 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 )
12af43: 8b 13 mov (%ebx),%edx
12af45: 85 d2 test %edx,%edx
12af47: 0f 88 d7 00 00 00 js 12b024 <nanosleep+0x100> <== NEVER TAKEN
12af4d: 8b 43 04 mov 0x4(%ebx),%eax
12af50: 85 c0 test %eax,%eax
12af52: 0f 88 cc 00 00 00 js 12b024 <nanosleep+0x100> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
ticks = _Timespec_To_ticks( rqtp );
12af58: 83 ec 0c sub $0xc,%esp
12af5b: 53 push %ebx
12af5c: e8 73 f5 fe ff call 11a4d4 <_Timespec_To_ticks>
12af61: 89 c3 mov %eax,%ebx
* 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 ) {
12af63: 83 c4 10 add $0x10,%esp
12af66: 85 c0 test %eax,%eax
12af68: 75 36 jne 12afa0 <nanosleep+0x7c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
12af6a: a1 98 73 13 00 mov 0x137398,%eax
12af6f: 40 inc %eax
12af70: a3 98 73 13 00 mov %eax,0x137398
_Thread_Disable_dispatch();
_Thread_Yield_processor();
12af75: e8 2e 86 fe ff call 1135a8 <_Thread_Yield_processor>
_Thread_Enable_dispatch();
12af7a: e8 f9 79 fe ff call 112978 <_Thread_Enable_dispatch>
if ( rmtp ) {
12af7f: 85 f6 test %esi,%esi
12af81: 0f 84 93 00 00 00 je 12b01a <nanosleep+0xf6>
rmtp->tv_sec = 0;
12af87: c7 06 00 00 00 00 movl $0x0,(%esi)
rmtp->tv_nsec = 0;
12af8d: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
12af94: 31 c0 xor %eax,%eax
rtems_set_errno_and_return_minus_one( EINTR );
#endif
}
return 0;
}
12af96: 8d 65 f8 lea -0x8(%ebp),%esp
12af99: 5b pop %ebx
12af9a: 5e pop %esi
12af9b: c9 leave
12af9c: c3 ret
12af9d: 8d 76 00 lea 0x0(%esi),%esi
12afa0: a1 98 73 13 00 mov 0x137398,%eax
12afa5: 40 inc %eax
12afa6: a3 98 73 13 00 mov %eax,0x137398
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
12afab: 83 ec 08 sub $0x8,%esp
12afae: 68 08 00 00 10 push $0x10000008
12afb3: ff 35 58 74 13 00 pushl 0x137458
12afb9: e8 d2 82 fe ff call 113290 <_Thread_Set_state>
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
12afbe: 8b 15 58 74 13 00 mov 0x137458,%edx
_Thread_Disable_dispatch();
_Thread_Set_state(
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
12afc4: 8b 42 08 mov 0x8(%edx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12afc7: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
the_watchdog->routine = routine;
12afce: c7 42 64 e0 27 11 00 movl $0x1127e0,0x64(%edx)
the_watchdog->id = id;
12afd5: 89 42 68 mov %eax,0x68(%edx)
the_watchdog->user_data = user_data;
12afd8: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12afdf: 89 5a 54 mov %ebx,0x54(%edx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12afe2: 58 pop %eax
12afe3: 59 pop %ecx
12afe4: 83 c2 48 add $0x48,%edx
12afe7: 52 push %edx
12afe8: 68 78 74 13 00 push $0x137478
12afed: e8 96 89 fe ff call 113988 <_Watchdog_Insert>
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
12aff2: e8 81 79 fe ff call 112978 <_Thread_Enable_dispatch>
/* calculate time remaining */
if ( rmtp ) {
12aff7: 83 c4 10 add $0x10,%esp
12affa: 85 f6 test %esi,%esi
12affc: 74 1c je 12b01a <nanosleep+0xf6>
ticks -=
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
12affe: a1 58 74 13 00 mov 0x137458,%eax
_Thread_Enable_dispatch();
/* calculate time remaining */
if ( rmtp ) {
ticks -=
12b003: 03 58 5c add 0x5c(%eax),%ebx
12b006: 2b 58 60 sub 0x60(%eax),%ebx
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
12b009: 83 ec 08 sub $0x8,%esp
12b00c: 56 push %esi
12b00d: 53 push %ebx
12b00e: e8 3d 00 00 00 call 12b050 <_Timespec_From_ticks>
*/
#if defined(RTEMS_POSIX_API)
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
12b013: 83 c4 10 add $0x10,%esp
12b016: 85 db test %ebx,%ebx
12b018: 75 1f jne 12b039 <nanosleep+0x115>
rtems_set_errno_and_return_minus_one( EINTR );
12b01a: 31 c0 xor %eax,%eax
#endif
}
return 0;
}
12b01c: 8d 65 f8 lea -0x8(%ebp),%esp
12b01f: 5b pop %ebx
12b020: 5e pop %esi
12b021: c9 leave
12b022: c3 ret
12b023: 90 nop
*
* 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 )
rtems_set_errno_and_return_minus_one( EINVAL );
12b024: e8 17 28 ff ff call 11d840 <__errno>
12b029: c7 00 16 00 00 00 movl $0x16,(%eax)
12b02f: b8 ff ff ff ff mov $0xffffffff,%eax
12b034: e9 5d ff ff ff jmp 12af96 <nanosleep+0x72>
#if defined(RTEMS_POSIX_API)
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
rtems_set_errno_and_return_minus_one( EINTR );
12b039: e8 02 28 ff ff call 11d840 <__errno>
12b03e: c7 00 04 00 00 00 movl $0x4,(%eax)
12b044: b8 ff ff ff ff mov $0xffffffff,%eax
12b049: e9 48 ff ff ff jmp 12af96 <nanosleep+0x72>
00108ef0 <newlib_create_hook>:
*/
bool newlib_create_hook(
rtems_tcb *current_task __attribute__((unused)),
rtems_tcb *creating_task
)
{
108ef0: 55 push %ebp
108ef1: 89 e5 mov %esp,%ebp
108ef3: 57 push %edi
108ef4: 56 push %esi
108ef5: 53 push %ebx
108ef6: 83 ec 0c sub $0xc,%esp
struct _reent *ptr;
if (_Thread_libc_reent == 0)
108ef9: a1 84 94 12 00 mov 0x129484,%eax
108efe: 85 c0 test %eax,%eax
108f00: 0f 84 52 02 00 00 je 109158 <newlib_create_hook+0x268>
ptr = (struct _reent *) calloc(1, sizeof(struct _reent));
#else
/* It is OK to allocate from the workspace because these
* hooks run with thread dispatching disabled.
*/
ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent));
108f06: 83 ec 0c sub $0xc,%esp
108f09: 68 24 04 00 00 push $0x424
108f0e: e8 f9 5e 00 00 call 10ee0c <_Workspace_Allocate>
108f13: 89 c2 mov %eax,%edx
#endif
if (ptr) {
108f15: 83 c4 10 add $0x10,%esp
108f18: 85 c0 test %eax,%eax
108f1a: 0f 84 2c 02 00 00 je 10914c <newlib_create_hook+0x25c>
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
108f20: c7 00 00 00 00 00 movl $0x0,(%eax)
108f26: 8d 98 ec 02 00 00 lea 0x2ec(%eax),%ebx
108f2c: 89 58 04 mov %ebx,0x4(%eax)
108f2f: 8d 80 54 03 00 00 lea 0x354(%eax),%eax
108f35: 89 42 08 mov %eax,0x8(%edx)
108f38: 8d 82 bc 03 00 00 lea 0x3bc(%edx),%eax
108f3e: 89 42 0c mov %eax,0xc(%edx)
108f41: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx)
108f48: 8d 72 14 lea 0x14(%edx),%esi
108f4b: 31 c0 xor %eax,%eax
108f4d: b9 19 00 00 00 mov $0x19,%ecx
108f52: 89 f7 mov %esi,%edi
108f54: f3 aa rep stos %al,%es:(%edi)
108f56: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
108f5d: c7 42 34 2a 28 12 00 movl $0x12282a,0x34(%edx)
108f64: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx)
108f6b: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx)
108f72: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx)
108f79: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx)
108f80: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx)
108f87: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx)
108f8e: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
108f95: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx)
108f9c: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx)
108fa3: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx)
108faa: c6 42 60 00 movb $0x0,0x60(%edx)
108fae: 8d 72 7c lea 0x7c(%edx),%esi
108fb1: b1 24 mov $0x24,%cl
108fb3: 89 f7 mov %esi,%edi
108fb5: f3 aa rep stos %al,%es:(%edi)
108fb7: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx)
108fbe: 00 00 00
108fc1: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx)
108fc8: 00 00 00
108fcb: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx)
108fd2: 00 00 00
108fd5: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx)
108fdc: 0e 33
108fde: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx)
108fe5: cd ab
108fe7: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx)
108fee: 34 12
108ff0: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx)
108ff7: 6d e6
108ff9: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx)
109000: ec de
109002: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx)
109009: 05 00
10900b: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx)
109012: 0b 00
109014: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx)
10901b: 00 00 00
10901e: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx)
109025: 00 00 00
109028: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx)
10902f: 00 00 00
109032: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx)
109039: 00 00 00
10903c: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx)
109043: 00 00 00
109046: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx)
10904d: 00 00 00
109050: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx)
109057: 00 00 00
10905a: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx)
109061: 00 00 00
109064: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx)
10906b: 00 00 00
10906e: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx)
109075: 00 00 00
109078: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx)
10907f: 00 00 00
109082: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx)
109089: 00 00 00
10908c: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx)
109093: 00 00 00
109096: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx)
10909d: 00 00 00
1090a0: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx)
1090a7: 00 00 00
1090aa: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx)
1090b1: 00 00 00
1090b4: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx)
1090bb: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx)
1090c2: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx)
1090c9: 00 00 00
1090cc: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx)
1090d3: 00 00 00
1090d6: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx)
1090dd: 00 00 00
1090e0: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx)
1090e7: 00 00 00
1090ea: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx)
1090f1: 00 00 00
1090f4: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx)
1090fb: 00 00 00
1090fe: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx)
109105: 00 00 00
109108: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx)
10910f: 00 00 00
109112: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx)
109119: 00 00 00
10911c: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx)
109123: 00 00 00
109126: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx)
10912d: 00 00 00
109130: 66 b9 38 01 mov $0x138,%cx
109134: 89 df mov %ebx,%edi
109136: f3 aa rep stos %al,%es:(%edi)
creating_task->libc_reent = ptr;
109138: 8b 45 0c mov 0xc(%ebp),%eax
10913b: 89 90 f0 00 00 00 mov %edx,0xf0(%eax)
109141: b0 01 mov $0x1,%al
return TRUE;
}
return FALSE;
}
109143: 8d 65 f4 lea -0xc(%ebp),%esp
109146: 5b pop %ebx
109147: 5e pop %esi
109148: 5f pop %edi
109149: c9 leave
10914a: c3 ret
10914b: 90 nop
* hooks run with thread dispatching disabled.
*/
ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent));
#endif
if (ptr) {
10914c: 31 c0 xor %eax,%eax
creating_task->libc_reent = ptr;
return TRUE;
}
return FALSE;
}
10914e: 8d 65 f4 lea -0xc(%ebp),%esp
109151: 5b pop %ebx
109152: 5e pop %esi
109153: 5f pop %edi
109154: c9 leave
109155: c3 ret
109156: 66 90 xchg %ax,%ax
{
struct _reent *ptr;
if (_Thread_libc_reent == 0)
{
_REENT = _global_impure_ptr;
109158: a1 80 39 12 00 mov 0x123980,%eax
10915d: a3 40 71 12 00 mov %eax,0x127140
RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent (
struct _reent **libc_reent
)
{
_Thread_libc_reent = libc_reent;
109162: c7 05 84 94 12 00 40 movl $0x127140,0x129484
109169: 71 12 00
10916c: e9 95 fd ff ff jmp 108f06 <newlib_create_hook+0x16>
00108e24 <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
108e24: 55 push %ebp
108e25: 89 e5 mov %esp,%ebp
108e27: 57 push %edi
108e28: 56 push %esi
108e29: 53 push %ebx
108e2a: 83 ec 0c sub $0xc,%esp
108e2d: 8b 7d 08 mov 0x8(%ebp),%edi
108e30: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
108e33: 39 df cmp %ebx,%edi
108e35: 74 55 je 108e8c <newlib_delete_hook+0x68>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
108e37: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi
}
if (ptr && ptr != _global_impure_ptr) {
108e3d: 85 f6 test %esi,%esi
108e3f: 74 21 je 108e62 <newlib_delete_hook+0x3e><== NEVER TAKEN
108e41: 3b 35 80 39 12 00 cmp 0x123980,%esi
108e47: 74 19 je 108e62 <newlib_delete_hook+0x3e>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
108e49: 83 ec 08 sub $0x8,%esp
108e4c: 68 94 8e 10 00 push $0x108e94
108e51: 56 push %esi
108e52: e8 5d ca 00 00 call 1158b4 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
108e57: 89 34 24 mov %esi,(%esp)
108e5a: e8 c9 5f 00 00 call 10ee28 <_Workspace_Free>
108e5f: 83 c4 10 add $0x10,%esp
#endif
}
deleted_task->libc_reent = NULL;
108e62: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx)
108e69: 00 00 00
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
108e6c: 39 df cmp %ebx,%edi
108e6e: 74 08 je 108e78 <newlib_delete_hook+0x54>
_REENT = 0;
}
}
108e70: 8d 65 f4 lea -0xc(%ebp),%esp
108e73: 5b pop %ebx
108e74: 5e pop %esi
108e75: 5f pop %edi
108e76: c9 leave
108e77: c3 ret
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
_REENT = 0;
108e78: c7 05 40 71 12 00 00 movl $0x0,0x127140
108e7f: 00 00 00
}
}
108e82: 8d 65 f4 lea -0xc(%ebp),%esp
108e85: 5b pop %ebx
108e86: 5e pop %esi
108e87: 5f pop %edi
108e88: c9 leave
108e89: c3 ret
108e8a: 66 90 xchg %ax,%ax
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
108e8c: 8b 35 40 71 12 00 mov 0x127140,%esi
108e92: eb a9 jmp 108e3d <newlib_delete_hook+0x19>
00108e94 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
108e94: 55 push %ebp
108e95: 89 e5 mov %esp,%ebp
108e97: 53 push %ebx
108e98: 83 ec 10 sub $0x10,%esp
108e9b: 8b 5d 08 mov 0x8(%ebp),%ebx
switch ( fileno(fp) ) {
108e9e: 53 push %ebx
108e9f: e8 18 c6 00 00 call 1154bc <fileno>
108ea4: 83 c4 10 add $0x10,%esp
108ea7: 83 f8 02 cmp $0x2,%eax
108eaa: 76 14 jbe 108ec0 <newlib_free_buffers+0x2c><== ALWAYS TAKEN
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
108eac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108eaf: 53 push %ebx <== NOT EXECUTED
108eb0: e8 9b c3 00 00 call 115250 <fclose> <== NOT EXECUTED
108eb5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
108eb8: 31 c0 xor %eax,%eax
108eba: 8b 5d fc mov -0x4(%ebp),%ebx
108ebd: c9 leave
108ebe: c3 ret
108ebf: 90 nop
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
108ec0: 80 7b 0c 00 cmpb $0x0,0xc(%ebx)
108ec4: 79 f2 jns 108eb8 <newlib_free_buffers+0x24><== ALWAYS TAKEN
free( fp->_bf._base );
108ec6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108ec9: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108ecc: e8 13 f7 ff ff call 1085e4 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
108ed1: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
108ed7: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
108edd: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
108ee4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
108ee7: 31 c0 xor %eax,%eax <== NOT EXECUTED
108ee9: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
108eec: c9 leave <== NOT EXECUTED
108eed: c3 ret <== NOT EXECUTED
001087e0 <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
1087e0: 55 push %ebp
1087e1: 89 e5 mov %esp,%ebp
1087e3: 53 push %ebx
1087e4: 83 ec 04 sub $0x4,%esp
1087e7: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_device_driver status;
if ( !initialized ) {
1087ea: 80 3d b8 af 12 00 00 cmpb $0x0,0x12afb8
1087f1: 74 09 je 1087fc <null_initialize+0x1c>
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
1087f3: 31 c0 xor %eax,%eax
1087f5: 8b 5d fc mov -0x4(%ebp),%ebx
1087f8: c9 leave
1087f9: c3 ret
1087fa: 66 90 xchg %ax,%ax
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
1087fc: c6 05 b8 af 12 00 01 movb $0x1,0x12afb8
status = rtems_io_register_name(
108803: 50 push %eax
108804: 6a 00 push $0x0
108806: 53 push %ebx
108807: 68 d3 42 12 00 push $0x1242d3
10880c: e8 3b 06 00 00 call 108e4c <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
108811: 83 c4 10 add $0x10,%esp
108814: 85 c0 test %eax,%eax
108816: 75 0d jne 108825 <null_initialize+0x45> <== NEVER TAKEN
rtems_fatal_error_occurred(status);
NULL_major = major;
108818: 89 1d 40 b3 12 00 mov %ebx,0x12b340
}
return RTEMS_SUCCESSFUL;
}
10881e: 31 c0 xor %eax,%eax
108820: 8b 5d fc mov -0x4(%ebp),%ebx
108823: c9 leave
108824: c3 ret
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
108825: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108828: 50 push %eax <== NOT EXECUTED
108829: e8 f2 48 00 00 call 10d120 <rtems_fatal_error_occurred><== NOT EXECUTED
001087c4 <null_write>:
rtems_device_driver null_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void *pargp
)
{
1087c4: 55 push %ebp
1087c5: 89 e5 mov %esp,%ebp
1087c7: 8b 45 10 mov 0x10(%ebp),%eax
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
1087ca: 85 c0 test %eax,%eax
1087cc: 74 06 je 1087d4 <null_write+0x10> <== ALWAYS TAKEN
rw_args->bytes_moved = rw_args->count;
1087ce: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
1087d1: 89 50 18 mov %edx,0x18(%eax) <== NOT EXECUTED
return NULL_SUCCESSFUL;
}
1087d4: 31 c0 xor %eax,%eax
1087d6: c9 leave
1087d7: c3 ret
001091d4 <open>:
int open(
const char *pathname,
int flags,
...
)
{
1091d4: 55 push %ebp
1091d5: 89 e5 mov %esp,%ebp
1091d7: 57 push %edi
1091d8: 56 push %esi
1091d9: 53 push %ebx
1091da: 83 ec 4c sub $0x4c,%esp
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
1091dd: 8b 45 0c mov 0xc(%ebp),%eax
1091e0: 40 inc %eax
if ( ( status & _FREAD ) == _FREAD )
1091e1: 89 c6 mov %eax,%esi
1091e3: 83 e6 01 and $0x1,%esi
1091e6: f7 de neg %esi
1091e8: 83 e6 04 and $0x4,%esi
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
1091eb: a8 02 test $0x2,%al
1091ed: 74 03 je 1091f2 <open+0x1e>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
1091ef: 83 ce 02 or $0x2,%esi
va_start(ap, flags);
mode = va_arg( ap, int );
1091f2: 8b 45 10 mov 0x10(%ebp),%eax
1091f5: 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();
1091f8: e8 af 7d 00 00 call 110fac <rtems_libio_allocate>
1091fd: 89 c3 mov %eax,%ebx
if ( iop == 0 ) {
1091ff: 85 c0 test %eax,%eax
109201: 0f 84 bd 00 00 00 je 1092c4 <open+0xf0>
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
109207: b9 ff ff ff ff mov $0xffffffff,%ecx
10920c: 8b 7d 08 mov 0x8(%ebp),%edi
10920f: 31 c0 xor %eax,%eax
109211: f2 ae repnz scas %es:(%edi),%al
109213: f7 d1 not %ecx
109215: 49 dec %ecx
109216: 83 ec 0c sub $0xc,%esp
109219: 6a 01 push $0x1
10921b: 8d 45 d4 lea -0x2c(%ebp),%eax
10921e: 89 45 b4 mov %eax,-0x4c(%ebp)
109221: 50 push %eax
109222: 56 push %esi
109223: 51 push %ecx
109224: ff 75 08 pushl 0x8(%ebp)
109227: e8 48 f3 ff ff call 108574 <rtems_filesystem_evaluate_path>
10922c: 89 c6 mov %eax,%esi
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
10922e: 83 c4 20 add $0x20,%esp
109231: 83 f8 ff cmp $0xffffffff,%eax
109234: 0f 84 f2 00 00 00 je 10932c <open+0x158>
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
10923a: 8b 45 0c mov 0xc(%ebp),%eax
10923d: 25 00 0a 00 00 and $0xa00,%eax
109242: 3d 00 0a 00 00 cmp $0xa00,%eax
109247: 0f 84 8b 00 00 00 je 1092d8 <open+0x104>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
10924d: 8b 45 dc mov -0x24(%ebp),%eax
109250: 89 43 3c mov %eax,0x3c(%ebx)
iop->file_info = loc.node_access;
109253: 8b 45 d4 mov -0x2c(%ebp),%eax
109256: 89 43 38 mov %eax,0x38(%ebx)
iop->flags |= rtems_libio_fcntl_flags( flags );
109259: 8b 73 14 mov 0x14(%ebx),%esi
10925c: 83 ec 0c sub $0xc,%esp
10925f: ff 75 0c pushl 0xc(%ebp)
109262: e8 d1 7d 00 00 call 111038 <rtems_libio_fcntl_flags>
109267: 09 f0 or %esi,%eax
109269: 89 43 14 mov %eax,0x14(%ebx)
iop->pathinfo = loc;
10926c: 8d 7b 18 lea 0x18(%ebx),%edi
10926f: b9 05 00 00 00 mov $0x5,%ecx
109274: 8b 75 b4 mov -0x4c(%ebp),%esi
109277: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !iop->handlers || !iop->handlers->open_h ) {
109279: 8b 43 3c mov 0x3c(%ebx),%eax
10927c: 83 c4 10 add $0x10,%esp
10927f: 85 c0 test %eax,%eax
109281: 0f 84 99 00 00 00 je 109320 <open+0x14c> <== NEVER TAKEN
109287: 8b 00 mov (%eax),%eax
109289: 85 c0 test %eax,%eax
10928b: 0f 84 8f 00 00 00 je 109320 <open+0x14c> <== NEVER TAKEN
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
109291: ff 75 c4 pushl -0x3c(%ebp)
109294: ff 75 0c pushl 0xc(%ebp)
109297: ff 75 08 pushl 0x8(%ebp)
10929a: 53 push %ebx
10929b: ff d0 call *%eax
if ( rc ) {
10929d: 83 c4 10 add $0x10,%esp
1092a0: 85 c0 test %eax,%eax
1092a2: 75 6c jne 109310 <open+0x13c>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
1092a4: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
1092ab: 0f 85 93 00 00 00 jne 109344 <open+0x170>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
1092b1: 89 d8 mov %ebx,%eax
1092b3: 2b 05 80 92 12 00 sub 0x129280,%eax
1092b9: c1 f8 06 sar $0x6,%eax
}
1092bc: 8d 65 f4 lea -0xc(%ebp),%esp
1092bf: 5b pop %ebx
1092c0: 5e pop %esi
1092c1: 5f pop %edi
1092c2: c9 leave
1092c3: c3 ret
* descriptors are obtained using socket(), not open().
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
1092c4: be 17 00 00 00 mov $0x17,%esi
if ( rc ) {
if ( iop )
rtems_libio_free( iop );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
1092c9: e8 36 be 00 00 call 115104 <__errno>
1092ce: 89 30 mov %esi,(%eax)
1092d0: b8 ff ff ff ff mov $0xffffffff,%eax
1092d5: eb e5 jmp 1092bc <open+0xe8>
1092d7: 90 nop
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
1092d8: 8d 7d d4 lea -0x2c(%ebp),%edi
1092db: be 11 00 00 00 mov $0x11,%esi
done:
va_end(ap);
if ( rc ) {
if ( iop )
1092e0: 85 db test %ebx,%ebx
1092e2: 74 0c je 1092f0 <open+0x11c> <== NEVER TAKEN
rtems_libio_free( iop );
1092e4: 83 ec 0c sub $0xc,%esp
1092e7: 53 push %ebx
1092e8: e8 67 7c 00 00 call 110f54 <rtems_libio_free>
1092ed: 83 c4 10 add $0x10,%esp
if ( loc_to_free )
1092f0: 85 ff test %edi,%edi
1092f2: 74 d5 je 1092c9 <open+0xf5>
rtems_filesystem_freenode( loc_to_free );
1092f4: 8b 47 0c mov 0xc(%edi),%eax
1092f7: 85 c0 test %eax,%eax
1092f9: 74 ce je 1092c9 <open+0xf5> <== NEVER TAKEN
1092fb: 8b 40 1c mov 0x1c(%eax),%eax
1092fe: 85 c0 test %eax,%eax
109300: 74 c7 je 1092c9 <open+0xf5> <== NEVER TAKEN
109302: 83 ec 0c sub $0xc,%esp
109305: 57 push %edi
109306: ff d0 call *%eax
109308: 83 c4 10 add $0x10,%esp
10930b: eb bc jmp 1092c9 <open+0xf5>
10930d: 8d 76 00 lea 0x0(%esi),%esi
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
109310: e8 ef bd 00 00 call 115104 <__errno>
109315: 8b 30 mov (%eax),%esi
109317: 8d 7d d4 lea -0x2c(%ebp),%edi
*/
done:
va_end(ap);
if ( rc ) {
10931a: 85 f6 test %esi,%esi
10931c: 74 93 je 1092b1 <open+0xdd> <== NEVER TAKEN
10931e: eb c0 jmp 1092e0 <open+0x10c>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
109320: 8d 7d d4 lea -0x2c(%ebp),%edi <== NOT EXECUTED
109323: be 86 00 00 00 mov $0x86,%esi <== NOT EXECUTED
109328: eb b6 jmp 1092e0 <open+0x10c> <== NOT EXECUTED
10932a: 66 90 xchg %ax,%ax <== NOT EXECUTED
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
10932c: e8 d3 bd 00 00 call 115104 <__errno>
109331: 83 38 02 cmpl $0x2,(%eax)
109334: 74 5e je 109394 <open+0x1c0>
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
109336: e8 c9 bd 00 00 call 115104 <__errno>
10933b: 8b 30 mov (%eax),%esi
10933d: 31 ff xor %edi,%edi
goto done;
10933f: eb d9 jmp 10931a <open+0x146>
109341: 8d 76 00 lea 0x0(%esi),%esi
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
109344: 52 push %edx
109345: 6a 00 push $0x0
109347: 6a 00 push $0x0
109349: 89 d8 mov %ebx,%eax
10934b: 2b 05 80 92 12 00 sub 0x129280,%eax
109351: c1 f8 06 sar $0x6,%eax
109354: 50 push %eax
109355: e8 ee 79 00 00 call 110d48 <ftruncate>
10935a: 89 c6 mov %eax,%esi
if ( rc ) {
10935c: 83 c4 10 add $0x10,%esp
10935f: 85 c0 test %eax,%eax
109361: 0f 84 4a ff ff ff je 1092b1 <open+0xdd> <== ALWAYS TAKEN
if(errno) rc = errno;
109367: e8 98 bd 00 00 call 115104 <__errno> <== NOT EXECUTED
10936c: 8b 00 mov (%eax),%eax <== NOT EXECUTED
10936e: 85 c0 test %eax,%eax <== NOT EXECUTED
109370: 0f 85 8b 00 00 00 jne 109401 <open+0x22d> <== NOT EXECUTED
close( iop - rtems_libio_iops );
109376: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109379: 2b 1d 80 92 12 00 sub 0x129280,%ebx <== NOT EXECUTED
10937f: c1 fb 06 sar $0x6,%ebx <== NOT EXECUTED
109382: 53 push %ebx <== NOT EXECUTED
109383: e8 30 79 00 00 call 110cb8 <close> <== NOT EXECUTED
109388: 31 ff xor %edi,%edi <== NOT EXECUTED
10938a: 31 db xor %ebx,%ebx <== NOT EXECUTED
10938c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10938f: eb 89 jmp 10931a <open+0x146> <== NOT EXECUTED
109391: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
109394: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
10939b: 75 0f jne 1093ac <open+0x1d8>
10939d: 31 ff xor %edi,%edi
10939f: be 02 00 00 00 mov $0x2,%esi
1093a4: e9 37 ff ff ff jmp 1092e0 <open+0x10c>
1093a9: 8d 76 00 lea 0x0(%esi),%esi
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
1093ac: 6a 00 push $0x0
1093ae: 6a 00 push $0x0
1093b0: 8b 45 c4 mov -0x3c(%ebp),%eax
1093b3: 80 cc 80 or $0x80,%ah
1093b6: 50 push %eax
1093b7: ff 75 08 pushl 0x8(%ebp)
1093ba: e8 d9 f5 ff ff call 108998 <mknod>
if ( rc ) {
1093bf: 83 c4 10 add $0x10,%esp
1093c2: 85 c0 test %eax,%eax
1093c4: 0f 85 6c ff ff ff jne 109336 <open+0x162> <== NEVER TAKEN
rc = errno;
goto done;
}
/* Sanity check to see if the file name exists after the mknod() */
status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true );
1093ca: 89 f1 mov %esi,%ecx
1093cc: 8b 7d 08 mov 0x8(%ebp),%edi
1093cf: 31 c0 xor %eax,%eax
1093d1: f2 ae repnz scas %es:(%edi),%al
1093d3: f7 d1 not %ecx
1093d5: 49 dec %ecx
1093d6: 83 ec 0c sub $0xc,%esp
1093d9: 6a 01 push $0x1
1093db: 8d 45 d4 lea -0x2c(%ebp),%eax
1093de: 50 push %eax
1093df: 6a 00 push $0x0
1093e1: 51 push %ecx
1093e2: ff 75 08 pushl 0x8(%ebp)
1093e5: e8 8a f1 ff ff call 108574 <rtems_filesystem_evaluate_path>
if ( status != 0 ) { /* The file did not exist */
1093ea: 83 c4 20 add $0x20,%esp
1093ed: 85 c0 test %eax,%eax
1093ef: 0f 84 58 fe ff ff je 10924d <open+0x79> <== ALWAYS TAKEN
1093f5: 31 ff xor %edi,%edi <== NOT EXECUTED
1093f7: be 0d 00 00 00 mov $0xd,%esi <== NOT EXECUTED
1093fc: e9 df fe ff ff jmp 1092e0 <open+0x10c> <== NOT EXECUTED
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
109401: e8 fe bc 00 00 call 115104 <__errno> <== NOT EXECUTED
109406: 8b 30 mov (%eax),%esi <== NOT EXECUTED
109408: e9 69 ff ff ff jmp 109376 <open+0x1a2> <== NOT EXECUTED
00109174 <open_dev_console>:
/*
* This is a replaceable stub which opens the console, if present.
*/
void open_dev_console(void)
{
109174: 55 push %ebp
109175: 89 e5 mov %esp,%ebp
109177: 83 ec 0c sub $0xc,%esp
int stderr_fd;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
10917a: 6a 00 push $0x0
10917c: 6a 00 push $0x0
10917e: 68 c8 11 12 00 push $0x1211c8
109183: e8 4c 00 00 00 call 1091d4 <open>
109188: 83 c4 10 add $0x10,%esp
10918b: 40 inc %eax
10918c: 74 2a je 1091b8 <open_dev_console+0x44>
/*
* 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)
10918e: 52 push %edx
10918f: 6a 00 push $0x0
109191: 6a 01 push $0x1
109193: 68 c8 11 12 00 push $0x1211c8
109198: e8 37 00 00 00 call 1091d4 <open>
10919d: 83 c4 10 add $0x10,%esp
1091a0: 40 inc %eax
1091a1: 74 24 je 1091c7 <open_dev_console+0x53> <== NEVER TAKEN
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
1091a3: 50 push %eax
1091a4: 6a 00 push $0x0
1091a6: 6a 01 push $0x1
1091a8: 68 c8 11 12 00 push $0x1211c8
1091ad: e8 22 00 00 00 call 1091d4 <open>
1091b2: 83 c4 10 add $0x10,%esp
1091b5: 40 inc %eax
1091b6: 74 02 je 1091ba <open_dev_console+0x46> <== NEVER TAKEN
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
}
1091b8: c9 leave
1091b9: c3 ret
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
1091ba: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1091bd: 68 32 44 54 55 push $0x55544432 <== NOT EXECUTED
1091c2: e8 31 31 00 00 call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
/*
* 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)
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
1091c7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1091ca: 68 31 44 54 55 push $0x55544431 <== NOT EXECUTED
1091cf: e8 24 31 00 00 call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
00109d5c <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
109d5c: 55 push %ebp
109d5d: 89 e5 mov %esp,%ebp
109d5f: 56 push %esi
109d60: 53 push %ebx
109d61: 83 ec 10 sub $0x10,%esp
109d64: 88 45 f4 mov %al,-0xc(%ebp)
int i;
if (tty->termios.c_oflag & OPOST) {
109d67: 8b 4a 34 mov 0x34(%edx),%ecx
109d6a: f6 c1 01 test $0x1,%cl
109d6d: 74 31 je 109da0 <oproc+0x44> <== NEVER TAKEN
switch (c) {
109d6f: 3c 09 cmp $0x9,%al
109d71: 0f 84 b1 00 00 00 je 109e28 <oproc+0xcc>
109d77: 76 3f jbe 109db8 <oproc+0x5c> <== NEVER TAKEN
109d79: 3c 0a cmp $0xa,%al
109d7b: 74 4f je 109dcc <oproc+0x70>
109d7d: 3c 0d cmp $0xd,%al
109d7f: 74 7f je 109e00 <oproc+0xa4> <== NEVER TAKEN
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
109d81: 83 e1 02 and $0x2,%ecx
109d84: 0f 85 c6 00 00 00 jne 109e50 <oproc+0xf4> <== NEVER TAKEN
109d8a: 8b 0d 24 71 12 00 mov 0x127124,%ecx
c = toupper(c);
if (!iscntrl(c))
109d90: 0f b6 c0 movzbl %al,%eax
109d93: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1)
109d98: 75 06 jne 109da0 <oproc+0x44> <== NEVER TAKEN
tty->column++;
109d9a: ff 42 28 incl 0x28(%edx)
109d9d: 8d 76 00 lea 0x0(%esi),%esi
break;
}
}
rtems_termios_puts (&c, 1, tty);
109da0: 50 push %eax
109da1: 52 push %edx
109da2: 6a 01 push $0x1
109da4: 8d 45 f4 lea -0xc(%ebp),%eax
109da7: 50 push %eax
109da8: e8 7b fe ff ff call 109c28 <rtems_termios_puts>
109dad: 83 c4 10 add $0x10,%esp
}
109db0: 8d 65 f8 lea -0x8(%ebp),%esp
109db3: 5b pop %ebx
109db4: 5e pop %esi
109db5: c9 leave
109db6: c3 ret
109db7: 90 nop
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
109db8: 3c 08 cmp $0x8,%al <== NOT EXECUTED
109dba: 75 c5 jne 109d81 <oproc+0x25> <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
109dbc: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED
109dbf: 85 c0 test %eax,%eax <== NOT EXECUTED
109dc1: 7e dd jle 109da0 <oproc+0x44> <== NOT EXECUTED
tty->column--;
109dc3: 48 dec %eax <== NOT EXECUTED
109dc4: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED
109dc7: eb d7 jmp 109da0 <oproc+0x44> <== NOT EXECUTED
109dc9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
109dcc: f6 c1 20 test $0x20,%cl
109dcf: 74 07 je 109dd8 <oproc+0x7c> <== ALWAYS TAKEN
tty->column = 0;
109dd1: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
109dd8: 83 e1 04 and $0x4,%ecx
109ddb: 74 c3 je 109da0 <oproc+0x44> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
109ddd: 56 push %esi
109dde: 52 push %edx
109ddf: 6a 01 push $0x1
109de1: 68 30 2b 12 00 push $0x122b30
109de6: 89 55 f0 mov %edx,-0x10(%ebp)
109de9: e8 3a fe ff ff call 109c28 <rtems_termios_puts>
tty->column = 0;
109dee: 8b 55 f0 mov -0x10(%ebp),%edx
109df1: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx)
109df8: 83 c4 10 add $0x10,%esp
109dfb: eb a3 jmp 109da0 <oproc+0x44>
109dfd: 8d 76 00 lea 0x0(%esi),%esi
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
109e00: f6 c1 10 test $0x10,%cl <== NOT EXECUTED
109e03: 74 07 je 109e0c <oproc+0xb0> <== NOT EXECUTED
109e05: 8b 5a 28 mov 0x28(%edx),%ebx <== NOT EXECUTED
109e08: 85 db test %ebx,%ebx <== NOT EXECUTED
109e0a: 74 a4 je 109db0 <oproc+0x54> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
109e0c: f6 c1 08 test $0x8,%cl <== NOT EXECUTED
109e0f: 74 09 je 109e1a <oproc+0xbe> <== NOT EXECUTED
c = '\n';
109e11: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
109e15: 83 e1 20 and $0x20,%ecx <== NOT EXECUTED
109e18: 74 86 je 109da0 <oproc+0x44> <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
109e1a: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED
break;
109e21: e9 7a ff ff ff jmp 109da0 <oproc+0x44> <== NOT EXECUTED
109e26: 66 90 xchg %ax,%ax <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
109e28: 8b 5a 28 mov 0x28(%edx),%ebx
109e2b: 89 de mov %ebx,%esi
109e2d: 83 e6 07 and $0x7,%esi
109e30: b8 08 00 00 00 mov $0x8,%eax
109e35: 29 f0 sub %esi,%eax
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
109e37: 81 e1 00 18 00 00 and $0x1800,%ecx
109e3d: 81 f9 00 18 00 00 cmp $0x1800,%ecx
109e43: 74 37 je 109e7c <oproc+0x120> <== ALWAYS TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
109e45: 01 d8 add %ebx,%eax <== NOT EXECUTED
109e47: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED
break;
109e4a: e9 51 ff ff ff jmp 109da0 <oproc+0x44> <== NOT EXECUTED
109e4f: 90 nop <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
109e50: 8b 0d 24 71 12 00 mov 0x127124,%ecx <== NOT EXECUTED
109e56: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
109e59: 0f be 5c 01 01 movsbl 0x1(%ecx,%eax,1),%ebx <== NOT EXECUTED
109e5e: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED
109e61: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED
109e64: 74 0e je 109e74 <oproc+0x118> <== NOT EXECUTED
109e66: 89 c3 mov %eax,%ebx <== NOT EXECUTED
109e68: 88 d8 mov %bl,%al <== NOT EXECUTED
109e6a: 88 5d f4 mov %bl,-0xc(%ebp) <== NOT EXECUTED
109e6d: e9 1e ff ff ff jmp 109d90 <oproc+0x34> <== NOT EXECUTED
109e72: 66 90 xchg %ax,%ax <== NOT EXECUTED
109e74: 8d 58 e0 lea -0x20(%eax),%ebx <== NOT EXECUTED
109e77: eb ef jmp 109e68 <oproc+0x10c> <== NOT EXECUTED
109e79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
109e7c: 8d 1c 18 lea (%eax,%ebx,1),%ebx
109e7f: 89 5a 28 mov %ebx,0x28(%edx)
rtems_termios_puts ( " ", i, tty);
109e82: 51 push %ecx
109e83: 52 push %edx
109e84: 50 push %eax
109e85: 68 3c 27 12 00 push $0x12273c
109e8a: e8 99 fd ff ff call 109c28 <rtems_termios_puts>
return;
109e8f: 83 c4 10 add $0x10,%esp
109e92: e9 19 ff ff ff jmp 109db0 <oproc+0x54>
0010a50c <pathconf>:
long pathconf(
const char *path,
int name
)
{
10a50c: 55 push %ebp
10a50d: 89 e5 mov %esp,%ebp
10a50f: 56 push %esi
10a510: 53 push %ebx
int status;
int fd;
fd = open( path, O_RDONLY );
10a511: 83 ec 08 sub $0x8,%esp
10a514: 6a 00 push $0x0
10a516: ff 75 08 pushl 0x8(%ebp)
10a519: e8 92 fd ff ff call 10a2b0 <open>
10a51e: 89 c3 mov %eax,%ebx
if ( fd == -1 )
10a520: 83 c4 10 add $0x10,%esp
10a523: 83 f8 ff cmp $0xffffffff,%eax
10a526: 74 24 je 10a54c <pathconf+0x40>
return -1;
status = fpathconf( fd, name );
10a528: 83 ec 08 sub $0x8,%esp
10a52b: ff 75 0c pushl 0xc(%ebp)
10a52e: 50 push %eax
10a52f: e8 80 ec ff ff call 1091b4 <fpathconf>
10a534: 89 c6 mov %eax,%esi
(void) close( fd );
10a536: 89 1c 24 mov %ebx,(%esp)
10a539: e8 9a e7 ff ff call 108cd8 <close>
return status;
10a53e: 83 c4 10 add $0x10,%esp
}
10a541: 89 f0 mov %esi,%eax
10a543: 8d 65 f8 lea -0x8(%ebp),%esp
10a546: 5b pop %ebx
10a547: 5e pop %esi
10a548: c9 leave
10a549: c3 ret
10a54a: 66 90 xchg %ax,%ax
{
int status;
int fd;
fd = open( path, O_RDONLY );
if ( fd == -1 )
10a54c: be ff ff ff ff mov $0xffffffff,%esi
status = fpathconf( fd, name );
(void) close( fd );
return status;
}
10a551: 89 f0 mov %esi,%eax
10a553: 8d 65 f8 lea -0x8(%ebp),%esp
10a556: 5b pop %ebx
10a557: 5e pop %esi
10a558: c9 leave
10a559: c3 ret
00113944 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
113944: 55 push %ebp
113945: 89 e5 mov %esp,%ebp
113947: 57 push %edi
113948: 56 push %esi
113949: 53 push %ebx
11394a: 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)
11394d: 6a 01 push $0x1
11394f: 8d 5d c4 lea -0x3c(%ebp),%ebx
113952: 53 push %ebx
113953: 6a 07 push $0x7
113955: 6a 03 push $0x3
113957: 68 b1 35 12 00 push $0x1235b1
11395c: e8 13 4c ff ff call 108574 <rtems_filesystem_evaluate_path>
113961: 83 c4 20 add $0x20,%esp
113964: 85 c0 test %eax,%eax
113966: 0f 85 e0 00 00 00 jne 113a4c <pipe_create+0x108> <== ALWAYS TAKEN
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
return -1;
}
else
rtems_filesystem_freenode(&loc);
11396c: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
11396f: 85 c0 test %eax,%eax <== NOT EXECUTED
113971: 74 10 je 113983 <pipe_create+0x3f> <== NOT EXECUTED
113973: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
113976: 85 c0 test %eax,%eax <== NOT EXECUTED
113978: 74 09 je 113983 <pipe_create+0x3f> <== NOT EXECUTED
11397a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11397d: 53 push %ebx <== NOT EXECUTED
11397e: ff d0 call *%eax <== NOT EXECUTED
113980: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
113983: 8d 5d d9 lea -0x27(%ebp),%ebx
113986: be b6 35 12 00 mov $0x1235b6,%esi
11398b: b9 0a 00 00 00 mov $0xa,%ecx
113990: 89 df mov %ebx,%edi
113992: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
113994: 0f b7 05 50 90 12 00 movzwl 0x129050,%eax
11399b: 8d 50 01 lea 0x1(%eax),%edx
11399e: 66 89 15 50 90 12 00 mov %dx,0x129050
1139a5: 51 push %ecx
1139a6: 50 push %eax
1139a7: 68 c1 35 12 00 push $0x1235c1
1139ac: 8d 45 e3 lea -0x1d(%ebp),%eax
1139af: 50 push %eax
1139b0: e8 8f 20 00 00 call 115a44 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
1139b5: 58 pop %eax
1139b6: 5a pop %edx
1139b7: 68 80 01 00 00 push $0x180
1139bc: 53 push %ebx
1139bd: e8 8e 07 00 00 call 114150 <mkfifo>
1139c2: 83 c4 10 add $0x10,%esp
1139c5: 85 c0 test %eax,%eax
1139c7: 75 6f jne 113a38 <pipe_create+0xf4> <== NEVER TAKEN
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);
1139c9: 83 ec 08 sub $0x8,%esp
1139cc: 68 00 40 00 00 push $0x4000
1139d1: 53 push %ebx
1139d2: e8 fd 57 ff ff call 1091d4 <open>
1139d7: 8b 55 08 mov 0x8(%ebp),%edx
1139da: 89 02 mov %eax,(%edx)
if (filsdes[0] < 0) {
1139dc: 83 c4 10 add $0x10,%esp
1139df: 85 c0 test %eax,%eax
1139e1: 0f 88 a1 00 00 00 js 113a88 <pipe_create+0x144> <== ALWAYS TAKEN
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
1139e7: 3b 05 4c 51 12 00 cmp 0x12514c,%eax <== NOT EXECUTED
1139ed: 0f 82 85 00 00 00 jb 113a78 <pipe_create+0x134> <== NOT EXECUTED
1139f3: 31 c0 xor %eax,%eax <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
1139f5: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
1139f9: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1139fc: 6a 01 push $0x1 <== NOT EXECUTED
1139fe: 53 push %ebx <== NOT EXECUTED
1139ff: e8 d0 57 ff ff call 1091d4 <open> <== NOT EXECUTED
113a04: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
113a07: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED
if (filsdes[1] < 0) {
113a0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
113a0d: 85 c0 test %eax,%eax <== NOT EXECUTED
113a0f: 0f 88 8b 00 00 00 js 113aa0 <pipe_create+0x15c> <== NOT EXECUTED
113a15: 31 f6 xor %esi,%esi <== NOT EXECUTED
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
113a17: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
113a1a: 53 push %ebx <== NOT EXECUTED
113a1b: e8 4c 07 00 00 call 11416c <unlink> <== NOT EXECUTED
113a20: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_set_errno_and_return_minus_one(err);
113a23: e8 dc 16 00 00 call 115104 <__errno>
113a28: 89 30 mov %esi,(%eax)
}
113a2a: b8 ff ff ff ff mov $0xffffffff,%eax
113a2f: 8d 65 f4 lea -0xc(%ebp),%esp
113a32: 5b pop %ebx
113a33: 5e pop %esi
113a34: 5f pop %edi
113a35: c9 leave
113a36: c3 ret
113a37: 90 nop
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
if (errno != EEXIST){
113a38: e8 c7 16 00 00 call 115104 <__errno> <== NOT EXECUTED
}
unlink(fifopath);
}
rtems_set_errno_and_return_minus_one(err);
}
113a3d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
113a42: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
113a45: 5b pop %ebx <== NOT EXECUTED
113a46: 5e pop %esi <== NOT EXECUTED
113a47: 5f pop %edi <== NOT EXECUTED
113a48: c9 leave <== NOT EXECUTED
113a49: c3 ret <== NOT EXECUTED
113a4a: 66 90 xchg %ax,%ax <== NOT EXECUTED
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)
!= 0) {
if (errno != ENOENT)
113a4c: e8 b3 16 00 00 call 115104 <__errno>
113a51: 83 38 02 cmpl $0x2,(%eax)
113a54: 75 e7 jne 113a3d <pipe_create+0xf9> <== NEVER TAKEN
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
113a56: 83 ec 08 sub $0x8,%esp
113a59: 68 ff 03 00 00 push $0x3ff
113a5e: 68 b1 35 12 00 push $0x1235b1
113a63: e8 14 4f ff ff call 10897c <mkdir>
113a68: 83 c4 10 add $0x10,%esp
113a6b: 85 c0 test %eax,%eax
113a6d: 0f 84 10 ff ff ff je 113983 <pipe_create+0x3f> <== ALWAYS TAKEN
113a73: eb c8 jmp 113a3d <pipe_create+0xf9> <== NOT EXECUTED
113a75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
113a78: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED
113a7b: 03 05 80 92 12 00 add 0x129280,%eax <== NOT EXECUTED
113a81: e9 6f ff ff ff jmp 1139f5 <pipe_create+0xb1> <== NOT EXECUTED
113a86: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
113a88: e8 77 16 00 00 call 115104 <__errno>
113a8d: 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);
113a8f: 83 ec 0c sub $0xc,%esp
113a92: 53 push %ebx
113a93: e8 d4 06 00 00 call 11416c <unlink>
113a98: 83 c4 10 add $0x10,%esp
113a9b: eb 86 jmp 113a23 <pipe_create+0xdf>
113a9d: 8d 76 00 lea 0x0(%esi),%esi
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
113aa0: e8 5f 16 00 00 call 115104 <__errno> <== NOT EXECUTED
113aa5: 8b 30 mov (%eax),%esi <== NOT EXECUTED
close(filsdes[0]);
113aa7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
113aaa: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
113aad: ff 30 pushl (%eax) <== NOT EXECUTED
113aaf: e8 04 d2 ff ff call 110cb8 <close> <== NOT EXECUTED
113ab4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
113ab7: e9 5b ff ff ff jmp 113a17 <pipe_create+0xd3> <== NOT EXECUTED
0010f2f0 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
10f2f0: 55 push %ebp <== NOT EXECUTED
10f2f1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10f2f3: 56 push %esi <== NOT EXECUTED
10f2f4: 53 push %ebx <== NOT EXECUTED
10f2f5: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
10f2f8: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED
if (cmd == FIONREAD) {
10f2fb: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) <== NOT EXECUTED
10f302: 74 0c je 10f310 <pipe_ioctl+0x20> <== NOT EXECUTED
10f304: b8 ea ff ff ff mov $0xffffffea,%eax <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
10f309: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10f30c: 5b pop %ebx <== NOT EXECUTED
10f30d: 5e pop %esi <== NOT EXECUTED
10f30e: c9 leave <== NOT EXECUTED
10f30f: c3 ret <== NOT EXECUTED
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
10f310: 85 db test %ebx,%ebx <== NOT EXECUTED
10f312: 75 07 jne 10f31b <pipe_ioctl+0x2b> <== NOT EXECUTED
10f314: b8 f2 ff ff ff mov $0xfffffff2,%eax <== NOT EXECUTED
10f319: eb ee jmp 10f309 <pipe_ioctl+0x19> <== NOT EXECUTED
return -EFAULT;
if (! PIPE_LOCK(pipe))
10f31b: 52 push %edx <== NOT EXECUTED
10f31c: 6a 00 push $0x0 <== NOT EXECUTED
10f31e: 6a 00 push $0x0 <== NOT EXECUTED
10f320: ff 76 28 pushl 0x28(%esi) <== NOT EXECUTED
10f323: e8 bc c9 ff ff call 10bce4 <rtems_semaphore_obtain><== NOT EXECUTED
10f328: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f32b: 85 c0 test %eax,%eax <== NOT EXECUTED
10f32d: 74 07 je 10f336 <pipe_ioctl+0x46> <== NOT EXECUTED
10f32f: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED
10f334: eb d3 jmp 10f309 <pipe_ioctl+0x19> <== NOT EXECUTED
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
10f336: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED
10f339: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
10f33b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f33e: ff 76 28 pushl 0x28(%esi) <== NOT EXECUTED
10f341: e8 9a ca ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
10f346: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
10f348: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f34b: eb bc jmp 10f309 <pipe_ioctl+0x19> <== NOT EXECUTED
0010f290 <pipe_lseek>:
pipe_control_t *pipe,
off_t offset,
int whence,
rtems_libio_t *iop
)
{
10f290: 55 push %ebp <== NOT EXECUTED
10f291: 89 e5 mov %esp,%ebp <== NOT EXECUTED
/* Seek on pipe is not supported */
return -ESPIPE;
}
10f293: b8 e3 ff ff ff mov $0xffffffe3,%eax <== NOT EXECUTED
10f298: c9 leave <== NOT EXECUTED
10f299: c3 ret <== NOT EXECUTED
0010f350 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
10f350: 55 push %ebp <== NOT EXECUTED
10f351: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10f353: 57 push %edi <== NOT EXECUTED
10f354: 56 push %esi <== NOT EXECUTED
10f355: 53 push %ebx <== NOT EXECUTED
10f356: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED
10f359: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
10f35c: 6a 00 push $0x0 <== NOT EXECUTED
10f35e: 6a 00 push $0x0 <== NOT EXECUTED
10f360: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f363: e8 7c c9 ff ff call 10bce4 <rtems_semaphore_obtain><== NOT EXECUTED
10f368: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f36b: 85 c0 test %eax,%eax <== NOT EXECUTED
10f36d: 0f 85 b1 00 00 00 jne 10f424 <pipe_read+0xd4> <== NOT EXECUTED
return -EINTR;
while (read < count) {
10f373: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
10f376: 85 c9 test %ecx,%ecx <== NOT EXECUTED
10f378: 0f 84 82 01 00 00 je 10f500 <pipe_read+0x1b0> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
if (ret != 0)
10f37e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
10f385: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
10f38c: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
10f38f: 85 d2 test %edx,%edx <== NOT EXECUTED
10f391: 0f 85 a1 00 00 00 jne 10f438 <pipe_read+0xe8> <== NOT EXECUTED
/* Not an error */
if (pipe->Writers == 0)
10f397: 8b 53 14 mov 0x14(%ebx),%edx <== NOT EXECUTED
10f39a: 85 d2 test %edx,%edx <== NOT EXECUTED
10f39c: 0f 84 06 01 00 00 je 10f4a8 <pipe_read+0x158> <== NOT EXECUTED
goto out_locked;
if (LIBIO_NODELAY(iop)) {
10f3a2: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
10f3a5: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED
10f3a9: 0f 85 01 01 00 00 jne 10f4b0 <pipe_read+0x160> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
10f3af: ff 43 18 incl 0x18(%ebx) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
10f3b2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f3b5: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f3b8: e8 23 ca ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
10f3bd: 5f pop %edi <== NOT EXECUTED
10f3be: 58 pop %eax <== NOT EXECUTED
10f3bf: 6a 00 push $0x0 <== NOT EXECUTED
10f3c1: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10f3c4: e8 33 28 00 00 call 111bfc <rtems_barrier_wait> <== NOT EXECUTED
10f3c9: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10f3cc: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
10f3cf: 19 f6 sbb %esi,%esi <== NOT EXECUTED
10f3d1: f7 d6 not %esi <== NOT EXECUTED
10f3d3: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
10f3d6: 6a 00 push $0x0 <== NOT EXECUTED
10f3d8: 6a 00 push $0x0 <== NOT EXECUTED
10f3da: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f3dd: e8 02 c9 ff ff call 10bce4 <rtems_semaphore_obtain><== NOT EXECUTED
10f3e2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f3e5: 85 c0 test %eax,%eax <== NOT EXECUTED
10f3e7: 0f 85 cf 00 00 00 jne 10f4bc <pipe_read+0x16c> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
10f3ed: ff 4b 18 decl 0x18(%ebx) <== NOT EXECUTED
if (ret != 0)
10f3f0: 85 f6 test %esi,%esi <== NOT EXECUTED
10f3f2: 74 98 je 10f38c <pipe_read+0x3c> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
10f3f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f3f7: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f3fa: e8 e1 c9 ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
10f3ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
out_nolock:
if (read > 0)
10f402: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
10f405: 85 c9 test %ecx,%ecx <== NOT EXECUTED
10f407: 7e 0b jle 10f414 <pipe_read+0xc4> <== NOT EXECUTED
return read;
return ret;
}
10f409: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
10f40c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10f40f: 5b pop %ebx <== NOT EXECUTED
10f410: 5e pop %esi <== NOT EXECUTED
10f411: 5f pop %edi <== NOT EXECUTED
10f412: c9 leave <== NOT EXECUTED
10f413: c3 ret <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
10f414: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED
return read;
return ret;
}
10f417: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
10f41a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10f41d: 5b pop %ebx <== NOT EXECUTED
10f41e: 5e pop %esi <== NOT EXECUTED
10f41f: 5f pop %edi <== NOT EXECUTED
10f420: c9 leave <== NOT EXECUTED
10f421: c3 ret <== NOT EXECUTED
10f422: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
10f424: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
10f42b: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
10f42e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10f431: 5b pop %ebx <== NOT EXECUTED
10f432: 5e pop %esi <== NOT EXECUTED
10f433: 5f pop %edi <== NOT EXECUTED
10f434: c9 leave <== NOT EXECUTED
10f435: c3 ret <== NOT EXECUTED
10f436: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
10f438: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
10f43b: 2b 45 d0 sub -0x30(%ebp),%eax <== NOT EXECUTED
10f43e: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
10f441: 39 c2 cmp %eax,%edx <== NOT EXECUTED
10f443: 76 03 jbe 10f448 <pipe_read+0xf8> <== NOT EXECUTED
10f445: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
10f448: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED
10f44b: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED
10f44e: 29 f0 sub %esi,%eax <== NOT EXECUTED
if (chunk > chunk1) {
10f450: 39 45 cc cmp %eax,-0x34(%ebp) <== NOT EXECUTED
10f453: 7f 71 jg 10f4c6 <pipe_read+0x176> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
10f455: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10f458: 03 45 d0 add -0x30(%ebp),%eax <== NOT EXECUTED
10f45b: 03 33 add (%ebx),%esi <== NOT EXECUTED
10f45d: 89 c7 mov %eax,%edi <== NOT EXECUTED
10f45f: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
10f462: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
pipe->Start += chunk;
10f464: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
10f467: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED
pipe->Start %= pipe->Size;
10f46a: 31 d2 xor %edx,%edx <== NOT EXECUTED
10f46c: f7 73 04 divl 0x4(%ebx) <== NOT EXECUTED
10f46f: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED
pipe->Length -= chunk;
10f472: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
10f475: 2b 45 cc sub -0x34(%ebp),%eax <== NOT EXECUTED
10f478: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
10f47b: 85 c0 test %eax,%eax <== NOT EXECUTED
10f47d: 75 07 jne 10f486 <pipe_read+0x136> <== NOT EXECUTED
pipe->Start = 0;
10f47f: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED
if (pipe->waitingWriters > 0)
10f486: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED
10f489: 85 f6 test %esi,%esi <== NOT EXECUTED
10f48b: 75 5f jne 10f4ec <pipe_read+0x19c> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
10f48d: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
10f490: 01 45 d4 add %eax,-0x2c(%ebp) <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
10f493: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
10f496: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
10f499: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
10f49c: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED
10f49f: 0f 82 e7 fe ff ff jb 10f38c <pipe_read+0x3c> <== NOT EXECUTED
10f4a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10f4a8: 31 f6 xor %esi,%esi <== NOT EXECUTED
10f4aa: e9 45 ff ff ff jmp 10f3f4 <pipe_read+0xa4> <== NOT EXECUTED
10f4af: 90 nop <== NOT EXECUTED
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
10f4b0: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED
10f4b5: e9 3a ff ff ff jmp 10f3f4 <pipe_read+0xa4> <== NOT EXECUTED
10f4ba: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
10f4bc: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
10f4c1: e9 3c ff ff ff jmp 10f402 <pipe_read+0xb2> <== NOT EXECUTED
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
10f4c6: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
10f4c9: 03 55 d0 add -0x30(%ebp),%edx <== NOT EXECUTED
10f4cc: 03 33 add (%ebx),%esi <== NOT EXECUTED
10f4ce: 89 d7 mov %edx,%edi <== NOT EXECUTED
10f4d0: 89 c1 mov %eax,%ecx <== NOT EXECUTED
10f4d2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
10f4d4: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
10f4d7: 01 c2 add %eax,%edx <== NOT EXECUTED
10f4d9: 03 55 0c add 0xc(%ebp),%edx <== NOT EXECUTED
10f4dc: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
10f4df: 29 c1 sub %eax,%ecx <== NOT EXECUTED
10f4e1: 8b 33 mov (%ebx),%esi <== NOT EXECUTED
10f4e3: 89 d7 mov %edx,%edi <== NOT EXECUTED
10f4e5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
10f4e7: e9 78 ff ff ff jmp 10f464 <pipe_read+0x114> <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
10f4ec: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10f4ef: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10f4f2: 50 push %eax <== NOT EXECUTED
10f4f3: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10f4f6: e8 9d 26 00 00 call 111b98 <rtems_barrier_release> <== NOT EXECUTED
10f4fb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f4fe: eb 8d jmp 10f48d <pipe_read+0x13d> <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
10f500: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
10f507: 31 f6 xor %esi,%esi <== NOT EXECUTED
10f509: e9 e6 fe ff ff jmp 10f3f4 <pipe_read+0xa4> <== NOT EXECUTED
0010f710 <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
10f710: 55 push %ebp <== NOT EXECUTED
10f711: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10f713: 57 push %edi <== NOT EXECUTED
10f714: 56 push %esi <== NOT EXECUTED
10f715: 53 push %ebx <== NOT EXECUTED
10f716: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED
10f719: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
10f71c: 8b 1f mov (%edi),%ebx <== NOT EXECUTED
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
10f71e: 6a 00 push $0x0 <== NOT EXECUTED
10f720: 6a 00 push $0x0 <== NOT EXECUTED
10f722: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f725: e8 ba c5 ff ff call 10bce4 <rtems_semaphore_obtain><== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
10f72a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f72d: 85 c0 test %eax,%eax <== NOT EXECUTED
10f72f: 0f 85 e3 00 00 00 jne 10f818 <pipe_release+0x108> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
10f735: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10f738: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
10f73b: 89 c6 mov %eax,%esi <== NOT EXECUTED
10f73d: 83 e6 06 and $0x6,%esi <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
10f740: a8 02 test $0x2,%al <== NOT EXECUTED
10f742: 74 03 je 10f747 <pipe_release+0x37> <== NOT EXECUTED
pipe->Readers --;
10f744: ff 4b 10 decl 0x10(%ebx) <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
10f747: f7 c6 04 00 00 00 test $0x4,%esi <== NOT EXECUTED
10f74d: 75 69 jne 10f7b8 <pipe_release+0xa8> <== NOT EXECUTED
pipe->Writers --;
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
10f74f: 51 push %ecx <== NOT EXECUTED
10f750: 6a 00 push $0x0 <== NOT EXECUTED
10f752: 6a 00 push $0x0 <== NOT EXECUTED
10f754: ff 35 48 90 12 00 pushl 0x129048 <== NOT EXECUTED
10f75a: e8 85 c5 ff ff call 10bce4 <rtems_semaphore_obtain><== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
10f75f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f762: 85 c0 test %eax,%eax <== NOT EXECUTED
10f764: 0f 85 ae 00 00 00 jne 10f818 <pipe_release+0x108> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
10f76a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f76d: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f770: e8 6b c6 ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
10f775: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f778: 8b 53 10 mov 0x10(%ebx),%edx <== NOT EXECUTED
10f77b: 85 d2 test %edx,%edx <== NOT EXECUTED
10f77d: 74 41 je 10f7c0 <pipe_release+0xb0> <== NOT EXECUTED
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
10f77f: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
10f782: 85 c0 test %eax,%eax <== NOT EXECUTED
10f784: 75 17 jne 10f79d <pipe_release+0x8d> <== NOT EXECUTED
10f786: 83 fe 02 cmp $0x2,%esi <== NOT EXECUTED
10f789: 74 12 je 10f79d <pipe_release+0x8d> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
10f78b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10f78e: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10f791: 50 push %eax <== NOT EXECUTED
10f792: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10f795: e8 fe 23 00 00 call 111b98 <rtems_barrier_release> <== NOT EXECUTED
10f79a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
10f79d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f7a0: ff 35 48 90 12 00 pushl 0x129048 <== NOT EXECUTED
10f7a6: e8 35 c6 ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
10f7ab: 31 c0 xor %eax,%eax <== NOT EXECUTED
10f7ad: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10f7b0: 5b pop %ebx <== NOT EXECUTED
10f7b1: 5e pop %esi <== NOT EXECUTED
10f7b2: 5f pop %edi <== NOT EXECUTED
10f7b3: c9 leave <== NOT EXECUTED
10f7b4: c3 ret <== NOT EXECUTED
10f7b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
10f7b8: ff 4b 14 decl 0x14(%ebx) <== NOT EXECUTED
10f7bb: eb 92 jmp 10f74f <pipe_release+0x3f> <== NOT EXECUTED
10f7bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
10f7c0: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
10f7c3: 85 c0 test %eax,%eax <== NOT EXECUTED
10f7c5: 74 19 je 10f7e0 <pipe_release+0xd0> <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
10f7c7: 83 fe 04 cmp $0x4,%esi <== NOT EXECUTED
10f7ca: 74 d1 je 10f79d <pipe_release+0x8d> <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
10f7cc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10f7cf: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10f7d2: 50 push %eax <== NOT EXECUTED
10f7d3: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10f7d6: e8 bd 23 00 00 call 111b98 <rtems_barrier_release> <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
10f7db: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f7de: eb bd jmp 10f79d <pipe_release+0x8d> <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
10f7e0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f7e3: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10f7e6: e8 45 23 00 00 call 111b30 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
10f7eb: 5e pop %esi <== NOT EXECUTED
10f7ec: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10f7ef: e8 3c 23 00 00 call 111b30 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
10f7f4: 59 pop %ecx <== NOT EXECUTED
10f7f5: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f7f8: e8 43 c4 ff ff call 10bc40 <rtems_semaphore_delete><== NOT EXECUTED
free(pipe->Buffer);
10f7fd: 5a pop %edx <== NOT EXECUTED
10f7fe: ff 33 pushl (%ebx) <== NOT EXECUTED
10f800: e8 df 8d ff ff call 1085e4 <free> <== NOT EXECUTED
free(pipe);
10f805: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10f808: e8 d7 8d ff ff call 1085e4 <free> <== NOT EXECUTED
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
10f80d: 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) {
10f813: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f816: eb 85 jmp 10f79d <pipe_release+0x8d> <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
10f818: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f81b: 50 push %eax <== NOT EXECUTED
10f81c: e8 d7 ca ff ff call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
0010f510 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
10f510: 55 push %ebp <== NOT EXECUTED
10f511: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10f513: 57 push %edi <== NOT EXECUTED
10f514: 56 push %esi <== NOT EXECUTED
10f515: 53 push %ebx <== NOT EXECUTED
10f516: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
10f519: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
10f51c: 85 ff test %edi,%edi <== NOT EXECUTED
10f51e: 75 0c jne 10f52c <pipe_write+0x1c> <== NOT EXECUTED
10f520: 31 db xor %ebx,%ebx <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
10f522: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10f524: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10f527: 5b pop %ebx <== NOT EXECUTED
10f528: 5e pop %esi <== NOT EXECUTED
10f529: 5f pop %edi <== NOT EXECUTED
10f52a: c9 leave <== NOT EXECUTED
10f52b: c3 ret <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
10f52c: 56 push %esi <== NOT EXECUTED
10f52d: 6a 00 push $0x0 <== NOT EXECUTED
10f52f: 6a 00 push $0x0 <== NOT EXECUTED
10f531: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10f534: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED
10f537: e8 a8 c7 ff ff call 10bce4 <rtems_semaphore_obtain><== NOT EXECUTED
10f53c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f53f: 85 c0 test %eax,%eax <== NOT EXECUTED
10f541: 0f 85 1d 01 00 00 jne 10f664 <pipe_write+0x154> <== NOT EXECUTED
return -EINTR;
if (pipe->Readers == 0) {
10f547: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10f54a: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED
10f54d: 85 db test %ebx,%ebx <== NOT EXECUTED
10f54f: 0f 84 50 01 00 00 je 10f6a5 <pipe_write+0x195> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
10f555: 8b 48 04 mov 0x4(%eax),%ecx <== NOT EXECUTED
10f558: 39 4d 10 cmp %ecx,0x10(%ebp) <== NOT EXECUTED
10f55b: 0f 87 3a 01 00 00 ja 10f69b <pipe_write+0x18b> <== NOT EXECUTED
10f561: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
}
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
10f564: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
10f56b: 31 db xor %ebx,%ebx <== NOT EXECUTED
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
10f56d: 89 5d d4 mov %ebx,-0x2c(%ebp) <== NOT EXECUTED
10f570: 8b 5d 08 mov 0x8(%ebp),%ebx <== 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) {
10f573: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
10f576: 89 ca mov %ecx,%edx <== NOT EXECUTED
10f578: 29 c2 sub %eax,%edx <== NOT EXECUTED
10f57a: 39 fa cmp %edi,%edx <== NOT EXECUTED
10f57c: 73 6f jae 10f5ed <pipe_write+0xdd> <== NOT EXECUTED
if (LIBIO_NODELAY(iop)) {
10f57e: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
10f581: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED
10f585: 0f 85 47 01 00 00 jne 10f6d2 <pipe_write+0x1c2> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
10f58b: ff 43 1c incl 0x1c(%ebx) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
10f58e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f591: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f594: e8 47 c8 ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
10f599: 5a pop %edx <== NOT EXECUTED
10f59a: 59 pop %ecx <== NOT EXECUTED
10f59b: 6a 00 push $0x0 <== NOT EXECUTED
10f59d: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
10f5a0: e8 57 26 00 00 call 111bfc <rtems_barrier_wait> <== NOT EXECUTED
10f5a5: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10f5a8: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
10f5ab: 19 f6 sbb %esi,%esi <== NOT EXECUTED
10f5ad: f7 d6 not %esi <== NOT EXECUTED
10f5af: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
10f5b2: 6a 00 push $0x0 <== NOT EXECUTED
10f5b4: 6a 00 push $0x0 <== NOT EXECUTED
10f5b6: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
10f5b9: e8 26 c7 ff ff call 10bce4 <rtems_semaphore_obtain><== NOT EXECUTED
10f5be: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f5c1: 85 c0 test %eax,%eax <== NOT EXECUTED
10f5c3: 0f 85 ff 00 00 00 jne 10f6c8 <pipe_write+0x1b8> <== NOT EXECUTED
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
10f5c9: ff 4b 1c decl 0x1c(%ebx) <== NOT EXECUTED
if (ret != 0)
10f5cc: 85 f6 test %esi,%esi <== NOT EXECUTED
10f5ce: 0f 85 ef 00 00 00 jne 10f6c3 <pipe_write+0x1b3> <== NOT EXECUTED
goto out_locked;
if (pipe->Readers == 0) {
10f5d4: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
10f5d7: 85 c0 test %eax,%eax <== NOT EXECUTED
10f5d9: 0f 84 8f 00 00 00 je 10f66e <pipe_write+0x15e> <== NOT EXECUTED
10f5df: 8b 4b 04 mov 0x4(%ebx),%ecx <== 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) {
10f5e2: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
10f5e5: 89 ca mov %ecx,%edx <== NOT EXECUTED
10f5e7: 29 c2 sub %eax,%edx <== NOT EXECUTED
10f5e9: 39 fa cmp %edi,%edx <== NOT EXECUTED
10f5eb: 72 91 jb 10f57e <pipe_write+0x6e> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
10f5ed: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
10f5f0: 2b 75 d0 sub -0x30(%ebp),%esi <== NOT EXECUTED
10f5f3: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
10f5f6: 39 f2 cmp %esi,%edx <== NOT EXECUTED
10f5f8: 76 03 jbe 10f5fd <pipe_write+0xed> <== NOT EXECUTED
10f5fa: 89 75 cc mov %esi,-0x34(%ebp) <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
10f5fd: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED
10f600: 31 d2 xor %edx,%edx <== NOT EXECUTED
10f602: f7 f1 div %ecx <== NOT EXECUTED
10f604: 89 c8 mov %ecx,%eax <== NOT EXECUTED
10f606: 29 d0 sub %edx,%eax <== NOT EXECUTED
if (chunk > chunk1) {
10f608: 39 45 cc cmp %eax,-0x34(%ebp) <== NOT EXECUTED
10f60b: 0f 8e cb 00 00 00 jle 10f6dc <pipe_write+0x1cc> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
10f611: 03 13 add (%ebx),%edx <== NOT EXECUTED
10f613: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
10f616: 03 75 d0 add -0x30(%ebp),%esi <== NOT EXECUTED
10f619: 89 d7 mov %edx,%edi <== NOT EXECUTED
10f61b: 89 c1 mov %eax,%ecx <== NOT EXECUTED
10f61d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
10f61f: 8b 13 mov (%ebx),%edx <== NOT EXECUTED
10f621: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
10f624: 29 c1 sub %eax,%ecx <== NOT EXECUTED
10f626: 03 45 d0 add -0x30(%ebp),%eax <== NOT EXECUTED
10f629: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
10f62c: 01 c6 add %eax,%esi <== NOT EXECUTED
10f62e: 89 d7 mov %edx,%edi <== NOT EXECUTED
10f630: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
10f632: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
10f635: 01 43 0c add %eax,0xc(%ebx) <== NOT EXECUTED
if (pipe->waitingReaders > 0)
10f638: 83 7b 18 00 cmpl $0x0,0x18(%ebx) <== NOT EXECUTED
10f63c: 0f 85 ae 00 00 00 jne 10f6f0 <pipe_write+0x1e0> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
written += chunk;
10f642: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
10f645: 01 45 d4 add %eax,-0x2c(%ebp) <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
10f648: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
10f64b: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
10f64e: 39 45 10 cmp %eax,0x10(%ebp) <== NOT EXECUTED
10f651: 0f 86 af 00 00 00 jbe 10f706 <pipe_write+0x1f6> <== NOT EXECUTED
10f657: 8b 4b 04 mov 0x4(%ebx),%ecx <== NOT EXECUTED
10f65a: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
10f65f: e9 0f ff ff ff jmp 10f573 <pipe_write+0x63> <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
10f664: bb fc ff ff ff mov $0xfffffffc,%ebx <== NOT EXECUTED
10f669: e9 b4 fe ff ff jmp 10f522 <pipe_write+0x12> <== NOT EXECUTED
10f66e: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
}
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
10f671: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
10f676: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f679: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10f67c: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED
10f67f: e8 5c c7 ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
10f684: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
10f687: 83 fe e0 cmp $0xffffffe0,%esi <== NOT EXECUTED
10f68a: 74 22 je 10f6ae <pipe_write+0x19e> <== NOT EXECUTED
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
10f68c: 85 db test %ebx,%ebx <== NOT EXECUTED
10f68e: 0f 8f 8e fe ff ff jg 10f522 <pipe_write+0x12> <== NOT EXECUTED
10f694: 89 f3 mov %esi,%ebx <== NOT EXECUTED
10f696: e9 87 fe ff ff jmp 10f522 <pipe_write+0x12> <== NOT EXECUTED
}
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
10f69b: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
10f6a0: e9 bf fe ff ff jmp 10f564 <pipe_write+0x54> <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
10f6a5: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED
10f6aa: 31 db xor %ebx,%ebx <== NOT EXECUTED
10f6ac: eb c8 jmp 10f676 <pipe_write+0x166> <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
10f6ae: e8 81 17 00 00 call 110e34 <getpid> <== NOT EXECUTED
10f6b3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10f6b6: 6a 0d push $0xd <== NOT EXECUTED
10f6b8: 50 push %eax <== NOT EXECUTED
10f6b9: e8 ee 1c 00 00 call 1113ac <kill> <== NOT EXECUTED
10f6be: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f6c1: eb c9 jmp 10f68c <pipe_write+0x17c> <== NOT EXECUTED
10f6c3: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
10f6c6: eb ae jmp 10f676 <pipe_write+0x166> <== NOT EXECUTED
10f6c8: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
10f6cb: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
10f6d0: eb ba jmp 10f68c <pipe_write+0x17c> <== NOT EXECUTED
10f6d2: 8b 5d d4 mov -0x2c(%ebp),%ebx <== 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) {
if (LIBIO_NODELAY(iop)) {
10f6d5: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED
10f6da: eb 9a jmp 10f676 <pipe_write+0x166> <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
10f6dc: 03 13 add (%ebx),%edx <== NOT EXECUTED
10f6de: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
10f6e1: 03 75 d0 add -0x30(%ebp),%esi <== NOT EXECUTED
10f6e4: 89 d7 mov %edx,%edi <== NOT EXECUTED
10f6e6: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
10f6e9: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
10f6eb: e9 42 ff ff ff jmp 10f632 <pipe_write+0x122> <== NOT EXECUTED
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
10f6f0: 56 push %esi <== NOT EXECUTED
10f6f1: 56 push %esi <== NOT EXECUTED
10f6f2: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10f6f5: 50 push %eax <== NOT EXECUTED
10f6f6: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
10f6f9: e8 9a 24 00 00 call 111b98 <rtems_barrier_release> <== NOT EXECUTED
10f6fe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f701: e9 3c ff ff ff jmp 10f642 <pipe_write+0x132> <== NOT EXECUTED
10f706: 89 c3 mov %eax,%ebx <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
10f708: 31 f6 xor %esi,%esi <== NOT EXECUTED
10f70a: e9 67 ff ff ff jmp 10f676 <pipe_write+0x166> <== NOT EXECUTED
0010be10 <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
10be10: 55 push %ebp
10be11: 89 e5 mov %esp,%ebp
10be13: 53 push %ebx
10be14: 83 ec 04 sub $0x4,%esp
10be17: 8b 45 0c mov 0xc(%ebp),%eax
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
10be1a: ff 05 e8 ff 12 00 incl 0x12ffe8
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
10be20: 8d 50 ff lea -0x1(%eax),%edx
10be23: 85 c2 test %eax,%edx
10be25: 75 05 jne 10be2c <posix_memalign+0x1c> <== NEVER TAKEN
10be27: 83 f8 03 cmp $0x3,%eax
10be2a: 77 0c ja 10be38 <posix_memalign+0x28>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
10be2c: b8 16 00 00 00 mov $0x16,%eax
10be31: 5a pop %edx
10be32: 5b pop %ebx
10be33: c9 leave
10be34: c3 ret
10be35: 8d 76 00 lea 0x0(%esi),%esi
10be38: 59 pop %ecx
10be39: 5b pop %ebx
10be3a: c9 leave
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
10be3b: e9 20 01 00 00 jmp 10bf60 <rtems_memalign>
00110398 <pthread_attr_destroy>:
#include <rtems/system.h>
int pthread_attr_destroy(
pthread_attr_t *attr
)
{
110398: 55 push %ebp
110399: 89 e5 mov %esp,%ebp
11039b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
11039e: 85 c0 test %eax,%eax
1103a0: 74 12 je 1103b4 <pthread_attr_destroy+0x1c>
1103a2: 8b 10 mov (%eax),%edx
1103a4: 85 d2 test %edx,%edx
1103a6: 74 0c je 1103b4 <pthread_attr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
1103a8: c7 00 00 00 00 00 movl $0x0,(%eax)
1103ae: 31 c0 xor %eax,%eax
return 0;
}
1103b0: c9 leave
1103b1: c3 ret
1103b2: 66 90 xchg %ax,%ax
{
if ( !attr || !attr->is_initialized )
return EINVAL;
attr->is_initialized = false;
return 0;
1103b4: b8 16 00 00 00 mov $0x16,%eax
}
1103b9: c9 leave
1103ba: c3 ret
001129fc <pthread_attr_setinheritsched>:
int pthread_attr_setinheritsched(
pthread_attr_t *attr,
int inheritsched
)
{
1129fc: 55 push %ebp
1129fd: 89 e5 mov %esp,%ebp
1129ff: 8b 45 08 mov 0x8(%ebp),%eax
112a02: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
112a05: 85 c0 test %eax,%eax
112a07: 74 1f je 112a28 <pthread_attr_setinheritsched+0x2c>
112a09: 8b 08 mov (%eax),%ecx
112a0b: 85 c9 test %ecx,%ecx
112a0d: 74 19 je 112a28 <pthread_attr_setinheritsched+0x2c>
return EINVAL;
switch ( inheritsched ) {
112a0f: 8d 4a ff lea -0x1(%edx),%ecx
112a12: 83 f9 01 cmp $0x1,%ecx
112a15: 76 09 jbe 112a20 <pthread_attr_setinheritsched+0x24>
112a17: b8 86 00 00 00 mov $0x86,%eax
return 0;
default:
return ENOTSUP;
}
}
112a1c: c9 leave
112a1d: c3 ret
112a1e: 66 90 xchg %ax,%ax
return EINVAL;
switch ( inheritsched ) {
case PTHREAD_INHERIT_SCHED:
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
112a20: 89 50 10 mov %edx,0x10(%eax)
112a23: 31 c0 xor %eax,%eax
return 0;
default:
return ENOTSUP;
}
}
112a25: c9 leave
112a26: c3 ret
112a27: 90 nop
switch ( inheritsched ) {
case PTHREAD_INHERIT_SCHED:
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
return 0;
112a28: b8 16 00 00 00 mov $0x16,%eax
default:
return ENOTSUP;
}
}
112a2d: c9 leave
112a2e: c3 ret
00110568 <pthread_attr_setschedparam>:
int pthread_attr_setschedparam(
pthread_attr_t *attr,
const struct sched_param *param
)
{
110568: 55 push %ebp
110569: 89 e5 mov %esp,%ebp
11056b: 57 push %edi
11056c: 56 push %esi
11056d: 8b 7d 08 mov 0x8(%ebp),%edi
110570: 8b 75 0c mov 0xc(%ebp),%esi
if ( !attr || !attr->is_initialized || !param )
110573: 85 ff test %edi,%edi
110575: 74 1d je 110594 <pthread_attr_setschedparam+0x2c>
110577: 8b 07 mov (%edi),%eax
110579: 85 c0 test %eax,%eax
11057b: 74 17 je 110594 <pthread_attr_setschedparam+0x2c>
11057d: 85 f6 test %esi,%esi
11057f: 74 13 je 110594 <pthread_attr_setschedparam+0x2c>
return EINVAL;
attr->schedparam = *param;
110581: 83 c7 18 add $0x18,%edi
110584: b9 07 00 00 00 mov $0x7,%ecx
110589: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
11058b: 31 c0 xor %eax,%eax
return 0;
}
11058d: 5e pop %esi
11058e: 5f pop %edi
11058f: c9 leave
110590: c3 ret
110591: 8d 76 00 lea 0x0(%esi),%esi
{
if ( !attr || !attr->is_initialized || !param )
return EINVAL;
attr->schedparam = *param;
return 0;
110594: b8 16 00 00 00 mov $0x16,%eax
}
110599: 5e pop %esi
11059a: 5f pop %edi
11059b: c9 leave
11059c: c3 ret
001105a0 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
1105a0: 55 push %ebp
1105a1: 89 e5 mov %esp,%ebp
1105a3: 8b 45 08 mov 0x8(%ebp),%eax
1105a6: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
1105a9: 85 c0 test %eax,%eax
1105ab: 74 23 je 1105d0 <pthread_attr_setschedpolicy+0x30>
1105ad: 8b 08 mov (%eax),%ecx
1105af: 85 c9 test %ecx,%ecx
1105b1: 74 1d je 1105d0 <pthread_attr_setschedpolicy+0x30>
return EINVAL;
switch ( policy ) {
1105b3: 85 d2 test %edx,%edx
1105b5: 78 0a js 1105c1 <pthread_attr_setschedpolicy+0x21>
1105b7: 83 fa 02 cmp $0x2,%edx
1105ba: 7e 0c jle 1105c8 <pthread_attr_setschedpolicy+0x28>
1105bc: 83 fa 04 cmp $0x4,%edx
1105bf: 74 07 je 1105c8 <pthread_attr_setschedpolicy+0x28><== ALWAYS TAKEN
1105c1: b8 86 00 00 00 mov $0x86,%eax
return 0;
default:
return ENOTSUP;
}
}
1105c6: c9 leave
1105c7: c3 ret
switch ( policy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
1105c8: 89 50 14 mov %edx,0x14(%eax)
1105cb: 31 c0 xor %eax,%eax
return 0;
default:
return ENOTSUP;
}
}
1105cd: c9 leave
1105ce: c3 ret
1105cf: 90 nop
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
1105d0: b8 16 00 00 00 mov $0x16,%eax
default:
return ENOTSUP;
}
}
1105d5: c9 leave
1105d6: c3 ret
001105d8 <pthread_attr_setscope>:
int pthread_attr_setscope(
pthread_attr_t *attr,
int contentionscope
)
{
1105d8: 55 push %ebp
1105d9: 89 e5 mov %esp,%ebp
1105db: 8b 45 08 mov 0x8(%ebp),%eax
1105de: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
1105e1: 85 c0 test %eax,%eax
1105e3: 74 1a je 1105ff <pthread_attr_setscope+0x27>
1105e5: 8b 08 mov (%eax),%ecx
1105e7: 85 c9 test %ecx,%ecx
1105e9: 74 14 je 1105ff <pthread_attr_setscope+0x27>
return EINVAL;
switch ( contentionscope ) {
1105eb: 85 d2 test %edx,%edx
1105ed: 75 0d jne 1105fc <pthread_attr_setscope+0x24>
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
1105ef: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
1105f6: 31 c0 xor %eax,%eax
return ENOTSUP;
default:
return EINVAL;
}
}
1105f8: c9 leave
1105f9: c3 ret
1105fa: 66 90 xchg %ax,%ax
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
1105fc: 4a dec %edx
1105fd: 74 09 je 110608 <pthread_attr_setscope+0x30>
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
return 0;
1105ff: b8 16 00 00 00 mov $0x16,%eax
return ENOTSUP;
default:
return EINVAL;
}
}
110604: c9 leave
110605: c3 ret
110606: 66 90 xchg %ax,%ax
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
110608: b8 86 00 00 00 mov $0x86,%eax
return ENOTSUP;
default:
return EINVAL;
}
}
11060d: c9 leave
11060e: c3 ret
00110610 <pthread_attr_setstackaddr>:
int pthread_attr_setstackaddr(
pthread_attr_t *attr,
void *stackaddr
)
{
110610: 55 push %ebp
110611: 89 e5 mov %esp,%ebp
110613: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
110616: 85 c0 test %eax,%eax
110618: 74 12 je 11062c <pthread_attr_setstackaddr+0x1c>
11061a: 8b 10 mov (%eax),%edx
11061c: 85 d2 test %edx,%edx
11061e: 74 0c je 11062c <pthread_attr_setstackaddr+0x1c>
return EINVAL;
attr->stackaddr = stackaddr;
110620: 8b 55 0c mov 0xc(%ebp),%edx
110623: 89 50 04 mov %edx,0x4(%eax)
110626: 31 c0 xor %eax,%eax
return 0;
}
110628: c9 leave
110629: c3 ret
11062a: 66 90 xchg %ax,%ax
{
if ( !attr || !attr->is_initialized )
return EINVAL;
attr->stackaddr = stackaddr;
return 0;
11062c: b8 16 00 00 00 mov $0x16,%eax
}
110631: c9 leave
110632: c3 ret
00112a30 <pthread_attr_setstacksize>:
int pthread_attr_setstacksize(
pthread_attr_t *attr,
size_t stacksize
)
{
112a30: 55 push %ebp
112a31: 89 e5 mov %esp,%ebp
112a33: 8b 45 08 mov 0x8(%ebp),%eax
112a36: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
112a39: 85 c0 test %eax,%eax
112a3b: 74 23 je 112a60 <pthread_attr_setstacksize+0x30>
112a3d: 8b 08 mov (%eax),%ecx
112a3f: 85 c9 test %ecx,%ecx
112a41: 74 1d je 112a60 <pthread_attr_setstacksize+0x30>
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
112a43: 8b 0d 78 67 12 00 mov 0x126778,%ecx
112a49: d1 e1 shl %ecx
112a4b: 39 d1 cmp %edx,%ecx
112a4d: 77 09 ja 112a58 <pthread_attr_setstacksize+0x28>
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
112a4f: 89 50 08 mov %edx,0x8(%eax)
112a52: 31 c0 xor %eax,%eax
return 0;
}
112a54: c9 leave
112a55: c3 ret
112a56: 66 90 xchg %ax,%ax
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
112a58: 89 48 08 mov %ecx,0x8(%eax)
112a5b: 31 c0 xor %eax,%eax
else
attr->stacksize = stacksize;
return 0;
}
112a5d: c9 leave
112a5e: c3 ret
112a5f: 90 nop
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
112a60: b8 16 00 00 00 mov $0x16,%eax
return 0;
}
112a65: c9 leave
112a66: c3 ret
0010bf5c <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
10bf5c: 55 push %ebp
10bf5d: 89 e5 mov %esp,%ebp
10bf5f: 57 push %edi
10bf60: 56 push %esi
10bf61: 53 push %ebx
10bf62: 83 ec 2c sub $0x2c,%esp
10bf65: 8b 5d 08 mov 0x8(%ebp),%ebx
10bf68: 8b 7d 0c mov 0xc(%ebp),%edi
10bf6b: 8b 75 10 mov 0x10(%ebp),%esi
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
10bf6e: 85 db test %ebx,%ebx
10bf70: 0f 84 82 00 00 00 je 10bff8 <pthread_barrier_init+0x9c>
return EINVAL;
if ( count == 0 )
10bf76: 85 f6 test %esi,%esi
10bf78: 74 7e je 10bff8 <pthread_barrier_init+0x9c>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10bf7a: 85 ff test %edi,%edi
10bf7c: 0f 84 92 00 00 00 je 10c014 <pthread_barrier_init+0xb8><== NEVER TAKEN
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10bf82: 8b 17 mov (%edi),%edx
10bf84: 85 d2 test %edx,%edx
10bf86: 74 70 je 10bff8 <pthread_barrier_init+0x9c>
return EINVAL;
switch ( the_attr->process_shared ) {
10bf88: 8b 47 04 mov 0x4(%edi),%eax
10bf8b: 85 c0 test %eax,%eax
10bf8d: 75 69 jne 10bff8 <pthread_barrier_init+0x9c><== NEVER TAKEN
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
10bf8f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
the_attributes.maximum_count = count;
10bf96: 89 75 e4 mov %esi,-0x1c(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10bf99: a1 18 ae 12 00 mov 0x12ae18,%eax
10bf9e: 40 inc %eax
10bf9f: a3 18 ae 12 00 mov %eax,0x12ae18
* 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 *)
10bfa4: 83 ec 0c sub $0xc,%esp
10bfa7: 68 60 b2 12 00 push $0x12b260
10bfac: e8 8b 20 00 00 call 10e03c <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
10bfb1: 83 c4 10 add $0x10,%esp
10bfb4: 85 c0 test %eax,%eax
10bfb6: 74 50 je 10c008 <pthread_barrier_init+0xac><== NEVER TAKEN
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
10bfb8: 83 ec 08 sub $0x8,%esp
10bfbb: 8d 55 e0 lea -0x20(%ebp),%edx
10bfbe: 52 push %edx
10bfbf: 8d 50 10 lea 0x10(%eax),%edx
10bfc2: 52 push %edx
10bfc3: 89 45 d4 mov %eax,-0x2c(%ebp)
10bfc6: e8 a5 16 00 00 call 10d670 <_CORE_barrier_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bfcb: 8b 45 d4 mov -0x2c(%ebp),%eax
10bfce: 8b 50 08 mov 0x8(%eax),%edx
10bfd1: 0f b7 f2 movzwl %dx,%esi
10bfd4: 8b 0d 7c b2 12 00 mov 0x12b27c,%ecx
10bfda: 89 04 b1 mov %eax,(%ecx,%esi,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10bfdd: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
10bfe4: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10bfe6: e8 75 2d 00 00 call 10ed60 <_Thread_Enable_dispatch>
10bfeb: 31 c0 xor %eax,%eax
return 0;
10bfed: 83 c4 10 add $0x10,%esp
}
10bff0: 8d 65 f4 lea -0xc(%ebp),%esp
10bff3: 5b pop %ebx
10bff4: 5e pop %esi
10bff5: 5f pop %edi
10bff6: c9 leave
10bff7: c3 ret
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
10bff8: b8 16 00 00 00 mov $0x16,%eax
}
10bffd: 8d 65 f4 lea -0xc(%ebp),%esp
10c000: 5b pop %ebx
10c001: 5e pop %esi
10c002: 5f pop %edi
10c003: c9 leave
10c004: c3 ret
10c005: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
10c008: e8 53 2d 00 00 call 10ed60 <_Thread_Enable_dispatch>
10c00d: b8 0b 00 00 00 mov $0xb,%eax
return EAGAIN;
10c012: eb e9 jmp 10bffd <pthread_barrier_init+0xa1>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
10c014: 83 ec 0c sub $0xc,%esp
10c017: 8d 7d d8 lea -0x28(%ebp),%edi
10c01a: 57 push %edi
10c01b: e8 80 fe ff ff call 10bea0 <pthread_barrierattr_init>
10c020: 83 c4 10 add $0x10,%esp
10c023: e9 5a ff ff ff jmp 10bf82 <pthread_barrier_init+0x26>
0010c028 <pthread_barrier_wait>:
*/
int pthread_barrier_wait(
pthread_barrier_t *barrier
)
{
10c028: 55 push %ebp
10c029: 89 e5 mov %esp,%ebp
10c02b: 83 ec 18 sub $0x18,%esp
10c02e: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
10c031: 85 c0 test %eax,%eax
10c033: 74 4f je 10c084 <pthread_barrier_wait+0x5c>
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get (
pthread_barrier_t *barrier,
Objects_Locations *location
)
{
return (POSIX_Barrier_Control *) _Objects_Get(
10c035: 51 push %ecx
10c036: 8d 55 f4 lea -0xc(%ebp),%edx
10c039: 52 push %edx
10c03a: ff 30 pushl (%eax)
10c03c: 68 60 b2 12 00 push $0x12b260
10c041: e8 a6 24 00 00 call 10e4ec <_Objects_Get>
return EINVAL;
the_barrier = _POSIX_Barrier_Get( barrier, &location );
switch ( location ) {
10c046: 83 c4 10 add $0x10,%esp
10c049: 8b 55 f4 mov -0xc(%ebp),%edx
10c04c: 85 d2 test %edx,%edx
10c04e: 75 34 jne 10c084 <pthread_barrier_wait+0x5c>
case OBJECTS_LOCAL:
_CORE_barrier_Wait(
10c050: 83 ec 0c sub $0xc,%esp
10c053: 6a 00 push $0x0
10c055: 6a 00 push $0x0
10c057: 6a 01 push $0x1
10c059: ff 70 08 pushl 0x8(%eax)
10c05c: 83 c0 10 add $0x10,%eax
10c05f: 50 push %eax
10c060: e8 3f 16 00 00 call 10d6a4 <_CORE_barrier_Wait>
the_barrier->Object.id,
true,
0,
NULL
);
_Thread_Enable_dispatch();
10c065: 83 c4 20 add $0x20,%esp
10c068: e8 f3 2c 00 00 call 10ed60 <_Thread_Enable_dispatch>
return _POSIX_Barrier_Translate_core_barrier_return_code(
10c06d: 83 ec 0c sub $0xc,%esp
10c070: a1 d8 ae 12 00 mov 0x12aed8,%eax
10c075: ff 70 34 pushl 0x34(%eax)
10c078: e8 8f 66 00 00 call 11270c <_POSIX_Barrier_Translate_core_barrier_return_code>
10c07d: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c080: c9 leave
10c081: c3 ret
10c082: 66 90 xchg %ax,%ax
true,
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_Barrier_Translate_core_barrier_return_code(
10c084: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c089: c9 leave
10c08a: c3 ret
0010be58 <pthread_barrierattr_destroy>:
*/
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
10be58: 55 push %ebp
10be59: 89 e5 mov %esp,%ebp
10be5b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10be5e: 85 c0 test %eax,%eax
10be60: 74 12 je 10be74 <pthread_barrierattr_destroy+0x1c>
10be62: 8b 10 mov (%eax),%edx
10be64: 85 d2 test %edx,%edx
10be66: 74 0c je 10be74 <pthread_barrierattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10be68: c7 00 00 00 00 00 movl $0x0,(%eax)
10be6e: 31 c0 xor %eax,%eax
return 0;
}
10be70: c9 leave
10be71: c3 ret
10be72: 66 90 xchg %ax,%ax
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
return 0;
10be74: b8 16 00 00 00 mov $0x16,%eax
}
10be79: c9 leave
10be7a: c3 ret
0010b738 <pthread_cancel>:
*/
int pthread_cancel(
pthread_t thread
)
{
10b738: 55 push %ebp
10b739: 89 e5 mov %esp,%ebp
10b73b: 83 ec 18 sub $0x18,%esp
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() )
10b73e: a1 f4 aa 12 00 mov 0x12aaf4,%eax
10b743: 85 c0 test %eax,%eax
10b745: 74 09 je 10b750 <pthread_cancel+0x18>
10b747: b8 47 00 00 00 mov $0x47,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b74c: c9 leave
10b74d: c3 ret
10b74e: 66 90 xchg %ax,%ax
*/
if ( _ISR_Is_in_progress() )
return EPROTO;
the_thread = _Thread_Get( thread, &location );
10b750: 83 ec 08 sub $0x8,%esp
10b753: 8d 45 f4 lea -0xc(%ebp),%eax
10b756: 50 push %eax
10b757: ff 75 08 pushl 0x8(%ebp)
10b75a: e8 55 29 00 00 call 10e0b4 <_Thread_Get>
switch ( location ) {
10b75f: 83 c4 10 add $0x10,%esp
10b762: 8b 55 f4 mov -0xc(%ebp),%edx
10b765: 85 d2 test %edx,%edx
10b767: 75 23 jne 10b78c <pthread_cancel+0x54>
case OBJECTS_LOCAL:
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
thread_support->cancelation_requested = 1;
10b769: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
10b76f: c7 82 dc 00 00 00 01 movl $0x1,0xdc(%edx)
10b776: 00 00 00
/* This enables dispatch implicitly */
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread );
10b779: 83 ec 0c sub $0xc,%esp
10b77c: 50 push %eax
10b77d: e8 0a 60 00 00 call 11178c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
10b782: 31 c0 xor %eax,%eax
return 0;
10b784: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b787: c9 leave
10b788: c3 ret
10b789: 8d 76 00 lea 0x0(%esi),%esi
if ( _ISR_Is_in_progress() )
return EPROTO;
the_thread = _Thread_Get( thread, &location );
switch ( location ) {
10b78c: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b791: c9 leave
10b792: c3 ret
0010b5b8 <pthread_cleanup_pop>:
*/
void pthread_cleanup_pop(
int execute
)
{
10b5b8: 55 push %ebp
10b5b9: 89 e5 mov %esp,%ebp
10b5bb: 57 push %edi
10b5bc: 56 push %esi
10b5bd: 53 push %ebx
10b5be: 83 ec 1c sub $0x1c,%esp
10b5c1: 8b 5d 08 mov 0x8(%ebp),%ebx
POSIX_Cancel_Handler_control tmp_handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b5c4: a1 78 9c 12 00 mov 0x129c78,%eax
10b5c9: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b5cf: 8b 15 b8 9b 12 00 mov 0x129bb8,%edx
10b5d5: 42 inc %edx
10b5d6: 89 15 b8 9b 12 00 mov %edx,0x129bb8
* ensure that we do not get prempted and deleted while we are holding
* memory that needs to be freed.
*/
_Thread_Disable_dispatch();
_ISR_Disable( level );
10b5dc: 9c pushf
10b5dd: fa cli
10b5de: 5e pop %esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10b5df: 8d 90 e4 00 00 00 lea 0xe4(%eax),%edx
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
10b5e5: 39 90 e0 00 00 00 cmp %edx,0xe0(%eax)
10b5eb: 74 4f je 10b63c <pthread_cleanup_pop+0x84>
_Thread_Enable_dispatch();
_ISR_Enable( level );
return;
}
handler = (POSIX_Cancel_Handler_control *)
10b5ed: 8b 42 04 mov 0x4(%edx),%eax
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10b5f0: 8b 08 mov (%eax),%ecx
previous = the_node->previous;
10b5f2: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
10b5f5: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
10b5f8: 89 0a mov %ecx,(%edx)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
10b5fa: 56 push %esi
10b5fb: 9d popf
tmp_handler = *handler;
10b5fc: 8d 7d d8 lea -0x28(%ebp),%edi
10b5ff: b9 04 00 00 00 mov $0x4,%ecx
10b604: 89 c6 mov %eax,%esi
10b606: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10b608: 8b 75 e0 mov -0x20(%ebp),%esi
10b60b: 8b 7d e4 mov -0x1c(%ebp),%edi
_Workspace_Free( handler );
10b60e: 83 ec 0c sub $0xc,%esp
10b611: 50 push %eax
10b612: e8 bd 38 00 00 call 10eed4 <_Workspace_Free>
_Thread_Enable_dispatch();
10b617: e8 fc 26 00 00 call 10dd18 <_Thread_Enable_dispatch>
if ( execute )
10b61c: 83 c4 10 add $0x10,%esp
10b61f: 85 db test %ebx,%ebx
10b621: 75 09 jne 10b62c <pthread_cleanup_pop+0x74>
(*tmp_handler.routine)( tmp_handler.arg );
}
10b623: 8d 65 f4 lea -0xc(%ebp),%esp
10b626: 5b pop %ebx
10b627: 5e pop %esi
10b628: 5f pop %edi
10b629: c9 leave
10b62a: c3 ret
10b62b: 90 nop
_Workspace_Free( handler );
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
10b62c: 89 7d 08 mov %edi,0x8(%ebp)
10b62f: 89 f0 mov %esi,%eax
}
10b631: 8d 65 f4 lea -0xc(%ebp),%esp
10b634: 5b pop %ebx
10b635: 5e pop %esi
10b636: 5f pop %edi
10b637: c9 leave
_Workspace_Free( handler );
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
10b638: ff e0 jmp *%eax
10b63a: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
_ISR_Disable( level );
if ( _Chain_Is_empty( handler_stack ) ) {
_Thread_Enable_dispatch();
10b63c: e8 d7 26 00 00 call 10dd18 <_Thread_Enable_dispatch>
_ISR_Enable( level );
10b641: 56 push %esi
10b642: 9d popf
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
}
10b643: 8d 65 f4 lea -0xc(%ebp),%esp
10b646: 5b pop %ebx
10b647: 5e pop %esi
10b648: 5f pop %edi
10b649: c9 leave
10b64a: c3 ret
0010b964 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
10b964: 55 push %ebp
10b965: 89 e5 mov %esp,%ebp
10b967: 56 push %esi
10b968: 53 push %ebx
10b969: 8b 5d 08 mov 0x8(%ebp),%ebx
10b96c: 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 )
10b96f: 85 db test %ebx,%ebx
10b971: 74 4d je 10b9c0 <pthread_cleanup_push+0x5c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b973: a1 98 b2 12 00 mov 0x12b298,%eax
10b978: 40 inc %eax
10b979: a3 98 b2 12 00 mov %eax,0x12b298
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
10b97e: 83 ec 0c sub $0xc,%esp
10b981: 6a 10 push $0x10
10b983: e8 ac 40 00 00 call 10fa34 <_Workspace_Allocate>
if ( handler ) {
10b988: 83 c4 10 add $0x10,%esp
10b98b: 85 c0 test %eax,%eax
10b98d: 74 25 je 10b9b4 <pthread_cleanup_push+0x50><== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
10b98f: 8b 15 58 b3 12 00 mov 0x12b358,%edx
10b995: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx
10b99b: 81 c2 e0 00 00 00 add $0xe0,%edx
handler->routine = routine;
10b9a1: 89 58 08 mov %ebx,0x8(%eax)
handler->arg = arg;
10b9a4: 89 70 0c mov %esi,0xc(%eax)
_Chain_Append( handler_stack, &handler->Node );
10b9a7: 83 ec 08 sub $0x8,%esp
10b9aa: 50 push %eax
10b9ab: 52 push %edx
10b9ac: e8 c3 17 00 00 call 10d174 <_Chain_Append>
10b9b1: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
}
10b9b4: 8d 65 f8 lea -0x8(%ebp),%esp
10b9b7: 5b pop %ebx
10b9b8: 5e pop %esi
10b9b9: c9 leave
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
10b9ba: e9 4d 2e 00 00 jmp 10e80c <_Thread_Enable_dispatch>
10b9bf: 90 nop
}
10b9c0: 8d 65 f8 lea -0x8(%ebp),%esp
10b9c3: 5b pop %ebx
10b9c4: 5e pop %esi
10b9c5: c9 leave
10b9c6: c3 ret
0010c650 <pthread_cond_destroy>:
*/
int pthread_cond_destroy(
pthread_cond_t *cond
)
{
10c650: 55 push %ebp
10c651: 89 e5 mov %esp,%ebp
10c653: 53 push %ebx
10c654: 83 ec 1c sub $0x1c,%esp
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10c657: 8d 45 f4 lea -0xc(%ebp),%eax
10c65a: 50 push %eax
10c65b: ff 75 08 pushl 0x8(%ebp)
10c65e: e8 65 00 00 00 call 10c6c8 <_POSIX_Condition_variables_Get>
10c663: 89 c3 mov %eax,%ebx
switch ( location ) {
10c665: 83 c4 10 add $0x10,%esp
10c668: 8b 4d f4 mov -0xc(%ebp),%ecx
10c66b: 85 c9 test %ecx,%ecx
10c66d: 75 25 jne 10c694 <pthread_cond_destroy+0x44>
case OBJECTS_LOCAL:
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
10c66f: 83 ec 0c sub $0xc,%esp
10c672: 8d 40 18 lea 0x18(%eax),%eax
10c675: 50 push %eax
10c676: e8 e1 3b 00 00 call 11025c <_Thread_queue_First>
10c67b: 83 c4 10 add $0x10,%esp
10c67e: 85 c0 test %eax,%eax
10c680: 74 1e je 10c6a0 <pthread_cond_destroy+0x50>
_Thread_Enable_dispatch();
10c682: e8 69 34 00 00 call 10faf0 <_Thread_Enable_dispatch>
10c687: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c68c: 8b 5d fc mov -0x4(%ebp),%ebx
10c68f: c9 leave
10c690: c3 ret
10c691: 8d 76 00 lea 0x0(%esi),%esi
{
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
10c694: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c699: 8b 5d fc mov -0x4(%ebp),%ebx
10c69c: c9 leave
10c69d: c3 ret
10c69e: 66 90 xchg %ax,%ax
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close(
10c6a0: 83 ec 08 sub $0x8,%esp
10c6a3: 53 push %ebx
10c6a4: 68 00 c4 12 00 push $0x12c400
10c6a9: e8 9a 27 00 00 call 10ee48 <_Objects_Close>
RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
POSIX_Condition_variables_Control *the_condition_variable
)
{
_Objects_Free(
10c6ae: 58 pop %eax
10c6af: 5a pop %edx
10c6b0: 53 push %ebx
10c6b1: 68 00 c4 12 00 push $0x12c400
10c6b6: e8 91 2a 00 00 call 10f14c <_Objects_Free>
&_POSIX_Condition_variables_Information,
&the_cond->Object
);
_POSIX_Condition_variables_Free( the_cond );
_Thread_Enable_dispatch();
10c6bb: e8 30 34 00 00 call 10faf0 <_Thread_Enable_dispatch>
10c6c0: 31 c0 xor %eax,%eax
return 0;
10c6c2: 83 c4 10 add $0x10,%esp
10c6c5: eb d2 jmp 10c699 <pthread_cond_destroy+0x49>
0010c71c <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
10c71c: 55 push %ebp
10c71d: 89 e5 mov %esp,%ebp
10c71f: 53 push %ebx
10c720: 83 ec 14 sub $0x14,%esp
10c723: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10c726: 85 db test %ebx,%ebx
10c728: 0f 84 86 00 00 00 je 10c7b4 <pthread_cond_init+0x98>
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10c72e: 83 7b 04 01 cmpl $0x1,0x4(%ebx)
10c732: 74 06 je 10c73a <pthread_cond_init+0x1e><== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
10c734: 8b 03 mov (%ebx),%eax
10c736: 85 c0 test %eax,%eax
10c738: 75 0a jne 10c744 <pthread_cond_init+0x28>
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
10c73a: b8 16 00 00 00 mov $0x16,%eax
}
10c73f: 8b 5d fc mov -0x4(%ebp),%ebx
10c742: c9 leave
10c743: c3 ret
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c744: a1 18 bf 12 00 mov 0x12bf18,%eax
10c749: 40 inc %eax
10c74a: a3 18 bf 12 00 mov %eax,0x12bf18
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
10c74f: 83 ec 0c sub $0xc,%esp
10c752: 68 00 c4 12 00 push $0x12c400
10c757: e8 70 26 00 00 call 10edcc <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
10c75c: 83 c4 10 add $0x10,%esp
10c75f: 85 c0 test %eax,%eax
10c761: 74 5d je 10c7c0 <pthread_cond_init+0xa4>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
10c763: 8b 53 04 mov 0x4(%ebx),%edx
10c766: 89 50 10 mov %edx,0x10(%eax)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10c769: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
10c770: 6a 74 push $0x74
10c772: 68 00 08 00 00 push $0x800
10c777: 6a 00 push $0x0
10c779: 8d 50 18 lea 0x18(%eax),%edx
10c77c: 52 push %edx
10c77d: 89 45 f4 mov %eax,-0xc(%ebp)
10c780: e8 57 3b 00 00 call 1102dc <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c785: 8b 45 f4 mov -0xc(%ebp),%eax
10c788: 8b 50 08 mov 0x8(%eax),%edx
10c78b: 0f b7 da movzwl %dx,%ebx
10c78e: 8b 0d 1c c4 12 00 mov 0x12c41c,%ecx
10c794: 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;
10c797: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
10c79e: 8b 45 08 mov 0x8(%ebp),%eax
10c7a1: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10c7a3: e8 48 33 00 00 call 10faf0 <_Thread_Enable_dispatch>
10c7a8: 31 c0 xor %eax,%eax
return 0;
10c7aa: 83 c4 10 add $0x10,%esp
}
10c7ad: 8b 5d fc mov -0x4(%ebp),%ebx
10c7b0: c9 leave
10c7b1: c3 ret
10c7b2: 66 90 xchg %ax,%ax
)
{
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10c7b4: bb 88 53 12 00 mov $0x125388,%ebx
10c7b9: e9 70 ff ff ff jmp 10c72e <pthread_cond_init+0x12>
10c7be: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
10c7c0: e8 2b 33 00 00 call 10faf0 <_Thread_Enable_dispatch>
10c7c5: b8 0c 00 00 00 mov $0xc,%eax
return ENOMEM;
10c7ca: e9 70 ff ff ff jmp 10c73f <pthread_cond_init+0x23>
0010c5b4 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
10c5b4: 55 push %ebp
10c5b5: 89 e5 mov %esp,%ebp
10c5b7: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10c5ba: 85 c0 test %eax,%eax
10c5bc: 74 12 je 10c5d0 <pthread_condattr_destroy+0x1c>
10c5be: 8b 10 mov (%eax),%edx
10c5c0: 85 d2 test %edx,%edx
10c5c2: 74 0c je 10c5d0 <pthread_condattr_destroy+0x1c><== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
10c5c4: c7 00 00 00 00 00 movl $0x0,(%eax)
10c5ca: 31 c0 xor %eax,%eax
return 0;
}
10c5cc: c9 leave
10c5cd: c3 ret
10c5ce: 66 90 xchg %ax,%ax
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
return 0;
10c5d0: b8 16 00 00 00 mov $0x16,%eax
}
10c5d5: c9 leave
10c5d6: c3 ret
0010c5d8 <pthread_condattr_getpshared>:
int pthread_condattr_getpshared(
const pthread_condattr_t *attr,
int *pshared
)
{
10c5d8: 55 push %ebp
10c5d9: 89 e5 mov %esp,%ebp
10c5db: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr )
10c5de: 85 c0 test %eax,%eax
10c5e0: 74 0e je 10c5f0 <pthread_condattr_getpshared+0x18>
return EINVAL;
*pshared = attr->process_shared;
10c5e2: 8b 50 04 mov 0x4(%eax),%edx
10c5e5: 8b 45 0c mov 0xc(%ebp),%eax
10c5e8: 89 10 mov %edx,(%eax)
10c5ea: 31 c0 xor %eax,%eax
return 0;
}
10c5ec: c9 leave
10c5ed: c3 ret
10c5ee: 66 90 xchg %ax,%ax
int pthread_condattr_getpshared(
const pthread_condattr_t *attr,
int *pshared
)
{
if ( !attr )
10c5f0: b0 16 mov $0x16,%al
return EINVAL;
*pshared = attr->process_shared;
return 0;
}
10c5f2: c9 leave
10c5f3: c3 ret
0010c618 <pthread_condattr_setpshared>:
int pthread_condattr_setpshared(
pthread_condattr_t *attr,
int pshared
)
{
10c618: 55 push %ebp
10c619: 89 e5 mov %esp,%ebp
10c61b: 8b 45 08 mov 0x8(%ebp),%eax
10c61e: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
10c621: 85 c0 test %eax,%eax
10c623: 74 05 je 10c62a <pthread_condattr_setpshared+0x12>
return EINVAL;
switch ( pshared ) {
10c625: 83 fa 01 cmp $0x1,%edx
10c628: 76 0a jbe 10c634 <pthread_condattr_setpshared+0x1c>
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
10c62a: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10c62f: c9 leave
10c630: c3 ret
10c631: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10c634: 89 50 04 mov %edx,0x4(%eax)
10c637: 31 c0 xor %eax,%eax
return 0;
default:
return EINVAL;
}
}
10c639: c9 leave
10c63a: c3 ret
0010bccc <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
10bccc: 55 push %ebp
10bccd: 89 e5 mov %esp,%ebp
10bccf: 57 push %edi
10bcd0: 56 push %esi
10bcd1: 53 push %ebx
10bcd2: 83 ec 5c sub $0x5c,%esp
10bcd5: 8b 5d 0c mov 0xc(%ebp),%ebx
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
10bcd8: 8b 7d 10 mov 0x10(%ebp),%edi
10bcdb: 85 ff test %edi,%edi
10bcdd: 0f 84 81 01 00 00 je 10be64 <pthread_create+0x198>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10bce3: 85 db test %ebx,%ebx
10bce5: 74 65 je 10bd4c <pthread_create+0x80>
if ( !the_attr->is_initialized )
10bce7: 8b 33 mov (%ebx),%esi
10bce9: 85 f6 test %esi,%esi
10bceb: 74 1f je 10bd0c <pthread_create+0x40>
* 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) )
10bced: 8b 4b 04 mov 0x4(%ebx),%ecx
10bcf0: 85 c9 test %ecx,%ecx
10bcf2: 74 0b je 10bcff <pthread_create+0x33>
10bcf4: 8b 43 08 mov 0x8(%ebx),%eax
10bcf7: 3b 05 78 67 12 00 cmp 0x126778,%eax
10bcfd: 72 0d jb 10bd0c <pthread_create+0x40>
* 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 ) {
10bcff: 8b 43 10 mov 0x10(%ebx),%eax
10bd02: 83 f8 01 cmp $0x1,%eax
10bd05: 74 4d je 10bd54 <pthread_create+0x88>
10bd07: 83 f8 02 cmp $0x2,%eax
10bd0a: 74 10 je 10bd1c <pthread_create+0x50>
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
10bd0c: ba 16 00 00 00 mov $0x16,%edx
}
10bd11: 89 d0 mov %edx,%eax
10bd13: 8d 65 f4 lea -0xc(%ebp),%esp
10bd16: 5b pop %ebx
10bd17: 5e pop %esi
10bd18: 5f pop %edi
10bd19: c9 leave
10bd1a: c3 ret
10bd1b: 90 nop
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
10bd1c: 8b 43 14 mov 0x14(%ebx),%eax
10bd1f: 89 45 b0 mov %eax,-0x50(%ebp)
schedparam = the_attr->schedparam;
10bd22: 8d 4d c4 lea -0x3c(%ebp),%ecx
10bd25: 89 4d b4 mov %ecx,-0x4c(%ebp)
10bd28: 8d 73 18 lea 0x18(%ebx),%esi
10bd2b: b9 07 00 00 00 mov $0x7,%ecx
10bd30: 8b 7d b4 mov -0x4c(%ebp),%edi
10bd33: 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 )
10bd35: 8b 53 0c mov 0xc(%ebx),%edx
10bd38: 85 d2 test %edx,%edx
10bd3a: 74 49 je 10bd85 <pthread_create+0xb9> <== ALWAYS TAKEN
10bd3c: ba 86 00 00 00 mov $0x86,%edx
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
10bd41: 89 d0 mov %edx,%eax
10bd43: 8d 65 f4 lea -0xc(%ebp),%esp
10bd46: 5b pop %ebx
10bd47: 5e pop %esi
10bd48: 5f pop %edi
10bd49: c9 leave
10bd4a: c3 ret
10bd4b: 90 nop
int rc;
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10bd4c: bb 00 3e 12 00 mov $0x123e00,%ebx
10bd51: eb 94 jmp 10bce7 <pthread_create+0x1b>
10bd53: 90 nop
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10bd54: a1 18 aa 12 00 mov 0x12aa18,%eax
10bd59: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi
schedpolicy = api->schedpolicy;
10bd5f: 8b 86 80 00 00 00 mov 0x80(%esi),%eax
10bd65: 89 45 b0 mov %eax,-0x50(%ebp)
schedparam = api->schedparam;
10bd68: 8d 4d c4 lea -0x3c(%ebp),%ecx
10bd6b: 89 4d b4 mov %ecx,-0x4c(%ebp)
10bd6e: 81 c6 84 00 00 00 add $0x84,%esi
10bd74: b9 07 00 00 00 mov $0x7,%ecx
10bd79: 8b 7d b4 mov -0x4c(%ebp),%edi
10bd7c: 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 )
10bd7e: 8b 53 0c mov 0xc(%ebx),%edx
10bd81: 85 d2 test %edx,%edx
10bd83: 75 b7 jne 10bd3c <pthread_create+0x70>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
10bd85: 83 ec 0c sub $0xc,%esp
10bd88: ff 75 c4 pushl -0x3c(%ebp)
10bd8b: e8 3c 6b 00 00 call 1128cc <_POSIX_Priority_Is_valid>
10bd90: 83 c4 10 add $0x10,%esp
10bd93: 84 c0 test %al,%al
10bd95: 0f 84 71 ff ff ff je 10bd0c <pthread_create+0x40> <== NEVER TAKEN
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
10bd9b: 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);
10bd9e: 0f b6 35 7c 67 12 00 movzbl 0x12677c,%esi
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
10bda5: 8d 45 e0 lea -0x20(%ebp),%eax
10bda8: 50 push %eax
10bda9: 8d 45 e4 lea -0x1c(%ebp),%eax
10bdac: 50 push %eax
10bdad: ff 75 b4 pushl -0x4c(%ebp)
10bdb0: ff 75 b0 pushl -0x50(%ebp)
10bdb3: e8 30 6b 00 00 call 1128e8 <_POSIX_Thread_Translate_sched_param>
10bdb8: 89 c2 mov %eax,%edx
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
10bdba: 83 c4 10 add $0x10,%esp
10bdbd: 85 c0 test %eax,%eax
10bdbf: 0f 85 4c ff ff ff jne 10bd11 <pthread_create+0x45>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10bdc5: 83 ec 0c sub $0xc,%esp
10bdc8: ff 35 10 aa 12 00 pushl 0x12aa10
10bdce: 89 45 a4 mov %eax,-0x5c(%ebp)
10bdd1: e8 e6 17 00 00 call 10d5bc <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
10bdd6: c7 04 24 20 ac 12 00 movl $0x12ac20,(%esp)
10bddd: e8 c6 21 00 00 call 10dfa8 <_Objects_Allocate>
10bde2: 89 45 ac mov %eax,-0x54(%ebp)
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
10bde5: 83 c4 10 add $0x10,%esp
10bde8: 85 c0 test %eax,%eax
10bdea: 8b 55 a4 mov -0x5c(%ebp),%edx
10bded: 0f 84 06 01 00 00 je 10bef9 <pthread_create+0x22d>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
10bdf3: 8b 4b 08 mov 0x8(%ebx),%ecx
10bdf6: 50 push %eax
10bdf7: 6a 00 push $0x0
10bdf9: 6a 00 push $0x0
10bdfb: ff 75 e0 pushl -0x20(%ebp)
10bdfe: ff 75 e4 pushl -0x1c(%ebp)
10be01: 6a 01 push $0x1
10be03: 81 e6 ff 00 00 00 and $0xff,%esi
10be09: 29 fe sub %edi,%esi
10be0b: 56 push %esi
10be0c: 6a 01 push $0x1
10be0e: a1 78 67 12 00 mov 0x126778,%eax
10be13: d1 e0 shl %eax
10be15: 39 c8 cmp %ecx,%eax
10be17: 73 02 jae 10be1b <pthread_create+0x14f>
10be19: 89 c8 mov %ecx,%eax
10be1b: 50 push %eax
10be1c: ff 73 04 pushl 0x4(%ebx)
10be1f: ff 75 ac pushl -0x54(%ebp)
10be22: 68 20 ac 12 00 push $0x12ac20
10be27: 89 55 a4 mov %edx,-0x5c(%ebp)
10be2a: e8 65 2f 00 00 call 10ed94 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
10be2f: 83 c4 30 add $0x30,%esp
10be32: 84 c0 test %al,%al
10be34: 8b 55 a4 mov -0x5c(%ebp),%edx
10be37: 75 35 jne 10be6e <pthread_create+0x1a2>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
10be39: 83 ec 08 sub $0x8,%esp
10be3c: ff 75 ac pushl -0x54(%ebp)
10be3f: 68 20 ac 12 00 push $0x12ac20
10be44: e8 df 24 00 00 call 10e328 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
10be49: 59 pop %ecx
10be4a: ff 35 10 aa 12 00 pushl 0x12aa10
10be50: e8 af 17 00 00 call 10d604 <_API_Mutex_Unlock>
10be55: ba 0b 00 00 00 mov $0xb,%edx
return EAGAIN;
10be5a: 83 c4 10 add $0x10,%esp
10be5d: e9 af fe ff ff jmp 10bd11 <pthread_create+0x45>
10be62: 66 90 xchg %ax,%ax
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
10be64: ba 0e 00 00 00 mov $0xe,%edx
10be69: e9 a3 fe ff ff jmp 10bd11 <pthread_create+0x45>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10be6e: 8b 45 ac mov -0x54(%ebp),%eax
10be71: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10be77: 89 45 a8 mov %eax,-0x58(%ebp)
api->Attributes = *the_attr;
10be7a: b9 0f 00 00 00 mov $0xf,%ecx
10be7f: 89 c7 mov %eax,%edi
10be81: 89 de mov %ebx,%esi
10be83: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->detachstate = the_attr->detachstate;
10be85: 8b 43 38 mov 0x38(%ebx),%eax
10be88: 8b 4d a8 mov -0x58(%ebp),%ecx
10be8b: 89 41 3c mov %eax,0x3c(%ecx)
api->schedpolicy = schedpolicy;
10be8e: 8b 45 b0 mov -0x50(%ebp),%eax
10be91: 89 81 80 00 00 00 mov %eax,0x80(%ecx)
api->schedparam = schedparam;
10be97: 89 cf mov %ecx,%edi
10be99: 81 c7 84 00 00 00 add $0x84,%edi
10be9f: b9 07 00 00 00 mov $0x7,%ecx
10bea4: 8b 75 b4 mov -0x4c(%ebp),%esi
10bea7: 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;
10bea9: 8b 4d ac mov -0x54(%ebp),%ecx
10beac: c6 41 74 01 movb $0x1,0x74(%ecx)
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
10beb0: 83 ec 0c sub $0xc,%esp
10beb3: 6a 00 push $0x0
10beb5: ff 75 14 pushl 0x14(%ebp)
10beb8: ff 75 10 pushl 0x10(%ebp)
10bebb: 6a 01 push $0x1
10bebd: 51 push %ecx
10bebe: 89 55 a4 mov %edx,-0x5c(%ebp)
10bec1: e8 6a 39 00 00 call 10f830 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
10bec6: 83 c4 20 add $0x20,%esp
10bec9: 83 7d b0 04 cmpl $0x4,-0x50(%ebp)
10becd: 8b 55 a4 mov -0x5c(%ebp),%edx
10bed0: 74 42 je 10bf14 <pthread_create+0x248>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
10bed2: 8b 45 ac mov -0x54(%ebp),%eax
10bed5: 8b 48 08 mov 0x8(%eax),%ecx
10bed8: 8b 45 08 mov 0x8(%ebp),%eax
10bedb: 89 08 mov %ecx,(%eax)
_RTEMS_Unlock_allocator();
10bedd: 83 ec 0c sub $0xc,%esp
10bee0: ff 35 10 aa 12 00 pushl 0x12aa10
10bee6: 89 55 a4 mov %edx,-0x5c(%ebp)
10bee9: e8 16 17 00 00 call 10d604 <_API_Mutex_Unlock>
return 0;
10beee: 83 c4 10 add $0x10,%esp
10bef1: 8b 55 a4 mov -0x5c(%ebp),%edx
10bef4: e9 18 fe ff ff jmp 10bd11 <pthread_create+0x45>
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10bef9: 83 ec 0c sub $0xc,%esp
10befc: ff 35 10 aa 12 00 pushl 0x12aa10
10bf02: e8 fd 16 00 00 call 10d604 <_API_Mutex_Unlock>
10bf07: ba 0b 00 00 00 mov $0xb,%edx
return EAGAIN;
10bf0c: 83 c4 10 add $0x10,%esp
10bf0f: e9 fd fd ff ff jmp 10bd11 <pthread_create+0x45>
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
10bf14: 83 ec 0c sub $0xc,%esp
10bf17: 8b 45 a8 mov -0x58(%ebp),%eax
10bf1a: 05 8c 00 00 00 add $0x8c,%eax
10bf1f: 50 push %eax
10bf20: e8 fb 3a 00 00 call 10fa20 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10bf25: 8b 4d a8 mov -0x58(%ebp),%ecx
10bf28: 89 81 b0 00 00 00 mov %eax,0xb0(%ecx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10bf2e: 58 pop %eax
10bf2f: 5a pop %edx
10bf30: 89 c8 mov %ecx,%eax
10bf32: 05 a4 00 00 00 add $0xa4,%eax
10bf37: 50 push %eax
10bf38: 68 38 aa 12 00 push $0x12aa38
10bf3d: e8 fa 3d 00 00 call 10fd3c <_Watchdog_Insert>
10bf42: 83 c4 10 add $0x10,%esp
10bf45: 8b 55 a4 mov -0x5c(%ebp),%edx
10bf48: eb 88 jmp 10bed2 <pthread_create+0x206>
0010bde8 <pthread_detach>:
#include <rtems/posix/pthread.h>
int pthread_detach(
pthread_t thread
)
{
10bde8: 55 push %ebp
10bde9: 89 e5 mov %esp,%ebp
10bdeb: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
POSIX_API_Control *api;
Objects_Locations location;
the_thread = _Thread_Get( thread, &location );
10bdee: 8d 45 f4 lea -0xc(%ebp),%eax
10bdf1: 50 push %eax
10bdf2: ff 75 08 pushl 0x8(%ebp)
10bdf5: e8 4a 2c 00 00 call 10ea44 <_Thread_Get>
switch ( location ) {
10bdfa: 83 c4 10 add $0x10,%esp
10bdfd: 8b 55 f4 mov -0xc(%ebp),%edx
10be00: 85 d2 test %edx,%edx
10be02: 75 18 jne 10be1c <pthread_detach+0x34>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->detachstate = PTHREAD_CREATE_DETACHED;
10be04: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10be0a: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax)
_Thread_Enable_dispatch();
10be11: e8 0a 2c 00 00 call 10ea20 <_Thread_Enable_dispatch>
10be16: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10be18: c9 leave
10be19: c3 ret
10be1a: 66 90 xchg %ax,%ax
register Thread_Control *the_thread;
POSIX_API_Control *api;
Objects_Locations location;
the_thread = _Thread_Get( thread, &location );
switch ( location ) {
10be1c: b8 03 00 00 00 mov $0x3,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10be21: c9 leave
10be22: c3 ret
00114ac4 <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
114ac4: 55 push %ebp
114ac5: 89 e5 mov %esp,%ebp
114ac7: 83 ec 10 sub $0x10,%esp
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
114aca: ff 75 08 pushl 0x8(%ebp)
114acd: ff 35 b8 94 12 00 pushl 0x1294b8
114ad3: e8 fc fe ff ff call 1149d4 <_POSIX_Thread_Exit>
114ad8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
114adb: c9 leave <== NOT EXECUTED
114adc: c3 ret <== NOT EXECUTED
0010df18 <pthread_getschedparam>:
int pthread_getschedparam(
pthread_t thread,
int *policy,
struct sched_param *param
)
{
10df18: 55 push %ebp
10df19: 89 e5 mov %esp,%ebp
10df1b: 57 push %edi
10df1c: 56 push %esi
10df1d: 53 push %ebx
10df1e: 83 ec 1c sub $0x1c,%esp
10df21: 8b 7d 0c mov 0xc(%ebp),%edi
10df24: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Locations location;
POSIX_API_Control *api;
register Thread_Control *the_thread;
if ( !policy || !param )
10df27: 85 ff test %edi,%edi
10df29: 74 65 je 10df90 <pthread_getschedparam+0x78>
10df2b: 85 db test %ebx,%ebx
10df2d: 74 61 je 10df90 <pthread_getschedparam+0x78>
return EINVAL;
the_thread = _Thread_Get( thread, &location );
10df2f: 83 ec 08 sub $0x8,%esp
10df32: 8d 45 e4 lea -0x1c(%ebp),%eax
10df35: 50 push %eax
10df36: ff 75 08 pushl 0x8(%ebp)
10df39: e8 26 2c 00 00 call 110b64 <_Thread_Get>
switch ( location ) {
10df3e: 83 c4 10 add $0x10,%esp
10df41: 8b 55 e4 mov -0x1c(%ebp),%edx
10df44: 85 d2 test %edx,%edx
10df46: 75 38 jne 10df80 <pthread_getschedparam+0x68>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10df48: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi
if ( policy )
*policy = api->schedpolicy;
10df4e: 8b 96 80 00 00 00 mov 0x80(%esi),%edx
10df54: 89 17 mov %edx,(%edi)
if ( param ) {
*param = api->schedparam;
10df56: 81 c6 84 00 00 00 add $0x84,%esi
10df5c: b9 07 00 00 00 mov $0x7,%ecx
10df61: 89 df mov %ebx,%edi
10df63: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
param->sched_priority =
10df65: 0f b6 15 7c a4 12 00 movzbl 0x12a47c,%edx
10df6c: 2b 50 14 sub 0x14(%eax),%edx
10df6f: 89 13 mov %edx,(%ebx)
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
10df71: e8 ca 2b 00 00 call 110b40 <_Thread_Enable_dispatch>
10df76: 31 c0 xor %eax,%eax
break;
}
return ESRCH;
}
10df78: 8d 65 f4 lea -0xc(%ebp),%esp
10df7b: 5b pop %ebx
10df7c: 5e pop %esi
10df7d: 5f pop %edi
10df7e: c9 leave
10df7f: c3 ret
if ( !policy || !param )
return EINVAL;
the_thread = _Thread_Get( thread, &location );
switch ( location ) {
10df80: b8 03 00 00 00 mov $0x3,%eax
break;
}
return ESRCH;
}
10df85: 8d 65 f4 lea -0xc(%ebp),%esp
10df88: 5b pop %ebx
10df89: 5e pop %esi
10df8a: 5f pop %edi
10df8b: c9 leave
10df8c: c3 ret
10df8d: 8d 76 00 lea 0x0(%esi),%esi
*param = api->schedparam;
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
return 0;
10df90: b8 16 00 00 00 mov $0x16,%eax
break;
}
return ESRCH;
}
10df95: 8d 65 f4 lea -0xc(%ebp),%esp
10df98: 5b pop %ebx
10df99: 5e pop %esi
10df9a: 5f pop %edi
10df9b: c9 leave
10df9c: c3 ret
0010bcc4 <pthread_getspecific>:
*/
void *pthread_getspecific(
pthread_key_t key
)
{
10bcc4: 55 push %ebp
10bcc5: 89 e5 mov %esp,%ebp
10bcc7: 83 ec 2c sub $0x2c,%esp
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get (
pthread_key_t id,
Objects_Locations *location
)
{
return (POSIX_Keys_Control *)
10bcca: 8d 45 f4 lea -0xc(%ebp),%eax
10bccd: 50 push %eax
10bcce: ff 75 08 pushl 0x8(%ebp)
10bcd1: 68 40 bb 12 00 push $0x12bb40
10bcd6: e8 b9 25 00 00 call 10e294 <_Objects_Get>
uint32_t index;
Objects_Locations location;
void *key_data;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
10bcdb: 83 c4 10 add $0x10,%esp
10bcde: 8b 55 f4 mov -0xc(%ebp),%edx
10bce1: 85 d2 test %edx,%edx
10bce3: 75 2b jne 10bd10 <pthread_getspecific+0x4c>
case OBJECTS_LOCAL:
api = _Objects_Get_API( _Thread_Executing->Object.id );
10bce5: 8b 15 58 b7 12 00 mov 0x12b758,%edx
10bceb: 8b 4a 08 mov 0x8(%edx),%ecx
index = _Objects_Get_index( _Thread_Executing->Object.id );
key_data = (void *) the_key->Values[ api ][ index ];
10bcee: 89 ca mov %ecx,%edx
10bcf0: c1 ea 18 shr $0x18,%edx
10bcf3: 83 e2 07 and $0x7,%edx
10bcf6: 0f b7 c9 movzwl %cx,%ecx
10bcf9: 8b 44 90 14 mov 0x14(%eax,%edx,4),%eax
10bcfd: 8b 04 88 mov (%eax,%ecx,4),%eax
_Thread_Enable_dispatch();
10bd00: 89 45 e4 mov %eax,-0x1c(%ebp)
10bd03: e8 00 2e 00 00 call 10eb08 <_Thread_Enable_dispatch>
10bd08: 8b 45 e4 mov -0x1c(%ebp),%eax
case OBJECTS_ERROR:
break;
}
return NULL;
}
10bd0b: c9 leave
10bd0c: c3 ret
10bd0d: 8d 76 00 lea 0x0(%esi),%esi
uint32_t index;
Objects_Locations location;
void *key_data;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
10bd10: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return NULL;
}
10bd12: c9 leave
10bd13: c3 ret
00110b1c <pthread_join>:
int pthread_join(
pthread_t thread,
void **value_ptr
)
{
110b1c: 55 push %ebp
110b1d: 89 e5 mov %esp,%ebp
110b1f: 57 push %edi
110b20: 56 push %esi
110b21: 53 push %ebx
110b22: 83 ec 1c sub $0x1c,%esp
110b25: 8b 75 08 mov 0x8(%ebp),%esi
110b28: 8d 5d e4 lea -0x1c(%ebp),%ebx
the_thread,
(STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT)
);
_Thread_Enable_dispatch();
} else {
_Thread_Executing->Wait.return_argument = &return_pointer;
110b2b: 8d 7d e0 lea -0x20(%ebp),%edi
POSIX_API_Control *api;
Objects_Locations location;
void *return_pointer;
on_EINTR:
the_thread = _Thread_Get( thread, &location );
110b2e: 83 ec 08 sub $0x8,%esp
110b31: 53 push %ebx
110b32: 56 push %esi
110b33: e8 5c 2c 00 00 call 113794 <_Thread_Get>
switch ( location ) {
110b38: 83 c4 10 add $0x10,%esp
110b3b: 8b 55 e4 mov -0x1c(%ebp),%edx
110b3e: 85 d2 test %edx,%edx
110b40: 74 0e je 110b50 <pthread_join+0x34>
110b42: b8 03 00 00 00 mov $0x3,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
110b47: 8d 65 f4 lea -0xc(%ebp),%esp
110b4a: 5b pop %ebx
110b4b: 5e pop %esi
110b4c: 5f pop %edi
110b4d: c9 leave
110b4e: c3 ret
110b4f: 90 nop
on_EINTR:
the_thread = _Thread_Get( thread, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
110b50: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
110b56: 8b 4a 3c mov 0x3c(%edx),%ecx
110b59: 85 c9 test %ecx,%ecx
110b5b: 74 5b je 110bb8 <pthread_join+0x9c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
110b5d: 8b 0d 58 2d 13 00 mov 0x132d58,%ecx
_Thread_Enable_dispatch();
return EINVAL;
}
if ( _Thread_Is_executing( the_thread ) ) {
110b63: 39 c8 cmp %ecx,%eax
110b65: 74 5d je 110bc4 <pthread_join+0xa8> <== NEVER TAKEN
/*
* Put ourself on the threads join list
*/
if ( the_thread->current_state ==
110b67: 81 78 10 04 10 00 00 cmpl $0x1004,0x10(%eax)
110b6e: 74 64 je 110bd4 <pthread_join+0xb8>
the_thread,
(STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT)
);
_Thread_Enable_dispatch();
} else {
_Thread_Executing->Wait.return_argument = &return_pointer;
110b70: 89 79 28 mov %edi,0x28(%ecx)
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;
110b73: c7 42 70 01 00 00 00 movl $0x1,0x70(%edx)
_Thread_queue_Enter_critical_section( &api->Join_List );
_Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT );
110b7a: 51 push %ecx
110b7b: 68 b8 3f 11 00 push $0x113fb8
110b80: 6a 00 push $0x0
110b82: 83 c2 40 add $0x40,%edx
110b85: 52 push %edx
110b86: e8 1d 31 00 00 call 113ca8 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
110b8b: e8 e0 2b 00 00 call 113770 <_Thread_Enable_dispatch>
if ( _Thread_Executing->Wait.return_code == EINTR )
110b90: 83 c4 10 add $0x10,%esp
110b93: a1 58 2d 13 00 mov 0x132d58,%eax
110b98: 83 78 34 04 cmpl $0x4,0x34(%eax)
110b9c: 74 90 je 110b2e <pthread_join+0x12>
goto on_EINTR;
}
if ( value_ptr )
110b9e: 8b 45 0c mov 0xc(%ebp),%eax
110ba1: 85 c0 test %eax,%eax
110ba3: 74 08 je 110bad <pthread_join+0x91>
*value_ptr = return_pointer;
110ba5: 8b 45 e0 mov -0x20(%ebp),%eax
110ba8: 8b 55 0c mov 0xc(%ebp),%edx
110bab: 89 02 mov %eax,(%edx)
110bad: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
110baf: 8d 65 f4 lea -0xc(%ebp),%esp
110bb2: 5b pop %ebx
110bb3: 5e pop %esi
110bb4: 5f pop %edi
110bb5: c9 leave
110bb6: c3 ret
110bb7: 90 nop
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
_Thread_Enable_dispatch();
110bb8: e8 b3 2b 00 00 call 113770 <_Thread_Enable_dispatch>
110bbd: b8 16 00 00 00 mov $0x16,%eax
return EINVAL;
110bc2: eb 83 jmp 110b47 <pthread_join+0x2b>
}
if ( _Thread_Is_executing( the_thread ) ) {
_Thread_Enable_dispatch();
110bc4: e8 a7 2b 00 00 call 113770 <_Thread_Enable_dispatch>
110bc9: b8 2d 00 00 00 mov $0x2d,%eax
return EDEADLK;
110bce: e9 74 ff ff ff jmp 110b47 <pthread_join+0x2b>
110bd3: 90 nop
* Put ourself on the threads join list
*/
if ( the_thread->current_state ==
(STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT) ) {
return_pointer = the_thread->Wait.return_argument;
110bd4: 8b 50 28 mov 0x28(%eax),%edx
110bd7: 89 55 e0 mov %edx,-0x20(%ebp)
_Thread_Clear_state(
110bda: 83 ec 08 sub $0x8,%esp
110bdd: 68 04 10 00 00 push $0x1004
110be2: 50 push %eax
110be3: e8 e0 27 00 00 call 1133c8 <_Thread_Clear_state>
the_thread,
(STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT)
);
_Thread_Enable_dispatch();
110be8: e8 83 2b 00 00 call 113770 <_Thread_Enable_dispatch>
110bed: 83 c4 10 add $0x10,%esp
110bf0: eb ac jmp 110b9e <pthread_join+0x82>
0010bb48 <pthread_key_create>:
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
10bb48: 55 push %ebp
10bb49: 89 e5 mov %esp,%ebp
10bb4b: 57 push %edi
10bb4c: 56 push %esi
10bb4d: 53 push %ebx
10bb4e: 83 ec 28 sub $0x28,%esp
10bb51: a1 98 b6 12 00 mov 0x12b698,%eax
10bb56: 40 inc %eax
10bb57: a3 98 b6 12 00 mov %eax,0x12b698
* the inactive chain of free keys control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
{
return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
10bb5c: 68 40 bb 12 00 push $0x12bb40
10bb61: e8 7e 22 00 00 call 10dde4 <_Objects_Allocate>
10bb66: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
10bb68: 83 c4 10 add $0x10,%esp
10bb6b: 85 c0 test %eax,%eax
10bb6d: 0f 84 81 00 00 00 je 10bbf4 <pthread_key_create+0xac>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
10bb73: 8b 45 0c mov 0xc(%ebp),%eax
10bb76: 89 46 10 mov %eax,0x10(%esi)
10bb79: bb 01 00 00 00 mov $0x1,%ebx
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
10bb7e: 8b 04 9d 6c b6 12 00 mov 0x12b66c(,%ebx,4),%eax
10bb85: 85 c0 test %eax,%eax
10bb87: 74 5f je 10bbe8 <pthread_key_create+0xa0>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
10bb89: 8b 40 04 mov 0x4(%eax),%eax
10bb8c: 0f b7 40 10 movzwl 0x10(%eax),%eax
10bb90: 8d 0c 85 04 00 00 00 lea 0x4(,%eax,4),%ecx
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
10bb97: 83 ec 0c sub $0xc,%esp
10bb9a: 51 push %ecx
10bb9b: 89 4d e4 mov %ecx,-0x1c(%ebp)
10bb9e: e8 05 42 00 00 call 10fda8 <_Workspace_Allocate>
if ( !table ) {
10bba3: 83 c4 10 add $0x10,%esp
10bba6: 85 c0 test %eax,%eax
10bba8: 8b 4d e4 mov -0x1c(%ebp),%ecx
10bbab: 74 5b je 10bc08 <pthread_key_create+0xc0>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
10bbad: 89 44 9e 14 mov %eax,0x14(%esi,%ebx,4)
memset( table, '\0', bytes_to_allocate );
10bbb1: 89 c7 mov %eax,%edi
10bbb3: 31 c0 xor %eax,%eax
10bbb5: f3 aa rep stos %al,%es:(%edi)
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
10bbb7: 43 inc %ebx
* This is a bit more complex than one might initially expect because
* APIs are optional. Thus there may be no ITRON tasks to have keys
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
10bbb8: 83 fb 05 cmp $0x5,%ebx
10bbbb: 75 c1 jne 10bb7e <pthread_key_create+0x36>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bbbd: 8b 46 08 mov 0x8(%esi),%eax
10bbc0: 0f b7 c8 movzwl %ax,%ecx
10bbc3: 8b 15 5c bb 12 00 mov 0x12bb5c,%edx
10bbc9: 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;
10bbcc: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
}
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
10bbd3: 8b 55 08 mov 0x8(%ebp),%edx
10bbd6: 89 02 mov %eax,(%edx)
_Thread_Enable_dispatch();
10bbd8: e8 2b 2f 00 00 call 10eb08 <_Thread_Enable_dispatch>
10bbdd: 31 c0 xor %eax,%eax
return 0;
}
10bbdf: 8d 65 f4 lea -0xc(%ebp),%esp
10bbe2: 5b pop %ebx
10bbe3: 5e pop %esi
10bbe4: 5f pop %edi
10bbe5: c9 leave
10bbe6: c3 ret
10bbe7: 90 nop
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
} else {
the_key->Values[ the_api ] = NULL;
10bbe8: c7 44 9e 14 00 00 00 movl $0x0,0x14(%esi,%ebx,4)
10bbef: 00
10bbf0: eb c5 jmp 10bbb7 <pthread_key_create+0x6f>
10bbf2: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
10bbf4: e8 0f 2f 00 00 call 10eb08 <_Thread_Enable_dispatch>
10bbf9: b8 0b 00 00 00 mov $0xb,%eax
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10bbfe: 8d 65 f4 lea -0xc(%ebp),%esp
10bc01: 5b pop %ebx
10bc02: 5e pop %esi
10bc03: 5f pop %edi
10bc04: c9 leave
10bc05: c3 ret
10bc06: 66 90 xchg %ax,%ax
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
10bc08: 89 df mov %ebx,%edi
10bc0a: 4f dec %edi
10bc0b: 74 1a je 10bc27 <pthread_key_create+0xdf>
10bc0d: 8d 5c 9e 10 lea 0x10(%esi,%ebx,4),%ebx
10bc11: 8d 76 00 lea 0x0(%esi),%esi
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
10bc14: 83 ec 0c sub $0xc,%esp
10bc17: ff 33 pushl (%ebx)
10bc19: e8 a6 41 00 00 call 10fdc4 <_Workspace_Free>
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
the_api >= 1;
the_api-- )
10bc1e: 83 eb 04 sub $0x4,%ebx
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
10bc21: 83 c4 10 add $0x10,%esp
10bc24: 4f dec %edi
10bc25: 75 ed jne 10bc14 <pthread_key_create+0xcc>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
10bc27: 83 ec 08 sub $0x8,%esp
10bc2a: 56 push %esi
10bc2b: 68 40 bb 12 00 push $0x12bb40
10bc30: e8 2f 25 00 00 call 10e164 <_Objects_Free>
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
10bc35: e8 ce 2e 00 00 call 10eb08 <_Thread_Enable_dispatch>
10bc3a: b8 0c 00 00 00 mov $0xc,%eax
return ENOMEM;
10bc3f: 83 c4 10 add $0x10,%esp
10bc42: eb 9b jmp 10bbdf <pthread_key_create+0x97>
00114ae0 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
114ae0: 55 push %ebp
114ae1: 89 e5 mov %esp,%ebp
114ae3: 57 push %edi
114ae4: 56 push %esi
114ae5: 53 push %ebx
114ae6: 83 ec 1c sub $0x1c,%esp
114ae9: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
114aec: 85 db test %ebx,%ebx
114aee: 0f 84 84 00 00 00 je 114b78 <pthread_kill+0x98> <== NEVER TAKEN
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
114af4: 8d 7b ff lea -0x1(%ebx),%edi
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
114af7: 83 ff 1f cmp $0x1f,%edi
114afa: 77 7c ja 114b78 <pthread_kill+0x98>
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
114afc: 83 ec 08 sub $0x8,%esp
114aff: 8d 45 e4 lea -0x1c(%ebp),%eax
114b02: 50 push %eax
114b03: ff 75 08 pushl 0x8(%ebp)
114b06: e8 85 91 ff ff call 10dc90 <_Thread_Get>
114b0b: 89 c6 mov %eax,%esi
switch ( location ) {
114b0d: 83 c4 10 add $0x10,%esp
114b10: 8b 55 e4 mov -0x1c(%ebp),%edx
114b13: 85 d2 test %edx,%edx
114b15: 75 75 jne 114b8c <pthread_kill+0xac> <== NEVER TAKEN
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
114b17: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
114b1d: 8d 04 5b lea (%ebx,%ebx,2),%eax
114b20: 83 3c 85 e8 99 12 00 cmpl $0x1,0x1299e8(,%eax,4)
114b27: 01
114b28: 74 31 je 114b5b <pthread_kill+0x7b> <== NEVER TAKEN
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
114b2a: b8 01 00 00 00 mov $0x1,%eax
114b2f: 89 f9 mov %edi,%ecx
114b31: d3 e0 shl %cl,%eax
114b33: 09 82 d0 00 00 00 or %eax,0xd0(%edx)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
114b39: 50 push %eax
114b3a: 6a 00 push $0x0
114b3c: 53 push %ebx
114b3d: 56 push %esi
114b3e: e8 6d fd ff ff call 1148b0 <_POSIX_signals_Unblock_thread>
the_thread->do_post_task_switch_extension = true;
114b43: c6 46 74 01 movb $0x1,0x74(%esi)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
114b47: a1 94 94 12 00 mov 0x129494,%eax
114b4c: 83 c4 10 add $0x10,%esp
114b4f: 85 c0 test %eax,%eax
114b51: 74 08 je 114b5b <pthread_kill+0x7b>
114b53: 3b 35 b8 94 12 00 cmp 0x1294b8,%esi
114b59: 74 11 je 114b6c <pthread_kill+0x8c>
_ISR_Signals_to_thread_executing = true;
}
_Thread_Enable_dispatch();
114b5b: e8 0c 91 ff ff call 10dc6c <_Thread_Enable_dispatch>
114b60: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
114b62: 8d 65 f4 lea -0xc(%ebp),%esp
114b65: 5b pop %ebx
114b66: 5e pop %esi
114b67: 5f pop %edi
114b68: c9 leave
114b69: c3 ret
114b6a: 66 90 xchg %ax,%ax
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
114b6c: c6 05 68 95 12 00 01 movb $0x1,0x129568
114b73: eb e6 jmp 114b5b <pthread_kill+0x7b>
114b75: 8d 76 00 lea 0x0(%esi),%esi
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
114b78: e8 87 05 00 00 call 115104 <__errno>
114b7d: c7 00 16 00 00 00 movl $0x16,(%eax)
114b83: b8 ff ff ff ff mov $0xffffffff,%eax
114b88: eb d8 jmp 114b62 <pthread_kill+0x82>
114b8a: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
114b8c: e8 73 05 00 00 call 115104 <__errno> <== NOT EXECUTED
114b91: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED
114b97: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
114b9c: eb c4 jmp 114b62 <pthread_kill+0x82> <== NOT EXECUTED
0010d78c <pthread_mutex_getprioceiling>:
int pthread_mutex_getprioceiling(
pthread_mutex_t *mutex,
int *prioceiling
)
{
10d78c: 55 push %ebp
10d78d: 89 e5 mov %esp,%ebp
10d78f: 53 push %ebx
10d790: 83 ec 14 sub $0x14,%esp
10d793: 8b 5d 0c mov 0xc(%ebp),%ebx
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
if ( !prioceiling )
10d796: 85 db test %ebx,%ebx
10d798: 74 19 je 10d7b3 <pthread_mutex_getprioceiling+0x27>
return EINVAL;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
10d79a: 83 ec 08 sub $0x8,%esp
10d79d: 8d 45 f4 lea -0xc(%ebp),%eax
10d7a0: 50 push %eax
10d7a1: ff 75 08 pushl 0x8(%ebp)
10d7a4: e8 8f ff ff ff call 10d738 <_POSIX_Mutex_Get>
switch ( location ) {
10d7a9: 83 c4 10 add $0x10,%esp
10d7ac: 8b 55 f4 mov -0xc(%ebp),%edx
10d7af: 85 d2 test %edx,%edx
10d7b1: 74 0d je 10d7c0 <pthread_mutex_getprioceiling+0x34>
case OBJECTS_LOCAL:
*prioceiling = _POSIX_Priority_From_core(
the_mutex->Mutex.Attributes.priority_ceiling
);
_Thread_Enable_dispatch();
return 0;
10d7b3: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d7b8: 8b 5d fc mov -0x4(%ebp),%ebx
10d7bb: c9 leave
10d7bc: c3 ret
10d7bd: 8d 76 00 lea 0x0(%esi),%esi
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*prioceiling = _POSIX_Priority_From_core(
10d7c0: 0f b6 15 7c a4 12 00 movzbl 0x12a47c,%edx
10d7c7: 2b 50 60 sub 0x60(%eax),%edx
10d7ca: 89 13 mov %edx,(%ebx)
the_mutex->Mutex.Attributes.priority_ceiling
);
_Thread_Enable_dispatch();
10d7cc: e8 6f 33 00 00 call 110b40 <_Thread_Enable_dispatch>
10d7d1: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d7d3: 8b 5d fc mov -0x4(%ebp),%ebx
10d7d6: c9 leave
10d7d7: c3 ret
0010d7d8 <pthread_mutex_init>:
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
10d7d8: 55 push %ebp
10d7d9: 89 e5 mov %esp,%ebp
10d7db: 57 push %edi
10d7dc: 56 push %esi
10d7dd: 53 push %ebx
10d7de: 83 ec 1c sub $0x1c,%esp
10d7e1: 8b 75 08 mov 0x8(%ebp),%esi
10d7e4: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Mutex_Control *the_mutex;
CORE_mutex_Attributes *the_mutex_attr;
const pthread_mutexattr_t *the_attr;
CORE_mutex_Disciplines the_discipline;
if ( attr ) the_attr = attr;
10d7e7: 85 db test %ebx,%ebx
10d7e9: 0f 84 09 01 00 00 je 10d8f8 <pthread_mutex_init+0x120>
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
10d7ef: 85 f6 test %esi,%esi
10d7f1: 0f 84 e5 00 00 00 je 10d8dc <pthread_mutex_init+0x104>
}
}
}
#endif
if ( !the_attr->is_initialized )
10d7f7: 8b 13 mov (%ebx),%edx
10d7f9: 85 d2 test %edx,%edx
10d7fb: 0f 84 db 00 00 00 je 10d8dc <pthread_mutex_init+0x104>
return EINVAL;
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10d801: 8b 43 04 mov 0x4(%ebx),%eax
10d804: 83 f8 01 cmp $0x1,%eax
10d807: 0f 84 f7 00 00 00 je 10d904 <pthread_mutex_init+0x12c>
return ENOSYS;
if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE )
10d80d: 85 c0 test %eax,%eax
10d80f: 0f 85 c7 00 00 00 jne 10d8dc <pthread_mutex_init+0x104>
return EINVAL;
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
10d815: 8b 43 0c mov 0xc(%ebx),%eax
10d818: 83 f8 01 cmp $0x1,%eax
10d81b: 0f 84 e7 00 00 00 je 10d908 <pthread_mutex_init+0x130>
10d821: 83 f8 02 cmp $0x2,%eax
10d824: 0f 84 c2 00 00 00 je 10d8ec <pthread_mutex_init+0x114>
10d82a: 85 c0 test %eax,%eax
10d82c: 0f 85 aa 00 00 00 jne 10d8dc <pthread_mutex_init+0x104>
10d832: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
}
/*
* Validate the priority ceiling field -- should always be valid.
*/
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
10d839: 83 ec 0c sub $0xc,%esp
10d83c: ff 73 08 pushl 0x8(%ebx)
10d83f: e8 2c 03 00 00 call 10db70 <_POSIX_Priority_Is_valid>
10d844: 83 c4 10 add $0x10,%esp
10d847: 84 c0 test %al,%al
10d849: 0f 84 8d 00 00 00 je 10d8dc <pthread_mutex_init+0x104>
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
/*
* Validate the mutex type and set appropriate SuperCore mutex
* attributes.
*/
switch ( the_attr->type ) {
10d84f: 83 7b 10 03 cmpl $0x3,0x10(%ebx)
10d853: 0f 87 83 00 00 00 ja 10d8dc <pthread_mutex_init+0x104>
10d859: a1 98 e6 12 00 mov 0x12e698,%eax
10d85e: 40 inc %eax
10d85f: a3 98 e6 12 00 mov %eax,0x12e698
* _POSIX_Mutex_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
{
return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
10d864: 83 ec 0c sub $0xc,%esp
10d867: 68 a0 ea 12 00 push $0x12eaa0
10d86c: e8 ab 25 00 00 call 10fe1c <_Objects_Allocate>
10d871: 89 c7 mov %eax,%edi
*/
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
10d873: 83 c4 10 add $0x10,%esp
10d876: 85 c0 test %eax,%eax
10d878: 0f 84 96 00 00 00 je 10d914 <pthread_mutex_init+0x13c>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
10d87e: 8b 43 04 mov 0x4(%ebx),%eax
10d881: 89 47 10 mov %eax,0x10(%edi)
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10d884: 31 c0 xor %eax,%eax
10d886: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10d88a: 0f 94 c0 sete %al
10d88d: 89 47 54 mov %eax,0x54(%edi)
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = true;
10d890: c6 47 58 01 movb $0x1,0x58(%edi)
the_mutex_attr->priority_ceiling =
10d894: 0f b6 05 7c a4 12 00 movzbl 0x12a47c,%eax
10d89b: 2b 43 08 sub 0x8(%ebx),%eax
10d89e: 89 47 60 mov %eax,0x60(%edi)
_POSIX_Priority_To_core( the_attr->prio_ceiling );
the_mutex_attr->discipline = the_discipline;
10d8a1: 8b 45 e4 mov -0x1c(%ebp),%eax
10d8a4: 89 47 5c mov %eax,0x5c(%edi)
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
10d8a7: 50 push %eax
10d8a8: 6a 01 push $0x1
10d8aa: 8d 47 54 lea 0x54(%edi),%eax
10d8ad: 50 push %eax
10d8ae: 8d 47 14 lea 0x14(%edi),%eax
10d8b1: 50 push %eax
10d8b2: e8 09 1d 00 00 call 10f5c0 <_CORE_mutex_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10d8b7: 8b 47 08 mov 0x8(%edi),%eax
10d8ba: 0f b7 c8 movzwl %ax,%ecx
10d8bd: 8b 15 bc ea 12 00 mov 0x12eabc,%edx
10d8c3: 89 3c 8a mov %edi,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10d8c6: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
CORE_MUTEX_UNLOCKED
);
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
10d8cd: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10d8cf: e8 6c 32 00 00 call 110b40 <_Thread_Enable_dispatch>
10d8d4: 31 c0 xor %eax,%eax
return 0;
10d8d6: 83 c4 10 add $0x10,%esp
10d8d9: eb 06 jmp 10d8e1 <pthread_mutex_init+0x109>
10d8db: 90 nop
10d8dc: b8 16 00 00 00 mov $0x16,%eax
}
10d8e1: 8d 65 f4 lea -0xc(%ebp),%esp
10d8e4: 5b pop %ebx
10d8e5: 5e pop %esi
10d8e6: 5f pop %edi
10d8e7: c9 leave
10d8e8: c3 ret
10d8e9: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
10d8ec: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp)
case PTHREAD_PRIO_INHERIT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
break;
case PTHREAD_PRIO_PROTECT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
break;
10d8f3: e9 41 ff ff ff jmp 10d839 <pthread_mutex_init+0x61>
POSIX_Mutex_Control *the_mutex;
CORE_mutex_Attributes *the_mutex_attr;
const pthread_mutexattr_t *the_attr;
CORE_mutex_Disciplines the_discipline;
if ( attr ) the_attr = attr;
10d8f8: bb 20 eb 12 00 mov $0x12eb20,%ebx
10d8fd: e9 ed fe ff ff jmp 10d7ef <pthread_mutex_init+0x17>
10d902: 66 90 xchg %ax,%ax
return EINVAL;
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10d904: b0 58 mov $0x58,%al
10d906: eb d9 jmp 10d8e1 <pthread_mutex_init+0x109>
return EINVAL;
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
10d908: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp)
10d90f: e9 25 ff ff ff jmp 10d839 <pthread_mutex_init+0x61>
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
_Thread_Enable_dispatch();
10d914: e8 27 32 00 00 call 110b40 <_Thread_Enable_dispatch>
10d919: b8 0b 00 00 00 mov $0xb,%eax
return EAGAIN;
10d91e: eb c1 jmp 10d8e1 <pthread_mutex_init+0x109>
0010da2c <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
10da2c: 55 push %ebp
10da2d: 89 e5 mov %esp,%ebp
10da2f: 53 push %ebx
10da30: 83 ec 1c sub $0x1c,%esp
10da33: 8b 5d 08 mov 0x8(%ebp),%ebx
*
* 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 );
10da36: 8d 45 f4 lea -0xc(%ebp),%eax
10da39: 50 push %eax
10da3a: ff 75 0c pushl 0xc(%ebp)
10da3d: e8 a6 00 00 00 call 10dae8 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10da42: 83 c4 10 add $0x10,%esp
10da45: 83 f8 03 cmp $0x3,%eax
10da48: 74 16 je 10da60 <pthread_mutex_timedlock+0x34>
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
10da4a: 50 push %eax
10da4b: ff 75 f4 pushl -0xc(%ebp)
10da4e: 6a 00 push $0x0
10da50: 53 push %ebx
10da51: e8 de fe ff ff call 10d934 <_POSIX_Mutex_Lock_support>
10da56: 83 c4 10 add $0x10,%esp
break;
}
}
return lock_status;
}
10da59: 8b 5d fc mov -0x4(%ebp),%ebx
10da5c: c9 leave
10da5d: c3 ret
10da5e: 66 90 xchg %ax,%ax
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
10da60: 52 push %edx
10da61: ff 75 f4 pushl -0xc(%ebp)
10da64: 6a 01 push $0x1
10da66: 53 push %ebx
10da67: e8 c8 fe ff ff call 10d934 <_POSIX_Mutex_Lock_support>
10da6c: 83 c4 10 add $0x10,%esp
break;
}
}
return lock_status;
}
10da6f: 8b 5d fc mov -0x4(%ebp),%ebx
10da72: c9 leave
10da73: c3 ret
0010d518 <pthread_mutexattr_destroy>:
*/
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
10d518: 55 push %ebp
10d519: 89 e5 mov %esp,%ebp
10d51b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10d51e: 85 c0 test %eax,%eax
10d520: 74 12 je 10d534 <pthread_mutexattr_destroy+0x1c>
10d522: 8b 10 mov (%eax),%edx
10d524: 85 d2 test %edx,%edx
10d526: 74 0c je 10d534 <pthread_mutexattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10d528: c7 00 00 00 00 00 movl $0x0,(%eax)
10d52e: 31 c0 xor %eax,%eax
return 0;
}
10d530: c9 leave
10d531: c3 ret
10d532: 66 90 xchg %ax,%ax
{
if ( !attr || !attr->is_initialized )
return EINVAL;
attr->is_initialized = false;
return 0;
10d534: b8 16 00 00 00 mov $0x16,%eax
}
10d539: c9 leave
10d53a: c3 ret
0010b7e8 <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
10b7e8: 55 push %ebp
10b7e9: 89 e5 mov %esp,%ebp
10b7eb: 8b 45 08 mov 0x8(%ebp),%eax
10b7ee: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
10b7f1: 85 c0 test %eax,%eax
10b7f3: 74 13 je 10b808 <pthread_mutexattr_gettype+0x20>
return EINVAL;
if ( !attr->is_initialized )
10b7f5: 8b 08 mov (%eax),%ecx
10b7f7: 85 c9 test %ecx,%ecx
10b7f9: 74 0d je 10b808 <pthread_mutexattr_gettype+0x20>
return EINVAL;
if ( !type )
10b7fb: 85 d2 test %edx,%edx
10b7fd: 74 09 je 10b808 <pthread_mutexattr_gettype+0x20><== NEVER TAKEN
return EINVAL;
*type = attr->type;
10b7ff: 8b 40 10 mov 0x10(%eax),%eax
10b802: 89 02 mov %eax,(%edx)
10b804: 31 c0 xor %eax,%eax
return 0;
}
10b806: c9 leave
10b807: c3 ret
if ( !type )
return EINVAL;
*type = attr->type;
return 0;
10b808: b8 16 00 00 00 mov $0x16,%eax
}
10b80d: c9 leave
10b80e: c3 ret
0010d5dc <pthread_mutexattr_setprioceiling>:
int pthread_mutexattr_setprioceiling(
pthread_mutexattr_t *attr,
int prioceiling
)
{
10d5dc: 55 push %ebp
10d5dd: 89 e5 mov %esp,%ebp
10d5df: 56 push %esi
10d5e0: 53 push %ebx
10d5e1: 8b 5d 08 mov 0x8(%ebp),%ebx
10d5e4: 8b 75 0c mov 0xc(%ebp),%esi
if ( !attr || !attr->is_initialized )
10d5e7: 85 db test %ebx,%ebx
10d5e9: 74 06 je 10d5f1 <pthread_mutexattr_setprioceiling+0x15>
10d5eb: 8b 03 mov (%ebx),%eax
10d5ed: 85 c0 test %eax,%eax
10d5ef: 75 0f jne 10d600 <pthread_mutexattr_setprioceiling+0x24>
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
return EINVAL;
attr->prio_ceiling = prioceiling;
return 0;
10d5f1: b8 16 00 00 00 mov $0x16,%eax
}
10d5f6: 8d 65 f8 lea -0x8(%ebp),%esp
10d5f9: 5b pop %ebx
10d5fa: 5e pop %esi
10d5fb: c9 leave
10d5fc: c3 ret
10d5fd: 8d 76 00 lea 0x0(%esi),%esi
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
10d600: 83 ec 0c sub $0xc,%esp
10d603: 56 push %esi
10d604: e8 67 05 00 00 call 10db70 <_POSIX_Priority_Is_valid>
10d609: 83 c4 10 add $0x10,%esp
10d60c: 84 c0 test %al,%al
10d60e: 74 e1 je 10d5f1 <pthread_mutexattr_setprioceiling+0x15>
return EINVAL;
attr->prio_ceiling = prioceiling;
10d610: 89 73 08 mov %esi,0x8(%ebx)
10d613: 31 c0 xor %eax,%eax
return 0;
}
10d615: 8d 65 f8 lea -0x8(%ebp),%esp
10d618: 5b pop %ebx
10d619: 5e pop %esi
10d61a: c9 leave
10d61b: c3 ret
0010d644 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
10d644: 55 push %ebp
10d645: 89 e5 mov %esp,%ebp
10d647: 8b 45 08 mov 0x8(%ebp),%eax
10d64a: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
10d64d: 85 c0 test %eax,%eax
10d64f: 74 0b je 10d65c <pthread_mutexattr_setpshared+0x18>
10d651: 8b 08 mov (%eax),%ecx
10d653: 85 c9 test %ecx,%ecx
10d655: 74 05 je 10d65c <pthread_mutexattr_setpshared+0x18>
return EINVAL;
switch ( pshared ) {
10d657: 83 fa 01 cmp $0x1,%edx
10d65a: 76 08 jbe 10d664 <pthread_mutexattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
10d65c: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10d661: c9 leave
10d662: c3 ret
10d663: 90 nop
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10d664: 89 50 04 mov %edx,0x4(%eax)
10d667: 31 c0 xor %eax,%eax
return 0;
default:
return EINVAL;
}
}
10d669: c9 leave
10d66a: c3 ret
0010b838 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
10b838: 55 push %ebp
10b839: 89 e5 mov %esp,%ebp
10b83b: 8b 45 08 mov 0x8(%ebp),%eax
10b83e: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
10b841: 85 c0 test %eax,%eax
10b843: 74 0b je 10b850 <pthread_mutexattr_settype+0x18>
10b845: 8b 08 mov (%eax),%ecx
10b847: 85 c9 test %ecx,%ecx
10b849: 74 05 je 10b850 <pthread_mutexattr_settype+0x18><== NEVER TAKEN
return EINVAL;
switch ( type ) {
10b84b: 83 fa 03 cmp $0x3,%edx
10b84e: 76 08 jbe 10b858 <pthread_mutexattr_settype+0x20>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
return 0;
10b850: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10b855: c9 leave
10b856: c3 ret
10b857: 90 nop
switch ( type ) {
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
10b858: 89 50 10 mov %edx,0x10(%eax)
10b85b: 31 c0 xor %eax,%eax
return 0;
default:
return EINVAL;
}
}
10b85d: c9 leave
10b85e: c3 ret
0010c414 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
10c414: 55 push %ebp
10c415: 89 e5 mov %esp,%ebp
10c417: 57 push %edi
10c418: 56 push %esi
10c419: 53 push %ebx
10c41a: 83 ec 1c sub $0x1c,%esp
10c41d: 8b 5d 08 mov 0x8(%ebp),%ebx
10c420: 8b 75 0c mov 0xc(%ebp),%esi
if ( !once_control || !init_routine )
10c423: 85 db test %ebx,%ebx
10c425: 74 51 je 10c478 <pthread_once+0x64>
10c427: 85 f6 test %esi,%esi
10c429: 74 4d je 10c478 <pthread_once+0x64>
return EINVAL;
if ( !once_control->init_executed ) {
10c42b: 8b 7b 04 mov 0x4(%ebx),%edi
10c42e: 85 ff test %edi,%edi
10c430: 74 0a je 10c43c <pthread_once+0x28>
10c432: 31 c0 xor %eax,%eax
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
10c434: 8d 65 f4 lea -0xc(%ebp),%esp
10c437: 5b pop %ebx
10c438: 5e pop %esi
10c439: 5f pop %edi
10c43a: c9 leave
10c43b: c3 ret
if ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
10c43c: 51 push %ecx
10c43d: 8d 7d e4 lea -0x1c(%ebp),%edi
10c440: 57 push %edi
10c441: 68 00 01 00 00 push $0x100
10c446: 68 00 01 00 00 push $0x100
10c44b: e8 cc 0b 00 00 call 10d01c <rtems_task_mode>
if ( !once_control->init_executed ) {
10c450: 83 c4 10 add $0x10,%esp
10c453: 8b 53 04 mov 0x4(%ebx),%edx
10c456: 85 d2 test %edx,%edx
10c458: 74 2e je 10c488 <pthread_once+0x74> <== ALWAYS TAKEN
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
10c45a: 50 push %eax
10c45b: 57 push %edi
10c45c: 68 00 01 00 00 push $0x100
10c461: ff 75 e4 pushl -0x1c(%ebp)
10c464: e8 b3 0b 00 00 call 10d01c <rtems_task_mode>
10c469: 31 c0 xor %eax,%eax
10c46b: 83 c4 10 add $0x10,%esp
}
return 0;
}
10c46e: 8d 65 f4 lea -0xc(%ebp),%esp
10c471: 5b pop %ebx
10c472: 5e pop %esi
10c473: 5f pop %edi
10c474: c9 leave
10c475: c3 ret
10c476: 66 90 xchg %ax,%ax
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
10c478: b8 16 00 00 00 mov $0x16,%eax
}
return 0;
}
10c47d: 8d 65 f4 lea -0xc(%ebp),%esp
10c480: 5b pop %ebx
10c481: 5e pop %esi
10c482: 5f pop %edi
10c483: c9 leave
10c484: c3 ret
10c485: 8d 76 00 lea 0x0(%esi),%esi
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
10c488: c7 03 01 00 00 00 movl $0x1,(%ebx)
once_control->init_executed = true;
10c48e: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
(*init_routine)();
10c495: ff d6 call *%esi
10c497: eb c1 jmp 10c45a <pthread_once+0x46>
0010c854 <pthread_rwlock_destroy>:
*/
int pthread_rwlock_destroy(
pthread_rwlock_t *rwlock
)
{
10c854: 55 push %ebp
10c855: 89 e5 mov %esp,%ebp
10c857: 53 push %ebx
10c858: 83 ec 14 sub $0x14,%esp
10c85b: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_RWLock_Control *the_rwlock = NULL;
Objects_Locations location;
if ( !rwlock )
10c85e: 85 c0 test %eax,%eax
10c860: 74 42 je 10c8a4 <pthread_rwlock_destroy+0x50>
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get (
pthread_rwlock_t *RWLock,
Objects_Locations *location
)
{
return (POSIX_RWLock_Control *) _Objects_Get(
10c862: 53 push %ebx
10c863: 8d 55 f4 lea -0xc(%ebp),%edx
10c866: 52 push %edx
10c867: ff 30 pushl (%eax)
10c869: 68 60 c6 12 00 push $0x12c660
10c86e: e8 a1 2b 00 00 call 10f414 <_Objects_Get>
10c873: 89 c3 mov %eax,%ebx
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
10c875: 83 c4 10 add $0x10,%esp
10c878: 8b 4d f4 mov -0xc(%ebp),%ecx
10c87b: 85 c9 test %ecx,%ecx
10c87d: 75 25 jne 10c8a4 <pthread_rwlock_destroy+0x50>
case OBJECTS_LOCAL:
/*
* If there is at least one thread waiting, then do not delete it.
*/
if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) {
10c87f: 83 ec 0c sub $0xc,%esp
10c882: 8d 40 10 lea 0x10(%eax),%eax
10c885: 50 push %eax
10c886: e8 49 3c 00 00 call 1104d4 <_Thread_queue_First>
10c88b: 83 c4 10 add $0x10,%esp
10c88e: 85 c0 test %eax,%eax
10c890: 74 1e je 10c8b0 <pthread_rwlock_destroy+0x5c>
_Thread_Enable_dispatch();
10c892: e8 f1 33 00 00 call 10fc88 <_Thread_Enable_dispatch>
10c897: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c89c: 8b 5d fc mov -0x4(%ebp),%ebx
10c89f: c9 leave
10c8a0: c3 ret
10c8a1: 8d 76 00 lea 0x0(%esi),%esi
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
return 0;
10c8a4: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c8a9: 8b 5d fc mov -0x4(%ebp),%ebx
10c8ac: c9 leave
10c8ad: c3 ret
10c8ae: 66 90 xchg %ax,%ax
/*
* POSIX doesn't require behavior when it is locked.
*/
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
10c8b0: 83 ec 08 sub $0x8,%esp
10c8b3: 53 push %ebx
10c8b4: 68 60 c6 12 00 push $0x12c660
10c8b9: e8 22 27 00 00 call 10efe0 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free (
POSIX_RWLock_Control *the_RWLock
)
{
_Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object );
10c8be: 58 pop %eax
10c8bf: 5a pop %edx
10c8c0: 53 push %ebx
10c8c1: 68 60 c6 12 00 push $0x12c660
10c8c6: e8 19 2a 00 00 call 10f2e4 <_Objects_Free>
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
10c8cb: e8 b8 33 00 00 call 10fc88 <_Thread_Enable_dispatch>
10c8d0: 31 c0 xor %eax,%eax
return 0;
10c8d2: 83 c4 10 add $0x10,%esp
10c8d5: eb d2 jmp 10c8a9 <pthread_rwlock_destroy+0x55>
0010c8d8 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
10c8d8: 55 push %ebp
10c8d9: 89 e5 mov %esp,%ebp
10c8db: 56 push %esi
10c8dc: 53 push %ebx
10c8dd: 83 ec 20 sub $0x20,%esp
10c8e0: 8b 5d 08 mov 0x8(%ebp),%ebx
10c8e3: 8b 75 0c mov 0xc(%ebp),%esi
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
10c8e6: 85 db test %ebx,%ebx
10c8e8: 74 15 je 10c8ff <pthread_rwlock_init+0x27>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10c8ea: 85 f6 test %esi,%esi
10c8ec: 0f 84 86 00 00 00 je 10c978 <pthread_rwlock_init+0xa0>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10c8f2: 8b 16 mov (%esi),%edx
10c8f4: 85 d2 test %edx,%edx
10c8f6: 74 07 je 10c8ff <pthread_rwlock_init+0x27><== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
10c8f8: 8b 46 04 mov 0x4(%esi),%eax
10c8fb: 85 c0 test %eax,%eax
10c8fd: 74 0d je 10c90c <pthread_rwlock_init+0x34><== ALWAYS TAKEN
);
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
10c8ff: b8 16 00 00 00 mov $0x16,%eax
}
10c904: 8d 65 f8 lea -0x8(%ebp),%esp
10c907: 5b pop %ebx
10c908: 5e pop %esi
10c909: c9 leave
10c90a: c3 ret
10c90b: 90 nop
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c90c: a1 d8 c3 12 00 mov 0x12c3d8,%eax
10c911: 40 inc %eax
10c912: a3 d8 c3 12 00 mov %eax,0x12c3d8
* 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 *)
10c917: 83 ec 0c sub $0xc,%esp
10c91a: 68 60 c6 12 00 push $0x12c660
10c91f: e8 40 26 00 00 call 10ef64 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
10c924: 83 c4 10 add $0x10,%esp
10c927: 85 c0 test %eax,%eax
10c929: 74 41 je 10c96c <pthread_rwlock_init+0x94>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
10c92b: 83 ec 08 sub $0x8,%esp
10c92e: 8d 55 f4 lea -0xc(%ebp),%edx
10c931: 52 push %edx
10c932: 8d 50 10 lea 0x10(%eax),%edx
10c935: 52 push %edx
10c936: 89 45 e4 mov %eax,-0x1c(%ebp)
10c939: e8 3a 1e 00 00 call 10e778 <_CORE_RWLock_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c93e: 8b 45 e4 mov -0x1c(%ebp),%eax
10c941: 8b 50 08 mov 0x8(%eax),%edx
10c944: 0f b7 f2 movzwl %dx,%esi
10c947: 8b 0d 7c c6 12 00 mov 0x12c67c,%ecx
10c94d: 89 04 b1 mov %eax,(%ecx,%esi,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10c950: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
10c957: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10c959: e8 2a 33 00 00 call 10fc88 <_Thread_Enable_dispatch>
10c95e: 31 c0 xor %eax,%eax
return 0;
10c960: 83 c4 10 add $0x10,%esp
}
10c963: 8d 65 f8 lea -0x8(%ebp),%esp
10c966: 5b pop %ebx
10c967: 5e pop %esi
10c968: c9 leave
10c969: c3 ret
10c96a: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
10c96c: e8 17 33 00 00 call 10fc88 <_Thread_Enable_dispatch>
10c971: b8 0b 00 00 00 mov $0xb,%eax
return EAGAIN;
10c976: eb 8c jmp 10c904 <pthread_rwlock_init+0x2c>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
10c978: 83 ec 0c sub $0xc,%esp
10c97b: 8d 75 ec lea -0x14(%ebp),%esi
10c97e: 56 push %esi
10c97f: e8 c0 09 00 00 call 10d344 <pthread_rwlockattr_init>
10c984: 83 c4 10 add $0x10,%esp
10c987: e9 66 ff ff ff jmp 10c8f2 <pthread_rwlock_init+0x1a>
0010c9f4 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10c9f4: 55 push %ebp
10c9f5: 89 e5 mov %esp,%ebp
10c9f7: 56 push %esi
10c9f8: 53 push %ebx
10c9f9: 83 ec 20 sub $0x20,%esp
10c9fc: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10c9ff: 85 db test %ebx,%ebx
10ca01: 74 7d je 10ca80 <pthread_rwlock_timedrdlock+0x8c>
*
* 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 );
10ca03: 83 ec 08 sub $0x8,%esp
10ca06: 8d 45 f0 lea -0x10(%ebp),%eax
10ca09: 50 push %eax
10ca0a: ff 75 0c pushl 0xc(%ebp)
10ca0d: e8 9a 6d 00 00 call 1137ac <_POSIX_Absolute_timeout_to_ticks>
10ca12: 89 c6 mov %eax,%esi
10ca14: 83 c4 0c add $0xc,%esp
10ca17: 8d 45 f4 lea -0xc(%ebp),%eax
10ca1a: 50 push %eax
10ca1b: ff 33 pushl (%ebx)
10ca1d: 68 60 c6 12 00 push $0x12c660
10ca22: e8 ed 29 00 00 call 10f414 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
10ca27: 83 c4 10 add $0x10,%esp
10ca2a: 8b 55 f4 mov -0xc(%ebp),%edx
10ca2d: 85 d2 test %edx,%edx
10ca2f: 75 4f jne 10ca80 <pthread_rwlock_timedrdlock+0x8c>
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,
10ca31: 83 fe 03 cmp $0x3,%esi
10ca34: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
10ca37: 83 ec 0c sub $0xc,%esp
10ca3a: 6a 00 push $0x0
10ca3c: ff 75 f0 pushl -0x10(%ebp)
10ca3f: 0f b6 ca movzbl %dl,%ecx
10ca42: 51 push %ecx
10ca43: ff 33 pushl (%ebx)
10ca45: 83 c0 10 add $0x10,%eax
10ca48: 50 push %eax
10ca49: 88 55 e4 mov %dl,-0x1c(%ebp)
10ca4c: e8 5b 1d 00 00 call 10e7ac <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10ca51: 83 c4 20 add $0x20,%esp
10ca54: e8 2f 32 00 00 call 10fc88 <_Thread_Enable_dispatch>
if ( !do_wait ) {
10ca59: 8a 55 e4 mov -0x1c(%ebp),%dl
10ca5c: 84 d2 test %dl,%dl
10ca5e: 75 3c jne 10ca9c <pthread_rwlock_timedrdlock+0xa8>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
10ca60: a1 98 c4 12 00 mov 0x12c498,%eax
10ca65: 8b 40 34 mov 0x34(%eax),%eax
10ca68: 83 f8 02 cmp $0x2,%eax
10ca6b: 74 1f je 10ca8c <pthread_rwlock_timedrdlock+0x98>
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10ca6d: 83 ec 0c sub $0xc,%esp
10ca70: 50 push %eax
10ca71: e8 e6 00 00 00 call 10cb5c <_POSIX_RWLock_Translate_core_RWLock_return_code>
10ca76: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10ca79: 8d 65 f8 lea -0x8(%ebp),%esp
10ca7c: 5b pop %ebx
10ca7d: 5e pop %esi
10ca7e: c9 leave
10ca7f: c3 ret
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10ca80: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10ca85: 8d 65 f8 lea -0x8(%ebp),%esp
10ca88: 5b pop %ebx
10ca89: 5e pop %esi
10ca8a: c9 leave
10ca8b: c3 ret
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
switch (status) {
10ca8c: 85 f6 test %esi,%esi
10ca8e: 74 f0 je 10ca80 <pthread_rwlock_timedrdlock+0x8c><== NEVER TAKEN
10ca90: 83 fe 02 cmp $0x2,%esi
10ca93: 77 d8 ja 10ca6d <pthread_rwlock_timedrdlock+0x79><== NEVER TAKEN
10ca95: b0 74 mov $0x74,%al
10ca97: eb ec jmp 10ca85 <pthread_rwlock_timedrdlock+0x91>
10ca99: 8d 76 00 lea 0x0(%esi),%esi
10ca9c: a1 98 c4 12 00 mov 0x12c498,%eax
10caa1: 8b 40 34 mov 0x34(%eax),%eax
10caa4: eb c7 jmp 10ca6d <pthread_rwlock_timedrdlock+0x79>
0010caa8 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10caa8: 55 push %ebp
10caa9: 89 e5 mov %esp,%ebp
10caab: 56 push %esi
10caac: 53 push %ebx
10caad: 83 ec 20 sub $0x20,%esp
10cab0: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10cab3: 85 db test %ebx,%ebx
10cab5: 74 7d je 10cb34 <pthread_rwlock_timedwrlock+0x8c>
*
* 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 );
10cab7: 83 ec 08 sub $0x8,%esp
10caba: 8d 45 f0 lea -0x10(%ebp),%eax
10cabd: 50 push %eax
10cabe: ff 75 0c pushl 0xc(%ebp)
10cac1: e8 e6 6c 00 00 call 1137ac <_POSIX_Absolute_timeout_to_ticks>
10cac6: 89 c6 mov %eax,%esi
10cac8: 83 c4 0c add $0xc,%esp
10cacb: 8d 45 f4 lea -0xc(%ebp),%eax
10cace: 50 push %eax
10cacf: ff 33 pushl (%ebx)
10cad1: 68 60 c6 12 00 push $0x12c660
10cad6: e8 39 29 00 00 call 10f414 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
10cadb: 83 c4 10 add $0x10,%esp
10cade: 8b 55 f4 mov -0xc(%ebp),%edx
10cae1: 85 d2 test %edx,%edx
10cae3: 75 4f jne 10cb34 <pthread_rwlock_timedwrlock+0x8c>
(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,
10cae5: 83 fe 03 cmp $0x3,%esi
10cae8: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
10caeb: 83 ec 0c sub $0xc,%esp
10caee: 6a 00 push $0x0
10caf0: ff 75 f0 pushl -0x10(%ebp)
10caf3: 0f b6 ca movzbl %dl,%ecx
10caf6: 51 push %ecx
10caf7: ff 33 pushl (%ebx)
10caf9: 83 c0 10 add $0x10,%eax
10cafc: 50 push %eax
10cafd: 88 55 e4 mov %dl,-0x1c(%ebp)
10cb00: e8 6f 1d 00 00 call 10e874 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10cb05: 83 c4 20 add $0x20,%esp
10cb08: e8 7b 31 00 00 call 10fc88 <_Thread_Enable_dispatch>
if ( !do_wait &&
10cb0d: 8a 55 e4 mov -0x1c(%ebp),%dl
10cb10: 84 d2 test %dl,%dl
10cb12: 75 3c jne 10cb50 <pthread_rwlock_timedwrlock+0xa8>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
10cb14: a1 98 c4 12 00 mov 0x12c498,%eax
10cb19: 8b 40 34 mov 0x34(%eax),%eax
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
10cb1c: 83 f8 02 cmp $0x2,%eax
10cb1f: 74 1f je 10cb40 <pthread_rwlock_timedwrlock+0x98>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10cb21: 83 ec 0c sub $0xc,%esp
10cb24: 50 push %eax
10cb25: e8 32 00 00 00 call 10cb5c <_POSIX_RWLock_Translate_core_RWLock_return_code>
10cb2a: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10cb2d: 8d 65 f8 lea -0x8(%ebp),%esp
10cb30: 5b pop %ebx
10cb31: 5e pop %esi
10cb32: c9 leave
10cb33: c3 ret
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10cb34: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10cb39: 8d 65 f8 lea -0x8(%ebp),%esp
10cb3c: 5b pop %ebx
10cb3d: 5e pop %esi
10cb3e: c9 leave
10cb3f: c3 ret
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
10cb40: 85 f6 test %esi,%esi
10cb42: 74 f0 je 10cb34 <pthread_rwlock_timedwrlock+0x8c><== NEVER TAKEN
10cb44: 83 fe 02 cmp $0x2,%esi
10cb47: 77 d8 ja 10cb21 <pthread_rwlock_timedwrlock+0x79><== NEVER TAKEN
10cb49: b0 74 mov $0x74,%al
10cb4b: eb ec jmp 10cb39 <pthread_rwlock_timedwrlock+0x91>
10cb4d: 8d 76 00 lea 0x0(%esi),%esi
10cb50: a1 98 c4 12 00 mov 0x12c498,%eax
10cb55: 8b 40 34 mov 0x34(%eax),%eax
10cb58: eb c7 jmp 10cb21 <pthread_rwlock_timedwrlock+0x79>
0010d2fc <pthread_rwlockattr_destroy>:
*/
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
10d2fc: 55 push %ebp
10d2fd: 89 e5 mov %esp,%ebp
10d2ff: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10d302: 85 c0 test %eax,%eax
10d304: 74 12 je 10d318 <pthread_rwlockattr_destroy+0x1c>
10d306: 8b 10 mov (%eax),%edx
10d308: 85 d2 test %edx,%edx
10d30a: 74 0c je 10d318 <pthread_rwlockattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10d30c: c7 00 00 00 00 00 movl $0x0,(%eax)
10d312: 31 c0 xor %eax,%eax
return 0;
}
10d314: c9 leave
10d315: c3 ret
10d316: 66 90 xchg %ax,%ax
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
return 0;
10d318: b8 16 00 00 00 mov $0x16,%eax
}
10d31d: c9 leave
10d31e: c3 ret
0010d364 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
10d364: 55 push %ebp
10d365: 89 e5 mov %esp,%ebp
10d367: 8b 45 08 mov 0x8(%ebp),%eax
10d36a: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
10d36d: 85 c0 test %eax,%eax
10d36f: 74 0b je 10d37c <pthread_rwlockattr_setpshared+0x18>
return EINVAL;
if ( !attr->is_initialized )
10d371: 8b 08 mov (%eax),%ecx
10d373: 85 c9 test %ecx,%ecx
10d375: 74 05 je 10d37c <pthread_rwlockattr_setpshared+0x18>
return EINVAL;
switch ( pshared ) {
10d377: 83 fa 01 cmp $0x1,%edx
10d37a: 76 08 jbe 10d384 <pthread_rwlockattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
10d37c: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10d381: c9 leave
10d382: c3 ret
10d383: 90 nop
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10d384: 89 50 04 mov %edx,0x4(%eax)
10d387: 31 c0 xor %eax,%eax
return 0;
default:
return EINVAL;
}
}
10d389: c9 leave
10d38a: c3 ret
0010b818 <pthread_setcancelstate>:
int pthread_setcancelstate(
int state,
int *oldstate
)
{
10b818: 55 push %ebp
10b819: 89 e5 mov %esp,%ebp
10b81b: 53 push %ebx
10b81c: 83 ec 04 sub $0x4,%esp
10b81f: 8b 4d 08 mov 0x8(%ebp),%ecx
10b822: 8b 55 0c mov 0xc(%ebp),%edx
* 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() )
10b825: a1 f4 aa 12 00 mov 0x12aaf4,%eax
10b82a: 85 c0 test %eax,%eax
10b82c: 75 16 jne 10b844 <pthread_setcancelstate+0x2c>
return EPROTO;
if ( !oldstate )
10b82e: 85 d2 test %edx,%edx
10b830: 74 05 je 10b837 <pthread_setcancelstate+0x1f>
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
10b832: 83 f9 01 cmp $0x1,%ecx
10b835: 76 19 jbe 10b850 <pthread_setcancelstate+0x38>
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
10b837: b8 16 00 00 00 mov $0x16,%eax
}
10b83c: 8b 5d fc mov -0x4(%ebp),%ebx
10b83f: c9 leave
10b840: c3 ret
10b841: 8d 76 00 lea 0x0(%esi),%esi
* 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() )
10b844: b8 47 00 00 00 mov $0x47,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b849: 8b 5d fc mov -0x4(%ebp),%ebx
10b84c: c9 leave
10b84d: c3 ret
10b84e: 66 90 xchg %ax,%ax
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b850: a1 18 ab 12 00 mov 0x12ab18,%eax
10b855: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b85b: 8b 1d 58 aa 12 00 mov 0x12aa58,%ebx
10b861: 43 inc %ebx
10b862: 89 1d 58 aa 12 00 mov %ebx,0x12aa58
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
10b868: 8b 98 d4 00 00 00 mov 0xd4(%eax),%ebx
10b86e: 89 1a mov %ebx,(%edx)
thread_support->cancelability_state = state;
10b870: 89 88 d4 00 00 00 mov %ecx,0xd4(%eax)
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
10b876: 83 ec 0c sub $0xc,%esp
10b879: ff 35 18 ab 12 00 pushl 0x12ab18
10b87f: e8 08 5f 00 00 call 11178c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
10b884: 31 c0 xor %eax,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
10b886: 83 c4 10 add $0x10,%esp
}
10b889: 8b 5d fc mov -0x4(%ebp),%ebx
10b88c: c9 leave
10b88d: c3 ret
0010b890 <pthread_setcanceltype>:
int pthread_setcanceltype(
int type,
int *oldtype
)
{
10b890: 55 push %ebp
10b891: 89 e5 mov %esp,%ebp
10b893: 53 push %ebx
10b894: 83 ec 04 sub $0x4,%esp
10b897: 8b 4d 08 mov 0x8(%ebp),%ecx
10b89a: 8b 55 0c mov 0xc(%ebp),%edx
* 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() )
10b89d: a1 f4 aa 12 00 mov 0x12aaf4,%eax
10b8a2: 85 c0 test %eax,%eax
10b8a4: 75 16 jne 10b8bc <pthread_setcanceltype+0x2c>
return EPROTO;
if ( !oldtype )
10b8a6: 85 d2 test %edx,%edx
10b8a8: 74 05 je 10b8af <pthread_setcanceltype+0x1f>
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
10b8aa: 83 f9 01 cmp $0x1,%ecx
10b8ad: 76 19 jbe 10b8c8 <pthread_setcanceltype+0x38>
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
10b8af: b8 16 00 00 00 mov $0x16,%eax
}
10b8b4: 8b 5d fc mov -0x4(%ebp),%ebx
10b8b7: c9 leave
10b8b8: c3 ret
10b8b9: 8d 76 00 lea 0x0(%esi),%esi
* 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() )
10b8bc: b8 47 00 00 00 mov $0x47,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b8c1: 8b 5d fc mov -0x4(%ebp),%ebx
10b8c4: c9 leave
10b8c5: c3 ret
10b8c6: 66 90 xchg %ax,%ax
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b8c8: a1 18 ab 12 00 mov 0x12ab18,%eax
10b8cd: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10b8d3: 8b 1d 58 aa 12 00 mov 0x12aa58,%ebx
10b8d9: 43 inc %ebx
10b8da: 89 1d 58 aa 12 00 mov %ebx,0x12aa58
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
10b8e0: 8b 98 d8 00 00 00 mov 0xd8(%eax),%ebx
10b8e6: 89 1a mov %ebx,(%edx)
thread_support->cancelability_type = type;
10b8e8: 89 88 d8 00 00 00 mov %ecx,0xd8(%eax)
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
10b8ee: 83 ec 0c sub $0xc,%esp
10b8f1: ff 35 18 ab 12 00 pushl 0x12ab18
10b8f7: e8 90 5e 00 00 call 11178c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
10b8fc: 31 c0 xor %eax,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
10b8fe: 83 c4 10 add $0x10,%esp
}
10b901: 8b 5d fc mov -0x4(%ebp),%ebx
10b904: c9 leave
10b905: c3 ret
0010e358 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
10e358: 55 push %ebp
10e359: 89 e5 mov %esp,%ebp
10e35b: 57 push %edi
10e35c: 56 push %esi
10e35d: 53 push %ebx
10e35e: 83 ec 2c sub $0x2c,%esp
10e361: 8b 75 10 mov 0x10(%ebp),%esi
int rc;
/*
* Check all the parameters
*/
if ( !param )
10e364: 85 f6 test %esi,%esi
10e366: 0f 84 c8 00 00 00 je 10e434 <pthread_setschedparam+0xdc><== NEVER TAKEN
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
10e36c: 8d 45 e0 lea -0x20(%ebp),%eax
10e36f: 50 push %eax
10e370: 8d 45 e4 lea -0x1c(%ebp),%eax
10e373: 50 push %eax
10e374: 56 push %esi
10e375: ff 75 0c pushl 0xc(%ebp)
10e378: e8 27 64 00 00 call 1147a4 <_POSIX_Thread_Translate_sched_param>
10e37d: 89 c3 mov %eax,%ebx
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
10e37f: 83 c4 10 add $0x10,%esp
10e382: 85 c0 test %eax,%eax
10e384: 74 0a je 10e390 <pthread_setschedparam+0x38>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10e386: 89 d8 mov %ebx,%eax
10e388: 8d 65 f4 lea -0xc(%ebp),%esp
10e38b: 5b pop %ebx
10e38c: 5e pop %esi
10e38d: 5f pop %edi
10e38e: c9 leave
10e38f: c3 ret
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
10e390: 83 ec 08 sub $0x8,%esp
10e393: 8d 45 dc lea -0x24(%ebp),%eax
10e396: 50 push %eax
10e397: ff 75 08 pushl 0x8(%ebp)
10e39a: e8 c5 27 00 00 call 110b64 <_Thread_Get>
10e39f: 89 c2 mov %eax,%edx
switch ( location ) {
10e3a1: 83 c4 10 add $0x10,%esp
10e3a4: 8b 7d dc mov -0x24(%ebp),%edi
10e3a7: 85 ff test %edi,%edi
10e3a9: 0f 85 95 00 00 00 jne 10e444 <pthread_setschedparam+0xec><== NEVER TAKEN
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10e3af: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10e3b5: 89 45 d4 mov %eax,-0x2c(%ebp)
if ( api->schedpolicy == SCHED_SPORADIC )
10e3b8: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax)
10e3bf: 0f 84 c7 00 00 00 je 10e48c <pthread_setschedparam+0x134>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
10e3c5: 8b 45 0c mov 0xc(%ebp),%eax
10e3c8: 8b 4d d4 mov -0x2c(%ebp),%ecx
10e3cb: 89 81 80 00 00 00 mov %eax,0x80(%ecx)
api->schedparam = *param;
10e3d1: 89 cf mov %ecx,%edi
10e3d3: 81 c7 84 00 00 00 add $0x84,%edi
10e3d9: b9 07 00 00 00 mov $0x7,%ecx
10e3de: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_thread->budget_algorithm = budget_algorithm;
10e3e0: 8b 45 e4 mov -0x1c(%ebp),%eax
10e3e3: 89 42 7c mov %eax,0x7c(%edx)
the_thread->budget_callout = budget_callout;
10e3e6: 8b 45 e0 mov -0x20(%ebp),%eax
10e3e9: 89 82 80 00 00 00 mov %eax,0x80(%edx)
switch ( api->schedpolicy ) {
10e3ef: 8b 75 0c mov 0xc(%ebp),%esi
10e3f2: 85 f6 test %esi,%esi
10e3f4: 78 2e js 10e424 <pthread_setschedparam+0xcc><== NEVER TAKEN
10e3f6: 83 7d 0c 02 cmpl $0x2,0xc(%ebp)
10e3fa: 7f 54 jg 10e450 <pthread_setschedparam+0xf8>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10e3fc: a1 64 e6 12 00 mov 0x12e664,%eax
10e401: 89 42 78 mov %eax,0x78(%edx)
10e404: 0f b6 05 7c a4 12 00 movzbl 0x12a47c,%eax
10e40b: 8b 4d d4 mov -0x2c(%ebp),%ecx
10e40e: 2b 81 84 00 00 00 sub 0x84(%ecx),%eax
the_thread->real_priority =
10e414: 89 42 18 mov %eax,0x18(%edx)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
10e417: 51 push %ecx
10e418: 6a 01 push $0x1
10e41a: 50 push %eax
10e41b: 52 push %edx
10e41c: e8 37 22 00 00 call 110658 <_Thread_Change_priority>
the_thread,
the_thread->real_priority,
true
);
break;
10e421: 83 c4 10 add $0x10,%esp
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
10e424: e8 17 27 00 00 call 110b40 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10e429: 89 d8 mov %ebx,%eax
10e42b: 8d 65 f4 lea -0xc(%ebp),%esp
10e42e: 5b pop %ebx
10e42f: 5e pop %esi
10e430: 5f pop %edi
10e431: c9 leave
10e432: c3 ret
10e433: 90 nop
int rc;
/*
* Check all the parameters
*/
if ( !param )
10e434: bb 16 00 00 00 mov $0x16,%ebx
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10e439: 89 d8 mov %ebx,%eax
10e43b: 8d 65 f4 lea -0xc(%ebp),%esp
10e43e: 5b pop %ebx
10e43f: 5e pop %esi
10e440: 5f pop %edi
10e441: c9 leave
10e442: c3 ret
10e443: 90 nop
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
switch ( location ) {
10e444: b3 03 mov $0x3,%bl
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10e446: 89 d8 mov %ebx,%eax
10e448: 8d 65 f4 lea -0xc(%ebp),%esp
10e44b: 5b pop %ebx
10e44c: 5e pop %esi
10e44d: 5f pop %edi
10e44e: c9 leave
10e44f: c3 ret
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
10e450: 83 7d 0c 04 cmpl $0x4,0xc(%ebp)
10e454: 75 ce jne 10e424 <pthread_setschedparam+0xcc><== NEVER TAKEN
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
10e456: 8b 4d d4 mov -0x2c(%ebp),%ecx
10e459: 8b 81 84 00 00 00 mov 0x84(%ecx),%eax
10e45f: 89 81 a0 00 00 00 mov %eax,0xa0(%ecx)
_Watchdog_Remove( &api->Sporadic_timer );
10e465: 83 ec 0c sub $0xc,%esp
10e468: 89 c8 mov %ecx,%eax
10e46a: 05 a4 00 00 00 add $0xa4,%eax
10e46f: 50 push %eax
10e470: 89 55 d0 mov %edx,-0x30(%ebp)
10e473: e8 b0 38 00 00 call 111d28 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
10e478: 58 pop %eax
10e479: 5a pop %edx
10e47a: 8b 55 d0 mov -0x30(%ebp),%edx
10e47d: 52 push %edx
10e47e: 6a 00 push $0x0
10e480: e8 3f fe ff ff call 10e2c4 <_POSIX_Threads_Sporadic_budget_TSR>
10e485: 83 c4 10 add $0x10,%esp
10e488: eb 9a jmp 10e424 <pthread_setschedparam+0xcc>
10e48a: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
10e48c: 83 ec 0c sub $0xc,%esp
10e48f: 05 a4 00 00 00 add $0xa4,%eax
10e494: 50 push %eax
10e495: 89 55 d0 mov %edx,-0x30(%ebp)
10e498: e8 8b 38 00 00 call 111d28 <_Watchdog_Remove>
10e49d: 83 c4 10 add $0x10,%esp
10e4a0: 8b 55 d0 mov -0x30(%ebp),%edx
10e4a3: e9 1d ff ff ff jmp 10e3c5 <pthread_setschedparam+0x6d>
00112bdc <pthread_sigmask>:
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
112bdc: 55 push %ebp
112bdd: 89 e5 mov %esp,%ebp
112bdf: 57 push %edi
112be0: 56 push %esi
112be1: 53 push %ebx
112be2: 83 ec 0c sub $0xc,%esp
112be5: 8b 4d 08 mov 0x8(%ebp),%ecx
112be8: 8b 55 0c mov 0xc(%ebp),%edx
112beb: 8b 5d 10 mov 0x10(%ebp),%ebx
POSIX_API_Control *api;
if ( !set && !oset )
112bee: 85 d2 test %edx,%edx
112bf0: 0f 84 9a 00 00 00 je 112c90 <pthread_sigmask+0xb4>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
112bf6: 8b 35 98 b6 12 00 mov 0x12b698,%esi
112bfc: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax
if ( oset )
112c02: 85 db test %ebx,%ebx
112c04: 74 0c je 112c12 <pthread_sigmask+0x36>
*oset = api->signals_blocked;
112c06: 8b b8 cc 00 00 00 mov 0xcc(%eax),%edi
112c0c: 89 3b mov %edi,(%ebx)
if ( !set )
112c0e: 85 d2 test %edx,%edx
112c10: 74 42 je 112c54 <pthread_sigmask+0x78>
return 0;
switch ( how ) {
112c12: 83 f9 01 cmp $0x1,%ecx
112c15: 74 6d je 112c84 <pthread_sigmask+0xa8>
112c17: 83 f9 02 cmp $0x2,%ecx
112c1a: 74 44 je 112c60 <pthread_sigmask+0x84>
112c1c: 85 c9 test %ecx,%ecx
112c1e: 75 4c jne 112c6c <pthread_sigmask+0x90>
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
112c20: 8b 12 mov (%edx),%edx
112c22: 89 90 cc 00 00 00 mov %edx,0xcc(%eax)
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
112c28: 8b 15 c8 bd 12 00 mov 0x12bdc8,%edx
112c2e: 0b 90 d0 00 00 00 or 0xd0(%eax),%edx
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
112c34: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax
112c3a: f7 d0 not %eax
112c3c: 85 c2 test %eax,%edx
112c3e: 74 14 je 112c54 <pthread_sigmask+0x78>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Executing->do_post_task_switch_extension = true;
112c40: c6 46 74 01 movb $0x1,0x74(%esi)
_Thread_Dispatch();
112c44: e8 97 bd ff ff call 10e9e0 <_Thread_Dispatch>
112c49: 31 c0 xor %eax,%eax
}
return 0;
}
112c4b: 83 c4 0c add $0xc,%esp
112c4e: 5b pop %ebx
112c4f: 5e pop %esi
112c50: 5f pop %edi
112c51: c9 leave
112c52: c3 ret
112c53: 90 nop
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
112c54: 31 c0 xor %eax,%eax
}
return 0;
}
112c56: 83 c4 0c add $0xc,%esp
112c59: 5b pop %ebx
112c5a: 5e pop %esi
112c5b: 5f pop %edi
112c5c: c9 leave
112c5d: c3 ret
112c5e: 66 90 xchg %ax,%ax
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
112c60: 8b 12 mov (%edx),%edx
112c62: f7 d2 not %edx
112c64: 21 90 cc 00 00 00 and %edx,0xcc(%eax)
break;
112c6a: eb bc jmp 112c28 <pthread_sigmask+0x4c>
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
112c6c: e8 db 33 00 00 call 11604c <__errno>
112c71: c7 00 16 00 00 00 movl $0x16,(%eax)
112c77: b8 ff ff ff ff mov $0xffffffff,%eax
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
}
return 0;
}
112c7c: 83 c4 0c add $0xc,%esp
112c7f: 5b pop %ebx
112c80: 5e pop %esi
112c81: 5f pop %edi
112c82: c9 leave
112c83: c3 ret
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
112c84: 8b 12 mov (%edx),%edx
112c86: 09 90 cc 00 00 00 or %edx,0xcc(%eax)
break;
112c8c: eb 9a jmp 112c28 <pthread_sigmask+0x4c>
112c8e: 66 90 xchg %ax,%ax
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
112c90: 85 db test %ebx,%ebx
112c92: 74 d8 je 112c6c <pthread_sigmask+0x90>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
112c94: 8b 35 98 b6 12 00 mov 0x12b698,%esi
112c9a: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax
112ca0: e9 61 ff ff ff jmp 112c06 <pthread_sigmask+0x2a>
0010c1b8 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
10c1b8: 55 push %ebp
10c1b9: 89 e5 mov %esp,%ebp
10c1bb: 83 ec 08 sub $0x8,%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() )
10c1be: a1 34 b3 12 00 mov 0x12b334,%eax
10c1c3: 85 c0 test %eax,%eax
10c1c5: 75 44 jne 10c20b <pthread_testcancel+0x53><== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10c1c7: a1 58 b3 12 00 mov 0x12b358,%eax
10c1cc: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10c1d2: 8b 15 98 b2 12 00 mov 0x12b298,%edx
10c1d8: 42 inc %edx
10c1d9: 89 15 98 b2 12 00 mov %edx,0x12b298
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10c1df: 8b 90 d4 00 00 00 mov 0xd4(%eax),%edx
10c1e5: 85 d2 test %edx,%edx
10c1e7: 75 27 jne 10c210 <pthread_testcancel+0x58><== NEVER TAKEN
thread_support->cancelation_requested )
10c1e9: 8b 80 dc 00 00 00 mov 0xdc(%eax),%eax
10c1ef: 85 c0 test %eax,%eax
10c1f1: 74 1d je 10c210 <pthread_testcancel+0x58>
cancel = true;
_Thread_Enable_dispatch();
10c1f3: e8 14 26 00 00 call 10e80c <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
10c1f8: 83 ec 08 sub $0x8,%esp
10c1fb: 6a ff push $0xffffffff
10c1fd: ff 35 58 b3 12 00 pushl 0x12b358
10c203: e8 98 63 00 00 call 1125a0 <_POSIX_Thread_Exit>
10c208: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10c20b: c9 leave <== NOT EXECUTED
10c20c: c3 ret <== NOT EXECUTED
10c20d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10c210: c9 leave
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10c211: e9 f6 25 00 00 jmp 10e80c <_Thread_Enable_dispatch>
001094e8 <putk>:
* putk
*
* Kernel putk (e.g. puts) function requiring minimal infrastrure.
*/
void putk(const char *s)
{
1094e8: 55 push %ebp
1094e9: 89 e5 mov %esp,%ebp
1094eb: 53 push %ebx
1094ec: 83 ec 04 sub $0x4,%esp
1094ef: 8b 5d 08 mov 0x8(%ebp),%ebx
const char *p = s;
for (p=s ; *p ; p++ )
1094f2: 8a 03 mov (%ebx),%al
1094f4: 84 c0 test %al,%al
1094f6: 74 17 je 10950f <putk+0x27> <== NEVER TAKEN
BSP_output_char(*p);
1094f8: 83 ec 0c sub $0xc,%esp
1094fb: 0f be c0 movsbl %al,%eax
1094fe: 50 push %eax
1094ff: ff 15 64 57 12 00 call *0x125764
*/
void putk(const char *s)
{
const char *p = s;
for (p=s ; *p ; p++ )
109505: 43 inc %ebx
109506: 8a 03 mov (%ebx),%al
109508: 83 c4 10 add $0x10,%esp
10950b: 84 c0 test %al,%al
10950d: 75 e9 jne 1094f8 <putk+0x10>
BSP_output_char(*p);
BSP_output_char('\n');
10950f: c7 45 08 0a 00 00 00 movl $0xa,0x8(%ebp)
109516: a1 64 57 12 00 mov 0x125764,%eax
}
10951b: 8b 5d fc mov -0x4(%ebp),%ebx
10951e: c9 leave
{
const char *p = s;
for (p=s ; *p ; p++ )
BSP_output_char(*p);
BSP_output_char('\n');
10951f: ff e0 jmp *%eax
0011073c <ramdisk_allocate>:
void *area_begin,
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
11073c: 55 push %ebp
11073d: 89 e5 mov %esp,%ebp
11073f: 57 push %edi
110740: 56 push %esi
110741: 53 push %ebx
110742: 83 ec 28 sub $0x28,%esp
110745: 8b 7d 08 mov 0x8(%ebp),%edi
110748: 8a 45 14 mov 0x14(%ebp),%al
11074b: 88 45 e7 mov %al,-0x19(%ebp)
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
11074e: 6a 10 push $0x10
110750: e8 0f 90 ff ff call 109764 <malloc>
110755: 89 c6 mov %eax,%esi
110757: 89 c3 mov %eax,%ebx
if (rd == NULL) {
110759: 83 c4 10 add $0x10,%esp
11075c: 85 c0 test %eax,%eax
11075e: 74 20 je 110780 <ramdisk_allocate+0x44> <== NEVER TAKEN
return NULL;
}
if (area_begin == NULL) {
110760: 85 ff test %edi,%edi
110762: 74 28 je 11078c <ramdisk_allocate+0x50> <== ALWAYS TAKEN
return NULL;
}
rd->malloced = true;
} else {
rd->malloced = false;
110764: c6 40 0d 00 movb $0x0,0xd(%eax) <== NOT EXECUTED
}
rd->block_size = block_size;
110768: 8b 45 0c mov 0xc(%ebp),%eax
11076b: 89 03 mov %eax,(%ebx)
rd->block_num = block_count;
11076d: 8b 45 10 mov 0x10(%ebp),%eax
110770: 89 43 04 mov %eax,0x4(%ebx)
rd->area = area_begin;
110773: 89 7b 08 mov %edi,0x8(%ebx)
rd->trace = trace;
110776: 8a 45 e7 mov -0x19(%ebp),%al
110779: 88 43 0e mov %al,0xe(%ebx)
rd->initialized = true;
11077c: c6 43 0c 01 movb $0x1,0xc(%ebx)
return rd;
}
110780: 89 f0 mov %esi,%eax
110782: 8d 65 f4 lea -0xc(%ebp),%esp
110785: 5b pop %ebx
110786: 5e pop %esi
110787: 5f pop %edi
110788: c9 leave
110789: c3 ret
11078a: 66 90 xchg %ax,%ax
if (rd == NULL) {
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
11078c: 83 ec 08 sub $0x8,%esp
11078f: ff 75 0c pushl 0xc(%ebp)
110792: ff 75 10 pushl 0x10(%ebp)
110795: e8 da 8a ff ff call 109274 <calloc>
11079a: 89 c7 mov %eax,%edi
if (area_begin == NULL) {
11079c: 83 c4 10 add $0x10,%esp
11079f: 85 c0 test %eax,%eax
1107a1: 74 06 je 1107a9 <ramdisk_allocate+0x6d> <== NEVER TAKEN
free(rd);
return NULL;
}
rd->malloced = true;
1107a3: c6 46 0d 01 movb $0x1,0xd(%esi)
1107a7: eb bf jmp 110768 <ramdisk_allocate+0x2c>
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
if (area_begin == NULL) {
free(rd);
1107a9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1107ac: 56 push %esi <== NOT EXECUTED
1107ad: e8 da 8c ff ff call 10948c <free> <== NOT EXECUTED
1107b2: 31 f6 xor %esi,%esi <== NOT EXECUTED
return NULL;
1107b4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1107b7: eb c7 jmp 110780 <ramdisk_allocate+0x44> <== NOT EXECUTED
001106f8 <ramdisk_free>:
return rd;
}
void ramdisk_free(ramdisk *rd)
{
1106f8: 55 push %ebp
1106f9: 89 e5 mov %esp,%ebp
1106fb: 53 push %ebx
1106fc: 83 ec 04 sub $0x4,%esp
1106ff: 8b 5d 08 mov 0x8(%ebp),%ebx
if (rd != NULL) {
110702: 85 db test %ebx,%ebx
110704: 74 2e je 110734 <ramdisk_free+0x3c> <== NEVER TAKEN
if (rd->malloced) {
110706: 80 7b 0d 00 cmpb $0x0,0xd(%ebx)
11070a: 75 0c jne 110718 <ramdisk_free+0x20> <== ALWAYS TAKEN
free(rd->area);
}
free(rd);
11070c: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
}
}
11070f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
110712: c9 leave <== NOT EXECUTED
{
if (rd != NULL) {
if (rd->malloced) {
free(rd->area);
}
free(rd);
110713: e9 74 8d ff ff jmp 10948c <free> <== NOT EXECUTED
void ramdisk_free(ramdisk *rd)
{
if (rd != NULL) {
if (rd->malloced) {
free(rd->area);
110718: 83 ec 0c sub $0xc,%esp
11071b: ff 73 08 pushl 0x8(%ebx)
11071e: e8 69 8d ff ff call 10948c <free>
110723: 83 c4 10 add $0x10,%esp
}
free(rd);
110726: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
110729: 8b 5d fc mov -0x4(%ebp),%ebx
11072c: c9 leave
{
if (rd != NULL) {
if (rd->malloced) {
free(rd->area);
}
free(rd);
11072d: e9 5a 8d ff ff jmp 10948c <free>
110732: 66 90 xchg %ax,%ax
}
}
110734: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
110737: c9 leave <== NOT EXECUTED
110738: c3 ret <== NOT EXECUTED
0012686c <ramdisk_initialize>:
rtems_device_driver
ramdisk_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *arg __attribute__((unused)))
{
12686c: 55 push %ebp <== NOT EXECUTED
12686d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12686f: 57 push %edi <== NOT EXECUTED
126870: 56 push %esi <== NOT EXECUTED
126871: 53 push %ebx <== NOT EXECUTED
126872: 83 ec 5c sub $0x5c,%esp <== NOT EXECUTED
rtems_device_minor_number i;
rtems_ramdisk_config *c = rtems_ramdisk_configuration;
struct ramdisk *r;
rtems_status_code rc;
rc = rtems_disk_io_initialize();
126875: e8 42 6a fe ff call 10d2bc <rtems_disk_io_initialize><== NOT EXECUTED
12687a: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
12687d: 85 c0 test %eax,%eax <== NOT EXECUTED
12687f: 74 0b je 12688c <ramdisk_initialize+0x20><== NOT EXECUTED
}
r->initialized = false;
}
}
return RTEMS_SUCCESSFUL;
}
126881: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
126884: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
126887: 5b pop %ebx <== NOT EXECUTED
126888: 5e pop %esi <== NOT EXECUTED
126889: 5f pop %edi <== NOT EXECUTED
12688a: c9 leave <== NOT EXECUTED
12688b: c3 ret <== NOT EXECUTED
* This is allocating memory for a RAM disk which will persist for
* the life of the system. RTEMS has no "de-initialize" driver call
* so there is no corresponding free(r). Coverity is correct that
* it is never freed but this is not a problem.
*/
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
12688c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12688f: 6a 10 push $0x10 <== NOT EXECUTED
126891: ff 35 d0 d2 16 00 pushl 0x16d2d0 <== NOT EXECUTED
126897: e8 70 7a fe ff call 10e30c <calloc> <== NOT EXECUTED
12689c: 89 c3 mov %eax,%ebx <== NOT EXECUTED
r->trace = false;
12689e: c6 40 0e 00 movb $0x0,0xe(%eax) <== NOT EXECUTED
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
1268a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1268a5: 8b 3d d0 d2 16 00 mov 0x16d2d0,%edi <== NOT EXECUTED
1268ab: 85 ff test %edi,%edi <== NOT EXECUTED
1268ad: 74 d2 je 126881 <ramdisk_initialize+0x15><== NOT EXECUTED
1268af: ba c4 d2 16 00 mov $0x16d2c4,%edx <== NOT EXECUTED
1268b4: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) <== NOT EXECUTED
1268bb: 8d 45 d7 lea -0x29(%ebp),%eax <== NOT EXECUTED
1268be: 89 45 a4 mov %eax,-0x5c(%ebp) <== NOT EXECUTED
1268c1: eb 19 jmp 1268dc <ramdisk_initialize+0x70><== NOT EXECUTED
1268c3: 90 nop <== NOT EXECUTED
{
if (r->malloced)
{
free(r->area);
}
r->initialized = false;
1268c4: c6 43 0c 00 movb $0x0,0xc(%ebx) <== NOT EXECUTED
* so there is no corresponding free(r). Coverity is correct that
* it is never freed but this is not a problem.
*/
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
1268c8: ff 45 c4 incl -0x3c(%ebp) <== NOT EXECUTED
1268cb: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
1268ce: 39 05 d0 d2 16 00 cmp %eax,0x16d2d0 <== NOT EXECUTED
1268d4: 76 ab jbe 126881 <ramdisk_initialize+0x15><== NOT EXECUTED
1268d6: 83 c2 0c add $0xc,%edx <== NOT EXECUTED
1268d9: 83 c3 10 add $0x10,%ebx <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
1268dc: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
1268df: 89 75 e0 mov %esi,-0x20(%ebp) <== NOT EXECUTED
temp.__overlay.minor = _minor;
1268e2: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
1268e5: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
return temp.device;
1268e8: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED
1268eb: 8b 7d e4 mov -0x1c(%ebp),%edi <== NOT EXECUTED
1268ee: 89 75 b8 mov %esi,-0x48(%ebp) <== NOT EXECUTED
1268f1: 89 7d bc mov %edi,-0x44(%ebp) <== NOT EXECUTED
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
1268f4: 8b 7d a4 mov -0x5c(%ebp),%edi <== NOT EXECUTED
1268f7: be b4 48 16 00 mov $0x1648b4,%esi <== NOT EXECUTED
1268fc: b9 09 00 00 00 mov $0x9,%ecx <== NOT EXECUTED
126901: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
126903: 00 45 df add %al,-0x21(%ebp) <== NOT EXECUTED
r->block_size = c->block_size;
126906: 8b 02 mov (%edx),%eax <== NOT EXECUTED
126908: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
r->block_num = c->block_num;
12690a: 8b 4a 04 mov 0x4(%edx),%ecx <== NOT EXECUTED
12690d: 89 4b 04 mov %ecx,0x4(%ebx) <== NOT EXECUTED
if (c->location == NULL)
126910: 8b 72 08 mov 0x8(%edx),%esi <== NOT EXECUTED
126913: 85 f6 test %esi,%esi <== NOT EXECUTED
126915: 74 51 je 126968 <ramdisk_initialize+0xfc><== NOT EXECUTED
r->initialized = true;
}
}
else
{
r->malloced = false;
126917: c6 43 0d 00 movb $0x0,0xd(%ebx) <== NOT EXECUTED
r->initialized = true;
12691b: c6 43 0c 01 movb $0x1,0xc(%ebx) <== NOT EXECUTED
r->area = c->location;
12691f: 89 73 08 mov %esi,0x8(%ebx) <== NOT EXECUTED
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
126922: 56 push %esi <== NOT EXECUTED
126923: 8d 7d d7 lea -0x29(%ebp),%edi <== NOT EXECUTED
126926: 57 push %edi <== NOT EXECUTED
126927: 53 push %ebx <== NOT EXECUTED
126928: 68 98 69 12 00 push $0x126998 <== NOT EXECUTED
12692d: 51 push %ecx <== NOT EXECUTED
12692e: 50 push %eax <== NOT EXECUTED
12692f: ff 75 bc pushl -0x44(%ebp) <== NOT EXECUTED
126932: ff 75 b8 pushl -0x48(%ebp) <== NOT EXECUTED
126935: 89 55 b0 mov %edx,-0x50(%ebp) <== NOT EXECUTED
126938: e8 67 70 fe ff call 10d9a4 <rtems_disk_create_phys><== NOT EXECUTED
ramdisk_ioctl, r, name);
if (rc != RTEMS_SUCCESSFUL)
12693d: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
126940: 85 c0 test %eax,%eax <== NOT EXECUTED
126942: 8b 55 b0 mov -0x50(%ebp),%edx <== NOT EXECUTED
126945: 74 81 je 1268c8 <ramdisk_initialize+0x5c><== NOT EXECUTED
{
if (r->malloced)
126947: 80 7b 0d 00 cmpb $0x0,0xd(%ebx) <== NOT EXECUTED
12694b: 0f 84 73 ff ff ff je 1268c4 <ramdisk_initialize+0x58><== NOT EXECUTED
{
free(r->area);
126951: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
126954: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
126957: e8 0c 7f fe ff call 10e868 <free> <== NOT EXECUTED
12695c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12695f: 8b 55 b0 mov -0x50(%ebp),%edx <== NOT EXECUTED
126962: e9 5d ff ff ff jmp 1268c4 <ramdisk_initialize+0x58><== NOT EXECUTED
126967: 90 nop <== NOT EXECUTED
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
r->block_size = c->block_size;
r->block_num = c->block_num;
if (c->location == NULL)
{
r->malloced = true;
126968: c6 43 0d 01 movb $0x1,0xd(%ebx) <== NOT EXECUTED
r->area = malloc(r->block_size * r->block_num);
12696c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12696f: 0f af c1 imul %ecx,%eax <== NOT EXECUTED
126972: 50 push %eax <== NOT EXECUTED
126973: 89 55 b0 mov %edx,-0x50(%ebp) <== NOT EXECUTED
126976: e8 8d 84 fe ff call 10ee08 <malloc> <== NOT EXECUTED
12697b: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
if (r->area == NULL) /* No enough memory for this disk */
12697e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126981: 85 c0 test %eax,%eax <== NOT EXECUTED
126983: 8b 55 b0 mov -0x50(%ebp),%edx <== NOT EXECUTED
126986: 0f 84 38 ff ff ff je 1268c4 <ramdisk_initialize+0x58><== NOT EXECUTED
r->initialized = false;
continue;
}
else
{
r->initialized = true;
12698c: c6 43 0c 01 movb $0x1,0xc(%ebx) <== NOT EXECUTED
126990: 8b 4a 04 mov 0x4(%edx),%ecx <== NOT EXECUTED
126993: 8b 02 mov (%edx),%eax <== NOT EXECUTED
126995: eb 8b jmp 126922 <ramdisk_initialize+0xb6><== NOT EXECUTED
00110610 <ramdisk_ioctl>:
return 0;
}
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
110610: 55 push %ebp
110611: 89 e5 mov %esp,%ebp
110613: 57 push %edi
110614: 56 push %esi
110615: 53 push %ebx
110616: 83 ec 1c sub $0x1c,%esp
110619: 8b 4d 08 mov 0x8(%ebp),%ecx
11061c: 8b 45 0c mov 0xc(%ebp),%eax
11061f: 8b 55 10 mov 0x10(%ebp),%edx
switch (req)
110622: 3d 01 42 18 c0 cmp $0xc0184201,%eax
110627: 74 17 je 110640 <ramdisk_ioctl+0x30>
}
break;
}
default:
return rtems_blkdev_ioctl (dd, req, argp);
110629: 89 55 10 mov %edx,0x10(%ebp)
11062c: 89 45 0c mov %eax,0xc(%ebp)
11062f: 89 4d 08 mov %ecx,0x8(%ebp)
break;
}
errno = EINVAL;
return -1;
}
110632: 8d 65 f4 lea -0xc(%ebp),%esp
110635: 5b pop %ebx
110636: 5e pop %esi
110637: 5f pop %edi
110638: c9 leave
}
break;
}
default:
return rtems_blkdev_ioctl (dd, req, argp);
110639: e9 56 24 00 00 jmp 112a94 <rtems_blkdev_ioctl>
11063e: 66 90 xchg %ax,%ax
switch (req)
{
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
110640: 8b 49 2c mov 0x2c(%ecx),%ecx
110643: 89 4d e0 mov %ecx,-0x20(%ebp)
switch (r->req)
110646: 8b 02 mov (%edx),%eax
110648: 85 c0 test %eax,%eax
11064a: 75 54 jne 1106a0 <ramdisk_ioctl+0x90> <== ALWAYS TAKEN
#endif
static int
ramdisk_read(struct ramdisk *rd, rtems_blkdev_request *req)
{
uint8_t *from = rd->area;
11064c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
11064f: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
110652: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
110655: 8b 4a 10 mov 0x10(%edx),%ecx <== NOT EXECUTED
110658: 85 c9 test %ecx,%ecx <== NOT EXECUTED
11065a: 74 24 je 110680 <ramdisk_ioctl+0x70> <== NOT EXECUTED
11065c: 8d 42 18 lea 0x18(%edx),%eax <== NOT EXECUTED
11065f: 31 db xor %ebx,%ebx <== NOT EXECUTED
110661: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
from + (sg->block * rd->block_size));
#endif
memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length);
110664: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
110667: 8b 31 mov (%ecx),%esi <== NOT EXECUTED
110669: 0f af 30 imul (%eax),%esi <== NOT EXECUTED
11066c: 03 75 dc add -0x24(%ebp),%esi <== NOT EXECUTED
11066f: 8b 48 04 mov 0x4(%eax),%ecx <== NOT EXECUTED
110672: 8b 78 08 mov 0x8(%eax),%edi <== NOT EXECUTED
110675: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
110677: 43 inc %ebx <== NOT EXECUTED
110678: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
11067b: 3b 5a 10 cmp 0x10(%edx),%ebx <== NOT EXECUTED
11067e: 72 e4 jb 110664 <ramdisk_ioctl+0x54> <== NOT EXECUTED
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
110680: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
110687: 83 ec 08 sub $0x8,%esp
11068a: 6a 00 push $0x0
11068c: ff 72 08 pushl 0x8(%edx)
11068f: ff 52 04 call *0x4(%edx)
110692: 31 c0 xor %eax,%eax
{
case RTEMS_BLKDEV_REQ_READ:
return ramdisk_read(rd, r);
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
110694: 83 c4 10 add $0x10,%esp
break;
}
errno = EINVAL;
return -1;
}
110697: 8d 65 f4 lea -0xc(%ebp),%esp
11069a: 5b pop %ebx
11069b: 5e pop %esi
11069c: 5f pop %edi
11069d: c9 leave
11069e: c3 ret
11069f: 90 nop
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (r->req)
1106a0: 48 dec %eax
1106a1: 74 19 je 1106bc <ramdisk_ioctl+0xac> <== ALWAYS TAKEN
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
default:
errno = EINVAL;
1106a3: e8 58 86 00 00 call 118d00 <__errno> <== NOT EXECUTED
1106a8: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
1106ae: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
break;
}
errno = EINVAL;
return -1;
}
1106b3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1106b6: 5b pop %ebx <== NOT EXECUTED
1106b7: 5e pop %esi <== NOT EXECUTED
1106b8: 5f pop %edi <== NOT EXECUTED
1106b9: c9 leave <== NOT EXECUTED
1106ba: c3 ret <== NOT EXECUTED
1106bb: 90 nop <== NOT EXECUTED
}
static int
ramdisk_write(struct ramdisk *rd, rtems_blkdev_request *req)
{
uint8_t *to = rd->area;
1106bc: 8b 45 e0 mov -0x20(%ebp),%eax
1106bf: 8b 40 08 mov 0x8(%eax),%eax
1106c2: 89 45 dc mov %eax,-0x24(%ebp)
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
1106c5: 8b 42 10 mov 0x10(%edx),%eax
1106c8: 85 c0 test %eax,%eax
1106ca: 74 b4 je 110680 <ramdisk_ioctl+0x70> <== NEVER TAKEN
1106cc: 8d 42 18 lea 0x18(%edx),%eax
1106cf: 31 db xor %ebx,%ebx
1106d1: 89 55 e4 mov %edx,-0x1c(%ebp)
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
1106d4: 8b 4d e0 mov -0x20(%ebp),%ecx
1106d7: 8b 11 mov (%ecx),%edx
1106d9: 0f af 10 imul (%eax),%edx
1106dc: 03 55 dc add -0x24(%ebp),%edx
1106df: 8b 70 08 mov 0x8(%eax),%esi
1106e2: 8b 48 04 mov 0x4(%eax),%ecx
1106e5: 89 d7 mov %edx,%edi
1106e7: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
1106e9: 43 inc %ebx
1106ea: 83 c0 10 add $0x10,%eax
1106ed: 8b 55 e4 mov -0x1c(%ebp),%edx
1106f0: 3b 5a 10 cmp 0x10(%edx),%ebx
1106f3: 72 df jb 1106d4 <ramdisk_ioctl+0xc4> <== NEVER TAKEN
1106f5: eb 89 jmp 110680 <ramdisk_ioctl+0x70>
001107bc <ramdisk_register>:
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
1107bc: 55 push %ebp
1107bd: 89 e5 mov %esp,%ebp
1107bf: 57 push %edi
1107c0: 56 push %esi
1107c1: 53 push %ebx
1107c2: 83 ec 30 sub $0x30,%esp
1107c5: 8b 5d 0c mov 0xc(%ebp),%ebx
1107c8: 0f b6 75 10 movzbl 0x10(%ebp),%esi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
1107cc: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
1107d3: 8d 45 e4 lea -0x1c(%ebp),%eax
1107d6: 50 push %eax
1107d7: 68 2c 68 12 00 push $0x12682c
1107dc: 6a 00 push $0x0
1107de: e8 4d cd ff ff call 10d530 <rtems_io_register_driver>
if (sc != RTEMS_SUCCESSFUL) {
1107e3: 83 c4 10 add $0x10,%esp
1107e6: 85 c0 test %eax,%eax
1107e8: 74 0e je 1107f8 <ramdisk_register+0x3c> <== ALWAYS TAKEN
1107ea: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
}
*dev_ptr = dev;
return RTEMS_SUCCESSFUL;
}
1107ef: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1107f2: 5b pop %ebx <== NOT EXECUTED
1107f3: 5e pop %esi <== NOT EXECUTED
1107f4: 5f pop %edi <== NOT EXECUTED
1107f5: c9 leave <== NOT EXECUTED
1107f6: c3 ret <== NOT EXECUTED
1107f7: 90 nop <== NOT EXECUTED
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
if (sc != RTEMS_SUCCESSFUL) {
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, block_size, block_count, trace);
1107f8: 81 e6 ff 00 00 00 and $0xff,%esi
1107fe: 56 push %esi
1107ff: 53 push %ebx
110800: ff 75 08 pushl 0x8(%ebp)
110803: 6a 00 push $0x0
110805: e8 32 ff ff ff call 11073c <ramdisk_allocate>
if (rd == NULL) {
11080a: 83 c4 10 add $0x10,%esp
11080d: 85 c0 test %eax,%eax
11080f: 74 5f je 110870 <ramdisk_register+0xb4> <== NEVER TAKEN
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
temp.__overlay.minor = _minor;
return temp.device;
110811: 8b 75 e4 mov -0x1c(%ebp),%esi
110814: 31 ff xor %edi,%edi
return RTEMS_UNSATISFIED;
}
dev = rtems_filesystem_make_dev_t(major, 0);
sc = rtems_disk_create_phys(
110816: 51 push %ecx
110817: ff 75 14 pushl 0x14(%ebp)
11081a: 50 push %eax
11081b: 68 10 06 11 00 push $0x110610
110820: 53 push %ebx
110821: ff 75 08 pushl 0x8(%ebp)
110824: 57 push %edi
110825: 56 push %esi
110826: 89 45 d4 mov %eax,-0x2c(%ebp)
110829: e8 0a 82 ff ff call 108a38 <rtems_disk_create_phys>
block_count,
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
11082e: 83 c4 20 add $0x20,%esp
110831: 85 c0 test %eax,%eax
110833: 8b 55 d4 mov -0x2c(%ebp),%edx
110836: 75 14 jne 11084c <ramdisk_register+0x90> <== NEVER TAKEN
rtems_io_unregister_driver(major);
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
110838: 8b 45 18 mov 0x18(%ebp),%eax
11083b: 89 30 mov %esi,(%eax)
11083d: 89 78 04 mov %edi,0x4(%eax)
110840: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
110842: 8d 65 f4 lea -0xc(%ebp),%esp
110845: 5b pop %ebx
110846: 5e pop %esi
110847: 5f pop %edi
110848: c9 leave
110849: c3 ret
11084a: 66 90 xchg %ax,%ax
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
ramdisk_free(rd);
11084c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11084f: 52 push %edx <== NOT EXECUTED
110850: e8 a3 fe ff ff call 1106f8 <ramdisk_free> <== NOT EXECUTED
rtems_io_unregister_driver(major);
110855: 58 pop %eax <== NOT EXECUTED
110856: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
110859: e8 12 ce ff ff call 10d670 <rtems_io_unregister_driver><== NOT EXECUTED
11085e: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
return RTEMS_UNSATISFIED;
110863: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
*dev_ptr = dev;
return RTEMS_SUCCESSFUL;
}
110866: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
110869: 5b pop %ebx <== NOT EXECUTED
11086a: 5e pop %esi <== NOT EXECUTED
11086b: 5f pop %edi <== NOT EXECUTED
11086c: c9 leave <== NOT EXECUTED
11086d: c3 ret <== NOT EXECUTED
11086e: 66 90 xchg %ax,%ax <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, block_size, block_count, trace);
if (rd == NULL) {
rtems_io_unregister_driver(major);
110870: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110873: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
110876: e8 f5 cd ff ff call 10d670 <rtems_io_unregister_driver><== NOT EXECUTED
11087b: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
return RTEMS_UNSATISFIED;
110880: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
*dev_ptr = dev;
return RTEMS_SUCCESSFUL;
}
110883: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
110886: 5b pop %ebx <== NOT EXECUTED
110887: 5e pop %esi <== NOT EXECUTED
110888: 5f pop %edi <== NOT EXECUTED
110889: c9 leave <== NOT EXECUTED
11088a: c3 ret <== NOT EXECUTED
001208d4 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
1208d4: 55 push %ebp
1208d5: 89 e5 mov %esp,%ebp
1208d7: 53 push %ebx
1208d8: 83 ec 04 sub $0x4,%esp
1208db: 8b 5d 08 mov 0x8(%ebp),%ebx
1208de: 8b 45 0c mov 0xc(%ebp),%eax
1208e1: 8b 55 10 mov 0x10(%ebp),%edx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1208e4: 3b 1d 4c 51 12 00 cmp 0x12514c,%ebx
1208ea: 73 50 jae 12093c <read+0x68> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
1208ec: c1 e3 06 shl $0x6,%ebx
1208ef: 03 1d 80 92 12 00 add 0x129280,%ebx
rtems_libio_check_is_open( iop );
1208f5: 8b 4b 14 mov 0x14(%ebx),%ecx
1208f8: f6 c5 01 test $0x1,%ch
1208fb: 74 3f je 12093c <read+0x68>
rtems_libio_check_buffer( buffer );
1208fd: 85 c0 test %eax,%eax
1208ff: 74 5f je 120960 <read+0x8c> <== NEVER TAKEN
rtems_libio_check_count( count );
120901: 85 d2 test %edx,%edx
120903: 74 2f je 120934 <read+0x60> <== NEVER TAKEN
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
120905: 83 e1 02 and $0x2,%ecx
120908: 74 32 je 12093c <read+0x68> <== NEVER TAKEN
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
12090a: 8b 4b 3c mov 0x3c(%ebx),%ecx
12090d: 8b 49 08 mov 0x8(%ecx),%ecx
120910: 85 c9 test %ecx,%ecx
120912: 74 3a je 12094e <read+0x7a> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->read_h)( iop, buffer, count );
120914: 83 ec 04 sub $0x4,%esp
120917: 52 push %edx
120918: 50 push %eax
120919: 53 push %ebx
12091a: ff d1 call *%ecx
if ( rc > 0 )
12091c: 83 c4 10 add $0x10,%esp
12091f: 85 c0 test %eax,%eax
120921: 7e 0b jle 12092e <read+0x5a>
iop->offset += rc;
120923: 89 c1 mov %eax,%ecx
120925: c1 f9 1f sar $0x1f,%ecx
120928: 01 43 0c add %eax,0xc(%ebx)
12092b: 11 4b 10 adc %ecx,0x10(%ebx)
return rc;
}
12092e: 8b 5d fc mov -0x4(%ebp),%ebx
120931: c9 leave
120932: c3 ret
120933: 90 nop
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
120934: 31 c0 xor %eax,%eax
if ( rc > 0 )
iop->offset += rc;
return rc;
}
120936: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
120939: c9 leave <== NOT EXECUTED
12093a: c3 ret <== NOT EXECUTED
12093b: 90 nop <== NOT EXECUTED
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
12093c: e8 c3 47 ff ff call 115104 <__errno>
120941: c7 00 09 00 00 00 movl $0x9,(%eax)
120947: b8 ff ff ff ff mov $0xffffffff,%eax
12094c: eb e0 jmp 12092e <read+0x5a>
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
12094e: e8 b1 47 ff ff call 115104 <__errno> <== NOT EXECUTED
120953: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
120959: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12095e: eb ce jmp 12092e <read+0x5a> <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
120960: e8 9f 47 ff ff call 115104 <__errno> <== NOT EXECUTED
120965: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
12096b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
120970: eb bc jmp 12092e <read+0x5a> <== NOT EXECUTED
0012faec <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
12faec: 55 push %ebp
12faed: 89 e5 mov %esp,%ebp
12faef: 57 push %edi
12faf0: 56 push %esi
12faf1: 53 push %ebx
12faf2: 83 ec 2c sub $0x2c,%esp
12faf5: 8b 55 08 mov 0x8(%ebp),%edx
12faf8: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
12fafb: 85 db test %ebx,%ebx
12fafd: 0f 84 ad 00 00 00 je 12fbb0 <readlink+0xc4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
12fb03: 31 c0 xor %eax,%eax
12fb05: b9 ff ff ff ff mov $0xffffffff,%ecx
12fb0a: 89 d7 mov %edx,%edi
12fb0c: f2 ae repnz scas %es:(%edi),%al
12fb0e: f7 d1 not %ecx
12fb10: 49 dec %ecx
12fb11: 83 ec 0c sub $0xc,%esp
12fb14: 6a 00 push $0x0
12fb16: 8d 75 d4 lea -0x2c(%ebp),%esi
12fb19: 56 push %esi
12fb1a: 6a 00 push $0x0
12fb1c: 51 push %ecx
12fb1d: 52 push %edx
12fb1e: e8 d5 ec fd ff call 10e7f8 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
12fb23: 83 c4 20 add $0x20,%esp
12fb26: 85 c0 test %eax,%eax
12fb28: 75 76 jne 12fba0 <readlink+0xb4> <== NEVER TAKEN
return -1;
if ( !loc.ops->node_type_h ){
12fb2a: 8b 55 e0 mov -0x20(%ebp),%edx
12fb2d: 8b 42 10 mov 0x10(%edx),%eax
12fb30: 85 c0 test %eax,%eax
12fb32: 74 4e je 12fb82 <readlink+0x96> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
12fb34: 83 ec 0c sub $0xc,%esp
12fb37: 56 push %esi
12fb38: ff d0 call *%eax
12fb3a: 83 c4 10 add $0x10,%esp
12fb3d: 83 f8 04 cmp $0x4,%eax
12fb40: 0f 85 86 00 00 00 jne 12fbcc <readlink+0xe0>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
12fb46: 8b 55 e0 mov -0x20(%ebp),%edx
12fb49: 8b 42 3c mov 0x3c(%edx),%eax
12fb4c: 85 c0 test %eax,%eax
12fb4e: 0f 84 a1 00 00 00 je 12fbf5 <readlink+0x109> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
12fb54: 52 push %edx
12fb55: ff 75 10 pushl 0x10(%ebp)
12fb58: 53 push %ebx
12fb59: 56 push %esi
12fb5a: ff d0 call *%eax
12fb5c: 89 c3 mov %eax,%ebx
rtems_filesystem_freenode( &loc );
12fb5e: 8b 45 e0 mov -0x20(%ebp),%eax
12fb61: 83 c4 10 add $0x10,%esp
12fb64: 85 c0 test %eax,%eax
12fb66: 74 10 je 12fb78 <readlink+0x8c> <== NEVER TAKEN
12fb68: 8b 40 1c mov 0x1c(%eax),%eax
12fb6b: 85 c0 test %eax,%eax
12fb6d: 74 09 je 12fb78 <readlink+0x8c> <== NEVER TAKEN
12fb6f: 83 ec 0c sub $0xc,%esp
12fb72: 56 push %esi
12fb73: ff d0 call *%eax
12fb75: 83 c4 10 add $0x10,%esp
return result;
}
12fb78: 89 d8 mov %ebx,%eax
12fb7a: 8d 65 f4 lea -0xc(%ebp),%esp
12fb7d: 5b pop %ebx
12fb7e: 5e pop %esi
12fb7f: 5f pop %edi
12fb80: c9 leave
12fb81: c3 ret
0, &loc, false );
if ( result != 0 )
return -1;
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
12fb82: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
12fb85: 85 c0 test %eax,%eax <== NOT EXECUTED
12fb87: 74 09 je 12fb92 <readlink+0xa6> <== NOT EXECUTED
12fb89: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12fb8c: 56 push %esi <== NOT EXECUTED
12fb8d: ff d0 call *%eax <== NOT EXECUTED
12fb8f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
12fb92: e8 e9 7f 01 00 call 147b80 <__errno> <== NOT EXECUTED
12fb97: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
12fb9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
12fba0: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
12fba5: 89 d8 mov %ebx,%eax <== NOT EXECUTED
12fba7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12fbaa: 5b pop %ebx <== NOT EXECUTED
12fbab: 5e pop %esi <== NOT EXECUTED
12fbac: 5f pop %edi <== NOT EXECUTED
12fbad: c9 leave <== NOT EXECUTED
12fbae: c3 ret <== NOT EXECUTED
12fbaf: 90 nop <== NOT EXECUTED
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
12fbb0: e8 cb 7f 01 00 call 147b80 <__errno> <== NOT EXECUTED
12fbb5: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
12fbbb: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
12fbc0: 89 d8 mov %ebx,%eax <== NOT EXECUTED
12fbc2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12fbc5: 5b pop %ebx <== NOT EXECUTED
12fbc6: 5e pop %esi <== NOT EXECUTED
12fbc7: 5f pop %edi <== NOT EXECUTED
12fbc8: c9 leave <== NOT EXECUTED
12fbc9: c3 ret <== NOT EXECUTED
12fbca: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
12fbcc: 8b 45 e0 mov -0x20(%ebp),%eax
12fbcf: 85 c0 test %eax,%eax
12fbd1: 74 10 je 12fbe3 <readlink+0xf7> <== NEVER TAKEN
12fbd3: 8b 40 1c mov 0x1c(%eax),%eax
12fbd6: 85 c0 test %eax,%eax
12fbd8: 74 09 je 12fbe3 <readlink+0xf7> <== NEVER TAKEN
12fbda: 83 ec 0c sub $0xc,%esp
12fbdd: 56 push %esi
12fbde: ff d0 call *%eax
12fbe0: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EINVAL );
12fbe3: e8 98 7f 01 00 call 147b80 <__errno>
12fbe8: c7 00 16 00 00 00 movl $0x16,(%eax)
12fbee: bb ff ff ff ff mov $0xffffffff,%ebx
12fbf3: eb 83 jmp 12fb78 <readlink+0x8c>
}
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
12fbf5: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
12fbf8: 85 c0 test %eax,%eax <== NOT EXECUTED
12fbfa: 74 09 je 12fc05 <readlink+0x119> <== NOT EXECUTED
12fbfc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12fbff: 56 push %esi <== NOT EXECUTED
12fc00: ff d0 call *%eax <== NOT EXECUTED
12fc02: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
12fc05: e8 76 7f 01 00 call 147b80 <__errno> <== NOT EXECUTED
12fc0a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
12fc10: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
12fc15: e9 5e ff ff ff jmp 12fb78 <readlink+0x8c> <== NOT EXECUTED
00109ea8 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
109ea8: 55 push %ebp
109ea9: 89 e5 mov %esp,%ebp
109eab: 57 push %edi
109eac: 56 push %esi
109ead: 53 push %ebx
109eae: 83 ec 1c sub $0x1c,%esp
109eb1: 8b 75 08 mov 0x8(%ebp),%esi
109eb4: 8b 5d 0c mov 0xc(%ebp),%ebx
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
109eb7: 3b 35 0c 78 12 00 cmp 0x12780c,%esi
109ebd: 0f 83 03 01 00 00 jae 109fc6 <readv+0x11e> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
109ec3: c1 e6 06 shl $0x6,%esi
109ec6: 03 35 40 c1 12 00 add 0x12c140,%esi
rtems_libio_check_is_open( iop );
109ecc: 8b 46 14 mov 0x14(%esi),%eax
109ecf: f6 c4 01 test $0x1,%ah
109ed2: 0f 84 ee 00 00 00 je 109fc6 <readv+0x11e> <== NEVER TAKEN
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
109ed8: a8 02 test $0x2,%al
109eda: 0f 84 e6 00 00 00 je 109fc6 <readv+0x11e> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
109ee0: 85 db test %ebx,%ebx
109ee2: 0f 84 ac 00 00 00 je 109f94 <readv+0xec>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
109ee8: 8b 7d 10 mov 0x10(%ebp),%edi
109eeb: 85 ff test %edi,%edi
109eed: 0f 8e a1 00 00 00 jle 109f94 <readv+0xec>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
109ef3: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp)
109efa: 0f 8f 94 00 00 00 jg 109f94 <readv+0xec> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
109f00: 8b 46 3c mov 0x3c(%esi),%eax
109f03: 8b 40 08 mov 0x8(%eax),%eax
109f06: 89 45 e0 mov %eax,-0x20(%ebp)
109f09: 85 c0 test %eax,%eax
109f0b: 0f 84 c9 00 00 00 je 109fda <readv+0x132> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
109f11: c6 45 e4 01 movb $0x1,-0x1c(%ebp)
109f15: 31 c0 xor %eax,%eax
109f17: 31 d2 xor %edx,%edx
109f19: eb 03 jmp 109f1e <readv+0x76>
109f1b: 90 nop
* 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++ ) {
109f1c: 89 fa mov %edi,%edx
ssize_t old;
if ( !iov[v].iov_base )
109f1e: 8b 0c c3 mov (%ebx,%eax,8),%ecx
109f21: 85 c9 test %ecx,%ecx
109f23: 74 6f je 109f94 <readv+0xec>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
109f25: 8b 4c c3 04 mov 0x4(%ebx,%eax,8),%ecx
109f29: 8d 3c 0a lea (%edx,%ecx,1),%edi
if ( total < old )
109f2c: 39 d7 cmp %edx,%edi
109f2e: 7c 64 jl 109f94 <readv+0xec>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
109f30: 85 c9 test %ecx,%ecx
109f32: 74 04 je 109f38 <readv+0x90>
109f34: c6 45 e4 00 movb $0x0,-0x1c(%ebp)
* 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++ ) {
109f38: 40 inc %eax
109f39: 39 45 10 cmp %eax,0x10(%ebp)
109f3c: 7f de jg 109f1c <readv+0x74>
/*
* 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 ) {
109f3e: 80 7d e4 00 cmpb $0x0,-0x1c(%ebp)
109f42: 75 70 jne 109fb4 <readv+0x10c>
109f44: 31 ff xor %edi,%edi
109f46: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
109f4d: 8b 45 e0 mov -0x20(%ebp),%eax
109f50: eb 24 jmp 109f76 <readv+0xce>
109f52: 66 90 xchg %ax,%ax
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
109f54: 74 0e je 109f64 <readv+0xbc> <== NEVER TAKEN
iop->offset += bytes;
109f56: 89 c1 mov %eax,%ecx
109f58: c1 f9 1f sar $0x1f,%ecx
109f5b: 01 46 0c add %eax,0xc(%esi)
109f5e: 11 4e 10 adc %ecx,0x10(%esi)
total += bytes;
109f61: 01 45 e4 add %eax,-0x1c(%ebp)
}
if (bytes != iov[ v ].iov_len)
109f64: 3b 44 fb 04 cmp 0x4(%ebx,%edi,8),%eax
109f68: 75 3c jne 109fa6 <readv+0xfe> <== NEVER TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
109f6a: 47 inc %edi
109f6b: 39 7d 10 cmp %edi,0x10(%ebp)
109f6e: 7e 36 jle 109fa6 <readv+0xfe>
109f70: 8b 46 3c mov 0x3c(%esi),%eax
109f73: 8b 40 08 mov 0x8(%eax),%eax
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
109f76: 52 push %edx
109f77: ff 74 fb 04 pushl 0x4(%ebx,%edi,8)
109f7b: ff 34 fb pushl (%ebx,%edi,8)
109f7e: 56 push %esi
109f7f: ff d0 call *%eax
if ( bytes < 0 )
109f81: 83 c4 10 add $0x10,%esp
109f84: 83 f8 00 cmp $0x0,%eax
109f87: 7d cb jge 109f54 <readv+0xac> <== ALWAYS TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
109f89: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED
109f90: eb 14 jmp 109fa6 <readv+0xfe> <== NOT EXECUTED
109f92: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
109f94: e8 6b bf 00 00 call 115f04 <__errno>
109f99: c7 00 16 00 00 00 movl $0x16,(%eax)
109f9f: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp)
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
109fa6: 8b 45 e4 mov -0x1c(%ebp),%eax
109fa9: 8d 65 f4 lea -0xc(%ebp),%esp
109fac: 5b pop %ebx
109fad: 5e pop %esi
109fae: 5f pop %edi
109faf: c9 leave
109fb0: c3 ret
109fb1: 8d 76 00 lea 0x0(%esi),%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 ) {
109fb4: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
109fbb: 8b 45 e4 mov -0x1c(%ebp),%eax
109fbe: 8d 65 f4 lea -0xc(%ebp),%esp
109fc1: 5b pop %ebx
109fc2: 5e pop %esi
109fc3: 5f pop %edi
109fc4: c9 leave
109fc5: c3 ret
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
109fc6: e8 39 bf 00 00 call 115f04 <__errno> <== NOT EXECUTED
109fcb: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
109fd1: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED
109fd8: eb cc jmp 109fa6 <readv+0xfe> <== NOT EXECUTED
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
109fda: e8 25 bf 00 00 call 115f04 <__errno> <== NOT EXECUTED
109fdf: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
109fe5: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED
109fec: eb b8 jmp 109fa6 <readv+0xfe> <== NOT EXECUTED
001209f4 <realloc>:
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
1209f4: 55 push %ebp
1209f5: 89 e5 mov %esp,%ebp
1209f7: 57 push %edi
1209f8: 56 push %esi
1209f9: 53 push %ebx
1209fa: 83 ec 2c sub $0x2c,%esp
1209fd: 8b 5d 08 mov 0x8(%ebp),%ebx
120a00: 8b 75 0c mov 0xc(%ebp),%esi
120a03: ff 05 b0 92 12 00 incl 0x1292b0
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
120a09: 83 3d c0 95 12 00 03 cmpl $0x3,0x1295c0
120a10: 74 72 je 120a84 <realloc+0x90>
}
/*
* Continue with realloc().
*/
if ( !ptr )
120a12: 85 db test %ebx,%ebx
120a14: 74 5e je 120a74 <realloc+0x80>
return malloc( size );
if ( !size ) {
120a16: 85 f6 test %esi,%esi
120a18: 74 3a je 120a54 <realloc+0x60> <== NEVER TAKEN
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
120a1a: 52 push %edx
120a1b: 8d 45 e4 lea -0x1c(%ebp),%eax
120a1e: 50 push %eax
120a1f: 53 push %ebx
120a20: ff 35 58 51 12 00 pushl 0x125158
120a26: e8 59 01 00 00 call 120b84 <_Protected_heap_Get_block_size>
120a2b: 83 c4 10 add $0x10,%esp
120a2e: 84 c0 test %al,%al
120a30: 74 32 je 120a64 <realloc+0x70>
#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 ) ) {
120a32: 50 push %eax
120a33: 56 push %esi
120a34: 53 push %ebx
120a35: ff 35 58 51 12 00 pushl 0x125158
120a3b: e8 7c 01 00 00 call 120bbc <_Protected_heap_Resize_block>
120a40: 83 c4 10 add $0x10,%esp
120a43: 84 c0 test %al,%al
120a45: 74 5d je 120aa4 <realloc+0xb0>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
120a47: 89 d8 mov %ebx,%eax
120a49: 8d 65 f4 lea -0xc(%ebp),%esp
120a4c: 5b pop %ebx
120a4d: 5e pop %esi
120a4e: 5f pop %edi
120a4f: c9 leave
120a50: c3 ret
120a51: 8d 76 00 lea 0x0(%esi),%esi
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
120a54: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
120a57: 53 push %ebx <== NOT EXECUTED
120a58: e8 87 7b fe ff call 1085e4 <free> <== NOT EXECUTED
120a5d: 31 db xor %ebx,%ebx <== NOT EXECUTED
return (void *) 0;
120a5f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
120a62: eb e3 jmp 120a47 <realloc+0x53> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
120a64: e8 9b 46 ff ff call 115104 <__errno>
120a69: c7 00 16 00 00 00 movl $0x16,(%eax)
120a6f: 31 db xor %ebx,%ebx
return (void *) 0;
120a71: eb d4 jmp 120a47 <realloc+0x53>
120a73: 90 nop
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
120a74: 83 ec 0c sub $0xc,%esp
120a77: 56 push %esi
120a78: e8 3f 7e fe ff call 1088bc <malloc>
120a7d: 89 c3 mov %eax,%ebx
120a7f: 83 c4 10 add $0x10,%esp
120a82: eb c3 jmp 120a47 <realloc+0x53>
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
120a84: a1 f8 93 12 00 mov 0x1293f8,%eax
120a89: 85 c0 test %eax,%eax
120a8b: 74 04 je 120a91 <realloc+0x9d> <== ALWAYS TAKEN
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
120a8d: 31 db xor %ebx,%ebx
120a8f: eb b6 jmp 120a47 <realloc+0x53>
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
120a91: a1 94 94 12 00 mov 0x129494,%eax
120a96: 85 c0 test %eax,%eax
120a98: 0f 84 74 ff ff ff je 120a12 <realloc+0x1e> <== ALWAYS TAKEN
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
120a9e: 31 db xor %ebx,%ebx
120aa0: eb a5 jmp 120a47 <realloc+0x53> <== NOT EXECUTED
120aa2: 66 90 xchg %ax,%ax <== NOT EXECUTED
* 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 );
120aa4: 83 ec 0c sub $0xc,%esp
120aa7: 56 push %esi
120aa8: e8 0f 7e fe ff call 1088bc <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
120aad: ff 0d a4 92 12 00 decl 0x1292a4
if ( !new_area ) {
120ab3: 83 c4 10 add $0x10,%esp
120ab6: 85 c0 test %eax,%eax
120ab8: 74 d3 je 120a8d <realloc+0x99>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
120aba: 8b 55 e4 mov -0x1c(%ebp),%edx
120abd: 89 f1 mov %esi,%ecx
120abf: 39 d6 cmp %edx,%esi
120ac1: 76 02 jbe 120ac5 <realloc+0xd1> <== NEVER TAKEN
120ac3: 89 d1 mov %edx,%ecx
120ac5: 89 c7 mov %eax,%edi
120ac7: 89 de mov %ebx,%esi
120ac9: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
free( ptr );
120acb: 83 ec 0c sub $0xc,%esp
120ace: 53 push %ebx
120acf: 89 45 d4 mov %eax,-0x2c(%ebp)
120ad2: e8 0d 7b fe ff call 1085e4 <free>
120ad7: 8b 45 d4 mov -0x2c(%ebp),%eax
120ada: 89 c3 mov %eax,%ebx
return new_area;
120adc: 83 c4 10 add $0x10,%esp
120adf: e9 63 ff ff ff jmp 120a47 <realloc+0x53>
0012fc1c <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
12fc1c: 55 push %ebp
12fc1d: 89 e5 mov %esp,%ebp
12fc1f: 57 push %edi
12fc20: 56 push %esi
12fc21: 53 push %ebx
12fc22: 83 ec 58 sub $0x58,%esp
12fc25: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
12fc28: 53 push %ebx
12fc29: e8 ae ea fd ff call 10e6dc <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
12fc2e: 83 c4 10 add $0x10,%esp
12fc31: 85 c0 test %eax,%eax
12fc33: 0f 85 2f 01 00 00 jne 12fd68 <rmdir+0x14c>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
12fc39: 50 push %eax
12fc3a: 8d 45 d0 lea -0x30(%ebp),%eax
12fc3d: 89 45 b4 mov %eax,-0x4c(%ebp)
12fc40: 50 push %eax
12fc41: 8d 45 e4 lea -0x1c(%ebp),%eax
12fc44: 50 push %eax
12fc45: 53 push %ebx
12fc46: e8 1d 03 fe ff call 10ff68 <rtems_filesystem_get_start_loc>
12fc4b: 31 d2 xor %edx,%edx
12fc4d: c6 45 b3 00 movb $0x0,-0x4d(%ebp)
12fc51: 83 c4 10 add $0x10,%esp
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
12fc54: 8d 7d bc lea -0x44(%ebp),%edi
12fc57: b9 05 00 00 00 mov $0x5,%ecx
12fc5c: 8b 75 b4 mov -0x4c(%ebp),%esi
12fc5f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = pathname + parentpathlen;
12fc61: 01 d3 add %edx,%ebx
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
12fc63: be ff ff ff ff mov $0xffffffff,%esi
12fc68: 89 f1 mov %esi,%ecx
12fc6a: 89 df mov %ebx,%edi
12fc6c: 31 c0 xor %eax,%eax
12fc6e: f2 ae repnz scas %es:(%edi),%al
12fc70: f7 d1 not %ecx
12fc72: 49 dec %ecx
12fc73: 83 ec 08 sub $0x8,%esp
12fc76: 51 push %ecx
12fc77: 53 push %ebx
12fc78: e8 0f ea fd ff call 10e68c <rtems_filesystem_prefix_separators>
12fc7d: 01 c3 add %eax,%ebx
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
12fc7f: 89 f1 mov %esi,%ecx
12fc81: 89 df mov %ebx,%edi
12fc83: 31 c0 xor %eax,%eax
12fc85: f2 ae repnz scas %es:(%edi),%al
12fc87: f7 d1 not %ecx
12fc89: 49 dec %ecx
12fc8a: c7 04 24 00 00 00 00 movl $0x0,(%esp)
12fc91: 8d 75 bc lea -0x44(%ebp),%esi
12fc94: 56 push %esi
12fc95: 6a 00 push $0x0
12fc97: 51 push %ecx
12fc98: 53 push %ebx
12fc99: e8 86 ea fd ff call 10e724 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
12fc9e: 83 c4 20 add $0x20,%esp
12fca1: 85 c0 test %eax,%eax
12fca3: 0f 85 fb 00 00 00 jne 12fda4 <rmdir+0x188>
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
12fca9: 8b 55 c8 mov -0x38(%ebp),%edx
12fcac: 8b 42 10 mov 0x10(%edx),%eax
12fcaf: 85 c0 test %eax,%eax
12fcb1: 0f 84 61 01 00 00 je 12fe18 <rmdir+0x1fc> <== NEVER TAKEN
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 ){
12fcb7: 83 ec 0c sub $0xc,%esp
12fcba: 56 push %esi
12fcbb: ff d0 call *%eax
12fcbd: 83 c4 10 add $0x10,%esp
12fcc0: 48 dec %eax
12fcc1: 75 5d jne 12fd20 <rmdir+0x104>
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
12fcc3: 8b 45 c4 mov -0x3c(%ebp),%eax
12fcc6: 8b 40 34 mov 0x34(%eax),%eax
12fcc9: 85 c0 test %eax,%eax
12fccb: 0f 84 fb 00 00 00 je 12fdcc <rmdir+0x1b0> <== NEVER TAKEN
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
12fcd1: 83 ec 08 sub $0x8,%esp
12fcd4: 56 push %esi
12fcd5: ff 75 b4 pushl -0x4c(%ebp)
12fcd8: ff d0 call *%eax
12fcda: 89 c3 mov %eax,%ebx
rtems_filesystem_freenode( &loc );
12fcdc: 8b 45 c8 mov -0x38(%ebp),%eax
12fcdf: 83 c4 10 add $0x10,%esp
12fce2: 85 c0 test %eax,%eax
12fce4: 74 10 je 12fcf6 <rmdir+0xda> <== NEVER TAKEN
12fce6: 8b 40 1c mov 0x1c(%eax),%eax
12fce9: 85 c0 test %eax,%eax
12fceb: 74 09 je 12fcf6 <rmdir+0xda> <== NEVER TAKEN
12fced: 83 ec 0c sub $0xc,%esp
12fcf0: 56 push %esi
12fcf1: ff d0 call *%eax
12fcf3: 83 c4 10 add $0x10,%esp
if ( free_parentloc )
12fcf6: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
12fcfa: 74 19 je 12fd15 <rmdir+0xf9>
rtems_filesystem_freenode( &parentloc );
12fcfc: 8b 45 dc mov -0x24(%ebp),%eax
12fcff: 85 c0 test %eax,%eax
12fd01: 74 12 je 12fd15 <rmdir+0xf9> <== NEVER TAKEN
12fd03: 8b 40 1c mov 0x1c(%eax),%eax
12fd06: 85 c0 test %eax,%eax
12fd08: 74 0b je 12fd15 <rmdir+0xf9> <== NEVER TAKEN
12fd0a: 83 ec 0c sub $0xc,%esp
12fd0d: ff 75 b4 pushl -0x4c(%ebp)
12fd10: ff d0 call *%eax
12fd12: 83 c4 10 add $0x10,%esp
return result;
}
12fd15: 89 d8 mov %ebx,%eax
12fd17: 8d 65 f4 lea -0xc(%ebp),%esp
12fd1a: 5b pop %ebx
12fd1b: 5e pop %esi
12fd1c: 5f pop %edi
12fd1d: c9 leave
12fd1e: c3 ret
12fd1f: 90 nop
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
12fd20: 8b 45 c8 mov -0x38(%ebp),%eax
12fd23: 85 c0 test %eax,%eax
12fd25: 74 10 je 12fd37 <rmdir+0x11b> <== NEVER TAKEN
12fd27: 8b 40 1c mov 0x1c(%eax),%eax
12fd2a: 85 c0 test %eax,%eax
12fd2c: 74 09 je 12fd37 <rmdir+0x11b> <== NEVER TAKEN
12fd2e: 83 ec 0c sub $0xc,%esp
12fd31: 56 push %esi
12fd32: ff d0 call *%eax
12fd34: 83 c4 10 add $0x10,%esp
if ( free_parentloc )
12fd37: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
12fd3b: 74 19 je 12fd56 <rmdir+0x13a> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
12fd3d: 8b 45 dc mov -0x24(%ebp),%eax
12fd40: 85 c0 test %eax,%eax
12fd42: 74 12 je 12fd56 <rmdir+0x13a> <== NEVER TAKEN
12fd44: 8b 40 1c mov 0x1c(%eax),%eax
12fd47: 85 c0 test %eax,%eax
12fd49: 74 0b je 12fd56 <rmdir+0x13a> <== NEVER TAKEN
12fd4b: 83 ec 0c sub $0xc,%esp
12fd4e: ff 75 b4 pushl -0x4c(%ebp)
12fd51: ff d0 call *%eax
12fd53: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( ENOTDIR );
12fd56: e8 25 7e 01 00 call 147b80 <__errno>
12fd5b: c7 00 14 00 00 00 movl $0x14,(%eax)
12fd61: bb ff ff ff ff mov $0xffffffff,%ebx
12fd66: eb ad jmp 12fd15 <rmdir+0xf9>
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
12fd68: 89 c2 mov %eax,%edx
12fd6a: 83 ec 0c sub $0xc,%esp
12fd6d: 6a 00 push $0x0
12fd6f: 8d 45 d0 lea -0x30(%ebp),%eax
12fd72: 89 45 b4 mov %eax,-0x4c(%ebp)
12fd75: 50 push %eax
12fd76: 6a 02 push $0x2
12fd78: 52 push %edx
12fd79: 53 push %ebx
12fd7a: 89 55 ac mov %edx,-0x54(%ebp)
12fd7d: e8 76 ea fd ff call 10e7f8 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
12fd82: 83 c4 20 add $0x20,%esp
12fd85: 85 c0 test %eax,%eax
12fd87: 8b 55 ac mov -0x54(%ebp),%edx
12fd8a: 75 0c jne 12fd98 <rmdir+0x17c> <== NEVER TAKEN
12fd8c: c6 45 b3 01 movb $0x1,-0x4d(%ebp)
12fd90: e9 bf fe ff ff jmp 12fc54 <rmdir+0x38>
12fd95: 8d 76 00 lea 0x0(%esi),%esi
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
12fd98: bb ff ff ff ff mov $0xffffffff,%ebx
12fd9d: e9 73 ff ff ff jmp 12fd15 <rmdir+0xf9>
12fda2: 66 90 xchg %ax,%ax
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
12fda4: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
12fda8: 74 ee je 12fd98 <rmdir+0x17c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
12fdaa: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
12fdad: 85 c0 test %eax,%eax <== NOT EXECUTED
12fdaf: 74 e7 je 12fd98 <rmdir+0x17c> <== NOT EXECUTED
12fdb1: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
12fdb4: 85 c0 test %eax,%eax <== NOT EXECUTED
12fdb6: 74 e0 je 12fd98 <rmdir+0x17c> <== NOT EXECUTED
12fdb8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12fdbb: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
12fdbe: ff d0 call *%eax <== NOT EXECUTED
12fdc0: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
12fdc3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12fdc6: e9 4a ff ff ff jmp 12fd15 <rmdir+0xf9> <== NOT EXECUTED
12fdcb: 90 nop <== NOT EXECUTED
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
12fdcc: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
12fdcf: 85 c0 test %eax,%eax <== NOT EXECUTED
12fdd1: 74 10 je 12fde3 <rmdir+0x1c7> <== NOT EXECUTED
12fdd3: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
12fdd6: 85 c0 test %eax,%eax <== NOT EXECUTED
12fdd8: 74 09 je 12fde3 <rmdir+0x1c7> <== NOT EXECUTED
12fdda: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12fddd: 56 push %esi <== NOT EXECUTED
12fdde: ff d0 call *%eax <== NOT EXECUTED
12fde0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( free_parentloc )
12fde3: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) <== NOT EXECUTED
12fde7: 74 19 je 12fe02 <rmdir+0x1e6> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
12fde9: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
12fdec: 85 c0 test %eax,%eax <== NOT EXECUTED
12fdee: 74 12 je 12fe02 <rmdir+0x1e6> <== NOT EXECUTED
12fdf0: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
12fdf3: 85 c0 test %eax,%eax <== NOT EXECUTED
12fdf5: 74 0b je 12fe02 <rmdir+0x1e6> <== NOT EXECUTED
12fdf7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12fdfa: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
12fdfd: ff d0 call *%eax <== NOT EXECUTED
12fdff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
12fe02: e8 79 7d 01 00 call 147b80 <__errno> <== NOT EXECUTED
12fe07: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
12fe0d: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
12fe12: e9 fe fe ff ff jmp 12fd15 <rmdir+0xf9> <== NOT EXECUTED
12fe17: 90 nop <== NOT EXECUTED
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
12fe18: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
12fe1b: 85 c0 test %eax,%eax <== NOT EXECUTED
12fe1d: 75 bb jne 12fdda <rmdir+0x1be> <== NOT EXECUTED
12fe1f: eb c2 jmp 12fde3 <rmdir+0x1c7> <== NOT EXECUTED
00114088 <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
114088: 55 push %ebp
114089: 89 e5 mov %esp,%ebp
11408b: 57 push %edi
11408c: 56 push %esi
11408d: 53 push %ebx
11408e: 83 ec 1c sub $0x1c,%esp
114091: 8b 7d 0c mov 0xc(%ebp),%edi
114094: 31 f6 xor %esi,%esi
114096: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
11409d: bb 01 00 00 00 mov $0x1,%ebx
1140a2: eb 08 jmp 1140ac <rtems_assoc_local_by_remote_bitfield+0x24>
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
1140a4: d1 e3 shl %ebx
1140a6: 46 inc %esi
1140a7: 83 fe 20 cmp $0x20,%esi
1140aa: 74 1e je 1140ca <rtems_assoc_local_by_remote_bitfield+0x42>
if (b & remote_value)
1140ac: 85 fb test %edi,%ebx
1140ae: 74 f4 je 1140a4 <rtems_assoc_local_by_remote_bitfield+0x1c>
local_value |= rtems_assoc_local_by_remote(ap, b);
1140b0: 83 ec 08 sub $0x8,%esp
1140b3: 53 push %ebx
1140b4: ff 75 08 pushl 0x8(%ebp)
1140b7: e8 1c 00 00 00 call 1140d8 <rtems_assoc_local_by_remote>
1140bc: 09 45 e4 or %eax,-0x1c(%ebp)
1140bf: 83 c4 10 add $0x10,%esp
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
1140c2: d1 e3 shl %ebx
1140c4: 46 inc %esi
1140c5: 83 fe 20 cmp $0x20,%esi
1140c8: 75 e2 jne 1140ac <rtems_assoc_local_by_remote_bitfield+0x24><== ALWAYS TAKEN
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
1140ca: 8b 45 e4 mov -0x1c(%ebp),%eax
1140cd: 8d 65 f4 lea -0xc(%ebp),%esp
1140d0: 5b pop %ebx
1140d1: 5e pop %esi
1140d2: 5f pop %edi
1140d3: c9 leave
1140d4: c3 ret
00119560 <rtems_assoc_name_bad>:
uint32_t bad_value
#else
uint32_t bad_value __attribute((unused))
#endif
)
{
119560: 55 push %ebp <== NOT EXECUTED
119561: 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;
}
119563: b8 00 da 12 00 mov $0x12da00,%eax <== NOT EXECUTED
119568: c9 leave <== NOT EXECUTED
119569: c3 ret <== NOT EXECUTED
00115f28 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
115f28: 55 push %ebp
115f29: 89 e5 mov %esp,%ebp
115f2b: 53 push %ebx
115f2c: 83 ec 0c sub $0xc,%esp
115f2f: 8b 5d 0c mov 0xc(%ebp),%ebx
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
115f32: 53 push %ebx
115f33: ff 75 08 pushl 0x8(%ebp)
115f36: e8 1d 00 00 00 call 115f58 <rtems_assoc_ptr_by_local>
if (nap)
115f3b: 83 c4 10 add $0x10,%esp
115f3e: 85 c0 test %eax,%eax
115f40: 74 0a je 115f4c <rtems_assoc_name_by_local+0x24><== NEVER TAKEN
return nap->name;
115f42: 8b 00 mov (%eax),%eax
return rtems_assoc_name_bad(local_value);
}
115f44: 8b 5d fc mov -0x4(%ebp),%ebx
115f47: c9 leave
115f48: c3 ret
115f49: 8d 76 00 lea 0x0(%esi),%esi
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
115f4c: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
}
115f4f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
115f52: 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);
115f53: e9 08 36 00 00 jmp 119560 <rtems_assoc_name_bad> <== NOT EXECUTED
00115094 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
115094: 55 push %ebp
115095: 89 e5 mov %esp,%ebp
115097: 57 push %edi
115098: 56 push %esi
115099: 53 push %ebx
11509a: 8b 45 08 mov 0x8(%ebp),%eax
11509d: 8b 55 0c mov 0xc(%ebp),%edx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
1150a0: 8b 30 mov (%eax),%esi
1150a2: 85 f6 test %esi,%esi
1150a4: 74 3e je 1150e4 <rtems_assoc_ptr_by_local+0x50><== NEVER TAKEN
1150a6: bf c6 35 12 00 mov $0x1235c6,%edi
1150ab: b9 0a 00 00 00 mov $0xa,%ecx
1150b0: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
1150b2: 74 18 je 1150cc <rtems_assoc_ptr_by_local+0x38><== NEVER TAKEN
1150b4: 31 c9 xor %ecx,%ecx
1150b6: eb 09 jmp 1150c1 <rtems_assoc_ptr_by_local+0x2d>
default_ap = ap++;
for ( ; ap->name; ap++)
1150b8: 83 c0 0c add $0xc,%eax
1150bb: 8b 18 mov (%eax),%ebx
1150bd: 85 db test %ebx,%ebx
1150bf: 74 1b je 1150dc <rtems_assoc_ptr_by_local+0x48>
if (ap->local_value == local_value)
1150c1: 39 50 04 cmp %edx,0x4(%eax)
1150c4: 75 f2 jne 1150b8 <rtems_assoc_ptr_by_local+0x24>
return ap;
return default_ap;
}
1150c6: 5b pop %ebx
1150c7: 5e pop %esi
1150c8: 5f pop %edi
1150c9: c9 leave
1150ca: c3 ret
1150cb: 90 nop
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
1150cc: 8d 58 0c lea 0xc(%eax),%ebx <== NOT EXECUTED
for ( ; ap->name; ap++)
1150cf: 8b 70 0c mov 0xc(%eax),%esi <== NOT EXECUTED
1150d2: 85 f6 test %esi,%esi <== NOT EXECUTED
1150d4: 74 f0 je 1150c6 <rtems_assoc_ptr_by_local+0x32><== NOT EXECUTED
1150d6: 89 c1 mov %eax,%ecx <== NOT EXECUTED
1150d8: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1150da: eb e5 jmp 1150c1 <rtems_assoc_ptr_by_local+0x2d><== NOT EXECUTED
1150dc: 89 c8 mov %ecx,%eax
if (ap->local_value == local_value)
return ap;
return default_ap;
}
1150de: 5b pop %ebx
1150df: 5e pop %esi
1150e0: 5f pop %edi
1150e1: c9 leave
1150e2: c3 ret
1150e3: 90 nop
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
1150e4: 31 c0 xor %eax,%eax
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
return ap;
return default_ap;
}
1150e6: 5b pop %ebx <== NOT EXECUTED
1150e7: 5e pop %esi <== NOT EXECUTED
1150e8: 5f pop %edi <== NOT EXECUTED
1150e9: c9 leave <== NOT EXECUTED
1150ea: c3 ret <== NOT EXECUTED
001140f8 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
1140f8: 55 push %ebp
1140f9: 89 e5 mov %esp,%ebp
1140fb: 57 push %edi
1140fc: 56 push %esi
1140fd: 53 push %ebx
1140fe: 8b 45 08 mov 0x8(%ebp),%eax
114101: 8b 55 0c mov 0xc(%ebp),%edx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
114104: 8b 30 mov (%eax),%esi
114106: 85 f6 test %esi,%esi
114108: 74 3e je 114148 <rtems_assoc_ptr_by_remote+0x50><== NEVER TAKEN
11410a: bf c6 35 12 00 mov $0x1235c6,%edi
11410f: b9 0a 00 00 00 mov $0xa,%ecx
114114: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
114116: 74 18 je 114130 <rtems_assoc_ptr_by_remote+0x38><== NEVER TAKEN
114118: 31 c9 xor %ecx,%ecx
11411a: eb 09 jmp 114125 <rtems_assoc_ptr_by_remote+0x2d>
default_ap = ap++;
for ( ; ap->name; ap++)
11411c: 83 c0 0c add $0xc,%eax
11411f: 8b 18 mov (%eax),%ebx
114121: 85 db test %ebx,%ebx
114123: 74 1b je 114140 <rtems_assoc_ptr_by_remote+0x48>
if (ap->remote_value == remote_value)
114125: 39 50 08 cmp %edx,0x8(%eax)
114128: 75 f2 jne 11411c <rtems_assoc_ptr_by_remote+0x24>
return ap;
return default_ap;
}
11412a: 5b pop %ebx
11412b: 5e pop %esi
11412c: 5f pop %edi
11412d: c9 leave
11412e: c3 ret
11412f: 90 nop
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
114130: 8d 58 0c lea 0xc(%eax),%ebx <== NOT EXECUTED
for ( ; ap->name; ap++)
114133: 8b 70 0c mov 0xc(%eax),%esi <== NOT EXECUTED
114136: 85 f6 test %esi,%esi <== NOT EXECUTED
114138: 74 f0 je 11412a <rtems_assoc_ptr_by_remote+0x32><== NOT EXECUTED
11413a: 89 c1 mov %eax,%ecx <== NOT EXECUTED
11413c: 89 d8 mov %ebx,%eax <== NOT EXECUTED
11413e: eb e5 jmp 114125 <rtems_assoc_ptr_by_remote+0x2d><== NOT EXECUTED
114140: 89 c8 mov %ecx,%eax
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
114142: 5b pop %ebx
114143: 5e pop %esi
114144: 5f pop %edi
114145: c9 leave
114146: c3 ret
114147: 90 nop
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
114148: 31 c0 xor %eax,%eax
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
11414a: 5b pop %ebx <== NOT EXECUTED
11414b: 5e pop %esi <== NOT EXECUTED
11414c: 5f pop %edi <== NOT EXECUTED
11414d: c9 leave <== NOT EXECUTED
11414e: c3 ret <== NOT EXECUTED
00115028 <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
115028: 55 push %ebp <== NOT EXECUTED
115029: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11502b: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
11502e: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
115031: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
115034: e8 5b 00 00 00 call 115094 <rtems_assoc_ptr_by_local><== NOT EXECUTED
if (nap)
115039: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11503c: 85 c0 test %eax,%eax <== NOT EXECUTED
11503e: 74 03 je 115043 <rtems_assoc_remote_by_local+0x1b><== NOT EXECUTED
return nap->remote_value;
115040: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
return 0;
}
115043: c9 leave <== NOT EXECUTED
115044: c3 ret <== NOT EXECUTED
00111a48 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
111a48: 55 push %ebp
111a49: 89 e5 mov %esp,%ebp
111a4b: 57 push %edi
111a4c: 56 push %esi
111a4d: 53 push %ebx
111a4e: 83 ec 2c sub $0x2c,%esp
111a51: 8b 5d 08 mov 0x8(%ebp),%ebx
111a54: 8b 7d 0c mov 0xc(%ebp),%edi
111a57: 8b 45 10 mov 0x10(%ebp),%eax
111a5a: 8b 75 14 mov 0x14(%ebp),%esi
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
111a5d: 85 db test %ebx,%ebx
111a5f: 0f 84 87 00 00 00 je 111aec <rtems_barrier_create+0xa4>
return RTEMS_INVALID_NAME;
if ( !id )
111a65: 85 f6 test %esi,%esi
111a67: 0f 84 bb 00 00 00 je 111b28 <rtems_barrier_create+0xe0>
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
111a6d: f7 c7 10 00 00 00 test $0x10,%edi
111a73: 0f 84 83 00 00 00 je 111afc <rtems_barrier_create+0xb4>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
111a79: 85 c0 test %eax,%eax
111a7b: 0f 84 87 00 00 00 je 111b08 <rtems_barrier_create+0xc0>
if ( !id )
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
111a81: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
111a88: 89 45 e4 mov %eax,-0x1c(%ebp)
111a8b: a1 f8 93 12 00 mov 0x1293f8,%eax
111a90: 40 inc %eax
111a91: a3 f8 93 12 00 mov %eax,0x1293f8
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void )
{
return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information );
111a96: 83 ec 0c sub $0xc,%esp
111a99: 68 c0 9d 12 00 push $0x129dc0
111a9e: e8 a5 b4 ff ff call 10cf48 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
111aa3: 83 c4 10 add $0x10,%esp
111aa6: 85 c0 test %eax,%eax
111aa8: 74 6a je 111b14 <rtems_barrier_create+0xcc>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
111aaa: 89 78 10 mov %edi,0x10(%eax)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
111aad: 83 ec 08 sub $0x8,%esp
111ab0: 8d 55 e0 lea -0x20(%ebp),%edx
111ab3: 52 push %edx
111ab4: 8d 50 14 lea 0x14(%eax),%edx
111ab7: 52 push %edx
111ab8: 89 45 d4 mov %eax,-0x2c(%ebp)
111abb: e8 24 05 00 00 call 111fe4 <_CORE_barrier_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
111ac0: 8b 45 d4 mov -0x2c(%ebp),%eax
111ac3: 8b 50 08 mov 0x8(%eax),%edx
111ac6: 0f b7 fa movzwl %dx,%edi
111ac9: 8b 0d dc 9d 12 00 mov 0x129ddc,%ecx
111acf: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
111ad2: 89 58 0c mov %ebx,0xc(%eax)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
111ad5: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
111ad7: e8 90 c1 ff ff call 10dc6c <_Thread_Enable_dispatch>
111adc: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
111ade: 83 c4 10 add $0x10,%esp
}
111ae1: 8d 65 f4 lea -0xc(%ebp),%esp
111ae4: 5b pop %ebx
111ae5: 5e pop %esi
111ae6: 5f pop %edi
111ae7: c9 leave
111ae8: c3 ret
111ae9: 8d 76 00 lea 0x0(%esi),%esi
)
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
111aec: b8 03 00 00 00 mov $0x3,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
111af1: 8d 65 f4 lea -0xc(%ebp),%esp
111af4: 5b pop %ebx
111af5: 5e pop %esi
111af6: 5f pop %edi
111af7: c9 leave
111af8: c3 ret
111af9: 8d 76 00 lea 0x0(%esi),%esi
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
111afc: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
111b03: eb 83 jmp 111a88 <rtems_barrier_create+0x40>
111b05: 8d 76 00 lea 0x0(%esi),%esi
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
111b08: b0 0a mov $0xa,%al
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
111b0a: 8d 65 f4 lea -0xc(%ebp),%esp
111b0d: 5b pop %ebx
111b0e: 5e pop %esi
111b0f: 5f pop %edi
111b10: c9 leave
111b11: c3 ret
111b12: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
111b14: e8 53 c1 ff ff call 10dc6c <_Thread_Enable_dispatch>
111b19: b8 05 00 00 00 mov $0x5,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
111b1e: 8d 65 f4 lea -0xc(%ebp),%esp
111b21: 5b pop %ebx
111b22: 5e pop %esi
111b23: 5f pop %edi
111b24: c9 leave
111b25: c3 ret
111b26: 66 90 xchg %ax,%ax
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
111b28: b8 09 00 00 00 mov $0x9,%eax
111b2d: eb b2 jmp 111ae1 <rtems_barrier_create+0x99>
00110c04 <rtems_bdbuf_add_to_modified_list_after_access>:
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
110c04: 55 push %ebp
110c05: 89 e5 mov %esp,%ebp
110c07: 53 push %ebx
110c08: 83 ec 04 sub $0x4,%esp
110c0b: 89 c3 mov %eax,%ebx
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dev)
110c0d: a0 10 c1 12 00 mov 0x12c110,%al
110c12: 84 c0 test %al,%al
110c14: 74 17 je 110c2d <rtems_bdbuf_add_to_modified_list_after_access+0x29><== ALWAYS TAKEN
110c16: a1 18 c1 12 00 mov 0x12c118,%eax <== NOT EXECUTED
110c1b: 8b 15 1c c1 12 00 mov 0x12c11c,%edx <== NOT EXECUTED
110c21: 8b 4b 18 mov 0x18(%ebx),%ecx <== NOT EXECUTED
110c24: 31 d1 xor %edx,%ecx <== NOT EXECUTED
110c26: 33 43 14 xor 0x14(%ebx),%eax <== NOT EXECUTED
110c29: 09 c1 or %eax,%ecx <== NOT EXECUTED
110c2b: 74 67 je 110c94 <rtems_bdbuf_add_to_modified_list_after_access+0x90><== NOT EXECUTED
* nothing being written? We have tended to think we should hold changes for
* only a specific period of time even if still changing and get onto disk
* and letting the file system try and recover this position if it can.
*/
if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
110c2d: 8b 43 24 mov 0x24(%ebx),%eax
* difficult question. Is a snapshot of a block that is changing better than
* nothing being written? We have tended to think we should hold changes for
* only a specific period of time even if still changing and get onto disk
* and letting the file system try and recover this position if it can.
*/
if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
110c30: 83 f8 03 cmp $0x3,%eax
110c33: 74 43 je 110c78 <rtems_bdbuf_add_to_modified_list_after_access+0x74>
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
110c35: 8b 43 24 mov 0x24(%ebx),%eax
* difficult question. Is a snapshot of a block that is changing better than
* nothing being written? We have tended to think we should hold changes for
* only a specific period of time even if still changing and get onto disk
* and letting the file system try and recover this position if it can.
*/
if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
110c38: 83 f8 05 cmp $0x5,%eax
110c3b: 74 3b je 110c78 <rtems_bdbuf_add_to_modified_list_after_access+0x74>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
110c3d: c7 43 24 07 00 00 00 movl $0x7,0x24(%ebx)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
110c44: 83 ec 08 sub $0x8,%esp
110c47: 53 push %ebx
110c48: 68 30 c1 12 00 push $0x12c130
110c4d: e8 82 cc ff ff call 10d8d4 <_Chain_Append>
bd->hold_timer = bdbuf_config.swap_block_hold;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
110c52: 8b 43 28 mov 0x28(%ebx),%eax
110c55: 83 c4 10 add $0x10,%esp
110c58: 85 c0 test %eax,%eax
110c5a: 75 28 jne 110c84 <rtems_bdbuf_add_to_modified_list_after_access+0x80>
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
110c5c: a1 58 c1 12 00 mov 0x12c158,%eax
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else if (rtems_bdbuf_has_buffer_waiters ())
110c61: 85 c0 test %eax,%eax
110c63: 75 07 jne 110c6c <rtems_bdbuf_add_to_modified_list_after_access+0x68>
rtems_bdbuf_wake_swapper ();
}
110c65: 8b 5d fc mov -0x4(%ebp),%ebx
110c68: c9 leave
110c69: c3 ret
110c6a: 66 90 xchg %ax,%ax
110c6c: 8b 5d fc mov -0x4(%ebp),%ebx
110c6f: c9 leave
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
110c70: e9 63 ff ff ff jmp 110bd8 <rtems_bdbuf_wake_swapper>
110c75: 8d 76 00 lea 0x0(%esi),%esi
* only a specific period of time even if still changing and get onto disk
* and letting the file system try and recover this position if it can.
*/
if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
bd->hold_timer = bdbuf_config.swap_block_hold;
110c78: a1 50 4a 12 00 mov 0x124a50,%eax
110c7d: 89 43 30 mov %eax,0x30(%ebx)
110c80: eb bb jmp 110c3d <rtems_bdbuf_add_to_modified_list_after_access+0x39>
110c82: 66 90 xchg %ax,%ax
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
110c84: b8 48 c1 12 00 mov $0x12c148,%eax
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
}
110c89: 8b 5d fc mov -0x4(%ebp),%ebx
110c8c: c9 leave
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
110c8d: e9 6a fc ff ff jmp 1108fc <rtems_bdbuf_wake>
110c92: 66 90 xchg %ax,%ax
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dev)
{
rtems_bdbuf_unlock_cache ();
110c94: e8 df fd ff ff call 110a78 <rtems_bdbuf_unlock_cache><== NOT EXECUTED
* Lock the cache's sync. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_sync (void)
{
rtems_bdbuf_lock (bdbuf_cache.sync_lock, RTEMS_BLKDEV_FATAL_BDBUF_SYNC_LOCK);
110c99: ba 0b 00 00 42 mov $0x4200000b,%edx <== NOT EXECUTED
110c9e: a1 0c c1 12 00 mov 0x12c10c,%eax <== NOT EXECUTED
110ca3: e8 18 fc ff ff call 1108c0 <rtems_bdbuf_lock> <== NOT EXECUTED
/*
* Wait for the sync lock.
*/
rtems_bdbuf_lock_sync ();
rtems_bdbuf_unlock_sync ();
110ca8: e8 f3 fd ff ff call 110aa0 <rtems_bdbuf_unlock_sync><== NOT EXECUTED
rtems_bdbuf_lock_cache ();
110cad: e8 36 fc ff ff call 1108e8 <rtems_bdbuf_lock_cache><== NOT EXECUTED
110cb2: e9 76 ff ff ff jmp 110c2d <rtems_bdbuf_add_to_modified_list_after_access+0x29><== NOT EXECUTED
00110e14 <rtems_bdbuf_anonymous_wait>:
* The function assumes the cache is locked on entry and it will be locked on
* exit.
*/
static void
rtems_bdbuf_anonymous_wait (rtems_bdbuf_waiters *waiters)
{
110e14: 55 push %ebp
110e15: 89 e5 mov %esp,%ebp
110e17: 56 push %esi
110e18: 53 push %ebx
110e19: 89 c3 mov %eax,%ebx
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
110e1b: 8b 00 mov (%eax),%eax
110e1d: 40 inc %eax
110e1e: 89 03 mov %eax,(%ebx)
* blocking or just hits that window, and before this task has blocked on the
* semaphore. If the preempting task flushes the queue this task will not see
* the flush and may block for ever or until another transaction flushes this
* semaphore.
*/
prev_mode = rtems_bdbuf_disable_preemption ();
110e20: e8 83 ff ff ff call 110da8 <rtems_bdbuf_disable_preemption>
110e25: 89 c6 mov %eax,%esi
/*
* Unlock the cache, wait, and lock the cache when we return.
*/
rtems_bdbuf_unlock_cache ();
110e27: e8 4c fc ff ff call 110a78 <rtems_bdbuf_unlock_cache>
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
110e2c: 50 push %eax
110e2d: 6a 00 push $0x0
110e2f: 6a 00 push $0x0
110e31: ff 73 04 pushl 0x4(%ebx)
110e34: e8 4b c0 ff ff call 10ce84 <rtems_semaphore_obtain>
if (sc == RTEMS_TIMEOUT)
110e39: 83 c4 10 add $0x10,%esp
110e3c: 83 f8 06 cmp $0x6,%eax
110e3f: 74 1d je 110e5e <rtems_bdbuf_anonymous_wait+0x4a><== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
if (sc != RTEMS_UNSATISFIED)
110e41: 83 f8 0d cmp $0xd,%eax
110e44: 75 25 jne 110e6b <rtems_bdbuf_anonymous_wait+0x57><== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
rtems_bdbuf_lock_cache ();
110e46: e8 9d fa ff ff call 1108e8 <rtems_bdbuf_lock_cache>
rtems_bdbuf_restore_preemption (prev_mode);
110e4b: 89 f0 mov %esi,%eax
110e4d: e8 92 ff ff ff call 110de4 <rtems_bdbuf_restore_preemption>
--waiters->count;
110e52: 8b 03 mov (%ebx),%eax
110e54: 48 dec %eax
110e55: 89 03 mov %eax,(%ebx)
}
110e57: 8d 65 f8 lea -0x8(%ebp),%esp
110e5a: 5b pop %ebx
110e5b: 5e pop %esi
110e5c: c9 leave
110e5d: c3 ret
rtems_bdbuf_unlock_cache ();
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
if (sc == RTEMS_TIMEOUT)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
110e5e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110e61: 68 12 00 00 42 push $0x42000012 <== NOT EXECUTED
110e66: e8 e9 c5 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
if (sc != RTEMS_UNSATISFIED)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
110e6b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110e6e: 68 10 00 00 42 push $0x42000010 <== NOT EXECUTED
110e73: e8 dc c5 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
00110da8 <rtems_bdbuf_disable_preemption>:
--bd->group->users;
}
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
110da8: 55 push %ebp
110da9: 89 e5 mov %esp,%ebp
110dab: 83 ec 1c sub $0x1c,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
110dae: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
110db5: 8d 45 f4 lea -0xc(%ebp),%eax
110db8: 50 push %eax
110db9: 68 00 01 00 00 push $0x100
110dbe: 68 00 01 00 00 push $0x100
110dc3: e8 34 4b 00 00 call 1158fc <rtems_task_mode>
if (sc != RTEMS_SUCCESSFUL)
110dc8: 83 c4 10 add $0x10,%esp
110dcb: 85 c0 test %eax,%eax
110dcd: 75 05 jne 110dd4 <rtems_bdbuf_disable_preemption+0x2c><== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_DIS);
return prev_mode;
}
110dcf: 8b 45 f4 mov -0xc(%ebp),%eax
110dd2: c9 leave
110dd3: c3 ret
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_DIS);
110dd4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110dd7: 68 0f 00 00 42 push $0x4200000f <== NOT EXECUTED
110ddc: e8 73 c6 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
00111680 <rtems_bdbuf_discard_buffer_after_access>:
return bdbuf_cache.max_bds_per_group / bds_per_size;
}
static void
rtems_bdbuf_discard_buffer_after_access (rtems_bdbuf_buffer *bd)
{
111680: 55 push %ebp
111681: 89 e5 mov %esp,%ebp
111683: 53 push %ebx
111684: 83 ec 04 sub $0x4,%esp
111687: 89 c3 mov %eax,%ebx
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
111689: 8b 40 2c mov 0x2c(%eax),%eax
11168c: ff 48 0c decl 0xc(%eax)
static void
rtems_bdbuf_discard_buffer_after_access (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_discard_buffer (bd);
11168f: 89 d8 mov %ebx,%eax
111691: e8 ae ff ff ff call 111644 <rtems_bdbuf_discard_buffer>
if (bd->waiters)
111696: 8b 43 28 mov 0x28(%ebx),%eax
111699: 85 c0 test %eax,%eax
11169b: 75 0f jne 1116ac <rtems_bdbuf_discard_buffer_after_access+0x2c>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
11169d: b8 58 c1 12 00 mov $0x12c158,%eax
}
1116a2: 5a pop %edx
1116a3: 5b pop %ebx
1116a4: c9 leave
rtems_bdbuf_discard_buffer (bd);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
1116a5: e9 52 f2 ff ff jmp 1108fc <rtems_bdbuf_wake>
1116aa: 66 90 xchg %ax,%ax
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_discard_buffer (bd);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
1116ac: b8 48 c1 12 00 mov $0x12c148,%eax
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
}
1116b1: 59 pop %ecx
1116b2: 5b pop %ebx
1116b3: c9 leave
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_discard_buffer (bd);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
1116b4: e9 43 f2 ff ff jmp 1108fc <rtems_bdbuf_wake>
001119ac <rtems_bdbuf_execute_transfer_request>:
static rtems_status_code
rtems_bdbuf_execute_transfer_request (const rtems_disk_device *dd,
rtems_blkdev_request *req,
bool cache_locked)
{
1119ac: 55 push %ebp
1119ad: 89 e5 mov %esp,%ebp
1119af: 57 push %edi
1119b0: 56 push %esi
1119b1: 53 push %ebx
1119b2: 83 ec 2c sub $0x2c,%esp
1119b5: 89 d3 mov %edx,%ebx
1119b7: 88 4d db mov %cl,-0x25(%ebp)
int result = 0;
uint32_t transfer_index = 0;
bool wake_transfer_waiters = false;
bool wake_buffer_waiters = false;
if (cache_locked)
1119ba: 84 c9 test %cl,%cl
1119bc: 0f 85 fe 00 00 00 jne 111ac0 <rtems_bdbuf_execute_transfer_request+0x114>
rtems_bdbuf_unlock_cache ();
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
1119c2: 56 push %esi
1119c3: 53 push %ebx
1119c4: 68 01 42 18 c0 push $0xc0184201
1119c9: ff 70 08 pushl 0x8(%eax)
1119cc: ff 50 28 call *0x28(%eax)
if (result == 0)
1119cf: 83 c4 10 add $0x10,%esp
1119d2: 85 c0 test %eax,%eax
1119d4: 0f 84 ce 00 00 00 je 111aa8 <rtems_bdbuf_execute_transfer_request+0xfc>
1119da: c7 45 dc 1b 00 00 00 movl $0x1b,-0x24(%ebp)
sc = req->status;
}
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
1119e1: e8 02 ef ff ff call 1108e8 <rtems_bdbuf_lock_cache>
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
1119e6: 8b 4b 10 mov 0x10(%ebx),%ecx
1119e9: 85 c9 test %ecx,%ecx
1119eb: 74 65 je 111a52 <rtems_bdbuf_execute_transfer_request+0xa6><== NEVER TAKEN
1119ed: 89 df mov %ebx,%edi
1119ef: c6 45 e3 00 movb $0x0,-0x1d(%ebp)
1119f3: c6 45 e2 00 movb $0x0,-0x1e(%ebp)
1119f7: 31 f6 xor %esi,%esi
1119f9: 89 5d e4 mov %ebx,-0x1c(%ebp)
1119fc: 8b 5d dc mov -0x24(%ebp),%ebx
1119ff: eb 2a jmp 111a2b <rtems_bdbuf_execute_transfer_request+0x7f>
111a01: 8d 76 00 lea 0x0(%esi),%esi
{
rtems_bdbuf_buffer *bd = req->bufs [transfer_index].user;
bool waiters = bd->waiters;
if (waiters)
111a04: c6 45 e3 01 movb $0x1,-0x1d(%ebp)
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
111a08: 8b 50 2c mov 0x2c(%eax),%edx
111a0b: ff 4a 0c decl 0xc(%edx)
else
wake_buffer_waiters = true;
rtems_bdbuf_group_release (bd);
if (sc == RTEMS_SUCCESSFUL && bd->state == RTEMS_BDBUF_STATE_TRANSFER)
111a0e: 85 db test %ebx,%ebx
111a10: 75 08 jne 111a1a <rtems_bdbuf_execute_transfer_request+0x6e>
111a12: 8b 50 24 mov 0x24(%eax),%edx
111a15: 83 fa 09 cmp $0x9,%edx
111a18: 74 5e je 111a78 <rtems_bdbuf_execute_transfer_request+0xcc>
rtems_bdbuf_make_cached_and_add_to_lru_list (bd);
else
rtems_bdbuf_discard_buffer (bd);
111a1a: e8 25 fc ff ff call 111644 <rtems_bdbuf_discard_buffer>
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
111a1f: 46 inc %esi
111a20: 83 c7 10 add $0x10,%edi
111a23: 8b 45 e4 mov -0x1c(%ebp),%eax
111a26: 39 70 10 cmp %esi,0x10(%eax)
111a29: 76 11 jbe 111a3c <rtems_bdbuf_execute_transfer_request+0x90>
{
rtems_bdbuf_buffer *bd = req->bufs [transfer_index].user;
111a2b: 8b 47 24 mov 0x24(%edi),%eax
bool waiters = bd->waiters;
111a2e: 8b 50 28 mov 0x28(%eax),%edx
if (waiters)
111a31: 85 d2 test %edx,%edx
111a33: 74 cf je 111a04 <rtems_bdbuf_execute_transfer_request+0x58>
111a35: c6 45 e2 01 movb $0x1,-0x1e(%ebp)
111a39: eb cd jmp 111a08 <rtems_bdbuf_execute_transfer_request+0x5c>
111a3b: 90 nop
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("transfer", bd);
}
if (wake_transfer_waiters)
111a3c: 80 7d e2 00 cmpb $0x0,-0x1e(%ebp)
111a40: 75 5a jne 111a9c <rtems_bdbuf_execute_transfer_request+0xf0>
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
if (wake_buffer_waiters)
111a42: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
111a46: 74 0a je 111a52 <rtems_bdbuf_execute_transfer_request+0xa6>
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
111a48: b8 58 c1 12 00 mov $0x12c158,%eax
111a4d: e8 aa ee ff ff call 1108fc <rtems_bdbuf_wake>
if (!cache_locked)
111a52: 80 7d db 00 cmpb $0x0,-0x25(%ebp)
111a56: 74 3c je 111a94 <rtems_bdbuf_execute_transfer_request+0xe8>
rtems_bdbuf_unlock_cache ();
if (sc == RTEMS_SUCCESSFUL || sc == RTEMS_UNSATISFIED)
111a58: 8b 55 dc mov -0x24(%ebp),%edx
111a5b: 85 d2 test %edx,%edx
111a5d: 74 0d je 111a6c <rtems_bdbuf_execute_transfer_request+0xc0>
111a5f: 83 7d dc 0d cmpl $0xd,-0x24(%ebp)
111a63: 74 07 je 111a6c <rtems_bdbuf_execute_transfer_request+0xc0>
111a65: c7 45 dc 1b 00 00 00 movl $0x1b,-0x24(%ebp)
return sc;
else
return RTEMS_IO_ERROR;
}
111a6c: 8b 45 dc mov -0x24(%ebp),%eax
111a6f: 8d 65 f4 lea -0xc(%ebp),%esp
111a72: 5b pop %ebx
111a73: 5e pop %esi
111a74: 5f pop %edi
111a75: c9 leave
111a76: c3 ret
111a77: 90 nop
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
111a78: c7 40 24 02 00 00 00 movl $0x2,0x24(%eax)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
111a7f: 83 ec 08 sub $0x8,%esp
111a82: 50 push %eax
111a83: 68 24 c1 12 00 push $0x12c124
111a88: e8 47 be ff ff call 10d8d4 <_Chain_Append>
else
wake_buffer_waiters = true;
rtems_bdbuf_group_release (bd);
if (sc == RTEMS_SUCCESSFUL && bd->state == RTEMS_BDBUF_STATE_TRANSFER)
111a8d: 83 c4 10 add $0x10,%esp
111a90: eb 8d jmp 111a1f <rtems_bdbuf_execute_transfer_request+0x73>
111a92: 66 90 xchg %ax,%ax
if (wake_buffer_waiters)
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
if (!cache_locked)
rtems_bdbuf_unlock_cache ();
111a94: e8 df ef ff ff call 110a78 <rtems_bdbuf_unlock_cache>
111a99: eb bd jmp 111a58 <rtems_bdbuf_execute_transfer_request+0xac>
111a9b: 90 nop
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("transfer", bd);
}
if (wake_transfer_waiters)
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
111a9c: b8 50 c1 12 00 mov $0x12c150,%eax
111aa1: e8 56 ee ff ff call 1108fc <rtems_bdbuf_wake>
111aa6: eb 9a jmp 111a42 <rtems_bdbuf_execute_transfer_request+0x96>
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
if (result == 0)
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
111aa8: b8 02 00 00 00 mov $0x2,%eax
111aad: e8 2a f2 ff ff call 110cdc <rtems_bdbuf_wait_for_event>
sc = req->status;
111ab2: 8b 43 0c mov 0xc(%ebx),%eax
111ab5: 89 45 dc mov %eax,-0x24(%ebp)
111ab8: e9 24 ff ff ff jmp 1119e1 <rtems_bdbuf_execute_transfer_request+0x35>
111abd: 8d 76 00 lea 0x0(%esi),%esi
uint32_t transfer_index = 0;
bool wake_transfer_waiters = false;
bool wake_buffer_waiters = false;
if (cache_locked)
rtems_bdbuf_unlock_cache ();
111ac0: 89 45 d4 mov %eax,-0x2c(%ebp)
111ac3: e8 b0 ef ff ff call 110a78 <rtems_bdbuf_unlock_cache>
111ac8: 8b 45 d4 mov -0x2c(%ebp),%eax
111acb: e9 f2 fe ff ff jmp 1119c2 <rtems_bdbuf_execute_transfer_request+0x16>
001126e8 <rtems_bdbuf_get>:
rtems_status_code
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
1126e8: 55 push %ebp
1126e9: 89 e5 mov %esp,%ebp
1126eb: 57 push %edi
1126ec: 56 push %esi
1126ed: 53 push %ebx
1126ee: 83 ec 20 sub $0x20,%esp
1126f1: 8b 5d 08 mov 0x8(%ebp),%ebx
1126f4: 8b 75 0c mov 0xc(%ebp),%esi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
1126f7: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
1126fe: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
size_t bds_per_group = 0;
112705: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
11270c: 8d 45 dc lea -0x24(%ebp),%eax
11270f: 50 push %eax
112710: 8d 45 e0 lea -0x20(%ebp),%eax
112713: 50 push %eax
112714: 8d 45 e4 lea -0x1c(%ebp),%eax
112717: 50 push %eax
112718: 8b 4d 10 mov 0x10(%ebp),%ecx
11271b: 89 d8 mov %ebx,%eax
11271d: 89 f2 mov %esi,%edx
11271f: e8 a4 e3 ff ff call 110ac8 <rtems_bdbuf_obtain_disk>
112724: 89 c7 mov %eax,%edi
if (sc != RTEMS_SUCCESSFUL)
112726: 83 c4 10 add $0x10,%esp
112729: 85 c0 test %eax,%eax
11272b: 74 0b je 112738 <rtems_bdbuf_get+0x50> <== ALWAYS TAKEN
rtems_bdbuf_release_disk (dd);
*bd_ptr = bd;
return RTEMS_SUCCESSFUL;
}
11272d: 89 f8 mov %edi,%eax <== NOT EXECUTED
11272f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112732: 5b pop %ebx <== NOT EXECUTED
112733: 5e pop %esi <== NOT EXECUTED
112734: 5f pop %edi <== NOT EXECUTED
112735: c9 leave <== NOT EXECUTED
112736: c3 ret <== NOT EXECUTED
112737: 90 nop <== NOT EXECUTED
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
if (sc != RTEMS_SUCCESSFUL)
return sc;
rtems_bdbuf_lock_cache ();
112738: e8 ab e1 ff ff call 1108e8 <rtems_bdbuf_lock_cache>
*/
if (rtems_bdbuf_tracer)
printf ("bdbuf:get: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block, block, (unsigned) dev);
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
11273d: 83 ec 0c sub $0xc,%esp
112740: ff 75 dc pushl -0x24(%ebp)
112743: 8b 4d e0 mov -0x20(%ebp),%ecx
112746: 89 d8 mov %ebx,%eax
112748: 89 f2 mov %esi,%edx
11274a: e8 e1 fd ff ff call 112530 <rtems_bdbuf_get_buffer_for_access>
11274f: 89 c3 mov %eax,%ebx
switch (bd->state)
112751: 8b 40 24 mov 0x24(%eax),%eax
112754: 83 c4 10 add $0x10,%esp
112757: 83 f8 02 cmp $0x2,%eax
11275a: 74 40 je 11279c <rtems_bdbuf_get+0xb4>
11275c: 83 f8 07 cmp $0x7,%eax
11275f: 74 17 je 112778 <rtems_bdbuf_get+0x90>
112761: 48 dec %eax
112762: 74 44 je 1127a8 <rtems_bdbuf_get+0xc0> <== ALWAYS TAKEN
* so just gets the block to fill.
*/
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_2);
112764: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
112767: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11276a: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
11276d: 0d 1e 00 00 42 or $0x4200001e,%eax <== NOT EXECUTED
112772: 50 push %eax <== NOT EXECUTED
112773: e8 dc ac ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
112778: c7 43 24 04 00 00 00 movl $0x4,0x24(%ebx)
{
rtems_bdbuf_show_users ("get", bd);
rtems_bdbuf_show_usage ();
}
rtems_bdbuf_unlock_cache ();
11277f: e8 f4 e2 ff ff call 110a78 <rtems_bdbuf_unlock_cache>
rtems_bdbuf_release_disk (dd);
112784: 8b 45 e4 mov -0x1c(%ebp),%eax
112787: e8 28 e4 ff ff call 110bb4 <rtems_bdbuf_release_disk>
*bd_ptr = bd;
11278c: 8b 45 14 mov 0x14(%ebp),%eax
11278f: 89 18 mov %ebx,(%eax)
return RTEMS_SUCCESSFUL;
}
112791: 89 f8 mov %edi,%eax
112793: 8d 65 f4 lea -0xc(%ebp),%esp
112796: 5b pop %ebx
112797: 5e pop %esi
112798: 5f pop %edi
112799: c9 leave
11279a: c3 ret
11279b: 90 nop
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
11279c: c7 43 24 03 00 00 00 movl $0x3,0x24(%ebx)
switch (bd->state)
{
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_CACHED);
break;
1127a3: eb da jmp 11277f <rtems_bdbuf_get+0x97>
1127a5: 8d 76 00 lea 0x0(%esi),%esi
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
1127a8: c7 43 24 05 00 00 00 movl $0x5,0x24(%ebx)
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_CACHED);
break;
case RTEMS_BDBUF_STATE_EMPTY:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_EMPTY);
break;
1127af: eb ce jmp 11277f <rtems_bdbuf_get+0x97>
00112530 <rtems_bdbuf_get_buffer_for_access>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
112530: 55 push %ebp
112531: 89 e5 mov %esp,%ebp
112533: 57 push %edi
112534: 56 push %esi
112535: 53 push %ebx
112536: 83 ec 1c sub $0x1c,%esp
112539: 89 c7 mov %eax,%edi
11253b: 89 d3 mov %edx,%ebx
11253d: 89 4d e0 mov %ecx,-0x20(%ebp)
static rtems_bdbuf_buffer *
rtems_bdbuf_avl_search (rtems_bdbuf_buffer** root,
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
112540: 8b 35 20 c1 12 00 mov 0x12c120,%esi
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
112546: 85 f6 test %esi,%esi
112548: 74 35 je 11257f <rtems_bdbuf_get_buffer_for_access+0x4f>
11254a: 89 7d e4 mov %edi,-0x1c(%ebp)
11254d: eb 0f jmp 11255e <rtems_bdbuf_get_buffer_for_access+0x2e>
11254f: 90 nop
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
112550: 72 05 jb 112557 <rtems_bdbuf_get_buffer_for_access+0x27><== NEVER TAKEN
112552: 39 55 e4 cmp %edx,-0x1c(%ebp)
112555: 77 1e ja 112575 <rtems_bdbuf_get_buffer_for_access+0x45>
{
p = p->avl.right;
}
else
{
p = p->avl.left;
112557: 8b 76 08 mov 0x8(%esi),%esi
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
11255a: 85 f6 test %esi,%esi
11255c: 74 1e je 11257c <rtems_bdbuf_get_buffer_for_access+0x4c>
11255e: 8b 56 14 mov 0x14(%esi),%edx
112561: 8b 46 18 mov 0x18(%esi),%eax
112564: 89 df mov %ebx,%edi
112566: 31 c7 xor %eax,%edi
112568: 8b 4d e4 mov -0x1c(%ebp),%ecx
11256b: 31 d1 xor %edx,%ecx
11256d: 09 cf or %ecx,%edi
11256f: 74 4b je 1125bc <rtems_bdbuf_get_buffer_for_access+0x8c>
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
112571: 39 c3 cmp %eax,%ebx
112573: 76 db jbe 112550 <rtems_bdbuf_get_buffer_for_access+0x20><== ALWAYS TAKEN
{
p = p->avl.right;
112575: 8b 76 0c mov 0xc(%esi),%esi
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
112578: 85 f6 test %esi,%esi
11257a: 75 e2 jne 11255e <rtems_bdbuf_get_buffer_for_access+0x2e>
11257c: 8b 7d e4 mov -0x1c(%ebp),%edi
bd = NULL;
}
}
else
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dev, block, bds_per_group);
11257f: 83 ec 0c sub $0xc,%esp
112582: ff 75 08 pushl 0x8(%ebp)
112585: 8b 4d e0 mov -0x20(%ebp),%ecx
112588: 89 f8 mov %edi,%eax
11258a: 89 da mov %ebx,%edx
11258c: e8 d3 fb ff ff call 112164 <rtems_bdbuf_get_buffer_from_lru_list>
112591: 89 c6 mov %eax,%esi
if (bd == NULL)
112593: 83 c4 10 add $0x10,%esp
112596: 85 c0 test %eax,%eax
112598: 0f 84 28 01 00 00 je 1126c6 <rtems_bdbuf_get_buffer_for_access+0x196>
11259e: 66 90 xchg %ax,%ax
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
1125a0: 8b 46 24 mov 0x24(%esi),%eax
1125a3: 83 f8 0a cmp $0xa,%eax
1125a6: 76 4e jbe 1125f6 <rtems_bdbuf_get_buffer_for_access+0xc6><== ALWAYS TAKEN
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_7);
1125a8: 8b 46 24 mov 0x24(%esi),%eax <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
1125ab: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1125ae: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
1125b1: 0d 05 00 00 42 or $0x42000005,%eax <== NOT EXECUTED
1125b6: 50 push %eax <== NOT EXECUTED
1125b7: e8 98 ae ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
1125bc: 8b 45 e0 mov -0x20(%ebp),%eax
1125bf: 3b 46 1c cmp 0x1c(%esi),%eax
1125c2: 74 08 je 1125cc <rtems_bdbuf_get_buffer_for_access+0x9c>
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
1125c4: 76 91 jbe 112557 <rtems_bdbuf_get_buffer_for_access+0x27>
{
p = p->avl.right;
1125c6: 8b 76 0c mov 0xc(%esi),%esi
1125c9: eb ad jmp 112578 <rtems_bdbuf_get_buffer_for_access+0x48>
1125cb: 90 nop
1125cc: 8b 7d e4 mov -0x1c(%ebp),%edi
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
if (bd != NULL)
{
if (bd->group->bds_per_group != bds_per_group)
1125cf: 8b 46 2c mov 0x2c(%esi),%eax
1125d2: 8b 55 08 mov 0x8(%ebp),%edx
1125d5: 39 50 08 cmp %edx,0x8(%eax)
1125d8: 74 c6 je 1125a0 <rtems_bdbuf_get_buffer_for_access+0x70>
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
1125da: 8b 46 24 mov 0x24(%esi),%eax
1125dd: 83 f8 0a cmp $0xa,%eax
1125e0: 76 3d jbe 11261f <rtems_bdbuf_get_buffer_for_access+0xef><== ALWAYS TAKEN
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_8);
1125e2: 8b 46 24 mov 0x24(%esi),%eax <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
1125e5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1125e8: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
1125eb: 0d 06 00 00 42 or $0x42000006,%eax <== NOT EXECUTED
1125f0: 50 push %eax <== NOT EXECUTED
1125f1: e8 5e ae ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
1125f6: ff 24 85 70 68 12 00 jmp *0x126870(,%eax,4)
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
1125fd: 8b 46 2c mov 0x2c(%esi),%eax
112600: ff 48 0c decl 0xc(%eax)
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
112603: 83 ec 0c sub $0xc,%esp
112606: 56 push %esi
112607: e8 ec b2 ff ff call 10d8f8 <_Chain_Extract>
11260c: 83 c4 10 add $0x10,%esp
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
11260f: 8b 46 2c mov 0x2c(%esi),%eax
112612: ff 40 0c incl 0xc(%eax)
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
112615: 89 f0 mov %esi,%eax
112617: 8d 65 f4 lea -0xc(%ebp),%esp
11261a: 5b pop %ebx
11261b: 5e pop %esi
11261c: 5f pop %edi
11261d: c9 leave
11261e: c3 ret
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
11261f: ff 24 85 9c 68 12 00 jmp *0x12689c(,%eax,4)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
112626: c7 46 24 08 00 00 00 movl $0x8,0x24(%esi) <== NOT EXECUTED
11262d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112630: 56 push %esi <== NOT EXECUTED
112631: e8 c2 b2 ff ff call 10d8f8 <_Chain_Extract> <== 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 );
112636: 58 pop %eax <== NOT EXECUTED
112637: 5a pop %edx <== NOT EXECUTED
112638: 56 push %esi <== NOT EXECUTED
112639: 68 3c c1 12 00 push $0x12c13c <== NOT EXECUTED
11263e: e8 91 b2 ff ff call 10d8d4 <_Chain_Append> <== NOT EXECUTED
rtems_bdbuf_request_sync_for_modified_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_extract (&bd->link);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
rtems_bdbuf_wake_swapper ();
112643: e8 90 e5 ff ff call 110bd8 <rtems_bdbuf_wake_swapper><== NOT EXECUTED
112648: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11264b: eb 8d jmp 1125da <rtems_bdbuf_get_buffer_for_access+0xaa><== NOT EXECUTED
}
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
11264d: ba 48 c1 12 00 mov $0x12c148,%edx
112652: 89 f0 mov %esi,%eax
112654: e8 1f e8 ff ff call 110e78 <rtems_bdbuf_wait>
112659: e9 7c ff ff ff jmp 1125da <rtems_bdbuf_get_buffer_for_access+0xaa>
case RTEMS_BDBUF_STATE_MODIFIED:
rtems_bdbuf_request_sync_for_modified_buffer (bd);
break;
case RTEMS_BDBUF_STATE_CACHED:
case RTEMS_BDBUF_STATE_EMPTY:
if (bd->waiters == 0)
11265e: 8b 46 28 mov 0x28(%esi),%eax
112661: 85 c0 test %eax,%eax
112663: 75 72 jne 1126d7 <rtems_bdbuf_get_buffer_for_access+0x1a7><== ALWAYS TAKEN
{
if (bd->group->bds_per_group != bds_per_group)
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
112665: 89 f0 mov %esi,%eax <== NOT EXECUTED
112667: e8 94 ef ff ff call 111600 <rtems_bdbuf_remove_from_tree_and_lru_list><== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
11266c: c7 46 24 00 00 00 00 movl $0x0,0x24(%esi) <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
112673: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
112676: 56 push %esi <== NOT EXECUTED
112677: 68 24 c1 12 00 push $0x12c124 <== NOT EXECUTED
11267c: e8 e7 36 00 00 call 115d68 <_Chain_Insert> <== NOT EXECUTED
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
112681: b8 58 c1 12 00 mov $0x12c158,%eax <== NOT EXECUTED
112686: e8 71 e2 ff ff call 1108fc <rtems_bdbuf_wake> <== NOT EXECUTED
11268b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11268e: e9 ad fe ff ff jmp 112540 <rtems_bdbuf_get_buffer_for_access+0x10><== NOT EXECUTED
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
112693: ba 50 c1 12 00 mov $0x12c150,%edx <== NOT EXECUTED
112698: 89 f0 mov %esi,%eax <== NOT EXECUTED
11269a: e8 d9 e7 ff ff call 110e78 <rtems_bdbuf_wait> <== NOT EXECUTED
11269f: e9 36 ff ff ff jmp 1125da <rtems_bdbuf_get_buffer_for_access+0xaa><== NOT EXECUTED
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
1126a4: ba 50 c1 12 00 mov $0x12c150,%edx
1126a9: 89 f0 mov %esi,%eax
1126ab: e8 c8 e7 ff ff call 110e78 <rtems_bdbuf_wait>
1126b0: e9 eb fe ff ff jmp 1125a0 <rtems_bdbuf_get_buffer_for_access+0x70>
return;
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
1126b5: ba 48 c1 12 00 mov $0x12c148,%edx
1126ba: 89 f0 mov %esi,%eax
1126bc: e8 b7 e7 ff ff call 110e78 <rtems_bdbuf_wait>
1126c1: e9 da fe ff ff jmp 1125a0 <rtems_bdbuf_get_buffer_for_access+0x70>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1126c6: 81 3d 30 c1 12 00 34 cmpl $0x12c134,0x12c130
1126cd: c1 12 00
1126d0: 74 05 je 1126d7 <rtems_bdbuf_get_buffer_for_access+0x1a7>
static void
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
rtems_bdbuf_wake_swapper ();
1126d2: e8 01 e5 ff ff call 110bd8 <rtems_bdbuf_wake_swapper>
rtems_bdbuf_anonymous_wait (&bdbuf_cache.buffer_waiters);
1126d7: b8 58 c1 12 00 mov $0x12c158,%eax
1126dc: e8 33 e7 ff ff call 110e14 <rtems_bdbuf_anonymous_wait>
1126e1: e9 5a fe ff ff jmp 112540 <rtems_bdbuf_get_buffer_for_access+0x10>
00112164 <rtems_bdbuf_get_buffer_from_lru_list>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_from_lru_list (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
112164: 55 push %ebp
112165: 89 e5 mov %esp,%ebp
112167: 57 push %edi
112168: 56 push %esi
112169: 53 push %ebx
11216a: 81 ec bc 00 00 00 sub $0xbc,%esp
112170: 89 85 5c ff ff ff mov %eax,-0xa4(%ebp)
112176: 89 95 54 ff ff ff mov %edx,-0xac(%ebp)
11217c: 89 8d 58 ff ff ff mov %ecx,-0xa8(%ebp)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
112182: 8b 35 24 c1 12 00 mov 0x12c124,%esi
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
112188: 81 fe 28 c1 12 00 cmp $0x12c128,%esi
11218e: 0f 84 0e 01 00 00 je 1122a2 <rtems_bdbuf_get_buffer_from_lru_list+0x13e>
bd->group->bds_per_group, bds_per_group);
/*
* If nobody waits for this BD, we may recycle it.
*/
if (bd->waiters == 0)
112194: 8b 46 28 mov 0x28(%esi),%eax
112197: 85 c0 test %eax,%eax
112199: 0f 85 f5 00 00 00 jne 112294 <rtems_bdbuf_get_buffer_from_lru_list+0x130>
{
if (bd->group->bds_per_group == bds_per_group)
11219f: 8b 5e 2c mov 0x2c(%esi),%ebx
1121a2: 8b 4b 08 mov 0x8(%ebx),%ecx
1121a5: 3b 4d 08 cmp 0x8(%ebp),%ecx
1121a8: 0f 84 02 01 00 00 je 1122b0 <rtems_bdbuf_get_buffer_from_lru_list+0x14c>
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
empty_bd = bd;
}
else if (bd->group->users == 0)
1121ae: 8b 7b 0c mov 0xc(%ebx),%edi
1121b1: 85 ff test %edi,%edi
1121b3: 0f 85 db 00 00 00 jne 112294 <rtems_bdbuf_get_buffer_from_lru_list+0x130>
if (rtems_bdbuf_tracer)
printf ("bdbuf:realloc: %tu: %zd -> %zd\n",
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
1121b9: a1 00 c1 12 00 mov 0x12c100,%eax
for (b = 0, bd = group->bdbuf;
1121be: 8b 7b 10 mov 0x10(%ebx),%edi
1121c1: 89 bd 60 ff ff ff mov %edi,-0xa0(%ebp)
1121c7: 85 c9 test %ecx,%ecx
1121c9: 74 4a je 112215 <rtems_bdbuf_get_buffer_from_lru_list+0xb1><== NEVER TAKEN
1121cb: 31 d2 xor %edx,%edx
1121cd: f7 f1 div %ecx
1121cf: 8d 04 40 lea (%eax,%eax,2),%eax
1121d2: 8d 04 80 lea (%eax,%eax,4),%eax
1121d5: c1 e0 02 shl $0x2,%eax
1121d8: 89 85 64 ff ff ff mov %eax,-0x9c(%ebp)
1121de: 31 d2 xor %edx,%edx
1121e0: 89 b5 60 ff ff ff mov %esi,-0xa0(%ebp)
1121e6: 89 de mov %ebx,%esi
1121e8: 89 d3 mov %edx,%ebx
1121ea: 66 90 xchg %ax,%ax
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
1121ec: 89 f8 mov %edi,%eax
1121ee: e8 0d f4 ff ff call 111600 <rtems_bdbuf_remove_from_tree_and_lru_list>
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
1121f3: 43 inc %ebx
1121f4: 03 bd 64 ff ff ff add -0x9c(%ebp),%edi
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
1121fa: 3b 5e 08 cmp 0x8(%esi),%ebx
1121fd: 72 ed jb 1121ec <rtems_bdbuf_get_buffer_from_lru_list+0x88>
1121ff: 89 f3 mov %esi,%ebx
112201: 8b b5 60 ff ff ff mov -0xa0(%ebp),%esi
112207: a1 00 c1 12 00 mov 0x12c100,%eax
11220c: 8b 53 10 mov 0x10(%ebx),%edx
11220f: 89 95 60 ff ff ff mov %edx,-0xa0(%ebp)
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
112215: 8b 4d 08 mov 0x8(%ebp),%ecx
112218: 89 4b 08 mov %ecx,0x8(%ebx)
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
11221b: 8b 95 60 ff ff ff mov -0xa0(%ebp),%edx
112221: 83 f9 01 cmp $0x1,%ecx
112224: 76 6a jbe 112290 <rtems_bdbuf_get_buffer_from_lru_list+0x12c>
112226: 31 d2 xor %edx,%edx
112228: f7 f1 div %ecx
11222a: 8d 04 40 lea (%eax,%eax,2),%eax
11222d: 8d 04 80 lea (%eax,%eax,4),%eax
112230: c1 e0 02 shl $0x2,%eax
112233: 89 85 64 ff ff ff mov %eax,-0x9c(%ebp)
112239: 8b bd 60 ff ff ff mov -0xa0(%ebp),%edi
11223f: 01 c7 add %eax,%edi
112241: b8 01 00 00 00 mov $0x1,%eax
112246: 89 b5 60 ff ff ff mov %esi,-0xa0(%ebp)
11224c: 89 de mov %ebx,%esi
11224e: 89 c3 mov %eax,%ebx
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
112250: c7 47 24 00 00 00 00 movl $0x0,0x24(%edi)
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
112257: 83 ec 08 sub $0x8,%esp
11225a: 57 push %edi
11225b: 68 24 c1 12 00 push $0x12c124
112260: e8 03 3b 00 00 call 115d68 <_Chain_Insert>
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
112265: 43 inc %ebx
112266: 03 bd 64 ff ff ff add -0x9c(%ebp),%edi
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
11226c: 83 c4 10 add $0x10,%esp
11226f: 3b 5e 08 cmp 0x8(%esi),%ebx
112272: 72 dc jb 112250 <rtems_bdbuf_get_buffer_from_lru_list+0xec><== NEVER TAKEN
112274: 89 d8 mov %ebx,%eax
112276: 89 f3 mov %esi,%ebx
112278: 8b b5 60 ff ff ff mov -0xa0(%ebp),%esi
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
if (b > 1)
11227e: 83 f8 01 cmp $0x1,%eax
112281: 76 0a jbe 11228d <rtems_bdbuf_get_buffer_from_lru_list+0x129><== NEVER TAKEN
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
112283: b8 58 c1 12 00 mov $0x12c158,%eax
112288: e8 6f e6 ff ff call 1108fc <rtems_bdbuf_wake>
11228d: 8b 53 10 mov 0x10(%ebx),%edx
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, bds_per_group);
}
if (empty_bd != NULL)
112290: 85 d2 test %edx,%edx
112292: 75 29 jne 1122bd <rtems_bdbuf_get_buffer_from_lru_list+0x159><== ALWAYS TAKEN
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
112294: 8b 36 mov (%esi),%esi
rtems_blkdev_bnum block,
size_t bds_per_group)
{
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
112296: 81 fe 28 c1 12 00 cmp $0x12c128,%esi
11229c: 0f 85 f2 fe ff ff jne 112194 <rtems_bdbuf_get_buffer_from_lru_list+0x30>
1122a2: 31 d2 xor %edx,%edx
node = rtems_chain_next (node);
}
return NULL;
}
1122a4: 89 d0 mov %edx,%eax
1122a6: 8d 65 f4 lea -0xc(%ebp),%esp
1122a9: 5b pop %ebx
1122aa: 5e pop %esi
1122ab: 5f pop %edi
1122ac: c9 leave
1122ad: c3 ret
1122ae: 66 90 xchg %ax,%ax
*/
if (bd->waiters == 0)
{
if (bd->group->bds_per_group == bds_per_group)
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
1122b0: 89 f0 mov %esi,%eax
1122b2: e8 49 f3 ff ff call 111600 <rtems_bdbuf_remove_from_tree_and_lru_list>
1122b7: 89 f2 mov %esi,%edx
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, bds_per_group);
}
if (empty_bd != NULL)
1122b9: 85 d2 test %edx,%edx
1122bb: 74 d7 je 112294 <rtems_bdbuf_get_buffer_from_lru_list+0x130><== NEVER TAKEN
static void
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
1122bd: 8b 85 5c ff ff ff mov -0xa4(%ebp),%eax
1122c3: 89 42 14 mov %eax,0x14(%edx)
1122c6: 8b 8d 54 ff ff ff mov -0xac(%ebp),%ecx
1122cc: 89 4a 18 mov %ecx,0x18(%edx)
bd->block = block;
1122cf: 8b 85 58 ff ff ff mov -0xa8(%ebp),%eax
1122d5: 89 42 1c mov %eax,0x1c(%edx)
bd->avl.left = NULL;
1122d8: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
bd->avl.right = NULL;
1122df: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
bd->waiters = 0;
1122e6: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx)
rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
1122ed: a1 20 c1 12 00 mov 0x12c120,%eax
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
1122f2: 85 c0 test %eax,%eax
1122f4: 0f 84 18 02 00 00 je 112512 <rtems_bdbuf_get_buffer_from_lru_list+0x3ae>
1122fa: 8d 8d 68 ff ff ff lea -0x98(%ebp),%ecx
112300: 89 8d 44 ff ff ff mov %ecx,-0xbc(%ebp)
112306: 89 95 64 ff ff ff mov %edx,-0x9c(%ebp)
11230c: 8b bd 54 ff ff ff mov -0xac(%ebp),%edi
112312: eb 2d jmp 112341 <rtems_bdbuf_get_buffer_from_lru_list+0x1dd>
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
112314: 72 08 jb 11231e <rtems_bdbuf_get_buffer_from_lru_list+0x1ba><== NEVER TAKEN
112316: 39 b5 5c ff ff ff cmp %esi,-0xa4(%ebp)
11231c: 77 32 ja 112350 <rtems_bdbuf_get_buffer_from_lru_list+0x1ec><== NEVER TAKEN
11231e: 31 fa xor %edi,%edx
112320: 33 b5 5c ff ff ff xor -0xa4(%ebp),%esi
112326: 09 f2 or %esi,%edx
112328: 0f 84 a2 00 00 00 je 1123d0 <rtems_bdbuf_get_buffer_from_lru_list+0x26c><== ALWAYS TAKEN
break;
}
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
11232e: c6 40 10 ff movb $0xff,0x10(%eax)
q = p->avl.left;
112332: 8b 50 08 mov 0x8(%eax),%edx
if (q == NULL)
112335: 85 d2 test %edx,%edx
112337: 0f 84 aa 01 00 00 je 1124e7 <rtems_bdbuf_get_buffer_from_lru_list+0x383>
{
q = node;
p->avl.left = q;
11233d: 89 d9 mov %ebx,%ecx
11233f: 89 d0 mov %edx,%eax
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
112341: 89 01 mov %eax,(%ecx)
112343: 8d 59 04 lea 0x4(%ecx),%ebx
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
112346: 8b 70 14 mov 0x14(%eax),%esi
112349: 8b 50 18 mov 0x18(%eax),%edx
11234c: 39 d7 cmp %edx,%edi
11234e: 76 c4 jbe 112314 <rtems_bdbuf_get_buffer_from_lru_list+0x1b0><== ALWAYS TAKEN
{
p->avl.cache = 1;
112350: c6 40 10 01 movb $0x1,0x10(%eax)
q = p->avl.right;
112354: 8b 50 0c mov 0xc(%eax),%edx
if (q == NULL)
112357: 85 d2 test %edx,%edx
112359: 75 e2 jne 11233d <rtems_bdbuf_get_buffer_from_lru_list+0x1d9>
11235b: 8b 95 64 ff ff ff mov -0x9c(%ebp),%edx
{
q = node;
p->avl.right = q = node;
112361: 89 50 0c mov %edx,0xc(%eax)
}
p = q;
}
q->avl.left = q->avl.right = NULL;
112364: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
11236b: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
q->avl.bal = 0;
112372: c6 42 11 00 movb $0x0,0x11(%edx)
112376: 89 d6 mov %edx,%esi
112378: eb 24 jmp 11239e <rtems_bdbuf_get_buffer_from_lru_list+0x23a>
11237a: 66 90 xchg %ax,%ax
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = 1;
11237c: c6 40 11 01 movb $0x1,0x11(%eax)
112380: 89 c3 mov %eax,%ebx
112382: b2 01 mov $0x1,%dl
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
112384: 3b 8d 44 ff ff ff cmp -0xbc(%ebp),%ecx
11238a: 76 38 jbe 1123c4 <rtems_bdbuf_get_buffer_from_lru_list+0x260>
{
p = *--buf_prev;
11238c: 83 e9 04 sub $0x4,%ecx
11238f: 8b 01 mov (%ecx),%eax
if (p->avl.cache == -1)
112391: 80 78 10 ff cmpb $0xff,0x10(%eax)
112395: 74 75 je 11240c <rtems_bdbuf_get_buffer_from_lru_list+0x2a8>
{
p->avl.left = q;
}
else
{
p->avl.right = q;
112397: 89 58 0c mov %ebx,0xc(%eax)
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
11239a: 84 d2 test %dl,%dl
11239c: 74 75 je 112413 <rtems_bdbuf_get_buffer_from_lru_list+0x2af>
{
if (p->avl.cache == -1)
11239e: 80 78 10 ff cmpb $0xff,0x10(%eax)
1123a2: 74 50 je 1123f4 <rtems_bdbuf_get_buffer_from_lru_list+0x290>
break;
}
}
else
{
switch (p->avl.bal)
1123a4: 8a 58 11 mov 0x11(%eax),%bl
1123a7: 84 db test %bl,%bl
1123a9: 74 d1 je 11237c <rtems_bdbuf_get_buffer_from_lru_list+0x218>
1123ab: 80 fb 01 cmp $0x1,%bl
1123ae: 0f 84 80 00 00 00 je 112434 <rtems_bdbuf_get_buffer_from_lru_list+0x2d0>
1123b4: fe c3 inc %bl
1123b6: 74 6c je 112424 <rtems_bdbuf_get_buffer_from_lru_list+0x2c0><== ALWAYS TAKEN
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
1123b8: 89 c3 mov %eax,%ebx <== NOT EXECUTED
1123ba: b2 01 mov $0x1,%dl <== NOT EXECUTED
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
1123bc: 3b 8d 44 ff ff ff cmp -0xbc(%ebp),%ecx <== NOT EXECUTED
1123c2: 77 c8 ja 11238c <rtems_bdbuf_get_buffer_from_lru_list+0x228><== NOT EXECUTED
1123c4: 89 f2 mov %esi,%edx
p->avl.right = q;
}
}
else
{
*root = p;
1123c6: 89 1d 20 c1 12 00 mov %ebx,0x12c120
1123cc: eb 47 jmp 112415 <rtems_bdbuf_get_buffer_from_lru_list+0x2b1>
1123ce: 66 90 xchg %ax,%ax
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
1123d0: 8b 95 58 ff ff ff mov -0xa8(%ebp),%edx
1123d6: 3b 50 1c cmp 0x1c(%eax),%edx
1123d9: 0f 87 71 ff ff ff ja 112350 <rtems_bdbuf_get_buffer_from_lru_list+0x1ec>
q = node;
p->avl.right = q = node;
break;
}
}
else if ((p->dev != dev) || (p->block != block))
1123df: 0f 85 49 ff ff ff jne 11232e <rtems_bdbuf_get_buffer_from_lru_list+0x1ca><== ALWAYS TAKEN
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
if (rtems_bdbuf_avl_insert (&bdbuf_cache.tree, bd) != 0)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_RECYCLE);
1123e5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1123e8: 68 1b 00 00 42 push $0x4200001b <== NOT EXECUTED
1123ed: e8 62 b0 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
1123f2: 66 90 xchg %ax,%ax <== NOT EXECUTED
while (modified)
{
if (p->avl.cache == -1)
{
switch (p->avl.bal)
1123f4: 8a 50 11 mov 0x11(%eax),%dl
1123f7: 84 d2 test %dl,%dl
1123f9: 0f 85 8d 00 00 00 jne 11248c <rtems_bdbuf_get_buffer_from_lru_list+0x328>
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = -1;
1123ff: c6 40 11 ff movb $0xff,0x11(%eax)
112403: 89 c3 mov %eax,%ebx
112405: b2 01 mov $0x1,%dl
112407: e9 78 ff ff ff jmp 112384 <rtems_bdbuf_get_buffer_from_lru_list+0x220>
{
p = *--buf_prev;
if (p->avl.cache == -1)
{
p->avl.left = q;
11240c: 89 58 08 mov %ebx,0x8(%eax)
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
11240f: 84 d2 test %dl,%dl
112411: 75 8b jne 11239e <rtems_bdbuf_get_buffer_from_lru_list+0x23a><== ALWAYS TAKEN
112413: 89 f2 mov %esi,%edx
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
112415: c7 42 24 01 00 00 00 movl $0x1,0x24(%edx)
if (empty_bd != NULL)
{
rtems_bdbuf_setup_empty_buffer (empty_bd, dev, block);
return empty_bd;
11241c: e9 83 fe ff ff jmp 1122a4 <rtems_bdbuf_get_buffer_from_lru_list+0x140>
112421: 8d 76 00 lea 0x0(%esi),%esi
else
{
switch (p->avl.bal)
{
case -1:
p->avl.bal = 0;
112424: c6 40 11 00 movb $0x0,0x11(%eax)
112428: 89 c3 mov %eax,%ebx
11242a: 31 d2 xor %edx,%edx
11242c: e9 53 ff ff ff jmp 112384 <rtems_bdbuf_get_buffer_from_lru_list+0x220>
112431: 8d 76 00 lea 0x0(%esi),%esi
case 0:
p->avl.bal = 1;
break;
case 1:
p1 = p->avl.right;
112434: 8b 58 0c mov 0xc(%eax),%ebx
if (p1->avl.bal == 1) /* simple RR-turn */
112437: 80 7b 11 01 cmpb $0x1,0x11(%ebx)
11243b: 0f 84 8f 00 00 00 je 1124d0 <rtems_bdbuf_get_buffer_from_lru_list+0x36c><== ALWAYS TAKEN
p->avl.bal = 0;
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
112441: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED
112444: 89 95 64 ff ff ff mov %edx,-0x9c(%ebp) <== NOT EXECUTED
p1->avl.left = p2->avl.right;
11244a: 8b 7a 0c mov 0xc(%edx),%edi <== NOT EXECUTED
11244d: 89 7b 08 mov %edi,0x8(%ebx) <== NOT EXECUTED
p2->avl.right = p1;
112450: 89 5a 0c mov %ebx,0xc(%edx) <== NOT EXECUTED
p->avl.right = p2->avl.left;
112453: 8b 7a 08 mov 0x8(%edx),%edi <== NOT EXECUTED
112456: 89 78 0c mov %edi,0xc(%eax) <== NOT EXECUTED
p2->avl.left = p;
112459: 89 42 08 mov %eax,0x8(%edx) <== NOT EXECUTED
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
11245c: 80 7a 11 01 cmpb $0x1,0x11(%edx) <== NOT EXECUTED
112460: 0f 95 c2 setne %dl <== NOT EXECUTED
112463: 89 d7 mov %edx,%edi <== NOT EXECUTED
112465: 4f dec %edi <== NOT EXECUTED
112466: 89 fa mov %edi,%edx <== NOT EXECUTED
112468: 88 50 11 mov %dl,0x11(%eax) <== NOT EXECUTED
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
11246b: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax <== NOT EXECUTED
112471: 80 78 11 ff cmpb $0xff,0x11(%eax) <== NOT EXECUTED
112475: 74 68 je 1124df <rtems_bdbuf_get_buffer_from_lru_list+0x37b><== NOT EXECUTED
112477: c6 43 11 00 movb $0x0,0x11(%ebx) <== NOT EXECUTED
11247b: 8b 9d 64 ff ff ff mov -0x9c(%ebp),%ebx <== NOT EXECUTED
p = p2;
}
p->avl.bal = 0;
112481: c6 43 11 00 movb $0x0,0x11(%ebx)
112485: 31 d2 xor %edx,%edx
112487: e9 f8 fe ff ff jmp 112384 <rtems_bdbuf_get_buffer_from_lru_list+0x220>
while (modified)
{
if (p->avl.cache == -1)
{
switch (p->avl.bal)
11248c: 80 fa 01 cmp $0x1,%dl
11248f: 74 93 je 112424 <rtems_bdbuf_get_buffer_from_lru_list+0x2c0><== NEVER TAKEN
112491: fe c2 inc %dl
112493: 0f 85 1f ff ff ff jne 1123b8 <rtems_bdbuf_get_buffer_from_lru_list+0x254><== NEVER TAKEN
case 0:
p->avl.bal = -1;
break;
case -1:
p1 = p->avl.left;
112499: 8b 58 08 mov 0x8(%eax),%ebx
if (p1->avl.bal == -1) /* simple LL-turn */
11249c: 80 7b 11 ff cmpb $0xff,0x11(%ebx)
1124a0: 74 53 je 1124f5 <rtems_bdbuf_get_buffer_from_lru_list+0x391><== NEVER TAKEN
p->avl.bal = 0;
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
1124a2: 8b 53 0c mov 0xc(%ebx),%edx
p1->avl.right = p2->avl.left;
1124a5: 8b 7a 08 mov 0x8(%edx),%edi
1124a8: 89 7b 0c mov %edi,0xc(%ebx)
p2->avl.left = p1;
1124ab: 89 5a 08 mov %ebx,0x8(%edx)
p->avl.left = p2->avl.right;
1124ae: 8b 7a 0c mov 0xc(%edx),%edi
1124b1: 89 78 08 mov %edi,0x8(%eax)
p2->avl.right = p;
1124b4: 89 42 0c mov %eax,0xc(%edx)
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
1124b7: 80 7a 11 ff cmpb $0xff,0x11(%edx)
1124bb: 0f 94 40 11 sete 0x11(%eax)
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
1124bf: 80 7a 11 01 cmpb $0x1,0x11(%edx)
1124c3: 74 42 je 112507 <rtems_bdbuf_get_buffer_from_lru_list+0x3a3><== NEVER TAKEN
1124c5: c6 43 11 00 movb $0x0,0x11(%ebx)
1124c9: 89 d3 mov %edx,%ebx
1124cb: eb b4 jmp 112481 <rtems_bdbuf_get_buffer_from_lru_list+0x31d>
1124cd: 8d 76 00 lea 0x0(%esi),%esi
case 1:
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
1124d0: 8b 53 08 mov 0x8(%ebx),%edx
1124d3: 89 50 0c mov %edx,0xc(%eax)
p1->avl.left = p;
1124d6: 89 43 08 mov %eax,0x8(%ebx)
p->avl.bal = 0;
1124d9: c6 40 11 00 movb $0x0,0x11(%eax)
1124dd: eb a2 jmp 112481 <rtems_bdbuf_get_buffer_from_lru_list+0x31d>
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
1124df: c6 43 11 01 movb $0x1,0x11(%ebx) <== NOT EXECUTED
1124e3: 89 c3 mov %eax,%ebx <== NOT EXECUTED
1124e5: eb 9a jmp 112481 <rtems_bdbuf_get_buffer_from_lru_list+0x31d><== NOT EXECUTED
1124e7: 8b 95 64 ff ff ff mov -0x9c(%ebp),%edx
p->avl.cache = -1;
q = p->avl.left;
if (q == NULL)
{
q = node;
p->avl.left = q;
1124ed: 89 50 08 mov %edx,0x8(%eax)
1124f0: e9 6f fe ff ff jmp 112364 <rtems_bdbuf_get_buffer_from_lru_list+0x200>
case -1:
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
1124f5: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
1124f8: 89 50 08 mov %edx,0x8(%eax) <== NOT EXECUTED
p1->avl.right = p;
1124fb: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
p->avl.bal = 0;
1124fe: c6 40 11 00 movb $0x0,0x11(%eax) <== NOT EXECUTED
112502: e9 7a ff ff ff jmp 112481 <rtems_bdbuf_get_buffer_from_lru_list+0x31d><== NOT EXECUTED
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
112507: c6 43 11 ff movb $0xff,0x11(%ebx) <== NOT EXECUTED
11250b: 89 d3 mov %edx,%ebx <== NOT EXECUTED
11250d: e9 6f ff ff ff jmp 112481 <rtems_bdbuf_get_buffer_from_lru_list+0x31d><== NOT EXECUTED
bool modified = false;
if (p == NULL)
{
*root = node;
112512: 89 15 20 c1 12 00 mov %edx,0x12c120
node->avl.left = NULL;
112518: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
node->avl.right = NULL;
11251f: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
node->avl.bal = 0;
112526: c6 42 11 00 movb $0x0,0x11(%edx)
11252a: e9 e6 fe ff ff jmp 112415 <rtems_bdbuf_get_buffer_from_lru_list+0x2b1>
00110ea8 <rtems_bdbuf_init>:
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
110ea8: 55 push %ebp
110ea9: 89 e5 mov %esp,%ebp
110eab: 57 push %edi
110eac: 56 push %esi
110ead: 53 push %ebx
110eae: 83 ec 1c sub $0x1c,%esp
rtems_mode prev_mode;
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
110eb1: a1 b4 c5 12 00 mov 0x12c5b4,%eax
110eb6: 85 c0 test %eax,%eax
110eb8: 75 4a jne 110f04 <rtems_bdbuf_init+0x5c> <== NEVER TAKEN
return RTEMS_CALLED_FROM_ISR;
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
110eba: a1 64 4a 12 00 mov 0x124a64,%eax
110ebf: 8b 1d 60 4a 12 00 mov 0x124a60,%ebx
110ec5: 31 d2 xor %edx,%edx
110ec7: f7 f3 div %ebx
110ec9: 89 45 e4 mov %eax,-0x1c(%ebp)
110ecc: 85 d2 test %edx,%edx
110ece: 74 10 je 110ee0 <rtems_bdbuf_init+0x38> <== ALWAYS TAKEN
110ed0: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
return RTEMS_UNSATISFIED;
}
110ed5: 8d 65 f4 lea -0xc(%ebp),%esp
110ed8: 5b pop %ebx
110ed9: 5e pop %esi
110eda: 5f pop %edi
110edb: c9 leave
110edc: c3 ret
110edd: 8d 76 00 lea 0x0(%esi),%esi
/*
* We use a special variable to manage the initialisation incase we have
* completing threads doing this. You may get errors if the another thread
* makes a call and we have not finished initialisation.
*/
prev_mode = rtems_bdbuf_disable_preemption ();
110ee0: e8 c3 fe ff ff call 110da8 <rtems_bdbuf_disable_preemption>
110ee5: 89 c2 mov %eax,%edx
if (bdbuf_cache.initialised)
110ee7: 80 3d 68 c1 12 00 00 cmpb $0x0,0x12c168
110eee: 74 24 je 110f14 <rtems_bdbuf_init+0x6c> <== ALWAYS TAKEN
{
rtems_bdbuf_restore_preemption (prev_mode);
110ef0: e8 ef fe ff ff call 110de4 <rtems_bdbuf_restore_preemption><== NOT EXECUTED
110ef5: b8 0c 00 00 00 mov $0xc,%eax <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
return RTEMS_UNSATISFIED;
}
110efa: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
110efd: 5b pop %ebx <== NOT EXECUTED
110efe: 5e pop %esi <== NOT EXECUTED
110eff: 5f pop %edi <== NOT EXECUTED
110f00: c9 leave <== NOT EXECUTED
110f01: c3 ret <== NOT EXECUTED
110f02: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_mode prev_mode;
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
110f04: b8 12 00 00 00 mov $0x12,%eax <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
return RTEMS_UNSATISFIED;
}
110f09: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
110f0c: 5b pop %ebx <== NOT EXECUTED
110f0d: 5e pop %esi <== NOT EXECUTED
110f0e: 5f pop %edi <== NOT EXECUTED
110f0f: c9 leave <== NOT EXECUTED
110f10: c3 ret <== NOT EXECUTED
110f11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
rtems_bdbuf_restore_preemption (prev_mode);
return RTEMS_RESOURCE_IN_USE;
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
110f14: be e0 c0 12 00 mov $0x12c0e0,%esi
110f19: b9 8c 00 00 00 mov $0x8c,%ecx
110f1e: 31 c0 xor %eax,%eax
110f20: 89 f7 mov %esi,%edi
110f22: f3 aa rep stos %al,%es:(%edi)
bdbuf_cache.initialised = true;
110f24: c6 05 68 c1 12 00 01 movb $0x1,0x12c168
rtems_bdbuf_restore_preemption (prev_mode);
110f2b: 89 d0 mov %edx,%eax
110f2d: e8 b2 fe ff ff call 110de4 <rtems_bdbuf_restore_preemption>
*/
cache_aligment = 32; /* FIXME rtems_cache_get_data_line_size() */
if (cache_aligment <= 0)
cache_aligment = CPU_ALIGNMENT;
bdbuf_cache.sync_device = BDBUF_INVALID_DEV;
110f32: c7 05 18 c1 12 00 ff movl $0xffffffff,0x12c118
110f39: ff ff ff
110f3c: c7 05 1c c1 12 00 ff movl $0xffffffff,0x12c11c
110f43: ff ff ff
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
110f46: c7 05 e8 c0 12 00 ec movl $0x12c0ec,0x12c0e8
110f4d: c0 12 00
the_chain->permanent_null = NULL;
110f50: c7 05 ec c0 12 00 00 movl $0x0,0x12c0ec
110f57: 00 00 00
the_chain->last = _Chain_Head(the_chain);
110f5a: c7 05 f0 c0 12 00 e8 movl $0x12c0e8,0x12c0f0
110f61: c0 12 00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
110f64: c7 05 24 c1 12 00 28 movl $0x12c128,0x12c124
110f6b: c1 12 00
the_chain->permanent_null = NULL;
110f6e: c7 05 28 c1 12 00 00 movl $0x0,0x12c128
110f75: 00 00 00
the_chain->last = _Chain_Head(the_chain);
110f78: c7 05 2c c1 12 00 24 movl $0x12c124,0x12c12c
110f7f: c1 12 00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
110f82: c7 05 30 c1 12 00 34 movl $0x12c134,0x12c130
110f89: c1 12 00
the_chain->permanent_null = NULL;
110f8c: c7 05 34 c1 12 00 00 movl $0x0,0x12c134
110f93: 00 00 00
the_chain->last = _Chain_Head(the_chain);
110f96: c7 05 38 c1 12 00 30 movl $0x12c130,0x12c138
110f9d: c1 12 00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
110fa0: c7 05 3c c1 12 00 40 movl $0x12c140,0x12c13c
110fa7: c1 12 00
the_chain->permanent_null = NULL;
110faa: c7 05 40 c1 12 00 00 movl $0x0,0x12c140
110fb1: 00 00 00
the_chain->last = _Chain_Head(the_chain);
110fb4: c7 05 44 c1 12 00 3c movl $0x12c13c,0x12c144
110fbb: c1 12 00
rtems_chain_initialize_empty (&bdbuf_cache.sync);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
110fbe: 83 ec 0c sub $0xc,%esp
110fc1: 68 08 c1 12 00 push $0x12c108
110fc6: 6a 00 push $0x0
110fc8: 6a 54 push $0x54
110fca: 6a 01 push $0x1
110fcc: 68 6c 43 44 42 push $0x4244436c
110fd1: e8 36 bc ff ff call 10cc0c <rtems_semaphore_create>
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
110fd6: 83 c4 20 add $0x20,%esp
110fd9: 85 c0 test %eax,%eax
110fdb: 0f 84 ab 00 00 00 je 11108c <rtems_bdbuf_init+0x1e4><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.swapout != 0)
110fe1: a1 e0 c0 12 00 mov 0x12c0e0,%eax <== NOT EXECUTED
110fe6: 85 c0 test %eax,%eax <== NOT EXECUTED
110fe8: 75 76 jne 111060 <rtems_bdbuf_init+0x1b8><== NOT EXECUTED
rtems_task_delete (bdbuf_cache.swapout);
free (bdbuf_cache.buffers);
110fea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110fed: ff 35 f8 c0 12 00 pushl 0x12c0f8 <== NOT EXECUTED
110ff3: e8 94 84 ff ff call 10948c <free> <== NOT EXECUTED
free (bdbuf_cache.groups);
110ff8: 59 pop %ecx <== NOT EXECUTED
110ff9: ff 35 64 c1 12 00 pushl 0x12c164 <== NOT EXECUTED
110fff: e8 88 84 ff ff call 10948c <free> <== NOT EXECUTED
free (bdbuf_cache.bds);
111004: 5a pop %edx <== NOT EXECUTED
111005: ff 35 f4 c0 12 00 pushl 0x12c0f4 <== NOT EXECUTED
11100b: e8 7c 84 ff ff call 10948c <free> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.buffer_waiters.sema);
111010: 58 pop %eax <== NOT EXECUTED
111011: ff 35 5c c1 12 00 pushl 0x12c15c <== NOT EXECUTED
111017: e8 c4 bd ff ff call 10cde0 <rtems_semaphore_delete><== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.access_waiters.sema);
11101c: 5f pop %edi <== NOT EXECUTED
11101d: ff 35 4c c1 12 00 pushl 0x12c14c <== NOT EXECUTED
111023: e8 b8 bd ff ff call 10cde0 <rtems_semaphore_delete><== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
111028: 5e pop %esi <== NOT EXECUTED
111029: ff 35 54 c1 12 00 pushl 0x12c154 <== NOT EXECUTED
11102f: e8 ac bd ff ff call 10cde0 <rtems_semaphore_delete><== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.sync_lock);
111034: 5b pop %ebx <== NOT EXECUTED
111035: ff 35 0c c1 12 00 pushl 0x12c10c <== NOT EXECUTED
11103b: e8 a0 bd ff ff call 10cde0 <rtems_semaphore_delete><== NOT EXECUTED
if (bdbuf_cache.lock != 0)
111040: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111043: 8b 0d 08 c1 12 00 mov 0x12c108,%ecx <== NOT EXECUTED
111049: 85 c9 test %ecx,%ecx <== NOT EXECUTED
11104b: 75 27 jne 111074 <rtems_bdbuf_init+0x1cc><== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
rtems_semaphore_delete (bdbuf_cache.lock);
}
bdbuf_cache.initialised = false;
11104d: c6 05 68 c1 12 00 00 movb $0x0,0x12c168 <== NOT EXECUTED
111054: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
return RTEMS_UNSATISFIED;
111059: e9 77 fe ff ff jmp 110ed5 <rtems_bdbuf_init+0x2d> <== NOT EXECUTED
11105e: 66 90 xchg %ax,%ax <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.swapout != 0)
rtems_task_delete (bdbuf_cache.swapout);
111060: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111063: 50 push %eax <== NOT EXECUTED
111064: e8 17 c1 ff ff call 10d180 <rtems_task_delete> <== NOT EXECUTED
111069: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11106c: e9 79 ff ff ff jmp 110fea <rtems_bdbuf_init+0x142><== NOT EXECUTED
111071: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
rtems_semaphore_delete (bdbuf_cache.sync_lock);
if (bdbuf_cache.lock != 0)
{
rtems_bdbuf_unlock_cache ();
111074: e8 ff f9 ff ff call 110a78 <rtems_bdbuf_unlock_cache><== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.lock);
111079: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11107c: ff 35 08 c1 12 00 pushl 0x12c108 <== NOT EXECUTED
111082: e8 59 bd ff ff call 10cde0 <rtems_semaphore_delete><== NOT EXECUTED
111087: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11108a: eb c1 jmp 11104d <rtems_bdbuf_init+0x1a5><== NOT EXECUTED
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
goto error;
rtems_bdbuf_lock_cache ();
11108c: e8 57 f8 ff ff call 1108e8 <rtems_bdbuf_lock_cache>
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 's'),
111091: 83 ec 0c sub $0xc,%esp
111094: 68 0c c1 12 00 push $0x12c10c
111099: 6a 00 push $0x0
11109b: 6a 54 push $0x54
11109d: 6a 01 push $0x1
11109f: 68 73 43 44 42 push $0x42444373
1110a4: e8 63 bb ff ff call 10cc0c <rtems_semaphore_create>
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.sync_lock);
if (sc != RTEMS_SUCCESSFUL)
1110a9: 83 c4 20 add $0x20,%esp
1110ac: 85 c0 test %eax,%eax
1110ae: 0f 85 2d ff ff ff jne 110fe1 <rtems_bdbuf_init+0x139><== NEVER TAKEN
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'a'),
1110b4: 83 ec 0c sub $0xc,%esp
1110b7: 68 4c c1 12 00 push $0x12c14c
1110bc: 6a 00 push $0x0
1110be: 6a 24 push $0x24
1110c0: 6a 00 push $0x0
1110c2: 68 61 43 44 42 push $0x42444361
1110c7: e8 40 bb ff ff call 10cc0c <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.access_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
1110cc: 83 c4 20 add $0x20,%esp
1110cf: 85 c0 test %eax,%eax
1110d1: 0f 85 0a ff ff ff jne 110fe1 <rtems_bdbuf_init+0x139><== NEVER TAKEN
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 't'),
1110d7: 83 ec 0c sub $0xc,%esp
1110da: 68 54 c1 12 00 push $0x12c154
1110df: 6a 00 push $0x0
1110e1: 6a 24 push $0x24
1110e3: 6a 00 push $0x0
1110e5: 68 74 43 44 42 push $0x42444374
1110ea: e8 1d bb ff ff call 10cc0c <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.transfer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
1110ef: 83 c4 20 add $0x20,%esp
1110f2: 85 c0 test %eax,%eax
1110f4: 0f 85 e7 fe ff ff jne 110fe1 <rtems_bdbuf_init+0x139><== NEVER TAKEN
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'b'),
1110fa: 83 ec 0c sub $0xc,%esp
1110fd: 68 5c c1 12 00 push $0x12c15c
111102: 6a 00 push $0x0
111104: 6a 24 push $0x24
111106: 6a 00 push $0x0
111108: 68 62 43 44 42 push $0x42444362
11110d: e8 fa ba ff ff call 10cc0c <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.buffer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
111112: 83 c4 20 add $0x20,%esp
111115: 85 c0 test %eax,%eax
111117: 0f 85 c4 fe ff ff jne 110fe1 <rtems_bdbuf_init+0x139><== NEVER TAKEN
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
11111d: a1 5c 4a 12 00 mov 0x124a5c,%eax
111122: 31 d2 xor %edx,%edx
111124: f7 f3 div %ebx
111126: 89 c1 mov %eax,%ecx
goto error;
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
111128: a3 fc c0 12 00 mov %eax,0x12c0fc
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
11112d: 8b 45 e4 mov -0x1c(%ebp),%eax
111130: a3 00 c1 12 00 mov %eax,0x12c100
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
bdbuf_cache.group_count =
111135: 89 c8 mov %ecx,%eax
111137: 31 d2 xor %edx,%edx
111139: f7 75 e4 divl -0x1c(%ebp)
11113c: a3 60 c1 12 00 mov %eax,0x12c160
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
111141: 56 push %esi
111142: 56 push %esi
111143: 51 push %ecx
111144: 6a 3c push $0x3c
111146: e8 29 81 ff ff call 109274 <calloc>
11114b: a3 f4 c0 12 00 mov %eax,0x12c0f4
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
111150: 83 c4 10 add $0x10,%esp
111153: 85 c0 test %eax,%eax
111155: 0f 84 86 fe ff ff je 110fe1 <rtems_bdbuf_init+0x139><== NEVER TAKEN
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
11115b: 51 push %ecx
11115c: 51 push %ecx
11115d: ff 35 60 c1 12 00 pushl 0x12c160
111163: 6a 14 push $0x14
111165: e8 0a 81 ff ff call 109274 <calloc>
11116a: a3 64 c1 12 00 mov %eax,0x12c164
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
11116f: 83 c4 10 add $0x10,%esp
111172: 85 c0 test %eax,%eax
111174: 0f 84 67 fe ff ff je 110fe1 <rtems_bdbuf_init+0x139><== NEVER TAKEN
* aligned. It is possible to free the memory allocated by rtems_memalign()
* with free(). Return 0 if allocated.
*
* The memory allocate allows a
*/
if (rtems_memalign ((void **) &bdbuf_cache.buffers,
11117a: 52 push %edx
11117b: a1 fc c0 12 00 mov 0x12c0fc,%eax
111180: 0f af c3 imul %ebx,%eax
111183: 50 push %eax
111184: 6a 20 push $0x20
111186: 68 f8 c0 12 00 push $0x12c0f8
11118b: e8 08 3d 00 00 call 114e98 <rtems_memalign>
111190: 83 c4 10 add $0x10,%esp
111193: 85 c0 test %eax,%eax
111195: 0f 85 46 fe ff ff jne 110fe1 <rtems_bdbuf_init+0x139><== NEVER TAKEN
/*
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
11119b: 8b 3d 64 c1 12 00 mov 0x12c164,%edi
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
1111a1: 8b 35 f4 c0 12 00 mov 0x12c0f4,%esi
1111a7: 8b 0d f8 c0 12 00 mov 0x12c0f8,%ecx
1111ad: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
/*
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
1111b4: 8b 45 e4 mov -0x1c(%ebp),%eax
1111b7: 3b 05 fc c0 12 00 cmp 0x12c0fc,%eax
1111bd: 73 4c jae 11120b <rtems_bdbuf_init+0x363>
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dev = BDBUF_INVALID_DEV;
1111bf: c7 46 14 ff ff ff ff movl $0xffffffff,0x14(%esi)
1111c6: c7 46 18 ff ff ff ff movl $0xffffffff,0x18(%esi)
bd->group = group;
1111cd: 89 7e 2c mov %edi,0x2c(%esi)
bd->buffer = buffer;
1111d0: 89 4e 20 mov %ecx,0x20(%esi)
1111d3: 50 push %eax
1111d4: 50 push %eax
1111d5: 56 push %esi
1111d6: 68 24 c1 12 00 push $0x12c124
1111db: 89 4d e0 mov %ecx,-0x20(%ebp)
1111de: e8 f1 c6 ff ff call 10d8d4 <_Chain_Append>
rtems_chain_append (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
1111e3: 8b 45 e4 mov -0x1c(%ebp),%eax
1111e6: 31 d2 xor %edx,%edx
1111e8: f7 35 00 c1 12 00 divl 0x12c100
1111ee: a1 00 c1 12 00 mov 0x12c100,%eax
1111f3: 48 dec %eax
1111f4: 83 c4 10 add $0x10,%esp
1111f7: 39 c2 cmp %eax,%edx
1111f9: 8b 4d e0 mov -0x20(%ebp),%ecx
1111fc: 75 03 jne 111201 <rtems_bdbuf_init+0x359>
(bdbuf_cache.max_bds_per_group - 1))
group++;
1111fe: 83 c7 14 add $0x14,%edi
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
111201: ff 45 e4 incl -0x1c(%ebp)
111204: 83 c6 3c add $0x3c,%esi
111207: 01 d9 add %ebx,%ecx
111209: eb a9 jmp 1111b4 <rtems_bdbuf_init+0x30c>
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
group = bdbuf_cache.groups,
11120b: a1 64 c1 12 00 mov 0x12c164,%eax
bd = bdbuf_cache.bds;
111210: 8b 0d f4 c0 12 00 mov 0x12c0f4,%ecx
111216: 8b 3d 60 c1 12 00 mov 0x12c160,%edi
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
11121c: 8b 1d 00 c1 12 00 mov 0x12c100,%ebx
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
111222: 6b f3 3c imul $0x3c,%ebx,%esi
111225: 31 d2 xor %edx,%edx
if ((b % bdbuf_cache.max_bds_per_group) ==
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
111227: 39 fa cmp %edi,%edx
111229: 73 0e jae 111239 <rtems_bdbuf_init+0x391>
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
11122b: 89 58 08 mov %ebx,0x8(%eax)
group->bdbuf = bd;
11122e: 89 48 10 mov %ecx,0x10(%eax)
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
111231: 42 inc %edx
group++,
111232: 83 c0 14 add $0x14,%eax
bd += bdbuf_cache.max_bds_per_group)
111235: 01 f1 add %esi,%ecx
111237: eb ee jmp 111227 <rtems_bdbuf_init+0x37f>
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
111239: c6 05 e4 c0 12 00 01 movb $0x1,0x12c0e4
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
bdbuf_config.swapout_priority ?
111240: a1 48 4a 12 00 mov 0x124a48,%eax
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
111245: 85 c0 test %eax,%eax
111247: 75 02 jne 11124b <rtems_bdbuf_init+0x3a3><== ALWAYS TAKEN
111249: b0 0f mov $0xf,%al <== NOT EXECUTED
11124b: 56 push %esi
11124c: 56 push %esi
11124d: 68 e0 c0 12 00 push $0x12c0e0
111252: 6a 00 push $0x0
111254: 68 00 04 00 00 push $0x400
111259: 68 00 20 00 00 push $0x2000
11125e: 50 push %eax
11125f: 68 50 57 53 42 push $0x42535750
111264: e8 b7 bd ff ff call 10d020 <rtems_task_create>
RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT,
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&bdbuf_cache.swapout);
if (sc != RTEMS_SUCCESSFUL)
111269: 83 c4 20 add $0x20,%esp
11126c: 85 c0 test %eax,%eax
11126e: 0f 85 6d fd ff ff jne 110fe1 <rtems_bdbuf_init+0x139><== NEVER TAKEN
goto error;
sc = rtems_task_start (bdbuf_cache.swapout,
111274: 53 push %ebx
111275: 68 e0 c0 12 00 push $0x12c0e0
11127a: 68 3c 1c 11 00 push $0x111c3c
11127f: ff 35 e0 c0 12 00 pushl 0x12c0e0
111285: e8 f6 bf ff ff call 10d280 <rtems_task_start>
rtems_bdbuf_swapout_task,
(rtems_task_argument) &bdbuf_cache);
if (sc != RTEMS_SUCCESSFUL)
11128a: 83 c4 10 add $0x10,%esp
11128d: 85 c0 test %eax,%eax
11128f: 0f 85 4c fd ff ff jne 110fe1 <rtems_bdbuf_init+0x139><== NEVER TAKEN
goto error;
rtems_bdbuf_unlock_cache ();
111295: e8 de f7 ff ff call 110a78 <rtems_bdbuf_unlock_cache>
11129a: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
11129c: e9 34 fc ff ff jmp 110ed5 <rtems_bdbuf_init+0x2d>
001108c0 <rtems_bdbuf_lock>:
* @param lock The mutex to lock.
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
1108c0: 55 push %ebp
1108c1: 89 e5 mov %esp,%ebp
1108c3: 53 push %ebx
1108c4: 83 ec 08 sub $0x8,%esp
1108c7: 89 d3 mov %edx,%ebx
rtems_status_code sc = rtems_semaphore_obtain (lock,
1108c9: 6a 00 push $0x0
1108cb: 6a 00 push $0x0
1108cd: 50 push %eax
1108ce: e8 b1 c5 ff ff call 10ce84 <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1108d3: 83 c4 10 add $0x10,%esp
1108d6: 85 c0 test %eax,%eax
1108d8: 75 05 jne 1108df <rtems_bdbuf_lock+0x1f> <== NEVER TAKEN
rtems_fatal_error_occurred (fatal_error_code);
}
1108da: 8b 5d fc mov -0x4(%ebp),%ebx
1108dd: c9 leave
1108de: c3 ret
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
1108df: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1108e2: 53 push %ebx <== NOT EXECUTED
1108e3: e8 6c cb ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
00110ac8 <rtems_bdbuf_obtain_disk>:
rtems_bdbuf_obtain_disk (dev_t dev,
rtems_blkdev_bnum block,
rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
110ac8: 55 push %ebp
110ac9: 89 e5 mov %esp,%ebp
110acb: 57 push %edi
110acc: 56 push %esi
110acd: 53 push %ebx
110ace: 83 ec 2c sub $0x2c,%esp
110ad1: 8b 75 0c mov 0xc(%ebp),%esi
110ad4: 8b 7d 10 mov 0x10(%ebp),%edi
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
110ad7: 80 3d 68 c1 12 00 00 cmpb $0x0,0x12c168
110ade: 75 10 jne 110af0 <rtems_bdbuf_obtain_disk+0x28><== ALWAYS TAKEN
110ae0: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
*bds_per_group_ptr = bds_per_group;
}
return RTEMS_SUCCESSFUL;
}
110ae5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
110ae8: 5b pop %ebx <== NOT EXECUTED
110ae9: 5e pop %esi <== NOT EXECUTED
110aea: 5f pop %edi <== NOT EXECUTED
110aeb: c9 leave <== NOT EXECUTED
110aec: c3 ret <== NOT EXECUTED
110aed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return RTEMS_NOT_CONFIGURED;
/*
* Do not hold the cache lock when obtaining the disk table.
*/
dd = rtems_disk_obtain (dev);
110af0: 83 ec 08 sub $0x8,%esp
110af3: 52 push %edx
110af4: 50 push %eax
110af5: 89 4d dc mov %ecx,-0x24(%ebp)
110af8: e8 1b 7a ff ff call 108518 <rtems_disk_obtain>
110afd: 89 c3 mov %eax,%ebx
if (dd == NULL)
110aff: 83 c4 10 add $0x10,%esp
110b02: 85 c0 test %eax,%eax
110b04: 8b 4d dc mov -0x24(%ebp),%ecx
110b07: 0f 84 93 00 00 00 je 110ba0 <rtems_bdbuf_obtain_disk+0xd8><== NEVER TAKEN
return RTEMS_INVALID_ID;
*dd_ptr = dd;
110b0d: 8b 45 08 mov 0x8(%ebp),%eax
110b10: 89 18 mov %ebx,(%eax)
if (media_block_ptr != NULL)
110b12: 85 f6 test %esi,%esi
110b14: 74 2a je 110b40 <rtems_bdbuf_obtain_disk+0x78>
static rtems_blkdev_bnum
rtems_bdbuf_media_block (rtems_blkdev_bnum block,
size_t block_size,
size_t media_block_size)
{
return (rtems_blkdev_bnum)
110b16: 89 c8 mov %ecx,%eax
110b18: f7 63 20 mull 0x20(%ebx)
110b1b: 89 45 d0 mov %eax,-0x30(%ebp)
110b1e: 89 55 d4 mov %edx,-0x2c(%ebp)
110b21: 8b 43 24 mov 0x24(%ebx),%eax
110b24: 31 d2 xor %edx,%edx
110b26: 52 push %edx
110b27: 50 push %eax
110b28: ff 75 d4 pushl -0x2c(%ebp)
110b2b: ff 75 d0 pushl -0x30(%ebp)
110b2e: e8 3d 34 01 00 call 123f70 <__udivdi3>
110b33: 83 c4 10 add $0x10,%esp
* the user.
*/
rtems_blkdev_bnum mb = rtems_bdbuf_media_block (block,
dd->block_size,
dd->media_block_size);
if (mb >= dd->size)
110b36: 39 43 1c cmp %eax,0x1c(%ebx)
110b39: 76 49 jbe 110b84 <rtems_bdbuf_obtain_disk+0xbc><== NEVER TAKEN
{
rtems_disk_release(dd);
return RTEMS_INVALID_NUMBER;
}
*media_block_ptr = mb + dd->start;
110b3b: 03 43 18 add 0x18(%ebx),%eax
110b3e: 89 06 mov %eax,(%esi)
}
if (bds_per_group_ptr != NULL)
110b40: 85 ff test %edi,%edi
110b42: 74 35 je 110b79 <rtems_bdbuf_obtain_disk+0xb1>
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
110b44: 8b 43 20 mov 0x20(%ebx),%eax
rtems_bdbuf_bds_per_group (size_t size)
{
size_t bufs_per_size;
size_t bds_per_size;
if (size > bdbuf_config.buffer_max)
110b47: 3b 05 64 4a 12 00 cmp 0x124a64,%eax
110b4d: 77 35 ja 110b84 <rtems_bdbuf_obtain_disk+0xbc><== NEVER TAKEN
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
110b4f: 48 dec %eax
110b50: 31 d2 xor %edx,%edx
110b52: f7 35 60 4a 12 00 divl 0x124a60
110b58: 40 inc %eax
for (bds_per_size = 1;
110b59: 83 f8 01 cmp $0x1,%eax
110b5c: 76 4c jbe 110baa <rtems_bdbuf_obtain_disk+0xe2>
110b5e: b9 01 00 00 00 mov $0x1,%ecx
110b63: 90 nop
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
110b64: d1 e1 shl %ecx
if (size > bdbuf_config.buffer_max)
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
for (bds_per_size = 1;
110b66: 39 c8 cmp %ecx,%eax
110b68: 77 fa ja 110b64 <rtems_bdbuf_obtain_disk+0x9c><== NEVER TAKEN
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
;
return bdbuf_cache.max_bds_per_group / bds_per_size;
110b6a: a1 00 c1 12 00 mov 0x12c100,%eax
110b6f: 31 d2 xor %edx,%edx
110b71: f7 f1 div %ecx
if (bds_per_group_ptr != NULL)
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
if (bds_per_group == 0)
110b73: 85 c0 test %eax,%eax
110b75: 74 0d je 110b84 <rtems_bdbuf_obtain_disk+0xbc><== NEVER TAKEN
{
rtems_disk_release (dd);
return RTEMS_INVALID_NUMBER;
}
*bds_per_group_ptr = bds_per_group;
110b77: 89 07 mov %eax,(%edi)
110b79: 31 c0 xor %eax,%eax
}
return RTEMS_SUCCESSFUL;
}
110b7b: 8d 65 f4 lea -0xc(%ebp),%esp
110b7e: 5b pop %ebx
110b7f: 5e pop %esi
110b80: 5f pop %edi
110b81: c9 leave
110b82: c3 ret
110b83: 90 nop
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
if (bds_per_group == 0)
{
rtems_disk_release (dd);
110b84: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110b87: 53 push %ebx <== NOT EXECUTED
110b88: e8 67 7b ff ff call 1086f4 <rtems_disk_release> <== NOT EXECUTED
110b8d: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
110b92: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
*bds_per_group_ptr = bds_per_group;
}
return RTEMS_SUCCESSFUL;
}
110b95: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
110b98: 5b pop %ebx <== NOT EXECUTED
110b99: 5e pop %esi <== NOT EXECUTED
110b9a: 5f pop %edi <== NOT EXECUTED
110b9b: c9 leave <== NOT EXECUTED
110b9c: c3 ret <== NOT EXECUTED
110b9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Do not hold the cache lock when obtaining the disk table.
*/
dd = rtems_disk_obtain (dev);
if (dd == NULL)
110ba0: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
110ba5: e9 3b ff ff ff jmp 110ae5 <rtems_bdbuf_obtain_disk+0x1d><== NOT EXECUTED
if (size > bdbuf_config.buffer_max)
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
for (bds_per_size = 1;
110baa: b9 01 00 00 00 mov $0x1,%ecx
110baf: eb b9 jmp 110b6a <rtems_bdbuf_obtain_disk+0xa2>
001117fc <rtems_bdbuf_purge>:
}
}
static void
rtems_bdbuf_purge (rtems_bdbuf_purge_compare compare, dev_t dev)
{
1117fc: 55 push %ebp
1117fd: 89 e5 mov %esp,%ebp
1117ff: 57 push %edi
111800: 56 push %esi
111801: 53 push %ebx
111802: 81 ec bc 00 00 00 sub $0xbc,%esp
111808: 89 85 54 ff ff ff mov %eax,-0xac(%ebp)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
11180e: 8d 7d dc lea -0x24(%ebp),%edi
111811: 8d 45 e0 lea -0x20(%ebp),%eax
111814: 89 45 dc mov %eax,-0x24(%ebp)
the_chain->permanent_null = NULL;
111817: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
the_chain->last = _Chain_Head(the_chain);
11181e: 89 7d e4 mov %edi,-0x1c(%ebp)
rtems_chain_control purge_list;
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
111821: 89 95 44 ff ff ff mov %edx,-0xbc(%ebp)
111827: 89 8d 40 ff ff ff mov %ecx,-0xc0(%ebp)
11182d: e8 b6 f0 ff ff call 1108e8 <rtems_bdbuf_lock_cache>
rtems_bdbuf_purge_compare compare,
dev_t dev)
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
111832: 8b 1d 20 c1 12 00 mov 0x12c120,%ebx
*prev = NULL;
111838: c7 85 5c ff ff ff 00 movl $0x0,-0xa4(%ebp)
11183f: 00 00 00
while (cur != NULL)
111842: 85 db test %ebx,%ebx
111844: 8b 95 44 ff ff ff mov -0xbc(%ebp),%edx
11184a: 8b 8d 40 ff ff ff mov -0xc0(%ebp),%ecx
111850: 0f 84 ae 00 00 00 je 111904 <rtems_bdbuf_purge+0x108><== NEVER TAKEN
111856: 8d b5 5c ff ff ff lea -0xa4(%ebp),%esi
11185c: 89 95 48 ff ff ff mov %edx,-0xb8(%ebp)
111862: 89 8d 4c ff ff ff mov %ecx,-0xb4(%ebp)
{
if ((*compare) (cur->dev, dev))
111868: ff b5 4c ff ff ff pushl -0xb4(%ebp)
11186e: ff b5 48 ff ff ff pushl -0xb8(%ebp)
111874: ff 73 18 pushl 0x18(%ebx)
111877: ff 73 14 pushl 0x14(%ebx)
11187a: ff 95 54 ff ff ff call *-0xac(%ebp)
111880: 83 c4 10 add $0x10,%esp
111883: 84 c0 test %al,%al
111885: 74 1d je 1118a4 <rtems_bdbuf_purge+0xa8><== NEVER TAKEN
{
switch (cur->state)
111887: 8b 43 24 mov 0x24(%ebx),%eax
11188a: 83 f8 0a cmp $0xa,%eax
11188d: 76 2d jbe 1118bc <rtems_bdbuf_purge+0xc0><== ALWAYS TAKEN
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_set_state (cur, RTEMS_BDBUF_STATE_ACCESS_PURGED);
break;
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
11188f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111892: 68 01 00 00 42 push $0x42000001 <== NOT EXECUTED
111897: e8 b8 bb ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
11189c: c7 43 24 0a 00 00 00 movl $0xa,0x24(%ebx)
1118a3: 90 nop
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
1118a4: 8b 53 08 mov 0x8(%ebx),%edx
1118a7: 85 d2 test %edx,%edx
1118a9: 74 45 je 1118f0 <rtems_bdbuf_purge+0xf4><== ALWAYS TAKEN
{
/* Left */
++prev;
1118ab: 83 c6 04 add $0x4,%esi <== NOT EXECUTED
*prev = cur;
1118ae: 89 1e mov %ebx,(%esi) <== NOT EXECUTED
cur = cur->avl.left;
1118b0: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
1118b3: 85 c0 test %eax,%eax <== NOT EXECUTED
1118b5: 74 4d je 111904 <rtems_bdbuf_purge+0x108><== NOT EXECUTED
1118b7: 89 c3 mov %eax,%ebx <== NOT EXECUTED
1118b9: eb ad jmp 111868 <rtems_bdbuf_purge+0x6c><== NOT EXECUTED
1118bb: 90 nop <== NOT EXECUTED
{
if ((*compare) (cur->dev, dev))
{
switch (cur->state)
1118bc: ff 24 85 44 68 12 00 jmp *0x126844(,%eax,4)
1118c3: 90 nop
case RTEMS_BDBUF_STATE_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
break;
case RTEMS_BDBUF_STATE_SYNC:
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
1118c4: b8 50 c1 12 00 mov $0x12c150,%eax
1118c9: e8 2e f0 ff ff call 1108fc <rtems_bdbuf_wake>
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
1118ce: 8b 43 2c mov 0x2c(%ebx),%eax
1118d1: ff 48 0c decl 0xc(%eax)
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
1118d4: 83 ec 0c sub $0xc,%esp
1118d7: 53 push %ebx
1118d8: e8 1b c0 ff ff call 10d8f8 <_Chain_Extract>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
1118dd: 59 pop %ecx
1118de: 58 pop %eax
1118df: 53 push %ebx
1118e0: 57 push %edi
1118e1: e8 ee bf ff ff call 10d8d4 <_Chain_Append>
1118e6: 83 c4 10 add $0x10,%esp
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
1118e9: 8b 53 08 mov 0x8(%ebx),%edx
1118ec: 85 d2 test %edx,%edx
1118ee: 75 bb jne 1118ab <rtems_bdbuf_purge+0xaf><== NEVER TAKEN
/* Left */
++prev;
*prev = cur;
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
1118f0: 8b 43 0c mov 0xc(%ebx),%eax
1118f3: 85 c0 test %eax,%eax
1118f5: 74 59 je 111950 <rtems_bdbuf_purge+0x154><== ALWAYS TAKEN
{
/* Right */
++prev;
1118f7: 83 c6 04 add $0x4,%esi <== NOT EXECUTED
*prev = cur;
1118fa: 89 1e mov %ebx,(%esi) <== NOT EXECUTED
cur = cur->avl.right;
1118fc: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
1118ff: 85 c0 test %eax,%eax <== NOT EXECUTED
111901: 75 b4 jne 1118b7 <rtems_bdbuf_purge+0xbb><== NOT EXECUTED
111903: 90 nop <== NOT EXECUTED
111904: 31 db xor %ebx,%ebx
111906: eb 0e jmp 111916 <rtems_bdbuf_purge+0x11a>
while ((node = rtems_chain_get (purge_list)) != NULL)
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
111908: 8b 50 28 mov 0x28(%eax),%edx
11190b: 85 d2 test %edx,%edx
11190d: 75 02 jne 111911 <rtems_bdbuf_purge+0x115>
11190f: b3 01 mov $0x1,%bl
wake_buffer_waiters = true;
rtems_bdbuf_discard_buffer (bd);
111911: e8 2e fd ff ff call 111644 <rtems_bdbuf_discard_buffer>
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
111916: 83 ec 0c sub $0xc,%esp
111919: 57 push %edi
11191a: e8 f1 bf ff ff call 10d910 <_Chain_Get>
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
rtems_chain_node *node = NULL;
while ((node = rtems_chain_get (purge_list)) != NULL)
11191f: 83 c4 10 add $0x10,%esp
111922: 85 c0 test %eax,%eax
111924: 75 e2 jne 111908 <rtems_bdbuf_purge+0x10c>
wake_buffer_waiters = true;
rtems_bdbuf_discard_buffer (bd);
}
if (wake_buffer_waiters)
111926: 84 db test %bl,%bl
111928: 74 0a je 111934 <rtems_bdbuf_purge+0x138>
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
11192a: b8 58 c1 12 00 mov $0x12c158,%eax
11192f: e8 c8 ef ff ff call 1108fc <rtems_bdbuf_wake>
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_gather_for_purge (&purge_list, compare, dev);
rtems_bdbuf_purge_list (&purge_list);
rtems_bdbuf_unlock_cache ();
111934: e8 3f f1 ff ff call 110a78 <rtems_bdbuf_unlock_cache>
}
111939: 8d 65 f4 lea -0xc(%ebp),%esp
11193c: 5b pop %ebx
11193d: 5e pop %esi
11193e: 5f pop %edi
11193f: c9 leave
111940: c3 ret
111941: 8d 76 00 lea 0x0(%esi),%esi
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
111944: c7 43 24 06 00 00 00 movl $0x6,0x24(%ebx)
11194b: e9 54 ff ff ff jmp 1118a4 <rtems_bdbuf_purge+0xa8>
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL && cur == (*prev)->avl.right)
111950: 8b 0e mov (%esi),%ecx
111952: 85 c9 test %ecx,%ecx
111954: 74 ae je 111904 <rtems_bdbuf_purge+0x108><== ALWAYS TAKEN
111956: 8b 41 0c mov 0xc(%ecx),%eax <== NOT EXECUTED
111959: 39 c3 cmp %eax,%ebx <== NOT EXECUTED
11195b: 74 14 je 111971 <rtems_bdbuf_purge+0x175><== NOT EXECUTED
11195d: e9 51 ff ff ff jmp 1118b3 <rtems_bdbuf_purge+0xb7><== NOT EXECUTED
111962: 66 90 xchg %ax,%ax <== NOT EXECUTED
111964: 8b 42 0c mov 0xc(%edx),%eax <== NOT EXECUTED
111967: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
111969: 0f 85 44 ff ff ff jne 1118b3 <rtems_bdbuf_purge+0xb7><== NOT EXECUTED
else if (cur->avl.right != NULL)
{
/* Right */
++prev;
*prev = cur;
cur = cur->avl.right;
11196f: 89 d1 mov %edx,%ecx <== NOT EXECUTED
{
while (*prev != NULL && cur == (*prev)->avl.right)
{
/* Up */
cur = *prev;
--prev;
111971: 83 ee 04 sub $0x4,%esi <== NOT EXECUTED
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL && cur == (*prev)->avl.right)
111974: 8b 16 mov (%esi),%edx <== NOT EXECUTED
111976: 85 d2 test %edx,%edx <== NOT EXECUTED
111978: 75 ea jne 111964 <rtems_bdbuf_purge+0x168><== NOT EXECUTED
11197a: eb 88 jmp 111904 <rtems_bdbuf_purge+0x108><== NOT EXECUTED
001108b0 <rtems_bdbuf_purge_compare_major>:
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_dev, dev);
}
static bool
rtems_bdbuf_purge_compare_major (dev_t a, dev_t b)
{
1108b0: 55 push %ebp <== NOT EXECUTED
1108b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
1108b3: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
1108b6: 39 45 08 cmp %eax,0x8(%ebp) <== NOT EXECUTED
1108b9: 0f 94 c0 sete %al <== NOT EXECUTED
return rtems_filesystem_dev_major_t (a) == rtems_filesystem_dev_major_t (b);
}
1108bc: c9 leave <== NOT EXECUTED
1108bd: c3 ret <== NOT EXECUTED
0011197c <rtems_bdbuf_purge_major>:
return rtems_filesystem_dev_major_t (a) == rtems_filesystem_dev_major_t (b);
}
void
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
11197c: 55 push %ebp <== NOT EXECUTED
11197d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11197f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
111982: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
111985: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
111987: b8 b0 08 11 00 mov $0x1108b0,%eax <== NOT EXECUTED
}
11198c: c9 leave <== NOT EXECUTED
void
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
11198d: e9 6a fe ff ff jmp 1117fc <rtems_bdbuf_purge> <== NOT EXECUTED
001127b4 <rtems_bdbuf_read>:
rtems_status_code
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
1127b4: 55 push %ebp
1127b5: 89 e5 mov %esp,%ebp
1127b7: 57 push %edi
1127b8: 56 push %esi
1127b9: 53 push %ebx
1127ba: 83 ec 50 sub $0x50,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
1127bd: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
rtems_blkdev_request *req = NULL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
1127c4: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
size_t bds_per_group = 0;
1127cb: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
1127d2: 8d 45 dc lea -0x24(%ebp),%eax
1127d5: 50 push %eax
1127d6: 8d 45 e0 lea -0x20(%ebp),%eax
1127d9: 50 push %eax
1127da: 8d 45 e4 lea -0x1c(%ebp),%eax
1127dd: 50 push %eax
1127de: 8b 4d 10 mov 0x10(%ebp),%ecx
1127e1: 8b 45 08 mov 0x8(%ebp),%eax
1127e4: 8b 55 0c mov 0xc(%ebp),%edx
1127e7: e8 dc e2 ff ff call 110ac8 <rtems_bdbuf_obtain_disk>
if (sc != RTEMS_SUCCESSFUL)
1127ec: 83 c4 10 add $0x10,%esp
1127ef: 85 c0 test %eax,%eax
1127f1: 74 0d je 112800 <rtems_bdbuf_read+0x4c> <== ALWAYS TAKEN
1127f3: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rtems_bdbuf_unlock_cache ();
rtems_bdbuf_release_disk (dd);
return sc;
}
1127f5: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1127f7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1127fa: 5b pop %ebx <== NOT EXECUTED
1127fb: 5e pop %esi <== NOT EXECUTED
1127fc: 5f pop %edi <== NOT EXECUTED
1127fd: c9 leave <== NOT EXECUTED
1127fe: c3 ret <== NOT EXECUTED
1127ff: 90 nop <== NOT EXECUTED
/*
* TODO: This type of request structure is wrong and should be removed.
*/
#define bdbuf_alloc(size) __builtin_alloca (size)
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
112800: 8b 3d 40 4a 12 00 mov 0x124a40,%edi
112806: 47 inc %edi
112807: 89 f8 mov %edi,%eax
112809: c1 e0 04 shl $0x4,%eax
11280c: 83 c0 30 add $0x30,%eax
11280f: 29 c4 sub %eax,%esp
112811: 8d 44 24 0f lea 0xf(%esp),%eax
112815: 83 e0 f0 and $0xfffffff0,%eax
112818: 89 45 cc mov %eax,-0x34(%ebp)
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
11281b: e8 c8 e0 ff ff call 1108e8 <rtems_bdbuf_lock_cache>
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
112820: 8b 55 dc mov -0x24(%ebp),%edx
112823: 89 55 b8 mov %edx,-0x48(%ebp)
112826: 8b 4d e0 mov -0x20(%ebp),%ecx
112829: 89 4d d0 mov %ecx,-0x30(%ebp)
11282c: 8b 4d e4 mov -0x1c(%ebp),%ecx
size_t bds_per_group,
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
11282f: 8b 41 18 mov 0x18(%ecx),%eax
112832: 89 45 d4 mov %eax,-0x2c(%ebp)
112835: 8b 51 1c mov 0x1c(%ecx),%edx
112838: 89 55 bc mov %edx,-0x44(%ebp)
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
11283b: 8b 41 20 mov 0x20(%ecx),%eax
11283e: 89 45 c0 mov %eax,-0x40(%ebp)
112841: 31 d2 xor %edx,%edx
112843: f7 71 24 divl 0x24(%ecx)
112846: 89 45 c4 mov %eax,-0x3c(%ebp)
dev_t dev = dd->dev;
112849: 8b 31 mov (%ecx),%esi
11284b: 8b 59 04 mov 0x4(%ecx),%ebx
uint32_t transfer_count = bdbuf_config.max_read_ahead_blocks + 1;
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
11284e: 8b 55 cc mov -0x34(%ebp),%edx
112851: c7 02 00 00 00 00 movl $0x0,(%edx)
req->req_done = rtems_bdbuf_transfer_done;
112857: c7 42 04 b8 0c 11 00 movl $0x110cb8,0x4(%edx)
req->done_arg = req;
11285e: 89 52 08 mov %edx,0x8(%edx)
req->io_task = rtems_task_self ();
112861: e8 d6 31 00 00 call 115a3c <rtems_task_self>
112866: 8b 4d cc mov -0x34(%ebp),%ecx
112869: 89 41 14 mov %eax,0x14(%ecx)
req->status = RTEMS_RESOURCE_IN_USE;
11286c: c7 41 0c 0c 00 00 00 movl $0xc,0xc(%ecx)
req->bufnum = 0;
112873: c7 41 10 00 00 00 00 movl $0x0,0x10(%ecx)
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
11287a: 83 ec 0c sub $0xc,%esp
11287d: ff 75 b8 pushl -0x48(%ebp)
112880: 8b 4d d0 mov -0x30(%ebp),%ecx
112883: 89 f0 mov %esi,%eax
112885: 89 da mov %ebx,%edx
112887: e8 a4 fc ff ff call 112530 <rtems_bdbuf_get_buffer_for_access>
11288c: 89 45 c8 mov %eax,-0x38(%ebp)
*bd_ptr = bd;
req->bufs [0].user = bd;
11288f: 8b 55 cc mov -0x34(%ebp),%edx
112892: 89 42 24 mov %eax,0x24(%edx)
req->bufs [0].block = media_block;
112895: 8b 4d d0 mov -0x30(%ebp),%ecx
112898: 89 4a 18 mov %ecx,0x18(%edx)
req->bufs [0].length = block_size;
11289b: 8b 45 c0 mov -0x40(%ebp),%eax
11289e: 89 42 1c mov %eax,0x1c(%edx)
req->bufs [0].buffer = bd->buffer;
1128a1: 8b 55 c8 mov -0x38(%ebp),%edx
1128a4: 8b 42 20 mov 0x20(%edx),%eax
1128a7: 8b 4d cc mov -0x34(%ebp),%ecx
1128aa: 89 41 20 mov %eax,0x20(%ecx)
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
1128ad: 8b 42 24 mov 0x24(%edx),%eax
1128b0: 83 c4 10 add $0x10,%esp
1128b3: 83 f8 02 cmp $0x2,%eax
1128b6: 0f 84 4a 01 00 00 je 112a06 <rtems_bdbuf_read+0x252>
1128bc: 83 f8 07 cmp $0x7,%eax
1128bf: 0f 84 41 01 00 00 je 112a06 <rtems_bdbuf_read+0x252>
1128c5: 48 dec %eax
1128c6: 74 17 je 1128df <rtems_bdbuf_read+0x12b><== ALWAYS TAKEN
return;
case RTEMS_BDBUF_STATE_EMPTY:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
1128c8: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
1128cb: 8b 42 24 mov 0x24(%edx),%eax <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
1128ce: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1128d1: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
1128d4: 0d 1d 00 00 42 or $0x4200001d,%eax <== NOT EXECUTED
1128d9: 50 push %eax <== NOT EXECUTED
1128da: e8 75 ab ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
1128df: 8b 55 bc mov -0x44(%ebp),%edx
1128e2: 03 55 d4 add -0x2c(%ebp),%edx
1128e5: 8b 4d d0 mov -0x30(%ebp),%ecx
1128e8: 29 ca sub %ecx,%edx
1128ea: 89 55 b4 mov %edx,-0x4c(%ebp)
1128ed: 39 fa cmp %edi,%edx
1128ef: 76 03 jbe 1128f4 <rtems_bdbuf_read+0x140>
1128f1: 89 7d b4 mov %edi,-0x4c(%ebp)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
1128f4: 8b 45 c8 mov -0x38(%ebp),%eax
1128f7: c7 40 24 09 00 00 00 movl $0x9,0x24(%eax)
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
1128fe: 83 7d b4 01 cmpl $0x1,-0x4c(%ebp)
112902: 0f 86 7d 01 00 00 jbe 112a85 <rtems_bdbuf_read+0x2d1>
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
112908: 8b 4d cc mov -0x34(%ebp),%ecx
11290b: 89 4d b0 mov %ecx,-0x50(%ebp)
11290e: c7 45 bc 01 00 00 00 movl $0x1,-0x44(%ebp)
break;
}
while (transfer_index < transfer_count)
{
media_block += media_block_count;
112915: 8b 45 c4 mov -0x3c(%ebp),%eax
112918: 01 45 d0 add %eax,-0x30(%ebp)
static rtems_bdbuf_buffer *
rtems_bdbuf_avl_search (rtems_bdbuf_buffer** root,
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
11291b: a1 20 c1 12 00 mov 0x12c120,%eax
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
112920: 85 c0 test %eax,%eax
112922: 74 3b je 11295f <rtems_bdbuf_read+0x1ab><== NEVER TAKEN
112924: 89 75 d4 mov %esi,-0x2c(%ebp)
112927: eb 11 jmp 11293a <rtems_bdbuf_read+0x186>
112929: 8d 76 00 lea 0x0(%esi),%esi
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
11292c: 72 05 jb 112933 <rtems_bdbuf_read+0x17f><== NOT EXECUTED
11292e: 39 4d d4 cmp %ecx,-0x2c(%ebp) <== NOT EXECUTED
112931: 77 22 ja 112955 <rtems_bdbuf_read+0x1a1><== NOT EXECUTED
{
p = p->avl.right;
}
else
{
p = p->avl.left;
112933: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
112936: 85 c0 test %eax,%eax <== NOT EXECUTED
112938: 74 22 je 11295c <rtems_bdbuf_read+0x1a8><== NOT EXECUTED
11293a: 8b 48 14 mov 0x14(%eax),%ecx
11293d: 8b 50 18 mov 0x18(%eax),%edx
112940: 89 df mov %ebx,%edi
112942: 31 d7 xor %edx,%edi
112944: 8b 75 d4 mov -0x2c(%ebp),%esi
112947: 31 ce xor %ecx,%esi
112949: 09 f7 or %esi,%edi
11294b: 0f 84 9f 00 00 00 je 1129f0 <rtems_bdbuf_read+0x23c><== ALWAYS TAKEN
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
112951: 39 d3 cmp %edx,%ebx <== NOT EXECUTED
112953: 76 d7 jbe 11292c <rtems_bdbuf_read+0x178><== NOT EXECUTED
{
p = p->avl.right;
112955: 8b 40 0c mov 0xc(%eax),%eax <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
112958: 85 c0 test %eax,%eax
11295a: 75 de jne 11293a <rtems_bdbuf_read+0x186><== NEVER TAKEN
11295c: 8b 75 d4 mov -0x2c(%ebp),%esi
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
if (bd == NULL)
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dev, block, bds_per_group);
11295f: 83 ec 0c sub $0xc,%esp
112962: ff 75 b8 pushl -0x48(%ebp)
112965: 8b 4d d0 mov -0x30(%ebp),%ecx
112968: 89 f0 mov %esi,%eax
11296a: 89 da mov %ebx,%edx
11296c: e8 f3 f7 ff ff call 112164 <rtems_bdbuf_get_buffer_from_lru_list>
if (bd != NULL)
112971: 83 c4 10 add $0x10,%esp
112974: 85 c0 test %eax,%eax
112976: 74 3c je 1129b4 <rtems_bdbuf_read+0x200><== ALWAYS TAKEN
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
112978: 8b 50 2c mov 0x2c(%eax),%edx <== NOT EXECUTED
11297b: ff 42 0c incl 0xc(%edx) <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
11297e: c7 40 24 09 00 00 00 movl $0x9,0x24(%eax) <== NOT EXECUTED
if (bd == NULL)
break;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [transfer_index].user = bd;
112985: 8b 4d b0 mov -0x50(%ebp),%ecx <== NOT EXECUTED
112988: 89 41 34 mov %eax,0x34(%ecx) <== NOT EXECUTED
req->bufs [transfer_index].block = media_block;
11298b: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
11298e: 89 51 28 mov %edx,0x28(%ecx) <== NOT EXECUTED
req->bufs [transfer_index].length = block_size;
112991: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
112994: 89 51 2c mov %edx,0x2c(%ecx) <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
112997: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
11299a: 89 41 30 mov %eax,0x30(%ecx) <== NOT EXECUTED
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
11299d: ff 45 bc incl -0x44(%ebp) <== NOT EXECUTED
1129a0: 83 c1 10 add $0x10,%ecx <== NOT EXECUTED
1129a3: 89 4d b0 mov %ecx,-0x50(%ebp) <== NOT EXECUTED
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
1129a6: 8b 4d b4 mov -0x4c(%ebp),%ecx <== NOT EXECUTED
1129a9: 39 4d bc cmp %ecx,-0x44(%ebp) <== NOT EXECUTED
1129ac: 0f 82 63 ff ff ff jb 112915 <rtems_bdbuf_read+0x161><== NOT EXECUTED
1129b2: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
}
req->bufnum = transfer_index;
1129b4: 8b 55 bc mov -0x44(%ebp),%edx
1129b7: 8b 45 cc mov -0x34(%ebp),%eax
1129ba: 89 50 10 mov %edx,0x10(%eax)
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
if (req->bufnum > 0)
1129bd: 8b 4d bc mov -0x44(%ebp),%ecx
1129c0: 85 c9 test %ecx,%ecx
1129c2: 75 4d jne 112a11 <rtems_bdbuf_read+0x25d>
}
}
if (sc == RTEMS_SUCCESSFUL)
{
switch (bd->state)
1129c4: 8b 55 c8 mov -0x38(%ebp),%edx
1129c7: 8b 42 24 mov 0x24(%edx),%eax
1129ca: 83 f8 02 cmp $0x2,%eax
1129cd: 0f 84 8a 00 00 00 je 112a5d <rtems_bdbuf_read+0x2a9>
1129d3: 83 f8 07 cmp $0x7,%eax
1129d6: 74 6f je 112a47 <rtems_bdbuf_read+0x293><== ALWAYS TAKEN
break;
case RTEMS_BDBUF_STATE_MODIFIED:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_4);
1129d8: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
1129db: 8b 42 24 mov 0x24(%edx),%eax <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
1129de: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1129e1: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
1129e4: 0d 02 00 00 42 or $0x42000002,%eax <== NOT EXECUTED
1129e9: 50 push %eax <== NOT EXECUTED
1129ea: e8 65 aa ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
1129ef: 90 nop <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
1129f0: 8b 55 d0 mov -0x30(%ebp),%edx
1129f3: 3b 50 1c cmp 0x1c(%eax),%edx
1129f6: 74 bc je 1129b4 <rtems_bdbuf_read+0x200><== NEVER TAKEN
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
1129f8: 0f 86 35 ff ff ff jbe 112933 <rtems_bdbuf_read+0x17f><== NEVER TAKEN
{
p = p->avl.right;
1129fe: 8b 40 0c mov 0xc(%eax),%eax
112a01: e9 52 ff ff ff jmp 112958 <rtems_bdbuf_read+0x1a4>
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
112a06: 8b 45 cc mov -0x34(%ebp),%eax
112a09: 8b 40 10 mov 0x10(%eax),%eax
112a0c: 89 45 bc mov %eax,-0x44(%ebp)
112a0f: eb ac jmp 1129bd <rtems_bdbuf_read+0x209>
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
if (req->bufnum > 0)
{
sc = rtems_bdbuf_execute_transfer_request (dd, req, true);
112a11: b9 01 00 00 00 mov $0x1,%ecx
112a16: 8b 55 cc mov -0x34(%ebp),%edx
112a19: 8b 45 e4 mov -0x1c(%ebp),%eax
112a1c: e8 8b ef ff ff call 1119ac <rtems_bdbuf_execute_transfer_request>
112a21: 89 c3 mov %eax,%ebx
if (sc == RTEMS_SUCCESSFUL)
112a23: 85 c0 test %eax,%eax
112a25: 74 42 je 112a69 <rtems_bdbuf_read+0x2b5>
}
*bd_ptr = bd;
}
else
*bd_ptr = NULL;
112a27: 8b 55 14 mov 0x14(%ebp),%edx
112a2a: c7 02 00 00 00 00 movl $0x0,(%edx)
rtems_bdbuf_unlock_cache ();
112a30: e8 43 e0 ff ff call 110a78 <rtems_bdbuf_unlock_cache>
rtems_bdbuf_release_disk (dd);
112a35: 8b 45 e4 mov -0x1c(%ebp),%eax
112a38: e8 77 e1 ff ff call 110bb4 <rtems_bdbuf_release_disk>
return sc;
}
112a3d: 89 d8 mov %ebx,%eax
112a3f: 8d 65 f4 lea -0xc(%ebp),%esp
112a42: 5b pop %ebx
112a43: 5e pop %esi
112a44: 5f pop %edi
112a45: c9 leave
112a46: c3 ret
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
112a47: 8b 45 c8 mov -0x38(%ebp),%eax
112a4a: c7 40 24 04 00 00 00 movl $0x4,0x24(%eax)
{
rtems_bdbuf_show_users ("read", bd);
rtems_bdbuf_show_usage ();
}
*bd_ptr = bd;
112a51: 8b 45 c8 mov -0x38(%ebp),%eax
112a54: 8b 4d 14 mov 0x14(%ebp),%ecx
112a57: 89 01 mov %eax,(%ecx)
112a59: 31 db xor %ebx,%ebx
112a5b: eb d3 jmp 112a30 <rtems_bdbuf_read+0x27c>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
112a5d: 8b 4d c8 mov -0x38(%ebp),%ecx
112a60: c7 41 24 03 00 00 00 movl $0x3,0x24(%ecx)
112a67: eb e8 jmp 112a51 <rtems_bdbuf_read+0x29d>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
112a69: 83 ec 0c sub $0xc,%esp
112a6c: ff 75 c8 pushl -0x38(%ebp)
112a6f: e8 84 ae ff ff call 10d8f8 <_Chain_Extract>
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
112a74: 8b 4d c8 mov -0x38(%ebp),%ecx
112a77: 8b 41 2c mov 0x2c(%ecx),%eax
112a7a: ff 40 0c incl 0xc(%eax)
112a7d: 83 c4 10 add $0x10,%esp
112a80: e9 3f ff ff ff jmp 1129c4 <rtems_bdbuf_read+0x210>
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
112a85: c7 45 bc 01 00 00 00 movl $0x1,-0x44(%ebp)
112a8c: e9 23 ff ff ff jmp 1129b4 <rtems_bdbuf_read+0x200>
00111738 <rtems_bdbuf_release>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release (rtems_bdbuf_buffer *bd)
{
111738: 55 push %ebp
111739: 89 e5 mov %esp,%ebp
11173b: 53 push %ebx
11173c: 83 ec 04 sub $0x4,%esp
11173f: 8b 5d 08 mov 0x8(%ebp),%ebx
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
111742: 80 3d 68 c1 12 00 00 cmpb $0x0,0x12c168
111749: 74 2d je 111778 <rtems_bdbuf_release+0x40><== NEVER TAKEN
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
11174b: 85 db test %ebx,%ebx
11174d: 74 35 je 111784 <rtems_bdbuf_release+0x4c><== NEVER TAKEN
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
11174f: e8 94 f1 ff ff call 1108e8 <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
111754: 8b 43 24 mov 0x24(%ebx),%eax
111757: 83 f8 04 cmp $0x4,%eax
11175a: 74 50 je 1117ac <rtems_bdbuf_release+0x74>
11175c: 76 32 jbe 111790 <rtems_bdbuf_release+0x58>
11175e: 83 f8 06 cmp $0x6,%eax
111761: 77 32 ja 111795 <rtems_bdbuf_release+0x5d><== NEVER TAKEN
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
rtems_bdbuf_add_to_lru_list_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
111763: 89 d8 mov %ebx,%eax
111765: e8 16 ff ff ff call 111680 <rtems_bdbuf_discard_buffer_after_access>
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
11176a: e8 09 f3 ff ff call 110a78 <rtems_bdbuf_unlock_cache>
11176f: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
111771: 8b 5d fc mov -0x4(%ebp),%ebx
111774: c9 leave
111775: c3 ret
111776: 66 90 xchg %ax,%ax
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
111778: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
11177d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
111780: c9 leave <== NOT EXECUTED
111781: c3 ret <== NOT EXECUTED
111782: 66 90 xchg %ax,%ax <== NOT EXECUTED
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
111784: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
111789: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
11178c: c9 leave <== NOT EXECUTED
11178d: c3 ret <== NOT EXECUTED
11178e: 66 90 xchg %ax,%ax <== NOT EXECUTED
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
111790: 83 f8 03 cmp $0x3,%eax
111793: 74 23 je 1117b8 <rtems_bdbuf_release+0x80><== ALWAYS TAKEN
break;
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_0);
111795: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
111798: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11179b: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
11179e: 0d 1c 00 00 42 or $0x4200001c,%eax <== NOT EXECUTED
1117a3: 50 push %eax <== NOT EXECUTED
1117a4: e8 ab bc ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
1117a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
1117ac: 89 d8 mov %ebx,%eax
1117ae: e8 51 f4 ff ff call 110c04 <rtems_bdbuf_add_to_modified_list_after_access>
break;
1117b3: eb b5 jmp 11176a <rtems_bdbuf_release+0x32>
1117b5: 8d 76 00 lea 0x0(%esi),%esi
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
1117b8: 8b 43 2c mov 0x2c(%ebx),%eax
1117bb: ff 48 0c decl 0xc(%eax)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
1117be: c7 43 24 02 00 00 00 movl $0x2,0x24(%ebx)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
1117c5: 83 ec 08 sub $0x8,%esp
1117c8: 53 push %ebx
1117c9: 68 24 c1 12 00 push $0x12c124
1117ce: e8 01 c1 ff ff call 10d8d4 <_Chain_Append>
rtems_bdbuf_add_to_lru_list_after_access (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_make_cached_and_add_to_lru_list (bd);
if (bd->waiters)
1117d3: 8b 43 28 mov 0x28(%ebx),%eax
1117d6: 83 c4 10 add $0x10,%esp
1117d9: 85 c0 test %eax,%eax
1117db: 74 0f je 1117ec <rtems_bdbuf_release+0xb4>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
1117dd: b8 48 c1 12 00 mov $0x12c148,%eax
1117e2: e8 15 f1 ff ff call 1108fc <rtems_bdbuf_wake>
1117e7: eb 81 jmp 11176a <rtems_bdbuf_release+0x32>
1117e9: 8d 76 00 lea 0x0(%esi),%esi
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
1117ec: b8 58 c1 12 00 mov $0x12c158,%eax
1117f1: e8 06 f1 ff ff call 1108fc <rtems_bdbuf_wake>
1117f6: e9 6f ff ff ff jmp 11176a <rtems_bdbuf_release+0x32>
00110bb4 <rtems_bdbuf_release_disk>:
return RTEMS_SUCCESSFUL;
}
static void
rtems_bdbuf_release_disk (rtems_disk_device *dd)
{
110bb4: 55 push %ebp
110bb5: 89 e5 mov %esp,%ebp
110bb7: 83 ec 14 sub $0x14,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_disk_release (dd);
110bba: 50 push %eax
110bbb: e8 34 7b ff ff call 1086f4 <rtems_disk_release>
if (sc != RTEMS_SUCCESSFUL)
110bc0: 83 c4 10 add $0x10,%esp
110bc3: 85 c0 test %eax,%eax
110bc5: 75 02 jne 110bc9 <rtems_bdbuf_release_disk+0x15><== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_DISK_REL);
}
110bc7: c9 leave
110bc8: c3 ret
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_disk_release (dd);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_DISK_REL);
110bc9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110bcc: 68 1f 00 00 42 push $0x4200001f <== NOT EXECUTED
110bd1: e8 7e c8 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
001116bc <rtems_bdbuf_release_modified>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release_modified (rtems_bdbuf_buffer *bd)
{
1116bc: 55 push %ebp
1116bd: 89 e5 mov %esp,%ebp
1116bf: 53 push %ebx
1116c0: 83 ec 04 sub $0x4,%esp
1116c3: 8b 5d 08 mov 0x8(%ebp),%ebx
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
1116c6: 80 3d 68 c1 12 00 00 cmpb $0x0,0x12c168
1116cd: 74 31 je 111700 <rtems_bdbuf_release_modified+0x44><== NEVER TAKEN
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
1116cf: 85 db test %ebx,%ebx
1116d1: 74 39 je 11170c <rtems_bdbuf_release_modified+0x50><== NEVER TAKEN
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
1116d3: e8 10 f2 ff ff call 1108e8 <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release modified");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
1116d8: 8b 43 24 mov 0x24(%ebx),%eax
1116db: 83 f8 03 cmp $0x3,%eax
1116de: 72 0a jb 1116ea <rtems_bdbuf_release_modified+0x2e><== NEVER TAKEN
1116e0: 83 f8 05 cmp $0x5,%eax
1116e3: 76 47 jbe 11172c <rtems_bdbuf_release_modified+0x70>
1116e5: 83 f8 06 cmp $0x6,%eax
1116e8: 74 2e je 111718 <rtems_bdbuf_release_modified+0x5c><== ALWAYS TAKEN
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_6);
1116ea: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
1116ed: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1116f0: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
1116f3: 0d 04 00 00 42 or $0x42000004,%eax <== NOT EXECUTED
1116f8: 50 push %eax <== NOT EXECUTED
1116f9: e8 56 bd ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
1116fe: 66 90 xchg %ax,%ax <== NOT EXECUTED
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release modified");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
111700: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
111705: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
111708: c9 leave <== NOT EXECUTED
111709: c3 ret <== NOT EXECUTED
11170a: 66 90 xchg %ax,%ax <== NOT EXECUTED
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
11170c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
111711: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
111714: c9 leave <== NOT EXECUTED
111715: c3 ret <== NOT EXECUTED
111716: 66 90 xchg %ax,%ax <== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
111718: 89 d8 mov %ebx,%eax
11171a: e8 61 ff ff ff call 111680 <rtems_bdbuf_discard_buffer_after_access>
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
11171f: e8 54 f3 ff ff call 110a78 <rtems_bdbuf_unlock_cache>
111724: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
111726: 8b 5d fc mov -0x4(%ebp),%ebx
111729: c9 leave
11172a: c3 ret
11172b: 90 nop
switch (bd->state)
{
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
11172c: 89 d8 mov %ebx,%eax
11172e: e8 d1 f4 ff ff call 110c04 <rtems_bdbuf_add_to_modified_list_after_access>
break;
111733: eb ea jmp 11171f <rtems_bdbuf_release_modified+0x63>
001112f4 <rtems_bdbuf_remove_from_tree>:
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
1112f4: 55 push %ebp
1112f5: 89 e5 mov %esp,%ebp
1112f7: 57 push %edi
1112f8: 56 push %esi
1112f9: 53 push %ebx
1112fa: 81 ec ac 00 00 00 sub $0xac,%esp
111300: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp)
*/
static int
rtems_bdbuf_avl_remove(rtems_bdbuf_buffer** root,
const rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
111306: 8b 40 14 mov 0x14(%eax),%eax
111309: 89 85 64 ff ff ff mov %eax,-0x9c(%ebp)
11130f: 8b 95 60 ff ff ff mov -0xa0(%ebp),%edx
111315: 8b 5a 18 mov 0x18(%edx),%ebx
rtems_blkdev_bnum block = node->block;
111318: 8b 72 1c mov 0x1c(%edx),%esi
11131b: 89 b5 5c ff ff ff mov %esi,-0xa4(%ebp)
rtems_bdbuf_buffer* p = *root;
111321: 8b 15 20 c1 12 00 mov 0x12c120,%edx
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
111327: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
11132d: 89 85 54 ff ff ff mov %eax,-0xac(%ebp)
111333: b9 80 00 00 00 mov $0x80,%ecx
111338: 31 c0 xor %eax,%eax
11133a: 8b bd 54 ff ff ff mov -0xac(%ebp),%edi
111340: f3 aa rep stos %al,%es:(%edi)
while (p != NULL)
111342: 85 d2 test %edx,%edx
111344: 74 47 je 11138d <rtems_bdbuf_remove_from_tree+0x99><== NEVER TAKEN
111346: 8d 8d 68 ff ff ff lea -0x98(%ebp),%ecx
11134c: eb 25 jmp 111373 <rtems_bdbuf_remove_from_tree+0x7f>
11134e: 66 90 xchg %ax,%ax
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
111350: 72 08 jb 11135a <rtems_bdbuf_remove_from_tree+0x66><== NEVER TAKEN
111352: 39 bd 64 ff ff ff cmp %edi,-0x9c(%ebp)
111358: 77 28 ja 111382 <rtems_bdbuf_remove_from_tree+0x8e><== NEVER TAKEN
11135a: 31 de xor %ebx,%esi
11135c: 33 bd 64 ff ff ff xor -0x9c(%ebp),%edi
111362: 09 fe or %edi,%esi
111364: 74 42 je 1113a8 <rtems_bdbuf_remove_from_tree+0xb4><== ALWAYS TAKEN
p->avl.cache = 1;
p = p->avl.right;
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
111366: c6 42 10 ff movb $0xff,0x10(%edx)
p = p->avl.left;
11136a: 8b 52 08 mov 0x8(%edx),%edx
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
11136d: 85 d2 test %edx,%edx
11136f: 74 1c je 11138d <rtems_bdbuf_remove_from_tree+0x99><== NEVER TAKEN
111371: 89 c1 mov %eax,%ecx
{
*buf_prev++ = p;
111373: 89 11 mov %edx,(%ecx)
111375: 8d 41 04 lea 0x4(%ecx),%eax
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
111378: 8b 7a 14 mov 0x14(%edx),%edi
11137b: 8b 72 18 mov 0x18(%edx),%esi
11137e: 39 f3 cmp %esi,%ebx
111380: 76 ce jbe 111350 <rtems_bdbuf_remove_from_tree+0x5c><== ALWAYS TAKEN
{
p->avl.cache = 1;
111382: c6 42 10 01 movb $0x1,0x10(%edx)
p = p->avl.right;
111386: 8b 52 0c mov 0xc(%edx),%edx
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
111389: 85 d2 test %edx,%edx
11138b: 75 e4 jne 111371 <rtems_bdbuf_remove_from_tree+0x7d><== ALWAYS TAKEN
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
11138d: 8b b5 60 ff ff ff mov -0xa0(%ebp),%esi <== NOT EXECUTED
111393: 8b 46 24 mov 0x24(%esi),%eax <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
111396: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111399: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
11139c: 0d 09 00 00 42 or $0x42000009,%eax <== NOT EXECUTED
1113a1: 50 push %eax <== NOT EXECUTED
1113a2: e8 ad c0 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
1113a7: 90 nop <== NOT EXECUTED
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
1113a8: 8b b5 5c ff ff ff mov -0xa4(%ebp),%esi
1113ae: 3b 72 1c cmp 0x1c(%edx),%esi
1113b1: 77 cf ja 111382 <rtems_bdbuf_remove_from_tree+0x8e>
{
p->avl.cache = 1;
p = p->avl.right;
}
else if ((p->dev != dev) || (p->block != block))
1113b3: 75 b1 jne 111366 <rtems_bdbuf_remove_from_tree+0x72>
1113b5: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp)
}
q = p;
buf_prev--;
if (buf_prev > buf_stack)
1113bb: 3b 8d 54 ff ff ff cmp -0xac(%ebp),%ecx
1113c1: 0f 87 8b 01 00 00 ja 111552 <rtems_bdbuf_remove_from_tree+0x25e>
1113c7: 31 ff xor %edi,%edi
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
1113c9: 8b 5a 0c mov 0xc(%edx),%ebx
1113cc: 85 db test %ebx,%ebx
1113ce: 0f 84 8c 01 00 00 je 111560 <rtems_bdbuf_remove_from_tree+0x26c>
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
1113d4: 8b 43 08 mov 0x8(%ebx),%eax
1113d7: 85 c0 test %eax,%eax
1113d9: 0f 84 08 02 00 00 je 1115e7 <rtems_bdbuf_remove_from_tree+0x2f3><== ALWAYS TAKEN
1113df: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax <== NOT EXECUTED
1113e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
*buf_prev++ = q = r;
1113e8: 89 de mov %ebx,%esi <== NOT EXECUTED
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
1113ea: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
1113ec: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
s = r->avl.left;
1113ef: 8b 5b 08 mov 0x8(%ebx),%ebx <== NOT EXECUTED
r->avl.cache = -1;
1113f2: c6 46 10 ff movb $0xff,0x10(%esi) <== NOT EXECUTED
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
1113f6: 83 7b 08 00 cmpl $0x0,0x8(%ebx) <== NOT EXECUTED
1113fa: 75 ec jne 1113e8 <rtems_bdbuf_remove_from_tree+0xf4><== NOT EXECUTED
1113fc: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp) <== NOT EXECUTED
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
111402: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
111405: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
r->avl.left = s->avl.right;
111408: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
11140b: 89 46 08 mov %eax,0x8(%esi) <== NOT EXECUTED
s->avl.right = q->avl.right;
11140e: 8b 72 0c mov 0xc(%edx),%esi <== NOT EXECUTED
111411: 89 73 0c mov %esi,0xc(%ebx) <== NOT EXECUTED
s->avl.bal = q->avl.bal;
111414: 8a 52 11 mov 0x11(%edx),%dl <== NOT EXECUTED
111417: 88 53 11 mov %dl,0x11(%ebx) <== NOT EXECUTED
s->avl.cache = 1;
11141a: c6 43 10 01 movb $0x1,0x10(%ebx) <== NOT EXECUTED
*t = q = s;
11141e: 89 19 mov %ebx,(%ecx) <== NOT EXECUTED
}
}
if (p != NULL)
111420: 85 ff test %edi,%edi
111422: 0f 84 51 01 00 00 je 111579 <rtems_bdbuf_remove_from_tree+0x285>
{
if (p->avl.cache == -1)
111428: 80 7f 10 ff cmpb $0xff,0x10(%edi)
11142c: 0f 84 76 01 00 00 je 1115a8 <rtems_bdbuf_remove_from_tree+0x2b4>
{
p->avl.left = q;
}
else
{
p->avl.right = q;
111432: 89 5f 0c mov %ebx,0xc(%edi)
modified = true;
while (modified)
{
if (buf_prev > buf_stack)
111435: 8b 95 54 ff ff ff mov -0xac(%ebp),%edx
11143b: 39 95 60 ff ff ff cmp %edx,-0xa0(%ebp)
111441: 76 56 jbe 111499 <rtems_bdbuf_remove_from_tree+0x1a5>
111443: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
111449: eb 21 jmp 11146c <rtems_bdbuf_remove_from_tree+0x178>
11144b: 90 nop
case +1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = -1;
11144c: c6 42 11 ff movb $0xff,0x11(%edx) <== NOT EXECUTED
111450: 89 d1 mov %edx,%ecx <== NOT EXECUTED
111452: 31 db xor %ebx,%ebx <== NOT EXECUTED
default:
break;
}
}
if (buf_prev > buf_stack)
111454: 3b 85 54 ff ff ff cmp -0xac(%ebp),%eax
11145a: 76 37 jbe 111493 <rtems_bdbuf_remove_from_tree+0x19f>
{
q = *(buf_prev - 1);
11145c: 8b 50 fc mov -0x4(%eax),%edx
if (q->avl.cache == -1)
11145f: 80 7a 10 ff cmpb $0xff,0x10(%edx)
111463: 74 53 je 1114b8 <rtems_bdbuf_remove_from_tree+0x1c4><== ALWAYS TAKEN
{
q->avl.left = p;
}
else
{
q->avl.right = p;
111465: 89 4a 0c mov %ecx,0xc(%edx) <== NOT EXECUTED
*root = q;
}
modified = true;
while (modified)
111468: 84 db test %bl,%bl
11146a: 74 2d je 111499 <rtems_bdbuf_remove_from_tree+0x1a5><== NEVER TAKEN
{
if (buf_prev > buf_stack)
{
p = *--buf_prev;
11146c: 83 e8 04 sub $0x4,%eax
11146f: 8b 10 mov (%eax),%edx
else
{
break;
}
if (p->avl.cache == -1)
111471: 80 7a 10 ff cmpb $0xff,0x10(%edx)
111475: 74 2d je 1114a4 <rtems_bdbuf_remove_from_tree+0x1b0>
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
111477: 8a 4a 11 mov 0x11(%edx),%cl
11147a: 84 c9 test %cl,%cl
11147c: 74 ce je 11144c <rtems_bdbuf_remove_from_tree+0x158><== NEVER TAKEN
11147e: 80 f9 01 cmp $0x1,%cl
111481: 74 46 je 1114c9 <rtems_bdbuf_remove_from_tree+0x1d5><== ALWAYS TAKEN
111483: fe c1 inc %cl <== NOT EXECUTED
111485: 74 4d je 1114d4 <rtems_bdbuf_remove_from_tree+0x1e0><== NOT EXECUTED
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
p = p2;
p2->avl.bal = 0;
111487: 89 d1 mov %edx,%ecx <== NOT EXECUTED
111489: b3 01 mov $0x1,%bl <== NOT EXECUTED
default:
break;
}
}
if (buf_prev > buf_stack)
11148b: 3b 85 54 ff ff ff cmp -0xac(%ebp),%eax <== NOT EXECUTED
111491: 77 c9 ja 11145c <rtems_bdbuf_remove_from_tree+0x168><== NOT EXECUTED
q->avl.right = p;
}
}
else
{
*root = p;
111493: 89 0d 20 c1 12 00 mov %ecx,0x12c120
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
}
111499: 8d 65 f4 lea -0xc(%ebp),%esp
11149c: 5b pop %ebx
11149d: 5e pop %esi
11149e: 5f pop %edi
11149f: c9 leave
1114a0: c3 ret
1114a1: 8d 76 00 lea 0x0(%esi),%esi
}
if (p->avl.cache == -1)
{
/* rebalance left branch */
switch (p->avl.bal)
1114a4: 8a 4a 11 mov 0x11(%edx),%cl
1114a7: 84 c9 test %cl,%cl
1114a9: 75 15 jne 1114c0 <rtems_bdbuf_remove_from_tree+0x1cc>
{
case -1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = 1;
1114ab: c6 42 11 01 movb $0x1,0x11(%edx)
1114af: 89 d1 mov %edx,%ecx
1114b1: 31 db xor %ebx,%ebx
1114b3: eb 9f jmp 111454 <rtems_bdbuf_remove_from_tree+0x160>
1114b5: 8d 76 00 lea 0x0(%esi),%esi
{
q = *(buf_prev - 1);
if (q->avl.cache == -1)
{
q->avl.left = p;
1114b8: 89 4a 08 mov %ecx,0x8(%edx)
1114bb: eb ab jmp 111468 <rtems_bdbuf_remove_from_tree+0x174>
1114bd: 8d 76 00 lea 0x0(%esi),%esi
}
if (p->avl.cache == -1)
{
/* rebalance left branch */
switch (p->avl.bal)
1114c0: 80 f9 01 cmp $0x1,%cl
1114c3: 74 4f je 111514 <rtems_bdbuf_remove_from_tree+0x220>
1114c5: fe c1 inc %cl
1114c7: 75 be jne 111487 <rtems_bdbuf_remove_from_tree+0x193><== NEVER TAKEN
{
/* rebalance right branch */
switch (p->avl.bal)
{
case +1:
p->avl.bal = 0;
1114c9: c6 42 11 00 movb $0x0,0x11(%edx)
1114cd: 89 d1 mov %edx,%ecx
1114cf: b3 01 mov $0x1,%bl
1114d1: eb 81 jmp 111454 <rtems_bdbuf_remove_from_tree+0x160>
1114d3: 90 nop
p->avl.bal = -1;
modified = false;
break;
case -1:
p1 = p->avl.left;
1114d4: 8b 4a 08 mov 0x8(%edx),%ecx <== NOT EXECUTED
if (p1->avl.bal <= 0) /* simple LL-turn */
1114d7: 80 79 11 00 cmpb $0x0,0x11(%ecx) <== NOT EXECUTED
1114db: 7e 5f jle 11153c <rtems_bdbuf_remove_from_tree+0x248><== NOT EXECUTED
}
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
1114dd: 8b 59 0c mov 0xc(%ecx),%ebx <== NOT EXECUTED
p1->avl.right = p2->avl.left;
1114e0: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED
1114e3: 89 71 0c mov %esi,0xc(%ecx) <== NOT EXECUTED
p2->avl.left = p1;
1114e6: 89 4b 08 mov %ecx,0x8(%ebx) <== NOT EXECUTED
p->avl.left = p2->avl.right;
1114e9: 8b 73 0c mov 0xc(%ebx),%esi <== NOT EXECUTED
1114ec: 89 72 08 mov %esi,0x8(%edx) <== NOT EXECUTED
p2->avl.right = p;
1114ef: 89 53 0c mov %edx,0xc(%ebx) <== NOT EXECUTED
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
1114f2: 80 7b 11 ff cmpb $0xff,0x11(%ebx) <== NOT EXECUTED
1114f6: 0f 94 42 11 sete 0x11(%edx) <== NOT EXECUTED
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
1114fa: 80 7b 11 01 cmpb $0x1,0x11(%ebx) <== NOT EXECUTED
1114fe: 0f 95 c2 setne %dl <== NOT EXECUTED
111501: 4a dec %edx <== NOT EXECUTED
111502: 88 51 11 mov %dl,0x11(%ecx) <== NOT EXECUTED
p = p2;
p2->avl.bal = 0;
111505: c6 43 11 00 movb $0x0,0x11(%ebx) <== NOT EXECUTED
111509: 89 d9 mov %ebx,%ecx <== NOT EXECUTED
11150b: b3 01 mov $0x1,%bl <== NOT EXECUTED
11150d: e9 42 ff ff ff jmp 111454 <rtems_bdbuf_remove_from_tree+0x160><== NOT EXECUTED
111512: 66 90 xchg %ax,%ax <== NOT EXECUTED
p->avl.bal = 1;
modified = false;
break;
case +1:
p1 = p->avl.right;
111514: 8b 7a 0c mov 0xc(%edx),%edi
if (p1->avl.bal >= 0) /* simple RR-turn */
111517: 80 7f 11 00 cmpb $0x0,0x11(%edi)
11151b: 0f 8c 8f 00 00 00 jl 1115b0 <rtems_bdbuf_remove_from_tree+0x2bc><== NEVER TAKEN
{
p->avl.right = p1->avl.left;
111521: 8b 4f 08 mov 0x8(%edi),%ecx
111524: 89 4a 0c mov %ecx,0xc(%edx)
p1->avl.left = p;
111527: 89 57 08 mov %edx,0x8(%edi)
if (p1->avl.bal == 0)
11152a: 75 58 jne 111584 <rtems_bdbuf_remove_from_tree+0x290><== NEVER TAKEN
{
p1->avl.bal = -1;
11152c: c6 47 11 ff movb $0xff,0x11(%edi)
111530: 89 f9 mov %edi,%ecx
111532: 31 db xor %ebx,%ebx
111534: e9 1b ff ff ff jmp 111454 <rtems_bdbuf_remove_from_tree+0x160>
111539: 8d 76 00 lea 0x0(%esi),%esi
case -1:
p1 = p->avl.left;
if (p1->avl.bal <= 0) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
11153c: 8b 59 0c mov 0xc(%ecx),%ebx <== NOT EXECUTED
11153f: 89 5a 08 mov %ebx,0x8(%edx) <== NOT EXECUTED
p1->avl.right = p;
111542: 89 51 0c mov %edx,0xc(%ecx) <== NOT EXECUTED
if (p1->avl.bal == 0)
111545: 75 51 jne 111598 <rtems_bdbuf_remove_from_tree+0x2a4><== NOT EXECUTED
{
p1->avl.bal = 1;
111547: c6 41 11 01 movb $0x1,0x11(%ecx) <== NOT EXECUTED
11154b: 31 db xor %ebx,%ebx <== NOT EXECUTED
11154d: e9 02 ff ff ff jmp 111454 <rtems_bdbuf_remove_from_tree+0x160><== NOT EXECUTED
q = p;
buf_prev--;
if (buf_prev > buf_stack)
{
p = *(buf_prev - 1);
111552: 8b 79 fc mov -0x4(%ecx),%edi
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
111555: 8b 5a 0c mov 0xc(%edx),%ebx
111558: 85 db test %ebx,%ebx
11155a: 0f 85 74 fe ff ff jne 1113d4 <rtems_bdbuf_remove_from_tree+0xe0>
{
r = q->avl.left;
111560: 8b 5a 08 mov 0x8(%edx),%ebx
if (r != NULL)
111563: 85 db test %ebx,%ebx
111565: 74 04 je 11156b <rtems_bdbuf_remove_from_tree+0x277>
{
r->avl.bal = 0;
111567: c6 43 11 00 movb $0x0,0x11(%ebx)
11156b: 89 8d 60 ff ff ff mov %ecx,-0xa0(%ebp)
*t = q = s;
}
}
if (p != NULL)
111571: 85 ff test %edi,%edi
111573: 0f 85 af fe ff ff jne 111428 <rtems_bdbuf_remove_from_tree+0x134>
p->avl.right = q;
}
}
else
{
*root = q;
111579: 89 1d 20 c1 12 00 mov %ebx,0x12c120
11157f: e9 b1 fe ff ff jmp 111435 <rtems_bdbuf_remove_from_tree+0x141>
p1->avl.bal = -1;
modified = false;
}
else
{
p->avl.bal = 0;
111584: c6 42 11 00 movb $0x0,0x11(%edx) <== NOT EXECUTED
p1->avl.bal = 0;
111588: c6 47 11 00 movb $0x0,0x11(%edi) <== NOT EXECUTED
11158c: 89 f9 mov %edi,%ecx <== NOT EXECUTED
11158e: b3 01 mov $0x1,%bl <== NOT EXECUTED
111590: e9 bf fe ff ff jmp 111454 <rtems_bdbuf_remove_from_tree+0x160><== NOT EXECUTED
111595: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
p1->avl.bal = 1;
modified = false;
}
else
{
p->avl.bal = 0;
111598: c6 42 11 00 movb $0x0,0x11(%edx) <== NOT EXECUTED
p1->avl.bal = 0;
11159c: c6 41 11 00 movb $0x0,0x11(%ecx) <== NOT EXECUTED
1115a0: b3 01 mov $0x1,%bl <== NOT EXECUTED
1115a2: e9 ad fe ff ff jmp 111454 <rtems_bdbuf_remove_from_tree+0x160><== NOT EXECUTED
1115a7: 90 nop <== NOT EXECUTED
if (p != NULL)
{
if (p->avl.cache == -1)
{
p->avl.left = q;
1115a8: 89 5f 08 mov %ebx,0x8(%edi)
1115ab: e9 85 fe ff ff jmp 111435 <rtems_bdbuf_remove_from_tree+0x141>
}
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
1115b0: 8b 4f 08 mov 0x8(%edi),%ecx <== NOT EXECUTED
p1->avl.left = p2->avl.right;
1115b3: 8b 71 0c mov 0xc(%ecx),%esi <== NOT EXECUTED
1115b6: 89 77 08 mov %esi,0x8(%edi) <== NOT EXECUTED
p2->avl.right = p1;
1115b9: 89 79 0c mov %edi,0xc(%ecx) <== NOT EXECUTED
p->avl.right = p2->avl.left;
1115bc: 8b 71 08 mov 0x8(%ecx),%esi <== NOT EXECUTED
1115bf: 89 72 0c mov %esi,0xc(%edx) <== NOT EXECUTED
p2->avl.left = p;
1115c2: 89 51 08 mov %edx,0x8(%ecx) <== NOT EXECUTED
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
1115c5: 80 79 11 01 cmpb $0x1,0x11(%ecx) <== NOT EXECUTED
1115c9: 0f 95 c3 setne %bl <== NOT EXECUTED
1115cc: 89 de mov %ebx,%esi <== NOT EXECUTED
1115ce: 4e dec %esi <== NOT EXECUTED
1115cf: 89 f3 mov %esi,%ebx <== NOT EXECUTED
1115d1: 88 5a 11 mov %bl,0x11(%edx) <== NOT EXECUTED
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
1115d4: 80 79 11 ff cmpb $0xff,0x11(%ecx) <== NOT EXECUTED
1115d8: 0f 94 47 11 sete 0x11(%edi) <== NOT EXECUTED
p = p2;
p2->avl.bal = 0;
1115dc: c6 41 11 00 movb $0x0,0x11(%ecx) <== NOT EXECUTED
1115e0: b3 01 mov $0x1,%bl <== NOT EXECUTED
1115e2: e9 6d fe ff ff jmp 111454 <rtems_bdbuf_remove_from_tree+0x160><== NOT EXECUTED
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
1115e7: 8b 72 08 mov 0x8(%edx),%esi
1115ea: 89 73 08 mov %esi,0x8(%ebx)
r->avl.bal = q->avl.bal;
1115ed: 8a 52 11 mov 0x11(%edx),%dl
1115f0: 88 53 11 mov %dl,0x11(%ebx)
r->avl.cache = 1;
1115f3: c6 43 10 01 movb $0x1,0x10(%ebx)
*buf_prev++ = q = r;
1115f7: 89 19 mov %ebx,(%ecx)
1115f9: e9 22 fe ff ff jmp 111420 <rtems_bdbuf_remove_from_tree+0x12c>
00111600 <rtems_bdbuf_remove_from_tree_and_lru_list>:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
}
static void
rtems_bdbuf_remove_from_tree_and_lru_list (rtems_bdbuf_buffer *bd)
{
111600: 55 push %ebp
111601: 89 e5 mov %esp,%ebp
111603: 53 push %ebx
111604: 83 ec 04 sub $0x4,%esp
111607: 89 c3 mov %eax,%ebx
switch (bd->state)
111609: 8b 40 24 mov 0x24(%eax),%eax
11160c: 85 c0 test %eax,%eax
11160e: 74 23 je 111633 <rtems_bdbuf_remove_from_tree_and_lru_list+0x33>
111610: 83 f8 02 cmp $0x2,%eax
111613: 74 17 je 11162c <rtems_bdbuf_remove_from_tree_and_lru_list+0x2c><== ALWAYS TAKEN
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
111615: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
111618: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11161b: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
11161e: 0d 08 00 00 42 or $0x42000008,%eax <== NOT EXECUTED
111623: 50 push %eax <== NOT EXECUTED
111624: e8 2b be ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
111629: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
switch (bd->state)
{
case RTEMS_BDBUF_STATE_FREE:
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
11162c: 89 d8 mov %ebx,%eax
11162e: e8 c1 fc ff ff call 1112f4 <rtems_bdbuf_remove_from_tree>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
111633: 83 ec 0c sub $0xc,%esp
111636: 53 push %ebx
111637: e8 bc c2 ff ff call 10d8f8 <_Chain_Extract>
11163c: 83 c4 10 add $0x10,%esp
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
}
rtems_chain_extract (&bd->link);
}
11163f: 8b 5d fc mov -0x4(%ebp),%ebx
111642: c9 leave
111643: c3 ret
00110de4 <rtems_bdbuf_restore_preemption>:
return prev_mode;
}
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
110de4: 55 push %ebp
110de5: 89 e5 mov %esp,%ebp
110de7: 83 ec 1c sub $0x1c,%esp
110dea: 89 45 f4 mov %eax,-0xc(%ebp)
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
110ded: 8d 45 f4 lea -0xc(%ebp),%eax
110df0: 50 push %eax
110df1: 68 ff ff 00 00 push $0xffff
110df6: ff 75 f4 pushl -0xc(%ebp)
110df9: e8 fe 4a 00 00 call 1158fc <rtems_task_mode>
if (sc != RTEMS_SUCCESSFUL)
110dfe: 83 c4 10 add $0x10,%esp
110e01: 85 c0 test %eax,%eax
110e03: 75 02 jne 110e07 <rtems_bdbuf_restore_preemption+0x23><== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_RST);
}
110e05: c9 leave
110e06: c3 ret
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_RST);
110e07: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110e0a: 68 11 00 00 42 push $0x42000011 <== NOT EXECUTED
110e0f: e8 40 c6 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
0011092c <rtems_bdbuf_swapout_modified_processing>:
rtems_chain_control* chain,
rtems_chain_control* transfer,
bool sync_active,
bool update_timers,
uint32_t timer_delta)
{
11092c: 55 push %ebp
11092d: 89 e5 mov %esp,%ebp
11092f: 57 push %edi
110930: 56 push %esi
110931: 53 push %ebx
110932: 83 ec 2c sub $0x2c,%esp
110935: 89 c3 mov %eax,%ebx
110937: 89 4d e4 mov %ecx,-0x1c(%ebp)
11093a: 8a 45 08 mov 0x8(%ebp),%al
11093d: 88 45 df mov %al,-0x21(%ebp)
110940: 8a 45 0c mov 0xc(%ebp),%al
110943: 88 45 de mov %al,-0x22(%ebp)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
110946: 8d 7a 04 lea 0x4(%edx),%edi
if (!rtems_chain_is_empty (chain))
110949: 39 3a cmp %edi,(%edx)
11094b: 0f 84 96 00 00 00 je 1109e7 <rtems_bdbuf_swapout_modified_processing+0xbb>
{
rtems_chain_node* node = rtems_chain_head (chain);
bool sync_all;
node = node->next;
110951: 8b 32 mov (%edx),%esi
/*
* A sync active with no valid dev means sync all.
*/
if (sync_active && (*dev == BDBUF_INVALID_DEV))
110953: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
110957: 0f 85 e7 00 00 00 jne 110a44 <rtems_bdbuf_swapout_modified_processing+0x118>
11095d: 31 c9 xor %ecx,%ecx
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
11095f: 39 fe cmp %edi,%esi
110961: 0f 84 80 00 00 00 je 1109e7 <rtems_bdbuf_swapout_modified_processing+0xbb><== NEVER TAKEN
110967: 8b 55 e4 mov -0x1c(%ebp),%edx
11096a: 83 c2 04 add $0x4,%edx
11096d: 89 55 d8 mov %edx,-0x28(%ebp)
110970: 89 7d e0 mov %edi,-0x20(%ebp)
110973: 90 nop
* or someone waits for a buffer written force all the timers to 0.
*
* @note Lots of sync requests will skew this timer. It should be based
* on TOD to be accurate. Does it matter ?
*/
if (sync_all || (sync_active && (*dev == bd->dev))
110974: 84 c9 test %cl,%cl
110976: 75 1e jne 110996 <rtems_bdbuf_swapout_modified_processing+0x6a>
110978: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
11097c: 74 0f je 11098d <rtems_bdbuf_swapout_modified_processing+0x61>
11097e: 8b 03 mov (%ebx),%eax
110980: 8b 53 04 mov 0x4(%ebx),%edx
110983: 33 56 18 xor 0x18(%esi),%edx
110986: 33 46 14 xor 0x14(%esi),%eax
110989: 09 c2 or %eax,%edx
11098b: 74 09 je 110996 <rtems_bdbuf_swapout_modified_processing+0x6a>
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
11098d: a1 58 c1 12 00 mov 0x12c158,%eax
* or someone waits for a buffer written force all the timers to 0.
*
* @note Lots of sync requests will skew this timer. It should be based
* on TOD to be accurate. Does it matter ?
*/
if (sync_all || (sync_active && (*dev == bd->dev))
110992: 85 c0 test %eax,%eax
110994: 74 07 je 11099d <rtems_bdbuf_swapout_modified_processing+0x71>
|| rtems_bdbuf_has_buffer_waiters ())
bd->hold_timer = 0;
110996: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
if (bd->hold_timer)
11099d: 8b 46 30 mov 0x30(%esi),%eax
1109a0: 85 c0 test %eax,%eax
1109a2: 74 22 je 1109c6 <rtems_bdbuf_swapout_modified_processing+0x9a>
{
if (update_timers)
1109a4: 80 7d de 00 cmpb $0x0,-0x22(%ebp)
1109a8: 74 15 je 1109bf <rtems_bdbuf_swapout_modified_processing+0x93>
{
if (bd->hold_timer > timer_delta)
1109aa: 8b 46 30 mov 0x30(%esi),%eax
1109ad: 3b 45 10 cmp 0x10(%ebp),%eax
1109b0: 0f 86 b6 00 00 00 jbe 110a6c <rtems_bdbuf_swapout_modified_processing+0x140>
bd->hold_timer -= timer_delta;
1109b6: 8b 46 30 mov 0x30(%esi),%eax
1109b9: 2b 45 10 sub 0x10(%ebp),%eax
1109bc: 89 46 30 mov %eax,0x30(%esi)
else
bd->hold_timer = 0;
}
if (bd->hold_timer)
1109bf: 8b 46 30 mov 0x30(%esi),%eax
1109c2: 85 c0 test %eax,%eax
1109c4: 75 1a jne 1109e0 <rtems_bdbuf_swapout_modified_processing+0xb4>
/*
* This assumes we can set dev_t to BDBUF_INVALID_DEV which is just an
* assumption. Cannot use the transfer list being empty the sync dev
* calls sets the dev to use.
*/
if (*dev == BDBUF_INVALID_DEV)
1109c6: 8b 03 mov (%ebx),%eax
1109c8: 8b 53 04 mov 0x4(%ebx),%edx
1109cb: 89 c7 mov %eax,%edi
1109cd: 21 d7 and %edx,%edi
1109cf: 47 inc %edi
1109d0: 0f 84 86 00 00 00 je 110a5c <rtems_bdbuf_swapout_modified_processing+0x130>
*dev = bd->dev;
if (bd->dev == *dev)
1109d6: 33 56 18 xor 0x18(%esi),%edx
1109d9: 33 46 14 xor 0x14(%esi),%eax
1109dc: 09 c2 or %eax,%edx
1109de: 74 10 je 1109f0 <rtems_bdbuf_swapout_modified_processing+0xc4><== ALWAYS TAKEN
node = next_node;
}
else
{
node = node->next;
1109e0: 8b 36 mov (%esi),%esi
if (sync_active && (*dev == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
1109e2: 39 75 e0 cmp %esi,-0x20(%ebp)
1109e5: 75 8d jne 110974 <rtems_bdbuf_swapout_modified_processing+0x48>
{
node = node->next;
}
}
}
}
1109e7: 8d 65 f4 lea -0xc(%ebp),%esp
1109ea: 5b pop %ebx
1109eb: 5e pop %esi
1109ec: 5f pop %edi
1109ed: c9 leave
1109ee: c3 ret
1109ef: 90 nop
if (*dev == BDBUF_INVALID_DEV)
*dev = bd->dev;
if (bd->dev == *dev)
{
rtems_chain_node* next_node = node->next;
1109f0: 8b 3e mov (%esi),%edi
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
1109f2: c7 46 24 09 00 00 00 movl $0x9,0x24(%esi)
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
1109f9: 83 ec 0c sub $0xc,%esp
1109fc: 56 push %esi
1109fd: 88 4d d4 mov %cl,-0x2c(%ebp)
110a00: e8 f3 ce ff ff call 10d8f8 <_Chain_Extract>
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
rtems_chain_extract (node);
tnode = tnode->previous;
110a05: 8b 55 d8 mov -0x28(%ebp),%edx
110a08: 8b 42 04 mov 0x4(%edx),%eax
while (node && !rtems_chain_is_head (transfer, tnode))
110a0b: 83 c4 10 add $0x10,%esp
110a0e: 3b 45 e4 cmp -0x1c(%ebp),%eax
110a11: 8a 4d d4 mov -0x2c(%ebp),%cl
110a14: 74 13 je 110a29 <rtems_bdbuf_swapout_modified_processing+0xfd>
110a16: 8b 56 1c mov 0x1c(%esi),%edx
110a19: 8d 76 00 lea 0x0(%esi),%esi
{
rtems_bdbuf_buffer* tbd = (rtems_bdbuf_buffer*) tnode;
if (bd->block > tbd->block)
110a1c: 39 50 1c cmp %edx,0x1c(%eax)
110a1f: 72 33 jb 110a54 <rtems_bdbuf_swapout_modified_processing+0x128>
{
rtems_chain_insert (tnode, node);
node = NULL;
}
else
tnode = tnode->previous;
110a21: 8b 40 04 mov 0x4(%eax),%eax
rtems_chain_extract (node);
tnode = tnode->previous;
while (node && !rtems_chain_is_head (transfer, tnode))
110a24: 3b 45 e4 cmp -0x1c(%ebp),%eax
110a27: 75 f3 jne 110a1c <rtems_bdbuf_swapout_modified_processing+0xf0>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
110a29: 83 ec 08 sub $0x8,%esp
110a2c: 56 push %esi
110a2d: ff 75 e4 pushl -0x1c(%ebp)
110a30: 88 4d d4 mov %cl,-0x2c(%ebp)
110a33: e8 30 53 00 00 call 115d68 <_Chain_Insert>
110a38: 89 fe mov %edi,%esi
110a3a: 83 c4 10 add $0x10,%esp
110a3d: 8a 4d d4 mov -0x2c(%ebp),%cl
110a40: eb a0 jmp 1109e2 <rtems_bdbuf_swapout_modified_processing+0xb6>
110a42: 66 90 xchg %ax,%ax
* @param update_timers If true update the timers.
* @param timer_delta It update_timers is true update the timers by this
* amount.
*/
static void
rtems_bdbuf_swapout_modified_processing (dev_t* dev,
110a44: 8b 03 mov (%ebx),%eax
110a46: 23 43 04 and 0x4(%ebx),%eax
110a49: 40 inc %eax
110a4a: 0f 94 c1 sete %cl
110a4d: e9 0d ff ff ff jmp 11095f <rtems_bdbuf_swapout_modified_processing+0x33>
110a52: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
110a54: 83 ec 08 sub $0x8,%esp
110a57: 56 push %esi
110a58: 50 push %eax
110a59: eb d5 jmp 110a30 <rtems_bdbuf_swapout_modified_processing+0x104>
110a5b: 90 nop
* This assumes we can set dev_t to BDBUF_INVALID_DEV which is just an
* assumption. Cannot use the transfer list being empty the sync dev
* calls sets the dev to use.
*/
if (*dev == BDBUF_INVALID_DEV)
*dev = bd->dev;
110a5c: 8b 46 14 mov 0x14(%esi),%eax
110a5f: 8b 56 18 mov 0x18(%esi),%edx
110a62: 89 03 mov %eax,(%ebx)
110a64: 89 53 04 mov %edx,0x4(%ebx)
110a67: e9 6a ff ff ff jmp 1109d6 <rtems_bdbuf_swapout_modified_processing+0xaa>
if (update_timers)
{
if (bd->hold_timer > timer_delta)
bd->hold_timer -= timer_delta;
else
bd->hold_timer = 0;
110a6c: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
110a73: e9 47 ff ff ff jmp 1109bf <rtems_bdbuf_swapout_modified_processing+0x93>
00111c3c <rtems_bdbuf_swapout_task>:
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
111c3c: 55 push %ebp
111c3d: 89 e5 mov %esp,%ebp
111c3f: 57 push %edi
111c40: 56 push %esi
111c41: 53 push %ebx
111c42: 83 ec 4c sub $0x4c,%esp
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
111c45: e8 5a f6 ff ff call 1112a4 <rtems_bdbuf_swapout_writereq_alloc>
111c4a: 89 45 dc mov %eax,-0x24(%ebp)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
111c4d: 8d 45 c8 lea -0x38(%ebp),%eax
111c50: 89 45 c4 mov %eax,-0x3c(%ebp)
the_chain->permanent_null = NULL;
111c53: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
the_chain->last = _Chain_Head(the_chain);
111c5a: 8d 45 c4 lea -0x3c(%ebp),%eax
111c5d: 89 45 cc mov %eax,-0x34(%ebp)
rtems_chain_initialize_empty (&transfer.bds);
transfer.dev = BDBUF_INVALID_DEV;
111c60: c7 45 d0 ff ff ff ff movl $0xffffffff,-0x30(%ebp)
111c67: c7 45 d4 ff ff ff ff movl $0xffffffff,-0x2c(%ebp)
transfer.syncing = false;
111c6e: c6 45 d8 00 movb $0x0,-0x28(%ebp)
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
111c72: 8b 15 4c 4a 12 00 mov 0x124a4c,%edx
111c78: 8d 04 92 lea (%edx,%edx,4),%eax
111c7b: 8d 04 80 lea (%eax,%eax,4),%eax
111c7e: 8d 04 80 lea (%eax,%eax,4),%eax
111c81: c1 e0 03 shl $0x3,%eax
111c84: 31 d2 xor %edx,%edx
111c86: f7 35 0c 82 12 00 divl 0x12820c
111c8c: 89 45 ac mov %eax,-0x54(%ebp)
rtems_bdbuf_swapout_workers_open (void)
{
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
111c8f: e8 54 ec ff ff call 1108e8 <rtems_bdbuf_lock_cache>
for (w = 0; w < bdbuf_config.swapout_workers; w++)
111c94: 8b 1d 54 4a 12 00 mov 0x124a54,%ebx
111c9a: 85 db test %ebx,%ebx
111c9c: 0f 84 c3 00 00 00 je 111d65 <rtems_bdbuf_swapout_task+0x129><== ALWAYS TAKEN
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
(bdbuf_config.swapout_priority ?
111ca2: 8b 3d 48 4a 12 00 mov 0x124a48,%edi <== NOT EXECUTED
111ca8: 31 f6 xor %esi,%esi <== NOT EXECUTED
111caa: eb 55 jmp 111d01 <rtems_bdbuf_swapout_task+0xc5><== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
111cac: b8 0f 00 00 00 mov $0xf,%eax <== NOT EXECUTED
111cb1: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111cb4: 8d 53 08 lea 0x8(%ebx),%edx <== NOT EXECUTED
111cb7: 52 push %edx <== NOT EXECUTED
111cb8: 6a 00 push $0x0 <== NOT EXECUTED
111cba: 68 00 04 00 00 push $0x400 <== NOT EXECUTED
111cbf: 68 00 20 00 00 push $0x2000 <== NOT EXECUTED
111cc4: 50 push %eax <== NOT EXECUTED
111cc5: 8d 46 61 lea 0x61(%esi),%eax <== NOT EXECUTED
111cc8: 0d 00 6f 44 42 or $0x42446f00,%eax <== NOT EXECUTED
111ccd: 50 push %eax <== NOT EXECUTED
111cce: e8 4d b3 ff ff call 10d020 <rtems_task_create> <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT),
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
111cd3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
111cd6: 85 c0 test %eax,%eax <== NOT EXECUTED
111cd8: 0f 85 be 02 00 00 jne 111f9c <rtems_bdbuf_swapout_task+0x360><== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
sc = rtems_task_start (worker->id,
111cde: 51 push %ecx <== NOT EXECUTED
111cdf: 53 push %ebx <== NOT EXECUTED
111ce0: 68 ac 1f 11 00 push $0x111fac <== NOT EXECUTED
111ce5: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
111ce8: e8 93 b5 ff ff call 10d280 <rtems_task_start> <== NOT EXECUTED
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
111ced: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111cf0: 85 c0 test %eax,%eax <== NOT EXECUTED
111cf2: 0f 85 97 02 00 00 jne 111f8f <rtems_bdbuf_swapout_task+0x353><== NOT EXECUTED
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
for (w = 0; w < bdbuf_config.swapout_workers; w++)
111cf8: 46 inc %esi <== NOT EXECUTED
111cf9: 3b 35 54 4a 12 00 cmp 0x124a54,%esi <== NOT EXECUTED
111cff: 73 64 jae 111d65 <rtems_bdbuf_swapout_task+0x129><== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
111d01: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111d04: 6a 30 push $0x30 <== NOT EXECUTED
111d06: e8 59 7a ff ff call 109764 <malloc> <== NOT EXECUTED
111d0b: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (!worker)
111d0d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111d10: 85 c0 test %eax,%eax <== NOT EXECUTED
111d12: 0f 84 6a 02 00 00 je 111f82 <rtems_bdbuf_swapout_task+0x346><== 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 );
111d18: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111d1b: 50 push %eax <== NOT EXECUTED
111d1c: 68 e8 c0 12 00 push $0x12c0e8 <== NOT EXECUTED
111d21: e8 ae bb ff ff call 10d8d4 <_Chain_Append> <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
111d26: c6 43 0c 01 movb $0x1,0xc(%ebx) <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
111d2a: e8 75 f5 ff ff call 1112a4 <rtems_bdbuf_swapout_writereq_alloc><== NOT EXECUTED
111d2f: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
111d32: 8d 43 14 lea 0x14(%ebx),%eax <== NOT EXECUTED
111d35: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED
the_chain->permanent_null = NULL;
111d38: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
111d3f: 8d 43 10 lea 0x10(%ebx),%eax <== NOT EXECUTED
111d42: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
111d45: c7 43 1c ff ff ff ff movl $0xffffffff,0x1c(%ebx) <== NOT EXECUTED
111d4c: c7 43 20 ff ff ff ff movl $0xffffffff,0x20(%ebx) <== NOT EXECUTED
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
111d53: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111d56: 85 ff test %edi,%edi <== NOT EXECUTED
111d58: 0f 84 4e ff ff ff je 111cac <rtems_bdbuf_swapout_task+0x70><== NOT EXECUTED
111d5e: 89 f8 mov %edi,%eax <== NOT EXECUTED
111d60: e9 4c ff ff ff jmp 111cb1 <rtems_bdbuf_swapout_task+0x75><== NOT EXECUTED
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
}
rtems_bdbuf_unlock_cache ();
111d65: e8 0e ed ff ff call 110a78 <rtems_bdbuf_unlock_cache>
111d6a: 66 90 xchg %ax,%ax
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
111d6c: a0 e4 c0 12 00 mov 0x12c0e4,%al
111d71: 84 c0 test %al,%al
111d73: 0f 84 a3 01 00 00 je 111f1c <rtems_bdbuf_swapout_task+0x2e0><== NEVER TAKEN
111d79: c6 45 b3 01 movb $0x1,-0x4d(%ebp)
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
111d7d: e8 66 eb ff ff call 1108e8 <rtems_bdbuf_lock_cache>
* here. We do not know the worker is the last in a sequence of sync writes
* until after we have it running so we do not know to tell it to release the
* lock. The simplest solution is to get the main swap out task perform all
* sync operations.
*/
if (bdbuf_cache.sync_active)
111d82: a0 10 c1 12 00 mov 0x12c110,%al
111d87: 84 c0 test %al,%al
111d89: 0f 84 51 01 00 00 je 111ee0 <rtems_bdbuf_swapout_task+0x2a4>
111d8f: 31 f6 xor %esi,%esi
111d91: 8d 5d c4 lea -0x3c(%ebp),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
111d94: 8d 7b 04 lea 0x4(%ebx),%edi
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
111d97: 89 3b mov %edi,(%ebx)
the_chain->permanent_null = NULL;
111d99: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
the_chain->last = _Chain_Head(the_chain);
111da0: 89 5b 08 mov %ebx,0x8(%ebx)
if (worker)
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
111da3: c7 43 0c ff ff ff ff movl $0xffffffff,0xc(%ebx)
111daa: c7 43 10 ff ff ff ff movl $0xffffffff,0x10(%ebx)
transfer->syncing = bdbuf_cache.sync_active;
111db1: a0 10 c1 12 00 mov 0x12c110,%al
111db6: 88 43 14 mov %al,0x14(%ebx)
/*
* When the sync is for a device limit the sync to that device. If the sync
* is for a buffer handle process the devices in the order on the sync
* list. This means the dev is BDBUF_INVALID_DEV.
*/
if (bdbuf_cache.sync_active)
111db9: a0 10 c1 12 00 mov 0x12c110,%al
111dbe: 84 c0 test %al,%al
111dc0: 74 11 je 111dd3 <rtems_bdbuf_swapout_task+0x197>
transfer->dev = bdbuf_cache.sync_device;
111dc2: a1 18 c1 12 00 mov 0x12c118,%eax
111dc7: 8b 15 1c c1 12 00 mov 0x12c11c,%edx
111dcd: 89 43 0c mov %eax,0xc(%ebx)
111dd0: 89 53 10 mov %edx,0x10(%ebx)
/*
* If we have any buffers in the sync queue move them to the modified
* list. The first sync buffer will select the device we use.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
111dd3: 8d 43 0c lea 0xc(%ebx),%eax
111dd6: 89 45 b4 mov %eax,-0x4c(%ebp)
111dd9: 52 push %edx
111dda: ff 35 4c 4a 12 00 pushl 0x124a4c
111de0: 6a 00 push $0x0
111de2: 6a 01 push $0x1
111de4: 89 d9 mov %ebx,%ecx
111de6: ba 3c c1 12 00 mov $0x12c13c,%edx
111deb: e8 3c eb ff ff call 11092c <rtems_bdbuf_swapout_modified_processing>
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
&bdbuf_cache.modified,
&transfer->bds,
bdbuf_cache.sync_active,
111df0: a0 10 c1 12 00 mov 0x12c110,%al
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
111df5: 83 c4 0c add $0xc,%esp
111df8: ff 35 4c 4a 12 00 pushl 0x124a4c
111dfe: 0f b6 55 b3 movzbl -0x4d(%ebp),%edx
111e02: 52 push %edx
111e03: 0f b6 c0 movzbl %al,%eax
111e06: 50 push %eax
111e07: 89 d9 mov %ebx,%ecx
111e09: ba 30 c1 12 00 mov $0x12c130,%edx
111e0e: 8b 45 b4 mov -0x4c(%ebp),%eax
111e11: e8 16 eb ff ff call 11092c <rtems_bdbuf_swapout_modified_processing>
/*
* We have all the buffers that have been modified for this device so the
* cache can be unlocked because the state of each buffer has been set to
* TRANSFER.
*/
rtems_bdbuf_unlock_cache ();
111e16: e8 5d ec ff ff call 110a78 <rtems_bdbuf_unlock_cache>
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
111e1b: 83 c4 10 add $0x10,%esp
111e1e: 3b 3b cmp (%ebx),%edi
111e20: 0f 84 da 00 00 00 je 111f00 <rtems_bdbuf_swapout_task+0x2c4>
{
if (worker)
111e26: 85 f6 test %esi,%esi
111e28: 0f 84 da 00 00 00 je 111f08 <rtems_bdbuf_swapout_task+0x2cc><== ALWAYS TAKEN
{
rtems_status_code sc = rtems_event_send (worker->id,
111e2e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111e31: 6a 04 push $0x4 <== NOT EXECUTED
111e33: ff 76 08 pushl 0x8(%esi) <== NOT EXECUTED
111e36: e8 4d ab ff ff call 10c988 <rtems_event_send> <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
111e3b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111e3e: 85 c0 test %eax,%eax <== NOT EXECUTED
111e40: 0f 85 2f 01 00 00 jne 111f75 <rtems_bdbuf_swapout_task+0x339><== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
}
else
{
rtems_bdbuf_swapout_write (transfer);
111e46: b2 01 mov $0x1,%dl
}
transfered_buffers = true;
}
if (bdbuf_cache.sync_active && !transfered_buffers)
111e48: a0 10 c1 12 00 mov 0x12c110,%al
111e4d: 84 c0 test %al,%al
111e4f: 74 73 je 111ec4 <rtems_bdbuf_swapout_task+0x288>
111e51: c6 45 b3 00 movb $0x0,-0x4d(%ebp)
111e55: 84 d2 test %dl,%dl
111e57: 0f 85 20 ff ff ff jne 111d7d <rtems_bdbuf_swapout_task+0x141>
{
rtems_id sync_requester;
rtems_bdbuf_lock_cache ();
111e5d: e8 86 ea ff ff call 1108e8 <rtems_bdbuf_lock_cache>
sync_requester = bdbuf_cache.sync_requester;
111e62: 8b 1d 14 c1 12 00 mov 0x12c114,%ebx
bdbuf_cache.sync_active = false;
111e68: c6 05 10 c1 12 00 00 movb $0x0,0x12c110
bdbuf_cache.sync_requester = 0;
111e6f: c7 05 14 c1 12 00 00 movl $0x0,0x12c114
111e76: 00 00 00
rtems_bdbuf_unlock_cache ();
111e79: e8 fa eb ff ff call 110a78 <rtems_bdbuf_unlock_cache>
if (sync_requester)
111e7e: 85 db test %ebx,%ebx
111e80: 74 0e je 111e90 <rtems_bdbuf_swapout_task+0x254><== NEVER TAKEN
rtems_event_send (sync_requester, RTEMS_BDBUF_TRANSFER_SYNC);
111e82: 83 ec 08 sub $0x8,%esp
111e85: 6a 02 push $0x2
111e87: 53 push %ebx
111e88: e8 fb aa ff ff call 10c988 <rtems_event_send>
111e8d: 83 c4 10 add $0x10,%esp
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
111e90: 8d 55 e4 lea -0x1c(%ebp),%edx
111e93: 52 push %edx
111e94: ff 75 ac pushl -0x54(%ebp)
111e97: 6a 00 push $0x0
111e99: 6a 04 push $0x4
111e9b: e8 64 a9 ff ff call 10c804 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
period_in_ticks,
&out);
if ((sc != RTEMS_SUCCESSFUL) && (sc != RTEMS_TIMEOUT))
111ea0: 83 c4 10 add $0x10,%esp
111ea3: 85 c0 test %eax,%eax
111ea5: 0f 84 c1 fe ff ff je 111d6c <rtems_bdbuf_swapout_task+0x130>
111eab: 83 f8 06 cmp $0x6,%eax
111eae: 0f 84 b8 fe ff ff je 111d6c <rtems_bdbuf_swapout_task+0x130><== ALWAYS TAKEN
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
111eb4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111eb7: 68 18 00 00 42 push $0x42000018 <== NOT EXECUTED
111ebc: e8 93 b5 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
111ec1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
sync_requester = bdbuf_cache.sync_requester;
bdbuf_cache.sync_active = false;
bdbuf_cache.sync_requester = 0;
rtems_bdbuf_unlock_cache ();
if (sync_requester)
rtems_event_send (sync_requester, RTEMS_BDBUF_TRANSFER_SYNC);
111ec4: c6 45 b3 00 movb $0x0,-0x4d(%ebp)
/*
* Extact all the buffers we find for a specific device. The device is
* the first one we find on a modified list. Process the sync queue of
* buffers first.
*/
if (rtems_bdbuf_swapout_processing (timer_delta,
111ec8: 84 d2 test %dl,%dl
111eca: 74 c4 je 111e90 <rtems_bdbuf_swapout_task+0x254>
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
111ecc: e8 17 ea ff ff call 1108e8 <rtems_bdbuf_lock_cache>
* here. We do not know the worker is the last in a sequence of sync writes
* until after we have it running so we do not know to tell it to release the
* lock. The simplest solution is to get the main swap out task perform all
* sync operations.
*/
if (bdbuf_cache.sync_active)
111ed1: a0 10 c1 12 00 mov 0x12c110,%al
111ed6: 84 c0 test %al,%al
111ed8: 0f 85 b1 fe ff ff jne 111d8f <rtems_bdbuf_swapout_task+0x153><== NEVER TAKEN
111ede: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
111ee0: 83 ec 0c sub $0xc,%esp
111ee3: 68 e8 c0 12 00 push $0x12c0e8
111ee8: e8 23 ba ff ff call 10d910 <_Chain_Get>
111eed: 89 c6 mov %eax,%esi
worker = NULL;
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get (&bdbuf_cache.swapout_workers);
if (worker)
111eef: 83 c4 10 add $0x10,%esp
111ef2: 85 c0 test %eax,%eax
111ef4: 74 1e je 111f14 <rtems_bdbuf_swapout_task+0x2d8><== ALWAYS TAKEN
transfer = &worker->transfer;
111ef6: 8d 58 10 lea 0x10(%eax),%ebx <== NOT EXECUTED
111ef9: e9 96 fe ff ff jmp 111d94 <rtems_bdbuf_swapout_task+0x158><== NOT EXECUTED
111efe: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_bdbuf_unlock_cache ();
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
111f00: 31 d2 xor %edx,%edx
111f02: e9 41 ff ff ff jmp 111e48 <rtems_bdbuf_swapout_task+0x20c>
111f07: 90 nop
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
}
else
{
rtems_bdbuf_swapout_write (transfer);
111f08: 89 d8 mov %ebx,%eax
111f0a: e8 c1 fb ff ff call 111ad0 <rtems_bdbuf_swapout_write>
111f0f: e9 32 ff ff ff jmp 111e46 <rtems_bdbuf_swapout_task+0x20a>
worker = NULL;
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get (&bdbuf_cache.swapout_workers);
if (worker)
111f14: 8d 5d c4 lea -0x3c(%ebp),%ebx
111f17: e9 78 fe ff ff jmp 111d94 <rtems_bdbuf_swapout_task+0x158>
static void
rtems_bdbuf_swapout_workers_close (void)
{
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
111f1c: e8 c7 e9 ff ff call 1108e8 <rtems_bdbuf_lock_cache><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
111f21: 8b 1d e8 c0 12 00 mov 0x12c0e8,%ebx <== NOT EXECUTED
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
111f27: 81 fb ec c0 12 00 cmp $0x12c0ec,%ebx <== NOT EXECUTED
111f2d: 74 1f je 111f4e <rtems_bdbuf_swapout_task+0x312><== NOT EXECUTED
111f2f: 90 nop <== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) node;
worker->enabled = false;
111f30: c6 43 0c 00 movb $0x0,0xc(%ebx) <== NOT EXECUTED
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
111f34: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111f37: 6a 04 push $0x4 <== NOT EXECUTED
111f39: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
111f3c: e8 47 aa ff ff call 10c988 <rtems_event_send> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
111f41: 8b 1b mov (%ebx),%ebx <== NOT EXECUTED
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
111f43: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111f46: 81 fb ec c0 12 00 cmp $0x12c0ec,%ebx <== NOT EXECUTED
111f4c: 75 e2 jne 111f30 <rtems_bdbuf_swapout_task+0x2f4><== NOT EXECUTED
worker->enabled = false;
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
node = rtems_chain_next (node);
}
rtems_bdbuf_unlock_cache ();
111f4e: e8 25 eb ff ff call 110a78 <rtems_bdbuf_unlock_cache><== NOT EXECUTED
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
}
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
111f53: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111f56: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
111f59: e8 2e 75 ff ff call 10948c <free> <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
111f5e: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED
111f65: e8 16 b2 ff ff call 10d180 <rtems_task_delete> <== NOT EXECUTED
111f6a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
111f6d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
111f70: 5b pop %ebx <== NOT EXECUTED
111f71: 5e pop %esi <== NOT EXECUTED
111f72: 5f pop %edi <== NOT EXECUTED
111f73: c9 leave <== NOT EXECUTED
111f74: c3 ret <== NOT EXECUTED
if (worker)
{
rtems_status_code sc = rtems_event_send (worker->id,
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
111f75: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111f78: 68 14 00 00 42 push $0x42000014 <== NOT EXECUTED
111f7d: e8 d2 b4 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
111f82: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111f85: 68 15 00 00 42 push $0x42000015 <== NOT EXECUTED
111f8a: e8 c5 b4 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
sc = rtems_task_start (worker->id,
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
111f8f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111f92: 68 17 00 00 42 push $0x42000017 <== NOT EXECUTED
111f97: e8 b8 b4 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
111f9c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111f9f: 68 16 00 00 42 push $0x42000016 <== NOT EXECUTED
111fa4: e8 ab b4 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
00111fac <rtems_bdbuf_swapout_worker_task>:
* @param arg A pointer to the worker thread's private data.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_worker_task (rtems_task_argument arg)
{
111fac: 55 push %ebp <== NOT EXECUTED
111fad: 89 e5 mov %esp,%ebp <== NOT EXECUTED
111faf: 57 push %edi <== NOT EXECUTED
111fb0: 56 push %esi <== NOT EXECUTED
111fb1: 53 push %ebx <== NOT EXECUTED
111fb2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111fb5: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
111fb8: 8a 43 0c mov 0xc(%ebx),%al <== NOT EXECUTED
111fbb: 84 c0 test %al,%al <== NOT EXECUTED
111fbd: 74 57 je 112016 <rtems_bdbuf_swapout_worker_task+0x6a><== NOT EXECUTED
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
rtems_bdbuf_swapout_write (&worker->transfer);
111fbf: 8d 73 10 lea 0x10(%ebx),%esi <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
111fc2: 8d 7b 14 lea 0x14(%ebx),%edi <== NOT EXECUTED
111fc5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
111fc8: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
111fcd: e8 0a ed ff ff call 110cdc <rtems_bdbuf_wait_for_event><== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
111fd2: 89 f0 mov %esi,%eax <== NOT EXECUTED
111fd4: e8 f7 fa ff ff call 111ad0 <rtems_bdbuf_swapout_write><== NOT EXECUTED
rtems_bdbuf_lock_cache ();
111fd9: e8 0a e9 ff ff call 1108e8 <rtems_bdbuf_lock_cache><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
111fde: 89 7b 10 mov %edi,0x10(%ebx) <== NOT EXECUTED
the_chain->permanent_null = NULL;
111fe1: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
111fe8: 89 73 18 mov %esi,0x18(%ebx) <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
111feb: c7 43 1c ff ff ff ff movl $0xffffffff,0x1c(%ebx) <== NOT EXECUTED
111ff2: c7 43 20 ff ff ff ff movl $0xffffffff,0x20(%ebx) <== 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 );
111ff9: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111ffc: 53 push %ebx <== NOT EXECUTED
111ffd: 68 e8 c0 12 00 push $0x12c0e8 <== NOT EXECUTED
112002: e8 cd b8 ff ff call 10d8d4 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
112007: e8 6c ea ff ff call 110a78 <rtems_bdbuf_unlock_cache><== NOT EXECUTED
static rtems_task
rtems_bdbuf_swapout_worker_task (rtems_task_argument arg)
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
11200c: 8a 43 0c mov 0xc(%ebx),%al <== NOT EXECUTED
11200f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112012: 84 c0 test %al,%al <== NOT EXECUTED
112014: 75 b2 jne 111fc8 <rtems_bdbuf_swapout_worker_task+0x1c><== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
}
free (worker->transfer.write_req);
112016: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112019: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
11201c: e8 6b 74 ff ff call 10948c <free> <== NOT EXECUTED
free (worker);
112021: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
112024: e8 63 74 ff ff call 10948c <free> <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
112029: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11202c: c7 45 08 00 00 00 00 movl $0x0,0x8(%ebp) <== NOT EXECUTED
}
112033: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112036: 5b pop %ebx <== NOT EXECUTED
112037: 5e pop %esi <== NOT EXECUTED
112038: 5f pop %edi <== NOT EXECUTED
112039: c9 leave <== NOT EXECUTED
}
free (worker->transfer.write_req);
free (worker);
rtems_task_delete (RTEMS_SELF);
11203a: e9 41 b1 ff ff jmp 10d180 <rtems_task_delete> <== NOT EXECUTED
00111ad0 <rtems_bdbuf_swapout_write>:
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
111ad0: 55 push %ebp
111ad1: 89 e5 mov %esp,%ebp
111ad3: 57 push %edi
111ad4: 56 push %esi
111ad5: 53 push %ebx
111ad6: 83 ec 2c sub $0x2c,%esp
111ad9: 89 c3 mov %eax,%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
111adb: 8d 40 04 lea 0x4(%eax),%eax
111ade: 89 45 e4 mov %eax,-0x1c(%ebp)
printf ("bdbuf:swapout transfer: %08x\n", (unsigned) transfer->dev);
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
111ae1: 39 03 cmp %eax,(%ebx)
111ae3: 0f 84 e1 00 00 00 je 111bca <rtems_bdbuf_swapout_write+0xfa><== NEVER TAKEN
/*
* Obtain the disk device. The cache's mutex has been released to avoid a
* dead lock.
*/
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
111ae9: 83 ec 08 sub $0x8,%esp
111aec: ff 73 10 pushl 0x10(%ebx)
111aef: ff 73 0c pushl 0xc(%ebx)
111af2: e8 21 6a ff ff call 108518 <rtems_disk_obtain>
111af7: 89 c6 mov %eax,%esi
if (dd == NULL)
111af9: 83 c4 10 add $0x10,%esp
111afc: 85 c0 test %eax,%eax
111afe: 0f 84 2c 01 00 00 je 111c30 <rtems_bdbuf_swapout_write+0x160>
dd = &null_disk;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
111b04: 8b 46 20 mov 0x20(%esi),%eax
111b07: 31 d2 xor %edx,%edx
111b09: f7 35 60 4a 12 00 divl 0x124a60
111b0f: 89 45 dc mov %eax,-0x24(%ebp)
* should be possible to make this change with little effect in this
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
111b12: 8b 43 18 mov 0x18(%ebx),%eax
111b15: c7 40 0c 0c 00 00 00 movl $0xc,0xc(%eax)
transfer->write_req->bufnum = 0;
111b1c: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
* Perform the transfer if there are no more buffers, or the transfer
* size has reached the configured max. value.
*/
if (rtems_chain_is_empty (&transfer->bds) ||
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
111b23: 31 ff xor %edi,%edi
111b25: 89 7d d4 mov %edi,-0x2c(%ebp)
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
111b28: 83 ec 0c sub $0xc,%esp
111b2b: 53 push %ebx
111b2c: e8 df bd ff ff call 10d910 <_Chain_Get>
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
111b31: 83 c4 10 add $0x10,%esp
111b34: 85 c0 test %eax,%eax
111b36: 74 78 je 111bb0 <rtems_bdbuf_swapout_write+0xe0><== NEVER TAKEN
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
111b38: 8b 56 08 mov 0x8(%esi),%edx
111b3b: f6 42 0c 01 testb $0x1,0xc(%edx)
111b3f: 0f 84 8f 00 00 00 je 111bd4 <rtems_bdbuf_swapout_write+0x104><== ALWAYS TAKEN
transfer->write_req->bufnum &&
111b45: 8b 53 18 mov 0x18(%ebx),%edx <== NOT EXECUTED
111b48: 8b 4a 10 mov 0x10(%edx),%ecx <== NOT EXECUTED
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
111b4b: 85 c9 test %ecx,%ecx <== NOT EXECUTED
111b4d: 0f 84 87 00 00 00 je 111bda <rtems_bdbuf_swapout_write+0x10a><== NOT EXECUTED
transfer->write_req->bufnum &&
(bd->block != (last_block + bufs_per_bd)))
111b53: 8b 7d dc mov -0x24(%ebp),%edi <== NOT EXECUTED
111b56: 03 7d d4 add -0x2c(%ebp),%edi <== NOT EXECUTED
111b59: 39 78 1c cmp %edi,0x1c(%eax) <== NOT EXECUTED
111b5c: 74 7c je 111bda <rtems_bdbuf_swapout_write+0x10a><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
111b5e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111b61: 50 push %eax <== NOT EXECUTED
111b62: 53 push %ebx <== NOT EXECUTED
111b63: e8 00 42 00 00 call 115d68 <_Chain_Insert> <== NOT EXECUTED
111b68: b0 01 mov $0x1,%al <== NOT EXECUTED
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
111b6a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111b6d: 8b 53 18 mov 0x18(%ebx),%edx <== NOT EXECUTED
/*
* Perform the transfer if there are no more buffers, or the transfer
* size has reached the configured max. value.
*/
if (rtems_chain_is_empty (&transfer->bds) ||
111b70: 8b 4d e4 mov -0x1c(%ebp),%ecx
111b73: 3b 0b cmp (%ebx),%ecx
111b75: 74 0f je 111b86 <rtems_bdbuf_swapout_write+0xb6>
111b77: 8b 3d 44 4a 12 00 mov 0x124a44,%edi
111b7d: 39 7a 10 cmp %edi,0x10(%edx)
111b80: 0f 82 82 00 00 00 jb 111c08 <rtems_bdbuf_swapout_write+0x138>
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
111b86: 31 c9 xor %ecx,%ecx
111b88: 89 f0 mov %esi,%eax
111b8a: e8 1d fe ff ff call 1119ac <rtems_bdbuf_execute_transfer_request>
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
111b8f: 8b 43 18 mov 0x18(%ebx),%eax
111b92: c7 40 0c 0c 00 00 00 movl $0xc,0xc(%eax)
transfer->write_req->bufnum = 0;
111b99: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
111ba0: 83 ec 0c sub $0xc,%esp
111ba3: 53 push %ebx
111ba4: e8 67 bd ff ff call 10d910 <_Chain_Get>
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
111ba9: 83 c4 10 add $0x10,%esp
111bac: 85 c0 test %eax,%eax
111bae: 75 88 jne 111b38 <rtems_bdbuf_swapout_write+0x68>
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
}
}
if (dd != &null_disk)
111bb0: 81 fe 60 a0 12 00 cmp $0x12a060,%esi
111bb6: 74 12 je 111bca <rtems_bdbuf_swapout_write+0xfa><== NEVER TAKEN
{
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
111bb8: 80 7b 14 00 cmpb $0x0,0x14(%ebx)
111bbc: 75 5a jne 111c18 <rtems_bdbuf_swapout_write+0x148>
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
/* How should the error be handled ? */
}
rtems_disk_release (dd);
111bbe: 83 ec 0c sub $0xc,%esp
111bc1: 56 push %esi
111bc2: e8 2d 6b ff ff call 1086f4 <rtems_disk_release>
111bc7: 83 c4 10 add $0x10,%esp
}
}
}
111bca: 8d 65 f4 lea -0xc(%ebp),%esp
111bcd: 5b pop %ebx
111bce: 5e pop %esi
111bcf: 5f pop %edi
111bd0: c9 leave
111bd1: c3 ret
111bd2: 66 90 xchg %ax,%ax
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
111bd4: 8b 53 18 mov 0x18(%ebx),%edx
111bd7: 8b 4a 10 mov 0x10(%edx),%ecx
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
111bda: 41 inc %ecx
111bdb: 89 4a 10 mov %ecx,0x10(%edx)
buf->user = bd;
111bde: c1 e1 04 shl $0x4,%ecx
111be1: 8d 0c 0a lea (%edx,%ecx,1),%ecx
111be4: 89 41 14 mov %eax,0x14(%ecx)
buf->block = bd->block;
111be7: 8b 78 1c mov 0x1c(%eax),%edi
111bea: 89 79 08 mov %edi,0x8(%ecx)
buf->length = dd->block_size;
111bed: 8b 7e 20 mov 0x20(%esi),%edi
111bf0: 89 79 0c mov %edi,0xc(%ecx)
buf->buffer = bd->buffer;
111bf3: 8b 78 20 mov 0x20(%eax),%edi
111bf6: 89 79 10 mov %edi,0x10(%ecx)
last_block = bd->block;
111bf9: 8b 40 1c mov 0x1c(%eax),%eax
111bfc: 89 45 d4 mov %eax,-0x2c(%ebp)
111bff: 31 c0 xor %eax,%eax
111c01: e9 6a ff ff ff jmp 111b70 <rtems_bdbuf_swapout_write+0xa0>
111c06: 66 90 xchg %ax,%ax
if (rtems_chain_is_empty (&transfer->bds) ||
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
111c08: 84 c0 test %al,%al
111c0a: 0f 84 18 ff ff ff je 111b28 <rtems_bdbuf_swapout_write+0x58><== ALWAYS TAKEN
111c10: e9 71 ff ff ff jmp 111b86 <rtems_bdbuf_swapout_write+0xb6><== NOT EXECUTED
111c15: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
111c18: 8b 46 08 mov 0x8(%esi),%eax
{
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
111c1b: f6 40 0c 02 testb $0x2,0xc(%eax)
111c1f: 74 9d je 111bbe <rtems_bdbuf_swapout_write+0xee><== ALWAYS TAKEN
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
111c21: 57 push %edi <== NOT EXECUTED
111c22: 6a 00 push $0x0 <== NOT EXECUTED
111c24: 6a 02 push $0x2 <== NOT EXECUTED
111c26: 50 push %eax <== NOT EXECUTED
111c27: ff 56 28 call *0x28(%esi) <== NOT EXECUTED
111c2a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111c2d: eb 8f jmp 111bbe <rtems_bdbuf_swapout_write+0xee><== NOT EXECUTED
111c2f: 90 nop <== NOT EXECUTED
* Obtain the disk device. The cache's mutex has been released to avoid a
* dead lock.
*/
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
if (dd == NULL)
111c30: be 60 a0 12 00 mov $0x12a060,%esi
111c35: e9 ca fe ff ff jmp 111b04 <rtems_bdbuf_swapout_write+0x34>
001112a4 <rtems_bdbuf_swapout_writereq_alloc>:
*
* @return rtems_blkdev_request* The write reference memory.
*/
static rtems_blkdev_request*
rtems_bdbuf_swapout_writereq_alloc (void)
{
1112a4: 55 push %ebp
1112a5: 89 e5 mov %esp,%ebp
1112a7: 53 push %ebx
1112a8: 83 ec 10 sub $0x10,%esp
* I am disappointment at finding code like this in RTEMS. The request should
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
1112ab: a1 44 4a 12 00 mov 0x124a44,%eax
1112b0: c1 e0 04 shl $0x4,%eax
1112b3: 83 c0 18 add $0x18,%eax
1112b6: 50 push %eax
1112b7: e8 a8 84 ff ff call 109764 <malloc>
1112bc: 89 c3 mov %eax,%ebx
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
1112be: 83 c4 10 add $0x10,%esp
1112c1: 85 c0 test %eax,%eax
1112c3: 74 1f je 1112e4 <rtems_bdbuf_swapout_writereq_alloc+0x40><== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
1112c5: c7 00 01 00 00 00 movl $0x1,(%eax)
write_req->req_done = rtems_bdbuf_transfer_done;
1112cb: c7 40 04 b8 0c 11 00 movl $0x110cb8,0x4(%eax)
write_req->done_arg = write_req;
1112d2: 89 43 08 mov %eax,0x8(%ebx)
write_req->io_task = rtems_task_self ();
1112d5: e8 62 47 00 00 call 115a3c <rtems_task_self>
1112da: 89 43 14 mov %eax,0x14(%ebx)
return write_req;
}
1112dd: 89 d8 mov %ebx,%eax
1112df: 8b 5d fc mov -0x4(%ebp),%ebx
1112e2: c9 leave
1112e3: c3 ret
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
1112e4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1112e7: 68 15 00 00 42 push $0x42000015 <== NOT EXECUTED
1112ec: e8 63 c1 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
00112040 <rtems_bdbuf_sync>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
{
112040: 55 push %ebp
112041: 89 e5 mov %esp,%ebp
112043: 53 push %ebx
112044: 83 ec 04 sub $0x4,%esp
112047: 8b 5d 08 mov 0x8(%ebp),%ebx
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
11204a: 80 3d 68 c1 12 00 00 cmpb $0x0,0x12c168
112051: 74 31 je 112084 <rtems_bdbuf_sync+0x44> <== NEVER TAKEN
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
112053: 85 db test %ebx,%ebx
112055: 74 39 je 112090 <rtems_bdbuf_sync+0x50> <== NEVER TAKEN
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
112057: e8 8c e8 ff ff call 1108e8 <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "sync");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
11205c: 8b 43 24 mov 0x24(%ebx),%eax
11205f: 83 f8 03 cmp $0x3,%eax
112062: 72 0a jb 11206e <rtems_bdbuf_sync+0x2e> <== NEVER TAKEN
112064: 83 f8 05 cmp $0x5,%eax
112067: 76 47 jbe 1120b0 <rtems_bdbuf_sync+0x70>
112069: 83 f8 06 cmp $0x6,%eax
11206c: 74 2e je 11209c <rtems_bdbuf_sync+0x5c> <== ALWAYS TAKEN
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_5);
11206e: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
112071: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112074: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
112077: 0d 03 00 00 42 or $0x42000003,%eax <== NOT EXECUTED
11207c: 50 push %eax <== NOT EXECUTED
11207d: e8 d2 b3 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
112082: 66 90 xchg %ax,%ax <== NOT EXECUTED
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "sync");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
112084: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
112089: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
11208c: c9 leave <== NOT EXECUTED
11208d: c3 ret <== NOT EXECUTED
11208e: 66 90 xchg %ax,%ax <== NOT EXECUTED
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
112090: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
112095: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
112098: c9 leave <== NOT EXECUTED
112099: c3 ret <== NOT EXECUTED
11209a: 66 90 xchg %ax,%ax <== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_sync_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
11209c: 89 d8 mov %ebx,%eax
11209e: e8 dd f5 ff ff call 111680 <rtems_bdbuf_discard_buffer_after_access>
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
1120a3: e8 d0 e9 ff ff call 110a78 <rtems_bdbuf_unlock_cache>
1120a8: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
1120aa: 8b 5d fc mov -0x4(%ebp),%ebx
1120ad: c9 leave
1120ae: c3 ret
1120af: 90 nop
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
1120b0: c7 43 24 08 00 00 00 movl $0x8,0x24(%ebx)
1120b7: 83 ec 08 sub $0x8,%esp
1120ba: 53 push %ebx
1120bb: 68 3c c1 12 00 push $0x12c13c
1120c0: e8 0f b8 ff ff call 10d8d4 <_Chain_Append>
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
1120c5: 8b 43 28 mov 0x28(%ebx),%eax
1120c8: 83 c4 10 add $0x10,%esp
1120cb: 85 c0 test %eax,%eax
1120cd: 75 65 jne 112134 <rtems_bdbuf_sync+0xf4>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
rtems_bdbuf_wake_swapper ();
1120cf: e8 04 eb ff ff call 110bd8 <rtems_bdbuf_wake_swapper>
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
1120d4: 8b 43 24 mov 0x24(%ebx),%eax
1120d7: 83 f8 01 cmp $0x1,%eax
1120da: 73 14 jae 1120f0 <rtems_bdbuf_sync+0xb0> <== ALWAYS TAKEN
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_9);
1120dc: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
1120df: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1120e2: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
1120e5: 0d 07 00 00 42 or $0x42000007,%eax <== NOT EXECUTED
1120ea: 50 push %eax <== NOT EXECUTED
1120eb: e8 64 b3 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
1120f0: 83 f8 07 cmp $0x7,%eax
1120f3: 76 13 jbe 112108 <rtems_bdbuf_sync+0xc8>
1120f5: 83 f8 0a cmp $0xa,%eax
1120f8: 77 e2 ja 1120dc <rtems_bdbuf_sync+0x9c> <== NEVER TAKEN
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
return;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
1120fa: ba 50 c1 12 00 mov $0x12c150,%edx
1120ff: 89 d8 mov %ebx,%eax
112101: e8 72 ed ff ff call 110e78 <rtems_bdbuf_wait>
112106: eb cc jmp 1120d4 <rtems_bdbuf_sync+0x94>
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
112108: 8b 43 28 mov 0x28(%ebx),%eax
rtems_bdbuf_wait_for_sync_done (bd);
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
11210b: 85 c0 test %eax,%eax
11210d: 75 94 jne 1120a3 <rtems_bdbuf_sync+0x63>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
11210f: 8b 43 24 mov 0x24(%ebx),%eax
rtems_bdbuf_wait_for_sync_done (bd);
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
112112: 83 f8 02 cmp $0x2,%eax
112115: 74 06 je 11211d <rtems_bdbuf_sync+0xdd>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
112117: 8b 43 24 mov 0x24(%ebx),%eax
rtems_bdbuf_wait_for_sync_done (bd);
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
11211a: 48 dec %eax
11211b: 75 86 jne 1120a3 <rtems_bdbuf_sync+0x63> <== NEVER TAKEN
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
11211d: 8b 43 24 mov 0x24(%ebx),%eax
112120: 48 dec %eax
112121: 74 1d je 112140 <rtems_bdbuf_sync+0x100>
{
rtems_bdbuf_remove_from_tree (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
}
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
112123: b8 58 c1 12 00 mov $0x12c158,%eax
112128: e8 cf e7 ff ff call 1108fc <rtems_bdbuf_wake>
11212d: e9 71 ff ff ff jmp 1120a3 <rtems_bdbuf_sync+0x63>
112132: 66 90 xchg %ax,%ax
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
112134: b8 48 c1 12 00 mov $0x12c148,%eax
112139: e8 be e7 ff ff call 1108fc <rtems_bdbuf_wake>
11213e: eb 8f jmp 1120cf <rtems_bdbuf_sync+0x8f>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
{
rtems_bdbuf_remove_from_tree (bd);
112140: 89 d8 mov %ebx,%eax
112142: e8 ad f1 ff ff call 1112f4 <rtems_bdbuf_remove_from_tree>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
112147: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
11214e: 83 ec 08 sub $0x8,%esp
112151: 53 push %ebx
112152: 68 24 c1 12 00 push $0x12c124
112157: e8 0c 3c 00 00 call 115d68 <_Chain_Insert>
11215c: 83 c4 10 add $0x10,%esp
11215f: eb c2 jmp 112123 <rtems_bdbuf_sync+0xe3>
00110d18 <rtems_bdbuf_syncdev>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_syncdev (dev_t dev)
{
110d18: 55 push %ebp
110d19: 89 e5 mov %esp,%ebp
110d1b: 57 push %edi
110d1c: 56 push %esi
110d1d: 53 push %ebx
110d1e: 83 ec 20 sub $0x20,%esp
110d21: 8b 5d 08 mov 0x8(%ebp),%ebx
110d24: 8b 75 0c mov 0xc(%ebp),%esi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
110d27: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
if (rtems_bdbuf_tracer)
printf ("bdbuf:syncdev: %08x\n", (unsigned) dev);
sc = rtems_bdbuf_obtain_disk (dev, 0, &dd, NULL, NULL);
110d2e: 6a 00 push $0x0
110d30: 6a 00 push $0x0
110d32: 8d 45 e4 lea -0x1c(%ebp),%eax
110d35: 50 push %eax
110d36: 31 c9 xor %ecx,%ecx
110d38: 89 d8 mov %ebx,%eax
110d3a: 89 f2 mov %esi,%edx
110d3c: e8 87 fd ff ff call 110ac8 <rtems_bdbuf_obtain_disk>
110d41: 89 c7 mov %eax,%edi
if (sc != RTEMS_SUCCESSFUL)
110d43: 83 c4 10 add $0x10,%esp
110d46: 85 c0 test %eax,%eax
110d48: 75 52 jne 110d9c <rtems_bdbuf_syncdev+0x84><== NEVER TAKEN
* Lock the cache's sync. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_sync (void)
{
rtems_bdbuf_lock (bdbuf_cache.sync_lock, RTEMS_BLKDEV_FATAL_BDBUF_SYNC_LOCK);
110d4a: ba 0b 00 00 42 mov $0x4200000b,%edx
110d4f: a1 0c c1 12 00 mov 0x12c10c,%eax
110d54: e8 67 fb ff ff call 1108c0 <rtems_bdbuf_lock>
* can lock the cache. If another thread has the sync lock it will cause this
* thread to block until it owns the sync lock then it can own the cache. The
* sync lock can only be obtained with the cache unlocked.
*/
rtems_bdbuf_lock_sync ();
rtems_bdbuf_lock_cache ();
110d59: e8 8a fb ff ff call 1108e8 <rtems_bdbuf_lock_cache>
* out task know the id of the requester to wake when done.
*
* The swap out task will negate the sync active flag when no more buffers
* for the device are held on the "modified for sync" queues.
*/
bdbuf_cache.sync_active = true;
110d5e: c6 05 10 c1 12 00 01 movb $0x1,0x12c110
bdbuf_cache.sync_requester = rtems_task_self ();
110d65: e8 d2 4c 00 00 call 115a3c <rtems_task_self>
110d6a: a3 14 c1 12 00 mov %eax,0x12c114
bdbuf_cache.sync_device = dev;
110d6f: 89 1d 18 c1 12 00 mov %ebx,0x12c118
110d75: 89 35 1c c1 12 00 mov %esi,0x12c11c
rtems_bdbuf_wake_swapper ();
110d7b: e8 58 fe ff ff call 110bd8 <rtems_bdbuf_wake_swapper>
rtems_bdbuf_unlock_cache ();
110d80: e8 f3 fc ff ff call 110a78 <rtems_bdbuf_unlock_cache>
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
110d85: b8 02 00 00 00 mov $0x2,%eax
110d8a: e8 4d ff ff ff call 110cdc <rtems_bdbuf_wait_for_event>
rtems_bdbuf_unlock_sync ();
110d8f: e8 0c fd ff ff call 110aa0 <rtems_bdbuf_unlock_sync>
rtems_bdbuf_release_disk (dd);
110d94: 8b 45 e4 mov -0x1c(%ebp),%eax
110d97: e8 18 fe ff ff call 110bb4 <rtems_bdbuf_release_disk>
return RTEMS_SUCCESSFUL;
}
110d9c: 89 f8 mov %edi,%eax
110d9e: 8d 65 f4 lea -0xc(%ebp),%esp
110da1: 5b pop %ebx
110da2: 5e pop %esi
110da3: 5f pop %edi
110da4: c9 leave
110da5: c3 ret
00110a78 <rtems_bdbuf_unlock_cache>:
/**
* Unlock the cache.
*/
static void
rtems_bdbuf_unlock_cache (void)
{
110a78: 55 push %ebp
110a79: 89 e5 mov %esp,%ebp
110a7b: 83 ec 14 sub $0x14,%esp
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
110a7e: ff 35 08 c1 12 00 pushl 0x12c108
110a84: e8 f7 c4 ff ff call 10cf80 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
110a89: 83 c4 10 add $0x10,%esp
110a8c: 85 c0 test %eax,%eax
110a8e: 75 02 jne 110a92 <rtems_bdbuf_unlock_cache+0x1a><== NEVER TAKEN
*/
static void
rtems_bdbuf_unlock_cache (void)
{
rtems_bdbuf_unlock (bdbuf_cache.lock, RTEMS_BLKDEV_FATAL_BDBUF_CACHE_UNLOCK);
}
110a90: c9 leave
110a91: c3 ret
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
110a92: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110a95: 68 0e 00 00 42 push $0x4200000e <== NOT EXECUTED
110a9a: e8 b5 c9 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
00110aa0 <rtems_bdbuf_unlock_sync>:
/**
* Unlock the cache's sync lock. Any blocked writers are woken.
*/
static void
rtems_bdbuf_unlock_sync (void)
{
110aa0: 55 push %ebp
110aa1: 89 e5 mov %esp,%ebp
110aa3: 83 ec 14 sub $0x14,%esp
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
110aa6: ff 35 0c c1 12 00 pushl 0x12c10c
110aac: e8 cf c4 ff ff call 10cf80 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
110ab1: 83 c4 10 add $0x10,%esp
110ab4: 85 c0 test %eax,%eax
110ab6: 75 02 jne 110aba <rtems_bdbuf_unlock_sync+0x1a><== NEVER TAKEN
static void
rtems_bdbuf_unlock_sync (void)
{
rtems_bdbuf_unlock (bdbuf_cache.sync_lock,
RTEMS_BLKDEV_FATAL_BDBUF_SYNC_UNLOCK);
}
110ab8: c9 leave
110ab9: c3 ret
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
110aba: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110abd: 68 0c 00 00 42 push $0x4200000c <== NOT EXECUTED
110ac2: e8 8d c9 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
00110cdc <rtems_bdbuf_wait_for_event>:
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
110cdc: 55 push %ebp
110cdd: 89 e5 mov %esp,%ebp
110cdf: 53 push %ebx
110ce0: 83 ec 14 sub $0x14,%esp
110ce3: 89 c3 mov %eax,%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
110ce5: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
sc = rtems_event_receive (event,
110cec: 8d 45 f4 lea -0xc(%ebp),%eax
110cef: 50 push %eax
110cf0: 6a 00 push $0x0
110cf2: 6a 00 push $0x0
110cf4: 53 push %ebx
110cf5: e8 0a bb ff ff call 10c804 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
110cfa: 83 c4 10 add $0x10,%esp
110cfd: 85 c0 test %eax,%eax
110cff: 75 0a jne 110d0b <rtems_bdbuf_wait_for_event+0x2f><== NEVER TAKEN
110d01: 39 5d f4 cmp %ebx,-0xc(%ebp)
110d04: 75 05 jne 110d0b <rtems_bdbuf_wait_for_event+0x2f><== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_EVNT);
}
110d06: 8b 5d fc mov -0x4(%ebp),%ebx
110d09: c9 leave
110d0a: c3 ret
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_EVNT);
110d0b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110d0e: 68 1a 00 00 42 push $0x4200001a <== NOT EXECUTED
110d13: e8 3c c7 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
001108fc <rtems_bdbuf_wake>:
* Wake a blocked resource. The resource has a counter that lets us know if
* there are any waiters.
*/
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
1108fc: 55 push %ebp
1108fd: 89 e5 mov %esp,%ebp
1108ff: 83 ec 08 sub $0x8,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
110902: 8b 10 mov (%eax),%edx
110904: 85 d2 test %edx,%edx
110906: 75 04 jne 11090c <rtems_bdbuf_wake+0x10>
{
sc = rtems_semaphore_flush (waiters->sema);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
}
}
110908: c9 leave
110909: c3 ret
11090a: 66 90 xchg %ax,%ax
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
{
sc = rtems_semaphore_flush (waiters->sema);
11090c: 83 ec 0c sub $0xc,%esp
11090f: ff 70 04 pushl 0x4(%eax)
110912: e8 61 4f 00 00 call 115878 <rtems_semaphore_flush>
if (sc != RTEMS_SUCCESSFUL)
110917: 83 c4 10 add $0x10,%esp
11091a: 85 c0 test %eax,%eax
11091c: 74 ea je 110908 <rtems_bdbuf_wake+0xc> <== ALWAYS TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
11091e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110921: 68 13 00 00 42 push $0x42000013 <== NOT EXECUTED
110926: e8 29 cb ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
00110bd8 <rtems_bdbuf_wake_swapper>:
}
}
static void
rtems_bdbuf_wake_swapper (void)
{
110bd8: 55 push %ebp
110bd9: 89 e5 mov %esp,%ebp
110bdb: 83 ec 10 sub $0x10,%esp
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
110bde: 6a 04 push $0x4
110be0: ff 35 e0 c0 12 00 pushl 0x12c0e0
110be6: e8 9d bd ff ff call 10c988 <rtems_event_send>
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
110beb: 83 c4 10 add $0x10,%esp
110bee: 85 c0 test %eax,%eax
110bf0: 75 02 jne 110bf4 <rtems_bdbuf_wake_swapper+0x1c><== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
}
110bf2: c9 leave
110bf3: c3 ret
rtems_bdbuf_wake_swapper (void)
{
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
110bf4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110bf7: 68 14 00 00 42 push $0x42000014 <== NOT EXECUTED
110bfc: e8 53 c8 ff ff call 10d454 <rtems_fatal_error_occurred><== NOT EXECUTED
001297a0 <rtems_bdpart_create>:
const rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
const unsigned *dist,
size_t count
)
{
1297a0: 55 push %ebp <== NOT EXECUTED
1297a1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1297a3: 57 push %edi <== NOT EXECUTED
1297a4: 56 push %esi <== NOT EXECUTED
1297a5: 53 push %ebx <== NOT EXECUTED
1297a6: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
1297a9: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED
1297ac: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
1297af: 85 ff test %edi,%edi <== NOT EXECUTED
1297b1: 74 0a je 1297bd <rtems_bdpart_create+0x1d><== NOT EXECUTED
&& format->type == RTEMS_BDPART_FORMAT_MBR
1297b3: 8b 07 mov (%edi),%eax <== NOT EXECUTED
1297b5: 85 c0 test %eax,%eax <== NOT EXECUTED
1297b7: 0f 84 8f 01 00 00 je 12994c <rtems_bdpart_create+0x1ac><== NOT EXECUTED
&& format->mbr.dos_compatibility;
rtems_blkdev_bnum disk_end = 0;
1297bd: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
1297c4: c6 45 d0 00 movb $0x0,-0x30(%ebp) <== NOT EXECUTED
1297c8: c7 45 d4 01 00 00 00 movl $0x1,-0x2c(%ebp) <== NOT EXECUTED
rtems_blkdev_bnum free_space = 0;
dev_t disk = 0;
size_t i = 0;
/* Check if we have something to do */
if (count == 0) {
1297cf: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED
1297d2: 85 db test %ebx,%ebx <== NOT EXECUTED
1297d4: 0f 84 99 01 00 00 je 129973 <rtems_bdpart_create+0x1d3><== NOT EXECUTED
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL || dist == NULL) {
1297da: 85 ff test %edi,%edi <== NOT EXECUTED
1297dc: 0f 84 9e 01 00 00 je 129980 <rtems_bdpart_create+0x1e0><== NOT EXECUTED
1297e2: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
1297e5: 85 c9 test %ecx,%ecx <== NOT EXECUTED
1297e7: 0f 84 93 01 00 00 je 129980 <rtems_bdpart_create+0x1e0><== NOT EXECUTED
1297ed: 85 f6 test %esi,%esi <== NOT EXECUTED
1297ef: 0f 84 8b 01 00 00 je 129980 <rtems_bdpart_create+0x1e0><== NOT EXECUTED
rtems_blkdev_bnum dist_sum = 0;
rtems_blkdev_bnum record_space =
dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
rtems_blkdev_bnum overhead = 0;
rtems_blkdev_bnum free_space = 0;
dev_t disk = 0;
1297f5: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
1297fc: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
if (format == NULL || pt == NULL || dist == NULL) {
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
129803: 52 push %edx <== NOT EXECUTED
129804: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
129807: 50 push %eax <== NOT EXECUTED
129808: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
12980b: 50 push %eax <== NOT EXECUTED
12980c: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12980f: e8 24 06 00 00 call 129e38 <rtems_bdpart_get_disk_data><== NOT EXECUTED
129814: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
129816: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129819: 85 c0 test %eax,%eax <== NOT EXECUTED
12981b: 0f 85 64 01 00 00 jne 129985 <rtems_bdpart_create+0x1e5><== NOT EXECUTED
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
unsigned prev_sum = dist_sum;
dist_sum += dist [i];
129821: 8b 06 mov (%esi),%eax <== NOT EXECUTED
129823: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
if (dist_sum < prev_sum) {
return RTEMS_INVALID_NUMBER;
}
if (dist [i] == 0) {
129826: 85 c0 test %eax,%eax <== NOT EXECUTED
129828: 0f 84 62 01 00 00 je 129990 <rtems_bdpart_create+0x1f0><== NOT EXECUTED
12982e: 89 c1 mov %eax,%ecx <== NOT EXECUTED
129830: 31 c0 xor %eax,%eax <== NOT EXECUTED
129832: 89 5d c8 mov %ebx,-0x38(%ebp) <== NOT EXECUTED
129835: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED
129838: eb 15 jmp 12984f <rtems_bdpart_create+0xaf><== NOT EXECUTED
12983a: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
unsigned prev_sum = dist_sum;
dist_sum += dist [i];
12983c: 8b 14 86 mov (%esi,%eax,4),%edx <== NOT EXECUTED
if (dist_sum < prev_sum) {
12983f: 01 d1 add %edx,%ecx <== NOT EXECUTED
129841: 0f 82 49 01 00 00 jb 129990 <rtems_bdpart_create+0x1f0><== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
}
if (dist [i] == 0) {
129847: 85 d2 test %edx,%edx <== NOT EXECUTED
129849: 0f 84 41 01 00 00 je 129990 <rtems_bdpart_create+0x1f0><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
12984f: 40 inc %eax <== NOT EXECUTED
129850: 39 c3 cmp %eax,%ebx <== NOT EXECUTED
129852: 77 e8 ja 12983c <rtems_bdpart_create+0x9c><== NOT EXECUTED
129854: 8b 5d c8 mov -0x38(%ebp),%ebx <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
129857: 8b 07 mov (%edi),%eax <== NOT EXECUTED
129859: 85 c0 test %eax,%eax <== NOT EXECUTED
12985b: 0f 85 6b 01 00 00 jne 1299cc <rtems_bdpart_create+0x22c><== NOT EXECUTED
return RTEMS_NOT_IMPLEMENTED;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
129861: 80 7d d0 00 cmpb $0x0,-0x30(%ebp) <== NOT EXECUTED
129865: 0f 85 35 01 00 00 jne 1299a0 <rtems_bdpart_create+0x200><== NOT EXECUTED
12986b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
12986e: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED
/*
* In case we need an extended partition and logical partitions we have to
* account for the space of each EBR.
*/
if (count > 4) {
129871: 83 7d 18 04 cmpl $0x4,0x18(%ebp) <== NOT EXECUTED
129875: 0f 87 39 01 00 00 ja 1299b4 <rtems_bdpart_create+0x214><== NOT EXECUTED
12987b: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
/*
* Account space to align every partition on cylinder boundaries if
* necessary.
*/
if (dos_compatibility) {
12987e: 80 7d d0 00 cmpb $0x0,-0x30(%ebp) <== NOT EXECUTED
129882: 74 0a je 12988e <rtems_bdpart_create+0xee><== NOT EXECUTED
overhead += (count - 1) * record_space;
129884: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
129887: 48 dec %eax <== NOT EXECUTED
129888: 0f af 45 d4 imul -0x2c(%ebp),%eax <== NOT EXECUTED
12988c: 01 c2 add %eax,%edx <== NOT EXECUTED
}
/* Check disk space */
if ((overhead + count) > disk_end) {
12988e: 8b 7d 18 mov 0x18(%ebp),%edi <== NOT EXECUTED
129891: 8d 04 3a lea (%edx,%edi,1),%eax <== NOT EXECUTED
129894: 3b 45 c0 cmp -0x40(%ebp),%eax <== NOT EXECUTED
129897: 0f 87 36 01 00 00 ja 1299d3 <rtems_bdpart_create+0x233><== NOT EXECUTED
/* Begin of first primary partition */
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
12989d: 8b 45 c0 mov -0x40(%ebp),%eax <== NOT EXECUTED
1298a0: 29 d0 sub %edx,%eax <== NOT EXECUTED
1298a2: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED
for (i = 0; i < count; ++i) {
rtems_bdpart_partition *p = pt + i;
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
1298a5: 0f af 45 cc imul -0x34(%ebp),%eax <== NOT EXECUTED
if (s < free_space || s < dist [i]) {
1298a9: 39 45 c8 cmp %eax,-0x38(%ebp) <== NOT EXECUTED
1298ac: 0f 87 de 00 00 00 ja 129990 <rtems_bdpart_create+0x1f0><== NOT EXECUTED
1298b2: 3b 45 cc cmp -0x34(%ebp),%eax <== NOT EXECUTED
1298b5: 0f 82 d5 00 00 00 jb 129990 <rtems_bdpart_create+0x1f0><== NOT EXECUTED
1298bb: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
1298be: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
1298c1: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED
1298c4: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED
1298c7: 31 d2 xor %edx,%edx <== NOT EXECUTED
1298c9: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED
1298cc: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
1298cf: 89 5d bc mov %ebx,-0x44(%ebp) <== NOT EXECUTED
1298d2: 89 d3 mov %edx,%ebx <== NOT EXECUTED
1298d4: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED
1298d7: eb 27 jmp 129900 <rtems_bdpart_create+0x160><== NOT EXECUTED
1298d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
for (i = 0; i < count; ++i) {
rtems_bdpart_partition *p = pt + i;
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
1298dc: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
1298df: 8b 14 99 mov (%ecx,%ebx,4),%edx <== NOT EXECUTED
1298e2: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
1298e5: 0f af c2 imul %edx,%eax <== NOT EXECUTED
if (s < free_space || s < dist [i]) {
1298e8: 39 45 c8 cmp %eax,-0x38(%ebp) <== NOT EXECUTED
1298eb: 0f 87 9f 00 00 00 ja 129990 <rtems_bdpart_create+0x1f0><== NOT EXECUTED
1298f1: 83 45 d0 30 addl $0x30,-0x30(%ebp) <== NOT EXECUTED
1298f5: 39 c2 cmp %eax,%edx <== NOT EXECUTED
1298f7: 0f 87 93 00 00 00 ja 129990 <rtems_bdpart_create+0x1f0><== NOT EXECUTED
1298fd: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
/* TODO: Calculate without overflow */
return RTEMS_INVALID_NUMBER;
}
s /= dist_sum;
129900: 31 d2 xor %edx,%edx <== NOT EXECUTED
129902: f7 75 cc divl -0x34(%ebp) <== NOT EXECUTED
/* Ensure that the partition is not empty */
if (s == 0) {
129905: 85 c0 test %eax,%eax <== NOT EXECUTED
129907: 75 02 jne 12990b <rtems_bdpart_create+0x16b><== NOT EXECUTED
129909: b0 01 mov $0x1,%al <== NOT EXECUTED
/* Align partition upwards */
s += record_space - (s % record_space);
/* Partition begin and end */
p->begin = pos;
12990b: 89 39 mov %edi,(%ecx) <== NOT EXECUTED
if (s == 0) {
s = 1;
}
/* Align partition upwards */
s += record_space - (s % record_space);
12990d: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
129910: 8d 34 17 lea (%edi,%edx,1),%esi <== NOT EXECUTED
/* Partition begin and end */
p->begin = pos;
pos += s;
129913: 8d 3c 30 lea (%eax,%esi,1),%edi <== NOT EXECUTED
129916: 31 d2 xor %edx,%edx <== NOT EXECUTED
129918: f7 75 d4 divl -0x2c(%ebp) <== NOT EXECUTED
12991b: 29 d7 sub %edx,%edi <== NOT EXECUTED
p->end = pos;
12991d: 89 79 04 mov %edi,0x4(%ecx) <== NOT EXECUTED
/* Reserve space for the EBR if necessary */
if (count > 4 && i > 2) {
129920: 83 7d 18 04 cmpl $0x4,0x18(%ebp) <== NOT EXECUTED
129924: 76 07 jbe 12992d <rtems_bdpart_create+0x18d><== NOT EXECUTED
129926: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED
129929: 76 02 jbe 12992d <rtems_bdpart_create+0x18d><== NOT EXECUTED
p->begin += record_space;
12992b: 89 31 mov %esi,(%ecx) <== NOT EXECUTED
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
12992d: 43 inc %ebx <== NOT EXECUTED
12992e: 39 5d 18 cmp %ebx,0x18(%ebp) <== NOT EXECUTED
129931: 77 a9 ja 1298dc <rtems_bdpart_create+0x13c><== NOT EXECUTED
129933: 8b 5d bc mov -0x44(%ebp),%ebx <== NOT EXECUTED
p->begin += record_space;
}
}
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
129936: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED
129939: 8d 44 49 fd lea -0x3(%ecx,%ecx,2),%eax <== NOT EXECUTED
12993d: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED
129940: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
129943: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
129946: 89 54 38 04 mov %edx,0x4(%eax,%edi,1) <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
12994a: eb 39 jmp 129985 <rtems_bdpart_create+0x1e5><== NOT EXECUTED
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
12994c: 80 7f 08 00 cmpb $0x0,0x8(%edi) <== NOT EXECUTED
129950: 0f 84 67 fe ff ff je 1297bd <rtems_bdpart_create+0x1d><== NOT EXECUTED
rtems_blkdev_bnum disk_end = 0;
129956: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
12995d: c6 45 d0 01 movb $0x1,-0x30(%ebp) <== NOT EXECUTED
129961: c7 45 d4 3f 00 00 00 movl $0x3f,-0x2c(%ebp) <== NOT EXECUTED
rtems_blkdev_bnum free_space = 0;
dev_t disk = 0;
size_t i = 0;
/* Check if we have something to do */
if (count == 0) {
129968: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED
12996b: 85 db test %ebx,%ebx <== NOT EXECUTED
12996d: 0f 85 67 fe ff ff jne 1297da <rtems_bdpart_create+0x3a><== NOT EXECUTED
129973: 31 db xor %ebx,%ebx <== NOT EXECUTED
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
return RTEMS_SUCCESSFUL;
}
129975: 89 d8 mov %ebx,%eax <== NOT EXECUTED
129977: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12997a: 5b pop %ebx <== NOT EXECUTED
12997b: 5e pop %esi <== NOT EXECUTED
12997c: 5f pop %edi <== NOT EXECUTED
12997d: c9 leave <== NOT EXECUTED
12997e: c3 ret <== NOT EXECUTED
12997f: 90 nop <== NOT EXECUTED
}
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
return RTEMS_SUCCESSFUL;
129980: bb 09 00 00 00 mov $0x9,%ebx <== NOT EXECUTED
}
129985: 89 d8 mov %ebx,%eax <== NOT EXECUTED
129987: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12998a: 5b pop %ebx <== NOT EXECUTED
12998b: 5e pop %esi <== NOT EXECUTED
12998c: 5f pop %edi <== NOT EXECUTED
12998d: c9 leave <== NOT EXECUTED
12998e: c3 ret <== NOT EXECUTED
12998f: 90 nop <== NOT EXECUTED
}
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
return RTEMS_SUCCESSFUL;
129990: bb 0a 00 00 00 mov $0xa,%ebx <== NOT EXECUTED
}
129995: 89 d8 mov %ebx,%eax <== NOT EXECUTED
129997: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12999a: 5b pop %ebx <== NOT EXECUTED
12999b: 5e pop %esi <== NOT EXECUTED
12999c: 5f pop %edi <== NOT EXECUTED
12999d: c9 leave <== NOT EXECUTED
12999e: c3 ret <== NOT EXECUTED
12999f: 90 nop <== NOT EXECUTED
return RTEMS_NOT_IMPLEMENTED;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
disk_end -= (disk_end % record_space);
1299a0: 8b 7d e4 mov -0x1c(%ebp),%edi <== NOT EXECUTED
1299a3: 89 f8 mov %edi,%eax <== NOT EXECUTED
1299a5: 31 d2 xor %edx,%edx <== NOT EXECUTED
1299a7: f7 75 d4 divl -0x2c(%ebp) <== NOT EXECUTED
1299aa: 29 d7 sub %edx,%edi <== NOT EXECUTED
1299ac: 89 7d c0 mov %edi,-0x40(%ebp) <== NOT EXECUTED
1299af: e9 bd fe ff ff jmp 129871 <rtems_bdpart_create+0xd1><== NOT EXECUTED
/*
* In case we need an extended partition and logical partitions we have to
* account for the space of each EBR.
*/
if (count > 4) {
overhead += (count - 3) * record_space;
1299b4: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
1299b7: 83 e8 03 sub $0x3,%eax <== NOT EXECUTED
1299ba: 0f af 45 d4 imul -0x2c(%ebp),%eax <== NOT EXECUTED
1299be: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED
1299c1: 8d 14 38 lea (%eax,%edi,1),%edx <== NOT EXECUTED
1299c4: e9 b5 fe ff ff jmp 12987e <rtems_bdpart_create+0xde><== NOT EXECUTED
1299c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
1299cc: bb 18 00 00 00 mov $0x18,%ebx <== NOT EXECUTED
1299d1: eb b2 jmp 129985 <rtems_bdpart_create+0x1e5><== NOT EXECUTED
if (dos_compatibility) {
overhead += (count - 1) * record_space;
}
/* Check disk space */
if ((overhead + count) > disk_end) {
1299d3: bb 1b 00 00 00 mov $0x1b,%ebx <== NOT EXECUTED
1299d8: eb ab jmp 129985 <rtems_bdpart_create+0x1e5><== NOT EXECUTED
001299dc <rtems_bdpart_dump>:
{
uuid_unparse_lower( type, str);
}
void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count)
{
1299dc: 55 push %ebp <== NOT EXECUTED
1299dd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1299df: 57 push %edi <== NOT EXECUTED
1299e0: 56 push %esi <== NOT EXECUTED
1299e1: 53 push %ebx <== NOT EXECUTED
1299e2: 83 ec 58 sub $0x58,%esp <== NOT EXECUTED
size_t i = 0;
printf(
1299e5: 68 bc 53 16 00 push $0x1653bc <== NOT EXECUTED
1299ea: e8 c9 22 02 00 call 14bcb8 <puts> <== NOT EXECUTED
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
1299ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1299f2: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
1299f5: 85 c0 test %eax,%eax <== NOT EXECUTED
1299f7: 0f 84 cb 00 00 00 je 129ac8 <rtems_bdpart_dump+0xec><== NOT EXECUTED
1299fd: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
129a00: 31 f6 xor %esi,%esi <== NOT EXECUTED
129a02: eb 54 jmp 129a58 <rtems_bdpart_dump+0x7c><== NOT EXECUTED
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
switch (type_mbr) {
129a04: 8a 45 e7 mov -0x19(%ebp),%al <== NOT EXECUTED
129a07: 3c 0b cmp $0xb,%al <== NOT EXECUTED
129a09: 0f 84 9d 00 00 00 je 129aac <rtems_bdpart_dump+0xd0><== NOT EXECUTED
129a0f: 77 77 ja 129a88 <rtems_bdpart_dump+0xac><== NOT EXECUTED
129a11: 3c 01 cmp $0x1,%al <== NOT EXECUTED
129a13: 0f 84 a3 00 00 00 je 129abc <rtems_bdpart_dump+0xe0><== NOT EXECUTED
129a19: 3c 04 cmp $0x4,%al <== NOT EXECUTED
129a1b: 0f 84 93 00 00 00 je 129ab4 <rtems_bdpart_dump+0xd8><== NOT EXECUTED
break;
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
break;
default:
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
129a21: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
129a24: 50 push %eax <== NOT EXECUTED
129a25: 68 2c 55 16 00 push $0x16552c <== NOT EXECUTED
129a2a: 6a 34 push $0x34 <== NOT EXECUTED
129a2c: 8d 45 b3 lea -0x4d(%ebp),%eax <== NOT EXECUTED
129a2f: 50 push %eax <== NOT EXECUTED
129a30: e8 1f 35 02 00 call 14cf54 <snprintf> <== NOT EXECUTED
129a35: 8d 45 b3 lea -0x4d(%ebp),%eax <== NOT EXECUTED
129a38: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129a3b: 90 nop <== NOT EXECUTED
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
129a3c: 50 push %eax <== NOT EXECUTED
129a3d: ff 73 04 pushl 0x4(%ebx) <== NOT EXECUTED
129a40: ff 33 pushl (%ebx) <== NOT EXECUTED
129a42: 68 33 55 16 00 push $0x165533 <== NOT EXECUTED
129a47: e8 58 20 02 00 call 14baa4 <printf> <== NOT EXECUTED
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
129a4c: 46 inc %esi <== NOT EXECUTED
129a4d: 83 c3 30 add $0x30,%ebx <== NOT EXECUTED
129a50: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129a53: 39 75 0c cmp %esi,0xc(%ebp) <== NOT EXECUTED
129a56: 76 70 jbe 129ac8 <rtems_bdpart_dump+0xec><== NOT EXECUTED
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
129a58: c6 45 e7 00 movb $0x0,-0x19(%ebp) <== NOT EXECUTED
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
129a5c: 8d 7b 08 lea 0x8(%ebx),%edi <== NOT EXECUTED
129a5f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
129a62: 8d 45 e7 lea -0x19(%ebp),%eax <== NOT EXECUTED
129a65: 50 push %eax <== NOT EXECUTED
129a66: 57 push %edi <== NOT EXECUTED
129a67: e8 4c 04 00 00 call 129eb8 <rtems_bdpart_to_mbr_partition_type><== NOT EXECUTED
129a6c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129a6f: 84 c0 test %al,%al <== NOT EXECUTED
129a71: 75 91 jne 129a04 <rtems_bdpart_dump+0x28><== NOT EXECUTED
static void rtems_bdpart_type_to_string(
const uuid_t type,
char str [37]
)
{
uuid_unparse_lower( type, str);
129a73: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
129a76: 8d 45 b3 lea -0x4d(%ebp),%eax <== NOT EXECUTED
129a79: 50 push %eax <== NOT EXECUTED
129a7a: 57 push %edi <== NOT EXECUTED
129a7b: e8 84 97 01 00 call 143204 <uuid_unparse_lower> <== NOT EXECUTED
129a80: 8d 45 b3 lea -0x4d(%ebp),%eax <== NOT EXECUTED
129a83: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129a86: eb b4 jmp 129a3c <rtems_bdpart_dump+0x60><== NOT EXECUTED
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
switch (type_mbr) {
129a88: 3c 0e cmp $0xe,%al <== NOT EXECUTED
129a8a: 74 18 je 129aa4 <rtems_bdpart_dump+0xc8><== NOT EXECUTED
129a8c: 3c da cmp $0xda,%al <== NOT EXECUTED
129a8e: 74 0c je 129a9c <rtems_bdpart_dump+0xc0><== NOT EXECUTED
129a90: 3c 0c cmp $0xc,%al <== NOT EXECUTED
129a92: 75 8d jne 129a21 <rtems_bdpart_dump+0x45><== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_16_LBA:
type = "FAT 16 LBA";
break;
case RTEMS_BDPART_MBR_FAT_32:
type = "FAT 32";
break;
129a94: b8 1c 55 16 00 mov $0x16551c,%eax <== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_32_LBA:
type = "FAT 32 LBA";
break;
129a99: eb a1 jmp 129a3c <rtems_bdpart_dump+0x60><== NOT EXECUTED
129a9b: 90 nop <== NOT EXECUTED
129a9c: b8 27 55 16 00 mov $0x165527,%eax <== NOT EXECUTED
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
break;
129aa1: eb 99 jmp 129a3c <rtems_bdpart_dump+0x60><== NOT EXECUTED
129aa3: 90 nop <== NOT EXECUTED
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
switch (type_mbr) {
129aa4: b8 0a 55 16 00 mov $0x16550a,%eax <== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_16:
type = "FAT 16";
break;
case RTEMS_BDPART_MBR_FAT_16_LBA:
type = "FAT 16 LBA";
break;
129aa9: eb 91 jmp 129a3c <rtems_bdpart_dump+0x60><== NOT EXECUTED
129aab: 90 nop <== NOT EXECUTED
129aac: b8 15 55 16 00 mov $0x165515,%eax <== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_32:
type = "FAT 32";
break;
129ab1: eb 89 jmp 129a3c <rtems_bdpart_dump+0x60><== NOT EXECUTED
129ab3: 90 nop <== NOT EXECUTED
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
switch (type_mbr) {
129ab4: b8 fc 54 16 00 mov $0x1654fc,%eax <== NOT EXECUTED
129ab9: eb 81 jmp 129a3c <rtems_bdpart_dump+0x60><== NOT EXECUTED
129abb: 90 nop <== NOT EXECUTED
129abc: b8 03 55 16 00 mov $0x165503,%eax <== NOT EXECUTED
129ac1: e9 76 ff ff ff jmp 129a3c <rtems_bdpart_dump+0x60><== NOT EXECUTED
129ac6: 66 90 xchg %ax,%ax <== NOT EXECUTED
p->end,
type
);
}
puts( "------------+------------+-----------------------------------------------------");
129ac8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129acb: 68 ac 54 16 00 push $0x1654ac <== NOT EXECUTED
129ad0: e8 e3 21 02 00 call 14bcb8 <puts> <== NOT EXECUTED
129ad5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
129ad8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129adb: 5b pop %ebx <== NOT EXECUTED
129adc: 5e pop %esi <== NOT EXECUTED
129add: 5f pop %edi <== NOT EXECUTED
129ade: c9 leave <== NOT EXECUTED
129adf: c3 ret <== NOT EXECUTED
00129e38 <rtems_bdpart_get_disk_data>:
rtems_status_code rtems_bdpart_get_disk_data(
const char *disk_name,
dev_t *disk,
rtems_blkdev_bnum *disk_end
)
{
129e38: 55 push %ebp <== NOT EXECUTED
129e39: 89 e5 mov %esp,%ebp <== NOT EXECUTED
129e3b: 56 push %esi <== NOT EXECUTED
129e3c: 53 push %ebx <== NOT EXECUTED
129e3d: 83 ec 58 sub $0x58,%esp <== NOT EXECUTED
rtems_blkdev_bnum block_size = 0;
rtems_disk_device *dd = NULL;
struct stat st;
/* Get disk handle */
rv = stat( disk_name, &st);
129e40: 8d 45 b0 lea -0x50(%ebp),%eax <== NOT EXECUTED
129e43: 50 push %eax <== NOT EXECUTED
129e44: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
129e47: e8 34 60 fe ff call 10fe80 <stat> <== NOT EXECUTED
if (rv != 0) {
129e4c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129e4f: 85 c0 test %eax,%eax <== NOT EXECUTED
129e51: 74 0d je 129e60 <rtems_bdpart_get_disk_data+0x28><== NOT EXECUTED
if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
return RTEMS_IO_ERROR;
}
/* Check that we have do not have a logical disk */
if (disk_begin != 0) {
129e53: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED
return RTEMS_IO_ERROR;
}
return RTEMS_SUCCESSFUL;
}
129e58: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
129e5b: 5b pop %ebx <== NOT EXECUTED
129e5c: 5e pop %esi <== NOT EXECUTED
129e5d: c9 leave <== NOT EXECUTED
129e5e: c3 ret <== NOT EXECUTED
129e5f: 90 nop <== NOT EXECUTED
/* Get disk handle */
rv = stat( disk_name, &st);
if (rv != 0) {
return RTEMS_INVALID_NAME;
}
*disk = st.st_rdev;
129e60: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
129e63: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
129e66: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
129e69: 89 01 mov %eax,(%ecx) <== NOT EXECUTED
129e6b: 89 51 04 mov %edx,0x4(%ecx) <== NOT EXECUTED
/* Get disk begin, end and block size */
dd = rtems_disk_obtain( *disk);
129e6e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
129e71: 52 push %edx <== NOT EXECUTED
129e72: 50 push %eax <== NOT EXECUTED
129e73: e8 0c 36 fe ff call 10d484 <rtems_disk_obtain> <== NOT EXECUTED
if (dd == NULL) {
129e78: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129e7b: 85 c0 test %eax,%eax <== NOT EXECUTED
129e7d: 74 d4 je 129e53 <rtems_bdpart_get_disk_data+0x1b><== NOT EXECUTED
return RTEMS_INVALID_NAME;
}
disk_begin = dd->start;
129e7f: 8b 70 18 mov 0x18(%eax),%esi <== NOT EXECUTED
*disk_end = dd->size;
129e82: 8b 48 1c mov 0x1c(%eax),%ecx <== NOT EXECUTED
129e85: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
129e88: 89 0a mov %ecx,(%edx) <== NOT EXECUTED
block_size = dd->block_size;
129e8a: 8b 58 20 mov 0x20(%eax),%ebx <== NOT EXECUTED
sc = rtems_disk_release( dd);
129e8d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129e90: 50 push %eax <== NOT EXECUTED
129e91: e8 ca 37 fe ff call 10d660 <rtems_disk_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
129e96: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129e99: 85 c0 test %eax,%eax <== NOT EXECUTED
129e9b: 75 bb jne 129e58 <rtems_bdpart_get_disk_data+0x20><== NOT EXECUTED
return sc;
}
/* Check block size */
if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
129e9d: 81 fb ff 01 00 00 cmp $0x1ff,%ebx <== NOT EXECUTED
129ea3: 76 04 jbe 129ea9 <rtems_bdpart_get_disk_data+0x71><== NOT EXECUTED
return RTEMS_IO_ERROR;
}
/* Check that we have do not have a logical disk */
if (disk_begin != 0) {
129ea5: 85 f6 test %esi,%esi <== NOT EXECUTED
129ea7: 74 af je 129e58 <rtems_bdpart_get_disk_data+0x20><== NOT EXECUTED
129ea9: b8 1b 00 00 00 mov $0x1b,%eax <== NOT EXECUTED
return RTEMS_IO_ERROR;
}
return RTEMS_SUCCESSFUL;
}
129eae: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
129eb1: 5b pop %ebx <== NOT EXECUTED
129eb2: 5e pop %esi <== NOT EXECUTED
129eb3: c9 leave <== NOT EXECUTED
129eb4: c3 ret <== NOT EXECUTED
00129c0c <rtems_bdpart_mount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
129c0c: 55 push %ebp <== NOT EXECUTED
129c0d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
129c0f: 57 push %edi <== NOT EXECUTED
129c10: 56 push %esi <== NOT EXECUTED
129c11: 53 push %ebx <== NOT EXECUTED
129c12: 83 ec 34 sub $0x34,%esp <== NOT EXECUTED
129c15: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
129c18: 6a 2f push $0x2f <== NOT EXECUTED
129c1a: 56 push %esi <== NOT EXECUTED
129c1b: e8 70 43 02 00 call 14df90 <strrchr> <== NOT EXECUTED
129c20: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
char *logical_disk_name = NULL;
char *logical_disk_marker = NULL;
char *mount_point = NULL;
char *mount_marker = NULL;
size_t disk_file_name_size = 0;
size_t disk_name_size = strlen( disk_name);
129c23: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
129c28: 89 f7 mov %esi,%edi <== NOT EXECUTED
129c2a: 31 c0 xor %eax,%eax <== NOT EXECUTED
129c2c: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
129c2e: 89 ca mov %ecx,%edx <== NOT EXECUTED
129c30: f7 d2 not %edx <== NOT EXECUTED
129c32: 8d 42 ff lea -0x1(%edx),%eax <== NOT EXECUTED
129c35: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
129c38: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
129c3d: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
129c40: 31 c0 xor %eax,%eax <== NOT EXECUTED
129c42: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
129c44: f7 d1 not %ecx <== NOT EXECUTED
129c46: 49 dec %ecx <== NOT EXECUTED
129c47: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
size_t i = 0;
/* Create logical disk name base */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
129c4a: 83 c2 03 add $0x3,%edx <== NOT EXECUTED
129c4d: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
129c50: e8 b3 51 fe ff call 10ee08 <malloc> <== NOT EXECUTED
129c55: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (logical_disk_name == NULL) {
129c57: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129c5a: 85 c0 test %eax,%eax <== NOT EXECUTED
129c5c: 0f 84 32 01 00 00 je 129d94 <rtems_bdpart_mount+0x188><== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
129c62: 50 push %eax <== NOT EXECUTED
129c63: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
129c66: 56 push %esi <== NOT EXECUTED
129c67: 53 push %ebx <== NOT EXECUTED
129c68: e8 a3 3c 02 00 call 14d910 <strncpy> <== NOT EXECUTED
/* Get disk file name */
if (disk_file_name != NULL) {
129c6d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129c70: 8b 7d dc mov -0x24(%ebp),%edi <== NOT EXECUTED
129c73: 85 ff test %edi,%edi <== NOT EXECUTED
129c75: 0f 84 41 01 00 00 je 129dbc <rtems_bdpart_mount+0x1b0><== NOT EXECUTED
disk_file_name += 1;
129c7b: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED
129c7e: 41 inc %ecx <== NOT EXECUTED
129c7f: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
129c82: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
129c87: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED
129c8a: 31 c0 xor %eax,%eax <== NOT EXECUTED
129c8c: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
129c8e: f7 d1 not %ecx <== NOT EXECUTED
129c90: 49 dec %ecx <== NOT EXECUTED
129c91: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED
disk_file_name = disk_name;
disk_file_name_size = disk_name_size;
}
/* Create mount point base */
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
129c94: 8b 75 dc mov -0x24(%ebp),%esi <== NOT EXECUTED
129c97: 03 75 e4 add -0x1c(%ebp),%esi <== NOT EXECUTED
129c9a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129c9d: 8d 46 05 lea 0x5(%esi),%eax <== NOT EXECUTED
129ca0: 50 push %eax <== NOT EXECUTED
129ca1: e8 62 51 fe ff call 10ee08 <malloc> <== NOT EXECUTED
129ca6: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (mount_point == NULL) {
129ca8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129cab: 85 c0 test %eax,%eax <== NOT EXECUTED
129cad: 0f 84 bd 00 00 00 je 129d70 <rtems_bdpart_mount+0x164><== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
129cb3: 51 push %ecx <== NOT EXECUTED
129cb4: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
129cb7: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
129cba: 50 push %eax <== NOT EXECUTED
129cbb: e8 50 3c 02 00 call 14d910 <strncpy> <== NOT EXECUTED
mount_point [mount_base_size] = '/';
129cc0: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
129cc3: c6 04 17 2f movb $0x2f,(%edi,%edx,1) <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
129cc7: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
129cca: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
129ccd: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
129cd0: 8d 44 17 01 lea 0x1(%edi,%edx,1),%eax <== NOT EXECUTED
129cd4: 50 push %eax <== NOT EXECUTED
129cd5: e8 36 3c 02 00 call 14d910 <strncpy> <== NOT EXECUTED
/* Markers */
logical_disk_marker = logical_disk_name + disk_name_size;
129cda: 8b 4d d8 mov -0x28(%ebp),%ecx <== NOT EXECUTED
129cdd: 8d 04 0b lea (%ebx,%ecx,1),%eax <== NOT EXECUTED
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
129ce0: 8d 74 37 01 lea 0x1(%edi,%esi,1),%esi <== NOT EXECUTED
129ce4: 89 75 e0 mov %esi,-0x20(%ebp) <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
129ce7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129cea: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
129ced: 85 d2 test %edx,%edx <== NOT EXECUTED
129cef: 74 7b je 129d6c <rtems_bdpart_mount+0x160><== NOT EXECUTED
129cf1: 31 f6 xor %esi,%esi <== NOT EXECUTED
129cf3: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED
129cf6: 89 c3 mov %eax,%ebx <== NOT EXECUTED
129cf8: eb 07 jmp 129d01 <rtems_bdpart_mount+0xf5><== NOT EXECUTED
129cfa: 66 90 xchg %ax,%ax <== NOT EXECUTED
129cfc: 39 75 10 cmp %esi,0x10(%ebp) <== NOT EXECUTED
129cff: 76 68 jbe 129d69 <rtems_bdpart_mount+0x15d><== NOT EXECUTED
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
129d01: 46 inc %esi <== NOT EXECUTED
129d02: 56 push %esi <== NOT EXECUTED
129d03: 68 28 09 16 00 push $0x160928 <== NOT EXECUTED
129d08: 6a 04 push $0x4 <== NOT EXECUTED
129d0a: 53 push %ebx <== NOT EXECUTED
129d0b: e8 44 32 02 00 call 14cf54 <snprintf> <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
129d10: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129d13: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
129d16: 0f 8f 88 00 00 00 jg 129da4 <rtems_bdpart_mount+0x198><== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
129d1c: 50 push %eax <== NOT EXECUTED
129d1d: 6a 04 push $0x4 <== NOT EXECUTED
129d1f: 53 push %ebx <== NOT EXECUTED
129d20: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
129d23: e8 e8 3b 02 00 call 14d910 <strncpy> <== NOT EXECUTED
rv = rtems_mkdir( mount_point, S_IRWXU | S_IRWXG | S_IRWXO);
129d28: 5a pop %edx <== NOT EXECUTED
129d29: 59 pop %ecx <== NOT EXECUTED
129d2a: 68 ff 01 00 00 push $0x1ff <== NOT EXECUTED
129d2f: 57 push %edi <== NOT EXECUTED
129d30: e8 cf 5f fe ff call 10fd04 <rtems_mkdir> <== NOT EXECUTED
if (rv != 0) {
129d35: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129d38: 85 c0 test %eax,%eax <== NOT EXECUTED
129d3a: 75 74 jne 129db0 <rtems_bdpart_mount+0x1a4><== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
129d3c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129d3f: 6a 00 push $0x0 <== NOT EXECUTED
129d41: 6a 00 push $0x0 <== NOT EXECUTED
129d43: 68 49 55 16 00 push $0x165549 <== NOT EXECUTED
129d48: 57 push %edi <== NOT EXECUTED
129d49: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
129d4c: e8 af 53 fe ff call 10f100 <mount> <== NOT EXECUTED
mount_point,
"msdos",
0,
NULL
);
if (rv != 0) {
129d51: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
129d54: 85 c0 test %eax,%eax <== NOT EXECUTED
129d56: 74 a4 je 129cfc <rtems_bdpart_mount+0xf0><== NOT EXECUTED
rmdir( mount_point);
129d58: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129d5b: 57 push %edi <== NOT EXECUTED
129d5c: e8 bb 5e 00 00 call 12fc1c <rmdir> <== NOT EXECUTED
129d61: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/* Markers */
logical_disk_marker = logical_disk_name + disk_name_size;
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
129d64: 39 75 10 cmp %esi,0x10(%ebp) <== NOT EXECUTED
129d67: 77 98 ja 129d01 <rtems_bdpart_mount+0xf5><== NOT EXECUTED
129d69: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED
129d6c: 31 f6 xor %esi,%esi <== NOT EXECUTED
129d6e: eb 05 jmp 129d75 <rtems_bdpart_mount+0x169><== NOT EXECUTED
disk_file_name_size = disk_name_size;
}
/* Create mount point base */
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (mount_point == NULL) {
129d70: be 1a 00 00 00 mov $0x1a,%esi <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
129d75: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129d78: 53 push %ebx <== NOT EXECUTED
129d79: e8 ea 4a fe ff call 10e868 <free> <== NOT EXECUTED
free( mount_point);
129d7e: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
129d81: e8 e2 4a fe ff call 10e868 <free> <== NOT EXECUTED
return esc;
129d86: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
129d89: 89 f0 mov %esi,%eax <== NOT EXECUTED
129d8b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129d8e: 5b pop %ebx <== NOT EXECUTED
129d8f: 5e pop %esi <== NOT EXECUTED
129d90: 5f pop %edi <== NOT EXECUTED
129d91: c9 leave <== NOT EXECUTED
129d92: c3 ret <== NOT EXECUTED
129d93: 90 nop <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
size_t i = 0;
/* Create logical disk name base */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (logical_disk_name == NULL) {
129d94: be 1a 00 00 00 mov $0x1a,%esi <== NOT EXECUTED
free( logical_disk_name);
free( mount_point);
return esc;
}
129d99: 89 f0 mov %esi,%eax <== NOT EXECUTED
129d9b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129d9e: 5b pop %ebx <== NOT EXECUTED
129d9f: 5e pop %esi <== NOT EXECUTED
129da0: 5f pop %edi <== NOT EXECUTED
129da1: c9 leave <== NOT EXECUTED
129da2: c3 ret <== NOT EXECUTED
129da3: 90 nop <== NOT EXECUTED
129da4: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
129da7: be 03 00 00 00 mov $0x3,%esi <== NOT EXECUTED
129dac: eb c7 jmp 129d75 <rtems_bdpart_mount+0x169><== NOT EXECUTED
129dae: 66 90 xchg %ax,%ax <== NOT EXECUTED
129db0: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED
}
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
rv = rtems_mkdir( mount_point, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv != 0) {
129db3: be 1b 00 00 00 mov $0x1b,%esi <== NOT EXECUTED
129db8: eb bb jmp 129d75 <rtems_bdpart_mount+0x169><== NOT EXECUTED
129dba: 66 90 xchg %ax,%ax <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
/* Get disk file name */
if (disk_file_name != NULL) {
129dbc: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED
129dbf: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
129dc2: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED
129dc5: e9 ca fe ff ff jmp 129c94 <rtems_bdpart_mount+0x88><== NOT EXECUTED
0012a2d4 <rtems_bdpart_new_record>:
static rtems_status_code rtems_bdpart_new_record(
dev_t disk,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
12a2d4: 55 push %ebp <== NOT EXECUTED
12a2d5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12a2d7: 57 push %edi <== NOT EXECUTED
12a2d8: 56 push %esi <== NOT EXECUTED
12a2d9: 53 push %ebx <== NOT EXECUTED
12a2da: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12a2dd: 89 c3 mov %eax,%ebx <== NOT EXECUTED
12a2df: 89 d6 mov %edx,%esi <== NOT EXECUTED
12a2e1: 89 cf mov %ecx,%edi <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Synchronize previous block if necessary */
if (*block != NULL) {
12a2e3: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
12a2e6: 8b 02 mov (%edx),%eax <== NOT EXECUTED
12a2e8: 85 c0 test %eax,%eax <== NOT EXECUTED
12a2ea: 74 12 je 12a2fe <rtems_bdpart_new_record+0x2a><== NOT EXECUTED
sc = rtems_bdbuf_sync( *block);
12a2ec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12a2ef: 50 push %eax <== NOT EXECUTED
12a2f0: e8 8b 1a fe ff call 10bd80 <rtems_bdbuf_sync> <== NOT EXECUTED
12a2f5: 89 c2 mov %eax,%edx <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
12a2f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12a2fa: 85 c0 test %eax,%eax <== NOT EXECUTED
12a2fc: 75 46 jne 12a344 <rtems_bdpart_new_record+0x70><== NOT EXECUTED
return sc;
}
}
/* Read the new record block (this accounts for disk block sizes > 512) */
sc = rtems_bdbuf_read( disk, index, block);
12a2fe: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12a301: 57 push %edi <== NOT EXECUTED
12a302: 56 push %esi <== NOT EXECUTED
12a303: 53 push %ebx <== NOT EXECUTED
12a304: e8 eb 21 fe ff call 10c4f4 <rtems_bdbuf_read> <== NOT EXECUTED
12a309: 89 c2 mov %eax,%edx <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
12a30b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12a30e: 85 c0 test %eax,%eax <== NOT EXECUTED
12a310: 75 32 jne 12a344 <rtems_bdpart_new_record+0x70><== NOT EXECUTED
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
12a312: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
12a315: 8b 01 mov (%ecx),%eax <== NOT EXECUTED
12a317: 85 c0 test %eax,%eax <== NOT EXECUTED
12a319: 74 35 je 12a350 <rtems_bdpart_new_record+0x7c><== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
}
/* Clear record */
memset( (*block)->buffer, 0, RTEMS_BDPART_BLOCK_SIZE);
12a31b: 8b 58 20 mov 0x20(%eax),%ebx <== NOT EXECUTED
12a31e: b9 00 02 00 00 mov $0x200,%ecx <== NOT EXECUTED
12a323: 31 c0 xor %eax,%eax <== NOT EXECUTED
12a325: 89 df mov %ebx,%edi <== NOT EXECUTED
12a327: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
/* Write signature */
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_0] =
12a329: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
12a32c: 8b 01 mov (%ecx),%eax <== NOT EXECUTED
12a32e: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
12a331: c6 80 fe 01 00 00 55 movb $0x55,0x1fe(%eax) <== NOT EXECUTED
RTEMS_BDPART_MBR_SIGNATURE_0;
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_1] =
12a338: 8b 01 mov (%ecx),%eax <== NOT EXECUTED
12a33a: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
12a33d: c6 80 ff 01 00 00 aa movb $0xaa,0x1ff(%eax) <== NOT EXECUTED
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
12a344: 89 d0 mov %edx,%eax <== NOT EXECUTED
12a346: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12a349: 5b pop %ebx <== NOT EXECUTED
12a34a: 5e pop %esi <== NOT EXECUTED
12a34b: 5f pop %edi <== NOT EXECUTED
12a34c: c9 leave <== NOT EXECUTED
12a34d: c3 ret <== NOT EXECUTED
12a34e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
12a350: b2 09 mov $0x9,%dl <== NOT EXECUTED
12a352: eb f0 jmp 12a344 <rtems_bdpart_new_record+0x70><== NOT EXECUTED
0012a000 <rtems_bdpart_read>:
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
12a000: 55 push %ebp <== NOT EXECUTED
12a001: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12a003: 57 push %edi <== NOT EXECUTED
12a004: 56 push %esi <== NOT EXECUTED
12a005: 53 push %ebx <== NOT EXECUTED
12a006: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
12a009: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
12a00c: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
12a00f: 85 db test %ebx,%ebx <== NOT EXECUTED
12a011: 0f 84 69 02 00 00 je 12a280 <rtems_bdpart_read+0x280><== NOT EXECUTED
12a017: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
12a019: 8d 34 40 lea (%eax,%eax,2),%esi <== NOT EXECUTED
12a01c: c1 e6 04 shl $0x4,%esi <== NOT EXECUTED
dev_t disk = 0;
size_t i = 0;
const uint8_t *data = NULL;
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
12a01f: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
12a022: 85 d2 test %edx,%edx <== NOT EXECUTED
12a024: 0f 84 a2 00 00 00 je 12a0cc <rtems_bdpart_read+0xcc><== NOT EXECUTED
12a02a: 85 ff test %edi,%edi <== NOT EXECUTED
12a02c: 0f 84 9a 00 00 00 je 12a0cc <rtems_bdpart_read+0xcc><== NOT EXECUTED
12a032: 85 db test %ebx,%ebx <== NOT EXECUTED
12a034: 0f 84 92 00 00 00 je 12a0cc <rtems_bdpart_read+0xcc><== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
rtems_blkdev_bnum disk_end = 0;
12a03a: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */
12a041: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
if (format == NULL || pt == NULL || count == NULL) {
return RTEMS_INVALID_ADDRESS;
}
/* Set count to a save value */
*count = 0;
12a048: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
rtems_bdpart_partition *p = pt - 1;
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
rtems_blkdev_bnum disk_end = 0;
dev_t disk = 0;
12a04e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
12a055: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
12a05c: 8d 47 d0 lea -0x30(%edi),%eax <== NOT EXECUTED
12a05f: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
size_t *count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
12a062: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
/* Set count to a save value */
*count = 0;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
12a069: 50 push %eax <== NOT EXECUTED
12a06a: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
12a06d: 50 push %eax <== NOT EXECUTED
12a06e: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED
12a071: 50 push %eax <== NOT EXECUTED
12a072: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12a075: e8 be fd ff ff call 129e38 <rtems_bdpart_get_disk_data><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
12a07a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12a07d: 85 c0 test %eax,%eax <== NOT EXECUTED
12a07f: 74 0b je 12a08c <rtems_bdpart_read+0x8c><== NOT EXECUTED
if (block != NULL) {
rtems_bdbuf_release( block);
}
return esc;
}
12a081: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12a084: 5b pop %ebx <== NOT EXECUTED
12a085: 5e pop %esi <== NOT EXECUTED
12a086: 5f pop %edi <== NOT EXECUTED
12a087: c9 leave <== NOT EXECUTED
12a088: c3 ret <== NOT EXECUTED
12a089: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Read MBR */
sc = rtems_bdpart_read_record( disk, 0, &block);
12a08c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12a08f: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12a092: 50 push %eax <== NOT EXECUTED
12a093: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
12a095: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
12a098: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
12a09b: e8 2c fd ff ff call 129dcc <rtems_bdpart_read_record><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
12a0a0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12a0a3: 85 c0 test %eax,%eax <== NOT EXECUTED
12a0a5: 74 35 je 12a0dc <rtems_bdpart_read+0xdc><== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
&p,
p_end,
NULL
);
if (sc != RTEMS_SUCCESSFUL) {
12a0a7: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
12a0aa: 89 c3 mov %eax,%ebx <== NOT EXECUTED
/* Return partition count */
*count = (size_t) (p - pt + 1);
cleanup:
if (block != NULL) {
12a0ac: 85 d2 test %edx,%edx <== NOT EXECUTED
12a0ae: 0f 84 d4 01 00 00 je 12a288 <rtems_bdpart_read+0x288><== NOT EXECUTED
rtems_bdbuf_release( block);
12a0b4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12a0b7: 52 push %edx <== NOT EXECUTED
12a0b8: e8 bb 13 fe ff call 10b478 <rtems_bdbuf_release> <== NOT EXECUTED
12a0bd: 89 d8 mov %ebx,%eax <== NOT EXECUTED
12a0bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return esc;
}
12a0c2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12a0c5: 5b pop %ebx <== NOT EXECUTED
12a0c6: 5e pop %esi <== NOT EXECUTED
12a0c7: 5f pop %edi <== NOT EXECUTED
12a0c8: c9 leave <== NOT EXECUTED
12a0c9: c3 ret <== NOT EXECUTED
12a0ca: 66 90 xchg %ax,%ax <== NOT EXECUTED
*count = (size_t) (p - pt + 1);
cleanup:
if (block != NULL) {
rtems_bdbuf_release( block);
12a0cc: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
}
return esc;
}
12a0d1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12a0d4: 5b pop %ebx <== NOT EXECUTED
12a0d5: 5e pop %esi <== NOT EXECUTED
12a0d6: 5f pop %edi <== NOT EXECUTED
12a0d7: c9 leave <== NOT EXECUTED
12a0d8: c3 ret <== NOT EXECUTED
12a0d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
12a0dc: 8d 34 37 lea (%edi,%esi,1),%esi <== NOT EXECUTED
12a0df: 89 75 c0 mov %esi,-0x40(%ebp) <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
12a0e2: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
12a0e5: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
12a0e8: 89 45 b8 mov %eax,-0x48(%ebp) <== NOT EXECUTED
12a0eb: 89 c6 mov %eax,%esi <== NOT EXECUTED
12a0ed: 81 c6 be 01 00 00 add $0x1be,%esi <== NOT EXECUTED
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
12a0f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12a0f6: 8d 55 dc lea -0x24(%ebp),%edx <== NOT EXECUTED
12a0f9: 52 push %edx <== NOT EXECUTED
12a0fa: 8b 4d c0 mov -0x40(%ebp),%ecx <== NOT EXECUTED
12a0fd: 8d 55 e0 lea -0x20(%ebp),%edx <== NOT EXECUTED
12a100: 89 f0 mov %esi,%eax <== NOT EXECUTED
12a102: e8 f5 fd ff ff call 129efc <rtems_bdpart_read_mbr_partition><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
12a107: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12a10a: 85 c0 test %eax,%eax <== NOT EXECUTED
12a10c: 75 99 jne 12a0a7 <rtems_bdpart_read+0xa7><== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Determine if we have a MBR or GPT format */
if (rtems_bdpart_mbr_partition_type( p->type) == RTEMS_BDPART_MBR_GPT) {
12a10e: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
12a111: 80 78 08 ee cmpb $0xee,0x8(%eax) <== NOT EXECUTED
12a115: 0f 84 91 01 00 00 je 12a2ac <rtems_bdpart_read+0x2ac><== NOT EXECUTED
esc = RTEMS_NOT_IMPLEMENTED;
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
12a11b: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
12a11e: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
format->mbr.disk_id = rtems_uint32_from_little_endian(
12a124: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
12a127: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED
12a12a: 8d 91 b8 01 00 00 lea 0x1b8(%ecx),%edx <== NOT EXECUTED
12a130: 0f b6 42 03 movzbl 0x3(%edx),%eax <== NOT EXECUTED
12a134: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
12a137: 89 45 bc mov %eax,-0x44(%ebp) <== NOT EXECUTED
12a13a: 0f b6 42 02 movzbl 0x2(%edx),%eax <== NOT EXECUTED
12a13e: 03 45 bc add -0x44(%ebp),%eax <== NOT EXECUTED
12a141: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
12a144: 89 45 bc mov %eax,-0x44(%ebp) <== NOT EXECUTED
12a147: 0f b6 42 01 movzbl 0x1(%edx),%eax <== NOT EXECUTED
12a14b: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED
12a14e: 01 c2 add %eax,%edx <== NOT EXECUTED
12a150: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
12a153: 0f b6 81 b8 01 00 00 movzbl 0x1b8(%ecx),%eax <== NOT EXECUTED
12a15a: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED
12a15d: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
12a160: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
format->mbr.dos_compatibility = true;
12a163: c6 42 08 01 movb $0x1,0x8(%edx) <== NOT EXECUTED
}
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_read(
12a167: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
12a16a: 05 ee 01 00 00 add $0x1ee,%eax <== NOT EXECUTED
12a16f: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED
);
format->mbr.dos_compatibility = true;
/* Iterate through the rest of the primary partition table */
for (i = 1; i < 4; ++i) {
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
12a172: 83 c6 10 add $0x10,%esi <== NOT EXECUTED
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
12a175: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12a178: 8d 55 dc lea -0x24(%ebp),%edx <== NOT EXECUTED
12a17b: 52 push %edx <== NOT EXECUTED
12a17c: 8b 4d c0 mov -0x40(%ebp),%ecx <== NOT EXECUTED
12a17f: 8d 55 e0 lea -0x20(%ebp),%edx <== NOT EXECUTED
12a182: 89 f0 mov %esi,%eax <== NOT EXECUTED
12a184: e8 73 fd ff ff call 129efc <rtems_bdpart_read_mbr_partition><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
12a189: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12a18c: 85 c0 test %eax,%eax <== NOT EXECUTED
12a18e: 0f 85 13 ff ff ff jne 12a0a7 <rtems_bdpart_read+0xa7><== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
format->mbr.dos_compatibility = true;
/* Iterate through the rest of the primary partition table */
for (i = 1; i < 4; ++i) {
12a194: 3b 75 c4 cmp -0x3c(%ebp),%esi <== NOT EXECUTED
12a197: 75 d9 jne 12a172 <rtems_bdpart_read+0x172><== NOT EXECUTED
goto cleanup;
}
}
/* Iterate through the logical partitions within the extended partition */
ebr = ep_begin;
12a199: 8b 75 dc mov -0x24(%ebp),%esi <== NOT EXECUTED
while (ebr != 0) {
12a19c: 85 f6 test %esi,%esi <== NOT EXECUTED
12a19e: 0f 84 22 01 00 00 je 12a2c6 <rtems_bdpart_read+0x2c6><== NOT EXECUTED
12a1a4: 89 7d b8 mov %edi,-0x48(%ebp) <== NOT EXECUTED
12a1a7: 89 5d bc mov %ebx,-0x44(%ebp) <== NOT EXECUTED
rtems_blkdev_bnum tmp = 0;
/* Read EBR */
sc = rtems_bdpart_read_record( disk, ebr, &block);
12a1aa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12a1ad: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12a1b0: 50 push %eax <== NOT EXECUTED
12a1b1: 89 f1 mov %esi,%ecx <== NOT EXECUTED
12a1b3: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
12a1b6: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
12a1b9: e8 0e fc ff ff call 129dcc <rtems_bdpart_read_record><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
12a1be: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12a1c1: 85 c0 test %eax,%eax <== NOT EXECUTED
12a1c3: 0f 85 de fe ff ff jne 12a0a7 <rtems_bdpart_read+0xa7><== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
12a1c9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12a1cc: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
12a1cf: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
12a1d2: 05 be 01 00 00 add $0x1be,%eax <== NOT EXECUTED
12a1d7: 6a 00 push $0x0 <== NOT EXECUTED
12a1d9: 8b 4d c0 mov -0x40(%ebp),%ecx <== NOT EXECUTED
12a1dc: 8d 55 e0 lea -0x20(%ebp),%edx <== NOT EXECUTED
12a1df: e8 18 fd ff ff call 129efc <rtems_bdpart_read_mbr_partition><== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
&p,
p_end,
NULL
);
if (sc != RTEMS_SUCCESSFUL) {
12a1e4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12a1e7: 85 c0 test %eax,%eax <== NOT EXECUTED
12a1e9: 0f 85 b8 fe ff ff jne 12a0a7 <rtems_bdpart_read+0xa7><== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Adjust partition begin */
tmp = p->begin + ebr;
12a1ef: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
12a1f2: 8b 10 mov (%eax),%edx <== NOT EXECUTED
12a1f4: 8d 0c 16 lea (%esi,%edx,1),%ecx <== NOT EXECUTED
if (tmp > p->begin) {
12a1f7: 39 ca cmp %ecx,%edx <== NOT EXECUTED
12a1f9: 0f 83 ba 00 00 00 jae 12a2b9 <rtems_bdpart_read+0x2b9><== NOT EXECUTED
p->begin = tmp;
12a1ff: 89 08 mov %ecx,(%eax) <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Adjust partition end */
tmp = p->end + ebr;
12a201: 8b 50 04 mov 0x4(%eax),%edx <== NOT EXECUTED
12a204: 01 d6 add %edx,%esi <== NOT EXECUTED
if (tmp > p->end) {
12a206: 39 f2 cmp %esi,%edx <== NOT EXECUTED
12a208: 0f 83 ab 00 00 00 jae 12a2b9 <rtems_bdpart_read+0x2b9><== NOT EXECUTED
p->end = tmp;
12a20e: 89 70 04 mov %esi,0x4(%eax) <== NOT EXECUTED
goto cleanup;
}
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
12a211: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
12a214: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
12a217: 8b 4a 20 mov 0x20(%edx),%ecx <== NOT EXECUTED
}
static rtems_blkdev_bnum rtems_bdpart_next_ebr( const uint8_t *data)
{
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
12a21a: 8d 99 d6 01 00 00 lea 0x1d6(%ecx),%ebx <== NOT EXECUTED
12a220: 0f b6 73 03 movzbl 0x3(%ebx),%esi <== NOT EXECUTED
12a224: c1 e6 08 shl $0x8,%esi <== NOT EXECUTED
12a227: 0f b6 7b 02 movzbl 0x2(%ebx),%edi <== NOT EXECUTED
12a22b: 01 fe add %edi,%esi <== NOT EXECUTED
12a22d: c1 e6 08 shl $0x8,%esi <== NOT EXECUTED
12a230: 0f b6 7b 01 movzbl 0x1(%ebx),%edi <== NOT EXECUTED
12a234: 01 fe add %edi,%esi <== NOT EXECUTED
12a236: c1 e6 08 shl $0x8,%esi <== NOT EXECUTED
12a239: 0f b6 99 d6 01 00 00 movzbl 0x1d6(%ecx),%ebx <== NOT EXECUTED
12a240: 8d 1c 1e lea (%esi,%ebx,1),%ebx <== NOT EXECUTED
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EXTENDED) {
12a243: 80 b9 d2 01 00 00 05 cmpb $0x5,0x1d2(%ecx) <== NOT EXECUTED
12a24a: 74 44 je 12a290 <rtems_bdpart_read+0x290><== NOT EXECUTED
12a24c: 8b 7d b8 mov -0x48(%ebp),%edi <== NOT EXECUTED
12a24f: 8b 5d bc mov -0x44(%ebp),%ebx <== NOT EXECUTED
}
}
}
/* Return partition count */
*count = (size_t) (p - pt + 1);
12a252: 29 f8 sub %edi,%eax <== NOT EXECUTED
12a254: c1 f8 04 sar $0x4,%eax <== NOT EXECUTED
12a257: 8d 14 80 lea (%eax,%eax,4),%edx <== NOT EXECUTED
12a25a: 8d 14 90 lea (%eax,%edx,4),%edx <== NOT EXECUTED
12a25d: 8d 14 90 lea (%eax,%edx,4),%edx <== NOT EXECUTED
12a260: 89 d1 mov %edx,%ecx <== NOT EXECUTED
12a262: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
12a265: 01 ca add %ecx,%edx <== NOT EXECUTED
12a267: 89 d1 mov %edx,%ecx <== NOT EXECUTED
12a269: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
12a26c: 01 ca add %ecx,%edx <== NOT EXECUTED
12a26e: 8d 44 50 01 lea 0x1(%eax,%edx,2),%eax <== NOT EXECUTED
12a272: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
12a274: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
12a277: 31 db xor %ebx,%ebx <== NOT EXECUTED
12a279: e9 2e fe ff ff jmp 12a0ac <rtems_bdpart_read+0xac><== NOT EXECUTED
12a27e: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
12a280: 31 f6 xor %esi,%esi <== NOT EXECUTED
12a282: e9 98 fd ff ff jmp 12a01f <rtems_bdpart_read+0x1f><== NOT EXECUTED
12a287: 90 nop <== NOT EXECUTED
/* Return partition count */
*count = (size_t) (p - pt + 1);
cleanup:
if (block != NULL) {
12a288: 89 d8 mov %ebx,%eax <== NOT EXECUTED
12a28a: e9 f2 fd ff ff jmp 12a081 <rtems_bdpart_read+0x81><== NOT EXECUTED
12a28f: 90 nop <== NOT EXECUTED
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
);
if (ebr != 0) {
12a290: 85 db test %ebx,%ebx <== NOT EXECUTED
12a292: 74 b8 je 12a24c <rtems_bdpart_read+0x24c><== NOT EXECUTED
/* Adjust partition EBR block index */
tmp = ebr + ep_begin;
12a294: 8b 75 dc mov -0x24(%ebp),%esi <== NOT EXECUTED
12a297: 01 de add %ebx,%esi <== NOT EXECUTED
if (tmp > ebr) {
12a299: 39 de cmp %ebx,%esi <== NOT EXECUTED
12a29b: 0f 87 09 ff ff ff ja 12a1aa <rtems_bdpart_read+0x1aa><== NOT EXECUTED
12a2a1: bb 1b 00 00 00 mov $0x1b,%ebx <== NOT EXECUTED
12a2a6: e9 01 fe ff ff jmp 12a0ac <rtems_bdpart_read+0xac><== NOT EXECUTED
12a2ab: 90 nop <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Determine if we have a MBR or GPT format */
if (rtems_bdpart_mbr_partition_type( p->type) == RTEMS_BDPART_MBR_GPT) {
12a2ac: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
12a2af: bb 18 00 00 00 mov $0x18,%ebx <== NOT EXECUTED
12a2b4: e9 f3 fd ff ff jmp 12a0ac <rtems_bdpart_read+0xac><== NOT EXECUTED
goto cleanup;
}
/* Adjust partition end */
tmp = p->end + ebr;
if (tmp > p->end) {
12a2b9: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
12a2bc: bb 1b 00 00 00 mov $0x1b,%ebx <== NOT EXECUTED
12a2c1: e9 e6 fd ff ff jmp 12a0ac <rtems_bdpart_read+0xac><== NOT EXECUTED
}
}
/* Iterate through the logical partitions within the extended partition */
ebr = ep_begin;
while (ebr != 0) {
12a2c6: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
12a2c9: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
12a2cc: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED
12a2cf: eb 81 jmp 12a252 <rtems_bdpart_read+0x252><== NOT EXECUTED
00129efc <rtems_bdpart_read_mbr_partition>:
const uint8_t *data,
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
129efc: 55 push %ebp <== NOT EXECUTED
129efd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
129eff: 57 push %edi <== NOT EXECUTED
129f00: 56 push %esi <== NOT EXECUTED
129f01: 53 push %ebx <== NOT EXECUTED
129f02: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
129f05: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
129f07: 8d 40 08 lea 0x8(%eax),%eax <== NOT EXECUTED
{
uint32_t value = 0;
ssize_t i = 0;
for (i = 3; i >= 0; --i) {
value = (value << 8) + data [i];
129f0a: 0f b6 70 03 movzbl 0x3(%eax),%esi <== NOT EXECUTED
129f0e: c1 e6 08 shl $0x8,%esi <== NOT EXECUTED
129f11: 0f b6 78 02 movzbl 0x2(%eax),%edi <== NOT EXECUTED
129f15: 01 fe add %edi,%esi <== NOT EXECUTED
129f17: c1 e6 08 shl $0x8,%esi <== NOT EXECUTED
129f1a: 0f b6 78 01 movzbl 0x1(%eax),%edi <== NOT EXECUTED
129f1e: 01 fe add %edi,%esi <== NOT EXECUTED
129f20: c1 e6 08 shl $0x8,%esi <== NOT EXECUTED
129f23: 0f b6 43 08 movzbl 0x8(%ebx),%eax <== NOT EXECUTED
129f27: 8d 04 06 lea (%esi,%eax,1),%eax <== NOT EXECUTED
129f2a: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
rtems_blkdev_bnum size =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_SIZE);
129f2d: 8d 43 0c lea 0xc(%ebx),%eax <== NOT EXECUTED
129f30: 0f b6 78 03 movzbl 0x3(%eax),%edi <== NOT EXECUTED
129f34: c1 e7 08 shl $0x8,%edi <== NOT EXECUTED
129f37: 0f b6 70 02 movzbl 0x2(%eax),%esi <== NOT EXECUTED
129f3b: 01 f7 add %esi,%edi <== NOT EXECUTED
129f3d: c1 e7 08 shl $0x8,%edi <== NOT EXECUTED
129f40: 0f b6 70 01 movzbl 0x1(%eax),%esi <== NOT EXECUTED
129f44: 8d 34 37 lea (%edi,%esi,1),%esi <== NOT EXECUTED
129f47: c1 e6 08 shl $0x8,%esi <== NOT EXECUTED
129f4a: 0f b6 43 0c movzbl 0xc(%ebx),%eax <== NOT EXECUTED
129f4e: 01 c6 add %eax,%esi <== NOT EXECUTED
rtems_blkdev_bnum end = begin + size;
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
129f50: 8a 43 04 mov 0x4(%ebx),%al <== NOT EXECUTED
129f53: 88 45 ef mov %al,-0x11(%ebp) <== NOT EXECUTED
if (type == RTEMS_BDPART_MBR_EMPTY) {
129f56: 84 c0 test %al,%al <== NOT EXECUTED
129f58: 74 76 je 129fd0 <rtems_bdpart_read_mbr_partition+0xd4><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
129f5a: 8b 02 mov (%edx),%eax <== NOT EXECUTED
129f5c: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
129f5e: 0f 84 94 00 00 00 je 129ff8 <rtems_bdpart_read_mbr_partition+0xfc><== NOT EXECUTED
{
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_blkdev_bnum size =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_SIZE);
rtems_blkdev_bnum end = begin + size;
129f64: 03 75 f0 add -0x10(%ebp),%esi <== NOT EXECUTED
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
} else if (begin >= end) {
129f67: 3b 75 f0 cmp -0x10(%ebp),%esi <== NOT EXECUTED
129f6a: 76 54 jbe 129fc0 <rtems_bdpart_read_mbr_partition+0xc4><== NOT EXECUTED
return RTEMS_IO_ERROR;
} else if (type == RTEMS_BDPART_MBR_EXTENDED) {
129f6c: 80 7d ef 05 cmpb $0x5,-0x11(%ebp) <== NOT EXECUTED
129f70: 74 6a je 129fdc <rtems_bdpart_read_mbr_partition+0xe0><== NOT EXECUTED
if (ep_begin != NULL) {
*ep_begin = begin;
}
} else {
/* Increment partition index */
++(*p);
129f72: 83 c0 30 add $0x30,%eax <== NOT EXECUTED
129f75: 89 45 e8 mov %eax,-0x18(%ebp) <== NOT EXECUTED
129f78: 89 02 mov %eax,(%edx) <== NOT EXECUTED
/* Clear partition */
memset( *p, 0, sizeof( rtems_bdpart_partition));
129f7a: b9 30 00 00 00 mov $0x30,%ecx <== NOT EXECUTED
129f7f: 31 c0 xor %eax,%eax <== NOT EXECUTED
129f81: 8b 7d e8 mov -0x18(%ebp),%edi <== NOT EXECUTED
129f84: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
/* Set values */
(*p)->begin = begin;
129f86: 8b 02 mov (%edx),%eax <== NOT EXECUTED
129f88: 8b 4d f0 mov -0x10(%ebp),%ecx <== NOT EXECUTED
129f8b: 89 08 mov %ecx,(%eax) <== NOT EXECUTED
(*p)->end = end;
129f8d: 89 70 04 mov %esi,0x4(%eax) <== NOT EXECUTED
rtems_bdpart_to_partition_type( type, (*p)->type);
129f90: 83 c0 08 add $0x8,%eax <== NOT EXECUTED
129f93: 50 push %eax <== NOT EXECUTED
129f94: 0f b6 45 ef movzbl -0x11(%ebp),%eax <== NOT EXECUTED
129f98: 50 push %eax <== NOT EXECUTED
129f99: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
129f9c: e8 3b ff ff ff call 129edc <rtems_bdpart_to_partition_type><== NOT EXECUTED
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
129fa1: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
129fa4: 8b 02 mov (%edx),%eax <== NOT EXECUTED
129fa6: 0f b6 13 movzbl (%ebx),%edx <== NOT EXECUTED
129fa9: 89 50 28 mov %edx,0x28(%eax) <== NOT EXECUTED
129fac: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) <== NOT EXECUTED
129fb3: 31 c0 xor %eax,%eax <== NOT EXECUTED
129fb5: 5a pop %edx <== NOT EXECUTED
129fb6: 59 pop %ecx <== NOT EXECUTED
}
return RTEMS_SUCCESSFUL;
}
129fb7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129fba: 5b pop %ebx <== NOT EXECUTED
129fbb: 5e pop %esi <== NOT EXECUTED
129fbc: 5f pop %edi <== NOT EXECUTED
129fbd: c9 leave <== NOT EXECUTED
129fbe: c3 ret <== NOT EXECUTED
129fbf: 90 nop <== NOT EXECUTED
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
} else if (begin >= end) {
129fc0: b8 1b 00 00 00 mov $0x1b,%eax <== NOT EXECUTED
rtems_bdpart_to_partition_type( type, (*p)->type);
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
}
return RTEMS_SUCCESSFUL;
}
129fc5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129fc8: 5b pop %ebx <== NOT EXECUTED
129fc9: 5e pop %esi <== NOT EXECUTED
129fca: 5f pop %edi <== NOT EXECUTED
129fcb: c9 leave <== NOT EXECUTED
129fcc: c3 ret <== NOT EXECUTED
129fcd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* Set values */
(*p)->begin = begin;
(*p)->end = end;
rtems_bdpart_to_partition_type( type, (*p)->type);
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
129fd0: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
return RTEMS_SUCCESSFUL;
}
129fd2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129fd5: 5b pop %ebx <== NOT EXECUTED
129fd6: 5e pop %esi <== NOT EXECUTED
129fd7: 5f pop %edi <== NOT EXECUTED
129fd8: c9 leave <== NOT EXECUTED
129fd9: c3 ret <== NOT EXECUTED
129fda: 66 90 xchg %ax,%ax <== NOT EXECUTED
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
} else if (begin >= end) {
return RTEMS_IO_ERROR;
} else if (type == RTEMS_BDPART_MBR_EXTENDED) {
if (ep_begin != NULL) {
129fdc: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
129fdf: 85 db test %ebx,%ebx <== NOT EXECUTED
129fe1: 74 ed je 129fd0 <rtems_bdpart_read_mbr_partition+0xd4><== NOT EXECUTED
*ep_begin = begin;
129fe3: 8b 4d f0 mov -0x10(%ebp),%ecx <== NOT EXECUTED
129fe6: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
129fe9: 89 0a mov %ecx,(%edx) <== NOT EXECUTED
129feb: 31 c0 xor %eax,%eax <== NOT EXECUTED
rtems_bdpart_to_partition_type( type, (*p)->type);
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
}
return RTEMS_SUCCESSFUL;
}
129fed: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129ff0: 5b pop %ebx <== NOT EXECUTED
129ff1: 5e pop %esi <== NOT EXECUTED
129ff2: 5f pop %edi <== NOT EXECUTED
129ff3: c9 leave <== NOT EXECUTED
129ff4: c3 ret <== NOT EXECUTED
129ff5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_blkdev_bnum end = begin + size;
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
129ff8: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED
129ffd: eb c6 jmp 129fc5 <rtems_bdpart_read_mbr_partition+0xc9><== NOT EXECUTED
00129dcc <rtems_bdpart_read_record>:
static rtems_status_code rtems_bdpart_read_record(
dev_t disk,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
129dcc: 55 push %ebp <== NOT EXECUTED
129dcd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
129dcf: 57 push %edi <== NOT EXECUTED
129dd0: 56 push %esi <== NOT EXECUTED
129dd1: 53 push %ebx <== NOT EXECUTED
129dd2: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
129dd5: 89 c3 mov %eax,%ebx <== NOT EXECUTED
129dd7: 89 d6 mov %edx,%esi <== NOT EXECUTED
129dd9: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Release previous block if necessary */
if (*block != NULL) {
129ddc: 8b 07 mov (%edi),%eax <== NOT EXECUTED
129dde: 85 c0 test %eax,%eax <== NOT EXECUTED
129de0: 74 16 je 129df8 <rtems_bdpart_read_record+0x2c><== NOT EXECUTED
sc = rtems_bdbuf_release( *block);
129de2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129de5: 50 push %eax <== NOT EXECUTED
129de6: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
129de9: e8 8a 16 fe ff call 10b478 <rtems_bdbuf_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
129dee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129df1: 85 c0 test %eax,%eax <== NOT EXECUTED
129df3: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
129df6: 75 27 jne 129e1f <rtems_bdpart_read_record+0x53><== NOT EXECUTED
return sc;
}
}
/* Read the record block */
sc = rtems_bdbuf_read( disk, index, block);
129df8: 57 push %edi <== NOT EXECUTED
129df9: 51 push %ecx <== NOT EXECUTED
129dfa: 56 push %esi <== NOT EXECUTED
129dfb: 53 push %ebx <== NOT EXECUTED
129dfc: e8 f3 26 fe ff call 10c4f4 <rtems_bdbuf_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
129e01: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129e04: 85 c0 test %eax,%eax <== NOT EXECUTED
129e06: 75 17 jne 129e1f <rtems_bdpart_read_record+0x53><== NOT EXECUTED
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
129e08: 8b 17 mov (%edi),%edx <== NOT EXECUTED
129e0a: 85 d2 test %edx,%edx <== NOT EXECUTED
129e0c: 74 26 je 129e34 <rtems_bdpart_read_record+0x68><== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
}
/* Check MBR signature */
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
129e0e: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
static bool rtems_bdpart_is_valid_record( const uint8_t *data)
{
return data [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_0]
129e11: 80 ba fe 01 00 00 55 cmpb $0x55,0x1fe(%edx) <== NOT EXECUTED
129e18: 74 0e je 129e28 <rtems_bdpart_read_record+0x5c><== NOT EXECUTED
129e1a: b8 1b 00 00 00 mov $0x1b,%eax <== NOT EXECUTED
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
return RTEMS_IO_ERROR;
}
return RTEMS_SUCCESSFUL;
}
129e1f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129e22: 5b pop %ebx <== NOT EXECUTED
129e23: 5e pop %esi <== NOT EXECUTED
129e24: 5f pop %edi <== NOT EXECUTED
129e25: c9 leave <== NOT EXECUTED
129e26: c3 ret <== NOT EXECUTED
129e27: 90 nop <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
static bool rtems_bdpart_is_valid_record( const uint8_t *data)
{
return data [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_0]
129e28: 80 ba ff 01 00 00 aa cmpb $0xaa,0x1ff(%edx) <== NOT EXECUTED
129e2f: 75 e9 jne 129e1a <rtems_bdpart_read_record+0x4e><== NOT EXECUTED
129e31: eb ec jmp 129e1f <rtems_bdpart_read_record+0x53><== NOT EXECUTED
129e33: 90 nop <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
129e34: b0 09 mov $0x9,%al <== NOT EXECUTED
129e36: eb e7 jmp 129e1f <rtems_bdpart_read_record+0x53><== NOT EXECUTED
0010c84c <rtems_bdpart_register>:
rtems_status_code rtems_bdpart_register(
const char *disk_name,
const rtems_bdpart_partition *pt,
size_t count
)
{
10c84c: 55 push %ebp <== NOT EXECUTED
10c84d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10c84f: 57 push %edi <== NOT EXECUTED
10c850: 56 push %esi <== NOT EXECUTED
10c851: 53 push %ebx <== NOT EXECUTED
10c852: 83 ec 50 sub $0x50,%esp <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
10c855: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
dev_t disk = 0;
10c85c: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
10c863: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
dev_t logical_disk = 0;
char *logical_disk_name = NULL;
char *logical_disk_marker = NULL;
size_t disk_name_size = strlen( disk_name);
10c86a: 31 c0 xor %eax,%eax <== NOT EXECUTED
10c86c: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
10c871: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
10c874: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
10c876: 89 cb mov %ecx,%ebx <== NOT EXECUTED
10c878: f7 d3 not %ebx <== NOT EXECUTED
10c87a: 8d 73 ff lea -0x1(%ebx),%esi <== NOT EXECUTED
size_t i = 0;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
10c87d: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10c880: 50 push %eax <== NOT EXECUTED
10c881: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
10c884: 50 push %eax <== NOT EXECUTED
10c885: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
10c888: e8 ab d5 01 00 call 129e38 <rtems_bdpart_get_disk_data><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
10c88d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c890: 85 c0 test %eax,%eax <== NOT EXECUTED
10c892: 74 08 je 10c89c <rtems_bdpart_register+0x50><== NOT EXECUTED
cleanup:
free( logical_disk_name);
return esc;
}
10c894: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10c897: 5b pop %ebx <== NOT EXECUTED
10c898: 5e pop %esi <== NOT EXECUTED
10c899: 5f pop %edi <== NOT EXECUTED
10c89a: c9 leave <== NOT EXECUTED
10c89b: c3 ret <== NOT EXECUTED
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
10c89c: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED
10c89f: 89 45 b8 mov %eax,-0x48(%ebp) <== NOT EXECUTED
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
10c8a2: 8b 7d dc mov -0x24(%ebp),%edi <== NOT EXECUTED
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
/* Create logical disk name */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
10c8a5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c8a8: 83 c3 03 add $0x3,%ebx <== NOT EXECUTED
10c8ab: 53 push %ebx <== NOT EXECUTED
10c8ac: e8 57 25 00 00 call 10ee08 <malloc> <== NOT EXECUTED
10c8b1: 89 45 bc mov %eax,-0x44(%ebp) <== NOT EXECUTED
if (logical_disk_name == NULL) {
10c8b4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c8b7: 85 c0 test %eax,%eax <== NOT EXECUTED
10c8b9: 0f 84 ad 00 00 00 je 10c96c <rtems_bdpart_register+0x120><== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
10c8bf: 51 push %ecx <== NOT EXECUTED
10c8c0: 56 push %esi <== NOT EXECUTED
10c8c1: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
10c8c4: ff 75 bc pushl -0x44(%ebp) <== NOT EXECUTED
10c8c7: e8 44 10 04 00 call 14d910 <strncpy> <== NOT EXECUTED
logical_disk_marker = logical_disk_name + disk_name_size;
10c8cc: 03 75 bc add -0x44(%ebp),%esi <== NOT EXECUTED
10c8cf: 89 75 b4 mov %esi,-0x4c(%ebp) <== NOT EXECUTED
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
10c8d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c8d5: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
10c8d8: 85 d2 test %edx,%edx <== NOT EXECUTED
10c8da: 0f 84 84 00 00 00 je 10c964 <rtems_bdpart_register+0x118><== NOT EXECUTED
10c8e0: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
10c8e3: 31 db xor %ebx,%ebx <== NOT EXECUTED
10c8e5: eb 2e jmp 10c915 <rtems_bdpart_register+0xc9><== NOT EXECUTED
10c8e7: 90 nop <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
10c8e8: 8b 16 mov (%esi),%edx <== NOT EXECUTED
10c8ea: 50 push %eax <== NOT EXECUTED
10c8eb: ff 75 bc pushl -0x44(%ebp) <== NOT EXECUTED
10c8ee: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
10c8f1: 29 d0 sub %edx,%eax <== NOT EXECUTED
10c8f3: 50 push %eax <== NOT EXECUTED
10c8f4: 52 push %edx <== NOT EXECUTED
10c8f5: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
10c8f8: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
10c8fb: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
10c8fe: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED
10c901: e8 c6 0f 00 00 call 10d8cc <rtems_disk_create_log> <== NOT EXECUTED
disk,
p->begin,
p->end - p->begin,
logical_disk_name
);
if (sc != RTEMS_SUCCESSFUL) {
10c906: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10c909: 85 c0 test %eax,%eax <== NOT EXECUTED
10c90b: 75 5b jne 10c968 <rtems_bdpart_register+0x11c><== NOT EXECUTED
10c90d: 83 c6 30 add $0x30,%esi <== NOT EXECUTED
}
strncpy( logical_disk_name, disk_name, disk_name_size);
logical_disk_marker = logical_disk_name + disk_name_size;
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
10c910: 39 5d 10 cmp %ebx,0x10(%ebp) <== NOT EXECUTED
10c913: 76 4f jbe 10c964 <rtems_bdpart_register+0x118><== NOT EXECUTED
const rtems_bdpart_partition *p = pt + i;
int rv = 0;
/* New minor number */
++minor;
10c915: 47 inc %edi <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
10c916: 8b 55 b8 mov -0x48(%ebp),%edx <== NOT EXECUTED
10c919: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
temp.__overlay.minor = _minor;
10c91c: 89 7d d4 mov %edi,-0x2c(%ebp) <== NOT EXECUTED
return temp.device;
10c91f: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
10c922: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
10c925: 89 45 c0 mov %eax,-0x40(%ebp) <== NOT EXECUTED
10c928: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED
/* Create a new device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Set partition number for logical disk name */
rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
10c92b: 43 inc %ebx <== NOT EXECUTED
10c92c: 53 push %ebx <== NOT EXECUTED
10c92d: 68 28 09 16 00 push $0x160928 <== NOT EXECUTED
10c932: 6a 04 push $0x4 <== NOT EXECUTED
10c934: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
10c937: e8 18 06 04 00 call 14cf54 <snprintf> <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
10c93c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c93f: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
10c942: 7e a4 jle 10c8e8 <rtems_bdpart_register+0x9c><== NOT EXECUTED
10c944: bb 03 00 00 00 mov $0x3,%ebx <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
10c949: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c94c: ff 75 bc pushl -0x44(%ebp) <== NOT EXECUTED
10c94f: e8 14 1f 00 00 call 10e868 <free> <== NOT EXECUTED
10c954: 89 d8 mov %ebx,%eax <== NOT EXECUTED
return esc;
10c956: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10c959: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10c95c: 5b pop %ebx <== NOT EXECUTED
10c95d: 5e pop %esi <== NOT EXECUTED
10c95e: 5f pop %edi <== NOT EXECUTED
10c95f: c9 leave <== NOT EXECUTED
10c960: c3 ret <== NOT EXECUTED
10c961: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
strncpy( logical_disk_name, disk_name, disk_name_size);
logical_disk_marker = logical_disk_name + disk_name_size;
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
10c964: 31 db xor %ebx,%ebx <== NOT EXECUTED
10c966: eb e1 jmp 10c949 <rtems_bdpart_register+0xfd><== NOT EXECUTED
disk,
p->begin,
p->end - p->begin,
logical_disk_name
);
if (sc != RTEMS_SUCCESSFUL) {
10c968: 89 c3 mov %eax,%ebx <== NOT EXECUTED
10c96a: eb dd jmp 10c949 <rtems_bdpart_register+0xfd><== NOT EXECUTED
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
/* Create logical disk name */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (logical_disk_name == NULL) {
10c96c: b0 1a mov $0x1a,%al <== NOT EXECUTED
10c96e: e9 21 ff ff ff jmp 10c894 <rtems_bdpart_register+0x48><== NOT EXECUTED
0010c974 <rtems_bdpart_register_from_disk>:
return esc;
}
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
10c974: 55 push %ebp <== NOT EXECUTED
10c975: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10c977: 56 push %esi <== NOT EXECUTED
10c978: 53 push %ebx <== NOT EXECUTED
10c979: 81 ec 20 03 00 00 sub $0x320,%esp <== NOT EXECUTED
10c97f: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdpart_format format;
rtems_bdpart_partition pt [RTEMS_BDPART_PARTITION_NUMBER_HINT];
size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;
10c982: c7 45 f4 10 00 00 00 movl $0x10,-0xc(%ebp) <== NOT EXECUTED
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
10c989: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
10c98c: 50 push %eax <== NOT EXECUTED
10c98d: 8d b5 e0 fc ff ff lea -0x320(%ebp),%esi <== NOT EXECUTED
10c993: 56 push %esi <== NOT EXECUTED
10c994: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
10c997: 50 push %eax <== NOT EXECUTED
10c998: 53 push %ebx <== NOT EXECUTED
10c999: e8 62 d6 01 00 call 12a000 <rtems_bdpart_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
10c99e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c9a1: 85 c0 test %eax,%eax <== NOT EXECUTED
10c9a3: 75 0e jne 10c9b3 <rtems_bdpart_register_from_disk+0x3f><== NOT EXECUTED
return sc;
}
/* Register partitions */
return rtems_bdpart_register( disk_name, pt, count);
10c9a5: 50 push %eax <== NOT EXECUTED
10c9a6: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED
10c9a9: 56 push %esi <== NOT EXECUTED
10c9aa: 53 push %ebx <== NOT EXECUTED
10c9ab: e8 9c fe ff ff call 10c84c <rtems_bdpart_register> <== NOT EXECUTED
10c9b0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10c9b3: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10c9b6: 5b pop %ebx <== NOT EXECUTED
10c9b7: 5e pop %esi <== NOT EXECUTED
10c9b8: c9 leave <== NOT EXECUTED
10c9b9: c3 ret <== NOT EXECUTED
00129eb8 <rtems_bdpart_to_mbr_partition_type>:
bool rtems_bdpart_to_mbr_partition_type(
const uuid_t type,
uint8_t *mbr_type
)
{
129eb8: 55 push %ebp <== NOT EXECUTED
129eb9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
129ebb: 57 push %edi <== NOT EXECUTED
129ebc: 56 push %esi <== NOT EXECUTED
129ebd: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
*mbr_type = rtems_bdpart_mbr_partition_type( type);
129ec0: 8a 16 mov (%esi),%dl <== NOT EXECUTED
129ec2: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
129ec5: 88 10 mov %dl,(%eax) <== NOT EXECUTED
return memcmp(
129ec7: 46 inc %esi <== NOT EXECUTED
129ec8: bf 50 55 16 00 mov $0x165550,%edi <== NOT EXECUTED
129ecd: b9 0f 00 00 00 mov $0xf,%ecx <== NOT EXECUTED
129ed2: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED
129ed4: 0f 94 c0 sete %al <== NOT EXECUTED
type + 1,
RTEMS_BDPART_MBR_MASTER_TYPE + 1,
sizeof( uuid_t) - 1
) == 0;
}
129ed7: 5e pop %esi <== NOT EXECUTED
129ed8: 5f pop %edi <== NOT EXECUTED
129ed9: c9 leave <== NOT EXECUTED
129eda: c3 ret <== NOT EXECUTED
00129edc <rtems_bdpart_to_partition_type>:
static const uuid_t RTEMS_BDPART_MBR_MASTER_TYPE =
RTEMS_BDPART_MBR_PARTITION_TYPE( RTEMS_BDPART_MBR_EMPTY);
void rtems_bdpart_to_partition_type( uint8_t mbr_type, uuid_t type)
{
129edc: 55 push %ebp <== NOT EXECUTED
129edd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
129edf: 57 push %edi <== NOT EXECUTED
129ee0: 56 push %esi <== NOT EXECUTED
129ee1: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
type [0] = mbr_type;
129ee4: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
129ee7: 88 10 mov %dl,(%eax) <== NOT EXECUTED
memcpy( type + 1, RTEMS_BDPART_MBR_MASTER_TYPE + 1, sizeof( uuid_t) - 1);
129ee9: 40 inc %eax <== NOT EXECUTED
129eea: be 50 55 16 00 mov $0x165550,%esi <== NOT EXECUTED
129eef: b9 0f 00 00 00 mov $0xf,%ecx <== NOT EXECUTED
129ef4: 89 c7 mov %eax,%edi <== NOT EXECUTED
129ef6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
}
129ef8: 5e pop %esi <== NOT EXECUTED
129ef9: 5f pop %edi <== NOT EXECUTED
129efa: c9 leave <== NOT EXECUTED
129efb: c3 ret <== NOT EXECUTED
00129ae0 <rtems_bdpart_unmount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
129ae0: 55 push %ebp <== NOT EXECUTED
129ae1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
129ae3: 57 push %edi <== NOT EXECUTED
129ae4: 56 push %esi <== NOT EXECUTED
129ae5: 53 push %ebx <== NOT EXECUTED
129ae6: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED
129ae9: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
129aec: 6a 2f push $0x2f <== NOT EXECUTED
129aee: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
129af1: e8 9a 44 02 00 call 14df90 <strrchr> <== NOT EXECUTED
129af6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129af9: 89 c2 mov %eax,%edx <== NOT EXECUTED
char *mount_point = NULL;
char *mount_marker = NULL;
size_t disk_file_name_size = 0;
size_t disk_name_size = strlen( disk_name);
129afb: 31 c0 xor %eax,%eax <== NOT EXECUTED
129afd: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
129b02: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
129b05: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
129b07: f7 d1 not %ecx <== NOT EXECUTED
129b09: 49 dec %ecx <== NOT EXECUTED
129b0a: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
129b0d: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
129b12: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
129b15: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
129b17: f7 d1 not %ecx <== NOT EXECUTED
129b19: 8d 71 ff lea -0x1(%ecx),%esi <== NOT EXECUTED
size_t i = 0;
/* Get disk file name */
if (disk_file_name != NULL) {
129b1c: 85 d2 test %edx,%edx <== NOT EXECUTED
129b1e: 0f 84 dc 00 00 00 je 129c00 <rtems_bdpart_unmount+0x120><== NOT EXECUTED
disk_file_name += 1;
129b24: 42 inc %edx <== NOT EXECUTED
129b25: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
129b28: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
129b2d: 89 d7 mov %edx,%edi <== NOT EXECUTED
129b2f: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
129b31: f7 d1 not %ecx <== NOT EXECUTED
129b33: 49 dec %ecx <== NOT EXECUTED
129b34: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED
disk_file_name = disk_name;
disk_file_name_size = disk_name_size;
}
/* Create mount point base */
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
129b37: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
129b3a: 01 f2 add %esi,%edx <== NOT EXECUTED
129b3c: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
129b3f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129b42: 89 d0 mov %edx,%eax <== NOT EXECUTED
129b44: 83 c0 05 add $0x5,%eax <== NOT EXECUTED
129b47: 50 push %eax <== NOT EXECUTED
129b48: e8 bb 52 fe ff call 10ee08 <malloc> <== NOT EXECUTED
129b4d: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (mount_point == NULL) {
129b4f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129b52: 85 c0 test %eax,%eax <== NOT EXECUTED
129b54: 0f 84 9e 00 00 00 je 129bf8 <rtems_bdpart_unmount+0x118><== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
129b5a: 50 push %eax <== NOT EXECUTED
129b5b: 56 push %esi <== NOT EXECUTED
129b5c: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
129b5f: 57 push %edi <== NOT EXECUTED
129b60: e8 ab 3d 02 00 call 14d910 <strncpy> <== NOT EXECUTED
mount_point [mount_base_size] = '/';
129b65: c6 04 37 2f movb $0x2f,(%edi,%esi,1) <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
129b69: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
129b6c: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
129b6f: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
129b72: 8d 44 37 01 lea 0x1(%edi,%esi,1),%eax <== NOT EXECUTED
129b76: 50 push %eax <== NOT EXECUTED
129b77: e8 94 3d 02 00 call 14d910 <strncpy> <== NOT EXECUTED
/* Marker */
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
129b7c: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
129b7f: 8d 44 17 01 lea 0x1(%edi,%edx,1),%eax <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
129b83: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129b86: 85 db test %ebx,%ebx <== NOT EXECUTED
129b88: 74 4e je 129bd8 <rtems_bdpart_unmount+0xf8><== NOT EXECUTED
129b8a: 31 f6 xor %esi,%esi <== NOT EXECUTED
129b8c: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED
129b8f: 89 c3 mov %eax,%ebx <== NOT EXECUTED
129b91: eb 06 jmp 129b99 <rtems_bdpart_unmount+0xb9><== NOT EXECUTED
129b93: 90 nop <== NOT EXECUTED
129b94: 39 75 e4 cmp %esi,-0x1c(%ebp) <== NOT EXECUTED
129b97: 76 3f jbe 129bd8 <rtems_bdpart_unmount+0xf8><== NOT EXECUTED
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
129b99: 46 inc %esi <== NOT EXECUTED
129b9a: 56 push %esi <== NOT EXECUTED
129b9b: 68 28 09 16 00 push $0x160928 <== NOT EXECUTED
129ba0: 6a 04 push $0x4 <== NOT EXECUTED
129ba2: 53 push %ebx <== NOT EXECUTED
129ba3: e8 ac 33 02 00 call 14cf54 <snprintf> <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
129ba8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129bab: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
129bae: 7f 40 jg 129bf0 <rtems_bdpart_unmount+0x110><== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Unmount */
rv = unmount( mount_point);
129bb0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129bb3: 57 push %edi <== NOT EXECUTED
129bb4: e8 93 64 00 00 call 13004c <unmount> <== NOT EXECUTED
if (rv == 0) {
129bb9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129bbc: 85 c0 test %eax,%eax <== NOT EXECUTED
129bbe: 75 d4 jne 129b94 <rtems_bdpart_unmount+0xb4><== NOT EXECUTED
/* Remove mount point */
rv = rmdir( mount_point);
129bc0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129bc3: 57 push %edi <== NOT EXECUTED
129bc4: e8 53 60 00 00 call 12fc1c <rmdir> <== NOT EXECUTED
if (rv != 0) {
129bc9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129bcc: 85 c0 test %eax,%eax <== NOT EXECUTED
129bce: 74 c4 je 129b94 <rtems_bdpart_unmount+0xb4><== NOT EXECUTED
129bd0: bb 1b 00 00 00 mov $0x1b,%ebx <== NOT EXECUTED
129bd5: eb 03 jmp 129bda <rtems_bdpart_unmount+0xfa><== NOT EXECUTED
129bd7: 90 nop <== NOT EXECUTED
/* Marker */
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
129bd8: 31 db xor %ebx,%ebx <== NOT EXECUTED
}
}
cleanup:
free( mount_point);
129bda: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129bdd: 57 push %edi <== NOT EXECUTED
129bde: e8 85 4c fe ff call 10e868 <free> <== NOT EXECUTED
return esc;
}
129be3: 89 d8 mov %ebx,%eax <== NOT EXECUTED
129be5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129be8: 5b pop %ebx <== NOT EXECUTED
129be9: 5e pop %esi <== NOT EXECUTED
129bea: 5f pop %edi <== NOT EXECUTED
129beb: c9 leave <== NOT EXECUTED
129bec: c3 ret <== NOT EXECUTED
129bed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
129bf0: bb 03 00 00 00 mov $0x3,%ebx <== NOT EXECUTED
129bf5: eb e3 jmp 129bda <rtems_bdpart_unmount+0xfa><== NOT EXECUTED
129bf7: 90 nop <== NOT EXECUTED
disk_file_name_size = disk_name_size;
}
/* Create mount point base */
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (mount_point == NULL) {
129bf8: bb 1a 00 00 00 mov $0x1a,%ebx <== NOT EXECUTED
129bfd: eb db jmp 129bda <rtems_bdpart_unmount+0xfa><== NOT EXECUTED
129bff: 90 nop <== NOT EXECUTED
size_t disk_name_size = strlen( disk_name);
size_t mount_base_size = strlen( mount_base);
size_t i = 0;
/* Get disk file name */
if (disk_file_name != NULL) {
129c00: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
129c03: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
129c06: e9 2c ff ff ff jmp 129b37 <rtems_bdpart_unmount+0x57><== NOT EXECUTED
0010c7d4 <rtems_bdpart_unregister>:
rtems_status_code rtems_bdpart_unregister(
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count
)
{
10c7d4: 55 push %ebp <== NOT EXECUTED
10c7d5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10c7d7: 57 push %edi <== NOT EXECUTED
10c7d8: 56 push %esi <== NOT EXECUTED
10c7d9: 53 push %ebx <== NOT EXECUTED
10c7da: 83 ec 40 sub $0x40,%esp <== NOT EXECUTED
10c7dd: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
10c7e0: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
dev_t disk = 0;
10c7e7: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
10c7ee: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
dev_t logical_disk = 0;
size_t i = 0;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
10c7f5: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10c7f8: 50 push %eax <== NOT EXECUTED
10c7f9: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
10c7fc: 50 push %eax <== NOT EXECUTED
10c7fd: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
10c800: e8 33 d6 01 00 call 129e38 <rtems_bdpart_get_disk_data><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
10c805: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c808: 85 c0 test %eax,%eax <== NOT EXECUTED
10c80a: 75 38 jne 10c844 <rtems_bdpart_unregister+0x70><== NOT EXECUTED
return temp.__overlay.major;
10c80c: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED
10c80f: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
10c812: 8b 5d dc mov -0x24(%ebp),%ebx <== NOT EXECUTED
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
10c815: 85 ff test %edi,%edi <== NOT EXECUTED
10c817: 74 2b je 10c844 <rtems_bdpart_unregister+0x70><== NOT EXECUTED
10c819: 31 f6 xor %esi,%esi <== NOT EXECUTED
10c81b: eb 08 jmp 10c825 <rtems_bdpart_unregister+0x51><== NOT EXECUTED
10c81d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10c820: 46 inc %esi <== NOT EXECUTED
10c821: 39 f7 cmp %esi,%edi <== NOT EXECUTED
10c823: 76 1f jbe 10c844 <rtems_bdpart_unregister+0x70><== NOT EXECUTED
/* New minor number */
++minor;
10c825: 43 inc %ebx <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
10c826: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
10c829: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
temp.__overlay.minor = _minor;
10c82c: 89 5d d4 mov %ebx,-0x2c(%ebp) <== NOT EXECUTED
/* Get the device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Delete logical disk */
sc = rtems_disk_delete( logical_disk);
10c82f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10c832: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
10c835: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
10c838: e8 9f 0c 00 00 call 10d4dc <rtems_disk_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
10c83d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c840: 85 c0 test %eax,%eax <== NOT EXECUTED
10c842: 74 dc je 10c820 <rtems_bdpart_unregister+0x4c><== NOT EXECUTED
return sc;
}
}
return RTEMS_SUCCESSFUL;
}
10c844: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10c847: 5b pop %ebx <== NOT EXECUTED
10c848: 5e pop %esi <== NOT EXECUTED
10c849: 5f pop %edi <== NOT EXECUTED
10c84a: c9 leave <== NOT EXECUTED
10c84b: c3 ret <== NOT EXECUTED
0012a354 <rtems_bdpart_write>:
const char *disk_name,
const rtems_bdpart_format *format,
const rtems_bdpart_partition *pt,
size_t count
)
{
12a354: 55 push %ebp <== NOT EXECUTED
12a355: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12a357: 57 push %edi <== NOT EXECUTED
12a358: 56 push %esi <== NOT EXECUTED
12a359: 53 push %ebx <== NOT EXECUTED
12a35a: 83 ec 5c sub $0x5c,%esp <== NOT EXECUTED
12a35d: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
12a360: 85 db test %ebx,%ebx <== NOT EXECUTED
12a362: 74 0a je 12a36e <rtems_bdpart_write+0x1a><== NOT EXECUTED
&& format->type == RTEMS_BDPART_FORMAT_MBR
12a364: 8b 3b mov (%ebx),%edi <== NOT EXECUTED
12a366: 85 ff test %edi,%edi <== NOT EXECUTED
12a368: 0f 84 96 01 00 00 je 12a504 <rtems_bdpart_write+0x1b0><== NOT EXECUTED
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
12a36e: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
rtems_blkdev_bnum disk_end = 0;
12a375: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
12a37c: c6 45 bc 00 movb $0x0,-0x44(%ebp) <== NOT EXECUTED
12a380: c7 45 c0 01 00 00 00 movl $0x1,-0x40(%ebp) <== NOT EXECUTED
size_t ppc = 0; /* Primary partition count */
size_t i = 0;
uint8_t *data = NULL;
/* Check if we have something to do */
if (count == 0) {
12a387: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED
12a38a: 85 f6 test %esi,%esi <== NOT EXECUTED
12a38c: 0f 84 a0 01 00 00 je 12a532 <rtems_bdpart_write+0x1de><== NOT EXECUTED
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL) {
12a392: 85 db test %ebx,%ebx <== NOT EXECUTED
12a394: 0f 84 b6 01 00 00 je 12a550 <rtems_bdpart_write+0x1fc><== NOT EXECUTED
12a39a: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
12a39d: 85 c9 test %ecx,%ecx <== NOT EXECUTED
12a39f: 0f 84 ab 01 00 00 je 12a550 <rtems_bdpart_write+0x1fc><== NOT EXECUTED
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
rtems_blkdev_bnum disk_end = 0;
rtems_blkdev_bnum record_space =
dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
dev_t disk = 0;
12a3a5: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
12a3ac: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
if (format == NULL || pt == NULL) {
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
12a3b3: 52 push %edx <== NOT EXECUTED
12a3b4: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
12a3b7: 50 push %eax <== NOT EXECUTED
12a3b8: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED
12a3bb: 50 push %eax <== NOT EXECUTED
12a3bc: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12a3bf: e8 74 fa ff ff call 129e38 <rtems_bdpart_get_disk_data><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
12a3c4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12a3c7: 85 c0 test %eax,%eax <== NOT EXECUTED
12a3c9: 0f 85 65 01 00 00 jne 12a534 <rtems_bdpart_write+0x1e0><== NOT EXECUTED
return sc;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
12a3cf: 80 7d bc 00 cmpb $0x0,-0x44(%ebp) <== NOT EXECUTED
12a3d3: 0f 85 63 01 00 00 jne 12a53c <rtems_bdpart_write+0x1e8><== NOT EXECUTED
12a3d9: 8b 7d dc mov -0x24(%ebp),%edi <== NOT EXECUTED
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Check that begin and end are proper within the disk */
if (p->begin >= disk_end || p->end > disk_end) {
12a3dc: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
12a3df: 8b 00 mov (%eax),%eax <== NOT EXECUTED
12a3e1: 89 45 b8 mov %eax,-0x48(%ebp) <== NOT EXECUTED
12a3e4: 39 f8 cmp %edi,%eax <== NOT EXECUTED
12a3e6: 0f 83 74 01 00 00 jae 12a560 <rtems_bdpart_write+0x20c><== NOT EXECUTED
12a3ec: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
12a3ef: 8b 42 04 mov 0x4(%edx),%eax <== NOT EXECUTED
12a3f2: 39 f8 cmp %edi,%eax <== NOT EXECUTED
12a3f4: 0f 87 66 01 00 00 ja 12a560 <rtems_bdpart_write+0x20c><== NOT EXECUTED
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that begin and end are valid */
if (p->begin >= p->end) {
12a3fa: 3b 45 b8 cmp -0x48(%ebp),%eax <== NOT EXECUTED
12a3fd: 0f 86 5d 01 00 00 jbe 12a560 <rtems_bdpart_write+0x20c><== NOT EXECUTED
12a403: 89 55 b0 mov %edx,-0x50(%ebp) <== NOT EXECUTED
12a406: 89 d0 mov %edx,%eax <== NOT EXECUTED
12a408: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
12a40a: 89 5d b4 mov %ebx,-0x4c(%ebp) <== NOT EXECUTED
12a40d: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED
12a410: eb 2c jmp 12a43e <rtems_bdpart_write+0xea><== NOT EXECUTED
12a412: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Check that begin and end are proper within the disk */
if (p->begin >= disk_end || p->end > disk_end) {
12a414: 8b 50 30 mov 0x30(%eax),%edx <== NOT EXECUTED
12a417: 39 fa cmp %edi,%edx <== NOT EXECUTED
12a419: 0f 83 41 01 00 00 jae 12a560 <rtems_bdpart_write+0x20c><== NOT EXECUTED
12a41f: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED
12a422: 39 fb cmp %edi,%ebx <== NOT EXECUTED
12a424: 0f 87 36 01 00 00 ja 12a560 <rtems_bdpart_write+0x20c><== NOT EXECUTED
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that begin and end are valid */
if (p->begin >= p->end) {
12a42a: 39 da cmp %ebx,%edx <== NOT EXECUTED
12a42c: 0f 83 2e 01 00 00 jae 12a560 <rtems_bdpart_write+0x20c><== NOT EXECUTED
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that partitions do not overlap */
if (i > 0 && pt [i - 1].end > p->begin) {
12a432: 3b 50 04 cmp 0x4(%eax),%edx <== NOT EXECUTED
12a435: 0f 82 25 01 00 00 jb 12a560 <rtems_bdpart_write+0x20c><== NOT EXECUTED
12a43b: 83 c0 30 add $0x30,%eax <== NOT EXECUTED
if (dos_compatibility) {
disk_end -= (disk_end % record_space);
}
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
12a43e: 41 inc %ecx <== NOT EXECUTED
12a43f: 39 ce cmp %ecx,%esi <== NOT EXECUTED
12a441: 77 d1 ja 12a414 <rtems_bdpart_write+0xc0><== NOT EXECUTED
12a443: 8b 5d b4 mov -0x4c(%ebp),%ebx <== NOT EXECUTED
goto cleanup;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
12a446: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
12a448: 85 c0 test %eax,%eax <== NOT EXECUTED
12a44a: 0f 85 38 01 00 00 jne 12a588 <rtems_bdpart_write+0x234><== NOT EXECUTED
* Set primary partition count. If we have more than four partitions we need
* an extended partition which will contain the partitions of number four and
* above as logical partitions. If we have four or less partitions we can
* use the primary partition table.
*/
ppc = count <= 4 ? count : 3;
12a450: 83 7d 14 04 cmpl $0x4,0x14(%ebp) <== NOT EXECUTED
12a454: 0f 87 ea 03 00 00 ja 12a844 <rtems_bdpart_write+0x4f0><== NOT EXECUTED
12a45a: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
12a45d: 89 4d b4 mov %ecx,-0x4c(%ebp) <== NOT EXECUTED
/*
* Check that the first primary partition starts at head one and sector one
* under the virtual one head and 63 sectors geometry if necessary.
*/
if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {
12a460: 80 7d bc 00 cmpb $0x0,-0x44(%ebp) <== NOT EXECUTED
12a464: 74 0a je 12a470 <rtems_bdpart_write+0x11c><== NOT EXECUTED
12a466: 83 7d b8 3f cmpl $0x3f,-0x48(%ebp) <== NOT EXECUTED
12a46a: 0f 85 f0 00 00 00 jne 12a560 <rtems_bdpart_write+0x20c><== NOT EXECUTED
* Each logical partition is described via one EBR preceding the partition.
* The space for the EBR and maybe some space which is needed for DOS
* compatibility resides between the partitions. So there have to be gaps of
* the appropriate size between the partitions.
*/
for (i = ppc; i < count; ++i) {
12a470: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED
12a473: 39 75 b4 cmp %esi,-0x4c(%ebp) <== NOT EXECUTED
12a476: 73 54 jae 12a4cc <rtems_bdpart_write+0x178><== NOT EXECUTED
if ((pt [i].begin - pt [i - 1].end) < record_space) {
12a478: 8b 7d b4 mov -0x4c(%ebp),%edi <== NOT EXECUTED
12a47b: 8d 04 7f lea (%edi,%edi,2),%eax <== NOT EXECUTED
12a47e: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED
12a481: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
12a484: 01 c1 add %eax,%ecx <== NOT EXECUTED
12a486: 8d 54 7f fd lea -0x3(%edi,%edi,2),%edx <== NOT EXECUTED
12a48a: c1 e2 04 shl $0x4,%edx <== NOT EXECUTED
12a48d: 8b 01 mov (%ecx),%eax <== NOT EXECUTED
12a48f: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
12a492: 2b 44 16 04 sub 0x4(%esi,%edx,1),%eax <== NOT EXECUTED
12a496: 39 45 c0 cmp %eax,-0x40(%ebp) <== NOT EXECUTED
12a499: 0f 87 c1 00 00 00 ja 12a560 <rtems_bdpart_write+0x20c><== NOT EXECUTED
12a49f: 8d 54 7f 03 lea 0x3(%edi,%edi,2),%edx <== NOT EXECUTED
12a4a3: c1 e2 04 shl $0x4,%edx <== NOT EXECUTED
12a4a6: 01 f2 add %esi,%edx <== NOT EXECUTED
12a4a8: 83 c1 04 add $0x4,%ecx <== NOT EXECUTED
12a4ab: 89 fe mov %edi,%esi <== NOT EXECUTED
12a4ad: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
12a4b0: eb 15 jmp 12a4c7 <rtems_bdpart_write+0x173><== NOT EXECUTED
12a4b2: 66 90 xchg %ax,%ax <== NOT EXECUTED
12a4b4: 8b 02 mov (%edx),%eax <== NOT EXECUTED
12a4b6: 2b 01 sub (%ecx),%eax <== NOT EXECUTED
12a4b8: 83 c2 30 add $0x30,%edx <== NOT EXECUTED
12a4bb: 83 c1 30 add $0x30,%ecx <== NOT EXECUTED
12a4be: 39 45 c0 cmp %eax,-0x40(%ebp) <== NOT EXECUTED
12a4c1: 0f 87 99 00 00 00 ja 12a560 <rtems_bdpart_write+0x20c><== NOT EXECUTED
* Each logical partition is described via one EBR preceding the partition.
* The space for the EBR and maybe some space which is needed for DOS
* compatibility resides between the partitions. So there have to be gaps of
* the appropriate size between the partitions.
*/
for (i = ppc; i < count; ++i) {
12a4c7: 46 inc %esi <== NOT EXECUTED
12a4c8: 39 f7 cmp %esi,%edi <== NOT EXECUTED
12a4ca: 77 e8 ja 12a4b4 <rtems_bdpart_write+0x160><== NOT EXECUTED
12a4cc: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
12a4cf: 31 ff xor %edi,%edi <== NOT EXECUTED
12a4d1: 89 5d bc mov %ebx,-0x44(%ebp) <== NOT EXECUTED
12a4d4: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED
12a4d7: 90 nop <== NOT EXECUTED
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
uint8_t type = 0;
12a4d8: c6 45 e7 00 movb $0x0,-0x19(%ebp) <== NOT EXECUTED
const rtems_bdpart_partition *p = pt + i;
/* Check type */
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
12a4dc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12a4df: 8d 45 e7 lea -0x19(%ebp),%eax <== NOT EXECUTED
12a4e2: 50 push %eax <== NOT EXECUTED
12a4e3: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED
12a4e6: 50 push %eax <== NOT EXECUTED
12a4e7: e8 cc f9 ff ff call 129eb8 <rtems_bdpart_to_mbr_partition_type><== NOT EXECUTED
12a4ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12a4ef: 84 c0 test %al,%al <== NOT EXECUTED
12a4f1: 74 0a je 12a4fd <rtems_bdpart_write+0x1a9><== NOT EXECUTED
esc = RTEMS_INVALID_ID;
goto cleanup;
}
/* Check flags */
if (p->flags > 0xffU) {
12a4f3: 83 7e 2c 00 cmpl $0x0,0x2c(%esi) <== NOT EXECUTED
12a4f7: 0f 86 93 00 00 00 jbe 12a590 <rtems_bdpart_write+0x23c><== NOT EXECUTED
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
12a4fd: bb 04 00 00 00 mov $0x4,%ebx <== NOT EXECUTED
12a502: eb 61 jmp 12a565 <rtems_bdpart_write+0x211><== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
12a504: 80 7b 08 00 cmpb $0x0,0x8(%ebx) <== NOT EXECUTED
12a508: 0f 84 60 fe ff ff je 12a36e <rtems_bdpart_write+0x1a><== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
12a50e: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
rtems_blkdev_bnum disk_end = 0;
12a515: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
12a51c: c6 45 bc 01 movb $0x1,-0x44(%ebp) <== NOT EXECUTED
12a520: c7 45 c0 3f 00 00 00 movl $0x3f,-0x40(%ebp) <== NOT EXECUTED
size_t ppc = 0; /* Primary partition count */
size_t i = 0;
uint8_t *data = NULL;
/* Check if we have something to do */
if (count == 0) {
12a527: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED
12a52a: 85 f6 test %esi,%esi <== NOT EXECUTED
12a52c: 0f 85 60 fe ff ff jne 12a392 <rtems_bdpart_write+0x3e><== NOT EXECUTED
12a532: 31 c0 xor %eax,%eax <== NOT EXECUTED
if (block != NULL) {
rtems_bdbuf_sync( block);
}
return esc;
}
12a534: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12a537: 5b pop %ebx <== NOT EXECUTED
12a538: 5e pop %esi <== NOT EXECUTED
12a539: 5f pop %edi <== NOT EXECUTED
12a53a: c9 leave <== NOT EXECUTED
12a53b: c3 ret <== NOT EXECUTED
return sc;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
disk_end -= (disk_end % record_space);
12a53c: 8b 7d dc mov -0x24(%ebp),%edi <== NOT EXECUTED
12a53f: 89 f8 mov %edi,%eax <== NOT EXECUTED
12a541: 31 d2 xor %edx,%edx <== NOT EXECUTED
12a543: f7 75 c0 divl -0x40(%ebp) <== NOT EXECUTED
12a546: 29 d7 sub %edx,%edi <== NOT EXECUTED
12a548: 89 7d dc mov %edi,-0x24(%ebp) <== NOT EXECUTED
12a54b: e9 8c fe ff ff jmp 12a3dc <rtems_bdpart_write+0x88><== NOT EXECUTED
}
cleanup:
if (block != NULL) {
rtems_bdbuf_sync( block);
12a550: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
}
return esc;
}
12a555: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12a558: 5b pop %ebx <== NOT EXECUTED
12a559: 5e pop %esi <== NOT EXECUTED
12a55a: 5f pop %edi <== NOT EXECUTED
12a55b: c9 leave <== NOT EXECUTED
12a55c: c3 ret <== NOT EXECUTED
12a55d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
12a560: bb 0a 00 00 00 mov $0xa,%ebx <== NOT EXECUTED
}
}
cleanup:
if (block != NULL) {
12a565: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
12a568: 85 c0 test %eax,%eax <== NOT EXECUTED
12a56a: 74 18 je 12a584 <rtems_bdpart_write+0x230><== NOT EXECUTED
rtems_bdbuf_sync( block);
12a56c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12a56f: 50 push %eax <== NOT EXECUTED
12a570: e8 0b 18 fe ff call 10bd80 <rtems_bdbuf_sync> <== NOT EXECUTED
12a575: 89 d8 mov %ebx,%eax <== NOT EXECUTED
12a577: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return esc;
}
12a57a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12a57d: 5b pop %ebx <== NOT EXECUTED
12a57e: 5e pop %esi <== NOT EXECUTED
12a57f: 5f pop %edi <== NOT EXECUTED
12a580: c9 leave <== NOT EXECUTED
12a581: c3 ret <== NOT EXECUTED
12a582: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
}
cleanup:
if (block != NULL) {
12a584: 89 d8 mov %ebx,%eax <== NOT EXECUTED
12a586: eb ac jmp 12a534 <rtems_bdpart_write+0x1e0><== NOT EXECUTED
goto cleanup;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
12a588: bb 18 00 00 00 mov $0x18,%ebx <== NOT EXECUTED
12a58d: eb d6 jmp 12a565 <rtems_bdpart_write+0x211><== NOT EXECUTED
12a58f: 90 nop <== NOT EXECUTED
esc = RTEMS_INVALID_ID;
goto cleanup;
}
/* Check flags */
if (p->flags > 0xffU) {
12a590: 81 7e 28 ff 00 00 00 cmpl $0xff,0x28(%esi) <== NOT EXECUTED
12a597: 0f 87 60 ff ff ff ja 12a4fd <rtems_bdpart_write+0x1a9><== NOT EXECUTED
goto cleanup;
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
12a59d: 47 inc %edi <== NOT EXECUTED
12a59e: 83 c6 30 add $0x30,%esi <== NOT EXECUTED
12a5a1: 39 fb cmp %edi,%ebx <== NOT EXECUTED
12a5a3: 0f 87 2f ff ff ff ja 12a4d8 <rtems_bdpart_write+0x184><== NOT EXECUTED
12a5a9: 8b 5d bc mov -0x44(%ebp),%ebx <== NOT EXECUTED
/* Check ID */
/* TODO */
}
/* New MBR */
sc = rtems_bdpart_new_record( disk, 0, &block);
12a5ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12a5af: 8d 55 e0 lea -0x20(%ebp),%edx <== NOT EXECUTED
12a5b2: 52 push %edx <== NOT EXECUTED
12a5b3: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
12a5b5: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
12a5b8: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
12a5bb: e8 14 fd ff ff call 12a2d4 <rtems_bdpart_new_record><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
12a5c0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12a5c3: 85 c0 test %eax,%eax <== NOT EXECUTED
12a5c5: 0f 85 85 02 00 00 jne 12a850 <rtems_bdpart_write+0x4fc><== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Write disk ID */
rtems_uint32_to_little_endian(
12a5cb: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
12a5ce: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED
12a5d1: 8d 81 b8 01 00 00 lea 0x1b8(%ecx),%eax <== NOT EXECUTED
12a5d7: 8b 53 04 mov 0x4(%ebx),%edx <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a5da: 88 91 b8 01 00 00 mov %dl,0x1b8(%ecx) <== NOT EXECUTED
value >>= 8;
12a5e0: 89 d1 mov %edx,%ecx <== NOT EXECUTED
12a5e2: c1 e9 08 shr $0x8,%ecx <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a5e5: 88 48 01 mov %cl,0x1(%eax) <== NOT EXECUTED
value >>= 8;
12a5e8: 89 d1 mov %edx,%ecx <== NOT EXECUTED
12a5ea: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a5ed: 88 48 02 mov %cl,0x2(%eax) <== NOT EXECUTED
12a5f0: c1 ea 18 shr $0x18,%edx <== NOT EXECUTED
12a5f3: 88 50 03 mov %dl,0x3(%eax) <== NOT EXECUTED
format->mbr.disk_id,
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
/* Write primary partition table */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
12a5f6: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
12a5f9: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
12a5fc: 05 be 01 00 00 add $0x1be,%eax <== NOT EXECUTED
12a601: 89 45 ac mov %eax,-0x54(%ebp) <== NOT EXECUTED
12a604: 31 ff xor %edi,%edi <== NOT EXECUTED
12a606: 89 7d a4 mov %edi,-0x5c(%ebp) <== NOT EXECUTED
12a609: 8b 4d b0 mov -0x50(%ebp),%ecx <== NOT EXECUTED
rtems_bdpart_write_mbr_partition(
data,
p->begin,
p->end - p->begin,
rtems_bdpart_mbr_partition_type( p->type),
(uint8_t) p->flags
12a60c: 8b 59 28 mov 0x28(%ecx),%ebx <== NOT EXECUTED
12a60f: 89 5d b8 mov %ebx,-0x48(%ebp) <== NOT EXECUTED
static inline uint8_t rtems_bdpart_mbr_partition_type(
const uuid_t type
)
{
return type [0];
12a612: 0f b6 71 08 movzbl 0x8(%ecx),%esi <== NOT EXECUTED
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
for (i = 0; i < ppc; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Write partition entry */
rtems_bdpart_write_mbr_partition(
12a616: 8b 51 04 mov 0x4(%ecx),%edx <== NOT EXECUTED
12a619: 8b 19 mov (%ecx),%ebx <== NOT EXECUTED
12a61b: 89 5d c4 mov %ebx,-0x3c(%ebp) <== NOT EXECUTED
12a61e: 88 58 08 mov %bl,0x8(%eax) <== NOT EXECUTED
value >>= 8;
12a621: 8b 7d c4 mov -0x3c(%ebp),%edi <== NOT EXECUTED
12a624: c1 ef 08 shr $0x8,%edi <== NOT EXECUTED
12a627: 89 7d bc mov %edi,-0x44(%ebp) <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a62a: 8a 5d bc mov -0x44(%ebp),%bl <== NOT EXECUTED
12a62d: 88 58 09 mov %bl,0x9(%eax) <== NOT EXECUTED
value >>= 8;
12a630: 8b 7d c4 mov -0x3c(%ebp),%edi <== NOT EXECUTED
12a633: c1 ef 10 shr $0x10,%edi <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a636: 89 fb mov %edi,%ebx <== NOT EXECUTED
12a638: 88 58 0a mov %bl,0xa(%eax) <== NOT EXECUTED
12a63b: 8b 7d c4 mov -0x3c(%ebp),%edi <== NOT EXECUTED
12a63e: c1 ef 18 shr $0x18,%edi <== NOT EXECUTED
12a641: 89 fb mov %edi,%ebx <== NOT EXECUTED
12a643: 88 58 0b mov %bl,0xb(%eax) <== NOT EXECUTED
12a646: 2b 55 c4 sub -0x3c(%ebp),%edx <== NOT EXECUTED
12a649: 88 50 0c mov %dl,0xc(%eax) <== NOT EXECUTED
value >>= 8;
12a64c: 89 d3 mov %edx,%ebx <== NOT EXECUTED
12a64e: c1 eb 08 shr $0x8,%ebx <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a651: 88 58 0d mov %bl,0xd(%eax) <== NOT EXECUTED
value >>= 8;
12a654: 89 d3 mov %edx,%ebx <== NOT EXECUTED
12a656: c1 eb 10 shr $0x10,%ebx <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a659: 88 58 0e mov %bl,0xe(%eax) <== NOT EXECUTED
12a65c: c1 ea 18 shr $0x18,%edx <== NOT EXECUTED
12a65f: 88 50 0f mov %dl,0xf(%eax) <== NOT EXECUTED
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
12a662: 89 f2 mov %esi,%edx <== NOT EXECUTED
12a664: 88 50 04 mov %dl,0x4(%eax) <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
12a667: 8a 5d b8 mov -0x48(%ebp),%bl <== NOT EXECUTED
12a66a: 88 18 mov %bl,(%eax) <== NOT EXECUTED
p->end - p->begin,
rtems_bdpart_mbr_partition_type( p->type),
(uint8_t) p->flags
);
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
12a66c: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
/* Write primary partition table */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
for (i = 0; i < ppc; ++i) {
12a66f: ff 45 a4 incl -0x5c(%ebp) <== NOT EXECUTED
12a672: 83 c1 30 add $0x30,%ecx <== NOT EXECUTED
12a675: 8b 75 a4 mov -0x5c(%ebp),%esi <== NOT EXECUTED
12a678: 39 75 b4 cmp %esi,-0x4c(%ebp) <== NOT EXECUTED
12a67b: 77 8f ja 12a60c <rtems_bdpart_write+0x2b8><== NOT EXECUTED
12a67d: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
12a680: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED
12a683: 03 45 ac add -0x54(%ebp),%eax <== NOT EXECUTED
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
}
/* Write extended partition with logical partitions if necessary */
if (ppc != count) {
12a686: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
12a689: 39 7d b4 cmp %edi,-0x4c(%ebp) <== NOT EXECUTED
12a68c: 0f 84 c5 01 00 00 je 12a857 <rtems_bdpart_write+0x503><== NOT EXECUTED
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
/* Begin of extended partition */
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
12a692: 6b 5d b4 30 imul $0x30,-0x4c(%ebp),%ebx <== NOT EXECUTED
12a696: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
12a699: 8d 3c 13 lea (%ebx,%edx,1),%edi <== NOT EXECUTED
12a69c: 8b 0f mov (%edi),%ecx <== NOT EXECUTED
12a69e: 8b 5d c0 mov -0x40(%ebp),%ebx <== NOT EXECUTED
12a6a1: 29 d9 sub %ebx,%ecx <== NOT EXECUTED
12a6a3: 89 4d b8 mov %ecx,-0x48(%ebp) <== NOT EXECUTED
/* Write extended partition */
rtems_bdpart_write_mbr_partition(
12a6a6: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
uint32_t size,
uint8_t type,
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
12a6a9: 8d 48 08 lea 0x8(%eax),%ecx <== NOT EXECUTED
12a6ac: 8a 5d b8 mov -0x48(%ebp),%bl <== NOT EXECUTED
12a6af: 88 58 08 mov %bl,0x8(%eax) <== NOT EXECUTED
value >>= 8;
12a6b2: 8b 75 b8 mov -0x48(%ebp),%esi <== NOT EXECUTED
12a6b5: c1 ee 08 shr $0x8,%esi <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a6b8: 89 f3 mov %esi,%ebx <== NOT EXECUTED
12a6ba: 88 59 01 mov %bl,0x1(%ecx) <== NOT EXECUTED
value >>= 8;
12a6bd: 8b 75 b8 mov -0x48(%ebp),%esi <== NOT EXECUTED
12a6c0: c1 ee 10 shr $0x10,%esi <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a6c3: 89 f3 mov %esi,%ebx <== NOT EXECUTED
12a6c5: 88 59 02 mov %bl,0x2(%ecx) <== NOT EXECUTED
12a6c8: 8b 75 b8 mov -0x48(%ebp),%esi <== NOT EXECUTED
12a6cb: c1 ee 18 shr $0x18,%esi <== NOT EXECUTED
12a6ce: 89 f3 mov %esi,%ebx <== NOT EXECUTED
12a6d0: 88 59 03 mov %bl,0x3(%ecx) <== NOT EXECUTED
/* Begin of extended partition */
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
/* Write extended partition */
rtems_bdpart_write_mbr_partition(
12a6d3: 2b 55 b8 sub -0x48(%ebp),%edx <== NOT EXECUTED
uint8_t type,
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
12a6d6: 8d 48 0c lea 0xc(%eax),%ecx <== NOT EXECUTED
12a6d9: 88 50 0c mov %dl,0xc(%eax) <== NOT EXECUTED
value >>= 8;
12a6dc: 89 d6 mov %edx,%esi <== NOT EXECUTED
12a6de: c1 ee 08 shr $0x8,%esi <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a6e1: 89 f3 mov %esi,%ebx <== NOT EXECUTED
12a6e3: 88 59 01 mov %bl,0x1(%ecx) <== NOT EXECUTED
value >>= 8;
12a6e6: 89 d6 mov %edx,%esi <== NOT EXECUTED
12a6e8: c1 ee 10 shr $0x10,%esi <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a6eb: 89 f3 mov %esi,%ebx <== NOT EXECUTED
12a6ed: 88 59 02 mov %bl,0x2(%ecx) <== NOT EXECUTED
12a6f0: c1 ea 18 shr $0x18,%edx <== NOT EXECUTED
12a6f3: 88 51 03 mov %dl,0x3(%ecx) <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
12a6f6: c6 40 04 05 movb $0x5,0x4(%eax) <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
12a6fa: c6 00 00 movb $0x0,(%eax) <== NOT EXECUTED
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
12a6fd: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED
12a700: 39 75 b4 cmp %esi,-0x4c(%ebp) <== NOT EXECUTED
12a703: 0f 83 4e 01 00 00 jae 12a857 <rtems_bdpart_write+0x503><== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
rtems_blkdev_bnum disk_end = 0;
12a709: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
12a70c: 40 inc %eax <== NOT EXECUTED
12a70d: 6b c0 30 imul $0x30,%eax,%eax <== NOT EXECUTED
12a710: 03 45 10 add 0x10(%ebp),%eax <== NOT EXECUTED
12a713: 89 45 bc mov %eax,-0x44(%ebp) <== NOT EXECUTED
12a716: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
12a719: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED
12a71c: 89 fb mov %edi,%ebx <== NOT EXECUTED
);
}
/* New EBR */
ebr = p->begin - record_space;
sc = rtems_bdpart_new_record( disk, ebr, &block);
12a71e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12a721: 8b 0b mov (%ebx),%ecx <== NOT EXECUTED
12a723: 2b 4d c0 sub -0x40(%ebp),%ecx <== NOT EXECUTED
12a726: 8d 75 e0 lea -0x20(%ebp),%esi <== NOT EXECUTED
12a729: 56 push %esi <== NOT EXECUTED
12a72a: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
12a72d: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
12a730: e8 9f fb ff ff call 12a2d4 <rtems_bdpart_new_record><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
12a735: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12a738: 85 c0 test %eax,%eax <== NOT EXECUTED
12a73a: 0f 85 10 01 00 00 jne 12a850 <rtems_bdpart_write+0x4fc><== NOT EXECUTED
rtems_bdpart_write_mbr_partition(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
record_space,
p->end - p->begin,
rtems_bdpart_mbr_partition_type( p->type),
(uint8_t) p->flags
12a740: 8b 73 28 mov 0x28(%ebx),%esi <== NOT EXECUTED
12a743: 0f b6 7b 08 movzbl 0x8(%ebx),%edi <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
12a747: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED
12a74a: 89 45 ac mov %eax,-0x54(%ebp) <== NOT EXECUTED
12a74d: 8b 1b mov (%ebx),%ebx <== NOT EXECUTED
12a74f: 89 5d b0 mov %ebx,-0x50(%ebp) <== NOT EXECUTED
12a752: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
12a755: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED
12a758: 8d 99 be 01 00 00 lea 0x1be(%ecx),%ebx <== NOT EXECUTED
12a75e: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
12a761: 31 c0 xor %eax,%eax <== NOT EXECUTED
12a763: 88 94 01 c6 01 00 00 mov %dl,0x1c6(%ecx,%eax,1) <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
12a76a: 40 inc %eax <== NOT EXECUTED
12a76b: 31 d2 xor %edx,%edx <== NOT EXECUTED
12a76d: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
12a770: 75 f1 jne 12a763 <rtems_bdpart_write+0x40f><== NOT EXECUTED
12a772: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED
12a775: 2b 55 b0 sub -0x50(%ebp),%edx <== NOT EXECUTED
12a778: 89 55 ac mov %edx,-0x54(%ebp) <== NOT EXECUTED
uint8_t type,
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
12a77b: 8d 53 0c lea 0xc(%ebx),%edx <== NOT EXECUTED
data [i] = (uint8_t) value;
12a77e: 8a 45 ac mov -0x54(%ebp),%al <== NOT EXECUTED
12a781: 88 43 0c mov %al,0xc(%ebx) <== NOT EXECUTED
value >>= 8;
12a784: 8b 45 ac mov -0x54(%ebp),%eax <== NOT EXECUTED
12a787: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a78a: 88 42 01 mov %al,0x1(%edx) <== NOT EXECUTED
value >>= 8;
12a78d: 8b 45 ac mov -0x54(%ebp),%eax <== NOT EXECUTED
12a790: c1 e8 10 shr $0x10,%eax <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a793: 88 42 02 mov %al,0x2(%edx) <== NOT EXECUTED
12a796: 8b 45 ac mov -0x54(%ebp),%eax <== NOT EXECUTED
12a799: c1 e8 18 shr $0x18,%eax <== NOT EXECUTED
12a79c: 88 42 03 mov %al,0x3(%edx) <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
12a79f: 89 fa mov %edi,%edx <== NOT EXECUTED
12a7a1: 88 53 04 mov %dl,0x4(%ebx) <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
12a7a4: 89 f3 mov %esi,%ebx <== NOT EXECUTED
12a7a6: 88 99 be 01 00 00 mov %bl,0x1be(%ecx) <== NOT EXECUTED
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
12a7ac: ff 45 c4 incl -0x3c(%ebp) <== NOT EXECUTED
12a7af: 8b 75 c4 mov -0x3c(%ebp),%esi <== NOT EXECUTED
12a7b2: 39 75 14 cmp %esi,0x14(%ebp) <== NOT EXECUTED
12a7b5: 0f 86 9c 00 00 00 jbe 12a857 <rtems_bdpart_write+0x503><== NOT EXECUTED
12a7bb: 8b 5d bc mov -0x44(%ebp),%ebx <== NOT EXECUTED
const rtems_bdpart_partition *p = pt + i;
/* Write second partition entry */
if (i > ppc) {
12a7be: 8b 7d c4 mov -0x3c(%ebp),%edi <== NOT EXECUTED
12a7c1: 39 7d b4 cmp %edi,-0x4c(%ebp) <== NOT EXECUTED
12a7c4: 73 75 jae 12a83b <rtems_bdpart_write+0x4e7><== NOT EXECUTED
rtems_blkdev_bnum begin = p->begin - record_space;
12a7c6: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
12a7c8: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
12a7cb: 29 d0 sub %edx,%eax <== NOT EXECUTED
12a7cd: 89 45 ac mov %eax,-0x54(%ebp) <== NOT EXECUTED
rtems_bdpart_write_mbr_partition(
12a7d0: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
12a7d3: 89 c6 mov %eax,%esi <== NOT EXECUTED
12a7d5: 2b 75 b8 sub -0x48(%ebp),%esi <== NOT EXECUTED
12a7d8: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
12a7db: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
uint32_t size,
uint8_t type,
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
12a7de: 8d b8 d6 01 00 00 lea 0x1d6(%eax),%edi <== NOT EXECUTED
12a7e4: 89 f1 mov %esi,%ecx <== NOT EXECUTED
12a7e6: 88 88 d6 01 00 00 mov %cl,0x1d6(%eax) <== NOT EXECUTED
value >>= 8;
12a7ec: 89 f1 mov %esi,%ecx <== NOT EXECUTED
12a7ee: c1 e9 08 shr $0x8,%ecx <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a7f1: 88 4f 01 mov %cl,0x1(%edi) <== NOT EXECUTED
value >>= 8;
12a7f4: 89 f1 mov %esi,%ecx <== NOT EXECUTED
12a7f6: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a7f9: 88 4f 02 mov %cl,0x2(%edi) <== NOT EXECUTED
12a7fc: c1 ee 18 shr $0x18,%esi <== NOT EXECUTED
12a7ff: 89 f1 mov %esi,%ecx <== NOT EXECUTED
12a801: 88 4f 03 mov %cl,0x3(%edi) <== NOT EXECUTED
/* Write second partition entry */
if (i > ppc) {
rtems_blkdev_bnum begin = p->begin - record_space;
rtems_bdpart_write_mbr_partition(
12a804: 2b 55 ac sub -0x54(%ebp),%edx <== NOT EXECUTED
uint8_t type,
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
12a807: 8d b8 da 01 00 00 lea 0x1da(%eax),%edi <== NOT EXECUTED
12a80d: 88 90 da 01 00 00 mov %dl,0x1da(%eax) <== NOT EXECUTED
value >>= 8;
12a813: 89 d6 mov %edx,%esi <== NOT EXECUTED
12a815: c1 ee 08 shr $0x8,%esi <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a818: 89 f1 mov %esi,%ecx <== NOT EXECUTED
12a81a: 88 4f 01 mov %cl,0x1(%edi) <== NOT EXECUTED
value >>= 8;
12a81d: 89 d6 mov %edx,%esi <== NOT EXECUTED
12a81f: c1 ee 10 shr $0x10,%esi <== NOT EXECUTED
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
12a822: 89 f1 mov %esi,%ecx <== NOT EXECUTED
12a824: 88 4f 02 mov %cl,0x2(%edi) <== NOT EXECUTED
12a827: c1 ea 18 shr $0x18,%edx <== NOT EXECUTED
12a82a: 88 57 03 mov %dl,0x3(%edi) <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
12a82d: c6 80 d2 01 00 00 05 movb $0x5,0x1d2(%eax) <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
12a834: c6 80 ce 01 00 00 00 movb $0x0,0x1ce(%eax) <== NOT EXECUTED
12a83b: 83 45 bc 30 addl $0x30,-0x44(%ebp) <== NOT EXECUTED
12a83f: e9 da fe ff ff jmp 12a71e <rtems_bdpart_write+0x3ca><== NOT EXECUTED
* Set primary partition count. If we have more than four partitions we need
* an extended partition which will contain the partitions of number four and
* above as logical partitions. If we have four or less partitions we can
* use the primary partition table.
*/
ppc = count <= 4 ? count : 3;
12a844: c7 45 b4 03 00 00 00 movl $0x3,-0x4c(%ebp) <== NOT EXECUTED
12a84b: e9 10 fc ff ff jmp 12a460 <rtems_bdpart_write+0x10c><== NOT EXECUTED
}
/* New EBR */
ebr = p->begin - record_space;
sc = rtems_bdpart_new_record( disk, ebr, &block);
if (sc != RTEMS_SUCCESSFUL) {
12a850: 89 c3 mov %eax,%ebx <== NOT EXECUTED
12a852: e9 0e fd ff ff jmp 12a565 <rtems_bdpart_write+0x211><== NOT EXECUTED
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
12a857: 31 db xor %ebx,%ebx <== NOT EXECUTED
12a859: e9 07 fd ff ff jmp 12a565 <rtems_bdpart_write+0x211><== NOT EXECUTED
00112b04 <rtems_blkdev_generic_ioctl>:
rtems_device_driver
rtems_blkdev_generic_ioctl(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
112b04: 55 push %ebp
112b05: 89 e5 mov %esp,%ebp
112b07: 53 push %ebx
112b08: 83 ec 04 sub $0x4,%esp
112b0b: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
112b0e: 8b 03 mov (%ebx),%eax
112b10: 8b 50 34 mov 0x34(%eax),%edx
int rc;
switch (args->command)
112b13: 8b 43 04 mov 0x4(%ebx),%eax
112b16: 3d 03 42 04 40 cmp $0x40044203,%eax
112b1b: 0f 84 b7 00 00 00 je 112bd8 <rtems_blkdev_generic_ioctl+0xd4><== NEVER TAKEN
112b21: 76 2d jbe 112b50 <rtems_blkdev_generic_ioctl+0x4c><== NEVER TAKEN
112b23: 3d 04 42 04 80 cmp $0x80044204,%eax
112b28: 74 5a je 112b84 <rtems_blkdev_generic_ioctl+0x80><== ALWAYS TAKEN
112b2a: 3d 01 42 18 c0 cmp $0xc0184201,%eax <== NOT EXECUTED
112b2f: 74 43 je 112b74 <rtems_blkdev_generic_ioctl+0x70><== NOT EXECUTED
112b31: 3d 05 42 04 40 cmp $0x40044205,%eax <== NOT EXECUTED
112b36: 74 64 je 112b9c <rtems_blkdev_generic_ioctl+0x98><== NOT EXECUTED
*/
args->ioctl_return = (uint32_t) -1;
break;
default:
args->ioctl_return = (uint32_t) dd->ioctl(dd->phys_dev,
112b38: 51 push %ecx <== NOT EXECUTED
112b39: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
112b3c: 50 push %eax <== NOT EXECUTED
112b3d: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED
112b40: ff 52 28 call *0x28(%edx) <== NOT EXECUTED
112b43: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
112b46: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
112b49: 31 c0 xor %eax,%eax <== NOT EXECUTED
112b4b: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
112b4e: c9 leave <== NOT EXECUTED
112b4f: c3 ret <== NOT EXECUTED
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
int rc;
switch (args->command)
112b50: 3d 06 42 00 20 cmp $0x20004206,%eax <== NOT EXECUTED
112b55: 74 5d je 112bb4 <rtems_blkdev_generic_ioctl+0xb0><== NOT EXECUTED
112b57: 3d 02 42 04 40 cmp $0x40044202,%eax <== NOT EXECUTED
112b5c: 75 da jne 112b38 <rtems_blkdev_generic_ioctl+0x34><== NOT EXECUTED
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*((uint32_t *) args->buffer) = dd->media_block_size;
112b5e: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
112b61: 8b 52 24 mov 0x24(%edx),%edx <== NOT EXECUTED
112b64: 89 10 mov %edx,(%eax) <== NOT EXECUTED
args->ioctl_return = 0;
112b66: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
112b6d: 31 c0 xor %eax,%eax <== NOT EXECUTED
112b6f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
112b72: c9 leave <== NOT EXECUTED
112b73: c3 ret <== NOT EXECUTED
case RTEMS_BLKIO_REQUEST:
/*
* It is not allowed to directly access the driver circumventing
* the cache.
*/
args->ioctl_return = (uint32_t) -1;
112b74: c7 43 0c ff ff ff ff movl $0xffffffff,0xc(%ebx) <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
112b7b: 31 c0 xor %eax,%eax <== NOT EXECUTED
112b7d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
112b80: c9 leave <== NOT EXECUTED
112b81: c3 ret <== NOT EXECUTED
112b82: 66 90 xchg %ax,%ax <== NOT EXECUTED
*((uint32_t *) args->buffer) = dd->block_size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *((uint32_t *) args->buffer);
112b84: 8b 43 08 mov 0x8(%ebx),%eax
112b87: 8b 00 mov (%eax),%eax
112b89: 89 42 20 mov %eax,0x20(%edx)
args->ioctl_return = 0;
112b8c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
112b93: 31 c0 xor %eax,%eax
112b95: 8b 5d fc mov -0x4(%ebp),%ebx
112b98: c9 leave
112b99: c3 ret
112b9a: 66 90 xchg %ax,%ax
dd->block_size = *((uint32_t *) args->buffer);
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_GETSIZE:
*((rtems_blkdev_bnum *) args->buffer) = dd->size;
112b9c: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
112b9f: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED
112ba2: 89 10 mov %edx,(%eax) <== NOT EXECUTED
args->ioctl_return = 0;
112ba4: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
112bab: 31 c0 xor %eax,%eax <== NOT EXECUTED
112bad: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
112bb0: c9 leave <== NOT EXECUTED
112bb1: c3 ret <== NOT EXECUTED
112bb2: 66 90 xchg %ax,%ax <== NOT EXECUTED
*((rtems_blkdev_bnum *) args->buffer) = dd->size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_SYNCDEV:
rc = rtems_bdbuf_syncdev(dd->dev);
112bb4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
112bb7: ff 72 04 pushl 0x4(%edx) <== NOT EXECUTED
112bba: ff 32 pushl (%edx) <== NOT EXECUTED
112bbc: e8 57 e1 ff ff call 110d18 <rtems_bdbuf_syncdev> <== NOT EXECUTED
args->ioctl_return = (uint32_t) (rc == RTEMS_SUCCESSFUL ? 0 : -1);
112bc1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112bc4: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
112bc7: 19 c0 sbb %eax,%eax <== NOT EXECUTED
112bc9: f7 d0 not %eax <== NOT EXECUTED
112bcb: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
112bce: 31 c0 xor %eax,%eax <== NOT EXECUTED
112bd0: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
112bd3: c9 leave <== NOT EXECUTED
112bd4: c3 ret <== NOT EXECUTED
112bd5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*((uint32_t *) args->buffer) = dd->media_block_size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_GETBLKSIZE:
*((uint32_t *) args->buffer) = dd->block_size;
112bd8: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
112bdb: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
112bde: 89 10 mov %edx,(%eax) <== NOT EXECUTED
args->ioctl_return = 0;
112be0: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
112be7: 31 c0 xor %eax,%eax <== NOT EXECUTED
112be9: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
112bec: c9 leave <== NOT EXECUTED
112bed: c3 ret <== NOT EXECUTED
00112d38 <rtems_blkdev_generic_read>:
rtems_device_driver
rtems_blkdev_generic_read(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
112d38: 55 push %ebp <== NOT EXECUTED
112d39: 89 e5 mov %esp,%ebp <== NOT EXECUTED
112d3b: 57 push %edi <== NOT EXECUTED
112d3c: 56 push %esi <== NOT EXECUTED
112d3d: 53 push %ebx <== NOT EXECUTED
112d3e: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
112d41: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
112d44: 8b 02 mov (%edx),%eax <== NOT EXECUTED
112d46: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
uint32_t block_size = dd->block_size;
112d49: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED
112d4c: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED
char *buf = args->buffer;
112d4f: 8b 52 0c mov 0xc(%edx),%edx <== NOT EXECUTED
112d52: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
uint32_t count = args->count;
112d55: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
112d58: 8b 49 10 mov 0x10(%ecx),%ecx <== NOT EXECUTED
112d5b: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
112d5e: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
112d61: 8b 51 04 mov 0x4(%ecx),%edx <== NOT EXECUTED
112d64: 8b 49 08 mov 0x8(%ecx),%ecx <== NOT EXECUTED
112d67: 89 55 b8 mov %edx,-0x48(%ebp) <== NOT EXECUTED
112d6a: 89 4d bc mov %ecx,-0x44(%ebp) <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
112d6d: 8b 10 mov (%eax),%edx <== NOT EXECUTED
112d6f: 8b 48 04 mov 0x4(%eax),%ecx <== NOT EXECUTED
112d72: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED
112d75: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED
args->bytes_moved = 0;
112d78: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
112d7b: c7 41 18 00 00 00 00 movl $0x0,0x18(%ecx) <== NOT EXECUTED
while (count > 0)
112d82: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED
112d85: 85 f6 test %esi,%esi <== NOT EXECUTED
112d87: 0f 84 8f 00 00 00 je 112e1c <rtems_blkdev_generic_read+0xe4><== NOT EXECUTED
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
112d8d: 8b 5d c8 mov -0x38(%ebp),%ebx <== NOT EXECUTED
112d90: 31 f6 xor %esi,%esi <== NOT EXECUTED
112d92: 56 push %esi <== NOT EXECUTED
112d93: 53 push %ebx <== NOT EXECUTED
112d94: ff 75 bc pushl -0x44(%ebp) <== NOT EXECUTED
112d97: ff 75 b8 pushl -0x48(%ebp) <== NOT EXECUTED
112d9a: e8 fd 0e 01 00 call 123c9c <__divdi3> <== NOT EXECUTED
112d9f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112da2: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
112da5: 56 push %esi <== NOT EXECUTED
112da6: 53 push %ebx <== NOT EXECUTED
112da7: ff 75 bc pushl -0x44(%ebp) <== NOT EXECUTED
112daa: ff 75 b8 pushl -0x48(%ebp) <== NOT EXECUTED
112dad: e8 3a 10 01 00 call 123dec <__moddi3> <== NOT EXECUTED
112db2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112db5: 89 c6 mov %eax,%esi <== NOT EXECUTED
112db7: eb 42 jmp 112dfb <rtems_blkdev_generic_read+0xc3><== NOT EXECUTED
112db9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
112dbc: 8b 5d c8 mov -0x38(%ebp),%ebx <== NOT EXECUTED
112dbf: 29 f3 sub %esi,%ebx <== NOT EXECUTED
112dc1: 3b 5d d4 cmp -0x2c(%ebp),%ebx <== NOT EXECUTED
112dc4: 76 03 jbe 112dc9 <rtems_blkdev_generic_read+0x91><== NOT EXECUTED
112dc6: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
112dc9: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
112dcc: 03 70 20 add 0x20(%eax),%esi <== NOT EXECUTED
112dcf: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED
112dd2: 89 d9 mov %ebx,%ecx <== NOT EXECUTED
112dd4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
rc = rtems_bdbuf_release(diskbuf);
112dd6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112dd9: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
112ddc: e8 57 e9 ff ff call 111738 <rtems_bdbuf_release> <== NOT EXECUTED
args->bytes_moved += copy;
112de1: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
112de4: 01 5a 18 add %ebx,0x18(%edx) <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
112de7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112dea: 85 c0 test %eax,%eax <== NOT EXECUTED
112dec: 75 26 jne 112e14 <rtems_blkdev_generic_read+0xdc><== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
112dee: 29 5d d4 sub %ebx,-0x2c(%ebp) <== NOT EXECUTED
112df1: 74 21 je 112e14 <rtems_blkdev_generic_read+0xdc><== NOT EXECUTED
rc = rtems_bdbuf_release(diskbuf);
args->bytes_moved += copy;
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
112df3: 89 7d d0 mov %edi,-0x30(%ebp) <== NOT EXECUTED
blkofs = 0;
block++;
112df6: ff 45 cc incl -0x34(%ebp) <== NOT EXECUTED
112df9: 31 f6 xor %esi,%esi <== NOT EXECUTED
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
112dfb: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
112dfe: 50 push %eax <== NOT EXECUTED
112dff: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
112e02: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
112e05: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED
112e08: e8 a7 f9 ff ff call 1127b4 <rtems_bdbuf_read> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
112e0d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112e10: 85 c0 test %eax,%eax <== NOT EXECUTED
112e12: 74 a8 je 112dbc <rtems_blkdev_generic_read+0x84><== NOT EXECUTED
blkofs = 0;
block++;
}
return rc;
}
112e14: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112e17: 5b pop %ebx <== NOT EXECUTED
112e18: 5e pop %esi <== NOT EXECUTED
112e19: 5f pop %edi <== NOT EXECUTED
112e1a: c9 leave <== NOT EXECUTED
112e1b: c3 ret <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
blkofs = 0;
block++;
112e1c: 31 c0 xor %eax,%eax <== NOT EXECUTED
112e1e: eb f4 jmp 112e14 <rtems_blkdev_generic_read+0xdc><== NOT EXECUTED
00112c34 <rtems_blkdev_generic_write>:
rtems_device_driver
rtems_blkdev_generic_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
112c34: 55 push %ebp <== NOT EXECUTED
112c35: 89 e5 mov %esp,%ebp <== NOT EXECUTED
112c37: 57 push %edi <== NOT EXECUTED
112c38: 56 push %esi <== NOT EXECUTED
112c39: 53 push %ebx <== NOT EXECUTED
112c3a: 83 ec 4c sub $0x4c,%esp <== NOT EXECUTED
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
112c3d: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
112c40: 8b 02 mov (%edx),%eax <== NOT EXECUTED
112c42: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
uint32_t block_size = dd->block_size;
112c45: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED
112c48: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED
char *buf = args->buffer;
112c4b: 8b 72 0c mov 0xc(%edx),%esi <== NOT EXECUTED
uint32_t count = args->count;
112c4e: 8b 52 10 mov 0x10(%edx),%edx <== NOT EXECUTED
112c51: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
112c54: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
112c57: 8b 51 04 mov 0x4(%ecx),%edx <== NOT EXECUTED
112c5a: 8b 49 08 mov 0x8(%ecx),%ecx <== NOT EXECUTED
112c5d: 89 55 b8 mov %edx,-0x48(%ebp) <== NOT EXECUTED
112c60: 89 4d bc mov %ecx,-0x44(%ebp) <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
112c63: 8b 10 mov (%eax),%edx <== NOT EXECUTED
112c65: 8b 48 04 mov 0x4(%eax),%ecx <== NOT EXECUTED
112c68: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED
112c6b: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED
args->bytes_moved = 0;
112c6e: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
112c71: c7 41 18 00 00 00 00 movl $0x0,0x18(%ecx) <== NOT EXECUTED
while (count > 0)
112c78: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
112c7b: 85 db test %ebx,%ebx <== NOT EXECUTED
112c7d: 0f 84 b1 00 00 00 je 112d34 <rtems_blkdev_generic_write+0x100><== NOT EXECUTED
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
112c83: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
112c86: 31 db xor %ebx,%ebx <== NOT EXECUTED
112c88: 53 push %ebx <== NOT EXECUTED
112c89: 51 push %ecx <== NOT EXECUTED
112c8a: ff 75 bc pushl -0x44(%ebp) <== NOT EXECUTED
112c8d: ff 75 b8 pushl -0x48(%ebp) <== NOT EXECUTED
112c90: 89 4d b4 mov %ecx,-0x4c(%ebp) <== NOT EXECUTED
112c93: e8 04 10 01 00 call 123c9c <__divdi3> <== NOT EXECUTED
112c98: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112c9b: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
112c9e: 8b 4d b4 mov -0x4c(%ebp),%ecx <== NOT EXECUTED
112ca1: 53 push %ebx <== NOT EXECUTED
112ca2: 51 push %ecx <== NOT EXECUTED
112ca3: ff 75 bc pushl -0x44(%ebp) <== NOT EXECUTED
112ca6: ff 75 b8 pushl -0x48(%ebp) <== NOT EXECUTED
112ca9: e8 3e 11 01 00 call 123dec <__moddi3> <== NOT EXECUTED
112cae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112cb1: 89 c7 mov %eax,%edi <== NOT EXECUTED
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
112cb3: 85 c0 test %eax,%eax <== NOT EXECUTED
112cb5: 74 53 je 112d0a <rtems_blkdev_generic_write+0xd6><== NOT EXECUTED
112cb7: 90 nop <== NOT EXECUTED
rc = rtems_bdbuf_get(dev, block, &diskbuf);
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
112cb8: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED
112cbb: 51 push %ecx <== NOT EXECUTED
112cbc: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
112cbf: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
112cc2: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED
112cc5: e8 ea fa ff ff call 1127b4 <rtems_bdbuf_read> <== NOT EXECUTED
112cca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
112ccd: 85 c0 test %eax,%eax <== NOT EXECUTED
112ccf: 75 5b jne 112d2c <rtems_blkdev_generic_write+0xf8><== NOT EXECUTED
break;
copy = block_size - blkofs;
112cd1: 8b 5d cc mov -0x34(%ebp),%ebx <== NOT EXECUTED
112cd4: 29 fb sub %edi,%ebx <== NOT EXECUTED
112cd6: 3b 5d d4 cmp -0x2c(%ebp),%ebx <== NOT EXECUTED
112cd9: 76 03 jbe 112cde <rtems_blkdev_generic_write+0xaa><== NOT EXECUTED
112cdb: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
112cde: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
112ce1: 03 78 20 add 0x20(%eax),%edi <== NOT EXECUTED
112ce4: 89 d9 mov %ebx,%ecx <== NOT EXECUTED
112ce6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
args->bytes_moved += copy;
112ce8: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
112ceb: 01 58 18 add %ebx,0x18(%eax) <== NOT EXECUTED
rc = rtems_bdbuf_release_modified(diskbuf);
112cee: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112cf1: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
112cf4: e8 c3 e9 ff ff call 1116bc <rtems_bdbuf_release_modified><== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
112cf9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112cfc: 85 c0 test %eax,%eax <== NOT EXECUTED
112cfe: 75 2c jne 112d2c <rtems_blkdev_generic_write+0xf8><== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
112d00: 29 5d d4 sub %ebx,-0x2c(%ebp) <== NOT EXECUTED
112d03: 74 27 je 112d2c <rtems_blkdev_generic_write+0xf8><== NOT EXECUTED
break;
count -= copy;
buf += copy;
blkofs = 0;
block++;
112d05: ff 45 d0 incl -0x30(%ebp) <== NOT EXECUTED
112d08: 31 ff xor %edi,%edi <== NOT EXECUTED
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
112d0a: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
112d0d: 39 45 cc cmp %eax,-0x34(%ebp) <== NOT EXECUTED
112d10: 77 a6 ja 112cb8 <rtems_blkdev_generic_write+0x84><== NOT EXECUTED
rc = rtems_bdbuf_get(dev, block, &diskbuf);
112d12: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
112d15: 52 push %edx <== NOT EXECUTED
112d16: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
112d19: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
112d1c: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED
112d1f: e8 c4 f9 ff ff call 1126e8 <rtems_bdbuf_get> <== NOT EXECUTED
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
112d24: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc = rtems_bdbuf_get(dev, block, &diskbuf);
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
112d27: 85 c0 test %eax,%eax <== NOT EXECUTED
112d29: 74 a6 je 112cd1 <rtems_blkdev_generic_write+0x9d><== NOT EXECUTED
112d2b: 90 nop <== NOT EXECUTED
blkofs = 0;
block++;
}
return rc;
}
112d2c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112d2f: 5b pop %ebx <== NOT EXECUTED
112d30: 5e pop %esi <== NOT EXECUTED
112d31: 5f pop %edi <== NOT EXECUTED
112d32: c9 leave <== NOT EXECUTED
112d33: c3 ret <== NOT EXECUTED
break;
count -= copy;
buf += copy;
blkofs = 0;
block++;
112d34: 31 c0 xor %eax,%eax <== NOT EXECUTED
112d36: eb f4 jmp 112d2c <rtems_blkdev_generic_write+0xf8><== NOT EXECUTED
00112a94 <rtems_blkdev_ioctl>:
return RTEMS_SUCCESSFUL;
}
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
112a94: 55 push %ebp
112a95: 89 e5 mov %esp,%ebp
112a97: 83 ec 08 sub $0x8,%esp
112a9a: 8b 4d 08 mov 0x8(%ebp),%ecx
112a9d: 8b 45 0c mov 0xc(%ebp),%eax
112aa0: 8b 55 10 mov 0x10(%ebp),%edx
size_t *arg_size = argp;
int rc = 0;
switch (req)
112aa3: 3d 03 42 04 40 cmp $0x40044203,%eax
112aa8: 74 42 je 112aec <rtems_blkdev_ioctl+0x58><== NEVER TAKEN
112aaa: 76 18 jbe 112ac4 <rtems_blkdev_ioctl+0x30><== ALWAYS TAKEN
112aac: 3d 05 42 04 40 cmp $0x40044205,%eax <== NOT EXECUTED
112ab1: 74 2d je 112ae0 <rtems_blkdev_ioctl+0x4c><== NOT EXECUTED
112ab3: 3d 04 42 04 80 cmp $0x80044204,%eax <== NOT EXECUTED
112ab8: 75 11 jne 112acb <rtems_blkdev_ioctl+0x37><== NOT EXECUTED
case RTEMS_BLKIO_GETBLKSIZE:
*arg_size = dd->block_size;
break;
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
112aba: 8b 02 mov (%edx),%eax <== NOT EXECUTED
112abc: 89 41 20 mov %eax,0x20(%ecx) <== NOT EXECUTED
112abf: 31 c0 xor %eax,%eax <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
112ac1: c9 leave <== NOT EXECUTED
112ac2: c3 ret <== NOT EXECUTED
112ac3: 90 nop <== NOT EXECUTED
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
switch (req)
112ac4: 3d 02 42 04 40 cmp $0x40044202,%eax
112ac9: 74 2d je 112af8 <rtems_blkdev_ioctl+0x64><== NEVER TAKEN
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
break;
default:
errno = EINVAL;
112acb: e8 30 62 00 00 call 118d00 <__errno>
112ad0: c7 00 16 00 00 00 movl $0x16,(%eax)
112ad6: b8 ff ff ff ff mov $0xffffffff,%eax
rc = -1;
break;
}
return rc;
}
112adb: c9 leave
112adc: c3 ret
112add: 8d 76 00 lea 0x0(%esi),%esi
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
break;
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
112ae0: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED
112ae3: 89 02 mov %eax,(%edx) <== NOT EXECUTED
112ae5: 31 c0 xor %eax,%eax <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
112ae7: c9 leave <== NOT EXECUTED
112ae8: c3 ret <== NOT EXECUTED
112ae9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*arg_size = dd->media_block_size;
break;
case RTEMS_BLKIO_GETBLKSIZE:
*arg_size = dd->block_size;
112aec: 8b 41 20 mov 0x20(%ecx),%eax <== NOT EXECUTED
112aef: 89 02 mov %eax,(%edx) <== NOT EXECUTED
112af1: 31 c0 xor %eax,%eax <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
112af3: c9 leave <== NOT EXECUTED
112af4: c3 ret <== NOT EXECUTED
112af5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int rc = 0;
switch (req)
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*arg_size = dd->media_block_size;
112af8: 8b 41 24 mov 0x24(%ecx),%eax <== NOT EXECUTED
112afb: 89 02 mov %eax,(%edx) <== NOT EXECUTED
112afd: 31 c0 xor %eax,%eax <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
112aff: c9 leave <== NOT EXECUTED
112b00: c3 ret <== NOT EXECUTED
001080a8 <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
1080a8: 55 push %ebp
1080a9: 89 e5 mov %esp,%ebp
1080ab: 57 push %edi
1080ac: 56 push %esi
1080ad: 53 push %ebx
1080ae: 83 ec 1c sub $0x1c,%esp
1080b1: 8b 45 08 mov 0x8(%ebp),%eax
1080b4: 8b 5d 0c mov 0xc(%ebp),%ebx
1080b7: 8b 75 10 mov 0x10(%ebp),%esi
const char *p;
if ( !name )
1080ba: 85 c0 test %eax,%eax
1080bc: 75 0e jne 1080cc <rtems_bsp_cmdline_get_param+0x24>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
1080be: 31 db xor %ebx,%ebx
return NULL;
copy_string( p, value, length );
return value;
}
1080c0: 89 d8 mov %ebx,%eax
1080c2: 8d 65 f4 lea -0xc(%ebp),%esp
1080c5: 5b pop %ebx
1080c6: 5e pop %esi
1080c7: 5f pop %edi
1080c8: c9 leave
1080c9: c3 ret
1080ca: 66 90 xchg %ax,%ax
const char *p;
if ( !name )
return NULL;
if ( !value )
1080cc: 85 db test %ebx,%ebx
1080ce: 74 f0 je 1080c0 <rtems_bsp_cmdline_get_param+0x18>
return NULL;
if ( !length )
1080d0: 85 f6 test %esi,%esi
1080d2: 74 ea je 1080be <rtems_bsp_cmdline_get_param+0x16>
return NULL;
value[0] = '\0';
1080d4: c6 03 00 movb $0x0,(%ebx)
p = rtems_bsp_cmdline_get_param_raw( name );
1080d7: 83 ec 0c sub $0xc,%esp
1080da: 50 push %eax
1080db: e8 48 00 00 00 call 108128 <rtems_bsp_cmdline_get_param_raw>
if ( !p )
1080e0: 83 c4 10 add $0x10,%esp
1080e3: 85 c0 test %eax,%eax
1080e5: 74 d7 je 1080be <rtems_bsp_cmdline_get_param+0x16>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
1080e7: 8a 08 mov (%eax),%cl
1080e9: 84 c9 test %cl,%cl
1080eb: 74 d3 je 1080c0 <rtems_bsp_cmdline_get_param+0x18><== NEVER TAKEN
1080ed: 4e dec %esi
1080ee: 89 75 e4 mov %esi,-0x1c(%ebp)
1080f1: 74 cd je 1080c0 <rtems_bsp_cmdline_get_param+0x18><== NEVER TAKEN
1080f3: 31 f6 xor %esi,%esi
1080f5: 31 d2 xor %edx,%edx
1080f7: 31 ff xor %edi,%edi
1080f9: eb 24 jmp 10811f <rtems_bsp_cmdline_get_param+0x77>
1080fb: 90 nop
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
1080fc: f7 c7 01 00 00 00 test $0x1,%edi
108102: 75 05 jne 108109 <rtems_bsp_cmdline_get_param+0x61>
108104: 80 f9 20 cmp $0x20,%cl
108107: 74 b7 je 1080c0 <rtems_bsp_cmdline_get_param+0x18>
break;
value[i++] = *p++;
108109: 88 0c 33 mov %cl,(%ebx,%esi,1)
10810c: 42 inc %edx
10810d: 89 d6 mov %edx,%esi
value[i] = '\0';
10810f: 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; ) {
108113: 8a 0c 10 mov (%eax,%edx,1),%cl
108116: 84 c9 test %cl,%cl
108118: 74 a6 je 1080c0 <rtems_bsp_cmdline_get_param+0x18>
10811a: 3b 55 e4 cmp -0x1c(%ebp),%edx
10811d: 73 a1 jae 1080c0 <rtems_bsp_cmdline_get_param+0x18><== NEVER TAKEN
if ( *p == '\"' ) {
10811f: 80 f9 22 cmp $0x22,%cl
108122: 75 d8 jne 1080fc <rtems_bsp_cmdline_get_param+0x54>
quotes++;
108124: 47 inc %edi
108125: eb e2 jmp 108109 <rtems_bsp_cmdline_get_param+0x61>
00108128 <rtems_bsp_cmdline_get_param_raw>:
extern const char *bsp_boot_cmdline;
const char *rtems_bsp_cmdline_get_param_raw(
const char *name
)
{
108128: 55 push %ebp
108129: 89 e5 mov %esp,%ebp
10812b: 83 ec 08 sub $0x8,%esp
10812e: 8b 45 08 mov 0x8(%ebp),%eax
const char *p;
if ( !name )
108131: 85 c0 test %eax,%eax
108133: 75 07 jne 10813c <rtems_bsp_cmdline_get_param_raw+0x14>
if ( !bsp_boot_cmdline )
return NULL;
p = strstr(bsp_boot_cmdline, name);
/* printf( "raw: %p (%s)\n", p, p ); */
return p;
108135: 31 c0 xor %eax,%eax
}
108137: c9 leave
108138: c3 ret
108139: 8d 76 00 lea 0x0(%esi),%esi
const char *p;
if ( !name )
return NULL;
if ( !bsp_boot_cmdline )
10813c: 8b 15 18 9e 12 00 mov 0x129e18,%edx
108142: 85 d2 test %edx,%edx
108144: 74 ef je 108135 <rtems_bsp_cmdline_get_param_raw+0xd>
return NULL;
p = strstr(bsp_boot_cmdline, name);
108146: 83 ec 08 sub $0x8,%esp
108149: 50 push %eax
10814a: 52 push %edx
10814b: e8 f4 e7 00 00 call 116944 <strstr>
108150: 83 c4 10 add $0x10,%esp
/* printf( "raw: %p (%s)\n", p, p ); */
return p;
}
108153: c9 leave
108154: c3 ret
00108158 <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
108158: 55 push %ebp
108159: 89 e5 mov %esp,%ebp
10815b: 57 push %edi
10815c: 53 push %ebx
10815d: 8b 7d 08 mov 0x8(%ebp),%edi
108160: 8b 5d 0c mov 0xc(%ebp),%ebx
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
108163: 50 push %eax
108164: ff 75 10 pushl 0x10(%ebp)
108167: 53 push %ebx
108168: 57 push %edi
108169: e8 3a ff ff ff call 1080a8 <rtems_bsp_cmdline_get_param>
10816e: 89 c2 mov %eax,%edx
if ( !p )
108170: 83 c4 10 add $0x10,%esp
108173: 85 c0 test %eax,%eax
108175: 75 0d jne 108184 <rtems_bsp_cmdline_get_param_rhs+0x2c>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
d--;
*d = '\0';
return value;
108177: 31 db xor %ebx,%ebx
}
108179: 89 d8 mov %ebx,%eax
10817b: 8d 65 f8 lea -0x8(%ebp),%esp
10817e: 5b pop %ebx
10817f: 5f pop %edi
108180: c9 leave
108181: c3 ret
108182: 66 90 xchg %ax,%ax
p = rtems_bsp_cmdline_get_param( name, value, length );
if ( !p )
return NULL;
rhs = &p[strlen(name)];
108184: 31 c0 xor %eax,%eax
108186: b9 ff ff ff ff mov $0xffffffff,%ecx
10818b: f2 ae repnz scas %es:(%edi),%al
10818d: f7 d1 not %ecx
10818f: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax
if ( *rhs != '=' )
108193: 80 38 3d cmpb $0x3d,(%eax)
108196: 75 df jne 108177 <rtems_bsp_cmdline_get_param_rhs+0x1f><== NEVER TAKEN
return NULL;
rhs++;
108198: 8d 48 01 lea 0x1(%eax),%ecx
if ( *rhs == '\"' )
10819b: 8a 50 01 mov 0x1(%eax),%dl
10819e: 80 fa 22 cmp $0x22,%dl
1081a1: 74 2d je 1081d0 <rtems_bsp_cmdline_get_param_rhs+0x78>
rhs++;
for ( d=value ; *rhs ; )
1081a3: 84 d2 test %dl,%dl
1081a5: 74 31 je 1081d8 <rtems_bsp_cmdline_get_param_rhs+0x80>
1081a7: 89 d8 mov %ebx,%eax
1081a9: 8d 76 00 lea 0x0(%esi),%esi
*d++ = *rhs++;
1081ac: 88 10 mov %dl,(%eax)
1081ae: 40 inc %eax
1081af: 41 inc %ecx
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
1081b0: 8a 11 mov (%ecx),%dl
1081b2: 84 d2 test %dl,%dl
1081b4: 75 f6 jne 1081ac <rtems_bsp_cmdline_get_param_rhs+0x54>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
1081b6: 8d 50 ff lea -0x1(%eax),%edx
1081b9: 80 78 ff 22 cmpb $0x22,-0x1(%eax)
1081bd: 74 02 je 1081c1 <rtems_bsp_cmdline_get_param_rhs+0x69>
1081bf: 89 c2 mov %eax,%edx
d--;
*d = '\0';
1081c1: c6 02 00 movb $0x0,(%edx)
return value;
}
1081c4: 89 d8 mov %ebx,%eax
1081c6: 8d 65 f8 lea -0x8(%ebp),%esp
1081c9: 5b pop %ebx
1081ca: 5f pop %edi
1081cb: c9 leave
1081cc: c3 ret
1081cd: 8d 76 00 lea 0x0(%esi),%esi
if ( *rhs != '=' )
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
1081d0: 8d 48 02 lea 0x2(%eax),%ecx
1081d3: 8a 50 02 mov 0x2(%eax),%dl
1081d6: eb cb jmp 1081a3 <rtems_bsp_cmdline_get_param_rhs+0x4b>
for ( d=value ; *rhs ; )
1081d8: 89 d8 mov %ebx,%eax
1081da: eb da jmp 1081b6 <rtems_bsp_cmdline_get_param_rhs+0x5e>
001123c4 <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
1123c4: 55 push %ebp
1123c5: 89 e5 mov %esp,%ebp
1123c7: 53 push %ebx
1123c8: 83 ec 04 sub $0x4,%esp
1123cb: 8b 45 08 mov 0x8(%ebp),%eax
1123ce: 8b 5d 0c mov 0xc(%ebp),%ebx
if ( !time_buffer )
1123d1: 85 db test %ebx,%ebx
1123d3: 74 3b je 112410 <rtems_clock_get+0x4c>
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
1123d5: 85 c0 test %eax,%eax
1123d7: 74 2b je 112404 <rtems_clock_get+0x40>
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
1123d9: 83 f8 01 cmp $0x1,%eax
1123dc: 74 3e je 11241c <rtems_clock_get+0x58>
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
1123de: 83 f8 02 cmp $0x2,%eax
1123e1: 74 45 je 112428 <rtems_clock_get+0x64>
*interval = rtems_clock_get_ticks_since_boot();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
1123e3: 83 f8 03 cmp $0x3,%eax
1123e6: 74 4c je 112434 <rtems_clock_get+0x70>
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
1123e8: 83 f8 04 cmp $0x4,%eax
1123eb: 74 0b je 1123f8 <rtems_clock_get+0x34>
1123ed: b8 0a 00 00 00 mov $0xa,%eax
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
1123f2: 5a pop %edx
1123f3: 5b pop %ebx
1123f4: c9 leave
1123f5: c3 ret
1123f6: 66 90 xchg %ax,%ax
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
1123f8: 89 5d 08 mov %ebx,0x8(%ebp)
return RTEMS_INVALID_NUMBER;
}
1123fb: 59 pop %ecx
1123fc: 5b pop %ebx
1123fd: c9 leave
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
1123fe: e9 49 01 00 00 jmp 11254c <rtems_clock_get_tod_timeval>
112403: 90 nop
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
112404: 89 5d 08 mov %ebx,0x8(%ebp)
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
112407: 58 pop %eax
112408: 5b pop %ebx
112409: c9 leave
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
11240a: e9 7d 00 00 00 jmp 11248c <rtems_clock_get_tod>
11240f: 90 nop
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
if ( !time_buffer )
112410: b8 09 00 00 00 mov $0x9,%eax
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
112415: 5a pop %edx
112416: 5b pop %ebx
112417: c9 leave
112418: c3 ret
112419: 8d 76 00 lea 0x0(%esi),%esi
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
11241c: 89 5d 08 mov %ebx,0x8(%ebp)
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
11241f: 5b pop %ebx
112420: 5b pop %ebx
112421: c9 leave
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
112422: e9 19 00 00 00 jmp 112440 <rtems_clock_get_seconds_since_epoch>
112427: 90 nop
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
112428: e8 53 00 00 00 call 112480 <rtems_clock_get_ticks_since_boot>
11242d: 89 03 mov %eax,(%ebx)
11242f: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
112431: eb bf jmp 1123f2 <rtems_clock_get+0x2e>
112433: 90 nop
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
112434: e8 33 00 00 00 call 11246c <rtems_clock_get_ticks_per_second>
112439: 89 03 mov %eax,(%ebx)
11243b: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
11243d: eb b3 jmp 1123f2 <rtems_clock_get+0x2e>
0010c668 <rtems_clock_get_tod>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod(
rtems_time_of_day *time_buffer
)
{
10c668: 55 push %ebp
10c669: 89 e5 mov %esp,%ebp
10c66b: 56 push %esi
10c66c: 53 push %ebx
10c66d: 83 ec 50 sub $0x50,%esp
10c670: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
10c673: 85 db test %ebx,%ebx
10c675: 0f 84 a1 00 00 00 je 10c71c <rtems_clock_get_tod+0xb4>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
10c67b: 80 3d 8c ce 12 00 00 cmpb $0x0,0x12ce8c
10c682: 75 0c jne 10c690 <rtems_clock_get_tod+0x28>
10c684: b8 0b 00 00 00 mov $0xb,%eax
tmbuf->second = time.tm_sec;
tmbuf->ticks = now.tv_usec /
rtems_configuration_get_microseconds_per_tick();
return RTEMS_SUCCESSFUL;
}
10c689: 8d 65 f8 lea -0x8(%ebp),%esp
10c68c: 5b pop %ebx
10c68d: 5e pop %esi
10c68e: c9 leave
10c68f: c3 ret
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
10c690: 9c pushf
10c691: fa cli
10c692: 5e pop %esi
_TOD_Get( &now );
10c693: 83 ec 0c sub $0xc,%esp
10c696: 8d 45 e8 lea -0x18(%ebp),%eax
10c699: 50 push %eax
10c69a: e8 19 19 00 00 call 10dfb8 <_TOD_Get>
_ISR_Enable(level);
10c69f: 56 push %esi
10c6a0: 9d popf
useconds = (suseconds_t)now.tv_nsec;
10c6a1: 8b 4d ec mov -0x14(%ebp),%ecx
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
10c6a4: 8b 45 e8 mov -0x18(%ebp),%eax
10c6a7: 89 45 f0 mov %eax,-0x10(%ebp)
time->tv_usec = useconds;
10c6aa: be d3 4d 62 10 mov $0x10624dd3,%esi
10c6af: 89 c8 mov %ecx,%eax
10c6b1: f7 ee imul %esi
10c6b3: 89 45 b0 mov %eax,-0x50(%ebp)
10c6b6: 89 55 b4 mov %edx,-0x4c(%ebp)
10c6b9: 8b 75 b4 mov -0x4c(%ebp),%esi
10c6bc: c1 fe 06 sar $0x6,%esi
10c6bf: 89 c8 mov %ecx,%eax
10c6c1: 99 cltd
10c6c2: 29 d6 sub %edx,%esi
10c6c4: 89 75 f4 mov %esi,-0xc(%ebp)
/* Obtain the current time */
_TOD_Get_timeval( &now );
/* Split it into a closer format */
gmtime_r( &now.tv_sec, &time );
10c6c7: 58 pop %eax
10c6c8: 5a pop %edx
10c6c9: 8d 45 c4 lea -0x3c(%ebp),%eax
10c6cc: 50 push %eax
10c6cd: 8d 45 f0 lea -0x10(%ebp),%eax
10c6d0: 50 push %eax
10c6d1: e8 0e aa 00 00 call 1170e4 <gmtime_r>
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
10c6d6: 8b 45 d8 mov -0x28(%ebp),%eax
10c6d9: 05 6c 07 00 00 add $0x76c,%eax
10c6de: 89 03 mov %eax,(%ebx)
tmbuf->month = time.tm_mon + 1;
10c6e0: 8b 45 d4 mov -0x2c(%ebp),%eax
10c6e3: 40 inc %eax
10c6e4: 89 43 04 mov %eax,0x4(%ebx)
tmbuf->day = time.tm_mday;
10c6e7: 8b 45 d0 mov -0x30(%ebp),%eax
10c6ea: 89 43 08 mov %eax,0x8(%ebx)
tmbuf->hour = time.tm_hour;
10c6ed: 8b 45 cc mov -0x34(%ebp),%eax
10c6f0: 89 43 0c mov %eax,0xc(%ebx)
tmbuf->minute = time.tm_min;
10c6f3: 8b 45 c8 mov -0x38(%ebp),%eax
10c6f6: 89 43 10 mov %eax,0x10(%ebx)
tmbuf->second = time.tm_sec;
10c6f9: 8b 45 c4 mov -0x3c(%ebp),%eax
10c6fc: 89 43 14 mov %eax,0x14(%ebx)
tmbuf->ticks = now.tv_usec /
10c6ff: 8b 45 f4 mov -0xc(%ebp),%eax
10c702: 31 d2 xor %edx,%edx
10c704: f7 35 4c 88 12 00 divl 0x12884c
10c70a: 89 43 18 mov %eax,0x18(%ebx)
10c70d: 31 c0 xor %eax,%eax
rtems_configuration_get_microseconds_per_tick();
return RTEMS_SUCCESSFUL;
10c70f: 83 c4 10 add $0x10,%esp
}
10c712: 8d 65 f8 lea -0x8(%ebp),%esp
10c715: 5b pop %ebx
10c716: 5e pop %esi
10c717: c9 leave
10c718: c3 ret
10c719: 8d 76 00 lea 0x0(%esi),%esi
{
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
10c71c: b8 09 00 00 00 mov $0x9,%eax
10c721: e9 63 ff ff ff jmp 10c689 <rtems_clock_get_tod+0x21>
0011254c <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
11254c: 55 push %ebp
11254d: 89 e5 mov %esp,%ebp
11254f: 56 push %esi
112550: 53 push %ebx
112551: 83 ec 20 sub $0x20,%esp
112554: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !time )
112557: 85 db test %ebx,%ebx
112559: 74 59 je 1125b4 <rtems_clock_get_tod_timeval+0x68>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
11255b: 80 3d 6c 4f 17 00 00 cmpb $0x0,0x174f6c
112562: 75 0c jne 112570 <rtems_clock_get_tod_timeval+0x24>
112564: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
}
112569: 8d 65 f8 lea -0x8(%ebp),%esp
11256c: 5b pop %ebx
11256d: 5e pop %esi
11256e: c9 leave
11256f: c3 ret
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
112570: 9c pushf
112571: fa cli
112572: 5e pop %esi
_TOD_Get( &now );
112573: 83 ec 0c sub $0xc,%esp
112576: 8d 45 f0 lea -0x10(%ebp),%eax
112579: 50 push %eax
11257a: e8 15 1c 00 00 call 114194 <_TOD_Get>
_ISR_Enable(level);
11257f: 56 push %esi
112580: 9d popf
useconds = (suseconds_t)now.tv_nsec;
112581: 8b 4d f4 mov -0xc(%ebp),%ecx
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
112584: 8b 45 f0 mov -0x10(%ebp),%eax
112587: 89 03 mov %eax,(%ebx)
time->tv_usec = useconds;
112589: be d3 4d 62 10 mov $0x10624dd3,%esi
11258e: 89 c8 mov %ecx,%eax
112590: f7 ee imul %esi
112592: 89 45 e0 mov %eax,-0x20(%ebp)
112595: 89 55 e4 mov %edx,-0x1c(%ebp)
112598: 8b 75 e4 mov -0x1c(%ebp),%esi
11259b: c1 fe 06 sar $0x6,%esi
11259e: 89 c8 mov %ecx,%eax
1125a0: 99 cltd
1125a1: 29 d6 sub %edx,%esi
1125a3: 89 73 04 mov %esi,0x4(%ebx)
1125a6: 31 c0 xor %eax,%eax
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
1125a8: 83 c4 10 add $0x10,%esp
}
1125ab: 8d 65 f8 lea -0x8(%ebp),%esp
1125ae: 5b pop %ebx
1125af: 5e pop %esi
1125b0: c9 leave
1125b1: c3 ret
1125b2: 66 90 xchg %ax,%ax
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
if ( !time )
1125b4: b8 09 00 00 00 mov $0x9,%eax
1125b9: eb ae jmp 112569 <rtems_clock_get_tod_timeval+0x1d>
00130d40 <rtems_clock_get_uptime>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
130d40: 55 push %ebp
130d41: 89 e5 mov %esp,%ebp
130d43: 83 ec 08 sub $0x8,%esp
130d46: 8b 45 08 mov 0x8(%ebp),%eax
if ( !uptime )
130d49: 85 c0 test %eax,%eax
130d4b: 74 13 je 130d60 <rtems_clock_get_uptime+0x20>
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime_as_timespec( uptime );
130d4d: 83 ec 0c sub $0xc,%esp
130d50: 50 push %eax
130d51: e8 f2 0c 00 00 call 131a48 <_TOD_Get_uptime_as_timespec>
130d56: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
130d58: 83 c4 10 add $0x10,%esp
}
130d5b: c9 leave
130d5c: c3 ret
130d5d: 8d 76 00 lea 0x0(%esi),%esi
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
if ( !uptime )
130d60: b0 09 mov $0x9,%al
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime_as_timespec( uptime );
return RTEMS_SUCCESSFUL;
}
130d62: c9 leave
130d63: c3 ret
0010c740 <rtems_clock_set>:
*/
rtems_status_code rtems_clock_set(
rtems_time_of_day *time_buffer
)
{
10c740: 55 push %ebp
10c741: 89 e5 mov %esp,%ebp
10c743: 53 push %ebx
10c744: 83 ec 14 sub $0x14,%esp
10c747: 8b 5d 08 mov 0x8(%ebp),%ebx
struct timespec newtime;
if ( !time_buffer )
10c74a: 85 db test %ebx,%ebx
10c74c: 74 66 je 10c7b4 <rtems_clock_set+0x74>
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
10c74e: 83 ec 0c sub $0xc,%esp
10c751: 53 push %ebx
10c752: e8 39 01 00 00 call 10c890 <_TOD_Validate>
10c757: 83 c4 10 add $0x10,%esp
10c75a: 84 c0 test %al,%al
10c75c: 75 0a jne 10c768 <rtems_clock_set+0x28>
10c75e: b8 14 00 00 00 mov $0x14,%eax
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
10c763: 8b 5d fc mov -0x4(%ebp),%ebx
10c766: c9 leave
10c767: c3 ret
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
10c768: 83 ec 0c sub $0xc,%esp
10c76b: 53 push %ebx
10c76c: e8 93 00 00 00 call 10c804 <_TOD_To_seconds>
10c771: 89 45 f0 mov %eax,-0x10(%ebp)
newtime.tv_nsec = time_buffer->ticks *
10c774: 8b 43 18 mov 0x18(%ebx),%eax
10c777: 0f af 05 4c 88 12 00 imul 0x12884c,%eax
10c77e: 8d 04 80 lea (%eax,%eax,4),%eax
10c781: 8d 04 80 lea (%eax,%eax,4),%eax
10c784: 8d 04 80 lea (%eax,%eax,4),%eax
10c787: c1 e0 03 shl $0x3,%eax
10c78a: 89 45 f4 mov %eax,-0xc(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c78d: a1 78 ce 12 00 mov 0x12ce78,%eax
10c792: 40 inc %eax
10c793: a3 78 ce 12 00 mov %eax,0x12ce78
rtems_configuration_get_nanoseconds_per_tick();
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
10c798: 8d 45 f0 lea -0x10(%ebp),%eax
10c79b: 89 04 24 mov %eax,(%esp)
10c79e: e8 f9 18 00 00 call 10e09c <_TOD_Set>
_Thread_Enable_dispatch();
10c7a3: e8 10 2c 00 00 call 10f3b8 <_Thread_Enable_dispatch>
10c7a8: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10c7aa: 83 c4 10 add $0x10,%esp
}
return RTEMS_INVALID_CLOCK;
}
10c7ad: 8b 5d fc mov -0x4(%ebp),%ebx
10c7b0: c9 leave
10c7b1: c3 ret
10c7b2: 66 90 xchg %ax,%ax
rtems_time_of_day *time_buffer
)
{
struct timespec newtime;
if ( !time_buffer )
10c7b4: b8 09 00 00 00 mov $0x9,%eax
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
10c7b9: 8b 5d fc mov -0x4(%ebp),%ebx
10c7bc: c9 leave
10c7bd: c3 ret
0010b620 <rtems_clock_tick>:
*
* NOTE: This routine only works for leap-years through 2099.
*/
rtems_status_code rtems_clock_tick( void )
{
10b620: 55 push %ebp
10b621: 89 e5 mov %esp,%ebp
10b623: 83 ec 08 sub $0x8,%esp
_TOD_Tickle_ticks();
10b626: e8 dd 14 00 00 call 10cb08 <_TOD_Tickle_ticks>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
{
_Watchdog_Tickle( &_Watchdog_Ticks_chain );
10b62b: 83 ec 0c sub $0xc,%esp
10b62e: 68 d8 94 12 00 push $0x1294d8
10b633: e8 3c 37 00 00 call 10ed74 <_Watchdog_Tickle>
_Watchdog_Tickle_ticks();
_Thread_Tickle_timeslice();
10b638: e8 c7 31 00 00 call 10e804 <_Thread_Tickle_timeslice>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
{
return ( _Context_Switch_necessary );
10b63d: a0 c8 94 12 00 mov 0x1294c8,%al
if ( _Thread_Is_context_switch_necessary() &&
10b642: 83 c4 10 add $0x10,%esp
10b645: 84 c0 test %al,%al
10b647: 74 09 je 10b652 <rtems_clock_tick+0x32>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void )
{
return ( _Thread_Dispatch_disable_level == 0 );
10b649: a1 f8 93 12 00 mov 0x1293f8,%eax
10b64e: 85 c0 test %eax,%eax
10b650: 74 06 je 10b658 <rtems_clock_tick+0x38>
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
10b652: 31 c0 xor %eax,%eax
10b654: c9 leave
10b655: c3 ret
10b656: 66 90 xchg %ax,%ax
_Thread_Tickle_timeslice();
if ( _Thread_Is_context_switch_necessary() &&
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
10b658: e8 b3 24 00 00 call 10db10 <_Thread_Dispatch>
return RTEMS_SUCCESSFUL;
}
10b65d: 31 c0 xor %eax,%eax
10b65f: c9 leave
10b660: c3 ret
0010881c <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10881c: 55 push %ebp
10881d: 89 e5 mov %esp,%ebp
10881f: 57 push %edi
108820: 56 push %esi
108821: 53 push %ebx
108822: 83 ec 6c sub $0x6c,%esp
108825: 8b 7d 08 mov 0x8(%ebp),%edi
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
108828: 8b 45 0c mov 0xc(%ebp),%eax
10882b: 85 c0 test %eax,%eax
10882d: 0f 84 5f 01 00 00 je 108992 <rtems_cpu_usage_report_with_plugin+0x176><== 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 );
108833: 83 ec 0c sub $0xc,%esp
108836: 8d 45 d8 lea -0x28(%ebp),%eax
108839: 50 push %eax
10883a: e8 d1 57 00 00 call 10e010 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
10883f: 83 c4 0c add $0xc,%esp
108842: 8d 55 d0 lea -0x30(%ebp),%edx
108845: 52 push %edx
108846: 8d 4d d8 lea -0x28(%ebp),%ecx
108849: 51 push %ecx
10884a: 68 8c d4 12 00 push $0x12d48c
10884f: e8 78 7a 00 00 call 1102cc <_Timespec_Subtract>
}
}
}
#endif
(*print)(
108854: 5b pop %ebx
108855: 5e pop %esi
108856: 68 b4 4d 12 00 push $0x124db4
10885b: 57 push %edi
10885c: ff 55 0c call *0xc(%ebp)
10885f: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp)
108866: 83 c4 10 add $0x10,%esp
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
108869: 8b 5d a4 mov -0x5c(%ebp),%ebx
10886c: 8b 04 9d 4c ce 12 00 mov 0x12ce4c(,%ebx,4),%eax
108873: 85 c0 test %eax,%eax
108875: 0f 84 ed 00 00 00 je 108968 <rtems_cpu_usage_report_with_plugin+0x14c>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
10887b: 8b 70 04 mov 0x4(%eax),%esi
if ( information ) {
10887e: 85 f6 test %esi,%esi
108880: 0f 84 e2 00 00 00 je 108968 <rtems_cpu_usage_report_with_plugin+0x14c><== NEVER TAKEN
for ( i=1 ; i <= information->maximum ; i++ ) {
108886: 66 83 7e 10 00 cmpw $0x0,0x10(%esi)
10888b: 0f 84 d7 00 00 00 je 108968 <rtems_cpu_usage_report_with_plugin+0x14c>
108891: bb 01 00 00 00 mov $0x1,%ebx
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
108896: 89 5d 94 mov %ebx,-0x6c(%ebp)
108899: eb 4b jmp 1088e6 <rtems_cpu_usage_report_with_plugin+0xca>
10889b: 90 nop
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
10889c: 8d 5d e0 lea -0x20(%ebp),%ebx
10889f: 53 push %ebx
1088a0: 8d 45 e4 lea -0x1c(%ebp),%eax
1088a3: 50 push %eax
1088a4: 8d 55 d0 lea -0x30(%ebp),%edx
1088a7: 52 push %edx
1088a8: 8d 4d c8 lea -0x38(%ebp),%ecx
1088ab: 51 push %ecx
1088ac: e8 47 79 00 00 call 1101f8 <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
1088b1: 58 pop %eax
1088b2: 5a pop %edx
1088b3: ff 75 e0 pushl -0x20(%ebp)
1088b6: ff 75 e4 pushl -0x1c(%ebp)
1088b9: ba d3 4d 62 10 mov $0x10624dd3,%edx
1088be: 8b 45 cc mov -0x34(%ebp),%eax
1088c1: f7 e2 mul %edx
1088c3: c1 ea 06 shr $0x6,%edx
1088c6: 52 push %edx
1088c7: ff 75 c8 pushl -0x38(%ebp)
1088ca: 68 27 50 12 00 push $0x125027
1088cf: 57 push %edi
1088d0: ff 55 0c call *0xc(%ebp)
1088d3: 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++ ) {
1088d6: ff 45 94 incl -0x6c(%ebp)
1088d9: 0f b7 46 10 movzwl 0x10(%esi),%eax
1088dd: 3b 45 94 cmp -0x6c(%ebp),%eax
1088e0: 0f 82 82 00 00 00 jb 108968 <rtems_cpu_usage_report_with_plugin+0x14c>
the_thread = (Thread_Control *)information->local_table[ i ];
1088e6: 8b 46 1c mov 0x1c(%esi),%eax
1088e9: 8b 4d 94 mov -0x6c(%ebp),%ecx
1088ec: 8b 14 88 mov (%eax,%ecx,4),%edx
if ( !the_thread )
1088ef: 85 d2 test %edx,%edx
1088f1: 74 e3 je 1088d6 <rtems_cpu_usage_report_with_plugin+0xba><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
1088f3: 51 push %ecx
1088f4: 8d 5d b3 lea -0x4d(%ebp),%ebx
1088f7: 53 push %ebx
1088f8: 6a 0d push $0xd
1088fa: ff 72 08 pushl 0x8(%edx)
1088fd: 89 55 a0 mov %edx,-0x60(%ebp)
108900: e8 07 44 00 00 call 10cd0c <rtems_object_get_name>
(*print)(
108905: 53 push %ebx
108906: 8b 55 a0 mov -0x60(%ebp),%edx
108909: ff 72 08 pushl 0x8(%edx)
10890c: 68 14 50 12 00 push $0x125014
108911: 57 push %edi
108912: 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;
108915: 8b 55 a0 mov -0x60(%ebp),%edx
108918: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx
10891e: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx
108924: 89 4d c8 mov %ecx,-0x38(%ebp)
108927: 89 5d cc mov %ebx,-0x34(%ebp)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
10892a: 83 c4 20 add $0x20,%esp
10892d: a1 38 cf 12 00 mov 0x12cf38,%eax
108932: 8b 40 08 mov 0x8(%eax),%eax
108935: 3b 42 08 cmp 0x8(%edx),%eax
108938: 0f 85 5e ff ff ff jne 10889c <rtems_cpu_usage_report_with_plugin+0x80>
Timestamp_Control used;
_Timestamp_Subtract(
10893e: 52 push %edx
10893f: 8d 5d c0 lea -0x40(%ebp),%ebx
108942: 53 push %ebx
108943: 8d 45 d8 lea -0x28(%ebp),%eax
108946: 50 push %eax
108947: 68 40 cf 12 00 push $0x12cf40
10894c: e8 7b 79 00 00 call 1102cc <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
108951: 59 pop %ecx
108952: 58 pop %eax
108953: 53 push %ebx
108954: 8d 4d c8 lea -0x38(%ebp),%ecx
108957: 51 push %ecx
108958: e8 5f 78 00 00 call 1101bc <_Timespec_Add_to>
10895d: 83 c4 10 add $0x10,%esp
108960: e9 37 ff ff ff jmp 10889c <rtems_cpu_usage_report_with_plugin+0x80>
108965: 8d 76 00 lea 0x0(%esi),%esi
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
108968: ff 45 a4 incl -0x5c(%ebp)
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
10896b: 83 7d a4 05 cmpl $0x5,-0x5c(%ebp)
10896f: 0f 85 f4 fe ff ff jne 108869 <rtems_cpu_usage_report_with_plugin+0x4d>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
108975: ba d3 4d 62 10 mov $0x10624dd3,%edx
10897a: 8b 45 d4 mov -0x2c(%ebp),%eax
10897d: f7 e2 mul %edx
10897f: c1 ea 06 shr $0x6,%edx
108982: 52 push %edx
108983: ff 75 d0 pushl -0x30(%ebp)
108986: 68 28 4f 12 00 push $0x124f28
10898b: 57 push %edi
10898c: ff 55 0c call *0xc(%ebp)
10898f: 83 c4 10 add $0x10,%esp
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
108992: 8d 65 f4 lea -0xc(%ebp),%esp
108995: 5b pop %ebx
108996: 5e pop %esi
108997: 5f pop %edi
108998: c9 leave
108999: c3 ret
00114ff8 <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
int
rtems_deviceio_errno(rtems_status_code code)
{
114ff8: 55 push %ebp <== NOT EXECUTED
114ff9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
114ffb: 53 push %ebx <== NOT EXECUTED
114ffc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
114fff: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
115002: 68 40 36 12 00 push $0x123640 <== NOT EXECUTED
115007: e8 1c 00 00 00 call 115028 <rtems_assoc_remote_by_local><== NOT EXECUTED
11500c: 89 c3 mov %eax,%ebx <== NOT EXECUTED
11500e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
115011: 85 c0 test %eax,%eax <== NOT EXECUTED
115013: 74 07 je 11501c <rtems_deviceio_errno+0x24><== NOT EXECUTED
{
errno = rc;
115015: e8 ea 00 00 00 call 115104 <__errno> <== NOT EXECUTED
11501a: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
return -1;
}
return -1;
}
11501c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
115021: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
115024: c9 leave <== NOT EXECUTED
115025: c3 ret <== NOT EXECUTED
00108960 <rtems_disk_create_log>:
dev_t phys,
rtems_blkdev_bnum begin_block,
rtems_blkdev_bnum block_count,
const char *name
)
{
108960: 55 push %ebp
108961: 89 e5 mov %esp,%ebp
108963: 57 push %edi
108964: 56 push %esi
108965: 53 push %ebx
108966: 83 ec 2c sub $0x2c,%esp
108969: 8b 45 08 mov 0x8(%ebp),%eax
10896c: 8b 55 0c mov 0xc(%ebp),%edx
10896f: 89 45 d0 mov %eax,-0x30(%ebp)
108972: 89 55 d4 mov %edx,-0x2c(%ebp)
108975: 8b 5d 10 mov 0x10(%ebp),%ebx
108978: 8b 75 14 mov 0x14(%ebp),%esi
10897b: 8b 7d 18 mov 0x18(%ebp),%edi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *physical_disk = NULL;
rtems_disk_device *dd = NULL;
10897e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
rtems_blkdev_bnum end_block = begin_block + block_count;
sc = disk_lock();
108985: e8 72 fa ff ff call 1083fc <disk_lock>
if (sc != RTEMS_SUCCESSFUL) {
10898a: 85 c0 test %eax,%eax
10898c: 74 0a je 108998 <rtems_disk_create_log+0x38><== ALWAYS TAKEN
++physical_disk->uses;
disk_unlock();
return RTEMS_SUCCESSFUL;
}
10898e: 8d 65 f4 lea -0xc(%ebp),%esp
108991: 5b pop %ebx
108992: 5e pop %esi
108993: 5f pop %edi
108994: c9 leave
108995: c3 ret
108996: 66 90 xchg %ax,%ax
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
physical_disk = get_disk_entry(phys, true);
108998: b9 01 00 00 00 mov $0x1,%ecx
10899d: 89 d8 mov %ebx,%eax
10899f: 89 f2 mov %esi,%edx
1089a1: e8 76 f8 ff ff call 10821c <get_disk_entry>
1089a6: 89 c3 mov %eax,%ebx
if (physical_disk == NULL || !is_physical_disk(physical_disk)) {
1089a8: 85 c0 test %eax,%eax
1089aa: 74 05 je 1089b1 <rtems_disk_create_log+0x51>
1089ac: 3b 40 08 cmp 0x8(%eax),%eax
1089af: 74 13 je 1089c4 <rtems_disk_create_log+0x64>
disk_unlock();
1089b1: e8 76 fa ff ff call 10842c <disk_unlock>
1089b6: b8 04 00 00 00 mov $0x4,%eax
++physical_disk->uses;
disk_unlock();
return RTEMS_SUCCESSFUL;
}
1089bb: 8d 65 f4 lea -0xc(%ebp),%esp
1089be: 5b pop %ebx
1089bf: 5e pop %esi
1089c0: 5f pop %edi
1089c1: c9 leave
1089c2: c3 ret
1089c3: 90 nop
return RTEMS_INVALID_ID;
}
if (
begin_block >= physical_disk->size
|| end_block <= begin_block
1089c4: 8b 40 1c mov 0x1c(%eax),%eax
disk_unlock();
return RTEMS_INVALID_ID;
}
if (
1089c7: 39 c7 cmp %eax,%edi
1089c9: 73 09 jae 1089d4 <rtems_disk_create_log+0x74>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *physical_disk = NULL;
rtems_disk_device *dd = NULL;
rtems_blkdev_bnum end_block = begin_block + block_count;
1089cb: 8b 55 1c mov 0x1c(%ebp),%edx
1089ce: 01 fa add %edi,%edx
disk_unlock();
return RTEMS_INVALID_ID;
}
if (
1089d0: 39 d7 cmp %edx,%edi
1089d2: 72 0c jb 1089e0 <rtems_disk_create_log+0x80><== ALWAYS TAKEN
begin_block >= physical_disk->size
|| end_block <= begin_block
|| end_block > physical_disk->size
) {
disk_unlock();
1089d4: e8 53 fa ff ff call 10842c <disk_unlock>
1089d9: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
1089de: eb ae jmp 10898e <rtems_disk_create_log+0x2e>
disk_unlock();
return RTEMS_INVALID_ID;
}
if (
1089e0: 39 c2 cmp %eax,%edx
1089e2: 77 f0 ja 1089d4 <rtems_disk_create_log+0x74>
disk_unlock();
return RTEMS_INVALID_NUMBER;
}
sc = create_disk(dev, name, &dd);
1089e4: 83 ec 0c sub $0xc,%esp
1089e7: 8d 45 e4 lea -0x1c(%ebp),%eax
1089ea: 50 push %eax
1089eb: 8b 4d 20 mov 0x20(%ebp),%ecx
1089ee: 8b 45 d0 mov -0x30(%ebp),%eax
1089f1: 8b 55 d4 mov -0x2c(%ebp),%edx
1089f4: e8 43 fd ff ff call 10873c <create_disk>
if (sc != RTEMS_SUCCESSFUL) {
1089f9: 83 c4 10 add $0x10,%esp
1089fc: 85 c0 test %eax,%eax
1089fe: 75 27 jne 108a27 <rtems_disk_create_log+0xc7>
disk_unlock();
return sc;
}
dd->phys_dev = physical_disk;
108a00: 8b 55 e4 mov -0x1c(%ebp),%edx
108a03: 89 5a 08 mov %ebx,0x8(%edx)
dd->start = begin_block;
108a06: 89 7a 18 mov %edi,0x18(%edx)
dd->size = block_count;
108a09: 8b 4d 1c mov 0x1c(%ebp),%ecx
108a0c: 89 4a 1c mov %ecx,0x1c(%edx)
dd->block_size = dd->media_block_size = physical_disk->block_size;
108a0f: 8b 4b 20 mov 0x20(%ebx),%ecx
108a12: 89 4a 24 mov %ecx,0x24(%edx)
108a15: 89 4a 20 mov %ecx,0x20(%edx)
dd->ioctl = physical_disk->ioctl;
108a18: 8b 4b 28 mov 0x28(%ebx),%ecx
108a1b: 89 4a 28 mov %ecx,0x28(%edx)
dd->driver_data = physical_disk->driver_data;
108a1e: 8b 4b 2c mov 0x2c(%ebx),%ecx
108a21: 89 4a 2c mov %ecx,0x2c(%edx)
++physical_disk->uses;
108a24: ff 43 14 incl 0x14(%ebx)
disk_unlock();
108a27: 89 45 cc mov %eax,-0x34(%ebp)
108a2a: e8 fd f9 ff ff call 10842c <disk_unlock>
108a2f: 8b 45 cc mov -0x34(%ebp),%eax
return RTEMS_SUCCESSFUL;
108a32: e9 57 ff ff ff jmp 10898e <rtems_disk_create_log+0x2e>
00108a38 <rtems_disk_create_phys>:
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data,
const char *name
)
{
108a38: 55 push %ebp
108a39: 89 e5 mov %esp,%ebp
108a3b: 57 push %edi
108a3c: 56 push %esi
108a3d: 53 push %ebx
108a3e: 83 ec 2c sub $0x2c,%esp
108a41: 8b 5d 08 mov 0x8(%ebp),%ebx
108a44: 8b 75 0c mov 0xc(%ebp),%esi
108a47: 8b 7d 18 mov 0x18(%ebp),%edi
rtems_disk_device *dd = NULL;
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (handler == NULL) {
108a4a: 85 ff test %edi,%edi
108a4c: 0f 84 9a 00 00 00 je 108aec <rtems_disk_create_phys+0xb4>
return RTEMS_INVALID_ADDRESS;
}
if (block_size == 0) {
108a52: 8b 45 10 mov 0x10(%ebp),%eax
108a55: 85 c0 test %eax,%eax
108a57: 75 0f jne 108a68 <rtems_disk_create_phys+0x30>
108a59: ba 0a 00 00 00 mov $0xa,%edx
}
disk_unlock();
return RTEMS_SUCCESSFUL;
}
108a5e: 89 d0 mov %edx,%eax
108a60: 8d 65 f4 lea -0xc(%ebp),%esp
108a63: 5b pop %ebx
108a64: 5e pop %esi
108a65: 5f pop %edi
108a66: c9 leave
108a67: c3 ret
rtems_block_device_ioctl handler,
void *driver_data,
const char *name
)
{
rtems_disk_device *dd = NULL;
108a68: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
if (block_size == 0) {
return RTEMS_INVALID_NUMBER;
}
sc = disk_lock();
108a6f: e8 88 f9 ff ff call 1083fc <disk_lock>
108a74: 89 c2 mov %eax,%edx
if (sc != RTEMS_SUCCESSFUL) {
108a76: 85 c0 test %eax,%eax
108a78: 75 e4 jne 108a5e <rtems_disk_create_phys+0x26><== NEVER TAKEN
return sc;
}
sc = create_disk(dev, name, &dd);
108a7a: 83 ec 0c sub $0xc,%esp
108a7d: 8d 45 e4 lea -0x1c(%ebp),%eax
108a80: 50 push %eax
108a81: 8b 4d 20 mov 0x20(%ebp),%ecx
108a84: 89 d8 mov %ebx,%eax
108a86: 89 f2 mov %esi,%edx
108a88: e8 af fc ff ff call 10873c <create_disk>
108a8d: 89 c2 mov %eax,%edx
if (sc != RTEMS_SUCCESSFUL) {
108a8f: 83 c4 10 add $0x10,%esp
108a92: 85 c0 test %eax,%eax
108a94: 75 3f jne 108ad5 <rtems_disk_create_phys+0x9d>
disk_unlock();
return sc;
}
dd->phys_dev = dd;
108a96: 8b 45 e4 mov -0x1c(%ebp),%eax
108a99: 89 40 08 mov %eax,0x8(%eax)
dd->start = 0;
108a9c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
dd->size = block_count;
108aa3: 8b 4d 14 mov 0x14(%ebp),%ecx
108aa6: 89 48 1c mov %ecx,0x1c(%eax)
dd->block_size = dd->media_block_size = block_size;
108aa9: 8b 4d 10 mov 0x10(%ebp),%ecx
108aac: 89 48 24 mov %ecx,0x24(%eax)
108aaf: 89 48 20 mov %ecx,0x20(%eax)
dd->ioctl = handler;
108ab2: 89 78 28 mov %edi,0x28(%eax)
dd->driver_data = driver_data;
108ab5: 8b 4d 1c mov 0x1c(%ebp),%ecx
108ab8: 89 48 2c mov %ecx,0x2c(%eax)
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) < 0) {
108abb: 51 push %ecx
108abc: 8d 48 0c lea 0xc(%eax),%ecx
108abf: 51 push %ecx
108ac0: 68 08 42 00 20 push $0x20004208
108ac5: 50 push %eax
108ac6: 89 55 d4 mov %edx,-0x2c(%ebp)
108ac9: ff d7 call *%edi
108acb: 83 c4 10 add $0x10,%esp
108ace: 85 c0 test %eax,%eax
108ad0: 8b 55 d4 mov -0x2c(%ebp),%edx
108ad3: 78 23 js 108af8 <rtems_disk_create_phys+0xc0>
dd->capabilities = 0;
}
disk_unlock();
108ad5: 89 55 d4 mov %edx,-0x2c(%ebp)
108ad8: e8 4f f9 ff ff call 10842c <disk_unlock>
108add: 8b 55 d4 mov -0x2c(%ebp),%edx
return RTEMS_SUCCESSFUL;
}
108ae0: 89 d0 mov %edx,%eax
108ae2: 8d 65 f4 lea -0xc(%ebp),%esp
108ae5: 5b pop %ebx
108ae6: 5e pop %esi
108ae7: 5f pop %edi
108ae8: c9 leave
108ae9: c3 ret
108aea: 66 90 xchg %ax,%ax
)
{
rtems_disk_device *dd = NULL;
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (handler == NULL) {
108aec: ba 09 00 00 00 mov $0x9,%edx
108af1: e9 68 ff ff ff jmp 108a5e <rtems_disk_create_phys+0x26>
108af6: 66 90 xchg %ax,%ax
dd->block_size = dd->media_block_size = block_size;
dd->ioctl = handler;
dd->driver_data = driver_data;
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) < 0) {
dd->capabilities = 0;
108af8: 8b 45 e4 mov -0x1c(%ebp),%eax
108afb: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
108b02: eb d1 jmp 108ad5 <rtems_disk_create_phys+0x9d>
00108570 <rtems_disk_delete>:
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
{
108570: 55 push %ebp
108571: 89 e5 mov %esp,%ebp
108573: 57 push %edi
108574: 56 push %esi
108575: 53 push %ebx
108576: 83 ec 2c sub $0x2c,%esp
108579: 8b 5d 08 mov 0x8(%ebp),%ebx
10857c: 8b 75 0c mov 0xc(%ebp),%esi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
sc = disk_lock();
10857f: e8 78 fe ff ff call 1083fc <disk_lock>
108584: 89 45 d4 mov %eax,-0x2c(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
108587: 85 c0 test %eax,%eax
108589: 74 0d je 108598 <rtems_disk_delete+0x28><== ALWAYS TAKEN
rtems_disk_cleanup(dd);
disk_unlock();
return RTEMS_SUCCESSFUL;
}
10858b: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
10858e: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
108591: 5b pop %ebx <== NOT EXECUTED
108592: 5e pop %esi <== NOT EXECUTED
108593: 5f pop %edi <== NOT EXECUTED
108594: c9 leave <== NOT EXECUTED
108595: c3 ret <== NOT EXECUTED
108596: 66 90 xchg %ax,%ax <== NOT EXECUTED
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
dd = get_disk_entry(dev, true);
108598: b9 01 00 00 00 mov $0x1,%ecx
10859d: 89 d8 mov %ebx,%eax
10859f: 89 f2 mov %esi,%edx
1085a1: e8 76 fc ff ff call 10821c <get_disk_entry>
if (dd == NULL) {
1085a6: 85 c0 test %eax,%eax
1085a8: 0f 84 21 01 00 00 je 1086cf <rtems_disk_delete+0x15f><== NEVER TAKEN
disk_unlock();
return RTEMS_INVALID_ID;
}
dd->deleted = true;
1085ae: c6 40 30 01 movb $0x1,0x30(%eax)
}
static void
rtems_disk_cleanup(rtems_disk_device *disk_to_remove)
{
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
1085b2: 8b 50 08 mov 0x8(%eax),%edx
1085b5: 89 55 d8 mov %edx,-0x28(%ebp)
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (physical_disk->deleted) {
1085b8: 80 7a 30 00 cmpb $0x0,0x30(%edx)
1085bc: 0f 84 c2 00 00 00 je 108684 <rtems_disk_delete+0x114>
dev_t dev = physical_disk->dev;
1085c2: 8b 02 mov (%edx),%eax
1085c4: 89 45 e4 mov %eax,-0x1c(%ebp)
1085c7: 8b 52 04 mov 0x4(%edx),%edx
1085ca: 89 55 e0 mov %edx,-0x20(%ebp)
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
1085cd: 8b 15 a4 bf 12 00 mov 0x12bfa4,%edx
1085d3: 85 d2 test %edx,%edx
1085d5: 0f 84 0b 01 00 00 je 1086e6 <rtems_disk_delete+0x176><== NEVER TAKEN
1085db: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
1085e2: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
1085e9: 8d 76 00 lea 0x0(%esi),%esi
rtems_disk_device_table *dtab = disktab + major;
1085ec: 8b 75 dc mov -0x24(%ebp),%esi
1085ef: c1 e6 03 shl $0x3,%esi
1085f2: 03 35 a0 bf 12 00 add 0x12bfa0,%esi
for (minor = 0; minor < dtab->size; ++minor) {
1085f8: 8b 46 04 mov 0x4(%esi),%eax
1085fb: 85 c0 test %eax,%eax
1085fd: 74 49 je 108648 <rtems_disk_delete+0xd8>
1085ff: 31 db xor %ebx,%ebx
108601: eb 07 jmp 10860a <rtems_disk_delete+0x9a>
108603: 90 nop
108604: 43 inc %ebx
108605: 3b 5e 04 cmp 0x4(%esi),%ebx
108608: 73 3e jae 108648 <rtems_disk_delete+0xd8>
rtems_disk_device *dd = dtab->minor [minor];
10860a: 8d 14 9d 00 00 00 00 lea 0x0(,%ebx,4),%edx
108611: 03 16 add (%esi),%edx
108613: 8b 02 mov (%edx),%eax
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
108615: 85 c0 test %eax,%eax
108617: 74 eb je 108604 <rtems_disk_delete+0x94>
108619: 8b 48 08 mov 0x8(%eax),%ecx
10861c: 8b 7d e0 mov -0x20(%ebp),%edi
10861f: 33 79 04 xor 0x4(%ecx),%edi
108622: 8b 09 mov (%ecx),%ecx
108624: 33 4d e4 xor -0x1c(%ebp),%ecx
108627: 09 cf or %ecx,%edi
108629: 75 d9 jne 108604 <rtems_disk_delete+0x94><== NEVER TAKEN
10862b: 39 45 d8 cmp %eax,-0x28(%ebp)
10862e: 74 d4 je 108604 <rtems_disk_delete+0x94>
if (dd->uses == 0) {
108630: 8b 78 14 mov 0x14(%eax),%edi
108633: 85 ff test %edi,%edi
108635: 0f 84 81 00 00 00 je 1086bc <rtems_disk_delete+0x14c>
++deleted_count;
dtab->minor [minor] = NULL;
free_disk_device(dd);
} else {
dd->deleted = true;
10863b: c6 40 30 01 movb $0x1,0x30(%eax)
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
10863f: 43 inc %ebx
108640: 3b 5e 04 cmp 0x4(%esi),%ebx
108643: 72 c5 jb 10860a <rtems_disk_delete+0x9a><== ALWAYS TAKEN
108645: 8d 76 00 lea 0x0(%esi),%esi
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
108648: ff 45 dc incl -0x24(%ebp)
10864b: 8b 45 dc mov -0x24(%ebp),%eax
10864e: 3b 05 a4 bf 12 00 cmp 0x12bfa4,%eax
108654: 72 96 jb 1085ec <rtems_disk_delete+0x7c>
}
}
}
}
physical_disk->uses -= deleted_count;
108656: 8b 55 d8 mov -0x28(%ebp),%edx
108659: 8b 42 14 mov 0x14(%edx),%eax
10865c: 2b 45 d0 sub -0x30(%ebp),%eax
10865f: 89 42 14 mov %eax,0x14(%edx)
if (physical_disk->uses == 0) {
108662: 85 c0 test %eax,%eax
108664: 75 46 jne 1086ac <rtems_disk_delete+0x13c>
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
108666: 8b 0a mov (%edx),%ecx
108668: 8b 52 04 mov 0x4(%edx),%edx
disktab [major].minor [minor] = NULL;
10866b: a1 a0 bf 12 00 mov 0x12bfa0,%eax
108670: 8b 04 c8 mov (%eax,%ecx,8),%eax
108673: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
free_disk_device(physical_disk);
10867a: 8b 45 d8 mov -0x28(%ebp),%eax
10867d: e8 de fb ff ff call 108260 <free_disk_device>
108682: eb 28 jmp 1086ac <rtems_disk_delete+0x13c>
}
} else {
if (disk_to_remove->uses == 0) {
108684: 8b 48 14 mov 0x14(%eax),%ecx
108687: 85 c9 test %ecx,%ecx
108689: 75 21 jne 1086ac <rtems_disk_delete+0x13c><== NEVER TAKEN
--physical_disk->uses;
10868b: 8b 55 d8 mov -0x28(%ebp),%edx
10868e: ff 4a 14 decl 0x14(%edx)
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
108691: 8b 18 mov (%eax),%ebx
108693: 8b 48 04 mov 0x4(%eax),%ecx
disktab [major].minor [minor] = NULL;
108696: 8b 15 a0 bf 12 00 mov 0x12bfa0,%edx
10869c: 8b 14 da mov (%edx,%ebx,8),%edx
10869f: c7 04 8a 00 00 00 00 movl $0x0,(%edx,%ecx,4)
free_disk_device(disk_to_remove);
1086a6: e8 b5 fb ff ff call 108260 <free_disk_device>
1086ab: 90 nop
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
1086ac: e8 7b fd ff ff call 10842c <disk_unlock>
return RTEMS_SUCCESSFUL;
}
1086b1: 8b 45 d4 mov -0x2c(%ebp),%eax
1086b4: 83 c4 2c add $0x2c,%esp
1086b7: 5b pop %ebx
1086b8: 5e pop %esi
1086b9: 5f pop %edi
1086ba: c9 leave
1086bb: c3 ret
for (minor = 0; minor < dtab->size; ++minor) {
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
if (dd->uses == 0) {
++deleted_count;
1086bc: ff 45 d0 incl -0x30(%ebp)
dtab->minor [minor] = NULL;
1086bf: c7 02 00 00 00 00 movl $0x0,(%edx)
free_disk_device(dd);
1086c5: e8 96 fb ff ff call 108260 <free_disk_device>
1086ca: e9 35 ff ff ff jmp 108604 <rtems_disk_delete+0x94>
return sc;
}
dd = get_disk_entry(dev, true);
if (dd == NULL) {
disk_unlock();
1086cf: e8 58 fd ff ff call 10842c <disk_unlock> <== NOT EXECUTED
1086d4: c7 45 d4 04 00 00 00 movl $0x4,-0x2c(%ebp) <== NOT EXECUTED
rtems_disk_cleanup(dd);
disk_unlock();
return RTEMS_SUCCESSFUL;
}
1086db: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
1086de: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
1086e1: 5b pop %ebx <== NOT EXECUTED
1086e2: 5e pop %esi <== NOT EXECUTED
1086e3: 5f pop %edi <== NOT EXECUTED
1086e4: c9 leave <== NOT EXECUTED
1086e5: c3 ret <== NOT EXECUTED
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
1086e6: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
1086ed: e9 64 ff ff ff jmp 108656 <rtems_disk_delete+0xe6><== NOT EXECUTED
001082b0 <rtems_disk_io_done>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_disk_io_done(void)
{
1082b0: 55 push %ebp
1082b1: 89 e5 mov %esp,%ebp
1082b3: 57 push %edi
1082b4: 56 push %esi
1082b5: 53 push %ebx
1082b6: 83 ec 0c sub $0xc,%esp
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
1082b9: 8b 35 a4 bf 12 00 mov 0x12bfa4,%esi
1082bf: 85 f6 test %esi,%esi
1082c1: 74 46 je 108309 <rtems_disk_io_done+0x59><== NEVER TAKEN
1082c3: 31 ff xor %edi,%edi
1082c5: 8d 76 00 lea 0x0(%esi),%esi
rtems_disk_device_table *dtab = disktab + major;
1082c8: 8d 34 fd 00 00 00 00 lea 0x0(,%edi,8),%esi
1082cf: 03 35 a0 bf 12 00 add 0x12bfa0,%esi
for (minor = 0; minor < dtab->size; ++minor) {
1082d5: 8b 5e 04 mov 0x4(%esi),%ebx
1082d8: 85 db test %ebx,%ebx
1082da: 74 6f je 10834b <rtems_disk_io_done+0x9b>
1082dc: 8b 16 mov (%esi),%edx
1082de: 31 db xor %ebx,%ebx
rtems_disk_device *dd = dtab->minor [minor];
1082e0: 8b 04 9a mov (%edx,%ebx,4),%eax
if (dd != NULL) {
1082e3: 85 c0 test %eax,%eax
1082e5: 74 07 je 1082ee <rtems_disk_io_done+0x3e><== ALWAYS TAKEN
free_disk_device(dd);
1082e7: e8 74 ff ff ff call 108260 <free_disk_device> <== NOT EXECUTED
1082ec: 8b 16 mov (%esi),%edx <== NOT EXECUTED
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
1082ee: 43 inc %ebx
1082ef: 39 5e 04 cmp %ebx,0x4(%esi)
1082f2: 77 ec ja 1082e0 <rtems_disk_io_done+0x30>
if (dd != NULL) {
free_disk_device(dd);
}
}
free(dtab->minor);
1082f4: 83 ec 0c sub $0xc,%esp
1082f7: 52 push %edx
1082f8: e8 8f 11 00 00 call 10948c <free>
rtems_disk_io_done(void)
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
1082fd: 47 inc %edi
1082fe: 83 c4 10 add $0x10,%esp
108301: 39 3d a4 bf 12 00 cmp %edi,0x12bfa4
108307: 77 bf ja 1082c8 <rtems_disk_io_done+0x18>
free_disk_device(dd);
}
}
free(dtab->minor);
}
free(disktab);
108309: 83 ec 0c sub $0xc,%esp
10830c: ff 35 a0 bf 12 00 pushl 0x12bfa0
108312: e8 75 11 00 00 call 10948c <free>
rtems_semaphore_delete(diskdevs_mutex);
108317: 59 pop %ecx
108318: ff 35 a8 bf 12 00 pushl 0x12bfa8
10831e: e8 bd 4a 00 00 call 10cde0 <rtems_semaphore_delete>
diskdevs_mutex = RTEMS_ID_NONE;
108323: c7 05 a8 bf 12 00 00 movl $0x0,0x12bfa8
10832a: 00 00 00
disktab = NULL;
10832d: c7 05 a0 bf 12 00 00 movl $0x0,0x12bfa0
108334: 00 00 00
disktab_size = 0;
108337: c7 05 a4 bf 12 00 00 movl $0x0,0x12bfa4
10833e: 00 00 00
return RTEMS_SUCCESSFUL;
}
108341: 31 c0 xor %eax,%eax
108343: 8d 65 f4 lea -0xc(%ebp),%esp
108346: 5b pop %ebx
108347: 5e pop %esi
108348: 5f pop %edi
108349: c9 leave
10834a: c3 ret
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
10834b: 8b 16 mov (%esi),%edx
10834d: eb a5 jmp 1082f4 <rtems_disk_io_done+0x44>
00108350 <rtems_disk_io_initialize>:
}
}
rtems_status_code
rtems_disk_io_initialize(void)
{
108350: 55 push %ebp
108351: 89 e5 mov %esp,%ebp
108353: 83 ec 08 sub $0x8,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
108356: 8b 15 a4 bf 12 00 mov 0x12bfa4,%edx
10835c: 85 d2 test %edx,%edx
10835e: 74 04 je 108364 <rtems_disk_io_initialize+0x14><== ALWAYS TAKEN
free(disktab);
return RTEMS_UNSATISFIED;
}
disktab_size = size;
108360: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
108362: c9 leave
108363: c3 ret
if (disktab_size > 0) {
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
108364: 83 ec 08 sub $0x8,%esp
108367: 6a 08 push $0x8
108369: 6a 08 push $0x8
10836b: e8 04 0f 00 00 call 109274 <calloc>
108370: a3 a0 bf 12 00 mov %eax,0x12bfa0
if (disktab == NULL) {
108375: 83 c4 10 add $0x10,%esp
108378: 85 c0 test %eax,%eax
10837a: 74 58 je 1083d4 <rtems_disk_io_initialize+0x84><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
10837c: c6 05 ac bf 12 00 00 movb $0x0,0x12bfac
sc = rtems_semaphore_create(
108383: 83 ec 0c sub $0xc,%esp
108386: 68 a8 bf 12 00 push $0x12bfa8
10838b: 6a 00 push $0x0
10838d: 6a 10 push $0x10
10838f: 6a 01 push $0x1
108391: 68 56 45 44 44 push $0x44444556
108396: e8 71 48 00 00 call 10cc0c <rtems_semaphore_create>
RTEMS_FIFO | RTEMS_BINARY_SEMAPHORE | RTEMS_NO_INHERIT_PRIORITY
| RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL,
0,
&diskdevs_mutex
);
if (sc != RTEMS_SUCCESSFUL) {
10839b: 83 c4 20 add $0x20,%esp
10839e: 85 c0 test %eax,%eax
1083a0: 74 1a je 1083bc <rtems_disk_io_initialize+0x6c><== ALWAYS TAKEN
free(disktab);
1083a2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1083a5: ff 35 a0 bf 12 00 pushl 0x12bfa0 <== NOT EXECUTED
1083ab: e8 dc 10 00 00 call 10948c <free> <== NOT EXECUTED
1083b0: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED
return RTEMS_NO_MEMORY;
1083b5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
disktab_size = size;
return RTEMS_SUCCESSFUL;
}
1083b8: c9 leave <== NOT EXECUTED
1083b9: c3 ret <== NOT EXECUTED
1083ba: 66 90 xchg %ax,%ax <== NOT EXECUTED
free(disktab);
return RTEMS_NO_MEMORY;
}
sc = rtems_bdbuf_init();
1083bc: e8 e7 8a 00 00 call 110ea8 <rtems_bdbuf_init>
if (sc != RTEMS_SUCCESSFUL) {
1083c1: 85 c0 test %eax,%eax
1083c3: 75 13 jne 1083d8 <rtems_disk_io_initialize+0x88><== NEVER TAKEN
free(disktab);
return RTEMS_UNSATISFIED;
}
disktab_size = size;
1083c5: c7 05 a4 bf 12 00 08 movl $0x8,0x12bfa4
1083cc: 00 00 00
1083cf: 31 c0 xor %eax,%eax
1083d1: eb 8f jmp 108362 <rtems_disk_io_initialize+0x12>
1083d3: 90 nop
if (disktab_size > 0) {
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
1083d4: b0 1a mov $0x1a,%al <== NOT EXECUTED
}
disktab_size = size;
return RTEMS_SUCCESSFUL;
}
1083d6: c9 leave <== NOT EXECUTED
1083d7: c3 ret <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
sc = rtems_bdbuf_init();
if (sc != RTEMS_SUCCESSFUL) {
rtems_semaphore_delete(diskdevs_mutex);
1083d8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1083db: ff 35 a8 bf 12 00 pushl 0x12bfa8 <== NOT EXECUTED
1083e1: e8 fa 49 00 00 call 10cde0 <rtems_semaphore_delete><== NOT EXECUTED
free(disktab);
1083e6: 58 pop %eax <== NOT EXECUTED
1083e7: ff 35 a0 bf 12 00 pushl 0x12bfa0 <== NOT EXECUTED
1083ed: e8 9a 10 00 00 call 10948c <free> <== NOT EXECUTED
1083f2: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
return RTEMS_UNSATISFIED;
1083f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
disktab_size = size;
return RTEMS_SUCCESSFUL;
}
1083fa: c9 leave <== NOT EXECUTED
1083fb: c3 ret <== NOT EXECUTED
0010845c <rtems_disk_next>:
return RTEMS_SUCCESSFUL;
}
rtems_disk_device *
rtems_disk_next(dev_t dev)
{
10845c: 55 push %ebp
10845d: 89 e5 mov %esp,%ebp
10845f: 57 push %edi
108460: 56 push %esi
108461: 53 push %ebx
108462: 83 ec 1c sub $0x1c,%esp
108465: 8b 75 08 mov 0x8(%ebp),%esi
108468: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (dev != (dev_t) -1) {
10846b: 89 f0 mov %esi,%eax
10846d: 21 d8 and %ebx,%eax
10846f: 40 inc %eax
108470: 74 18 je 10848a <rtems_disk_next+0x2e>
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
108472: 83 c3 01 add $0x1,%ebx
108475: 73 19 jae 108490 <rtems_disk_next+0x34> <== ALWAYS TAKEN
/* If major wraps around */
if ((major + 1) < major) {
108477: 83 c6 01 add $0x1,%esi <== NOT EXECUTED
10847a: 0f 83 8f 00 00 00 jae 10850f <rtems_disk_next+0xb3> <== NOT EXECUTED
++minor;
} else {
++dtab->minor [minor]->uses;
disk_unlock();
return dtab->minor [minor];
108480: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
}
}
108482: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED
108485: 5b pop %ebx <== NOT EXECUTED
108486: 5e pop %esi <== NOT EXECUTED
108487: 5f pop %edi <== NOT EXECUTED
108488: c9 leave <== NOT EXECUTED
108489: c3 ret <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (dev != (dev_t) -1) {
10848a: 31 db xor %ebx,%ebx
10848c: 31 f6 xor %esi,%esi
10848e: 66 90 xchg %ax,%ax
} else {
++minor;
}
}
sc = disk_lock();
108490: e8 67 ff ff ff call 1083fc <disk_lock>
if (sc != RTEMS_SUCCESSFUL) {
108495: 85 c0 test %eax,%eax
108497: 75 e7 jne 108480 <rtems_disk_next+0x24> <== NEVER TAKEN
return NULL;
}
if (major >= disktab_size) {
108499: a1 a4 bf 12 00 mov 0x12bfa4,%eax
10849e: 89 45 e4 mov %eax,-0x1c(%ebp)
1084a1: 39 c6 cmp %eax,%esi
1084a3: 73 3f jae 1084e4 <rtems_disk_next+0x88> <== NEVER TAKEN
disk_unlock();
return NULL;
}
dtab = disktab + major;
1084a5: a1 a0 bf 12 00 mov 0x12bfa0,%eax
1084aa: 89 45 e0 mov %eax,-0x20(%ebp)
1084ad: 8d 3c f0 lea (%eax,%esi,8),%edi
1084b0: 8b 07 mov (%edi),%eax
1084b2: 66 90 xchg %ax,%ax
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
1084b4: 85 c0 test %eax,%eax
1084b6: 74 18 je 1084d0 <rtems_disk_next+0x74>
1084b8: 3b 5f 04 cmp 0x4(%edi),%ebx
1084bb: 73 13 jae 1084d0 <rtems_disk_next+0x74>
disk_unlock();
return NULL;
}
dtab = disktab + major;
} else if (dtab->minor [minor] == NULL) {
1084bd: 8d 0c 9d 00 00 00 00 lea 0x0(,%ebx,4),%ecx
1084c4: 8b 14 08 mov (%eax,%ecx,1),%edx
1084c7: 85 d2 test %edx,%edx
1084c9: 75 29 jne 1084f4 <rtems_disk_next+0x98>
++minor;
1084cb: 43 inc %ebx
return NULL;
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
1084cc: 85 c0 test %eax,%eax
1084ce: 75 e8 jne 1084b8 <rtems_disk_next+0x5c> <== ALWAYS TAKEN
minor = 0;
++major;
1084d0: 46 inc %esi
if (major >= disktab_size) {
1084d1: 39 75 e4 cmp %esi,-0x1c(%ebp)
1084d4: 76 0e jbe 1084e4 <rtems_disk_next+0x88>
disk_unlock();
return NULL;
}
dtab = disktab + major;
1084d6: 8b 45 e0 mov -0x20(%ebp),%eax
1084d9: 8d 3c f0 lea (%eax,%esi,8),%edi
1084dc: 8b 07 mov (%edi),%eax
1084de: 31 db xor %ebx,%ebx
return NULL;
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
1084e0: eb d2 jmp 1084b4 <rtems_disk_next+0x58>
1084e2: 66 90 xchg %ax,%ax
minor = 0;
++major;
if (major >= disktab_size) {
disk_unlock();
1084e4: e8 43 ff ff ff call 10842c <disk_unlock>
1084e9: 31 c0 xor %eax,%eax
disk_unlock();
return dtab->minor [minor];
}
}
}
1084eb: 83 c4 1c add $0x1c,%esp
1084ee: 5b pop %ebx
1084ef: 5e pop %esi
1084f0: 5f pop %edi
1084f1: c9 leave
1084f2: c3 ret
1084f3: 90 nop
}
dtab = disktab + major;
} else if (dtab->minor [minor] == NULL) {
++minor;
} else {
++dtab->minor [minor]->uses;
1084f4: ff 42 14 incl 0x14(%edx)
disk_unlock();
1084f7: 89 4d dc mov %ecx,-0x24(%ebp)
1084fa: e8 2d ff ff ff call 10842c <disk_unlock>
return dtab->minor [minor];
1084ff: 8b 07 mov (%edi),%eax
108501: 8b 4d dc mov -0x24(%ebp),%ecx
108504: 8b 04 08 mov (%eax,%ecx,1),%eax
}
}
}
108507: 83 c4 1c add $0x1c,%esp
10850a: 5b pop %ebx
10850b: 5e pop %esi
10850c: 5f pop %edi
10850d: c9 leave
10850e: c3 ret
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
/* If major wraps around */
if ((major + 1) < major) {
10850f: 31 db xor %ebx,%ebx
108511: e9 7a ff ff ff jmp 108490 <rtems_disk_next+0x34> <== NOT EXECUTED
00108518 <rtems_disk_obtain>:
return RTEMS_SUCCESSFUL;
}
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
108518: 55 push %ebp
108519: 89 e5 mov %esp,%ebp
10851b: 57 push %edi
10851c: 56 push %esi
10851d: 53 push %ebx
10851e: 83 ec 1c sub $0x1c,%esp
108521: 8b 5d 08 mov 0x8(%ebp),%ebx
108524: 8b 75 0c mov 0xc(%ebp),%esi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
rtems_interrupt_level level;
rtems_interrupt_disable(level);
108527: 9c pushf
108528: fa cli
108529: 5f pop %edi
if (!diskdevs_protected) {
10852a: a0 ac bf 12 00 mov 0x12bfac,%al
10852f: 84 c0 test %al,%al
108531: 75 15 jne 108548 <rtems_disk_obtain+0x30><== NEVER TAKEN
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
108533: 31 c9 xor %ecx,%ecx
108535: 89 d8 mov %ebx,%eax
108537: 89 f2 mov %esi,%edx
108539: e8 de fc ff ff call 10821c <get_disk_entry>
rtems_interrupt_enable(level);
10853e: 57 push %edi
10853f: 9d popf
disk_unlock();
}
}
return dd;
}
108540: 83 c4 1c add $0x1c,%esp
108543: 5b pop %ebx
108544: 5e pop %esi
108545: 5f pop %edi
108546: c9 leave
108547: c3 ret
if (!diskdevs_protected) {
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
rtems_interrupt_enable(level);
} else {
rtems_interrupt_enable(level);
108548: 57 push %edi <== NOT EXECUTED
108549: 9d popf <== NOT EXECUTED
sc = disk_lock();
10854a: e8 ad fe ff ff call 1083fc <disk_lock> <== NOT EXECUTED
if (sc == RTEMS_SUCCESSFUL) {
10854f: 85 c0 test %eax,%eax <== NOT EXECUTED
108551: 74 05 je 108558 <rtems_disk_obtain+0x40><== NOT EXECUTED
108553: 31 c0 xor %eax,%eax <== NOT EXECUTED
108555: eb e9 jmp 108540 <rtems_disk_obtain+0x28><== NOT EXECUTED
108557: 90 nop <== NOT EXECUTED
dd = get_disk_entry(dev, false);
108558: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
10855a: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10855c: 89 f2 mov %esi,%edx <== NOT EXECUTED
10855e: e8 b9 fc ff ff call 10821c <get_disk_entry> <== NOT EXECUTED
disk_unlock();
108563: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
108566: e8 c1 fe ff ff call 10842c <disk_unlock> <== NOT EXECUTED
10856b: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
10856e: eb d0 jmp 108540 <rtems_disk_obtain+0x28><== NOT EXECUTED
001086f4 <rtems_disk_release>:
return dd;
}
rtems_status_code
rtems_disk_release(rtems_disk_device *dd)
{
1086f4: 55 push %ebp
1086f5: 89 e5 mov %esp,%ebp
1086f7: 56 push %esi
1086f8: 53 push %ebx
1086f9: 8b 45 08 mov 0x8(%ebp),%eax
rtems_interrupt_level level;
dev_t dev = dd->dev;
1086fc: 8b 18 mov (%eax),%ebx
1086fe: 8b 70 04 mov 0x4(%eax),%esi
unsigned uses = 0;
bool deleted = false;
rtems_interrupt_disable(level);
108701: 9c pushf
108702: fa cli
108703: 59 pop %ecx
uses = --dd->uses;
108704: 8b 50 14 mov 0x14(%eax),%edx
108707: 4a dec %edx
108708: 89 50 14 mov %edx,0x14(%eax)
deleted = dd->deleted;
10870b: 8a 40 30 mov 0x30(%eax),%al
rtems_interrupt_enable(level);
10870e: 51 push %ecx
10870f: 9d popf
if (uses == 0 && deleted) {
108710: 85 d2 test %edx,%edx
108712: 75 04 jne 108718 <rtems_disk_release+0x24>
108714: 84 c0 test %al,%al
108716: 75 0c jne 108724 <rtems_disk_release+0x30>
rtems_disk_delete(dev);
}
return RTEMS_SUCCESSFUL;
}
108718: 31 c0 xor %eax,%eax
10871a: 8d 65 f8 lea -0x8(%ebp),%esp
10871d: 5b pop %ebx
10871e: 5e pop %esi
10871f: c9 leave
108720: c3 ret
108721: 8d 76 00 lea 0x0(%esi),%esi
uses = --dd->uses;
deleted = dd->deleted;
rtems_interrupt_enable(level);
if (uses == 0 && deleted) {
rtems_disk_delete(dev);
108724: 83 ec 08 sub $0x8,%esp
108727: 56 push %esi
108728: 53 push %ebx
108729: e8 42 fe ff ff call 108570 <rtems_disk_delete>
10872e: 83 c4 10 add $0x10,%esp
}
return RTEMS_SUCCESSFUL;
}
108731: 31 c0 xor %eax,%eax
108733: 8d 65 f8 lea -0x8(%ebp),%esp
108736: 5b pop %ebx
108737: 5e pop %esi
108738: c9 leave
108739: c3 ret
00125b58 <rtems_dosfs_initialize>:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*
*/
int rtems_dosfs_initialize(rtems_filesystem_mount_table_entry_t *mt_entry,
const void *data)
{
125b58: 55 push %ebp <== NOT EXECUTED
125b59: 89 e5 mov %esp,%ebp <== NOT EXECUTED
125b5b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
int rc;
rc = msdos_initialize_support(mt_entry,
125b5e: 68 40 8f 16 00 push $0x168f40 <== NOT EXECUTED
125b63: 68 80 8f 16 00 push $0x168f80 <== NOT EXECUTED
125b68: 68 a0 47 16 00 push $0x1647a0 <== NOT EXECUTED
125b6d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
125b70: e8 03 00 00 00 call 125b78 <msdos_initialize_support><== NOT EXECUTED
&msdos_ops,
&msdos_file_handlers,
&msdos_dir_handlers);
return rc;
}
125b75: c9 leave <== NOT EXECUTED
125b76: c3 ret <== NOT EXECUTED
0010ce34 <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
10ce34: 55 push %ebp <== NOT EXECUTED
10ce35: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10ce37: 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(
10ce3a: 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);
10ce3d: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
10ce40: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10ce43: e8 34 fe ff ff call 10cc7c <rtems_verror> <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
10ce48: c9 leave <== NOT EXECUTED
10ce49: c3 ret <== NOT EXECUTED
0010b7e8 <rtems_event_send>:
rtems_status_code rtems_event_send(
rtems_id id,
rtems_event_set event_in
)
{
10b7e8: 55 push %ebp
10b7e9: 89 e5 mov %esp,%ebp
10b7eb: 53 push %ebx
10b7ec: 83 ec 1c sub $0x1c,%esp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
the_thread = _Thread_Get( id, &location );
10b7ef: 8d 45 f4 lea -0xc(%ebp),%eax
10b7f2: 50 push %eax
10b7f3: ff 75 08 pushl 0x8(%ebp)
10b7f6: e8 95 24 00 00 call 10dc90 <_Thread_Get>
switch ( location ) {
10b7fb: 83 c4 10 add $0x10,%esp
10b7fe: 8b 55 f4 mov -0xc(%ebp),%edx
10b801: 85 d2 test %edx,%edx
10b803: 75 2b jne 10b830 <rtems_event_send+0x48>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
10b805: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx
rtems_event_set *the_event_set
)
{
ISR_Level level;
_ISR_Disable( level );
10b80b: 9c pushf
10b80c: fa cli
10b80d: 59 pop %ecx
*the_event_set |= the_new_events;
10b80e: 8b 5d 0c mov 0xc(%ebp),%ebx
10b811: 09 1a or %ebx,(%edx)
_ISR_Enable( level );
10b813: 51 push %ecx
10b814: 9d popf
_Event_sets_Post( event_in, &api->pending_events );
_Event_Surrender( the_thread );
10b815: 83 ec 0c sub $0xc,%esp
10b818: 50 push %eax
10b819: e8 1e 00 00 00 call 10b83c <_Event_Surrender>
_Thread_Enable_dispatch();
10b81e: e8 49 24 00 00 call 10dc6c <_Thread_Enable_dispatch>
10b823: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10b825: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b828: 8b 5d fc mov -0x4(%ebp),%ebx
10b82b: c9 leave
10b82c: c3 ret
10b82d: 8d 76 00 lea 0x0(%esi),%esi
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
10b830: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b835: 8b 5d fc mov -0x4(%ebp),%ebx
10b838: c9 leave
10b839: c3 ret
00110e60 <rtems_extension_create>:
rtems_status_code rtems_extension_create(
rtems_name name,
const rtems_extensions_table *extension_table,
rtems_id *id
)
{
110e60: 55 push %ebp
110e61: 89 e5 mov %esp,%ebp
110e63: 57 push %edi
110e64: 56 push %esi
110e65: 53 push %ebx
110e66: 83 ec 1c sub $0x1c,%esp
110e69: 8b 75 0c mov 0xc(%ebp),%esi
110e6c: 8b 5d 10 mov 0x10(%ebp),%ebx
Extension_Control *the_extension;
if ( !id )
110e6f: 85 db test %ebx,%ebx
110e71: 0f 84 85 00 00 00 je 110efc <rtems_extension_create+0x9c><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
110e77: 8b 45 08 mov 0x8(%ebp),%eax
110e7a: 85 c0 test %eax,%eax
110e7c: 75 0e jne 110e8c <rtems_extension_create+0x2c>
110e7e: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_extension->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
110e83: 8d 65 f4 lea -0xc(%ebp),%esp
110e86: 5b pop %ebx
110e87: 5e pop %esi
110e88: 5f pop %edi
110e89: c9 leave
110e8a: c3 ret
110e8b: 90 nop
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
110e8c: a1 98 73 13 00 mov 0x137398,%eax
110e91: 40 inc %eax
110e92: a3 98 73 13 00 mov %eax,0x137398
#ifndef __EXTENSION_MANAGER_inl
#define __EXTENSION_MANAGER_inl
RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void )
{
return (Extension_Control *) _Objects_Allocate( &_Extension_Information );
110e97: 83 ec 0c sub $0xc,%esp
110e9a: 68 20 76 13 00 push $0x137620
110e9f: e8 40 0d 00 00 call 111be4 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_extension = _Extension_Allocate();
if ( !the_extension ) {
110ea4: 83 c4 10 add $0x10,%esp
110ea7: 85 c0 test %eax,%eax
110ea9: 74 45 je 110ef0 <rtems_extension_create+0x90>
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
110eab: 8d 78 24 lea 0x24(%eax),%edi
110eae: b9 08 00 00 00 mov $0x8,%ecx
110eb3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
110eb5: 83 ec 0c sub $0xc,%esp
110eb8: 8d 50 10 lea 0x10(%eax),%edx
110ebb: 52 push %edx
110ebc: 89 45 e4 mov %eax,-0x1c(%ebp)
110ebf: e8 c0 27 00 00 call 113684 <_User_extensions_Add_set>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
110ec4: 8b 45 e4 mov -0x1c(%ebp),%eax
110ec7: 8b 50 08 mov 0x8(%eax),%edx
110eca: 0f b7 f2 movzwl %dx,%esi
110ecd: 8b 0d 3c 76 13 00 mov 0x13763c,%ecx
110ed3: 89 04 b1 mov %eax,(%ecx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
110ed6: 8b 4d 08 mov 0x8(%ebp),%ecx
110ed9: 89 48 0c mov %ecx,0xc(%eax)
&_Extension_Information,
&the_extension->Object,
(Objects_Name) name
);
*id = the_extension->Object.id;
110edc: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
110ede: e8 95 1a 00 00 call 112978 <_Thread_Enable_dispatch>
110ee3: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
110ee5: 83 c4 10 add $0x10,%esp
}
110ee8: 8d 65 f4 lea -0xc(%ebp),%esp
110eeb: 5b pop %ebx
110eec: 5e pop %esi
110eed: 5f pop %edi
110eee: c9 leave
110eef: c3 ret
_Thread_Disable_dispatch(); /* to prevent deletion */
the_extension = _Extension_Allocate();
if ( !the_extension ) {
_Thread_Enable_dispatch();
110ef0: e8 83 1a 00 00 call 112978 <_Thread_Enable_dispatch>
110ef5: b8 05 00 00 00 mov $0x5,%eax
return RTEMS_TOO_MANY;
110efa: eb 87 jmp 110e83 <rtems_extension_create+0x23>
rtems_id *id
)
{
Extension_Control *the_extension;
if ( !id )
110efc: b8 09 00 00 00 mov $0x9,%eax
110f01: eb 80 jmp 110e83 <rtems_extension_create+0x23>
00110f04 <rtems_extension_delete>:
#include <rtems/extension.h>
rtems_status_code rtems_extension_delete(
rtems_id id
)
{
110f04: 55 push %ebp
110f05: 89 e5 mov %esp,%ebp
110f07: 53 push %ebx
110f08: 83 ec 18 sub $0x18,%esp
RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Extension_Control *)
110f0b: 8d 45 f4 lea -0xc(%ebp),%eax
110f0e: 50 push %eax
110f0f: ff 75 08 pushl 0x8(%ebp)
110f12: 68 20 76 13 00 push $0x137620
110f17: e8 78 11 00 00 call 112094 <_Objects_Get>
110f1c: 89 c3 mov %eax,%ebx
Extension_Control *the_extension;
Objects_Locations location;
the_extension = _Extension_Get( id, &location );
switch ( location ) {
110f1e: 83 c4 10 add $0x10,%esp
110f21: 8b 55 f4 mov -0xc(%ebp),%edx
110f24: 85 d2 test %edx,%edx
110f26: 75 38 jne 110f60 <rtems_extension_delete+0x5c>
case OBJECTS_LOCAL:
_User_extensions_Remove_set( &the_extension->Extension );
110f28: 83 ec 0c sub $0xc,%esp
110f2b: 8d 40 10 lea 0x10(%eax),%eax
110f2e: 50 push %eax
110f2f: e8 50 28 00 00 call 113784 <_User_extensions_Remove_set>
_Objects_Close( &_Extension_Information, &the_extension->Object );
110f34: 59 pop %ecx
110f35: 58 pop %eax
110f36: 53 push %ebx
110f37: 68 20 76 13 00 push $0x137620
110f3c: e8 1f 0d 00 00 call 111c60 <_Objects_Close>
RTEMS_INLINE_ROUTINE void _Extension_Free (
Extension_Control *the_extension
)
{
_Objects_Free( &_Extension_Information, &the_extension->Object );
110f41: 58 pop %eax
110f42: 5a pop %edx
110f43: 53 push %ebx
110f44: 68 20 76 13 00 push $0x137620
110f49: e8 16 10 00 00 call 111f64 <_Objects_Free>
_Extension_Free( the_extension );
_Thread_Enable_dispatch();
110f4e: e8 25 1a 00 00 call 112978 <_Thread_Enable_dispatch>
110f53: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
110f55: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110f58: 8b 5d fc mov -0x4(%ebp),%ebx
110f5b: c9 leave
110f5c: c3 ret
110f5d: 8d 76 00 lea 0x0(%esi),%esi
{
Extension_Control *the_extension;
Objects_Locations location;
the_extension = _Extension_Get( id, &location );
switch ( location ) {
110f60: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110f65: 8b 5d fc mov -0x4(%ebp),%ebx
110f68: c9 leave
110f69: c3 ret
00108458 <rtems_filesystem_dirname>:
}
int rtems_filesystem_dirname(
const char *pathname
)
{
108458: 55 push %ebp
108459: 89 e5 mov %esp,%ebp
10845b: 57 push %edi
10845c: 56 push %esi
10845d: 53 push %ebx
10845e: 83 ec 0c sub $0xc,%esp
108461: 8b 55 08 mov 0x8(%ebp),%edx
int len = strlen( pathname );
108464: 31 c0 xor %eax,%eax
108466: b9 ff ff ff ff mov $0xffffffff,%ecx
10846b: 89 d7 mov %edx,%edi
10846d: f2 ae repnz scas %es:(%edi),%al
10846f: f7 d1 not %ecx
while ( len ) {
108471: 89 cb mov %ecx,%ebx
108473: 4b dec %ebx
108474: 74 20 je 108496 <rtems_filesystem_dirname+0x3e><== NEVER TAKEN
108476: 8d 34 1a lea (%edx,%ebx,1),%esi
108479: eb 06 jmp 108481 <rtems_filesystem_dirname+0x29>
10847b: 90 nop
len--;
if ( rtems_filesystem_is_separator( pathname[len] ) )
10847c: 4e dec %esi
const char *pathname
)
{
int len = strlen( pathname );
while ( len ) {
10847d: 85 db test %ebx,%ebx
10847f: 74 15 je 108496 <rtems_filesystem_dirname+0x3e>
len--;
108481: 4b dec %ebx
if ( rtems_filesystem_is_separator( pathname[len] ) )
108482: 83 ec 0c sub $0xc,%esp
108485: 0f be 46 ff movsbl -0x1(%esi),%eax
108489: 50 push %eax
10848a: e8 1d 10 00 00 call 1094ac <rtems_filesystem_is_separator>
10848f: 83 c4 10 add $0x10,%esp
108492: 85 c0 test %eax,%eax
108494: 74 e6 je 10847c <rtems_filesystem_dirname+0x24>
break;
}
return len;
}
108496: 89 d8 mov %ebx,%eax
108498: 8d 65 f4 lea -0xc(%ebp),%esp
10849b: 5b pop %ebx
10849c: 5e pop %esi
10849d: 5f pop %edi
10849e: c9 leave
10849f: c3 ret
00108574 <rtems_filesystem_evaluate_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
108574: 55 push %ebp
108575: 89 e5 mov %esp,%ebp
108577: 56 push %esi
108578: 53 push %ebx
108579: 83 ec 10 sub $0x10,%esp
10857c: 8b 5d 08 mov 0x8(%ebp),%ebx
10857f: 8b 75 14 mov 0x14(%ebp),%esi
int i = 0;
108582: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
/*
* Verify Input parameters.
*/
if ( !pathname )
108589: 85 db test %ebx,%ebx
10858b: 74 45 je 1085d2 <rtems_filesystem_evaluate_path+0x5e><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
10858d: 85 f6 test %esi,%esi
10858f: 74 2f je 1085c0 <rtems_filesystem_evaluate_path+0x4c><== NEVER TAKEN
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
108591: 51 push %ecx
108592: 56 push %esi
108593: 8d 45 f4 lea -0xc(%ebp),%eax
108596: 50 push %eax
108597: 53 push %ebx
108598: e8 ab 0e 00 00 call 109448 <rtems_filesystem_get_start_loc>
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
10859d: 8b 45 f4 mov -0xc(%ebp),%eax
1085a0: 5a pop %edx
1085a1: ff 75 18 pushl 0x18(%ebp)
1085a4: 56 push %esi
1085a5: ff 75 10 pushl 0x10(%ebp)
1085a8: 8b 55 0c mov 0xc(%ebp),%edx
1085ab: 29 c2 sub %eax,%edx
1085ad: 52 push %edx
1085ae: 01 c3 add %eax,%ebx
1085b0: 53 push %ebx
1085b1: e8 ea fe ff ff call 1084a0 <rtems_filesystem_evaluate_relative_path>
1085b6: 83 c4 20 add $0x20,%esp
pathnamelen - i,
flags,
pathloc,
follow_link );
}
1085b9: 8d 65 f8 lea -0x8(%ebp),%esp
1085bc: 5b pop %ebx
1085bd: 5e pop %esi
1085be: c9 leave
1085bf: c3 ret
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
1085c0: e8 3f cb 00 00 call 115104 <__errno> <== NOT EXECUTED
1085c5: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
1085cb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1085d0: eb e7 jmp 1085b9 <rtems_filesystem_evaluate_path+0x45><== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
1085d2: e8 2d cb 00 00 call 115104 <__errno> <== NOT EXECUTED
1085d7: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
1085dd: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1085e2: eb d5 jmp 1085b9 <rtems_filesystem_evaluate_path+0x45><== NOT EXECUTED
001084a0 <rtems_filesystem_evaluate_relative_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
1084a0: 55 push %ebp
1084a1: 89 e5 mov %esp,%ebp
1084a3: 57 push %edi
1084a4: 56 push %esi
1084a5: 53 push %ebx
1084a6: 83 ec 1c sub $0x1c,%esp
1084a9: 8b 45 08 mov 0x8(%ebp),%eax
1084ac: 8b 4d 0c mov 0xc(%ebp),%ecx
1084af: 8b 7d 10 mov 0x10(%ebp),%edi
1084b2: 8b 5d 14 mov 0x14(%ebp),%ebx
1084b5: 8b 55 18 mov 0x18(%ebp),%edx
1084b8: 89 55 e4 mov %edx,-0x1c(%ebp)
/*
* Verify Input parameters.
*/
if ( !pathname )
1084bb: 85 c0 test %eax,%eax
1084bd: 0f 84 8c 00 00 00 je 10854f <rtems_filesystem_evaluate_relative_path+0xaf><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
1084c3: 85 db test %ebx,%ebx
1084c5: 0f 84 96 00 00 00 je 108561 <rtems_filesystem_evaluate_relative_path+0xc1><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
if ( !pathloc->ops->evalpath_h )
1084cb: 8b 53 0c mov 0xc(%ebx),%edx
1084ce: 8b 12 mov (%edx),%edx
1084d0: 85 d2 test %edx,%edx
1084d2: 74 69 je 10853d <rtems_filesystem_evaluate_relative_path+0x9d><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
1084d4: 53 push %ebx
1084d5: 57 push %edi
1084d6: 51 push %ecx
1084d7: 50 push %eax
1084d8: ff d2 call *%edx
1084da: 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 ) {
1084dc: 83 c4 10 add $0x10,%esp
1084df: 85 c0 test %eax,%eax
1084e1: 75 25 jne 108508 <rtems_filesystem_evaluate_relative_path+0x68>
1084e3: 8b 45 e4 mov -0x1c(%ebp),%eax
1084e6: 85 c0 test %eax,%eax
1084e8: 74 1e je 108508 <rtems_filesystem_evaluate_relative_path+0x68>
if ( !pathloc->ops->node_type_h ){
1084ea: 8b 53 0c mov 0xc(%ebx),%edx
1084ed: 8b 42 10 mov 0x10(%edx),%eax
1084f0: 85 c0 test %eax,%eax
1084f2: 74 39 je 10852d <rtems_filesystem_evaluate_relative_path+0x8d><== NEVER TAKEN
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
type = (*pathloc->ops->node_type_h)( pathloc );
1084f4: 83 ec 0c sub $0xc,%esp
1084f7: 53 push %ebx
1084f8: ff d0 call *%eax
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
1084fa: 83 e8 03 sub $0x3,%eax
1084fd: 83 c4 10 add $0x10,%esp
108500: 83 f8 01 cmp $0x1,%eax
108503: 76 0f jbe 108514 <rtems_filesystem_evaluate_relative_path+0x74>
108505: 8d 76 00 lea 0x0(%esi),%esi
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
108508: 89 f0 mov %esi,%eax
10850a: 8d 65 f4 lea -0xc(%ebp),%esp
10850d: 5b pop %ebx
10850e: 5e pop %esi
10850f: 5f pop %edi
108510: c9 leave
108511: c3 ret
108512: 66 90 xchg %ax,%ax
type = (*pathloc->ops->node_type_h)( pathloc );
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
108514: 8b 53 0c mov 0xc(%ebx),%edx
108517: 8b 42 34 mov 0x34(%edx),%eax
10851a: 85 c0 test %eax,%eax
10851c: 74 0f je 10852d <rtems_filesystem_evaluate_relative_path+0x8d><== NEVER TAKEN
* 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 );
10851e: 89 7d 0c mov %edi,0xc(%ebp)
108521: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
return result;
}
108524: 8d 65 f4 lea -0xc(%ebp),%esp
108527: 5b pop %ebx
108528: 5e pop %esi
108529: 5f pop %edi
10852a: 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 );
10852b: ff e0 jmp *%eax
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
rtems_filesystem_freenode( pathloc );
10852d: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
108530: 85 c0 test %eax,%eax <== NOT EXECUTED
108532: 74 09 je 10853d <rtems_filesystem_evaluate_relative_path+0x9d><== NOT EXECUTED
108534: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108537: 53 push %ebx <== NOT EXECUTED
108538: ff d0 call *%eax <== NOT EXECUTED
10853a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
10853d: e8 c2 cb 00 00 call 115104 <__errno> <== NOT EXECUTED
108542: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
108548: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
10854d: eb b9 jmp 108508 <rtems_filesystem_evaluate_relative_path+0x68><== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
10854f: e8 b0 cb 00 00 call 115104 <__errno> <== NOT EXECUTED
108554: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
10855a: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
10855f: eb a7 jmp 108508 <rtems_filesystem_evaluate_relative_path+0x68><== NOT EXECUTED
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
108561: e8 9e cb 00 00 call 115104 <__errno> <== NOT EXECUTED
108566: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
10856c: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
108571: eb 95 jmp 108508 <rtems_filesystem_evaluate_relative_path+0x68><== NOT EXECUTED
00111204 <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
111204: 55 push %ebp
111205: 89 e5 mov %esp,%ebp
111207: 83 ec 18 sub $0x18,%esp
11120a: 8b 45 08 mov 0x8(%ebp),%eax
find_arg fa = {
.type = type,
.mount_h = NULL
};
11120d: 89 45 f0 mov %eax,-0x10(%ebp)
111210: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
if ( type != NULL ) {
111217: 85 c0 test %eax,%eax
111219: 74 17 je 111232 <rtems_filesystem_get_mount_handler+0x2e><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
11121b: 83 ec 08 sub $0x8,%esp
11121e: 8d 45 f0 lea -0x10(%ebp),%eax
111221: 50 push %eax
111222: 68 70 10 11 00 push $0x111070
111227: e8 34 ff ff ff call 111160 <rtems_filesystem_iterate>
11122c: 8b 45 f4 mov -0xc(%ebp),%eax
11122f: 83 c4 10 add $0x10,%esp
}
return fa.mount_h;
}
111232: c9 leave
111233: c3 ret
00111308 <rtems_filesystem_get_sym_start_loc>:
#include "rtems/libio_.h"
void rtems_filesystem_get_sym_start_loc(const char *path,
int *index,
rtems_filesystem_location_info_t *loc)
{
111308: 55 push %ebp
111309: 89 e5 mov %esp,%ebp
11130b: 57 push %edi
11130c: 56 push %esi
11130d: 53 push %ebx
11130e: 83 ec 18 sub $0x18,%esp
111311: 8b 5d 0c mov 0xc(%ebp),%ebx
if (rtems_filesystem_is_separator(path[0])) {
111314: 8b 45 08 mov 0x8(%ebp),%eax
111317: 0f be 00 movsbl (%eax),%eax
11131a: 50 push %eax
11131b: e8 8c 81 ff ff call 1094ac <rtems_filesystem_is_separator>
111320: 83 c4 10 add $0x10,%esp
111323: 85 c0 test %eax,%eax
111325: 75 11 jne 111338 <rtems_filesystem_get_sym_start_loc+0x30>
*loc = rtems_filesystem_root;
*index = 1;
}
else {
*index = 0;
111327: c7 03 00 00 00 00 movl $0x0,(%ebx)
}
}
11132d: 8d 65 f4 lea -0xc(%ebp),%esp
111330: 5b pop %ebx
111331: 5e pop %esi
111332: 5f pop %edi
111333: c9 leave
111334: c3 ret
111335: 8d 76 00 lea 0x0(%esi),%esi
void rtems_filesystem_get_sym_start_loc(const char *path,
int *index,
rtems_filesystem_location_info_t *loc)
{
if (rtems_filesystem_is_separator(path[0])) {
*loc = rtems_filesystem_root;
111338: 8b 35 24 70 12 00 mov 0x127024,%esi
11133e: 83 c6 18 add $0x18,%esi
111341: b9 05 00 00 00 mov $0x5,%ecx
111346: 8b 7d 10 mov 0x10(%ebp),%edi
111349: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*index = 1;
11134b: c7 03 01 00 00 00 movl $0x1,(%ebx)
}
else {
*index = 0;
}
}
111351: 8d 65 f4 lea -0xc(%ebp),%esp
111354: 5b pop %ebx
111355: 5e pop %esi
111356: 5f pop %edi
111357: c9 leave
111358: c3 ret
001082e4 <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 )
{
1082e4: 55 push %ebp
1082e5: 89 e5 mov %esp,%ebp
1082e7: 57 push %edi
1082e8: 56 push %esi
1082e9: 53 push %ebx
1082ea: 83 ec 2c sub $0x2c,%esp
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
1082ed: a1 24 70 12 00 mov 0x127024,%eax
1082f2: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax)
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
1082f9: a1 20 10 12 00 mov 0x121020,%eax
1082fe: 85 c0 test %eax,%eax
108300: 0f 84 9f 00 00 00 je 1083a5 <rtems_filesystem_initialize+0xc1><== NEVER TAKEN
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
108306: a1 54 51 12 00 mov 0x125154,%eax
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
10830b: 83 ec 0c sub $0xc,%esp
10830e: 6a 00 push $0x0
108310: ff 70 04 pushl 0x4(%eax)
108313: ff 30 pushl (%eax)
108315: ff 70 0c pushl 0xc(%eax)
108318: ff 70 08 pushl 0x8(%eax)
10831b: e8 ec 07 00 00 call 108b0c <mount>
if ( status == -1 )
108320: 83 c4 20 add $0x20,%esp
108323: 40 inc %eax
108324: 0f 84 95 00 00 00 je 1083bf <rtems_filesystem_initialize+0xdb><== NEVER TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
10832a: a1 24 70 12 00 mov 0x127024,%eax
10832f: 66 c7 40 30 00 00 movw $0x0,0x30(%eax)
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
108335: 83 ec 0c sub $0xc,%esp
108338: 6a 00 push $0x0
10833a: 8d 5d d4 lea -0x2c(%ebp),%ebx
10833d: 53 push %ebx
10833e: 6a 00 push $0x0
108340: 6a 01 push $0x1
108342: 68 a7 2a 12 00 push $0x122aa7
108347: e8 28 02 00 00 call 108574 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
10834c: 8b 3d 24 70 12 00 mov 0x127024,%edi
108352: 83 c7 18 add $0x18,%edi
108355: b9 05 00 00 00 mov $0x5,%ecx
10835a: 89 de mov %ebx,%esi
10835c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
10835e: 83 c4 14 add $0x14,%esp
108361: 6a 00 push $0x0
108363: 53 push %ebx
108364: 6a 00 push $0x0
108366: 6a 01 push $0x1
108368: 68 a7 2a 12 00 push $0x122aa7
10836d: e8 02 02 00 00 call 108574 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
108372: 8b 3d 24 70 12 00 mov 0x127024,%edi
108378: 83 c7 04 add $0x4,%edi
10837b: b9 05 00 00 00 mov $0x5,%ecx
108380: 89 de mov %ebx,%esi
108382: 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);
108384: 83 c4 18 add $0x18,%esp
108387: 68 ff 01 00 00 push $0x1ff
10838c: 68 a9 2a 12 00 push $0x122aa9
108391: e8 e6 05 00 00 call 10897c <mkdir>
if ( status != 0 )
108396: 83 c4 10 add $0x10,%esp
108399: 85 c0 test %eax,%eax
10839b: 75 15 jne 1083b2 <rtems_filesystem_initialize+0xce><== NEVER TAKEN
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
10839d: 8d 65 f4 lea -0xc(%ebp),%esp
1083a0: 5b pop %ebx
1083a1: 5e pop %esi
1083a2: 5f pop %edi
1083a3: c9 leave
1083a4: c3 ret
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
1083a5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1083a8: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED
1083ad: e8 46 3f 00 00 call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
1083b2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1083b5: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED
1083ba: e8 39 3f 00 00 call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
1083bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1083c2: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED
1083c7: e8 2c 3f 00 00 call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
00111160 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
111160: 55 push %ebp
111161: 89 e5 mov %esp,%ebp
111163: 57 push %edi
111164: 56 push %esi
111165: 53 push %ebx
111166: 83 ec 1c sub $0x1c,%esp
111169: 8b 75 08 mov 0x8(%ebp),%esi
11116c: 8b 7d 0c mov 0xc(%ebp),%edi
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
11116f: 8b 15 00 10 12 00 mov 0x121000,%edx
111175: 85 d2 test %edx,%edx
111177: 74 24 je 11119d <rtems_filesystem_iterate+0x3d><== NEVER TAKEN
111179: bb 00 10 12 00 mov $0x121000,%ebx
11117e: eb 04 jmp 111184 <rtems_filesystem_iterate+0x24>
111180: 84 d2 test %dl,%dl
111182: 75 70 jne 1111f4 <rtems_filesystem_iterate+0x94><== ALWAYS TAKEN
stop = (*routine)( table_entry, routine_arg );
111184: 83 ec 08 sub $0x8,%esp
111187: 57 push %edi
111188: 53 push %ebx
111189: ff d6 call *%esi
11118b: 88 c2 mov %al,%dl
++table_entry;
11118d: 83 c3 08 add $0x8,%ebx
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
111190: 83 c4 10 add $0x10,%esp
111193: 8b 03 mov (%ebx),%eax
111195: 85 c0 test %eax,%eax
111197: 75 e7 jne 111180 <rtems_filesystem_iterate+0x20>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
111199: 84 d2 test %dl,%dl
11119b: 75 57 jne 1111f4 <rtems_filesystem_iterate+0x94>
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 );
11119d: 51 push %ecx
11119e: 6a 00 push $0x0
1111a0: 6a 00 push $0x0
1111a2: ff 35 88 92 12 00 pushl 0x129288
1111a8: e8 37 ab ff ff call 10bce4 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
1111ad: 8b 1d 4c 70 12 00 mov 0x12704c,%ebx
rtems_libio_lock();
for (
1111b3: 83 c4 10 add $0x10,%esp
1111b6: 81 fb 50 70 12 00 cmp $0x127050,%ebx
1111bc: 75 06 jne 1111c4 <rtems_filesystem_iterate+0x64>
1111be: eb 3e jmp 1111fe <rtems_filesystem_iterate+0x9e>
1111c0: 84 c0 test %al,%al
1111c2: 75 19 jne 1111dd <rtems_filesystem_iterate+0x7d>
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
1111c4: 83 ec 08 sub $0x8,%esp
1111c7: 57 push %edi
1111c8: 8d 43 08 lea 0x8(%ebx),%eax
1111cb: 50 push %eax
1111cc: ff d6 call *%esi
1111ce: 88 c2 mov %al,%dl
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
1111d0: 8b 1b mov (%ebx),%ebx
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
1111d2: 83 c4 10 add $0x10,%esp
1111d5: 81 fb 50 70 12 00 cmp $0x127050,%ebx
1111db: 75 e3 jne 1111c0 <rtems_filesystem_iterate+0x60>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
1111dd: 83 ec 0c sub $0xc,%esp
1111e0: ff 35 88 92 12 00 pushl 0x129288
1111e6: 88 55 e4 mov %dl,-0x1c(%ebp)
1111e9: e8 f2 ab ff ff call 10bde0 <rtems_semaphore_release>
1111ee: 83 c4 10 add $0x10,%esp
1111f1: 8a 55 e4 mov -0x1c(%ebp),%dl
}
rtems_libio_unlock();
}
return stop;
}
1111f4: 88 d0 mov %dl,%al
1111f6: 8d 65 f4 lea -0xc(%ebp),%esp
1111f9: 5b pop %ebx
1111fa: 5e pop %esi
1111fb: 5f pop %edi
1111fc: c9 leave
1111fd: c3 ret
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
1111fe: 31 d2 xor %edx,%edx
111200: eb db jmp 1111dd <rtems_filesystem_iterate+0x7d>
00108a9c <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
108a9c: 55 push %ebp
108a9d: 89 e5 mov %esp,%ebp
108a9f: 57 push %edi
108aa0: 56 push %esi
108aa1: 53 push %ebx
108aa2: 83 ec 20 sub $0x20,%esp
108aa5: 8b 7d 08 mov 0x8(%ebp),%edi
108aa8: 8b 75 0c mov 0xc(%ebp),%esi
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 );
108aab: 6a 00 push $0x0
108aad: 6a 00 push $0x0
108aaf: ff 35 88 92 12 00 pushl 0x129288
108ab5: e8 2a 32 00 00 call 10bce4 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
108aba: 8b 1d 04 70 12 00 mov 0x127004,%ebx
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
108ac0: 83 c4 10 add $0x10,%esp
108ac3: 81 fb 08 70 12 00 cmp $0x127008,%ebx
108ac9: 75 09 jne 108ad4 <rtems_filesystem_mount_iterate+0x38><== ALWAYS TAKEN
108acb: eb 3b jmp 108b08 <rtems_filesystem_mount_iterate+0x6c><== NOT EXECUTED
108acd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
108ad0: 84 c0 test %al,%al
108ad2: 75 16 jne 108aea <rtems_filesystem_mount_iterate+0x4e><== NEVER TAKEN
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
108ad4: 83 ec 08 sub $0x8,%esp
108ad7: 56 push %esi
108ad8: 53 push %ebx
108ad9: ff d7 call *%edi
108adb: 88 c2 mov %al,%dl
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
108add: 8b 1b mov (%ebx),%ebx
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
108adf: 83 c4 10 add $0x10,%esp
108ae2: 81 fb 08 70 12 00 cmp $0x127008,%ebx
108ae8: 75 e6 jne 108ad0 <rtems_filesystem_mount_iterate+0x34>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
108aea: 83 ec 0c sub $0xc,%esp
108aed: ff 35 88 92 12 00 pushl 0x129288
108af3: 88 55 e4 mov %dl,-0x1c(%ebp)
108af6: e8 e5 32 00 00 call 10bde0 <rtems_semaphore_release>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
108afb: 8a 55 e4 mov -0x1c(%ebp),%dl
108afe: 88 d0 mov %dl,%al
108b00: 8d 65 f4 lea -0xc(%ebp),%esp
108b03: 5b pop %ebx
108b04: 5e pop %esi
108b05: 5f pop %edi
108b06: c9 leave
108b07: c3 ret
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
108b08: 31 d2 xor %edx,%edx <== NOT EXECUTED
108b0a: eb de jmp 108aea <rtems_filesystem_mount_iterate+0x4e><== NOT EXECUTED
00108408 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
108408: 55 push %ebp
108409: 89 e5 mov %esp,%ebp
10840b: 57 push %edi
10840c: 56 push %esi
10840d: 53 push %ebx
10840e: 83 ec 0c sub $0xc,%esp
108411: 8b 75 08 mov 0x8(%ebp),%esi
108414: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
108417: 8a 06 mov (%esi),%al
108419: 84 c0 test %al,%al
10841b: 74 34 je 108451 <rtems_filesystem_prefix_separators+0x49><== NEVER TAKEN
10841d: 85 ff test %edi,%edi
10841f: 74 30 je 108451 <rtems_filesystem_prefix_separators+0x49><== NEVER TAKEN
108421: 31 db xor %ebx,%ebx
108423: eb 0f jmp 108434 <rtems_filesystem_prefix_separators+0x2c>
108425: 8d 76 00 lea 0x0(%esi),%esi
{
pathname++;
pathnamelen--;
stripped++;
108428: 43 inc %ebx
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
108429: 8a 04 1e mov (%esi,%ebx,1),%al
10842c: 84 c0 test %al,%al
10842e: 74 17 je 108447 <rtems_filesystem_prefix_separators+0x3f><== NEVER TAKEN
108430: 39 df cmp %ebx,%edi
108432: 74 13 je 108447 <rtems_filesystem_prefix_separators+0x3f><== NEVER TAKEN
108434: 83 ec 0c sub $0xc,%esp
108437: 0f be c0 movsbl %al,%eax
10843a: 50 push %eax
10843b: e8 6c 10 00 00 call 1094ac <rtems_filesystem_is_separator>
108440: 83 c4 10 add $0x10,%esp
108443: 85 c0 test %eax,%eax
108445: 75 e1 jne 108428 <rtems_filesystem_prefix_separators+0x20>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
108447: 89 d8 mov %ebx,%eax
108449: 8d 65 f4 lea -0xc(%ebp),%esp
10844c: 5b pop %ebx
10844d: 5e pop %esi
10844e: 5f pop %edi
10844f: c9 leave
108450: c3 ret
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
108451: 31 db xor %ebx,%ebx
108453: eb f2 jmp 108447 <rtems_filesystem_prefix_separators+0x3f><== NOT EXECUTED
00111234 <rtems_filesystem_register>:
int
rtems_filesystem_register(
const char *type,
rtems_filesystem_fsmount_me_t mount_h
)
{
111234: 55 push %ebp
111235: 89 e5 mov %esp,%ebp
111237: 57 push %edi
111238: 56 push %esi
111239: 53 push %ebx
11123a: 83 ec 18 sub $0x18,%esp
11123d: 8b 5d 08 mov 0x8(%ebp),%ebx
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
111240: 31 c0 xor %eax,%eax
111242: b9 ff ff ff ff mov $0xffffffff,%ecx
111247: 89 df mov %ebx,%edi
111249: f2 ae repnz scas %es:(%edi),%al
11124b: f7 d1 not %ecx
filesystem_node *fsn = malloc( fsn_size );
11124d: 83 c1 10 add $0x10,%ecx
111250: 51 push %ecx
111251: e8 66 76 ff ff call 1088bc <malloc>
111256: 89 c6 mov %eax,%esi
char *type_storage = (char *) fsn + sizeof( filesystem_node );
if ( fsn == NULL )
111258: 83 c4 10 add $0x10,%esp
11125b: 85 c0 test %eax,%eax
11125d: 0f 84 92 00 00 00 je 1112f5 <rtems_filesystem_register+0xc1><== NEVER TAKEN
rtems_filesystem_fsmount_me_t mount_h
)
{
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( filesystem_node );
111263: 8d 78 10 lea 0x10(%eax),%edi
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
strcpy(type_storage, type);
111266: 83 ec 08 sub $0x8,%esp
111269: 53 push %ebx
11126a: 57 push %edi
11126b: e8 b4 49 00 00 call 115c24 <strcpy>
fsn->entry.type = type_storage;
111270: 89 7e 08 mov %edi,0x8(%esi)
fsn->entry.mount_h = mount_h;
111273: 8b 45 0c mov 0xc(%ebp),%eax
111276: 89 46 0c mov %eax,0xc(%esi)
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 );
111279: 83 c4 0c add $0xc,%esp
11127c: 6a 00 push $0x0
11127e: 6a 00 push $0x0
111280: ff 35 88 92 12 00 pushl 0x129288
111286: e8 59 aa ff ff call 10bce4 <rtems_semaphore_obtain>
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
11128b: 89 1c 24 mov %ebx,(%esp)
11128e: e8 71 ff ff ff call 111204 <rtems_filesystem_get_mount_handler>
111293: 83 c4 10 add $0x10,%esp
111296: 85 c0 test %eax,%eax
111298: 75 2a jne 1112c4 <rtems_filesystem_register+0x90><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
11129a: 83 ec 08 sub $0x8,%esp
11129d: 56 push %esi
11129e: 68 4c 70 12 00 push $0x12704c
1112a3: e8 2c b3 ff ff call 10c5d4 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
1112a8: 59 pop %ecx
1112a9: ff 35 88 92 12 00 pushl 0x129288
1112af: e8 2c ab ff ff call 10bde0 <rtems_semaphore_release>
1112b4: 31 c0 xor %eax,%eax
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_unlock();
return 0;
1112b6: 83 c4 10 add $0x10,%esp
}
1112b9: 8d 65 f4 lea -0xc(%ebp),%esp
1112bc: 5b pop %ebx
1112bd: 5e pop %esi
1112be: 5f pop %edi
1112bf: c9 leave
1112c0: c3 ret
1112c1: 8d 76 00 lea 0x0(%esi),%esi
1112c4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1112c7: ff 35 88 92 12 00 pushl 0x129288 <== NOT EXECUTED
1112cd: e8 0e ab ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
rtems_chain_append( &filesystem_chain, &fsn->node );
} else {
rtems_libio_unlock();
free( fsn );
1112d2: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
1112d5: e8 0a 73 ff ff call 1085e4 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
1112da: e8 25 3e 00 00 call 115104 <__errno> <== NOT EXECUTED
1112df: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
1112e5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1112ea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_libio_unlock();
return 0;
}
1112ed: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1112f0: 5b pop %ebx <== NOT EXECUTED
1112f1: 5e pop %esi <== NOT EXECUTED
1112f2: 5f pop %edi <== NOT EXECUTED
1112f3: c9 leave <== NOT EXECUTED
1112f4: c3 ret <== NOT EXECUTED
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( filesystem_node );
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
1112f5: e8 0a 3e 00 00 call 115104 <__errno> <== NOT EXECUTED
1112fa: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
111300: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
111305: eb b2 jmp 1112b9 <rtems_filesystem_register+0x85><== NOT EXECUTED
001110ac <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
1110ac: 55 push %ebp <== NOT EXECUTED
1110ad: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1110af: 56 push %esi <== NOT EXECUTED
1110b0: 53 push %ebx <== NOT EXECUTED
1110b1: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
rtems_chain_node *node = NULL;
if ( type == NULL ) {
1110b4: 85 f6 test %esi,%esi <== NOT EXECUTED
1110b6: 0f 84 94 00 00 00 je 111150 <rtems_filesystem_unregister+0xa4><== NOT EXECUTED
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
1110bc: 52 push %edx <== NOT EXECUTED
1110bd: 6a 00 push $0x0 <== NOT EXECUTED
1110bf: 6a 00 push $0x0 <== NOT EXECUTED
1110c1: ff 35 88 92 12 00 pushl 0x129288 <== NOT EXECUTED
1110c7: e8 18 ac ff ff call 10bce4 <rtems_semaphore_obtain><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
1110cc: 8b 1d 4c 70 12 00 mov 0x12704c,%ebx <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
1110d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1110d5: 81 fb 50 70 12 00 cmp $0x127050,%ebx <== NOT EXECUTED
1110db: 75 0d jne 1110ea <rtems_filesystem_unregister+0x3e><== NOT EXECUTED
1110dd: eb 49 jmp 111128 <rtems_filesystem_unregister+0x7c><== NOT EXECUTED
1110df: 90 nop <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
1110e0: 8b 1b mov (%ebx),%ebx <== NOT EXECUTED
1110e2: 81 fb 50 70 12 00 cmp $0x127050,%ebx <== NOT EXECUTED
1110e8: 74 3e je 111128 <rtems_filesystem_unregister+0x7c><== NOT EXECUTED
!rtems_chain_is_tail( &filesystem_chain, node );
node = rtems_chain_next( node )
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
1110ea: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1110ed: 56 push %esi <== NOT EXECUTED
1110ee: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
1110f1: e8 d6 4a 00 00 call 115bcc <strcmp> <== NOT EXECUTED
1110f6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1110f9: 85 c0 test %eax,%eax <== NOT EXECUTED
1110fb: 75 e3 jne 1110e0 <rtems_filesystem_unregister+0x34><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
1110fd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111100: 53 push %ebx <== NOT EXECUTED
111101: e8 f2 b4 ff ff call 10c5f8 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract( node );
free( fsn );
111106: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
111109: e8 d6 74 ff ff call 1085e4 <free> <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
11110e: 58 pop %eax <== NOT EXECUTED
11110f: ff 35 88 92 12 00 pushl 0x129288 <== NOT EXECUTED
111115: e8 c6 ac ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
11111a: 31 c0 xor %eax,%eax <== NOT EXECUTED
rtems_libio_unlock();
return 0;
11111c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
11111f: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
111122: 5b pop %ebx <== NOT EXECUTED
111123: 5e pop %esi <== NOT EXECUTED
111124: c9 leave <== NOT EXECUTED
111125: c3 ret <== NOT EXECUTED
111126: 66 90 xchg %ax,%ax <== NOT EXECUTED
111128: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11112b: ff 35 88 92 12 00 pushl 0x129288 <== NOT EXECUTED
111131: e8 aa ac ff ff call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
111136: e8 c9 3f 00 00 call 115104 <__errno> <== NOT EXECUTED
11113b: c7 00 02 00 00 00 movl $0x2,(%eax) <== NOT EXECUTED
111141: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
111146: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
111149: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
11114c: 5b pop %ebx <== NOT EXECUTED
11114d: 5e pop %esi <== NOT EXECUTED
11114e: c9 leave <== NOT EXECUTED
11114f: c3 ret <== NOT EXECUTED
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
111150: e8 af 3f 00 00 call 115104 <__errno> <== NOT EXECUTED
111155: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
11115b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
11115e: eb e9 jmp 111149 <rtems_filesystem_unregister+0x9d><== NOT EXECUTED
0010da70 <rtems_fsmount>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
10da70: 55 push %ebp <== NOT EXECUTED
10da71: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10da73: 57 push %edi <== NOT EXECUTED
10da74: 56 push %esi <== NOT EXECUTED
10da75: 53 push %ebx <== NOT EXECUTED
10da76: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10da79: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
bool terminate = false;
/*
* scan through all fstab entries;
*/
while (!terminate &&
10da7c: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
10da7f: 85 d2 test %edx,%edx <== NOT EXECUTED
10da81: 0f 84 09 01 00 00 je 10db90 <rtems_fsmount+0x120> <== NOT EXECUTED
10da87: 31 ff xor %edi,%edi <== NOT EXECUTED
10da89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
tmp_rc = 0;
/*
* create mount point
*/
if (tmp_rc == 0) {
tmp_rc = rtems_mkdir(fstab_ptr->target, S_IRWXU | S_IRWXG | S_IRWXO);
10da8c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10da8f: 68 ff 01 00 00 push $0x1ff <== NOT EXECUTED
10da94: ff 73 04 pushl 0x4(%ebx) <== NOT EXECUTED
10da97: e8 68 22 00 00 call 10fd04 <rtems_mkdir> <== NOT EXECUTED
10da9c: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (tmp_rc != 0) {
10da9e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10daa1: 85 c0 test %eax,%eax <== NOT EXECUTED
10daa3: 74 23 je 10dac8 <rtems_fsmount+0x58> <== NOT EXECUTED
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNTPNT_CRTERR)) {
10daa5: f6 43 10 02 testb $0x2,0x10(%ebx) <== NOT EXECUTED
10daa9: 75 55 jne 10db00 <rtems_fsmount+0x90> <== NOT EXECUTED
fprintf(stdout,"fsmount: creation of mount point \"%s\" failed: %s\n",
fstab_ptr->target,
strerror(errno));
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNTPNT_CRTERR)) {
10daab: f6 43 12 02 testb $0x2,0x12(%ebx) <== NOT EXECUTED
10daaf: 74 43 je 10daf4 <rtems_fsmount+0x84> <== NOT EXECUTED
if (!terminate) {
fstab_ptr++;
fstab_idx++;
}
}
if (fail_idx != NULL) {
10dab1: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
10dab4: 85 c0 test %eax,%eax <== NOT EXECUTED
10dab6: 74 05 je 10dabd <rtems_fsmount+0x4d> <== NOT EXECUTED
*fail_idx = fstab_idx;
10dab8: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
10dabb: 89 38 mov %edi,(%eax) <== NOT EXECUTED
}
return rc;
}
10dabd: 89 f0 mov %esi,%eax <== NOT EXECUTED
10dabf: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10dac2: 5b pop %ebx <== NOT EXECUTED
10dac3: 5e pop %esi <== NOT EXECUTED
10dac4: 5f pop %edi <== NOT EXECUTED
10dac5: c9 leave <== NOT EXECUTED
10dac6: c3 ret <== NOT EXECUTED
10dac7: 90 nop <== NOT EXECUTED
}
/*
* mount device to given mount point
*/
if (tmp_rc == 0) {
tmp_rc = mount(fstab_ptr->source,
10dac8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10dacb: 6a 00 push $0x0 <== NOT EXECUTED
10dacd: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
10dad0: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
10dad3: ff 73 04 pushl 0x4(%ebx) <== NOT EXECUTED
10dad6: ff 33 pushl (%ebx) <== NOT EXECUTED
10dad8: e8 23 16 00 00 call 10f100 <mount> <== NOT EXECUTED
10dadd: 89 c6 mov %eax,%esi <== NOT EXECUTED
fstab_ptr->target,
fstab_ptr->type,
fstab_ptr->options,
NULL);
if (tmp_rc != 0) {
10dadf: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10dae2: 85 c0 test %eax,%eax <== NOT EXECUTED
10dae4: 74 46 je 10db2c <rtems_fsmount+0xbc> <== NOT EXECUTED
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_FAILED)) {
10dae6: f6 43 10 04 testb $0x4,0x10(%ebx) <== NOT EXECUTED
10daea: 75 54 jne 10db40 <rtems_fsmount+0xd0> <== NOT EXECUTED
" \"%s\" failed: %s\n",
fstab_ptr->source,
fstab_ptr->target,
strerror(errno));
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_FAILED)) {
10daec: f6 43 12 04 testb $0x4,0x12(%ebx) <== NOT EXECUTED
10daf0: 75 bf jne 10dab1 <rtems_fsmount+0x41> <== NOT EXECUTED
10daf2: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* proceed to next entry
*/
if (!terminate) {
fstab_ptr++;
fstab_idx++;
10daf4: 47 inc %edi <== NOT EXECUTED
bool terminate = false;
/*
* scan through all fstab entries;
*/
while (!terminate &&
10daf5: 39 7d 0c cmp %edi,0xc(%ebp) <== NOT EXECUTED
10daf8: 76 3e jbe 10db38 <rtems_fsmount+0xc8> <== NOT EXECUTED
}
/*
* proceed to next entry
*/
if (!terminate) {
fstab_ptr++;
10dafa: 83 c3 14 add $0x14,%ebx <== NOT EXECUTED
10dafd: eb 8d jmp 10da8c <rtems_fsmount+0x1c> <== NOT EXECUTED
10daff: 90 nop <== NOT EXECUTED
*/
if (tmp_rc == 0) {
tmp_rc = rtems_mkdir(fstab_ptr->target, S_IRWXU | S_IRWXG | S_IRWXO);
if (tmp_rc != 0) {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNTPNT_CRTERR)) {
fprintf(stdout,"fsmount: creation of mount point \"%s\" failed: %s\n",
10db00: e8 7b a0 03 00 call 147b80 <__errno> <== NOT EXECUTED
10db05: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10db08: ff 30 pushl (%eax) <== NOT EXECUTED
10db0a: e8 1d fa 03 00 call 14d52c <strerror> <== NOT EXECUTED
10db0f: 50 push %eax <== NOT EXECUTED
10db10: ff 73 04 pushl 0x4(%ebx) <== NOT EXECUTED
10db13: 68 c0 0a 16 00 push $0x160ac0 <== NOT EXECUTED
10db18: a1 60 fb 16 00 mov 0x16fb60,%eax <== NOT EXECUTED
10db1d: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
10db20: e8 db a9 03 00 call 148500 <fprintf> <== NOT EXECUTED
10db25: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10db28: eb 81 jmp 10daab <rtems_fsmount+0x3b> <== NOT EXECUTED
10db2a: 66 90 xchg %ax,%ax <== NOT EXECUTED
terminate = true;
rc = tmp_rc;
}
}
else {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_OK)) {
10db2c: f6 43 10 01 testb $0x1,0x10(%ebx) <== NOT EXECUTED
10db30: 75 42 jne 10db74 <rtems_fsmount+0x104> <== NOT EXECUTED
fprintf(stdout,"fsmount: mounting of \"%s\" to"
" \"%s\" succeeded\n",
fstab_ptr->source,
fstab_ptr->target);
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_OK)) {
10db32: f6 43 12 01 testb $0x1,0x12(%ebx) <== NOT EXECUTED
10db36: 74 bc je 10daf4 <rtems_fsmount+0x84> <== NOT EXECUTED
tmp_rc = mount(fstab_ptr->source,
fstab_ptr->target,
fstab_ptr->type,
fstab_ptr->options,
NULL);
if (tmp_rc != 0) {
10db38: 31 f6 xor %esi,%esi <== NOT EXECUTED
10db3a: e9 72 ff ff ff jmp 10dab1 <rtems_fsmount+0x41> <== NOT EXECUTED
10db3f: 90 nop <== NOT EXECUTED
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_FAILED)) {
fprintf(stdout,"fsmount: mounting of \"%s\" to"
10db40: e8 3b a0 03 00 call 147b80 <__errno> <== NOT EXECUTED
10db45: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10db48: ff 30 pushl (%eax) <== NOT EXECUTED
10db4a: e8 dd f9 03 00 call 14d52c <strerror> <== NOT EXECUTED
10db4f: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10db52: ff 73 04 pushl 0x4(%ebx) <== NOT EXECUTED
10db55: ff 33 pushl (%ebx) <== NOT EXECUTED
10db57: 68 f4 0a 16 00 push $0x160af4 <== NOT EXECUTED
10db5c: a1 60 fb 16 00 mov 0x16fb60,%eax <== NOT EXECUTED
10db61: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
10db64: e8 97 a9 03 00 call 148500 <fprintf> <== NOT EXECUTED
10db69: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10db6c: e9 7b ff ff ff jmp 10daec <rtems_fsmount+0x7c> <== NOT EXECUTED
10db71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rc = tmp_rc;
}
}
else {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_OK)) {
fprintf(stdout,"fsmount: mounting of \"%s\" to"
10db74: ff 73 04 pushl 0x4(%ebx) <== NOT EXECUTED
10db77: ff 33 pushl (%ebx) <== NOT EXECUTED
10db79: 68 24 0b 16 00 push $0x160b24 <== NOT EXECUTED
10db7e: a1 60 fb 16 00 mov 0x16fb60,%eax <== NOT EXECUTED
10db83: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
10db86: e8 75 a9 03 00 call 148500 <fprintf> <== NOT EXECUTED
10db8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10db8e: eb a2 jmp 10db32 <rtems_fsmount+0xc2> <== NOT EXECUTED
bool terminate = false;
/*
* scan through all fstab entries;
*/
while (!terminate &&
10db90: 31 ff xor %edi,%edi <== NOT EXECUTED
10db92: 31 f6 xor %esi,%esi <== NOT EXECUTED
10db94: e9 18 ff ff ff jmp 10dab1 <rtems_fsmount+0x41> <== NOT EXECUTED
00114d00 <rtems_io_close>:
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
114d00: 55 push %ebp
114d01: 89 e5 mov %esp,%ebp
114d03: 56 push %esi
114d04: 53 push %ebx
114d05: 8b 45 08 mov 0x8(%ebp),%eax
114d08: 8b 4d 0c mov 0xc(%ebp),%ecx
114d0b: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114d0e: 39 05 60 9e 12 00 cmp %eax,0x129e60
114d14: 76 22 jbe 114d38 <rtems_io_close+0x38>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
114d16: 8d 34 40 lea (%eax,%eax,2),%esi
114d19: 8b 15 64 9e 12 00 mov 0x129e64,%edx
114d1f: 8b 54 f2 08 mov 0x8(%edx,%esi,8),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114d23: 85 d2 test %edx,%edx
114d25: 74 1d je 114d44 <rtems_io_close+0x44>
114d27: 89 5d 10 mov %ebx,0x10(%ebp)
114d2a: 89 4d 0c mov %ecx,0xc(%ebp)
114d2d: 89 45 08 mov %eax,0x8(%ebp)
}
114d30: 5b pop %ebx
114d31: 5e pop %esi
114d32: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114d33: ff e2 jmp *%edx
114d35: 8d 76 00 lea 0x0(%esi),%esi
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114d38: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
114d3d: 5b pop %ebx
114d3e: 5e pop %esi
114d3f: c9 leave
114d40: c3 ret
114d41: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114d44: 31 c0 xor %eax,%eax
}
114d46: 5b pop %ebx
114d47: 5e pop %esi
114d48: c9 leave
114d49: c3 ret
00114d4c <rtems_io_control>:
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
114d4c: 55 push %ebp
114d4d: 89 e5 mov %esp,%ebp
114d4f: 56 push %esi
114d50: 53 push %ebx
114d51: 8b 45 08 mov 0x8(%ebp),%eax
114d54: 8b 4d 0c mov 0xc(%ebp),%ecx
114d57: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114d5a: 39 05 60 9e 12 00 cmp %eax,0x129e60
114d60: 76 22 jbe 114d84 <rtems_io_control+0x38>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
114d62: 8d 34 40 lea (%eax,%eax,2),%esi
114d65: 8b 15 64 9e 12 00 mov 0x129e64,%edx
114d6b: 8b 54 f2 14 mov 0x14(%edx,%esi,8),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114d6f: 85 d2 test %edx,%edx
114d71: 74 1d je 114d90 <rtems_io_control+0x44>
114d73: 89 5d 10 mov %ebx,0x10(%ebp)
114d76: 89 4d 0c mov %ecx,0xc(%ebp)
114d79: 89 45 08 mov %eax,0x8(%ebp)
}
114d7c: 5b pop %ebx
114d7d: 5e pop %esi
114d7e: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114d7f: ff e2 jmp *%edx
114d81: 8d 76 00 lea 0x0(%esi),%esi
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114d84: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
114d89: 5b pop %ebx
114d8a: 5e pop %esi
114d8b: c9 leave
114d8c: c3 ret
114d8d: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114d90: 31 c0 xor %eax,%eax
}
114d92: 5b pop %ebx
114d93: 5e pop %esi
114d94: c9 leave
114d95: c3 ret
00111f5c <rtems_io_initialize>:
rtems_status_code rtems_io_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
111f5c: 55 push %ebp
111f5d: 89 e5 mov %esp,%ebp
111f5f: 56 push %esi
111f60: 53 push %ebx
111f61: 8b 45 08 mov 0x8(%ebp),%eax
111f64: 8b 4d 0c mov 0xc(%ebp),%ecx
111f67: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
111f6a: 39 05 60 9e 12 00 cmp %eax,0x129e60
111f70: 76 1e jbe 111f90 <rtems_io_initialize+0x34>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
111f72: 8d 34 40 lea (%eax,%eax,2),%esi
111f75: 8b 15 64 9e 12 00 mov 0x129e64,%edx
111f7b: 8b 14 f2 mov (%edx,%esi,8),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
111f7e: 85 d2 test %edx,%edx
111f80: 74 1a je 111f9c <rtems_io_initialize+0x40>
111f82: 89 5d 10 mov %ebx,0x10(%ebp)
111f85: 89 4d 0c mov %ecx,0xc(%ebp)
111f88: 89 45 08 mov %eax,0x8(%ebp)
}
111f8b: 5b pop %ebx
111f8c: 5e pop %esi
111f8d: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
111f8e: ff e2 jmp *%edx
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
111f90: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
111f95: 5b pop %ebx
111f96: 5e pop %esi
111f97: c9 leave
111f98: c3 ret
111f99: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
111f9c: 31 c0 xor %eax,%eax
}
111f9e: 5b pop %ebx
111f9f: 5e pop %esi
111fa0: c9 leave
111fa1: c3 ret
00108178 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
108178: 55 push %ebp <== NOT EXECUTED
108179: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10817b: 57 push %edi <== NOT EXECUTED
10817c: 56 push %esi <== NOT EXECUTED
10817d: 53 push %ebx <== NOT EXECUTED
10817e: 83 ec 48 sub $0x48,%esp <== NOT EXECUTED
108181: 8b 75 08 mov 0x8(%ebp),%esi <== 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 );
108184: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
108189: 89 f7 mov %esi,%edi <== NOT EXECUTED
10818b: 31 c0 xor %eax,%eax <== NOT EXECUTED
10818d: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
10818f: f7 d1 not %ecx <== NOT EXECUTED
108191: 49 dec %ecx <== NOT EXECUTED
108192: 6a 01 push $0x1 <== NOT EXECUTED
108194: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED
108197: 53 push %ebx <== NOT EXECUTED
108198: 6a 00 push $0x0 <== NOT EXECUTED
10819a: 51 push %ecx <== NOT EXECUTED
10819b: 56 push %esi <== NOT EXECUTED
10819c: e8 d3 03 00 00 call 108574 <rtems_filesystem_evaluate_path><== NOT EXECUTED
1081a1: 89 c7 mov %eax,%edi <== NOT EXECUTED
the_jnode = loc.node_access;
1081a3: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
1081a6: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
1081a9: 8b 41 10 mov 0x10(%ecx),%eax <== NOT EXECUTED
1081ac: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1081af: 85 c0 test %eax,%eax <== NOT EXECUTED
1081b1: 74 41 je 1081f4 <rtems_io_lookup_name+0x7c><== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
1081b3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1081b6: 53 push %ebx <== NOT EXECUTED
1081b7: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED
1081ba: ff d0 call *%eax <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
1081bc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1081bf: 85 ff test %edi,%edi <== NOT EXECUTED
1081c1: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
1081c4: 74 56 je 10821c <rtems_io_lookup_name+0xa4><== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1081c6: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
1081c9: 85 c0 test %eax,%eax <== NOT EXECUTED
1081cb: 0f 84 93 00 00 00 je 108264 <rtems_io_lookup_name+0xec><== NOT EXECUTED
1081d1: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
1081d4: 85 c0 test %eax,%eax <== NOT EXECUTED
1081d6: 0f 84 88 00 00 00 je 108264 <rtems_io_lookup_name+0xec><== NOT EXECUTED
1081dc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1081df: 53 push %ebx <== NOT EXECUTED
1081e0: ff d0 call *%eax <== NOT EXECUTED
1081e2: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
1081e7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
1081ea: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1081ed: 5b pop %ebx <== NOT EXECUTED
1081ee: 5e pop %esi <== NOT EXECUTED
1081ef: 5f pop %edi <== NOT EXECUTED
1081f0: c9 leave <== NOT EXECUTED
1081f1: c3 ret <== NOT EXECUTED
1081f2: 66 90 xchg %ax,%ax <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
1081f4: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED
1081f7: 85 c0 test %eax,%eax <== NOT EXECUTED
1081f9: 74 09 je 108204 <rtems_io_lookup_name+0x8c><== NOT EXECUTED
1081fb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1081fe: 53 push %ebx <== NOT EXECUTED
1081ff: ff d0 call *%eax <== NOT EXECUTED
108201: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
108204: e8 fb ce 00 00 call 115104 <__errno> <== NOT EXECUTED
108209: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10820f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
108214: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108217: 5b pop %ebx <== NOT EXECUTED
108218: 5e pop %esi <== NOT EXECUTED
108219: 5f pop %edi <== NOT EXECUTED
10821a: c9 leave <== NOT EXECUTED
10821b: c3 ret <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
10821c: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
10821f: 75 a5 jne 1081c6 <rtems_io_lookup_name+0x4e><== NOT EXECUTED
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
108221: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
108224: 89 31 mov %esi,(%ecx) <== NOT EXECUTED
device_info->device_name_length = strlen( name );
108226: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
10822b: 89 f7 mov %esi,%edi <== NOT EXECUTED
10822d: 31 c0 xor %eax,%eax <== NOT EXECUTED
10822f: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
108231: f7 d1 not %ecx <== NOT EXECUTED
108233: 49 dec %ecx <== NOT EXECUTED
108234: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
108237: 89 48 04 mov %ecx,0x4(%eax) <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
10823a: 8b 42 50 mov 0x50(%edx),%eax <== NOT EXECUTED
10823d: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
108240: 89 41 08 mov %eax,0x8(%ecx) <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
108243: 8b 42 54 mov 0x54(%edx),%eax <== NOT EXECUTED
108246: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
108249: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10824c: 85 c0 test %eax,%eax <== NOT EXECUTED
10824e: 74 21 je 108271 <rtems_io_lookup_name+0xf9><== NOT EXECUTED
108250: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
108253: 85 c0 test %eax,%eax <== NOT EXECUTED
108255: 74 1a je 108271 <rtems_io_lookup_name+0xf9><== NOT EXECUTED
108257: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10825a: 53 push %ebx <== NOT EXECUTED
10825b: ff d0 call *%eax <== NOT EXECUTED
10825d: 31 c0 xor %eax,%eax <== NOT EXECUTED
10825f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108262: eb 86 jmp 1081ea <rtems_io_lookup_name+0x72><== NOT EXECUTED
108264: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
108269: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10826c: 5b pop %ebx <== NOT EXECUTED
10826d: 5e pop %esi <== NOT EXECUTED
10826e: 5f pop %edi <== NOT EXECUTED
10826f: c9 leave <== NOT EXECUTED
108270: c3 ret <== NOT EXECUTED
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
108271: 31 c0 xor %eax,%eax <== NOT EXECUTED
108273: e9 72 ff ff ff jmp 1081ea <rtems_io_lookup_name+0x72><== NOT EXECUTED
00114d98 <rtems_io_open>:
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
114d98: 55 push %ebp
114d99: 89 e5 mov %esp,%ebp
114d9b: 56 push %esi
114d9c: 53 push %ebx
114d9d: 8b 45 08 mov 0x8(%ebp),%eax
114da0: 8b 4d 0c mov 0xc(%ebp),%ecx
114da3: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114da6: 39 05 60 9e 12 00 cmp %eax,0x129e60
114dac: 76 22 jbe 114dd0 <rtems_io_open+0x38>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
114dae: 8d 34 40 lea (%eax,%eax,2),%esi
114db1: 8b 15 64 9e 12 00 mov 0x129e64,%edx
114db7: 8b 54 f2 04 mov 0x4(%edx,%esi,8),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114dbb: 85 d2 test %edx,%edx
114dbd: 74 1d je 114ddc <rtems_io_open+0x44>
114dbf: 89 5d 10 mov %ebx,0x10(%ebp)
114dc2: 89 4d 0c mov %ecx,0xc(%ebp)
114dc5: 89 45 08 mov %eax,0x8(%ebp)
}
114dc8: 5b pop %ebx
114dc9: 5e pop %esi
114dca: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114dcb: ff e2 jmp *%edx
114dcd: 8d 76 00 lea 0x0(%esi),%esi
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114dd0: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
114dd5: 5b pop %ebx
114dd6: 5e pop %esi
114dd7: c9 leave
114dd8: c3 ret
114dd9: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114ddc: 31 c0 xor %eax,%eax
}
114dde: 5b pop %ebx
114ddf: 5e pop %esi
114de0: c9 leave
114de1: c3 ret
00114de4 <rtems_io_read>:
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
114de4: 55 push %ebp
114de5: 89 e5 mov %esp,%ebp
114de7: 56 push %esi
114de8: 53 push %ebx
114de9: 8b 45 08 mov 0x8(%ebp),%eax
114dec: 8b 4d 0c mov 0xc(%ebp),%ecx
114def: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114df2: 39 05 60 9e 12 00 cmp %eax,0x129e60
114df8: 76 22 jbe 114e1c <rtems_io_read+0x38>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
114dfa: 8d 34 40 lea (%eax,%eax,2),%esi
114dfd: 8b 15 64 9e 12 00 mov 0x129e64,%edx
114e03: 8b 54 f2 0c mov 0xc(%edx,%esi,8),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114e07: 85 d2 test %edx,%edx
114e09: 74 1d je 114e28 <rtems_io_read+0x44>
114e0b: 89 5d 10 mov %ebx,0x10(%ebp)
114e0e: 89 4d 0c mov %ecx,0xc(%ebp)
114e11: 89 45 08 mov %eax,0x8(%ebp)
}
114e14: 5b pop %ebx
114e15: 5e pop %esi
114e16: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114e17: ff e2 jmp *%edx
114e19: 8d 76 00 lea 0x0(%esi),%esi
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114e1c: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
114e21: 5b pop %ebx
114e22: 5e pop %esi
114e23: c9 leave
114e24: c3 ret
114e25: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114e28: 31 c0 xor %eax,%eax
}
114e2a: 5b pop %ebx
114e2b: 5e pop %esi
114e2c: c9 leave
114e2d: c3 ret
0010d530 <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
10d530: 55 push %ebp
10d531: 89 e5 mov %esp,%ebp
10d533: 57 push %edi
10d534: 56 push %esi
10d535: 53 push %ebx
10d536: 83 ec 0c sub $0xc,%esp
10d539: 8b 5d 08 mov 0x8(%ebp),%ebx
10d53c: 8b 75 0c mov 0xc(%ebp),%esi
10d53f: 8b 55 10 mov 0x10(%ebp),%edx
rtems_device_major_number major_limit = _IO_Number_of_drivers;
10d542: a1 80 cf 12 00 mov 0x12cf80,%eax
if ( rtems_interrupt_is_in_progress() )
10d547: 8b 0d b4 c5 12 00 mov 0x12c5b4,%ecx
10d54d: 85 c9 test %ecx,%ecx
10d54f: 0f 85 ab 00 00 00 jne 10d600 <rtems_io_register_driver+0xd0>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
10d555: 85 d2 test %edx,%edx
10d557: 0f 84 e3 00 00 00 je 10d640 <rtems_io_register_driver+0x110>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
10d55d: 89 02 mov %eax,(%edx)
if ( driver_table == NULL )
10d55f: 85 f6 test %esi,%esi
10d561: 0f 84 d9 00 00 00 je 10d640 <rtems_io_register_driver+0x110>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d567: 8b 3e mov (%esi),%edi
10d569: 85 ff test %edi,%edi
10d56b: 0f 84 c3 00 00 00 je 10d634 <rtems_io_register_driver+0x104>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
10d571: 39 d8 cmp %ebx,%eax
10d573: 76 7b jbe 10d5f0 <rtems_io_register_driver+0xc0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10d575: a1 18 c5 12 00 mov 0x12c518,%eax
10d57a: 40 inc %eax
10d57b: a3 18 c5 12 00 mov %eax,0x12c518
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
10d580: 85 db test %ebx,%ebx
10d582: 0f 85 88 00 00 00 jne 10d610 <rtems_io_register_driver+0xe0>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
10d588: 8b 0d 80 cf 12 00 mov 0x12cf80,%ecx
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
10d58e: 85 c9 test %ecx,%ecx
10d590: 0f 84 b7 00 00 00 je 10d64d <rtems_io_register_driver+0x11d><== NEVER TAKEN
10d596: 8b 3d 84 cf 12 00 mov 0x12cf84,%edi
10d59c: 89 f8 mov %edi,%eax
10d59e: eb 08 jmp 10d5a8 <rtems_io_register_driver+0x78>
10d5a0: 43 inc %ebx
10d5a1: 83 c0 18 add $0x18,%eax
10d5a4: 39 d9 cmp %ebx,%ecx
10d5a6: 76 0b jbe 10d5b3 <rtems_io_register_driver+0x83>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d5a8: 83 38 00 cmpl $0x0,(%eax)
10d5ab: 75 f3 jne 10d5a0 <rtems_io_register_driver+0x70>
10d5ad: 83 78 04 00 cmpl $0x0,0x4(%eax)
10d5b1: 75 ed jne 10d5a0 <rtems_io_register_driver+0x70>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d5b3: 89 1a mov %ebx,(%edx)
if ( m != n )
10d5b5: 39 d9 cmp %ebx,%ecx
10d5b7: 0f 84 97 00 00 00 je 10d654 <rtems_io_register_driver+0x124>
10d5bd: 8d 04 5b lea (%ebx,%ebx,2),%eax
10d5c0: 8d 04 c7 lea (%edi,%eax,8),%eax
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
10d5c3: b9 06 00 00 00 mov $0x6,%ecx
10d5c8: 89 c7 mov %eax,%edi
10d5ca: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Thread_Enable_dispatch();
10d5cc: e8 1b 1a 00 00 call 10efec <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
10d5d1: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp)
10d5d8: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp)
10d5df: 89 5d 08 mov %ebx,0x8(%ebp)
}
10d5e2: 83 c4 0c add $0xc,%esp
10d5e5: 5b pop %ebx
10d5e6: 5e pop %esi
10d5e7: 5f pop %edi
10d5e8: c9 leave
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
10d5e9: e9 32 87 00 00 jmp 115d20 <rtems_io_initialize>
10d5ee: 66 90 xchg %ax,%ax
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
10d5f0: b8 0a 00 00 00 mov $0xa,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d5f5: 83 c4 0c add $0xc,%esp
10d5f8: 5b pop %ebx
10d5f9: 5e pop %esi
10d5fa: 5f pop %edi
10d5fb: c9 leave
10d5fc: c3 ret
10d5fd: 8d 76 00 lea 0x0(%esi),%esi
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
10d600: b8 12 00 00 00 mov $0x12,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d605: 83 c4 0c add $0xc,%esp
10d608: 5b pop %ebx
10d609: 5e pop %esi
10d60a: 5f pop %edi
10d60b: c9 leave
10d60c: c3 ret
10d60d: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
10d610: 8d 04 5b lea (%ebx,%ebx,2),%eax
10d613: c1 e0 03 shl $0x3,%eax
10d616: 03 05 84 cf 12 00 add 0x12cf84,%eax
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d61c: 8b 38 mov (%eax),%edi
10d61e: 85 ff test %edi,%edi
10d620: 74 3e je 10d660 <rtems_io_register_driver+0x130>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
10d622: e8 c5 19 00 00 call 10efec <_Thread_Enable_dispatch>
10d627: b8 0c 00 00 00 mov $0xc,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d62c: 83 c4 0c add $0xc,%esp
10d62f: 5b pop %ebx
10d630: 5e pop %esi
10d631: 5f pop %edi
10d632: c9 leave
10d633: c3 ret
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d634: 8b 4e 04 mov 0x4(%esi),%ecx
10d637: 85 c9 test %ecx,%ecx
10d639: 0f 85 32 ff ff ff jne 10d571 <rtems_io_register_driver+0x41>
10d63f: 90 nop
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
10d640: b8 09 00 00 00 mov $0x9,%eax
}
10d645: 83 c4 0c add $0xc,%esp
10d648: 5b pop %ebx
10d649: 5e pop %esi
10d64a: 5f pop %edi
10d64b: c9 leave
10d64c: c3 ret
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d64d: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
10d653: 90 nop <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
10d654: e8 93 19 00 00 call 10efec <_Thread_Enable_dispatch>
10d659: b8 05 00 00 00 mov $0x5,%eax
return sc;
10d65e: eb 95 jmp 10d5f5 <rtems_io_register_driver+0xc5>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d660: 8b 48 04 mov 0x4(%eax),%ecx
10d663: 85 c9 test %ecx,%ecx
10d665: 75 bb jne 10d622 <rtems_io_register_driver+0xf2>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
10d667: 89 1a mov %ebx,(%edx)
10d669: e9 55 ff ff ff jmp 10d5c3 <rtems_io_register_driver+0x93>
0010d670 <rtems_io_unregister_driver>:
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
10d670: 55 push %ebp
10d671: 89 e5 mov %esp,%ebp
10d673: 57 push %edi
10d674: 83 ec 04 sub $0x4,%esp
10d677: 8b 45 08 mov 0x8(%ebp),%eax
if ( rtems_interrupt_is_in_progress() )
10d67a: 8b 15 b4 c5 12 00 mov 0x12c5b4,%edx
10d680: 85 d2 test %edx,%edx
10d682: 75 44 jne 10d6c8 <rtems_io_unregister_driver+0x58>
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
10d684: 39 05 80 cf 12 00 cmp %eax,0x12cf80
10d68a: 77 0c ja 10d698 <rtems_io_unregister_driver+0x28>
10d68c: b8 0d 00 00 00 mov $0xd,%eax
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
10d691: 5a pop %edx
10d692: 5f pop %edi
10d693: c9 leave
10d694: c3 ret
10d695: 8d 76 00 lea 0x0(%esi),%esi
10d698: 8b 15 18 c5 12 00 mov 0x12c518,%edx
10d69e: 42 inc %edx
10d69f: 89 15 18 c5 12 00 mov %edx,0x12c518
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
_Thread_Disable_dispatch();
memset(
10d6a5: 8d 14 40 lea (%eax,%eax,2),%edx
10d6a8: c1 e2 03 shl $0x3,%edx
10d6ab: 03 15 84 cf 12 00 add 0x12cf84,%edx
10d6b1: b9 18 00 00 00 mov $0x18,%ecx
10d6b6: 31 c0 xor %eax,%eax
10d6b8: 89 d7 mov %edx,%edi
10d6ba: f3 aa rep stos %al,%es:(%edi)
&_IO_Driver_address_table[major],
0,
sizeof( rtems_driver_address_table )
);
_Thread_Enable_dispatch();
10d6bc: e8 2b 19 00 00 call 10efec <_Thread_Enable_dispatch>
10d6c1: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
10d6c3: 5a pop %edx
10d6c4: 5f pop %edi
10d6c5: c9 leave
10d6c6: c3 ret
10d6c7: 90 nop
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( rtems_interrupt_is_in_progress() )
10d6c8: b8 12 00 00 00 mov $0x12,%eax
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
10d6cd: 5a pop %edx
10d6ce: 5f pop %edi
10d6cf: c9 leave
10d6d0: c3 ret
00114e30 <rtems_io_write>:
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
114e30: 55 push %ebp
114e31: 89 e5 mov %esp,%ebp
114e33: 56 push %esi
114e34: 53 push %ebx
114e35: 8b 45 08 mov 0x8(%ebp),%eax
114e38: 8b 4d 0c mov 0xc(%ebp),%ecx
114e3b: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114e3e: 39 05 60 9e 12 00 cmp %eax,0x129e60
114e44: 76 22 jbe 114e68 <rtems_io_write+0x38>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
114e46: 8d 34 40 lea (%eax,%eax,2),%esi
114e49: 8b 15 64 9e 12 00 mov 0x129e64,%edx
114e4f: 8b 54 f2 10 mov 0x10(%edx,%esi,8),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114e53: 85 d2 test %edx,%edx
114e55: 74 1d je 114e74 <rtems_io_write+0x44>
114e57: 89 5d 10 mov %ebx,0x10(%ebp)
114e5a: 89 4d 0c mov %ecx,0xc(%ebp)
114e5d: 89 45 08 mov %eax,0x8(%ebp)
}
114e60: 5b pop %ebx
114e61: 5e pop %esi
114e62: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114e63: ff e2 jmp *%edx
114e65: 8d 76 00 lea 0x0(%esi),%esi
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114e68: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
114e6d: 5b pop %ebx
114e6e: 5e pop %esi
114e6f: c9 leave
114e70: c3 ret
114e71: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114e74: 31 c0 xor %eax,%eax
}
114e76: 5b pop %ebx
114e77: 5e pop %esi
114e78: c9 leave
114e79: c3 ret
0010e548 <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)
{
10e548: 55 push %ebp
10e549: 89 e5 mov %esp,%ebp
10e54b: 57 push %edi
10e54c: 56 push %esi
10e54d: 53 push %ebx
10e54e: 83 ec 1c sub $0x1c,%esp
10e551: 8b 7d 08 mov 0x8(%ebp),%edi
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10e554: 85 ff test %edi,%edi
10e556: 74 4d je 10e5a5 <rtems_iterate_over_all_threads+0x5d><== NEVER TAKEN
10e558: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp)
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
10e55f: 8b 55 e4 mov -0x1c(%ebp),%edx
10e562: 8b 04 95 4c ce 12 00 mov 0x12ce4c(,%edx,4),%eax
10e569: 85 c0 test %eax,%eax
10e56b: 74 2f je 10e59c <rtems_iterate_over_all_threads+0x54>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
10e56d: 8b 70 04 mov 0x4(%eax),%esi
if ( !information )
10e570: 85 f6 test %esi,%esi
10e572: 74 28 je 10e59c <rtems_iterate_over_all_threads+0x54>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10e574: 66 83 7e 10 00 cmpw $0x0,0x10(%esi)
10e579: 74 21 je 10e59c <rtems_iterate_over_all_threads+0x54>
10e57b: bb 01 00 00 00 mov $0x1,%ebx
the_thread = (Thread_Control *)information->local_table[ i ];
10e580: 8b 46 1c mov 0x1c(%esi),%eax
10e583: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !the_thread )
10e586: 85 c0 test %eax,%eax
10e588: 74 09 je 10e593 <rtems_iterate_over_all_threads+0x4b><== NEVER TAKEN
continue;
(*routine)(the_thread);
10e58a: 83 ec 0c sub $0xc,%esp
10e58d: 50 push %eax
10e58e: ff d7 call *%edi
10e590: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10e593: 43 inc %ebx
10e594: 0f b7 46 10 movzwl 0x10(%esi),%eax
10e598: 39 d8 cmp %ebx,%eax
10e59a: 73 e4 jae 10e580 <rtems_iterate_over_all_threads+0x38>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10e59c: ff 45 e4 incl -0x1c(%ebp)
10e59f: 83 7d e4 05 cmpl $0x5,-0x1c(%ebp)
10e5a3: 75 ba jne 10e55f <rtems_iterate_over_all_threads+0x17>
(*routine)(the_thread);
}
}
}
10e5a5: 8d 65 f4 lea -0xc(%ebp),%esp
10e5a8: 5b pop %ebx
10e5a9: 5e pop %esi
10e5aa: 5f pop %edi
10e5ab: c9 leave
10e5ac: c3 ret
00110fac <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 )
{
110fac: 55 push %ebp
110fad: 89 e5 mov %esp,%ebp
110faf: 57 push %edi
110fb0: 53 push %ebx
110fb1: 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 );
110fb4: 6a 00 push $0x0
110fb6: 6a 00 push $0x0
110fb8: ff 35 88 92 12 00 pushl 0x129288
110fbe: e8 21 ad ff ff call 10bce4 <rtems_semaphore_obtain>
rtems_status_code rc;
rtems_id sema;
rtems_libio_lock();
if (rtems_libio_iop_freelist) {
110fc3: a1 84 92 12 00 mov 0x129284,%eax
110fc8: 83 c4 10 add $0x10,%esp
110fcb: 85 c0 test %eax,%eax
110fcd: 75 19 jne 110fe8 <rtems_libio_allocate+0x3c>
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
iop->flags = LIBIO_FLAGS_OPEN;
iop->sem = sema;
rtems_libio_iop_freelist = next;
goto done;
110fcf: 31 db xor %ebx,%ebx
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
110fd1: 83 ec 0c sub $0xc,%esp
110fd4: ff 35 88 92 12 00 pushl 0x129288
110fda: e8 01 ae ff ff call 10bde0 <rtems_semaphore_release>
iop = 0;
done:
rtems_libio_unlock();
return iop;
}
110fdf: 89 d8 mov %ebx,%eax
110fe1: 8d 65 f8 lea -0x8(%ebp),%esp
110fe4: 5b pop %ebx
110fe5: 5f pop %edi
110fe6: c9 leave
110fe7: c3 ret
rtems_id sema;
rtems_libio_lock();
if (rtems_libio_iop_freelist) {
rc = rtems_semaphore_create(
110fe8: 83 ec 0c sub $0xc,%esp
110feb: 8d 55 f4 lea -0xc(%ebp),%edx
110fee: 52 push %edx
110fef: 6a 00 push $0x0
110ff1: 6a 54 push $0x54
110ff3: 6a 01 push $0x1
110ff5: 2b 05 80 92 12 00 sub 0x129280,%eax
110ffb: c1 f8 06 sar $0x6,%eax
110ffe: 0d 00 49 42 4c or $0x4c424900,%eax
111003: 50 push %eax
111004: e8 63 aa ff ff call 10ba6c <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
0,
&sema
);
if (rc != RTEMS_SUCCESSFUL)
111009: 83 c4 20 add $0x20,%esp
11100c: 85 c0 test %eax,%eax
11100e: 75 bf jne 110fcf <rtems_libio_allocate+0x23><== NEVER TAKEN
goto failed;
iop = rtems_libio_iop_freelist;
111010: 8b 1d 84 92 12 00 mov 0x129284,%ebx
next = iop->data1;
111016: 8b 53 34 mov 0x34(%ebx),%edx
(void) memset( iop, 0, sizeof(rtems_libio_t) );
111019: b9 40 00 00 00 mov $0x40,%ecx
11101e: 89 df mov %ebx,%edi
111020: f3 aa rep stos %al,%es:(%edi)
iop->flags = LIBIO_FLAGS_OPEN;
111022: c7 43 14 00 01 00 00 movl $0x100,0x14(%ebx)
iop->sem = sema;
111029: 8b 45 f4 mov -0xc(%ebp),%eax
11102c: 89 43 2c mov %eax,0x2c(%ebx)
rtems_libio_iop_freelist = next;
11102f: 89 15 84 92 12 00 mov %edx,0x129284
goto done;
111035: eb 9a jmp 110fd1 <rtems_libio_allocate+0x25>
00110f54 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
110f54: 55 push %ebp
110f55: 89 e5 mov %esp,%ebp
110f57: 53 push %ebx
110f58: 83 ec 08 sub $0x8,%esp
110f5b: 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 );
110f5e: 6a 00 push $0x0
110f60: 6a 00 push $0x0
110f62: ff 35 88 92 12 00 pushl 0x129288
110f68: e8 77 ad ff ff call 10bce4 <rtems_semaphore_obtain>
rtems_libio_lock();
if (iop->sem)
110f6d: 8b 43 2c mov 0x2c(%ebx),%eax
110f70: 83 c4 10 add $0x10,%esp
110f73: 85 c0 test %eax,%eax
110f75: 74 0c je 110f83 <rtems_libio_free+0x2f> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
110f77: 83 ec 0c sub $0xc,%esp
110f7a: 50 push %eax
110f7b: e8 c0 ac ff ff call 10bc40 <rtems_semaphore_delete>
110f80: 83 c4 10 add $0x10,%esp
iop->flags &= ~LIBIO_FLAGS_OPEN;
110f83: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx)
iop->data1 = rtems_libio_iop_freelist;
110f8a: a1 84 92 12 00 mov 0x129284,%eax
110f8f: 89 43 34 mov %eax,0x34(%ebx)
rtems_libio_iop_freelist = iop;
110f92: 89 1d 84 92 12 00 mov %ebx,0x129284
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
110f98: a1 88 92 12 00 mov 0x129288,%eax
110f9d: 89 45 08 mov %eax,0x8(%ebp)
rtems_libio_unlock();
}
110fa0: 8b 5d fc mov -0x4(%ebp),%ebx
110fa3: c9 leave
110fa4: e9 37 ae ff ff jmp 10bde0 <rtems_semaphore_release>
001086e8 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
1086e8: 55 push %ebp
1086e9: 89 e5 mov %esp,%ebp
1086eb: 53 push %ebx
1086ec: 83 ec 04 sub $0x4,%esp
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
1086ef: a1 4c 51 12 00 mov 0x12514c,%eax
1086f4: 85 c0 test %eax,%eax
1086f6: 74 4d je 108745 <rtems_libio_init+0x5d> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
1086f8: 83 ec 08 sub $0x8,%esp
1086fb: 6a 40 push $0x40
1086fd: 50 push %eax
1086fe: e8 c9 fc ff ff call 1083cc <calloc>
108703: 89 c2 mov %eax,%edx
108705: a3 80 92 12 00 mov %eax,0x129280
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
10870a: 83 c4 10 add $0x10,%esp
10870d: 85 c0 test %eax,%eax
10870f: 74 71 je 108782 <rtems_libio_init+0x9a> <== NEVER TAKEN
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
108711: a3 84 92 12 00 mov %eax,0x129284
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
108716: 8b 1d 4c 51 12 00 mov 0x12514c,%ebx
10871c: 83 fb 01 cmp $0x1,%ebx
10871f: 76 1d jbe 10873e <rtems_libio_init+0x56> <== NEVER TAKEN
108721: 8d 50 40 lea 0x40(%eax),%edx
108724: b9 01 00 00 00 mov $0x1,%ecx
108729: 8d 76 00 lea 0x0(%esi),%esi
iop->data1 = iop + 1;
10872c: 89 52 f4 mov %edx,-0xc(%edx)
10872f: 83 c2 40 add $0x40,%edx
108732: 41 inc %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++)
108733: 39 d9 cmp %ebx,%ecx
108735: 75 f5 jne 10872c <rtems_libio_init+0x44>
108737: c1 e1 06 shl $0x6,%ecx
10873a: 8d 54 01 c0 lea -0x40(%ecx,%eax,1),%edx
iop->data1 = iop + 1;
iop->data1 = NULL;
10873e: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
108745: 83 ec 0c sub $0xc,%esp
108748: 68 88 92 12 00 push $0x129288
10874d: 6a 00 push $0x0
10874f: 6a 54 push $0x54
108751: 6a 01 push $0x1
108753: 68 4f 49 42 4c push $0x4c42494f
108758: e8 0f 33 00 00 call 10ba6c <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
10875d: 83 c4 20 add $0x20,%esp
108760: 85 c0 test %eax,%eax
108762: 75 15 jne 108779 <rtems_libio_init+0x91> <== NEVER TAKEN
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
108764: a1 48 51 12 00 mov 0x125148,%eax
108769: 85 c0 test %eax,%eax
10876b: 74 07 je 108774 <rtems_libio_init+0x8c> <== NEVER TAKEN
(* rtems_fs_init_helper)();
}
10876d: 8b 5d fc mov -0x4(%ebp),%ebx
108770: c9 leave
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
108771: ff e0 jmp *%eax
108773: 90 nop
}
108774: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
108777: c9 leave <== NOT EXECUTED
108778: c3 ret <== NOT EXECUTED
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
108779: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10877c: 50 push %eax <== NOT EXECUTED
10877d: e8 76 3b 00 00 call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
108782: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108785: 6a 1a push $0x1a <== NOT EXECUTED
108787: e8 6c 3b 00 00 call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
00110e8c <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
110e8c: 55 push %ebp
110e8d: 89 e5 mov %esp,%ebp
110e8f: 53 push %ebx
110e90: 83 ec 08 sub $0x8,%esp
110e93: 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 );
110e96: 6a 00 push $0x0
110e98: 6a 00 push $0x0
110e9a: ff 35 88 92 12 00 pushl 0x129288
110ea0: e8 3f ae ff ff call 10bce4 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
110ea5: a1 80 92 12 00 mov 0x129280,%eax
110eaa: 8b 0d 4c 51 12 00 mov 0x12514c,%ecx
110eb0: 83 c4 10 add $0x10,%esp
110eb3: 85 c9 test %ecx,%ecx
110eb5: 74 18 je 110ecf <rtems_libio_is_file_open+0x43><== NEVER TAKEN
110eb7: 31 d2 xor %edx,%edx
110eb9: eb 04 jmp 110ebf <rtems_libio_is_file_open+0x33>
110ebb: 90 nop
110ebc: 83 c0 40 add $0x40,%eax
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
110ebf: f6 40 15 01 testb $0x1,0x15(%eax)
110ec3: 74 05 je 110eca <rtems_libio_is_file_open+0x3e>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
110ec5: 39 58 18 cmp %ebx,0x18(%eax)
110ec8: 74 1e je 110ee8 <rtems_libio_is_file_open+0x5c>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
110eca: 42 inc %edx
110ecb: 39 ca cmp %ecx,%edx
110ecd: 72 ed jb 110ebc <rtems_libio_is_file_open+0x30>
110ecf: 31 db xor %ebx,%ebx
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
110ed1: 83 ec 0c sub $0xc,%esp
110ed4: ff 35 88 92 12 00 pushl 0x129288
110eda: e8 01 af ff ff call 10bde0 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
110edf: 89 d8 mov %ebx,%eax
110ee1: 8b 5d fc mov -0x4(%ebp),%ebx
110ee4: c9 leave
110ee5: c3 ret
110ee6: 66 90 xchg %ax,%ax
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
110ee8: bb 01 00 00 00 mov $0x1,%ebx
110eed: eb e2 jmp 110ed1 <rtems_libio_is_file_open+0x45>
00110ef0 <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
110ef0: 55 push %ebp
110ef1: 89 e5 mov %esp,%ebp
110ef3: 53 push %ebx
110ef4: 83 ec 08 sub $0x8,%esp
110ef7: 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 );
110efa: 6a 00 push $0x0
110efc: 6a 00 push $0x0
110efe: ff 35 88 92 12 00 pushl 0x129288
110f04: e8 db ad ff ff call 10bce4 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
110f09: a1 80 92 12 00 mov 0x129280,%eax
110f0e: 8b 0d 4c 51 12 00 mov 0x12514c,%ecx
110f14: 83 c4 10 add $0x10,%esp
110f17: 85 c9 test %ecx,%ecx
110f19: 74 18 je 110f33 <rtems_libio_is_open_files_in_fs+0x43><== NEVER TAKEN
110f1b: 31 d2 xor %edx,%edx
110f1d: eb 04 jmp 110f23 <rtems_libio_is_open_files_in_fs+0x33>
110f1f: 90 nop
110f20: 83 c0 40 add $0x40,%eax
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
110f23: f6 40 15 01 testb $0x1,0x15(%eax)
110f27: 74 05 je 110f2e <rtems_libio_is_open_files_in_fs+0x3e>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
110f29: 39 58 28 cmp %ebx,0x28(%eax)
110f2c: 74 1e je 110f4c <rtems_libio_is_open_files_in_fs+0x5c>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
110f2e: 42 inc %edx
110f2f: 39 ca cmp %ecx,%edx
110f31: 72 ed jb 110f20 <rtems_libio_is_open_files_in_fs+0x30>
110f33: 31 db xor %ebx,%ebx
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
110f35: 83 ec 0c sub $0xc,%esp
110f38: ff 35 88 92 12 00 pushl 0x129288
110f3e: e8 9d ae ff ff call 10bde0 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
110f43: 89 d8 mov %ebx,%eax
110f45: 8b 5d fc mov -0x4(%ebp),%ebx
110f48: c9 leave
110f49: c3 ret
110f4a: 66 90 xchg %ax,%ax
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
110f4c: bb 01 00 00 00 mov $0x1,%ebx
110f51: eb e2 jmp 110f35 <rtems_libio_is_open_files_in_fs+0x45>
0012f9fc <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
12f9fc: 55 push %ebp
12f9fd: 89 e5 mov %esp,%ebp
12f9ff: 57 push %edi
12fa00: 56 push %esi
12fa01: 53 push %ebx
12fa02: 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);
12fa05: 8d 45 e4 lea -0x1c(%ebp),%eax
12fa08: 50 push %eax
12fa09: 6a 00 push $0x0
12fa0b: 6a 00 push $0x0
12fa0d: e8 de 17 00 00 call 1311f0 <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
12fa12: 83 c4 10 add $0x10,%esp
12fa15: 85 c0 test %eax,%eax
12fa17: 75 75 jne 12fa8e <rtems_libio_set_private_env+0x92><== NEVER TAKEN
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
12fa19: 8b 1d 20 f3 16 00 mov 0x16f320,%ebx
12fa1f: 81 fb 40 4e 17 00 cmp $0x174e40,%ebx
12fa25: 74 71 je 12fa98 <rtems_libio_set_private_env+0x9c>
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
12fa27: be 40 4e 17 00 mov $0x174e40,%esi
12fa2c: b9 12 00 00 00 mov $0x12,%ecx
12fa31: 89 df mov %ebx,%edi
12fa33: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_current_user_env->task_id=task_id; /* mark the local values*/
12fa35: 8b 45 e4 mov -0x1c(%ebp),%eax
12fa38: 89 03 mov %eax,(%ebx)
* what we are trying to do here is forking off
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
12fa3a: 83 ec 0c sub $0xc,%esp
12fa3d: 6a 00 push $0x0
12fa3f: 8d 5d d0 lea -0x30(%ebp),%ebx
12fa42: 53 push %ebx
12fa43: 6a 00 push $0x0
12fa45: 6a 01 push $0x1
12fa47: 68 c6 b7 16 00 push $0x16b7c6
12fa4c: e8 a7 ed fd ff call 10e7f8 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
12fa51: 8b 3d 20 f3 16 00 mov 0x16f320,%edi
12fa57: 83 c7 18 add $0x18,%edi
12fa5a: b9 05 00 00 00 mov $0x5,%ecx
12fa5f: 89 de mov %ebx,%esi
12fa61: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
12fa63: 83 c4 14 add $0x14,%esp
12fa66: 6a 00 push $0x0
12fa68: 53 push %ebx
12fa69: 6a 00 push $0x0
12fa6b: 6a 01 push $0x1
12fa6d: 68 c6 b7 16 00 push $0x16b7c6
12fa72: e8 81 ed fd ff call 10e7f8 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
12fa77: 8b 3d 20 f3 16 00 mov 0x16f320,%edi
12fa7d: 83 c7 04 add $0x4,%edi
12fa80: b9 05 00 00 00 mov $0x5,%ecx
12fa85: 89 de mov %ebx,%esi
12fa87: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
12fa89: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
12fa8b: 83 c4 20 add $0x20,%esp
}
12fa8e: 8d 65 f4 lea -0xc(%ebp),%esp
12fa91: 5b pop %ebx
12fa92: 5e pop %esi
12fa93: 5f pop %edi
12fa94: c9 leave
12fa95: c3 ret
12fa96: 66 90 xchg %ax,%ax
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
12fa98: 83 ec 0c sub $0xc,%esp
12fa9b: 6a 48 push $0x48
12fa9d: e8 66 f3 fd ff call 10ee08 <malloc>
12faa2: 89 c3 mov %eax,%ebx
if (!tmp)
12faa4: 83 c4 10 add $0x10,%esp
12faa7: 85 c0 test %eax,%eax
12faa9: 74 25 je 12fad0 <rtems_libio_set_private_env+0xd4><== NEVER TAKEN
#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);
12faab: 51 push %ecx
12faac: 68 08 f9 12 00 push $0x12f908
12fab1: 68 20 f3 16 00 push $0x16f320
12fab6: 6a 00 push $0x0
12fab8: e8 c7 19 00 00 call 131484 <rtems_task_variable_add>
if (sc != RTEMS_SUCCESSFUL) {
12fabd: 83 c4 10 add $0x10,%esp
12fac0: 85 c0 test %eax,%eax
12fac2: 75 14 jne 12fad8 <rtems_libio_set_private_env+0xdc><== NEVER TAKEN
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
12fac4: 89 1d 20 f3 16 00 mov %ebx,0x16f320
12faca: e9 58 ff ff ff jmp 12fa27 <rtems_libio_set_private_env+0x2b>
12facf: 90 nop
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
if (!tmp)
12fad0: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED
12fad5: eb b7 jmp 12fa8e <rtems_libio_set_private_env+0x92><== NOT EXECUTED
12fad7: 90 nop <== NOT EXECUTED
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
if (sc != RTEMS_SUCCESSFUL) {
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
12fad8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12fadb: 53 push %ebx <== NOT EXECUTED
12fadc: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED
12fadf: e8 84 ed fd ff call 10e868 <free> <== NOT EXECUTED
return sc;
12fae4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12fae7: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
12faea: eb a2 jmp 12fa8e <rtems_libio_set_private_env+0x92><== NOT EXECUTED
0012f964 <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) {
12f964: 55 push %ebp <== NOT EXECUTED
12f965: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12f967: 53 push %ebx <== NOT EXECUTED
12f968: 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);
12f96b: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
12f96e: 50 push %eax <== NOT EXECUTED
12f96f: 6a 00 push $0x0 <== NOT EXECUTED
12f971: 6a 00 push $0x0 <== NOT EXECUTED
12f973: e8 78 18 00 00 call 1311f0 <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
12f978: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12f97b: 85 c0 test %eax,%eax <== NOT EXECUTED
12f97d: 75 30 jne 12f9af <rtems_libio_share_private_env+0x4b><== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
12f97f: 8b 1d 20 f3 16 00 mov 0x16f320,%ebx <== NOT EXECUTED
12f985: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
12f987: 3b 45 f0 cmp -0x10(%ebp),%eax <== NOT EXECUTED
12f98a: 74 28 je 12f9b4 <rtems_libio_share_private_env+0x50><== NOT EXECUTED
free_user_env(tmp);
};
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
12f98c: 52 push %edx <== NOT EXECUTED
12f98d: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
12f990: 50 push %eax <== NOT EXECUTED
12f991: 68 20 f3 16 00 push $0x16f320 <== NOT EXECUTED
12f996: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12f999: e8 36 1c 00 00 call 1315d4 <rtems_task_variable_get><== NOT EXECUTED
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
12f99e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12f9a1: 85 c0 test %eax,%eax <== NOT EXECUTED
12f9a3: 74 33 je 12f9d8 <rtems_libio_share_private_env+0x74><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
12f9a5: c7 05 20 f3 16 00 40 movl $0x174e40,0x16f320 <== NOT EXECUTED
12f9ac: 4e 17 00
return sc;
}
12f9af: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
12f9b2: c9 leave <== NOT EXECUTED
12f9b3: c3 ret <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
if (rtems_current_user_env->task_id==current_task_id) {
/* 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);
12f9b4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12f9b7: 68 20 f3 16 00 push $0x16f320 <== NOT EXECUTED
12f9bc: 6a 00 push $0x0 <== NOT EXECUTED
12f9be: e8 85 1b 00 00 call 131548 <rtems_task_variable_delete><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
12f9c3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12f9c6: 85 c0 test %eax,%eax <== NOT EXECUTED
12f9c8: 75 e5 jne 12f9af <rtems_libio_share_private_env+0x4b><== NOT EXECUTED
free_user_env(tmp);
12f9ca: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12f9cd: 53 push %ebx <== NOT EXECUTED
12f9ce: e8 35 ff ff ff call 12f908 <free_user_env> <== NOT EXECUTED
12f9d3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12f9d6: eb b4 jmp 12f98c <rtems_libio_share_private_env+0x28><== NOT EXECUTED
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
12f9d8: 50 push %eax <== NOT EXECUTED
12f9d9: 68 08 f9 12 00 push $0x12f908 <== NOT EXECUTED
12f9de: 68 20 f3 16 00 push $0x16f320 <== NOT EXECUTED
12f9e3: 6a 00 push $0x0 <== NOT EXECUTED
12f9e5: e8 9a 1a 00 00 call 131484 <rtems_task_variable_add><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
12f9ea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12f9ed: 85 c0 test %eax,%eax <== NOT EXECUTED
12f9ef: 75 b4 jne 12f9a5 <rtems_libio_share_private_env+0x41><== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
12f9f1: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED
12f9f4: 89 15 20 f3 16 00 mov %edx,0x16f320 <== NOT EXECUTED
/* increase the reference count */
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
12f9fa: eb b3 jmp 12f9af <rtems_libio_share_private_env+0x4b><== NOT EXECUTED
00110e4c <rtems_libio_to_fcntl_flags>:
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
110e4c: 55 push %ebp
110e4d: 89 e5 mov %esp,%ebp
110e4f: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
110e52: 89 d0 mov %edx,%eax
110e54: 83 e0 06 and $0x6,%eax
110e57: 83 f8 06 cmp $0x6,%eax
110e5a: 74 2c je 110e88 <rtems_libio_to_fcntl_flags+0x3c><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
110e5c: f6 c2 02 test $0x2,%dl
110e5f: 75 23 jne 110e84 <rtems_libio_to_fcntl_flags+0x38><== ALWAYS TAKEN
110e61: 89 d0 mov %edx,%eax <== NOT EXECUTED
110e63: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED
110e66: 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 ) {
110e69: f6 c2 01 test $0x1,%dl
110e6c: 74 03 je 110e71 <rtems_libio_to_fcntl_flags+0x25>
fcntl_flags |= O_NONBLOCK;
110e6e: 80 cc 40 or $0x40,%ah
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
110e71: f6 c6 02 test $0x2,%dh
110e74: 74 03 je 110e79 <rtems_libio_to_fcntl_flags+0x2d>
fcntl_flags |= O_APPEND;
110e76: 83 c8 08 or $0x8,%eax
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
110e79: 80 e6 04 and $0x4,%dh
110e7c: 74 03 je 110e81 <rtems_libio_to_fcntl_flags+0x35>
fcntl_flags |= O_CREAT;
110e7e: 80 cc 02 or $0x2,%ah
}
return fcntl_flags;
}
110e81: c9 leave
110e82: c3 ret
110e83: 90 nop
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
110e84: 31 c0 xor %eax,%eax
110e86: eb e1 jmp 110e69 <rtems_libio_to_fcntl_flags+0x1d>
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
110e88: b0 02 mov $0x2,%al <== NOT EXECUTED
110e8a: eb dd jmp 110e69 <rtems_libio_to_fcntl_flags+0x1d><== NOT EXECUTED
0010eec8 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
10eec8: 55 push %ebp
10eec9: 89 e5 mov %esp,%ebp
10eecb: 83 ec 1c sub $0x1c,%esp
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
10eece: 8d 45 f4 lea -0xc(%ebp),%eax
10eed1: 50 push %eax
10eed2: ff 75 08 pushl 0x8(%ebp)
10eed5: ff 35 58 d1 16 00 pushl 0x16d158
10eedb: e8 b0 60 00 00 call 114f90 <_Protected_heap_Get_block_size>
10eee0: 83 c4 10 add $0x10,%esp
10eee3: 84 c0 test %al,%al
10eee5: 74 11 je 10eef8 <rtems_malloc_statistics_at_free+0x30><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
10eee7: 8b 45 f4 mov -0xc(%ebp),%eax
10eeea: 31 d2 xor %edx,%edx
10eeec: 01 05 24 4e 17 00 add %eax,0x174e24
10eef2: 11 15 28 4e 17 00 adc %edx,0x174e28
}
}
10eef8: c9 leave
10eef9: c3 ret
0010eefc <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
10eefc: 55 push %ebp
10eefd: 89 e5 mov %esp,%ebp
10eeff: 83 ec 18 sub $0x18,%esp
10ef02: 8b 45 08 mov 0x8(%ebp),%eax
uintptr_t actual_size = 0;
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
10ef05: 85 c0 test %eax,%eax
10ef07: 74 4a je 10ef53 <rtems_malloc_statistics_at_malloc+0x57><== NEVER TAKEN
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
uintptr_t actual_size = 0;
10ef09: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
10ef10: 52 push %edx
10ef11: 8d 55 f4 lea -0xc(%ebp),%edx
10ef14: 52 push %edx
10ef15: 50 push %eax
10ef16: ff 35 58 d1 16 00 pushl 0x16d158
10ef1c: e8 6f 60 00 00 call 114f90 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
10ef21: 8b 45 f4 mov -0xc(%ebp),%eax
10ef24: 31 d2 xor %edx,%edx
10ef26: 03 05 1c 4e 17 00 add 0x174e1c,%eax
10ef2c: 13 15 20 4e 17 00 adc 0x174e20,%edx
10ef32: a3 1c 4e 17 00 mov %eax,0x174e1c
10ef37: 89 15 20 4e 17 00 mov %edx,0x174e20
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
10ef3d: 2b 05 24 4e 17 00 sub 0x174e24,%eax
if (current_depth > s->max_depth)
10ef43: 83 c4 10 add $0x10,%esp
10ef46: 3b 05 18 4e 17 00 cmp 0x174e18,%eax
10ef4c: 76 05 jbe 10ef53 <rtems_malloc_statistics_at_malloc+0x57>
s->max_depth = current_depth;
10ef4e: a3 18 4e 17 00 mov %eax,0x174e18
}
10ef53: c9 leave
10ef54: c3 ret
00114e98 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
114e98: 55 push %ebp
114e99: 89 e5 mov %esp,%ebp
114e9b: 53 push %ebx
114e9c: 83 ec 14 sub $0x14,%esp
114e9f: 8b 5d 08 mov 0x8(%ebp),%ebx
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
114ea2: 85 db test %ebx,%ebx
114ea4: 74 5b je 114f01 <rtems_memalign+0x69>
return EINVAL;
*pointer = NULL;
114ea6: 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()) &&
114eac: 83 3d e0 c6 12 00 03 cmpl $0x3,0x12c6e0
114eb3: 74 43 je 114ef8 <rtems_memalign+0x60>
/*
*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
114eb5: e8 d2 47 ff ff call 10968c <malloc_deferred_frees_process>
uintptr_t size,
uintptr_t alignment
)
{
return
_Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 );
114eba: 6a 00 push $0x0
114ebc: ff 75 0c pushl 0xc(%ebp)
114ebf: ff 75 10 pushl 0x10(%ebp)
114ec2: ff 35 58 81 12 00 pushl 0x128158
114ec8: e8 f3 9a ff ff call 10e9c0 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
114ecd: 83 c4 10 add $0x10,%esp
114ed0: 85 c0 test %eax,%eax
114ed2: 74 38 je 114f0c <rtems_memalign+0x74>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
114ed4: 8b 15 a8 a6 12 00 mov 0x12a6a8,%edx
114eda: 85 d2 test %edx,%edx
114edc: 74 10 je 114eee <rtems_memalign+0x56>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
114ede: 83 ec 0c sub $0xc,%esp
114ee1: 53 push %ebx
114ee2: 89 45 f4 mov %eax,-0xc(%ebp)
114ee5: ff 52 04 call *0x4(%edx)
114ee8: 83 c4 10 add $0x10,%esp
114eeb: 8b 45 f4 mov -0xc(%ebp),%eax
*/
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
114eee: 89 03 mov %eax,(%ebx)
114ef0: 31 c0 xor %eax,%eax
return 0;
}
114ef2: 8b 5d fc mov -0x4(%ebp),%ebx
114ef5: c9 leave
114ef6: c3 ret
114ef7: 90 nop
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
114ef8: e8 37 47 ff ff call 109634 <malloc_is_system_state_OK>
114efd: 84 c0 test %al,%al
114eff: 75 b4 jne 114eb5 <rtems_memalign+0x1d> <== ALWAYS TAKEN
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
return 0;
114f01: b8 16 00 00 00 mov $0x16,%eax
}
114f06: 8b 5d fc mov -0x4(%ebp),%ebx
114f09: c9 leave
114f0a: c3 ret
114f0b: 90 nop
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
114f0c: b0 0c mov $0xc,%al
114f0e: eb e2 jmp 114ef2 <rtems_memalign+0x5a>
00116c74 <rtems_message_queue_broadcast>:
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
116c74: 55 push %ebp
116c75: 89 e5 mov %esp,%ebp
116c77: 57 push %edi
116c78: 56 push %esi
116c79: 53 push %ebx
116c7a: 83 ec 1c sub $0x1c,%esp
116c7d: 8b 7d 08 mov 0x8(%ebp),%edi
116c80: 8b 5d 0c mov 0xc(%ebp),%ebx
116c83: 8b 75 14 mov 0x14(%ebp),%esi
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
116c86: 85 db test %ebx,%ebx
116c88: 74 62 je 116cec <rtems_message_queue_broadcast+0x78>
return RTEMS_INVALID_ADDRESS;
if ( !count )
116c8a: 85 f6 test %esi,%esi
116c8c: 74 5e je 116cec <rtems_message_queue_broadcast+0x78>
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
116c8e: 51 push %ecx
116c8f: 8d 45 e4 lea -0x1c(%ebp),%eax
116c92: 50 push %eax
116c93: 57 push %edi
116c94: 68 80 4d 14 00 push $0x144d80
116c99: e8 fa 4c 00 00 call 11b998 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
116c9e: 83 c4 10 add $0x10,%esp
116ca1: 8b 55 e4 mov -0x1c(%ebp),%edx
116ca4: 85 d2 test %edx,%edx
116ca6: 74 10 je 116cb8 <rtems_message_queue_broadcast+0x44>
116ca8: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116cad: 8d 65 f4 lea -0xc(%ebp),%esp
116cb0: 5b pop %ebx
116cb1: 5e pop %esi
116cb2: 5f pop %edi
116cb3: c9 leave
116cb4: c3 ret
116cb5: 8d 76 00 lea 0x0(%esi),%esi
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
core_status = _CORE_message_queue_Broadcast(
116cb8: 83 ec 08 sub $0x8,%esp
116cbb: 56 push %esi
116cbc: 6a 00 push $0x0
116cbe: 57 push %edi
116cbf: ff 75 10 pushl 0x10(%ebp)
116cc2: 53 push %ebx
116cc3: 83 c0 14 add $0x14,%eax
116cc6: 50 push %eax
116cc7: e8 c4 34 00 00 call 11a190 <_CORE_message_queue_Broadcast>
116ccc: 89 c3 mov %eax,%ebx
NULL,
#endif
count
);
_Thread_Enable_dispatch();
116cce: 83 c4 20 add $0x20,%esp
116cd1: e8 a6 55 00 00 call 11c27c <_Thread_Enable_dispatch>
return
_Message_queue_Translate_core_message_queue_return_code( core_status );
116cd6: 83 ec 0c sub $0xc,%esp
116cd9: 53 push %ebx
116cda: e8 69 03 00 00 call 117048 <_Message_queue_Translate_core_message_queue_return_code>
#endif
count
);
_Thread_Enable_dispatch();
return
116cdf: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116ce2: 8d 65 f4 lea -0xc(%ebp),%esp
116ce5: 5b pop %ebx
116ce6: 5e pop %esi
116ce7: 5f pop %edi
116ce8: c9 leave
116ce9: c3 ret
116cea: 66 90 xchg %ax,%ax
#endif
count
);
_Thread_Enable_dispatch();
return
116cec: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116cf1: 8d 65 f4 lea -0xc(%ebp),%esp
116cf4: 5b pop %ebx
116cf5: 5e pop %esi
116cf6: 5f pop %edi
116cf7: c9 leave
116cf8: c3 ret
00114178 <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
114178: 55 push %ebp
114179: 89 e5 mov %esp,%ebp
11417b: 57 push %edi
11417c: 56 push %esi
11417d: 53 push %ebx
11417e: 83 ec 2c sub $0x2c,%esp
114181: 8b 5d 08 mov 0x8(%ebp),%ebx
114184: 8b 75 0c mov 0xc(%ebp),%esi
114187: 8b 4d 10 mov 0x10(%ebp),%ecx
11418a: 8b 7d 18 mov 0x18(%ebp),%edi
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
11418d: 85 db test %ebx,%ebx
11418f: 74 2f je 1141c0 <rtems_message_queue_create+0x48>
return RTEMS_INVALID_NAME;
if ( !id )
114191: 85 ff test %edi,%edi
114193: 0f 84 a3 00 00 00 je 11423c <rtems_message_queue_create+0xc4>
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
114199: 85 f6 test %esi,%esi
11419b: 74 13 je 1141b0 <rtems_message_queue_create+0x38>
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
11419d: 85 c9 test %ecx,%ecx
11419f: 75 2f jne 1141d0 <rtems_message_queue_create+0x58>
1141a1: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1141a6: 8d 65 f4 lea -0xc(%ebp),%esp
1141a9: 5b pop %ebx
1141aa: 5e pop %esi
1141ab: 5f pop %edi
1141ac: c9 leave
1141ad: c3 ret
1141ae: 66 90 xchg %ax,%ax
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
1141b0: b8 0a 00 00 00 mov $0xa,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1141b5: 8d 65 f4 lea -0xc(%ebp),%esp
1141b8: 5b pop %ebx
1141b9: 5e pop %esi
1141ba: 5f pop %edi
1141bb: c9 leave
1141bc: c3 ret
1141bd: 8d 76 00 lea 0x0(%esi),%esi
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
1141c0: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1141c5: 8d 65 f4 lea -0xc(%ebp),%esp
1141c8: 5b pop %ebx
1141c9: 5e pop %esi
1141ca: 5f pop %edi
1141cb: c9 leave
1141cc: c3 ret
1141cd: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
1141d0: a1 f8 2f 13 00 mov 0x132ff8,%eax
1141d5: 40 inc %eax
1141d6: a3 f8 2f 13 00 mov %eax,0x132ff8
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
1141db: 89 4d d4 mov %ecx,-0x2c(%ebp)
1141de: e8 75 6a 00 00 call 11ac58 <_Message_queue_Allocate>
1141e3: 89 c2 mov %eax,%edx
if ( !the_message_queue ) {
1141e5: 85 c0 test %eax,%eax
1141e7: 8b 4d d4 mov -0x2c(%ebp),%ecx
1141ea: 74 7c je 114268 <rtems_message_queue_create+0xf0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_message_queue->attribute_set = attribute_set;
1141ec: 8b 45 14 mov 0x14(%ebp),%eax
1141ef: 89 42 10 mov %eax,0x10(%edx)
if (_Attributes_Is_priority( attribute_set ) )
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
1141f2: a8 04 test $0x4,%al
1141f4: 0f 95 c0 setne %al
1141f7: 0f b6 c0 movzbl %al,%eax
1141fa: 89 45 e4 mov %eax,-0x1c(%ebp)
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
1141fd: 51 push %ecx
1141fe: 56 push %esi
1141ff: 8d 45 e4 lea -0x1c(%ebp),%eax
114202: 50 push %eax
114203: 8d 42 14 lea 0x14(%edx),%eax
114206: 50 push %eax
114207: 89 55 d4 mov %edx,-0x2c(%ebp)
11420a: e8 f1 10 00 00 call 115300 <_CORE_message_queue_Initialize>
11420f: 83 c4 10 add $0x10,%esp
114212: 84 c0 test %al,%al
114214: 8b 55 d4 mov -0x2c(%ebp),%edx
114217: 75 2f jne 114248 <rtems_message_queue_create+0xd0>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
114219: 83 ec 08 sub $0x8,%esp
11421c: 52 push %edx
11421d: 68 20 3a 13 00 push $0x133a20
114222: e8 59 1f 00 00 call 116180 <_Objects_Free>
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
114227: e8 78 29 00 00 call 116ba4 <_Thread_Enable_dispatch>
11422c: b8 0d 00 00 00 mov $0xd,%eax
return RTEMS_UNSATISFIED;
114231: 83 c4 10 add $0x10,%esp
114234: e9 6d ff ff ff jmp 1141a6 <rtems_message_queue_create+0x2e>
114239: 8d 76 00 lea 0x0(%esi),%esi
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
11423c: b8 09 00 00 00 mov $0x9,%eax
114241: e9 60 ff ff ff jmp 1141a6 <rtems_message_queue_create+0x2e>
114246: 66 90 xchg %ax,%ax
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
114248: 8b 42 08 mov 0x8(%edx),%eax
11424b: 0f b7 f0 movzwl %ax,%esi
11424e: 8b 0d 3c 3a 13 00 mov 0x133a3c,%ecx
114254: 89 14 b1 mov %edx,(%ecx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
114257: 89 5a 0c mov %ebx,0xc(%edx)
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
11425a: 89 07 mov %eax,(%edi)
name,
0
);
#endif
_Thread_Enable_dispatch();
11425c: e8 43 29 00 00 call 116ba4 <_Thread_Enable_dispatch>
114261: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
114263: e9 3e ff ff ff jmp 1141a6 <rtems_message_queue_create+0x2e>
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
if ( !the_message_queue ) {
_Thread_Enable_dispatch();
114268: e8 37 29 00 00 call 116ba4 <_Thread_Enable_dispatch>
11426d: b8 05 00 00 00 mov $0x5,%eax
return RTEMS_TOO_MANY;
114272: e9 2f ff ff ff jmp 1141a6 <rtems_message_queue_create+0x2e>
00119218 <rtems_message_queue_delete>:
*/
rtems_status_code rtems_message_queue_delete(
rtems_id id
)
{
119218: 55 push %ebp
119219: 89 e5 mov %esp,%ebp
11921b: 53 push %ebx
11921c: 83 ec 18 sub $0x18,%esp
11921f: 8d 45 f4 lea -0xc(%ebp),%eax
119222: 50 push %eax
119223: ff 75 08 pushl 0x8(%ebp)
119226: 68 20 7e 13 00 push $0x137e20
11922b: e8 64 8e ff ff call 112094 <_Objects_Get>
119230: 89 c3 mov %eax,%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
119232: 83 c4 10 add $0x10,%esp
119235: 8b 4d f4 mov -0xc(%ebp),%ecx
119238: 85 c9 test %ecx,%ecx
11923a: 75 3c jne 119278 <rtems_message_queue_delete+0x60>
case OBJECTS_LOCAL:
_Objects_Close( &_Message_queue_Information,
11923c: 83 ec 08 sub $0x8,%esp
11923f: 50 push %eax
119240: 68 20 7e 13 00 push $0x137e20
119245: e8 16 8a ff ff call 111c60 <_Objects_Close>
&the_message_queue->Object );
_CORE_message_queue_Close(
11924a: 83 c4 0c add $0xc,%esp
11924d: 6a 05 push $0x5
11924f: 6a 00 push $0x0
119251: 8d 43 14 lea 0x14(%ebx),%eax
119254: 50 push %eax
119255: e8 de 05 00 00 call 119838 <_CORE_message_queue_Close>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
11925a: 58 pop %eax
11925b: 5a pop %edx
11925c: 53 push %ebx
11925d: 68 20 7e 13 00 push $0x137e20
119262: e8 fd 8c ff ff call 111f64 <_Objects_Free>
0, /* Not used */
0
);
}
#endif
_Thread_Enable_dispatch();
119267: e8 0c 97 ff ff call 112978 <_Thread_Enable_dispatch>
11926c: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
11926e: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
119271: 8b 5d fc mov -0x4(%ebp),%ebx
119274: c9 leave
119275: c3 ret
119276: 66 90 xchg %ax,%ax
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
119278: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11927d: 8b 5d fc mov -0x4(%ebp),%ebx
119280: c9 leave
119281: c3 ret
00116e68 <rtems_message_queue_flush>:
rtems_status_code rtems_message_queue_flush(
rtems_id id,
uint32_t *count
)
{
116e68: 55 push %ebp
116e69: 89 e5 mov %esp,%ebp
116e6b: 53 push %ebx
116e6c: 83 ec 14 sub $0x14,%esp
116e6f: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
116e72: 85 db test %ebx,%ebx
116e74: 74 46 je 116ebc <rtems_message_queue_flush+0x54>
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
116e76: 51 push %ecx
116e77: 8d 45 f4 lea -0xc(%ebp),%eax
116e7a: 50 push %eax
116e7b: ff 75 08 pushl 0x8(%ebp)
116e7e: 68 80 4d 14 00 push $0x144d80
116e83: e8 10 4b 00 00 call 11b998 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
116e88: 83 c4 10 add $0x10,%esp
116e8b: 8b 55 f4 mov -0xc(%ebp),%edx
116e8e: 85 d2 test %edx,%edx
116e90: 74 0a je 116e9c <rtems_message_queue_flush+0x34>
116e92: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116e97: 8b 5d fc mov -0x4(%ebp),%ebx
116e9a: c9 leave
116e9b: c3 ret
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
116e9c: 83 ec 0c sub $0xc,%esp
116e9f: 83 c0 14 add $0x14,%eax
116ea2: 50 push %eax
116ea3: e8 a8 33 00 00 call 11a250 <_CORE_message_queue_Flush>
116ea8: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
116eaa: e8 cd 53 00 00 call 11c27c <_Thread_Enable_dispatch>
116eaf: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
116eb1: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116eb4: 8b 5d fc mov -0x4(%ebp),%ebx
116eb7: c9 leave
116eb8: c3 ret
116eb9: 8d 76 00 lea 0x0(%esi),%esi
)
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
116ebc: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116ec1: 8b 5d fc mov -0x4(%ebp),%ebx
116ec4: c9 leave
116ec5: c3 ret
00116ec8 <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
116ec8: 55 push %ebp
116ec9: 89 e5 mov %esp,%ebp
116ecb: 53 push %ebx
116ecc: 83 ec 14 sub $0x14,%esp
116ecf: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
116ed2: 85 db test %ebx,%ebx
116ed4: 74 3a je 116f10 <rtems_message_queue_get_number_pending+0x48>
116ed6: 51 push %ecx
116ed7: 8d 45 f4 lea -0xc(%ebp),%eax
116eda: 50 push %eax
116edb: ff 75 08 pushl 0x8(%ebp)
116ede: 68 80 4d 14 00 push $0x144d80
116ee3: e8 b0 4a 00 00 call 11b998 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
116ee8: 83 c4 10 add $0x10,%esp
116eeb: 8b 55 f4 mov -0xc(%ebp),%edx
116eee: 85 d2 test %edx,%edx
116ef0: 74 0a je 116efc <rtems_message_queue_get_number_pending+0x34>
116ef2: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116ef7: 8b 5d fc mov -0x4(%ebp),%ebx
116efa: c9 leave
116efb: c3 ret
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*count = the_message_queue->message_queue.number_of_pending_messages;
116efc: 8b 40 5c mov 0x5c(%eax),%eax
116eff: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
116f01: e8 76 53 00 00 call 11c27c <_Thread_Enable_dispatch>
116f06: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116f08: 8b 5d fc mov -0x4(%ebp),%ebx
116f0b: c9 leave
116f0c: c3 ret
116f0d: 8d 76 00 lea 0x0(%esi),%esi
)
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
116f10: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116f15: 8b 5d fc mov -0x4(%ebp),%ebx
116f18: c9 leave
116f19: c3 ret
0011429c <rtems_message_queue_receive>:
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
11429c: 55 push %ebp
11429d: 89 e5 mov %esp,%ebp
11429f: 56 push %esi
1142a0: 53 push %ebx
1142a1: 83 ec 10 sub $0x10,%esp
1142a4: 8b 5d 0c mov 0xc(%ebp),%ebx
1142a7: 8b 75 10 mov 0x10(%ebp),%esi
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
1142aa: 85 db test %ebx,%ebx
1142ac: 74 6e je 11431c <rtems_message_queue_receive+0x80>
return RTEMS_INVALID_ADDRESS;
if ( !size )
1142ae: 85 f6 test %esi,%esi
1142b0: 74 6a je 11431c <rtems_message_queue_receive+0x80>
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
1142b2: 51 push %ecx
1142b3: 8d 45 f4 lea -0xc(%ebp),%eax
1142b6: 50 push %eax
1142b7: ff 75 08 pushl 0x8(%ebp)
1142ba: 68 20 3a 13 00 push $0x133a20
1142bf: e8 ec 1f 00 00 call 1162b0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
1142c4: 83 c4 10 add $0x10,%esp
1142c7: 8b 55 f4 mov -0xc(%ebp),%edx
1142ca: 85 d2 test %edx,%edx
1142cc: 75 42 jne 114310 <rtems_message_queue_receive+0x74>
if ( _Options_Is_no_wait( option_set ) )
wait = false;
else
wait = true;
_CORE_message_queue_Seize(
1142ce: 83 ec 08 sub $0x8,%esp
1142d1: ff 75 18 pushl 0x18(%ebp)
1142d4: 8b 55 14 mov 0x14(%ebp),%edx
1142d7: 83 e2 01 and $0x1,%edx
1142da: 83 f2 01 xor $0x1,%edx
1142dd: 52 push %edx
1142de: 56 push %esi
1142df: 53 push %ebx
1142e0: ff 70 08 pushl 0x8(%eax)
1142e3: 83 c0 14 add $0x14,%eax
1142e6: 50 push %eax
1142e7: e8 d4 10 00 00 call 1153c0 <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
1142ec: 83 c4 20 add $0x20,%esp
1142ef: e8 b0 28 00 00 call 116ba4 <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
1142f4: 83 ec 0c sub $0xc,%esp
1142f7: a1 b8 30 13 00 mov 0x1330b8,%eax
1142fc: ff 70 34 pushl 0x34(%eax)
1142ff: e8 a0 00 00 00 call 1143a4 <_Message_queue_Translate_core_message_queue_return_code>
114304: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114307: 8d 65 f8 lea -0x8(%ebp),%esp
11430a: 5b pop %ebx
11430b: 5e pop %esi
11430c: c9 leave
11430d: c3 ret
11430e: 66 90 xchg %ax,%ax
if ( !size )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
114310: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114315: 8d 65 f8 lea -0x8(%ebp),%esp
114318: 5b pop %ebx
114319: 5e pop %esi
11431a: c9 leave
11431b: c3 ret
size,
wait,
timeout
);
_Thread_Enable_dispatch();
return _Message_queue_Translate_core_message_queue_return_code(
11431c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114321: 8d 65 f8 lea -0x8(%ebp),%esp
114324: 5b pop %ebx
114325: 5e pop %esi
114326: c9 leave
114327: c3 ret
0010b9e0 <rtems_message_queue_send>:
rtems_status_code rtems_message_queue_send(
rtems_id id,
const void *buffer,
size_t size
)
{
10b9e0: 55 push %ebp
10b9e1: 89 e5 mov %esp,%ebp
10b9e3: 56 push %esi
10b9e4: 53 push %ebx
10b9e5: 83 ec 10 sub $0x10,%esp
10b9e8: 8b 75 08 mov 0x8(%ebp),%esi
10b9eb: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
10b9ee: 85 db test %ebx,%ebx
10b9f0: 74 5e je 10ba50 <rtems_message_queue_send+0x70><== NEVER TAKEN
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
10b9f2: 51 push %ecx
10b9f3: 8d 45 f4 lea -0xc(%ebp),%eax
10b9f6: 50 push %eax
10b9f7: 56 push %esi
10b9f8: 68 20 9e 12 00 push $0x129e20
10b9fd: e8 f6 19 00 00 call 10d3f8 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
10ba02: 83 c4 10 add $0x10,%esp
10ba05: 8b 55 f4 mov -0xc(%ebp),%edx
10ba08: 85 d2 test %edx,%edx
10ba0a: 74 0c je 10ba18 <rtems_message_queue_send+0x38>
10ba0c: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ba11: 8d 65 f8 lea -0x8(%ebp),%esp
10ba14: 5b pop %ebx
10ba15: 5e pop %esi
10ba16: c9 leave
10ba17: c3 ret
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
10ba18: 6a 00 push $0x0
10ba1a: 6a 00 push $0x0
10ba1c: 68 ff ff ff 7f push $0x7fffffff
10ba21: 6a 00 push $0x0
10ba23: 56 push %esi
10ba24: ff 75 10 pushl 0x10(%ebp)
10ba27: 53 push %ebx
10ba28: 83 c0 14 add $0x14,%eax
10ba2b: 50 push %eax
10ba2c: e8 03 0c 00 00 call 10c634 <_CORE_message_queue_Submit>
10ba31: 89 c3 mov %eax,%ebx
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
10ba33: 83 c4 20 add $0x20,%esp
10ba36: e8 31 22 00 00 call 10dc6c <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
10ba3b: 83 ec 0c sub $0xc,%esp
10ba3e: 53 push %ebx
10ba3f: e8 18 00 00 00 call 10ba5c <_Message_queue_Translate_core_message_queue_return_code>
10ba44: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ba47: 8d 65 f8 lea -0x8(%ebp),%esp
10ba4a: 5b pop %ebx
10ba4b: 5e pop %esi
10ba4c: c9 leave
10ba4d: c3 ret
10ba4e: 66 90 xchg %ax,%ax
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
10ba50: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ba55: 8d 65 f8 lea -0x8(%ebp),%esp
10ba58: 5b pop %ebx
10ba59: 5e pop %esi
10ba5a: c9 leave
10ba5b: c3 ret
00117058 <rtems_message_queue_urgent>:
rtems_status_code rtems_message_queue_urgent(
rtems_id id,
const void *buffer,
size_t size
)
{
117058: 55 push %ebp
117059: 89 e5 mov %esp,%ebp
11705b: 56 push %esi
11705c: 53 push %ebx
11705d: 83 ec 10 sub $0x10,%esp
117060: 8b 75 08 mov 0x8(%ebp),%esi
117063: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
117066: 85 db test %ebx,%ebx
117068: 74 5e je 1170c8 <rtems_message_queue_urgent+0x70>
11706a: 51 push %ecx
11706b: 8d 45 f4 lea -0xc(%ebp),%eax
11706e: 50 push %eax
11706f: 56 push %esi
117070: 68 80 4d 14 00 push $0x144d80
117075: e8 1e 49 00 00 call 11b998 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
11707a: 83 c4 10 add $0x10,%esp
11707d: 8b 55 f4 mov -0xc(%ebp),%edx
117080: 85 d2 test %edx,%edx
117082: 74 0c je 117090 <rtems_message_queue_urgent+0x38>
117084: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117089: 8d 65 f8 lea -0x8(%ebp),%esp
11708c: 5b pop %ebx
11708d: 5e pop %esi
11708e: c9 leave
11708f: c3 ret
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
117090: 6a 00 push $0x0
117092: 6a 00 push $0x0
117094: 68 00 00 00 80 push $0x80000000
117099: 6a 00 push $0x0
11709b: 56 push %esi
11709c: ff 75 10 pushl 0x10(%ebp)
11709f: 53 push %ebx
1170a0: 83 c0 14 add $0x14,%eax
1170a3: 50 push %eax
1170a4: e8 fb 33 00 00 call 11a4a4 <_CORE_message_queue_Submit>
1170a9: 89 c3 mov %eax,%ebx
id,
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
1170ab: 83 c4 20 add $0x20,%esp
1170ae: e8 c9 51 00 00 call 11c27c <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
1170b3: 83 ec 0c sub $0xc,%esp
1170b6: 53 push %ebx
1170b7: e8 8c ff ff ff call 117048 <_Message_queue_Translate_core_message_queue_return_code>
1170bc: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1170bf: 8d 65 f8 lea -0x8(%ebp),%esp
1170c2: 5b pop %ebx
1170c3: 5e pop %esi
1170c4: c9 leave
1170c5: c3 ret
1170c6: 66 90 xchg %ax,%ax
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
1170c8: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1170cd: 8d 65 f8 lea -0x8(%ebp),%esp
1170d0: 5b pop %ebx
1170d1: 5e pop %esi
1170d2: c9 leave
1170d3: c3 ret
0010fd04 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
10fd04: 55 push %ebp <== NOT EXECUTED
10fd05: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10fd07: 57 push %edi <== NOT EXECUTED
10fd08: 56 push %esi <== NOT EXECUTED
10fd09: 53 push %ebx <== NOT EXECUTED
10fd0a: 83 ec 78 sub $0x78,%esp <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
10fd0d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
10fd10: e8 bf d7 03 00 call 14d4d4 <strdup> <== NOT EXECUTED
10fd15: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (dup_path != NULL) {
10fd17: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fd1a: 85 c0 test %eax,%eax <== NOT EXECUTED
10fd1c: 0f 84 0a 01 00 00 je 10fe2c <rtems_mkdir+0x128> <== NOT EXECUTED
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
10fd22: 8a 10 mov (%eax),%dl <== NOT EXECUTED
10fd24: 80 fa 2f cmp $0x2f,%dl <== NOT EXECUTED
10fd27: 0f 84 0f 01 00 00 je 10fe3c <rtems_mkdir+0x138> <== NOT EXECUTED
10fd2d: 89 c3 mov %eax,%ebx <== NOT EXECUTED
++p;
10fd2f: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp) <== NOT EXECUTED
10fd36: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
10fd3b: 84 d2 test %dl,%dl <== NOT EXECUTED
10fd3d: 74 11 je 10fd50 <rtems_mkdir+0x4c> <== NOT EXECUTED
10fd3f: 90 nop <== NOT EXECUTED
last = 1;
else if (p[0] != '/')
10fd40: 80 fa 2f cmp $0x2f,%dl <== NOT EXECUTED
10fd43: 0f 84 83 00 00 00 je 10fdcc <rtems_mkdir+0xc8> <== NOT EXECUTED
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
10fd49: 43 inc %ebx <== NOT EXECUTED
10fd4a: 8a 13 mov (%ebx),%dl <== NOT EXECUTED
if (p[0] == '\0')
10fd4c: 84 d2 test %dl,%dl <== NOT EXECUTED
10fd4e: 75 f0 jne 10fd40 <rtems_mkdir+0x3c> <== NOT EXECUTED
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
10fd50: c6 03 00 movb $0x0,(%ebx) <== NOT EXECUTED
10fd53: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
if (!last && p[1] == '\0')
last = 1;
if (first) {
10fd58: 85 c0 test %eax,%eax <== NOT EXECUTED
10fd5a: 75 54 jne 10fdb0 <rtems_mkdir+0xac> <== NOT EXECUTED
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
10fd5c: 85 f6 test %esi,%esi <== NOT EXECUTED
10fd5e: 75 3c jne 10fd9c <rtems_mkdir+0x98> <== NOT EXECUTED
10fd60: b8 ff 01 00 00 mov $0x1ff,%eax <== NOT EXECUTED
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
10fd65: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10fd68: 50 push %eax <== NOT EXECUTED
10fd69: 57 push %edi <== NOT EXECUTED
10fd6a: e8 01 f2 ff ff call 10ef70 <mkdir> <== NOT EXECUTED
10fd6f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fd72: 85 c0 test %eax,%eax <== NOT EXECUTED
10fd74: 78 6a js 10fde0 <rtems_mkdir+0xdc> <== NOT EXECUTED
} else {
retval = 0;
break;
}
}
if (!last)
10fd76: 85 f6 test %esi,%esi <== NOT EXECUTED
10fd78: 75 0a jne 10fd84 <rtems_mkdir+0x80> <== NOT EXECUTED
*p = '/';
10fd7a: c6 03 2f movb $0x2f,(%ebx) <== NOT EXECUTED
10fd7d: 31 c0 xor %eax,%eax <== NOT EXECUTED
10fd7f: eb c8 jmp 10fd49 <rtems_mkdir+0x45> <== NOT EXECUTED
10fd81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
10fd84: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fd87: 57 push %edi <== NOT EXECUTED
10fd88: e8 db ea ff ff call 10e868 <free> <== NOT EXECUTED
10fd8d: 31 c0 xor %eax,%eax <== NOT EXECUTED
10fd8f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return success != 0 ? 0 : -1;
}
10fd92: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10fd95: 5b pop %ebx <== NOT EXECUTED
10fd96: 5e pop %esi <== NOT EXECUTED
10fd97: 5f pop %edi <== NOT EXECUTED
10fd98: c9 leave <== NOT EXECUTED
10fd99: c3 ret <== NOT EXECUTED
10fd9a: 66 90 xchg %ax,%ax <== NOT EXECUTED
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
10fd9c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fd9f: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED
10fda2: e8 b5 1f 00 00 call 111d5c <umask> <== NOT EXECUTED
10fda7: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10fdaa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fdad: eb b6 jmp 10fd65 <rtems_mkdir+0x61> <== NOT EXECUTED
10fdaf: 90 nop <== NOT EXECUTED
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
10fdb0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fdb3: 6a 00 push $0x0 <== NOT EXECUTED
10fdb5: e8 a2 1f 00 00 call 111d5c <umask> <== NOT EXECUTED
10fdba: 89 45 94 mov %eax,-0x6c(%ebp) <== NOT EXECUTED
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
10fdbd: 24 3f and $0x3f,%al <== NOT EXECUTED
10fdbf: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10fdc2: e8 95 1f 00 00 call 111d5c <umask> <== NOT EXECUTED
10fdc7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fdca: eb 90 jmp 10fd5c <rtems_mkdir+0x58> <== NOT EXECUTED
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
10fdcc: c6 03 00 movb $0x0,(%ebx) <== NOT EXECUTED
if (!last && p[1] == '\0')
10fdcf: 80 7b 01 00 cmpb $0x0,0x1(%ebx) <== NOT EXECUTED
10fdd3: 0f 94 c2 sete %dl <== NOT EXECUTED
10fdd6: 0f b6 f2 movzbl %dl,%esi <== NOT EXECUTED
10fdd9: e9 7a ff ff ff jmp 10fd58 <rtems_mkdir+0x54> <== NOT EXECUTED
10fdde: 66 90 xchg %ax,%ax <== NOT EXECUTED
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
10fde0: e8 9b 7d 03 00 call 147b80 <__errno> <== NOT EXECUTED
10fde5: 83 38 11 cmpl $0x11,(%eax) <== NOT EXECUTED
10fde8: 74 0a je 10fdf4 <rtems_mkdir+0xf0> <== NOT EXECUTED
10fdea: e8 91 7d 03 00 call 147b80 <__errno> <== NOT EXECUTED
10fdef: 83 38 15 cmpl $0x15,(%eax) <== NOT EXECUTED
10fdf2: 75 53 jne 10fe47 <rtems_mkdir+0x143> <== NOT EXECUTED
if (stat(path, &sb) < 0) {
10fdf4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10fdf7: 8d 45 a0 lea -0x60(%ebp),%eax <== NOT EXECUTED
10fdfa: 50 push %eax <== NOT EXECUTED
10fdfb: 57 push %edi <== NOT EXECUTED
10fdfc: e8 7f 00 00 00 call 10fe80 <stat> <== NOT EXECUTED
10fe01: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fe04: 85 c0 test %eax,%eax <== NOT EXECUTED
10fe06: 78 3f js 10fe47 <rtems_mkdir+0x143> <== NOT EXECUTED
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
10fe08: 8b 45 ac mov -0x54(%ebp),%eax <== NOT EXECUTED
10fe0b: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
10fe10: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
10fe15: 0f 84 5b ff ff ff je 10fd76 <rtems_mkdir+0x72> <== NOT EXECUTED
if (last)
10fe1b: 85 f6 test %esi,%esi <== NOT EXECUTED
10fe1d: 74 53 je 10fe72 <rtems_mkdir+0x16e> <== NOT EXECUTED
errno = EEXIST;
10fe1f: e8 5c 7d 03 00 call 147b80 <__errno> <== NOT EXECUTED
10fe24: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED
10fe2a: eb 2d jmp 10fe59 <rtems_mkdir+0x155> <== NOT EXECUTED
}
if (!last)
*p = '/';
}
if (!first && !last)
(void)umask(oumask);
10fe2c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
}
10fe31: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10fe34: 5b pop %ebx <== NOT EXECUTED
10fe35: 5e pop %esi <== NOT EXECUTED
10fe36: 5f pop %edi <== NOT EXECUTED
10fe37: c9 leave <== NOT EXECUTED
10fe38: c3 ret <== NOT EXECUTED
10fe39: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
10fe3c: 8d 58 01 lea 0x1(%eax),%ebx <== NOT EXECUTED
10fe3f: 8a 50 01 mov 0x1(%eax),%dl <== NOT EXECUTED
10fe42: e9 e8 fe ff ff jmp 10fd2f <rtems_mkdir+0x2b> <== NOT EXECUTED
}
}
if (!last)
*p = '/';
}
if (!first && !last)
10fe47: 85 f6 test %esi,%esi <== NOT EXECUTED
10fe49: 75 0e jne 10fe59 <rtems_mkdir+0x155> <== NOT EXECUTED
(void)umask(oumask);
10fe4b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fe4e: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED
10fe51: e8 06 1f 00 00 call 111d5c <umask> <== NOT EXECUTED
10fe56: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
10fe59: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fe5c: 57 push %edi <== NOT EXECUTED
10fe5d: e8 06 ea ff ff call 10e868 <free> <== NOT EXECUTED
10fe62: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10fe67: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return success != 0 ? 0 : -1;
}
10fe6a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10fe6d: 5b pop %ebx <== NOT EXECUTED
10fe6e: 5e pop %esi <== NOT EXECUTED
10fe6f: 5f pop %edi <== NOT EXECUTED
10fe70: c9 leave <== NOT EXECUTED
10fe71: c3 ret <== NOT EXECUTED
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
10fe72: e8 09 7d 03 00 call 147b80 <__errno> <== NOT EXECUTED
10fe77: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
10fe7d: eb cc jmp 10fe4b <rtems_mkdir+0x147> <== NOT EXECUTED
00126558 <rtems_nvdisk_crc16_gen_factors>:
* @relval RTEMS_SUCCESSFUL The table was generated.
* @retval RTEMS_NO_MEMORY The table could not be allocated from the heap.
*/
rtems_status_code
rtems_nvdisk_crc16_gen_factors (uint16_t pattern)
{
126558: 55 push %ebp <== NOT EXECUTED
126559: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12655b: 56 push %esi <== NOT EXECUTED
12655c: 53 push %ebx <== NOT EXECUTED
12655d: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
uint32_t b;
rtems_nvdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
126560: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
126563: 68 00 02 00 00 push $0x200 <== NOT EXECUTED
126568: e8 9b 88 fe ff call 10ee08 <malloc> <== NOT EXECUTED
12656d: 89 c6 mov %eax,%esi <== NOT EXECUTED
12656f: a3 9c 48 17 00 mov %eax,0x17489c <== NOT EXECUTED
if (!rtems_nvdisk_crc16_factor)
126574: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126577: 85 c0 test %eax,%eax <== NOT EXECUTED
126579: 74 3d je 1265b8 <rtems_nvdisk_crc16_gen_factors+0x60><== NOT EXECUTED
12657b: 31 c0 xor %eax,%eax <== NOT EXECUTED
12657d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
126580: 89 c2 mov %eax,%edx <== NOT EXECUTED
126582: b9 07 00 00 00 mov $0x7,%ecx <== NOT EXECUTED
126587: eb 0d jmp 126596 <rtems_nvdisk_crc16_gen_factors+0x3e><== NOT EXECUTED
126589: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
12658c: 66 d1 ea shr %dx <== NOT EXECUTED
12658f: 31 da xor %ebx,%edx <== NOT EXECUTED
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
126591: 85 c9 test %ecx,%ecx <== NOT EXECUTED
126593: 74 0d je 1265a2 <rtems_nvdisk_crc16_gen_factors+0x4a><== NOT EXECUTED
126595: 49 dec %ecx <== NOT EXECUTED
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
126596: f6 c2 01 test $0x1,%dl <== NOT EXECUTED
126599: 75 f1 jne 12658c <rtems_nvdisk_crc16_gen_factors+0x34><== NOT EXECUTED
12659b: 66 d1 ea shr %dx <== NOT EXECUTED
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
12659e: 85 c9 test %ecx,%ecx <== NOT EXECUTED
1265a0: 75 f3 jne 126595 <rtems_nvdisk_crc16_gen_factors+0x3d><== NOT EXECUTED
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
rtems_nvdisk_crc16_factor[b] = v & 0xffff;
1265a2: 66 89 14 46 mov %dx,(%esi,%eax,2) <== NOT EXECUTED
rtems_nvdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_nvdisk_crc16_factor)
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
1265a6: 40 inc %eax <== NOT EXECUTED
1265a7: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED
1265ac: 75 d2 jne 126580 <rtems_nvdisk_crc16_gen_factors+0x28><== NOT EXECUTED
1265ae: 66 31 c0 xor %ax,%ax <== NOT EXECUTED
for (i = 8; i--;)
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
rtems_nvdisk_crc16_factor[b] = v & 0xffff;
}
return RTEMS_SUCCESSFUL;
}
1265b1: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1265b4: 5b pop %ebx <== NOT EXECUTED
1265b5: 5e pop %esi <== NOT EXECUTED
1265b6: c9 leave <== NOT EXECUTED
1265b7: c3 ret <== NOT EXECUTED
rtems_nvdisk_crc16_gen_factors (uint16_t pattern)
{
uint32_t b;
rtems_nvdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_nvdisk_crc16_factor)
1265b8: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED
1265bd: eb f2 jmp 1265b1 <rtems_nvdisk_crc16_gen_factors+0x59><== NOT EXECUTED
00125f68 <rtems_nvdisk_error>:
* @param ... The arguments for the format text.
* @return int The number of bytes written to the output.
*/
static int
rtems_nvdisk_error (const char *format, ...)
{
125f68: 55 push %ebp <== NOT EXECUTED
125f69: 89 e5 mov %esp,%ebp <== NOT EXECUTED
125f6b: 53 push %ebx <== NOT EXECUTED
125f6c: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
* @param format The format string. See printf for details.
* @param ... The arguments for the format text.
* @return int The number of bytes written to the output.
*/
static int
rtems_nvdisk_error (const char *format, ...)
125f6f: 8d 5d 0c lea 0xc(%ebp),%ebx <== NOT EXECUTED
{
int ret;
va_list args;
va_start (args, format);
fprintf (stderr, "nvdisk:error:");
125f72: a1 60 fb 16 00 mov 0x16fb60,%eax <== NOT EXECUTED
125f77: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
125f7a: 6a 0d push $0xd <== NOT EXECUTED
125f7c: 6a 01 push $0x1 <== NOT EXECUTED
125f7e: 68 e8 47 16 00 push $0x1647e8 <== NOT EXECUTED
125f83: e8 d8 37 02 00 call 149760 <fwrite> <== NOT EXECUTED
ret = vfprintf (stderr, format, args);
125f88: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
125f8b: 53 push %ebx <== NOT EXECUTED
125f8c: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
125f8f: a1 60 fb 16 00 mov 0x16fb60,%eax <== NOT EXECUTED
125f94: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
125f97: e8 08 f4 02 00 call 1553a4 <vfprintf> <== NOT EXECUTED
125f9c: 89 c3 mov %eax,%ebx <== NOT EXECUTED
fprintf (stderr, "\n");
125f9e: 5a pop %edx <== NOT EXECUTED
125f9f: 59 pop %ecx <== NOT EXECUTED
125fa0: a1 60 fb 16 00 mov 0x16fb60,%eax <== NOT EXECUTED
125fa5: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
125fa8: 6a 0a push $0xa <== NOT EXECUTED
125faa: e8 8d 25 02 00 call 14853c <fputc> <== NOT EXECUTED
fflush (stderr);
125faf: 58 pop %eax <== NOT EXECUTED
125fb0: a1 60 fb 16 00 mov 0x16fb60,%eax <== NOT EXECUTED
125fb5: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
125fb8: e8 3f 1f 02 00 call 147efc <fflush> <== NOT EXECUTED
va_end (args);
return ret;
}
125fbd: 89 d8 mov %ebx,%eax <== NOT EXECUTED
125fbf: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
125fc2: c9 leave <== NOT EXECUTED
125fc3: c3 ret <== NOT EXECUTED
00125fc4 <rtems_nvdisk_get_device>:
/**
* Map a block to a device.
*/
static rtems_nvdisk_device_ctl*
rtems_nvdisk_get_device (rtems_nvdisk* nvd, uint32_t block)
{
125fc4: 55 push %ebp <== NOT EXECUTED
125fc5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
125fc7: 57 push %edi <== NOT EXECUTED
125fc8: 56 push %esi <== NOT EXECUTED
125fc9: 53 push %ebx <== NOT EXECUTED
125fca: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
uint32_t device;
if (block >= nvd->block_count)
125fcd: 39 50 10 cmp %edx,0x10(%eax) <== NOT EXECUTED
125fd0: 76 44 jbe 126016 <rtems_nvdisk_get_device+0x52><== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
return NULL;
}
for (device = 0; device < nvd->device_count; device++)
125fd2: 8b 78 18 mov 0x18(%eax),%edi <== NOT EXECUTED
125fd5: 85 ff test %edi,%edi <== NOT EXECUTED
125fd7: 74 22 je 125ffb <rtems_nvdisk_get_device+0x37><== NOT EXECUTED
uint32_t device;
if (block >= nvd->block_count)
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
return NULL;
125fd9: 8b 48 14 mov 0x14(%eax),%ecx <== NOT EXECUTED
125fdc: 31 db xor %ebx,%ebx <== NOT EXECUTED
125fde: 66 90 xchg %ax,%ax <== NOT EXECUTED
125fe0: 89 c8 mov %ecx,%eax <== NOT EXECUTED
}
for (device = 0; device < nvd->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
if ((block >= dc->block_base) &&
125fe2: 8b 71 0c mov 0xc(%ecx),%esi <== NOT EXECUTED
125fe5: 39 f2 cmp %esi,%edx <== NOT EXECUTED
125fe7: 72 0a jb 125ff3 <rtems_nvdisk_get_device+0x2f><== NOT EXECUTED
125fe9: 03 71 04 add 0x4(%ecx),%esi <== NOT EXECUTED
125fec: 2b 71 08 sub 0x8(%ecx),%esi <== NOT EXECUTED
125fef: 39 f2 cmp %esi,%edx <== NOT EXECUTED
125ff1: 72 1b jb 12600e <rtems_nvdisk_get_device+0x4a><== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
return NULL;
}
for (device = 0; device < nvd->device_count; device++)
125ff3: 43 inc %ebx <== NOT EXECUTED
125ff4: 83 c1 14 add $0x14,%ecx <== NOT EXECUTED
125ff7: 39 fb cmp %edi,%ebx <== NOT EXECUTED
125ff9: 72 e5 jb 125fe0 <rtems_nvdisk_get_device+0x1c><== NOT EXECUTED
if ((block >= dc->block_base) &&
(block < (dc->block_base + dc->pages - dc->pages_desc)))
return dc;
}
rtems_nvdisk_error ("map-block:%d: no device/page map found", block);
125ffb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
125ffe: 52 push %edx <== NOT EXECUTED
125fff: 68 4c 48 16 00 push $0x16484c <== NOT EXECUTED
126004: e8 5f ff ff ff call 125f68 <rtems_nvdisk_error> <== NOT EXECUTED
126009: 31 c0 xor %eax,%eax <== NOT EXECUTED
return NULL;
12600b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
12600e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
126011: 5b pop %ebx <== NOT EXECUTED
126012: 5e pop %esi <== NOT EXECUTED
126013: 5f pop %edi <== NOT EXECUTED
126014: c9 leave <== NOT EXECUTED
126015: c3 ret <== NOT EXECUTED
{
uint32_t device;
if (block >= nvd->block_count)
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
126016: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126019: 52 push %edx <== NOT EXECUTED
12601a: 68 f6 47 16 00 push $0x1647f6 <== NOT EXECUTED
12601f: e8 44 ff ff ff call 125f68 <rtems_nvdisk_error> <== NOT EXECUTED
126024: 31 c0 xor %eax,%eax <== NOT EXECUTED
return NULL;
126026: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126029: eb e3 jmp 12600e <rtems_nvdisk_get_device+0x4a><== NOT EXECUTED
001265c0 <rtems_nvdisk_initialize>:
*/
rtems_device_driver
rtems_nvdisk_initialize (rtems_device_major_number major,
rtems_device_minor_number minor,
void* arg __attribute__((unused)))
{
1265c0: 55 push %ebp <== NOT EXECUTED
1265c1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1265c3: 57 push %edi <== NOT EXECUTED
1265c4: 56 push %esi <== NOT EXECUTED
1265c5: 53 push %ebx <== NOT EXECUTED
1265c6: 83 ec 6c sub $0x6c,%esp <== NOT EXECUTED
const rtems_nvdisk_config* c = rtems_nvdisk_configuration;
rtems_nvdisk* nvd;
rtems_status_code sc;
sc = rtems_disk_io_initialize ();
1265c9: e8 ee 6c fe ff call 10d2bc <rtems_disk_io_initialize><== NOT EXECUTED
1265ce: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
1265d0: 85 c0 test %eax,%eax <== NOT EXECUTED
1265d2: 74 0c je 1265e0 <rtems_nvdisk_initialize+0x20><== NOT EXECUTED
}
rtems_nvdisk_count = rtems_nvdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
1265d4: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1265d6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1265d9: 5b pop %ebx <== NOT EXECUTED
1265da: 5e pop %esi <== NOT EXECUTED
1265db: 5f pop %edi <== NOT EXECUTED
1265dc: c9 leave <== NOT EXECUTED
1265dd: c3 ret <== NOT EXECUTED
1265de: 66 90 xchg %ax,%ax <== NOT EXECUTED
sc = rtems_disk_io_initialize ();
if (sc != RTEMS_SUCCESSFUL)
return sc;
sc = rtems_nvdisk_crc16_gen_factors (0x8408);
1265e0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1265e3: 68 08 84 00 00 push $0x8408 <== NOT EXECUTED
1265e8: e8 6b ff ff ff call 126558 <rtems_nvdisk_crc16_gen_factors><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
1265ed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1265f0: 85 c0 test %eax,%eax <== NOT EXECUTED
1265f2: 74 0c je 126600 <rtems_nvdisk_initialize+0x40><== NOT EXECUTED
1265f4: 89 c3 mov %eax,%ebx <== NOT EXECUTED
}
rtems_nvdisk_count = rtems_nvdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
1265f6: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1265f8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1265fb: 5b pop %ebx <== NOT EXECUTED
1265fc: 5e pop %esi <== NOT EXECUTED
1265fd: 5f pop %edi <== NOT EXECUTED
1265fe: c9 leave <== NOT EXECUTED
1265ff: c3 ret <== NOT EXECUTED
sc = rtems_nvdisk_crc16_gen_factors (0x8408);
if (sc != RTEMS_SUCCESSFUL)
return sc;
rtems_nvdisks = calloc (rtems_nvdisk_configuration_size,
126600: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126603: 6a 28 push $0x28 <== NOT EXECUTED
126605: ff 35 fc d2 16 00 pushl 0x16d2fc <== NOT EXECUTED
12660b: e8 fc 7c fe ff call 10e30c <calloc> <== NOT EXECUTED
126610: a3 94 48 17 00 mov %eax,0x174894 <== NOT EXECUTED
sizeof (rtems_nvdisk));
if (!rtems_nvdisks)
126615: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126618: 85 c0 test %eax,%eax <== NOT EXECUTED
12661a: 0f 84 9f 01 00 00 je 1267bf <rtems_nvdisk_initialize+0x1ff><== NOT EXECUTED
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_nvdisk_configuration_size; minor++, c++)
126620: 8b 15 fc d2 16 00 mov 0x16d2fc,%edx <== NOT EXECUTED
126626: 85 d2 test %edx,%edx <== NOT EXECUTED
126628: 0f 84 9b 01 00 00 je 1267c9 <rtems_nvdisk_initialize+0x209><== NOT EXECUTED
12662e: c7 45 ac 00 00 00 00 movl $0x0,-0x54(%ebp) <== NOT EXECUTED
126635: c7 45 c0 68 ee 15 00 movl $0x15ee68,-0x40(%ebp) <== NOT EXECUTED
12663c: c7 45 b0 00 00 00 00 movl $0x0,-0x50(%ebp) <== NOT EXECUTED
126643: 8d 55 d6 lea -0x2a(%ebp),%edx <== NOT EXECUTED
126646: 89 55 94 mov %edx,-0x6c(%ebp) <== NOT EXECUTED
126649: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
12664c: 8b 7d 94 mov -0x6c(%ebp),%edi <== NOT EXECUTED
12664f: be 3f 48 16 00 mov $0x16483f,%esi <== NOT EXECUTED
126654: b9 0a 00 00 00 mov $0xa,%ecx <== NOT EXECUTED
126659: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
12665b: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
12665e: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED
temp.__overlay.minor = _minor;
126661: 8b 55 b0 mov -0x50(%ebp),%edx <== NOT EXECUTED
126664: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
return temp.device;
126667: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
12666a: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
12666d: 89 55 a0 mov %edx,-0x60(%ebp) <== NOT EXECUTED
126670: 89 4d a4 mov %ecx,-0x5c(%ebp) <== NOT EXECUTED
dev_t dev = rtems_filesystem_make_dev_t (major, minor);
uint32_t device;
uint32_t blocks = 0;
nvd = &rtems_nvdisks[minor];
126673: 8b 4d ac mov -0x54(%ebp),%ecx <== NOT EXECUTED
126676: 8d 34 08 lea (%eax,%ecx,1),%esi <== NOT EXECUTED
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
126679: 8a 45 b0 mov -0x50(%ebp),%al <== NOT EXECUTED
12667c: 00 45 df add %al,-0x21(%ebp) <== NOT EXECUTED
nvd->major = major;
12667f: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
126682: 89 16 mov %edx,(%esi) <== NOT EXECUTED
nvd->minor = minor;
126684: 8b 4d b0 mov -0x50(%ebp),%ecx <== NOT EXECUTED
126687: 89 4e 04 mov %ecx,0x4(%esi) <== NOT EXECUTED
nvd->flags = c->flags;
12668a: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
12668d: 8b 42 0c mov 0xc(%edx),%eax <== NOT EXECUTED
126690: 89 46 08 mov %eax,0x8(%esi) <== NOT EXECUTED
nvd->block_size = c->block_size;
126693: 8b 02 mov (%edx),%eax <== NOT EXECUTED
126695: 89 46 0c mov %eax,0xc(%esi) <== NOT EXECUTED
nvd->info_level = c->info_level;
126698: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED
12669b: 89 46 24 mov %eax,0x24(%esi) <== NOT EXECUTED
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
12669e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1266a1: 6a 14 push $0x14 <== NOT EXECUTED
1266a3: ff 72 04 pushl 0x4(%edx) <== NOT EXECUTED
1266a6: e8 61 7c fe ff call 10e30c <calloc> <== NOT EXECUTED
1266ab: 89 46 14 mov %eax,0x14(%esi) <== NOT EXECUTED
if (!nvd->devices)
1266ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1266b1: 85 c0 test %eax,%eax <== NOT EXECUTED
1266b3: 0f 84 06 01 00 00 je 1267bf <rtems_nvdisk_initialize+0x1ff><== NOT EXECUTED
return RTEMS_NO_MEMORY;
for (device = 0; device < c->device_count; device++)
1266b9: 8b 4d c0 mov -0x40(%ebp),%ecx <== NOT EXECUTED
1266bc: 8b 59 04 mov 0x4(%ecx),%ebx <== NOT EXECUTED
1266bf: 85 db test %ebx,%ebx <== NOT EXECUTED
1266c1: 0f 84 ef 00 00 00 je 1267b6 <rtems_nvdisk_initialize+0x1f6><== NOT EXECUTED
1266c7: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp) <== NOT EXECUTED
1266ce: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) <== NOT EXECUTED
1266d5: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) <== NOT EXECUTED
1266dc: 89 c1 mov %eax,%ecx <== NOT EXECUTED
1266de: 89 f7 mov %esi,%edi <== NOT EXECUTED
1266e0: eb 05 jmp 1266e7 <rtems_nvdisk_initialize+0x127><== NOT EXECUTED
1266e2: 66 90 xchg %ax,%ax <== NOT EXECUTED
1266e4: 8b 4f 14 mov 0x14(%edi),%ecx <== NOT EXECUTED
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
1266e7: 03 4d b8 add -0x48(%ebp),%ecx <== NOT EXECUTED
dc->device = device;
1266ea: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
1266ed: 89 01 mov %eax,(%ecx) <== NOT EXECUTED
1266ef: 89 c3 mov %eax,%ebx <== NOT EXECUTED
1266f1: c1 e3 04 shl $0x4,%ebx <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_pages_in_device (const rtems_nvdisk* nvd,
const rtems_nvdisk_device_desc* dd)
{
return dd->size / nvd->block_size;
1266f4: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
1266f7: 8b 72 08 mov 0x8(%edx),%esi <== NOT EXECUTED
1266fa: 8b 44 1e 08 mov 0x8(%esi,%ebx,1),%eax <== NOT EXECUTED
1266fe: 31 d2 xor %edx,%edx <== NOT EXECUTED
126700: f7 77 0c divl 0xc(%edi) <== NOT EXECUTED
126703: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
for (device = 0; device < c->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
dc->device = device;
dc->pages = rtems_nvdisk_pages_in_device (nvd, &c->devices[device]);
126706: 89 41 04 mov %eax,0x4(%ecx) <== NOT EXECUTED
rtems_nvdisk_page_desc_pages (const rtems_nvdisk* nvd,
const rtems_nvdisk_device_desc* dd)
{
uint32_t pages = rtems_nvdisk_pages_in_device (nvd, dd);
uint32_t bytes = pages * sizeof (uint16_t);
return ((bytes - 1) / nvd->block_size) + 1;
126709: 8b 44 1e 08 mov 0x8(%esi,%ebx,1),%eax <== NOT EXECUTED
12670d: 31 d2 xor %edx,%edx <== NOT EXECUTED
12670f: f7 77 0c divl 0xc(%edi) <== NOT EXECUTED
126712: 8d 44 00 ff lea -0x1(%eax,%eax,1),%eax <== NOT EXECUTED
126716: 31 d2 xor %edx,%edx <== NOT EXECUTED
126718: f7 77 0c divl 0xc(%edi) <== NOT EXECUTED
12671b: 40 inc %eax <== NOT EXECUTED
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
dc->device = device;
dc->pages = rtems_nvdisk_pages_in_device (nvd, &c->devices[device]);
dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
12671c: 89 41 08 mov %eax,0x8(%ecx) <== NOT EXECUTED
dc->block_base = blocks;
12671f: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED
126722: 89 51 0c mov %edx,0xc(%ecx) <== NOT EXECUTED
blocks += dc->pages - dc->pages_desc;
126725: 8b 55 b4 mov -0x4c(%ebp),%edx <== NOT EXECUTED
126728: 29 c2 sub %eax,%edx <== NOT EXECUTED
12672a: 01 55 bc add %edx,-0x44(%ebp) <== NOT EXECUTED
dc->descriptor = &c->devices[device];
12672d: 8b 45 c0 mov -0x40(%ebp),%eax <== NOT EXECUTED
126730: 01 f3 add %esi,%ebx <== NOT EXECUTED
126732: 89 59 10 mov %ebx,0x10(%ecx) <== NOT EXECUTED
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
if (!nvd->devices)
return RTEMS_NO_MEMORY;
for (device = 0; device < c->device_count; device++)
126735: ff 45 c4 incl -0x3c(%ebp) <== NOT EXECUTED
126738: 83 45 b8 14 addl $0x14,-0x48(%ebp) <== NOT EXECUTED
12673c: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
12673f: 39 50 04 cmp %edx,0x4(%eax) <== NOT EXECUTED
126742: 77 a0 ja 1266e4 <rtems_nvdisk_initialize+0x124><== NOT EXECUTED
126744: 89 fe mov %edi,%esi <== NOT EXECUTED
blocks += dc->pages - dc->pages_desc;
dc->descriptor = &c->devices[device];
}
nvd->block_count = blocks;
126746: 8b 4d bc mov -0x44(%ebp),%ecx <== NOT EXECUTED
126749: 89 4e 10 mov %ecx,0x10(%esi) <== NOT EXECUTED
nvd->device_count = c->device_count;
12674c: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
12674f: 8b 42 04 mov 0x4(%edx),%eax <== NOT EXECUTED
126752: 89 46 18 mov %eax,0x18(%esi) <== NOT EXECUTED
sc = rtems_disk_create_phys(dev, c->block_size, blocks,
126755: 51 push %ecx <== NOT EXECUTED
126756: 8d 4d d6 lea -0x2a(%ebp),%ecx <== NOT EXECUTED
126759: 51 push %ecx <== NOT EXECUTED
12675a: 6a 00 push $0x0 <== NOT EXECUTED
12675c: 68 2c 60 12 00 push $0x12602c <== NOT EXECUTED
126761: ff 75 bc pushl -0x44(%ebp) <== NOT EXECUTED
126764: ff 32 pushl (%edx) <== NOT EXECUTED
126766: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED
126769: ff 75 a0 pushl -0x60(%ebp) <== NOT EXECUTED
12676c: e8 33 72 fe ff call 10d9a4 <rtems_disk_create_phys><== NOT EXECUTED
rtems_nvdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
126771: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
126774: 85 c0 test %eax,%eax <== NOT EXECUTED
126776: 75 75 jne 1267ed <rtems_nvdisk_initialize+0x22d><== NOT EXECUTED
{
rtems_nvdisk_error ("disk create phy failed");
return sc;
}
sc = rtems_semaphore_create (rtems_build_name ('N', 'V', 'D', 'K'), 1,
126778: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12677b: 83 c6 20 add $0x20,%esi <== NOT EXECUTED
12677e: 56 push %esi <== NOT EXECUTED
12677f: 6a 00 push $0x0 <== NOT EXECUTED
126781: 6a 54 push $0x54 <== NOT EXECUTED
126783: 6a 01 push $0x1 <== NOT EXECUTED
126785: 68 4b 44 56 4e push $0x4e56444b <== NOT EXECUTED
12678a: e8 95 c4 fe ff call 112c24 <rtems_semaphore_create><== NOT EXECUTED
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &nvd->lock);
if (sc != RTEMS_SUCCESSFUL)
12678f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
126792: 85 c0 test %eax,%eax <== NOT EXECUTED
126794: 75 40 jne 1267d6 <rtems_nvdisk_initialize+0x216><== NOT EXECUTED
sizeof (rtems_nvdisk));
if (!rtems_nvdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_nvdisk_configuration_size; minor++, c++)
126796: ff 45 b0 incl -0x50(%ebp) <== NOT EXECUTED
126799: 8b 15 fc d2 16 00 mov 0x16d2fc,%edx <== NOT EXECUTED
12679f: 83 45 ac 28 addl $0x28,-0x54(%ebp) <== NOT EXECUTED
1267a3: 3b 55 b0 cmp -0x50(%ebp),%edx <== NOT EXECUTED
1267a6: 76 21 jbe 1267c9 <rtems_nvdisk_initialize+0x209><== NOT EXECUTED
1267a8: 83 45 c0 14 addl $0x14,-0x40(%ebp) <== NOT EXECUTED
1267ac: a1 94 48 17 00 mov 0x174894,%eax <== NOT EXECUTED
1267b1: e9 96 fe ff ff jmp 12664c <rtems_nvdisk_initialize+0x8c><== NOT EXECUTED
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
if (!nvd->devices)
return RTEMS_NO_MEMORY;
for (device = 0; device < c->device_count; device++)
1267b6: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) <== NOT EXECUTED
1267bd: eb 87 jmp 126746 <rtems_nvdisk_initialize+0x186><== NOT EXECUTED
}
}
rtems_nvdisk_count = rtems_nvdisk_configuration_size;
return RTEMS_SUCCESSFUL;
1267bf: bb 1a 00 00 00 mov $0x1a,%ebx <== NOT EXECUTED
1267c4: e9 0b fe ff ff jmp 1265d4 <rtems_nvdisk_initialize+0x14><== NOT EXECUTED
rtems_nvdisk_error ("disk lock create failed");
return sc;
}
}
rtems_nvdisk_count = rtems_nvdisk_configuration_size;
1267c9: 89 15 98 48 17 00 mov %edx,0x174898 <== NOT EXECUTED
1267cf: 31 db xor %ebx,%ebx <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
1267d1: e9 fe fd ff ff jmp 1265d4 <rtems_nvdisk_initialize+0x14><== NOT EXECUTED
1267d6: 89 c3 mov %eax,%ebx <== NOT EXECUTED
sc = rtems_semaphore_create (rtems_build_name ('N', 'V', 'D', 'K'), 1,
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &nvd->lock);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_nvdisk_error ("disk lock create failed");
1267d8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1267db: 68 27 48 16 00 push $0x164827 <== NOT EXECUTED
1267e0: e8 83 f7 ff ff call 125f68 <rtems_nvdisk_error> <== NOT EXECUTED
return sc;
1267e5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1267e8: e9 e7 fd ff ff jmp 1265d4 <rtems_nvdisk_initialize+0x14><== NOT EXECUTED
1267ed: 89 c3 mov %eax,%ebx <== NOT EXECUTED
sc = rtems_disk_create_phys(dev, c->block_size, blocks,
rtems_nvdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_nvdisk_error ("disk create phy failed");
1267ef: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1267f2: 68 10 48 16 00 push $0x164810 <== NOT EXECUTED
1267f7: e8 6c f7 ff ff call 125f68 <rtems_nvdisk_error> <== NOT EXECUTED
return sc;
1267fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1267ff: e9 d0 fd ff ff jmp 1265d4 <rtems_nvdisk_initialize+0x14><== NOT EXECUTED
0012602c <rtems_nvdisk_ioctl>:
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_nvdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
{
12602c: 55 push %ebp <== NOT EXECUTED
12602d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12602f: 57 push %edi <== NOT EXECUTED
126030: 56 push %esi <== NOT EXECUTED
126031: 53 push %ebx <== NOT EXECUTED
126032: 83 ec 6c sub $0x6c,%esp <== NOT EXECUTED
126035: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
126038: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
12603b: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
dev_t dev = rtems_disk_get_device_identifier (dd);
rtems_device_minor_number minor = rtems_filesystem_dev_minor_t (dev);
rtems_blkdev_request* r = argp;
rtems_status_code sc;
if (minor >= rtems_nvdisk_count)
12603e: 39 05 98 48 17 00 cmp %eax,0x174898 <== NOT EXECUTED
126044: 0f 86 58 03 00 00 jbe 1263a2 <rtems_nvdisk_ioctl+0x376><== NOT EXECUTED
{
errno = ENODEV;
return -1;
}
if (rtems_nvdisks[minor].device_count == 0)
12604a: 8d 04 80 lea (%eax,%eax,4),%eax <== NOT EXECUTED
12604d: c1 e0 03 shl $0x3,%eax <== NOT EXECUTED
126050: 89 45 b8 mov %eax,-0x48(%ebp) <== NOT EXECUTED
126053: a1 94 48 17 00 mov 0x174894,%eax <== NOT EXECUTED
126058: 8b 55 b8 mov -0x48(%ebp),%edx <== NOT EXECUTED
12605b: 8b 44 10 18 mov 0x18(%eax,%edx,1),%eax <== NOT EXECUTED
12605f: 85 c0 test %eax,%eax <== NOT EXECUTED
126061: 0f 84 3b 03 00 00 je 1263a2 <rtems_nvdisk_ioctl+0x376><== NOT EXECUTED
{
errno = ENODEV;
return -1;
}
errno = 0;
126067: e8 14 1b 02 00 call 147b80 <__errno> <== NOT EXECUTED
12606c: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
sc = rtems_semaphore_obtain (rtems_nvdisks[minor].lock, RTEMS_WAIT, 0);
126072: 57 push %edi <== NOT EXECUTED
126073: 6a 00 push $0x0 <== NOT EXECUTED
126075: 6a 00 push $0x0 <== NOT EXECUTED
126077: a1 94 48 17 00 mov 0x174894,%eax <== NOT EXECUTED
12607c: 8b 4d b8 mov -0x48(%ebp),%ecx <== NOT EXECUTED
12607f: ff 74 08 20 pushl 0x20(%eax,%ecx,1) <== NOT EXECUTED
126083: e8 70 ce fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
126088: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12608b: 85 c0 test %eax,%eax <== NOT EXECUTED
12608d: 74 21 je 1260b0 <rtems_nvdisk_ioctl+0x84><== NOT EXECUTED
break;
}
sc = rtems_semaphore_release (rtems_nvdisks[minor].lock);
if (sc != RTEMS_SUCCESSFUL)
errno = EIO;
12608f: e8 ec 1a 02 00 call 147b80 <__errno> <== NOT EXECUTED
126094: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
}
return errno == 0 ? 0 : -1;
12609a: e8 e1 1a 02 00 call 147b80 <__errno> <== NOT EXECUTED
12609f: 83 38 01 cmpl $0x1,(%eax) <== NOT EXECUTED
1260a2: 19 c0 sbb %eax,%eax <== NOT EXECUTED
1260a4: f7 d0 not %eax <== NOT EXECUTED
}
1260a6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1260a9: 5b pop %ebx <== NOT EXECUTED
1260aa: 5e pop %esi <== NOT EXECUTED
1260ab: 5f pop %edi <== NOT EXECUTED
1260ac: c9 leave <== NOT EXECUTED
1260ad: c3 ret <== NOT EXECUTED
1260ae: 66 90 xchg %ax,%ax <== NOT EXECUTED
sc = rtems_semaphore_obtain (rtems_nvdisks[minor].lock, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
errno = EIO;
else
{
errno = 0;
1260b0: e8 cb 1a 02 00 call 147b80 <__errno> <== NOT EXECUTED
1260b5: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
switch (req)
1260bb: 81 fb 82 42 00 20 cmp $0x20004282,%ebx <== NOT EXECUTED
1260c1: 0f 84 81 02 00 00 je 126348 <rtems_nvdisk_ioctl+0x31c><== NOT EXECUTED
1260c7: 81 fb 01 42 18 c0 cmp $0xc0184201,%ebx <== NOT EXECUTED
1260cd: 0f 84 d4 00 00 00 je 1261a7 <rtems_nvdisk_ioctl+0x17b><== NOT EXECUTED
1260d3: 81 fb 80 42 00 20 cmp $0x20004280,%ebx <== NOT EXECUTED
1260d9: 74 2b je 126106 <rtems_nvdisk_ioctl+0xda><== NOT EXECUTED
case RTEMS_NVDISK_IOCTL_INFO_LEVEL:
rtems_nvdisks[minor].info_level = (uintptr_t) argp;
break;
default:
rtems_blkdev_ioctl (dd, req, argp);
1260db: 57 push %edi <== NOT EXECUTED
1260dc: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
1260df: 53 push %ebx <== NOT EXECUTED
1260e0: 56 push %esi <== NOT EXECUTED
1260e1: e8 d6 68 fe ff call 10c9bc <rtems_blkdev_ioctl> <== NOT EXECUTED
1260e6: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
1260e9: 03 05 94 48 17 00 add 0x174894,%eax <== NOT EXECUTED
1260ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
break;
}
sc = rtems_semaphore_release (rtems_nvdisks[minor].lock);
1260f2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1260f5: ff 70 20 pushl 0x20(%eax) <== NOT EXECUTED
1260f8: e8 f7 ce fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
1260fd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126100: 85 c0 test %eax,%eax <== NOT EXECUTED
126102: 74 96 je 12609a <rtems_nvdisk_ioctl+0x6e><== NOT EXECUTED
126104: eb 89 jmp 12608f <rtems_nvdisk_ioctl+0x63><== NOT EXECUTED
break;
}
break;
case RTEMS_NVDISK_IOCTL_ERASE_DISK:
errno = rtems_nvdisk_erase_disk (&rtems_nvdisks[minor]);
126106: e8 75 1a 02 00 call 147b80 <__errno> <== NOT EXECUTED
12610b: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED
12610e: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
126111: 03 05 94 48 17 00 add 0x174894,%eax <== NOT EXECUTED
126117: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "erase-disk");
#endif
for (device = 0; device < nvd->device_count; device++)
12611a: 8b 40 18 mov 0x18(%eax),%eax <== NOT EXECUTED
12611d: 85 c0 test %eax,%eax <== NOT EXECUTED
12611f: 0f 84 4d 02 00 00 je 126372 <rtems_nvdisk_ioctl+0x346><== NOT EXECUTED
126125: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
12612c: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
126133: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
126136: 8b 51 14 mov 0x14(%ecx),%edx <== NOT EXECUTED
126139: 8b 5d d0 mov -0x30(%ebp),%ebx <== NOT EXECUTED
12613c: 8d 34 1a lea (%edx,%ebx,1),%esi <== NOT EXECUTED
uint32_t page;
for (page = 0; page < (dc->pages - dc->pages_desc); page++)
12613f: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
126142: 3b 46 08 cmp 0x8(%esi),%eax <== NOT EXECUTED
126145: 0f 84 11 02 00 00 je 12635c <rtems_nvdisk_ioctl+0x330><== NOT EXECUTED
12614b: 31 db xor %ebx,%ebx <== NOT EXECUTED
12614d: eb 16 jmp 126165 <rtems_nvdisk_ioctl+0x139><== NOT EXECUTED
12614f: 90 nop <== NOT EXECUTED
126150: 43 inc %ebx <== NOT EXECUTED
126151: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
126154: 2b 46 08 sub 0x8(%esi),%eax <== NOT EXECUTED
126157: 39 c3 cmp %eax,%ebx <== NOT EXECUTED
126159: 0f 83 fd 01 00 00 jae 12635c <rtems_nvdisk_ioctl+0x330><== NOT EXECUTED
12615f: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
126162: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED
{
int ret = rtems_nvdisk_write_checksum (nvd, dc->device, page, 0xffff);
126165: 8b 06 mov (%esi),%eax <== NOT EXECUTED
126167: 66 c7 45 e6 ff ff movw $0xffff,-0x1a(%ebp) <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
12616d: 8d 0c 80 lea (%eax,%eax,4),%ecx <== NOT EXECUTED
126170: 8b 54 8a 10 mov 0x10(%edx,%ecx,4),%edx <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
126174: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126177: 8b 4a 0c mov 0xc(%edx),%ecx <== NOT EXECUTED
12617a: 6a 02 push $0x2 <== NOT EXECUTED
12617c: 8d 7d e6 lea -0x1a(%ebp),%edi <== NOT EXECUTED
12617f: 57 push %edi <== NOT EXECUTED
126180: 8d 3c 1b lea (%ebx,%ebx,1),%edi <== NOT EXECUTED
126183: 57 push %edi <== NOT EXECUTED
126184: ff 72 04 pushl 0x4(%edx) <== NOT EXECUTED
126187: ff 32 pushl (%edx) <== NOT EXECUTED
126189: 50 push %eax <== NOT EXECUTED
12618a: ff 51 04 call *0x4(%ecx) <== NOT EXECUTED
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
uint32_t page;
for (page = 0; page < (dc->pages - dc->pages_desc); page++)
{
int ret = rtems_nvdisk_write_checksum (nvd, dc->device, page, 0xffff);
if (ret)
12618d: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
126190: 85 c0 test %eax,%eax <== NOT EXECUTED
126192: 74 bc je 126150 <rtems_nvdisk_ioctl+0x124><== NOT EXECUTED
break;
}
break;
case RTEMS_NVDISK_IOCTL_ERASE_DISK:
errno = rtems_nvdisk_erase_disk (&rtems_nvdisks[minor]);
126194: 8b 5d c8 mov -0x38(%ebp),%ebx <== NOT EXECUTED
126197: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
126199: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
12619c: 03 05 94 48 17 00 add 0x174894,%eax <== NOT EXECUTED
break;
1261a2: e9 4b ff ff ff jmp 1260f2 <rtems_nvdisk_ioctl+0xc6><== NOT EXECUTED
{
errno = 0;
switch (req)
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
1261a7: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED
1261aa: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
1261ac: 85 c0 test %eax,%eax <== NOT EXECUTED
1261ae: 0f 85 d2 01 00 00 jne 126386 <rtems_nvdisk_ioctl+0x35a><== NOT EXECUTED
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
1261b4: e8 c7 19 02 00 call 147b80 <__errno> <== NOT EXECUTED
1261b9: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
1261bc: 8b 5d b8 mov -0x48(%ebp),%ebx <== NOT EXECUTED
1261bf: 03 1d 94 48 17 00 add 0x174894,%ebx <== NOT EXECUTED
1261c5: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
1261c8: 8b 4e 10 mov 0x10(%esi),%ecx <== NOT EXECUTED
1261cb: 83 c6 28 add $0x28,%esi <== NOT EXECUTED
1261ce: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED
1261d1: c7 45 bc 01 00 00 00 movl $0x1,-0x44(%ebp) <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "read: blocks=%d", req->bufnum);
#endif
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
1261d8: 8b 45 bc mov -0x44(%ebp),%eax <== NOT EXECUTED
1261db: 48 dec %eax <== NOT EXECUTED
1261dc: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
1261de: 0f 83 62 03 00 00 jae 126546 <rtems_nvdisk_ioctl+0x51a><== NOT EXECUTED
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
1261e4: 8b 7d c4 mov -0x3c(%ebp),%edi <== NOT EXECUTED
1261e7: 8b 47 f4 mov -0xc(%edi),%eax <== NOT EXECUTED
1261ea: 31 d2 xor %edx,%edx <== NOT EXECUTED
1261ec: f7 73 0c divl 0xc(%ebx) <== NOT EXECUTED
1261ef: 89 45 c0 mov %eax,-0x40(%ebp) <== NOT EXECUTED
data = sg->buffer;
1261f2: 8b 77 f8 mov -0x8(%edi),%esi <== NOT EXECUTED
for (b = 0; b < nvb; b++, data += nvd->block_size)
1261f5: 85 c0 test %eax,%eax <== NOT EXECUTED
1261f7: 0f 84 c0 01 00 00 je 1263bd <rtems_nvdisk_ioctl+0x391><== NOT EXECUTED
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
1261fd: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED
for (b = 0; b < nvb; b++, data += nvd->block_size)
{
ret = rtems_nvdisk_read_block (nvd, sg->block + b, data);
126204: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
126207: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
12620a: 03 50 f0 add -0x10(%eax),%edx <== NOT EXECUTED
12620d: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
uint32_t page;
uint16_t crc;
uint16_t cs;
int ret;
dc = rtems_nvdisk_get_device (nvd, block);
126210: 89 d8 mov %ebx,%eax <== NOT EXECUTED
126212: e8 ad fd ff ff call 125fc4 <rtems_nvdisk_get_device><== NOT EXECUTED
126217: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (!dc)
126219: 85 c0 test %eax,%eax <== NOT EXECUTED
12621b: 0f 84 03 01 00 00 je 126324 <rtems_nvdisk_ioctl+0x2f8><== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_get_page (rtems_nvdisk_device_ctl* dc,
uint32_t block)
{
return block - dc->block_base;
126221: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
126224: 2b 48 0c sub 0xc(%eax),%ecx <== NOT EXECUTED
126227: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, " read-block:%d=>%02d-%03d, cs:%04x",
block, dc->device, page, crc);
#endif
ret = rtems_nvdisk_read_checksum (nvd, dc->device, page, &crc);
12622a: 8b 00 mov (%eax),%eax <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
12622c: 8b 4b 14 mov 0x14(%ebx),%ecx <== NOT EXECUTED
12622f: 8d 14 80 lea (%eax,%eax,4),%edx <== NOT EXECUTED
126232: 8b 54 91 10 mov 0x10(%ecx,%edx,4),%edx <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-read: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->read (device, dd->flags, dd->base, offset, buffer, size);
126236: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126239: 8b 4a 0c mov 0xc(%edx),%ecx <== NOT EXECUTED
12623c: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED
12623f: 6a 02 push $0x2 <== NOT EXECUTED
126241: 8d 4d e6 lea -0x1a(%ebp),%ecx <== NOT EXECUTED
126244: 51 push %ecx <== NOT EXECUTED
126245: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
126248: d1 e1 shl %ecx <== NOT EXECUTED
12624a: 51 push %ecx <== NOT EXECUTED
12624b: ff 72 04 pushl 0x4(%edx) <== NOT EXECUTED
12624e: ff 32 pushl (%edx) <== NOT EXECUTED
126250: 50 push %eax <== NOT EXECUTED
126251: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
126254: ff 12 call *(%edx) <== NOT EXECUTED
block, dc->device, page, crc);
#endif
ret = rtems_nvdisk_read_checksum (nvd, dc->device, page, &crc);
if (ret)
126256: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
126259: 85 c0 test %eax,%eax <== NOT EXECUTED
12625b: 0f 85 93 00 00 00 jne 1262f4 <rtems_nvdisk_ioctl+0x2c8><== NOT EXECUTED
return ret;
if (crc == 0xffff)
126261: 66 83 7d e6 ff cmpw $0xffffffff,-0x1a(%ebp) <== NOT EXECUTED
126266: 0f 84 c0 00 00 00 je 12632c <rtems_nvdisk_ioctl+0x300><== NOT EXECUTED
#endif
memset (buffer, 0, nvd->block_size);
return 0;
}
ret = rtems_nvdisk_read_page (nvd, dc->device, page + dc->pages_desc, buffer);
12626c: 8b 07 mov (%edi),%eax <== NOT EXECUTED
rtems_nvdisk_read_page (const rtems_nvdisk* nvd,
uint32_t device,
uint32_t page,
void* buffer)
{
return rtems_nvdisk_device_read (nvd, device,
12626e: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED
126271: 89 4d 94 mov %ecx,-0x6c(%ebp) <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
126274: 8d 14 80 lea (%eax,%eax,4),%edx <== NOT EXECUTED
126277: 8b 4b 14 mov 0x14(%ebx),%ecx <== NOT EXECUTED
12627a: 8b 4c 91 10 mov 0x10(%ecx,%edx,4),%ecx <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-read: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->read (device, dd->flags, dd->base, offset, buffer, size);
12627e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126281: 8b 51 0c mov 0xc(%ecx),%edx <== NOT EXECUTED
126284: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED
126287: 56 push %esi <== NOT EXECUTED
126288: 8b 7f 08 mov 0x8(%edi),%edi <== NOT EXECUTED
12628b: 03 7d d0 add -0x30(%ebp),%edi <== NOT EXECUTED
12628e: 0f af 7d 94 imul -0x6c(%ebp),%edi <== NOT EXECUTED
126292: 57 push %edi <== NOT EXECUTED
126293: ff 71 04 pushl 0x4(%ecx) <== NOT EXECUTED
126296: ff 31 pushl (%ecx) <== NOT EXECUTED
126298: 50 push %eax <== NOT EXECUTED
126299: ff 12 call *(%edx) <== NOT EXECUTED
return 0;
}
ret = rtems_nvdisk_read_page (nvd, dc->device, page + dc->pages_desc, buffer);
if (ret)
12629b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12629e: 85 c0 test %eax,%eax <== NOT EXECUTED
1262a0: 75 52 jne 1262f4 <rtems_nvdisk_ioctl+0x2c8><== NOT EXECUTED
return ret;
cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
1262a2: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
1262a5: 85 c9 test %ecx,%ecx <== NOT EXECUTED
1262a7: 0f 84 cf 00 00 00 je 12637c <rtems_nvdisk_ioctl+0x350><== NOT EXECUTED
1262ad: 8b 3d 9c 48 17 00 mov 0x17489c,%edi <== NOT EXECUTED
1262b3: 31 c0 xor %eax,%eax <== NOT EXECUTED
1262b5: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
1262ba: 66 90 xchg %ax,%ax <== NOT EXECUTED
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
1262bc: 32 14 06 xor (%esi,%eax,1),%dl <== NOT EXECUTED
1262bf: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
1262c2: 66 8b 14 57 mov (%edi,%edx,2),%dx <== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
1262c6: 40 inc %eax <== NOT EXECUTED
1262c7: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
1262c9: 77 f1 ja 1262bc <rtems_nvdisk_ioctl+0x290><== NOT EXECUTED
if (ret)
return ret;
cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
if (cs != crc)
1262cb: 66 8b 45 e6 mov -0x1a(%ebp),%ax <== NOT EXECUTED
1262cf: 66 39 c2 cmp %ax,%dx <== NOT EXECUTED
1262d2: 74 62 je 126336 <rtems_nvdisk_ioctl+0x30a><== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
1262d4: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED
1262d7: 50 push %eax <== NOT EXECUTED
1262d8: 0f b7 d2 movzwl %dx,%edx <== NOT EXECUTED
1262db: 52 push %edx <== NOT EXECUTED
1262dc: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
1262df: 68 74 48 16 00 push $0x164874 <== NOT EXECUTED
1262e4: e8 7f fc ff ff call 125f68 <rtems_nvdisk_error> <== NOT EXECUTED
1262e9: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED
1262ee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1262f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
1262f4: ba 1b 00 00 00 mov $0x1b,%edx <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
1262f9: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
1262fc: 89 51 0c mov %edx,0xc(%ecx) <== NOT EXECUTED
req->req_done (req->done_arg, req->status);
1262ff: 53 push %ebx <== NOT EXECUTED
126300: 53 push %ebx <== NOT EXECUTED
126301: 52 push %edx <== NOT EXECUTED
126302: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
126305: 89 45 ac mov %eax,-0x54(%ebp) <== NOT EXECUTED
126308: ff 51 04 call *0x4(%ecx) <== NOT EXECUTED
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
12630b: 8b 45 ac mov -0x54(%ebp),%eax <== NOT EXECUTED
12630e: 8b 5d b4 mov -0x4c(%ebp),%ebx <== NOT EXECUTED
126311: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
126313: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
126316: 03 05 94 48 17 00 add 0x174894,%eax <== NOT EXECUTED
break;
12631c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12631f: e9 ce fd ff ff jmp 1260f2 <rtems_nvdisk_ioctl+0xc6><== NOT EXECUTED
uint16_t cs;
int ret;
dc = rtems_nvdisk_get_device (nvd, block);
if (!dc)
126324: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED
126329: eb c9 jmp 1262f4 <rtems_nvdisk_ioctl+0x2c8><== NOT EXECUTED
12632b: 90 nop <== NOT EXECUTED
if (crc == 0xffff)
{
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_warning (nvd, "read-block: crc not set: %d", block);
#endif
memset (buffer, 0, nvd->block_size);
12632c: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED
12632f: 89 f7 mov %esi,%edi <== NOT EXECUTED
126331: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
126333: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
126336: ff 45 cc incl -0x34(%ebp) <== NOT EXECUTED
126339: 8b 7d cc mov -0x34(%ebp),%edi <== NOT EXECUTED
12633c: 39 7d c0 cmp %edi,-0x40(%ebp) <== NOT EXECUTED
12633f: 76 76 jbe 1263b7 <rtems_nvdisk_ioctl+0x38b><== NOT EXECUTED
126341: 01 ce add %ecx,%esi <== NOT EXECUTED
126343: e9 bc fe ff ff jmp 126204 <rtems_nvdisk_ioctl+0x1d8><== NOT EXECUTED
case RTEMS_NVDISK_IOCTL_ERASE_DISK:
errno = rtems_nvdisk_erase_disk (&rtems_nvdisks[minor]);
break;
case RTEMS_NVDISK_IOCTL_INFO_LEVEL:
rtems_nvdisks[minor].info_level = (uintptr_t) argp;
126348: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
12634b: 03 05 94 48 17 00 add 0x174894,%eax <== NOT EXECUTED
126351: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
126354: 89 70 24 mov %esi,0x24(%eax) <== NOT EXECUTED
break;
126357: e9 96 fd ff ff jmp 1260f2 <rtems_nvdisk_ioctl+0xc6><== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "erase-disk");
#endif
for (device = 0; device < nvd->device_count; device++)
12635c: ff 45 cc incl -0x34(%ebp) <== NOT EXECUTED
12635f: 83 45 d0 14 addl $0x14,-0x30(%ebp) <== NOT EXECUTED
126363: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
126366: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
126369: 3b 4a 18 cmp 0x18(%edx),%ecx <== NOT EXECUTED
12636c: 0f 82 c1 fd ff ff jb 126133 <rtems_nvdisk_ioctl+0x107><== NOT EXECUTED
126372: 31 c0 xor %eax,%eax <== NOT EXECUTED
126374: e9 1b fe ff ff jmp 126194 <rtems_nvdisk_ioctl+0x168><== NOT EXECUTED
126379: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
12637c: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
126381: e9 45 ff ff ff jmp 1262cb <rtems_nvdisk_ioctl+0x29f><== NOT EXECUTED
{
errno = 0;
switch (req)
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
126386: 48 dec %eax <== NOT EXECUTED
126387: 74 40 je 1263c9 <rtems_nvdisk_ioctl+0x39d><== NOT EXECUTED
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_nvdisk_write (&rtems_nvdisks[minor], r);
break;
default:
errno = EINVAL;
126389: e8 f2 17 02 00 call 147b80 <__errno> <== NOT EXECUTED
12638e: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
126394: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
126397: 03 05 94 48 17 00 add 0x174894,%eax <== NOT EXECUTED
12639d: e9 50 fd ff ff jmp 1260f2 <rtems_nvdisk_ioctl+0xc6><== NOT EXECUTED
return -1;
}
if (rtems_nvdisks[minor].device_count == 0)
{
errno = ENODEV;
1263a2: e8 d9 17 02 00 call 147b80 <__errno> <== NOT EXECUTED
1263a7: c7 00 13 00 00 00 movl $0x13,(%eax) <== NOT EXECUTED
1263ad: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
1263b2: e9 ef fc ff ff jmp 1260a6 <rtems_nvdisk_ioctl+0x7a><== NOT EXECUTED
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
1263b7: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
1263ba: 8b 48 10 mov 0x10(%eax),%ecx <== NOT EXECUTED
1263bd: 83 45 c4 10 addl $0x10,-0x3c(%ebp) <== NOT EXECUTED
1263c1: ff 45 bc incl -0x44(%ebp) <== NOT EXECUTED
1263c4: e9 0f fe ff ff jmp 1261d8 <rtems_nvdisk_ioctl+0x1ac><== NOT EXECUTED
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
break;
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_nvdisk_write (&rtems_nvdisks[minor], r);
1263c9: e8 b2 17 02 00 call 147b80 <__errno> <== NOT EXECUTED
1263ce: 89 45 b0 mov %eax,-0x50(%ebp) <== NOT EXECUTED
1263d1: 8b 75 b8 mov -0x48(%ebp),%esi <== NOT EXECUTED
1263d4: 03 35 94 48 17 00 add 0x174894,%esi <== NOT EXECUTED
1263da: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED
1263dd: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
1263e0: 8b 4f 10 mov 0x10(%edi),%ecx <== NOT EXECUTED
1263e3: 83 c7 28 add $0x28,%edi <== NOT EXECUTED
1263e6: 89 7d c0 mov %edi,-0x40(%ebp) <== NOT EXECUTED
1263e9: c7 45 b4 01 00 00 00 movl $0x1,-0x4c(%ebp) <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "write: blocks=%d", req->bufnum);
#endif
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
1263f0: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
1263f3: 48 dec %eax <== NOT EXECUTED
1263f4: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
1263f6: 0f 86 53 01 00 00 jbe 12654f <rtems_nvdisk_ioctl+0x523><== NOT EXECUTED
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
1263fc: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
1263ff: 8b 42 f4 mov -0xc(%edx),%eax <== NOT EXECUTED
126402: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
126405: 31 d2 xor %edx,%edx <== NOT EXECUTED
126407: f7 73 0c divl 0xc(%ebx) <== NOT EXECUTED
12640a: 89 45 bc mov %eax,-0x44(%ebp) <== NOT EXECUTED
data = sg->buffer;
12640d: 8b 75 c0 mov -0x40(%ebp),%esi <== NOT EXECUTED
126410: 8b 5e f8 mov -0x8(%esi),%ebx <== NOT EXECUTED
for (b = 0; b < nvb; b++, data += nvd->block_size)
126413: 85 c0 test %eax,%eax <== NOT EXECUTED
126415: 0f 84 1f 01 00 00 je 12653a <rtems_nvdisk_ioctl+0x50e><== NOT EXECUTED
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
12641b: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
126422: 66 90 xchg %ax,%ax <== NOT EXECUTED
for (b = 0; b < nvb; b++, data += nvd->block_size)
{
ret = rtems_nvdisk_write_block (nvd, sg->block + b, data);
126424: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED
126427: 8b 45 c0 mov -0x40(%ebp),%eax <== NOT EXECUTED
12642a: 03 78 f0 add -0x10(%eax),%edi <== NOT EXECUTED
rtems_nvdisk_device_ctl* dc;
uint32_t page;
uint16_t cs;
int ret;
dc = rtems_nvdisk_get_device (nvd, block);
12642d: 89 fa mov %edi,%edx <== NOT EXECUTED
12642f: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
126432: e8 8d fb ff ff call 125fc4 <rtems_nvdisk_get_device><== NOT EXECUTED
126437: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (!dc)
126439: 85 c0 test %eax,%eax <== NOT EXECUTED
12643b: 74 74 je 1264b1 <rtems_nvdisk_ioctl+0x485><== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_get_page (rtems_nvdisk_device_ctl* dc,
uint32_t block)
{
return block - dc->block_base;
12643d: 2b 78 0c sub 0xc(%eax),%edi <== NOT EXECUTED
126440: 89 7d c8 mov %edi,-0x38(%ebp) <== NOT EXECUTED
if (!dc)
return EIO;
page = rtems_nvdisk_get_page (dc, block);
cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
126443: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
126446: 8b 42 0c mov 0xc(%edx),%eax <== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
126449: 85 c0 test %eax,%eax <== NOT EXECUTED
12644b: 0f 84 d9 00 00 00 je 12652a <rtems_nvdisk_ioctl+0x4fe><== NOT EXECUTED
126451: 8b 3d 9c 48 17 00 mov 0x17489c,%edi <== NOT EXECUTED
126457: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
126459: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
12645e: 66 90 xchg %ax,%ax <== NOT EXECUTED
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
126460: 32 14 0b xor (%ebx,%ecx,1),%dl <== NOT EXECUTED
126463: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
126466: 66 8b 14 57 mov (%edi,%edx,2),%dx <== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
12646a: 41 inc %ecx <== NOT EXECUTED
12646b: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
12646d: 77 f1 ja 126460 <rtems_nvdisk_ioctl+0x434><== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, " write-block:%d=>%02d-%03d", block, dc->device, page);
#endif
ret = rtems_nvdisk_write_page (nvd, dc->device, page + dc->pages_desc, buffer);
12646f: 8b 0e mov (%esi),%ecx <== NOT EXECUTED
126471: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
126474: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED
126477: 8b 7f 14 mov 0x14(%edi),%edi <== NOT EXECUTED
12647a: 8d 0c 89 lea (%ecx,%ecx,4),%ecx <== NOT EXECUTED
12647d: 8b 4c 8f 10 mov 0x10(%edi,%ecx,4),%ecx <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
126481: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126484: 8b 79 0c mov 0xc(%ecx),%edi <== NOT EXECUTED
126487: 89 7d c4 mov %edi,-0x3c(%ebp) <== NOT EXECUTED
12648a: 50 push %eax <== NOT EXECUTED
12648b: 53 push %ebx <== NOT EXECUTED
12648c: 8b 7d c8 mov -0x38(%ebp),%edi <== NOT EXECUTED
12648f: 03 7e 08 add 0x8(%esi),%edi <== NOT EXECUTED
126492: 0f af f8 imul %eax,%edi <== NOT EXECUTED
126495: 57 push %edi <== NOT EXECUTED
126496: ff 71 04 pushl 0x4(%ecx) <== NOT EXECUTED
126499: ff 31 pushl (%ecx) <== NOT EXECUTED
12649b: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
12649e: 89 55 ac mov %edx,-0x54(%ebp) <== NOT EXECUTED
1264a1: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
1264a4: ff 51 04 call *0x4(%ecx) <== NOT EXECUTED
rtems_nvdisk_info (nvd, " write-block:%d=>%02d-%03d", block, dc->device, page);
#endif
ret = rtems_nvdisk_write_page (nvd, dc->device, page + dc->pages_desc, buffer);
if (ret)
1264a7: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1264aa: 85 c0 test %eax,%eax <== NOT EXECUTED
1264ac: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED
1264af: 74 2f je 1264e0 <rtems_nvdisk_ioctl+0x4b4><== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "write: blocks=%d", req->bufnum);
#endif
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
1264b1: b8 1b 00 00 00 mov $0x1b,%eax <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
1264b6: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
1264b9: 89 46 0c mov %eax,0xc(%esi) <== NOT EXECUTED
req->req_done (req->done_arg, req->status);
1264bc: 52 push %edx <== NOT EXECUTED
1264bd: 52 push %edx <== NOT EXECUTED
1264be: 50 push %eax <== NOT EXECUTED
1264bf: ff 76 08 pushl 0x8(%esi) <== NOT EXECUTED
1264c2: ff 56 04 call *0x4(%esi) <== NOT EXECUTED
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
break;
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_nvdisk_write (&rtems_nvdisks[minor], r);
1264c5: 8b 7d b0 mov -0x50(%ebp),%edi <== NOT EXECUTED
1264c8: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED
1264ce: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
1264d1: 03 05 94 48 17 00 add 0x174894,%eax <== NOT EXECUTED
break;
1264d7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1264da: e9 13 fc ff ff jmp 1260f2 <rtems_nvdisk_ioctl+0xc6><== NOT EXECUTED
1264df: 90 nop <== NOT EXECUTED
ret = rtems_nvdisk_write_page (nvd, dc->device, page + dc->pages_desc, buffer);
if (ret)
return ret;
return rtems_nvdisk_write_checksum (nvd, dc->device, page, cs);
1264e0: 8b 06 mov (%esi),%eax <== NOT EXECUTED
1264e2: 66 89 55 e6 mov %dx,-0x1a(%ebp) <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
1264e6: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED
1264e9: 8b 4e 14 mov 0x14(%esi),%ecx <== NOT EXECUTED
1264ec: 8d 14 80 lea (%eax,%eax,4),%edx <== NOT EXECUTED
1264ef: 8b 54 91 10 mov 0x10(%ecx,%edx,4),%edx <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
1264f3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1264f6: 8b 4a 0c mov 0xc(%edx),%ecx <== NOT EXECUTED
1264f9: 6a 02 push $0x2 <== NOT EXECUTED
1264fb: 8d 7d e6 lea -0x1a(%ebp),%edi <== NOT EXECUTED
1264fe: 57 push %edi <== NOT EXECUTED
1264ff: 8b 7d c8 mov -0x38(%ebp),%edi <== NOT EXECUTED
126502: d1 e7 shl %edi <== NOT EXECUTED
126504: 57 push %edi <== NOT EXECUTED
126505: ff 72 04 pushl 0x4(%edx) <== NOT EXECUTED
126508: ff 32 pushl (%edx) <== NOT EXECUTED
12650a: 50 push %eax <== NOT EXECUTED
12650b: ff 51 04 call *0x4(%ecx) <== NOT EXECUTED
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
{
ret = rtems_nvdisk_write_block (nvd, sg->block + b, data);
if (ret)
12650e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
126511: 85 c0 test %eax,%eax <== NOT EXECUTED
126513: 75 9c jne 1264b1 <rtems_nvdisk_ioctl+0x485><== NOT EXECUTED
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
126515: ff 45 d0 incl -0x30(%ebp) <== NOT EXECUTED
126518: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED
12651b: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
12651e: 39 55 bc cmp %edx,-0x44(%ebp) <== NOT EXECUTED
126521: 76 11 jbe 126534 <rtems_nvdisk_ioctl+0x508><== NOT EXECUTED
126523: 01 c3 add %eax,%ebx <== NOT EXECUTED
126525: e9 fa fe ff ff jmp 126424 <rtems_nvdisk_ioctl+0x3f8><== NOT EXECUTED
rtems_nvdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
12652a: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
12652f: e9 3b ff ff ff jmp 12646f <rtems_nvdisk_ioctl+0x443><== NOT EXECUTED
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
126534: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED
126537: 8b 4b 10 mov 0x10(%ebx),%ecx <== NOT EXECUTED
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
12653a: 83 45 c0 10 addl $0x10,-0x40(%ebp) <== NOT EXECUTED
12653e: ff 45 b4 incl -0x4c(%ebp) <== NOT EXECUTED
126541: e9 aa fe ff ff jmp 1263f0 <rtems_nvdisk_ioctl+0x3c4><== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "read: blocks=%d", req->bufnum);
#endif
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
126546: 31 c0 xor %eax,%eax <== NOT EXECUTED
126548: 31 d2 xor %edx,%edx <== NOT EXECUTED
12654a: e9 aa fd ff ff jmp 1262f9 <rtems_nvdisk_ioctl+0x2cd><== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "write: blocks=%d", req->bufnum);
#endif
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
12654f: 31 c0 xor %eax,%eax <== NOT EXECUTED
126551: e9 60 ff ff ff jmp 1264b6 <rtems_nvdisk_ioctl+0x48a><== NOT EXECUTED
00126850 <rtems_nvdisk_sram_read>:
uint32_t flags __attribute__((unused)),
void* base,
uint32_t offset,
void* buffer,
size_t size)
{
126850: 55 push %ebp <== NOT EXECUTED
126851: 89 e5 mov %esp,%ebp <== NOT EXECUTED
126853: 57 push %edi <== NOT EXECUTED
126854: 56 push %esi <== NOT EXECUTED
126855: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED
126858: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
12685b: 8b 4d 1c mov 0x1c(%ebp),%ecx <== NOT EXECUTED
memcpy (buffer, (base + offset), size);
12685e: 03 75 10 add 0x10(%ebp),%esi <== NOT EXECUTED
126861: 89 c7 mov %eax,%edi <== NOT EXECUTED
126863: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
return 0;
}
126865: 31 c0 xor %eax,%eax <== NOT EXECUTED
126867: 5e pop %esi <== NOT EXECUTED
126868: 5f pop %edi <== NOT EXECUTED
126869: c9 leave <== NOT EXECUTED
12686a: c3 ret <== NOT EXECUTED
00126804 <rtems_nvdisk_sram_verify>:
uint32_t flags __attribute__((unused)),
void* base,
uint32_t offset,
const void* buffer,
size_t size)
{
126804: 55 push %ebp <== NOT EXECUTED
126805: 89 e5 mov %esp,%ebp <== NOT EXECUTED
126807: 57 push %edi <== NOT EXECUTED
126808: 56 push %esi <== NOT EXECUTED
126809: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED
12680c: 8b 4d 1c mov 0x1c(%ebp),%ecx <== NOT EXECUTED
return memcmp ((base + offset), buffer, size) == 0 ? 0 : EIO;
12680f: 03 75 10 add 0x10(%ebp),%esi <== NOT EXECUTED
126812: 39 c9 cmp %ecx,%ecx <== NOT EXECUTED
126814: 8b 7d 18 mov 0x18(%ebp),%edi <== NOT EXECUTED
126817: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED
126819: 0f 97 c0 seta %al <== NOT EXECUTED
12681c: 0f 92 c2 setb %dl <== NOT EXECUTED
12681f: 28 d0 sub %dl,%al <== NOT EXECUTED
126821: 0f be c0 movsbl %al,%eax <== NOT EXECUTED
126824: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
126827: 19 c0 sbb %eax,%eax <== NOT EXECUTED
126829: f7 d0 not %eax <== NOT EXECUTED
12682b: 83 e0 05 and $0x5,%eax <== NOT EXECUTED
}
12682e: 5e pop %esi <== NOT EXECUTED
12682f: 5f pop %edi <== NOT EXECUTED
126830: c9 leave <== NOT EXECUTED
126831: c3 ret <== NOT EXECUTED
00126834 <rtems_nvdisk_sram_write>:
uint32_t flags __attribute__((unused)),
void* base,
uint32_t offset,
const void* buffer,
size_t size)
{
126834: 55 push %ebp <== NOT EXECUTED
126835: 89 e5 mov %esp,%ebp <== NOT EXECUTED
126837: 57 push %edi <== NOT EXECUTED
126838: 56 push %esi <== NOT EXECUTED
126839: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
12683c: 8b 75 18 mov 0x18(%ebp),%esi <== NOT EXECUTED
12683f: 8b 4d 1c mov 0x1c(%ebp),%ecx <== NOT EXECUTED
memcpy ((base + offset), buffer, size);
126842: 03 45 10 add 0x10(%ebp),%eax <== NOT EXECUTED
126845: 89 c7 mov %eax,%edi <== NOT EXECUTED
126847: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
return 0;
}
126849: 31 c0 xor %eax,%eax <== NOT EXECUTED
12684b: 5e pop %esi <== NOT EXECUTED
12684c: 5f pop %edi <== NOT EXECUTED
12684d: c9 leave <== NOT EXECUTED
12684e: c3 ret <== NOT EXECUTED
0010bf54 <rtems_object_get_api_name>:
};
const char *rtems_object_get_api_name(
int api
)
{
10bf54: 55 push %ebp
10bf55: 89 e5 mov %esp,%ebp
10bf57: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
10bf5a: ff 75 08 pushl 0x8(%ebp)
10bf5d: 68 e0 81 12 00 push $0x1281e0
10bf62: e8 91 54 00 00 call 1113f8 <rtems_assoc_ptr_by_local>
if ( api_assoc )
10bf67: 83 c4 10 add $0x10,%esp
10bf6a: 85 c0 test %eax,%eax
10bf6c: 74 06 je 10bf74 <rtems_object_get_api_name+0x20>
return api_assoc->name;
10bf6e: 8b 00 mov (%eax),%eax
return "BAD CLASS";
}
10bf70: c9 leave
10bf71: c3 ret
10bf72: 66 90 xchg %ax,%ax
)
{
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
if ( api_assoc )
10bf74: b8 4f 3f 12 00 mov $0x123f4f,%eax
return api_assoc->name;
return "BAD CLASS";
}
10bf79: c9 leave
10bf7a: c3 ret
0010d4dc <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
10d4dc: 55 push %ebp
10d4dd: 89 e5 mov %esp,%ebp
10d4df: 57 push %edi
10d4e0: 56 push %esi
10d4e1: 53 push %ebx
10d4e2: 83 ec 0c sub $0xc,%esp
10d4e5: 8b 5d 10 mov 0x10(%ebp),%ebx
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10d4e8: 85 db test %ebx,%ebx
10d4ea: 74 5c je 10d548 <rtems_object_get_class_information+0x6c>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
10d4ec: 83 ec 08 sub $0x8,%esp
10d4ef: ff 75 0c pushl 0xc(%ebp)
10d4f2: ff 75 08 pushl 0x8(%ebp)
10d4f5: e8 fe 1a 00 00 call 10eff8 <_Objects_Get_information>
if ( !obj_info )
10d4fa: 83 c4 10 add $0x10,%esp
10d4fd: 85 c0 test %eax,%eax
10d4ff: 74 57 je 10d558 <rtems_object_get_class_information+0x7c>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
10d501: 8b 50 08 mov 0x8(%eax),%edx
10d504: 89 13 mov %edx,(%ebx)
info->maximum_id = obj_info->maximum_id;
10d506: 8b 50 0c mov 0xc(%eax),%edx
10d509: 89 53 04 mov %edx,0x4(%ebx)
info->auto_extend = obj_info->auto_extend;
10d50c: 8a 50 12 mov 0x12(%eax),%dl
10d50f: 88 53 0c mov %dl,0xc(%ebx)
info->maximum = obj_info->maximum;
10d512: 0f b7 70 10 movzwl 0x10(%eax),%esi
10d516: 89 73 08 mov %esi,0x8(%ebx)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10d519: 85 f6 test %esi,%esi
10d51b: 74 3f je 10d55c <rtems_object_get_class_information+0x80><== NEVER TAKEN
10d51d: 8b 78 1c mov 0x1c(%eax),%edi
10d520: b9 01 00 00 00 mov $0x1,%ecx
10d525: b8 01 00 00 00 mov $0x1,%eax
10d52a: 31 d2 xor %edx,%edx
if ( !obj_info->local_table[i] )
unallocated++;
10d52c: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4)
10d530: 83 d2 00 adc $0x0,%edx
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10d533: 40 inc %eax
10d534: 89 c1 mov %eax,%ecx
10d536: 39 c6 cmp %eax,%esi
10d538: 73 f2 jae 10d52c <rtems_object_get_class_information+0x50>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
10d53a: 89 53 10 mov %edx,0x10(%ebx)
10d53d: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
10d53f: 8d 65 f4 lea -0xc(%ebp),%esp
10d542: 5b pop %ebx
10d543: 5e pop %esi
10d544: 5f pop %edi
10d545: c9 leave
10d546: c3 ret
10d547: 90 nop
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10d548: b8 09 00 00 00 mov $0x9,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10d54d: 8d 65 f4 lea -0xc(%ebp),%esp
10d550: 5b pop %ebx
10d551: 5e pop %esi
10d552: 5f pop %edi
10d553: c9 leave
10d554: c3 ret
10d555: 8d 76 00 lea 0x0(%esi),%esi
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
10d558: b0 0a mov $0xa,%al
10d55a: eb e3 jmp 10d53f <rtems_object_get_class_information+0x63>
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10d55c: 31 d2 xor %edx,%edx <== NOT EXECUTED
10d55e: eb da jmp 10d53a <rtems_object_get_class_information+0x5e><== NOT EXECUTED
00110398 <rtems_object_get_classic_name>:
rtems_status_code rtems_object_get_classic_name(
rtems_id id,
rtems_name *name
)
{
110398: 55 push %ebp
110399: 89 e5 mov %esp,%ebp
11039b: 53 push %ebx
11039c: 83 ec 14 sub $0x14,%esp
11039f: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
1103a2: 85 db test %ebx,%ebx
1103a4: 74 26 je 1103cc <rtems_object_get_classic_name+0x34>
return RTEMS_INVALID_ADDRESS;
status = _Objects_Id_to_name( id, &name_u );
1103a6: 83 ec 08 sub $0x8,%esp
1103a9: 8d 45 f4 lea -0xc(%ebp),%eax
1103ac: 50 push %eax
1103ad: ff 75 08 pushl 0x8(%ebp)
1103b0: e8 47 1d 00 00 call 1120fc <_Objects_Id_to_name>
*name = name_u.name_u32;
1103b5: 8b 55 f4 mov -0xc(%ebp),%edx
1103b8: 89 13 mov %edx,(%ebx)
return _Status_Object_name_errors_to_status[ status ];
1103ba: 8b 04 85 ec df 12 00 mov 0x12dfec(,%eax,4),%eax
1103c1: 83 c4 10 add $0x10,%esp
}
1103c4: 8b 5d fc mov -0x4(%ebp),%ebx
1103c7: c9 leave
1103c8: c3 ret
1103c9: 8d 76 00 lea 0x0(%esi),%esi
)
{
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
1103cc: b8 09 00 00 00 mov $0x9,%eax
status = _Objects_Id_to_name( id, &name_u );
*name = name_u.name_u32;
return _Status_Object_name_errors_to_status[ status ];
}
1103d1: 8b 5d fc mov -0x4(%ebp),%ebx
1103d4: c9 leave
1103d5: c3 ret
0010bf88 <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
10bf88: 55 push %ebp
10bf89: 89 e5 mov %esp,%ebp
10bf8b: 57 push %edi
10bf8c: 56 push %esi
10bf8d: 53 push %ebx
10bf8e: 83 ec 1c sub $0x1c,%esp
10bf91: 8b 75 08 mov 0x8(%ebp),%esi
10bf94: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
10bf97: 85 ff test %edi,%edi
10bf99: 74 61 je 10bffc <rtems_object_set_name+0x74>
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10bf9b: 85 f6 test %esi,%esi
10bf9d: 74 35 je 10bfd4 <rtems_object_set_name+0x4c>
information = _Objects_Get_information_id( tmpId );
10bf9f: 83 ec 0c sub $0xc,%esp
10bfa2: 56 push %esi
10bfa3: e8 dc 18 00 00 call 10d884 <_Objects_Get_information_id>
10bfa8: 89 c3 mov %eax,%ebx
if ( !information )
10bfaa: 83 c4 10 add $0x10,%esp
10bfad: 85 c0 test %eax,%eax
10bfaf: 74 16 je 10bfc7 <rtems_object_set_name+0x3f>
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
10bfb1: 50 push %eax
10bfb2: 8d 45 e4 lea -0x1c(%ebp),%eax
10bfb5: 50 push %eax
10bfb6: 56 push %esi
10bfb7: 53 push %ebx
10bfb8: e8 6b 1a 00 00 call 10da28 <_Objects_Get>
switch ( location ) {
10bfbd: 83 c4 10 add $0x10,%esp
10bfc0: 8b 4d e4 mov -0x1c(%ebp),%ecx
10bfc3: 85 c9 test %ecx,%ecx
10bfc5: 74 19 je 10bfe0 <rtems_object_set_name+0x58>
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
10bfc7: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bfcc: 8d 65 f4 lea -0xc(%ebp),%esp
10bfcf: 5b pop %ebx
10bfd0: 5e pop %esi
10bfd1: 5f pop %edi
10bfd2: c9 leave
10bfd3: c3 ret
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10bfd4: a1 78 a6 12 00 mov 0x12a678,%eax
10bfd9: 8b 70 08 mov 0x8(%eax),%esi
10bfdc: eb c1 jmp 10bf9f <rtems_object_set_name+0x17>
10bfde: 66 90 xchg %ax,%ax
the_object = _Objects_Get( information, tmpId, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
10bfe0: 52 push %edx
10bfe1: 57 push %edi
10bfe2: 50 push %eax
10bfe3: 53 push %ebx
10bfe4: e8 3b 1c 00 00 call 10dc24 <_Objects_Set_name>
_Thread_Enable_dispatch();
10bfe9: e8 82 23 00 00 call 10e370 <_Thread_Enable_dispatch>
10bfee: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10bff0: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bff3: 8d 65 f4 lea -0xc(%ebp),%esp
10bff6: 5b pop %ebx
10bff7: 5e pop %esi
10bff8: 5f pop %edi
10bff9: c9 leave
10bffa: c3 ret
10bffb: 90 nop
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
10bffc: b8 09 00 00 00 mov $0x9,%eax
10c001: eb c9 jmp 10bfcc <rtems_object_set_name+0x44>
0010ce1c <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
10ce1c: 55 push %ebp <== NOT EXECUTED
10ce1d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10ce1f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
/*
* rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...)
*/
void rtems_panic(
10ce22: 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);
10ce25: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
10ce28: b8 00 00 00 20 mov $0x20000000,%eax <== NOT EXECUTED
10ce2d: e8 4a fe ff ff call 10cc7c <rtems_verror> <== NOT EXECUTED
va_end(arglist);
}
10ce32: c9 leave <== NOT EXECUTED
10ce33: c3 ret <== NOT EXECUTED
001170d4 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
1170d4: 55 push %ebp
1170d5: 89 e5 mov %esp,%ebp
1170d7: 57 push %edi
1170d8: 56 push %esi
1170d9: 53 push %ebx
1170da: 83 ec 1c sub $0x1c,%esp
1170dd: 8b 5d 08 mov 0x8(%ebp),%ebx
1170e0: 8b 75 0c mov 0xc(%ebp),%esi
1170e3: 8b 55 10 mov 0x10(%ebp),%edx
1170e6: 8b 7d 14 mov 0x14(%ebp),%edi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
1170e9: 85 db test %ebx,%ebx
1170eb: 74 47 je 117134 <rtems_partition_create+0x60>
return RTEMS_INVALID_NAME;
if ( !starting_address )
1170ed: 85 f6 test %esi,%esi
1170ef: 74 23 je 117114 <rtems_partition_create+0x40>
return RTEMS_INVALID_ADDRESS;
if ( !id )
1170f1: 8b 45 1c mov 0x1c(%ebp),%eax
1170f4: 85 c0 test %eax,%eax
1170f6: 74 1c je 117114 <rtems_partition_create+0x40><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
1170f8: 85 d2 test %edx,%edx
1170fa: 74 28 je 117124 <rtems_partition_create+0x50>
1170fc: 85 ff test %edi,%edi
1170fe: 74 24 je 117124 <rtems_partition_create+0x50>
117100: 39 fa cmp %edi,%edx
117102: 72 20 jb 117124 <rtems_partition_create+0x50>
117104: f7 c7 03 00 00 00 test $0x3,%edi
11710a: 75 18 jne 117124 <rtems_partition_create+0x50>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
11710c: f7 c6 03 00 00 00 test $0x3,%esi
117112: 74 30 je 117144 <rtems_partition_create+0x70>
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
117114: b8 09 00 00 00 mov $0x9,%eax
}
117119: 8d 65 f4 lea -0xc(%ebp),%esp
11711c: 5b pop %ebx
11711d: 5e pop %esi
11711e: 5f pop %edi
11711f: c9 leave
117120: c3 ret
117121: 8d 76 00 lea 0x0(%esi),%esi
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
117124: b8 08 00 00 00 mov $0x8,%eax
}
117129: 8d 65 f4 lea -0xc(%ebp),%esp
11712c: 5b pop %ebx
11712d: 5e pop %esi
11712e: 5f pop %edi
11712f: c9 leave
117130: c3 ret
117131: 8d 76 00 lea 0x0(%esi),%esi
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
117134: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
117139: 8d 65 f4 lea -0xc(%ebp),%esp
11713c: 5b pop %ebx
11713d: 5e pop %esi
11713e: 5f pop %edi
11713f: c9 leave
117140: c3 ret
117141: 8d 76 00 lea 0x0(%esi),%esi
117144: a1 58 43 14 00 mov 0x144358,%eax
117149: 40 inc %eax
11714a: a3 58 43 14 00 mov %eax,0x144358
* 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 );
11714f: 83 ec 0c sub $0xc,%esp
117152: 68 e0 41 14 00 push $0x1441e0
117157: 89 55 e0 mov %edx,-0x20(%ebp)
11715a: e8 4d 43 00 00 call 11b4ac <_Objects_Allocate>
11715f: 89 45 e4 mov %eax,-0x1c(%ebp)
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
117162: 83 c4 10 add $0x10,%esp
117165: 85 c0 test %eax,%eax
117167: 8b 55 e0 mov -0x20(%ebp),%edx
11716a: 74 58 je 1171c4 <rtems_partition_create+0xf0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
11716c: 8b 45 e4 mov -0x1c(%ebp),%eax
11716f: 89 70 10 mov %esi,0x10(%eax)
the_partition->length = length;
117172: 89 50 14 mov %edx,0x14(%eax)
the_partition->buffer_size = buffer_size;
117175: 89 78 18 mov %edi,0x18(%eax)
the_partition->attribute_set = attribute_set;
117178: 8b 4d 18 mov 0x18(%ebp),%ecx
11717b: 89 48 1c mov %ecx,0x1c(%eax)
the_partition->number_of_used_blocks = 0;
11717e: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
_Chain_Initialize( &the_partition->Memory, starting_address,
117185: 57 push %edi
117186: 89 d0 mov %edx,%eax
117188: 31 d2 xor %edx,%edx
11718a: f7 f7 div %edi
11718c: 50 push %eax
11718d: 56 push %esi
11718e: 8b 45 e4 mov -0x1c(%ebp),%eax
117191: 83 c0 24 add $0x24,%eax
117194: 50 push %eax
117195: e8 b6 2f 00 00 call 11a150 <_Chain_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
11719a: 8b 7d e4 mov -0x1c(%ebp),%edi
11719d: 8b 47 08 mov 0x8(%edi),%eax
1171a0: 0f b7 f0 movzwl %ax,%esi
1171a3: 8b 15 fc 41 14 00 mov 0x1441fc,%edx
1171a9: 89 3c b2 mov %edi,(%edx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1171ac: 89 5f 0c mov %ebx,0xc(%edi)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
1171af: 8b 55 1c mov 0x1c(%ebp),%edx
1171b2: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
1171b4: e8 c3 50 00 00 call 11c27c <_Thread_Enable_dispatch>
1171b9: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1171bb: 83 c4 10 add $0x10,%esp
1171be: e9 66 ff ff ff jmp 117129 <rtems_partition_create+0x55>
1171c3: 90 nop
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
1171c4: e8 b3 50 00 00 call 11c27c <_Thread_Enable_dispatch>
1171c9: b8 05 00 00 00 mov $0x5,%eax
return RTEMS_TOO_MANY;
1171ce: e9 56 ff ff ff jmp 117129 <rtems_partition_create+0x55>
00117240 <rtems_partition_get_buffer>:
rtems_status_code rtems_partition_get_buffer(
rtems_id id,
void **buffer
)
{
117240: 55 push %ebp
117241: 89 e5 mov %esp,%ebp
117243: 56 push %esi
117244: 53 push %ebx
117245: 83 ec 20 sub $0x20,%esp
117248: 8b 5d 0c mov 0xc(%ebp),%ebx
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
11724b: 85 db test %ebx,%ebx
11724d: 74 59 je 1172a8 <rtems_partition_get_buffer+0x68>
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
11724f: 52 push %edx
117250: 8d 45 f4 lea -0xc(%ebp),%eax
117253: 50 push %eax
117254: ff 75 08 pushl 0x8(%ebp)
117257: 68 e0 41 14 00 push $0x1441e0
11725c: e8 37 47 00 00 call 11b998 <_Objects_Get>
117261: 89 c6 mov %eax,%esi
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
117263: 83 c4 10 add $0x10,%esp
117266: 8b 45 f4 mov -0xc(%ebp),%eax
117269: 85 c0 test %eax,%eax
11726b: 75 2f jne 11729c <rtems_partition_get_buffer+0x5c>
*/
RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer (
Partition_Control *the_partition
)
{
return _Chain_Get( &the_partition->Memory );
11726d: 83 ec 0c sub $0xc,%esp
117270: 8d 46 24 lea 0x24(%esi),%eax
117273: 50 push %eax
117274: e8 b3 2e 00 00 call 11a12c <_Chain_Get>
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
117279: 83 c4 10 add $0x10,%esp
11727c: 85 c0 test %eax,%eax
11727e: 74 34 je 1172b4 <rtems_partition_get_buffer+0x74>
the_partition->number_of_used_blocks += 1;
117280: ff 46 20 incl 0x20(%esi)
_Thread_Enable_dispatch();
117283: 89 45 e4 mov %eax,-0x1c(%ebp)
117286: e8 f1 4f 00 00 call 11c27c <_Thread_Enable_dispatch>
*buffer = the_buffer;
11728b: 8b 45 e4 mov -0x1c(%ebp),%eax
11728e: 89 03 mov %eax,(%ebx)
117290: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117292: 8d 65 f8 lea -0x8(%ebp),%esp
117295: 5b pop %ebx
117296: 5e pop %esi
117297: c9 leave
117298: c3 ret
117299: 8d 76 00 lea 0x0(%esi),%esi
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
11729c: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1172a1: 8d 65 f8 lea -0x8(%ebp),%esp
1172a4: 5b pop %ebx
1172a5: 5e pop %esi
1172a6: c9 leave
1172a7: c3 ret
{
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
1172a8: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1172ad: 8d 65 f8 lea -0x8(%ebp),%esp
1172b0: 5b pop %ebx
1172b1: 5e pop %esi
1172b2: c9 leave
1172b3: c3 ret
the_partition->number_of_used_blocks += 1;
_Thread_Enable_dispatch();
*buffer = the_buffer;
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
1172b4: e8 c3 4f 00 00 call 11c27c <_Thread_Enable_dispatch>
1172b9: b8 0d 00 00 00 mov $0xd,%eax
return RTEMS_UNSATISFIED;
1172be: eb e1 jmp 1172a1 <rtems_partition_get_buffer+0x61>
001172e4 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
1172e4: 55 push %ebp
1172e5: 89 e5 mov %esp,%ebp
1172e7: 56 push %esi
1172e8: 53 push %ebx
1172e9: 83 ec 14 sub $0x14,%esp
1172ec: 8b 75 0c mov 0xc(%ebp),%esi
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
1172ef: 8d 45 f4 lea -0xc(%ebp),%eax
1172f2: 50 push %eax
1172f3: ff 75 08 pushl 0x8(%ebp)
1172f6: 68 e0 41 14 00 push $0x1441e0
1172fb: e8 98 46 00 00 call 11b998 <_Objects_Get>
117300: 89 c3 mov %eax,%ebx
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
117302: 83 c4 10 add $0x10,%esp
117305: 8b 45 f4 mov -0xc(%ebp),%eax
117308: 85 c0 test %eax,%eax
11730a: 74 0c je 117318 <rtems_partition_return_buffer+0x34>
11730c: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117311: 8d 65 f8 lea -0x8(%ebp),%esp
117314: 5b pop %ebx
117315: 5e pop %esi
117316: c9 leave
117317: c3 ret
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
117318: 8b 43 10 mov 0x10(%ebx),%eax
ending = _Addresses_Add_offset( starting, the_partition->length );
11731b: 8b 53 14 mov 0x14(%ebx),%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
11731e: 39 c6 cmp %eax,%esi
117320: 72 3a jb 11735c <rtems_partition_return_buffer+0x78>
117322: 8d 14 10 lea (%eax,%edx,1),%edx
117325: 39 d6 cmp %edx,%esi
117327: 77 33 ja 11735c <rtems_partition_return_buffer+0x78><== NEVER TAKEN
return (
117329: 89 f2 mov %esi,%edx
11732b: 29 c2 sub %eax,%edx
11732d: 89 d0 mov %edx,%eax
11732f: 31 d2 xor %edx,%edx
117331: f7 73 18 divl 0x18(%ebx)
117334: 85 d2 test %edx,%edx
117336: 75 24 jne 11735c <rtems_partition_return_buffer+0x78>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
117338: 83 ec 08 sub $0x8,%esp
11733b: 56 push %esi
11733c: 8d 43 24 lea 0x24(%ebx),%eax
11733f: 50 push %eax
117340: e8 ab 2d 00 00 call 11a0f0 <_Chain_Append>
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
117345: ff 4b 20 decl 0x20(%ebx)
_Thread_Enable_dispatch();
117348: e8 2f 4f 00 00 call 11c27c <_Thread_Enable_dispatch>
11734d: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
11734f: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117352: 8d 65 f8 lea -0x8(%ebp),%esp
117355: 5b pop %ebx
117356: 5e pop %esi
117357: c9 leave
117358: c3 ret
117359: 8d 76 00 lea 0x0(%esi),%esi
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
11735c: e8 1b 4f 00 00 call 11c27c <_Thread_Enable_dispatch>
117361: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117366: 8d 65 f8 lea -0x8(%ebp),%esp
117369: 5b pop %ebx
11736a: 5e pop %esi
11736b: c9 leave
11736c: c3 ret
0010f29c <rtems_pipe_initialize>:
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
10f29c: 55 push %ebp
10f29d: 89 e5 mov %esp,%ebp
10f29f: 83 ec 08 sub $0x8,%esp
if (!rtems_pipe_configured)
10f2a2: 80 3d 44 76 12 00 00 cmpb $0x0,0x127644
10f2a9: 74 09 je 10f2b4 <rtems_pipe_initialize+0x18><== ALWAYS TAKEN
return;
if (rtems_pipe_semaphore)
10f2ab: a1 48 90 12 00 mov 0x129048,%eax <== NOT EXECUTED
10f2b0: 85 c0 test %eax,%eax <== NOT EXECUTED
10f2b2: 74 04 je 10f2b8 <rtems_pipe_initialize+0x1c><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
rtems_pipe_no = now;
}
10f2b4: c9 leave
10f2b5: c3 ret
10f2b6: 66 90 xchg %ax,%ax
if (rtems_pipe_semaphore)
return;
rtems_status_code sc;
sc = rtems_semaphore_create(
10f2b8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f2bb: 68 48 90 12 00 push $0x129048 <== NOT EXECUTED
10f2c0: 6a 00 push $0x0 <== NOT EXECUTED
10f2c2: 6a 54 push $0x54 <== NOT EXECUTED
10f2c4: 6a 01 push $0x1 <== NOT EXECUTED
10f2c6: 68 45 50 49 50 push $0x50495045 <== NOT EXECUTED
10f2cb: e8 9c c7 ff ff call 10ba6c <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)
10f2d0: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10f2d3: 85 c0 test %eax,%eax <== NOT EXECUTED
10f2d5: 75 0d jne 10f2e4 <rtems_pipe_initialize+0x48><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
10f2d7: e8 20 c3 ff ff call 10b5fc <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
rtems_pipe_no = now;
10f2dc: 66 a3 50 90 12 00 mov %ax,0x129050 <== NOT EXECUTED
}
10f2e2: c9 leave <== NOT EXECUTED
10f2e3: c3 ret <== NOT EXECUTED
sc = rtems_semaphore_create(
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)
rtems_fatal_error_occurred (sc);
10f2e4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f2e7: 50 push %eax <== NOT EXECUTED
10f2e8: e8 0b d0 ff ff call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
00116720 <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
116720: 55 push %ebp
116721: 89 e5 mov %esp,%ebp
116723: 57 push %edi
116724: 56 push %esi
116725: 53 push %ebx
116726: 83 ec 1c sub $0x1c,%esp
116729: 8b 5d 08 mov 0x8(%ebp),%ebx
11672c: 8b 55 0c mov 0xc(%ebp),%edx
11672f: 8b 7d 10 mov 0x10(%ebp),%edi
116732: 8b 75 18 mov 0x18(%ebp),%esi
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
116735: 85 db test %ebx,%ebx
116737: 74 1b je 116754 <rtems_port_create+0x34>
return RTEMS_INVALID_NAME;
if ( !id )
116739: 85 f6 test %esi,%esi
11673b: 74 08 je 116745 <rtems_port_create+0x25>
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
11673d: 89 f8 mov %edi,%eax
11673f: 09 d0 or %edx,%eax
116741: a8 03 test $0x3,%al
116743: 74 1f je 116764 <rtems_port_create+0x44>
(Objects_Name) name
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
116745: b8 09 00 00 00 mov $0x9,%eax
}
11674a: 8d 65 f4 lea -0xc(%ebp),%esp
11674d: 5b pop %ebx
11674e: 5e pop %esi
11674f: 5f pop %edi
116750: c9 leave
116751: c3 ret
116752: 66 90 xchg %ax,%ax
rtems_id *id
)
{
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
116754: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
116759: 8d 65 f4 lea -0xc(%ebp),%esp
11675c: 5b pop %ebx
11675d: 5e pop %esi
11675e: 5f pop %edi
11675f: c9 leave
116760: c3 ret
116761: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
116764: a1 58 43 14 00 mov 0x144358,%eax
116769: 40 inc %eax
11676a: a3 58 43 14 00 mov %eax,0x144358
* of free port control blocks.
*/
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
*_Dual_ported_memory_Allocate ( void )
{
return (Dual_ported_memory_Control *)
11676f: 83 ec 0c sub $0xc,%esp
116772: 68 a0 41 14 00 push $0x1441a0
116777: 89 55 e4 mov %edx,-0x1c(%ebp)
11677a: e8 2d 4d 00 00 call 11b4ac <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
11677f: 83 c4 10 add $0x10,%esp
116782: 85 c0 test %eax,%eax
116784: 8b 55 e4 mov -0x1c(%ebp),%edx
116787: 74 33 je 1167bc <rtems_port_create+0x9c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
116789: 89 50 10 mov %edx,0x10(%eax)
the_port->external_base = external_start;
11678c: 89 78 14 mov %edi,0x14(%eax)
the_port->length = length - 1;
11678f: 8b 55 14 mov 0x14(%ebp),%edx
116792: 4a dec %edx
116793: 89 50 18 mov %edx,0x18(%eax)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
116796: 8b 50 08 mov 0x8(%eax),%edx
116799: 0f b7 fa movzwl %dx,%edi
11679c: 8b 0d bc 41 14 00 mov 0x1441bc,%ecx
1167a2: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1167a5: 89 58 0c mov %ebx,0xc(%eax)
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
1167a8: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
1167aa: e8 cd 5a 00 00 call 11c27c <_Thread_Enable_dispatch>
1167af: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
1167b1: 8d 65 f4 lea -0xc(%ebp),%esp
1167b4: 5b pop %ebx
1167b5: 5e pop %esi
1167b6: 5f pop %edi
1167b7: c9 leave
1167b8: c3 ret
1167b9: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
_Thread_Enable_dispatch();
1167bc: e8 bb 5a 00 00 call 11c27c <_Thread_Enable_dispatch>
1167c1: b8 05 00 00 00 mov $0x5,%eax
return RTEMS_TOO_MANY;
1167c6: eb 82 jmp 11674a <rtems_port_create+0x2a>
001167c8 <rtems_port_delete>:
*/
rtems_status_code rtems_port_delete(
rtems_id id
)
{
1167c8: 55 push %ebp
1167c9: 89 e5 mov %esp,%ebp
1167cb: 83 ec 2c sub $0x2c,%esp
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
1167ce: 8d 45 f4 lea -0xc(%ebp),%eax
1167d1: 50 push %eax
1167d2: ff 75 08 pushl 0x8(%ebp)
1167d5: 68 a0 41 14 00 push $0x1441a0
1167da: e8 b9 51 00 00 call 11b998 <_Objects_Get>
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
1167df: 83 c4 10 add $0x10,%esp
1167e2: 8b 4d f4 mov -0xc(%ebp),%ecx
1167e5: 85 c9 test %ecx,%ecx
1167e7: 75 2f jne 116818 <rtems_port_delete+0x50>
case OBJECTS_LOCAL:
_Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
1167e9: 83 ec 08 sub $0x8,%esp
1167ec: 50 push %eax
1167ed: 68 a0 41 14 00 push $0x1441a0
1167f2: 89 45 e4 mov %eax,-0x1c(%ebp)
1167f5: e8 2e 4d 00 00 call 11b528 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free (
Dual_ported_memory_Control *the_port
)
{
_Objects_Free( &_Dual_ported_memory_Information, &the_port->Object );
1167fa: 58 pop %eax
1167fb: 5a pop %edx
1167fc: 8b 45 e4 mov -0x1c(%ebp),%eax
1167ff: 50 push %eax
116800: 68 a0 41 14 00 push $0x1441a0
116805: e8 22 50 00 00 call 11b82c <_Objects_Free>
_Dual_ported_memory_Free( the_port );
_Thread_Enable_dispatch();
11680a: e8 6d 5a 00 00 call 11c27c <_Thread_Enable_dispatch>
11680f: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
116811: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116814: c9 leave
116815: c3 ret
116816: 66 90 xchg %ax,%ax
{
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
116818: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11681d: c9 leave
11681e: c3 ret
00116820 <rtems_port_external_to_internal>:
rtems_status_code rtems_port_external_to_internal(
rtems_id id,
void *external,
void **internal
)
{
116820: 55 push %ebp
116821: 89 e5 mov %esp,%ebp
116823: 56 push %esi
116824: 53 push %ebx
116825: 83 ec 10 sub $0x10,%esp
116828: 8b 75 0c mov 0xc(%ebp),%esi
11682b: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
11682e: 85 db test %ebx,%ebx
116830: 74 4e je 116880 <rtems_port_external_to_internal+0x60>
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
116832: 51 push %ecx
116833: 8d 45 f4 lea -0xc(%ebp),%eax
116836: 50 push %eax
116837: ff 75 08 pushl 0x8(%ebp)
11683a: 68 a0 41 14 00 push $0x1441a0
11683f: e8 54 51 00 00 call 11b998 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
116844: 83 c4 10 add $0x10,%esp
116847: 8b 55 f4 mov -0xc(%ebp),%edx
11684a: 85 d2 test %edx,%edx
11684c: 74 0e je 11685c <rtems_port_external_to_internal+0x3c>
11684e: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116853: 8d 65 f8 lea -0x8(%ebp),%esp
116856: 5b pop %ebx
116857: 5e pop %esi
116858: c9 leave
116859: c3 ret
11685a: 66 90 xchg %ax,%ax
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
11685c: 89 f2 mov %esi,%edx
11685e: 2b 50 14 sub 0x14(%eax),%edx
if ( ending > the_port->length )
116861: 3b 50 18 cmp 0x18(%eax),%edx
116864: 77 16 ja 11687c <rtems_port_external_to_internal+0x5c>
*internal = external;
else
*internal = _Addresses_Add_offset( the_port->internal_base,
116866: 03 50 10 add 0x10(%eax),%edx
116869: 89 13 mov %edx,(%ebx)
ending );
_Thread_Enable_dispatch();
11686b: e8 0c 5a 00 00 call 11c27c <_Thread_Enable_dispatch>
116870: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116872: 8d 65 f8 lea -0x8(%ebp),%esp
116875: 5b pop %ebx
116876: 5e pop %esi
116877: c9 leave
116878: c3 ret
116879: 8d 76 00 lea 0x0(%esi),%esi
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
*internal = external;
11687c: 89 33 mov %esi,(%ebx)
11687e: eb eb jmp 11686b <rtems_port_external_to_internal+0x4b>
{
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
116880: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116885: 8d 65 f8 lea -0x8(%ebp),%esp
116888: 5b pop %ebx
116889: 5e pop %esi
11688a: c9 leave
11688b: c3 ret
001168b0 <rtems_port_internal_to_external>:
rtems_status_code rtems_port_internal_to_external(
rtems_id id,
void *internal,
void **external
)
{
1168b0: 55 push %ebp
1168b1: 89 e5 mov %esp,%ebp
1168b3: 56 push %esi
1168b4: 53 push %ebx
1168b5: 83 ec 10 sub $0x10,%esp
1168b8: 8b 75 0c mov 0xc(%ebp),%esi
1168bb: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
1168be: 85 db test %ebx,%ebx
1168c0: 74 4e je 116910 <rtems_port_internal_to_external+0x60>
1168c2: 51 push %ecx
1168c3: 8d 45 f4 lea -0xc(%ebp),%eax
1168c6: 50 push %eax
1168c7: ff 75 08 pushl 0x8(%ebp)
1168ca: 68 a0 41 14 00 push $0x1441a0
1168cf: e8 c4 50 00 00 call 11b998 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
1168d4: 83 c4 10 add $0x10,%esp
1168d7: 8b 55 f4 mov -0xc(%ebp),%edx
1168da: 85 d2 test %edx,%edx
1168dc: 74 0e je 1168ec <rtems_port_internal_to_external+0x3c>
1168de: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1168e3: 8d 65 f8 lea -0x8(%ebp),%esp
1168e6: 5b pop %ebx
1168e7: 5e pop %esi
1168e8: c9 leave
1168e9: c3 ret
1168ea: 66 90 xchg %ax,%ax
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
1168ec: 89 f2 mov %esi,%edx
1168ee: 2b 50 10 sub 0x10(%eax),%edx
if ( ending > the_port->length )
1168f1: 3b 50 18 cmp 0x18(%eax),%edx
1168f4: 77 16 ja 11690c <rtems_port_internal_to_external+0x5c>
*external = internal;
else
*external = _Addresses_Add_offset( the_port->external_base,
1168f6: 03 50 14 add 0x14(%eax),%edx
1168f9: 89 13 mov %edx,(%ebx)
ending );
_Thread_Enable_dispatch();
1168fb: e8 7c 59 00 00 call 11c27c <_Thread_Enable_dispatch>
116900: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116902: 8d 65 f8 lea -0x8(%ebp),%esp
116905: 5b pop %ebx
116906: 5e pop %esi
116907: c9 leave
116908: c3 ret
116909: 8d 76 00 lea 0x0(%esi),%esi
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
*external = internal;
11690c: 89 33 mov %esi,(%ebx)
11690e: eb eb jmp 1168fb <rtems_port_internal_to_external+0x4b>
{
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
116910: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116915: 8d 65 f8 lea -0x8(%ebp),%esp
116918: 5b pop %ebx
116919: 5e pop %esi
11691a: c9 leave
11691b: c3 ret
00117370 <rtems_rate_monotonic_cancel>:
*/
rtems_status_code rtems_rate_monotonic_cancel(
rtems_id id
)
{
117370: 55 push %ebp
117371: 89 e5 mov %esp,%ebp
117373: 53 push %ebx
117374: 83 ec 18 sub $0x18,%esp
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
117377: 8d 45 f4 lea -0xc(%ebp),%eax
11737a: 50 push %eax
11737b: ff 75 08 pushl 0x8(%ebp)
11737e: 68 20 42 14 00 push $0x144220
117383: e8 10 46 00 00 call 11b998 <_Objects_Get>
117388: 89 c3 mov %eax,%ebx
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
11738a: 83 c4 10 add $0x10,%esp
11738d: 8b 45 f4 mov -0xc(%ebp),%eax
117390: 85 c0 test %eax,%eax
117392: 74 0c je 1173a0 <rtems_rate_monotonic_cancel+0x30>
117394: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117399: 8b 5d fc mov -0x4(%ebp),%ebx
11739c: c9 leave
11739d: c3 ret
11739e: 66 90 xchg %ax,%ax
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
1173a0: 8b 43 40 mov 0x40(%ebx),%eax
1173a3: 3b 05 18 44 14 00 cmp 0x144418,%eax
1173a9: 74 11 je 1173bc <rtems_rate_monotonic_cancel+0x4c>
_Thread_Enable_dispatch();
1173ab: e8 cc 4e 00 00 call 11c27c <_Thread_Enable_dispatch>
1173b0: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1173b5: 8b 5d fc mov -0x4(%ebp),%ebx
1173b8: c9 leave
1173b9: c3 ret
1173ba: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
(void) _Watchdog_Remove( &the_period->Timer );
1173bc: 83 ec 0c sub $0xc,%esp
1173bf: 8d 43 10 lea 0x10(%ebx),%eax
1173c2: 50 push %eax
1173c3: e8 10 63 00 00 call 11d6d8 <_Watchdog_Remove>
the_period->state = RATE_MONOTONIC_INACTIVE;
1173c8: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx)
_Thread_Enable_dispatch();
1173cf: e8 a8 4e 00 00 call 11c27c <_Thread_Enable_dispatch>
1173d4: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1173d6: 83 c4 10 add $0x10,%esp
1173d9: eb be jmp 117399 <rtems_rate_monotonic_cancel+0x29>
0010c96c <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
10c96c: 55 push %ebp
10c96d: 89 e5 mov %esp,%ebp
10c96f: 57 push %edi
10c970: 56 push %esi
10c971: 53 push %ebx
10c972: 83 ec 1c sub $0x1c,%esp
10c975: 8b 5d 08 mov 0x8(%ebp),%ebx
10c978: 8b 75 0c mov 0xc(%ebp),%esi
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
10c97b: 85 db test %ebx,%ebx
10c97d: 0f 84 a9 00 00 00 je 10ca2c <rtems_rate_monotonic_create+0xc0>
return RTEMS_INVALID_NAME;
if ( !id )
10c983: 85 f6 test %esi,%esi
10c985: 0f 84 c5 00 00 00 je 10ca50 <rtems_rate_monotonic_create+0xe4>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c98b: a1 38 c5 12 00 mov 0x12c538,%eax
10c990: 40 inc %eax
10c991: a3 38 c5 12 00 mov %eax,0x12c538
* This function allocates a period control block from
* the inactive chain of free period control blocks.
*/
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
{
return (Rate_monotonic_Control *)
10c996: 83 ec 0c sub $0xc,%esp
10c999: 68 40 c4 12 00 push $0x12c440
10c99e: e8 85 1e 00 00 call 10e828 <_Objects_Allocate>
10c9a3: 89 c2 mov %eax,%edx
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
10c9a5: 83 c4 10 add $0x10,%esp
10c9a8: 85 c0 test %eax,%eax
10c9aa: 0f 84 8c 00 00 00 je 10ca3c <rtems_rate_monotonic_create+0xd0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
10c9b0: a1 f8 c5 12 00 mov 0x12c5f8,%eax
10c9b5: 89 42 40 mov %eax,0x40(%edx)
the_period->state = RATE_MONOTONIC_INACTIVE;
10c9b8: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c9bf: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
10c9c6: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx)
the_watchdog->id = id;
10c9cd: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
the_watchdog->user_data = user_data;
10c9d4: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
10c9db: 8d 42 54 lea 0x54(%edx),%eax
10c9de: 89 45 e4 mov %eax,-0x1c(%ebp)
10c9e1: b9 38 00 00 00 mov $0x38,%ecx
10c9e6: 31 c0 xor %eax,%eax
10c9e8: 8b 7d e4 mov -0x1c(%ebp),%edi
10c9eb: f3 aa rep stos %al,%es:(%edi)
10c9ed: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx)
10c9f4: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx)
10c9fb: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx)
10ca02: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10ca09: 8b 42 08 mov 0x8(%edx),%eax
10ca0c: 0f b7 f8 movzwl %ax,%edi
10ca0f: 8b 0d 5c c4 12 00 mov 0x12c45c,%ecx
10ca15: 89 14 b9 mov %edx,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10ca18: 89 5a 0c mov %ebx,0xc(%edx)
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
10ca1b: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10ca1d: e8 0e 2c 00 00 call 10f630 <_Thread_Enable_dispatch>
10ca22: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
10ca24: 8d 65 f4 lea -0xc(%ebp),%esp
10ca27: 5b pop %ebx
10ca28: 5e pop %esi
10ca29: 5f pop %edi
10ca2a: c9 leave
10ca2b: c3 ret
rtems_id *id
)
{
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
10ca2c: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10ca31: 8d 65 f4 lea -0xc(%ebp),%esp
10ca34: 5b pop %ebx
10ca35: 5e pop %esi
10ca36: 5f pop %edi
10ca37: c9 leave
10ca38: c3 ret
10ca39: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
_Thread_Enable_dispatch();
10ca3c: e8 ef 2b 00 00 call 10f630 <_Thread_Enable_dispatch>
10ca41: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10ca46: 8d 65 f4 lea -0xc(%ebp),%esp
10ca49: 5b pop %ebx
10ca4a: 5e pop %esi
10ca4b: 5f pop %edi
10ca4c: c9 leave
10ca4d: c3 ret
10ca4e: 66 90 xchg %ax,%ax
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
10ca50: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10ca55: 8d 65 f4 lea -0xc(%ebp),%esp
10ca58: 5b pop %ebx
10ca59: 5e pop %esi
10ca5a: 5f pop %edi
10ca5b: c9 leave
10ca5c: c3 ret
00144a6c <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
144a6c: 55 push %ebp
144a6d: 89 e5 mov %esp,%ebp
144a6f: 53 push %ebx
144a70: 83 ec 24 sub $0x24,%esp
144a73: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
144a76: 85 db test %ebx,%ebx
144a78: 0f 84 92 00 00 00 je 144b10 <rtems_rate_monotonic_get_status+0xa4>
144a7e: 50 push %eax
144a7f: 8d 45 f4 lea -0xc(%ebp),%eax
144a82: 50 push %eax
144a83: ff 75 08 pushl 0x8(%ebp)
144a86: 68 60 5b 17 00 push $0x175b60
144a8b: e8 cc 01 fd ff call 114c5c <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
144a90: 83 c4 10 add $0x10,%esp
144a93: 8b 4d f4 mov -0xc(%ebp),%ecx
144a96: 85 c9 test %ecx,%ecx
144a98: 74 0a je 144aa4 <rtems_rate_monotonic_get_status+0x38>
144a9a: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
144a9f: 8b 5d fc mov -0x4(%ebp),%ebx
144aa2: c9 leave
144aa3: c3 ret
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
144aa4: 8b 50 40 mov 0x40(%eax),%edx
144aa7: 8b 52 08 mov 0x8(%edx),%edx
144aaa: 89 13 mov %edx,(%ebx)
status->state = the_period->state;
144aac: 8b 50 38 mov 0x38(%eax),%edx
144aaf: 89 53 04 mov %edx,0x4(%ebx)
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
144ab2: 85 d2 test %edx,%edx
144ab4: 75 2a jne 144ae0 <rtems_rate_monotonic_get_status+0x74>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
144ab6: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
144abd: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
_Timespec_Set_to_zero( &status->executed_since_last_period );
144ac4: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
144acb: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
status->since_last_period = since_last_period;
status->executed_since_last_period = executed;
#endif
}
_Thread_Enable_dispatch();
144ad2: e8 a9 0a fd ff call 115580 <_Thread_Enable_dispatch>
144ad7: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
144ad9: 8b 5d fc mov -0x4(%ebp),%ebx
144adc: c9 leave
144add: c3 ret
144ade: 66 90 xchg %ax,%ax
/*
* Grab the current status.
*/
valid_status =
_Rate_monotonic_Get_status(
144ae0: 52 push %edx
144ae1: 8d 55 ec lea -0x14(%ebp),%edx
144ae4: 52 push %edx
144ae5: 8d 55 e4 lea -0x1c(%ebp),%edx
144ae8: 52 push %edx
144ae9: 50 push %eax
144aea: e8 b1 00 00 00 call 144ba0 <_Rate_monotonic_Get_status>
the_period, &since_last_period, &executed
);
if (!valid_status) {
144aef: 83 c4 10 add $0x10,%esp
144af2: 84 c0 test %al,%al
144af4: 74 26 je 144b1c <rtems_rate_monotonic_get_status+0xb0>
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
144af6: 8b 45 e4 mov -0x1c(%ebp),%eax
144af9: 8b 55 e8 mov -0x18(%ebp),%edx
144afc: 89 43 08 mov %eax,0x8(%ebx)
144aff: 89 53 0c mov %edx,0xc(%ebx)
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
144b02: 8b 45 ec mov -0x14(%ebp),%eax
144b05: 8b 55 f0 mov -0x10(%ebp),%edx
144b08: 89 43 10 mov %eax,0x10(%ebx)
144b0b: 89 53 14 mov %edx,0x14(%ebx)
144b0e: eb c2 jmp 144ad2 <rtems_rate_monotonic_get_status+0x66>
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
144b10: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
144b15: 8b 5d fc mov -0x4(%ebp),%ebx
144b18: c9 leave
144b19: c3 ret
144b1a: 66 90 xchg %ax,%ax
valid_status =
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
_Thread_Enable_dispatch();
144b1c: e8 5f 0a fd ff call 115580 <_Thread_Enable_dispatch>
144b21: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_NOT_DEFINED;
144b26: e9 74 ff ff ff jmp 144a9f <rtems_rate_monotonic_get_status+0x33>
00144d28 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
144d28: 55 push %ebp
144d29: 89 e5 mov %esp,%ebp
144d2b: 57 push %edi
144d2c: 56 push %esi
144d2d: 53 push %ebx
144d2e: 83 ec 30 sub $0x30,%esp
144d31: 8b 5d 08 mov 0x8(%ebp),%ebx
144d34: 8b 75 0c mov 0xc(%ebp),%esi
144d37: 8d 45 e4 lea -0x1c(%ebp),%eax
144d3a: 50 push %eax
144d3b: 53 push %ebx
144d3c: 68 60 5b 17 00 push $0x175b60
144d41: e8 16 ff fc ff call 114c5c <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
144d46: 83 c4 10 add $0x10,%esp
144d49: 8b 7d e4 mov -0x1c(%ebp),%edi
144d4c: 85 ff test %edi,%edi
144d4e: 74 10 je 144d60 <rtems_rate_monotonic_period+0x38>
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
144d50: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
144d55: 8d 65 f4 lea -0xc(%ebp),%esp
144d58: 5b pop %ebx
144d59: 5e pop %esi
144d5a: 5f pop %edi
144d5b: c9 leave
144d5c: c3 ret
144d5d: 8d 76 00 lea 0x0(%esi),%esi
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
144d60: 8b 50 40 mov 0x40(%eax),%edx
144d63: 3b 15 18 50 17 00 cmp 0x175018,%edx
144d69: 74 15 je 144d80 <rtems_rate_monotonic_period+0x58>
_Thread_Enable_dispatch();
144d6b: e8 10 08 fd ff call 115580 <_Thread_Enable_dispatch>
144d70: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
144d75: 8d 65 f4 lea -0xc(%ebp),%esp
144d78: 5b pop %ebx
144d79: 5e pop %esi
144d7a: 5f pop %edi
144d7b: c9 leave
144d7c: c3 ret
144d7d: 8d 76 00 lea 0x0(%esi),%esi
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
144d80: 85 f6 test %esi,%esi
144d82: 0f 84 b0 00 00 00 je 144e38 <rtems_rate_monotonic_period+0x110>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
144d88: 9c pushf
144d89: fa cli
144d8a: 5f pop %edi
switch ( the_period->state ) {
144d8b: 8b 50 38 mov 0x38(%eax),%edx
144d8e: 83 fa 02 cmp $0x2,%edx
144d91: 0f 84 bd 00 00 00 je 144e54 <rtems_rate_monotonic_period+0x12c>
144d97: 83 fa 04 cmp $0x4,%edx
144d9a: 74 5c je 144df8 <rtems_rate_monotonic_period+0xd0>
144d9c: 85 d2 test %edx,%edx
144d9e: 75 b0 jne 144d50 <rtems_rate_monotonic_period+0x28><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
144da0: 57 push %edi
144da1: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
144da2: 83 ec 0c sub $0xc,%esp
144da5: 50 push %eax
144da6: 89 45 d4 mov %eax,-0x2c(%ebp)
144da9: e8 7e fd ff ff call 144b2c <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
144dae: 8b 45 d4 mov -0x2c(%ebp),%eax
144db1: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
144db8: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
144dbf: c7 40 2c d8 4e 14 00 movl $0x144ed8,0x2c(%eax)
the_watchdog->id = id;
144dc6: 89 58 30 mov %ebx,0x30(%eax)
the_watchdog->user_data = user_data;
144dc9: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
144dd0: 89 70 3c mov %esi,0x3c(%eax)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
144dd3: 89 70 1c mov %esi,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
144dd6: 5a pop %edx
144dd7: 59 pop %ecx
144dd8: 83 c0 10 add $0x10,%eax
144ddb: 50 push %eax
144ddc: 68 38 50 17 00 push $0x175038
144de1: e8 3a 17 fd ff call 116520 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
144de6: e8 95 07 fd ff call 115580 <_Thread_Enable_dispatch>
144deb: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
144ded: 83 c4 10 add $0x10,%esp
144df0: e9 60 ff ff ff jmp 144d55 <rtems_rate_monotonic_period+0x2d>
144df5: 8d 76 00 lea 0x0(%esi),%esi
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
144df8: 83 ec 0c sub $0xc,%esp
144dfb: 50 push %eax
144dfc: 89 45 d4 mov %eax,-0x2c(%ebp)
144dff: e8 34 fe ff ff call 144c38 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
144e04: 57 push %edi
144e05: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
144e06: 8b 45 d4 mov -0x2c(%ebp),%eax
144e09: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
the_period->next_length = length;
144e10: 89 70 3c mov %esi,0x3c(%eax)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
144e13: 89 70 1c mov %esi,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
144e16: 59 pop %ecx
144e17: 5b pop %ebx
144e18: 83 c0 10 add $0x10,%eax
144e1b: 50 push %eax
144e1c: 68 38 50 17 00 push $0x175038
144e21: e8 fa 16 fd ff call 116520 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
144e26: e8 55 07 fd ff call 115580 <_Thread_Enable_dispatch>
144e2b: b8 06 00 00 00 mov $0x6,%eax
return RTEMS_TIMEOUT;
144e30: 83 c4 10 add $0x10,%esp
144e33: e9 1d ff ff ff jmp 144d55 <rtems_rate_monotonic_period+0x2d>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
144e38: 8b 40 38 mov 0x38(%eax),%eax
144e3b: 83 f8 04 cmp $0x4,%eax
144e3e: 76 74 jbe 144eb4 <rtems_rate_monotonic_period+0x18c><== ALWAYS TAKEN
144e40: 31 c0 xor %eax,%eax
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
144e42: 89 45 d4 mov %eax,-0x2c(%ebp)
144e45: e8 36 07 fd ff call 115580 <_Thread_Enable_dispatch>
return( return_value );
144e4a: 8b 45 d4 mov -0x2c(%ebp),%eax
144e4d: e9 03 ff ff ff jmp 144d55 <rtems_rate_monotonic_period+0x2d>
144e52: 66 90 xchg %ax,%ax
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
144e54: 83 ec 0c sub $0xc,%esp
144e57: 50 push %eax
144e58: 89 45 d4 mov %eax,-0x2c(%ebp)
144e5b: e8 d8 fd ff ff call 144c38 <_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;
144e60: 8b 45 d4 mov -0x2c(%ebp),%eax
144e63: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax)
the_period->next_length = length;
144e6a: 89 70 3c mov %esi,0x3c(%eax)
_ISR_Enable( level );
144e6d: 57 push %edi
144e6e: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
144e6f: 8b 15 18 50 17 00 mov 0x175018,%edx
144e75: 8b 48 08 mov 0x8(%eax),%ecx
144e78: 89 4a 20 mov %ecx,0x20(%edx)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
144e7b: 5e pop %esi
144e7c: 5f pop %edi
144e7d: 68 00 40 00 00 push $0x4000
144e82: 52 push %edx
144e83: 89 45 d4 mov %eax,-0x2c(%ebp)
144e86: e8 0d 10 fd ff call 115e98 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
144e8b: 9c pushf
144e8c: fa cli
144e8d: 59 pop %ecx
local_state = the_period->state;
144e8e: 8b 45 d4 mov -0x2c(%ebp),%eax
144e91: 8b 50 38 mov 0x38(%eax),%edx
the_period->state = RATE_MONOTONIC_ACTIVE;
144e94: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
_ISR_Enable( level );
144e9b: 51 push %ecx
144e9c: 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 )
144e9d: 83 c4 10 add $0x10,%esp
144ea0: 83 fa 03 cmp $0x3,%edx
144ea3: 74 18 je 144ebd <rtems_rate_monotonic_period+0x195>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
144ea5: e8 d6 06 fd ff call 115580 <_Thread_Enable_dispatch>
144eaa: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
144eac: e9 a4 fe ff ff jmp 144d55 <rtems_rate_monotonic_period+0x2d>
144eb1: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
144eb4: 8b 04 85 ec 9b 16 00 mov 0x169bec(,%eax,4),%eax
144ebb: eb 85 jmp 144e42 <rtems_rate_monotonic_period+0x11a>
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
144ebd: 83 ec 08 sub $0x8,%esp
144ec0: 68 00 40 00 00 push $0x4000
144ec5: ff 35 18 50 17 00 pushl 0x175018
144ecb: e8 08 03 fd ff call 1151d8 <_Thread_Clear_state>
144ed0: 83 c4 10 add $0x10,%esp
144ed3: eb d0 jmp 144ea5 <rtems_rate_monotonic_period+0x17d>
00130f20 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
130f20: 55 push %ebp
130f21: 89 e5 mov %esp,%ebp
130f23: 57 push %edi
130f24: 56 push %esi
130f25: 53 push %ebx
130f26: 83 ec 7c sub $0x7c,%esp
130f29: 8b 7d 08 mov 0x8(%ebp),%edi
130f2c: 8b 75 0c mov 0xc(%ebp),%esi
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
130f2f: 85 f6 test %esi,%esi
130f31: 0f 84 bd 00 00 00 je 130ff4 <rtems_rate_monotonic_report_statistics_with_plugin+0xd4><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
130f37: 83 ec 08 sub $0x8,%esp
130f3a: 68 68 5f 16 00 push $0x165f68
130f3f: 57 push %edi
130f40: ff d6 call *%esi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
130f42: 59 pop %ecx
130f43: 5b pop %ebx
130f44: 68 a0 5f 16 00 push $0x165fa0
130f49: 57 push %edi
130f4a: ff d6 call *%esi
(*print)( context, "--- Wall times are in seconds ---\n" );
130f4c: 58 pop %eax
130f4d: 5a pop %edx
130f4e: 68 c4 5f 16 00 push $0x165fc4
130f53: 57 push %edi
130f54: ff d6 call *%esi
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
130f56: 59 pop %ecx
130f57: 5b pop %ebx
130f58: 68 e8 5f 16 00 push $0x165fe8
130f5d: 57 push %edi
130f5e: ff d6 call *%esi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
130f60: 58 pop %eax
130f61: 5a pop %edx
130f62: 68 34 60 16 00 push $0x166034
130f67: 57 push %edi
130f68: ff d6 call *%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 ;
130f6a: 8b 1d 68 5b 17 00 mov 0x175b68,%ebx
130f70: 83 c4 10 add $0x10,%esp
130f73: 3b 1d 6c 5b 17 00 cmp 0x175b6c,%ebx
130f79: 77 79 ja 130ff4 <rtems_rate_monotonic_report_statistics_with_plugin+0xd4><== NEVER TAKEN
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);
130f7b: 89 75 84 mov %esi,-0x7c(%ebp)
130f7e: eb 09 jmp 130f89 <rtems_rate_monotonic_report_statistics_with_plugin+0x69>
* 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++ ) {
130f80: 43 inc %ebx
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
130f81: 39 1d 6c 5b 17 00 cmp %ebx,0x175b6c
130f87: 72 6b jb 130ff4 <rtems_rate_monotonic_report_statistics_with_plugin+0xd4>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
130f89: 83 ec 08 sub $0x8,%esp
130f8c: 8d 45 88 lea -0x78(%ebp),%eax
130f8f: 50 push %eax
130f90: 53 push %ebx
130f91: e8 2a 3a 01 00 call 1449c0 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
130f96: 83 c4 10 add $0x10,%esp
130f99: 85 c0 test %eax,%eax
130f9b: 75 e3 jne 130f80 <rtems_rate_monotonic_report_statistics_with_plugin+0x60>
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
130f9d: 83 ec 08 sub $0x8,%esp
130fa0: 8d 55 c0 lea -0x40(%ebp),%edx
130fa3: 52 push %edx
130fa4: 53 push %ebx
130fa5: e8 c2 3a 01 00 call 144a6c <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 );
130faa: 83 c4 0c add $0xc,%esp
130fad: 8d 45 e3 lea -0x1d(%ebp),%eax
130fb0: 50 push %eax
130fb1: 6a 05 push $0x5
130fb3: ff 75 c0 pushl -0x40(%ebp)
130fb6: e8 5d 1c fe ff call 112c18 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
130fbb: 59 pop %ecx
130fbc: 5e pop %esi
130fbd: ff 75 8c pushl -0x74(%ebp)
130fc0: ff 75 88 pushl -0x78(%ebp)
130fc3: 8d 55 e3 lea -0x1d(%ebp),%edx
130fc6: 52 push %edx
130fc7: 53 push %ebx
130fc8: 68 86 5f 16 00 push $0x165f86
130fcd: 57 push %edi
130fce: ff 55 84 call *-0x7c(%ebp)
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
130fd1: 8b 45 88 mov -0x78(%ebp),%eax
130fd4: 83 c4 20 add $0x20,%esp
130fd7: 85 c0 test %eax,%eax
130fd9: 75 21 jne 130ffc <rtems_rate_monotonic_report_statistics_with_plugin+0xdc>
(*print)( context, "\n" );
130fdb: 83 ec 08 sub $0x8,%esp
130fde: 68 69 7d 16 00 push $0x167d69
130fe3: 57 push %edi
130fe4: ff 55 84 call *-0x7c(%ebp)
continue;
130fe7: 83 c4 10 add $0x10,%esp
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
130fea: 43 inc %ebx
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
130feb: 39 1d 6c 5b 17 00 cmp %ebx,0x175b6c
130ff1: 73 96 jae 130f89 <rtems_rate_monotonic_report_statistics_with_plugin+0x69><== ALWAYS TAKEN
130ff3: 90 nop
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
130ff4: 8d 65 f4 lea -0xc(%ebp),%esp
130ff7: 5b pop %ebx
130ff8: 5e pop %esi
130ff9: 5f pop %edi
130ffa: c9 leave
130ffb: c3 ret
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
130ffc: 52 push %edx
130ffd: 8d 55 d8 lea -0x28(%ebp),%edx
131000: 52 push %edx
131001: 50 push %eax
131002: 8d 45 a0 lea -0x60(%ebp),%eax
131005: 50 push %eax
131006: e8 65 14 00 00 call 132470 <_Timespec_Divide_by_integer>
(*print)( context,
13100b: 8b 4d dc mov -0x24(%ebp),%ecx
13100e: be d3 4d 62 10 mov $0x10624dd3,%esi
131013: 89 c8 mov %ecx,%eax
131015: f7 ee imul %esi
131017: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
13101d: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
131023: c1 f8 06 sar $0x6,%eax
131026: c1 f9 1f sar $0x1f,%ecx
131029: 29 c8 sub %ecx,%eax
13102b: 50 push %eax
13102c: ff 75 d8 pushl -0x28(%ebp)
13102f: 8b 4d 9c mov -0x64(%ebp),%ecx
131032: 89 c8 mov %ecx,%eax
131034: f7 ee imul %esi
131036: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
13103c: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
131042: c1 f8 06 sar $0x6,%eax
131045: c1 f9 1f sar $0x1f,%ecx
131048: 29 c8 sub %ecx,%eax
13104a: 50 push %eax
13104b: ff 75 98 pushl -0x68(%ebp)
13104e: 8b 4d 94 mov -0x6c(%ebp),%ecx
131051: 89 c8 mov %ecx,%eax
131053: f7 ee imul %esi
131055: 89 85 78 ff ff ff mov %eax,-0x88(%ebp)
13105b: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
131061: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
131067: c1 f8 06 sar $0x6,%eax
13106a: c1 f9 1f sar $0x1f,%ecx
13106d: 29 c8 sub %ecx,%eax
13106f: 50 push %eax
131070: ff 75 90 pushl -0x70(%ebp)
131073: 68 80 60 16 00 push $0x166080
131078: 57 push %edi
131079: ff 55 84 call *-0x7c(%ebp)
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
13107c: 83 c4 2c add $0x2c,%esp
13107f: 8d 55 d8 lea -0x28(%ebp),%edx
131082: 52 push %edx
131083: ff 75 88 pushl -0x78(%ebp)
131086: 8d 45 b8 lea -0x48(%ebp),%eax
131089: 50 push %eax
13108a: e8 e1 13 00 00 call 132470 <_Timespec_Divide_by_integer>
(*print)( context,
13108f: 8b 4d dc mov -0x24(%ebp),%ecx
131092: 89 c8 mov %ecx,%eax
131094: f7 ee imul %esi
131096: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
13109c: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
1310a2: c1 f8 06 sar $0x6,%eax
1310a5: c1 f9 1f sar $0x1f,%ecx
1310a8: 29 c8 sub %ecx,%eax
1310aa: 50 push %eax
1310ab: ff 75 d8 pushl -0x28(%ebp)
1310ae: 8b 4d b4 mov -0x4c(%ebp),%ecx
1310b1: 89 c8 mov %ecx,%eax
1310b3: f7 ee imul %esi
1310b5: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
1310bb: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
1310c1: c1 f8 06 sar $0x6,%eax
1310c4: c1 f9 1f sar $0x1f,%ecx
1310c7: 29 c8 sub %ecx,%eax
1310c9: 50 push %eax
1310ca: ff 75 b0 pushl -0x50(%ebp)
1310cd: 8b 4d ac mov -0x54(%ebp),%ecx
1310d0: 89 c8 mov %ecx,%eax
1310d2: f7 ee imul %esi
1310d4: 89 85 78 ff ff ff mov %eax,-0x88(%ebp)
1310da: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
1310e0: 8b b5 7c ff ff ff mov -0x84(%ebp),%esi
1310e6: c1 fe 06 sar $0x6,%esi
1310e9: 89 c8 mov %ecx,%eax
1310eb: 99 cltd
1310ec: 29 d6 sub %edx,%esi
1310ee: 56 push %esi
1310ef: ff 75 a8 pushl -0x58(%ebp)
1310f2: 68 a0 60 16 00 push $0x1660a0
1310f7: 57 push %edi
1310f8: ff 55 84 call *-0x7c(%ebp)
1310fb: 83 c4 30 add $0x30,%esp
1310fe: e9 7d fe ff ff jmp 130f80 <rtems_rate_monotonic_report_statistics_with_plugin+0x60>
0013111c <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
13111c: 55 push %ebp
13111d: 89 e5 mov %esp,%ebp
13111f: 53 push %ebx
131120: 83 ec 04 sub $0x4,%esp
131123: a1 58 4f 17 00 mov 0x174f58,%eax
131128: 40 inc %eax
131129: a3 58 4f 17 00 mov %eax,0x174f58
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
13112e: 8b 1d 68 5b 17 00 mov 0x175b68,%ebx
131134: 3b 1d 6c 5b 17 00 cmp 0x175b6c,%ebx
13113a: 77 15 ja 131151 <rtems_rate_monotonic_reset_all_statistics+0x35><== NEVER TAKEN
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
13113c: 83 ec 0c sub $0xc,%esp
13113f: 53 push %ebx
131140: e8 17 00 00 00 call 13115c <rtems_rate_monotonic_reset_statistics>
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
131145: 43 inc %ebx
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
131146: 83 c4 10 add $0x10,%esp
131149: 39 1d 6c 5b 17 00 cmp %ebx,0x175b6c
13114f: 73 eb jae 13113c <rtems_rate_monotonic_reset_all_statistics+0x20>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
131151: 8b 5d fc mov -0x4(%ebp),%ebx
131154: c9 leave
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
131155: e9 26 44 fe ff jmp 115580 <_Thread_Enable_dispatch>
0013115c <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
rtems_id id
)
{
13115c: 55 push %ebp
13115d: 89 e5 mov %esp,%ebp
13115f: 57 push %edi
131160: 53 push %ebx
131161: 83 ec 14 sub $0x14,%esp
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
131164: 8d 45 f4 lea -0xc(%ebp),%eax
131167: 50 push %eax
131168: ff 75 08 pushl 0x8(%ebp)
13116b: 68 60 5b 17 00 push $0x175b60
131170: e8 e7 3a fe ff call 114c5c <_Objects_Get>
131175: 89 c2 mov %eax,%edx
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
131177: 83 c4 10 add $0x10,%esp
13117a: 8b 45 f4 mov -0xc(%ebp),%eax
13117d: 85 c0 test %eax,%eax
13117f: 75 3b jne 1311bc <rtems_rate_monotonic_reset_statistics+0x60>
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
131181: 8d 5a 54 lea 0x54(%edx),%ebx
131184: b9 38 00 00 00 mov $0x38,%ecx
131189: 31 c0 xor %eax,%eax
13118b: 89 df mov %ebx,%edi
13118d: f3 aa rep stos %al,%es:(%edi)
13118f: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx)
131196: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx)
13119d: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx)
1311a4: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx)
_Thread_Enable_dispatch();
1311ab: e8 d0 43 fe ff call 115580 <_Thread_Enable_dispatch>
1311b0: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1311b2: 8d 65 f8 lea -0x8(%ebp),%esp
1311b5: 5b pop %ebx
1311b6: 5f pop %edi
1311b7: c9 leave
1311b8: c3 ret
1311b9: 8d 76 00 lea 0x0(%esi),%esi
{
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
1311bc: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1311c1: 8d 65 f8 lea -0x8(%ebp),%esp
1311c4: 5b pop %ebx
1311c5: 5f pop %edi
1311c6: c9 leave
1311c7: c3 ret
00117b14 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
117b14: 55 push %ebp
117b15: 89 e5 mov %esp,%ebp
117b17: 57 push %edi
117b18: 56 push %esi
117b19: 53 push %ebx
117b1a: 83 ec 1c sub $0x1c,%esp
117b1d: 8b 75 08 mov 0x8(%ebp),%esi
117b20: 8b 5d 0c mov 0xc(%ebp),%ebx
117b23: 8b 7d 1c mov 0x1c(%ebp),%edi
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
117b26: 85 f6 test %esi,%esi
117b28: 0f 84 92 00 00 00 je 117bc0 <rtems_region_create+0xac>
return RTEMS_INVALID_NAME;
if ( !starting_address )
117b2e: 85 db test %ebx,%ebx
117b30: 74 09 je 117b3b <rtems_region_create+0x27>
return RTEMS_INVALID_ADDRESS;
if ( !id )
117b32: 85 ff test %edi,%edi
117b34: 74 05 je 117b3b <rtems_region_create+0x27>
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
117b36: f6 c3 03 test $0x3,%bl
117b39: 74 0d je 117b48 <rtems_region_create+0x34>
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
return return_status;
117b3b: b8 09 00 00 00 mov $0x9,%eax
}
117b40: 8d 65 f4 lea -0xc(%ebp),%esp
117b43: 5b pop %ebx
117b44: 5e pop %esi
117b45: 5f pop %edi
117b46: c9 leave
117b47: c3 ret
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
117b48: 83 ec 0c sub $0xc,%esp
117b4b: ff 35 10 44 14 00 pushl 0x144410
117b51: e8 22 25 00 00 call 11a078 <_API_Mutex_Lock>
* This function allocates a region control block from
* the inactive chain of free region control blocks.
*/
RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void )
{
return (Region_Control *) _Objects_Allocate( &_Region_Information );
117b56: c7 04 24 60 42 14 00 movl $0x144260,(%esp)
117b5d: e8 4a 39 00 00 call 11b4ac <_Objects_Allocate>
117b62: 89 c2 mov %eax,%edx
the_region = _Region_Allocate();
if ( !the_region )
117b64: 83 c4 10 add $0x10,%esp
117b67: 85 c0 test %eax,%eax
117b69: 74 65 je 117bd0 <rtems_region_create+0xbc>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
117b6b: ff 75 14 pushl 0x14(%ebp)
117b6e: ff 75 10 pushl 0x10(%ebp)
117b71: 53 push %ebx
117b72: 8d 40 68 lea 0x68(%eax),%eax
117b75: 50 push %eax
117b76: 89 55 e4 mov %edx,-0x1c(%ebp)
117b79: e8 12 34 00 00 call 11af90 <_Heap_Initialize>
117b7e: 8b 55 e4 mov -0x1c(%ebp),%edx
117b81: 89 42 5c mov %eax,0x5c(%edx)
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
117b84: 83 c4 10 add $0x10,%esp
117b87: 85 c0 test %eax,%eax
117b89: 75 4d jne 117bd8 <rtems_region_create+0xc4>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
117b8b: 83 ec 08 sub $0x8,%esp
117b8e: 52 push %edx
117b8f: 68 60 42 14 00 push $0x144260
117b94: e8 93 3c 00 00 call 11b82c <_Objects_Free>
117b99: b8 08 00 00 00 mov $0x8,%eax
117b9e: 83 c4 10 add $0x10,%esp
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
117ba1: 83 ec 0c sub $0xc,%esp
117ba4: ff 35 10 44 14 00 pushl 0x144410
117baa: 89 45 e4 mov %eax,-0x1c(%ebp)
117bad: e8 0e 25 00 00 call 11a0c0 <_API_Mutex_Unlock>
return return_status;
117bb2: 83 c4 10 add $0x10,%esp
117bb5: 8b 45 e4 mov -0x1c(%ebp),%eax
}
117bb8: 8d 65 f4 lea -0xc(%ebp),%esp
117bbb: 5b pop %ebx
117bbc: 5e pop %esi
117bbd: 5f pop %edi
117bbe: c9 leave
117bbf: c3 ret
)
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
117bc0: b8 03 00 00 00 mov $0x3,%eax
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
117bc5: 8d 65 f4 lea -0xc(%ebp),%esp
117bc8: 5b pop %ebx
117bc9: 5e pop %esi
117bca: 5f pop %edi
117bcb: c9 leave
117bcc: c3 ret
117bcd: 8d 76 00 lea 0x0(%esi),%esi
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
117bd0: b8 05 00 00 00 mov $0x5,%eax
117bd5: eb ca jmp 117ba1 <rtems_region_create+0x8d>
117bd7: 90 nop
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
117bd8: 89 5a 50 mov %ebx,0x50(%edx)
the_region->length = length;
117bdb: 8b 45 10 mov 0x10(%ebp),%eax
117bde: 89 42 54 mov %eax,0x54(%edx)
the_region->page_size = page_size;
117be1: 8b 45 14 mov 0x14(%ebp),%eax
117be4: 89 42 58 mov %eax,0x58(%edx)
the_region->attribute_set = attribute_set;
117be7: 8b 45 18 mov 0x18(%ebp),%eax
117bea: 89 42 60 mov %eax,0x60(%edx)
the_region->number_of_used_blocks = 0;
117bed: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx)
_Thread_queue_Initialize(
117bf4: 6a 06 push $0x6
117bf6: 6a 40 push $0x40
117bf8: 8b 45 18 mov 0x18(%ebp),%eax
117bfb: c1 e8 02 shr $0x2,%eax
117bfe: 83 e0 01 and $0x1,%eax
117c01: 50 push %eax
117c02: 8d 42 10 lea 0x10(%edx),%eax
117c05: 50 push %eax
117c06: 89 55 e4 mov %edx,-0x1c(%ebp)
117c09: e8 32 4e 00 00 call 11ca40 <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
117c0e: 8b 55 e4 mov -0x1c(%ebp),%edx
117c11: 8b 42 08 mov 0x8(%edx),%eax
117c14: 0f b7 d8 movzwl %ax,%ebx
117c17: 8b 0d 7c 42 14 00 mov 0x14427c,%ecx
117c1d: 89 14 99 mov %edx,(%ecx,%ebx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
117c20: 89 72 0c mov %esi,0xc(%edx)
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
117c23: 89 07 mov %eax,(%edi)
117c25: 31 c0 xor %eax,%eax
117c27: 83 c4 10 add $0x10,%esp
117c2a: e9 72 ff ff ff jmp 117ba1 <rtems_region_create+0x8d>
00117c30 <rtems_region_delete>:
*/
rtems_status_code rtems_region_delete(
rtems_id id
)
{
117c30: 55 push %ebp
117c31: 89 e5 mov %esp,%ebp
117c33: 53 push %ebx
117c34: 83 ec 30 sub $0x30,%esp
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
_RTEMS_Lock_allocator();
117c37: ff 35 10 44 14 00 pushl 0x144410
117c3d: e8 36 24 00 00 call 11a078 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
117c42: 83 c4 0c add $0xc,%esp
117c45: 8d 45 f4 lea -0xc(%ebp),%eax
117c48: 50 push %eax
117c49: ff 75 08 pushl 0x8(%ebp)
117c4c: 68 60 42 14 00 push $0x144260
117c51: e8 06 3d 00 00 call 11b95c <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
117c56: 83 c4 10 add $0x10,%esp
117c59: 8b 5d f4 mov -0xc(%ebp),%ebx
117c5c: 85 db test %ebx,%ebx
117c5e: 74 1c je 117c7c <rtems_region_delete+0x4c>
117c60: bb 04 00 00 00 mov $0x4,%ebx
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
117c65: 83 ec 0c sub $0xc,%esp
117c68: ff 35 10 44 14 00 pushl 0x144410
117c6e: e8 4d 24 00 00 call 11a0c0 <_API_Mutex_Unlock>
return return_status;
}
117c73: 89 d8 mov %ebx,%eax
117c75: 8b 5d fc mov -0x4(%ebp),%ebx
117c78: c9 leave
117c79: c3 ret
117c7a: 66 90 xchg %ax,%ax
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 5 );
if ( the_region->number_of_used_blocks != 0 )
117c7c: 8b 48 64 mov 0x64(%eax),%ecx
117c7f: 85 c9 test %ecx,%ecx
117c81: 74 09 je 117c8c <rtems_region_delete+0x5c>
117c83: bb 0c 00 00 00 mov $0xc,%ebx
117c88: eb db jmp 117c65 <rtems_region_delete+0x35>
117c8a: 66 90 xchg %ax,%ax
return_status = RTEMS_RESOURCE_IN_USE;
else {
_Objects_Close( &_Region_Information, &the_region->Object );
117c8c: 83 ec 08 sub $0x8,%esp
117c8f: 50 push %eax
117c90: 68 60 42 14 00 push $0x144260
117c95: 89 45 e4 mov %eax,-0x1c(%ebp)
117c98: e8 8b 38 00 00 call 11b528 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
117c9d: 58 pop %eax
117c9e: 5a pop %edx
117c9f: 8b 45 e4 mov -0x1c(%ebp),%eax
117ca2: 50 push %eax
117ca3: 68 60 42 14 00 push $0x144260
117ca8: e8 7f 3b 00 00 call 11b82c <_Objects_Free>
117cad: 31 db xor %ebx,%ebx
117caf: 83 c4 10 add $0x10,%esp
117cb2: eb b1 jmp 117c65 <rtems_region_delete+0x35>
00117cb4 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
117cb4: 55 push %ebp
117cb5: 89 e5 mov %esp,%ebp
117cb7: 56 push %esi
117cb8: 53 push %ebx
117cb9: 83 ec 10 sub $0x10,%esp
117cbc: 8b 5d 0c mov 0xc(%ebp),%ebx
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
117cbf: 85 db test %ebx,%ebx
117cc1: 74 71 je 117d34 <rtems_region_extend+0x80>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
117cc3: 83 ec 0c sub $0xc,%esp
117cc6: ff 35 10 44 14 00 pushl 0x144410
117ccc: e8 a7 23 00 00 call 11a078 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
117cd1: 83 c4 0c add $0xc,%esp
117cd4: 8d 45 f0 lea -0x10(%ebp),%eax
117cd7: 50 push %eax
117cd8: ff 75 08 pushl 0x8(%ebp)
117cdb: 68 60 42 14 00 push $0x144260
117ce0: e8 77 3c 00 00 call 11b95c <_Objects_Get_no_protection>
117ce5: 89 c6 mov %eax,%esi
the_region = _Region_Get( id, &location );
switch ( location ) {
117ce7: 83 c4 10 add $0x10,%esp
117cea: 8b 45 f0 mov -0x10(%ebp),%eax
117ced: 85 c0 test %eax,%eax
117cef: 74 1f je 117d10 <rtems_region_extend+0x5c>
117cf1: bb 04 00 00 00 mov $0x4,%ebx
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
117cf6: 83 ec 0c sub $0xc,%esp
117cf9: ff 35 10 44 14 00 pushl 0x144410
117cff: e8 bc 23 00 00 call 11a0c0 <_API_Mutex_Unlock>
return return_status;
117d04: 83 c4 10 add $0x10,%esp
}
117d07: 89 d8 mov %ebx,%eax
117d09: 8d 65 f8 lea -0x8(%ebp),%esp
117d0c: 5b pop %ebx
117d0d: 5e pop %esi
117d0e: c9 leave
117d0f: c3 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
117d10: 8d 45 f4 lea -0xc(%ebp),%eax
117d13: 50 push %eax
117d14: ff 75 10 pushl 0x10(%ebp)
117d17: 53 push %ebx
117d18: 8d 46 68 lea 0x68(%esi),%eax
117d1b: 50 push %eax
117d1c: e8 77 2f 00 00 call 11ac98 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
117d21: 83 c4 10 add $0x10,%esp
117d24: 85 c0 test %eax,%eax
117d26: 74 18 je 117d40 <rtems_region_extend+0x8c>
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
117d28: 48 dec %eax
117d29: 74 25 je 117d50 <rtems_region_extend+0x9c>
117d2b: bb 18 00 00 00 mov $0x18,%ebx
117d30: eb c4 jmp 117cf6 <rtems_region_extend+0x42>
117d32: 66 90 xchg %ax,%ax
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
117d34: b3 09 mov $0x9,%bl
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117d36: 89 d8 mov %ebx,%eax
117d38: 8d 65 f8 lea -0x8(%ebp),%esp
117d3b: 5b pop %ebx
117d3c: 5e pop %esi
117d3d: c9 leave
117d3e: c3 ret
117d3f: 90 nop
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
117d40: 8b 45 f4 mov -0xc(%ebp),%eax
117d43: 01 46 54 add %eax,0x54(%esi)
the_region->maximum_segment_size += amount_extended;
117d46: 01 46 5c add %eax,0x5c(%esi)
117d49: 31 db xor %ebx,%ebx
117d4b: eb a9 jmp 117cf6 <rtems_region_extend+0x42>
117d4d: 8d 76 00 lea 0x0(%esi),%esi
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
117d50: bb 09 00 00 00 mov $0x9,%ebx
117d55: eb 9f jmp 117cf6 <rtems_region_extend+0x42>
00117d58 <rtems_region_get_free_information>:
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
117d58: 55 push %ebp
117d59: 89 e5 mov %esp,%ebp
117d5b: 53 push %ebx
117d5c: 83 ec 14 sub $0x14,%esp
117d5f: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
117d62: 85 db test %ebx,%ebx
117d64: 74 76 je 117ddc <rtems_region_get_free_information+0x84>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
117d66: 83 ec 0c sub $0xc,%esp
117d69: ff 35 10 44 14 00 pushl 0x144410
117d6f: e8 04 23 00 00 call 11a078 <_API_Mutex_Lock>
117d74: 83 c4 0c add $0xc,%esp
117d77: 8d 45 f4 lea -0xc(%ebp),%eax
117d7a: 50 push %eax
117d7b: ff 75 08 pushl 0x8(%ebp)
117d7e: 68 60 42 14 00 push $0x144260
117d83: e8 d4 3b 00 00 call 11b95c <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
117d88: 83 c4 10 add $0x10,%esp
117d8b: 8b 55 f4 mov -0xc(%ebp),%edx
117d8e: 85 d2 test %edx,%edx
117d90: 74 1e je 117db0 <rtems_region_get_free_information+0x58>
117d92: bb 04 00 00 00 mov $0x4,%ebx
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
117d97: 83 ec 0c sub $0xc,%esp
117d9a: ff 35 10 44 14 00 pushl 0x144410
117da0: e8 1b 23 00 00 call 11a0c0 <_API_Mutex_Unlock>
return return_status;
117da5: 83 c4 10 add $0x10,%esp
}
117da8: 89 d8 mov %ebx,%eax
117daa: 8b 5d fc mov -0x4(%ebp),%ebx
117dad: c9 leave
117dae: c3 ret
117daf: 90 nop
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->Used.number = 0;
117db0: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_info->Used.total = 0;
117db7: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
the_info->Used.largest = 0;
117dbe: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
117dc5: 83 ec 08 sub $0x8,%esp
117dc8: 53 push %ebx
117dc9: 83 c0 68 add $0x68,%eax
117dcc: 50 push %eax
117dcd: e8 d6 30 00 00 call 11aea8 <_Heap_Get_free_information>
117dd2: 31 db xor %ebx,%ebx
return_status = RTEMS_SUCCESSFUL;
break;
117dd4: 83 c4 10 add $0x10,%esp
117dd7: eb be jmp 117d97 <rtems_region_get_free_information+0x3f>
117dd9: 8d 76 00 lea 0x0(%esi),%esi
{
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
117ddc: b3 09 mov $0x9,%bl
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117dde: 89 d8 mov %ebx,%eax
117de0: 8b 5d fc mov -0x4(%ebp),%ebx
117de3: c9 leave
117de4: c3 ret
00117e60 <rtems_region_get_segment>:
uintptr_t size,
rtems_option option_set,
rtems_interval timeout,
void **segment
)
{
117e60: 55 push %ebp
117e61: 89 e5 mov %esp,%ebp
117e63: 57 push %edi
117e64: 56 push %esi
117e65: 53 push %ebx
117e66: 83 ec 2c sub $0x2c,%esp
117e69: 8b 75 0c mov 0xc(%ebp),%esi
117e6c: 8b 5d 18 mov 0x18(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
void *the_segment;
if ( !segment )
117e6f: 85 db test %ebx,%ebx
117e71: 0f 84 a1 00 00 00 je 117f18 <rtems_region_get_segment+0xb8>
return RTEMS_INVALID_ADDRESS;
*segment = NULL;
117e77: c7 03 00 00 00 00 movl $0x0,(%ebx)
if ( size == 0 )
117e7d: 85 f6 test %esi,%esi
117e7f: 75 0f jne 117e90 <rtems_region_get_segment+0x30>
117e81: b8 08 00 00 00 mov $0x8,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117e86: 8d 65 f4 lea -0xc(%ebp),%esp
117e89: 5b pop %ebx
117e8a: 5e pop %esi
117e8b: 5f pop %edi
117e8c: c9 leave
117e8d: c3 ret
117e8e: 66 90 xchg %ax,%ax
*segment = NULL;
if ( size == 0 )
return RTEMS_INVALID_SIZE;
_RTEMS_Lock_allocator();
117e90: 83 ec 0c sub $0xc,%esp
117e93: ff 35 10 44 14 00 pushl 0x144410
117e99: e8 da 21 00 00 call 11a078 <_API_Mutex_Lock>
executing = _Thread_Executing;
117e9e: a1 18 44 14 00 mov 0x144418,%eax
117ea3: 89 45 d4 mov %eax,-0x2c(%ebp)
117ea6: 83 c4 0c add $0xc,%esp
117ea9: 8d 45 e4 lea -0x1c(%ebp),%eax
117eac: 50 push %eax
117ead: ff 75 08 pushl 0x8(%ebp)
117eb0: 68 60 42 14 00 push $0x144260
117eb5: e8 a2 3a 00 00 call 11b95c <_Objects_Get_no_protection>
117eba: 89 c7 mov %eax,%edi
the_region = _Region_Get( id, &location );
switch ( location ) {
117ebc: 83 c4 10 add $0x10,%esp
117ebf: 8b 45 e4 mov -0x1c(%ebp),%eax
117ec2: 85 c0 test %eax,%eax
117ec4: 75 2a jne 117ef0 <rtems_region_get_segment+0x90>
case OBJECTS_LOCAL:
if ( size > the_region->maximum_segment_size )
117ec6: 3b 77 5c cmp 0x5c(%edi),%esi
117ec9: 76 2d jbe 117ef8 <rtems_region_get_segment+0x98>
117ecb: b8 08 00 00 00 mov $0x8,%eax
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
117ed0: 83 ec 0c sub $0xc,%esp
117ed3: ff 35 10 44 14 00 pushl 0x144410
117ed9: 89 45 d0 mov %eax,-0x30(%ebp)
117edc: e8 df 21 00 00 call 11a0c0 <_API_Mutex_Unlock>
return return_status;
117ee1: 83 c4 10 add $0x10,%esp
117ee4: 8b 45 d0 mov -0x30(%ebp),%eax
}
117ee7: 8d 65 f4 lea -0xc(%ebp),%esp
117eea: 5b pop %ebx
117eeb: 5e pop %esi
117eec: 5f pop %edi
117eed: c9 leave
117eee: c3 ret
117eef: 90 nop
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
_Thread_Enable_dispatch();
return (rtems_status_code) executing->Wait.return_code;
117ef0: b8 04 00 00 00 mov $0x4,%eax
117ef5: eb d9 jmp 117ed0 <rtems_region_get_segment+0x70>
117ef7: 90 nop
* @brief See _Heap_Allocate_aligned_with_boundary() with alignment and
* boundary equals zero.
*/
RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size )
{
return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
117ef8: 6a 00 push $0x0
117efa: 6a 00 push $0x0
117efc: 56 push %esi
117efd: 8d 47 68 lea 0x68(%edi),%eax
117f00: 50 push %eax
117f01: e8 de 2b 00 00 call 11aae4 <_Heap_Allocate_aligned_with_boundary>
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
117f06: 83 c4 10 add $0x10,%esp
117f09: 85 c0 test %eax,%eax
117f0b: 74 17 je 117f24 <rtems_region_get_segment+0xc4>
the_region->number_of_used_blocks += 1;
117f0d: ff 47 64 incl 0x64(%edi)
*segment = the_segment;
117f10: 89 03 mov %eax,(%ebx)
117f12: 31 c0 xor %eax,%eax
117f14: eb ba jmp 117ed0 <rtems_region_get_segment+0x70>
117f16: 66 90 xchg %ax,%ax
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
void *the_segment;
if ( !segment )
117f18: b8 09 00 00 00 mov $0x9,%eax
117f1d: e9 64 ff ff ff jmp 117e86 <rtems_region_get_segment+0x26>
117f22: 66 90 xchg %ax,%ax
if ( the_segment ) {
the_region->number_of_used_blocks += 1;
*segment = the_segment;
return_status = RTEMS_SUCCESSFUL;
} else if ( _Options_Is_no_wait( option_set ) ) {
117f24: f6 45 10 01 testb $0x1,0x10(%ebp)
117f28: 74 07 je 117f31 <rtems_region_get_segment+0xd1>
117f2a: b8 0d 00 00 00 mov $0xd,%eax
117f2f: eb 9f jmp 117ed0 <rtems_region_get_segment+0x70>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
117f31: a1 58 43 14 00 mov 0x144358,%eax
117f36: 40 inc %eax
117f37: a3 58 43 14 00 mov %eax,0x144358
* Switch from using the memory allocation mutex to using a
* dispatching disabled critical section. We have to do this
* because this thread is going to block.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
117f3c: 83 ec 0c sub $0xc,%esp
117f3f: ff 35 10 44 14 00 pushl 0x144410
117f45: e8 76 21 00 00 call 11a0c0 <_API_Mutex_Unlock>
executing->Wait.queue = &the_region->Wait_queue;
117f4a: 8d 47 10 lea 0x10(%edi),%eax
117f4d: 8b 55 d4 mov -0x2c(%ebp),%edx
117f50: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
117f53: 8b 4d 08 mov 0x8(%ebp),%ecx
117f56: 89 4a 20 mov %ecx,0x20(%edx)
executing->Wait.count = size;
117f59: 89 72 24 mov %esi,0x24(%edx)
executing->Wait.return_argument = segment;
117f5c: 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;
117f5f: c7 47 40 01 00 00 00 movl $0x1,0x40(%edi)
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
117f66: 83 c4 0c add $0xc,%esp
117f69: 68 f0 ca 11 00 push $0x11caf0
117f6e: ff 75 14 pushl 0x14(%ebp)
117f71: 50 push %eax
117f72: e8 69 48 00 00 call 11c7e0 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
117f77: e8 00 43 00 00 call 11c27c <_Thread_Enable_dispatch>
return (rtems_status_code) executing->Wait.return_code;
117f7c: 8b 55 d4 mov -0x2c(%ebp),%edx
117f7f: 8b 42 34 mov 0x34(%edx),%eax
117f82: 83 c4 10 add $0x10,%esp
117f85: e9 fc fe ff ff jmp 117e86 <rtems_region_get_segment+0x26>
00117f8c <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
117f8c: 55 push %ebp
117f8d: 89 e5 mov %esp,%ebp
117f8f: 56 push %esi
117f90: 53 push %ebx
117f91: 83 ec 20 sub $0x20,%esp
117f94: 8b 5d 0c mov 0xc(%ebp),%ebx
117f97: 8b 75 10 mov 0x10(%ebp),%esi
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
117f9a: 85 db test %ebx,%ebx
117f9c: 74 72 je 118010 <rtems_region_get_segment_size+0x84><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !size )
117f9e: 85 f6 test %esi,%esi
117fa0: 74 6e je 118010 <rtems_region_get_segment_size+0x84><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
117fa2: 83 ec 0c sub $0xc,%esp
117fa5: ff 35 10 44 14 00 pushl 0x144410
117fab: e8 c8 20 00 00 call 11a078 <_API_Mutex_Lock>
117fb0: 83 c4 0c add $0xc,%esp
117fb3: 8d 45 f4 lea -0xc(%ebp),%eax
117fb6: 50 push %eax
117fb7: ff 75 08 pushl 0x8(%ebp)
117fba: 68 60 42 14 00 push $0x144260
117fbf: e8 98 39 00 00 call 11b95c <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
117fc4: 83 c4 10 add $0x10,%esp
117fc7: 8b 55 f4 mov -0xc(%ebp),%edx
117fca: 85 d2 test %edx,%edx
117fcc: 75 36 jne 118004 <rtems_region_get_segment_size+0x78><== NEVER TAKEN
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
117fce: 52 push %edx
117fcf: 56 push %esi
117fd0: 53 push %ebx
117fd1: 83 c0 68 add $0x68,%eax
117fd4: 50 push %eax
117fd5: e8 e6 33 00 00 call 11b3c0 <_Heap_Size_of_alloc_area>
117fda: 83 c4 10 add $0x10,%esp
117fdd: 84 c0 test %al,%al
117fdf: 74 3b je 11801c <rtems_region_get_segment_size+0x90><== NEVER TAKEN
117fe1: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
117fe3: 83 ec 0c sub $0xc,%esp
117fe6: ff 35 10 44 14 00 pushl 0x144410
117fec: 89 45 e4 mov %eax,-0x1c(%ebp)
117fef: e8 cc 20 00 00 call 11a0c0 <_API_Mutex_Unlock>
return return_status;
117ff4: 83 c4 10 add $0x10,%esp
117ff7: 8b 45 e4 mov -0x1c(%ebp),%eax
}
117ffa: 8d 65 f8 lea -0x8(%ebp),%esp
117ffd: 5b pop %ebx
117ffe: 5e pop %esi
117fff: c9 leave
118000: c3 ret
118001: 8d 76 00 lea 0x0(%esi),%esi
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
118004: 4a dec %edx
118005: 75 da jne 117fe1 <rtems_region_get_segment_size+0x55><== NEVER TAKEN
118007: b8 04 00 00 00 mov $0x4,%eax
11800c: eb d5 jmp 117fe3 <rtems_region_get_segment_size+0x57>
11800e: 66 90 xchg %ax,%ax
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
118010: b8 09 00 00 00 mov $0x9,%eax
}
118015: 8d 65 f8 lea -0x8(%ebp),%esp
118018: 5b pop %ebx
118019: 5e pop %esi
11801a: c9 leave
11801b: c3 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
11801c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
118021: eb c0 jmp 117fe3 <rtems_region_get_segment_size+0x57><== NOT EXECUTED
00118048 <rtems_region_resize_segment>:
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
118048: 55 push %ebp
118049: 89 e5 mov %esp,%ebp
11804b: 56 push %esi
11804c: 53 push %ebx
11804d: 83 ec 20 sub $0x20,%esp
118050: 8b 5d 14 mov 0x14(%ebp),%ebx
uintptr_t osize;
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
118053: 85 db test %ebx,%ebx
118055: 0f 84 a5 00 00 00 je 118100 <rtems_region_resize_segment+0xb8>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
11805b: 83 ec 0c sub $0xc,%esp
11805e: ff 35 10 44 14 00 pushl 0x144410
118064: e8 0f 20 00 00 call 11a078 <_API_Mutex_Lock>
118069: 83 c4 0c add $0xc,%esp
11806c: 8d 45 f0 lea -0x10(%ebp),%eax
11806f: 50 push %eax
118070: ff 75 08 pushl 0x8(%ebp)
118073: 68 60 42 14 00 push $0x144260
118078: e8 df 38 00 00 call 11b95c <_Objects_Get_no_protection>
11807d: 89 c6 mov %eax,%esi
the_region = _Region_Get( id, &location );
switch ( location ) {
11807f: 83 c4 10 add $0x10,%esp
118082: 8b 45 f0 mov -0x10(%ebp),%eax
118085: 85 c0 test %eax,%eax
118087: 74 1f je 1180a8 <rtems_region_resize_segment+0x60>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
118089: 83 ec 0c sub $0xc,%esp
11808c: ff 35 10 44 14 00 pushl 0x144410
118092: e8 29 20 00 00 call 11a0c0 <_API_Mutex_Unlock>
118097: b8 04 00 00 00 mov $0x4,%eax
return return_status;
11809c: 83 c4 10 add $0x10,%esp
}
11809f: 8d 65 f8 lea -0x8(%ebp),%esp
1180a2: 5b pop %ebx
1180a3: 5e pop %esi
1180a4: c9 leave
1180a5: c3 ret
1180a6: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
1180a8: 83 ec 0c sub $0xc,%esp
1180ab: 8d 45 f4 lea -0xc(%ebp),%eax
1180ae: 50 push %eax
1180af: 8d 45 ec lea -0x14(%ebp),%eax
1180b2: 50 push %eax
1180b3: ff 75 10 pushl 0x10(%ebp)
1180b6: ff 75 0c pushl 0xc(%ebp)
1180b9: 8d 46 68 lea 0x68(%esi),%eax
1180bc: 50 push %eax
1180bd: e8 f2 31 00 00 call 11b2b4 <_Heap_Resize_block>
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
1180c2: 8b 55 ec mov -0x14(%ebp),%edx
1180c5: 89 13 mov %edx,(%ebx)
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
1180c7: 83 c4 20 add $0x20,%esp
1180ca: 85 c0 test %eax,%eax
1180cc: 75 16 jne 1180e4 <rtems_region_resize_segment+0x9c>
_Region_Process_queue( the_region ); /* unlocks allocator */
1180ce: 83 ec 0c sub $0xc,%esp
1180d1: 56 push %esi
1180d2: e8 cd 86 00 00 call 1207a4 <_Region_Process_queue>
1180d7: 31 c0 xor %eax,%eax
1180d9: 83 c4 10 add $0x10,%esp
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1180dc: 8d 65 f8 lea -0x8(%ebp),%esp
1180df: 5b pop %ebx
1180e0: 5e pop %esi
1180e1: c9 leave
1180e2: c3 ret
1180e3: 90 nop
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
1180e4: 83 ec 0c sub $0xc,%esp
1180e7: ff 35 10 44 14 00 pushl 0x144410
1180ed: 89 45 e4 mov %eax,-0x1c(%ebp)
1180f0: e8 cb 1f 00 00 call 11a0c0 <_API_Mutex_Unlock>
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
1180f5: 83 c4 10 add $0x10,%esp
1180f8: 8b 45 e4 mov -0x1c(%ebp),%eax
1180fb: 83 f8 01 cmp $0x1,%eax
1180fe: 74 0c je 11810c <rtems_region_resize_segment+0xc4>
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
118100: b8 09 00 00 00 mov $0x9,%eax
}
118105: 8d 65 f8 lea -0x8(%ebp),%esp
118108: 5b pop %ebx
118109: 5e pop %esi
11810a: c9 leave
11810b: c3 ret
_RTEMS_Unlock_allocator();
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
11810c: b0 0d mov $0xd,%al
11810e: eb 8f jmp 11809f <rtems_region_resize_segment+0x57>
00118110 <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
118110: 55 push %ebp
118111: 89 e5 mov %esp,%ebp
118113: 53 push %ebx
118114: 83 ec 20 sub $0x20,%esp
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
118117: ff 35 10 44 14 00 pushl 0x144410
11811d: e8 56 1f 00 00 call 11a078 <_API_Mutex_Lock>
118122: 83 c4 0c add $0xc,%esp
118125: 8d 45 f4 lea -0xc(%ebp),%eax
118128: 50 push %eax
118129: ff 75 08 pushl 0x8(%ebp)
11812c: 68 60 42 14 00 push $0x144260
118131: e8 26 38 00 00 call 11b95c <_Objects_Get_no_protection>
118136: 89 c3 mov %eax,%ebx
the_region = _Region_Get( id, &location );
switch ( location ) {
118138: 83 c4 10 add $0x10,%esp
11813b: 8b 45 f4 mov -0xc(%ebp),%eax
11813e: 85 c0 test %eax,%eax
118140: 74 1e je 118160 <rtems_region_return_segment+0x50>
118142: bb 04 00 00 00 mov $0x4,%ebx
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
118147: 83 ec 0c sub $0xc,%esp
11814a: ff 35 10 44 14 00 pushl 0x144410
118150: e8 6b 1f 00 00 call 11a0c0 <_API_Mutex_Unlock>
return return_status;
118155: 83 c4 10 add $0x10,%esp
}
118158: 89 d8 mov %ebx,%eax
11815a: 8b 5d fc mov -0x4(%ebp),%ebx
11815d: c9 leave
11815e: c3 ret
11815f: 90 nop
RTEMS_INLINE_ROUTINE bool _Region_Free_segment (
Region_Control *the_region,
void *the_segment
)
{
return _Heap_Free( &the_region->Memory, the_segment );
118160: 83 ec 08 sub $0x8,%esp
118163: ff 75 0c pushl 0xc(%ebp)
118166: 8d 43 68 lea 0x68(%ebx),%eax
118169: 50 push %eax
11816a: e8 c9 2b 00 00 call 11ad38 <_Heap_Free>
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
11816f: 83 c4 10 add $0x10,%esp
118172: 84 c0 test %al,%al
118174: 75 0a jne 118180 <rtems_region_return_segment+0x70>
else {
the_region->number_of_used_blocks -= 1;
_Region_Process_queue(the_region); /* unlocks allocator */
return RTEMS_SUCCESSFUL;
118176: bb 09 00 00 00 mov $0x9,%ebx
11817b: eb ca jmp 118147 <rtems_region_return_segment+0x37>
11817d: 8d 76 00 lea 0x0(%esi),%esi
_Region_Debug_Walk( the_region, 4 );
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
118180: ff 4b 64 decl 0x64(%ebx)
_Region_Process_queue(the_region); /* unlocks allocator */
118183: 83 ec 0c sub $0xc,%esp
118186: 53 push %ebx
118187: e8 18 86 00 00 call 1207a4 <_Region_Process_queue>
11818c: 31 db xor %ebx,%ebx
return RTEMS_SUCCESSFUL;
11818e: 83 c4 10 add $0x10,%esp
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
118191: 89 d8 mov %ebx,%eax
118193: 8b 5d fc mov -0x4(%ebp),%ebx
118196: c9 leave
118197: c3 ret
00146cac <rtems_rfs_bitmap_close>:
return rtems_rfs_bitmap_create_search (control);
}
int
rtems_rfs_bitmap_close (rtems_rfs_bitmap_control* control)
{
146cac: 55 push %ebp <== NOT EXECUTED
146cad: 89 e5 mov %esp,%ebp <== NOT EXECUTED
146caf: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
free (control->search_bits);
146cb2: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
146cb5: ff 70 14 pushl 0x14(%eax) <== NOT EXECUTED
146cb8: e8 ab 7b fc ff call 10e868 <free> <== NOT EXECUTED
return 0;
}
146cbd: 31 c0 xor %eax,%eax <== NOT EXECUTED
146cbf: c9 leave <== NOT EXECUTED
146cc0: c3 ret <== NOT EXECUTED
00146d0c <rtems_rfs_bitmap_create_search>:
return 0;
}
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
146d0c: 55 push %ebp <== NOT EXECUTED
146d0d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
146d0f: 57 push %edi <== NOT EXECUTED
146d10: 56 push %esi <== NOT EXECUTED
146d11: 53 push %ebx <== NOT EXECUTED
146d12: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
146d15: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_rfs_bitmap_map map;
size_t size;
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
146d18: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
146d1b: 89 d8 mov %ebx,%eax <== NOT EXECUTED
146d1d: e8 a2 ff ff ff call 146cc4 <rtems_rfs_bitmap_load_map><== NOT EXECUTED
if (rc > 0)
146d22: 85 c0 test %eax,%eax <== NOT EXECUTED
146d24: 7e 0a jle 146d30 <rtems_rfs_bitmap_create_search+0x24><== NOT EXECUTED
bit++;
map++;
}
return 0;
}
146d26: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
146d29: 5b pop %ebx <== NOT EXECUTED
146d2a: 5e pop %esi <== NOT EXECUTED
146d2b: 5f pop %edi <== NOT EXECUTED
146d2c: c9 leave <== NOT EXECUTED
146d2d: c3 ret <== NOT EXECUTED
146d2e: 66 90 xchg %ax,%ax <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
control->free = 0;
146d30: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
search_map = control->search_bits;
146d37: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
146d3a: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED
size = control->size;
146d3d: 8b 73 0c mov 0xc(%ebx),%esi <== NOT EXECUTED
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
146d40: c7 00 ff ff ff ff movl $0xffffffff,(%eax) <== NOT EXECUTED
while (size)
146d46: 85 f6 test %esi,%esi <== NOT EXECUTED
146d48: 74 59 je 146da3 <rtems_rfs_bitmap_create_search+0x97><== NOT EXECUTED
146d4a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
146d4d: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
146d50: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
146d57: 90 nop <== NOT EXECUTED
{
rtems_rfs_bitmap_element bits;
int available;
if (size < rtems_rfs_bitmap_element_bits ())
146d58: 83 fe 1f cmp $0x1f,%esi <== NOT EXECUTED
146d5b: 77 53 ja 146db0 <rtems_rfs_bitmap_create_search+0xa4><== NOT EXECUTED
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
146d5d: b9 20 00 00 00 mov $0x20,%ecx <== NOT EXECUTED
146d62: 29 f1 sub %esi,%ecx <== NOT EXECUTED
146d64: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
146d69: d3 e8 shr %cl,%eax <== NOT EXECUTED
146d6b: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
146d6e: 23 02 and (%edx),%eax <== NOT EXECUTED
if (size < rtems_rfs_bitmap_element_bits ())
{
bits = rtems_rfs_bitmap_merge (*map,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask_section (0, size));
available = size;
146d70: 89 f2 mov %esi,%edx <== NOT EXECUTED
146d72: 89 75 cc mov %esi,-0x34(%ebp) <== NOT EXECUTED
{
bits = *map;
available = rtems_rfs_bitmap_element_bits ();
}
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
146d75: 85 c0 test %eax,%eax <== NOT EXECUTED
146d77: 74 16 je 146d8f <rtems_rfs_bitmap_create_search+0x83><== NOT EXECUTED
146d79: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
146d7b: 90 nop <== NOT EXECUTED
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
146d7c: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
146d81: d3 e7 shl %cl,%edi <== NOT EXECUTED
146d83: 85 c7 test %eax,%edi <== NOT EXECUTED
146d85: 74 03 je 146d8a <rtems_rfs_bitmap_create_search+0x7e><== NOT EXECUTED
control->free++;
146d87: ff 43 10 incl 0x10(%ebx) <== NOT EXECUTED
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
146d8a: 41 inc %ecx <== NOT EXECUTED
146d8b: 39 ca cmp %ecx,%edx <== NOT EXECUTED
146d8d: 7f ed jg 146d7c <rtems_rfs_bitmap_create_search+0x70><== NOT EXECUTED
if (!rtems_rfs_bitmap_test (bits, b))
control->free++;
}
size -= available;
146d8f: 2b 75 cc sub -0x34(%ebp),%esi <== NOT EXECUTED
if (bit == rtems_rfs_bitmap_element_bits ())
146d92: 83 7d d0 20 cmpl $0x20,-0x30(%ebp) <== NOT EXECUTED
146d96: 74 2c je 146dc4 <rtems_rfs_bitmap_create_search+0xb8><== NOT EXECUTED
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
}
else
bit++;
146d98: ff 45 d0 incl -0x30(%ebp) <== NOT EXECUTED
146d9b: 83 45 d4 04 addl $0x4,-0x2c(%ebp) <== NOT EXECUTED
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
146d9f: 85 f6 test %esi,%esi <== NOT EXECUTED
146da1: 75 b5 jne 146d58 <rtems_rfs_bitmap_create_search+0x4c><== NOT EXECUTED
146da3: 31 c0 xor %eax,%eax <== NOT EXECUTED
bit++;
map++;
}
return 0;
}
146da5: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
146da8: 5b pop %ebx <== NOT EXECUTED
146da9: 5e pop %esi <== NOT EXECUTED
146daa: 5f pop %edi <== NOT EXECUTED
146dab: c9 leave <== NOT EXECUTED
146dac: c3 ret <== NOT EXECUTED
146dad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_rfs_bitmap_mask_section (0, size));
available = size;
}
else
{
bits = *map;
146db0: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
146db3: 8b 02 mov (%edx),%eax <== NOT EXECUTED
146db5: c7 45 cc 20 00 00 00 movl $0x20,-0x34(%ebp) <== NOT EXECUTED
146dbc: ba 20 00 00 00 mov $0x20,%edx <== NOT EXECUTED
146dc1: eb b2 jmp 146d75 <rtems_rfs_bitmap_create_search+0x69><== NOT EXECUTED
146dc3: 90 nop <== NOT EXECUTED
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
146dc4: 83 45 c8 04 addl $0x4,-0x38(%ebp) <== NOT EXECUTED
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
146dc8: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
146dcb: c7 00 ff ff ff ff movl $0xffffffff,(%eax) <== NOT EXECUTED
146dd1: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
146dd8: eb c1 jmp 146d9b <rtems_rfs_bitmap_create_search+0x8f><== NOT EXECUTED
00146cc4 <rtems_rfs_bitmap_load_map>:
* @return int The error number (errno). No error if 0.
*/
static int
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
146cc4: 55 push %ebp <== NOT EXECUTED
146cc5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
146cc7: 56 push %esi <== NOT EXECUTED
146cc8: 53 push %ebx <== NOT EXECUTED
146cc9: 89 c3 mov %eax,%ebx <== NOT EXECUTED
146ccb: 89 d6 mov %edx,%esi <== NOT EXECUTED
int rc;
if (!control->buffer)
146ccd: 8b 00 mov (%eax),%eax <== NOT EXECUTED
146ccf: 85 c0 test %eax,%eax <== NOT EXECUTED
146cd1: 74 2d je 146d00 <rtems_rfs_bitmap_load_map+0x3c><== NOT EXECUTED
return ENXIO;
*map = NULL;
146cd3: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (control->fs,
146cd9: 6a 01 push $0x1 <== NOT EXECUTED
146cdb: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
146cde: ff 33 pushl (%ebx) <== NOT EXECUTED
146ce0: ff 73 04 pushl 0x4(%ebx) <== NOT EXECUTED
146ce3: e8 44 74 ff ff call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
control->buffer,
control->block,
true);
if (rc)
146ce8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
146ceb: 85 c0 test %eax,%eax <== NOT EXECUTED
146ced: 75 0a jne 146cf9 <rtems_rfs_bitmap_load_map+0x35><== NOT EXECUTED
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
146cef: 8b 13 mov (%ebx),%edx <== NOT EXECUTED
146cf1: 8b 52 08 mov 0x8(%edx),%edx <== NOT EXECUTED
146cf4: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
146cf7: 89 16 mov %edx,(%esi) <== NOT EXECUTED
return 0;
}
146cf9: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
146cfc: 5b pop %ebx <== NOT EXECUTED
146cfd: 5e pop %esi <== NOT EXECUTED
146cfe: c9 leave <== NOT EXECUTED
146cff: c3 ret <== NOT EXECUTED
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
146d00: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED
if (rc)
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
return 0;
}
146d05: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
146d08: 5b pop %ebx <== NOT EXECUTED
146d09: 5e pop %esi <== NOT EXECUTED
146d0a: c9 leave <== NOT EXECUTED
146d0b: c3 ret <== NOT EXECUTED
001472dc <rtems_rfs_bitmap_map_alloc>:
int
rtems_rfs_bitmap_map_alloc (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit seed,
bool* allocated,
rtems_rfs_bitmap_bit* bit)
{
1472dc: 55 push %ebp <== NOT EXECUTED
1472dd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1472df: 57 push %edi <== NOT EXECUTED
1472e0: 56 push %esi <== NOT EXECUTED
1472e1: 53 push %ebx <== NOT EXECUTED
1472e2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1472e5: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
int rc = 0;
/*
* By default we assume the allocation failed.
*/
*allocated = false;
1472e8: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
1472eb: c6 00 00 movb $0x0,(%eax) <== NOT EXECUTED
1472ee: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
1472f1: 89 f3 mov %esi,%ebx <== NOT EXECUTED
1472f3: 90 nop <== NOT EXECUTED
* we have searched all of the map. The seed may not be aligned to a window
* boundary so we may need to search a partial window and this may also not
* be balanced for the upper or lower seeds. We move to the limits, search
* then return false if no clear bits are found.
*/
while (((upper_seed >= 0) && (upper_seed < control->size))
1472f4: 85 db test %ebx,%ebx <== NOT EXECUTED
1472f6: 78 47 js 14733f <rtems_rfs_bitmap_map_alloc+0x63><== NOT EXECUTED
1472f8: 3b 5f 0c cmp 0xc(%edi),%ebx <== NOT EXECUTED
1472fb: 73 42 jae 14733f <rtems_rfs_bitmap_map_alloc+0x63><== NOT EXECUTED
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
{
*bit = upper_seed;
1472fd: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
147300: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
147302: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
147305: 6a 01 push $0x1 <== NOT EXECUTED
147307: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
14730a: 89 c2 mov %eax,%edx <== NOT EXECUTED
14730c: 89 f8 mov %edi,%eax <== NOT EXECUTED
14730e: e8 91 fd ff ff call 1470a4 <T.58> <== NOT EXECUTED
window, 1);
if ((rc > 0) || *allocated)
147313: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
147316: 85 c0 test %eax,%eax <== NOT EXECUTED
147318: 7f 5a jg 147374 <rtems_rfs_bitmap_map_alloc+0x98><== NOT EXECUTED
14731a: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
14731d: 80 38 00 cmpb $0x0,(%eax) <== NOT EXECUTED
147320: 75 52 jne 147374 <rtems_rfs_bitmap_map_alloc+0x98><== NOT EXECUTED
break;
}
if (lower_seed >= 0)
147322: 85 f6 test %esi,%esi <== NOT EXECUTED
147324: 79 28 jns 14734e <rtems_rfs_bitmap_map_alloc+0x72><== NOT EXECUTED
/*
* Do not bound the limits at the edges of the map. Do not update if an
* edge has been passed.
*/
if (upper_seed < control->size)
147326: 39 5f 0c cmp %ebx,0xc(%edi) <== NOT EXECUTED
147329: 76 06 jbe 147331 <rtems_rfs_bitmap_map_alloc+0x55><== NOT EXECUTED
upper_seed += window;
14732b: 81 c3 00 08 00 00 add $0x800,%ebx <== NOT EXECUTED
if (lower_seed >= 0)
147331: 85 f6 test %esi,%esi <== NOT EXECUTED
147333: 78 bf js 1472f4 <rtems_rfs_bitmap_map_alloc+0x18><== NOT EXECUTED
lower_seed -= window;
147335: 81 ee 00 08 00 00 sub $0x800,%esi <== NOT EXECUTED
* we have searched all of the map. The seed may not be aligned to a window
* boundary so we may need to search a partial window and this may also not
* be balanced for the upper or lower seeds. We move to the limits, search
* then return false if no clear bits are found.
*/
while (((upper_seed >= 0) && (upper_seed < control->size))
14733b: 85 db test %ebx,%ebx <== NOT EXECUTED
14733d: 79 b9 jns 1472f8 <rtems_rfs_bitmap_map_alloc+0x1c><== NOT EXECUTED
14733f: 85 f6 test %esi,%esi <== NOT EXECUTED
147341: 78 31 js 147374 <rtems_rfs_bitmap_map_alloc+0x98><== NOT EXECUTED
|| ((lower_seed >= 0) && (lower_seed < control->size)))
147343: 8b 47 0c mov 0xc(%edi),%eax <== NOT EXECUTED
* we have searched all of the map. The seed may not be aligned to a window
* boundary so we may need to search a partial window and this may also not
* be balanced for the upper or lower seeds. We move to the limits, search
* then return false if no clear bits are found.
*/
while (((upper_seed >= 0) && (upper_seed < control->size))
147346: 39 c6 cmp %eax,%esi <== NOT EXECUTED
147348: 73 2a jae 147374 <rtems_rfs_bitmap_map_alloc+0x98><== NOT EXECUTED
|| ((lower_seed >= 0) && (lower_seed < control->size)))
{
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
14734a: 39 c3 cmp %eax,%ebx <== NOT EXECUTED
14734c: 72 af jb 1472fd <rtems_rfs_bitmap_map_alloc+0x21><== NOT EXECUTED
break;
}
if (lower_seed >= 0)
{
*bit = lower_seed;
14734e: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
147351: 89 30 mov %esi,(%eax) <== NOT EXECUTED
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
147353: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
147356: 6a ff push $0xffffffff <== NOT EXECUTED
147358: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
14735b: 89 c2 mov %eax,%edx <== NOT EXECUTED
14735d: 89 f8 mov %edi,%eax <== NOT EXECUTED
14735f: e8 40 fd ff ff call 1470a4 <T.58> <== NOT EXECUTED
window, -1);
if ((rc > 0) || *allocated)
147364: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
147367: 85 c0 test %eax,%eax <== NOT EXECUTED
147369: 7f 09 jg 147374 <rtems_rfs_bitmap_map_alloc+0x98><== NOT EXECUTED
14736b: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
14736e: 80 38 00 cmpb $0x0,(%eax) <== NOT EXECUTED
147371: 74 b3 je 147326 <rtems_rfs_bitmap_map_alloc+0x4a><== NOT EXECUTED
147373: 90 nop <== NOT EXECUTED
if (lower_seed >= 0)
lower_seed -= window;
}
return 0;
}
147374: 31 c0 xor %eax,%eax <== NOT EXECUTED
147376: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
147379: 5b pop %ebx <== NOT EXECUTED
14737a: 5e pop %esi <== NOT EXECUTED
14737b: 5f pop %edi <== NOT EXECUTED
14737c: c9 leave <== NOT EXECUTED
14737d: c3 ret <== NOT EXECUTED
00146f90 <rtems_rfs_bitmap_map_clear>:
}
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
146f90: 55 push %ebp <== NOT EXECUTED
146f91: 89 e5 mov %esp,%ebp <== NOT EXECUTED
146f93: 57 push %edi <== NOT EXECUTED
146f94: 56 push %esi <== NOT EXECUTED
146f95: 53 push %ebx <== NOT EXECUTED
146f96: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
146f99: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
146f9c: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
rtems_rfs_bitmap_map map;
rtems_rfs_bitmap_map search_map;
int index;
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
146f9f: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
146fa2: 89 d8 mov %ebx,%eax <== NOT EXECUTED
146fa4: e8 1b fd ff ff call 146cc4 <rtems_rfs_bitmap_load_map><== NOT EXECUTED
if (rc > 0)
146fa9: 85 c0 test %eax,%eax <== NOT EXECUTED
146fab: 7e 0b jle 146fb8 <rtems_rfs_bitmap_map_clear+0x28><== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
rtems_rfs_buffer_mark_dirty (control->buffer);
control->free++;
return 0;
}
146fad: 83 c4 3c add $0x3c,%esp <== NOT EXECUTED
146fb0: 5b pop %ebx <== NOT EXECUTED
146fb1: 5e pop %esi <== NOT EXECUTED
146fb2: 5f pop %edi <== NOT EXECUTED
146fb3: c9 leave <== NOT EXECUTED
146fb4: c3 ret <== NOT EXECUTED
146fb5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
146fb8: 3b 73 0c cmp 0xc(%ebx),%esi <== NOT EXECUTED
146fbb: 73 47 jae 147004 <rtems_rfs_bitmap_map_clear+0x74><== NOT EXECUTED
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
146fbd: 89 f0 mov %esi,%eax <== NOT EXECUTED
146fbf: c1 f8 05 sar $0x5,%eax <== NOT EXECUTED
146fc2: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
146fc5: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
146fc8: 03 45 e4 add -0x1c(%ebp),%eax <== NOT EXECUTED
146fcb: 89 f2 mov %esi,%edx <== NOT EXECUTED
146fcd: 83 e2 1f and $0x1f,%edx <== NOT EXECUTED
146fd0: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
146fd3: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
146fd8: 89 fa mov %edi,%edx <== NOT EXECUTED
146fda: 8a 4d d4 mov -0x2c(%ebp),%cl <== NOT EXECUTED
146fdd: d3 e2 shl %cl,%edx <== NOT EXECUTED
146fdf: 09 10 or %edx,(%eax) <== NOT EXECUTED
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
146fe1: c1 fe 0a sar $0xa,%esi <== NOT EXECUTED
146fe4: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
146fe7: 83 e1 1f and $0x1f,%ecx <== NOT EXECUTED
146fea: d3 e7 shl %cl,%edi <== NOT EXECUTED
146fec: 8b 4b 14 mov 0x14(%ebx),%ecx <== NOT EXECUTED
146fef: 09 3c b1 or %edi,(%ecx,%esi,4) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
146ff2: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
146ff4: c6 00 01 movb $0x1,(%eax) <== NOT EXECUTED
control->free++;
146ff7: ff 43 10 incl 0x10(%ebx) <== NOT EXECUTED
146ffa: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
}
146ffc: 83 c4 3c add $0x3c,%esp <== NOT EXECUTED
146fff: 5b pop %ebx <== NOT EXECUTED
147000: 5e pop %esi <== NOT EXECUTED
147001: 5f pop %edi <== NOT EXECUTED
147002: c9 leave <== NOT EXECUTED
147003: c3 ret <== NOT EXECUTED
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
147004: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
rtems_rfs_buffer_mark_dirty (control->buffer);
control->free++;
return 0;
}
147009: 83 c4 3c add $0x3c,%esp <== NOT EXECUTED
14700c: 5b pop %ebx <== NOT EXECUTED
14700d: 5e pop %esi <== NOT EXECUTED
14700e: 5f pop %edi <== NOT EXECUTED
14700f: c9 leave <== NOT EXECUTED
147010: c3 ret <== NOT EXECUTED
00146e2c <rtems_rfs_bitmap_map_clear_all>:
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
146e2c: 55 push %ebp <== NOT EXECUTED
146e2d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
146e2f: 57 push %edi <== NOT EXECUTED
146e30: 56 push %esi <== NOT EXECUTED
146e31: 53 push %ebx <== NOT EXECUTED
146e32: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
146e35: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_rfs_bitmap_bit last_search_bit;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
146e38: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
146e3b: 89 d8 mov %ebx,%eax <== NOT EXECUTED
146e3d: e8 82 fe ff ff call 146cc4 <rtems_rfs_bitmap_load_map><== NOT EXECUTED
if (rc > 0)
146e42: 85 c0 test %eax,%eax <== NOT EXECUTED
146e44: 7e 0a jle 146e50 <rtems_rfs_bitmap_map_clear_all+0x24><== NOT EXECUTED
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
146e46: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED
146e49: 5b pop %ebx <== NOT EXECUTED
146e4a: 5e pop %esi <== NOT EXECUTED
146e4b: 5f pop %edi <== NOT EXECUTED
146e4c: c9 leave <== NOT EXECUTED
146e4d: c3 ret <== NOT EXECUTED
146e4e: 66 90 xchg %ax,%ax <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
146e50: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
146e53: 48 dec %eax <== NOT EXECUTED
146e54: c1 e8 05 shr $0x5,%eax <== NOT EXECUTED
146e57: 8d 70 01 lea 0x1(%eax),%esi <== NOT EXECUTED
control->free = elements;
146e5a: 89 73 10 mov %esi,0x10(%ebx) <== NOT EXECUTED
146e5d: 8b 7d e4 mov -0x1c(%ebp),%edi <== NOT EXECUTED
146e60: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
146e62: 31 d2 xor %edx,%edx <== NOT EXECUTED
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
146e64: c7 04 8f ff ff ff ff movl $0xffffffff,(%edi,%ecx,4) <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
146e6b: 42 inc %edx <== NOT EXECUTED
146e6c: 89 d1 mov %edx,%ecx <== NOT EXECUTED
146e6e: 39 d6 cmp %edx,%esi <== NOT EXECUTED
146e70: 77 f2 ja 146e64 <rtems_rfs_bitmap_map_clear_all+0x38><== NOT EXECUTED
* Set the un-mapped bits in the last search element so the available logic
* works.
*/
last_search_bit = rtems_rfs_bitmap_map_offset (elements);
if (last_search_bit == 0)
146e72: 83 e6 1f and $0x1f,%esi <== NOT EXECUTED
146e75: 74 3d je 146eb4 <rtems_rfs_bitmap_map_clear_all+0x88><== NOT EXECUTED
146e77: b9 20 00 00 00 mov $0x20,%ecx <== NOT EXECUTED
146e7c: 29 f1 sub %esi,%ecx <== NOT EXECUTED
146e7e: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
146e83: d3 ea shr %cl,%edx <== NOT EXECUTED
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
146e85: c1 e8 05 shr $0x5,%eax <== NOT EXECUTED
146e88: 74 31 je 146ebb <rtems_rfs_bitmap_map_clear_all+0x8f><== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
146e8a: 8b 7b 14 mov 0x14(%ebx),%edi <== NOT EXECUTED
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
146e8d: 31 f6 xor %esi,%esi <== NOT EXECUTED
146e8f: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
146e91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
146e94: c7 04 b7 ff ff ff ff movl $0xffffffff,(%edi,%esi,4) <== NOT EXECUTED
if (last_search_bit == 0)
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
146e9b: 41 inc %ecx <== NOT EXECUTED
146e9c: 89 ce mov %ecx,%esi <== NOT EXECUTED
146e9e: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
146ea0: 75 f2 jne 146e94 <rtems_rfs_bitmap_map_clear_all+0x68><== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
control->search_bits[elements - 1] =
146ea2: 89 14 87 mov %edx,(%edi,%eax,4) <== NOT EXECUTED
rtems_rfs_bitmap_merge (RTEMS_RFS_BITMAP_ELEMENT_CLEAR,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
146ea5: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
146ea7: c6 00 01 movb $0x1,(%eax) <== NOT EXECUTED
146eaa: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
}
146eac: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED
146eaf: 5b pop %ebx <== NOT EXECUTED
146eb0: 5e pop %esi <== NOT EXECUTED
146eb1: 5f pop %edi <== NOT EXECUTED
146eb2: c9 leave <== NOT EXECUTED
146eb3: c3 ret <== NOT EXECUTED
* Set the un-mapped bits in the last search element so the available logic
* works.
*/
last_search_bit = rtems_rfs_bitmap_map_offset (elements);
if (last_search_bit == 0)
146eb4: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
146eb9: eb ca jmp 146e85 <rtems_rfs_bitmap_map_clear_all+0x59><== NOT EXECUTED
146ebb: 8b 7b 14 mov 0x14(%ebx),%edi <== NOT EXECUTED
146ebe: eb e2 jmp 146ea2 <rtems_rfs_bitmap_map_clear_all+0x76><== NOT EXECUTED
00147014 <rtems_rfs_bitmap_map_set>:
}
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
147014: 55 push %ebp <== NOT EXECUTED
147015: 89 e5 mov %esp,%ebp <== NOT EXECUTED
147017: 57 push %edi <== NOT EXECUTED
147018: 56 push %esi <== NOT EXECUTED
147019: 53 push %ebx <== NOT EXECUTED
14701a: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
14701d: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
147020: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
rtems_rfs_bitmap_map map;
rtems_rfs_bitmap_map search_map;
int index;
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
147023: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
147026: 89 d8 mov %ebx,%eax <== NOT EXECUTED
147028: e8 97 fc ff ff call 146cc4 <rtems_rfs_bitmap_load_map><== NOT EXECUTED
if (rc > 0)
14702d: 85 c0 test %eax,%eax <== NOT EXECUTED
14702f: 7e 0b jle 14703c <rtems_rfs_bitmap_map_set+0x28><== NOT EXECUTED
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
rtems_rfs_buffer_mark_dirty (control->buffer);
}
return 0;
}
147031: 83 c4 3c add $0x3c,%esp <== NOT EXECUTED
147034: 5b pop %ebx <== NOT EXECUTED
147035: 5e pop %esi <== NOT EXECUTED
147036: 5f pop %edi <== NOT EXECUTED
147037: c9 leave <== NOT EXECUTED
147038: c3 ret <== NOT EXECUTED
147039: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
14703c: 3b 73 0c cmp 0xc(%ebx),%esi <== NOT EXECUTED
14703f: 73 53 jae 147094 <rtems_rfs_bitmap_map_set+0x80><== NOT EXECUTED
return EINVAL;
search_map = control->search_bits;
147041: 8b 53 14 mov 0x14(%ebx),%edx <== NOT EXECUTED
index = rtems_rfs_bitmap_map_index (bit);
147044: 89 f0 mov %esi,%eax <== NOT EXECUTED
147046: c1 f8 05 sar $0x5,%eax <== NOT EXECUTED
147049: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
14704c: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
14704f: 03 45 e4 add -0x1c(%ebp),%eax <== NOT EXECUTED
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
147052: 89 f1 mov %esi,%ecx <== NOT EXECUTED
147054: 83 e1 1f and $0x1f,%ecx <== NOT EXECUTED
147057: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
14705c: d3 e7 shl %cl,%edi <== NOT EXECUTED
14705e: f7 d7 not %edi <== NOT EXECUTED
147060: 8b 08 mov (%eax),%ecx <== NOT EXECUTED
147062: 21 cf and %ecx,%edi <== NOT EXECUTED
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
147064: 89 38 mov %edi,(%eax) <== NOT EXECUTED
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
147066: 85 ff test %edi,%edi <== NOT EXECUTED
147068: 75 1d jne 147087 <rtems_rfs_bitmap_map_set+0x73><== NOT EXECUTED
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
14706a: c1 fe 0a sar $0xa,%esi <== NOT EXECUTED
14706d: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
147070: 83 e1 1f and $0x1f,%ecx <== NOT EXECUTED
147073: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
147078: d3 e7 shl %cl,%edi <== NOT EXECUTED
14707a: f7 d7 not %edi <== NOT EXECUTED
14707c: 21 3c b2 and %edi,(%edx,%esi,4) <== NOT EXECUTED
control->free--;
14707f: ff 4b 10 decl 0x10(%ebx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
147082: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
147084: c6 00 01 movb $0x1,(%eax) <== NOT EXECUTED
147087: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
return 0;
}
147089: 83 c4 3c add $0x3c,%esp <== NOT EXECUTED
14708c: 5b pop %ebx <== NOT EXECUTED
14708d: 5e pop %esi <== NOT EXECUTED
14708e: 5f pop %edi <== NOT EXECUTED
14708f: c9 leave <== NOT EXECUTED
147090: c3 ret <== NOT EXECUTED
147091: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
147094: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
rtems_rfs_buffer_mark_dirty (control->buffer);
}
return 0;
}
147099: 83 c4 3c add $0x3c,%esp <== NOT EXECUTED
14709c: 5b pop %ebx <== NOT EXECUTED
14709d: 5e pop %esi <== NOT EXECUTED
14709e: 5f pop %edi <== NOT EXECUTED
14709f: c9 leave <== NOT EXECUTED
1470a0: c3 ret <== NOT EXECUTED
00146ec0 <rtems_rfs_bitmap_map_set_all>:
return 0;
}
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
146ec0: 55 push %ebp <== NOT EXECUTED
146ec1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
146ec3: 57 push %edi <== NOT EXECUTED
146ec4: 56 push %esi <== NOT EXECUTED
146ec5: 53 push %ebx <== NOT EXECUTED
146ec6: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
146ec9: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_rfs_bitmap_map map;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
146ecc: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
146ecf: 89 d8 mov %ebx,%eax <== NOT EXECUTED
146ed1: e8 ee fd ff ff call 146cc4 <rtems_rfs_bitmap_load_map><== NOT EXECUTED
if (rc > 0)
146ed6: 85 c0 test %eax,%eax <== NOT EXECUTED
146ed8: 7e 0a jle 146ee4 <rtems_rfs_bitmap_map_set_all+0x24><== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
146eda: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED
146edd: 5b pop %ebx <== NOT EXECUTED
146ede: 5e pop %esi <== NOT EXECUTED
146edf: 5f pop %edi <== NOT EXECUTED
146ee0: c9 leave <== NOT EXECUTED
146ee1: c3 ret <== NOT EXECUTED
146ee2: 66 90 xchg %ax,%ax <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
146ee4: 8b 7b 0c mov 0xc(%ebx),%edi <== NOT EXECUTED
146ee7: 4f dec %edi <== NOT EXECUTED
146ee8: c1 ef 05 shr $0x5,%edi <== NOT EXECUTED
146eeb: 8d 77 01 lea 0x1(%edi),%esi <== NOT EXECUTED
control->free = 0;
146eee: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
146ef5: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
146ef8: 31 d2 xor %edx,%edx <== NOT EXECUTED
146efa: 31 c0 xor %eax,%eax <== NOT EXECUTED
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
146efc: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
for (e = 0; e < elements; e++)
146f03: 40 inc %eax <== NOT EXECUTED
146f04: 89 c2 mov %eax,%edx <== NOT EXECUTED
146f06: 39 c6 cmp %eax,%esi <== NOT EXECUTED
146f08: 77 f2 ja 146efc <rtems_rfs_bitmap_map_set_all+0x3c><== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
146f0a: c1 ef 05 shr $0x5,%edi <== NOT EXECUTED
146f0d: 8d 77 01 lea 0x1(%edi),%esi <== NOT EXECUTED
for (e = 0; e < elements; e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
146f10: 8b 4b 14 mov 0x14(%ebx),%ecx <== NOT EXECUTED
146f13: 31 d2 xor %edx,%edx <== NOT EXECUTED
146f15: 31 c0 xor %eax,%eax <== NOT EXECUTED
146f17: 90 nop <== NOT EXECUTED
146f18: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) <== NOT EXECUTED
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < elements; e++)
146f1f: 40 inc %eax <== NOT EXECUTED
146f20: 89 c2 mov %eax,%edx <== NOT EXECUTED
146f22: 39 f0 cmp %esi,%eax <== NOT EXECUTED
146f24: 72 f2 jb 146f18 <rtems_rfs_bitmap_map_set_all+0x58><== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
146f26: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
146f28: c6 00 01 movb $0x1,(%eax) <== NOT EXECUTED
146f2b: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
}
146f2d: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED
146f30: 5b pop %ebx <== NOT EXECUTED
146f31: 5e pop %esi <== NOT EXECUTED
146f32: 5f pop %edi <== NOT EXECUTED
146f33: c9 leave <== NOT EXECUTED
146f34: c3 ret <== NOT EXECUTED
00146f38 <rtems_rfs_bitmap_map_test>:
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
146f38: 55 push %ebp <== NOT EXECUTED
146f39: 89 e5 mov %esp,%ebp <== NOT EXECUTED
146f3b: 56 push %esi <== NOT EXECUTED
146f3c: 53 push %ebx <== NOT EXECUTED
146f3d: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
146f40: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
146f43: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
rtems_rfs_bitmap_map map;
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
146f46: 8d 55 f4 lea -0xc(%ebp),%edx <== NOT EXECUTED
146f49: 89 d8 mov %ebx,%eax <== NOT EXECUTED
146f4b: e8 74 fd ff ff call 146cc4 <rtems_rfs_bitmap_load_map><== NOT EXECUTED
if (rc > 0)
146f50: 85 c0 test %eax,%eax <== NOT EXECUTED
146f52: 7e 08 jle 146f5c <rtems_rfs_bitmap_map_test+0x24><== NOT EXECUTED
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
}
146f54: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
146f57: 5b pop %ebx <== NOT EXECUTED
146f58: 5e pop %esi <== NOT EXECUTED
146f59: c9 leave <== NOT EXECUTED
146f5a: c3 ret <== NOT EXECUTED
146f5b: 90 nop <== NOT EXECUTED
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
146f5c: 3b 73 0c cmp 0xc(%ebx),%esi <== NOT EXECUTED
146f5f: 73 23 jae 146f84 <rtems_rfs_bitmap_map_test+0x4c><== NOT EXECUTED
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
146f61: 89 f2 mov %esi,%edx <== NOT EXECUTED
146f63: c1 fa 05 sar $0x5,%edx <== NOT EXECUTED
146f66: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
146f6b: 89 f1 mov %esi,%ecx <== NOT EXECUTED
146f6d: d3 e0 shl %cl,%eax <== NOT EXECUTED
146f6f: 8b 4d f4 mov -0xc(%ebp),%ecx <== NOT EXECUTED
146f72: 85 04 91 test %eax,(%ecx,%edx,4) <== NOT EXECUTED
146f75: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
146f78: 0f 94 00 sete (%eax) <== NOT EXECUTED
146f7b: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
}
146f7d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
146f80: 5b pop %ebx <== NOT EXECUTED
146f81: 5e pop %esi <== NOT EXECUTED
146f82: c9 leave <== NOT EXECUTED
146f83: c3 ret <== NOT EXECUTED
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
146f84: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
}
146f89: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
146f8c: 5b pop %ebx <== NOT EXECUTED
146f8d: 5e pop %esi <== NOT EXECUTED
146f8e: c9 leave <== NOT EXECUTED
146f8f: c3 ret <== NOT EXECUTED
00146c70 <rtems_rfs_bitmap_mask>:
return 0;
}
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
146c70: 55 push %ebp <== NOT EXECUTED
146c71: 89 e5 mov %esp,%ebp <== NOT EXECUTED
146c73: b9 20 00 00 00 mov $0x20,%ecx <== NOT EXECUTED
146c78: 2b 4d 08 sub 0x8(%ebp),%ecx <== NOT EXECUTED
146c7b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
146c80: d3 e8 shr %cl,%eax <== NOT EXECUTED
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
return mask;
}
146c82: c9 leave <== NOT EXECUTED
146c83: c3 ret <== NOT EXECUTED
00146c84 <rtems_rfs_bitmap_mask_section>:
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
146c84: 55 push %ebp <== NOT EXECUTED
146c85: 89 e5 mov %esp,%ebp <== NOT EXECUTED
146c87: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
146c8a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
rtems_rfs_bitmap_element mask = 0;
if (end > start)
146c8d: 39 d0 cmp %edx,%eax <== NOT EXECUTED
146c8f: 76 17 jbe 146ca8 <rtems_rfs_bitmap_mask_section+0x24><== NOT EXECUTED
mask = rtems_rfs_bitmap_mask (end - start) << start;
146c91: 89 d1 mov %edx,%ecx <== NOT EXECUTED
146c93: 29 c1 sub %eax,%ecx <== NOT EXECUTED
146c95: 8d 49 20 lea 0x20(%ecx),%ecx <== NOT EXECUTED
146c98: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
146c9d: d3 e8 shr %cl,%eax <== NOT EXECUTED
146c9f: 88 d1 mov %dl,%cl <== NOT EXECUTED
146ca1: d3 e0 shl %cl,%eax <== NOT EXECUTED
return mask;
}
146ca3: c9 leave <== NOT EXECUTED
146ca4: c3 ret <== NOT EXECUTED
146ca5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
rtems_rfs_bitmap_element mask = 0;
if (end > start)
146ca8: 31 c0 xor %eax,%eax <== NOT EXECUTED
mask = rtems_rfs_bitmap_mask (end - start) << start;
return mask;
}
146caa: c9 leave <== NOT EXECUTED
146cab: c3 ret <== NOT EXECUTED
00146ddc <rtems_rfs_bitmap_open>:
rtems_rfs_bitmap_open (rtems_rfs_bitmap_control* control,
rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
size_t size,
rtems_rfs_buffer_block block)
{
146ddc: 55 push %ebp <== NOT EXECUTED
146ddd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
146ddf: 53 push %ebx <== NOT EXECUTED
146de0: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
146de3: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
146de6: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
size_t elements = rtems_rfs_bitmap_elements (size);
control->buffer = buffer;
146de9: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
146dec: 89 13 mov %edx,(%ebx) <== NOT EXECUTED
control->fs = fs;
146dee: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
146df1: 89 53 04 mov %edx,0x4(%ebx) <== NOT EXECUTED
control->block = block;
146df4: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED
146df7: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED
control->size = size;
146dfa: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
146dfd: 48 dec %eax <== NOT EXECUTED
146dfe: c1 e8 0a shr $0xa,%eax <== NOT EXECUTED
146e01: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax <== NOT EXECUTED
146e08: 50 push %eax <== NOT EXECUTED
146e09: e8 fa 7f fc ff call 10ee08 <malloc> <== NOT EXECUTED
146e0e: 89 43 14 mov %eax,0x14(%ebx) <== NOT EXECUTED
if (!control->search_bits)
146e11: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
146e14: 85 c0 test %eax,%eax <== NOT EXECUTED
146e16: 74 0c je 146e24 <rtems_rfs_bitmap_open+0x48><== NOT EXECUTED
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
146e18: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
}
146e1b: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
146e1e: c9 leave <== NOT EXECUTED
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
if (!control->search_bits)
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
146e1f: e9 e8 fe ff ff jmp 146d0c <rtems_rfs_bitmap_create_search><== NOT EXECUTED
}
146e24: b0 0c mov $0xc,%al <== NOT EXECUTED
146e26: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
146e29: c9 leave <== NOT EXECUTED
146e2a: c3 ret <== NOT EXECUTED
0013d194 <rtems_rfs_block_find_indirect>:
rtems_rfs_block_find_indirect (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no block,
int offset,
rtems_rfs_block_no* result)
{
13d194: 55 push %ebp <== NOT EXECUTED
13d195: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13d197: 57 push %edi <== NOT EXECUTED
13d198: 56 push %esi <== NOT EXECUTED
13d199: 53 push %ebx <== NOT EXECUTED
13d19a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13d19d: 89 c3 mov %eax,%ebx <== NOT EXECUTED
13d19f: 89 d6 mov %edx,%esi <== NOT EXECUTED
13d1a1: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
/*
* If the handle has a buffer and this request is a different block the current
* buffer is released.
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
13d1a4: 6a 01 push $0x1 <== NOT EXECUTED
13d1a6: 51 push %ecx <== NOT EXECUTED
13d1a7: 52 push %edx <== NOT EXECUTED
13d1a8: 50 push %eax <== NOT EXECUTED
13d1a9: e8 7e 0f 00 00 call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
if (rc > 0)
13d1ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d1b1: 85 c0 test %eax,%eax <== NOT EXECUTED
13d1b3: 7e 0b jle 13d1c0 <rtems_rfs_block_find_indirect+0x2c><== NOT EXECUTED
*result = 0;
rc = EIO;
}
return 0;
}
13d1b5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13d1b8: 5b pop %ebx <== NOT EXECUTED
13d1b9: 5e pop %esi <== NOT EXECUTED
13d1ba: 5f pop %edi <== NOT EXECUTED
13d1bb: c9 leave <== NOT EXECUTED
13d1bc: c3 ret <== NOT EXECUTED
13d1bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
if (rc > 0)
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
13d1c0: 8b 46 08 mov 0x8(%esi),%eax <== NOT EXECUTED
13d1c3: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED
13d1c6: 8d 0c bd 00 00 00 00 lea 0x0(,%edi,4),%ecx <== NOT EXECUTED
13d1cd: 0f b6 44 0a 03 movzbl 0x3(%edx,%ecx,1),%eax <== NOT EXECUTED
13d1d2: 0f b6 34 0a movzbl (%edx,%ecx,1),%esi <== NOT EXECUTED
13d1d6: c1 e6 18 shl $0x18,%esi <== NOT EXECUTED
13d1d9: 09 f0 or %esi,%eax <== NOT EXECUTED
13d1db: 0f b6 4c 0a 01 movzbl 0x1(%edx,%ecx,1),%ecx <== NOT EXECUTED
13d1e0: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13d1e3: 09 c8 or %ecx,%eax <== NOT EXECUTED
13d1e5: 0f b6 54 ba 02 movzbl 0x2(%edx,%edi,4),%edx <== NOT EXECUTED
13d1ea: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
13d1ed: 09 d0 or %edx,%eax <== NOT EXECUTED
if ((*result + 1) == 0)
13d1ef: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
13d1f2: 74 20 je 13d214 <rtems_rfs_block_find_indirect+0x80><== NOT EXECUTED
13d1f4: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
13d1f7: 89 02 mov %eax,(%edx) <== NOT EXECUTED
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
13d1f9: 3b 43 04 cmp 0x4(%ebx),%eax <== NOT EXECUTED
13d1fc: 72 09 jb 13d207 <rtems_rfs_block_find_indirect+0x73><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
printf ("rtems-rfs: block-find: invalid block in table:"
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
13d1fe: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
13d201: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
13d207: 31 c0 xor %eax,%eax <== NOT EXECUTED
rc = EIO;
}
return 0;
}
13d209: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13d20c: 5b pop %ebx <== NOT EXECUTED
13d20d: 5e pop %esi <== NOT EXECUTED
13d20e: 5f pop %edi <== NOT EXECUTED
13d20f: c9 leave <== NOT EXECUTED
13d210: c3 ret <== NOT EXECUTED
13d211: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
if (rc > 0)
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
if ((*result + 1) == 0)
13d214: 31 c0 xor %eax,%eax <== NOT EXECUTED
13d216: eb dc jmp 13d1f4 <rtems_rfs_block_find_indirect+0x60><== NOT EXECUTED
0013d0f4 <rtems_rfs_block_get_block_size>:
void
rtems_rfs_block_get_block_size (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_size* size)
{
13d0f4: 55 push %ebp <== NOT EXECUTED
13d0f5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13d0f7: 57 push %edi <== NOT EXECUTED
13d0f8: 56 push %esi <== NOT EXECUTED
13d0f9: 53 push %ebx <== NOT EXECUTED
13d0fa: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
13d0fd: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
13d100: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
13d103: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
if (pos == 0)
13d106: 89 f0 mov %esi,%eax <== NOT EXECUTED
13d108: 09 d8 or %ebx,%eax <== NOT EXECUTED
13d10a: 74 38 je 13d144 <rtems_rfs_block_get_block_size+0x50><== NOT EXECUTED
rtems_rfs_block_set_size_zero (size);
else
{
size->count = pos / rtems_rfs_fs_block_size (fs) + 1;
13d10c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13d10f: 8b 50 08 mov 0x8(%eax),%edx <== NOT EXECUTED
13d112: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
13d114: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
13d117: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
13d11a: 51 push %ecx <== NOT EXECUTED
13d11b: 52 push %edx <== NOT EXECUTED
13d11c: 56 push %esi <== NOT EXECUTED
13d11d: 53 push %ebx <== NOT EXECUTED
13d11e: e8 45 07 02 00 call 15d868 <__udivdi3> <== NOT EXECUTED
13d123: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d126: 40 inc %eax <== NOT EXECUTED
13d127: 89 07 mov %eax,(%edi) <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
13d129: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13d12c: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13d12f: 56 push %esi <== NOT EXECUTED
13d130: 53 push %ebx <== NOT EXECUTED
13d131: e8 42 08 02 00 call 15d978 <__umoddi3> <== NOT EXECUTED
13d136: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d139: 89 47 04 mov %eax,0x4(%edi) <== NOT EXECUTED
}
}
13d13c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13d13f: 5b pop %ebx <== NOT EXECUTED
13d140: 5e pop %esi <== NOT EXECUTED
13d141: 5f pop %edi <== NOT EXECUTED
13d142: c9 leave <== NOT EXECUTED
13d143: c3 ret <== NOT EXECUTED
* @param size A pointer to the block size.
*/
static inline void
rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size)
{
size->count = 0;
13d144: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED
size->offset = 0;
13d14a: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) <== NOT EXECUTED
13d151: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13d154: 5b pop %ebx <== NOT EXECUTED
13d155: 5e pop %esi <== NOT EXECUTED
13d156: 5f pop %edi <== NOT EXECUTED
13d157: c9 leave <== NOT EXECUTED
13d158: c3 ret <== NOT EXECUTED
0013d098 <rtems_rfs_block_get_bpos>:
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
13d098: 55 push %ebp <== NOT EXECUTED
13d099: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13d09b: 57 push %edi <== NOT EXECUTED
13d09c: 56 push %esi <== NOT EXECUTED
13d09d: 53 push %ebx <== NOT EXECUTED
13d09e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13d0a1: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
13d0a4: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13d0a7: 8b 58 08 mov 0x8(%eax),%ebx <== NOT EXECUTED
13d0aa: 31 f6 xor %esi,%esi <== NOT EXECUTED
13d0ac: 56 push %esi <== NOT EXECUTED
13d0ad: 53 push %ebx <== NOT EXECUTED
13d0ae: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13d0b1: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13d0b4: e8 af 07 02 00 call 15d868 <__udivdi3> <== NOT EXECUTED
13d0b9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d0bc: 89 07 mov %eax,(%edi) <== NOT EXECUTED
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
13d0be: 56 push %esi <== NOT EXECUTED
13d0bf: 53 push %ebx <== NOT EXECUTED
13d0c0: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13d0c3: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13d0c6: e8 ad 08 02 00 call 15d978 <__umoddi3> <== NOT EXECUTED
13d0cb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d0ce: 89 47 04 mov %eax,0x4(%edi) <== NOT EXECUTED
}
13d0d1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13d0d4: 5b pop %ebx <== NOT EXECUTED
13d0d5: 5e pop %esi <== NOT EXECUTED
13d0d6: 5f pop %edi <== NOT EXECUTED
13d0d7: c9 leave <== NOT EXECUTED
13d0d8: c3 ret <== NOT EXECUTED
0013d0dc <rtems_rfs_block_get_pos>:
rtems_rfs_pos
rtems_rfs_block_get_pos (rtems_rfs_file_system* fs,
rtems_rfs_block_pos* bpos)
{
13d0dc: 55 push %ebp <== NOT EXECUTED
13d0dd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13d0df: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
13d0e2: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13d0e5: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
13d0e8: 0f af 02 imul (%edx),%eax <== NOT EXECUTED
13d0eb: 03 42 04 add 0x4(%edx),%eax <== NOT EXECUTED
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
}
13d0ee: 31 d2 xor %edx,%edx <== NOT EXECUTED
13d0f0: c9 leave <== NOT EXECUTED
13d0f1: c3 ret <== NOT EXECUTED
0013d15c <rtems_rfs_block_get_size>:
rtems_rfs_pos
rtems_rfs_block_get_size (rtems_rfs_file_system* fs,
rtems_rfs_block_size* size)
{
13d15c: 55 push %ebp <== NOT EXECUTED
13d15d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13d15f: 53 push %ebx <== NOT EXECUTED
13d160: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
13d163: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
uint32_t offset;
uint64_t block_size;
if (size->count == 0)
13d166: 8b 10 mov (%eax),%edx <== NOT EXECUTED
13d168: 85 d2 test %edx,%edx <== NOT EXECUTED
13d16a: 74 20 je 13d18c <rtems_rfs_block_get_size+0x30><== NOT EXECUTED
return 0;
if (size->offset == 0)
13d16c: 8b 48 04 mov 0x4(%eax),%ecx <== NOT EXECUTED
13d16f: 85 c9 test %ecx,%ecx <== NOT EXECUTED
13d171: 74 11 je 13d184 <rtems_rfs_block_get_size+0x28><== NOT EXECUTED
13d173: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
offset = rtems_rfs_fs_block_size (fs);
else
offset = size->offset;
block_size = rtems_rfs_fs_block_size (fs);
return (((uint64_t) (size->count - 1)) * block_size) + offset;
13d176: 4a dec %edx <== NOT EXECUTED
13d177: f7 e2 mul %edx <== NOT EXECUTED
13d179: 31 db xor %ebx,%ebx <== NOT EXECUTED
13d17b: 01 c8 add %ecx,%eax <== NOT EXECUTED
13d17d: 11 da adc %ebx,%edx <== NOT EXECUTED
}
13d17f: 5b pop %ebx <== NOT EXECUTED
13d180: c9 leave <== NOT EXECUTED
13d181: c3 ret <== NOT EXECUTED
13d182: 66 90 xchg %ax,%ax <== NOT EXECUTED
uint32_t offset;
uint64_t block_size;
if (size->count == 0)
return 0;
if (size->offset == 0)
offset = rtems_rfs_fs_block_size (fs);
13d184: 8b 4b 08 mov 0x8(%ebx),%ecx <== NOT EXECUTED
13d187: 89 c8 mov %ecx,%eax <== NOT EXECUTED
13d189: eb eb jmp 13d176 <rtems_rfs_block_get_size+0x1a><== NOT EXECUTED
13d18b: 90 nop <== NOT EXECUTED
rtems_rfs_block_get_size (rtems_rfs_file_system* fs,
rtems_rfs_block_size* size)
{
uint32_t offset;
uint64_t block_size;
if (size->count == 0)
13d18c: 31 c0 xor %eax,%eax <== NOT EXECUTED
13d18e: 31 d2 xor %edx,%edx <== NOT EXECUTED
offset = rtems_rfs_fs_block_size (fs);
else
offset = size->offset;
block_size = rtems_rfs_fs_block_size (fs);
return (((uint64_t) (size->count - 1)) * block_size) + offset;
}
13d190: 5b pop %ebx <== NOT EXECUTED
13d191: c9 leave <== NOT EXECUTED
13d192: c3 ret <== NOT EXECUTED
0013db30 <rtems_rfs_block_map_close>:
}
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
13db30: 55 push %ebp <== NOT EXECUTED
13db31: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13db33: 57 push %edi <== NOT EXECUTED
13db34: 56 push %esi <== NOT EXECUTED
13db35: 53 push %ebx <== NOT EXECUTED
13db36: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
13db39: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
13db3c: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
int rc = 0;
int brc;
if (map->dirty && map->inode)
13db3f: 80 3b 00 cmpb $0x0,(%ebx) <== NOT EXECUTED
13db42: 74 68 je 13dbac <rtems_rfs_block_map_close+0x7c><== NOT EXECUTED
13db44: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED
13db47: 85 c0 test %eax,%eax <== NOT EXECUTED
13db49: 74 61 je 13dbac <rtems_rfs_block_map_close+0x7c><== NOT EXECUTED
{
brc = rtems_rfs_inode_load (fs, map->inode);
13db4b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13db4e: 50 push %eax <== NOT EXECUTED
13db4f: 56 push %esi <== NOT EXECUTED
13db50: e8 4f 3f 00 00 call 141aa4 <rtems_rfs_inode_load> <== NOT EXECUTED
if (brc > 0)
13db55: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13db58: 85 c0 test %eax,%eax <== NOT EXECUTED
13db5a: 7e 54 jle 13dbb0 <rtems_rfs_block_map_close+0x80><== NOT EXECUTED
13db5c: 89 c7 mov %eax,%edi <== NOT EXECUTED
map->dirty = false;
}
}
map->inode = NULL;
13db5e: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
13db65: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13db68: 8d 43 38 lea 0x38(%ebx),%eax <== NOT EXECUTED
13db6b: 50 push %eax <== NOT EXECUTED
13db6c: 56 push %esi <== NOT EXECUTED
13db6d: e8 b6 04 00 00 call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
13db72: c6 43 38 00 movb $0x0,0x38(%ebx) <== NOT EXECUTED
handle->bnum = 0;
13db76: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
13db7d: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
13db84: 58 pop %eax <== NOT EXECUTED
13db85: 5a pop %edx <== NOT EXECUTED
13db86: 8d 43 44 lea 0x44(%ebx),%eax <== NOT EXECUTED
13db89: 50 push %eax <== NOT EXECUTED
13db8a: 56 push %esi <== NOT EXECUTED
13db8b: e8 98 04 00 00 call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
13db90: c6 43 44 00 movb $0x0,0x44(%ebx) <== NOT EXECUTED
handle->bnum = 0;
13db94: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
13db9b: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) <== NOT EXECUTED
rc = brc;
brc = rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
if ((brc > 0) && (rc == 0))
rc = brc;
return rc;
}
13dba2: 89 f8 mov %edi,%eax <== NOT EXECUTED
13dba4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13dba7: 5b pop %ebx <== NOT EXECUTED
13dba8: 5e pop %esi <== NOT EXECUTED
13dba9: 5f pop %edi <== NOT EXECUTED
13dbaa: c9 leave <== NOT EXECUTED
13dbab: c3 ret <== NOT EXECUTED
brc = rtems_rfs_inode_unload (fs, map->inode, true);
if (brc > 0)
rc = brc;
map->dirty = false;
13dbac: 31 ff xor %edi,%edi <== NOT EXECUTED
13dbae: eb ae jmp 13db5e <rtems_rfs_block_map_close+0x2e><== NOT EXECUTED
int brc;
if (map->dirty && map->inode)
{
brc = rtems_rfs_inode_load (fs, map->inode);
if (brc > 0)
13dbb0: 31 c0 xor %eax,%eax <== NOT EXECUTED
13dbb2: 89 75 e4 mov %esi,-0x1c(%ebp) <== NOT EXECUTED
13dbb5: 89 5d d4 mov %ebx,-0x2c(%ebp) <== NOT EXECUTED
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
13dbb8: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
13dbbb: 8b 4c 02 24 mov 0x24(%edx,%eax,1),%ecx <== NOT EXECUTED
13dbbf: 8b 52 04 mov 0x4(%edx),%edx <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
13dbc2: 8b 72 0c mov 0xc(%edx),%esi <== NOT EXECUTED
13dbc5: 89 cf mov %ecx,%edi <== NOT EXECUTED
13dbc7: c1 ef 18 shr $0x18,%edi <== NOT EXECUTED
13dbca: 89 fb mov %edi,%ebx <== NOT EXECUTED
13dbcc: 88 5c 06 1c mov %bl,0x1c(%esi,%eax,1) <== NOT EXECUTED
13dbd0: 8b 72 0c mov 0xc(%edx),%esi <== NOT EXECUTED
13dbd3: 89 cf mov %ecx,%edi <== NOT EXECUTED
13dbd5: c1 ef 10 shr $0x10,%edi <== NOT EXECUTED
13dbd8: 89 fb mov %edi,%ebx <== NOT EXECUTED
13dbda: 88 5c 06 1d mov %bl,0x1d(%esi,%eax,1) <== NOT EXECUTED
13dbde: 8b 72 0c mov 0xc(%edx),%esi <== NOT EXECUTED
13dbe1: 89 cf mov %ecx,%edi <== NOT EXECUTED
13dbe3: c1 ef 08 shr $0x8,%edi <== NOT EXECUTED
13dbe6: 89 fb mov %edi,%ebx <== NOT EXECUTED
13dbe8: 88 5c 06 1e mov %bl,0x1e(%esi,%eax,1) <== NOT EXECUTED
13dbec: 8b 72 0c mov 0xc(%edx),%esi <== NOT EXECUTED
13dbef: 88 4c 06 1f mov %cl,0x1f(%esi,%eax,1) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
13dbf3: c6 42 10 01 movb $0x1,0x10(%edx) <== NOT EXECUTED
13dbf7: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
13dbfa: 83 f8 14 cmp $0x14,%eax <== NOT EXECUTED
13dbfd: 75 b9 jne 13dbb8 <rtems_rfs_block_map_close+0x88><== NOT EXECUTED
13dbff: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED
13dc02: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
13dc05: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED
13dc08: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
13dc0b: 89 d7 mov %edx,%edi <== NOT EXECUTED
13dc0d: c1 ef 18 shr $0x18,%edi <== NOT EXECUTED
13dc10: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED
13dc13: 8a 4d e4 mov -0x1c(%ebp),%cl <== NOT EXECUTED
13dc16: 8b 78 0c mov 0xc(%eax),%edi <== NOT EXECUTED
13dc19: 88 4f 0c mov %cl,0xc(%edi) <== NOT EXECUTED
13dc1c: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13dc1e: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
13dc21: 8b 78 0c mov 0xc(%eax),%edi <== NOT EXECUTED
13dc24: 88 4f 0d mov %cl,0xd(%edi) <== NOT EXECUTED
13dc27: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13dc29: c1 e9 08 shr $0x8,%ecx <== NOT EXECUTED
13dc2c: 8b 78 0c mov 0xc(%eax),%edi <== NOT EXECUTED
13dc2f: 88 4f 0e mov %cl,0xe(%edi) <== NOT EXECUTED
13dc32: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
13dc35: 88 51 0f mov %dl,0xf(%ecx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
13dc38: c6 40 10 01 movb $0x1,0x10(%eax) <== NOT EXECUTED
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
13dc3c: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
13dc3f: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
13dc42: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13dc44: 66 c1 e9 08 shr $0x8,%cx <== NOT EXECUTED
13dc48: 8b 78 0c mov 0xc(%eax),%edi <== NOT EXECUTED
13dc4b: 88 4f 0a mov %cl,0xa(%edi) <== NOT EXECUTED
13dc4e: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
13dc51: 88 51 0b mov %dl,0xb(%ecx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
13dc54: c6 40 10 01 movb $0x1,0x10(%eax) <== NOT EXECUTED
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
13dc58: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
13dc5b: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
13dc5e: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13dc60: c1 e9 18 shr $0x18,%ecx <== NOT EXECUTED
13dc63: 8b 78 0c mov 0xc(%eax),%edi <== NOT EXECUTED
13dc66: 88 4f 30 mov %cl,0x30(%edi) <== NOT EXECUTED
13dc69: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13dc6b: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
13dc6e: 8b 78 0c mov 0xc(%eax),%edi <== NOT EXECUTED
13dc71: 88 4f 31 mov %cl,0x31(%edi) <== NOT EXECUTED
13dc74: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13dc76: c1 e9 08 shr $0x8,%ecx <== NOT EXECUTED
13dc79: 8b 78 0c mov 0xc(%eax),%edi <== NOT EXECUTED
13dc7c: 88 4f 32 mov %cl,0x32(%edi) <== NOT EXECUTED
13dc7f: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
13dc82: 88 51 33 mov %dl,0x33(%ecx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
13dc85: c6 40 10 01 movb $0x1,0x10(%eax) <== NOT EXECUTED
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
13dc89: 8b 53 20 mov 0x20(%ebx),%edx <== NOT EXECUTED
13dc8c: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED
* @param block_count The last data block number.
*/
static inline void
rtems_rfs_inode_set_last_data_block (rtems_rfs_inode_handle* handle, uint32_t last_data_block)
{
rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block);
13dc8f: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13dc91: c1 e9 18 shr $0x18,%ecx <== NOT EXECUTED
13dc94: 8b 78 0c mov 0xc(%eax),%edi <== NOT EXECUTED
13dc97: 88 4f 34 mov %cl,0x34(%edi) <== NOT EXECUTED
13dc9a: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13dc9c: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
13dc9f: 8b 78 0c mov 0xc(%eax),%edi <== NOT EXECUTED
13dca2: 88 4f 35 mov %cl,0x35(%edi) <== NOT EXECUTED
13dca5: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13dca7: c1 e9 08 shr $0x8,%ecx <== NOT EXECUTED
13dcaa: 8b 78 0c mov 0xc(%eax),%edi <== NOT EXECUTED
13dcad: 88 4f 36 mov %cl,0x36(%edi) <== NOT EXECUTED
13dcb0: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
13dcb3: 88 51 37 mov %dl,0x37(%ecx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
13dcb6: c6 40 10 01 movb $0x1,0x10(%eax) <== NOT EXECUTED
brc = rtems_rfs_inode_unload (fs, map->inode, true);
13dcba: 51 push %ecx <== NOT EXECUTED
13dcbb: 6a 01 push $0x1 <== NOT EXECUTED
13dcbd: ff 73 04 pushl 0x4(%ebx) <== NOT EXECUTED
13dcc0: 56 push %esi <== NOT EXECUTED
13dcc1: e8 12 3d 00 00 call 1419d8 <rtems_rfs_inode_unload><== NOT EXECUTED
13dcc6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13dcc9: 89 c7 mov %eax,%edi <== NOT EXECUTED
13dccb: 85 c0 test %eax,%eax <== NOT EXECUTED
13dccd: 78 09 js 13dcd8 <rtems_rfs_block_map_close+0x1a8><== NOT EXECUTED
if (brc > 0)
rc = brc;
map->dirty = false;
13dccf: c6 03 00 movb $0x0,(%ebx) <== NOT EXECUTED
13dcd2: e9 87 fe ff ff jmp 13db5e <rtems_rfs_block_map_close+0x2e><== NOT EXECUTED
13dcd7: 90 nop <== NOT EXECUTED
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
brc = rtems_rfs_inode_unload (fs, map->inode, true);
13dcd8: 31 ff xor %edi,%edi <== NOT EXECUTED
13dcda: eb f3 jmp 13dccf <rtems_rfs_block_map_close+0x19f><== NOT EXECUTED
0013d218 <rtems_rfs_block_map_find>:
int
rtems_rfs_block_map_find (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_pos* bpos,
rtems_rfs_block_no* block)
{
13d218: 55 push %ebp <== NOT EXECUTED
13d219: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13d21b: 57 push %edi <== NOT EXECUTED
13d21c: 56 push %esi <== NOT EXECUTED
13d21d: 53 push %ebx <== NOT EXECUTED
13d21e: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
13d221: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
13d224: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
13d227: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
int rc = 0;
*block = 0;
13d22a: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
13d230: 8b 06 mov (%esi),%eax <== NOT EXECUTED
13d232: 85 c0 test %eax,%eax <== NOT EXECUTED
13d234: 75 6e jne 13d2a4 <rtems_rfs_block_map_find+0x8c><== NOT EXECUTED
13d236: 8b 4b 08 mov 0x8(%ebx),%ecx <== NOT EXECUTED
13d239: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
13d23b: 73 57 jae 13d294 <rtems_rfs_block_map_find+0x7c><== NOT EXECUTED
return ENXIO;
/*
* If the block position is the same and we have found the block just return it.
*/
if ((bpos->bno == map->bpos.bno) && (map->bpos.block != 0))
13d23d: 3b 43 10 cmp 0x10(%ebx),%eax <== NOT EXECUTED
13d240: 74 6e je 13d2b0 <rtems_rfs_block_map_find+0x98><== NOT EXECUTED
/*
* Determine the type of access we need to perform. If the number of blocks
* is less than or equal to the number of slots in the inode the blocks are
* directly accessed.
*/
if (map->size.count <= RTEMS_RFS_INODE_BLOCKS)
13d242: 83 f9 05 cmp $0x5,%ecx <== NOT EXECUTED
13d245: 77 29 ja 13d270 <rtems_rfs_block_map_find+0x58><== NOT EXECUTED
{
*block = map->blocks[bpos->bno];
13d247: 8b 44 83 24 mov 0x24(%ebx,%eax,4),%eax <== NOT EXECUTED
13d24b: 89 07 mov %eax,(%edi) <== NOT EXECUTED
}
}
if (rc == 0)
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
13d24d: 8b 06 mov (%esi),%eax <== NOT EXECUTED
13d24f: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED
13d252: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
13d255: 89 43 14 mov %eax,0x14(%ebx) <== NOT EXECUTED
13d258: 8b 46 08 mov 0x8(%esi),%eax <== NOT EXECUTED
13d25b: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED
map->bpos.block = *block;
13d25e: 8b 07 mov (%edi),%eax <== NOT EXECUTED
13d260: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED
13d263: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
return rc;
}
13d265: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13d268: 5b pop %ebx <== NOT EXECUTED
13d269: 5e pop %esi <== NOT EXECUTED
13d26a: 5f pop %edi <== NOT EXECUTED
13d26b: c9 leave <== NOT EXECUTED
13d26c: c3 ret <== NOT EXECUTED
13d26d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* The map is either singly or doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = bpos->bno % fs->blocks_per_block;
13d270: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13d273: 8b 52 30 mov 0x30(%edx),%edx <== NOT EXECUTED
13d276: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
13d279: 31 d2 xor %edx,%edx <== NOT EXECUTED
13d27b: f7 75 d4 divl -0x2c(%ebp) <== NOT EXECUTED
13d27e: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
singly = bpos->bno / fs->blocks_per_block;
13d281: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
if (map->size.count <= fs->block_map_singly_blocks)
13d284: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13d287: 3b 4a 34 cmp 0x34(%edx),%ecx <== NOT EXECUTED
13d28a: 76 30 jbe 13d2bc <rtems_rfs_block_map_find+0xa4><== NOT EXECUTED
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
if (map->size.count < fs->block_map_doubly_blocks)
13d28c: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13d28f: 3b 4a 38 cmp 0x38(%edx),%ecx <== NOT EXECUTED
13d292: 72 4c jb 13d2e0 <rtems_rfs_block_map_find+0xc8><== NOT EXECUTED
}
if (rc == 0)
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
map->bpos.block = *block;
13d294: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED
}
return rc;
}
13d299: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13d29c: 5b pop %ebx <== NOT EXECUTED
13d29d: 5e pop %esi <== NOT EXECUTED
13d29e: 5f pop %edi <== NOT EXECUTED
13d29f: c9 leave <== NOT EXECUTED
13d2a0: c3 ret <== NOT EXECUTED
13d2a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
13d2a4: 8b 4b 08 mov 0x8(%ebx),%ecx <== NOT EXECUTED
13d2a7: 85 c9 test %ecx,%ecx <== NOT EXECUTED
13d2a9: 75 8e jne 13d239 <rtems_rfs_block_map_find+0x21><== NOT EXECUTED
13d2ab: eb e7 jmp 13d294 <rtems_rfs_block_map_find+0x7c><== NOT EXECUTED
13d2ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return ENXIO;
/*
* If the block position is the same and we have found the block just return it.
*/
if ((bpos->bno == map->bpos.bno) && (map->bpos.block != 0))
13d2b0: 8b 53 18 mov 0x18(%ebx),%edx <== NOT EXECUTED
13d2b3: 85 d2 test %edx,%edx <== NOT EXECUTED
13d2b5: 74 8b je 13d242 <rtems_rfs_block_map_find+0x2a><== NOT EXECUTED
{
*block = map->bpos.block;
13d2b7: 89 17 mov %edx,(%edi) <== NOT EXECUTED
return ENXIO;
/*
* If the block position is the same and we have found the block just return it.
*/
if ((bpos->bno == map->bpos.bno) && (map->bpos.block != 0))
13d2b9: eb 92 jmp 13d24d <rtems_rfs_block_map_find+0x35><== NOT EXECUTED
13d2bb: 90 nop <== NOT EXECUTED
{
/*
* This is a single indirect table of blocks anchored off a slot in the
* inode.
*/
rc = rtems_rfs_block_find_indirect (fs,
13d2bc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13d2bf: 8b 4c 83 24 mov 0x24(%ebx,%eax,4),%ecx <== NOT EXECUTED
13d2c3: 8d 53 38 lea 0x38(%ebx),%edx <== NOT EXECUTED
13d2c6: 57 push %edi <== NOT EXECUTED
13d2c7: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
13d2ca: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13d2cd: e8 c2 fe ff ff call 13d194 <rtems_rfs_block_find_indirect><== NOT EXECUTED
13d2d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
}
}
if (rc == 0)
13d2d5: 85 c0 test %eax,%eax <== NOT EXECUTED
13d2d7: 75 c0 jne 13d299 <rtems_rfs_block_map_find+0x81><== NOT EXECUTED
13d2d9: e9 6f ff ff ff jmp 13d24d <rtems_rfs_block_map_find+0x35><== NOT EXECUTED
13d2de: 66 90 xchg %ax,%ax <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
13d2e0: 31 d2 xor %edx,%edx <== NOT EXECUTED
13d2e2: f7 75 d4 divl -0x2c(%ebp) <== NOT EXECUTED
13d2e5: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
{
rc = rtems_rfs_block_find_indirect (fs,
13d2e8: 8b 4c 83 24 mov 0x24(%ebx,%eax,4),%ecx <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
13d2ec: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
{
rc = rtems_rfs_block_find_indirect (fs,
13d2ef: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13d2f2: 8d 53 44 lea 0x44(%ebx),%edx <== NOT EXECUTED
13d2f5: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
13d2f8: 50 push %eax <== NOT EXECUTED
13d2f9: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
13d2fc: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13d2ff: e8 90 fe ff ff call 13d194 <rtems_rfs_block_find_indirect><== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
singly, &singly);
if (rc == 0)
13d304: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d307: 85 c0 test %eax,%eax <== NOT EXECUTED
13d309: 75 8e jne 13d299 <rtems_rfs_block_map_find+0x81><== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
13d30b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13d30e: 8d 53 38 lea 0x38(%ebx),%edx <== NOT EXECUTED
13d311: 57 push %edi <== NOT EXECUTED
13d312: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
13d315: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
13d318: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13d31b: e8 74 fe ff ff call 13d194 <rtems_rfs_block_find_indirect><== NOT EXECUTED
13d320: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d323: eb b0 jmp 13d2d5 <rtems_rfs_block_map_find+0xbd><== NOT EXECUTED
0013d704 <rtems_rfs_block_map_free_all>:
}
int
rtems_rfs_block_map_free_all (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
13d704: 55 push %ebp <== NOT EXECUTED
13d705: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13d707: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13d70a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
return rtems_rfs_block_map_shrink (fs, map, map->size.count);
13d70d: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
13d710: 50 push %eax <== NOT EXECUTED
13d711: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13d714: e8 47 fd ff ff call 13d460 <rtems_rfs_block_map_shrink><== NOT EXECUTED
}
13d719: c9 leave <== NOT EXECUTED
13d71a: c3 ret <== NOT EXECUTED
0013d80c <rtems_rfs_block_map_grow>:
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks,
rtems_rfs_block_no* new_block)
{
13d80c: 55 push %ebp <== NOT EXECUTED
13d80d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13d80f: 57 push %edi <== NOT EXECUTED
13d810: 56 push %esi <== NOT EXECUTED
13d811: 53 push %ebx <== NOT EXECUTED
13d812: 83 ec 5c sub $0x5c,%esp <== NOT EXECUTED
13d815: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
13d818: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
13d81b: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
13d81e: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED
13d821: 3b 46 38 cmp 0x38(%esi),%eax <== NOT EXECUTED
13d824: 0f 83 be 02 00 00 jae 13dae8 <rtems_rfs_block_map_grow+0x2dc><== NOT EXECUTED
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
13d82a: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
13d82d: 85 ff test %edi,%edi <== NOT EXECUTED
13d82f: 0f 84 c3 02 00 00 je 13daf8 <rtems_rfs_block_map_grow+0x2ec><== NOT EXECUTED
13d835: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
13d838: 8d 53 38 lea 0x38(%ebx),%edx <== NOT EXECUTED
13d83b: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
13d83e: 8d 4b 44 lea 0x44(%ebx),%ecx <== NOT EXECUTED
13d841: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED
13d844: 31 ff xor %edi,%edi <== NOT EXECUTED
13d846: eb 2d jmp 13d875 <rtems_rfs_block_map_grow+0x69><== NOT EXECUTED
false, &block);
if (rc > 0)
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
map->blocks[map->size.count] = block;
13d848: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13d84b: 89 44 8b 24 mov %eax,0x24(%ebx,%ecx,4) <== NOT EXECUTED
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
}
map->size.count++;
13d84f: ff 43 08 incl 0x8(%ebx) <== NOT EXECUTED
map->size.offset = 0;
13d852: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) <== NOT EXECUTED
if (b == 0)
13d859: 85 ff test %edi,%edi <== NOT EXECUTED
13d85b: 75 08 jne 13d865 <rtems_rfs_block_map_grow+0x59><== NOT EXECUTED
*new_block = block;
13d85d: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
13d860: 89 02 mov %eax,(%edx) <== NOT EXECUTED
13d862: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
map->last_data_block = block;
13d865: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED
map->dirty = true;
13d868: c6 03 01 movb $0x1,(%ebx) <== NOT EXECUTED
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
13d86b: 47 inc %edi <== NOT EXECUTED
13d86c: 39 7d 10 cmp %edi,0x10(%ebp) <== NOT EXECUTED
13d86f: 0f 86 83 02 00 00 jbe 13daf8 <rtems_rfs_block_map_grow+0x2ec><== NOT EXECUTED
/*
* Allocate the block. If an indirect block is needed and cannot be
* allocated free this block.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_data_block,
13d875: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
13d878: 52 push %edx <== NOT EXECUTED
13d879: 6a 00 push $0x0 <== NOT EXECUTED
13d87b: 50 push %eax <== NOT EXECUTED
13d87c: 56 push %esi <== NOT EXECUTED
13d87d: e8 ce 3b 00 00 call 141450 <rtems_rfs_group_bitmap_alloc><== NOT EXECUTED
false, &block);
if (rc > 0)
13d882: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d885: 85 c0 test %eax,%eax <== NOT EXECUTED
13d887: 0f 8f 77 02 00 00 jg 13db04 <rtems_rfs_block_map_grow+0x2f8><== NOT EXECUTED
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
13d88d: 8b 4b 08 mov 0x8(%ebx),%ecx <== NOT EXECUTED
13d890: 83 f9 04 cmp $0x4,%ecx <== NOT EXECUTED
13d893: 76 b3 jbe 13d848 <rtems_rfs_block_map_grow+0x3c><== NOT EXECUTED
* Single indirect access is occuring. It could still be doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = map->size.count % fs->blocks_per_block;
13d895: 8b 46 30 mov 0x30(%esi),%eax <== NOT EXECUTED
13d898: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
13d89b: 89 c8 mov %ecx,%eax <== NOT EXECUTED
13d89d: 31 d2 xor %edx,%edx <== NOT EXECUTED
13d89f: f7 75 d4 divl -0x2c(%ebp) <== NOT EXECUTED
13d8a2: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
singly = map->size.count / fs->blocks_per_block;
if (map->size.count < fs->block_map_singly_blocks)
13d8a5: 3b 4e 34 cmp 0x34(%esi),%ecx <== NOT EXECUTED
13d8a8: 0f 83 8a 00 00 00 jae 13d938 <rtems_rfs_block_map_grow+0x12c><== NOT EXECUTED
* Singly indirect tables are being used. Allocate a new block for a
* mapping table if direct is 0 or we are moving up (upping). If upping
* move the direct blocks into the table and if not this is the first
* entry of a new block.
*/
if ((direct == 0) ||
13d8ae: 85 d2 test %edx,%edx <== NOT EXECUTED
13d8b0: 0f 84 0a 02 00 00 je 13dac0 <rtems_rfs_block_map_grow+0x2b4><== NOT EXECUTED
13d8b6: 85 c0 test %eax,%eax <== NOT EXECUTED
13d8b8: 75 09 jne 13d8c3 <rtems_rfs_block_map_grow+0xb7><== NOT EXECUTED
13d8ba: 83 fa 05 cmp $0x5,%edx <== NOT EXECUTED
13d8bd: 0f 84 fd 01 00 00 je 13dac0 <rtems_rfs_block_map_grow+0x2b4><== NOT EXECUTED
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
13d8c3: 6a 01 push $0x1 <== NOT EXECUTED
13d8c5: ff 74 83 24 pushl 0x24(%ebx,%eax,4) <== NOT EXECUTED
13d8c9: ff 75 c8 pushl -0x38(%ebp) <== NOT EXECUTED
13d8cc: 56 push %esi <== NOT EXECUTED
13d8cd: e8 5a 08 00 00 call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
13d8d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly_block, true);
if (rc > 0)
13d8d5: 85 c0 test %eax,%eax <== NOT EXECUTED
13d8d7: 0f 8f 33 02 00 00 jg 13db10 <rtems_rfs_block_map_grow+0x304><== NOT EXECUTED
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
13d8dd: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
13d8e0: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
13d8e3: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
13d8e6: 8b 53 40 mov 0x40(%ebx),%edx <== NOT EXECUTED
13d8e9: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
13d8ec: 0f b6 4d e7 movzbl -0x19(%ebp),%ecx <== NOT EXECUTED
13d8f0: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED
13d8f3: 8b 53 40 mov 0x40(%ebx),%edx <== NOT EXECUTED
13d8f6: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
13d8f9: 0f b7 4d e6 movzwl -0x1a(%ebp),%ecx <== NOT EXECUTED
13d8fd: 88 4c 02 01 mov %cl,0x1(%edx,%eax,1) <== NOT EXECUTED
13d901: 8b 53 40 mov 0x40(%ebx),%edx <== NOT EXECUTED
13d904: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
13d907: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
13d90a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
13d90d: c1 ea 08 shr $0x8,%edx <== NOT EXECUTED
13d910: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
13d913: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
13d916: 88 54 88 02 mov %dl,0x2(%eax,%ecx,4) <== NOT EXECUTED
13d91a: 8b 53 40 mov 0x40(%ebx),%edx <== NOT EXECUTED
13d91d: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
13d920: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
13d923: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
13d926: 88 4c 02 03 mov %cl,0x3(%edx,%eax,1) <== NOT EXECUTED
13d92a: c6 43 38 01 movb $0x1,0x38(%ebx) <== NOT EXECUTED
13d92e: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13d931: e9 19 ff ff ff jmp 13d84f <rtems_rfs_block_map_grow+0x43><== NOT EXECUTED
13d936: 66 90 xchg %ax,%ax <== NOT EXECUTED
* Doubly indirect tables are being used.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no singly_block;
doubly = singly / fs->blocks_per_block;
13d938: 31 d2 xor %edx,%edx <== NOT EXECUTED
13d93a: f7 75 d4 divl -0x2c(%ebp) <== NOT EXECUTED
13d93d: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
13d940: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
* Allocate a new block for a singly indirect table if direct is 0 as
* it is the first entry of a new block. We may also need to allocate a
* doubly indirect block as well. Both always occur when direct is 0
* and the doubly indirect block when singly is 0.
*/
if (direct == 0)
13d943: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
13d946: 85 c9 test %ecx,%ecx <== NOT EXECUTED
13d948: 0f 85 06 01 00 00 jne 13da54 <rtems_rfs_block_map_grow+0x248><== NOT EXECUTED
{
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
13d94e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13d951: 6a 00 push $0x0 <== NOT EXECUTED
13d953: 8d 4d e0 lea -0x20(%ebp),%ecx <== NOT EXECUTED
13d956: 51 push %ecx <== NOT EXECUTED
13d957: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
13d95a: 89 da mov %ebx,%edx <== NOT EXECUTED
13d95c: 89 f0 mov %esi,%eax <== NOT EXECUTED
13d95e: e8 b9 fd ff ff call 13d71c <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
&map->singly_buffer,
&singly_block,
false);
if (rc > 0)
13d963: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d966: 85 c0 test %eax,%eax <== NOT EXECUTED
13d968: 0f 8f a2 01 00 00 jg 13db10 <rtems_rfs_block_map_grow+0x304><== NOT EXECUTED
/*
* Allocate a new block for a doubly indirect table if singly is 0 as
* it is the first entry of a new singly indirect block.
*/
if ((singly == 0) ||
13d96e: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
13d971: 85 d2 test %edx,%edx <== NOT EXECUTED
13d973: 0f 84 83 00 00 00 je 13d9fc <rtems_rfs_block_map_grow+0x1f0><== NOT EXECUTED
13d979: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
13d97c: 85 c0 test %eax,%eax <== NOT EXECUTED
13d97e: 75 06 jne 13d986 <rtems_rfs_block_map_grow+0x17a><== NOT EXECUTED
13d980: 83 7d cc 05 cmpl $0x5,-0x34(%ebp) <== NOT EXECUTED
13d984: 74 76 je 13d9fc <rtems_rfs_block_map_grow+0x1f0><== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
13d986: 6a 01 push $0x1 <== NOT EXECUTED
13d988: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
13d98b: ff 74 8b 24 pushl 0x24(%ebx,%ecx,4) <== NOT EXECUTED
13d98f: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
13d992: 56 push %esi <== NOT EXECUTED
13d993: e8 94 07 00 00 call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
13d998: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d99b: 85 c0 test %eax,%eax <== NOT EXECUTED
13d99d: 0f 8f 88 00 00 00 jg 13da2b <rtems_rfs_block_map_grow+0x21f><== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
}
rtems_rfs_block_set_number (&map->doubly_buffer,
13d9a3: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
13d9a6: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
13d9a9: 89 45 a4 mov %eax,-0x5c(%ebp) <== NOT EXECUTED
13d9ac: 8b 53 4c mov 0x4c(%ebx),%edx <== NOT EXECUTED
13d9af: 8b 4a 20 mov 0x20(%edx),%ecx <== NOT EXECUTED
13d9b2: 0f b6 55 e3 movzbl -0x1d(%ebp),%edx <== NOT EXECUTED
13d9b6: 88 14 01 mov %dl,(%ecx,%eax,1) <== NOT EXECUTED
13d9b9: 8b 53 4c mov 0x4c(%ebx),%edx <== NOT EXECUTED
13d9bc: 8b 4a 20 mov 0x20(%edx),%ecx <== NOT EXECUTED
13d9bf: 0f b7 55 e2 movzwl -0x1e(%ebp),%edx <== NOT EXECUTED
13d9c3: 88 54 01 01 mov %dl,0x1(%ecx,%eax,1) <== NOT EXECUTED
13d9c7: 8b 53 4c mov 0x4c(%ebx),%edx <== NOT EXECUTED
13d9ca: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
13d9cd: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
13d9d0: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
13d9d3: c1 ea 08 shr $0x8,%edx <== NOT EXECUTED
13d9d6: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
13d9d9: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
13d9dc: 88 54 88 02 mov %dl,0x2(%eax,%ecx,4) <== NOT EXECUTED
13d9e0: 8b 53 4c mov 0x4c(%ebx),%edx <== NOT EXECUTED
13d9e3: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED
13d9e6: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
13d9e9: 8b 45 a4 mov -0x5c(%ebp),%eax <== NOT EXECUTED
13d9ec: 88 4c 02 03 mov %cl,0x3(%edx,%eax,1) <== NOT EXECUTED
13d9f0: c6 43 44 01 movb $0x1,0x44(%ebx) <== NOT EXECUTED
13d9f4: e9 e4 fe ff ff jmp 13d8dd <rtems_rfs_block_map_grow+0xd1><== NOT EXECUTED
13d9f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ((singly == 0) ||
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
13d9fc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13d9ff: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
13da02: 3b 46 34 cmp 0x34(%esi),%eax <== NOT EXECUTED
13da05: 0f 94 c0 sete %al <== NOT EXECUTED
13da08: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
13da0b: 50 push %eax <== NOT EXECUTED
13da0c: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
13da0f: 8d 44 93 24 lea 0x24(%ebx,%edx,4),%eax <== NOT EXECUTED
13da13: 50 push %eax <== NOT EXECUTED
13da14: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
13da17: 89 da mov %ebx,%edx <== NOT EXECUTED
13da19: 89 f0 mov %esi,%eax <== NOT EXECUTED
13da1b: e8 fc fc ff ff call 13d71c <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
&map->doubly_buffer,
&map->blocks[doubly],
upping);
if (rc > 0)
13da20: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13da23: 85 c0 test %eax,%eax <== NOT EXECUTED
13da25: 0f 8e 78 ff ff ff jle 13d9a3 <rtems_rfs_block_map_grow+0x197><== NOT EXECUTED
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
map->blocks[doubly], true);
if (rc > 0)
{
rtems_rfs_group_bitmap_free (fs, false, singly_block);
13da2b: 57 push %edi <== NOT EXECUTED
13da2c: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13da2f: 6a 00 push $0x0 <== NOT EXECUTED
13da31: 56 push %esi <== NOT EXECUTED
13da32: 89 45 c0 mov %eax,-0x40(%ebp) <== NOT EXECUTED
13da35: e8 ba 39 00 00 call 1413f4 <rtems_rfs_group_bitmap_free><== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
13da3a: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
13da3d: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13da40: 6a 00 push $0x0 <== NOT EXECUTED
13da42: 56 push %esi <== NOT EXECUTED
13da43: e8 ac 39 00 00 call 1413f4 <rtems_rfs_group_bitmap_free><== NOT EXECUTED
return rc;
13da48: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13da4b: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
13da4e: e9 9a 00 00 00 jmp 13daed <rtems_rfs_block_map_grow+0x2e1><== NOT EXECUTED
13da53: 90 nop <== NOT EXECUTED
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
13da54: 6a 01 push $0x1 <== NOT EXECUTED
13da56: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
13da59: ff 74 93 24 pushl 0x24(%ebx,%edx,4) <== NOT EXECUTED
13da5d: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
13da60: 56 push %esi <== NOT EXECUTED
13da61: e8 c6 06 00 00 call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
true);
if (rc > 0)
13da66: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13da69: 85 c0 test %eax,%eax <== NOT EXECUTED
13da6b: 0f 8f 9f 00 00 00 jg 13db10 <rtems_rfs_block_map_grow+0x304><== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
13da71: 8b 43 4c mov 0x4c(%ebx),%eax <== NOT EXECUTED
13da74: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED
13da77: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
13da7a: c1 e1 02 shl $0x2,%ecx <== NOT EXECUTED
13da7d: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
13da80: 0f b6 44 0a 03 movzbl 0x3(%edx,%ecx,1),%eax <== NOT EXECUTED
13da85: 0f b6 0c 0a movzbl (%edx,%ecx,1),%ecx <== NOT EXECUTED
13da89: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
13da8c: 09 c8 or %ecx,%eax <== NOT EXECUTED
13da8e: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
13da91: 0f b6 4c 0a 01 movzbl 0x1(%edx,%ecx,1),%ecx <== NOT EXECUTED
13da96: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13da99: 09 c8 or %ecx,%eax <== NOT EXECUTED
13da9b: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
13da9e: 0f b6 54 8a 02 movzbl 0x2(%edx,%ecx,4),%edx <== NOT EXECUTED
13daa3: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
13daa6: 09 d0 or %edx,%eax <== NOT EXECUTED
13daa8: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
13daab: 6a 01 push $0x1 <== NOT EXECUTED
13daad: 50 push %eax <== NOT EXECUTED
13daae: ff 75 c8 pushl -0x38(%ebp) <== NOT EXECUTED
13dab1: 56 push %esi <== NOT EXECUTED
13dab2: e8 75 06 00 00 call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
singly_block, true);
if (rc > 0)
13dab7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13daba: e9 16 fe ff ff jmp 13d8d5 <rtems_rfs_block_map_grow+0xc9><== NOT EXECUTED
13dabf: 90 nop <== NOT EXECUTED
/*
* Upping is when we move from direct to singly indirect.
*/
bool upping;
upping = map->size.count == RTEMS_RFS_INODE_BLOCKS;
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
13dac0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13dac3: 31 d2 xor %edx,%edx <== NOT EXECUTED
13dac5: 83 f9 05 cmp $0x5,%ecx <== NOT EXECUTED
13dac8: 0f 94 c2 sete %dl <== NOT EXECUTED
13dacb: 52 push %edx <== NOT EXECUTED
13dacc: 8d 44 83 24 lea 0x24(%ebx,%eax,4),%eax <== NOT EXECUTED
13dad0: 50 push %eax <== NOT EXECUTED
13dad1: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
13dad4: 89 da mov %ebx,%edx <== NOT EXECUTED
13dad6: 89 f0 mov %esi,%eax <== NOT EXECUTED
13dad8: e8 3f fc ff ff call 13d71c <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
* Singly indirect tables are being used. Allocate a new block for a
* mapping table if direct is 0 or we are moving up (upping). If upping
* move the direct blocks into the table and if not this is the first
* entry of a new block.
*/
if ((direct == 0) ||
13dadd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13dae0: e9 f0 fd ff ff jmp 13d8d5 <rtems_rfs_block_map_grow+0xc9><== NOT EXECUTED
13dae5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
13dae8: ba 1b 00 00 00 mov $0x1b,%edx <== NOT EXECUTED
map->last_data_block = block;
map->dirty = true;
}
return 0;
}
13daed: 89 d0 mov %edx,%eax <== NOT EXECUTED
13daef: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13daf2: 5b pop %ebx <== NOT EXECUTED
13daf3: 5e pop %esi <== NOT EXECUTED
13daf4: 5f pop %edi <== NOT EXECUTED
13daf5: c9 leave <== NOT EXECUTED
13daf6: c3 ret <== NOT EXECUTED
13daf7: 90 nop <== NOT EXECUTED
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
13daf8: 31 d2 xor %edx,%edx <== NOT EXECUTED
map->last_data_block = block;
map->dirty = true;
}
return 0;
}
13dafa: 89 d0 mov %edx,%eax <== NOT EXECUTED
13dafc: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13daff: 5b pop %ebx <== NOT EXECUTED
13db00: 5e pop %esi <== NOT EXECUTED
13db01: 5f pop %edi <== NOT EXECUTED
13db02: c9 leave <== NOT EXECUTED
13db03: c3 ret <== NOT EXECUTED
13db04: 89 c2 mov %eax,%edx <== NOT EXECUTED
13db06: 89 d0 mov %edx,%eax <== NOT EXECUTED
13db08: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13db0b: 5b pop %ebx <== NOT EXECUTED
13db0c: 5e pop %esi <== NOT EXECUTED
13db0d: 5f pop %edi <== NOT EXECUTED
13db0e: c9 leave <== NOT EXECUTED
13db0f: c3 ret <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly_block, true);
if (rc > 0)
{
rtems_rfs_group_bitmap_free (fs, false, block);
13db10: 53 push %ebx <== NOT EXECUTED
13db11: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13db14: 6a 00 push $0x0 <== NOT EXECUTED
13db16: 56 push %esi <== NOT EXECUTED
13db17: 89 45 c0 mov %eax,-0x40(%ebp) <== NOT EXECUTED
13db1a: e8 d5 38 00 00 call 1413f4 <rtems_rfs_group_bitmap_free><== NOT EXECUTED
return rc;
13db1f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13db22: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
map->last_data_block = block;
map->dirty = true;
}
return 0;
}
13db25: 89 d0 mov %edx,%eax <== NOT EXECUTED
13db27: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13db2a: 5b pop %ebx <== NOT EXECUTED
13db2b: 5e pop %esi <== NOT EXECUTED
13db2c: 5f pop %edi <== NOT EXECUTED
13db2d: c9 leave <== NOT EXECUTED
13db2e: c3 ret <== NOT EXECUTED
0013d71c <rtems_rfs_block_map_indirect_alloc>:
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
13d71c: 55 push %ebp <== NOT EXECUTED
13d71d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13d71f: 57 push %edi <== NOT EXECUTED
13d720: 56 push %esi <== NOT EXECUTED
13d721: 53 push %ebx <== NOT EXECUTED
13d722: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
13d725: 89 c6 mov %eax,%esi <== NOT EXECUTED
13d727: 89 d3 mov %edx,%ebx <== NOT EXECUTED
13d729: 8a 45 0c mov 0xc(%ebp),%al <== NOT EXECUTED
13d72c: 88 45 d7 mov %al,-0x29(%ebp) <== NOT EXECUTED
int rc;
/*
* Save the new block locally because upping can have *block pointing to the
* slots which are cleared when upping.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
13d72f: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
13d732: 50 push %eax <== NOT EXECUTED
13d733: 6a 00 push $0x0 <== NOT EXECUTED
13d735: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED
13d738: 56 push %esi <== NOT EXECUTED
13d739: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED
13d73c: e8 0f 3d 00 00 call 141450 <rtems_rfs_group_bitmap_alloc><== NOT EXECUTED
13d741: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc > 0)
13d743: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d746: 85 c0 test %eax,%eax <== NOT EXECUTED
13d748: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
13d74b: 7e 0b jle 13d758 <rtems_rfs_block_map_indirect_alloc+0x3c><== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (buffer);
*block = new_block;
map->last_map_block = new_block;
return 0;
}
13d74d: 89 f8 mov %edi,%eax <== NOT EXECUTED
13d74f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13d752: 5b pop %ebx <== NOT EXECUTED
13d753: 5e pop %esi <== NOT EXECUTED
13d754: 5f pop %edi <== NOT EXECUTED
13d755: c9 leave <== NOT EXECUTED
13d756: c3 ret <== NOT EXECUTED
13d757: 90 nop <== NOT EXECUTED
* slots which are cleared when upping.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
if (rc > 0)
return rc;
rc = rtems_rfs_buffer_handle_request (fs, buffer, new_block, false);
13d758: 6a 00 push $0x0 <== NOT EXECUTED
13d75a: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13d75d: 52 push %edx <== NOT EXECUTED
13d75e: 56 push %esi <== NOT EXECUTED
13d75f: e8 c8 09 00 00 call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
13d764: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc > 0)
13d766: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d769: 85 c0 test %eax,%eax <== NOT EXECUTED
13d76b: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
13d76e: 7e 1c jle 13d78c <rtems_rfs_block_map_indirect_alloc+0x70><== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, new_block);
13d770: 51 push %ecx <== NOT EXECUTED
13d771: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13d774: 6a 00 push $0x0 <== NOT EXECUTED
13d776: 56 push %esi <== NOT EXECUTED
13d777: e8 78 3c 00 00 call 1413f4 <rtems_rfs_group_bitmap_free><== NOT EXECUTED
return rc;
13d77c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (buffer);
*block = new_block;
map->last_map_block = new_block;
return 0;
}
13d77f: 89 f8 mov %edi,%eax <== NOT EXECUTED
13d781: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13d784: 5b pop %ebx <== NOT EXECUTED
13d785: 5e pop %esi <== NOT EXECUTED
13d786: 5f pop %edi <== NOT EXECUTED
13d787: c9 leave <== NOT EXECUTED
13d788: c3 ret <== NOT EXECUTED
13d789: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (rc > 0)
{
rtems_rfs_group_bitmap_free (fs, false, new_block);
return rc;
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
13d78c: 8b 4e 08 mov 0x8(%esi),%ecx <== NOT EXECUTED
13d78f: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
13d792: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED
13d795: b0 ff mov $0xff,%al <== NOT EXECUTED
13d797: 89 f7 mov %esi,%edi <== NOT EXECUTED
13d799: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
if (upping)
13d79b: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) <== NOT EXECUTED
13d79f: 74 56 je 13d7f7 <rtems_rfs_block_map_indirect_alloc+0xdb><== NOT EXECUTED
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
13d7a1: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
13d7a4: 8b 78 20 mov 0x20(%eax),%edi <== NOT EXECUTED
13d7a7: 0f b6 74 0b 27 movzbl 0x27(%ebx,%ecx,1),%esi <== NOT EXECUTED
13d7ac: 89 f0 mov %esi,%eax <== NOT EXECUTED
13d7ae: 88 04 0f mov %al,(%edi,%ecx,1) <== NOT EXECUTED
13d7b1: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
13d7b4: 8b 78 20 mov 0x20(%eax),%edi <== NOT EXECUTED
13d7b7: 0f b7 74 0b 26 movzwl 0x26(%ebx,%ecx,1),%esi <== NOT EXECUTED
13d7bc: 89 f0 mov %esi,%eax <== NOT EXECUTED
13d7be: 88 44 0f 01 mov %al,0x1(%edi,%ecx,1) <== NOT EXECUTED
13d7c2: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
13d7c5: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED
13d7c8: 8b 44 0b 24 mov 0x24(%ebx,%ecx,1),%eax <== NOT EXECUTED
13d7cc: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
13d7cf: 88 44 0e 02 mov %al,0x2(%esi,%ecx,1) <== NOT EXECUTED
13d7d3: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
13d7d6: 8b 78 20 mov 0x20(%eax),%edi <== NOT EXECUTED
13d7d9: 8b 74 0b 24 mov 0x24(%ebx,%ecx,1),%esi <== NOT EXECUTED
13d7dd: 89 f0 mov %esi,%eax <== NOT EXECUTED
13d7df: 88 44 0f 03 mov %al,0x3(%edi,%ecx,1) <== NOT EXECUTED
13d7e3: c6 02 01 movb $0x1,(%edx) <== NOT EXECUTED
13d7e6: 83 c1 04 add $0x4,%ecx <== NOT EXECUTED
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
13d7e9: 83 f9 14 cmp $0x14,%ecx <== NOT EXECUTED
13d7ec: 75 b3 jne 13d7a1 <rtems_rfs_block_map_indirect_alloc+0x85><== NOT EXECUTED
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
13d7ee: 8d 73 24 lea 0x24(%ebx),%esi <== NOT EXECUTED
13d7f1: 31 c0 xor %eax,%eax <== NOT EXECUTED
13d7f3: 89 f7 mov %esi,%edi <== NOT EXECUTED
13d7f5: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (buffer);
13d7f7: c6 02 01 movb $0x1,(%edx) <== NOT EXECUTED
*block = new_block;
13d7fa: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13d7fd: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13d800: 89 02 mov %eax,(%edx) <== NOT EXECUTED
map->last_map_block = new_block;
13d802: 89 43 1c mov %eax,0x1c(%ebx) <== NOT EXECUTED
13d805: 31 ff xor %edi,%edi <== NOT EXECUTED
return 0;
13d807: e9 41 ff ff ff jmp 13d74d <rtems_rfs_block_map_indirect_alloc+0x31><== NOT EXECUTED
0013d3bc <rtems_rfs_block_map_indirect_shrink>:
rtems_rfs_block_map_indirect_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no indirect,
rtems_rfs_block_no index)
{
13d3bc: 55 push %ebp <== NOT EXECUTED
13d3bd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13d3bf: 57 push %edi <== NOT EXECUTED
13d3c0: 56 push %esi <== NOT EXECUTED
13d3c1: 53 push %ebx <== NOT EXECUTED
13d3c2: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
13d3c5: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
13d3c8: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
* block to be freed and the indirect block is now also free, or we have only
* one indirect table and we can fit the remaining blocks into the inode,
* then either move to the next indirect block or move the remaining blocks
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
13d3cb: 85 db test %ebx,%ebx <== NOT EXECUTED
13d3cd: 74 15 je 13d3e4 <rtems_rfs_block_map_indirect_shrink+0x28><== NOT EXECUTED
13d3cf: 85 f6 test %esi,%esi <== NOT EXECUTED
13d3d1: 75 05 jne 13d3d8 <rtems_rfs_block_map_indirect_shrink+0x1c><== NOT EXECUTED
13d3d3: 83 fb 05 cmp $0x5,%ebx <== NOT EXECUTED
13d3d6: 74 48 je 13d420 <rtems_rfs_block_map_indirect_shrink+0x64><== NOT EXECUTED
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->last_map_block = block_to_free;
13d3d8: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
return rc;
}
13d3da: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13d3dd: 5b pop %ebx <== NOT EXECUTED
13d3de: 5e pop %esi <== NOT EXECUTED
13d3df: 5f pop %edi <== NOT EXECUTED
13d3e0: c9 leave <== NOT EXECUTED
13d3e1: c3 ret <== NOT EXECUTED
13d3e2: 66 90 xchg %ax,%ax <== NOT EXECUTED
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
13d3e4: 83 c6 08 add $0x8,%esi <== NOT EXECUTED
13d3e7: 8b 4c b2 04 mov 0x4(%edx,%esi,4),%ecx <== NOT EXECUTED
13d3eb: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
else
{
/*
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
13d3ee: c7 44 b2 04 00 00 00 movl $0x0,0x4(%edx,%esi,4) <== NOT EXECUTED
13d3f5: 00
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
13d3f6: 51 push %ecx <== NOT EXECUTED
13d3f7: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13d3fa: 6a 00 push $0x0 <== NOT EXECUTED
13d3fc: 50 push %eax <== NOT EXECUTED
13d3fd: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
13d400: e8 ef 3f 00 00 call 1413f4 <rtems_rfs_group_bitmap_free><== NOT EXECUTED
if (rc > 0)
13d405: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d408: 85 c0 test %eax,%eax <== NOT EXECUTED
13d40a: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
13d40d: 7f cb jg 13d3da <rtems_rfs_block_map_indirect_shrink+0x1e><== NOT EXECUTED
return rc;
map->last_map_block = block_to_free;
13d40f: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED
13d412: 89 5a 1c mov %ebx,0x1c(%edx) <== NOT EXECUTED
}
return rc;
}
13d415: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13d418: 5b pop %ebx <== NOT EXECUTED
13d419: 5e pop %esi <== NOT EXECUTED
13d41a: 5f pop %edi <== NOT EXECUTED
13d41b: c9 leave <== NOT EXECUTED
13d41c: c3 ret <== NOT EXECUTED
13d41d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
13d420: 8b 5a 24 mov 0x24(%edx),%ebx <== NOT EXECUTED
13d423: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
map->blocks[b] = rtems_rfs_block_get_number (buffer, b);
13d426: 8b 49 08 mov 0x8(%ecx),%ecx <== NOT EXECUTED
13d429: 8b 71 20 mov 0x20(%ecx),%esi <== NOT EXECUTED
13d42c: 31 db xor %ebx,%ebx <== NOT EXECUTED
13d42e: 66 90 xchg %ax,%ax <== NOT EXECUTED
13d430: 0f b6 0c 9e movzbl (%esi,%ebx,4),%ecx <== NOT EXECUTED
13d434: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
13d437: 0f b6 7c 9e 01 movzbl 0x1(%esi,%ebx,4),%edi <== NOT EXECUTED
13d43c: c1 e7 10 shl $0x10,%edi <== NOT EXECUTED
13d43f: 09 f9 or %edi,%ecx <== NOT EXECUTED
13d441: 0f b6 7c 9e 03 movzbl 0x3(%esi,%ebx,4),%edi <== NOT EXECUTED
13d446: 09 f9 or %edi,%ecx <== NOT EXECUTED
13d448: 0f b6 7c 9e 02 movzbl 0x2(%esi,%ebx,4),%edi <== NOT EXECUTED
13d44d: c1 e7 08 shl $0x8,%edi <== NOT EXECUTED
13d450: 09 f9 or %edi,%ecx <== NOT EXECUTED
13d452: 89 4c 9a 24 mov %ecx,0x24(%edx,%ebx,4) <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
13d456: 43 inc %ebx <== NOT EXECUTED
13d457: 83 fb 05 cmp $0x5,%ebx <== NOT EXECUTED
13d45a: 75 d4 jne 13d430 <rtems_rfs_block_map_indirect_shrink+0x74><== NOT EXECUTED
13d45c: eb 98 jmp 13d3f6 <rtems_rfs_block_map_indirect_shrink+0x3a><== NOT EXECUTED
0013d328 <rtems_rfs_block_map_next_block>:
int
rtems_rfs_block_map_next_block (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_no* block)
{
13d328: 55 push %ebp <== NOT EXECUTED
13d329: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13d32b: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED
13d32e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
13d331: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
13d334: 42 inc %edx <== NOT EXECUTED
13d335: 89 55 ec mov %edx,-0x14(%ebp) <== NOT EXECUTED
bpos.boff = 0;
13d338: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) <== NOT EXECUTED
bpos.block = 0;
13d33f: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED
return rtems_rfs_block_map_find (fs, map, &bpos, block);
13d346: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13d349: 8d 55 ec lea -0x14(%ebp),%edx <== NOT EXECUTED
13d34c: 52 push %edx <== NOT EXECUTED
13d34d: 50 push %eax <== NOT EXECUTED
13d34e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13d351: e8 c2 fe ff ff call 13d218 <rtems_rfs_block_map_find><== NOT EXECUTED
}
13d356: c9 leave <== NOT EXECUTED
13d357: c3 ret <== NOT EXECUTED
0013dcdc <rtems_rfs_block_map_open>:
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* inode,
rtems_rfs_block_map* map)
{
13dcdc: 55 push %ebp <== NOT EXECUTED
13dcdd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13dcdf: 57 push %edi <== NOT EXECUTED
13dce0: 56 push %esi <== NOT EXECUTED
13dce1: 53 push %ebx <== NOT EXECUTED
13dce2: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED
13dce5: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13dce8: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
13dceb: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
13dcee: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
13dcf1: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED
* Set the count to 0 so at least find fails, then open the handle and make
* sure the inode has been loaded into memory. If we did not load the inode
* do not unload it. The caller may assume it is still loaded when we return.
*/
map->dirty = false;
13dcf4: c6 03 00 movb $0x0,(%ebx) <== NOT EXECUTED
map->inode = NULL;
13dcf7: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) <== NOT EXECUTED
* @param size A pointer to the block size.
*/
static inline void
rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size)
{
size->count = 0;
13dcfe: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED
size->offset = 0;
13dd05: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) <== NOT EXECUTED
* @param bpos A pointer to the block position.
*/
static inline void
rtems_rfs_block_set_bpos_zero (rtems_rfs_block_pos* bpos)
{
bpos->bno = 0;
13dd0c: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
bpos->boff = 0;
13dd13: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) <== NOT EXECUTED
bpos->block = 0;
13dd1a: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
13dd21: c6 43 38 00 movb $0x0,0x38(%ebx) <== NOT EXECUTED
handle->bnum = 0;
13dd25: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
13dd2c: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
13dd33: c6 43 44 00 movb $0x0,0x44(%ebx) <== NOT EXECUTED
handle->bnum = 0;
13dd37: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
13dd3e: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) <== NOT EXECUTED
return rc;
rc = rtems_rfs_buffer_handle_open (fs, &map->doubly_buffer);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_load (fs, inode);
13dd45: 50 push %eax <== NOT EXECUTED
13dd46: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13dd49: e8 56 3d 00 00 call 141aa4 <rtems_rfs_inode_load> <== NOT EXECUTED
13dd4e: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
13dd50: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13dd53: 85 c0 test %eax,%eax <== NOT EXECUTED
13dd55: 0f 8f dd 00 00 00 jg 13de38 <rtems_rfs_block_map_open+0x15c><== NOT EXECUTED
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
13dd5b: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13dd5e: 89 43 04 mov %eax,0x4(%ebx) <== NOT EXECUTED
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
13dd61: 8b 78 0c mov 0xc(%eax),%edi <== NOT EXECUTED
13dd64: 8d 4f 1c lea 0x1c(%edi),%ecx <== NOT EXECUTED
13dd67: 31 d2 xor %edx,%edx <== NOT EXECUTED
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
13dd69: 0f b6 04 91 movzbl (%ecx,%edx,4),%eax <== NOT EXECUTED
13dd6d: c1 e0 18 shl $0x18,%eax <== NOT EXECUTED
13dd70: 0f b6 74 91 01 movzbl 0x1(%ecx,%edx,4),%esi <== NOT EXECUTED
13dd75: c1 e6 10 shl $0x10,%esi <== NOT EXECUTED
13dd78: 09 f0 or %esi,%eax <== NOT EXECUTED
13dd7a: 0f b6 74 91 03 movzbl 0x3(%ecx,%edx,4),%esi <== NOT EXECUTED
13dd7f: 09 f0 or %esi,%eax <== NOT EXECUTED
13dd81: 0f b6 74 91 02 movzbl 0x2(%ecx,%edx,4),%esi <== NOT EXECUTED
13dd86: c1 e6 08 shl $0x8,%esi <== NOT EXECUTED
13dd89: 09 f0 or %esi,%eax <== NOT EXECUTED
13dd8b: 89 44 93 24 mov %eax,0x24(%ebx,%edx,4) <== NOT EXECUTED
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
13dd8f: 42 inc %edx <== NOT EXECUTED
13dd90: 83 fa 05 cmp $0x5,%edx <== NOT EXECUTED
13dd93: 75 d4 jne 13dd69 <rtems_rfs_block_map_open+0x8d><== NOT EXECUTED
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
13dd95: 8d 57 0c lea 0xc(%edi),%edx <== NOT EXECUTED
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
map->size.count = rtems_rfs_inode_get_block_count (inode);
13dd98: 0f b6 42 03 movzbl 0x3(%edx),%eax <== NOT EXECUTED
13dd9c: 0f b6 4f 0c movzbl 0xc(%edi),%ecx <== NOT EXECUTED
13dda0: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
13dda3: 09 c8 or %ecx,%eax <== NOT EXECUTED
13dda5: 0f b6 4a 01 movzbl 0x1(%edx),%ecx <== NOT EXECUTED
13dda9: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13ddac: 09 c8 or %ecx,%eax <== NOT EXECUTED
13ddae: 0f b6 52 02 movzbl 0x2(%edx),%edx <== NOT EXECUTED
13ddb2: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
13ddb5: 09 d0 or %edx,%eax <== NOT EXECUTED
13ddb7: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
13ddba: 0f b6 57 0a movzbl 0xa(%edi),%edx <== NOT EXECUTED
13ddbe: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
13ddc1: 0f b6 47 0b movzbl 0xb(%edi),%eax <== NOT EXECUTED
13ddc5: 09 d0 or %edx,%eax <== NOT EXECUTED
13ddc7: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED
13ddca: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
* @return uint32_t The last map block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_map_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_map_block);
13ddcd: 8d 57 30 lea 0x30(%edi),%edx <== NOT EXECUTED
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
13ddd0: 0f b6 42 03 movzbl 0x3(%edx),%eax <== NOT EXECUTED
13ddd4: 0f b6 4f 30 movzbl 0x30(%edi),%ecx <== NOT EXECUTED
13ddd8: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
13dddb: 09 c8 or %ecx,%eax <== NOT EXECUTED
13dddd: 0f b6 4a 01 movzbl 0x1(%edx),%ecx <== NOT EXECUTED
13dde1: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13dde4: 09 c8 or %ecx,%eax <== NOT EXECUTED
13dde6: 0f b6 52 02 movzbl 0x2(%edx),%edx <== NOT EXECUTED
13ddea: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
13dded: 09 d0 or %edx,%eax <== NOT EXECUTED
13ddef: 89 43 1c mov %eax,0x1c(%ebx) <== NOT EXECUTED
* @return uint32_t The last data block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_data_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_data_block);
13ddf2: 8d 57 34 lea 0x34(%edi),%edx <== NOT EXECUTED
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
13ddf5: 0f b6 42 03 movzbl 0x3(%edx),%eax <== NOT EXECUTED
13ddf9: 0f b6 4f 34 movzbl 0x34(%edi),%ecx <== NOT EXECUTED
13ddfd: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
13de00: 09 c8 or %ecx,%eax <== NOT EXECUTED
13de02: 0f b6 4a 01 movzbl 0x1(%edx),%ecx <== NOT EXECUTED
13de06: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13de09: 09 c8 or %ecx,%eax <== NOT EXECUTED
13de0b: 0f b6 52 02 movzbl 0x2(%edx),%edx <== NOT EXECUTED
13de0f: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
13de12: 09 d0 or %edx,%eax <== NOT EXECUTED
13de14: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, inode, false);
13de17: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) <== NOT EXECUTED
13de1e: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13de21: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
13de24: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13de27: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
return rc;
}
13de2a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13de2d: 5b pop %ebx <== NOT EXECUTED
13de2e: 5e pop %esi <== NOT EXECUTED
13de2f: 5f pop %edi <== NOT EXECUTED
13de30: c9 leave <== NOT EXECUTED
map->size.count = rtems_rfs_inode_get_block_count (inode);
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
rc = rtems_rfs_inode_unload (fs, inode, false);
13de31: e9 a2 3b 00 00 jmp 1419d8 <rtems_rfs_inode_unload><== NOT EXECUTED
13de36: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
13de38: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13de3b: 8d 43 38 lea 0x38(%ebx),%eax <== NOT EXECUTED
13de3e: 50 push %eax <== NOT EXECUTED
13de3f: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13de42: e8 e1 01 00 00 call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
13de47: c6 43 38 00 movb $0x0,0x38(%ebx) <== NOT EXECUTED
handle->bnum = 0;
13de4b: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
13de52: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
13de59: 5f pop %edi <== NOT EXECUTED
13de5a: 58 pop %eax <== NOT EXECUTED
13de5b: 8d 43 44 lea 0x44(%ebx),%eax <== NOT EXECUTED
13de5e: 50 push %eax <== NOT EXECUTED
13de5f: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13de62: e8 c1 01 00 00 call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
13de67: c6 43 44 00 movb $0x0,0x44(%ebx) <== NOT EXECUTED
handle->bnum = 0;
13de6b: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
13de72: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) <== NOT EXECUTED
rc = rtems_rfs_inode_load (fs, inode);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &map->singly_buffer);
rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
return rc;
13de79: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
rc = rtems_rfs_inode_unload (fs, inode, false);
return rc;
}
13de7c: 89 f0 mov %esi,%eax <== NOT EXECUTED
13de7e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13de81: 5b pop %ebx <== NOT EXECUTED
13de82: 5e pop %esi <== NOT EXECUTED
13de83: 5f pop %edi <== NOT EXECUTED
13de84: c9 leave <== NOT EXECUTED
13de85: c3 ret <== NOT EXECUTED
0013d358 <rtems_rfs_block_map_seek>:
int
rtems_rfs_block_map_seek (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_pos_rel offset,
rtems_rfs_block_no* block)
{
13d358: 55 push %ebp <== NOT EXECUTED
13d359: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13d35b: 57 push %edi <== NOT EXECUTED
13d35c: 56 push %esi <== NOT EXECUTED
13d35d: 53 push %ebx <== NOT EXECUTED
13d35e: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
13d361: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
13d364: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
13d367: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
13d36a: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
rtems_rfs_block_pos bpos;
rtems_rfs_block_copy_bpos (&bpos, &map->bpos);
13d36d: 8b 4b 10 mov 0x10(%ebx),%ecx <== NOT EXECUTED
13d370: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED
13d373: 8b 7b 14 mov 0x14(%ebx),%edi <== NOT EXECUTED
13d376: 89 7d e0 mov %edi,-0x20(%ebp) <== NOT EXECUTED
13d379: 8b 7b 18 mov 0x18(%ebx),%edi <== NOT EXECUTED
13d37c: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED
static inline void
rtems_rfs_block_add_pos (rtems_rfs_file_system* fs,
rtems_rfs_pos_rel offset,
rtems_rfs_block_pos* bpos)
{
rtems_rfs_block_get_bpos (fs,
13d37f: 8d 7d dc lea -0x24(%ebp),%edi <== NOT EXECUTED
13d382: 57 push %edi <== NOT EXECUTED
13d383: 0f af 4e 08 imul 0x8(%esi),%ecx <== NOT EXECUTED
13d387: 03 4b 14 add 0x14(%ebx),%ecx <== NOT EXECUTED
13d38a: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED
13d38d: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
13d394: 03 45 d0 add -0x30(%ebp),%eax <== NOT EXECUTED
13d397: 13 55 d4 adc -0x2c(%ebp),%edx <== NOT EXECUTED
13d39a: 52 push %edx <== NOT EXECUTED
13d39b: 50 push %eax <== NOT EXECUTED
13d39c: 56 push %esi <== NOT EXECUTED
13d39d: e8 f6 fc ff ff call 13d098 <rtems_rfs_block_get_bpos><== NOT EXECUTED
rtems_rfs_block_get_pos (fs, bpos) + offset,
bpos);
bpos->block = 0;
13d3a2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
rtems_rfs_block_add_pos (fs, offset, &bpos);
return rtems_rfs_block_map_find (fs, map, &bpos, block);
13d3a9: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED
13d3ac: 57 push %edi <== NOT EXECUTED
13d3ad: 53 push %ebx <== NOT EXECUTED
13d3ae: 56 push %esi <== NOT EXECUTED
13d3af: e8 64 fe ff ff call 13d218 <rtems_rfs_block_map_find><== NOT EXECUTED
}
13d3b4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13d3b7: 5b pop %ebx <== NOT EXECUTED
13d3b8: 5e pop %esi <== NOT EXECUTED
13d3b9: 5f pop %edi <== NOT EXECUTED
13d3ba: c9 leave <== NOT EXECUTED
13d3bb: c3 ret <== NOT EXECUTED
0013d460 <rtems_rfs_block_map_shrink>:
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
13d460: 55 push %ebp <== NOT EXECUTED
13d461: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13d463: 57 push %edi <== NOT EXECUTED
13d464: 56 push %esi <== NOT EXECUTED
13d465: 53 push %ebx <== NOT EXECUTED
13d466: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
13d469: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if (map->size.count == 0)
13d46c: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
13d46f: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
13d472: 89 c7 mov %eax,%edi <== NOT EXECUTED
13d474: 85 c0 test %eax,%eax <== NOT EXECUTED
13d476: 0f 84 b8 01 00 00 je 13d634 <rtems_rfs_block_map_shrink+0x1d4><== NOT EXECUTED
return 0;
if (blocks > map->size.count)
13d47c: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
13d47f: 39 d0 cmp %edx,%eax <== NOT EXECUTED
13d481: 0f 82 b9 01 00 00 jb 13d640 <rtems_rfs_block_map_shrink+0x1e0><== NOT EXECUTED
blocks = map->size.count;
while (blocks)
13d487: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
13d48a: 85 d2 test %edx,%edx <== NOT EXECUTED
13d48c: 0f 84 83 01 00 00 je 13d615 <rtems_rfs_block_map_shrink+0x1b5><== NOT EXECUTED
{
/*
* Request the indirect block and then obtain the block number from the
* indirect block.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
13d492: 8d 4b 38 lea 0x38(%ebx),%ecx <== NOT EXECUTED
13d495: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
13d498: 8d 43 44 lea 0x44(%ebx),%eax <== NOT EXECUTED
13d49b: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
13d49e: eb 48 jmp 13d4e8 <rtems_rfs_block_map_shrink+0x88><== NOT EXECUTED
{
/*
* We have less than RTEMS_RFS_INODE_BLOCKS so they are held in the
* inode.
*/
block_to_free = map->blocks[block];
13d4a0: 83 c7 07 add $0x7,%edi <== NOT EXECUTED
13d4a3: 8b 74 bb 04 mov 0x4(%ebx,%edi,4),%esi <== NOT EXECUTED
map->blocks[block] = 0;
13d4a7: c7 44 bb 04 00 00 00 movl $0x0,0x4(%ebx,%edi,4) <== NOT EXECUTED
13d4ae: 00
{
rc = EIO;
break;
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
13d4af: 57 push %edi <== NOT EXECUTED
13d4b0: 56 push %esi <== NOT EXECUTED
13d4b1: 6a 00 push $0x0 <== NOT EXECUTED
13d4b3: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13d4b6: e8 39 3f 00 00 call 1413f4 <rtems_rfs_group_bitmap_free><== NOT EXECUTED
if (rc > 0)
13d4bb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d4be: 85 c0 test %eax,%eax <== NOT EXECUTED
13d4c0: 0f 8f 70 01 00 00 jg 13d636 <rtems_rfs_block_map_shrink+0x1d6><== NOT EXECUTED
return rc;
map->size.count--;
13d4c6: 8b 4b 08 mov 0x8(%ebx),%ecx <== NOT EXECUTED
13d4c9: 89 cf mov %ecx,%edi <== NOT EXECUTED
13d4cb: 4f dec %edi <== NOT EXECUTED
13d4cc: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED
13d4cf: 89 7b 08 mov %edi,0x8(%ebx) <== NOT EXECUTED
map->size.offset = 0;
13d4d2: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) <== NOT EXECUTED
map->last_data_block = block_to_free;
13d4d9: 89 73 20 mov %esi,0x20(%ebx) <== NOT EXECUTED
map->dirty = true;
13d4dc: c6 03 01 movb $0x1,(%ebx) <== NOT EXECUTED
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
13d4df: ff 4d 10 decl 0x10(%ebp) <== NOT EXECUTED
13d4e2: 0f 84 18 01 00 00 je 13d600 <rtems_rfs_block_map_shrink+0x1a0><== NOT EXECUTED
{
rtems_rfs_block_no block;
rtems_rfs_block_no block_to_free;
int rc;
block = map->size.count - 1;
13d4e8: 8d 4f ff lea -0x1(%edi),%ecx <== NOT EXECUTED
if (block < RTEMS_RFS_INODE_BLOCKS)
13d4eb: 83 f9 04 cmp $0x4,%ecx <== NOT EXECUTED
13d4ee: 76 b0 jbe 13d4a0 <rtems_rfs_block_map_shrink+0x40><== NOT EXECUTED
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
13d4f0: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13d4f3: 8b 72 30 mov 0x30(%edx),%esi <== NOT EXECUTED
13d4f6: 89 c8 mov %ecx,%eax <== NOT EXECUTED
13d4f8: 31 d2 xor %edx,%edx <== NOT EXECUTED
13d4fa: f7 f6 div %esi <== NOT EXECUTED
13d4fc: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
13d4ff: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
singly = block / fs->blocks_per_block;
if (block < fs->block_map_singly_blocks)
13d502: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13d505: 3b 48 34 cmp 0x34(%eax),%ecx <== NOT EXECUTED
13d508: 0f 82 3a 01 00 00 jb 13d648 <rtems_rfs_block_map_shrink+0x1e8><== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
singly, direct);
if (rc)
return rc;
}
else if (block < fs->block_map_doubly_blocks)
13d50e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13d511: 3b 48 38 cmp 0x38(%eax),%ecx <== NOT EXECUTED
13d514: 0f 83 e6 00 00 00 jae 13d600 <rtems_rfs_block_map_shrink+0x1a0><== NOT EXECUTED
* value is still valid for doubly indirect tables.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
13d51a: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13d51d: 31 d2 xor %edx,%edx <== NOT EXECUTED
13d51f: f7 f6 div %esi <== NOT EXECUTED
13d521: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
13d524: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
13d527: 6a 01 push $0x1 <== NOT EXECUTED
13d529: ff 74 83 24 pushl 0x24(%ebx,%eax,4) <== NOT EXECUTED
13d52d: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
13d530: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13d533: e8 f4 0b 00 00 call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
13d538: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d53b: 85 c0 test %eax,%eax <== NOT EXECUTED
13d53d: 0f 8f f3 00 00 00 jg 13d636 <rtems_rfs_block_map_shrink+0x1d6><== NOT EXECUTED
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
13d543: 8b 43 4c mov 0x4c(%ebx),%eax <== NOT EXECUTED
13d546: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
13d549: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
13d54c: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED
13d54f: 0f b6 7c 10 03 movzbl 0x3(%eax,%edx,1),%edi <== NOT EXECUTED
13d554: 0f b6 0c 10 movzbl (%eax,%edx,1),%ecx <== NOT EXECUTED
13d558: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
13d55b: 09 cf or %ecx,%edi <== NOT EXECUTED
13d55d: 0f b6 54 10 01 movzbl 0x1(%eax,%edx,1),%edx <== NOT EXECUTED
13d562: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
13d565: 09 d7 or %edx,%edi <== NOT EXECUTED
13d567: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
13d56a: 0f b6 44 88 02 movzbl 0x2(%eax,%ecx,4),%eax <== NOT EXECUTED
13d56f: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
13d572: 09 c7 or %eax,%edi <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
13d574: 6a 01 push $0x1 <== NOT EXECUTED
13d576: 57 push %edi <== NOT EXECUTED
13d577: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
13d57a: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13d57d: e8 aa 0b 00 00 call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
singly, true);
if (rc > 0)
13d582: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d585: 85 c0 test %eax,%eax <== NOT EXECUTED
13d587: 0f 8f a9 00 00 00 jg 13d636 <rtems_rfs_block_map_shrink+0x1d6><== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
13d58d: 8b 43 40 mov 0x40(%ebx),%eax <== NOT EXECUTED
13d590: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
13d593: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED
13d596: c1 e1 02 shl $0x2,%ecx <== NOT EXECUTED
13d599: 0f b6 74 08 03 movzbl 0x3(%eax,%ecx,1),%esi <== NOT EXECUTED
13d59e: 0f b6 14 08 movzbl (%eax,%ecx,1),%edx <== NOT EXECUTED
13d5a2: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
13d5a5: 09 d6 or %edx,%esi <== NOT EXECUTED
13d5a7: 0f b6 54 08 01 movzbl 0x1(%eax,%ecx,1),%edx <== NOT EXECUTED
13d5ac: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
13d5af: 09 d6 or %edx,%esi <== NOT EXECUTED
13d5b1: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
13d5b4: 0f b6 44 90 02 movzbl 0x2(%eax,%edx,4),%eax <== NOT EXECUTED
13d5b9: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
13d5bc: 09 c6 or %eax,%esi <== NOT EXECUTED
direct);
if (direct == 0)
13d5be: 85 d2 test %edx,%edx <== NOT EXECUTED
13d5c0: 0f 85 e9 fe ff ff jne 13d4af <rtems_rfs_block_map_shrink+0x4f><== NOT EXECUTED
{
rc = rtems_rfs_group_bitmap_free (fs, false, singly);
13d5c6: 50 push %eax <== NOT EXECUTED
13d5c7: 57 push %edi <== NOT EXECUTED
13d5c8: 6a 00 push $0x0 <== NOT EXECUTED
13d5ca: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13d5cd: e8 22 3e 00 00 call 1413f4 <rtems_rfs_group_bitmap_free><== NOT EXECUTED
if (rc > 0)
13d5d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d5d5: 85 c0 test %eax,%eax <== NOT EXECUTED
13d5d7: 7f 5d jg 13d636 <rtems_rfs_block_map_shrink+0x1d6><== NOT EXECUTED
return rc;
map->last_map_block = singly;
13d5d9: 89 7b 1c mov %edi,0x1c(%ebx) <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->doubly_buffer,
13d5dc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13d5df: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13d5e2: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13d5e5: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
13d5e8: 89 da mov %ebx,%edx <== NOT EXECUTED
13d5ea: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13d5ed: e8 ca fd ff ff call 13d3bc <rtems_rfs_block_map_indirect_shrink><== NOT EXECUTED
doubly, doubly_singly);
if (rc)
13d5f2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d5f5: 85 c0 test %eax,%eax <== NOT EXECUTED
13d5f7: 0f 84 b2 fe ff ff je 13d4af <rtems_rfs_block_map_shrink+0x4f><== NOT EXECUTED
13d5fd: eb 37 jmp 13d636 <rtems_rfs_block_map_shrink+0x1d6><== NOT EXECUTED
13d5ff: 90 nop <== NOT EXECUTED
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
}
if (map->size.count == 0)
13d600: 85 ff test %edi,%edi <== NOT EXECUTED
13d602: 75 11 jne 13d615 <rtems_rfs_block_map_shrink+0x1b5><== NOT EXECUTED
{
map->last_map_block = 0;
13d604: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) <== NOT EXECUTED
map->last_data_block = 0;
13d60b: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
13d612: 8b 7d e4 mov -0x1c(%ebp),%edi <== NOT EXECUTED
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
13d615: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
13d618: 85 c0 test %eax,%eax <== NOT EXECUTED
13d61a: 0f 85 a8 00 00 00 jne 13d6c8 <rtems_rfs_block_map_shrink+0x268><== NOT EXECUTED
13d620: 39 c7 cmp %eax,%edi <== NOT EXECUTED
13d622: 0f 86 a8 00 00 00 jbe 13d6d0 <rtems_rfs_block_map_shrink+0x270><== NOT EXECUTED
13d628: 8d 57 ff lea -0x1(%edi),%edx <== NOT EXECUTED
13d62b: 39 d0 cmp %edx,%eax <== NOT EXECUTED
13d62d: 0f 84 c3 00 00 00 je 13d6f6 <rtems_rfs_block_map_shrink+0x296><== NOT EXECUTED
13d633: 90 nop <== NOT EXECUTED
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
13d634: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
}
13d636: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13d639: 5b pop %ebx <== NOT EXECUTED
13d63a: 5e pop %esi <== NOT EXECUTED
13d63b: 5f pop %edi <== NOT EXECUTED
13d63c: c9 leave <== NOT EXECUTED
13d63d: c3 ret <== NOT EXECUTED
13d63e: 66 90 xchg %ax,%ax <== NOT EXECUTED
blocks, map->size.count);
if (map->size.count == 0)
return 0;
if (blocks > map->size.count)
13d640: 89 45 10 mov %eax,0x10(%ebp) <== NOT EXECUTED
13d643: e9 4a fe ff ff jmp 13d492 <rtems_rfs_block_map_shrink+0x32><== NOT EXECUTED
{
/*
* Request the indirect block and then obtain the block number from the
* indirect block.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
13d648: 6a 01 push $0x1 <== NOT EXECUTED
13d64a: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
13d64d: ff 74 93 24 pushl 0x24(%ebx,%edx,4) <== NOT EXECUTED
13d651: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
13d654: 50 push %eax <== NOT EXECUTED
13d655: e8 d2 0a 00 00 call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
map->blocks[singly], true);
if (rc > 0)
13d65a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d65d: 85 c0 test %eax,%eax <== NOT EXECUTED
13d65f: 7f d5 jg 13d636 <rtems_rfs_block_map_shrink+0x1d6><== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
13d661: 8b 43 40 mov 0x40(%ebx),%eax <== NOT EXECUTED
13d664: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
13d667: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
13d66a: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED
13d66d: 0f b6 3c 10 movzbl (%eax,%edx,1),%edi <== NOT EXECUTED
13d671: 8a 4c 10 01 mov 0x1(%eax,%edx,1),%cl <== NOT EXECUTED
13d675: 88 4d d3 mov %cl,-0x2d(%ebp) <== NOT EXECUTED
13d678: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED
13d67b: 8a 4c 88 02 mov 0x2(%eax,%ecx,4),%cl <== NOT EXECUTED
13d67f: 88 4d e4 mov %cl,-0x1c(%ebp) <== NOT EXECUTED
13d682: 0f b6 74 10 03 movzbl 0x3(%eax,%edx,1),%esi <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
13d687: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13d68a: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
13d68d: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
13d690: 8b 4d d8 mov -0x28(%ebp),%ecx <== NOT EXECUTED
13d693: 89 da mov %ebx,%edx <== NOT EXECUTED
13d695: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13d698: e8 1f fd ff ff call 13d3bc <rtems_rfs_block_map_indirect_shrink><== NOT EXECUTED
singly, direct);
if (rc)
13d69d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13d6a0: 85 c0 test %eax,%eax <== NOT EXECUTED
13d6a2: 75 92 jne 13d636 <rtems_rfs_block_map_shrink+0x1d6><== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
map->blocks[singly], true);
if (rc > 0)
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
13d6a4: 81 e6 ff 00 00 00 and $0xff,%esi <== NOT EXECUTED
13d6aa: c1 e7 18 shl $0x18,%edi <== NOT EXECUTED
13d6ad: 09 fe or %edi,%esi <== NOT EXECUTED
13d6af: 0f b6 45 d3 movzbl -0x2d(%ebp),%eax <== NOT EXECUTED
13d6b3: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
13d6b6: 09 c6 or %eax,%esi <== NOT EXECUTED
13d6b8: 0f b6 45 e4 movzbl -0x1c(%ebp),%eax <== NOT EXECUTED
13d6bc: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
13d6bf: 09 c6 or %eax,%esi <== NOT EXECUTED
13d6c1: e9 e9 fd ff ff jmp 13d4af <rtems_rfs_block_map_shrink+0x4f><== NOT EXECUTED
13d6c6: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
13d6c8: 85 ff test %edi,%edi <== NOT EXECUTED
13d6ca: 0f 85 50 ff ff ff jne 13d620 <rtems_rfs_block_map_shrink+0x1c0><== NOT EXECUTED
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
13d6d0: 89 7b 10 mov %edi,0x10(%ebx) <== NOT EXECUTED
13d6d3: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
13d6d6: 89 43 14 mov %eax,0x14(%ebx) <== NOT EXECUTED
13d6d9: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) <== NOT EXECUTED
13d6e0: 85 c0 test %eax,%eax <== NOT EXECUTED
13d6e2: 0f 84 4c ff ff ff je 13d634 <rtems_rfs_block_map_shrink+0x1d4><== NOT EXECUTED
13d6e8: 4f dec %edi <== NOT EXECUTED
13d6e9: 89 7b 10 mov %edi,0x10(%ebx) <== NOT EXECUTED
13d6ec: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
}
13d6ee: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13d6f1: 5b pop %ebx <== NOT EXECUTED
13d6f2: 5e pop %esi <== NOT EXECUTED
13d6f3: 5f pop %edi <== NOT EXECUTED
13d6f4: c9 leave <== NOT EXECUTED
13d6f5: c3 ret <== NOT EXECUTED
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
13d6f6: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
13d6f9: 3b 43 0c cmp 0xc(%ebx),%eax <== NOT EXECUTED
13d6fc: 77 d2 ja 13d6d0 <rtems_rfs_block_map_shrink+0x270><== NOT EXECUTED
13d6fe: e9 31 ff ff ff jmp 13d634 <rtems_rfs_block_map_shrink+0x1d4><== NOT EXECUTED
00147380 <rtems_rfs_buffer_bdbuf_release>:
}
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
147380: 55 push %ebp <== NOT EXECUTED
147381: 89 e5 mov %esp,%ebp <== NOT EXECUTED
147383: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
147386: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
((intptr_t) buffer->user),
buffer->block, modified ? "(modified)" : "");
if (modified)
147389: 80 7d 0c 00 cmpb $0x0,0xc(%ebp) <== NOT EXECUTED
14738d: 74 19 je 1473a8 <rtems_rfs_buffer_bdbuf_release+0x28><== NOT EXECUTED
sc = rtems_bdbuf_release_modified (buffer);
14738f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
147392: 50 push %eax <== NOT EXECUTED
147393: e8 64 40 fc ff call 10b3fc <rtems_bdbuf_release_modified><== NOT EXECUTED
147398: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
else
sc = rtems_bdbuf_release (buffer);
if (sc != RTEMS_SUCCESSFUL)
14739b: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
14739e: 19 c0 sbb %eax,%eax <== NOT EXECUTED
1473a0: f7 d0 not %eax <== NOT EXECUTED
1473a2: 83 e0 05 and $0x5,%eax <== NOT EXECUTED
#endif
rc = EIO;
}
return rc;
}
1473a5: c9 leave <== NOT EXECUTED
1473a6: c3 ret <== NOT EXECUTED
1473a7: 90 nop <== NOT EXECUTED
buffer->block, modified ? "(modified)" : "");
if (modified)
sc = rtems_bdbuf_release_modified (buffer);
else
sc = rtems_bdbuf_release (buffer);
1473a8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1473ab: 50 push %eax <== NOT EXECUTED
1473ac: e8 c7 40 fc ff call 10b478 <rtems_bdbuf_release> <== NOT EXECUTED
1473b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
1473b4: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
1473b7: 19 c0 sbb %eax,%eax <== NOT EXECUTED
1473b9: f7 d0 not %eax <== NOT EXECUTED
1473bb: 83 e0 05 and $0x5,%eax <== NOT EXECUTED
#endif
rc = EIO;
}
return rc;
}
1473be: c9 leave <== NOT EXECUTED
1473bf: c3 ret <== NOT EXECUTED
001473c0 <rtems_rfs_buffer_bdbuf_request>:
int
rtems_rfs_buffer_bdbuf_request (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block block,
bool read,
rtems_rfs_buffer** buffer)
{
1473c0: 55 push %ebp <== NOT EXECUTED
1473c1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1473c3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1473c6: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
1473c9: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
1473cc: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
rtems_status_code sc;
int rc = 0;
if (read)
1473cf: 80 7d 10 00 cmpb $0x0,0x10(%ebp) <== NOT EXECUTED
1473d3: 74 1f je 1473f4 <rtems_rfs_buffer_bdbuf_request+0x34><== NOT EXECUTED
sc = rtems_bdbuf_read (rtems_rfs_fs_device (fs), block, buffer);
1473d5: 51 push %ecx <== NOT EXECUTED
1473d6: 52 push %edx <== NOT EXECUTED
1473d7: 8b 40 0c mov 0xc(%eax),%eax <== NOT EXECUTED
1473da: ff 70 04 pushl 0x4(%eax) <== NOT EXECUTED
1473dd: ff 30 pushl (%eax) <== NOT EXECUTED
1473df: e8 10 51 fc ff call 10c4f4 <rtems_bdbuf_read> <== NOT EXECUTED
1473e4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
else
sc = rtems_bdbuf_get (rtems_rfs_fs_device (fs), block, buffer);
if (sc != RTEMS_SUCCESSFUL)
1473e7: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
1473ea: 19 c0 sbb %eax,%eax <== NOT EXECUTED
1473ec: f7 d0 not %eax <== NOT EXECUTED
1473ee: 83 e0 05 and $0x5,%eax <== NOT EXECUTED
#endif
rc = EIO;
}
return rc;
}
1473f1: c9 leave <== NOT EXECUTED
1473f2: c3 ret <== NOT EXECUTED
1473f3: 90 nop <== NOT EXECUTED
int rc = 0;
if (read)
sc = rtems_bdbuf_read (rtems_rfs_fs_device (fs), block, buffer);
else
sc = rtems_bdbuf_get (rtems_rfs_fs_device (fs), block, buffer);
1473f4: 51 push %ecx <== NOT EXECUTED
1473f5: 52 push %edx <== NOT EXECUTED
1473f6: 8b 40 0c mov 0xc(%eax),%eax <== NOT EXECUTED
1473f9: ff 70 04 pushl 0x4(%eax) <== NOT EXECUTED
1473fc: ff 30 pushl (%eax) <== NOT EXECUTED
1473fe: e8 25 50 fc ff call 10c428 <rtems_bdbuf_get> <== NOT EXECUTED
147403: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
147406: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
147409: 19 c0 sbb %eax,%eax <== NOT EXECUTED
14740b: f7 d0 not %eax <== NOT EXECUTED
14740d: 83 e0 05 and $0x5,%eax <== NOT EXECUTED
#endif
rc = EIO;
}
return rc;
}
147410: c9 leave <== NOT EXECUTED
147411: c3 ret <== NOT EXECUTED
0013dfa4 <rtems_rfs_buffer_close>:
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
13dfa4: 55 push %ebp <== NOT EXECUTED
13dfa5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13dfa7: 56 push %esi <== NOT EXECUTED
13dfa8: 53 push %ebx <== NOT EXECUTED
13dfa9: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
/*
* Change the block size to the media device size. It will release and sync
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
13dfac: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13dfaf: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
13dfb2: ff 70 24 pushl 0x24(%eax) <== NOT EXECUTED
13dfb5: 53 push %ebx <== NOT EXECUTED
13dfb6: e8 a5 ff ff ff call 13df60 <rtems_rfs_buffer_setblksize><== NOT EXECUTED
13dfbb: 89 c6 mov %eax,%esi <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rtems_disk_release (fs->disk);
13dfbd: 58 pop %eax <== NOT EXECUTED
13dfbe: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
13dfc1: e8 9a f6 fc ff call 10d660 <rtems_disk_release> <== NOT EXECUTED
rc, strerror (rc));
}
#endif
return rc;
}
13dfc6: 89 f0 mov %esi,%eax <== NOT EXECUTED
13dfc8: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
13dfcb: 5b pop %ebx <== NOT EXECUTED
13dfcc: 5e pop %esi <== NOT EXECUTED
13dfcd: c9 leave <== NOT EXECUTED
13dfce: c3 ret <== NOT EXECUTED
0013e32c <rtems_rfs_buffer_handle_close>:
* @return int The error number (errno). No error if 0.
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
13e32c: 55 push %ebp <== NOT EXECUTED
13e32d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13e32f: 53 push %ebx <== NOT EXECUTED
13e330: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13e333: 89 d3 mov %edx,%ebx <== NOT EXECUTED
rtems_rfs_buffer_handle_release (fs, handle);
13e335: 52 push %edx <== NOT EXECUTED
13e336: 50 push %eax <== NOT EXECUTED
13e337: e8 ec fc ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
13e33c: c6 03 00 movb $0x0,(%ebx) <== NOT EXECUTED
handle->bnum = 0;
13e33f: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
13e346: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED
return 0;
}
13e34d: 31 c0 xor %eax,%eax <== NOT EXECUTED
13e34f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
13e352: c9 leave <== NOT EXECUTED
13e353: c3 ret <== NOT EXECUTED
0013e028 <rtems_rfs_buffer_handle_release>:
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
13e028: 55 push %ebp <== NOT EXECUTED
13e029: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13e02b: 57 push %edi <== NOT EXECUTED
13e02c: 56 push %esi <== NOT EXECUTED
13e02d: 53 push %ebx <== NOT EXECUTED
13e02e: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
13e031: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
13e034: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
13e037: 8b 46 08 mov 0x8(%esi),%eax <== NOT EXECUTED
13e03a: 85 c0 test %eax,%eax <== NOT EXECUTED
13e03c: 74 18 je 13e056 <rtems_rfs_buffer_handle_release+0x2e><== NOT EXECUTED
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
if (rtems_rfs_buffer_refs (handle) > 0)
13e03e: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED
13e041: 85 db test %ebx,%ebx <== NOT EXECUTED
13e043: 7e 04 jle 13e049 <rtems_rfs_buffer_handle_release+0x21><== NOT EXECUTED
rtems_rfs_buffer_refs_down (handle);
13e045: 4b dec %ebx <== NOT EXECUTED
13e046: 89 58 34 mov %ebx,0x34(%eax) <== NOT EXECUTED
if (rtems_rfs_buffer_refs (handle) == 0)
13e049: 85 db test %ebx,%ebx <== NOT EXECUTED
13e04b: 74 13 je 13e060 <rtems_rfs_buffer_handle_release+0x38><== NOT EXECUTED
13e04d: 31 c0 xor %eax,%eax <== NOT EXECUTED
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
}
}
}
handle->buffer = NULL;
13e04f: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) <== NOT EXECUTED
}
return rc;
}
13e056: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13e059: 5b pop %ebx <== NOT EXECUTED
13e05a: 5e pop %esi <== NOT EXECUTED
13e05b: 5f pop %edi <== NOT EXECUTED
13e05c: c9 leave <== NOT EXECUTED
13e05d: c3 ret <== NOT EXECUTED
13e05e: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
13e060: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13e063: 50 push %eax <== NOT EXECUTED
13e064: e8 17 5a fd ff call 113a80 <_Chain_Extract> <== NOT EXECUTED
rtems_rfs_buffer_refs_down (handle);
if (rtems_rfs_buffer_refs (handle) == 0)
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
13e069: ff 4f 4c decl 0x4c(%edi) <== NOT EXECUTED
if (rtems_rfs_fs_no_local_cache (fs))
13e06c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e06f: f6 07 02 testb $0x2,(%edi) <== NOT EXECUTED
13e072: 75 34 jne 13e0a8 <rtems_rfs_buffer_handle_release+0x80><== NOT EXECUTED
* head.
*
* This code stops a large series of transactions causing all the
* buffers in the cache being held in queues of this file system.
*/
if ((fs->release_count +
13e074: 8b 57 5c mov 0x5c(%edi),%edx <== NOT EXECUTED
13e077: 8b 47 6c mov 0x6c(%edi),%eax <== NOT EXECUTED
13e07a: 8d 0c 10 lea (%eax,%edx,1),%ecx <== NOT EXECUTED
fs->release_modified_count) >= fs->max_held_buffers)
13e07d: 3b 4f 3c cmp 0x3c(%edi),%ecx <== NOT EXECUTED
13e080: 73 62 jae 13e0e4 <rtems_rfs_buffer_handle_release+0xbc><== NOT EXECUTED
13e082: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
}
if (rtems_rfs_buffer_dirty (handle))
13e084: 80 3e 00 cmpb $0x0,(%esi) <== NOT EXECUTED
13e087: 74 3b je 13e0c4 <rtems_rfs_buffer_handle_release+0x9c><== 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 );
13e089: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13e08c: ff 76 08 pushl 0x8(%esi) <== NOT EXECUTED
13e08f: 8d 57 60 lea 0x60(%edi),%edx <== NOT EXECUTED
13e092: 52 push %edx <== NOT EXECUTED
13e093: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
13e096: e8 c1 59 fd ff call 113a5c <_Chain_Append> <== NOT EXECUTED
{
rtems_chain_append (&fs->release_modified,
rtems_rfs_buffer_link (handle));
fs->release_modified_count++;
13e09b: ff 47 6c incl 0x6c(%edi) <== NOT EXECUTED
13e09e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e0a1: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13e0a4: eb a9 jmp 13e04f <rtems_rfs_buffer_handle_release+0x27><== NOT EXECUTED
13e0a6: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
{
handle->buffer->user = (void*) 0;
13e0a8: 8b 46 08 mov 0x8(%esi),%eax <== NOT EXECUTED
13e0ab: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (handle->buffer,
13e0b2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13e0b5: 0f b6 16 movzbl (%esi),%edx <== NOT EXECUTED
13e0b8: 52 push %edx <== NOT EXECUTED
13e0b9: 50 push %eax <== NOT EXECUTED
13e0ba: e8 c1 92 00 00 call 147380 <rtems_rfs_buffer_bdbuf_release><== NOT EXECUTED
13e0bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e0c2: eb 8b jmp 13e04f <rtems_rfs_buffer_handle_release+0x27><== NOT EXECUTED
13e0c4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13e0c7: ff 76 08 pushl 0x8(%esi) <== NOT EXECUTED
13e0ca: 8d 57 50 lea 0x50(%edi),%edx <== NOT EXECUTED
13e0cd: 52 push %edx <== NOT EXECUTED
13e0ce: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
13e0d1: e8 86 59 fd ff call 113a5c <_Chain_Append> <== NOT EXECUTED
fs->release_modified_count++;
}
else
{
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
13e0d6: ff 47 5c incl 0x5c(%edi) <== NOT EXECUTED
13e0d9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e0dc: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13e0df: e9 6b ff ff ff jmp 13e04f <rtems_rfs_buffer_handle_release+0x27><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: local cache overflow:"
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
13e0e4: 39 c2 cmp %eax,%edx <== NOT EXECUTED
13e0e6: 77 30 ja 13e118 <rtems_rfs_buffer_handle_release+0xf0><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
13e0e8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13e0eb: 8d 47 60 lea 0x60(%edi),%eax <== NOT EXECUTED
13e0ee: 50 push %eax <== NOT EXECUTED
13e0ef: e8 a4 59 fd ff call 113a98 <_Chain_Get> <== NOT EXECUTED
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
13e0f4: ff 4f 6c decl 0x6c(%edi) <== NOT EXECUTED
13e0f7: bb 01 00 00 00 mov $0x1,%ebx <== NOT EXECUTED
13e0fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
modified = true;
}
buffer->user = (void*) 0;
13e0ff: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
13e106: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13e109: 53 push %ebx <== NOT EXECUTED
13e10a: 50 push %eax <== NOT EXECUTED
13e10b: e8 70 92 00 00 call 147380 <rtems_rfs_buffer_bdbuf_release><== NOT EXECUTED
13e110: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e113: e9 6c ff ff ff jmp 13e084 <rtems_rfs_buffer_handle_release+0x5c><== NOT EXECUTED
13e118: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13e11b: 8d 47 50 lea 0x50(%edi),%eax <== NOT EXECUTED
13e11e: 50 push %eax <== NOT EXECUTED
13e11f: e8 74 59 fd ff call 113a98 <_Chain_Get> <== NOT EXECUTED
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
fs->release_count--;
13e124: ff 4f 5c decl 0x5c(%edi) <== NOT EXECUTED
13e127: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e12a: eb d3 jmp 13e0ff <rtems_rfs_buffer_handle_release+0xd7><== NOT EXECUTED
0013e12c <rtems_rfs_buffer_handle_request>:
int
rtems_rfs_buffer_handle_request (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle,
rtems_rfs_buffer_block block,
bool read)
{
13e12c: 55 push %ebp <== NOT EXECUTED
13e12d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13e12f: 57 push %edi <== NOT EXECUTED
13e130: 56 push %esi <== NOT EXECUTED
13e131: 53 push %ebx <== NOT EXECUTED
13e132: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
13e135: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
13e138: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
13e13b: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
13e13e: 8a 45 14 mov 0x14(%ebp),%al <== NOT EXECUTED
13e141: 88 45 e7 mov %al,-0x19(%ebp) <== NOT EXECUTED
/*
* If the handle has a buffer release it. This allows a handle to be reused
* without needing to close then open it again.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
13e144: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED
13e147: 85 d2 test %edx,%edx <== NOT EXECUTED
13e149: 74 33 je 13e17e <rtems_rfs_buffer_handle_request+0x52><== NOT EXECUTED
{
/*
* Treat block 0 as special to handle the loading of the super block.
*/
if (block && (rtems_rfs_buffer_bnum (handle) == block))
13e14b: 85 f6 test %esi,%esi <== NOT EXECUTED
13e14d: 74 09 je 13e158 <rtems_rfs_buffer_handle_request+0x2c><== NOT EXECUTED
13e14f: 39 73 04 cmp %esi,0x4(%ebx) <== NOT EXECUTED
13e152: 0f 84 64 01 00 00 je 13e2bc <rtems_rfs_buffer_handle_request+0x190><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
13e158: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13e15b: 53 push %ebx <== NOT EXECUTED
13e15c: 57 push %edi <== NOT EXECUTED
13e15d: e8 c6 fe ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
if (rc > 0)
13e162: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e165: 85 c0 test %eax,%eax <== NOT EXECUTED
13e167: 7e 0b jle 13e174 <rtems_rfs_buffer_handle_request+0x48><== NOT EXECUTED
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
}
13e169: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13e16c: 5b pop %ebx <== NOT EXECUTED
13e16d: 5e pop %esi <== NOT EXECUTED
13e16e: 5f pop %edi <== NOT EXECUTED
13e16f: c9 leave <== NOT EXECUTED
13e170: c3 ret <== NOT EXECUTED
13e171: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
if (rc > 0)
return rc;
handle->dirty = false;
13e174: c6 03 00 movb $0x0,(%ebx) <== NOT EXECUTED
handle->bnum = 0;
13e177: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) <== NOT EXECUTED
* currently attached to a handle. If it is share the access. A buffer could
* be shared where different parts of the block have separate functions. An
* example is an inode block and the file system needs to handle 2 inodes in
* the same block at the same time.
*/
if (fs->buffers_count)
13e17e: 8b 47 4c mov 0x4c(%edi),%eax <== NOT EXECUTED
13e181: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
13e184: 85 c0 test %eax,%eax <== NOT EXECUTED
13e186: 0f 85 e0 00 00 00 jne 13e26c <rtems_rfs_buffer_handle_request+0x140><== NOT EXECUTED
13e18c: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED
/*
* If the buffer has not been found check the local cache of released
* buffers. There are release and released modified lists to preserve the
* state.
*/
if (!rtems_rfs_fs_no_local_cache (fs) &&
13e18f: f6 07 02 testb $0x2,(%edi) <== NOT EXECUTED
13e192: 0f 85 9c 00 00 00 jne 13e234 <rtems_rfs_buffer_handle_request+0x108><== NOT EXECUTED
13e198: 85 d2 test %edx,%edx <== NOT EXECUTED
13e19a: 74 30 je 13e1cc <rtems_rfs_buffer_handle_request+0xa0><== NOT EXECUTED
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
13e19c: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED
}
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
13e19f: ff 42 34 incl 0x34(%edx) <== 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 );
13e1a2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13e1a5: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
13e1a8: 8d 47 40 lea 0x40(%edi),%eax <== NOT EXECUTED
13e1ab: 50 push %eax <== NOT EXECUTED
13e1ac: e8 ab 58 fd ff call 113a5c <_Chain_Append> <== NOT EXECUTED
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
13e1b1: ff 47 4c incl 0x4c(%edi) <== NOT EXECUTED
handle->buffer->user = (void*) ((intptr_t) block);
13e1b4: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
13e1b7: 89 70 38 mov %esi,0x38(%eax) <== NOT EXECUTED
handle->bnum = block;
13e1ba: 89 73 04 mov %esi,0x4(%ebx) <== NOT EXECUTED
13e1bd: 31 c0 xor %eax,%eax <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
13e1bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13e1c2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13e1c5: 5b pop %ebx <== NOT EXECUTED
13e1c6: 5e pop %esi <== NOT EXECUTED
13e1c7: 5f pop %edi <== NOT EXECUTED
13e1c8: c9 leave <== NOT EXECUTED
13e1c9: c3 ret <== NOT EXECUTED
13e1ca: 66 90 xchg %ax,%ax <== NOT EXECUTED
!rtems_rfs_buffer_handle_has_block (handle))
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
13e1cc: 8b 4f 5c mov 0x5c(%edi),%ecx <== NOT EXECUTED
13e1cf: 85 c9 test %ecx,%ecx <== NOT EXECUTED
13e1d1: 0f 85 ef 00 00 00 jne 13e2c6 <rtems_rfs_buffer_handle_request+0x19a><== NOT EXECUTED
handle->buffer = rtems_rfs_scan_chain (&fs->release,
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
fs->release_modified_count)
13e1d7: 8b 47 6c mov 0x6c(%edi),%eax <== NOT EXECUTED
13e1da: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
if (fs->release_count)
handle->buffer = rtems_rfs_scan_chain (&fs->release,
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
13e1dd: 85 c0 test %eax,%eax <== NOT EXECUTED
13e1df: 74 5b je 13e23c <rtems_rfs_buffer_handle_request+0x110><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return the_chain->last;
13e1e1: 8b 47 68 mov 0x68(%edi),%eax <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
13e1e4: 8d 4f 60 lea 0x60(%edi),%ecx <== NOT EXECUTED
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
13e1e7: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
13e1e9: 75 10 jne 13e1fb <rtems_rfs_buffer_handle_request+0xcf><== NOT EXECUTED
13e1eb: e9 30 01 00 00 jmp 13e320 <rtems_rfs_buffer_handle_request+0x1f4><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Previous(
Chain_Node *the_node
)
{
return the_node->previous;
13e1f0: 8b 40 04 mov 0x4(%eax),%eax <== NOT EXECUTED
13e1f3: 39 c1 cmp %eax,%ecx <== NOT EXECUTED
13e1f5: 0f 84 25 01 00 00 je 13e320 <rtems_rfs_buffer_handle_request+0x1f4><== NOT EXECUTED
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
13e1fb: 39 70 38 cmp %esi,0x38(%eax) <== NOT EXECUTED
13e1fe: 75 f0 jne 13e1f0 <rtems_rfs_buffer_handle_request+0xc4><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": found block=%" PRIuPTR "\n",
((intptr_t)(buffer->user)));
(*count)--;
13e200: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
13e203: 49 dec %ecx <== NOT EXECUTED
13e204: 89 4f 6c mov %ecx,0x6c(%edi) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
13e207: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13e20a: 50 push %eax <== NOT EXECUTED
13e20b: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
13e20e: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED
13e211: e8 6a 58 fd ff call 113a80 <_Chain_Extract> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
13e216: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
13e219: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED
13e220: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
13e226: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
block);
/*
* If we found a buffer retain the dirty buffer state.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
rtems_rfs_buffer_mark_dirty (handle);
13e229: c6 03 01 movb $0x1,(%ebx) <== NOT EXECUTED
13e22c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e22f: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED
13e232: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
13e234: 85 d2 test %edx,%edx <== NOT EXECUTED
13e236: 0f 85 63 ff ff ff jne 13e19f <rtems_rfs_buffer_handle_request+0x73><== NOT EXECUTED
{
rc = rtems_rfs_buffer_io_request (fs, block, read, &handle->buffer);
13e23c: 8d 43 08 lea 0x8(%ebx),%eax <== NOT EXECUTED
13e23f: 50 push %eax <== NOT EXECUTED
13e240: 0f b6 45 e7 movzbl -0x19(%ebp),%eax <== NOT EXECUTED
13e244: 50 push %eax <== NOT EXECUTED
13e245: 56 push %esi <== NOT EXECUTED
13e246: 57 push %edi <== NOT EXECUTED
13e247: e8 74 91 00 00 call 1473c0 <rtems_rfs_buffer_bdbuf_request><== NOT EXECUTED
rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle));
13e24c: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED
13e24f: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) <== NOT EXECUTED
13e256: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
if (rc > 0)
13e25c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e25f: 85 c0 test %eax,%eax <== NOT EXECUTED
13e261: 0f 8f 02 ff ff ff jg 13e169 <rtems_rfs_buffer_handle_request+0x3d><== NOT EXECUTED
13e267: e9 33 ff ff ff jmp 13e19f <rtems_rfs_buffer_handle_request+0x73><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return the_chain->last;
13e26c: 8b 47 48 mov 0x48(%edi),%eax <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
13e26f: 8d 4f 40 lea 0x40(%edi),%ecx <== NOT EXECUTED
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
13e272: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
13e274: 75 0d jne 13e283 <rtems_rfs_buffer_handle_request+0x157><== NOT EXECUTED
13e276: 66 90 xchg %ax,%ax <== NOT EXECUTED
13e278: 31 d2 xor %edx,%edx <== NOT EXECUTED
13e27a: eb 38 jmp 13e2b4 <rtems_rfs_buffer_handle_request+0x188><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Previous(
Chain_Node *the_node
)
{
return the_node->previous;
13e27c: 8b 40 04 mov 0x4(%eax),%eax <== NOT EXECUTED
13e27f: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
13e281: 74 f5 je 13e278 <rtems_rfs_buffer_handle_request+0x14c><== NOT EXECUTED
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
13e283: 39 70 38 cmp %esi,0x38(%eax) <== NOT EXECUTED
13e286: 75 f4 jne 13e27c <rtems_rfs_buffer_handle_request+0x150><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": found block=%" PRIuPTR "\n",
((intptr_t)(buffer->user)));
(*count)--;
13e288: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
13e28b: 49 dec %ecx <== NOT EXECUTED
13e28c: 89 4f 4c mov %ecx,0x4c(%edi) <== NOT EXECUTED
13e28f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13e292: 50 push %eax <== NOT EXECUTED
13e293: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
13e296: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED
13e299: e8 e2 57 fd ff call 113a80 <_Chain_Extract> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
13e29e: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
13e2a1: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED
13e2a8: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
13e2ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e2b1: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED
if (fs->buffers_count)
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
13e2b4: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
13e2b7: e9 d3 fe ff ff jmp 13e18f <rtems_rfs_buffer_handle_request+0x63><== NOT EXECUTED
if (rtems_rfs_buffer_handle_has_block (handle))
{
/*
* Treat block 0 as special to handle the loading of the super block.
*/
if (block && (rtems_rfs_buffer_bnum (handle) == block))
13e2bc: 31 c0 xor %eax,%eax <== NOT EXECUTED
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
}
13e2be: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13e2c1: 5b pop %ebx <== NOT EXECUTED
13e2c2: 5e pop %esi <== NOT EXECUTED
13e2c3: 5f pop %edi <== NOT EXECUTED
13e2c4: c9 leave <== NOT EXECUTED
13e2c5: c3 ret <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return the_chain->last;
13e2c6: 8b 47 58 mov 0x58(%edi),%eax <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
13e2c9: 8d 57 50 lea 0x50(%edi),%edx <== NOT EXECUTED
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
13e2cc: 39 d0 cmp %edx,%eax <== NOT EXECUTED
13e2ce: 75 0b jne 13e2db <rtems_rfs_buffer_handle_request+0x1af><== NOT EXECUTED
13e2d0: eb 42 jmp 13e314 <rtems_rfs_buffer_handle_request+0x1e8><== NOT EXECUTED
13e2d2: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Previous(
Chain_Node *the_node
)
{
return the_node->previous;
13e2d4: 8b 40 04 mov 0x4(%eax),%eax <== NOT EXECUTED
13e2d7: 39 d0 cmp %edx,%eax <== NOT EXECUTED
13e2d9: 74 39 je 13e314 <rtems_rfs_buffer_handle_request+0x1e8><== NOT EXECUTED
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
13e2db: 39 70 38 cmp %esi,0x38(%eax) <== NOT EXECUTED
13e2de: 75 f4 jne 13e2d4 <rtems_rfs_buffer_handle_request+0x1a8><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": found block=%" PRIuPTR "\n",
((intptr_t)(buffer->user)));
(*count)--;
13e2e0: 49 dec %ecx <== NOT EXECUTED
13e2e1: 89 4f 5c mov %ecx,0x5c(%edi) <== NOT EXECUTED
13e2e4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13e2e7: 50 push %eax <== NOT EXECUTED
13e2e8: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
13e2eb: e8 90 57 fd ff call 113a80 <_Chain_Extract> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
13e2f0: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
13e2f3: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED
13e2fa: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
handle->buffer = rtems_rfs_scan_chain (&fs->release,
13e300: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
13e303: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e306: 85 c0 test %eax,%eax <== NOT EXECUTED
13e308: 0f 85 8e fe ff ff jne 13e19c <rtems_rfs_buffer_handle_request+0x70><== NOT EXECUTED
13e30e: e9 c4 fe ff ff jmp 13e1d7 <rtems_rfs_buffer_handle_request+0xab><== NOT EXECUTED
13e313: 90 nop <== NOT EXECUTED
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
handle->buffer = rtems_rfs_scan_chain (&fs->release,
13e314: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED
13e31b: e9 b7 fe ff ff jmp 13e1d7 <rtems_rfs_buffer_handle_request+0xab><== NOT EXECUTED
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
13e320: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED
13e327: e9 10 ff ff ff jmp 13e23c <rtems_rfs_buffer_handle_request+0x110><== NOT EXECUTED
0013dfd0 <rtems_rfs_buffer_open>:
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
13dfd0: 55 push %ebp <== NOT EXECUTED
13dfd1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13dfd3: 83 ec 60 sub $0x60,%esp <== NOT EXECUTED
struct stat st;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
if (stat (name, &st) < 0)
13dfd6: 8d 45 b0 lea -0x50(%ebp),%eax <== NOT EXECUTED
13dfd9: 50 push %eax <== NOT EXECUTED
13dfda: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13dfdd: e8 9e 1e fd ff call 10fe80 <stat> <== NOT EXECUTED
13dfe2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13dfe5: 85 c0 test %eax,%eax <== NOT EXECUTED
13dfe7: 78 37 js 13e020 <rtems_rfs_buffer_open+0x50><== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
/*
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
13dfe9: 8b 45 bc mov -0x44(%ebp),%eax <== NOT EXECUTED
13dfec: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
13dff1: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED
13dff6: 74 08 je 13e000 <rtems_rfs_buffer_open+0x30><== NOT EXECUTED
/*
* Check that device is registred as a block device and lock it.
*/
fs->disk = rtems_disk_obtain (st.st_rdev);
if (!fs->disk)
13dff8: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
13dffd: c9 leave <== NOT EXECUTED
13dffe: c3 ret <== NOT EXECUTED
13dfff: 90 nop <== NOT EXECUTED
}
/*
* Check that device is registred as a block device and lock it.
*/
fs->disk = rtems_disk_obtain (st.st_rdev);
13e000: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13e003: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
13e006: ff 75 c8 pushl -0x38(%ebp) <== NOT EXECUTED
13e009: e8 76 f4 fc ff call 10d484 <rtems_disk_obtain> <== NOT EXECUTED
13e00e: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
13e011: 89 42 0c mov %eax,0xc(%edx) <== NOT EXECUTED
if (!fs->disk)
13e014: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e017: 85 c0 test %eax,%eax <== NOT EXECUTED
13e019: 74 dd je 13dff8 <rtems_rfs_buffer_open+0x28><== NOT EXECUTED
13e01b: 31 c0 xor %eax,%eax <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
13e01d: c9 leave <== NOT EXECUTED
13e01e: c3 ret <== NOT EXECUTED
13e01f: 90 nop <== NOT EXECUTED
struct stat st;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
if (stat (name, &st) < 0)
13e020: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
13e025: c9 leave <== NOT EXECUTED
13e026: c3 ret <== NOT EXECUTED
0013df60 <rtems_rfs_buffer_setblksize>:
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
13df60: 55 push %ebp <== NOT EXECUTED
13df61: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13df63: 53 push %ebx <== NOT EXECUTED
13df64: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
13df67: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
rc = rtems_rfs_buffers_release (fs);
13df6a: 53 push %ebx <== NOT EXECUTED
13df6b: e8 7c ff ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
13df70: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
13df73: e8 b4 ff ff ff call 13df2c <rtems_rfs_buffer_sync> <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
13df78: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
13df7b: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
13df7e: 8d 55 0c lea 0xc(%ebp),%edx <== NOT EXECUTED
13df81: 52 push %edx <== NOT EXECUTED
13df82: 68 04 42 04 80 push $0x80044204 <== NOT EXECUTED
13df87: 50 push %eax <== NOT EXECUTED
13df88: ff 50 28 call *0x28(%eax) <== NOT EXECUTED
if (rc < 0)
13df8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13df8e: 85 c0 test %eax,%eax <== NOT EXECUTED
13df90: 78 06 js 13df98 <rtems_rfs_buffer_setblksize+0x38><== NOT EXECUTED
rc = errno;
#endif
return rc;
}
13df92: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
13df95: c9 leave <== NOT EXECUTED
13df96: c3 ret <== NOT EXECUTED
13df97: 90 nop <== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
if (rc < 0)
rc = errno;
13df98: e8 e3 9b 00 00 call 147b80 <__errno> <== NOT EXECUTED
13df9d: 8b 00 mov (%eax),%eax <== NOT EXECUTED
#endif
return rc;
}
13df9f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
13dfa2: c9 leave <== NOT EXECUTED
13dfa3: c3 ret <== NOT EXECUTED
0013df2c <rtems_rfs_buffer_sync>:
return rc;
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
13df2c: 55 push %ebp <== NOT EXECUTED
13df2d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13df2f: 56 push %esi <== NOT EXECUTED
13df30: 53 push %ebx <== NOT EXECUTED
13df31: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
13df34: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13df37: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED
13df3a: ff 70 04 pushl 0x4(%eax) <== NOT EXECUTED
13df3d: ff 30 pushl (%eax) <== NOT EXECUTED
13df3f: e8 14 cb fc ff call 10aa58 <rtems_bdbuf_syncdev> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
13df44: 59 pop %ecx <== NOT EXECUTED
13df45: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
13df48: 19 db sbb %ebx,%ebx <== NOT EXECUTED
13df4a: f7 d3 not %ebx <== NOT EXECUTED
13df4c: 83 e3 05 and $0x5,%ebx <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
13df4f: ff 76 0c pushl 0xc(%esi) <== NOT EXECUTED
13df52: e8 09 f7 fc ff call 10d660 <rtems_disk_release> <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
13df57: 89 d8 mov %ebx,%eax <== NOT EXECUTED
13df59: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
13df5c: 5b pop %ebx <== NOT EXECUTED
13df5d: 5e pop %esi <== NOT EXECUTED
13df5e: c9 leave <== NOT EXECUTED
13df5f: c3 ret <== NOT EXECUTED
0013deec <rtems_rfs_buffers_release>:
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
13deec: 55 push %ebp <== NOT EXECUTED
13deed: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13deef: 56 push %esi <== NOT EXECUTED
13def0: 53 push %ebx <== NOT EXECUTED
13def1: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
"release:%" PRIu32 " release-modified:%" PRIu32 "\n",
fs->buffers_count, fs->release_count, fs->release_modified_count);
rc = rtems_rfs_release_chain (&fs->release,
13def4: 8d 56 5c lea 0x5c(%esi),%edx <== NOT EXECUTED
13def7: 8d 46 50 lea 0x50(%esi),%eax <== NOT EXECUTED
13defa: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
13defc: e8 87 ff ff ff call 13de88 <rtems_rfs_release_chain><== NOT EXECUTED
13df01: 89 c3 mov %eax,%ebx <== NOT EXECUTED
13df03: 85 c0 test %eax,%eax <== NOT EXECUTED
13df05: 78 21 js 13df28 <rtems_rfs_buffers_release+0x3c><== NOT EXECUTED
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
13df07: 8d 56 6c lea 0x6c(%esi),%edx <== NOT EXECUTED
13df0a: 8d 46 60 lea 0x60(%esi),%eax <== NOT EXECUTED
13df0d: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED
13df12: e8 71 ff ff ff call 13de88 <rtems_rfs_release_chain><== NOT EXECUTED
&fs->release_modified_count,
true);
if ((rc > 0) && (rrc == 0))
13df17: 85 c0 test %eax,%eax <== NOT EXECUTED
13df19: 7e 06 jle 13df21 <rtems_rfs_buffers_release+0x35><== NOT EXECUTED
13df1b: 85 db test %ebx,%ebx <== NOT EXECUTED
13df1d: 75 02 jne 13df21 <rtems_rfs_buffers_release+0x35><== NOT EXECUTED
13df1f: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rrc = rc;
return rrc;
}
13df21: 89 d8 mov %ebx,%eax <== NOT EXECUTED
13df23: 5b pop %ebx <== NOT EXECUTED
13df24: 5e pop %esi <== NOT EXECUTED
13df25: c9 leave <== NOT EXECUTED
13df26: c3 ret <== NOT EXECUTED
13df27: 90 nop <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
"release:%" PRIu32 " release-modified:%" PRIu32 "\n",
fs->buffers_count, fs->release_count, fs->release_modified_count);
rc = rtems_rfs_release_chain (&fs->release,
13df28: 31 db xor %ebx,%ebx <== NOT EXECUTED
13df2a: eb db jmp 13df07 <rtems_rfs_buffers_release+0x1b><== NOT EXECUTED
0013e9d8 <rtems_rfs_dir_add_entry>:
rtems_rfs_dir_add_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
const char* name,
size_t length,
rtems_rfs_ino ino)
{
13e9d8: 55 push %ebp <== NOT EXECUTED
13e9d9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13e9db: 57 push %edi <== NOT EXECUTED
13e9dc: 56 push %esi <== NOT EXECUTED
13e9dd: 53 push %ebx <== NOT EXECUTED
13e9de: 81 ec c0 00 00 00 sub $0xc0,%esp <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%zd\n", length);
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
13e9e4: 8d 85 7c ff ff ff lea -0x84(%ebp),%eax <== NOT EXECUTED
13e9ea: 50 push %eax <== NOT EXECUTED
13e9eb: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13e9ee: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e9f1: e8 e6 f2 ff ff call 13dcdc <rtems_rfs_block_map_open><== NOT EXECUTED
13e9f6: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
13e9f8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e9fb: 85 c0 test %eax,%eax <== NOT EXECUTED
13e9fd: 7e 0d jle 13ea0c <rtems_rfs_dir_add_entry+0x34><== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
13e9ff: 89 d8 mov %ebx,%eax <== NOT EXECUTED
13ea01: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13ea04: 5b pop %ebx <== NOT EXECUTED
13ea05: 5e pop %esi <== NOT EXECUTED
13ea06: 5f pop %edi <== NOT EXECUTED
13ea07: c9 leave <== NOT EXECUTED
13ea08: c3 ret <== NOT EXECUTED
13ea09: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
13ea0c: c6 45 cc 00 movb $0x0,-0x34(%ebp) <== NOT EXECUTED
handle->bnum = 0;
13ea10: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
13ea17: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
* @param bpos A pointer to the block position.
*/
static inline void
rtems_rfs_block_set_bpos_zero (rtems_rfs_block_pos* bpos)
{
bpos->bno = 0;
13ea1e: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
bpos->boff = 0;
13ea25: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
bpos->block = 0;
13ea2c: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
13ea33: 8d 75 e4 lea -0x1c(%ebp),%esi <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
13ea36: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
13ea39: 83 c2 0a add $0xa,%edx <== NOT EXECUTED
13ea3c: 89 95 54 ff ff ff mov %edx,-0xac(%ebp) <== NOT EXECUTED
13ea42: eb 17 jmp 13ea5b <rtems_rfs_dir_add_entry+0x83><== NOT EXECUTED
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
13ea44: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13ea47: 8b 41 08 mov 0x8(%ecx),%eax <== NOT EXECUTED
13ea4a: 89 c2 mov %eax,%edx <== NOT EXECUTED
13ea4c: 83 ea 0a sub $0xa,%edx <== NOT EXECUTED
13ea4f: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) <== NOT EXECUTED
13ea55: 0f 85 89 00 00 00 jne 13eae4 <rtems_rfs_dir_add_entry+0x10c><== NOT EXECUTED
/*
* Locate the first block. If an error the block will be 0. If the map is
* empty which happens when creating a directory and adding the first entry
* the seek will return ENXIO. In this case we need to grow the directory.
*/
rc = rtems_rfs_block_map_find (fs, &map, &bpos, &block);
13ea5b: 56 push %esi <== NOT EXECUTED
13ea5c: 8d 4d d8 lea -0x28(%ebp),%ecx <== NOT EXECUTED
13ea5f: 51 push %ecx <== NOT EXECUTED
13ea60: 8d 85 7c ff ff ff lea -0x84(%ebp),%eax <== NOT EXECUTED
13ea66: 50 push %eax <== NOT EXECUTED
13ea67: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13ea6a: e8 a9 e7 ff ff call 13d218 <rtems_rfs_block_map_find><== NOT EXECUTED
if (rc > 0)
13ea6f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ea72: 85 c0 test %eax,%eax <== NOT EXECUTED
13ea74: 0f 8e da 01 00 00 jle 13ec54 <rtems_rfs_dir_add_entry+0x27c><== NOT EXECUTED
{
if (rc != ENXIO)
13ea7a: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
13ea7d: 0f 85 e1 01 00 00 jne 13ec64 <rtems_rfs_dir_add_entry+0x28c><== NOT EXECUTED
}
/*
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
13ea83: 56 push %esi <== NOT EXECUTED
13ea84: 6a 01 push $0x1 <== NOT EXECUTED
13ea86: 8d 95 7c ff ff ff lea -0x84(%ebp),%edx <== NOT EXECUTED
13ea8c: 52 push %edx <== NOT EXECUTED
13ea8d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13ea90: e8 77 ed ff ff call 13d80c <rtems_rfs_block_map_grow><== NOT EXECUTED
if (rc > 0)
13ea95: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ea98: 85 c0 test %eax,%eax <== NOT EXECUTED
13ea9a: 0f 8f c4 01 00 00 jg 13ec64 <rtems_rfs_dir_add_entry+0x28c><== NOT EXECUTED
13eaa0: 31 c0 xor %eax,%eax <== NOT EXECUTED
13eaa2: 31 ff xor %edi,%edi <== NOT EXECUTED
}
read = false;
}
bpos.bno++;
13eaa4: ff 45 d8 incl -0x28(%ebp) <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
13eaa7: 50 push %eax <== NOT EXECUTED
13eaa8: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13eaab: 8d 4d cc lea -0x34(%ebp),%ecx <== NOT EXECUTED
13eaae: 51 push %ecx <== NOT EXECUTED
13eaaf: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13eab2: e8 75 f6 ff ff call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
if (rc > 0)
13eab7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13eaba: 85 c0 test %eax,%eax <== NOT EXECUTED
13eabc: 0f 8f a2 01 00 00 jg 13ec64 <rtems_rfs_dir_add_entry+0x28c><== NOT EXECUTED
"block buffer req failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
entry = rtems_rfs_buffer_data (&buffer);
13eac2: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
13eac5: 8b 58 20 mov 0x20(%eax),%ebx <== NOT EXECUTED
if (!read)
13eac8: 89 f8 mov %edi,%eax <== NOT EXECUTED
13eaca: 84 c0 test %al,%al <== NOT EXECUTED
13eacc: 0f 85 72 ff ff ff jne 13ea44 <rtems_rfs_dir_add_entry+0x6c><== NOT EXECUTED
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
13ead2: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13ead5: 8b 4a 08 mov 0x8(%edx),%ecx <== NOT EXECUTED
13ead8: b0 ff mov $0xff,%al <== NOT EXECUTED
13eada: 89 df mov %ebx,%edi <== NOT EXECUTED
13eadc: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
13eade: e9 61 ff ff ff jmp 13ea44 <rtems_rfs_dir_add_entry+0x6c><== NOT EXECUTED
13eae3: 90 nop <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
13eae4: 8d 4b 08 lea 0x8(%ebx),%ecx <== NOT EXECUTED
13eae7: 89 8d 58 ff ff ff mov %ecx,-0xa8(%ebp) <== NOT EXECUTED
13eaed: 8d 53 09 lea 0x9(%ebx),%edx <== NOT EXECUTED
13eaf0: 89 95 5c ff ff ff mov %edx,-0xa4(%ebp) <== NOT EXECUTED
13eaf6: 0f b6 7b 08 movzbl 0x8(%ebx),%edi <== NOT EXECUTED
13eafa: c1 e7 08 shl $0x8,%edi <== NOT EXECUTED
13eafd: 0f b6 53 09 movzbl 0x9(%ebx),%edx <== NOT EXECUTED
13eb01: 09 d7 or %edx,%edi <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
13eb03: 8a 0b mov (%ebx),%cl <== NOT EXECUTED
13eb05: 8d 53 01 lea 0x1(%ebx),%edx <== NOT EXECUTED
13eb08: 89 95 60 ff ff ff mov %edx,-0xa0(%ebp) <== NOT EXECUTED
13eb0e: 8a 53 01 mov 0x1(%ebx),%dl <== NOT EXECUTED
13eb11: 88 95 70 ff ff ff mov %dl,-0x90(%ebp) <== NOT EXECUTED
13eb17: 8d 53 02 lea 0x2(%ebx),%edx <== NOT EXECUTED
13eb1a: 89 95 64 ff ff ff mov %edx,-0x9c(%ebp) <== NOT EXECUTED
13eb20: 8a 53 02 mov 0x2(%ebx),%dl <== NOT EXECUTED
13eb23: 88 95 6c ff ff ff mov %dl,-0x94(%ebp) <== NOT EXECUTED
13eb29: 8d 53 03 lea 0x3(%ebx),%edx <== NOT EXECUTED
13eb2c: 89 95 68 ff ff ff mov %edx,-0x98(%ebp) <== NOT EXECUTED
13eb32: 8a 53 03 mov 0x3(%ebx),%dl <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
13eb35: 81 ff ff ff 00 00 cmp $0xffff,%edi <== NOT EXECUTED
13eb3b: 0f 84 91 01 00 00 je 13ecd2 <rtems_rfs_dir_add_entry+0x2fa><== NOT EXECUTED
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
13eb41: 83 ff 0a cmp $0xa,%edi <== NOT EXECUTED
13eb44: 0f 8e 5e 01 00 00 jle 13eca8 <rtems_rfs_dir_add_entry+0x2d0><== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
13eb4a: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
13eb4d: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
13eb50: 09 ca or %ecx,%edx <== NOT EXECUTED
13eb52: 0f b6 8d 6c ff ff ff movzbl -0x94(%ebp),%ecx <== NOT EXECUTED
13eb59: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
13eb5c: 09 ca or %ecx,%edx <== NOT EXECUTED
13eb5e: 0f b6 8d 70 ff ff ff movzbl -0x90(%ebp),%ecx <== NOT EXECUTED
13eb65: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13eb68: 09 ca or %ecx,%edx <== NOT EXECUTED
13eb6a: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13eb6d: 8b 49 18 mov 0x18(%ecx),%ecx <== NOT EXECUTED
13eb70: 89 8d 6c ff ff ff mov %ecx,-0x94(%ebp) <== NOT EXECUTED
13eb76: c7 85 70 ff ff ff 00 movl $0x0,-0x90(%ebp) <== NOT EXECUTED
13eb7d: 00 00 00
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
13eb80: 3b bd 6c ff ff ff cmp -0x94(%ebp),%edi <== NOT EXECUTED
13eb86: 0f 83 1c 01 00 00 jae 13eca8 <rtems_rfs_dir_add_entry+0x2d0><== NOT EXECUTED
13eb8c: 85 d2 test %edx,%edx <== NOT EXECUTED
13eb8e: 0f 84 14 01 00 00 je 13eca8 <rtems_rfs_dir_add_entry+0x2d0><== NOT EXECUTED
13eb94: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13eb97: 39 51 10 cmp %edx,0x10(%ecx) <== NOT EXECUTED
13eb9a: 0f 82 08 01 00 00 jb 13eca8 <rtems_rfs_dir_add_entry+0x2d0><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return EIO;
}
entry += elength;
offset += elength;
13eba0: 01 bd 70 ff ff ff add %edi,-0x90(%ebp) <== NOT EXECUTED
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
13eba6: 8b 8d 70 ff ff ff mov -0x90(%ebp),%ecx <== NOT EXECUTED
13ebac: 8b 95 74 ff ff ff mov -0x8c(%ebp),%edx <== NOT EXECUTED
13ebb2: 39 d1 cmp %edx,%ecx <== NOT EXECUTED
13ebb4: 0f 83 a1 fe ff ff jae 13ea5b <rtems_rfs_dir_add_entry+0x83><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return EIO;
}
entry += elength;
13ebba: 01 fb add %edi,%ebx <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
13ebbc: 8d 53 08 lea 0x8(%ebx),%edx <== NOT EXECUTED
13ebbf: 89 95 58 ff ff ff mov %edx,-0xa8(%ebp) <== NOT EXECUTED
13ebc5: 8d 53 09 lea 0x9(%ebx),%edx <== NOT EXECUTED
13ebc8: 89 95 5c ff ff ff mov %edx,-0xa4(%ebp) <== NOT EXECUTED
13ebce: 0f b6 7b 08 movzbl 0x8(%ebx),%edi <== NOT EXECUTED
13ebd2: c1 e7 08 shl $0x8,%edi <== NOT EXECUTED
13ebd5: 0f b6 53 09 movzbl 0x9(%ebx),%edx <== NOT EXECUTED
13ebd9: 09 d7 or %edx,%edi <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
13ebdb: 8a 13 mov (%ebx),%dl <== NOT EXECUTED
13ebdd: 88 95 38 ff ff ff mov %dl,-0xc8(%ebp) <== NOT EXECUTED
13ebe3: 8d 53 01 lea 0x1(%ebx),%edx <== NOT EXECUTED
13ebe6: 89 95 60 ff ff ff mov %edx,-0xa0(%ebp) <== NOT EXECUTED
13ebec: 8a 53 01 mov 0x1(%ebx),%dl <== NOT EXECUTED
13ebef: 88 95 52 ff ff ff mov %dl,-0xae(%ebp) <== NOT EXECUTED
13ebf5: 8d 53 02 lea 0x2(%ebx),%edx <== NOT EXECUTED
13ebf8: 89 95 64 ff ff ff mov %edx,-0x9c(%ebp) <== NOT EXECUTED
13ebfe: 8a 53 02 mov 0x2(%ebx),%dl <== NOT EXECUTED
13ec01: 88 95 53 ff ff ff mov %dl,-0xad(%ebp) <== NOT EXECUTED
13ec07: 8d 53 03 lea 0x3(%ebx),%edx <== NOT EXECUTED
13ec0a: 89 95 68 ff ff ff mov %edx,-0x98(%ebp) <== NOT EXECUTED
13ec10: 8a 53 03 mov 0x3(%ebx),%dl <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
13ec13: 81 ff ff ff 00 00 cmp $0xffff,%edi <== NOT EXECUTED
13ec19: 0f 84 b5 00 00 00 je 13ecd4 <rtems_rfs_dir_add_entry+0x2fc><== NOT EXECUTED
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
13ec1f: 83 ff 0a cmp $0xa,%edi <== NOT EXECUTED
13ec22: 0f 8e 80 00 00 00 jle 13eca8 <rtems_rfs_dir_add_entry+0x2d0><== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
13ec28: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
13ec2b: 8a 8d 38 ff ff ff mov -0xc8(%ebp),%cl <== NOT EXECUTED
13ec31: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
13ec34: 09 ca or %ecx,%edx <== NOT EXECUTED
13ec36: 0f b6 8d 52 ff ff ff movzbl -0xae(%ebp),%ecx <== NOT EXECUTED
13ec3d: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13ec40: 09 ca or %ecx,%edx <== NOT EXECUTED
13ec42: 0f b6 8d 53 ff ff ff movzbl -0xad(%ebp),%ecx <== NOT EXECUTED
13ec49: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
13ec4c: 09 ca or %ecx,%edx <== NOT EXECUTED
13ec4e: e9 2d ff ff ff jmp 13eb80 <rtems_rfs_dir_add_entry+0x1a8><== NOT EXECUTED
13ec53: 90 nop <== NOT EXECUTED
* Locate the first block. If an error the block will be 0. If the map is
* empty which happens when creating a directory and adding the first entry
* the seek will return ENXIO. In this case we need to grow the directory.
*/
rc = rtems_rfs_block_map_find (fs, &map, &bpos, &block);
if (rc > 0)
13ec54: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
13ec59: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
13ec5e: e9 41 fe ff ff jmp 13eaa4 <rtems_rfs_dir_add_entry+0xcc><== NOT EXECUTED
13ec63: 90 nop <== NOT EXECUTED
13ec64: 89 c3 mov %eax,%ebx <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
13ec66: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13ec69: 8d 4d cc lea -0x34(%ebp),%ecx <== NOT EXECUTED
13ec6c: 51 push %ecx <== NOT EXECUTED
13ec6d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13ec70: e8 b3 f3 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
13ec75: c6 45 cc 00 movb $0x0,-0x34(%ebp) <== NOT EXECUTED
handle->bnum = 0;
13ec79: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
13ec80: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
offset += elength;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
13ec87: 59 pop %ecx <== NOT EXECUTED
13ec88: 5e pop %esi <== NOT EXECUTED
13ec89: 8d b5 7c ff ff ff lea -0x84(%ebp),%esi <== NOT EXECUTED
13ec8f: 56 push %esi <== NOT EXECUTED
13ec90: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13ec93: e8 98 ee ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
return rc;
13ec98: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13ec9b: 89 d8 mov %ebx,%eax <== NOT EXECUTED
13ec9d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13eca0: 5b pop %ebx <== NOT EXECUTED
13eca1: 5e pop %esi <== NOT EXECUTED
13eca2: 5f pop %edi <== NOT EXECUTED
13eca3: c9 leave <== NOT EXECUTED
13eca4: c3 ret <== NOT EXECUTED
13eca5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
printf ("rtems-rfs: dir-add-entry: "
"bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04x\n",
rtems_rfs_inode_ino (dir), elength, eino, offset);
rtems_rfs_buffer_handle_close (fs, &buffer);
13eca8: 8d 55 cc lea -0x34(%ebp),%edx <== NOT EXECUTED
13ecab: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13ecae: e8 79 f6 ff ff call 13e32c <rtems_rfs_buffer_handle_close><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
13ecb3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13ecb6: 8d b5 7c ff ff ff lea -0x84(%ebp),%esi <== NOT EXECUTED
13ecbc: 56 push %esi <== NOT EXECUTED
13ecbd: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13ecc0: e8 6b ee ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
13ecc5: bb 05 00 00 00 mov $0x5,%ebx <== NOT EXECUTED
return EIO;
13ecca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13eccd: e9 2d fd ff ff jmp 13e9ff <rtems_rfs_dir_add_entry+0x27><== NOT EXECUTED
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
13ecd2: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
13ecd4: 29 c8 sub %ecx,%eax <== NOT EXECUTED
13ecd6: 39 85 54 ff ff ff cmp %eax,-0xac(%ebp) <== NOT EXECUTED
13ecdc: 0f 83 79 fd ff ff jae 13ea5b <rtems_rfs_dir_add_entry+0x83><== NOT EXECUTED
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
13ece2: 52 push %edx <== NOT EXECUTED
13ece3: 52 push %edx <== NOT EXECUTED
13ece4: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
13ece7: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13ecea: e8 25 87 00 00 call 147414 <rtems_rfs_dir_hash> <== NOT EXECUTED
rtems_rfs_dir_set_entry_hash (entry, hash);
13ecef: 89 c2 mov %eax,%edx <== NOT EXECUTED
13ecf1: c1 ea 18 shr $0x18,%edx <== NOT EXECUTED
13ecf4: 88 53 04 mov %dl,0x4(%ebx) <== NOT EXECUTED
13ecf7: 89 c2 mov %eax,%edx <== NOT EXECUTED
13ecf9: c1 ea 10 shr $0x10,%edx <== NOT EXECUTED
13ecfc: 88 53 05 mov %dl,0x5(%ebx) <== NOT EXECUTED
13ecff: 89 c2 mov %eax,%edx <== NOT EXECUTED
13ed01: c1 ea 08 shr $0x8,%edx <== NOT EXECUTED
13ed04: 88 53 06 mov %dl,0x6(%ebx) <== NOT EXECUTED
13ed07: 88 43 07 mov %al,0x7(%ebx) <== NOT EXECUTED
rtems_rfs_dir_set_entry_ino (entry, ino);
13ed0a: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
13ed0d: c1 e8 18 shr $0x18,%eax <== NOT EXECUTED
13ed10: 88 03 mov %al,(%ebx) <== NOT EXECUTED
13ed12: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
13ed15: c1 e8 10 shr $0x10,%eax <== NOT EXECUTED
13ed18: 8b 8d 60 ff ff ff mov -0xa0(%ebp),%ecx <== NOT EXECUTED
13ed1e: 88 01 mov %al,(%ecx) <== NOT EXECUTED
13ed20: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
13ed23: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
13ed26: 8b b5 64 ff ff ff mov -0x9c(%ebp),%esi <== NOT EXECUTED
13ed2c: 88 06 mov %al,(%esi) <== NOT EXECUTED
13ed2e: 8a 45 18 mov 0x18(%ebp),%al <== NOT EXECUTED
13ed31: 8b 95 68 ff ff ff mov -0x98(%ebp),%edx <== NOT EXECUTED
13ed37: 88 02 mov %al,(%edx) <== NOT EXECUTED
rtems_rfs_dir_set_entry_length (entry,
13ed39: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
13ed3c: 83 c0 0a add $0xa,%eax <== NOT EXECUTED
13ed3f: 66 c1 e8 08 shr $0x8,%ax <== NOT EXECUTED
13ed43: 8b 8d 58 ff ff ff mov -0xa8(%ebp),%ecx <== NOT EXECUTED
13ed49: 88 01 mov %al,(%ecx) <== NOT EXECUTED
13ed4b: 8a 45 14 mov 0x14(%ebp),%al <== NOT EXECUTED
13ed4e: 83 c0 0a add $0xa,%eax <== NOT EXECUTED
13ed51: 8b b5 5c ff ff ff mov -0xa4(%ebp),%esi <== NOT EXECUTED
13ed57: 88 06 mov %al,(%esi) <== NOT EXECUTED
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
13ed59: 8d 43 0a lea 0xa(%ebx),%eax <== NOT EXECUTED
13ed5c: 89 c7 mov %eax,%edi <== NOT EXECUTED
13ed5e: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
13ed61: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
13ed64: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&buffer);
13ed66: c6 45 cc 01 movb $0x1,-0x34(%ebp) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
13ed6a: 8d 55 cc lea -0x34(%ebp),%edx <== NOT EXECUTED
13ed6d: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13ed70: e8 b7 f5 ff ff call 13e32c <rtems_rfs_buffer_handle_close><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
13ed75: 5f pop %edi <== NOT EXECUTED
13ed76: 58 pop %eax <== NOT EXECUTED
13ed77: 8d 85 7c ff ff ff lea -0x84(%ebp),%eax <== NOT EXECUTED
13ed7d: 50 push %eax <== NOT EXECUTED
13ed7e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13ed81: e8 aa ed ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
13ed86: 31 db xor %ebx,%ebx <== NOT EXECUTED
return 0;
13ed88: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ed8b: e9 6f fc ff ff jmp 13e9ff <rtems_rfs_dir_add_entry+0x27><== NOT EXECUTED
0013e694 <rtems_rfs_dir_del_entry>:
int
rtems_rfs_dir_del_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_ino ino,
uint32_t offset)
{
13e694: 55 push %ebp <== NOT EXECUTED
13e695: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13e697: 57 push %edi <== NOT EXECUTED
13e698: 56 push %esi <== NOT EXECUTED
13e699: 53 push %ebx <== NOT EXECUTED
13e69a: 81 ec a0 00 00 00 sub $0xa0,%esp <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
13e6a0: 8d 45 88 lea -0x78(%ebp),%eax <== NOT EXECUTED
13e6a3: 50 push %eax <== NOT EXECUTED
13e6a4: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13e6a7: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e6aa: e8 2d f6 ff ff call 13dcdc <rtems_rfs_block_map_open><== NOT EXECUTED
13e6af: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
13e6b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e6b4: 85 c0 test %eax,%eax <== NOT EXECUTED
13e6b6: 7e 0c jle 13e6c4 <rtems_rfs_dir_del_entry+0x30><== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
13e6b8: 89 f0 mov %esi,%eax <== NOT EXECUTED
13e6ba: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13e6bd: 5b pop %ebx <== NOT EXECUTED
13e6be: 5e pop %esi <== NOT EXECUTED
13e6bf: 5f pop %edi <== NOT EXECUTED
13e6c0: c9 leave <== NOT EXECUTED
13e6c1: c3 ret <== NOT EXECUTED
13e6c2: 66 90 xchg %ax,%ax <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
13e6c4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13e6c7: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
13e6ca: 52 push %edx <== NOT EXECUTED
13e6cb: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
13e6ce: 31 d2 xor %edx,%edx <== NOT EXECUTED
13e6d0: 52 push %edx <== NOT EXECUTED
13e6d1: 50 push %eax <== NOT EXECUTED
13e6d2: 8d 4d 88 lea -0x78(%ebp),%ecx <== NOT EXECUTED
13e6d5: 51 push %ecx <== NOT EXECUTED
13e6d6: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e6d9: e8 7a ec ff ff call 13d358 <rtems_rfs_block_map_seek><== NOT EXECUTED
13e6de: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
13e6e0: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13e6e3: 85 c0 test %eax,%eax <== NOT EXECUTED
13e6e5: 7e 25 jle 13e70c <rtems_rfs_dir_del_entry+0x78><== NOT EXECUTED
{
if (rc == ENXIO)
13e6e7: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
13e6ea: 75 04 jne 13e6f0 <rtems_rfs_dir_del_entry+0x5c><== NOT EXECUTED
13e6ec: 66 be 02 00 mov $0x2,%si <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
13e6f0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13e6f3: 8d 45 88 lea -0x78(%ebp),%eax <== NOT EXECUTED
13e6f6: 50 push %eax <== NOT EXECUTED
13e6f7: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e6fa: e8 31 f4 ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
return rc;
13e6ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
13e702: 89 f0 mov %esi,%eax <== NOT EXECUTED
13e704: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13e707: 5b pop %ebx <== NOT EXECUTED
13e708: 5e pop %esi <== NOT EXECUTED
13e709: 5f pop %edi <== NOT EXECUTED
13e70a: c9 leave <== NOT EXECUTED
13e70b: c3 ret <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
13e70c: c6 45 d8 00 movb $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->bnum = 0;
13e710: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
13e717: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
}
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
13e71e: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
13e721: 85 d2 test %edx,%edx <== NOT EXECUTED
13e723: 0f 94 85 7b ff ff ff sete -0x85(%ebp) <== NOT EXECUTED
while (rc == 0)
{
uint8_t* entry;
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
13e72a: 6a 01 push $0x1 <== NOT EXECUTED
13e72c: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13e72f: 8d 55 d8 lea -0x28(%ebp),%edx <== NOT EXECUTED
13e732: 52 push %edx <== NOT EXECUTED
13e733: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e736: e8 f1 f9 ff ff call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
13e73b: 89 85 68 ff ff ff mov %eax,-0x98(%ebp) <== NOT EXECUTED
if (rc > 0)
13e741: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e744: 85 c0 test %eax,%eax <== NOT EXECUTED
13e746: 0f 8f 7e 01 00 00 jg 13e8ca <rtems_rfs_dir_del_entry+0x236><== NOT EXECUTED
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
13e74c: 80 bd 7b ff ff ff 00 cmpb $0x0,-0x85(%ebp) <== NOT EXECUTED
13e753: 0f 84 43 01 00 00 je 13e89c <rtems_rfs_dir_del_entry+0x208><== NOT EXECUTED
13e759: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13e75c: 8b 49 08 mov 0x8(%ecx),%ecx <== NOT EXECUTED
13e75f: 89 8d 6c ff ff ff mov %ecx,-0x94(%ebp) <== NOT EXECUTED
13e765: 31 c0 xor %eax,%eax <== NOT EXECUTED
13e767: c7 85 64 ff ff ff 00 movl $0x0,-0x9c(%ebp) <== NOT EXECUTED
13e76e: 00 00 00
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
13e771: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
13e774: 8b 79 20 mov 0x20(%ecx),%edi <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
13e777: 8b 8d 6c ff ff ff mov -0x94(%ebp),%ecx <== NOT EXECUTED
13e77d: 83 e9 0a sub $0xa,%ecx <== NOT EXECUTED
13e780: 89 4d 80 mov %ecx,-0x80(%ebp) <== NOT EXECUTED
13e783: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
13e785: 0f 83 35 01 00 00 jae 13e8c0 <rtems_rfs_dir_del_entry+0x22c><== NOT EXECUTED
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
13e78b: 01 c7 add %eax,%edi <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
13e78d: 8d 47 08 lea 0x8(%edi),%eax <== NOT EXECUTED
13e790: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) <== NOT EXECUTED
13e796: 8d 57 09 lea 0x9(%edi),%edx <== NOT EXECUTED
13e799: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) <== NOT EXECUTED
13e79f: 0f b6 5f 08 movzbl 0x8(%edi),%ebx <== NOT EXECUTED
13e7a3: c1 e3 08 shl $0x8,%ebx <== NOT EXECUTED
13e7a6: 0f b6 47 09 movzbl 0x9(%edi),%eax <== NOT EXECUTED
13e7aa: 09 c3 or %eax,%ebx <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
13e7ac: 8a 0f mov (%edi),%cl <== NOT EXECUTED
13e7ae: 0f b6 77 01 movzbl 0x1(%edi),%esi <== NOT EXECUTED
13e7b2: 8a 47 02 mov 0x2(%edi),%al <== NOT EXECUTED
13e7b5: 88 45 84 mov %al,-0x7c(%ebp) <== NOT EXECUTED
13e7b8: 8a 47 03 mov 0x3(%edi),%al <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
13e7bb: 81 fb ff ff 00 00 cmp $0xffff,%ebx <== NOT EXECUTED
13e7c1: 0f 84 f9 00 00 00 je 13e8c0 <rtems_rfs_dir_del_entry+0x22c><== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
13e7c7: 83 fb 0a cmp $0xa,%ebx <== NOT EXECUTED
13e7ca: 0f 8e c3 00 00 00 jle 13e893 <rtems_rfs_dir_del_entry+0x1ff><== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
13e7d0: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
13e7d3: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
13e7d6: 09 c8 or %ecx,%eax <== NOT EXECUTED
13e7d8: 89 f2 mov %esi,%edx <== NOT EXECUTED
13e7da: 0f b6 ca movzbl %dl,%ecx <== NOT EXECUTED
13e7dd: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13e7e0: 09 c8 or %ecx,%eax <== NOT EXECUTED
13e7e2: 0f b6 4d 84 movzbl -0x7c(%ebp),%ecx <== NOT EXECUTED
13e7e6: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
13e7e9: 09 c8 or %ecx,%eax <== NOT EXECUTED
13e7eb: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13e7ee: 8b 49 18 mov 0x18(%ecx),%ecx <== NOT EXECUTED
13e7f1: 89 8d 7c ff ff ff mov %ecx,-0x84(%ebp) <== NOT EXECUTED
13e7f7: 8b 95 64 ff ff ff mov -0x9c(%ebp),%edx <== NOT EXECUTED
13e7fd: e9 85 00 00 00 jmp 13e887 <rtems_rfs_dir_del_entry+0x1f3><== NOT EXECUTED
13e802: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
13e804: 85 c0 test %eax,%eax <== NOT EXECUTED
13e806: 0f 84 87 00 00 00 je 13e893 <rtems_rfs_dir_del_entry+0x1ff><== NOT EXECUTED
13e80c: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13e80f: 39 41 10 cmp %eax,0x10(%ecx) <== NOT EXECUTED
13e812: 72 7f jb 13e893 <rtems_rfs_dir_del_entry+0x1ff><== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, block, eoffset);
rc = EIO;
break;
}
if (ino == rtems_rfs_dir_entry_ino (entry))
13e814: 3b 45 10 cmp 0x10(%ebp),%eax <== NOT EXECUTED
13e817: 0f 84 0b 01 00 00 je 13e928 <rtems_rfs_dir_del_entry+0x294><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return 0;
}
if (!search)
13e81d: 80 bd 7b ff ff ff 00 cmpb $0x0,-0x85(%ebp) <== NOT EXECUTED
13e824: 74 6d je 13e893 <rtems_rfs_dir_del_entry+0x1ff><== NOT EXECUTED
rc = EIO;
break;
}
entry += elength;
eoffset += elength;
13e826: 01 da add %ebx,%edx <== NOT EXECUTED
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
13e828: 3b 55 80 cmp -0x80(%ebp),%edx <== NOT EXECUTED
13e82b: 0f 83 8f 00 00 00 jae 13e8c0 <rtems_rfs_dir_del_entry+0x22c><== NOT EXECUTED
{
rc = EIO;
break;
}
entry += elength;
13e831: 01 df add %ebx,%edi <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
13e833: 8d 47 08 lea 0x8(%edi),%eax <== NOT EXECUTED
13e836: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) <== NOT EXECUTED
13e83c: 8d 4f 09 lea 0x9(%edi),%ecx <== NOT EXECUTED
13e83f: 89 8d 74 ff ff ff mov %ecx,-0x8c(%ebp) <== NOT EXECUTED
13e845: 0f b6 5f 08 movzbl 0x8(%edi),%ebx <== NOT EXECUTED
13e849: c1 e3 08 shl $0x8,%ebx <== NOT EXECUTED
13e84c: 0f b6 47 09 movzbl 0x9(%edi),%eax <== NOT EXECUTED
13e850: 09 c3 or %eax,%ebx <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
13e852: 0f b6 37 movzbl (%edi),%esi <== NOT EXECUTED
13e855: 8a 4f 01 mov 0x1(%edi),%cl <== NOT EXECUTED
13e858: 8a 47 02 mov 0x2(%edi),%al <== NOT EXECUTED
13e85b: 88 45 84 mov %al,-0x7c(%ebp) <== NOT EXECUTED
13e85e: 8a 47 03 mov 0x3(%edi),%al <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
13e861: 81 fb ff ff 00 00 cmp $0xffff,%ebx <== NOT EXECUTED
13e867: 74 57 je 13e8c0 <rtems_rfs_dir_del_entry+0x22c><== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
13e869: 83 fb 0a cmp $0xa,%ebx <== NOT EXECUTED
13e86c: 7e 25 jle 13e893 <rtems_rfs_dir_del_entry+0x1ff><== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
13e86e: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
13e871: c1 e6 18 shl $0x18,%esi <== NOT EXECUTED
13e874: 09 f0 or %esi,%eax <== NOT EXECUTED
13e876: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED
13e879: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13e87c: 09 c8 or %ecx,%eax <== NOT EXECUTED
13e87e: 0f b6 4d 84 movzbl -0x7c(%ebp),%ecx <== NOT EXECUTED
13e882: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
13e885: 09 c8 or %ecx,%eax <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
13e887: 3b 9d 7c ff ff ff cmp -0x84(%ebp),%ebx <== NOT EXECUTED
13e88d: 0f 82 71 ff ff ff jb 13e804 <rtems_rfs_dir_del_entry+0x170><== NOT EXECUTED
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
13e893: be 05 00 00 00 mov $0x5,%esi <== NOT EXECUTED
13e898: eb 36 jmp 13e8d0 <rtems_rfs_dir_del_entry+0x23c><== NOT EXECUTED
13e89a: 66 90 xchg %ax,%ax <== NOT EXECUTED
* skip to the offset in the block.
*/
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
13e89c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13e89f: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
13e8a2: 89 85 6c ff ff ff mov %eax,-0x94(%ebp) <== NOT EXECUTED
13e8a8: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
13e8ab: 31 d2 xor %edx,%edx <== NOT EXECUTED
13e8ad: f7 b5 6c ff ff ff divl -0x94(%ebp) <== NOT EXECUTED
13e8b3: 89 95 64 ff ff ff mov %edx,-0x9c(%ebp) <== NOT EXECUTED
13e8b9: 89 d0 mov %edx,%eax <== NOT EXECUTED
13e8bb: e9 b1 fe ff ff jmp 13e771 <rtems_rfs_dir_del_entry+0xdd><== NOT EXECUTED
entry += elength;
eoffset += elength;
}
if (rc == 0)
13e8c0: 8b 9d 68 ff ff ff mov -0x98(%ebp),%ebx <== NOT EXECUTED
13e8c6: 85 db test %ebx,%ebx <== NOT EXECUTED
13e8c8: 74 2a je 13e8f4 <rtems_rfs_dir_del_entry+0x260><== NOT EXECUTED
13e8ca: 8b b5 68 ff ff ff mov -0x98(%ebp),%esi <== NOT EXECUTED
if (rc == ENXIO)
rc = ENOENT;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
13e8d0: 8d 55 d8 lea -0x28(%ebp),%edx <== NOT EXECUTED
13e8d3: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13e8d6: e8 51 fa ff ff call 13e32c <rtems_rfs_buffer_handle_close><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
13e8db: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13e8de: 8d 55 88 lea -0x78(%ebp),%edx <== NOT EXECUTED
13e8e1: 52 push %edx <== NOT EXECUTED
13e8e2: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e8e5: e8 46 f2 ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
return rc;
13e8ea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e8ed: e9 c6 fd ff ff jmp 13e6b8 <rtems_rfs_dir_del_entry+0x24><== NOT EXECUTED
13e8f2: 66 90 xchg %ax,%ax <== NOT EXECUTED
eoffset += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
13e8f4: 51 push %ecx <== NOT EXECUTED
13e8f5: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED
13e8f8: 51 push %ecx <== NOT EXECUTED
13e8f9: 8d 45 88 lea -0x78(%ebp),%eax <== NOT EXECUTED
13e8fc: 50 push %eax <== NOT EXECUTED
13e8fd: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e900: e8 23 ea ff ff call 13d328 <rtems_rfs_block_map_next_block><== NOT EXECUTED
13e905: 89 85 68 ff ff ff mov %eax,-0x98(%ebp) <== NOT EXECUTED
if (rc == ENXIO)
13e90b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e90e: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
13e911: 0f 84 ac 00 00 00 je 13e9c3 <rtems_rfs_dir_del_entry+0x32f><== NOT EXECUTED
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
13e917: 8b 95 68 ff ff ff mov -0x98(%ebp),%edx <== NOT EXECUTED
13e91d: 85 d2 test %edx,%edx <== NOT EXECUTED
13e91f: 0f 84 05 fe ff ff je 13e72a <rtems_rfs_dir_del_entry+0x96><== NOT EXECUTED
13e925: eb a3 jmp 13e8ca <rtems_rfs_dir_del_entry+0x236><== NOT EXECUTED
13e927: 90 nop <== NOT EXECUTED
13e928: 89 55 84 mov %edx,-0x7c(%ebp) <== NOT EXECUTED
}
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
13e92b: 89 d6 mov %edx,%esi <== NOT EXECUTED
13e92d: 01 de add %ebx,%esi <== NOT EXECUTED
13e92f: 8b 85 6c ff ff ff mov -0x94(%ebp),%eax <== NOT EXECUTED
13e935: 29 f0 sub %esi,%eax <== NOT EXECUTED
13e937: 89 c6 mov %eax,%esi <== NOT EXECUTED
memmove (entry, entry + elength, remaining);
13e939: 50 push %eax <== NOT EXECUTED
13e93a: 56 push %esi <== NOT EXECUTED
13e93b: 8d 04 1f lea (%edi,%ebx,1),%eax <== NOT EXECUTED
13e93e: 50 push %eax <== NOT EXECUTED
13e93f: 57 push %edi <== NOT EXECUTED
13e940: e8 db c2 00 00 call 14ac20 <memmove> <== NOT EXECUTED
memset (entry + remaining, 0xff, elength);
13e945: 8d 34 37 lea (%edi,%esi,1),%esi <== NOT EXECUTED
13e948: b0 ff mov $0xff,%al <== NOT EXECUTED
13e94a: 89 f7 mov %esi,%edi <== NOT EXECUTED
13e94c: 89 d9 mov %ebx,%ecx <== NOT EXECUTED
13e94e: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
* block and it is the last block in the map shrink the map.
*
* @note We could check again to see if the new end block in the map is
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
13e950: 8b 95 70 ff ff ff mov -0x90(%ebp),%edx <== NOT EXECUTED
13e956: 0f b6 02 movzbl (%edx),%eax <== NOT EXECUTED
13e959: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
13e95c: 8b 8d 74 ff ff ff mov -0x8c(%ebp),%ecx <== NOT EXECUTED
13e962: 0f b6 11 movzbl (%ecx),%edx <== NOT EXECUTED
13e965: 09 d0 or %edx,%eax <== NOT EXECUTED
13e967: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e96a: 3d ff ff 00 00 cmp $0xffff,%eax <== NOT EXECUTED
13e96f: 74 28 je 13e999 <rtems_rfs_dir_del_entry+0x305><== NOT EXECUTED
"block map shrink failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
}
}
rtems_rfs_buffer_mark_dirty (&buffer);
13e971: c6 45 d8 01 movb $0x1,-0x28(%ebp) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
13e975: 8d 55 d8 lea -0x28(%ebp),%edx <== NOT EXECUTED
13e978: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13e97b: e8 ac f9 ff ff call 13e32c <rtems_rfs_buffer_handle_close><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
13e980: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13e983: 8d 55 88 lea -0x78(%ebp),%edx <== NOT EXECUTED
13e986: 52 push %edx <== NOT EXECUTED
13e987: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e98a: e8 a1 f1 ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
13e98f: 31 f6 xor %esi,%esi <== NOT EXECUTED
return 0;
13e991: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e994: e9 1f fd ff ff jmp 13e6b8 <rtems_rfs_dir_del_entry+0x24><== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
13e999: 8b 7d 84 mov -0x7c(%ebp),%edi <== NOT EXECUTED
13e99c: 85 ff test %edi,%edi <== NOT EXECUTED
13e99e: 75 d1 jne 13e971 <rtems_rfs_dir_del_entry+0x2dd><== NOT EXECUTED
(eoffset == 0) && rtems_rfs_block_map_last (&map))
13e9a0: 8b 45 98 mov -0x68(%ebp),%eax <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
13e9a3: 85 c0 test %eax,%eax <== NOT EXECUTED
13e9a5: 74 26 je 13e9cd <rtems_rfs_dir_del_entry+0x339><== NOT EXECUTED
13e9a7: 8b 55 90 mov -0x70(%ebp),%edx <== NOT EXECUTED
13e9aa: 4a dec %edx <== NOT EXECUTED
13e9ab: 39 d0 cmp %edx,%eax <== NOT EXECUTED
13e9ad: 75 c2 jne 13e971 <rtems_rfs_dir_del_entry+0x2dd><== NOT EXECUTED
(eoffset == 0) && rtems_rfs_block_map_last (&map))
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
13e9af: 56 push %esi <== NOT EXECUTED
13e9b0: 6a 01 push $0x1 <== NOT EXECUTED
13e9b2: 8d 45 88 lea -0x78(%ebp),%eax <== NOT EXECUTED
13e9b5: 50 push %eax <== NOT EXECUTED
13e9b6: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e9b9: e8 a2 ea ff ff call 13d460 <rtems_rfs_block_map_shrink><== NOT EXECUTED
13e9be: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e9c1: eb ae jmp 13e971 <rtems_rfs_dir_del_entry+0x2dd><== NOT EXECUTED
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
13e9c3: be 02 00 00 00 mov $0x2,%esi <== NOT EXECUTED
13e9c8: e9 03 ff ff ff jmp 13e8d0 <rtems_rfs_dir_del_entry+0x23c><== NOT EXECUTED
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
(eoffset == 0) && rtems_rfs_block_map_last (&map))
13e9cd: 8b 55 90 mov -0x70(%ebp),%edx <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
13e9d0: 85 d2 test %edx,%edx <== NOT EXECUTED
13e9d2: 74 db je 13e9af <rtems_rfs_dir_del_entry+0x31b><== NOT EXECUTED
13e9d4: eb d4 jmp 13e9aa <rtems_rfs_dir_del_entry+0x316><== NOT EXECUTED
0013f028 <rtems_rfs_dir_empty>:
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
13f028: 55 push %ebp <== NOT EXECUTED
13f029: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13f02b: 57 push %edi <== NOT EXECUTED
13f02c: 56 push %esi <== NOT EXECUTED
13f02d: 53 push %ebx <== NOT EXECUTED
13f02e: 83 c4 80 add $0xffffff80,%esp <== NOT EXECUTED
13f031: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
13f034: 8d 45 88 lea -0x78(%ebp),%eax <== NOT EXECUTED
13f037: 50 push %eax <== NOT EXECUTED
13f038: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13f03b: 53 push %ebx <== NOT EXECUTED
13f03c: e8 9b ec ff ff call 13dcdc <rtems_rfs_block_map_open><== NOT EXECUTED
13f041: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) <== NOT EXECUTED
if (rc > 0)
13f047: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f04a: 85 c0 test %eax,%eax <== NOT EXECUTED
13f04c: 7e 0e jle 13f05c <rtems_rfs_dir_empty+0x34><== NOT EXECUTED
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
13f04e: 8b 85 78 ff ff ff mov -0x88(%ebp),%eax <== NOT EXECUTED
13f054: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13f057: 5b pop %ebx <== NOT EXECUTED
13f058: 5e pop %esi <== NOT EXECUTED
13f059: 5f pop %edi <== NOT EXECUTED
13f05a: c9 leave <== NOT EXECUTED
13f05b: c3 ret <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
13f05c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13f05f: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED
13f062: 51 push %ecx <== NOT EXECUTED
13f063: 6a 00 push $0x0 <== NOT EXECUTED
13f065: 6a 00 push $0x0 <== NOT EXECUTED
13f067: 8d 75 88 lea -0x78(%ebp),%esi <== NOT EXECUTED
13f06a: 56 push %esi <== NOT EXECUTED
13f06b: 53 push %ebx <== NOT EXECUTED
13f06c: e8 e7 e2 ff ff call 13d358 <rtems_rfs_block_map_seek><== NOT EXECUTED
13f071: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) <== NOT EXECUTED
if (rc > 0)
13f077: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13f07a: 85 c0 test %eax,%eax <== NOT EXECUTED
13f07c: 0f 8f be 01 00 00 jg 13f240 <rtems_rfs_dir_empty+0x218><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
13f082: c6 45 d8 00 movb $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->bnum = 0;
13f086: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
13f08d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
13f094: 6a 01 push $0x1 <== NOT EXECUTED
13f096: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13f099: 8d 4d d8 lea -0x28(%ebp),%ecx <== NOT EXECUTED
13f09c: 51 push %ecx <== NOT EXECUTED
13f09d: 53 push %ebx <== NOT EXECUTED
13f09e: e8 89 f0 ff ff call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
13f0a3: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) <== NOT EXECUTED
if (rc > 0)
13f0a9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f0ac: 85 c0 test %eax,%eax <== NOT EXECUTED
13f0ae: 0f 8f 18 01 00 00 jg 13f1cc <rtems_rfs_dir_empty+0x1a4><== NOT EXECUTED
break;
entry = rtems_rfs_buffer_data (&buffer);
13f0b4: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13f0b7: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
13f0ba: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
13f0bd: 83 e8 0a sub $0xa,%eax <== NOT EXECUTED
13f0c0: 89 85 7c ff ff ff mov %eax,-0x84(%ebp) <== NOT EXECUTED
13f0c6: 0f 84 3e 01 00 00 je 13f20a <rtems_rfs_dir_empty+0x1e2><== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
13f0cc: 0f b6 42 08 movzbl 0x8(%edx),%eax <== NOT EXECUTED
13f0d0: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
13f0d3: 0f b6 4a 09 movzbl 0x9(%edx),%ecx <== NOT EXECUTED
13f0d7: 09 c8 or %ecx,%eax <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
13f0d9: 0f b6 3a movzbl (%edx),%edi <== NOT EXECUTED
13f0dc: 0f b6 72 01 movzbl 0x1(%edx),%esi <== NOT EXECUTED
13f0e0: 8a 4a 02 mov 0x2(%edx),%cl <== NOT EXECUTED
13f0e3: 88 4d 87 mov %cl,-0x79(%ebp) <== NOT EXECUTED
13f0e6: 8a 4a 03 mov 0x3(%edx),%cl <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
13f0e9: 3d ff ff 00 00 cmp $0xffff,%eax <== NOT EXECUTED
13f0ee: 0f 84 16 01 00 00 je 13f20a <rtems_rfs_dir_empty+0x1e2><== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
13f0f4: 83 f8 0a cmp $0xa,%eax <== NOT EXECUTED
13f0f7: 0f 8e 0d 01 00 00 jle 13f20a <rtems_rfs_dir_empty+0x1e2><== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
13f0fd: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED
13f100: c1 e7 18 shl $0x18,%edi <== NOT EXECUTED
13f103: 09 f9 or %edi,%ecx <== NOT EXECUTED
13f105: 81 e6 ff 00 00 00 and $0xff,%esi <== NOT EXECUTED
13f10b: c1 e6 10 shl $0x10,%esi <== NOT EXECUTED
13f10e: 09 f1 or %esi,%ecx <== NOT EXECUTED
13f110: 0f b6 75 87 movzbl -0x79(%ebp),%esi <== NOT EXECUTED
13f114: c1 e6 08 shl $0x8,%esi <== NOT EXECUTED
13f117: 09 f1 or %esi,%ecx <== NOT EXECUTED
13f119: 8b 73 18 mov 0x18(%ebx),%esi <== NOT EXECUTED
13f11c: 89 75 80 mov %esi,-0x80(%ebp) <== NOT EXECUTED
13f11f: 31 f6 xor %esi,%esi <== NOT EXECUTED
13f121: 89 df mov %ebx,%edi <== NOT EXECUTED
13f123: eb 74 jmp 13f199 <rtems_rfs_dir_empty+0x171><== NOT EXECUTED
13f125: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
13f128: 83 f8 0c cmp $0xc,%eax <== NOT EXECUTED
13f12b: 0f 85 85 00 00 00 jne 13f1b6 <rtems_rfs_dir_empty+0x18e><== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 2)) ||
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.') ||
13f131: 80 7a 0a 2e cmpb $0x2e,0xa(%edx) <== NOT EXECUTED
13f135: 75 7f jne 13f1b6 <rtems_rfs_dir_empty+0x18e><== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE + 1] != '.')))
13f137: 80 7a 0b 2e cmpb $0x2e,0xb(%edx) <== NOT EXECUTED
13f13b: 75 79 jne 13f1b6 <rtems_rfs_dir_empty+0x18e><== NOT EXECUTED
empty = false;
break;
}
entry += elength;
offset += elength;
13f13d: 01 c6 add %eax,%esi <== NOT EXECUTED
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
13f13f: 3b b5 7c ff ff ff cmp -0x84(%ebp),%esi <== NOT EXECUTED
13f145: 0f 83 bd 00 00 00 jae 13f208 <rtems_rfs_dir_empty+0x1e0><== NOT EXECUTED
{
empty = false;
break;
}
entry += elength;
13f14b: 01 c2 add %eax,%edx <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
13f14d: 0f b6 42 08 movzbl 0x8(%edx),%eax <== NOT EXECUTED
13f151: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
13f154: 0f b6 4a 09 movzbl 0x9(%edx),%ecx <== NOT EXECUTED
13f158: 09 c8 or %ecx,%eax <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
13f15a: 8a 1a mov (%edx),%bl <== NOT EXECUTED
13f15c: 8a 4a 01 mov 0x1(%edx),%cl <== NOT EXECUTED
13f15f: 88 4d 86 mov %cl,-0x7a(%ebp) <== NOT EXECUTED
13f162: 8a 4a 02 mov 0x2(%edx),%cl <== NOT EXECUTED
13f165: 88 4d 87 mov %cl,-0x79(%ebp) <== NOT EXECUTED
13f168: 8a 4a 03 mov 0x3(%edx),%cl <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
13f16b: 3d ff ff 00 00 cmp $0xffff,%eax <== NOT EXECUTED
13f170: 0f 84 92 00 00 00 je 13f208 <rtems_rfs_dir_empty+0x1e0><== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
13f176: 83 f8 0a cmp $0xa,%eax <== NOT EXECUTED
13f179: 0f 8e 89 00 00 00 jle 13f208 <rtems_rfs_dir_empty+0x1e0><== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
13f17f: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED
13f182: c1 e3 18 shl $0x18,%ebx <== NOT EXECUTED
13f185: 09 d9 or %ebx,%ecx <== NOT EXECUTED
13f187: 0f b6 5d 86 movzbl -0x7a(%ebp),%ebx <== NOT EXECUTED
13f18b: c1 e3 10 shl $0x10,%ebx <== NOT EXECUTED
13f18e: 09 d9 or %ebx,%ecx <== NOT EXECUTED
13f190: 0f b6 5d 87 movzbl -0x79(%ebp),%ebx <== NOT EXECUTED
13f194: c1 e3 08 shl $0x8,%ebx <== NOT EXECUTED
13f197: 09 d9 or %ebx,%ecx <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
13f199: 39 45 80 cmp %eax,-0x80(%ebp) <== NOT EXECUTED
13f19c: 76 6a jbe 13f208 <rtems_rfs_dir_empty+0x1e0><== NOT EXECUTED
13f19e: 85 c9 test %ecx,%ecx <== NOT EXECUTED
13f1a0: 74 66 je 13f208 <rtems_rfs_dir_empty+0x1e0><== NOT EXECUTED
13f1a2: 39 4f 10 cmp %ecx,0x10(%edi) <== NOT EXECUTED
13f1a5: 72 61 jb 13f208 <rtems_rfs_dir_empty+0x1e0><== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
13f1a7: 83 f8 0b cmp $0xb,%eax <== NOT EXECUTED
13f1aa: 0f 85 78 ff ff ff jne 13f128 <rtems_rfs_dir_empty+0x100><== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
13f1b0: 80 7a 0a 2e cmpb $0x2e,0xa(%edx) <== NOT EXECUTED
13f1b4: 74 87 je 13f13d <rtems_rfs_dir_empty+0x115><== NOT EXECUTED
13f1b6: 89 fb mov %edi,%ebx <== NOT EXECUTED
break;
}
}
}
if ((rc == 0) && !empty)
13f1b8: 8b 95 78 ff ff ff mov -0x88(%ebp),%edx <== NOT EXECUTED
13f1be: 85 d2 test %edx,%edx <== NOT EXECUTED
13f1c0: 75 0a jne 13f1cc <rtems_rfs_dir_empty+0x1a4><== NOT EXECUTED
13f1c2: c7 85 78 ff ff ff 5a movl $0x5a,-0x88(%ebp) <== NOT EXECUTED
13f1c9: 00 00 00
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
13f1cc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13f1cf: 8d 4d d8 lea -0x28(%ebp),%ecx <== NOT EXECUTED
13f1d2: 51 push %ecx <== NOT EXECUTED
13f1d3: 53 push %ebx <== NOT EXECUTED
13f1d4: e8 4f ee ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
13f1d9: c6 45 d8 00 movb $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->bnum = 0;
13f1dd: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
13f1e4: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
13f1eb: 5f pop %edi <== NOT EXECUTED
13f1ec: 58 pop %eax <== NOT EXECUTED
13f1ed: 8d 75 88 lea -0x78(%ebp),%esi <== NOT EXECUTED
13f1f0: 56 push %esi <== NOT EXECUTED
13f1f1: 53 push %ebx <== NOT EXECUTED
13f1f2: e8 39 e9 ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
return rc;
13f1f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
13f1fa: 8b 85 78 ff ff ff mov -0x88(%ebp),%eax <== NOT EXECUTED
13f200: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13f203: 5b pop %ebx <== NOT EXECUTED
13f204: 5e pop %esi <== NOT EXECUTED
13f205: 5f pop %edi <== NOT EXECUTED
13f206: c9 leave <== NOT EXECUTED
13f207: c3 ret <== NOT EXECUTED
13f208: 89 fb mov %edi,%ebx <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
13f20a: 51 push %ecx <== NOT EXECUTED
13f20b: 8d 75 e4 lea -0x1c(%ebp),%esi <== NOT EXECUTED
13f20e: 56 push %esi <== NOT EXECUTED
13f20f: 8d 45 88 lea -0x78(%ebp),%eax <== NOT EXECUTED
13f212: 50 push %eax <== NOT EXECUTED
13f213: 53 push %ebx <== NOT EXECUTED
13f214: e8 0f e1 ff ff call 13d328 <rtems_rfs_block_map_next_block><== NOT EXECUTED
13f219: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) <== NOT EXECUTED
if (rc > 0)
13f21f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f222: 85 c0 test %eax,%eax <== NOT EXECUTED
13f224: 0f 8e 6a fe ff ff jle 13f094 <rtems_rfs_dir_empty+0x6c><== NOT EXECUTED
{
if (rc == ENXIO)
13f22a: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
13f22d: 0f 95 c0 setne %al <== NOT EXECUTED
13f230: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
13f233: f7 d8 neg %eax <== NOT EXECUTED
13f235: 21 85 78 ff ff ff and %eax,-0x88(%ebp) <== NOT EXECUTED
13f23b: eb 8f jmp 13f1cc <rtems_rfs_dir_empty+0x1a4><== NOT EXECUTED
13f23d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
13f240: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13f243: 56 push %esi <== NOT EXECUTED
13f244: 53 push %ebx <== NOT EXECUTED
13f245: e8 e6 e8 ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
return rc;
13f24a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f24d: e9 fc fd ff ff jmp 13f04e <rtems_rfs_dir_empty+0x26><== NOT EXECUTED
00147414 <rtems_rfs_dir_hash>:
*/
#define initval (20010928)
uint32_t
rtems_rfs_dir_hash (const void *key, size_t length)
{
147414: 55 push %ebp <== NOT EXECUTED
147415: 89 e5 mov %esp,%ebp <== NOT EXECUTED
147417: 57 push %edi <== NOT EXECUTED
147418: 56 push %esi <== NOT EXECUTED
147419: 53 push %ebx <== NOT EXECUTED
14741a: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
14741d: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
147420: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
uint32_t a,b,c; /* internal state */
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
147423: 8d 82 9f 16 df df lea -0x2020e961(%edx),%eax <== NOT EXECUTED
u.ptr = key;
if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
147429: f6 c3 03 test $0x3,%bl <== NOT EXECUTED
14742c: 75 72 jne 1474a0 <rtems_rfs_dir_hash+0x8c><== NOT EXECUTED
const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */
/*const uint8_t *k8;*/
/*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
while (length > 12)
14742e: 83 fa 0c cmp $0xc,%edx <== NOT EXECUTED
147431: 0f 86 d9 02 00 00 jbe 147710 <rtems_rfs_dir_hash+0x2fc><== NOT EXECUTED
147437: 89 c1 mov %eax,%ecx <== NOT EXECUTED
147439: 89 c7 mov %eax,%edi <== NOT EXECUTED
14743b: 90 nop <== NOT EXECUTED
{
a += k[0];
14743c: 8b 33 mov (%ebx),%esi <== NOT EXECUTED
14743e: 01 fe add %edi,%esi <== NOT EXECUTED
b += k[1];
147440: 03 4b 04 add 0x4(%ebx),%ecx <== NOT EXECUTED
c += k[2];
147443: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED
mix(a,b,c);
147446: 29 c6 sub %eax,%esi <== NOT EXECUTED
147448: 89 c7 mov %eax,%edi <== NOT EXECUTED
14744a: c1 cf 1c ror $0x1c,%edi <== NOT EXECUTED
14744d: 31 fe xor %edi,%esi <== NOT EXECUTED
14744f: 8d 3c 08 lea (%eax,%ecx,1),%edi <== NOT EXECUTED
147452: 29 f1 sub %esi,%ecx <== NOT EXECUTED
147454: 89 f0 mov %esi,%eax <== NOT EXECUTED
147456: c1 c8 1a ror $0x1a,%eax <== NOT EXECUTED
147459: 31 c8 xor %ecx,%eax <== NOT EXECUTED
14745b: 01 fe add %edi,%esi <== NOT EXECUTED
14745d: 29 c7 sub %eax,%edi <== NOT EXECUTED
14745f: 89 c1 mov %eax,%ecx <== NOT EXECUTED
147461: c1 c9 18 ror $0x18,%ecx <== NOT EXECUTED
147464: 31 f9 xor %edi,%ecx <== NOT EXECUTED
147466: 8d 3c 30 lea (%eax,%esi,1),%edi <== NOT EXECUTED
147469: 29 ce sub %ecx,%esi <== NOT EXECUTED
14746b: 89 c8 mov %ecx,%eax <== NOT EXECUTED
14746d: c1 c8 10 ror $0x10,%eax <== NOT EXECUTED
147470: 31 f0 xor %esi,%eax <== NOT EXECUTED
147472: 8d 34 39 lea (%ecx,%edi,1),%esi <== NOT EXECUTED
147475: 29 c7 sub %eax,%edi <== NOT EXECUTED
147477: 89 c1 mov %eax,%ecx <== NOT EXECUTED
147479: c1 c9 0d ror $0xd,%ecx <== NOT EXECUTED
14747c: 31 f9 xor %edi,%ecx <== NOT EXECUTED
14747e: 8d 3c 30 lea (%eax,%esi,1),%edi <== NOT EXECUTED
147481: 29 ce sub %ecx,%esi <== NOT EXECUTED
147483: 89 c8 mov %ecx,%eax <== NOT EXECUTED
147485: c1 c8 1c ror $0x1c,%eax <== NOT EXECUTED
147488: 31 f0 xor %esi,%eax <== NOT EXECUTED
14748a: 01 f9 add %edi,%ecx <== NOT EXECUTED
length -= 12;
14748c: 83 ea 0c sub $0xc,%edx <== NOT EXECUTED
k += 3;
14748f: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED
if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */
/*const uint8_t *k8;*/
/*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
while (length > 12)
147492: 83 fa 0c cmp $0xc,%edx <== NOT EXECUTED
147495: 77 a5 ja 14743c <rtems_rfs_dir_hash+0x28><== NOT EXECUTED
147497: 89 fe mov %edi,%esi <== NOT EXECUTED
* still catch it and complain. The masking trick does make the hash
* noticably faster for short strings (like English words).
*/
#ifndef VALGRIND
switch(length)
147499: ff 24 95 40 a1 16 00 jmp *0x16a140(,%edx,4) <== NOT EXECUTED
case 0 : return c;
}
#endif /* !valgrind */
} else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {
1474a0: f6 c3 01 test $0x1,%bl <== NOT EXECUTED
1474a3: 0f 85 af 00 00 00 jne 147558 <rtems_rfs_dir_hash+0x144><== NOT EXECUTED
const uint16_t *k = (const uint16_t *)key; /* read 16-bit chunks */
const uint8_t *k8;
/*--------------- all but last block: aligned reads and different mixing */
while (length > 12)
1474a9: 83 fa 0c cmp $0xc,%edx <== NOT EXECUTED
1474ac: 0f 86 8e 03 00 00 jbe 147840 <rtems_rfs_dir_hash+0x42c><== NOT EXECUTED
1474b2: 89 c1 mov %eax,%ecx <== NOT EXECUTED
1474b4: 89 c6 mov %eax,%esi <== NOT EXECUTED
1474b6: 89 55 f0 mov %edx,-0x10(%ebp) <== NOT EXECUTED
1474b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
a += k[0] + (((uint32_t)k[1])<<16);
1474bc: 0f b7 7b 02 movzwl 0x2(%ebx),%edi <== NOT EXECUTED
1474c0: c1 e7 10 shl $0x10,%edi <== NOT EXECUTED
1474c3: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED
1474c6: 8d 14 17 lea (%edi,%edx,1),%edx <== NOT EXECUTED
1474c9: 01 f2 add %esi,%edx <== NOT EXECUTED
b += k[2] + (((uint32_t)k[3])<<16);
1474cb: 0f b7 73 06 movzwl 0x6(%ebx),%esi <== NOT EXECUTED
1474cf: c1 e6 10 shl $0x10,%esi <== NOT EXECUTED
1474d2: 0f b7 7b 04 movzwl 0x4(%ebx),%edi <== NOT EXECUTED
1474d6: 01 fe add %edi,%esi <== NOT EXECUTED
1474d8: 8d 0c 0e lea (%esi,%ecx,1),%ecx <== NOT EXECUTED
c += k[4] + (((uint32_t)k[5])<<16);
1474db: 0f b7 73 0a movzwl 0xa(%ebx),%esi <== NOT EXECUTED
1474df: c1 e6 10 shl $0x10,%esi <== NOT EXECUTED
1474e2: 0f b7 7b 08 movzwl 0x8(%ebx),%edi <== NOT EXECUTED
1474e6: 8d 3c 3e lea (%esi,%edi,1),%edi <== NOT EXECUTED
1474e9: 01 c7 add %eax,%edi <== NOT EXECUTED
mix(a,b,c);
1474eb: 29 fa sub %edi,%edx <== NOT EXECUTED
1474ed: 89 f8 mov %edi,%eax <== NOT EXECUTED
1474ef: c1 c8 1c ror $0x1c,%eax <== NOT EXECUTED
1474f2: 31 c2 xor %eax,%edx <== NOT EXECUTED
1474f4: 01 cf add %ecx,%edi <== NOT EXECUTED
1474f6: 29 d1 sub %edx,%ecx <== NOT EXECUTED
1474f8: 89 d0 mov %edx,%eax <== NOT EXECUTED
1474fa: c1 c8 1a ror $0x1a,%eax <== NOT EXECUTED
1474fd: 31 c8 xor %ecx,%eax <== NOT EXECUTED
1474ff: 01 fa add %edi,%edx <== NOT EXECUTED
147501: 29 c7 sub %eax,%edi <== NOT EXECUTED
147503: 89 c1 mov %eax,%ecx <== NOT EXECUTED
147505: c1 c9 18 ror $0x18,%ecx <== NOT EXECUTED
147508: 31 f9 xor %edi,%ecx <== NOT EXECUTED
14750a: 8d 34 10 lea (%eax,%edx,1),%esi <== NOT EXECUTED
14750d: 29 ca sub %ecx,%edx <== NOT EXECUTED
14750f: 89 c8 mov %ecx,%eax <== NOT EXECUTED
147511: c1 c8 10 ror $0x10,%eax <== NOT EXECUTED
147514: 31 d0 xor %edx,%eax <== NOT EXECUTED
147516: 8d 14 31 lea (%ecx,%esi,1),%edx <== NOT EXECUTED
147519: 29 c6 sub %eax,%esi <== NOT EXECUTED
14751b: 89 c1 mov %eax,%ecx <== NOT EXECUTED
14751d: c1 c9 0d ror $0xd,%ecx <== NOT EXECUTED
147520: 31 f1 xor %esi,%ecx <== NOT EXECUTED
147522: 8d 34 10 lea (%eax,%edx,1),%esi <== NOT EXECUTED
147525: 29 ca sub %ecx,%edx <== NOT EXECUTED
147527: 89 c8 mov %ecx,%eax <== NOT EXECUTED
147529: c1 c8 1c ror $0x1c,%eax <== NOT EXECUTED
14752c: 31 d0 xor %edx,%eax <== NOT EXECUTED
14752e: 01 f1 add %esi,%ecx <== NOT EXECUTED
length -= 12;
147530: 83 6d f0 0c subl $0xc,-0x10(%ebp) <== NOT EXECUTED
k += 6;
147534: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED
} else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {
const uint16_t *k = (const uint16_t *)key; /* read 16-bit chunks */
const uint8_t *k8;
/*--------------- all but last block: aligned reads and different mixing */
while (length > 12)
147537: 83 7d f0 0c cmpl $0xc,-0x10(%ebp) <== NOT EXECUTED
14753b: 0f 87 7b ff ff ff ja 1474bc <rtems_rfs_dir_hash+0xa8><== NOT EXECUTED
147541: 89 f7 mov %esi,%edi <== NOT EXECUTED
147543: 8b 55 f0 mov -0x10(%ebp),%edx <== NOT EXECUTED
k += 6;
}
/*----------------------------- handle the last (probably partial) block */
k8 = (const uint8_t *)k;
switch(length)
147546: 83 fa 0c cmp $0xc,%edx <== NOT EXECUTED
147549: 0f 86 89 01 00 00 jbe 1476d8 <rtems_rfs_dir_hash+0x2c4><== NOT EXECUTED
}
}
final(a,b,c);
return c;
}
14754f: 5a pop %edx <== NOT EXECUTED
147550: 5b pop %ebx <== NOT EXECUTED
147551: 5e pop %esi <== NOT EXECUTED
147552: 5f pop %edi <== NOT EXECUTED
147553: c9 leave <== NOT EXECUTED
147554: c3 ret <== NOT EXECUTED
147555: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
147558: 83 fa 0c cmp $0xc,%edx <== NOT EXECUTED
14755b: 0f 86 d6 02 00 00 jbe 147837 <rtems_rfs_dir_hash+0x423><== NOT EXECUTED
147561: 89 c1 mov %eax,%ecx <== NOT EXECUTED
147563: 89 c7 mov %eax,%edi <== NOT EXECUTED
147565: 89 55 f0 mov %edx,-0x10(%ebp) <== NOT EXECUTED
{
a += k[0];
147568: 0f b6 73 01 movzbl 0x1(%ebx),%esi <== NOT EXECUTED
14756c: c1 e6 08 shl $0x8,%esi <== NOT EXECUTED
14756f: 0f b6 53 02 movzbl 0x2(%ebx),%edx <== NOT EXECUTED
147573: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
147576: 8d 14 16 lea (%esi,%edx,1),%edx <== NOT EXECUTED
a += ((uint32_t)k[1])<<8;
147579: 0f b6 33 movzbl (%ebx),%esi <== NOT EXECUTED
14757c: 01 f2 add %esi,%edx <== NOT EXECUTED
a += ((uint32_t)k[2])<<16;
14757e: 0f b6 73 03 movzbl 0x3(%ebx),%esi <== NOT EXECUTED
147582: c1 e6 18 shl $0x18,%esi <== NOT EXECUTED
147585: 01 f2 add %esi,%edx <== NOT EXECUTED
a += ((uint32_t)k[3])<<24;
147587: 01 fa add %edi,%edx <== NOT EXECUTED
b += k[4];
147589: 0f b6 7b 05 movzbl 0x5(%ebx),%edi <== NOT EXECUTED
14758d: c1 e7 08 shl $0x8,%edi <== NOT EXECUTED
147590: 0f b6 73 06 movzbl 0x6(%ebx),%esi <== NOT EXECUTED
147594: c1 e6 10 shl $0x10,%esi <== NOT EXECUTED
147597: 8d 34 37 lea (%edi,%esi,1),%esi <== NOT EXECUTED
b += ((uint32_t)k[5])<<8;
14759a: 0f b6 7b 04 movzbl 0x4(%ebx),%edi <== NOT EXECUTED
14759e: 8d 3c 3e lea (%esi,%edi,1),%edi <== NOT EXECUTED
b += ((uint32_t)k[6])<<16;
1475a1: 0f b6 73 07 movzbl 0x7(%ebx),%esi <== NOT EXECUTED
1475a5: c1 e6 18 shl $0x18,%esi <== NOT EXECUTED
1475a8: 8d 34 37 lea (%edi,%esi,1),%esi <== NOT EXECUTED
b += ((uint32_t)k[7])<<24;
1475ab: 8d 0c 0e lea (%esi,%ecx,1),%ecx <== NOT EXECUTED
c += k[8];
1475ae: 0f b6 7b 09 movzbl 0x9(%ebx),%edi <== NOT EXECUTED
1475b2: c1 e7 08 shl $0x8,%edi <== NOT EXECUTED
1475b5: 0f b6 73 0a movzbl 0xa(%ebx),%esi <== NOT EXECUTED
1475b9: c1 e6 10 shl $0x10,%esi <== NOT EXECUTED
1475bc: 8d 34 37 lea (%edi,%esi,1),%esi <== NOT EXECUTED
c += ((uint32_t)k[9])<<8;
1475bf: 0f b6 7b 08 movzbl 0x8(%ebx),%edi <== NOT EXECUTED
1475c3: 8d 3c 3e lea (%esi,%edi,1),%edi <== NOT EXECUTED
c += ((uint32_t)k[10])<<16;
1475c6: 0f b6 73 0b movzbl 0xb(%ebx),%esi <== NOT EXECUTED
1475ca: c1 e6 18 shl $0x18,%esi <== NOT EXECUTED
1475cd: 8d 34 37 lea (%edi,%esi,1),%esi <== NOT EXECUTED
c += ((uint32_t)k[11])<<24;
1475d0: 01 c6 add %eax,%esi <== NOT EXECUTED
mix(a,b,c);
1475d2: 29 f2 sub %esi,%edx <== NOT EXECUTED
1475d4: 89 f0 mov %esi,%eax <== NOT EXECUTED
1475d6: c1 c8 1c ror $0x1c,%eax <== NOT EXECUTED
1475d9: 31 c2 xor %eax,%edx <== NOT EXECUTED
1475db: 01 ce add %ecx,%esi <== NOT EXECUTED
1475dd: 29 d1 sub %edx,%ecx <== NOT EXECUTED
1475df: 89 d0 mov %edx,%eax <== NOT EXECUTED
1475e1: c1 c8 1a ror $0x1a,%eax <== NOT EXECUTED
1475e4: 31 c8 xor %ecx,%eax <== NOT EXECUTED
1475e6: 01 f2 add %esi,%edx <== NOT EXECUTED
1475e8: 29 c6 sub %eax,%esi <== NOT EXECUTED
1475ea: 89 c1 mov %eax,%ecx <== NOT EXECUTED
1475ec: c1 c9 18 ror $0x18,%ecx <== NOT EXECUTED
1475ef: 31 f1 xor %esi,%ecx <== NOT EXECUTED
1475f1: 8d 34 10 lea (%eax,%edx,1),%esi <== NOT EXECUTED
1475f4: 29 ca sub %ecx,%edx <== NOT EXECUTED
1475f6: 89 c8 mov %ecx,%eax <== NOT EXECUTED
1475f8: c1 c8 10 ror $0x10,%eax <== NOT EXECUTED
1475fb: 31 d0 xor %edx,%eax <== NOT EXECUTED
1475fd: 8d 14 31 lea (%ecx,%esi,1),%edx <== NOT EXECUTED
147600: 29 c6 sub %eax,%esi <== NOT EXECUTED
147602: 89 c1 mov %eax,%ecx <== NOT EXECUTED
147604: c1 c9 0d ror $0xd,%ecx <== NOT EXECUTED
147607: 31 f1 xor %esi,%ecx <== NOT EXECUTED
147609: 8d 3c 10 lea (%eax,%edx,1),%edi <== NOT EXECUTED
14760c: 29 ca sub %ecx,%edx <== NOT EXECUTED
14760e: 89 c8 mov %ecx,%eax <== NOT EXECUTED
147610: c1 c8 1c ror $0x1c,%eax <== NOT EXECUTED
147613: 31 d0 xor %edx,%eax <== NOT EXECUTED
147615: 01 f9 add %edi,%ecx <== NOT EXECUTED
length -= 12;
147617: 83 6d f0 0c subl $0xc,-0x10(%ebp) <== NOT EXECUTED
k += 12;
14761b: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
14761e: 83 7d f0 0c cmpl $0xc,-0x10(%ebp) <== NOT EXECUTED
147622: 0f 87 40 ff ff ff ja 147568 <rtems_rfs_dir_hash+0x154><== NOT EXECUTED
147628: 8b 55 f0 mov -0x10(%ebp),%edx <== NOT EXECUTED
length -= 12;
k += 12;
}
/*-------------------------------- last block: affect all 32 bits of (c) */
switch(length) /* all the case statements fall through */
14762b: ff 24 95 74 a1 16 00 jmp *0x16a174(,%edx,4) <== NOT EXECUTED
{
case 12: c+=((uint32_t)k[11])<<24;
147632: 0f b6 53 0b movzbl 0xb(%ebx),%edx <== NOT EXECUTED
147636: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
147639: 01 d0 add %edx,%eax <== NOT EXECUTED
case 11: c+=((uint32_t)k[10])<<16;
14763b: 0f b6 53 0a movzbl 0xa(%ebx),%edx <== NOT EXECUTED
14763f: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
147642: 01 d0 add %edx,%eax <== NOT EXECUTED
case 10: c+=((uint32_t)k[9])<<8;
147644: 0f b6 53 09 movzbl 0x9(%ebx),%edx <== NOT EXECUTED
147648: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
14764b: 01 d0 add %edx,%eax <== NOT EXECUTED
case 9 : c+=k[8];
14764d: 0f b6 53 08 movzbl 0x8(%ebx),%edx <== NOT EXECUTED
147651: 01 d0 add %edx,%eax <== NOT EXECUTED
case 8 : b+=((uint32_t)k[7])<<24;
147653: 0f b6 53 07 movzbl 0x7(%ebx),%edx <== NOT EXECUTED
147657: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
14765a: 01 d1 add %edx,%ecx <== NOT EXECUTED
case 7 : b+=((uint32_t)k[6])<<16;
14765c: 0f b6 53 06 movzbl 0x6(%ebx),%edx <== NOT EXECUTED
147660: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
147663: 01 d1 add %edx,%ecx <== NOT EXECUTED
case 6 : b+=((uint32_t)k[5])<<8;
147665: 0f b6 53 05 movzbl 0x5(%ebx),%edx <== NOT EXECUTED
147669: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
14766c: 01 d1 add %edx,%ecx <== NOT EXECUTED
case 5 : b+=k[4];
14766e: 0f b6 53 04 movzbl 0x4(%ebx),%edx <== NOT EXECUTED
147672: 01 d1 add %edx,%ecx <== NOT EXECUTED
case 4 : a+=((uint32_t)k[3])<<24;
147674: 0f b6 53 03 movzbl 0x3(%ebx),%edx <== NOT EXECUTED
147678: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
14767b: 01 d7 add %edx,%edi <== NOT EXECUTED
case 3 : a+=((uint32_t)k[2])<<16;
14767d: 0f b6 53 02 movzbl 0x2(%ebx),%edx <== NOT EXECUTED
147681: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
147684: 01 d7 add %edx,%edi <== NOT EXECUTED
case 2 : a+=((uint32_t)k[1])<<8;
147686: 0f b6 53 01 movzbl 0x1(%ebx),%edx <== NOT EXECUTED
14768a: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
14768d: 01 d7 add %edx,%edi <== NOT EXECUTED
case 1 : a+=k[0];
14768f: 0f b6 33 movzbl (%ebx),%esi <== NOT EXECUTED
147692: 8d 34 37 lea (%edi,%esi,1),%esi <== NOT EXECUTED
break;
case 0 : return c;
}
}
final(a,b,c);
147695: 31 c8 xor %ecx,%eax <== NOT EXECUTED
147697: 89 ca mov %ecx,%edx <== NOT EXECUTED
147699: c1 ca 12 ror $0x12,%edx <== NOT EXECUTED
14769c: 29 d0 sub %edx,%eax <== NOT EXECUTED
14769e: 31 c6 xor %eax,%esi <== NOT EXECUTED
1476a0: 89 c2 mov %eax,%edx <== NOT EXECUTED
1476a2: c1 ca 15 ror $0x15,%edx <== NOT EXECUTED
1476a5: 29 d6 sub %edx,%esi <== NOT EXECUTED
1476a7: 31 f1 xor %esi,%ecx <== NOT EXECUTED
1476a9: 89 f2 mov %esi,%edx <== NOT EXECUTED
1476ab: c1 ca 07 ror $0x7,%edx <== NOT EXECUTED
1476ae: 29 d1 sub %edx,%ecx <== NOT EXECUTED
1476b0: 31 c8 xor %ecx,%eax <== NOT EXECUTED
1476b2: 89 ca mov %ecx,%edx <== NOT EXECUTED
1476b4: c1 ca 10 ror $0x10,%edx <== NOT EXECUTED
1476b7: 29 d0 sub %edx,%eax <== NOT EXECUTED
1476b9: 31 c6 xor %eax,%esi <== NOT EXECUTED
1476bb: 89 c2 mov %eax,%edx <== NOT EXECUTED
1476bd: c1 ca 1c ror $0x1c,%edx <== NOT EXECUTED
1476c0: 29 d6 sub %edx,%esi <== NOT EXECUTED
1476c2: 31 f1 xor %esi,%ecx <== NOT EXECUTED
1476c4: c1 ce 12 ror $0x12,%esi <== NOT EXECUTED
1476c7: 29 f1 sub %esi,%ecx <== NOT EXECUTED
1476c9: 31 c8 xor %ecx,%eax <== NOT EXECUTED
1476cb: c1 c9 08 ror $0x8,%ecx <== NOT EXECUTED
1476ce: 29 c8 sub %ecx,%eax <== NOT EXECUTED
return c;
}
1476d0: 5a pop %edx <== NOT EXECUTED
1476d1: 5b pop %ebx <== NOT EXECUTED
1476d2: 5e pop %esi <== NOT EXECUTED
1476d3: 5f pop %edi <== NOT EXECUTED
1476d4: c9 leave <== NOT EXECUTED
1476d5: c3 ret <== NOT EXECUTED
1476d6: 66 90 xchg %ax,%ax <== NOT EXECUTED
k += 6;
}
/*----------------------------- handle the last (probably partial) block */
k8 = (const uint8_t *)k;
switch(length)
1476d8: ff 24 95 a8 a1 16 00 jmp *0x16a1a8(,%edx,4) <== NOT EXECUTED
break;
case 7 : b+=((uint32_t)k8[6])<<16; /* fall through */
case 6 : b+=k[2];
a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 5 : b+=k8[4]; /* fall through */
1476df: 0f b6 53 04 movzbl 0x4(%ebx),%edx <== NOT EXECUTED
1476e3: 01 d1 add %edx,%ecx <== NOT EXECUTED
1476e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case 4 : a+=k[0]+(((uint32_t)k[1])<<16);
1476e8: 0f b7 33 movzwl (%ebx),%esi <== NOT EXECUTED
1476eb: 01 fe add %edi,%esi <== NOT EXECUTED
1476ed: 0f b7 53 02 movzwl 0x2(%ebx),%edx <== NOT EXECUTED
1476f1: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
1476f4: 01 d6 add %edx,%esi <== NOT EXECUTED
break;
1476f6: eb 9d jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
case 11: c+=((uint32_t)k8[10])<<16; /* fall through */
case 10: c+=k[4];
b+=k[2]+(((uint32_t)k[3])<<16);
a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 9 : c+=k8[8]; /* fall through */
1476f8: 0f b6 53 08 movzbl 0x8(%ebx),%edx <== NOT EXECUTED
1476fc: 01 d0 add %edx,%eax <== NOT EXECUTED
case 8 : b+=k[2]+(((uint32_t)k[3])<<16);
1476fe: 0f b7 53 04 movzwl 0x4(%ebx),%edx <== NOT EXECUTED
147702: 8d 0c 0a lea (%edx,%ecx,1),%ecx <== NOT EXECUTED
147705: 0f b7 53 06 movzwl 0x6(%ebx),%edx <== NOT EXECUTED
147709: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
14770c: 01 d1 add %edx,%ecx <== NOT EXECUTED
14770e: eb d8 jmp 1476e8 <rtems_rfs_dir_hash+0x2d4><== NOT EXECUTED
if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */
/*const uint8_t *k8;*/
/*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
while (length > 12)
147710: 89 c1 mov %eax,%ecx <== NOT EXECUTED
147712: 89 c6 mov %eax,%esi <== NOT EXECUTED
147714: e9 80 fd ff ff jmp 147499 <rtems_rfs_dir_hash+0x85><== NOT EXECUTED
*/
#ifndef VALGRIND
switch(length)
{
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
147719: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED
14771c: 03 4b 04 add 0x4(%ebx),%ecx <== NOT EXECUTED
14771f: 03 33 add (%ebx),%esi <== NOT EXECUTED
147721: e9 6f ff ff ff jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
case 6 : b+=k[1]&0xffff; a+=k[0]; break;
case 5 : b+=k[1]&0xff; a+=k[0]; break;
case 4 : a+=k[0]; break;
case 3 : a+=k[0]&0xffffff; break;
case 2 : a+=k[0]&0xffff; break;
case 1 : a+=k[0]&0xff; break;
147726: 8b 13 mov (%ebx),%edx <== NOT EXECUTED
147728: 81 e2 ff 00 00 00 and $0xff,%edx <== NOT EXECUTED
14772e: 8d 34 32 lea (%edx,%esi,1),%esi <== NOT EXECUTED
147731: e9 5f ff ff ff jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
case 7 : b+=k[1]&0xffffff; a+=k[0]; break;
case 6 : b+=k[1]&0xffff; a+=k[0]; break;
case 5 : b+=k[1]&0xff; a+=k[0]; break;
case 4 : a+=k[0]; break;
case 3 : a+=k[0]&0xffffff; break;
case 2 : a+=k[0]&0xffff; break;
147736: 8b 13 mov (%ebx),%edx <== NOT EXECUTED
147738: 81 e2 ff ff 00 00 and $0xffff,%edx <== NOT EXECUTED
14773e: 8d 34 32 lea (%edx,%esi,1),%esi <== NOT EXECUTED
147741: e9 4f ff ff ff jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
case 8 : b+=k[1]; a+=k[0]; break;
case 7 : b+=k[1]&0xffffff; a+=k[0]; break;
case 6 : b+=k[1]&0xffff; a+=k[0]; break;
case 5 : b+=k[1]&0xff; a+=k[0]; break;
case 4 : a+=k[0]; break;
case 3 : a+=k[0]&0xffffff; break;
147746: 8b 13 mov (%ebx),%edx <== NOT EXECUTED
147748: 81 e2 ff ff ff 00 and $0xffffff,%edx <== NOT EXECUTED
14774e: 8d 34 32 lea (%edx,%esi,1),%esi <== NOT EXECUTED
147751: e9 3f ff ff ff jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
case 8 : b+=k[1]; a+=k[0]; break;
case 7 : b+=k[1]&0xffffff; a+=k[0]; break;
case 6 : b+=k[1]&0xffff; a+=k[0]; break;
case 5 : b+=k[1]&0xff; a+=k[0]; break;
case 4 : a+=k[0]; break;
147756: 03 33 add (%ebx),%esi <== NOT EXECUTED
147758: e9 38 ff ff ff jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
case 8 : b+=k[1]; a+=k[0]; break;
case 7 : b+=k[1]&0xffffff; a+=k[0]; break;
case 6 : b+=k[1]&0xffff; a+=k[0]; break;
case 5 : b+=k[1]&0xff; a+=k[0]; break;
14775d: 8b 53 04 mov 0x4(%ebx),%edx <== NOT EXECUTED
147760: 81 e2 ff 00 00 00 and $0xff,%edx <== NOT EXECUTED
147766: 01 d1 add %edx,%ecx <== NOT EXECUTED
147768: 03 33 add (%ebx),%esi <== NOT EXECUTED
14776a: e9 26 ff ff ff jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
case 8 : b+=k[1]; a+=k[0]; break;
case 7 : b+=k[1]&0xffffff; a+=k[0]; break;
case 6 : b+=k[1]&0xffff; a+=k[0]; break;
14776f: 8b 53 04 mov 0x4(%ebx),%edx <== NOT EXECUTED
147772: 81 e2 ff ff 00 00 and $0xffff,%edx <== NOT EXECUTED
147778: 01 d1 add %edx,%ecx <== NOT EXECUTED
14777a: 03 33 add (%ebx),%esi <== NOT EXECUTED
14777c: e9 14 ff ff ff jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
case 8 : b+=k[1]; a+=k[0]; break;
case 7 : b+=k[1]&0xffffff; a+=k[0]; break;
147781: 8b 53 04 mov 0x4(%ebx),%edx <== NOT EXECUTED
147784: 81 e2 ff ff ff 00 and $0xffffff,%edx <== NOT EXECUTED
14778a: 01 d1 add %edx,%ecx <== NOT EXECUTED
14778c: 03 33 add (%ebx),%esi <== NOT EXECUTED
14778e: e9 02 ff ff ff jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
{
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
case 8 : b+=k[1]; a+=k[0]; break;
147793: 03 4b 04 add 0x4(%ebx),%ecx <== NOT EXECUTED
147796: 03 33 add (%ebx),%esi <== NOT EXECUTED
147798: e9 f8 fe ff ff jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
switch(length)
{
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
14779d: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED
1477a0: 81 e2 ff 00 00 00 and $0xff,%edx <== NOT EXECUTED
1477a6: 01 d0 add %edx,%eax <== NOT EXECUTED
1477a8: 03 4b 04 add 0x4(%ebx),%ecx <== NOT EXECUTED
1477ab: 03 33 add (%ebx),%esi <== NOT EXECUTED
1477ad: e9 e3 fe ff ff jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
switch(length)
{
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
1477b2: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED
1477b5: 81 e2 ff ff 00 00 and $0xffff,%edx <== NOT EXECUTED
1477bb: 01 d0 add %edx,%eax <== NOT EXECUTED
1477bd: 03 4b 04 add 0x4(%ebx),%ecx <== NOT EXECUTED
1477c0: 03 33 add (%ebx),%esi <== NOT EXECUTED
1477c2: e9 ce fe ff ff jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
#ifndef VALGRIND
switch(length)
{
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
1477c7: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED
1477ca: 81 e2 ff ff ff 00 and $0xffffff,%edx <== NOT EXECUTED
1477d0: 01 d0 add %edx,%eax <== NOT EXECUTED
1477d2: 03 4b 04 add 0x4(%ebx),%ecx <== NOT EXECUTED
1477d5: 03 33 add (%ebx),%esi <== NOT EXECUTED
1477d7: e9 b9 fe ff ff jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
{
case 12: c+=k[4]+(((uint32_t)k[5])<<16);
b+=k[2]+(((uint32_t)k[3])<<16);
a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 11: c+=((uint32_t)k8[10])<<16; /* fall through */
1477dc: 0f b6 53 0a movzbl 0xa(%ebx),%edx <== NOT EXECUTED
1477e0: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
1477e3: 01 d0 add %edx,%eax <== NOT EXECUTED
case 10: c+=k[4];
1477e5: 0f b7 53 08 movzwl 0x8(%ebx),%edx <== NOT EXECUTED
1477e9: 01 d0 add %edx,%eax <== NOT EXECUTED
1477eb: e9 0e ff ff ff jmp 1476fe <rtems_rfs_dir_hash+0x2ea><== NOT EXECUTED
break;
case 9 : c+=k8[8]; /* fall through */
case 8 : b+=k[2]+(((uint32_t)k[3])<<16);
a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 7 : b+=((uint32_t)k8[6])<<16; /* fall through */
1477f0: 0f b6 53 06 movzbl 0x6(%ebx),%edx <== NOT EXECUTED
1477f4: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
1477f7: 01 d1 add %edx,%ecx <== NOT EXECUTED
case 6 : b+=k[2];
1477f9: 0f b7 53 04 movzwl 0x4(%ebx),%edx <== NOT EXECUTED
1477fd: 01 d1 add %edx,%ecx <== NOT EXECUTED
1477ff: e9 e4 fe ff ff jmp 1476e8 <rtems_rfs_dir_hash+0x2d4><== NOT EXECUTED
a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 5 : b+=k8[4]; /* fall through */
case 4 : a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 3 : a+=((uint32_t)k8[2])<<16; /* fall through */
147804: 0f b6 53 02 movzbl 0x2(%ebx),%edx <== NOT EXECUTED
147808: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
14780b: 01 d7 add %edx,%edi <== NOT EXECUTED
case 2 : a+=k[0];
14780d: 0f b7 33 movzwl (%ebx),%esi <== NOT EXECUTED
147810: 8d 34 37 lea (%edi,%esi,1),%esi <== NOT EXECUTED
break;
147813: e9 7d fe ff ff jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
case 1 : a+=k8[0];
147818: 0f b6 33 movzbl (%ebx),%esi <== NOT EXECUTED
14781b: 01 fe add %edi,%esi <== NOT EXECUTED
break;
14781d: e9 73 fe ff ff jmp 147695 <rtems_rfs_dir_hash+0x281><== NOT EXECUTED
/*----------------------------- handle the last (probably partial) block */
k8 = (const uint8_t *)k;
switch(length)
{
case 12: c+=k[4]+(((uint32_t)k[5])<<16);
147822: 0f b7 53 08 movzwl 0x8(%ebx),%edx <== NOT EXECUTED
147826: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED
147829: 0f b7 53 0a movzwl 0xa(%ebx),%edx <== NOT EXECUTED
14782d: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
147830: 01 d0 add %edx,%eax <== NOT EXECUTED
147832: e9 c7 fe ff ff jmp 1476fe <rtems_rfs_dir_hash+0x2ea><== NOT EXECUTED
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
147837: 89 c1 mov %eax,%ecx <== NOT EXECUTED
147839: 89 c7 mov %eax,%edi <== NOT EXECUTED
14783b: e9 eb fd ff ff jmp 14762b <rtems_rfs_dir_hash+0x217><== NOT EXECUTED
} else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {
const uint16_t *k = (const uint16_t *)key; /* read 16-bit chunks */
const uint8_t *k8;
/*--------------- all but last block: aligned reads and different mixing */
while (length > 12)
147840: 89 c1 mov %eax,%ecx <== NOT EXECUTED
147842: 89 c7 mov %eax,%edi <== NOT EXECUTED
147844: e9 fd fc ff ff jmp 147546 <rtems_rfs_dir_hash+0x132><== NOT EXECUTED
0013ed90 <rtems_rfs_dir_lookup_ino>:
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
13ed90: 55 push %ebp <== NOT EXECUTED
13ed91: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13ed93: 57 push %edi <== NOT EXECUTED
13ed94: 56 push %esi <== NOT EXECUTED
13ed95: 53 push %ebx <== NOT EXECUTED
13ed96: 83 c4 80 add $0xffffff80,%esp <== NOT EXECUTED
13ed99: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
13ed9c: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
13ed9f: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
*offset = 0;
13eda5: 8b 55 1c mov 0x1c(%ebp),%edx <== NOT EXECUTED
13eda8: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, inode, &map);
13edae: 8d 4d 88 lea -0x78(%ebp),%ecx <== NOT EXECUTED
13edb1: 51 push %ecx <== NOT EXECUTED
13edb2: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13edb5: 53 push %ebx <== NOT EXECUTED
13edb6: e8 21 ef ff ff call 13dcdc <rtems_rfs_block_map_open><== NOT EXECUTED
13edbb: 89 85 7c ff ff ff mov %eax,-0x84(%ebp) <== NOT EXECUTED
if (rc > 0)
13edc1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13edc4: 85 c0 test %eax,%eax <== NOT EXECUTED
13edc6: 7e 10 jle 13edd8 <rtems_rfs_dir_lookup_ino+0x48><== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
13edc8: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax <== NOT EXECUTED
13edce: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13edd1: 5b pop %ebx <== NOT EXECUTED
13edd2: 5e pop %esi <== NOT EXECUTED
13edd3: 5f pop %edi <== NOT EXECUTED
13edd4: c9 leave <== NOT EXECUTED
13edd5: c3 ret <== NOT EXECUTED
13edd6: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
13edd8: c6 45 d8 00 movb $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->bnum = 0;
13eddc: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
13ede3: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
13edea: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13eded: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
13edf0: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
13edf3: e8 1c 86 00 00 call 147414 <rtems_rfs_dir_hash> <== NOT EXECUTED
13edf8: 89 45 80 mov %eax,-0x80(%ebp) <== NOT EXECUTED
/*
* Locate the first block. The map points to the start after open so just
* seek 0. If an error the block will be 0.
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
13edfb: 8d 75 e4 lea -0x1c(%ebp),%esi <== NOT EXECUTED
13edfe: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
13ee01: 6a 00 push $0x0 <== NOT EXECUTED
13ee03: 6a 00 push $0x0 <== NOT EXECUTED
13ee05: 8d 45 88 lea -0x78(%ebp),%eax <== NOT EXECUTED
13ee08: 50 push %eax <== NOT EXECUTED
13ee09: 53 push %ebx <== NOT EXECUTED
13ee0a: e8 49 e5 ff ff call 13d358 <rtems_rfs_block_map_seek><== NOT EXECUTED
13ee0f: 89 85 7c ff ff ff mov %eax,-0x84(%ebp) <== NOT EXECUTED
if (rc > 0)
13ee15: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13ee18: 85 c0 test %eax,%eax <== NOT EXECUTED
13ee1a: 7e 6d jle 13ee89 <rtems_rfs_dir_lookup_ino+0xf9><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
rc, strerror (rc));
if (rc == ENXIO)
13ee1c: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
13ee1f: 75 0a jne 13ee2b <rtems_rfs_dir_lookup_ino+0x9b><== NOT EXECUTED
13ee21: c7 85 7c ff ff ff 02 movl $0x2,-0x84(%ebp) <== NOT EXECUTED
13ee28: 00 00 00
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
13ee2b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13ee2e: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
13ee31: 50 push %eax <== NOT EXECUTED
13ee32: 53 push %ebx <== NOT EXECUTED
13ee33: e8 f0 f1 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
13ee38: c6 45 d8 00 movb $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->bnum = 0;
13ee3c: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
13ee43: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
13ee4a: 59 pop %ecx <== NOT EXECUTED
13ee4b: 5e pop %esi <== NOT EXECUTED
13ee4c: 8d 55 88 lea -0x78(%ebp),%edx <== NOT EXECUTED
13ee4f: 52 push %edx <== NOT EXECUTED
13ee50: 53 push %ebx <== NOT EXECUTED
13ee51: e8 da ec ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
return rc;
13ee56: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
13ee59: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax <== NOT EXECUTED
13ee5f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13ee62: 5b pop %ebx <== NOT EXECUTED
13ee63: 5e pop %esi <== NOT EXECUTED
13ee64: 5f pop %edi <== NOT EXECUTED
13ee65: c9 leave <== NOT EXECUTED
13ee66: c3 ret <== NOT EXECUTED
13ee67: 90 nop <== NOT EXECUTED
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
13ee68: 56 push %esi <== NOT EXECUTED
13ee69: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
13ee6c: 52 push %edx <== NOT EXECUTED
13ee6d: 8d 4d 88 lea -0x78(%ebp),%ecx <== NOT EXECUTED
13ee70: 51 push %ecx <== NOT EXECUTED
13ee71: 53 push %ebx <== NOT EXECUTED
13ee72: e8 b1 e4 ff ff call 13d328 <rtems_rfs_block_map_next_block><== NOT EXECUTED
13ee77: 89 85 7c ff ff ff mov %eax,-0x84(%ebp) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
13ee7d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ee80: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
13ee83: 0f 84 6b 01 00 00 je 13eff4 <rtems_rfs_dir_lookup_ino+0x264><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
13ee89: 8b 8d 7c ff ff ff mov -0x84(%ebp),%ecx <== NOT EXECUTED
13ee8f: 85 c9 test %ecx,%ecx <== NOT EXECUTED
13ee91: 0f 85 67 01 00 00 jne 13effe <rtems_rfs_dir_lookup_ino+0x26e><== NOT EXECUTED
13ee97: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13ee9a: 85 c0 test %eax,%eax <== NOT EXECUTED
13ee9c: 0f 84 6b 01 00 00 je 13f00d <rtems_rfs_dir_lookup_ino+0x27d><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
13eea2: 6a 01 push $0x1 <== NOT EXECUTED
13eea4: 50 push %eax <== NOT EXECUTED
13eea5: 8d 4d d8 lea -0x28(%ebp),%ecx <== NOT EXECUTED
13eea8: 51 push %ecx <== NOT EXECUTED
13eea9: 53 push %ebx <== NOT EXECUTED
13eeaa: e8 7d f2 ff ff call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
13eeaf: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) <== NOT EXECUTED
if (rc > 0)
13eeb5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13eeb8: 85 c0 test %eax,%eax <== NOT EXECUTED
13eeba: 0f 8f 26 01 00 00 jg 13efe6 <rtems_rfs_dir_lookup_ino+0x256><== NOT EXECUTED
/*
* Search the block to see if the name matches. A hash of 0xffff or 0x0
* means the entry is empty.
*/
entry = rtems_rfs_buffer_data (&entries);
13eec0: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13eec3: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
map.bpos.boff = 0;
13eec6: c7 45 9c 00 00 00 00 movl $0x0,-0x64(%ebp) <== NOT EXECUTED
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
13eecd: 83 7b 08 0a cmpl $0xa,0x8(%ebx) <== NOT EXECUTED
13eed1: 75 1d jne 13eef0 <rtems_rfs_dir_lookup_ino+0x160><== NOT EXECUTED
13eed3: e9 00 01 00 00 jmp 13efd8 <rtems_rfs_dir_lookup_ino+0x248><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
13eed8: 8b 4d 9c mov -0x64(%ebp),%ecx <== NOT EXECUTED
13eedb: 01 d1 add %edx,%ecx <== NOT EXECUTED
13eedd: 89 4d 9c mov %ecx,-0x64(%ebp) <== NOT EXECUTED
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
13eee0: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED
13eee3: 83 ee 0a sub $0xa,%esi <== NOT EXECUTED
13eee6: 39 ce cmp %ecx,%esi <== NOT EXECUTED
13eee8: 0f 86 ea 00 00 00 jbe 13efd8 <rtems_rfs_dir_lookup_ino+0x248><== NOT EXECUTED
return 0;
}
}
map.bpos.boff += elength;
entry += elength;
13eeee: 01 d0 add %edx,%eax <== NOT EXECUTED
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
13eef0: 0f b6 78 04 movzbl 0x4(%eax),%edi <== NOT EXECUTED
13eef4: 8a 50 05 mov 0x5(%eax),%dl <== NOT EXECUTED
13eef7: 88 55 85 mov %dl,-0x7b(%ebp) <== NOT EXECUTED
13eefa: 8a 48 06 mov 0x6(%eax),%cl <== NOT EXECUTED
13eefd: 88 4d 86 mov %cl,-0x7a(%ebp) <== NOT EXECUTED
13ef00: 8a 50 07 mov 0x7(%eax),%dl <== NOT EXECUTED
13ef03: 88 55 87 mov %dl,-0x79(%ebp) <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
13ef06: 0f b6 50 08 movzbl 0x8(%eax),%edx <== NOT EXECUTED
13ef0a: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
13ef0d: 0f b6 48 09 movzbl 0x9(%eax),%ecx <== NOT EXECUTED
13ef11: 09 ca or %ecx,%edx <== NOT EXECUTED
*ino = rtems_rfs_dir_entry_ino (entry);
13ef13: 0f b6 48 03 movzbl 0x3(%eax),%ecx <== NOT EXECUTED
13ef17: 0f b6 30 movzbl (%eax),%esi <== NOT EXECUTED
13ef1a: c1 e6 18 shl $0x18,%esi <== NOT EXECUTED
13ef1d: 09 f1 or %esi,%ecx <== NOT EXECUTED
13ef1f: 0f b6 70 01 movzbl 0x1(%eax),%esi <== NOT EXECUTED
13ef23: c1 e6 10 shl $0x10,%esi <== NOT EXECUTED
13ef26: 09 f1 or %esi,%ecx <== NOT EXECUTED
13ef28: 0f b6 70 02 movzbl 0x2(%eax),%esi <== NOT EXECUTED
13ef2c: c1 e6 08 shl $0x8,%esi <== NOT EXECUTED
13ef2f: 09 f1 or %esi,%ecx <== NOT EXECUTED
13ef31: 8b 75 18 mov 0x18(%ebp),%esi <== NOT EXECUTED
13ef34: 89 0e mov %ecx,(%esi) <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
13ef36: 81 fa ff ff 00 00 cmp $0xffff,%edx <== NOT EXECUTED
13ef3c: 0f 84 96 00 00 00 je 13efd8 <rtems_rfs_dir_lookup_ino+0x248><== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
13ef42: 83 fa 0a cmp $0xa,%edx <== NOT EXECUTED
13ef45: 0f 8e ce 00 00 00 jle 13f019 <rtems_rfs_dir_lookup_ino+0x289><== NOT EXECUTED
13ef4b: 3b 53 18 cmp 0x18(%ebx),%edx <== NOT EXECUTED
13ef4e: 0f 83 c5 00 00 00 jae 13f019 <rtems_rfs_dir_lookup_ino+0x289><== NOT EXECUTED
13ef54: 85 c9 test %ecx,%ecx <== NOT EXECUTED
13ef56: 0f 84 bd 00 00 00 je 13f019 <rtems_rfs_dir_lookup_ino+0x289><== NOT EXECUTED
13ef5c: 3b 4b 10 cmp 0x10(%ebx),%ecx <== NOT EXECUTED
13ef5f: 0f 87 b4 00 00 00 ja 13f019 <rtems_rfs_dir_lookup_ino+0x289><== NOT EXECUTED
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
13ef65: c1 e7 18 shl $0x18,%edi <== NOT EXECUTED
13ef68: 0f b6 4d 85 movzbl -0x7b(%ebp),%ecx <== NOT EXECUTED
13ef6c: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13ef6f: 09 cf or %ecx,%edi <== NOT EXECUTED
13ef71: 0f b6 4d 87 movzbl -0x79(%ebp),%ecx <== NOT EXECUTED
13ef75: 09 cf or %ecx,%edi <== NOT EXECUTED
13ef77: 0f b6 4d 86 movzbl -0x7a(%ebp),%ecx <== NOT EXECUTED
13ef7b: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
13ef7e: 09 cf or %ecx,%edi <== NOT EXECUTED
13ef80: 39 7d 80 cmp %edi,-0x80(%ebp) <== NOT EXECUTED
13ef83: 0f 85 4f ff ff ff jne 13eed8 <rtems_rfs_dir_lookup_ino+0x148><== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
13ef89: 8d 70 0a lea 0xa(%eax),%esi <== NOT EXECUTED
13ef8c: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
13ef8f: 39 c9 cmp %ecx,%ecx <== NOT EXECUTED
13ef91: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
13ef94: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED
13ef96: 0f 97 45 87 seta -0x79(%ebp) <== NOT EXECUTED
13ef9a: 0f 92 c1 setb %cl <== NOT EXECUTED
13ef9d: 38 4d 87 cmp %cl,-0x79(%ebp) <== NOT EXECUTED
13efa0: 0f 85 32 ff ff ff jne 13eed8 <rtems_rfs_dir_lookup_ino+0x148><== NOT EXECUTED
{
*offset = rtems_rfs_block_map_pos (fs, &map);
13efa6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13efa9: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
13efac: 50 push %eax <== NOT EXECUTED
13efad: 53 push %ebx <== NOT EXECUTED
13efae: e8 29 e1 ff ff call 13d0dc <rtems_rfs_block_get_pos><== NOT EXECUTED
13efb3: 8b 75 1c mov 0x1c(%ebp),%esi <== NOT EXECUTED
13efb6: 89 06 mov %eax,(%esi) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
printf ("rtems-rfs: dir-lookup-ino: "
"entry found in ino %" PRIu32 ", ino=%" PRIu32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (inode), *ino, *offset);
rtems_rfs_buffer_handle_close (fs, &entries);
13efb8: 8d 55 d8 lea -0x28(%ebp),%edx <== NOT EXECUTED
13efbb: 89 d8 mov %ebx,%eax <== NOT EXECUTED
13efbd: e8 6a f3 ff ff call 13e32c <rtems_rfs_buffer_handle_close><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
13efc2: 58 pop %eax <== NOT EXECUTED
13efc3: 5a pop %edx <== NOT EXECUTED
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
13efc4: 8d 45 88 lea -0x78(%ebp),%eax <== NOT EXECUTED
13efc7: 50 push %eax <== NOT EXECUTED
13efc8: 53 push %ebx <== NOT EXECUTED
13efc9: e8 62 eb ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
return rc;
13efce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13efd1: e9 f2 fd ff ff jmp 13edc8 <rtems_rfs_dir_lookup_ino+0x38><== NOT EXECUTED
13efd6: 66 90 xchg %ax,%ax <== NOT EXECUTED
map.bpos.boff += elength;
entry += elength;
}
if (rc == 0)
13efd8: 8b bd 78 ff ff ff mov -0x88(%ebp),%edi <== NOT EXECUTED
13efde: 85 ff test %edi,%edi <== NOT EXECUTED
13efe0: 0f 84 82 fe ff ff je 13ee68 <rtems_rfs_dir_lookup_ino+0xd8><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
13efe6: 8b b5 78 ff ff ff mov -0x88(%ebp),%esi <== NOT EXECUTED
13efec: 89 b5 7c ff ff ff mov %esi,-0x84(%ebp) <== NOT EXECUTED
13eff2: eb 0a jmp 13effe <rtems_rfs_dir_lookup_ino+0x26e><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
13eff4: c7 85 7c ff ff ff 02 movl $0x2,-0x84(%ebp) <== NOT EXECUTED
13effb: 00 00 00
printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
rtems_rfs_buffer_handle_close (fs, &entries);
13effe: 8d 55 d8 lea -0x28(%ebp),%edx <== NOT EXECUTED
13f001: 89 d8 mov %ebx,%eax <== NOT EXECUTED
13f003: e8 24 f3 ff ff call 13e32c <rtems_rfs_buffer_handle_close><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
13f008: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13f00b: eb b7 jmp 13efc4 <rtems_rfs_dir_lookup_ino+0x234><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
13f00d: c7 85 7c ff ff ff 05 movl $0x5,-0x84(%ebp) <== NOT EXECUTED
13f014: 00 00 00
13f017: eb e5 jmp 13effe <rtems_rfs_dir_lookup_ino+0x26e><== NOT EXECUTED
13f019: c7 85 78 ff ff ff 05 movl $0x5,-0x88(%ebp) <== NOT EXECUTED
13f020: 00 00 00
13f023: eb c1 jmp 13efe6 <rtems_rfs_dir_lookup_ino+0x256><== NOT EXECUTED
0013e354 <rtems_rfs_dir_read>:
rtems_rfs_dir_read (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_pos_rel offset,
struct dirent* dirent,
size_t* length)
{
13e354: 55 push %ebp <== NOT EXECUTED
13e355: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13e357: 57 push %edi <== NOT EXECUTED
13e358: 56 push %esi <== NOT EXECUTED
13e359: 53 push %ebx <== NOT EXECUTED
13e35a: 81 ec a0 00 00 00 sub $0xa0,%esp <== NOT EXECUTED
13e360: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
13e363: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
13e366: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) <== NOT EXECUTED
13e36c: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
13e372: 8b 55 1c mov 0x1c(%ebp),%edx <== NOT EXECUTED
13e375: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
13e37b: 8d 4d 88 lea -0x78(%ebp),%ecx <== NOT EXECUTED
13e37e: 51 push %ecx <== NOT EXECUTED
13e37f: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
13e382: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e385: e8 52 f9 ff ff call 13dcdc <rtems_rfs_block_map_open><== NOT EXECUTED
13e38a: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
13e38c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e38f: 85 c0 test %eax,%eax <== NOT EXECUTED
13e391: 7e 0d jle 13e3a0 <rtems_rfs_dir_read+0x4c><== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
13e393: 89 d8 mov %ebx,%eax <== NOT EXECUTED
13e395: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13e398: 5b pop %ebx <== NOT EXECUTED
13e399: 5e pop %esi <== NOT EXECUTED
13e39a: 5f pop %edi <== NOT EXECUTED
13e39b: c9 leave <== NOT EXECUTED
13e39c: c3 ret <== NOT EXECUTED
13e39d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
13e3a0: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
13e3a3: 8b 5f 08 mov 0x8(%edi),%ebx <== NOT EXECUTED
13e3a6: 31 f6 xor %esi,%esi <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
13e3a8: 56 push %esi <== NOT EXECUTED
13e3a9: 53 push %ebx <== NOT EXECUTED
13e3aa: ff b5 7c ff ff ff pushl -0x84(%ebp) <== NOT EXECUTED
13e3b0: ff b5 78 ff ff ff pushl -0x88(%ebp) <== NOT EXECUTED
13e3b6: e8 29 f3 01 00 call 15d6e4 <__moddi3> <== NOT EXECUTED
13e3bb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e3be: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp) <== NOT EXECUTED
13e3c4: 89 95 64 ff ff ff mov %edx,-0x9c(%ebp) <== NOT EXECUTED
13e3ca: 89 d8 mov %ebx,%eax <== NOT EXECUTED
13e3cc: 89 f2 mov %esi,%edx <== NOT EXECUTED
13e3ce: 2b 85 60 ff ff ff sub -0xa0(%ebp),%eax <== NOT EXECUTED
13e3d4: 1b 95 64 ff ff ff sbb -0x9c(%ebp),%edx <== NOT EXECUTED
13e3da: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp) <== NOT EXECUTED
13e3e0: 89 95 64 ff ff ff mov %edx,-0x9c(%ebp) <== NOT EXECUTED
13e3e6: 83 fa 00 cmp $0x0,%edx <== NOT EXECUTED
13e3e9: 0f 8e 35 01 00 00 jle 13e524 <rtems_rfs_dir_read+0x1d0><== NOT EXECUTED
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
rtems_rfs_fs_block_size (fs));
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
13e3ef: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13e3f2: 8d 7d e4 lea -0x1c(%ebp),%edi <== NOT EXECUTED
13e3f5: 57 push %edi <== NOT EXECUTED
13e3f6: ff b5 7c ff ff ff pushl -0x84(%ebp) <== NOT EXECUTED
13e3fc: ff b5 78 ff ff ff pushl -0x88(%ebp) <== NOT EXECUTED
13e402: 8d 55 88 lea -0x78(%ebp),%edx <== NOT EXECUTED
13e405: 52 push %edx <== NOT EXECUTED
13e406: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e409: e8 4a ef ff ff call 13d358 <rtems_rfs_block_map_seek><== NOT EXECUTED
13e40e: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
13e410: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
13e413: 85 c0 test %eax,%eax <== NOT EXECUTED
13e415: 7e 25 jle 13e43c <rtems_rfs_dir_read+0xe8><== NOT EXECUTED
{
if (rc == ENXIO)
13e417: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
13e41a: 74 1c je 13e438 <rtems_rfs_dir_read+0xe4><== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
13e41c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13e41f: 8d 4d 88 lea -0x78(%ebp),%ecx <== NOT EXECUTED
13e422: 51 push %ecx <== NOT EXECUTED
13e423: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e426: e8 05 f7 ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
return rc;
13e42b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
13e42e: 89 d8 mov %ebx,%eax <== NOT EXECUTED
13e430: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13e433: 5b pop %ebx <== NOT EXECUTED
13e434: 5e pop %esi <== NOT EXECUTED
13e435: 5f pop %edi <== NOT EXECUTED
13e436: c9 leave <== NOT EXECUTED
13e437: c3 ret <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
if (rc > 0)
{
if (rc == ENXIO)
13e438: b3 02 mov $0x2,%bl <== NOT EXECUTED
13e43a: eb e0 jmp 13e41c <rtems_rfs_dir_read+0xc8><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
13e43c: c6 45 d8 00 movb $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->bnum = 0;
13e440: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
13e447: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
13e44e: eb 08 jmp 13e458 <rtems_rfs_dir_read+0x104><== NOT EXECUTED
/*
* Look for an empty entry and if this is the last block that is the end of
* the directory.
*/
while (rc == 0)
13e450: 85 c0 test %eax,%eax <== NOT EXECUTED
13e452: 0f 85 35 02 00 00 jne 13e68d <rtems_rfs_dir_read+0x339><== NOT EXECUTED
uint8_t* entry;
rtems_rfs_ino eino;
int elength;
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
13e458: 6a 01 push $0x1 <== NOT EXECUTED
13e45a: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13e45d: 8d 5d d8 lea -0x28(%ebp),%ebx <== NOT EXECUTED
13e460: 53 push %ebx <== NOT EXECUTED
13e461: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e464: e8 c3 fc ff ff call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
if (rc > 0)
13e469: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e46c: 85 c0 test %eax,%eax <== NOT EXECUTED
13e46e: 0f 8f 10 01 00 00 jg 13e584 <rtems_rfs_dir_read+0x230><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
13e474: 8b 55 9c mov -0x64(%ebp),%edx <== NOT EXECUTED
13e477: 89 55 80 mov %edx,-0x80(%ebp) <== NOT EXECUTED
13e47a: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
13e47d: 8b 4d 80 mov -0x80(%ebp),%ecx <== NOT EXECUTED
13e480: 03 4a 20 add 0x20(%edx),%ecx <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
13e483: 0f b6 51 08 movzbl 0x8(%ecx),%edx <== NOT EXECUTED
13e487: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
13e48a: 0f b6 59 09 movzbl 0x9(%ecx),%ebx <== NOT EXECUTED
13e48e: 09 da or %ebx,%edx <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
13e490: 8d 59 01 lea 0x1(%ecx),%ebx <== NOT EXECUTED
13e493: 89 9d 6c ff ff ff mov %ebx,-0x94(%ebp) <== NOT EXECUTED
13e499: 8d 71 02 lea 0x2(%ecx),%esi <== NOT EXECUTED
13e49c: 89 b5 70 ff ff ff mov %esi,-0x90(%ebp) <== NOT EXECUTED
13e4a2: 8d 59 03 lea 0x3(%ecx),%ebx <== NOT EXECUTED
13e4a5: 89 9d 74 ff ff ff mov %ebx,-0x8c(%ebp) <== NOT EXECUTED
13e4ab: 0f b6 71 03 movzbl 0x3(%ecx),%esi <== NOT EXECUTED
13e4af: 0f b6 19 movzbl (%ecx),%ebx <== NOT EXECUTED
13e4b2: c1 e3 18 shl $0x18,%ebx <== NOT EXECUTED
13e4b5: 09 de or %ebx,%esi <== NOT EXECUTED
13e4b7: 0f b6 59 01 movzbl 0x1(%ecx),%ebx <== NOT EXECUTED
13e4bb: c1 e3 10 shl $0x10,%ebx <== NOT EXECUTED
13e4be: 09 de or %ebx,%esi <== NOT EXECUTED
13e4c0: 0f b6 59 02 movzbl 0x2(%ecx),%ebx <== NOT EXECUTED
13e4c4: c1 e3 08 shl $0x8,%ebx <== NOT EXECUTED
13e4c7: 09 de or %ebx,%esi <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
13e4c9: 81 fa ff ff 00 00 cmp $0xffff,%edx <== NOT EXECUTED
13e4cf: 0f 85 d3 00 00 00 jne 13e5a8 <rtems_rfs_dir_read+0x254><== NOT EXECUTED
printf ("rtems-rfs: dir-read: found off:%" PRIdoff_t " ino:%ld name=%s\n",
dirent->d_off, dirent->d_ino, dirent->d_name);
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
13e4d5: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13e4d8: 8b 41 08 mov 0x8(%ecx),%eax <== NOT EXECUTED
13e4db: 2b 45 80 sub -0x80(%ebp),%eax <== NOT EXECUTED
13e4de: 8b 5d 1c mov 0x1c(%ebp),%ebx <== NOT EXECUTED
13e4e1: 01 03 add %eax,(%ebx) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
13e4e3: 50 push %eax <== NOT EXECUTED
13e4e4: 57 push %edi <== NOT EXECUTED
13e4e5: 8d 75 88 lea -0x78(%ebp),%esi <== NOT EXECUTED
13e4e8: 56 push %esi <== NOT EXECUTED
13e4e9: 51 push %ecx <== NOT EXECUTED
13e4ea: e8 39 ee ff ff call 13d328 <rtems_rfs_block_map_next_block><== NOT EXECUTED
if (rc == ENXIO)
13e4ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e4f2: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
13e4f5: 0f 85 55 ff ff ff jne 13e450 <rtems_rfs_dir_read+0xfc><== NOT EXECUTED
13e4fb: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED
rc = ENOENT;
}
rtems_rfs_buffer_handle_close (fs, &buffer);
13e500: 8d 55 d8 lea -0x28(%ebp),%edx <== NOT EXECUTED
13e503: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13e506: e8 21 fe ff ff call 13e32c <rtems_rfs_buffer_handle_close><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
13e50b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13e50e: 8d 7d 88 lea -0x78(%ebp),%edi <== NOT EXECUTED
13e511: 57 push %edi <== NOT EXECUTED
13e512: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e515: e8 16 f6 ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
return rc;
13e51a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e51d: e9 71 fe ff ff jmp 13e393 <rtems_rfs_dir_read+0x3f><== NOT EXECUTED
13e522: 66 90 xchg %ax,%ax <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
13e524: 7c 09 jl 13e52f <rtems_rfs_dir_read+0x1db><== NOT EXECUTED
13e526: 83 f8 0a cmp $0xa,%eax <== NOT EXECUTED
13e529: 0f 87 c0 fe ff ff ja 13e3ef <rtems_rfs_dir_read+0x9b><== NOT EXECUTED
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
13e52f: 56 push %esi <== NOT EXECUTED
13e530: 53 push %ebx <== NOT EXECUTED
13e531: ff b5 7c ff ff ff pushl -0x84(%ebp) <== NOT EXECUTED
13e537: ff b5 78 ff ff ff pushl -0x88(%ebp) <== NOT EXECUTED
13e53d: e8 52 f0 01 00 call 15d594 <__divdi3> <== NOT EXECUTED
13e542: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e545: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) <== NOT EXECUTED
13e54b: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) <== NOT EXECUTED
13e551: 83 85 78 ff ff ff 01 addl $0x1,-0x88(%ebp) <== NOT EXECUTED
13e558: 83 95 7c ff ff ff 00 adcl $0x0,-0x84(%ebp) <== NOT EXECUTED
13e55f: 8b 8d 7c ff ff ff mov -0x84(%ebp),%ecx <== NOT EXECUTED
13e565: 0f af cb imul %ebx,%ecx <== NOT EXECUTED
13e568: 8b 85 78 ff ff ff mov -0x88(%ebp),%eax <== NOT EXECUTED
13e56e: f7 e3 mul %ebx <== NOT EXECUTED
13e570: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) <== NOT EXECUTED
13e576: 01 ca add %ecx,%edx <== NOT EXECUTED
13e578: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) <== NOT EXECUTED
13e57e: e9 6c fe ff ff jmp 13e3ef <rtems_rfs_dir_read+0x9b><== NOT EXECUTED
13e583: 90 nop <== NOT EXECUTED
13e584: 89 c3 mov %eax,%ebx <== NOT EXECUTED
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &buffer);
13e586: 8d 55 d8 lea -0x28(%ebp),%edx <== NOT EXECUTED
13e589: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13e58c: e8 9b fd ff ff call 13e32c <rtems_rfs_buffer_handle_close><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
13e591: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13e594: 8d 75 88 lea -0x78(%ebp),%esi <== NOT EXECUTED
13e597: 56 push %esi <== NOT EXECUTED
13e598: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13e59b: e8 90 f5 ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
return rc;
13e5a0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13e5a3: e9 eb fd ff ff jmp 13e393 <rtems_rfs_dir_read+0x3f><== NOT EXECUTED
13e5a8: 89 8d 68 ff ff ff mov %ecx,-0x98(%ebp) <== NOT EXECUTED
13e5ae: 89 c3 mov %eax,%ebx <== NOT EXECUTED
13e5b0: 89 f0 mov %esi,%eax <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
13e5b2: 83 fa 0a cmp $0xa,%edx <== NOT EXECUTED
13e5b5: 7f 0d jg 13e5c4 <rtems_rfs_dir_read+0x270><== NOT EXECUTED
/*
* Look for an empty entry and if this is the last block that is the end of
* the directory.
*/
while (rc == 0)
13e5b7: bb 05 00 00 00 mov $0x5,%ebx <== NOT EXECUTED
13e5bc: e9 3f ff ff ff jmp 13e500 <rtems_rfs_dir_read+0x1ac><== NOT EXECUTED
13e5c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
13e5c4: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
13e5c7: 3b 56 18 cmp 0x18(%esi),%edx <== NOT EXECUTED
13e5ca: 73 eb jae 13e5b7 <rtems_rfs_dir_read+0x263><== NOT EXECUTED
13e5cc: 85 c0 test %eax,%eax <== NOT EXECUTED
13e5ce: 74 e7 je 13e5b7 <rtems_rfs_dir_read+0x263><== NOT EXECUTED
13e5d0: 3b 46 10 cmp 0x10(%esi),%eax <== NOT EXECUTED
13e5d3: 77 e2 ja 13e5b7 <rtems_rfs_dir_read+0x263><== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
13e5d5: b9 10 01 00 00 mov $0x110,%ecx <== NOT EXECUTED
13e5da: 31 c0 xor %eax,%eax <== NOT EXECUTED
13e5dc: 8b 7d 18 mov 0x18(%ebp),%edi <== NOT EXECUTED
13e5df: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
dirent->d_off = offset;
13e5e1: 8b b5 78 ff ff ff mov -0x88(%ebp),%esi <== NOT EXECUTED
13e5e7: 8b bd 7c ff ff ff mov -0x84(%ebp),%edi <== NOT EXECUTED
13e5ed: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
13e5f0: 89 70 04 mov %esi,0x4(%eax) <== NOT EXECUTED
13e5f3: 89 78 08 mov %edi,0x8(%eax) <== NOT EXECUTED
dirent->d_reclen = sizeof (struct dirent);
13e5f6: 66 c7 40 0c 10 01 movw $0x110,0xc(%eax) <== NOT EXECUTED
*length += elength;
13e5fc: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13e5fe: 8b 75 1c mov 0x1c(%ebp),%esi <== NOT EXECUTED
13e601: 03 0e add (%esi),%ecx <== NOT EXECUTED
13e603: 89 0e mov %ecx,(%esi) <== NOT EXECUTED
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
13e605: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
13e608: 8b 47 08 mov 0x8(%edi),%eax <== NOT EXECUTED
13e60b: 2b 45 80 sub -0x80(%ebp),%eax <== NOT EXECUTED
13e60e: 29 d0 sub %edx,%eax <== NOT EXECUTED
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
13e610: 83 f8 0a cmp $0xa,%eax <== NOT EXECUTED
13e613: 7f 04 jg 13e619 <rtems_rfs_dir_read+0x2c5><== NOT EXECUTED
*length += remaining;
13e615: 01 c8 add %ecx,%eax <== NOT EXECUTED
13e617: 89 06 mov %eax,(%esi) <== NOT EXECUTED
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
13e619: 83 ea 0a sub $0xa,%edx <== NOT EXECUTED
13e61c: 89 55 84 mov %edx,-0x7c(%ebp) <== NOT EXECUTED
13e61f: 81 fa ff 00 00 00 cmp $0xff,%edx <== NOT EXECUTED
13e625: 7e 07 jle 13e62e <rtems_rfs_dir_read+0x2da><== NOT EXECUTED
13e627: c7 45 84 ff 00 00 00 movl $0xff,-0x7c(%ebp) <== NOT EXECUTED
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
13e62e: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
13e631: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
13e634: 89 45 80 mov %eax,-0x80(%ebp) <== NOT EXECUTED
13e637: 8b 95 68 ff ff ff mov -0x98(%ebp),%edx <== NOT EXECUTED
13e63d: 83 c2 0a add $0xa,%edx <== NOT EXECUTED
13e640: 89 c7 mov %eax,%edi <== NOT EXECUTED
13e642: 89 d6 mov %edx,%esi <== NOT EXECUTED
13e644: 8b 4d 84 mov -0x7c(%ebp),%ecx <== NOT EXECUTED
13e647: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
13e649: 8b 85 68 ff ff ff mov -0x98(%ebp),%eax <== NOT EXECUTED
13e64f: 0f b6 10 movzbl (%eax),%edx <== NOT EXECUTED
13e652: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
13e655: 8b 8d 6c ff ff ff mov -0x94(%ebp),%ecx <== NOT EXECUTED
13e65b: 0f b6 01 movzbl (%ecx),%eax <== NOT EXECUTED
13e65e: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
13e661: 09 c2 or %eax,%edx <== NOT EXECUTED
13e663: 8b b5 74 ff ff ff mov -0x8c(%ebp),%esi <== NOT EXECUTED
13e669: 0f b6 06 movzbl (%esi),%eax <== NOT EXECUTED
13e66c: 09 c2 or %eax,%edx <== NOT EXECUTED
13e66e: 8b bd 70 ff ff ff mov -0x90(%ebp),%edi <== NOT EXECUTED
13e674: 0f b6 07 movzbl (%edi),%eax <== NOT EXECUTED
13e677: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
13e67a: 09 c2 or %eax,%edx <== NOT EXECUTED
13e67c: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
13e67f: 89 10 mov %edx,(%eax) <== NOT EXECUTED
dirent->d_namlen = elength;
13e681: 8b 55 84 mov -0x7c(%ebp),%edx <== NOT EXECUTED
13e684: 66 89 50 0e mov %dx,0xe(%eax) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: found off:%" PRIdoff_t " ino:%ld name=%s\n",
dirent->d_off, dirent->d_ino, dirent->d_name);
break;
13e688: e9 73 fe ff ff jmp 13e500 <rtems_rfs_dir_read+0x1ac><== NOT EXECUTED
13e68d: 89 c3 mov %eax,%ebx <== NOT EXECUTED
13e68f: e9 6c fe ff ff jmp 13e500 <rtems_rfs_dir_read+0x1ac><== NOT EXECUTED
0013f998 <rtems_rfs_file_close>:
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
13f998: 55 push %ebp <== NOT EXECUTED
13f999: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13f99b: 57 push %edi <== NOT EXECUTED
13f99c: 56 push %esi <== NOT EXECUTED
13f99d: 53 push %ebx <== NOT EXECUTED
13f99e: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
13f9a1: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
13f9a4: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
handle->shared->inode.ino);
if (handle->shared->references > 0)
13f9a7: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13f9aa: 8b 50 08 mov 0x8(%eax),%edx <== NOT EXECUTED
13f9ad: 85 d2 test %edx,%edx <== NOT EXECUTED
13f9af: 7e 04 jle 13f9b5 <rtems_rfs_file_close+0x1d><== NOT EXECUTED
handle->shared->references--;
13f9b1: 4a dec %edx <== NOT EXECUTED
13f9b2: 89 50 08 mov %edx,0x8(%eax) <== NOT EXECUTED
if (handle->shared->references == 0)
13f9b5: 85 d2 test %edx,%edx <== NOT EXECUTED
13f9b7: 0f 85 5f 01 00 00 jne 13fb1c <rtems_rfs_file_close+0x184><== NOT EXECUTED
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
13f9bd: 8b 50 18 mov 0x18(%eax),%edx <== NOT EXECUTED
13f9c0: 85 d2 test %edx,%edx <== NOT EXECUTED
13f9c2: 0f 84 6c 01 00 00 je 13fb34 <rtems_rfs_file_close+0x19c><== NOT EXECUTED
if (rrc == 0)
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
13f9c8: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx <== NOT EXECUTED
13f9ce: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
13f9d1: 89 cf mov %ecx,%edi <== NOT EXECUTED
13f9d3: c1 ef 18 shr $0x18,%edi <== NOT EXECUTED
13f9d6: 89 f9 mov %edi,%ecx <== NOT EXECUTED
13f9d8: 88 4a 10 mov %cl,0x10(%edx) <== NOT EXECUTED
13f9db: 8b 50 18 mov 0x18(%eax),%edx <== NOT EXECUTED
13f9de: 8b 7d e4 mov -0x1c(%ebp),%edi <== NOT EXECUTED
13f9e1: c1 ef 10 shr $0x10,%edi <== NOT EXECUTED
13f9e4: 89 f9 mov %edi,%ecx <== NOT EXECUTED
13f9e6: 88 4a 11 mov %cl,0x11(%edx) <== NOT EXECUTED
13f9e9: 8b 50 18 mov 0x18(%eax),%edx <== NOT EXECUTED
13f9ec: 8b 7d e4 mov -0x1c(%ebp),%edi <== NOT EXECUTED
13f9ef: c1 ef 08 shr $0x8,%edi <== NOT EXECUTED
13f9f2: 89 f9 mov %edi,%ecx <== NOT EXECUTED
13f9f4: 88 4a 12 mov %cl,0x12(%edx) <== NOT EXECUTED
13f9f7: 8b 50 18 mov 0x18(%eax),%edx <== NOT EXECUTED
13f9fa: 8a 4d e4 mov -0x1c(%ebp),%cl <== NOT EXECUTED
13f9fd: 88 4a 13 mov %cl,0x13(%edx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
13fa00: c6 40 1c 01 movb $0x1,0x1c(%eax) <== NOT EXECUTED
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
13fa04: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
13fa07: 8b 90 90 00 00 00 mov 0x90(%eax),%edx <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
13fa0d: 89 d7 mov %edx,%edi <== NOT EXECUTED
13fa0f: c1 ef 18 shr $0x18,%edi <== NOT EXECUTED
13fa12: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED
13fa15: 8a 4d e4 mov -0x1c(%ebp),%cl <== NOT EXECUTED
13fa18: 8b 78 18 mov 0x18(%eax),%edi <== NOT EXECUTED
13fa1b: 88 4f 14 mov %cl,0x14(%edi) <== NOT EXECUTED
13fa1e: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13fa20: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
13fa23: 8b 78 18 mov 0x18(%eax),%edi <== NOT EXECUTED
13fa26: 88 4f 15 mov %cl,0x15(%edi) <== NOT EXECUTED
13fa29: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13fa2b: c1 e9 08 shr $0x8,%ecx <== NOT EXECUTED
13fa2e: 8b 78 18 mov 0x18(%eax),%edi <== NOT EXECUTED
13fa31: 88 4f 16 mov %cl,0x16(%edi) <== NOT EXECUTED
13fa34: 8b 48 18 mov 0x18(%eax),%ecx <== NOT EXECUTED
13fa37: 88 51 17 mov %dl,0x17(%ecx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
13fa3a: c6 40 1c 01 movb $0x1,0x1c(%eax) <== NOT EXECUTED
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
handle->shared->ctime);
13fa3e: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
13fa41: 8b 90 94 00 00 00 mov 0x94(%eax),%edx <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
13fa47: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13fa49: c1 e9 18 shr $0x18,%ecx <== NOT EXECUTED
13fa4c: 8b 78 18 mov 0x18(%eax),%edi <== NOT EXECUTED
13fa4f: 88 4f 18 mov %cl,0x18(%edi) <== NOT EXECUTED
13fa52: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13fa54: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
13fa57: 8b 78 18 mov 0x18(%eax),%edi <== NOT EXECUTED
13fa5a: 88 4f 19 mov %cl,0x19(%edi) <== NOT EXECUTED
13fa5d: 89 d1 mov %edx,%ecx <== NOT EXECUTED
13fa5f: c1 e9 08 shr $0x8,%ecx <== NOT EXECUTED
13fa62: 8b 78 18 mov 0x18(%eax),%edi <== NOT EXECUTED
13fa65: 88 4f 1a mov %cl,0x1a(%edi) <== NOT EXECUTED
13fa68: 8b 48 18 mov 0x18(%eax),%ecx <== NOT EXECUTED
13fa6b: 88 51 1b mov %dl,0x1b(%ecx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
13fa6e: c6 40 1c 01 movb $0x1,0x1c(%eax) <== NOT EXECUTED
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
13fa72: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13fa75: 89 c2 mov %eax,%edx <== NOT EXECUTED
13fa77: 8b 88 84 00 00 00 mov 0x84(%eax),%ecx <== NOT EXECUTED
13fa7d: 3b 48 3c cmp 0x3c(%eax),%ecx <== NOT EXECUTED
13fa80: 0f 84 9a 00 00 00 je 13fb20 <rtems_rfs_file_close+0x188><== NOT EXECUTED
13fa86: 8b b8 88 00 00 00 mov 0x88(%eax),%edi <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size (rtems_rfs_block_map* map,
rtems_rfs_block_size* size)
{
rtems_rfs_block_copy_size (&map->size, size);
13fa8c: 89 4a 3c mov %ecx,0x3c(%edx) <== NOT EXECUTED
13fa8f: 89 7a 40 mov %edi,0x40(%edx) <== NOT EXECUTED
map->dirty = true;
13fa92: c6 42 34 01 movb $0x1,0x34(%edx) <== NOT EXECUTED
13fa96: 89 d0 mov %edx,%eax <== NOT EXECUTED
13fa98: 31 ff xor %edi,%edi <== NOT EXECUTED
&handle->shared->map.size))
rtems_rfs_block_map_set_size (&handle->shared->map,
&handle->shared->size);
}
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
13fa9a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13fa9d: 83 c0 34 add $0x34,%eax <== NOT EXECUTED
13faa0: 50 push %eax <== NOT EXECUTED
13faa1: 56 push %esi <== NOT EXECUTED
13faa2: e8 89 e0 ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
if (rc > 0)
13faa7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13faaa: 85 c0 test %eax,%eax <== NOT EXECUTED
13faac: 7e 06 jle 13fab4 <rtems_rfs_file_close+0x11c><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
13faae: 85 ff test %edi,%edi <== NOT EXECUTED
13fab0: 75 02 jne 13fab4 <rtems_rfs_file_close+0x11c><== NOT EXECUTED
13fab2: 89 c7 mov %eax,%edi <== NOT EXECUTED
rrc = rc;
}
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
13fab4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13fab7: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13faba: 83 c0 0c add $0xc,%eax <== NOT EXECUTED
13fabd: 50 push %eax <== NOT EXECUTED
13fabe: 56 push %esi <== NOT EXECUTED
13fabf: e8 ac 1f 00 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
13fac4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13fac7: 85 c0 test %eax,%eax <== NOT EXECUTED
13fac9: 7e 06 jle 13fad1 <rtems_rfs_file_close+0x139><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
13facb: 85 ff test %edi,%edi <== NOT EXECUTED
13facd: 75 02 jne 13fad1 <rtems_rfs_file_close+0x139><== NOT EXECUTED
13facf: 89 c7 mov %eax,%edi <== NOT EXECUTED
13fad1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13fad4: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED
13fad7: e8 a4 3f fd ff call 113a80 <_Chain_Extract> <== NOT EXECUTED
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
13fadc: 59 pop %ecx <== NOT EXECUTED
13fadd: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED
13fae0: e8 83 ed fc ff call 10e868 <free> <== NOT EXECUTED
13fae5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
13fae8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13faeb: 8d 43 04 lea 0x4(%ebx),%eax <== NOT EXECUTED
13faee: 50 push %eax <== NOT EXECUTED
13faef: 56 push %esi <== NOT EXECUTED
13faf0: e8 33 e5 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
13faf5: c6 43 04 00 movb $0x0,0x4(%ebx) <== NOT EXECUTED
handle->bnum = 0;
13faf9: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
13fb00: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
}
free (handle);
13fb07: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
13fb0a: e8 59 ed fc ff call 10e868 <free> <== NOT EXECUTED
return rrc;
}
13fb0f: 89 f8 mov %edi,%eax <== NOT EXECUTED
13fb11: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13fb14: 5b pop %ebx <== NOT EXECUTED
13fb15: 5e pop %esi <== NOT EXECUTED
13fb16: 5f pop %edi <== NOT EXECUTED
13fb17: c9 leave <== NOT EXECUTED
13fb18: c3 ret <== NOT EXECUTED
13fb19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
handle->shared->inode.ino);
if (handle->shared->references > 0)
handle->shared->references--;
if (handle->shared->references == 0)
13fb1c: 31 ff xor %edi,%edi <== NOT EXECUTED
13fb1e: eb c8 jmp 13fae8 <rtems_rfs_file_close+0x150><== NOT EXECUTED
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
13fb20: 8b b8 88 00 00 00 mov 0x88(%eax),%edi <== NOT EXECUTED
13fb26: 3b 78 40 cmp 0x40(%eax),%edi <== NOT EXECUTED
13fb29: 0f 85 5d ff ff ff jne 13fa8c <rtems_rfs_file_close+0xf4><== NOT EXECUTED
13fb2f: e9 64 ff ff ff jmp 13fa98 <rtems_rfs_file_close+0x100><== NOT EXECUTED
handle->shared->references--;
if (handle->shared->references == 0)
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
rrc = rtems_rfs_inode_load (fs, &handle->shared->inode);
13fb34: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13fb37: 83 c0 0c add $0xc,%eax <== NOT EXECUTED
13fb3a: 50 push %eax <== NOT EXECUTED
13fb3b: 56 push %esi <== NOT EXECUTED
13fb3c: e8 63 1f 00 00 call 141aa4 <rtems_rfs_inode_load> <== NOT EXECUTED
13fb41: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rrc == 0)
13fb43: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13fb46: 85 c0 test %eax,%eax <== NOT EXECUTED
13fb48: 74 08 je 13fb52 <rtems_rfs_file_close+0x1ba><== NOT EXECUTED
13fb4a: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13fb4d: e9 48 ff ff ff jmp 13fa9a <rtems_rfs_file_close+0x102><== NOT EXECUTED
13fb52: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13fb55: 8b 50 18 mov 0x18(%eax),%edx <== NOT EXECUTED
13fb58: e9 6b fe ff ff jmp 13f9c8 <rtems_rfs_file_close+0x30><== NOT EXECUTED
0013f254 <rtems_rfs_file_get_shared>:
}
rtems_rfs_file_shared*
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
13f254: 55 push %ebp <== NOT EXECUTED
13f255: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13f257: 53 push %ebx <== NOT EXECUTED
13f258: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13f25b: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
13f25e: 8b 51 70 mov 0x70(%ecx),%edx <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
13f261: 83 c1 74 add $0x74,%ecx <== NOT EXECUTED
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
13f264: 39 ca cmp %ecx,%edx <== NOT EXECUTED
13f266: 75 0a jne 13f272 <rtems_rfs_file_get_shared+0x1e><== NOT EXECUTED
13f268: eb 12 jmp 13f27c <rtems_rfs_file_get_shared+0x28><== NOT EXECUTED
13f26a: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
13f26c: 8b 12 mov (%edx),%edx <== NOT EXECUTED
13f26e: 39 ca cmp %ecx,%edx <== NOT EXECUTED
13f270: 74 0a je 13f27c <rtems_rfs_file_get_shared+0x28><== NOT EXECUTED
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
13f272: 89 d0 mov %edx,%eax <== NOT EXECUTED
if (shared->inode.ino == ino)
13f274: 39 5a 14 cmp %ebx,0x14(%edx) <== NOT EXECUTED
13f277: 75 f3 jne 13f26c <rtems_rfs_file_get_shared+0x18><== NOT EXECUTED
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
13f279: 5b pop %ebx <== NOT EXECUTED
13f27a: c9 leave <== NOT EXECUTED
13f27b: c3 ret <== NOT EXECUTED
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
13f27c: 31 c0 xor %eax,%eax <== NOT EXECUTED
if (shared->inode.ino == ino)
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
13f27e: 5b pop %ebx <== NOT EXECUTED
13f27f: c9 leave <== NOT EXECUTED
13f280: c3 ret <== NOT EXECUTED
0013f808 <rtems_rfs_file_io_end>:
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
13f808: 55 push %ebp <== NOT EXECUTED
13f809: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13f80b: 57 push %edi <== NOT EXECUTED
13f80c: 56 push %esi <== NOT EXECUTED
13f80d: 53 push %ebx <== NOT EXECUTED
13f80e: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
13f811: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
13f814: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED
13f817: 8a 45 10 mov 0x10(%ebp),%al <== NOT EXECUTED
13f81a: 88 45 e7 mov %al,-0x19(%ebp) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
read ? "read" : "write", size);
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
13f81d: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
13f820: 85 d2 test %edx,%edx <== NOT EXECUTED
13f822: 74 60 je 13f884 <rtems_rfs_file_io_end+0x7c><== NOT EXECUTED
{
if (!read)
13f824: 84 c0 test %al,%al <== NOT EXECUTED
13f826: 75 04 jne 13f82c <rtems_rfs_file_io_end+0x24><== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
13f828: c6 43 04 01 movb $0x1,0x4(%ebx) <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
13f82c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13f82f: 8d 43 04 lea 0x4(%ebx),%eax <== NOT EXECUTED
13f832: 50 push %eax <== NOT EXECUTED
13f833: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13f836: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
13f83c: e8 e7 e7 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
13f841: 89 c6 mov %eax,%esi <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
13f843: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f846: 85 c0 test %eax,%eax <== NOT EXECUTED
13f848: 7e 3c jle 13f886 <rtems_rfs_file_io_end+0x7e><== NOT EXECUTED
{
printf (
13f84a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13f84d: 50 push %eax <== NOT EXECUTED
13f84e: e8 d9 dc 00 00 call 14d52c <strerror> <== NOT EXECUTED
13f853: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f856: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) <== NOT EXECUTED
13f85a: 0f 85 2c 01 00 00 jne 13f98c <rtems_rfs_file_io_end+0x184><== NOT EXECUTED
13f860: ba 63 e0 15 00 mov $0x15e063,%edx <== NOT EXECUTED
13f865: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13f868: 50 push %eax <== NOT EXECUTED
13f869: 56 push %esi <== NOT EXECUTED
13f86a: 57 push %edi <== NOT EXECUTED
13f86b: 52 push %edx <== NOT EXECUTED
13f86c: 68 f4 90 16 00 push $0x1690f4 <== NOT EXECUTED
13f871: e8 2e c2 00 00 call 14baa4 <printf> <== NOT EXECUTED
"rtems-rfs: file-io: end: error on release: %s size=%zu: %d: %s\n",
read ? "read" : "write", size, rc, strerror (rc));
return rc;
13f876: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
handle->shared->size.offset =
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
return rc;
}
13f879: 89 f0 mov %esi,%eax <== NOT EXECUTED
13f87b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13f87e: 5b pop %ebx <== NOT EXECUTED
13f87f: 5e pop %esi <== NOT EXECUTED
13f880: 5f pop %edi <== NOT EXECUTED
13f881: c9 leave <== NOT EXECUTED
13f882: c3 ret <== NOT EXECUTED
13f883: 90 nop <== NOT EXECUTED
{
printf (
"rtems-rfs: file-io: end: error on release: %s size=%zu: %d: %s\n",
read ? "read" : "write", size, rc, strerror (rc));
return rc;
13f884: 31 f6 xor %esi,%esi <== NOT EXECUTED
* increase the block number and adjust the offset.
*
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
13f886: 03 7b 14 add 0x14(%ebx),%edi <== NOT EXECUTED
13f889: 89 7b 14 mov %edi,0x14(%ebx) <== NOT EXECUTED
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
13f88c: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13f88f: 8b 90 98 00 00 00 mov 0x98(%eax),%edx <== NOT EXECUTED
13f895: 3b 7a 08 cmp 0x8(%edx),%edi <== NOT EXECUTED
13f898: 72 09 jb 13f8a3 <rtems_rfs_file_io_end+0x9b><== NOT EXECUTED
{
handle->bpos.bno++;
13f89a: ff 43 10 incl 0x10(%ebx) <== NOT EXECUTED
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
13f89d: 2b 7a 08 sub 0x8(%edx),%edi <== NOT EXECUTED
13f8a0: 89 7b 14 mov %edi,0x14(%ebx) <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
13f8a3: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) <== NOT EXECUTED
13f8a7: 74 4b je 13f8f4 <rtems_rfs_file_io_end+0xec><== NOT EXECUTED
13f8a9: 31 d2 xor %edx,%edx <== NOT EXECUTED
13f8ab: 31 ff xor %edi,%edi <== NOT EXECUTED
handle->bpos.boff);
length = true;
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
13f8ad: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
13f8af: 89 c1 mov %eax,%ecx <== NOT EXECUTED
13f8b1: 83 f1 01 xor $0x1,%ecx <== NOT EXECUTED
13f8b4: 83 e1 01 and $0x1,%ecx <== NOT EXECUTED
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
13f8b7: a8 02 test $0x2,%al <== NOT EXECUTED
13f8b9: 74 02 je 13f8bd <rtems_rfs_file_io_end+0xb5><== NOT EXECUTED
13f8bb: 31 ff xor %edi,%edi <== NOT EXECUTED
length = rtems_rfs_file_update_length (handle) && length;
13f8bd: a8 04 test $0x4,%al <== NOT EXECUTED
13f8bf: 0f 84 83 00 00 00 je 13f948 <rtems_rfs_file_io_end+0x140><== NOT EXECUTED
13f8c5: 31 d2 xor %edx,%edx <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
13f8c7: 84 c9 test %cl,%cl <== NOT EXECUTED
13f8c9: 75 4d jne 13f918 <rtems_rfs_file_io_end+0x110><== NOT EXECUTED
13f8cb: 89 f8 mov %edi,%eax <== NOT EXECUTED
13f8cd: 84 c0 test %al,%al <== NOT EXECUTED
13f8cf: 75 47 jne 13f918 <rtems_rfs_file_io_end+0x110><== NOT EXECUTED
if (read && atime)
handle->shared->atime = now;
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
13f8d1: 85 d2 test %edx,%edx <== NOT EXECUTED
13f8d3: 74 a4 je 13f879 <rtems_rfs_file_io_end+0x71><== NOT EXECUTED
{
handle->shared->size.count =
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
13f8d5: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
13f8d8: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED
13f8db: 89 90 84 00 00 00 mov %edx,0x84(%eax) <== NOT EXECUTED
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
13f8e1: 8b 50 40 mov 0x40(%eax),%edx <== NOT EXECUTED
13f8e4: 89 90 88 00 00 00 mov %edx,0x88(%eax) <== NOT EXECUTED
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
return rc;
}
13f8ea: 89 f0 mov %esi,%eax <== NOT EXECUTED
13f8ec: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13f8ef: 5b pop %ebx <== NOT EXECUTED
13f8f0: 5e pop %esi <== NOT EXECUTED
13f8f1: 5f pop %edi <== NOT EXECUTED
13f8f2: c9 leave <== NOT EXECUTED
13f8f3: c3 ret <== NOT EXECUTED
length = false;
mtime = false;
if (!read &&
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
13f8f4: 8b 53 10 mov 0x10(%ebx),%edx <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
13f8f7: 85 d2 test %edx,%edx <== NOT EXECUTED
13f8f9: 74 6d je 13f968 <rtems_rfs_file_io_end+0x160><== NOT EXECUTED
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
13f8fb: 8b 48 3c mov 0x3c(%eax),%ecx <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
13f8fe: 85 c9 test %ecx,%ecx <== NOT EXECUTED
13f900: 75 69 jne 13f96b <rtems_rfs_file_io_end+0x163><== NOT EXECUTED
13f902: 8b 53 14 mov 0x14(%ebx),%edx <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
13f905: 89 50 40 mov %edx,0x40(%eax) <== NOT EXECUTED
map->dirty = true;
13f908: c6 40 34 01 movb $0x1,0x34(%eax) <== NOT EXECUTED
13f90c: b2 01 mov $0x1,%dl <== NOT EXECUTED
13f90e: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
13f913: eb 98 jmp 13f8ad <rtems_rfs_file_io_end+0xa5><== NOT EXECUTED
13f915: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
{
time_t now = time (NULL);
13f918: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13f91b: 6a 00 push $0x0 <== NOT EXECUTED
13f91d: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
13f920: 88 4d e0 mov %cl,-0x20(%ebp) <== NOT EXECUTED
13f923: e8 38 2f 01 00 call 152860 <time> <== NOT EXECUTED
if (read && atime)
13f928: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f92b: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) <== NOT EXECUTED
13f92f: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
13f932: 8a 4d e0 mov -0x20(%ebp),%cl <== NOT EXECUTED
13f935: 74 19 je 13f950 <rtems_rfs_file_io_end+0x148><== NOT EXECUTED
13f937: 84 c9 test %cl,%cl <== NOT EXECUTED
13f939: 74 96 je 13f8d1 <rtems_rfs_file_io_end+0xc9><== NOT EXECUTED
handle->shared->atime = now;
13f93b: 8b 4b 1c mov 0x1c(%ebx),%ecx <== NOT EXECUTED
13f93e: 89 81 8c 00 00 00 mov %eax,0x8c(%ecx) <== NOT EXECUTED
13f944: eb 8b jmp 13f8d1 <rtems_rfs_file_io_end+0xc9><== NOT EXECUTED
13f946: 66 90 xchg %ax,%ax <== NOT EXECUTED
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
length = rtems_rfs_file_update_length (handle) && length;
13f948: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
13f94b: e9 77 ff ff ff jmp 13f8c7 <rtems_rfs_file_io_end+0xbf><== NOT EXECUTED
if (atime || mtime)
{
time_t now = time (NULL);
if (read && atime)
handle->shared->atime = now;
if (!read && mtime)
13f950: 89 f9 mov %edi,%ecx <== NOT EXECUTED
13f952: 84 c9 test %cl,%cl <== NOT EXECUTED
13f954: 0f 84 77 ff ff ff je 13f8d1 <rtems_rfs_file_io_end+0xc9><== NOT EXECUTED
handle->shared->mtime = now;
13f95a: 8b 4b 1c mov 0x1c(%ebx),%ecx <== NOT EXECUTED
13f95d: 89 81 90 00 00 00 mov %eax,0x90(%ecx) <== NOT EXECUTED
13f963: e9 69 ff ff ff jmp 13f8d1 <rtems_rfs_file_io_end+0xc9><== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
13f968: 8b 48 3c mov 0x3c(%eax),%ecx <== NOT EXECUTED
13f96b: 39 ca cmp %ecx,%edx <== NOT EXECUTED
13f96d: 73 93 jae 13f902 <rtems_rfs_file_io_end+0xfa><== NOT EXECUTED
13f96f: 49 dec %ecx <== NOT EXECUTED
13f970: 39 ca cmp %ecx,%edx <== NOT EXECUTED
13f972: 0f 85 31 ff ff ff jne 13f8a9 <rtems_rfs_file_io_end+0xa1><== NOT EXECUTED
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
13f978: 8b 53 14 mov 0x14(%ebx),%edx <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
13f97b: 3b 50 40 cmp 0x40(%eax),%edx <== NOT EXECUTED
13f97e: 0f 86 25 ff ff ff jbe 13f8a9 <rtems_rfs_file_io_end+0xa1><== NOT EXECUTED
13f984: e9 7c ff ff ff jmp 13f905 <rtems_rfs_file_io_end+0xfd><== NOT EXECUTED
13f989: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
rtems_rfs_file_buffer (handle));
if (rc > 0)
{
printf (
13f98c: ba ee df 15 00 mov $0x15dfee,%edx <== NOT EXECUTED
13f991: e9 cf fe ff ff jmp 13f865 <rtems_rfs_file_io_end+0x5d><== NOT EXECUTED
0013f3c8 <rtems_rfs_file_io_release>:
return rc;
}
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
13f3c8: 55 push %ebp <== NOT EXECUTED
13f3c9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13f3cb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13f3ce: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
13f3d1: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
13f3d4: 85 d2 test %edx,%edx <== NOT EXECUTED
13f3d6: 74 1c je 13f3f4 <rtems_rfs_file_io_release+0x2c><== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
13f3d8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13f3db: 8d 50 04 lea 0x4(%eax),%edx <== NOT EXECUTED
13f3de: 52 push %edx <== NOT EXECUTED
13f3df: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
13f3e2: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
13f3e8: e8 3b ec ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
13f3ed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
return rc;
}
13f3f0: c9 leave <== NOT EXECUTED
13f3f1: c3 ret <== NOT EXECUTED
13f3f2: 66 90 xchg %ax,%ax <== NOT EXECUTED
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
13f3f4: 31 c0 xor %eax,%eax <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
rtems_rfs_file_buffer (handle));
return rc;
}
13f3f6: c9 leave <== NOT EXECUTED
13f3f7: c3 ret <== NOT EXECUTED
0013f284 <rtems_rfs_file_io_start>:
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
13f284: 55 push %ebp <== NOT EXECUTED
13f285: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13f287: 57 push %edi <== NOT EXECUTED
13f288: 56 push %esi <== NOT EXECUTED
13f289: 53 push %ebx <== NOT EXECUTED
13f28a: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
13f28d: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
13f290: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
13f293: 8a 55 10 mov 0x10(%ebp),%dl <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
read ? "read" : "write", handle->bpos.bno, handle->bpos.boff);
if (!rtems_rfs_buffer_handle_has_block (&handle->buffer))
13f296: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED
13f299: 85 c9 test %ecx,%ecx <== NOT EXECUTED
13f29b: 74 4b je 13f2e8 <rtems_rfs_file_io_start+0x64><== NOT EXECUTED
block, request_read);
if (rc > 0)
return rc;
}
if (read
13f29d: 84 d2 test %dl,%dl <== NOT EXECUTED
13f29f: 75 1b jne 13f2bc <rtems_rfs_file_io_start+0x38><== NOT EXECUTED
13f2a1: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
13f2a4: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
13f2aa: 8b 50 08 mov 0x8(%eax),%edx <== NOT EXECUTED
*available = size - rtems_rfs_file_block_offset (handle);
13f2ad: 2b 53 14 sub 0x14(%ebx),%edx <== NOT EXECUTED
13f2b0: 89 16 mov %edx,(%esi) <== NOT EXECUTED
13f2b2: 31 c0 xor %eax,%eax <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
*available, size);
return 0;
}
13f2b4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13f2b7: 5b pop %ebx <== NOT EXECUTED
13f2b8: 5e pop %esi <== NOT EXECUTED
13f2b9: 5f pop %edi <== NOT EXECUTED
13f2ba: c9 leave <== NOT EXECUTED
13f2bb: c3 ret <== NOT EXECUTED
if (rc > 0)
return rc;
}
if (read
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
13f2bc: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13f2bf: 8b 50 44 mov 0x44(%eax),%edx <== NOT EXECUTED
block, request_read);
if (rc > 0)
return rc;
}
if (read
13f2c2: 85 d2 test %edx,%edx <== NOT EXECUTED
13f2c4: 74 12 je 13f2d8 <rtems_rfs_file_io_start+0x54><== NOT EXECUTED
13f2c6: 8b 48 3c mov 0x3c(%eax),%ecx <== NOT EXECUTED
13f2c9: 49 dec %ecx <== NOT EXECUTED
13f2ca: 39 ca cmp %ecx,%edx <== NOT EXECUTED
13f2cc: 75 d6 jne 13f2a4 <rtems_rfs_file_io_start+0x20><== NOT EXECUTED
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
13f2ce: 8b 50 40 mov 0x40(%eax),%edx <== NOT EXECUTED
block, request_read);
if (rc > 0)
return rc;
}
if (read
13f2d1: 85 d2 test %edx,%edx <== NOT EXECUTED
13f2d3: 75 d8 jne 13f2ad <rtems_rfs_file_io_start+0x29><== NOT EXECUTED
13f2d5: eb cd jmp 13f2a4 <rtems_rfs_file_io_start+0x20><== NOT EXECUTED
13f2d7: 90 nop <== NOT EXECUTED
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
13f2d8: 8b 48 3c mov 0x3c(%eax),%ecx <== NOT EXECUTED
block, request_read);
if (rc > 0)
return rc;
}
if (read
13f2db: 85 c9 test %ecx,%ecx <== NOT EXECUTED
13f2dd: 75 ea jne 13f2c9 <rtems_rfs_file_io_start+0x45><== NOT EXECUTED
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
13f2df: 8b 50 40 mov 0x40(%eax),%edx <== NOT EXECUTED
block, request_read);
if (rc > 0)
return rc;
}
if (read
13f2e2: 85 d2 test %edx,%edx <== NOT EXECUTED
13f2e4: 75 c7 jne 13f2ad <rtems_rfs_file_io_start+0x29><== NOT EXECUTED
13f2e6: eb bc jmp 13f2a4 <rtems_rfs_file_io_start+0x20><== NOT EXECUTED
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
rtems_rfs_file_map (handle),
13f2e8: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
bool request_read;
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
13f2eb: 8d 7d e4 lea -0x1c(%ebp),%edi <== NOT EXECUTED
13f2ee: 57 push %edi <== NOT EXECUTED
13f2ef: 8d 4b 10 lea 0x10(%ebx),%ecx <== NOT EXECUTED
13f2f2: 51 push %ecx <== NOT EXECUTED
13f2f3: 8d 48 34 lea 0x34(%eax),%ecx <== NOT EXECUTED
13f2f6: 51 push %ecx <== NOT EXECUTED
13f2f7: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
13f2fd: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED
13f300: e8 13 df ff ff call 13d218 <rtems_rfs_block_map_find><== NOT EXECUTED
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
13f305: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f308: 85 c0 test %eax,%eax <== NOT EXECUTED
13f30a: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED
13f30d: 7e 15 jle 13f324 <rtems_rfs_file_io_start+0xa0><== NOT EXECUTED
{
/*
* Has the read reached the EOF ?
*/
if (read && (rc == ENXIO))
13f30f: 84 d2 test %dl,%dl <== NOT EXECUTED
13f311: 74 49 je 13f35c <rtems_rfs_file_io_start+0xd8><== NOT EXECUTED
13f313: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
13f316: 75 9c jne 13f2b4 <rtems_rfs_file_io_start+0x30><== NOT EXECUTED
{
*available = 0;
13f318: c7 06 00 00 00 00 movl $0x0,(%esi) <== NOT EXECUTED
13f31e: 30 c0 xor %al,%al <== NOT EXECUTED
return 0;
13f320: eb 92 jmp 13f2b4 <rtems_rfs_file_io_start+0x30><== NOT EXECUTED
13f322: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
13f324: 84 d2 test %dl,%dl <== NOT EXECUTED
13f326: 74 70 je 13f398 <rtems_rfs_file_io_start+0x114><== NOT EXECUTED
13f328: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13f32b: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
13f331: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: block=%" PRIu32 " request-read=%s\n",
block, request_read ? "yes" : "no");
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
13f336: 51 push %ecx <== NOT EXECUTED
13f337: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13f33a: 8d 4b 04 lea 0x4(%ebx),%ecx <== NOT EXECUTED
13f33d: 51 push %ecx <== NOT EXECUTED
13f33e: 50 push %eax <== NOT EXECUTED
13f33f: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED
13f342: e8 e5 ed ff ff call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
rtems_rfs_file_buffer (handle),
block, request_read);
if (rc > 0)
13f347: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f34a: 85 c0 test %eax,%eax <== NOT EXECUTED
13f34c: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED
13f34f: 0f 8f 5f ff ff ff jg 13f2b4 <rtems_rfs_file_io_start+0x30><== NOT EXECUTED
13f355: e9 43 ff ff ff jmp 13f29d <rtems_rfs_file_io_start+0x19><== NOT EXECUTED
13f35a: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
*available = 0;
return 0;
}
if (rc != ENXIO)
13f35c: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
13f35f: 0f 85 4f ff ff ff jne 13f2b4 <rtems_rfs_file_io_start+0x30><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: grow\n");
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
rtems_rfs_file_map (handle),
13f365: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: grow\n");
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
13f368: 57 push %edi <== NOT EXECUTED
13f369: 6a 01 push $0x1 <== NOT EXECUTED
13f36b: 8d 48 34 lea 0x34(%eax),%ecx <== NOT EXECUTED
13f36e: 51 push %ecx <== NOT EXECUTED
13f36f: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
13f375: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED
13f378: e8 8f e4 ff ff call 13d80c <rtems_rfs_block_map_grow><== NOT EXECUTED
rtems_rfs_file_map (handle),
1, &block);
if (rc > 0)
13f37d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f380: 85 c0 test %eax,%eax <== NOT EXECUTED
13f382: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED
13f385: 0f 8f 29 ff ff ff jg 13f2b4 <rtems_rfs_file_io_start+0x30><== NOT EXECUTED
13f38b: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13f38e: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
13f394: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
13f396: eb 9e jmp 13f336 <rtems_rfs_file_io_start+0xb2><== NOT EXECUTED
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
(rtems_rfs_file_block_offset (handle) ||
13f398: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
13f39b: 85 c0 test %eax,%eax <== NOT EXECUTED
13f39d: 74 10 je 13f3af <rtems_rfs_file_io_start+0x12b><== NOT EXECUTED
13f39f: 8b 4b 1c mov 0x1c(%ebx),%ecx <== NOT EXECUTED
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
13f3a2: 8b 81 98 00 00 00 mov 0x98(%ecx),%eax <== NOT EXECUTED
13f3a8: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED
13f3ad: eb 87 jmp 13f336 <rtems_rfs_file_io_start+0xb2><== NOT EXECUTED
13f3af: 8b 4b 1c mov 0x1c(%ebx),%ecx <== NOT EXECUTED
13f3b2: 8b 81 98 00 00 00 mov 0x98(%ecx),%eax <== NOT EXECUTED
13f3b8: 8b 3e mov (%esi),%edi <== NOT EXECUTED
13f3ba: 3b 78 08 cmp 0x8(%eax),%edi <== NOT EXECUTED
13f3bd: 72 e3 jb 13f3a2 <rtems_rfs_file_io_start+0x11e><== NOT EXECUTED
13f3bf: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
13f3c1: e9 70 ff ff ff jmp 13f336 <rtems_rfs_file_io_start+0xb2><== NOT EXECUTED
0013fb60 <rtems_rfs_file_open>:
int
rtems_rfs_file_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
uint32_t flags,
rtems_rfs_file_handle** file)
{
13fb60: 55 push %ebp <== NOT EXECUTED
13fb61: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13fb63: 57 push %edi <== NOT EXECUTED
13fb64: 56 push %esi <== NOT EXECUTED
13fb65: 53 push %ebx <== NOT EXECUTED
13fb66: 83 ec 38 sub $0x38,%esp <== NOT EXECUTED
13fb69: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
*file = NULL;
13fb6c: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
13fb6f: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
/*
* Allocate a new handle and initialise it. Do this before we deal with the
* shared node data so we do not have to be concerned with reference
* counting.
*/
handle = malloc (sizeof (rtems_rfs_file_handle));
13fb75: 6a 20 push $0x20 <== NOT EXECUTED
13fb77: e8 8c f2 fc ff call 10ee08 <malloc> <== NOT EXECUTED
13fb7c: 89 c2 mov %eax,%edx <== NOT EXECUTED
if (!handle)
13fb7e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13fb81: 85 c0 test %eax,%eax <== NOT EXECUTED
13fb83: 74 47 je 13fbcc <rtems_rfs_file_open+0x6c><== NOT EXECUTED
return ENOMEM;
memset (handle, 0, sizeof (rtems_rfs_file_handle));
13fb85: b9 20 00 00 00 mov $0x20,%ecx <== NOT EXECUTED
13fb8a: 31 c0 xor %eax,%eax <== NOT EXECUTED
13fb8c: 89 d7 mov %edx,%edi <== NOT EXECUTED
13fb8e: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
13fb90: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13fb93: 8b 41 70 mov 0x70(%ecx),%eax <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
13fb96: 83 c1 74 add $0x74,%ecx <== NOT EXECUTED
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
13fb99: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
13fb9b: 75 09 jne 13fba6 <rtems_rfs_file_open+0x46><== NOT EXECUTED
13fb9d: eb 3d jmp 13fbdc <rtems_rfs_file_open+0x7c><== NOT EXECUTED
13fb9f: 90 nop <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
13fba0: 8b 00 mov (%eax),%eax <== NOT EXECUTED
13fba2: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
13fba4: 74 36 je 13fbdc <rtems_rfs_file_open+0x7c><== NOT EXECUTED
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
13fba6: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (shared->inode.ino == ino)
13fba8: 3b 70 14 cmp 0x14(%eax),%esi <== NOT EXECUTED
13fbab: 75 f3 jne 13fba0 <rtems_rfs_file_open+0x40><== NOT EXECUTED
* the reference count and return the pointer to the data.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
13fbad: ff 40 08 incl 0x8(%eax) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
}
handle->flags = flags;
13fbb0: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
13fbb3: 89 02 mov %eax,(%edx) <== NOT EXECUTED
handle->shared = shared;
13fbb5: 89 5a 1c mov %ebx,0x1c(%edx) <== NOT EXECUTED
*file = handle;
13fbb8: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
13fbbb: 89 11 mov %edx,(%ecx) <== NOT EXECUTED
13fbbd: 31 f6 xor %esi,%esi <== NOT EXECUTED
return 0;
}
13fbbf: 89 f0 mov %esi,%eax <== NOT EXECUTED
13fbc1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13fbc4: 5b pop %ebx <== NOT EXECUTED
13fbc5: 5e pop %esi <== NOT EXECUTED
13fbc6: 5f pop %edi <== NOT EXECUTED
13fbc7: c9 leave <== NOT EXECUTED
13fbc8: c3 ret <== NOT EXECUTED
13fbc9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* Allocate a new handle and initialise it. Do this before we deal with the
* shared node data so we do not have to be concerned with reference
* counting.
*/
handle = malloc (sizeof (rtems_rfs_file_handle));
if (!handle)
13fbcc: be 0c 00 00 00 mov $0xc,%esi <== NOT EXECUTED
handle->shared = shared;
*file = handle;
return 0;
}
13fbd1: 89 f0 mov %esi,%eax <== NOT EXECUTED
13fbd3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13fbd6: 5b pop %ebx <== NOT EXECUTED
13fbd7: 5e pop %esi <== NOT EXECUTED
13fbd8: 5f pop %edi <== NOT EXECUTED
13fbd9: c9 leave <== NOT EXECUTED
13fbda: c3 ret <== NOT EXECUTED
13fbdb: 90 nop <== NOT EXECUTED
{
/*
* None exists so create. Copy in the shared parts of the inode we hold in
* memory.
*/
shared = malloc (sizeof (rtems_rfs_file_shared));
13fbdc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13fbdf: 68 9c 00 00 00 push $0x9c <== NOT EXECUTED
13fbe4: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
13fbe7: e8 1c f2 fc ff call 10ee08 <malloc> <== NOT EXECUTED
13fbec: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (!shared)
13fbee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13fbf1: 85 c0 test %eax,%eax <== NOT EXECUTED
13fbf3: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
13fbf6: 74 68 je 13fc60 <rtems_rfs_file_open+0x100><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
13fbf8: b9 9c 00 00 00 mov $0x9c,%ecx <== NOT EXECUTED
13fbfd: 31 c0 xor %eax,%eax <== NOT EXECUTED
13fbff: 89 df mov %ebx,%edi <== NOT EXECUTED
13fc01: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
13fc03: 8d 7b 0c lea 0xc(%ebx),%edi <== NOT EXECUTED
13fc06: 6a 01 push $0x1 <== NOT EXECUTED
13fc08: 57 push %edi <== NOT EXECUTED
13fc09: 56 push %esi <== NOT EXECUTED
13fc0a: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13fc0d: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
13fc10: e8 df 1e 00 00 call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
13fc15: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
13fc17: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13fc1a: 85 c0 test %eax,%eax <== NOT EXECUTED
13fc1c: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
13fc1f: 7e 78 jle 13fc99 <rtems_rfs_file_open+0x139><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: inode open failed: %d: %s\n",
rc, strerror (rc));
free (shared);
13fc21: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
free (shared);
13fc24: 53 push %ebx <== NOT EXECUTED
13fc25: e8 3e ec fc ff call 10e868 <free> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
13fc2a: 5f pop %edi <== NOT EXECUTED
13fc2b: 58 pop %eax <== NOT EXECUTED
13fc2c: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
13fc2f: 8d 42 04 lea 0x4(%edx),%eax <== NOT EXECUTED
13fc32: 50 push %eax <== NOT EXECUTED
13fc33: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13fc36: e8 ed e3 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
13fc3b: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
13fc3e: c6 42 04 00 movb $0x0,0x4(%edx) <== NOT EXECUTED
handle->bnum = 0;
13fc42: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) <== NOT EXECUTED
handle->buffer = NULL;
13fc49: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
13fc50: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
13fc53: e8 10 ec fc ff call 10e868 <free> <== NOT EXECUTED
return rc;
13fc58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13fc5b: e9 5f ff ff ff jmp 13fbbf <rtems_rfs_file_open+0x5f><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
13fc60: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13fc63: 8d 42 04 lea 0x4(%edx),%eax <== NOT EXECUTED
13fc66: 50 push %eax <== NOT EXECUTED
13fc67: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13fc6a: e8 b9 e3 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
13fc6f: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
13fc72: c6 42 04 00 movb $0x0,0x4(%edx) <== NOT EXECUTED
handle->bnum = 0;
13fc76: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) <== NOT EXECUTED
handle->buffer = NULL;
13fc7d: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) <== NOT EXECUTED
*/
shared = malloc (sizeof (rtems_rfs_file_shared));
if (!shared)
{
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
13fc84: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
13fc87: e8 dc eb fc ff call 10e868 <free> <== NOT EXECUTED
13fc8c: be 0c 00 00 00 mov $0xc,%esi <== NOT EXECUTED
return ENOMEM;
13fc91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13fc94: e9 26 ff ff ff jmp 13fbbf <rtems_rfs_file_open+0x5f><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
rc = rtems_rfs_block_map_open (fs, &shared->inode, &shared->map);
13fc99: 51 push %ecx <== NOT EXECUTED
13fc9a: 8d 43 34 lea 0x34(%ebx),%eax <== NOT EXECUTED
13fc9d: 50 push %eax <== NOT EXECUTED
13fc9e: 57 push %edi <== NOT EXECUTED
13fc9f: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13fca2: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
13fca5: e8 32 e0 ff ff call 13dcdc <rtems_rfs_block_map_open><== NOT EXECUTED
13fcaa: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
13fcac: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13fcaf: 85 c0 test %eax,%eax <== NOT EXECUTED
13fcb1: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
13fcb4: 7e 12 jle 13fcc8 <rtems_rfs_file_open+0x168><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
13fcb6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13fcb9: 57 push %edi <== NOT EXECUTED
13fcba: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13fcbd: e8 ae 1d 00 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
free (shared);
13fcc2: 5a pop %edx <== NOT EXECUTED
13fcc3: e9 5c ff ff ff jmp 13fc24 <rtems_rfs_file_open+0xc4><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
shared->references = 1;
13fcc8: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) <== NOT EXECUTED
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
13fccf: 8b 73 18 mov 0x18(%ebx),%esi <== NOT EXECUTED
13fcd2: 8d 46 0c lea 0xc(%esi),%eax <== NOT EXECUTED
13fcd5: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
shared->size.count = rtems_rfs_inode_get_block_count (&shared->inode);
13fcd8: 0f b6 40 03 movzbl 0x3(%eax),%eax <== NOT EXECUTED
13fcdc: 0f b6 4e 0c movzbl 0xc(%esi),%ecx <== NOT EXECUTED
13fce0: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
13fce3: 09 c8 or %ecx,%eax <== NOT EXECUTED
13fce5: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
13fce8: 0f b6 49 01 movzbl 0x1(%ecx),%ecx <== NOT EXECUTED
13fcec: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13fcef: 09 c8 or %ecx,%eax <== NOT EXECUTED
13fcf1: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
13fcf4: 0f b6 49 02 movzbl 0x2(%ecx),%ecx <== NOT EXECUTED
13fcf8: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
13fcfb: 09 c8 or %ecx,%eax <== NOT EXECUTED
13fcfd: 89 83 84 00 00 00 mov %eax,0x84(%ebx) <== NOT EXECUTED
shared->size.offset = rtems_rfs_inode_get_block_offset (&shared->inode);
13fd03: 0f b6 4e 0a movzbl 0xa(%esi),%ecx <== NOT EXECUTED
13fd07: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
13fd0a: 0f b6 46 0b movzbl 0xb(%esi),%eax <== NOT EXECUTED
13fd0e: 09 c8 or %ecx,%eax <== NOT EXECUTED
13fd10: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED
13fd13: 89 83 88 00 00 00 mov %eax,0x88(%ebx) <== NOT EXECUTED
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
13fd19: 8d 46 10 lea 0x10(%esi),%eax <== NOT EXECUTED
13fd1c: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
shared->atime = rtems_rfs_inode_get_atime (&shared->inode);
13fd1f: 0f b6 40 03 movzbl 0x3(%eax),%eax <== NOT EXECUTED
13fd23: 0f b6 4e 10 movzbl 0x10(%esi),%ecx <== NOT EXECUTED
13fd27: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
13fd2a: 09 c8 or %ecx,%eax <== NOT EXECUTED
13fd2c: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
13fd2f: 0f b6 49 01 movzbl 0x1(%ecx),%ecx <== NOT EXECUTED
13fd33: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13fd36: 09 c8 or %ecx,%eax <== NOT EXECUTED
13fd38: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
13fd3b: 0f b6 49 02 movzbl 0x2(%ecx),%ecx <== NOT EXECUTED
13fd3f: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
13fd42: 09 c8 or %ecx,%eax <== NOT EXECUTED
13fd44: 89 83 8c 00 00 00 mov %eax,0x8c(%ebx) <== NOT EXECUTED
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
13fd4a: 8d 46 14 lea 0x14(%esi),%eax <== NOT EXECUTED
13fd4d: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
shared->mtime = rtems_rfs_inode_get_mtime (&shared->inode);
13fd50: 0f b6 40 03 movzbl 0x3(%eax),%eax <== NOT EXECUTED
13fd54: 0f b6 4e 14 movzbl 0x14(%esi),%ecx <== NOT EXECUTED
13fd58: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
13fd5b: 09 c8 or %ecx,%eax <== NOT EXECUTED
13fd5d: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
13fd60: 0f b6 49 01 movzbl 0x1(%ecx),%ecx <== NOT EXECUTED
13fd64: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13fd67: 09 c8 or %ecx,%eax <== NOT EXECUTED
13fd69: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
13fd6c: 0f b6 49 02 movzbl 0x2(%ecx),%ecx <== NOT EXECUTED
13fd70: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
13fd73: 09 c8 or %ecx,%eax <== NOT EXECUTED
13fd75: 89 83 90 00 00 00 mov %eax,0x90(%ebx) <== NOT EXECUTED
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
13fd7b: 8d 46 18 lea 0x18(%esi),%eax <== NOT EXECUTED
13fd7e: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
shared->ctime = rtems_rfs_inode_get_ctime (&shared->inode);
13fd81: 0f b6 40 03 movzbl 0x3(%eax),%eax <== NOT EXECUTED
13fd85: 0f b6 4e 18 movzbl 0x18(%esi),%ecx <== NOT EXECUTED
13fd89: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
13fd8c: 09 c8 or %ecx,%eax <== NOT EXECUTED
13fd8e: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED
13fd91: 0f b6 4e 01 movzbl 0x1(%esi),%ecx <== NOT EXECUTED
13fd95: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13fd98: 09 c8 or %ecx,%eax <== NOT EXECUTED
13fd9a: 0f b6 4e 02 movzbl 0x2(%esi),%ecx <== NOT EXECUTED
13fd9e: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
13fda1: 09 c8 or %ecx,%eax <== NOT EXECUTED
13fda3: 89 83 94 00 00 00 mov %eax,0x94(%ebx) <== NOT EXECUTED
shared->fs = fs;
13fda9: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13fdac: 89 83 98 00 00 00 mov %eax,0x98(%ebx) <== 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 );
13fdb2: 56 push %esi <== NOT EXECUTED
13fdb3: 56 push %esi <== NOT EXECUTED
13fdb4: 53 push %ebx <== NOT EXECUTED
13fdb5: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13fdb8: 83 c0 70 add $0x70,%eax <== NOT EXECUTED
13fdbb: 50 push %eax <== NOT EXECUTED
13fdbc: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
13fdbf: e8 98 3c fd ff call 113a5c <_Chain_Append> <== NOT EXECUTED
rtems_chain_append (&fs->file_shares, &shared->link);
rtems_rfs_inode_unload (fs, &shared->inode, false);
13fdc4: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
13fdc7: 6a 00 push $0x0 <== NOT EXECUTED
13fdc9: 57 push %edi <== NOT EXECUTED
13fdca: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13fdcd: e8 06 1c 00 00 call 1419d8 <rtems_rfs_inode_unload><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
13fdd2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13fdd5: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
13fdd8: e9 d3 fd ff ff jmp 13fbb0 <rtems_rfs_file_open+0x50><== NOT EXECUTED
0013f73c <rtems_rfs_file_seek>:
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
13f73c: 55 push %ebp <== NOT EXECUTED
13f73d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13f73f: 57 push %edi <== NOT EXECUTED
13f740: 56 push %esi <== NOT EXECUTED
13f741: 53 push %ebx <== NOT EXECUTED
13f742: 83 ec 34 sub $0x34,%esp <== NOT EXECUTED
13f745: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
13f748: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
13f74b: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
* file, this function does not itself extend the size of the file."
*
* This means the file needs to set the file size to the pos only when a
* write occurs.
*/
if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
13f74e: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13f751: 8d 90 84 00 00 00 lea 0x84(%eax),%edx <== NOT EXECUTED
13f757: 52 push %edx <== NOT EXECUTED
13f758: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
13f75e: e8 f9 d9 ff ff call 13d15c <rtems_rfs_block_get_size><== NOT EXECUTED
13f763: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f766: 39 d7 cmp %edx,%edi <== NOT EXECUTED
13f768: 77 52 ja 13f7bc <rtems_rfs_file_seek+0x80><== NOT EXECUTED
13f76a: 73 4c jae 13f7b8 <rtems_rfs_file_seek+0x7c><== NOT EXECUTED
handle->shared))
{
rtems_rfs_file_set_bpos (handle, pos);
13f76c: 8d 43 10 lea 0x10(%ebx),%eax <== NOT EXECUTED
13f76f: 50 push %eax <== NOT EXECUTED
13f770: 57 push %edi <== NOT EXECUTED
13f771: 56 push %esi <== NOT EXECUTED
13f772: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
13f775: ff b2 98 00 00 00 pushl 0x98(%edx) <== NOT EXECUTED
13f77b: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
13f77e: e8 15 d9 ff ff call 13d098 <rtems_rfs_block_get_bpos><== NOT EXECUTED
/*
* If the file has a block check if it maps to the current position and it
* does not release it. That will force us to get the block at the new
* position when the I/O starts.
*/
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
13f783: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f786: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
13f789: 85 c0 test %eax,%eax <== NOT EXECUTED
13f78b: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
13f78e: 74 3c je 13f7cc <rtems_rfs_file_seek+0x90><== NOT EXECUTED
{
rtems_rfs_buffer_block block;
int rc;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
rtems_rfs_file_map (handle),
13f790: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
{
rtems_rfs_buffer_block block;
int rc;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
13f793: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED
13f796: 51 push %ecx <== NOT EXECUTED
13f797: 50 push %eax <== NOT EXECUTED
13f798: 8d 42 34 lea 0x34(%edx),%eax <== NOT EXECUTED
13f79b: 50 push %eax <== NOT EXECUTED
13f79c: ff b2 98 00 00 00 pushl 0x98(%edx) <== NOT EXECUTED
13f7a2: e8 71 da ff ff call 13d218 <rtems_rfs_block_map_find><== NOT EXECUTED
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
13f7a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f7aa: 85 c0 test %eax,%eax <== NOT EXECUTED
13f7ac: 7e 32 jle 13f7e0 <rtems_rfs_file_seek+0xa4><== NOT EXECUTED
return rc;
}
*new_pos = pos;
return 0;
}
13f7ae: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13f7b1: 5b pop %ebx <== NOT EXECUTED
13f7b2: 5e pop %esi <== NOT EXECUTED
13f7b3: 5f pop %edi <== NOT EXECUTED
13f7b4: c9 leave <== NOT EXECUTED
13f7b5: c3 ret <== NOT EXECUTED
13f7b6: 66 90 xchg %ax,%ax <== NOT EXECUTED
* file, this function does not itself extend the size of the file."
*
* This means the file needs to set the file size to the pos only when a
* write occurs.
*/
if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
13f7b8: 39 c6 cmp %eax,%esi <== NOT EXECUTED
13f7ba: 72 b0 jb 13f76c <rtems_rfs_file_seek+0x30><== NOT EXECUTED
{
/*
* The seek is outside the current file so release any buffer. A write will
* extend the file.
*/
int rc = rtems_rfs_file_io_release (handle);
13f7bc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13f7bf: 53 push %ebx <== NOT EXECUTED
13f7c0: e8 03 fc ff ff call 13f3c8 <rtems_rfs_file_io_release><== NOT EXECUTED
if (rc > 0)
13f7c5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f7c8: 85 c0 test %eax,%eax <== NOT EXECUTED
13f7ca: 7f e2 jg 13f7ae <rtems_rfs_file_seek+0x72><== NOT EXECUTED
return rc;
}
*new_pos = pos;
13f7cc: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
13f7cf: 89 30 mov %esi,(%eax) <== NOT EXECUTED
13f7d1: 89 78 04 mov %edi,0x4(%eax) <== NOT EXECUTED
13f7d4: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
}
13f7d6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13f7d9: 5b pop %ebx <== NOT EXECUTED
13f7da: 5e pop %esi <== NOT EXECUTED
13f7db: 5f pop %edi <== NOT EXECUTED
13f7dc: c9 leave <== NOT EXECUTED
13f7dd: c3 ret <== NOT EXECUTED
13f7de: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
return rc;
if (rtems_rfs_buffer_bnum (&handle->buffer) != block)
13f7e0: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
13f7e3: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED
13f7e6: 74 e4 je 13f7cc <rtems_rfs_file_seek+0x90><== NOT EXECUTED
{
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
13f7e8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13f7eb: 8d 43 04 lea 0x4(%ebx),%eax <== NOT EXECUTED
13f7ee: 50 push %eax <== NOT EXECUTED
13f7ef: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13f7f2: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
13f7f8: e8 2b e8 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
13f7fd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f800: 85 c0 test %eax,%eax <== NOT EXECUTED
13f802: 7f aa jg 13f7ae <rtems_rfs_file_seek+0x72><== NOT EXECUTED
13f804: eb c6 jmp 13f7cc <rtems_rfs_file_seek+0x90><== NOT EXECUTED
0013f3f8 <rtems_rfs_file_set_size>:
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
13f3f8: 55 push %ebp <== NOT EXECUTED
13f3f9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13f3fb: 57 push %edi <== NOT EXECUTED
13f3fc: 56 push %esi <== NOT EXECUTED
13f3fd: 53 push %ebx <== NOT EXECUTED
13f3fe: 83 ec 44 sub $0x44,%esp <== NOT EXECUTED
13f401: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
13f404: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
13f407: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
13f40a: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
13f40d: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13f410: 8b 72 1c mov 0x1c(%edx),%esi <== NOT EXECUTED
13f413: 8d 86 84 00 00 00 lea 0x84(%esi),%eax <== NOT EXECUTED
13f419: 50 push %eax <== NOT EXECUTED
13f41a: ff b6 98 00 00 00 pushl 0x98(%esi) <== NOT EXECUTED
13f420: e8 37 dd ff ff call 13d15c <rtems_rfs_block_get_size><== NOT EXECUTED
/*
* If the file is same size do nothing else grow or shrink it ?
*
* If the file does not change size do not update the times.
*/
if (size != new_size)
13f425: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f428: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED
13f42b: 31 d7 xor %edx,%edi <== NOT EXECUTED
13f42d: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
13f430: 31 c1 xor %eax,%ecx <== NOT EXECUTED
13f432: 09 cf or %ecx,%edi <== NOT EXECUTED
13f434: 0f 84 42 02 00 00 je 13f67c <rtems_rfs_file_set_size+0x284><== NOT EXECUTED
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
13f43a: 8d 4e 34 lea 0x34(%esi),%ecx <== NOT EXECUTED
13f43d: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED
if (size != new_size)
{
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
13f440: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
13f443: 0b 5d d0 or -0x30(%ebp),%ebx <== NOT EXECUTED
13f446: 0f 84 3c 02 00 00 je 13f688 <rtems_rfs_file_set_size+0x290><== NOT EXECUTED
if (rc > 0)
return rc;
}
else
{
if (size < new_size)
13f44c: 39 55 d4 cmp %edx,-0x2c(%ebp) <== NOT EXECUTED
13f44f: 0f 83 bb 00 00 00 jae 13f510 <rtems_rfs_file_set_size+0x118><== NOT EXECUTED
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
13f455: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13f458: 8b 7a 1c mov 0x1c(%edx),%edi <== NOT EXECUTED
13f45b: 8b 8f 98 00 00 00 mov 0x98(%edi),%ecx <== NOT EXECUTED
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
13f461: 8b 41 08 mov 0x8(%ecx),%eax <== NOT EXECUTED
13f464: 31 d2 xor %edx,%edx <== NOT EXECUTED
13f466: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED
13f469: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
* Shrink
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
13f46c: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
13f46f: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
13f472: 83 c0 ff add $0xffffffff,%eax <== NOT EXECUTED
13f475: 83 d2 ff adc $0xffffffff,%edx <== NOT EXECUTED
13f478: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
13f47b: ff 75 c8 pushl -0x38(%ebp) <== NOT EXECUTED
13f47e: 52 push %edx <== NOT EXECUTED
13f47f: 50 push %eax <== NOT EXECUTED
13f480: 89 4d b8 mov %ecx,-0x48(%ebp) <== NOT EXECUTED
13f483: e8 e0 e3 01 00 call 15d868 <__udivdi3> <== NOT EXECUTED
13f488: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f48b: f7 d0 not %eax <== NOT EXECUTED
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
offset =
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
if (blocks)
13f48d: 03 46 3c add 0x3c(%esi),%eax <== NOT EXECUTED
13f490: 8b 4d b8 mov -0x48(%ebp),%ecx <== NOT EXECUTED
13f493: 0f 85 63 02 00 00 jne 13f6fc <rtems_rfs_file_set_size+0x304><== NOT EXECUTED
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
offset =
13f499: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
13f49c: ff 75 c8 pushl -0x38(%ebp) <== NOT EXECUTED
13f49f: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
13f4a2: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
13f4a5: e8 ce e4 01 00 call 15d978 <__umoddi3> <== NOT EXECUTED
13f4aa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
13f4ad: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED
map->dirty = true;
13f4b0: c6 46 34 01 movb $0x1,0x34(%esi) <== NOT EXECUTED
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
13f4b4: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
13f4b7: 8b 4b 10 mov 0x10(%ebx),%ecx <== NOT EXECUTED
13f4ba: 85 c9 test %ecx,%ecx <== NOT EXECUTED
13f4bc: 0f 85 06 02 00 00 jne 13f6c8 <rtems_rfs_file_set_size+0x2d0><== NOT EXECUTED
13f4c2: 8b 56 3c mov 0x3c(%esi),%edx <== NOT EXECUTED
13f4c5: 39 ca cmp %ecx,%edx <== NOT EXECUTED
13f4c7: 0f 86 06 02 00 00 jbe 13f6d3 <rtems_rfs_file_set_size+0x2db><== NOT EXECUTED
13f4cd: 8d 5a ff lea -0x1(%edx),%ebx <== NOT EXECUTED
13f4d0: 39 d9 cmp %ebx,%ecx <== NOT EXECUTED
13f4d2: 0f 84 56 02 00 00 je 13f72e <rtems_rfs_file_set_size+0x336><== NOT EXECUTED
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
rtems_rfs_file_bpos (handle));
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
13f4d8: 89 97 84 00 00 00 mov %edx,0x84(%edi) <== NOT EXECUTED
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
13f4de: 8b 46 40 mov 0x40(%esi),%eax <== NOT EXECUTED
13f4e1: 89 87 88 00 00 00 mov %eax,0x88(%edi) <== NOT EXECUTED
if (rtems_rfs_file_update_mtime (handle))
13f4e7: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13f4ea: f6 02 02 testb $0x2,(%edx) <== NOT EXECUTED
13f4ed: 0f 85 89 01 00 00 jne 13f67c <rtems_rfs_file_set_size+0x284><== NOT EXECUTED
handle->shared->mtime = time (NULL);
13f4f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13f4f6: 6a 00 push $0x0 <== NOT EXECUTED
13f4f8: e8 63 33 01 00 call 152860 <time> <== NOT EXECUTED
13f4fd: 89 87 90 00 00 00 mov %eax,0x90(%edi) <== NOT EXECUTED
13f503: 31 c0 xor %eax,%eax <== NOT EXECUTED
13f505: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
13f508: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13f50b: 5b pop %ebx <== NOT EXECUTED
13f50c: 5e pop %esi <== NOT EXECUTED
13f50d: 5f pop %edi <== NOT EXECUTED
13f50e: c9 leave <== NOT EXECUTED
13f50f: c3 ret <== NOT EXECUTED
if (rc > 0)
return rc;
}
else
{
if (size < new_size)
13f510: 0f 86 a2 01 00 00 jbe 13f6b8 <rtems_rfs_file_set_size+0x2c0><== NOT EXECUTED
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
13f516: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
13f519: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
13f51c: 29 c1 sub %eax,%ecx <== NOT EXECUTED
13f51e: 19 d3 sbb %edx,%ebx <== NOT EXECUTED
13f520: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED
13f523: 89 5d d4 mov %ebx,-0x2c(%ebp) <== NOT EXECUTED
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
13f526: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
13f529: 8b 7b 1c mov 0x1c(%ebx),%edi <== NOT EXECUTED
13f52c: 8b 8f 98 00 00 00 mov 0x98(%edi),%ecx <== NOT EXECUTED
13f532: 8b 41 08 mov 0x8(%ecx),%eax <== NOT EXECUTED
13f535: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED
read_block = false;
while (count)
13f538: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
13f53b: 0b 55 d0 or -0x30(%ebp),%edx <== NOT EXECUTED
13f53e: 0f 84 ad 01 00 00 je 13f6f1 <rtems_rfs_file_set_size+0x2f9><== NOT EXECUTED
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
13f544: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
13f547: 83 c3 04 add $0x4,%ebx <== NOT EXECUTED
13f54a: 89 5d c0 mov %ebx,-0x40(%ebp) <== NOT EXECUTED
13f54d: c6 45 bf 00 movb $0x0,-0x41(%ebp) <== NOT EXECUTED
13f551: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
13f554: e9 9c 00 00 00 jmp 13f5f5 <rtems_rfs_file_set_size+0x1fd><== NOT EXECUTED
13f559: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
map, 1, &block);
if (rc > 0)
return rc;
}
if (count < (length - bpos.boff))
13f55c: 3b 55 d0 cmp -0x30(%ebp),%edx <== NOT EXECUTED
13f55f: 0f 86 01 01 00 00 jbe 13f666 <rtems_rfs_file_set_size+0x26e><== NOT EXECUTED
{
length = count + bpos.boff;
13f565: 03 45 d0 add -0x30(%ebp),%eax <== NOT EXECUTED
13f568: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
13f56b: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED
map->dirty = true;
13f56e: c6 46 34 01 movb $0x1,0x34(%esi) <== NOT EXECUTED
13f572: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
13f577: c6 45 bf 01 movb $0x1,-0x41(%ebp) <== NOT EXECUTED
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
13f57b: 50 push %eax <== NOT EXECUTED
13f57c: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13f57f: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED
13f582: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13f585: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
13f58b: e8 9c eb ff ff call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
rtems_rfs_file_buffer (handle),
block, read_block);
if (rc > 0)
13f590: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f593: 85 c0 test %eax,%eax <== NOT EXECUTED
13f595: 0f 8f 6d ff ff ff jg 13f508 <rtems_rfs_file_set_size+0x110><== NOT EXECUTED
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
memset (dst + bpos.boff, 0, length - bpos.boff);
13f59b: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
13f59e: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
13f5a1: 29 d1 sub %edx,%ecx <== NOT EXECUTED
13f5a3: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
13f5a6: 03 50 20 add 0x20(%eax),%edx <== NOT EXECUTED
13f5a9: 31 c0 xor %eax,%eax <== NOT EXECUTED
13f5ab: 89 d7 mov %edx,%edi <== NOT EXECUTED
13f5ad: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
13f5af: c6 43 04 01 movb $0x1,0x4(%ebx) <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
13f5b3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13f5b6: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED
13f5b9: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13f5bc: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
13f5c2: e8 61 ea ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
13f5c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f5ca: 85 c0 test %eax,%eax <== NOT EXECUTED
13f5cc: 0f 8f 36 ff ff ff jg 13f508 <rtems_rfs_file_set_size+0x110><== NOT EXECUTED
return rc;
count -= length - bpos.boff;
13f5d2: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
13f5d5: 2b 45 dc sub -0x24(%ebp),%eax <== NOT EXECUTED
13f5d8: 31 d2 xor %edx,%edx <== NOT EXECUTED
13f5da: 29 45 d0 sub %eax,-0x30(%ebp) <== NOT EXECUTED
13f5dd: 19 55 d4 sbb %edx,-0x2c(%ebp) <== NOT EXECUTED
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
13f5e0: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
13f5e3: 0b 45 d0 or -0x30(%ebp),%eax <== NOT EXECUTED
13f5e6: 0f 84 34 01 00 00 je 13f720 <rtems_rfs_file_set_size+0x328><== NOT EXECUTED
13f5ec: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13f5ef: 8b 88 98 00 00 00 mov 0x98(%eax),%ecx <== NOT EXECUTED
/*
* Get the block position for the current end of the file as seen by
* the map. If not found and the EOF grow the map then fill the block
* with 0.
*/
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map), &bpos);
13f5f5: 8b 56 3c mov 0x3c(%esi),%edx <== NOT EXECUTED
13f5f8: 89 55 d8 mov %edx,-0x28(%ebp) <== NOT EXECUTED
13f5fb: 8b 46 40 mov 0x40(%esi),%eax <== NOT EXECUTED
13f5fe: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
13f601: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
13f608: 85 c0 test %eax,%eax <== NOT EXECUTED
13f60a: 74 04 je 13f610 <rtems_rfs_file_set_size+0x218><== NOT EXECUTED
13f60c: 4a dec %edx <== NOT EXECUTED
13f60d: 89 55 d8 mov %edx,-0x28(%ebp) <== NOT EXECUTED
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
13f610: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
13f613: 50 push %eax <== NOT EXECUTED
13f614: 8d 55 d8 lea -0x28(%ebp),%edx <== NOT EXECUTED
13f617: 52 push %edx <== NOT EXECUTED
13f618: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
13f61b: 51 push %ecx <== NOT EXECUTED
13f61c: e8 f7 db ff ff call 13d218 <rtems_rfs_block_map_find><== NOT EXECUTED
map, &bpos, &block);
if (rc > 0)
13f621: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f624: 85 c0 test %eax,%eax <== NOT EXECUTED
13f626: 7e 2b jle 13f653 <rtems_rfs_file_set_size+0x25b><== NOT EXECUTED
{
/*
* Have we reached the EOF ?
*/
if (rc != ENXIO)
13f628: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
13f62b: 0f 85 d7 fe ff ff jne 13f508 <rtems_rfs_file_set_size+0x110><== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
13f631: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED
13f634: 51 push %ecx <== NOT EXECUTED
13f635: 6a 01 push $0x1 <== NOT EXECUTED
13f637: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
13f63a: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13f63d: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
13f643: e8 c4 e1 ff ff call 13d80c <rtems_rfs_block_map_grow><== NOT EXECUTED
map, 1, &block);
if (rc > 0)
13f648: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f64b: 85 c0 test %eax,%eax <== NOT EXECUTED
13f64d: 0f 8f b5 fe ff ff jg 13f508 <rtems_rfs_file_set_size+0x110><== NOT EXECUTED
return rc;
}
if (count < (length - bpos.boff))
13f653: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
13f656: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
13f659: 29 c2 sub %eax,%edx <== NOT EXECUTED
13f65b: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED
13f65e: 85 ff test %edi,%edi <== NOT EXECUTED
13f660: 0f 84 f6 fe ff ff je 13f55c <rtems_rfs_file_set_size+0x164><== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
13f666: c7 46 40 00 00 00 00 movl $0x0,0x40(%esi) <== NOT EXECUTED
map->dirty = true;
13f66d: c6 46 34 01 movb $0x1,0x34(%esi) <== NOT EXECUTED
13f671: 0f b6 45 bf movzbl -0x41(%ebp),%eax <== NOT EXECUTED
13f675: e9 01 ff ff ff jmp 13f57b <rtems_rfs_file_set_size+0x183><== NOT EXECUTED
13f67a: 66 90 xchg %ax,%ax <== NOT EXECUTED
handle->shared->size.count = rtems_rfs_block_map_count (map);
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
if (rtems_rfs_file_update_mtime (handle))
handle->shared->mtime = time (NULL);
13f67c: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
return 0;
}
13f67e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13f681: 5b pop %ebx <== NOT EXECUTED
13f682: 5e pop %esi <== NOT EXECUTED
13f683: 5f pop %edi <== NOT EXECUTED
13f684: c9 leave <== NOT EXECUTED
13f685: c3 ret <== NOT EXECUTED
13f686: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
{
rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map);
13f688: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13f68b: 51 push %ecx <== NOT EXECUTED
13f68c: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13f68f: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
13f692: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
13f698: e8 67 e0 ff ff call 13d704 <rtems_rfs_block_map_free_all><== NOT EXECUTED
if (rc > 0)
13f69d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f6a0: 85 c0 test %eax,%eax <== NOT EXECUTED
13f6a2: 0f 8f 60 fe ff ff jg 13f508 <rtems_rfs_file_set_size+0x110><== NOT EXECUTED
13f6a8: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13f6ab: 8b 79 1c mov 0x1c(%ecx),%edi <== NOT EXECUTED
13f6ae: 8b 56 3c mov 0x3c(%esi),%edx <== NOT EXECUTED
13f6b1: e9 22 fe ff ff jmp 13f4d8 <rtems_rfs_file_set_size+0xe0><== NOT EXECUTED
13f6b6: 66 90 xchg %ax,%ax <== NOT EXECUTED
return rc;
}
else
{
if (size < new_size)
13f6b8: 39 45 d0 cmp %eax,-0x30(%ebp) <== NOT EXECUTED
13f6bb: 0f 86 94 fd ff ff jbe 13f455 <rtems_rfs_file_set_size+0x5d><== NOT EXECUTED
13f6c1: e9 50 fe ff ff jmp 13f516 <rtems_rfs_file_set_size+0x11e><== NOT EXECUTED
13f6c6: 66 90 xchg %ax,%ax <== NOT EXECUTED
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
13f6c8: 8b 56 3c mov 0x3c(%esi),%edx <== NOT EXECUTED
13f6cb: 85 d2 test %edx,%edx <== NOT EXECUTED
13f6cd: 0f 85 f2 fd ff ff jne 13f4c5 <rtems_rfs_file_set_size+0xcd><== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
13f6d3: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
13f6d6: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED
13f6d9: 8b 46 40 mov 0x40(%esi),%eax <== NOT EXECUTED
13f6dc: 89 43 14 mov %eax,0x14(%ebx) <== NOT EXECUTED
13f6df: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) <== NOT EXECUTED
13f6e6: 85 c0 test %eax,%eax <== NOT EXECUTED
13f6e8: 74 07 je 13f6f1 <rtems_rfs_file_set_size+0x2f9><== NOT EXECUTED
13f6ea: 4a dec %edx <== NOT EXECUTED
13f6eb: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13f6ee: 89 50 10 mov %edx,0x10(%eax) <== NOT EXECUTED
13f6f1: 8b 56 3c mov 0x3c(%esi),%edx <== NOT EXECUTED
13f6f4: e9 df fd ff ff jmp 13f4d8 <rtems_rfs_file_set_size+0xe0><== NOT EXECUTED
13f6f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
if (blocks)
{
int rc;
rc = rtems_rfs_block_map_shrink (rtems_rfs_file_fs (handle),
13f6fc: 53 push %ebx <== NOT EXECUTED
13f6fd: 50 push %eax <== NOT EXECUTED
13f6fe: 83 c7 34 add $0x34,%edi <== NOT EXECUTED
13f701: 57 push %edi <== NOT EXECUTED
13f702: 51 push %ecx <== NOT EXECUTED
13f703: e8 58 dd ff ff call 13d460 <rtems_rfs_block_map_shrink><== NOT EXECUTED
rtems_rfs_file_map (handle),
blocks);
if (rc > 0)
13f708: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13f70b: 85 c0 test %eax,%eax <== NOT EXECUTED
13f70d: 0f 8f f5 fd ff ff jg 13f508 <rtems_rfs_file_set_size+0x110><== NOT EXECUTED
13f713: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13f716: 8b 7a 1c mov 0x1c(%edx),%edi <== NOT EXECUTED
13f719: e9 7b fd ff ff jmp 13f499 <rtems_rfs_file_set_size+0xa1><== NOT EXECUTED
13f71e: 66 90 xchg %ax,%ax <== NOT EXECUTED
13f720: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
13f723: 8b 7b 1c mov 0x1c(%ebx),%edi <== NOT EXECUTED
13f726: 8b 56 3c mov 0x3c(%esi),%edx <== NOT EXECUTED
13f729: e9 aa fd ff ff jmp 13f4d8 <rtems_rfs_file_set_size+0xe0><== NOT EXECUTED
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
13f72e: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
13f731: 3b 41 14 cmp 0x14(%ecx),%eax <== NOT EXECUTED
13f734: 0f 83 9e fd ff ff jae 13f4d8 <rtems_rfs_file_set_size+0xe0><== NOT EXECUTED
13f73a: eb 97 jmp 13f6d3 <rtems_rfs_file_set_size+0x2db><== NOT EXECUTED
001403e8 <rtems_rfs_format>:
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
1403e8: 55 push %ebp <== NOT EXECUTED
1403e9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1403eb: 57 push %edi <== NOT EXECUTED
1403ec: 56 push %esi <== NOT EXECUTED
1403ed: 53 push %ebx <== NOT EXECUTED
1403ee: 81 ec 0c 01 00 00 sub $0x10c,%esp <== NOT EXECUTED
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
1403f4: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
1403f7: 80 78 15 00 cmpb $0x0,0x15(%eax) <== NOT EXECUTED
1403fb: 0f 85 db 03 00 00 jne 1407dc <rtems_rfs_format+0x3f4><== NOT EXECUTED
printf ("rtems-rfs: format: %s\n", name);
memset (&fs, 0, sizeof (rtems_rfs_file_system));
140401: 8d 95 14 ff ff ff lea -0xec(%ebp),%edx <== NOT EXECUTED
140407: 89 95 f4 fe ff ff mov %edx,-0x10c(%ebp) <== NOT EXECUTED
14040d: b9 80 00 00 00 mov $0x80,%ecx <== NOT EXECUTED
140412: 31 c0 xor %eax,%eax <== NOT EXECUTED
140414: 89 d7 mov %edx,%edi <== NOT EXECUTED
140416: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
140418: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax <== NOT EXECUTED
14041e: 89 85 54 ff ff ff mov %eax,-0xac(%ebp) <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
140424: 8d 85 54 ff ff ff lea -0xac(%ebp),%eax <== NOT EXECUTED
14042a: 89 85 5c ff ff ff mov %eax,-0xa4(%ebp) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
140430: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax <== NOT EXECUTED
140436: 89 85 64 ff ff ff mov %eax,-0x9c(%ebp) <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
14043c: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax <== NOT EXECUTED
140442: 89 85 6c ff ff ff mov %eax,-0x94(%ebp) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
140448: 8d 85 78 ff ff ff lea -0x88(%ebp),%eax <== NOT EXECUTED
14044e: 89 85 74 ff ff ff mov %eax,-0x8c(%ebp) <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
140454: 8d 85 74 ff ff ff lea -0x8c(%ebp),%eax <== NOT EXECUTED
14045a: 89 85 7c ff ff ff mov %eax,-0x84(%ebp) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
140460: 8d 45 88 lea -0x78(%ebp),%eax <== NOT EXECUTED
140463: 89 45 84 mov %eax,-0x7c(%ebp) <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
140466: 8d 45 84 lea -0x7c(%ebp),%eax <== NOT EXECUTED
140469: 89 45 8c mov %eax,-0x74(%ebp) <== NOT EXECUTED
rtems_chain_initialize_empty (&fs.buffers);
rtems_chain_initialize_empty (&fs.release);
rtems_chain_initialize_empty (&fs.release_modified);
rtems_chain_initialize_empty (&fs.file_shares);
fs.max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
14046c: c7 85 50 ff ff ff 05 movl $0x5,-0xb0(%ebp) <== NOT EXECUTED
140473: 00 00 00
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
140476: c7 85 14 ff ff ff 02 movl $0x2,-0xec(%ebp) <== NOT EXECUTED
14047d: 00 00 00
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
140480: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
140483: 52 push %edx <== NOT EXECUTED
140484: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
140487: e8 44 db ff ff call 13dfd0 <rtems_rfs_buffer_open> <== NOT EXECUTED
14048c: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
14048e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140491: 85 c0 test %eax,%eax <== NOT EXECUTED
140493: 0f 8f 53 06 00 00 jg 140aec <rtems_rfs_format+0x704><== NOT EXECUTED
}
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
140499: 8b 85 20 ff ff ff mov -0xe0(%ebp),%eax <== NOT EXECUTED
14049f: 8b 78 24 mov 0x24(%eax),%edi <== NOT EXECUTED
1404a2: 85 ff test %edi,%edi <== NOT EXECUTED
1404a4: 0f 84 12 03 00 00 je 1407bc <rtems_rfs_format+0x3d4><== NOT EXECUTED
static bool
rtems_rfs_check_config (rtems_rfs_file_system* fs,
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
1404aa: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
1404ad: 8b 1a mov (%edx),%ebx <== NOT EXECUTED
1404af: 89 9d 1c ff ff ff mov %ebx,-0xe4(%ebp) <== NOT EXECUTED
if (!fs->block_size)
1404b5: 85 db test %ebx,%ebx <== NOT EXECUTED
1404b7: 0f 84 73 03 00 00 je 140830 <rtems_rfs_format+0x448><== NOT EXECUTED
if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
1404bd: 8b 48 24 mov 0x24(%eax),%ecx <== NOT EXECUTED
1404c0: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1404c2: 31 d2 xor %edx,%edx <== NOT EXECUTED
1404c4: f7 f1 div %ecx <== NOT EXECUTED
1404c6: 85 d2 test %edx,%edx <== NOT EXECUTED
1404c8: 0f 85 06 04 00 00 jne 1408d4 <rtems_rfs_format+0x4ec><== NOT EXECUTED
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
1404ce: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
1404d1: 8b 42 04 mov 0x4(%edx),%eax <== NOT EXECUTED
1404d4: 89 85 38 ff ff ff mov %eax,-0xc8(%ebp) <== NOT EXECUTED
if (!fs->group_blocks)
1404da: 85 c0 test %eax,%eax <== NOT EXECUTED
1404dc: 0f 84 12 03 00 00 je 1407f4 <rtems_rfs_format+0x40c><== NOT EXECUTED
1404e2: 8b 9d 1c ff ff ff mov -0xe4(%ebp),%ebx <== NOT EXECUTED
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
1404e8: c1 e3 03 shl $0x3,%ebx <== NOT EXECUTED
1404eb: 39 c3 cmp %eax,%ebx <== NOT EXECUTED
1404ed: 0f 82 1f 03 00 00 jb 140812 <rtems_rfs_format+0x42a><== NOT EXECUTED
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
1404f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1404f6: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
1404fc: 50 push %eax <== NOT EXECUTED
1404fd: e8 ee f8 ff ff call 13fdf0 <rtems_rfs_fs_media_size><== NOT EXECUTED
140502: 8b 8d 1c ff ff ff mov -0xe4(%ebp),%ecx <== NOT EXECUTED
140508: 31 db xor %ebx,%ebx <== NOT EXECUTED
14050a: 53 push %ebx <== NOT EXECUTED
14050b: 51 push %ecx <== NOT EXECUTED
14050c: 52 push %edx <== NOT EXECUTED
14050d: 50 push %eax <== NOT EXECUTED
14050e: e8 55 d3 01 00 call 15d868 <__udivdi3> <== NOT EXECUTED
140513: 89 c1 mov %eax,%ecx <== NOT EXECUTED
140515: 89 85 18 ff ff ff mov %eax,-0xe8(%ebp) <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
14051b: 8b 9d 1c ff ff ff mov -0xe4(%ebp),%ebx <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
140521: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
140524: 85 c0 test %eax,%eax <== NOT EXECUTED
140526: 0f 85 90 03 00 00 jne 1408bc <rtems_rfs_format+0x4d4><== NOT EXECUTED
14052c: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
/*
* The bits per block sets the upper limit for the number of blocks in a
* group. The disk will be divided into groups which are the number of bits
* per block.
*/
fs->group_count = rtems_rfs_rup_quotient (rtems_rfs_fs_blocks (fs),
140531: 89 b5 34 ff ff ff mov %esi,-0xcc(%ebp) <== NOT EXECUTED
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
140537: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
14053a: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
14053d: 89 85 3c ff ff ff mov %eax,-0xc4(%ebp) <== NOT EXECUTED
if (!fs->group_inodes)
140543: 85 c0 test %eax,%eax <== NOT EXECUTED
140545: 75 39 jne 140580 <rtems_rfs_format+0x198><== NOT EXECUTED
int inode_overhead = RTEMS_RFS_INODE_OVERHEAD_PERCENTAGE;
/*
* The number of inodes per group is set as a percentage.
*/
if (config->inode_overhead)
140547: 8b 52 0c mov 0xc(%edx),%edx <== NOT EXECUTED
14054a: 85 d2 test %edx,%edx <== NOT EXECUTED
14054c: 75 02 jne 140550 <rtems_rfs_format+0x168><== NOT EXECUTED
14054e: b2 01 mov $0x1,%dl <== NOT EXECUTED
static int
rtems_rfs_inodes_from_percent (rtems_rfs_file_system* fs,
int percentage)
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
140550: 49 dec %ecx <== NOT EXECUTED
140551: 0f af ca imul %edx,%ecx <== NOT EXECUTED
140554: ba 1f 85 eb 51 mov $0x51eb851f,%edx <== NOT EXECUTED
140559: 89 c8 mov %ecx,%eax <== NOT EXECUTED
14055b: f7 e2 mul %edx <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
14055d: c1 ea 05 shr $0x5,%edx <== NOT EXECUTED
140560: 0f 85 76 05 00 00 jne 140adc <rtems_rfs_format+0x6f4><== NOT EXECUTED
140566: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED
* The number of inodes per group is set as a percentage.
*/
if (config->inode_overhead)
inode_overhead = config->inode_overhead;
fs->group_inodes = rtems_rfs_inodes_from_percent (fs, inode_overhead);
14056b: 89 d8 mov %ebx,%eax <== NOT EXECUTED
14056d: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED
140570: ba 25 49 92 24 mov $0x24924925,%edx <== NOT EXECUTED
140575: f7 e2 mul %edx <== NOT EXECUTED
140577: 0f af d1 imul %ecx,%edx <== NOT EXECUTED
14057a: 89 95 3c ff ff ff mov %edx,-0xc4(%ebp) <== NOT EXECUTED
}
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
140580: 89 d9 mov %ebx,%ecx <== NOT EXECUTED
140582: c1 e9 03 shr $0x3,%ecx <== NOT EXECUTED
140585: be 25 49 92 24 mov $0x24924925,%esi <== NOT EXECUTED
14058a: 89 c8 mov %ecx,%eax <== NOT EXECUTED
14058c: f7 e6 mul %esi <== NOT EXECUTED
14058e: 89 d1 mov %edx,%ecx <== NOT EXECUTED
140590: 89 95 40 ff ff ff mov %edx,-0xc0(%ebp) <== NOT EXECUTED
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
140596: 8b 85 3c ff ff ff mov -0xc4(%ebp),%eax <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
14059c: 85 c0 test %eax,%eax <== NOT EXECUTED
14059e: 0f 85 0c 03 00 00 jne 1408b0 <rtems_rfs_format+0x4c8><== NOT EXECUTED
1405a4: b0 01 mov $0x1,%al <== NOT EXECUTED
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
1405a6: 0f af c8 imul %eax,%ecx <== NOT EXECUTED
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
fs->group_inodes =
1405a9: 89 8d 3c ff ff ff mov %ecx,-0xc4(%ebp) <== NOT EXECUTED
rtems_rfs_rup_quotient (fs->group_inodes,
fs->inodes_per_block) * fs->inodes_per_block;
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
1405af: c1 e3 03 shl $0x3,%ebx <== NOT EXECUTED
1405b2: 39 d9 cmp %ebx,%ecx <== NOT EXECUTED
1405b4: 76 06 jbe 1405bc <rtems_rfs_format+0x1d4><== NOT EXECUTED
fs->group_inodes = rtems_rfs_bitmap_numof_bits (fs->block_size);
1405b6: 89 9d 3c ff ff ff mov %ebx,-0xc4(%ebp) <== NOT EXECUTED
fs->max_name_length = config->max_name_length;
1405bc: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
1405bf: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED
1405c2: 89 85 2c ff ff ff mov %eax,-0xd4(%ebp) <== NOT EXECUTED
if (!fs->max_name_length)
1405c8: 85 c0 test %eax,%eax <== NOT EXECUTED
1405ca: 75 0a jne 1405d6 <rtems_rfs_format+0x1ee><== NOT EXECUTED
{
fs->max_name_length = 512;
1405cc: c7 85 2c ff ff ff 00 movl $0x200,-0xd4(%ebp) <== NOT EXECUTED
1405d3: 02 00 00
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
1405d6: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
1405d9: 80 7a 15 00 cmpb $0x0,0x15(%edx) <== NOT EXECUTED
1405dd: 0f 84 27 01 00 00 je 14070a <rtems_rfs_format+0x322><== NOT EXECUTED
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
1405e3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1405e6: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
1405ec: 50 push %eax <== NOT EXECUTED
1405ed: e8 fe f7 ff ff call 13fdf0 <rtems_rfs_fs_media_size><== NOT EXECUTED
1405f2: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1405f5: 52 push %edx <== NOT EXECUTED
1405f6: 50 push %eax <== NOT EXECUTED
1405f7: 68 28 92 16 00 push $0x169228 <== NOT EXECUTED
1405fc: e8 a3 b4 00 00 call 14baa4 <printf> <== NOT EXECUTED
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
140601: 5a pop %edx <== NOT EXECUTED
140602: 59 pop %ecx <== NOT EXECUTED
140603: 8b 85 20 ff ff ff mov -0xe0(%ebp),%eax <== NOT EXECUTED
140609: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED
14060c: 68 50 92 16 00 push $0x169250 <== NOT EXECUTED
140611: e8 8e b4 00 00 call 14baa4 <printf> <== NOT EXECUTED
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
140616: 5f pop %edi <== NOT EXECUTED
140617: 58 pop %eax <== NOT EXECUTED
140618: 8b 85 20 ff ff ff mov -0xe0(%ebp),%eax <== NOT EXECUTED
14061e: ff 70 24 pushl 0x24(%eax) <== NOT EXECUTED
140621: 68 78 92 16 00 push $0x169278 <== NOT EXECUTED
140626: e8 79 b4 00 00 call 14baa4 <printf> <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
printf ("rtems-rfs: format: size = %" PRIu64 "\n",
14062b: 8d 95 14 ff ff ff lea -0xec(%ebp),%edx <== NOT EXECUTED
140631: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
140634: e8 a7 f7 ff ff call 13fde0 <rtems_rfs_fs_size> <== NOT EXECUTED
140639: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
14063c: 52 push %edx <== NOT EXECUTED
14063d: 50 push %eax <== NOT EXECUTED
14063e: 68 a4 92 16 00 push $0x1692a4 <== NOT EXECUTED
140643: e8 5c b4 00 00 call 14baa4 <printf> <== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
140648: 5b pop %ebx <== NOT EXECUTED
140649: 5e pop %esi <== NOT EXECUTED
14064a: ff b5 18 ff ff ff pushl -0xe8(%ebp) <== NOT EXECUTED
140650: 68 c4 92 16 00 push $0x1692c4 <== NOT EXECUTED
140655: e8 4a b4 00 00 call 14baa4 <printf> <== NOT EXECUTED
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
14065a: 5a pop %edx <== NOT EXECUTED
14065b: 59 pop %ecx <== NOT EXECUTED
14065c: ff b5 1c ff ff ff pushl -0xe4(%ebp) <== NOT EXECUTED
140662: 68 e8 92 16 00 push $0x1692e8 <== NOT EXECUTED
140667: e8 38 b4 00 00 call 14baa4 <printf> <== NOT EXECUTED
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
14066c: 5f pop %edi <== NOT EXECUTED
14066d: 58 pop %eax <== NOT EXECUTED
14066e: 8b 85 1c ff ff ff mov -0xe4(%ebp),%eax <== NOT EXECUTED
140674: c1 e0 03 shl $0x3,%eax <== NOT EXECUTED
140677: 50 push %eax <== NOT EXECUTED
140678: 68 10 93 16 00 push $0x169310 <== NOT EXECUTED
14067d: e8 22 b4 00 00 call 14baa4 <printf> <== NOT EXECUTED
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
140682: 5b pop %ebx <== NOT EXECUTED
140683: 5e pop %esi <== NOT EXECUTED
140684: 6a 38 push $0x38 <== NOT EXECUTED
140686: 68 38 93 16 00 push $0x169338 <== NOT EXECUTED
14068b: e8 14 b4 00 00 call 14baa4 <printf> <== NOT EXECUTED
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
140690: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
140696: e8 d9 fc ff ff call 140374 <rtems_rfs_inode_overhead><== NOT EXECUTED
14069b: 89 c1 mov %eax,%ecx <== NOT EXECUTED
14069d: bb 0a 00 00 00 mov $0xa,%ebx <== NOT EXECUTED
1406a2: 99 cltd <== NOT EXECUTED
1406a3: f7 fb idiv %ebx <== NOT EXECUTED
1406a5: 52 push %edx <== NOT EXECUTED
1406a6: ba 67 66 66 66 mov $0x66666667,%edx <== NOT EXECUTED
1406ab: 89 c8 mov %ecx,%eax <== NOT EXECUTED
1406ad: f7 ea imul %edx <== NOT EXECUTED
1406af: c1 fa 02 sar $0x2,%edx <== NOT EXECUTED
1406b2: c1 f9 1f sar $0x1f,%ecx <== NOT EXECUTED
1406b5: 29 ca sub %ecx,%edx <== NOT EXECUTED
1406b7: 52 push %edx <== NOT EXECUTED
1406b8: 8b 85 34 ff ff ff mov -0xcc(%ebp),%eax <== NOT EXECUTED
1406be: 0f af 85 3c ff ff ff imul -0xc4(%ebp),%eax <== NOT EXECUTED
1406c5: 50 push %eax <== NOT EXECUTED
1406c6: 68 60 93 16 00 push $0x169360 <== NOT EXECUTED
1406cb: e8 d4 b3 00 00 call 14baa4 <printf> <== NOT EXECUTED
fs.group_inodes * fs.group_count,
rtems_rfs_inode_overhead (&fs) / 10,
rtems_rfs_inode_overhead (&fs) % 10);
printf ("rtems-rfs: format: groups = %u\n", fs.group_count);
1406d0: 83 c4 18 add $0x18,%esp <== NOT EXECUTED
1406d3: ff b5 34 ff ff ff pushl -0xcc(%ebp) <== NOT EXECUTED
1406d9: 68 8c 93 16 00 push $0x16938c <== NOT EXECUTED
1406de: e8 c1 b3 00 00 call 14baa4 <printf> <== NOT EXECUTED
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
1406e3: 5a pop %edx <== NOT EXECUTED
1406e4: 59 pop %ecx <== NOT EXECUTED
1406e5: ff b5 38 ff ff ff pushl -0xc8(%ebp) <== NOT EXECUTED
1406eb: 68 ac 93 16 00 push $0x1693ac <== NOT EXECUTED
1406f0: e8 af b3 00 00 call 14baa4 <printf> <== NOT EXECUTED
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
1406f5: 5f pop %edi <== NOT EXECUTED
1406f6: 58 pop %eax <== NOT EXECUTED
1406f7: ff b5 3c ff ff ff pushl -0xc4(%ebp) <== NOT EXECUTED
1406fd: 68 d4 93 16 00 push $0x1693d4 <== NOT EXECUTED
140702: e8 9d b3 00 00 call 14baa4 <printf> <== NOT EXECUTED
140707: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
14070a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
14070d: ff b5 1c ff ff ff pushl -0xe4(%ebp) <== NOT EXECUTED
140713: 8d 95 14 ff ff ff lea -0xec(%ebp),%edx <== NOT EXECUTED
140719: 52 push %edx <== NOT EXECUTED
14071a: e8 41 d8 ff ff call 13df60 <rtems_rfs_buffer_setblksize><== NOT EXECUTED
14071f: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
140721: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140724: 85 c0 test %eax,%eax <== NOT EXECUTED
140726: 0f 8f 6e 08 00 00 jg 140f9a <rtems_rfs_format+0xbb2><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
14072c: c6 45 d4 00 movb $0x0,-0x2c(%ebp) <== NOT EXECUTED
handle->bnum = 0;
140730: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
140737: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
printf ("rtems-rfs: write-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return false;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, false);
14073e: 6a 00 push $0x0 <== NOT EXECUTED
140740: 6a 00 push $0x0 <== NOT EXECUTED
140742: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED
140745: 50 push %eax <== NOT EXECUTED
140746: 8d 95 14 ff ff ff lea -0xec(%ebp),%edx <== NOT EXECUTED
14074c: 52 push %edx <== NOT EXECUTED
14074d: e8 da d9 ff ff call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
140752: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
140754: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140757: 85 c0 test %eax,%eax <== NOT EXECUTED
140759: 0f 8e 91 01 00 00 jle 1408f0 <rtems_rfs_format+0x508><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
14075f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
140762: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED
140765: 50 push %eax <== NOT EXECUTED
140766: 8d 95 14 ff ff ff lea -0xec(%ebp),%edx <== NOT EXECUTED
14076c: 52 push %edx <== NOT EXECUTED
14076d: e8 b6 d8 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
140772: c6 45 d4 00 movb $0x0,-0x2c(%ebp) <== NOT EXECUTED
handle->bnum = 0;
140776: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
14077d: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
140784: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
140787: e8 a0 cd 00 00 call 14d52c <strerror> <== NOT EXECUTED
14078c: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
14078f: 50 push %eax <== NOT EXECUTED
140790: 53 push %ebx <== NOT EXECUTED
140791: 68 34 94 16 00 push $0x169434 <== NOT EXECUTED
140796: e8 09 b3 00 00 call 14baa4 <printf> <== NOT EXECUTED
14079b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
14079e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1407a1: 68 a8 94 16 00 push $0x1694a8 <== NOT EXECUTED
1407a6: e8 0d b5 00 00 call 14bcb8 <puts> <== NOT EXECUTED
1407ab: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
1407b0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
1407b3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1407b6: 5b pop %ebx <== NOT EXECUTED
1407b7: 5e pop %esi <== NOT EXECUTED
1407b8: 5f pop %edi <== NOT EXECUTED
1407b9: c9 leave <== NOT EXECUTED
1407ba: c3 ret <== NOT EXECUTED
1407bb: 90 nop <== NOT EXECUTED
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
{
printf ("rtems-rfs: media block is invalid: %" PRIu32 "\n",
1407bc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1407bf: 6a 00 push $0x0 <== NOT EXECUTED
1407c1: 68 90 91 16 00 push $0x169190 <== NOT EXECUTED
1407c6: e8 d9 b2 00 00 call 14baa4 <printf> <== NOT EXECUTED
1407cb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
return -1;
1407d0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
1407d3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1407d6: 5b pop %ebx <== NOT EXECUTED
1407d7: 5e pop %esi <== NOT EXECUTED
1407d8: 5f pop %edi <== NOT EXECUTED
1407d9: c9 leave <== NOT EXECUTED
1407da: c3 ret <== NOT EXECUTED
1407db: 90 nop <== NOT EXECUTED
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
printf ("rtems-rfs: format: %s\n", name);
1407dc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1407df: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
1407e2: 68 36 91 16 00 push $0x169136 <== NOT EXECUTED
1407e7: e8 b8 b2 00 00 call 14baa4 <printf> <== NOT EXECUTED
1407ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1407ef: e9 0d fc ff ff jmp 140401 <rtems_rfs_format+0x19> <== NOT EXECUTED
{
/*
* The number of blocks per group is defined by the number of bits in a
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
1407f4: 8b 9d 1c ff ff ff mov -0xe4(%ebp),%ebx <== NOT EXECUTED
1407fa: 8d 04 dd 00 00 00 00 lea 0x0(,%ebx,8),%eax <== NOT EXECUTED
140801: 89 85 38 ff ff ff mov %eax,-0xc8(%ebp) <== NOT EXECUTED
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
140807: c1 e3 03 shl $0x3,%ebx <== NOT EXECUTED
14080a: 39 c3 cmp %eax,%ebx <== NOT EXECUTED
14080c: 0f 83 e1 fc ff ff jae 1404f3 <rtems_rfs_format+0x10b><== NOT EXECUTED
{
printf ("group block count is higher than bits in block\n");
140812: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140815: 68 f8 91 16 00 push $0x1691f8 <== NOT EXECUTED
14081a: e8 99 b4 00 00 call 14bcb8 <puts> <== NOT EXECUTED
14081f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
140824: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
140827: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
14082a: 5b pop %ebx <== NOT EXECUTED
14082b: 5e pop %esi <== NOT EXECUTED
14082c: 5f pop %edi <== NOT EXECUTED
14082d: c9 leave <== NOT EXECUTED
14082e: c3 ret <== NOT EXECUTED
14082f: 90 nop <== NOT EXECUTED
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
if (!fs->block_size)
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
140830: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140833: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
140839: 50 push %eax <== NOT EXECUTED
14083a: e8 b1 f5 ff ff call 13fdf0 <rtems_rfs_fs_media_size><== NOT EXECUTED
if (total_size >= GIGS (1))
14083f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140842: 83 fa 00 cmp $0x0,%edx <== NOT EXECUTED
140845: 77 07 ja 14084e <rtems_rfs_format+0x466><== NOT EXECUTED
140847: 3d ff ff 0f 00 cmp $0xfffff,%eax <== NOT EXECUTED
14084c: 76 36 jbe 140884 <rtems_rfs_format+0x49c><== NOT EXECUTED
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
14084e: 05 00 00 10 00 add $0x100000,%eax <== NOT EXECUTED
140853: 83 d2 00 adc $0x0,%edx <== NOT EXECUTED
140856: 0f ac d0 14 shrd $0x14,%edx,%eax <== NOT EXECUTED
14085a: c1 ea 14 shr $0x14,%edx <== NOT EXECUTED
14085d: b9 1f 00 00 00 mov $0x1f,%ecx <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
140862: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
140867: eb 0a jmp 140873 <rtems_rfs_format+0x48b><== NOT EXECUTED
140869: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
int b;
for (b = 31; b > 0; b--)
14086c: 49 dec %ecx <== NOT EXECUTED
14086d: 0f 84 4c 07 00 00 je 140fbf <rtems_rfs_format+0xbd7><== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
140873: 89 d3 mov %edx,%ebx <== NOT EXECUTED
140875: d3 e3 shl %cl,%ebx <== NOT EXECUTED
140877: 85 c3 test %eax,%ebx <== NOT EXECUTED
140879: 74 f1 je 14086c <rtems_rfs_format+0x484><== NOT EXECUTED
break;
fs->block_size = 1 << b;
14087b: 89 9d 1c ff ff ff mov %ebx,-0xe4(%ebp) <== NOT EXECUTED
140881: eb 07 jmp 14088a <rtems_rfs_format+0x4a2><== NOT EXECUTED
140883: 90 nop <== NOT EXECUTED
fs->block_size = config->block_size;
if (!fs->block_size)
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
if (total_size >= GIGS (1))
140884: 8b 9d 1c ff ff ff mov -0xe4(%ebp),%ebx <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
break;
fs->block_size = 1 << b;
}
if (fs->block_size < 512)
14088a: 81 fb ff 01 00 00 cmp $0x1ff,%ebx <== NOT EXECUTED
140890: 0f 87 22 02 00 00 ja 140ab8 <rtems_rfs_format+0x6d0><== NOT EXECUTED
fs->block_size = 512;
140896: c7 85 1c ff ff ff 00 movl $0x200,-0xe4(%ebp) <== NOT EXECUTED
14089d: 02 00 00
1408a0: bb 00 02 00 00 mov $0x200,%ebx <== NOT EXECUTED
1408a5: 8b 85 20 ff ff ff mov -0xe0(%ebp),%eax <== NOT EXECUTED
1408ab: e9 0d fc ff ff jmp 1404bd <rtems_rfs_format+0xd5> <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
1408b0: 48 dec %eax <== NOT EXECUTED
1408b1: 31 d2 xor %edx,%edx <== NOT EXECUTED
1408b3: f7 f1 div %ecx <== NOT EXECUTED
1408b5: 40 inc %eax <== NOT EXECUTED
1408b6: e9 eb fc ff ff jmp 1405a6 <rtems_rfs_format+0x1be><== NOT EXECUTED
1408bb: 90 nop <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
1408bc: 8d 40 ff lea -0x1(%eax),%eax <== NOT EXECUTED
1408bf: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi <== NOT EXECUTED
1408c6: 31 d2 xor %edx,%edx <== NOT EXECUTED
1408c8: f7 f6 div %esi <== NOT EXECUTED
1408ca: 8d 70 01 lea 0x1(%eax),%esi <== NOT EXECUTED
1408cd: e9 5f fc ff ff jmp 140531 <rtems_rfs_format+0x149><== NOT EXECUTED
1408d2: 66 90 xchg %ax,%ax <== NOT EXECUTED
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
{
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
1408d4: 56 push %esi <== NOT EXECUTED
1408d5: 51 push %ecx <== NOT EXECUTED
1408d6: 53 push %ebx <== NOT EXECUTED
1408d7: 68 b8 91 16 00 push $0x1691b8 <== NOT EXECUTED
1408dc: e8 c3 b1 00 00 call 14baa4 <printf> <== NOT EXECUTED
1408e1: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1408e6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1408e9: e9 e5 fe ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
1408ee: 66 90 xchg %ax,%ax <== NOT EXECUTED
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
1408f0: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
1408f3: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
1408f6: 8b 8d 1c ff ff ff mov -0xe4(%ebp),%ecx <== NOT EXECUTED
1408fc: b0 ff mov $0xff,%al <== NOT EXECUTED
1408fe: 89 d7 mov %edx,%edi <== NOT EXECUTED
140900: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
140902: c6 02 28 movb $0x28,(%edx) <== NOT EXECUTED
140905: c6 42 01 09 movb $0x9,0x1(%edx) <== NOT EXECUTED
140909: c6 42 02 20 movb $0x20,0x2(%edx) <== NOT EXECUTED
14090d: c6 42 03 01 movb $0x1,0x3(%edx) <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
140911: c6 42 04 00 movb $0x0,0x4(%edx) <== NOT EXECUTED
140915: c6 42 05 00 movb $0x0,0x5(%edx) <== NOT EXECUTED
140919: c6 42 06 00 movb $0x0,0x6(%edx) <== NOT EXECUTED
14091d: c6 42 07 00 movb $0x0,0x7(%edx) <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
140921: 0f b6 85 1b ff ff ff movzbl -0xe5(%ebp),%eax <== NOT EXECUTED
140928: 88 42 0c mov %al,0xc(%edx) <== NOT EXECUTED
14092b: 0f b7 85 1a ff ff ff movzwl -0xe6(%ebp),%eax <== NOT EXECUTED
140932: 88 42 0d mov %al,0xd(%edx) <== NOT EXECUTED
140935: 8b 85 18 ff ff ff mov -0xe8(%ebp),%eax <== NOT EXECUTED
14093b: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
14093e: 88 42 0e mov %al,0xe(%edx) <== NOT EXECUTED
140941: 8b 85 18 ff ff ff mov -0xe8(%ebp),%eax <== NOT EXECUTED
140947: 88 42 0f mov %al,0xf(%edx) <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
14094a: 0f b6 85 1f ff ff ff movzbl -0xe1(%ebp),%eax <== NOT EXECUTED
140951: 88 42 08 mov %al,0x8(%edx) <== NOT EXECUTED
140954: 0f b7 85 1e ff ff ff movzwl -0xe2(%ebp),%eax <== NOT EXECUTED
14095b: 88 42 09 mov %al,0x9(%edx) <== NOT EXECUTED
14095e: 8b 85 1c ff ff ff mov -0xe4(%ebp),%eax <== NOT EXECUTED
140964: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
140967: 88 42 0a mov %al,0xa(%edx) <== NOT EXECUTED
14096a: 8b 85 1c ff ff ff mov -0xe4(%ebp),%eax <== NOT EXECUTED
140970: 88 42 0b mov %al,0xb(%edx) <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
140973: 0f b6 85 2b ff ff ff movzbl -0xd5(%ebp),%eax <== NOT EXECUTED
14097a: 88 42 10 mov %al,0x10(%edx) <== NOT EXECUTED
14097d: 0f b7 85 2a ff ff ff movzwl -0xd6(%ebp),%eax <== NOT EXECUTED
140984: 88 42 11 mov %al,0x11(%edx) <== NOT EXECUTED
140987: 8b 85 28 ff ff ff mov -0xd8(%ebp),%eax <== NOT EXECUTED
14098d: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
140990: 88 42 12 mov %al,0x12(%edx) <== NOT EXECUTED
140993: 8b 85 28 ff ff ff mov -0xd8(%ebp),%eax <== NOT EXECUTED
140999: 88 42 13 mov %al,0x13(%edx) <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
14099c: 0f b6 85 2f ff ff ff movzbl -0xd1(%ebp),%eax <== NOT EXECUTED
1409a3: 88 42 14 mov %al,0x14(%edx) <== NOT EXECUTED
1409a6: 0f b7 85 2e ff ff ff movzwl -0xd2(%ebp),%eax <== NOT EXECUTED
1409ad: 88 42 15 mov %al,0x15(%edx) <== NOT EXECUTED
1409b0: 8b 85 2c ff ff ff mov -0xd4(%ebp),%eax <== NOT EXECUTED
1409b6: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
1409b9: 88 42 16 mov %al,0x16(%edx) <== NOT EXECUTED
1409bc: 8b 85 2c ff ff ff mov -0xd4(%ebp),%eax <== NOT EXECUTED
1409c2: 88 42 17 mov %al,0x17(%edx) <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
1409c5: 0f b6 85 37 ff ff ff movzbl -0xc9(%ebp),%eax <== NOT EXECUTED
1409cc: 88 42 18 mov %al,0x18(%edx) <== NOT EXECUTED
1409cf: 0f b7 85 36 ff ff ff movzwl -0xca(%ebp),%eax <== NOT EXECUTED
1409d6: 88 42 19 mov %al,0x19(%edx) <== NOT EXECUTED
1409d9: 8b 85 34 ff ff ff mov -0xcc(%ebp),%eax <== NOT EXECUTED
1409df: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
1409e2: 88 42 1a mov %al,0x1a(%edx) <== NOT EXECUTED
1409e5: 8b 85 34 ff ff ff mov -0xcc(%ebp),%eax <== NOT EXECUTED
1409eb: 88 42 1b mov %al,0x1b(%edx) <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
1409ee: 0f b6 85 3b ff ff ff movzbl -0xc5(%ebp),%eax <== NOT EXECUTED
1409f5: 88 42 1c mov %al,0x1c(%edx) <== NOT EXECUTED
1409f8: 0f b7 85 3a ff ff ff movzwl -0xc6(%ebp),%eax <== NOT EXECUTED
1409ff: 88 42 1d mov %al,0x1d(%edx) <== NOT EXECUTED
140a02: 8b 85 38 ff ff ff mov -0xc8(%ebp),%eax <== NOT EXECUTED
140a08: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
140a0b: 88 42 1e mov %al,0x1e(%edx) <== NOT EXECUTED
140a0e: 8b 85 38 ff ff ff mov -0xc8(%ebp),%eax <== NOT EXECUTED
140a14: 88 42 1f mov %al,0x1f(%edx) <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
140a17: 0f b6 85 3f ff ff ff movzbl -0xc1(%ebp),%eax <== NOT EXECUTED
140a1e: 88 42 20 mov %al,0x20(%edx) <== NOT EXECUTED
140a21: 0f b7 85 3e ff ff ff movzwl -0xc2(%ebp),%eax <== NOT EXECUTED
140a28: 88 42 21 mov %al,0x21(%edx) <== NOT EXECUTED
140a2b: 8b 85 3c ff ff ff mov -0xc4(%ebp),%eax <== NOT EXECUTED
140a31: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
140a34: 88 42 22 mov %al,0x22(%edx) <== NOT EXECUTED
140a37: 8b 85 3c ff ff ff mov -0xc4(%ebp),%eax <== NOT EXECUTED
140a3d: 88 42 23 mov %al,0x23(%edx) <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
140a40: c6 42 24 00 movb $0x0,0x24(%edx) <== NOT EXECUTED
140a44: c6 42 25 00 movb $0x0,0x25(%edx) <== NOT EXECUTED
140a48: c6 42 26 00 movb $0x0,0x26(%edx) <== NOT EXECUTED
140a4c: c6 42 27 38 movb $0x38,0x27(%edx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
140a50: c6 45 d4 01 movb $0x1,-0x2c(%ebp) <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (fs, &handle);
140a54: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
140a57: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED
140a5a: 50 push %eax <== NOT EXECUTED
140a5b: 8d 95 14 ff ff ff lea -0xec(%ebp),%edx <== NOT EXECUTED
140a61: 52 push %edx <== NOT EXECUTED
140a62: e8 c1 d5 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
140a67: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
140a69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140a6c: 85 c0 test %eax,%eax <== NOT EXECUTED
140a6e: 0f 8e a0 00 00 00 jle 140b14 <rtems_rfs_format+0x72c><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
140a74: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
140a77: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED
140a7a: 50 push %eax <== NOT EXECUTED
140a7b: 8d 95 14 ff ff ff lea -0xec(%ebp),%edx <== NOT EXECUTED
140a81: 52 push %edx <== NOT EXECUTED
140a82: e8 a1 d5 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
140a87: c6 45 d4 00 movb $0x0,-0x2c(%ebp) <== NOT EXECUTED
handle->bnum = 0;
140a8b: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
140a92: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("rtems-rfs: write-superblock: buffer release failed: %d: %s\n",
140a99: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
140a9c: e8 8b ca 00 00 call 14d52c <strerror> <== NOT EXECUTED
140aa1: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
140aa4: 50 push %eax <== NOT EXECUTED
140aa5: 53 push %ebx <== NOT EXECUTED
140aa6: 68 6c 94 16 00 push $0x16946c <== NOT EXECUTED
140aab: e8 f4 af 00 00 call 14baa4 <printf> <== NOT EXECUTED
140ab0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140ab3: e9 e6 fc ff ff jmp 14079e <rtems_rfs_format+0x3b6><== NOT EXECUTED
}
if (fs->block_size < 512)
fs->block_size = 512;
if (fs->block_size > (4 * 1024))
140ab8: 81 fb 00 10 00 00 cmp $0x1000,%ebx <== NOT EXECUTED
140abe: 76 0f jbe 140acf <rtems_rfs_format+0x6e7><== NOT EXECUTED
fs->block_size = (4 * 1024);
140ac0: c7 85 1c ff ff ff 00 movl $0x1000,-0xe4(%ebp) <== NOT EXECUTED
140ac7: 10 00 00
140aca: bb 00 10 00 00 mov $0x1000,%ebx <== NOT EXECUTED
140acf: 8b 85 20 ff ff ff mov -0xe0(%ebp),%eax <== NOT EXECUTED
140ad5: e9 e3 f9 ff ff jmp 1404bd <rtems_rfs_format+0xd5> <== NOT EXECUTED
140ada: 66 90 xchg %ax,%ax <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
140adc: 8d 42 ff lea -0x1(%edx),%eax <== NOT EXECUTED
140adf: 31 d2 xor %edx,%edx <== NOT EXECUTED
140ae1: f7 f6 div %esi <== NOT EXECUTED
140ae3: 8d 48 01 lea 0x1(%eax),%ecx <== NOT EXECUTED
140ae6: e9 80 fa ff ff jmp 14056b <rtems_rfs_format+0x183><== NOT EXECUTED
140aeb: 90 nop <== NOT EXECUTED
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
if (rc > 0)
{
printf ("rtems-rfs: format: buffer open failed: %d: %s\n",
140aec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140aef: 50 push %eax <== NOT EXECUTED
140af0: e8 37 ca 00 00 call 14d52c <strerror> <== NOT EXECUTED
140af5: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
140af8: 50 push %eax <== NOT EXECUTED
140af9: 53 push %ebx <== NOT EXECUTED
140afa: 68 60 91 16 00 push $0x169160 <== NOT EXECUTED
140aff: e8 a0 af 00 00 call 14baa4 <printf> <== NOT EXECUTED
140b04: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
rc, strerror (rc));
return -1;
140b09: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140b0c: e9 c2 fc ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
140b11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
140b14: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
140b17: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED
140b1a: 50 push %eax <== NOT EXECUTED
140b1b: 8d 95 14 ff ff ff lea -0xec(%ebp),%edx <== NOT EXECUTED
140b21: 52 push %edx <== NOT EXECUTED
140b22: e8 01 d5 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
140b27: c6 45 d4 00 movb $0x0,-0x2c(%ebp) <== NOT EXECUTED
handle->bnum = 0;
140b2b: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
140b32: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
140b39: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140b3c: 8b b5 34 ff ff ff mov -0xcc(%ebp),%esi <== NOT EXECUTED
140b42: 85 f6 test %esi,%esi <== NOT EXECUTED
140b44: 0f 8e a3 02 00 00 jle 140ded <rtems_rfs_format+0xa05><== NOT EXECUTED
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
140b4a: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
140b4d: 8a 52 15 mov 0x15(%edx),%dl <== NOT EXECUTED
140b50: 88 95 03 ff ff ff mov %dl,-0xfd(%ebp) <== NOT EXECUTED
140b56: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
140b59: 8a 40 14 mov 0x14(%eax),%al <== NOT EXECUTED
140b5c: 88 85 02 ff ff ff mov %al,-0xfe(%ebp) <== NOT EXECUTED
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
140b62: 8b 9d 38 ff ff ff mov -0xc8(%ebp),%ebx <== NOT EXECUTED
if (group_base > rtems_rfs_fs_blocks (fs))
140b68: 8b 85 18 ff ff ff mov -0xe8(%ebp),%eax <== NOT EXECUTED
140b6e: 85 c0 test %eax,%eax <== NOT EXECUTED
140b70: 0f 84 bd 06 00 00 je 141233 <rtems_rfs_format+0xe4b><== NOT EXECUTED
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
140b76: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
140b7b: c7 85 04 ff ff ff 00 movl $0x0,-0xfc(%ebp) <== NOT EXECUTED
140b82: 00 00 00
140b85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Be nice to strange sizes of disks. These are embedded systems after all
* and nice numbers do not always work out. Let the last block pick up the
* remainder of the blocks.
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
140b88: 8d 14 33 lea (%ebx,%esi,1),%edx <== NOT EXECUTED
140b8b: 39 d0 cmp %edx,%eax <== NOT EXECUTED
140b8d: 73 04 jae 140b93 <rtems_rfs_format+0x7ab><== NOT EXECUTED
group_size = rtems_rfs_fs_blocks (fs) - group_base;
140b8f: 89 c3 mov %eax,%ebx <== NOT EXECUTED
140b91: 29 f3 sub %esi,%ebx <== NOT EXECUTED
if (verbose)
140b93: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp) <== NOT EXECUTED
140b9a: 0f 85 08 01 00 00 jne 140ca8 <rtems_rfs_format+0x8c0><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
140ba0: c6 45 d4 00 movb $0x0,-0x2c(%ebp) <== NOT EXECUTED
handle->bnum = 0;
140ba4: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
140bab: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
printf (", blocks");
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
140bb2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140bb5: 56 push %esi <== NOT EXECUTED
140bb6: 53 push %ebx <== NOT EXECUTED
140bb7: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED
140bba: 50 push %eax <== NOT EXECUTED
140bbb: 8d 95 14 ff ff ff lea -0xec(%ebp),%edx <== NOT EXECUTED
140bc1: 52 push %edx <== NOT EXECUTED
140bc2: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED
140bc5: 50 push %eax <== NOT EXECUTED
140bc6: e8 11 62 00 00 call 146ddc <rtems_rfs_bitmap_open> <== NOT EXECUTED
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
140bcb: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
140bce: 85 c0 test %eax,%eax <== NOT EXECUTED
140bd0: 7e 52 jle 140c24 <rtems_rfs_format+0x83c><== NOT EXECUTED
140bd2: 89 c7 mov %eax,%edi <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
140bd4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
140bd7: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
140bda: 52 push %edx <== NOT EXECUTED
140bdb: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
140be1: 50 push %eax <== NOT EXECUTED
140be2: e8 41 d4 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
140be7: c6 45 d4 00 movb $0x0,-0x2c(%ebp) <== NOT EXECUTED
handle->bnum = 0;
140beb: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
140bf2: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open block bitmap failed: %d: %s\n",
140bf9: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
140bfc: e8 2b c9 00 00 call 14d52c <strerror> <== NOT EXECUTED
140c01: 50 push %eax <== NOT EXECUTED
140c02: 57 push %edi <== NOT EXECUTED
140c03: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
140c09: 68 48 95 16 00 push $0x169548 <== NOT EXECUTED
140c0e: e8 91 ae 00 00 call 14baa4 <printf> <== NOT EXECUTED
140c13: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
140c18: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
140c1b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
140c1e: 5b pop %ebx <== NOT EXECUTED
140c1f: 5e pop %esi <== NOT EXECUTED
140c20: 5f pop %edi <== NOT EXECUTED
140c21: c9 leave <== NOT EXECUTED
140c22: c3 ret <== NOT EXECUTED
140c23: 90 nop <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
140c24: 8b 8d 1c ff ff ff mov -0xe4(%ebp),%ecx <== NOT EXECUTED
140c2a: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
140c2d: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED
140c30: 89 d7 mov %edx,%edi <== NOT EXECUTED
140c32: b0 ff mov $0xff,%al <== NOT EXECUTED
140c34: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
/*
* Clear the bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
140c36: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140c39: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED
140c3c: 52 push %edx <== NOT EXECUTED
140c3d: e8 ea 61 00 00 call 146e2c <rtems_rfs_bitmap_map_clear_all><== NOT EXECUTED
if (rc > 0)
140c42: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140c45: 85 c0 test %eax,%eax <== NOT EXECUTED
140c47: 0f 8e 93 00 00 00 jle 140ce0 <rtems_rfs_format+0x8f8><== NOT EXECUTED
140c4d: 89 c7 mov %eax,%edi <== NOT EXECUTED
{
rtems_rfs_bitmap_close (&bitmap);
140c4f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140c52: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED
140c55: 50 push %eax <== NOT EXECUTED
140c56: e8 51 60 00 00 call 146cac <rtems_rfs_bitmap_close><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
140c5b: 59 pop %ecx <== NOT EXECUTED
140c5c: 5b pop %ebx <== NOT EXECUTED
140c5d: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
140c60: 52 push %edx <== NOT EXECUTED
140c61: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
140c67: 50 push %eax <== NOT EXECUTED
140c68: e8 bb d3 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
140c6d: c6 45 d4 00 movb $0x0,-0x2c(%ebp) <== NOT EXECUTED
handle->bnum = 0;
140c71: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
140c78: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: block bitmap clear all failed: %d: %s\n",
140c7f: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
140c82: e8 a5 c8 00 00 call 14d52c <strerror> <== NOT EXECUTED
140c87: 50 push %eax <== NOT EXECUTED
140c88: 57 push %edi <== NOT EXECUTED
140c89: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
140c8f: 68 90 95 16 00 push $0x169590 <== NOT EXECUTED
140c94: e8 0b ae 00 00 call 14baa4 <printf> <== NOT EXECUTED
140c99: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
140c9e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
140ca1: e9 2d fb ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
140ca6: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
140ca8: 53 push %ebx <== NOT EXECUTED
140ca9: 56 push %esi <== NOT EXECUTED
140caa: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
140cb0: 68 10 95 16 00 push $0x169510 <== NOT EXECUTED
140cb5: e8 ea ad 00 00 call 14baa4 <printf> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
140cba: c6 45 d4 00 movb $0x0,-0x2c(%ebp) <== NOT EXECUTED
handle->bnum = 0;
140cbe: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
140cc5: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
rc, strerror (rc));
return false;
}
if (verbose)
printf (", blocks");
140ccc: c7 04 24 4d 91 16 00 movl $0x16914d,(%esp) <== NOT EXECUTED
140cd3: e8 cc ad 00 00 call 14baa4 <printf> <== NOT EXECUTED
140cd8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140cdb: e9 d2 fe ff ff jmp 140bb2 <rtems_rfs_format+0x7ca><== NOT EXECUTED
}
/*
* Forced allocation of the block bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
140ce0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
140ce3: 6a 00 push $0x0 <== NOT EXECUTED
140ce5: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED
140ce8: 52 push %edx <== NOT EXECUTED
140ce9: e8 26 63 00 00 call 147014 <rtems_rfs_bitmap_map_set><== NOT EXECUTED
/*
* Forced allocation of the inode bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
140cee: 58 pop %eax <== NOT EXECUTED
140cef: 5a pop %edx <== NOT EXECUTED
140cf0: 6a 01 push $0x1 <== NOT EXECUTED
140cf2: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED
140cf5: 50 push %eax <== NOT EXECUTED
140cf6: e8 19 63 00 00 call 147014 <rtems_rfs_bitmap_map_set><== NOT EXECUTED
/*
* Determine the number of inodes blocks in the group.
*/
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
140cfb: 8b 8d 40 ff ff ff mov -0xc0(%ebp),%ecx <== NOT EXECUTED
140d01: 8b 85 3c ff ff ff mov -0xc4(%ebp),%eax <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
140d07: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140d0a: 85 c0 test %eax,%eax <== NOT EXECUTED
140d0c: 0f 85 c2 00 00 00 jne 140dd4 <rtems_rfs_format+0x9ec><== NOT EXECUTED
140d12: c7 85 fc fe ff ff 01 movl $0x1,-0x104(%ebp) <== NOT EXECUTED
140d19: 00 00 00
140d1c: 31 ff xor %edi,%edi <== NOT EXECUTED
140d1e: 89 9d f8 fe ff ff mov %ebx,-0x108(%ebp) <== NOT EXECUTED
140d24: 8b 9d fc fe ff ff mov -0x104(%ebp),%ebx <== NOT EXECUTED
140d2a: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
140d2c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
140d2f: 8d 47 02 lea 0x2(%edi),%eax <== NOT EXECUTED
140d32: 50 push %eax <== NOT EXECUTED
140d33: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED
140d36: 52 push %edx <== NOT EXECUTED
140d37: e8 d8 62 00 00 call 147014 <rtems_rfs_bitmap_map_set><== NOT EXECUTED
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
140d3c: 47 inc %edi <== NOT EXECUTED
140d3d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140d40: 39 df cmp %ebx,%edi <== NOT EXECUTED
140d42: 7c e8 jl 140d2c <rtems_rfs_format+0x944><== NOT EXECUTED
140d44: 8b 9d f8 fe ff ff mov -0x108(%ebp),%ebx <== NOT EXECUTED
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
/*
* Close the block bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
140d4a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140d4d: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED
140d50: 50 push %eax <== NOT EXECUTED
140d51: e8 56 5f 00 00 call 146cac <rtems_rfs_bitmap_close><== NOT EXECUTED
if (rc > 0)
140d56: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140d59: 85 c0 test %eax,%eax <== NOT EXECUTED
140d5b: 0f 8f 1f 01 00 00 jg 140e80 <rtems_rfs_format+0xa98><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
140d61: c6 45 d4 01 movb $0x1,-0x2c(%ebp) <== NOT EXECUTED
if (verbose)
140d65: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp) <== NOT EXECUTED
140d6c: 0f 85 b2 01 00 00 jne 140f24 <rtems_rfs_format+0xb3c><== NOT EXECUTED
printf (", inodes");
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
140d72: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140d75: 8d 46 01 lea 0x1(%esi),%eax <== NOT EXECUTED
140d78: 50 push %eax <== NOT EXECUTED
140d79: 53 push %ebx <== NOT EXECUTED
140d7a: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
140d7d: 52 push %edx <== NOT EXECUTED
140d7e: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
140d84: 50 push %eax <== NOT EXECUTED
140d85: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED
140d88: 52 push %edx <== NOT EXECUTED
140d89: e8 4e 60 00 00 call 146ddc <rtems_rfs_bitmap_open> <== NOT EXECUTED
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
140d8e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
140d91: 85 c0 test %eax,%eax <== NOT EXECUTED
140d93: 0f 8e 1f 01 00 00 jle 140eb8 <rtems_rfs_format+0xad0><== NOT EXECUTED
140d99: 89 c3 mov %eax,%ebx <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
140d9b: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
140d9e: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
140da4: e8 17 f6 ff ff call 1403c0 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: open inode bitmap failed: %d: %s\n",
140da9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140dac: 53 push %ebx <== NOT EXECUTED
140dad: e8 7a c7 00 00 call 14d52c <strerror> <== NOT EXECUTED
140db2: 50 push %eax <== NOT EXECUTED
140db3: 53 push %ebx <== NOT EXECUTED
140db4: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
140dba: 68 24 96 16 00 push $0x169624 <== NOT EXECUTED
140dbf: e8 e0 ac 00 00 call 14baa4 <printf> <== NOT EXECUTED
140dc4: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
140dc9: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
140dcc: e9 02 fa ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
140dd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
140dd4: 48 dec %eax <== NOT EXECUTED
140dd5: 31 d2 xor %edx,%edx <== NOT EXECUTED
140dd7: f7 f1 div %ecx <== NOT EXECUTED
140dd9: 40 inc %eax <== NOT EXECUTED
140dda: 89 85 fc fe ff ff mov %eax,-0x104(%ebp) <== NOT EXECUTED
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
140de0: 85 c0 test %eax,%eax <== NOT EXECUTED
140de2: 0f 8f 34 ff ff ff jg 140d1c <rtems_rfs_format+0x934><== NOT EXECUTED
140de8: e9 5d ff ff ff jmp 140d4a <rtems_rfs_format+0x962><== NOT EXECUTED
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
140ded: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
140df0: 80 7a 15 00 cmpb $0x0,0x15(%edx) <== NOT EXECUTED
140df4: 0f 85 8e 01 00 00 jne 140f88 <rtems_rfs_format+0xba0><== NOT EXECUTED
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
140dfa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140dfd: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
140e03: 50 push %eax <== NOT EXECUTED
140e04: e8 9b d1 ff ff call 13dfa4 <rtems_rfs_buffer_close><== NOT EXECUTED
140e09: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
140e0b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140e0e: 85 c0 test %eax,%eax <== NOT EXECUTED
140e10: 0f 8f bf 02 00 00 jg 1410d5 <rtems_rfs_format+0xced><== NOT EXECUTED
int rc;
/*
* External API so returns -1.
*/
rc = rtems_rfs_fs_open (name, NULL,
140e16: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140e19: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
140e1c: 50 push %eax <== NOT EXECUTED
140e1d: 6a 00 push $0x0 <== NOT EXECUTED
140e1f: 6a 06 push $0x6 <== NOT EXECUTED
140e21: 6a 00 push $0x0 <== NOT EXECUTED
140e23: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
140e26: e8 51 f0 ff ff call 13fe7c <rtems_rfs_fs_open> <== NOT EXECUTED
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
140e2b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
140e2e: 85 c0 test %eax,%eax <== NOT EXECUTED
140e30: 0f 88 aa 04 00 00 js 1412e0 <rtems_rfs_format+0xef8><== NOT EXECUTED
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
errno, strerror (errno));
return -1;
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
140e36: 53 push %ebx <== NOT EXECUTED
140e37: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
140e3a: 50 push %eax <== NOT EXECUTED
140e3b: 6a 01 push $0x1 <== NOT EXECUTED
140e3d: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
140e40: e8 fb 0d 00 00 call 141c40 <rtems_rfs_inode_alloc> <== NOT EXECUTED
140e45: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
140e47: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140e4a: 85 c0 test %eax,%eax <== NOT EXECUTED
140e4c: 0f 8f ea 00 00 00 jg 140f3c <rtems_rfs_format+0xb54><== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_fs_close (fs);
return rc;
}
if (ino != RTEMS_RFS_ROOT_INO)
140e52: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
140e55: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
140e58: 0f 84 6b 01 00 00 je 140fc9 <rtems_rfs_format+0xbe1><== NOT EXECUTED
{
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
140e5e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
140e61: 50 push %eax <== NOT EXECUTED
140e62: 68 20 98 16 00 push $0x169820 <== NOT EXECUTED
140e67: e8 38 ac 00 00 call 14baa4 <printf> <== NOT EXECUTED
rtems_rfs_fs_close (fs);
140e6c: 5a pop %edx <== NOT EXECUTED
140e6d: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
140e70: e8 8f ef ff ff call 13fe04 <rtems_rfs_fs_close> <== NOT EXECUTED
140e75: 31 c0 xor %eax,%eax <== NOT EXECUTED
140e77: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140e7a: e9 54 f9 ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
140e7f: 90 nop <== NOT EXECUTED
140e80: 89 c7 mov %eax,%edi <== NOT EXECUTED
* Close the block bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
140e82: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
140e85: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
140e8b: e8 30 f5 ff ff call 1403c0 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
140e90: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140e93: 57 push %edi <== NOT EXECUTED
140e94: e8 93 c6 00 00 call 14d52c <strerror> <== NOT EXECUTED
140e99: 50 push %eax <== NOT EXECUTED
140e9a: 57 push %edi <== NOT EXECUTED
140e9b: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
140ea1: 68 dc 95 16 00 push $0x1695dc <== NOT EXECUTED
140ea6: e8 f9 ab 00 00 call 14baa4 <printf> <== NOT EXECUTED
140eab: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
140eb0: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
140eb3: e9 1b f9 ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0x00, rtems_rfs_fs_block_size (fs));
140eb8: 8b 8d 1c ff ff ff mov -0xe4(%ebp),%ecx <== NOT EXECUTED
140ebe: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
140ec1: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED
140ec4: 31 c0 xor %eax,%eax <== NOT EXECUTED
140ec6: 89 d7 mov %edx,%edi <== NOT EXECUTED
140ec8: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
/*
* Clear the inode bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
140eca: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140ecd: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED
140ed0: 50 push %eax <== NOT EXECUTED
140ed1: e8 56 5f 00 00 call 146e2c <rtems_rfs_bitmap_map_clear_all><== NOT EXECUTED
if (rc > 0)
140ed6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140ed9: 85 c0 test %eax,%eax <== NOT EXECUTED
140edb: 0f 8e 3e 01 00 00 jle 14101f <rtems_rfs_format+0xc37><== NOT EXECUTED
140ee1: 89 c3 mov %eax,%ebx <== NOT EXECUTED
{
rtems_rfs_bitmap_close (&bitmap);
140ee3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140ee6: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED
140ee9: 52 push %edx <== NOT EXECUTED
140eea: e8 bd 5d 00 00 call 146cac <rtems_rfs_bitmap_close><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
140eef: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
140ef2: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
140ef8: e8 c3 f4 ff ff call 1403c0 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: inode bitmap" \
140efd: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
140f00: e8 27 c6 00 00 call 14d52c <strerror> <== NOT EXECUTED
140f05: 50 push %eax <== NOT EXECUTED
140f06: 53 push %ebx <== NOT EXECUTED
140f07: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
140f0d: 68 6c 96 16 00 push $0x16966c <== NOT EXECUTED
140f12: e8 8d ab 00 00 call 14baa4 <printf> <== NOT EXECUTED
140f17: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
140f1c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
140f1f: e9 af f8 ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
printf (", inodes");
140f24: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140f27: 68 56 91 16 00 push $0x169156 <== NOT EXECUTED
140f2c: e8 73 ab 00 00 call 14baa4 <printf> <== NOT EXECUTED
140f31: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140f34: e9 39 fe ff ff jmp 140d72 <rtems_rfs_format+0x98a><== NOT EXECUTED
140f39: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
if (rc > 0)
{
printf ("rtems-rfs: format: inode allocation failed: %d: %s\n",
140f3c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140f3f: 50 push %eax <== NOT EXECUTED
140f40: e8 e7 c5 00 00 call 14d52c <strerror> <== NOT EXECUTED
140f45: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
140f48: 50 push %eax <== NOT EXECUTED
140f49: 53 push %ebx <== NOT EXECUTED
140f4a: 68 ec 97 16 00 push $0x1697ec <== NOT EXECUTED
140f4f: e8 50 ab 00 00 call 14baa4 <printf> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_fs_close (fs);
140f54: 59 pop %ecx <== NOT EXECUTED
140f55: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
140f58: e8 a7 ee ff ff call 13fe04 <rtems_rfs_fs_close> <== NOT EXECUTED
140f5d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
140f60: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140f63: 53 push %ebx <== NOT EXECUTED
140f64: e8 c3 c5 00 00 call 14d52c <strerror> <== NOT EXECUTED
140f69: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
140f6c: 50 push %eax <== NOT EXECUTED
140f6d: 53 push %ebx <== NOT EXECUTED
140f6e: 68 58 99 16 00 push $0x169958 <== NOT EXECUTED
140f73: e8 2c ab 00 00 call 14baa4 <printf> <== NOT EXECUTED
140f78: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
rc, strerror (rc));
return -1;
140f7d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140f80: e9 4e f8 ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
140f85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
printf ("\n");
140f88: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140f8b: 6a 0a push $0xa <== NOT EXECUTED
140f8d: e8 72 ac 00 00 call 14bc04 <putchar> <== NOT EXECUTED
140f92: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140f95: e9 60 fe ff ff jmp 140dfa <rtems_rfs_format+0xa12><== NOT EXECUTED
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
if (rc > 0)
{
printf ("rtems-rfs: format: setting block size failed: %d: %s\n",
140f9a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140f9d: 50 push %eax <== NOT EXECUTED
140f9e: e8 89 c5 00 00 call 14d52c <strerror> <== NOT EXECUTED
140fa3: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
140fa6: 50 push %eax <== NOT EXECUTED
140fa7: 53 push %ebx <== NOT EXECUTED
140fa8: 68 fc 93 16 00 push $0x1693fc <== NOT EXECUTED
140fad: e8 f2 aa 00 00 call 14baa4 <printf> <== NOT EXECUTED
140fb2: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
rc, strerror (rc));
return -1;
140fb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140fba: e9 14 f8 ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
int b;
for (b = 31; b > 0; b--)
140fbf: bb 01 00 00 00 mov $0x1,%ebx <== NOT EXECUTED
140fc4: e9 b2 f8 ff ff jmp 14087b <rtems_rfs_format+0x493><== NOT EXECUTED
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
140fc9: 6a 01 push $0x1 <== NOT EXECUTED
140fcb: 8d 75 94 lea -0x6c(%ebp),%esi <== NOT EXECUTED
140fce: 56 push %esi <== NOT EXECUTED
140fcf: 6a 01 push $0x1 <== NOT EXECUTED
140fd1: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
140fd4: e8 1b 0b 00 00 call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
140fd9: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
140fdb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140fde: 85 c0 test %eax,%eax <== NOT EXECUTED
140fe0: 0f 8e 14 01 00 00 jle 1410fa <rtems_rfs_format+0xd12><== NOT EXECUTED
{
printf ("rtems-rfs: format: inode open failed: %d: %s\n",
140fe6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
140fe9: 50 push %eax <== NOT EXECUTED
140fea: e8 3d c5 00 00 call 14d52c <strerror> <== NOT EXECUTED
140fef: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
140ff2: 50 push %eax <== NOT EXECUTED
140ff3: 53 push %ebx <== NOT EXECUTED
140ff4: 68 58 98 16 00 push $0x169858 <== NOT EXECUTED
140ff9: e8 a6 aa 00 00 call 14baa4 <printf> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_group_bitmap_free (fs, true, ino);
140ffe: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
141001: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
141004: 6a 01 push $0x1 <== NOT EXECUTED
141006: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
141009: e8 e6 03 00 00 call 1413f4 <rtems_rfs_group_bitmap_free><== NOT EXECUTED
rtems_rfs_fs_close (fs);
14100e: 58 pop %eax <== NOT EXECUTED
14100f: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
141012: e8 ed ed ff ff call 13fe04 <rtems_rfs_fs_close> <== NOT EXECUTED
141017: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14101a: e9 41 ff ff ff jmp 140f60 <rtems_rfs_format+0xb78><== NOT EXECUTED
}
/*
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
14101f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
141022: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED
141025: 50 push %eax <== NOT EXECUTED
141026: e8 81 5c 00 00 call 146cac <rtems_rfs_bitmap_close><== NOT EXECUTED
if (rc > 0)
14102b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14102e: 85 c0 test %eax,%eax <== NOT EXECUTED
141030: 0f 8f 8c 01 00 00 jg 1411c2 <rtems_rfs_format+0xdda><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
" bitmap failed: %d: %s\n", group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
141036: c6 45 d4 01 movb $0x1,-0x2c(%ebp) <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
14103a: 80 bd 02 ff ff ff 00 cmpb $0x0,-0xfe(%ebp) <== NOT EXECUTED
141041: 0f 84 b3 01 00 00 je 1411fa <rtems_rfs_format+0xe12><== NOT EXECUTED
{
for (b = 0; b < blocks; b++)
141047: 8b bd fc fe ff ff mov -0x104(%ebp),%edi <== NOT EXECUTED
14104d: 85 ff test %edi,%edi <== NOT EXECUTED
14104f: 0f 8e a5 01 00 00 jle 1411fa <rtems_rfs_format+0xe12><== NOT EXECUTED
141055: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
141058: 31 db xor %ebx,%ebx <== NOT EXECUTED
14105a: eb 24 jmp 141080 <rtems_rfs_format+0xc98><== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
14105c: 8b 8d 1c ff ff ff mov -0xe4(%ebp),%ecx <== NOT EXECUTED
141062: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
141065: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED
141068: 89 d7 mov %edx,%edi <== NOT EXECUTED
14106a: b0 ff mov $0xff,%al <== NOT EXECUTED
14106c: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
14106e: c6 45 d4 01 movb $0x1,-0x2c(%ebp) <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
141072: 43 inc %ebx <== NOT EXECUTED
141073: 46 inc %esi <== NOT EXECUTED
141074: 3b 9d fc fe ff ff cmp -0x104(%ebp),%ebx <== NOT EXECUTED
14107a: 0f 8d 7a 01 00 00 jge 1411fa <rtems_rfs_format+0xe12><== NOT EXECUTED
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
141080: 6a 00 push $0x0 <== NOT EXECUTED
141082: 56 push %esi <== NOT EXECUTED
141083: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
141086: 52 push %edx <== NOT EXECUTED
141087: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
14108d: 50 push %eax <== NOT EXECUTED
14108e: e8 99 d0 ff ff call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
141093: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141096: 85 c0 test %eax,%eax <== NOT EXECUTED
141098: 7e c2 jle 14105c <rtems_rfs_format+0xc74><== NOT EXECUTED
14109a: 89 c3 mov %eax,%ebx <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
14109c: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
14109f: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
1410a5: e8 16 f3 ff ff call 1403c0 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: block %" PRId32 " request failed: %d: %s\n",
1410aa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1410ad: 53 push %ebx <== NOT EXECUTED
1410ae: e8 79 c4 00 00 call 14d52c <strerror> <== NOT EXECUTED
1410b3: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1410b6: 53 push %ebx <== NOT EXECUTED
1410b7: 56 push %esi <== NOT EXECUTED
1410b8: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
1410be: 68 00 97 16 00 push $0x169700 <== NOT EXECUTED
1410c3: e8 dc a9 00 00 call 14baa4 <printf> <== NOT EXECUTED
1410c8: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1410cd: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1410d0: e9 fe f6 ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
if (rc > 0)
{
printf ("rtems-rfs: format: buffer close failed: %d: %s\n",
1410d5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1410d8: 50 push %eax <== NOT EXECUTED
1410d9: e8 4e c4 00 00 call 14d52c <strerror> <== NOT EXECUTED
1410de: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1410e1: 50 push %eax <== NOT EXECUTED
1410e2: 53 push %ebx <== NOT EXECUTED
1410e3: 68 88 97 16 00 push $0x169788 <== NOT EXECUTED
1410e8: e8 b7 a9 00 00 call 14baa4 <printf> <== NOT EXECUTED
1410ed: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
rc, strerror (rc));
return -1;
1410f2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1410f5: e9 d9 f6 ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, true, ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, 0,
1410fa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1410fd: 6a 00 push $0x0 <== NOT EXECUTED
1410ff: 6a 00 push $0x0 <== NOT EXECUTED
141101: 68 c9 41 00 00 push $0x41c9 <== NOT EXECUTED
141106: 6a 00 push $0x0 <== NOT EXECUTED
141108: 56 push %esi <== NOT EXECUTED
141109: e8 8a 07 00 00 call 141898 <rtems_rfs_inode_initialise><== NOT EXECUTED
14110e: 89 c3 mov %eax,%ebx <== NOT EXECUTED
(RTEMS_RFS_S_IFDIR | RTEMS_RFS_S_IRWXU |
RTEMS_RFS_S_IXGRP | RTEMS_RFS_S_IXOTH),
0, 0);
if (rc > 0)
141110: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
141113: 85 c0 test %eax,%eax <== NOT EXECUTED
141115: 7e 1b jle 141132 <rtems_rfs_format+0xd4a><== NOT EXECUTED
printf ("rtems-rfs: format: inode initialise failed: %d: %s\n",
141117: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
14111a: 50 push %eax <== NOT EXECUTED
14111b: e8 0c c4 00 00 call 14d52c <strerror> <== NOT EXECUTED
141120: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
141123: 50 push %eax <== NOT EXECUTED
141124: 53 push %ebx <== NOT EXECUTED
141125: 68 88 98 16 00 push $0x169888 <== NOT EXECUTED
14112a: e8 75 a9 00 00 call 14baa4 <printf> <== NOT EXECUTED
14112f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
141132: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
141135: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
141138: 6a 01 push $0x1 <== NOT EXECUTED
14113a: 68 18 1c 16 00 push $0x161c18 <== NOT EXECUTED
14113f: 56 push %esi <== NOT EXECUTED
141140: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
141143: e8 90 d8 ff ff call 13e9d8 <rtems_rfs_dir_add_entry><== NOT EXECUTED
141148: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
14114a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
14114d: 85 c0 test %eax,%eax <== NOT EXECUTED
14114f: 7e 1b jle 14116c <rtems_rfs_format+0xd84><== NOT EXECUTED
printf ("rtems-rfs: format: directory add failed: %d: %s\n",
141151: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
141154: 50 push %eax <== NOT EXECUTED
141155: e8 d2 c3 00 00 call 14d52c <strerror> <== NOT EXECUTED
14115a: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
14115d: 50 push %eax <== NOT EXECUTED
14115e: 53 push %ebx <== NOT EXECUTED
14115f: 68 bc 98 16 00 push $0x1698bc <== NOT EXECUTED
141164: e8 3b a9 00 00 call 14baa4 <printf> <== NOT EXECUTED
141169: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_inode_close (fs, &inode);
14116c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
14116f: 56 push %esi <== NOT EXECUTED
141170: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
141173: e8 f8 08 00 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
141178: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
14117a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14117d: 85 c0 test %eax,%eax <== NOT EXECUTED
14117f: 7e 1b jle 14119c <rtems_rfs_format+0xdb4><== NOT EXECUTED
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
141181: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
141184: 50 push %eax <== NOT EXECUTED
141185: e8 a2 c3 00 00 call 14d52c <strerror> <== NOT EXECUTED
14118a: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
14118d: 50 push %eax <== NOT EXECUTED
14118e: 53 push %ebx <== NOT EXECUTED
14118f: 68 f0 98 16 00 push $0x1698f0 <== NOT EXECUTED
141194: e8 0b a9 00 00 call 14baa4 <printf> <== NOT EXECUTED
141199: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
14119c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
14119f: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
1411a2: e8 5d ec ff ff call 13fe04 <rtems_rfs_fs_close> <== NOT EXECUTED
1411a7: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc < 0)
1411a9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1411ac: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED
1411af: 0f 8c fb 00 00 00 jl 1412b0 <rtems_rfs_format+0xec8><== NOT EXECUTED
rc, strerror (rc));
return -1;
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
1411b5: 0f 85 a5 fd ff ff jne 140f60 <rtems_rfs_format+0xb78><== NOT EXECUTED
1411bb: 31 c0 xor %eax,%eax <== NOT EXECUTED
1411bd: e9 11 f6 ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
1411c2: 89 c3 mov %eax,%ebx <== NOT EXECUTED
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
1411c4: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
1411c7: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
1411cd: e8 ee f1 ff ff call 1403c0 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
1411d2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1411d5: 53 push %ebx <== NOT EXECUTED
1411d6: e8 51 c3 00 00 call 14d52c <strerror> <== NOT EXECUTED
1411db: 50 push %eax <== NOT EXECUTED
1411dc: 53 push %ebx <== NOT EXECUTED
1411dd: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
1411e3: 68 b8 96 16 00 push $0x1696b8 <== NOT EXECUTED
1411e8: e8 b7 a8 00 00 call 14baa4 <printf> <== NOT EXECUTED
1411ed: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1411f2: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1411f5: e9 d9 f5 ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
}
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
1411fa: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED
1411fd: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
141203: e8 b8 f1 ff ff call 1403c0 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
if (rc > 0)
141208: 85 c0 test %eax,%eax <== NOT EXECUTED
14120a: 7e 54 jle 141260 <rtems_rfs_format+0xe78><== NOT EXECUTED
14120c: 89 c3 mov %eax,%ebx <== NOT EXECUTED
{
printf ("\nrtems-rfs: write-group: buffer handle close failed: %d: %s\n",
14120e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
141211: 50 push %eax <== NOT EXECUTED
141212: e8 15 c3 00 00 call 14d52c <strerror> <== NOT EXECUTED
141217: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
14121a: 50 push %eax <== NOT EXECUTED
14121b: 53 push %ebx <== NOT EXECUTED
14121c: 68 48 97 16 00 push $0x169748 <== NOT EXECUTED
141221: e8 7e a8 00 00 call 14baa4 <printf> <== NOT EXECUTED
141226: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
14122b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14122e: e9 a0 f5 ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
141233: c7 85 04 ff ff ff 00 movl $0x0,-0xfc(%ebp) <== NOT EXECUTED
14123a: 00 00 00
14123d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
141240: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141243: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
141249: 68 d4 94 16 00 push $0x1694d4 <== NOT EXECUTED
14124e: e8 51 a8 00 00 call 14baa4 <printf> <== NOT EXECUTED
141253: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
141258: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14125b: e9 73 f5 ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
141260: ff 85 04 ff ff ff incl -0xfc(%ebp) <== NOT EXECUTED
141266: 8b 85 04 ff ff ff mov -0xfc(%ebp),%eax <== NOT EXECUTED
14126c: 39 85 34 ff ff ff cmp %eax,-0xcc(%ebp) <== NOT EXECUTED
141272: 0f 8e 75 fb ff ff jle 140ded <rtems_rfs_format+0xa05><== NOT EXECUTED
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
141278: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
14127b: 8a 40 15 mov 0x15(%eax),%al <== NOT EXECUTED
14127e: 88 85 03 ff ff ff mov %al,-0xfd(%ebp) <== NOT EXECUTED
141284: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
141287: 8a 52 14 mov 0x14(%edx),%dl <== NOT EXECUTED
14128a: 88 95 02 ff ff ff mov %dl,-0xfe(%ebp) <== NOT EXECUTED
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
141290: 8b 9d 38 ff ff ff mov -0xc8(%ebp),%ebx <== NOT EXECUTED
141296: 8b b5 04 ff ff ff mov -0xfc(%ebp),%esi <== NOT EXECUTED
14129c: 0f af f3 imul %ebx,%esi <== NOT EXECUTED
14129f: 46 inc %esi <== NOT EXECUTED
if (group_base > rtems_rfs_fs_blocks (fs))
1412a0: 8b 85 18 ff ff ff mov -0xe8(%ebp),%eax <== NOT EXECUTED
1412a6: 39 c6 cmp %eax,%esi <== NOT EXECUTED
1412a8: 0f 86 da f8 ff ff jbe 140b88 <rtems_rfs_format+0x7a0><== NOT EXECUTED
1412ae: eb 90 jmp 141240 <rtems_rfs_format+0xe58><== NOT EXECUTED
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
if (rc < 0)
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
1412b0: e8 cb 68 00 00 call 147b80 <__errno> <== NOT EXECUTED
1412b5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1412b8: ff 30 pushl (%eax) <== NOT EXECUTED
1412ba: e8 6d c2 00 00 call 14d52c <strerror> <== NOT EXECUTED
1412bf: 89 c3 mov %eax,%ebx <== NOT EXECUTED
1412c1: e8 ba 68 00 00 call 147b80 <__errno> <== NOT EXECUTED
1412c6: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1412c9: 53 push %ebx <== NOT EXECUTED
1412ca: ff 30 pushl (%eax) <== NOT EXECUTED
1412cc: 68 20 99 16 00 push $0x169920 <== NOT EXECUTED
1412d1: e8 ce a7 00 00 call 14baa4 <printf> <== NOT EXECUTED
1412d6: 31 c0 xor %eax,%eax <== NOT EXECUTED
1412d8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1412db: e9 f3 f4 ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
rc = rtems_rfs_fs_open (name, NULL,
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
1412e0: e8 9b 68 00 00 call 147b80 <__errno> <== NOT EXECUTED
1412e5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1412e8: ff 30 pushl (%eax) <== NOT EXECUTED
1412ea: e8 3d c2 00 00 call 14d52c <strerror> <== NOT EXECUTED
1412ef: 89 c3 mov %eax,%ebx <== NOT EXECUTED
1412f1: e8 8a 68 00 00 call 147b80 <__errno> <== NOT EXECUTED
1412f6: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1412f9: 53 push %ebx <== NOT EXECUTED
1412fa: ff 30 pushl (%eax) <== NOT EXECUTED
1412fc: 68 b8 97 16 00 push $0x1697b8 <== NOT EXECUTED
141301: e8 9e a7 00 00 call 14baa4 <printf> <== NOT EXECUTED
141306: 31 c0 xor %eax,%eax <== NOT EXECUTED
141308: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14130b: e9 c3 f4 ff ff jmp 1407d3 <rtems_rfs_format+0x3eb><== NOT EXECUTED
0013fe04 <rtems_rfs_fs_close>:
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
13fe04: 55 push %ebp <== NOT EXECUTED
13fe05: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13fe07: 57 push %edi <== NOT EXECUTED
13fe08: 56 push %esi <== NOT EXECUTED
13fe09: 53 push %ebx <== NOT EXECUTED
13fe0a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13fe0d: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
13fe10: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
13fe13: 85 c0 test %eax,%eax <== NOT EXECUTED
13fe15: 7e 20 jle 13fe37 <rtems_rfs_fs_close+0x33><== NOT EXECUTED
13fe17: 31 ff xor %edi,%edi <== NOT EXECUTED
13fe19: 31 f6 xor %esi,%esi <== NOT EXECUTED
13fe1b: 90 nop <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[group]);
13fe1c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13fe1f: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
13fe22: 01 f8 add %edi,%eax <== NOT EXECUTED
13fe24: 50 push %eax <== NOT EXECUTED
13fe25: 53 push %ebx <== NOT EXECUTED
13fe26: e8 95 17 00 00 call 1415c0 <rtems_rfs_group_close> <== NOT EXECUTED
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
13fe2b: 46 inc %esi <== NOT EXECUTED
13fe2c: 83 c7 50 add $0x50,%edi <== NOT EXECUTED
13fe2f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13fe32: 39 73 20 cmp %esi,0x20(%ebx) <== NOT EXECUTED
13fe35: 7f e5 jg 13fe1c <rtems_rfs_fs_close+0x18><== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
13fe37: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13fe3a: 53 push %ebx <== NOT EXECUTED
13fe3b: e8 64 e1 ff ff call 13dfa4 <rtems_rfs_buffer_close><== NOT EXECUTED
free (fs);
13fe40: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
13fe43: e8 20 ea fc ff call 10e868 <free> <== NOT EXECUTED
return 0;
}
13fe48: 31 c0 xor %eax,%eax <== NOT EXECUTED
13fe4a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13fe4d: 5b pop %ebx <== NOT EXECUTED
13fe4e: 5e pop %esi <== NOT EXECUTED
13fe4f: 5f pop %edi <== NOT EXECUTED
13fe50: c9 leave <== NOT EXECUTED
13fe51: c3 ret <== NOT EXECUTED
0013fdf0 <rtems_rfs_fs_media_size>:
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
13fdf0: 55 push %ebp <== NOT EXECUTED
13fdf1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
13fdf3: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
13fdf6: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
13fdf9: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
13fdfc: f7 62 24 mull 0x24(%edx) <== NOT EXECUTED
uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
return media_blocks * media_block_size;
}
13fdff: c9 leave <== NOT EXECUTED
13fe00: c3 ret <== NOT EXECUTED
0013fe7c <rtems_rfs_fs_open>:
rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
uint32_t max_held_buffers,
rtems_rfs_file_system** fs)
{
13fe7c: 55 push %ebp <== NOT EXECUTED
13fe7d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13fe7f: 57 push %edi <== NOT EXECUTED
13fe80: 56 push %esi <== NOT EXECUTED
13fe81: 53 push %ebx <== NOT EXECUTED
13fe82: 83 ec 78 sub $0x78,%esp <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
13fe85: 68 80 00 00 00 push $0x80 <== NOT EXECUTED
13fe8a: e8 79 ef fc ff call 10ee08 <malloc> <== NOT EXECUTED
13fe8f: 89 c2 mov %eax,%edx <== NOT EXECUTED
13fe91: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
13fe94: 89 10 mov %edx,(%eax) <== NOT EXECUTED
if (!*fs)
13fe96: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13fe99: 85 d2 test %edx,%edx <== NOT EXECUTED
13fe9b: 0f 84 18 03 00 00 je 1401b9 <rtems_rfs_fs_open+0x33d><== NOT EXECUTED
printf ("rtems-rfs: open: no memory for file system data\n");
errno = ENOMEM;
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
13fea1: b9 80 00 00 00 mov $0x80,%ecx <== NOT EXECUTED
13fea6: 31 c0 xor %eax,%eax <== NOT EXECUTED
13fea8: 89 d7 mov %edx,%edi <== NOT EXECUTED
13feaa: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
(*fs)->user = user;
13feac: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
13feaf: 89 42 7c mov %eax,0x7c(%edx) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
13feb2: 8d 42 44 lea 0x44(%edx),%eax <== NOT EXECUTED
13feb5: 89 42 40 mov %eax,0x40(%edx) <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
13feb8: 8d 42 40 lea 0x40(%edx),%eax <== NOT EXECUTED
13febb: 89 42 48 mov %eax,0x48(%edx) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
13febe: 8d 42 54 lea 0x54(%edx),%eax <== NOT EXECUTED
13fec1: 89 42 50 mov %eax,0x50(%edx) <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
13fec4: 8d 42 50 lea 0x50(%edx),%eax <== NOT EXECUTED
13fec7: 89 42 58 mov %eax,0x58(%edx) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
13feca: 8d 42 64 lea 0x64(%edx),%eax <== NOT EXECUTED
13fecd: 89 42 60 mov %eax,0x60(%edx) <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
13fed0: 8d 42 60 lea 0x60(%edx),%eax <== NOT EXECUTED
13fed3: 89 42 68 mov %eax,0x68(%edx) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
13fed6: 8d 42 74 lea 0x74(%edx),%eax <== NOT EXECUTED
13fed9: 89 42 70 mov %eax,0x70(%edx) <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
13fedc: 8d 42 70 lea 0x70(%edx),%eax <== NOT EXECUTED
13fedf: 89 42 78 mov %eax,0x78(%edx) <== NOT EXECUTED
rtems_chain_initialize_empty (&(*fs)->buffers);
rtems_chain_initialize_empty (&(*fs)->release);
rtems_chain_initialize_empty (&(*fs)->release_modified);
rtems_chain_initialize_empty (&(*fs)->file_shares);
(*fs)->max_held_buffers = max_held_buffers;
13fee2: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
13fee5: 89 42 3c mov %eax,0x3c(%edx) <== NOT EXECUTED
(*fs)->buffers_count = 0;
(*fs)->release_count = 0;
(*fs)->release_modified_count = 0;
(*fs)->flags = flags;
13fee8: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
13feeb: 89 02 mov %eax,(%edx) <== NOT EXECUTED
group_base = 0;
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
13feed: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13fef0: 52 push %edx <== NOT EXECUTED
13fef1: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
13fef4: e8 d7 e0 ff ff call 13dfd0 <rtems_rfs_buffer_open> <== NOT EXECUTED
13fef9: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
13fefb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13fefe: 85 c0 test %eax,%eax <== NOT EXECUTED
13ff00: 0f 8f 36 01 00 00 jg 14003c <rtems_rfs_fs_open+0x1c0><== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_fs_read_superblock (*fs);
13ff06: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
13ff09: 8b 18 mov (%eax),%ebx <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
13ff0b: c6 45 dc 00 movb $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->bnum = 0;
13ff0f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
13ff16: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, true);
13ff1d: 6a 01 push $0x1 <== NOT EXECUTED
13ff1f: 6a 00 push $0x0 <== NOT EXECUTED
13ff21: 8d 7d dc lea -0x24(%ebp),%edi <== NOT EXECUTED
13ff24: 57 push %edi <== NOT EXECUTED
13ff25: 53 push %ebx <== NOT EXECUTED
13ff26: e8 01 e2 ff ff call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
13ff2b: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
13ff2d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ff30: 85 c0 test %eax,%eax <== NOT EXECUTED
13ff32: 7e 30 jle 13ff64 <rtems_rfs_fs_open+0xe8><== NOT EXECUTED
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
13ff34: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13ff37: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
13ff3a: ff 30 pushl (%eax) <== NOT EXECUTED
13ff3c: e8 63 e0 ff ff call 13dfa4 <rtems_rfs_buffer_close><== NOT EXECUTED
free (*fs);
13ff41: 5f pop %edi <== NOT EXECUTED
13ff42: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED
13ff45: ff 32 pushl (%edx) <== NOT EXECUTED
13ff47: e8 1c e9 fc ff call 10e868 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: reading root inode: %d: %s\n",
rc, strerror (rc));
errno = rc;
13ff4c: e8 2f 7c 00 00 call 147b80 <__errno> <== NOT EXECUTED
13ff51: 89 30 mov %esi,(%eax) <== NOT EXECUTED
13ff53: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
13ff58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return -1;
}
errno = 0;
return 0;
}
13ff5b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13ff5e: 5b pop %ebx <== NOT EXECUTED
13ff5f: 5e pop %esi <== NOT EXECUTED
13ff60: 5f pop %edi <== NOT EXECUTED
13ff61: c9 leave <== NOT EXECUTED
13ff62: c3 ret <== NOT EXECUTED
13ff63: 90 nop <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
rc, strerror (rc));
return rc;
}
sb = rtems_rfs_buffer_data (&handle);
13ff64: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
13ff67: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
13ff6a: 89 45 94 mov %eax,-0x6c(%ebp) <== NOT EXECUTED
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
13ff6d: 0f b6 50 03 movzbl 0x3(%eax),%edx <== NOT EXECUTED
13ff71: 0f b6 08 movzbl (%eax),%ecx <== NOT EXECUTED
13ff74: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
13ff77: 09 ca or %ecx,%edx <== NOT EXECUTED
13ff79: 0f b6 48 01 movzbl 0x1(%eax),%ecx <== NOT EXECUTED
13ff7d: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13ff80: 09 ca or %ecx,%edx <== NOT EXECUTED
13ff82: 0f b6 48 02 movzbl 0x2(%eax),%ecx <== NOT EXECUTED
13ff86: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
13ff89: 09 ca or %ecx,%edx <== NOT EXECUTED
13ff8b: 81 fa 01 20 09 28 cmp $0x28092001,%edx <== NOT EXECUTED
13ff91: 74 29 je 13ffbc <rtems_rfs_fs_open+0x140><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
13ff93: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
13ff96: 57 push %edi <== NOT EXECUTED
13ff97: 53 push %ebx <== NOT EXECUTED
13ff98: e8 8b e0 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
13ff9d: c6 45 dc 00 movb $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->bnum = 0;
13ffa1: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
13ffa8: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
13ffaf: be 05 00 00 00 mov $0x5,%esi <== NOT EXECUTED
13ffb4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13ffb7: e9 78 ff ff ff jmp 13ff34 <rtems_rfs_fs_open+0xb8><== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
13ffbc: 8b 55 94 mov -0x6c(%ebp),%edx <== NOT EXECUTED
13ffbf: 0f b6 52 0c movzbl 0xc(%edx),%edx <== NOT EXECUTED
13ffc3: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
13ffc6: 8b 45 94 mov -0x6c(%ebp),%eax <== NOT EXECUTED
13ffc9: 0f b6 48 0d movzbl 0xd(%eax),%ecx <== NOT EXECUTED
13ffcd: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13ffd0: 09 ca or %ecx,%edx <== NOT EXECUTED
13ffd2: 0f b6 48 0f movzbl 0xf(%eax),%ecx <== NOT EXECUTED
13ffd6: 09 ca or %ecx,%edx <== NOT EXECUTED
13ffd8: 0f b6 48 0e movzbl 0xe(%eax),%ecx <== NOT EXECUTED
13ffdc: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
13ffdf: 09 ca or %ecx,%edx <== NOT EXECUTED
13ffe1: 89 55 a0 mov %edx,-0x60(%ebp) <== NOT EXECUTED
13ffe4: 89 53 04 mov %edx,0x4(%ebx) <== NOT EXECUTED
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
13ffe7: 0f b6 70 08 movzbl 0x8(%eax),%esi <== NOT EXECUTED
13ffeb: c1 e6 18 shl $0x18,%esi <== NOT EXECUTED
13ffee: 0f b6 48 09 movzbl 0x9(%eax),%ecx <== NOT EXECUTED
13fff2: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
13fff5: 09 ce or %ecx,%esi <== NOT EXECUTED
13fff7: 0f b6 48 0b movzbl 0xb(%eax),%ecx <== NOT EXECUTED
13fffb: 09 ce or %ecx,%esi <== NOT EXECUTED
13fffd: 0f b6 48 0a movzbl 0xa(%eax),%ecx <== NOT EXECUTED
140001: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
140004: 09 ce or %ecx,%esi <== NOT EXECUTED
140006: 89 73 08 mov %esi,0x8(%ebx) <== NOT EXECUTED
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
140009: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
if (rtems_rfs_fs_size(fs) > rtems_rfs_fs_media_size (fs))
14000c: 89 d0 mov %edx,%eax <== NOT EXECUTED
14000e: f7 e6 mul %esi <== NOT EXECUTED
140010: 89 45 a0 mov %eax,-0x60(%ebp) <== NOT EXECUTED
140013: 89 55 a4 mov %edx,-0x5c(%ebp) <== NOT EXECUTED
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
140016: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED
140019: f7 61 24 mull 0x24(%ecx) <== NOT EXECUTED
14001c: 89 45 88 mov %eax,-0x78(%ebp) <== NOT EXECUTED
14001f: 89 55 8c mov %edx,-0x74(%ebp) <== NOT EXECUTED
140022: 39 55 a4 cmp %edx,-0x5c(%ebp) <== NOT EXECUTED
140025: 72 3e jb 140065 <rtems_rfs_fs_open+0x1e9><== NOT EXECUTED
140027: 76 37 jbe 140060 <rtems_rfs_fs_open+0x1e4><== NOT EXECUTED
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
rtems_rfs_buffer_handle_close (fs, &handle);
140029: 89 fa mov %edi,%edx <== NOT EXECUTED
14002b: 89 d8 mov %ebx,%eax <== NOT EXECUTED
14002d: e8 22 fe ff ff call 13fe54 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
140032: be 05 00 00 00 mov $0x5,%esi <== NOT EXECUTED
140037: e9 f8 fe ff ff jmp 13ff34 <rtems_rfs_fs_open+0xb8><== NOT EXECUTED
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
if (rc > 0)
{
free (*fs);
14003c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
14003f: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED
140042: ff 32 pushl (%edx) <== NOT EXECUTED
rc = rtems_rfs_inode_close (*fs, &inode);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
free (*fs);
140044: e8 1f e8 fc ff call 10e868 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
140049: e8 32 7b 00 00 call 147b80 <__errno> <== NOT EXECUTED
14004e: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
140050: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
140055: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
errno = 0;
return 0;
}
140058: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
14005b: 5b pop %ebx <== NOT EXECUTED
14005c: 5e pop %esi <== NOT EXECUTED
14005d: 5f pop %edi <== NOT EXECUTED
14005e: c9 leave <== NOT EXECUTED
14005f: c3 ret <== NOT EXECUTED
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
140060: 39 45 a0 cmp %eax,-0x60(%ebp) <== NOT EXECUTED
140063: 77 c4 ja 140029 <rtems_rfs_fs_open+0x1ad><== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
140065: 8b 45 94 mov -0x6c(%ebp),%eax <== NOT EXECUTED
140068: 0f b6 50 24 movzbl 0x24(%eax),%edx <== NOT EXECUTED
14006c: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
14006f: 0f b6 48 25 movzbl 0x25(%eax),%ecx <== NOT EXECUTED
140073: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
140076: 09 ca or %ecx,%edx <== NOT EXECUTED
140078: 0f b6 48 27 movzbl 0x27(%eax),%ecx <== NOT EXECUTED
14007c: 09 ca or %ecx,%edx <== NOT EXECUTED
14007e: 0f b6 48 26 movzbl 0x26(%eax),%ecx <== NOT EXECUTED
140082: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
140085: 09 ca or %ecx,%edx <== NOT EXECUTED
140087: 83 fa 38 cmp $0x38,%edx <== NOT EXECUTED
14008a: 75 9d jne 140029 <rtems_rfs_fs_open+0x1ad><== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
14008c: 8b 55 94 mov -0x6c(%ebp),%edx <== NOT EXECUTED
14008f: 0f b6 4a 10 movzbl 0x10(%edx),%ecx <== NOT EXECUTED
140093: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
140096: 0f b6 52 11 movzbl 0x11(%edx),%edx <== NOT EXECUTED
14009a: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
14009d: 09 d1 or %edx,%ecx <== NOT EXECUTED
14009f: 8b 45 94 mov -0x6c(%ebp),%eax <== NOT EXECUTED
1400a2: 0f b6 50 13 movzbl 0x13(%eax),%edx <== NOT EXECUTED
1400a6: 09 d1 or %edx,%ecx <== NOT EXECUTED
1400a8: 0f b6 50 12 movzbl 0x12(%eax),%edx <== NOT EXECUTED
1400ac: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
1400af: 09 d1 or %edx,%ecx <== NOT EXECUTED
1400b1: 89 4b 14 mov %ecx,0x14(%ebx) <== NOT EXECUTED
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
1400b4: 0f b6 48 14 movzbl 0x14(%eax),%ecx <== NOT EXECUTED
1400b8: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
1400bb: 0f b6 50 15 movzbl 0x15(%eax),%edx <== NOT EXECUTED
1400bf: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
1400c2: 09 d1 or %edx,%ecx <== NOT EXECUTED
1400c4: 0f b6 50 17 movzbl 0x17(%eax),%edx <== NOT EXECUTED
1400c8: 09 d1 or %edx,%ecx <== NOT EXECUTED
1400ca: 0f b6 50 16 movzbl 0x16(%eax),%edx <== NOT EXECUTED
1400ce: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
1400d1: 09 d1 or %edx,%ecx <== NOT EXECUTED
1400d3: 89 4b 18 mov %ecx,0x18(%ebx) <== NOT EXECUTED
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
1400d6: 0f b6 50 18 movzbl 0x18(%eax),%edx <== NOT EXECUTED
1400da: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
1400dd: 89 55 a0 mov %edx,-0x60(%ebp) <== NOT EXECUTED
1400e0: 0f b6 50 19 movzbl 0x19(%eax),%edx <== NOT EXECUTED
1400e4: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
1400e7: 09 55 a0 or %edx,-0x60(%ebp) <== NOT EXECUTED
1400ea: 0f b6 50 1b movzbl 0x1b(%eax),%edx <== NOT EXECUTED
1400ee: 09 55 a0 or %edx,-0x60(%ebp) <== NOT EXECUTED
1400f1: 0f b6 50 1a movzbl 0x1a(%eax),%edx <== NOT EXECUTED
1400f5: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
1400f8: 09 55 a0 or %edx,-0x60(%ebp) <== NOT EXECUTED
1400fb: 8b 45 a0 mov -0x60(%ebp),%eax <== NOT EXECUTED
1400fe: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
140101: 8b 55 94 mov -0x6c(%ebp),%edx <== NOT EXECUTED
140104: 0f b6 52 1c movzbl 0x1c(%edx),%edx <== NOT EXECUTED
140108: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
14010b: 89 55 9c mov %edx,-0x64(%ebp) <== NOT EXECUTED
14010e: 8b 45 94 mov -0x6c(%ebp),%eax <== NOT EXECUTED
140111: 0f b6 50 1d movzbl 0x1d(%eax),%edx <== NOT EXECUTED
140115: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
140118: 09 55 9c or %edx,-0x64(%ebp) <== NOT EXECUTED
14011b: 0f b6 50 1f movzbl 0x1f(%eax),%edx <== NOT EXECUTED
14011f: 09 55 9c or %edx,-0x64(%ebp) <== NOT EXECUTED
140122: 0f b6 50 1e movzbl 0x1e(%eax),%edx <== NOT EXECUTED
140126: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
140129: 09 55 9c or %edx,-0x64(%ebp) <== NOT EXECUTED
14012c: 8b 55 9c mov -0x64(%ebp),%edx <== NOT EXECUTED
14012f: 89 53 24 mov %edx,0x24(%ebx) <== NOT EXECUTED
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
140132: 0f b6 48 20 movzbl 0x20(%eax),%ecx <== NOT EXECUTED
140136: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
140139: 0f b6 50 21 movzbl 0x21(%eax),%edx <== NOT EXECUTED
14013d: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
140140: 09 d1 or %edx,%ecx <== NOT EXECUTED
140142: 0f b6 50 23 movzbl 0x23(%eax),%edx <== NOT EXECUTED
140146: 09 d1 or %edx,%ecx <== NOT EXECUTED
140148: 0f b6 40 22 movzbl 0x22(%eax),%eax <== NOT EXECUTED
14014c: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
14014f: 09 c1 or %eax,%ecx <== NOT EXECUTED
140151: 89 4b 28 mov %ecx,0x28(%ebx) <== NOT EXECUTED
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
140154: 89 f2 mov %esi,%edx <== NOT EXECUTED
140156: c1 ea 02 shr $0x2,%edx <== NOT EXECUTED
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
fs->blocks_per_block =
140159: 89 53 30 mov %edx,0x30(%ebx) <== NOT EXECUTED
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
14015c: 8d 04 92 lea (%edx,%edx,4),%eax <== NOT EXECUTED
14015f: 89 43 34 mov %eax,0x34(%ebx) <== NOT EXECUTED
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
140162: 0f af d2 imul %edx,%edx <== NOT EXECUTED
140165: 8d 04 92 lea (%edx,%edx,4),%eax <== NOT EXECUTED
140168: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
14016b: 0f af 4d a0 imul -0x60(%ebp),%ecx <== NOT EXECUTED
14016f: 89 4b 10 mov %ecx,0x10(%ebx) <== NOT EXECUTED
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
140172: 89 f0 mov %esi,%eax <== NOT EXECUTED
140174: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED
140177: ba 25 49 92 24 mov $0x24924925,%edx <== NOT EXECUTED
14017c: f7 e2 mul %edx <== NOT EXECUTED
14017e: 89 53 2c mov %edx,0x2c(%ebx) <== NOT EXECUTED
if (fs->group_blocks >
140181: c1 e6 03 shl $0x3,%esi <== NOT EXECUTED
140184: 39 75 9c cmp %esi,-0x64(%ebp) <== NOT EXECUTED
140187: 0f 87 9c fe ff ff ja 140029 <rtems_rfs_fs_open+0x1ad><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
return EIO;
}
rtems_rfs_buffer_handle_close (fs, &handle);
14018d: 89 fa mov %edi,%edx <== NOT EXECUTED
14018f: 89 d8 mov %ebx,%eax <== NOT EXECUTED
140191: e8 be fc ff ff call 13fe54 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
/*
* Change the block size to the value in the superblock.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_block_size (fs));
140196: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
140199: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
14019c: 53 push %ebx <== NOT EXECUTED
14019d: e8 be dd ff ff call 13df60 <rtems_rfs_buffer_setblksize><== NOT EXECUTED
1401a2: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
1401a4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1401a7: 85 c0 test %eax,%eax <== NOT EXECUTED
1401a9: 7e 23 jle 1401ce <rtems_rfs_fs_open+0x352><== NOT EXECUTED
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
rtems_rfs_group_close (fs, &fs->groups[g]);
rtems_rfs_buffer_handle_close (fs, &handle);
1401ab: 89 fa mov %edi,%edx <== NOT EXECUTED
1401ad: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1401af: e8 a0 fc ff ff call 13fe54 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
1401b4: e9 7b fd ff ff jmp 13ff34 <rtems_rfs_fs_open+0xb8><== NOT EXECUTED
*fs = malloc (sizeof (rtems_rfs_file_system));
if (!*fs)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: no memory for file system data\n");
errno = ENOMEM;
1401b9: e8 c2 79 00 00 call 147b80 <__errno> <== NOT EXECUTED
1401be: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
1401c4: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
1401c9: e9 8d fd ff ff jmp 13ff5b <rtems_rfs_fs_open+0xdf><== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
rc, strerror (rc));
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
1401ce: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1401d1: 6a 50 push $0x50 <== NOT EXECUTED
1401d3: ff 73 20 pushl 0x20(%ebx) <== NOT EXECUTED
1401d6: e8 31 e1 fc ff call 10e30c <calloc> <== NOT EXECUTED
1401db: 89 43 1c mov %eax,0x1c(%ebx) <== NOT EXECUTED
if (!fs->groups)
1401de: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1401e1: 85 c0 test %eax,%eax <== NOT EXECUTED
1401e3: 0f 84 5b 01 00 00 je 140344 <rtems_rfs_fs_open+0x4c8><== NOT EXECUTED
/*
* Perform each phase of group initialisation at the same time. This way we
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
1401e9: 8b 53 20 mov 0x20(%ebx),%edx <== NOT EXECUTED
1401ec: 85 d2 test %edx,%edx <== NOT EXECUTED
1401ee: 0f 8e 8c 00 00 00 jle 140280 <rtems_rfs_fs_open+0x404><== NOT EXECUTED
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
if (!fs->groups)
{
rtems_rfs_buffer_handle_close (fs, &handle);
1401f4: 8b 53 24 mov 0x24(%ebx),%edx <== NOT EXECUTED
1401f7: c7 45 a0 00 00 00 00 movl $0x0,-0x60(%ebp) <== NOT EXECUTED
1401fe: c7 45 9c 00 00 00 00 movl $0x0,-0x64(%ebp) <== NOT EXECUTED
140205: 31 f6 xor %esi,%esi <== NOT EXECUTED
140207: eb 13 jmp 14021c <rtems_rfs_fs_open+0x3a0><== NOT EXECUTED
140209: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Perform each phase of group initialisation at the same time. This way we
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
14020c: 46 inc %esi <== NOT EXECUTED
14020d: 83 45 a0 50 addl $0x50,-0x60(%ebp) <== NOT EXECUTED
140211: 3b 73 20 cmp 0x20(%ebx),%esi <== NOT EXECUTED
140214: 7d 6a jge 140280 <rtems_rfs_fs_open+0x404><== NOT EXECUTED
140216: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
140219: 8b 53 24 mov 0x24(%ebx),%edx <== NOT EXECUTED
{
rc = rtems_rfs_group_open (fs,
14021c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
14021f: 03 45 a0 add -0x60(%ebp),%eax <== NOT EXECUTED
140222: 50 push %eax <== NOT EXECUTED
140223: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
140226: 52 push %edx <== NOT EXECUTED
140227: 0f af d6 imul %esi,%edx <== NOT EXECUTED
14022a: 42 inc %edx <== NOT EXECUTED
14022b: 52 push %edx <== NOT EXECUTED
14022c: 53 push %ebx <== NOT EXECUTED
14022d: e8 0e 14 00 00 call 141640 <rtems_rfs_group_open> <== NOT EXECUTED
rtems_rfs_fs_block (fs, group, 0),
fs->group_blocks,
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
140232: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
140235: 85 c0 test %eax,%eax <== NOT EXECUTED
140237: 7e d3 jle 14020c <rtems_rfs_fs_open+0x390><== NOT EXECUTED
140239: 89 75 9c mov %esi,-0x64(%ebp) <== NOT EXECUTED
14023c: 89 c6 mov %eax,%esi <== NOT EXECUTED
{
int g;
for (g = 0; g < group; g++)
14023e: 83 7d 9c 00 cmpl $0x0,-0x64(%ebp) <== NOT EXECUTED
140242: 0f 84 63 ff ff ff je 1401ab <rtems_rfs_fs_open+0x32f><== NOT EXECUTED
140248: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
14024a: 31 c0 xor %eax,%eax <== NOT EXECUTED
14024c: 89 75 a0 mov %esi,-0x60(%ebp) <== NOT EXECUTED
14024f: 89 da mov %ebx,%edx <== NOT EXECUTED
140251: 89 ce mov %ecx,%esi <== NOT EXECUTED
140253: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
140255: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
140258: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
14025b: 01 f0 add %esi,%eax <== NOT EXECUTED
14025d: 50 push %eax <== NOT EXECUTED
14025e: 52 push %edx <== NOT EXECUTED
14025f: 89 55 98 mov %edx,-0x68(%ebp) <== NOT EXECUTED
140262: e8 59 13 00 00 call 1415c0 <rtems_rfs_group_close> <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
140267: 43 inc %ebx <== NOT EXECUTED
140268: 83 c6 50 add $0x50,%esi <== NOT EXECUTED
14026b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14026e: 39 5d 9c cmp %ebx,-0x64(%ebp) <== NOT EXECUTED
140271: 8b 55 98 mov -0x68(%ebp),%edx <== NOT EXECUTED
140274: 7f df jg 140255 <rtems_rfs_fs_open+0x3d9><== NOT EXECUTED
140276: 8b 75 a0 mov -0x60(%ebp),%esi <== NOT EXECUTED
140279: 89 d3 mov %edx,%ebx <== NOT EXECUTED
14027b: e9 2b ff ff ff jmp 1401ab <rtems_rfs_fs_open+0x32f><== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
140280: 6a 01 push $0x1 <== NOT EXECUTED
140282: 8d 5d b4 lea -0x4c(%ebp),%ebx <== NOT EXECUTED
140285: 53 push %ebx <== NOT EXECUTED
140286: 6a 01 push $0x1 <== NOT EXECUTED
140288: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED
14028b: ff 32 pushl (%edx) <== NOT EXECUTED
14028d: e8 62 18 00 00 call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
140292: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
140294: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
140297: 85 c0 test %eax,%eax <== NOT EXECUTED
140299: 0f 8f 95 fc ff ff jg 13ff34 <rtems_rfs_fs_open+0xb8><== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
if (((*fs)->flags & RTEMS_RFS_FS_FORCE_OPEN) == 0)
14029f: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
1402a2: 8b 10 mov (%eax),%edx <== NOT EXECUTED
1402a4: f6 02 04 testb $0x4,(%edx) <== NOT EXECUTED
1402a7: 75 22 jne 1402cb <rtems_rfs_fs_open+0x44f><== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
1402a9: 8b 45 c0 mov -0x40(%ebp),%eax <== NOT EXECUTED
1402ac: 0f b6 48 02 movzbl 0x2(%eax),%ecx <== NOT EXECUTED
1402b0: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
1402b3: 0f b6 40 03 movzbl 0x3(%eax),%eax <== NOT EXECUTED
1402b7: 09 c8 or %ecx,%eax <== NOT EXECUTED
{
mode = rtems_rfs_inode_get_mode (&inode);
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
1402b9: 66 83 f8 ff cmp $0xffffffff,%ax <== NOT EXECUTED
1402bd: 74 4d je 14030c <rtems_rfs_fs_open+0x490><== NOT EXECUTED
1402bf: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
1402c4: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
1402c9: 75 41 jne 14030c <rtems_rfs_fs_open+0x490><== NOT EXECUTED
errno = EIO;
return -1;
}
}
rc = rtems_rfs_inode_close (*fs, &inode);
1402cb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1402ce: 53 push %ebx <== NOT EXECUTED
1402cf: 52 push %edx <== NOT EXECUTED
1402d0: e8 9b 17 00 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
1402d5: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
1402d7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1402da: 85 c0 test %eax,%eax <== NOT EXECUTED
1402dc: 7f 16 jg 1402f4 <rtems_rfs_fs_open+0x478><== NOT EXECUTED
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
return -1;
}
errno = 0;
1402de: e8 9d 78 00 00 call 147b80 <__errno> <== NOT EXECUTED
1402e3: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
1402e9: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
}
1402eb: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1402ee: 5b pop %ebx <== NOT EXECUTED
1402ef: 5e pop %esi <== NOT EXECUTED
1402f0: 5f pop %edi <== NOT EXECUTED
1402f1: c9 leave <== NOT EXECUTED
1402f2: c3 ret <== NOT EXECUTED
1402f3: 90 nop <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (*fs, &inode);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
1402f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1402f7: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED
1402fa: ff 32 pushl (%edx) <== NOT EXECUTED
1402fc: e8 a3 dc ff ff call 13dfa4 <rtems_rfs_buffer_close><== NOT EXECUTED
free (*fs);
140301: 5a pop %edx <== NOT EXECUTED
140302: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
140305: ff 30 pushl (%eax) <== NOT EXECUTED
140307: e9 38 fd ff ff jmp 140044 <rtems_rfs_fs_open+0x1c8><== NOT EXECUTED
{
mode = rtems_rfs_inode_get_mode (&inode);
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
{
rtems_rfs_inode_close (*fs, &inode);
14030c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
14030f: 53 push %ebx <== NOT EXECUTED
140310: 52 push %edx <== NOT EXECUTED
140311: e8 5a 17 00 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_buffer_close (*fs);
140316: 5b pop %ebx <== NOT EXECUTED
140317: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED
14031a: ff 32 pushl (%edx) <== NOT EXECUTED
14031c: e8 83 dc ff ff call 13dfa4 <rtems_rfs_buffer_close><== NOT EXECUTED
free (*fs);
140321: 59 pop %ecx <== NOT EXECUTED
140322: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
140325: ff 30 pushl (%eax) <== NOT EXECUTED
140327: e8 3c e5 fc ff call 10e868 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: invalid root inode mode\n");
errno = EIO;
14032c: e8 4f 78 00 00 call 147b80 <__errno> <== NOT EXECUTED
140331: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
140337: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
14033c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14033f: e9 17 fc ff ff jmp 13ff5b <rtems_rfs_fs_open+0xdf><== NOT EXECUTED
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
if (!fs->groups)
{
rtems_rfs_buffer_handle_close (fs, &handle);
140344: 89 fa mov %edi,%edx <== NOT EXECUTED
140346: 89 d8 mov %ebx,%eax <== NOT EXECUTED
140348: e8 07 fb ff ff call 13fe54 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
14034d: be 0c 00 00 00 mov $0xc,%esi <== NOT EXECUTED
140352: e9 dd fb ff ff jmp 13ff34 <rtems_rfs_fs_open+0xb8><== NOT EXECUTED
0013fde0 <rtems_rfs_fs_size>:
#include <rtems/rfs/rtems-rfs-inode.h>
#include <rtems/rfs/rtems-rfs-trace.h>
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
13fde0: 55 push %ebp <== NOT EXECUTED
13fde1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13fde3: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
13fde6: 8b 42 04 mov 0x4(%edx),%eax <== NOT EXECUTED
13fde9: f7 62 08 mull 0x8(%edx) <== NOT EXECUTED
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
}
13fdec: c9 leave <== NOT EXECUTED
13fded: c3 ret <== NOT EXECUTED
00141450 <rtems_rfs_group_bitmap_alloc>:
int
rtems_rfs_group_bitmap_alloc (rtems_rfs_file_system* fs,
rtems_rfs_bitmap_bit goal,
bool inode,
rtems_rfs_bitmap_bit* result)
{
141450: 55 push %ebp <== NOT EXECUTED
141451: 89 e5 mov %esp,%ebp <== NOT EXECUTED
141453: 57 push %edi <== NOT EXECUTED
141454: 56 push %esi <== NOT EXECUTED
141455: 53 push %ebx <== NOT EXECUTED
141456: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
141459: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
14145c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
14145f: 8a 55 10 mov 0x10(%ebp),%dl <== NOT EXECUTED
141462: 88 55 cf mov %dl,-0x31(%ebp) <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
int offset;
bool updown;
int direction;
if (inode)
141465: 84 d2 test %dl,%dl <== NOT EXECUTED
141467: 0f 84 e7 00 00 00 je 141554 <rtems_rfs_group_bitmap_alloc+0x104><== NOT EXECUTED
{
size = fs->group_inodes;
14146d: 8b 51 28 mov 0x28(%ecx),%edx <== NOT EXECUTED
141470: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
goal -= RTEMS_RFS_ROOT_INO;
141473: 48 dec %eax <== NOT EXECUTED
}
else
size = fs->group_blocks;
group_start = goal / size;
141474: 31 d2 xor %edx,%edx <== NOT EXECUTED
141476: f7 75 d4 divl -0x2c(%ebp) <== NOT EXECUTED
141479: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (goal % size);
14147c: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
14147f: c6 45 e7 00 movb $0x0,-0x19(%ebp) <== NOT EXECUTED
141483: 89 c6 mov %eax,%esi <== NOT EXECUTED
141485: bb 01 00 00 00 mov $0x1,%ebx <== NOT EXECUTED
14148a: b2 01 mov $0x1,%dl <== NOT EXECUTED
14148c: 31 ff xor %edi,%edi <== NOT EXECUTED
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
bit = direction > 0 ? 0 : size - 1;
14148e: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
141491: 48 dec %eax <== NOT EXECUTED
141492: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
/*
* If we are still looking up and down and if the group is out of range we
* have reached one end. Stopping looking up and down and just move in the
* one direction one group at a time.
*/
if ((group < 0) || (group >= fs->group_count))
141495: 85 f6 test %esi,%esi <== NOT EXECUTED
141497: 78 07 js 1414a0 <rtems_rfs_group_bitmap_alloc+0x50><== NOT EXECUTED
141499: 39 71 20 cmp %esi,0x20(%ecx) <== NOT EXECUTED
14149c: 7f 3e jg 1414dc <rtems_rfs_group_bitmap_alloc+0x8c><== NOT EXECUTED
14149e: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
if (!updown)
1414a0: 84 d2 test %dl,%dl <== NOT EXECUTED
1414a2: 0f 84 94 00 00 00 je 14153c <rtems_rfs_group_bitmap_alloc+0xec><== NOT EXECUTED
break;
direction = direction > 0 ? -1 : 1;
1414a8: 4b dec %ebx <== NOT EXECUTED
1414a9: 0f 95 c3 setne %bl <== NOT EXECUTED
1414ac: 0f b6 db movzbl %bl,%ebx <== NOT EXECUTED
1414af: 8d 5c 1b ff lea -0x1(%ebx,%ebx,1),%ebx <== NOT EXECUTED
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
1414b3: 85 ff test %edi,%edi <== NOT EXECUTED
1414b5: 0f 84 91 00 00 00 je 14154c <rtems_rfs_group_bitmap_alloc+0xfc><== NOT EXECUTED
1414bb: 31 d2 xor %edx,%edx <== NOT EXECUTED
bit = direction > 0 ? 0 : size - 1;
1414bd: 83 fb 01 cmp $0x1,%ebx <== NOT EXECUTED
1414c0: 75 75 jne 141537 <rtems_rfs_group_bitmap_alloc+0xe7><== NOT EXECUTED
1414c2: 31 c0 xor %eax,%eax <== NOT EXECUTED
1414c4: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
1414c7: c6 45 e7 00 movb $0x0,-0x19(%ebp) <== NOT EXECUTED
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
1414cb: 89 fe mov %edi,%esi <== NOT EXECUTED
1414cd: 0f af f3 imul %ebx,%esi <== NOT EXECUTED
1414d0: 03 75 d0 add -0x30(%ebp),%esi <== NOT EXECUTED
/*
* If we are still looking up and down and if the group is out of range we
* have reached one end. Stopping looking up and down and just move in the
* one direction one group at a time.
*/
if ((group < 0) || (group >= fs->group_count))
1414d3: 85 f6 test %esi,%esi <== NOT EXECUTED
1414d5: 78 c9 js 1414a0 <rtems_rfs_group_bitmap_alloc+0x50><== NOT EXECUTED
1414d7: 39 71 20 cmp %esi,0x20(%ecx) <== NOT EXECUTED
1414da: 7e c4 jle 1414a0 <rtems_rfs_group_bitmap_alloc+0x50><== NOT EXECUTED
direction = direction > 0 ? -1 : 1;
updown = false;
continue;
}
if (inode)
1414dc: 80 7d cf 00 cmpb $0x0,-0x31(%ebp) <== NOT EXECUTED
1414e0: 75 7e jne 141560 <rtems_rfs_group_bitmap_alloc+0x110><== NOT EXECUTED
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
1414e2: 8d 04 b6 lea (%esi,%esi,4),%eax <== NOT EXECUTED
1414e5: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED
1414e8: 03 41 1c add 0x1c(%ecx),%eax <== NOT EXECUTED
1414eb: 83 c0 08 add $0x8,%eax <== NOT EXECUTED
1414ee: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
1414f1: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
1414f4: 50 push %eax <== NOT EXECUTED
1414f5: 8d 45 e7 lea -0x19(%ebp),%eax <== NOT EXECUTED
1414f8: 50 push %eax <== NOT EXECUTED
1414f9: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
1414fc: ff 75 c8 pushl -0x38(%ebp) <== NOT EXECUTED
1414ff: 88 55 c4 mov %dl,-0x3c(%ebp) <== NOT EXECUTED
141502: 89 4d c0 mov %ecx,-0x40(%ebp) <== NOT EXECUTED
141505: e8 d2 5d 00 00 call 1472dc <rtems_rfs_bitmap_map_alloc><== NOT EXECUTED
if (rc > 0)
14150a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14150d: 85 c0 test %eax,%eax <== NOT EXECUTED
14150f: 8a 55 c4 mov -0x3c(%ebp),%dl <== NOT EXECUTED
141512: 8b 4d c0 mov -0x40(%ebp),%ecx <== NOT EXECUTED
141515: 7f 2a jg 141541 <rtems_rfs_group_bitmap_alloc+0xf1><== NOT EXECUTED
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
141517: f6 01 01 testb $0x1,(%ecx) <== NOT EXECUTED
14151a: 74 58 je 141574 <rtems_rfs_group_bitmap_alloc+0x124><== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
if (allocated)
14151c: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) <== NOT EXECUTED
141520: 75 6b jne 14158d <rtems_rfs_group_bitmap_alloc+0x13d><== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
inode ? "inode" : "block", *result);
return 0;
}
if (updown)
141522: 84 d2 test %dl,%dl <== NOT EXECUTED
141524: 74 0b je 141531 <rtems_rfs_group_bitmap_alloc+0xe1><== NOT EXECUTED
direction = direction > 0 ? -1 : 1;
141526: 4b dec %ebx <== NOT EXECUTED
141527: 0f 95 c3 setne %bl <== NOT EXECUTED
14152a: 0f b6 db movzbl %bl,%ebx <== NOT EXECUTED
14152d: 8d 5c 1b ff lea -0x1(%ebx,%ebx,1),%ebx <== NOT EXECUTED
offset++;
141531: 47 inc %edi <== NOT EXECUTED
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
bit = direction > 0 ? 0 : size - 1;
141532: 83 fb 01 cmp $0x1,%ebx <== NOT EXECUTED
141535: 74 8b je 1414c2 <rtems_rfs_group_bitmap_alloc+0x72><== NOT EXECUTED
141537: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
14153a: eb 88 jmp 1414c4 <rtems_rfs_group_bitmap_alloc+0x74><== NOT EXECUTED
}
if (updown)
direction = direction > 0 ? -1 : 1;
offset++;
14153c: b8 1c 00 00 00 mov $0x1c,%eax <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-alloc: no blocks available\n");
return ENOSPC;
}
141541: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
141544: 5b pop %ebx <== NOT EXECUTED
141545: 5e pop %esi <== NOT EXECUTED
141546: 5f pop %edi <== NOT EXECUTED
141547: c9 leave <== NOT EXECUTED
141548: c3 ret <== NOT EXECUTED
141549: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
14154c: 31 d2 xor %edx,%edx <== NOT EXECUTED
14154e: e9 74 ff ff ff jmp 1414c7 <rtems_rfs_group_bitmap_alloc+0x77><== NOT EXECUTED
141553: 90 nop <== NOT EXECUTED
{
size = fs->group_inodes;
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
141554: 8b 51 24 mov 0x24(%ecx),%edx <== NOT EXECUTED
141557: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
14155a: e9 15 ff ff ff jmp 141474 <rtems_rfs_group_bitmap_alloc+0x24><== NOT EXECUTED
14155f: 90 nop <== NOT EXECUTED
updown = false;
continue;
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
141560: 8d 04 b6 lea (%esi,%esi,4),%eax <== NOT EXECUTED
141563: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED
141566: 03 41 1c add 0x1c(%ecx),%eax <== NOT EXECUTED
141569: 83 c0 2c add $0x2c,%eax <== NOT EXECUTED
14156c: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED
14156f: eb 80 jmp 1414f1 <rtems_rfs_group_bitmap_alloc+0xa1><== NOT EXECUTED
141571: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
if (rc > 0)
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
rtems_rfs_bitmap_release_buffer (fs, bitmap);
141574: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141577: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
14157a: ff 30 pushl (%eax) <== NOT EXECUTED
14157c: 51 push %ecx <== NOT EXECUTED
14157d: e8 a6 ca ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
141582: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141585: 8b 4d c0 mov -0x40(%ebp),%ecx <== NOT EXECUTED
141588: 8a 55 c4 mov -0x3c(%ebp),%dl <== NOT EXECUTED
14158b: eb 8f jmp 14151c <rtems_rfs_group_bitmap_alloc+0xcc><== NOT EXECUTED
if (allocated)
{
if (inode)
14158d: 80 7d cf 00 cmpb $0x0,-0x31(%ebp) <== NOT EXECUTED
141591: 74 14 je 1415a7 <rtems_rfs_group_bitmap_alloc+0x157><== NOT EXECUTED
*result = rtems_rfs_group_inode (fs, group, bit);
141593: 0f af 71 28 imul 0x28(%ecx),%esi <== NOT EXECUTED
141597: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
14159a: 8d 44 30 01 lea 0x1(%eax,%esi,1),%eax <== NOT EXECUTED
14159e: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
1415a1: 89 02 mov %eax,(%edx) <== NOT EXECUTED
1415a3: 31 c0 xor %eax,%eax <== NOT EXECUTED
1415a5: eb 9a jmp 141541 <rtems_rfs_group_bitmap_alloc+0xf1><== NOT EXECUTED
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
1415a7: 8b 49 1c mov 0x1c(%ecx),%ecx <== NOT EXECUTED
1415aa: 8d 14 b6 lea (%esi,%esi,4),%edx <== NOT EXECUTED
1415ad: c1 e2 04 shl $0x4,%edx <== NOT EXECUTED
1415b0: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
1415b3: 03 04 11 add (%ecx,%edx,1),%eax <== NOT EXECUTED
1415b6: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
1415b9: 89 02 mov %eax,(%edx) <== NOT EXECUTED
1415bb: 31 c0 xor %eax,%eax <== NOT EXECUTED
1415bd: eb 82 jmp 141541 <rtems_rfs_group_bitmap_alloc+0xf1><== NOT EXECUTED
001413f4 <rtems_rfs_group_bitmap_free>:
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
1413f4: 55 push %ebp <== NOT EXECUTED
1413f5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1413f7: 57 push %edi <== NOT EXECUTED
1413f8: 56 push %esi <== NOT EXECUTED
1413f9: 53 push %ebx <== NOT EXECUTED
1413fa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1413fd: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
141400: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
inode ? "inode" : "block", no);
if (inode)
141403: 80 7d 0c 00 cmpb $0x0,0xc(%ebp) <== NOT EXECUTED
141407: 74 33 je 14143c <rtems_rfs_group_bitmap_free+0x48><== NOT EXECUTED
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
141409: 48 dec %eax <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
14140a: 31 d2 xor %edx,%edx <== NOT EXECUTED
14140c: f7 73 28 divl 0x28(%ebx) <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
14140f: 8d 34 80 lea (%eax,%eax,4),%esi <== NOT EXECUTED
141412: c1 e6 04 shl $0x4,%esi <== NOT EXECUTED
141415: 03 73 1c add 0x1c(%ebx),%esi <== NOT EXECUTED
141418: 83 c6 2c add $0x2c,%esi <== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
14141b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
14141e: 52 push %edx <== NOT EXECUTED
14141f: 56 push %esi <== NOT EXECUTED
141420: e8 6b 5b 00 00 call 146f90 <rtems_rfs_bitmap_map_clear><== NOT EXECUTED
141425: 89 c7 mov %eax,%edi <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
141427: 58 pop %eax <== NOT EXECUTED
141428: 5a pop %edx <== NOT EXECUTED
141429: ff 36 pushl (%esi) <== NOT EXECUTED
14142b: 53 push %ebx <== NOT EXECUTED
14142c: e8 f7 cb ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
return rc;
}
141431: 89 f8 mov %edi,%eax <== NOT EXECUTED
141433: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
141436: 5b pop %ebx <== NOT EXECUTED
141437: 5e pop %esi <== NOT EXECUTED
141438: 5f pop %edi <== NOT EXECUTED
141439: c9 leave <== NOT EXECUTED
14143a: c3 ret <== NOT EXECUTED
14143b: 90 nop <== NOT EXECUTED
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
14143c: 48 dec %eax <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
14143d: 31 d2 xor %edx,%edx <== NOT EXECUTED
14143f: f7 73 24 divl 0x24(%ebx) <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
141442: 8d 34 80 lea (%eax,%eax,4),%esi <== NOT EXECUTED
141445: c1 e6 04 shl $0x4,%esi <== NOT EXECUTED
141448: 03 73 1c add 0x1c(%ebx),%esi <== NOT EXECUTED
14144b: 83 c6 08 add $0x8,%esi <== NOT EXECUTED
14144e: eb cb jmp 14141b <rtems_rfs_group_bitmap_free+0x27><== NOT EXECUTED
00141378 <rtems_rfs_group_bitmap_test>:
int
rtems_rfs_group_bitmap_test (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no,
bool* state)
{
141378: 55 push %ebp <== NOT EXECUTED
141379: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14137b: 57 push %edi <== NOT EXECUTED
14137c: 56 push %esi <== NOT EXECUTED
14137d: 53 push %ebx <== NOT EXECUTED
14137e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
141381: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
141384: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
inode ? "inode" : "block", no);
if (inode)
141387: 80 7d 0c 00 cmpb $0x0,0xc(%ebp) <== NOT EXECUTED
14138b: 74 3f je 1413cc <rtems_rfs_group_bitmap_test+0x54><== NOT EXECUTED
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
14138d: 85 c0 test %eax,%eax <== NOT EXECUTED
14138f: 7e 53 jle 1413e4 <rtems_rfs_group_bitmap_test+0x6c><== NOT EXECUTED
141391: 3b 43 10 cmp 0x10(%ebx),%eax <== NOT EXECUTED
141394: 77 4e ja 1413e4 <rtems_rfs_group_bitmap_test+0x6c><== NOT EXECUTED
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
141396: 48 dec %eax <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
141397: 31 d2 xor %edx,%edx <== NOT EXECUTED
141399: f7 73 28 divl 0x28(%ebx) <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
14139c: 8d 3c 80 lea (%eax,%eax,4),%edi <== NOT EXECUTED
14139f: c1 e7 04 shl $0x4,%edi <== NOT EXECUTED
1413a2: 03 7b 1c add 0x1c(%ebx),%edi <== NOT EXECUTED
1413a5: 83 c7 2c add $0x2c,%edi <== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
1413a8: 51 push %ecx <== NOT EXECUTED
1413a9: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
1413ac: 52 push %edx <== NOT EXECUTED
1413ad: 57 push %edi <== NOT EXECUTED
1413ae: e8 85 5b 00 00 call 146f38 <rtems_rfs_bitmap_map_test><== NOT EXECUTED
1413b3: 89 c6 mov %eax,%esi <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
1413b5: 58 pop %eax <== NOT EXECUTED
1413b6: 5a pop %edx <== NOT EXECUTED
1413b7: ff 37 pushl (%edi) <== NOT EXECUTED
1413b9: 53 push %ebx <== NOT EXECUTED
1413ba: e8 69 cc ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
return rc;
1413bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1413c2: 89 f0 mov %esi,%eax <== NOT EXECUTED
1413c4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1413c7: 5b pop %ebx <== NOT EXECUTED
1413c8: 5e pop %esi <== NOT EXECUTED
1413c9: 5f pop %edi <== NOT EXECUTED
1413ca: c9 leave <== NOT EXECUTED
1413cb: c3 ret <== NOT EXECUTED
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
}
else
{
if (no >= rtems_rfs_fs_blocks (fs))
1413cc: 3b 43 04 cmp 0x4(%ebx),%eax <== NOT EXECUTED
1413cf: 73 13 jae 1413e4 <rtems_rfs_group_bitmap_test+0x6c><== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
1413d1: 31 d2 xor %edx,%edx <== NOT EXECUTED
1413d3: f7 73 24 divl 0x24(%ebx) <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
1413d6: 8d 3c 80 lea (%eax,%eax,4),%edi <== NOT EXECUTED
1413d9: c1 e7 04 shl $0x4,%edi <== NOT EXECUTED
1413dc: 03 7b 1c add 0x1c(%ebx),%edi <== NOT EXECUTED
1413df: 83 c7 08 add $0x8,%edi <== NOT EXECUTED
1413e2: eb c4 jmp 1413a8 <rtems_rfs_group_bitmap_test+0x30><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
rtems_rfs_bitmap_release_buffer (fs, bitmap);
return rc;
1413e4: be 16 00 00 00 mov $0x16,%esi <== NOT EXECUTED
}
1413e9: 89 f0 mov %esi,%eax <== NOT EXECUTED
1413eb: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1413ee: 5b pop %ebx <== NOT EXECUTED
1413ef: 5e pop %esi <== NOT EXECUTED
1413f0: 5f pop %edi <== NOT EXECUTED
1413f1: c9 leave <== NOT EXECUTED
1413f2: c3 ret <== NOT EXECUTED
001415c0 <rtems_rfs_group_close>:
return 0;
}
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
1415c0: 55 push %ebp <== NOT EXECUTED
1415c1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1415c3: 57 push %edi <== NOT EXECUTED
1415c4: 56 push %esi <== NOT EXECUTED
1415c5: 53 push %ebx <== NOT EXECUTED
1415c6: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED
1415c9: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
1415cc: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
/*
* We need to close as much as possible and also return any error if one
* occurs but this may result in one even more important error being lost but
* we cannot OR the errors together so this is a reasonable compromise.
*/
rc = rtems_rfs_bitmap_close (&group->inode_bitmap);
1415cf: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED
1415d2: 50 push %eax <== NOT EXECUTED
1415d3: e8 d4 56 00 00 call 146cac <rtems_rfs_bitmap_close><== NOT EXECUTED
1415d8: 89 c7 mov %eax,%edi <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
1415da: 59 pop %ecx <== NOT EXECUTED
1415db: 58 pop %eax <== NOT EXECUTED
1415dc: 8d 43 44 lea 0x44(%ebx),%eax <== NOT EXECUTED
1415df: 50 push %eax <== NOT EXECUTED
1415e0: 56 push %esi <== NOT EXECUTED
1415e1: e8 42 ca ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
1415e6: c6 43 44 00 movb $0x0,0x44(%ebx) <== NOT EXECUTED
handle->bnum = 0;
1415ea: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
1415f1: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) <== NOT EXECUTED
if (rc > 0)
result = rc;
rc = rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
if (rc > 0)
result = rc;
rc = rtems_rfs_bitmap_close (&group->block_bitmap);
1415f8: 8d 43 08 lea 0x8(%ebx),%eax <== NOT EXECUTED
1415fb: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1415fe: e8 a9 56 00 00 call 146cac <rtems_rfs_bitmap_close><== NOT EXECUTED
if (rc > 0)
141603: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141606: 85 c0 test %eax,%eax <== NOT EXECUTED
141608: 7e 2e jle 141638 <rtems_rfs_group_close+0x78><== NOT EXECUTED
14160a: 89 c7 mov %eax,%edi <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
14160c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
14160f: 8d 43 20 lea 0x20(%ebx),%eax <== NOT EXECUTED
141612: 50 push %eax <== NOT EXECUTED
141613: 56 push %esi <== NOT EXECUTED
141614: e8 0f ca ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
141619: c6 43 20 00 movb $0x0,0x20(%ebx) <== NOT EXECUTED
handle->bnum = 0;
14161d: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
141624: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rc > 0)
result = rc;
return result;
}
14162b: 89 f8 mov %edi,%eax <== NOT EXECUTED
14162d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
141630: 5b pop %ebx <== NOT EXECUTED
141631: 5e pop %esi <== NOT EXECUTED
141632: 5f pop %edi <== NOT EXECUTED
141633: c9 leave <== NOT EXECUTED
141634: c3 ret <== NOT EXECUTED
141635: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
result = rc;
rc = rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
if (rc > 0)
result = rc;
rc = rtems_rfs_bitmap_close (&group->block_bitmap);
if (rc > 0)
141638: 85 ff test %edi,%edi <== NOT EXECUTED
14163a: 79 d0 jns 14160c <rtems_rfs_group_close+0x4c><== NOT EXECUTED
14163c: 31 ff xor %edi,%edi <== NOT EXECUTED
14163e: eb cc jmp 14160c <rtems_rfs_group_close+0x4c><== NOT EXECUTED
00141640 <rtems_rfs_group_open>:
rtems_rfs_group_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block base,
size_t size,
size_t inodes,
rtems_rfs_group* group)
{
141640: 55 push %ebp <== NOT EXECUTED
141641: 89 e5 mov %esp,%ebp <== NOT EXECUTED
141643: 57 push %edi <== NOT EXECUTED
141644: 56 push %esi <== NOT EXECUTED
141645: 53 push %ebx <== NOT EXECUTED
141646: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
141649: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
14164c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
14164f: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
141652: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
141655: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED
141658: 39 c2 cmp %eax,%edx <== NOT EXECUTED
14165a: 0f 86 bc 00 00 00 jbe 14171c <rtems_rfs_group_open+0xdc><== NOT EXECUTED
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
EIO, strerror (EIO));
return EIO;
}
if ((base + size) >= rtems_rfs_fs_blocks (fs))
141660: 8d 0c 07 lea (%edi,%eax,1),%ecx <== NOT EXECUTED
141663: 39 ca cmp %ecx,%edx <== NOT EXECUTED
141665: 77 04 ja 14166b <rtems_rfs_group_open+0x2b><== NOT EXECUTED
size = rtems_rfs_fs_blocks (fs) - base;
141667: 89 d7 mov %edx,%edi <== NOT EXECUTED
141669: 29 c7 sub %eax,%edi <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
base, size, inodes);
group->base = base;
14166b: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
group->size = size;
14166d: 89 7b 04 mov %edi,0x4(%ebx) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
141670: c6 43 20 00 movb $0x0,0x20(%ebx) <== NOT EXECUTED
handle->bnum = 0;
141674: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
14167b: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open block bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->block_bitmap, fs,
141682: 8d 53 20 lea 0x20(%ebx),%edx <== NOT EXECUTED
141685: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
141688: 8d 53 08 lea 0x8(%ebx),%edx <== NOT EXECUTED
14168b: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
14168e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
141691: 50 push %eax <== NOT EXECUTED
141692: 57 push %edi <== NOT EXECUTED
141693: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
141696: 56 push %esi <== NOT EXECUTED
141697: 52 push %edx <== NOT EXECUTED
141698: e8 3f 57 00 00 call 146ddc <rtems_rfs_bitmap_open> <== NOT EXECUTED
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
14169d: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1416a0: 85 c0 test %eax,%eax <== NOT EXECUTED
1416a2: 7e 34 jle 1416d8 <rtems_rfs_group_open+0x98><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
1416a4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1416a7: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
1416aa: 56 push %esi <== NOT EXECUTED
1416ab: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
1416ae: e8 75 c9 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
1416b3: c6 43 20 00 movb $0x0,0x20(%ebx) <== NOT EXECUTED
handle->bnum = 0;
1416b7: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
1416be: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
1416c5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1416c8: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
}
1416cb: 89 d0 mov %edx,%eax <== NOT EXECUTED
1416cd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1416d0: 5b pop %ebx <== NOT EXECUTED
1416d1: 5e pop %esi <== NOT EXECUTED
1416d2: 5f pop %edi <== NOT EXECUTED
1416d3: c9 leave <== NOT EXECUTED
1416d4: c3 ret <== NOT EXECUTED
1416d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
1416d8: c6 43 44 00 movb $0x0,0x44(%ebx) <== NOT EXECUTED
handle->bnum = 0;
1416dc: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
1416e3: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->inode_bitmap, fs,
1416ea: 8d 4b 44 lea 0x44(%ebx),%ecx <== NOT EXECUTED
1416ed: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1416f0: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
1416f2: 40 inc %eax <== NOT EXECUTED
1416f3: 50 push %eax <== NOT EXECUTED
1416f4: 3b 7d 14 cmp 0x14(%ebp),%edi <== NOT EXECUTED
1416f7: 77 33 ja 14172c <rtems_rfs_group_open+0xec><== NOT EXECUTED
1416f9: 57 push %edi <== NOT EXECUTED
1416fa: 51 push %ecx <== NOT EXECUTED
1416fb: 56 push %esi <== NOT EXECUTED
1416fc: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED
1416ff: 50 push %eax <== NOT EXECUTED
141700: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED
141703: e8 d4 56 00 00 call 146ddc <rtems_rfs_bitmap_open> <== NOT EXECUTED
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
141708: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
14170b: 85 c0 test %eax,%eax <== NOT EXECUTED
14170d: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED
141710: 7f 22 jg 141734 <rtems_rfs_group_open+0xf4><== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap: %d: %s\n",
rc, strerror (rc));
return rc;
}
if (rtems_rfs_fs_release_bitmaps (fs))
141712: f6 06 01 testb $0x1,(%esi) <== NOT EXECUTED
141715: 74 51 je 141768 <rtems_rfs_group_open+0x128><== NOT EXECUTED
141717: 31 d2 xor %edx,%edx <== NOT EXECUTED
141719: eb b0 jmp 1416cb <rtems_rfs_group_open+0x8b><== NOT EXECUTED
14171b: 90 nop <== NOT EXECUTED
size_t inodes,
rtems_rfs_group* group)
{
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
14171c: ba 05 00 00 00 mov $0x5,%edx <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
}
141721: 89 d0 mov %edx,%eax <== NOT EXECUTED
141723: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
141726: 5b pop %ebx <== NOT EXECUTED
141727: 5e pop %esi <== NOT EXECUTED
141728: 5f pop %edi <== NOT EXECUTED
141729: c9 leave <== NOT EXECUTED
14172a: c3 ret <== NOT EXECUTED
14172b: 90 nop <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->inode_bitmap, fs,
14172c: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
14172f: eb c8 jmp 1416f9 <rtems_rfs_group_open+0xb9><== NOT EXECUTED
141731: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
141734: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141737: 51 push %ecx <== NOT EXECUTED
141738: 56 push %esi <== NOT EXECUTED
141739: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
14173c: e8 e7 c8 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
141741: c6 43 44 00 movb $0x0,0x44(%ebx) <== NOT EXECUTED
handle->bnum = 0;
141745: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
14174c: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) <== NOT EXECUTED
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
rtems_rfs_bitmap_close (&group->block_bitmap);
141753: 5a pop %edx <== NOT EXECUTED
141754: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
141757: e8 50 55 00 00 call 146cac <rtems_rfs_bitmap_close><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
14175c: 5f pop %edi <== NOT EXECUTED
14175d: 58 pop %eax <== NOT EXECUTED
14175e: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
141761: 56 push %esi <== NOT EXECUTED
141762: e9 47 ff ff ff jmp 1416ae <rtems_rfs_group_open+0x6e><== NOT EXECUTED
141767: 90 nop <== NOT EXECUTED
return rc;
}
if (rtems_rfs_fs_release_bitmaps (fs))
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
141768: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
14176b: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
14176e: 56 push %esi <== NOT EXECUTED
14176f: e8 b4 c8 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
141774: 5a pop %edx <== NOT EXECUTED
141775: 59 pop %ecx <== NOT EXECUTED
141776: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
141779: 56 push %esi <== NOT EXECUTED
14177a: e8 a9 c8 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
14177f: 31 d2 xor %edx,%edx <== NOT EXECUTED
141781: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141784: e9 42 ff ff ff jmp 1416cb <rtems_rfs_group_open+0x8b><== NOT EXECUTED
00141310 <rtems_rfs_group_usage>:
int
rtems_rfs_group_usage (rtems_rfs_file_system* fs,
size_t* blocks,
size_t* inodes)
{
141310: 55 push %ebp <== NOT EXECUTED
141311: 89 e5 mov %esp,%ebp <== NOT EXECUTED
141313: 57 push %edi <== NOT EXECUTED
141314: 56 push %esi <== NOT EXECUTED
141315: 53 push %ebx <== NOT EXECUTED
141316: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
141319: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED
int g;
*blocks = 0;
14131c: c7 06 00 00 00 00 movl $0x0,(%esi) <== NOT EXECUTED
*inodes = 0;
141322: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
for (g = 0; g < fs->group_count; g++)
141328: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
14132b: 8b 78 20 mov 0x20(%eax),%edi <== NOT EXECUTED
14132e: 85 ff test %edi,%edi <== NOT EXECUTED
141330: 7e 1e jle 141350 <rtems_rfs_group_usage+0x40><== NOT EXECUTED
141332: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
141335: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
141337: 90 nop <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
141338: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED
14133b: 2b 50 18 sub 0x18(%eax),%edx <== NOT EXECUTED
14133e: 01 16 add %edx,(%esi) <== NOT EXECUTED
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
141340: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
141343: 2b 50 3c sub 0x3c(%eax),%edx <== NOT EXECUTED
141346: 01 13 add %edx,(%ebx) <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
141348: 41 inc %ecx <== NOT EXECUTED
141349: 83 c0 50 add $0x50,%eax <== NOT EXECUTED
14134c: 39 f9 cmp %edi,%ecx <== NOT EXECUTED
14134e: 7c e8 jl 141338 <rtems_rfs_group_usage+0x28><== NOT EXECUTED
*inodes +=
rtems_rfs_bitmap_map_size (&group->inode_bitmap) -
rtems_rfs_bitmap_map_free (&group->inode_bitmap);
}
if (*blocks > rtems_rfs_fs_blocks (fs))
141350: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
141353: 8b 50 04 mov 0x4(%eax),%edx <== NOT EXECUTED
141356: 8b 06 mov (%esi),%eax <== NOT EXECUTED
141358: 39 d0 cmp %edx,%eax <== NOT EXECUTED
14135a: 76 02 jbe 14135e <rtems_rfs_group_usage+0x4e><== NOT EXECUTED
14135c: 89 d0 mov %edx,%eax <== NOT EXECUTED
14135e: 89 06 mov %eax,(%esi) <== NOT EXECUTED
*blocks = rtems_rfs_fs_blocks (fs);
if (*inodes > rtems_rfs_fs_inodes (fs))
141360: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
141363: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
141366: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
141368: 39 d0 cmp %edx,%eax <== NOT EXECUTED
14136a: 76 02 jbe 14136e <rtems_rfs_group_usage+0x5e><== NOT EXECUTED
14136c: 89 d0 mov %edx,%eax <== NOT EXECUTED
14136e: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
*inodes = rtems_rfs_fs_inodes (fs);
return 0;
}
141370: 31 c0 xor %eax,%eax <== NOT EXECUTED
141372: 5b pop %ebx <== NOT EXECUTED
141373: 5e pop %esi <== NOT EXECUTED
141374: 5f pop %edi <== NOT EXECUTED
141375: c9 leave <== NOT EXECUTED
141376: c3 ret <== NOT EXECUTED
00141c40 <rtems_rfs_inode_alloc>:
int
rtems_rfs_inode_alloc (rtems_rfs_file_system* fs,
rtems_rfs_bitmap_bit goal,
rtems_rfs_ino* ino)
{
141c40: 55 push %ebp <== NOT EXECUTED
141c41: 89 e5 mov %esp,%ebp <== NOT EXECUTED
141c43: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_group_bitmap_alloc (fs, goal, true, &bit);
141c46: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
141c49: 50 push %eax <== NOT EXECUTED
141c4a: 6a 01 push $0x1 <== NOT EXECUTED
141c4c: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
141c4f: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141c52: e8 f9 f7 ff ff call 141450 <rtems_rfs_group_bitmap_alloc><== NOT EXECUTED
*ino = bit;
141c57: 8b 4d f4 mov -0xc(%ebp),%ecx <== NOT EXECUTED
141c5a: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
141c5d: 89 0a mov %ecx,(%edx) <== NOT EXECUTED
return rc;
}
141c5f: c9 leave <== NOT EXECUTED
141c60: c3 ret <== NOT EXECUTED
00141a70 <rtems_rfs_inode_close>:
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
141a70: 55 push %ebp <== NOT EXECUTED
141a71: 89 e5 mov %esp,%ebp <== NOT EXECUTED
141a73: 53 push %ebx <== NOT EXECUTED
141a74: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141a77: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
rc = rtems_rfs_inode_unload (fs, handle, true);
141a7a: 6a 01 push $0x1 <== NOT EXECUTED
141a7c: 53 push %ebx <== NOT EXECUTED
141a7d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141a80: e8 53 ff ff ff call 1419d8 <rtems_rfs_inode_unload><== NOT EXECUTED
if ((rc == 0) && (handle->loads > 0))
141a85: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141a88: 85 c0 test %eax,%eax <== NOT EXECUTED
141a8a: 75 09 jne 141a95 <rtems_rfs_inode_close+0x25><== NOT EXECUTED
141a8c: 8b 53 24 mov 0x24(%ebx),%edx <== NOT EXECUTED
141a8f: 85 d2 test %edx,%edx <== NOT EXECUTED
141a91: 7e 02 jle 141a95 <rtems_rfs_inode_close+0x25><== NOT EXECUTED
141a93: b0 05 mov $0x5,%al <== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
handle->loads);
rc = EIO;
}
handle->ino = 0;
141a95: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED
return rc;
}
141a9c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
141a9f: c9 leave <== NOT EXECUTED
141aa0: c3 ret <== NOT EXECUTED
00141c64 <rtems_rfs_inode_create>:
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
141c64: 55 push %ebp <== NOT EXECUTED
141c65: 89 e5 mov %esp,%ebp <== NOT EXECUTED
141c67: 57 push %edi <== NOT EXECUTED
141c68: 56 push %esi <== NOT EXECUTED
141c69: 53 push %ebx <== NOT EXECUTED
141c6a: 83 ec 6c sub $0x6c,%esp <== NOT EXECUTED
141c6d: 8b 75 1c mov 0x1c(%ebp),%esi <== NOT EXECUTED
141c70: 8b 7d 20 mov 0x20(%ebp),%edi <== NOT EXECUTED
141c73: 8b 55 24 mov 0x24(%ebp),%edx <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
141c76: 0f b7 45 18 movzwl 0x18(%ebp),%eax <== NOT EXECUTED
141c7a: 89 45 94 mov %eax,-0x6c(%ebp) <== NOT EXECUTED
141c7d: 89 c1 mov %eax,%ecx <== NOT EXECUTED
141c7f: 81 e1 00 f0 00 00 and $0xf000,%ecx <== NOT EXECUTED
141c85: 81 f9 00 60 00 00 cmp $0x6000,%ecx <== NOT EXECUTED
141c8b: 74 33 je 141cc0 <rtems_rfs_inode_create+0x5c><== NOT EXECUTED
141c8d: 7e 21 jle 141cb0 <rtems_rfs_inode_create+0x4c><== NOT EXECUTED
141c8f: 81 f9 00 80 00 00 cmp $0x8000,%ecx <== NOT EXECUTED
141c95: 74 29 je 141cc0 <rtems_rfs_inode_create+0x5c><== NOT EXECUTED
141c97: 81 f9 00 a0 00 00 cmp $0xa000,%ecx <== NOT EXECUTED
141c9d: 74 21 je 141cc0 <rtems_rfs_inode_create+0x5c><== NOT EXECUTED
141c9f: bb 16 00 00 00 mov $0x16,%ebx <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
}
141ca4: 89 d8 mov %ebx,%eax <== NOT EXECUTED
141ca6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
141ca9: 5b pop %ebx <== NOT EXECUTED
141caa: 5e pop %esi <== NOT EXECUTED
141cab: 5f pop %edi <== NOT EXECUTED
141cac: c9 leave <== NOT EXECUTED
141cad: c3 ret <== NOT EXECUTED
141cae: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
141cb0: 81 f9 00 20 00 00 cmp $0x2000,%ecx <== NOT EXECUTED
141cb6: 74 08 je 141cc0 <rtems_rfs_inode_create+0x5c><== NOT EXECUTED
141cb8: 81 f9 00 40 00 00 cmp $0x4000,%ecx <== NOT EXECUTED
141cbe: 75 df jne 141c9f <rtems_rfs_inode_create+0x3b><== NOT EXECUTED
break;
default:
return EINVAL;
}
rc = rtems_rfs_inode_alloc (fs, parent, ino);
141cc0: 50 push %eax <== NOT EXECUTED
141cc1: ff 75 28 pushl 0x28(%ebp) <== NOT EXECUTED
141cc4: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
141cc7: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141cca: 89 55 8c mov %edx,-0x74(%ebp) <== NOT EXECUTED
141ccd: 89 4d 90 mov %ecx,-0x70(%ebp) <== NOT EXECUTED
141cd0: e8 6b ff ff ff call 141c40 <rtems_rfs_inode_alloc> <== NOT EXECUTED
141cd5: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
141cd7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141cda: 85 c0 test %eax,%eax <== NOT EXECUTED
141cdc: 7f c6 jg 141ca4 <rtems_rfs_inode_create+0x40><== NOT EXECUTED
return rc;
rc = rtems_rfs_inode_open (fs, *ino, &inode, true);
141cde: 6a 01 push $0x1 <== NOT EXECUTED
141ce0: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
141ce3: 50 push %eax <== NOT EXECUTED
141ce4: 8b 45 28 mov 0x28(%ebp),%eax <== NOT EXECUTED
141ce7: ff 30 pushl (%eax) <== NOT EXECUTED
141ce9: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141cec: e8 03 fe ff ff call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
141cf1: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
141cf3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141cf6: 85 c0 test %eax,%eax <== NOT EXECUTED
141cf8: 8b 55 8c mov -0x74(%ebp),%edx <== NOT EXECUTED
141cfb: 8b 4d 90 mov -0x70(%ebp),%ecx <== NOT EXECUTED
141cfe: 7e 18 jle 141d18 <rtems_rfs_inode_create+0xb4><== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_inode_free (fs, *ino);
141d00: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141d03: 8b 45 28 mov 0x28(%ebp),%eax <== NOT EXECUTED
141d06: ff 30 pushl (%eax) <== NOT EXECUTED
141d08: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141d0b: e8 80 fe ff ff call 141b90 <rtems_rfs_inode_free> <== NOT EXECUTED
return rc;
141d10: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141d13: eb 8f jmp 141ca4 <rtems_rfs_inode_create+0x40><== NOT EXECUTED
141d15: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
141d18: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
141d1b: 0f b7 d2 movzwl %dx,%edx <== NOT EXECUTED
141d1e: 52 push %edx <== NOT EXECUTED
141d1f: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED
141d22: 57 push %edi <== NOT EXECUTED
141d23: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED
141d26: 0f b7 f6 movzwl %si,%esi <== NOT EXECUTED
141d29: 56 push %esi <== NOT EXECUTED
141d2a: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
141d2d: 50 push %eax <== NOT EXECUTED
141d2e: 89 4d 90 mov %ecx,-0x70(%ebp) <== NOT EXECUTED
141d31: e8 62 fb ff ff call 141898 <rtems_rfs_inode_initialise><== NOT EXECUTED
141d36: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
141d38: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
141d3b: 85 c0 test %eax,%eax <== NOT EXECUTED
141d3d: 8b 4d 90 mov -0x70(%ebp),%ecx <== NOT EXECUTED
141d40: 7f 52 jg 141d94 <rtems_rfs_inode_create+0x130><== NOT EXECUTED
/*
* Only handle the specifics of a directory. Let caller handle the others.
*
* The inode delete will free the inode.
*/
if (RTEMS_RFS_S_ISDIR (mode))
141d42: 81 f9 00 40 00 00 cmp $0x4000,%ecx <== NOT EXECUTED
141d48: 0f 84 ca 00 00 00 je 141e18 <rtems_rfs_inode_create+0x1b4><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
141d4e: 6a 01 push $0x1 <== NOT EXECUTED
141d50: 8d 75 c0 lea -0x40(%ebp),%esi <== NOT EXECUTED
141d53: 56 push %esi <== NOT EXECUTED
141d54: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
141d57: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141d5a: 89 4d 90 mov %ecx,-0x70(%ebp) <== NOT EXECUTED
141d5d: e8 92 fd ff ff call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
141d62: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
141d64: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141d67: 85 c0 test %eax,%eax <== NOT EXECUTED
141d69: 8b 4d 90 mov -0x70(%ebp),%ecx <== NOT EXECUTED
141d6c: 7e 3c jle 141daa <rtems_rfs_inode_create+0x146><== NOT EXECUTED
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
141d6e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141d71: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
141d74: 50 push %eax <== NOT EXECUTED
141d75: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141d78: e8 2b fe ff ff call 141ba8 <rtems_rfs_inode_delete><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
141d7d: 5a pop %edx <== NOT EXECUTED
141d7e: 59 pop %ecx <== NOT EXECUTED
141d7f: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
141d82: 50 push %eax <== NOT EXECUTED
141d83: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141d86: e8 e5 fc ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
141d8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141d8e: e9 11 ff ff ff jmp 141ca4 <rtems_rfs_inode_create+0x40><== NOT EXECUTED
141d93: 90 nop <== NOT EXECUTED
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
141d94: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141d97: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
141d9a: 50 push %eax <== NOT EXECUTED
141d9b: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141d9e: e8 cd fc ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
141da3: 5e pop %esi <== NOT EXECUTED
141da4: 5f pop %edi <== NOT EXECUTED
141da5: e9 59 ff ff ff jmp 141d03 <rtems_rfs_inode_create+0x9f><== NOT EXECUTED
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
141daa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
141dad: 8b 45 28 mov 0x28(%ebp),%eax <== NOT EXECUTED
141db0: ff 30 pushl (%eax) <== NOT EXECUTED
141db2: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
141db5: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
141db8: 56 push %esi <== NOT EXECUTED
141db9: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141dbc: 89 4d 90 mov %ecx,-0x70(%ebp) <== NOT EXECUTED
141dbf: e8 14 cc ff ff call 13e9d8 <rtems_rfs_dir_add_entry><== NOT EXECUTED
141dc4: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
141dc6: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
141dc9: 85 c0 test %eax,%eax <== NOT EXECUTED
141dcb: 8b 4d 90 mov -0x70(%ebp),%ecx <== NOT EXECUTED
141dce: 7f 7f jg 141e4f <rtems_rfs_inode_create+0x1eb><== NOT EXECUTED
/*
* If the node is a directory update the parent link count as the
* new directory has the '..' link that points to the parent.
*/
if (RTEMS_RFS_S_ISDIR (mode))
141dd0: 81 f9 00 40 00 00 cmp $0x4000,%ecx <== NOT EXECUTED
141dd6: 0f 84 c6 00 00 00 je 141ea2 <rtems_rfs_inode_create+0x23e><== NOT EXECUTED
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
141ddc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141ddf: 56 push %esi <== NOT EXECUTED
141de0: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141de3: e8 88 fc ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
141de8: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
141dea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141ded: 85 c0 test %eax,%eax <== NOT EXECUTED
141def: 0f 8f 79 ff ff ff jg 141d6e <rtems_rfs_inode_create+0x10a><== NOT EXECUTED
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &inode);
141df5: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141df8: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
141dfb: 50 push %eax <== NOT EXECUTED
141dfc: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141dff: e8 6c fc ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
141e04: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
141e06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141e09: 85 c0 test %eax,%eax <== NOT EXECUTED
141e0b: 0f 8f ef fe ff ff jg 141d00 <rtems_rfs_inode_create+0x9c><== NOT EXECUTED
141e11: 31 db xor %ebx,%ebx <== NOT EXECUTED
141e13: e9 8c fe ff ff jmp 141ca4 <rtems_rfs_inode_create+0x40><== NOT EXECUTED
*
* The inode delete will free the inode.
*/
if (RTEMS_RFS_S_ISDIR (mode))
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
141e18: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
141e1b: 8b 45 28 mov 0x28(%ebp),%eax <== NOT EXECUTED
141e1e: ff 30 pushl (%eax) <== NOT EXECUTED
141e20: 6a 01 push $0x1 <== NOT EXECUTED
141e22: 68 18 1c 16 00 push $0x161c18 <== NOT EXECUTED
141e27: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
141e2a: 50 push %eax <== NOT EXECUTED
141e2b: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141e2e: 89 4d 90 mov %ecx,-0x70(%ebp) <== NOT EXECUTED
141e31: e8 a2 cb ff ff call 13e9d8 <rtems_rfs_dir_add_entry><== NOT EXECUTED
141e36: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc == 0)
141e38: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
141e3b: 85 c0 test %eax,%eax <== NOT EXECUTED
141e3d: 8b 4d 90 mov -0x70(%ebp),%ecx <== NOT EXECUTED
141e40: 74 3d je 141e7f <rtems_rfs_inode_create+0x21b><== NOT EXECUTED
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
if (rc > 0)
141e42: 85 db test %ebx,%ebx <== NOT EXECUTED
141e44: 0f 8e 04 ff ff ff jle 141d4e <rtems_rfs_inode_create+0xea><== NOT EXECUTED
141e4a: e9 1f ff ff ff jmp 141d6e <rtems_rfs_inode_create+0x10a><== NOT EXECUTED
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
141e4f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141e52: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
141e55: 50 push %eax <== NOT EXECUTED
141e56: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141e59: e8 4a fd ff ff call 141ba8 <rtems_rfs_inode_delete><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
141e5e: 5a pop %edx <== NOT EXECUTED
141e5f: 59 pop %ecx <== NOT EXECUTED
141e60: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
141e63: 50 push %eax <== NOT EXECUTED
141e64: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141e67: e8 04 fc ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
141e6c: 5f pop %edi <== NOT EXECUTED
141e6d: 58 pop %eax <== NOT EXECUTED
141e6e: 56 push %esi <== NOT EXECUTED
141e6f: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141e72: e8 f9 fb ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
141e77: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141e7a: e9 25 fe ff ff jmp 141ca4 <rtems_rfs_inode_create+0x40><== NOT EXECUTED
*/
if (RTEMS_RFS_S_ISDIR (mode))
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
if (rc == 0)
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
141e7f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
141e82: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
141e85: 6a 02 push $0x2 <== NOT EXECUTED
141e87: 68 03 33 16 00 push $0x163303 <== NOT EXECUTED
141e8c: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
141e8f: 50 push %eax <== NOT EXECUTED
141e90: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141e93: e8 40 cb ff ff call 13e9d8 <rtems_rfs_dir_add_entry><== NOT EXECUTED
141e98: 89 c3 mov %eax,%ebx <== NOT EXECUTED
141e9a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
141e9d: 8b 4d 90 mov -0x70(%ebp),%ecx <== NOT EXECUTED
141ea0: eb a0 jmp 141e42 <rtems_rfs_inode_create+0x1de><== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
141ea2: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
141ea5: 0f b6 11 movzbl (%ecx),%edx <== NOT EXECUTED
141ea8: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
141eab: 0f b6 41 01 movzbl 0x1(%ecx),%eax <== NOT EXECUTED
141eaf: 09 d0 or %edx,%eax <== NOT EXECUTED
if (links == 0xffff)
141eb1: 66 83 f8 ff cmp $0xffffffff,%ax <== NOT EXECUTED
141eb5: 74 18 je 141ecf <rtems_rfs_inode_create+0x26b><== NOT EXECUTED
141eb7: 40 inc %eax <== NOT EXECUTED
141eb8: 89 c2 mov %eax,%edx <== NOT EXECUTED
141eba: 66 c1 ea 08 shr $0x8,%dx <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
141ebe: 88 11 mov %dl,(%ecx) <== NOT EXECUTED
141ec0: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
141ec3: 88 42 01 mov %al,0x1(%edx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
141ec6: c6 45 d0 01 movb $0x1,-0x30(%ebp) <== NOT EXECUTED
141eca: e9 0d ff ff ff jmp 141ddc <rtems_rfs_inode_create+0x178><== NOT EXECUTED
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
141ecf: b0 01 mov $0x1,%al <== NOT EXECUTED
141ed1: 31 d2 xor %edx,%edx <== NOT EXECUTED
141ed3: eb e9 jmp 141ebe <rtems_rfs_inode_create+0x25a><== NOT EXECUTED
00141ba8 <rtems_rfs_inode_delete>:
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
141ba8: 55 push %ebp <== NOT EXECUTED
141ba9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
141bab: 57 push %edi <== NOT EXECUTED
141bac: 56 push %esi <== NOT EXECUTED
141bad: 53 push %ebx <== NOT EXECUTED
141bae: 83 ec 5c sub $0x5c,%esp <== NOT EXECUTED
141bb1: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
141bb4: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
printf("rtems-rfs: inode-delete: ino:%" PRIu32 " loaded:%s\n",
rtems_rfs_inode_ino (handle),
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
141bb7: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
141bba: 85 c0 test %eax,%eax <== NOT EXECUTED
141bbc: 74 1e je 141bdc <rtems_rfs_inode_delete+0x34><== NOT EXECUTED
rtems_rfs_block_map map;
/*
* Free the ino number.
*/
rc = rtems_rfs_inode_free (fs, handle->ino);
141bbe: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141bc1: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
141bc4: 56 push %esi <== NOT EXECUTED
141bc5: e8 c6 ff ff ff call 141b90 <rtems_rfs_inode_free> <== NOT EXECUTED
if (rc > 0)
141bca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141bcd: 85 c0 test %eax,%eax <== NOT EXECUTED
141bcf: 7e 17 jle 141be8 <rtems_rfs_inode_delete+0x40><== NOT EXECUTED
handle->loads = 0;
handle->node = NULL;
}
}
return rc;
}
141bd1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
141bd4: 5b pop %ebx <== NOT EXECUTED
141bd5: 5e pop %esi <== NOT EXECUTED
141bd6: 5f pop %edi <== NOT EXECUTED
141bd7: c9 leave <== NOT EXECUTED
141bd8: c3 ret <== NOT EXECUTED
141bd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
printf("rtems-rfs: inode-delete: ino:%" PRIu32 " loaded:%s\n",
rtems_rfs_inode_ino (handle),
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
141bdc: 31 c0 xor %eax,%eax <== NOT EXECUTED
handle->loads = 0;
handle->node = NULL;
}
}
return rc;
}
141bde: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
141be1: 5b pop %ebx <== NOT EXECUTED
141be2: 5e pop %esi <== NOT EXECUTED
141be3: 5f pop %edi <== NOT EXECUTED
141be4: c9 leave <== NOT EXECUTED
141be5: c3 ret <== NOT EXECUTED
141be6: 66 90 xchg %ax,%ax <== NOT EXECUTED
return rc;
/*
* Free the blocks the inode may have attached.
*/
rc = rtems_rfs_block_map_open (fs, handle, &map);
141be8: 57 push %edi <== NOT EXECUTED
141be9: 8d 7d 98 lea -0x68(%ebp),%edi <== NOT EXECUTED
141bec: 57 push %edi <== NOT EXECUTED
141bed: 53 push %ebx <== NOT EXECUTED
141bee: 56 push %esi <== NOT EXECUTED
141bef: e8 e8 c0 ff ff call 13dcdc <rtems_rfs_block_map_open><== NOT EXECUTED
if (rc == 0)
141bf4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141bf7: 85 c0 test %eax,%eax <== NOT EXECUTED
141bf9: 75 d6 jne 141bd1 <rtems_rfs_inode_delete+0x29><== NOT EXECUTED
{
int rrc;
rrc = rtems_rfs_block_map_free_all (fs, &map);
141bfb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141bfe: 57 push %edi <== NOT EXECUTED
141bff: 56 push %esi <== NOT EXECUTED
141c00: e8 ff ba ff ff call 13d704 <rtems_rfs_block_map_free_all><== NOT EXECUTED
rc = rtems_rfs_block_map_close (fs, &map);
141c05: 5a pop %edx <== NOT EXECUTED
141c06: 59 pop %ecx <== NOT EXECUTED
141c07: 57 push %edi <== NOT EXECUTED
141c08: 56 push %esi <== NOT EXECUTED
141c09: e8 22 bf ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
if (rc > 0)
rrc = rc;
memset (handle->node, 0xff, RTEMS_RFS_INODE_SIZE);
141c0e: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
141c11: b9 38 00 00 00 mov $0x38,%ecx <== NOT EXECUTED
141c16: b0 ff mov $0xff,%al <== NOT EXECUTED
141c18: 89 d7 mov %edx,%edi <== NOT EXECUTED
141c1a: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
141c1c: c6 43 10 01 movb $0x1,0x10(%ebx) <== NOT EXECUTED
/*
* Do the release here to avoid the ctime field being set on a
* close. Also if there loads is greater then one then other loads
* active. Forcing the loads count to 0.
*/
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
141c20: 5f pop %edi <== NOT EXECUTED
141c21: 58 pop %eax <== NOT EXECUTED
141c22: 8d 43 10 lea 0x10(%ebx),%eax <== NOT EXECUTED
141c25: 50 push %eax <== NOT EXECUTED
141c26: 56 push %esi <== NOT EXECUTED
141c27: e8 fc c3 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->loads = 0;
141c2c: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED
handle->node = NULL;
141c33: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) <== NOT EXECUTED
141c3a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141c3d: eb 92 jmp 141bd1 <rtems_rfs_inode_delete+0x29><== NOT EXECUTED
00141b90 <rtems_rfs_inode_free>:
}
int
rtems_rfs_inode_free (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
141b90: 55 push %ebp <== NOT EXECUTED
141b91: 89 e5 mov %esp,%ebp <== NOT EXECUTED
141b93: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
bit = ino;
return rtems_rfs_group_bitmap_free (fs, true, bit);
141b96: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
141b99: 6a 01 push $0x1 <== NOT EXECUTED
141b9b: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141b9e: e8 51 f8 ff ff call 1413f4 <rtems_rfs_group_bitmap_free><== NOT EXECUTED
}
141ba3: c9 leave <== NOT EXECUTED
141ba4: c3 ret <== NOT EXECUTED
0014178c <rtems_rfs_inode_get_size>:
}
rtems_rfs_pos
rtems_rfs_inode_get_size (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
14178c: 55 push %ebp <== NOT EXECUTED
14178d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14178f: 53 push %ebx <== NOT EXECUTED
141790: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
141793: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
141796: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
141799: 8d 4a 0c lea 0xc(%edx),%ecx <== NOT EXECUTED
rtems_rfs_block_size size;
size.count = rtems_rfs_inode_get_block_count (handle);
14179c: 0f b6 41 03 movzbl 0x3(%ecx),%eax <== NOT EXECUTED
1417a0: 0f b6 5a 0c movzbl 0xc(%edx),%ebx <== NOT EXECUTED
1417a4: c1 e3 18 shl $0x18,%ebx <== NOT EXECUTED
1417a7: 09 d8 or %ebx,%eax <== NOT EXECUTED
1417a9: 0f b6 59 01 movzbl 0x1(%ecx),%ebx <== NOT EXECUTED
1417ad: c1 e3 10 shl $0x10,%ebx <== NOT EXECUTED
1417b0: 09 d8 or %ebx,%eax <== NOT EXECUTED
1417b2: 0f b6 49 02 movzbl 0x2(%ecx),%ecx <== NOT EXECUTED
1417b6: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
1417b9: 09 c8 or %ecx,%eax <== NOT EXECUTED
1417bb: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
size.offset = rtems_rfs_inode_get_block_offset (handle);
1417be: 0f b6 4a 0a movzbl 0xa(%edx),%ecx <== NOT EXECUTED
1417c2: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
1417c5: 0f b6 42 0b movzbl 0xb(%edx),%eax <== NOT EXECUTED
1417c9: 09 c8 or %ecx,%eax <== NOT EXECUTED
1417cb: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED
1417ce: 89 45 f4 mov %eax,-0xc(%ebp) <== NOT EXECUTED
return rtems_rfs_block_get_size (fs, &size);
1417d1: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
1417d4: 50 push %eax <== NOT EXECUTED
1417d5: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
1417d8: e8 7f b9 ff ff call 13d15c <rtems_rfs_block_get_size><== NOT EXECUTED
}
1417dd: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1417e0: c9 leave <== NOT EXECUTED
1417e1: c3 ret <== NOT EXECUTED
00141898 <rtems_rfs_inode_initialise>:
rtems_rfs_inode_initialise (rtems_rfs_inode_handle* handle,
uint16_t links,
uint16_t mode,
uid_t uid,
gid_t gid)
{
141898: 55 push %ebp <== NOT EXECUTED
141899: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14189b: 57 push %edi <== NOT EXECUTED
14189c: 56 push %esi <== NOT EXECUTED
14189d: 53 push %ebx <== NOT EXECUTED
14189e: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
1418a1: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
1418a4: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
1418a7: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
1418aa: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
1418ad: 66 89 55 e6 mov %dx,-0x1a(%ebp) <== NOT EXECUTED
1418b1: 8b 75 18 mov 0x18(%ebp),%esi <== NOT EXECUTED
1418b4: 66 89 75 c8 mov %si,-0x38(%ebp) <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
1418b8: 89 df mov %ebx,%edi <== NOT EXECUTED
1418ba: 66 c1 ef 08 shr $0x8,%di <== NOT EXECUTED
1418be: 89 fa mov %edi,%edx <== NOT EXECUTED
1418c0: 8b 70 0c mov 0xc(%eax),%esi <== NOT EXECUTED
1418c3: 88 16 mov %dl,(%esi) <== NOT EXECUTED
1418c5: 8b 78 0c mov 0xc(%eax),%edi <== NOT EXECUTED
1418c8: 88 5f 01 mov %bl,0x1(%edi) <== NOT EXECUTED
* @prarm flags The flags.
*/
static inline void
rtems_rfs_inode_set_flags (rtems_rfs_inode_handle* handle, uint16_t flags)
{
rtems_rfs_write_u16 (&handle->node->flags, flags);
1418cb: 8b 58 0c mov 0xc(%eax),%ebx <== NOT EXECUTED
1418ce: c6 43 08 00 movb $0x0,0x8(%ebx) <== NOT EXECUTED
1418d2: 8b 58 0c mov 0xc(%eax),%ebx <== NOT EXECUTED
1418d5: c6 43 09 00 movb $0x0,0x9(%ebx) <== NOT EXECUTED
* @prarm mode The mode.
*/
static inline void
rtems_rfs_inode_set_mode (rtems_rfs_inode_handle* handle, uint16_t mode)
{
rtems_rfs_write_u16 (&handle->node->mode, mode);
1418d9: 8b 58 0c mov 0xc(%eax),%ebx <== NOT EXECUTED
1418dc: 89 cf mov %ecx,%edi <== NOT EXECUTED
1418de: 66 c1 ef 08 shr $0x8,%di <== NOT EXECUTED
1418e2: 89 fa mov %edi,%edx <== NOT EXECUTED
1418e4: 88 53 02 mov %dl,0x2(%ebx) <== NOT EXECUTED
1418e7: 8b 58 0c mov 0xc(%eax),%ebx <== NOT EXECUTED
1418ea: 88 4b 03 mov %cl,0x3(%ebx) <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_uid_gid (rtems_rfs_inode_handle* handle,
uint16_t uid, uint16_t gid)
{
rtems_rfs_write_u32 (&handle->node->owner, (((uint32_t) gid) << 16) | uid);
1418ed: 8b 75 c8 mov -0x38(%ebp),%esi <== NOT EXECUTED
1418f0: c1 e6 10 shl $0x10,%esi <== NOT EXECUTED
1418f3: 0f b7 4d e6 movzwl -0x1a(%ebp),%ecx <== NOT EXECUTED
1418f7: 09 ce or %ecx,%esi <== NOT EXECUTED
1418f9: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
1418fc: 89 f3 mov %esi,%ebx <== NOT EXECUTED
1418fe: c1 eb 18 shr $0x18,%ebx <== NOT EXECUTED
141901: 88 59 04 mov %bl,0x4(%ecx) <== NOT EXECUTED
141904: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
141907: 89 f3 mov %esi,%ebx <== NOT EXECUTED
141909: c1 eb 10 shr $0x10,%ebx <== NOT EXECUTED
14190c: 88 59 05 mov %bl,0x5(%ecx) <== NOT EXECUTED
14190f: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
141912: c1 ee 08 shr $0x8,%esi <== NOT EXECUTED
141915: 89 f2 mov %esi,%edx <== NOT EXECUTED
141917: 88 51 06 mov %dl,0x6(%ecx) <== NOT EXECUTED
14191a: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
14191d: 8a 55 e6 mov -0x1a(%ebp),%dl <== NOT EXECUTED
141920: 88 51 07 mov %dl,0x7(%ecx) <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
141923: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
141926: c6 42 0a 00 movb $0x0,0xa(%edx) <== NOT EXECUTED
14192a: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
14192d: c6 42 0b 00 movb $0x0,0xb(%edx) <== NOT EXECUTED
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
141931: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
141934: c6 42 0c 00 movb $0x0,0xc(%edx) <== NOT EXECUTED
141938: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
14193b: c6 42 0d 00 movb $0x0,0xd(%edx) <== NOT EXECUTED
14193f: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
141942: c6 42 0e 00 movb $0x0,0xe(%edx) <== NOT EXECUTED
141946: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
141949: c6 42 0f 00 movb $0x0,0xf(%edx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
14194d: c6 40 10 01 movb $0x1,0x10(%eax) <== NOT EXECUTED
141951: 31 d2 xor %edx,%edx <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
141953: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
141956: c6 44 11 1c 00 movb $0x0,0x1c(%ecx,%edx,1) <== NOT EXECUTED
14195b: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
14195e: c6 44 11 1d 00 movb $0x0,0x1d(%ecx,%edx,1) <== NOT EXECUTED
141963: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
141966: c6 44 11 1e 00 movb $0x0,0x1e(%ecx,%edx,1) <== NOT EXECUTED
14196b: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
14196e: c6 44 11 1f 00 movb $0x0,0x1f(%ecx,%edx,1) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
141973: c6 40 10 01 movb $0x1,0x10(%eax) <== NOT EXECUTED
141977: 83 c2 04 add $0x4,%edx <== NOT EXECUTED
rtems_rfs_inode_set_flags (handle, 0);
rtems_rfs_inode_set_mode (handle, mode);
rtems_rfs_inode_set_uid_gid (handle, uid, gid);
rtems_rfs_inode_set_block_offset (handle, 0);
rtems_rfs_inode_set_block_count (handle, 0);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
14197a: 83 fa 14 cmp $0x14,%edx <== NOT EXECUTED
14197d: 75 d4 jne 141953 <rtems_rfs_inode_initialise+0xbb><== NOT EXECUTED
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
14197f: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
141982: c6 42 30 00 movb $0x0,0x30(%edx) <== NOT EXECUTED
141986: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
141989: c6 42 31 00 movb $0x0,0x31(%edx) <== NOT EXECUTED
14198d: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
141990: c6 42 32 00 movb $0x0,0x32(%edx) <== NOT EXECUTED
141994: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
141997: c6 42 33 00 movb $0x0,0x33(%edx) <== NOT EXECUTED
* @param block_count The last data block number.
*/
static inline void
rtems_rfs_inode_set_last_data_block (rtems_rfs_inode_handle* handle, uint32_t last_data_block)
{
rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block);
14199b: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
14199e: c6 42 34 00 movb $0x0,0x34(%edx) <== NOT EXECUTED
1419a2: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
1419a5: c6 42 35 00 movb $0x0,0x35(%edx) <== NOT EXECUTED
1419a9: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
1419ac: c6 42 36 00 movb $0x0,0x36(%edx) <== NOT EXECUTED
1419b0: 8b 50 0c mov 0xc(%eax),%edx <== NOT EXECUTED
1419b3: c6 42 37 00 movb $0x0,0x37(%edx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
1419b7: c6 40 10 01 movb $0x1,0x10(%eax) <== NOT EXECUTED
rtems_rfs_inode_set_block (handle, b, 0);
rtems_rfs_inode_set_last_map_block (handle, 0);
rtems_rfs_inode_set_last_data_block (handle, 0);
return rtems_rfs_inode_time_stamp_now (handle, true, true);
1419bb: c7 45 10 01 00 00 00 movl $0x1,0x10(%ebp) <== NOT EXECUTED
1419c2: c7 45 0c 01 00 00 00 movl $0x1,0xc(%ebp) <== NOT EXECUTED
1419c9: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
1419cc: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
1419cf: 5b pop %ebx <== NOT EXECUTED
1419d0: 5e pop %esi <== NOT EXECUTED
1419d1: 5f pop %edi <== NOT EXECUTED
1419d2: c9 leave <== NOT EXECUTED
rtems_rfs_inode_set_block_count (handle, 0);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (handle, b, 0);
rtems_rfs_inode_set_last_map_block (handle, 0);
rtems_rfs_inode_set_last_data_block (handle, 0);
return rtems_rfs_inode_time_stamp_now (handle, true, true);
1419d3: e9 0c fe ff ff jmp 1417e4 <rtems_rfs_inode_time_stamp_now><== NOT EXECUTED
00141aa4 <rtems_rfs_inode_load>:
int
rtems_rfs_inode_load (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
141aa4: 55 push %ebp <== NOT EXECUTED
141aa5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
141aa7: 53 push %ebx <== NOT EXECUTED
141aa8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
141aab: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
/*
* An inode does not move so once loaded no need to do again.
*/
if (!rtems_rfs_inode_is_loaded (handle))
141aae: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED
141ab1: 85 c9 test %ecx,%ecx <== NOT EXECUTED
141ab3: 74 0b je 141ac0 <rtems_rfs_inode_load+0x1c><== NOT EXECUTED
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
}
handle->loads++;
141ab5: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED
141ab8: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
}
141aba: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
141abd: c9 leave <== NOT EXECUTED
141abe: c3 ret <== NOT EXECUTED
141abf: 90 nop <== NOT EXECUTED
if (!rtems_rfs_inode_is_loaded (handle))
{
int rc;
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
141ac0: 6a 01 push $0x1 <== NOT EXECUTED
141ac2: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED
141ac5: 8d 43 10 lea 0x10(%ebx),%eax <== NOT EXECUTED
141ac8: 50 push %eax <== NOT EXECUTED
141ac9: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141acc: e8 5b c6 ff ff call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
handle->block, true);
if (rc > 0)
141ad1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141ad4: 85 c0 test %eax,%eax <== NOT EXECUTED
141ad6: 7f e2 jg 141aba <rtems_rfs_inode_load+0x16><== NOT EXECUTED
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
141ad8: 8b 4b 18 mov 0x18(%ebx),%ecx <== NOT EXECUTED
handle->node += handle->offset;
141adb: 8b 53 20 mov 0x20(%ebx),%edx <== NOT EXECUTED
141ade: c1 e2 03 shl $0x3,%edx <== NOT EXECUTED
141ae1: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax <== NOT EXECUTED
141ae8: 29 d0 sub %edx,%eax <== NOT EXECUTED
141aea: 03 41 20 add 0x20(%ecx),%eax <== NOT EXECUTED
141aed: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
141af0: eb c3 jmp 141ab5 <rtems_rfs_inode_load+0x11><== NOT EXECUTED
00141af4 <rtems_rfs_inode_open>:
int
rtems_rfs_inode_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
rtems_rfs_inode_handle* handle,
bool load)
{
141af4: 55 push %ebp <== NOT EXECUTED
141af5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
141af7: 56 push %esi <== NOT EXECUTED
141af8: 53 push %ebx <== NOT EXECUTED
141af9: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
141afc: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
141aff: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
141b02: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
141b05: 8a 45 14 mov 0x14(%ebp),%al <== NOT EXECUTED
141b08: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
if (ino == RTEMS_RFS_EMPTY_INO)
141b0b: 85 d2 test %edx,%edx <== NOT EXECUTED
141b0d: 74 61 je 141b70 <rtems_rfs_inode_open+0x7c><== NOT EXECUTED
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
141b0f: 8d 42 ff lea -0x1(%edx),%eax <== NOT EXECUTED
141b12: 3b 43 10 cmp 0x10(%ebx),%eax <== NOT EXECUTED
141b15: 77 59 ja 141b70 <rtems_rfs_inode_open+0x7c><== NOT EXECUTED
return EINVAL;
handle->ino = ino;
141b17: 89 51 08 mov %edx,0x8(%ecx) <== NOT EXECUTED
handle->node = NULL;
141b1a: c7 41 0c 00 00 00 00 movl $0x0,0xc(%ecx) <== NOT EXECUTED
handle->loads = 0;
141b21: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx) <== NOT EXECUTED
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
141b28: 31 d2 xor %edx,%edx <== NOT EXECUTED
141b2a: f7 73 28 divl 0x28(%ebx) <== NOT EXECUTED
141b2d: 89 c6 mov %eax,%esi <== NOT EXECUTED
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
141b2f: 89 d0 mov %edx,%eax <== NOT EXECUTED
141b31: 31 d2 xor %edx,%edx <== NOT EXECUTED
141b33: f7 73 2c divl 0x2c(%ebx) <== NOT EXECUTED
141b36: 89 51 20 mov %edx,0x20(%ecx) <== NOT EXECUTED
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
141b39: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
141b3c: 8d 34 b6 lea (%esi,%esi,4),%esi <== NOT EXECUTED
141b3f: c1 e6 04 shl $0x4,%esi <== NOT EXECUTED
141b42: 8b 14 16 mov (%esi,%edx,1),%edx <== NOT EXECUTED
141b45: 8d 44 10 02 lea 0x2(%eax,%edx,1),%eax <== NOT EXECUTED
141b49: 89 41 1c mov %eax,0x1c(%ecx) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
141b4c: c6 41 10 00 movb $0x0,0x10(%ecx) <== NOT EXECUTED
handle->bnum = 0;
141b50: c7 41 14 00 00 00 00 movl $0x0,0x14(%ecx) <== NOT EXECUTED
handle->buffer = NULL;
141b57: c7 41 18 00 00 00 00 movl $0x0,0x18(%ecx) <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
141b5e: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) <== NOT EXECUTED
141b62: 75 18 jne 141b7c <rtems_rfs_inode_open+0x88><== NOT EXECUTED
141b64: 31 c0 xor %eax,%eax <== NOT EXECUTED
rc = rtems_rfs_inode_load (fs, handle);
return rc;
}
141b66: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141b69: 5b pop %ebx <== NOT EXECUTED
141b6a: 5e pop %esi <== NOT EXECUTED
141b6b: c9 leave <== NOT EXECUTED
141b6c: c3 ret <== NOT EXECUTED
141b6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
rc = rtems_rfs_inode_load (fs, handle);
141b70: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
return rc;
}
141b75: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141b78: 5b pop %ebx <== NOT EXECUTED
141b79: 5e pop %esi <== NOT EXECUTED
141b7a: c9 leave <== NOT EXECUTED
141b7b: c3 ret <== NOT EXECUTED
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
rc = rtems_rfs_inode_load (fs, handle);
141b7c: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED
141b7f: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
return rc;
}
141b82: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141b85: 5b pop %ebx <== NOT EXECUTED
141b86: 5e pop %esi <== NOT EXECUTED
141b87: c9 leave <== NOT EXECUTED
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
rc = rtems_rfs_inode_load (fs, handle);
141b88: e9 17 ff ff ff jmp 141aa4 <rtems_rfs_inode_load> <== NOT EXECUTED
00140374 <rtems_rfs_inode_overhead>:
/**
* Return the inode overhead given a number of inodes.
*/
static int
rtems_rfs_inode_overhead (rtems_rfs_file_system* fs)
{
140374: 55 push %ebp <== NOT EXECUTED
140375: 89 e5 mov %esp,%ebp <== NOT EXECUTED
140377: 53 push %ebx <== NOT EXECUTED
140378: 89 c1 mov %eax,%ecx <== NOT EXECUTED
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
14037a: 8b 58 08 mov 0x8(%eax),%ebx <== NOT EXECUTED
14037d: 8b 50 28 mov 0x28(%eax),%edx <== NOT EXECUTED
140380: c1 e2 03 shl $0x3,%edx <== NOT EXECUTED
140383: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
14038a: 29 d0 sub %edx,%eax <== NOT EXECUTED
14038c: 75 1e jne 1403ac <rtems_rfs_inode_overhead+0x38><== NOT EXECUTED
14038e: b8 d0 07 00 00 mov $0x7d0,%eax <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
140393: 8d 14 dd 00 00 00 00 lea 0x0(,%ebx,8),%edx <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
14039a: 8b 59 04 mov 0x4(%ecx),%ebx <== NOT EXECUTED
14039d: 4b dec %ebx <== NOT EXECUTED
14039e: 39 d3 cmp %edx,%ebx <== NOT EXECUTED
1403a0: 72 02 jb 1403a4 <rtems_rfs_inode_overhead+0x30><== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
1403a2: 89 d3 mov %edx,%ebx <== NOT EXECUTED
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
1403a4: 99 cltd <== NOT EXECUTED
1403a5: f7 fb idiv %ebx <== NOT EXECUTED
return ((blocks + 1) * 100 * 10) / bits_per_block;
}
1403a7: 5b pop %ebx <== NOT EXECUTED
1403a8: c9 leave <== NOT EXECUTED
1403a9: c3 ret <== NOT EXECUTED
1403aa: 66 90 xchg %ax,%ax <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
1403ac: 48 dec %eax <== NOT EXECUTED
1403ad: 31 d2 xor %edx,%edx <== NOT EXECUTED
1403af: f7 f3 div %ebx <== NOT EXECUTED
1403b1: 8d 44 80 0a lea 0xa(%eax,%eax,4),%eax <== NOT EXECUTED
1403b5: 8d 04 80 lea (%eax,%eax,4),%eax <== NOT EXECUTED
1403b8: 8d 04 80 lea (%eax,%eax,4),%eax <== NOT EXECUTED
1403bb: c1 e0 03 shl $0x3,%eax <== NOT EXECUTED
1403be: eb d3 jmp 140393 <rtems_rfs_inode_overhead+0x1f><== NOT EXECUTED
001417e4 <rtems_rfs_inode_time_stamp_now>:
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
1417e4: 55 push %ebp <== NOT EXECUTED
1417e5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1417e7: 57 push %edi <== NOT EXECUTED
1417e8: 56 push %esi <== NOT EXECUTED
1417e9: 53 push %ebx <== NOT EXECUTED
1417ea: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
1417ed: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
1417f0: 8a 4d 0c mov 0xc(%ebp),%cl <== NOT EXECUTED
1417f3: 8a 55 10 mov 0x10(%ebp),%dl <== NOT EXECUTED
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
1417f6: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
1417f9: 85 c0 test %eax,%eax <== NOT EXECUTED
1417fb: 0f 84 87 00 00 00 je 141888 <rtems_rfs_inode_time_stamp_now+0xa4><== NOT EXECUTED
return ENXIO;
now = time (NULL);
141801: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
141804: 6a 00 push $0x0 <== NOT EXECUTED
141806: 88 55 e0 mov %dl,-0x20(%ebp) <== NOT EXECUTED
141809: 88 4d e4 mov %cl,-0x1c(%ebp) <== NOT EXECUTED
14180c: e8 4f 10 01 00 call 152860 <time> <== NOT EXECUTED
if (atime)
141811: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141814: 8a 4d e4 mov -0x1c(%ebp),%cl <== NOT EXECUTED
141817: 84 c9 test %cl,%cl <== NOT EXECUTED
141819: 8a 55 e0 mov -0x20(%ebp),%dl <== NOT EXECUTED
14181c: 74 31 je 14184f <rtems_rfs_inode_time_stamp_now+0x6b><== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
14181e: 8b 7b 0c mov 0xc(%ebx),%edi <== NOT EXECUTED
141821: 89 c6 mov %eax,%esi <== NOT EXECUTED
141823: c1 ee 18 shr $0x18,%esi <== NOT EXECUTED
141826: 89 f1 mov %esi,%ecx <== NOT EXECUTED
141828: 88 4f 10 mov %cl,0x10(%edi) <== NOT EXECUTED
14182b: 8b 7b 0c mov 0xc(%ebx),%edi <== NOT EXECUTED
14182e: 89 c6 mov %eax,%esi <== NOT EXECUTED
141830: c1 ee 10 shr $0x10,%esi <== NOT EXECUTED
141833: 89 f1 mov %esi,%ecx <== NOT EXECUTED
141835: 88 4f 11 mov %cl,0x11(%edi) <== NOT EXECUTED
141838: 8b 7b 0c mov 0xc(%ebx),%edi <== NOT EXECUTED
14183b: 89 c6 mov %eax,%esi <== NOT EXECUTED
14183d: c1 ee 08 shr $0x8,%esi <== NOT EXECUTED
141840: 89 f1 mov %esi,%ecx <== NOT EXECUTED
141842: 88 4f 12 mov %cl,0x12(%edi) <== NOT EXECUTED
141845: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED
141848: 88 41 13 mov %al,0x13(%ecx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
14184b: c6 43 10 01 movb $0x1,0x10(%ebx) <== NOT EXECUTED
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
14184f: 84 d2 test %dl,%dl <== NOT EXECUTED
141851: 74 2b je 14187e <rtems_rfs_inode_time_stamp_now+0x9a><== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
141853: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
141856: 89 c1 mov %eax,%ecx <== NOT EXECUTED
141858: c1 e9 18 shr $0x18,%ecx <== NOT EXECUTED
14185b: 88 4a 14 mov %cl,0x14(%edx) <== NOT EXECUTED
14185e: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
141861: 89 c1 mov %eax,%ecx <== NOT EXECUTED
141863: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
141866: 88 4a 15 mov %cl,0x15(%edx) <== NOT EXECUTED
141869: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
14186c: 89 c1 mov %eax,%ecx <== NOT EXECUTED
14186e: c1 e9 08 shr $0x8,%ecx <== NOT EXECUTED
141871: 88 4a 16 mov %cl,0x16(%edx) <== NOT EXECUTED
141874: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
141877: 88 42 17 mov %al,0x17(%edx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
14187a: c6 43 10 01 movb $0x1,0x10(%ebx) <== NOT EXECUTED
14187e: 31 c0 xor %eax,%eax <== NOT EXECUTED
rtems_rfs_inode_set_mtime (handle, now);
return 0;
}
141880: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
141883: 5b pop %ebx <== NOT EXECUTED
141884: 5e pop %esi <== NOT EXECUTED
141885: 5f pop %edi <== NOT EXECUTED
141886: c9 leave <== NOT EXECUTED
141887: c3 ret <== NOT EXECUTED
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
141888: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED
if (atime)
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
rtems_rfs_inode_set_mtime (handle, now);
return 0;
}
14188d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
141890: 5b pop %ebx <== NOT EXECUTED
141891: 5e pop %esi <== NOT EXECUTED
141892: 5f pop %edi <== NOT EXECUTED
141893: c9 leave <== NOT EXECUTED
141894: c3 ret <== NOT EXECUTED
001419d8 <rtems_rfs_inode_unload>:
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
1419d8: 55 push %ebp <== NOT EXECUTED
1419d9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1419db: 53 push %ebx <== NOT EXECUTED
1419dc: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
1419df: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
1419e2: 8a 55 10 mov 0x10(%ebp),%dl <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_UNLOAD))
printf ("rtems-rfs: inode-unload: ino=%" PRIu32 " loads=%i loaded=%s\n",
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
1419e5: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED
1419e8: 85 c9 test %ecx,%ecx <== NOT EXECUTED
1419ea: 74 0f je 1419fb <rtems_rfs_inode_unload+0x23><== NOT EXECUTED
{
if (handle->loads == 0)
1419ec: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
1419ef: 85 c0 test %eax,%eax <== NOT EXECUTED
1419f1: 74 39 je 141a2c <rtems_rfs_inode_unload+0x54><== NOT EXECUTED
return EIO;
handle->loads--;
1419f3: 48 dec %eax <== NOT EXECUTED
1419f4: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED
if (handle->loads == 0)
1419f7: 85 c0 test %eax,%eax <== NOT EXECUTED
1419f9: 74 09 je 141a04 <rtems_rfs_inode_unload+0x2c><== NOT EXECUTED
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
rtems_rfs_inode_set_ctime (handle, time (NULL));
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
handle->node = NULL;
1419fb: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
}
return rc;
}
1419fd: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
141a00: c9 leave <== NOT EXECUTED
141a01: c3 ret <== NOT EXECUTED
141a02: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (handle->loads == 0)
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
141a04: 80 7b 10 00 cmpb $0x0,0x10(%ebx) <== NOT EXECUTED
141a08: 74 04 je 141a0e <rtems_rfs_inode_unload+0x36><== NOT EXECUTED
141a0a: 84 d2 test %dl,%dl <== NOT EXECUTED
141a0c: 75 26 jne 141a34 <rtems_rfs_inode_unload+0x5c><== NOT EXECUTED
rtems_rfs_inode_set_ctime (handle, time (NULL));
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
141a0e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141a11: 8d 43 10 lea 0x10(%ebx),%eax <== NOT EXECUTED
141a14: 50 push %eax <== NOT EXECUTED
141a15: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141a18: e8 0b c6 ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->node = NULL;
141a1d: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) <== NOT EXECUTED
141a24: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
return rc;
}
141a27: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
141a2a: c9 leave <== NOT EXECUTED
141a2b: c3 ret <== NOT EXECUTED
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
141a2c: b0 05 mov $0x5,%al <== NOT EXECUTED
handle->node = NULL;
}
}
return rc;
}
141a2e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
141a31: c9 leave <== NOT EXECUTED
141a32: c3 ret <== NOT EXECUTED
141a33: 90 nop <== NOT EXECUTED
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
rtems_rfs_inode_set_ctime (handle, time (NULL));
141a34: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
141a37: 6a 00 push $0x0 <== NOT EXECUTED
141a39: e8 22 0e 01 00 call 152860 <time> <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
141a3e: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
141a41: 89 c1 mov %eax,%ecx <== NOT EXECUTED
141a43: c1 e9 18 shr $0x18,%ecx <== NOT EXECUTED
141a46: 88 4a 18 mov %cl,0x18(%edx) <== NOT EXECUTED
141a49: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
141a4c: 89 c1 mov %eax,%ecx <== NOT EXECUTED
141a4e: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
141a51: 88 4a 19 mov %cl,0x19(%edx) <== NOT EXECUTED
141a54: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
141a57: 89 c1 mov %eax,%ecx <== NOT EXECUTED
141a59: c1 e9 08 shr $0x8,%ecx <== NOT EXECUTED
141a5c: 88 4a 1a mov %cl,0x1a(%edx) <== NOT EXECUTED
141a5f: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
141a62: 88 42 1b mov %al,0x1b(%edx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
141a65: c6 43 10 01 movb $0x1,0x10(%ebx) <== NOT EXECUTED
141a69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141a6c: eb a0 jmp 141a0e <rtems_rfs_inode_unload+0x36><== NOT EXECUTED
00142474 <rtems_rfs_link>:
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
142474: 55 push %ebp <== NOT EXECUTED
142475: 89 e5 mov %esp,%ebp <== NOT EXECUTED
142477: 57 push %edi <== NOT EXECUTED
142478: 56 push %esi <== NOT EXECUTED
142479: 53 push %ebx <== NOT EXECUTED
14247a: 83 ec 6c sub $0x6c,%esp <== NOT EXECUTED
14247d: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
142480: 8a 45 1c mov 0x1c(%ebp),%al <== NOT EXECUTED
142483: 88 45 97 mov %al,-0x69(%ebp) <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
142486: 6a 01 push $0x1 <== NOT EXECUTED
142488: 8d 7d 98 lea -0x68(%ebp),%edi <== NOT EXECUTED
14248b: 57 push %edi <== NOT EXECUTED
14248c: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED
14248f: 56 push %esi <== NOT EXECUTED
142490: e8 5f f6 ff ff call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
142495: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc)
142497: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14249a: 85 c0 test %eax,%eax <== NOT EXECUTED
14249c: 0f 85 bf 00 00 00 jne 142561 <rtems_rfs_link+0xed> <== NOT EXECUTED
/*
* If the target inode is a directory and we cannot link directories
* return a not supported error code.
*/
if (!link_dir && S_ISDIR (rtems_rfs_inode_get_mode (&target_inode)))
1424a2: 80 7d 97 00 cmpb $0x0,-0x69(%ebp) <== NOT EXECUTED
1424a6: 75 1a jne 1424c2 <rtems_rfs_link+0x4e> <== NOT EXECUTED
1424a8: 8b 45 a4 mov -0x5c(%ebp),%eax <== NOT EXECUTED
1424ab: 0f b6 40 02 movzbl 0x2(%eax),%eax <== NOT EXECUTED
1424af: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
1424b2: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
1424b7: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
1424bc: 0f 84 ce 00 00 00 je 142590 <rtems_rfs_link+0x11c> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
return ENOTSUP;
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
1424c2: 6a 01 push $0x1 <== NOT EXECUTED
1424c4: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
1424c7: 50 push %eax <== NOT EXECUTED
1424c8: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
1424cb: 56 push %esi <== NOT EXECUTED
1424cc: e8 23 f6 ff ff call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
1424d1: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc)
1424d3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1424d6: 85 c0 test %eax,%eax <== NOT EXECUTED
1424d8: 75 7a jne 142554 <rtems_rfs_link+0xe0> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
1424da: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1424dd: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED
1424e0: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
1424e3: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
1424e6: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
1424e9: 50 push %eax <== NOT EXECUTED
1424ea: 56 push %esi <== NOT EXECUTED
1424eb: e8 e8 c4 ff ff call 13e9d8 <rtems_rfs_dir_add_entry><== NOT EXECUTED
1424f0: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
1424f2: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1424f5: 85 c0 test %eax,%eax <== NOT EXECUTED
1424f7: 7f 73 jg 14256c <rtems_rfs_link+0xf8> <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
1424f9: 8b 55 a4 mov -0x5c(%ebp),%edx <== NOT EXECUTED
1424fc: 0f b6 0a movzbl (%edx),%ecx <== NOT EXECUTED
1424ff: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
142502: 0f b6 42 01 movzbl 0x1(%edx),%eax <== NOT EXECUTED
142506: 09 c8 or %ecx,%eax <== NOT EXECUTED
if (links == 0xffff)
142508: 66 83 f8 ff cmp $0xffffffff,%ax <== NOT EXECUTED
14250c: 0f 84 9a 00 00 00 je 1425ac <rtems_rfs_link+0x138> <== NOT EXECUTED
142512: 40 inc %eax <== NOT EXECUTED
142513: 89 c1 mov %eax,%ecx <== NOT EXECUTED
142515: 66 c1 e9 08 shr $0x8,%cx <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
142519: 88 0a mov %cl,(%edx) <== NOT EXECUTED
14251b: 8b 55 a4 mov -0x5c(%ebp),%edx <== NOT EXECUTED
14251e: 88 42 01 mov %al,0x1(%edx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
142521: c6 45 a8 01 movb $0x1,-0x58(%ebp) <== NOT EXECUTED
}
links = rtems_rfs_inode_get_links (&target_inode) + 1;
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
142525: 53 push %ebx <== NOT EXECUTED
142526: 6a 01 push $0x1 <== NOT EXECUTED
142528: 6a 01 push $0x1 <== NOT EXECUTED
14252a: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
14252d: 50 push %eax <== NOT EXECUTED
14252e: e8 b1 f2 ff ff call 1417e4 <rtems_rfs_inode_time_stamp_now><== NOT EXECUTED
142533: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
142535: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142538: 85 c0 test %eax,%eax <== NOT EXECUTED
14253a: 7f 30 jg 14256c <rtems_rfs_link+0xf8> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
14253c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
14253f: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
142542: 50 push %eax <== NOT EXECUTED
142543: 56 push %esi <== NOT EXECUTED
142544: e8 27 f5 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
142549: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
14254b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14254e: 85 c0 test %eax,%eax <== NOT EXECUTED
142550: 7e 66 jle 1425b8 <rtems_rfs_link+0x144> <== NOT EXECUTED
142552: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
142554: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
142557: 57 push %edi <== NOT EXECUTED
142558: 56 push %esi <== NOT EXECUTED
142559: e8 12 f5 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
14255e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
142561: 89 d8 mov %ebx,%eax <== NOT EXECUTED
142563: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
142566: 5b pop %ebx <== NOT EXECUTED
142567: 5e pop %esi <== NOT EXECUTED
142568: 5f pop %edi <== NOT EXECUTED
142569: c9 leave <== NOT EXECUTED
14256a: c3 ret <== NOT EXECUTED
14256b: 90 nop <== NOT EXECUTED
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &parent_inode);
14256c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
14256f: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
142572: 50 push %eax <== NOT EXECUTED
142573: 56 push %esi <== NOT EXECUTED
142574: e8 f7 f4 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
142579: 5a pop %edx <== NOT EXECUTED
14257a: 59 pop %ecx <== NOT EXECUTED
14257b: 57 push %edi <== NOT EXECUTED
14257c: 56 push %esi <== NOT EXECUTED
14257d: e8 ee f4 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
142582: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
142585: 89 d8 mov %ebx,%eax <== NOT EXECUTED
142587: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
14258a: 5b pop %ebx <== NOT EXECUTED
14258b: 5e pop %esi <== NOT EXECUTED
14258c: 5f pop %edi <== NOT EXECUTED
14258d: c9 leave <== NOT EXECUTED
14258e: c3 ret <== NOT EXECUTED
14258f: 90 nop <== NOT EXECUTED
* If the target inode is a directory and we cannot link directories
* return a not supported error code.
*/
if (!link_dir && S_ISDIR (rtems_rfs_inode_get_mode (&target_inode)))
{
rtems_rfs_inode_close (fs, &target_inode);
142590: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
142593: 57 push %edi <== NOT EXECUTED
142594: 56 push %esi <== NOT EXECUTED
142595: e8 d6 f4 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
14259a: b3 86 mov $0x86,%bl <== NOT EXECUTED
return ENOTSUP;
14259c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
14259f: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1425a1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1425a4: 5b pop %ebx <== NOT EXECUTED
1425a5: 5e pop %esi <== NOT EXECUTED
1425a6: 5f pop %edi <== NOT EXECUTED
1425a7: c9 leave <== NOT EXECUTED
1425a8: c3 ret <== NOT EXECUTED
1425a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
1425ac: b0 01 mov $0x1,%al <== NOT EXECUTED
1425ae: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
1425b0: e9 64 ff ff ff jmp 142519 <rtems_rfs_link+0xa5> <== NOT EXECUTED
1425b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
1425b8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1425bb: 57 push %edi <== NOT EXECUTED
1425bc: 56 push %esi <== NOT EXECUTED
1425bd: e8 ae f4 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
1425c2: 89 c3 mov %eax,%ebx <== NOT EXECUTED
return rc;
1425c4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1425c7: eb 98 jmp 142561 <rtems_rfs_link+0xed> <== NOT EXECUTED
001425ec <rtems_rfs_mutex_create>:
RTEMS_NO_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
#endif
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
1425ec: 55 push %ebp <== NOT EXECUTED
1425ed: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1425ef: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
1425f2: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
1425f5: 6a 00 push $0x0 <== NOT EXECUTED
1425f7: 6a 24 push $0x24 <== NOT EXECUTED
1425f9: 6a 01 push $0x1 <== NOT EXECUTED
1425fb: 68 6d 53 46 52 push $0x5246536d <== NOT EXECUTED
142600: e8 1f 06 fd ff call 112c24 <rtems_semaphore_create><== NOT EXECUTED
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
142605: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
142608: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
14260b: 19 c0 sbb %eax,%eax <== NOT EXECUTED
14260d: f7 d0 not %eax <== NOT EXECUTED
14260f: 83 e0 05 and $0x5,%eax <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
142612: c9 leave <== NOT EXECUTED
142613: c3 ret <== NOT EXECUTED
001425cc <rtems_rfs_mutex_destroy>:
return 0;
}
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
1425cc: 55 push %ebp <== NOT EXECUTED
1425cd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1425cf: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
1425d2: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
1425d5: ff 30 pushl (%eax) <== NOT EXECUTED
1425d7: e8 1c 08 fd ff call 112df8 <rtems_semaphore_delete><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
1425dc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1425df: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
1425e2: 19 c0 sbb %eax,%eax <== NOT EXECUTED
1425e4: f7 d0 not %eax <== NOT EXECUTED
1425e6: 83 e0 05 and $0x5,%eax <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
1425e9: c9 leave <== NOT EXECUTED
1425ea: c3 ret <== NOT EXECUTED
0013de88 <rtems_rfs_release_chain>:
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
13de88: 55 push %ebp <== NOT EXECUTED
13de89: 89 e5 mov %esp,%ebp <== NOT EXECUTED
13de8b: 57 push %edi <== NOT EXECUTED
13de8c: 56 push %esi <== NOT EXECUTED
13de8d: 53 push %ebx <== NOT EXECUTED
13de8e: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
13de91: 89 c3 mov %eax,%ebx <== NOT EXECUTED
13de93: 89 d6 mov %edx,%esi <== NOT EXECUTED
13de95: 8d 78 04 lea 0x4(%eax),%edi <== NOT EXECUTED
13de98: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
13de9f: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED
13dea2: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
13dea5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
13dea8: 39 3b cmp %edi,(%ebx) <== NOT EXECUTED
13deaa: 74 34 je 13dee0 <rtems_rfs_release_chain+0x58><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
13deac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13deaf: 53 push %ebx <== NOT EXECUTED
13deb0: e8 e3 5b fd ff call 113a98 <_Chain_Get> <== NOT EXECUTED
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
13deb5: ff 0e decl (%esi) <== NOT EXECUTED
buffer->user = (void*) 0;
13deb7: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
13debe: 59 pop %ecx <== NOT EXECUTED
13debf: 5a pop %edx <== NOT EXECUTED
13dec0: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
13dec3: 50 push %eax <== NOT EXECUTED
13dec4: e8 b7 94 00 00 call 147380 <rtems_rfs_buffer_bdbuf_release><== NOT EXECUTED
if ((rc > 0) && (rrc == 0))
13dec9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
13decc: 85 c0 test %eax,%eax <== NOT EXECUTED
13dece: 7e d8 jle 13dea8 <rtems_rfs_release_chain+0x20><== NOT EXECUTED
13ded0: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
13ded3: 85 d2 test %edx,%edx <== NOT EXECUTED
13ded5: 75 d1 jne 13dea8 <rtems_rfs_release_chain+0x20><== NOT EXECUTED
13ded7: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
13deda: 39 3b cmp %edi,(%ebx) <== NOT EXECUTED
13dedc: 75 ce jne 13deac <rtems_rfs_release_chain+0x24><== NOT EXECUTED
13dede: 66 90 xchg %ax,%ax <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
rrc = rc;
}
return rrc;
}
13dee0: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
13dee3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
13dee6: 5b pop %ebx <== NOT EXECUTED
13dee7: 5e pop %esi <== NOT EXECUTED
13dee8: 5f pop %edi <== NOT EXECUTED
13dee9: c9 leave <== NOT EXECUTED
13deea: c3 ret <== NOT EXECUTED
0012812c <rtems_rfs_rtems_chown>:
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
12812c: 55 push %ebp <== NOT EXECUTED
12812d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12812f: 57 push %edi <== NOT EXECUTED
128130: 56 push %esi <== NOT EXECUTED
128131: 53 push %ebx <== NOT EXECUTED
128132: 83 ec 60 sub $0x60,%esp <== NOT EXECUTED
128135: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
128138: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
12813b: 66 89 55 b6 mov %dx,-0x4a(%ebp) <== NOT EXECUTED
12813f: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
128142: 66 89 55 98 mov %dx,-0x68(%ebp) <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
128146: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
128149: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
12814c: 8b 30 mov (%eax),%esi <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
12814e: 6a 00 push $0x0 <== NOT EXECUTED
128150: 6a 00 push $0x0 <== NOT EXECUTED
128152: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
128155: ff 30 pushl (%eax) <== NOT EXECUTED
128157: e8 9c ad fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
12815c: 6a 01 push $0x1 <== NOT EXECUTED
12815e: 8d 7d c0 lea -0x40(%ebp),%edi <== NOT EXECUTED
128161: 57 push %edi <== NOT EXECUTED
128162: 56 push %esi <== NOT EXECUTED
128163: 53 push %ebx <== NOT EXECUTED
128164: e8 8b 99 01 00 call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
128169: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
12816b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12816e: 85 c0 test %eax,%eax <== NOT EXECUTED
128170: 7e 2e jle 1281a0 <rtems_rfs_rtems_chown+0x74><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
128172: 8b 7b 7c mov 0x7c(%ebx),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
128175: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
128178: 53 push %ebx <== NOT EXECUTED
128179: e8 6e 5d 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
12817e: 5b pop %ebx <== NOT EXECUTED
12817f: ff 37 pushl (%edi) <== NOT EXECUTED
128181: e8 6e ae fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("chown: closing inode", rc);
128186: e8 f5 f9 01 00 call 147b80 <__errno> <== NOT EXECUTED
12818b: 89 30 mov %esi,(%eax) <== NOT EXECUTED
12818d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
128192: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
128195: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
128198: 5b pop %ebx <== NOT EXECUTED
128199: 5e pop %esi <== NOT EXECUTED
12819a: 5f pop %edi <== NOT EXECUTED
12819b: c9 leave <== NOT EXECUTED
12819c: c3 ret <== NOT EXECUTED
12819d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
1281a0: e8 8f 66 00 00 call 12e834 <geteuid> <== NOT EXECUTED
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
1281a5: 8b 75 cc mov -0x34(%ebp),%esi <== NOT EXECUTED
1281a8: 83 c6 04 add $0x4,%esi <== NOT EXECUTED
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
1281ab: 0f b6 56 02 movzbl 0x2(%esi),%edx <== NOT EXECUTED
1281af: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
1281b2: 0f b6 4e 03 movzbl 0x3(%esi),%ecx <== NOT EXECUTED
1281b6: 09 ca or %ecx,%edx <== NOT EXECUTED
1281b8: 66 39 d0 cmp %dx,%ax <== NOT EXECUTED
1281bb: 74 05 je 1281c2 <rtems_rfs_rtems_chown+0x96><== NOT EXECUTED
1281bd: 66 85 c0 test %ax,%ax <== NOT EXECUTED
1281c0: 75 6c jne 12822e <rtems_rfs_rtems_chown+0x102><== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_uid_gid (rtems_rfs_inode_handle* handle,
uint16_t uid, uint16_t gid)
{
rtems_rfs_write_u32 (&handle->node->owner, (((uint32_t) gid) << 16) | uid);
1281c2: 8b 45 98 mov -0x68(%ebp),%eax <== NOT EXECUTED
1281c5: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
1281c8: 0f b7 55 b6 movzwl -0x4a(%ebp),%edx <== NOT EXECUTED
1281cc: 09 d0 or %edx,%eax <== NOT EXECUTED
1281ce: 89 c2 mov %eax,%edx <== NOT EXECUTED
1281d0: c1 ea 18 shr $0x18,%edx <== NOT EXECUTED
1281d3: 88 16 mov %dl,(%esi) <== NOT EXECUTED
1281d5: 89 c1 mov %eax,%ecx <== NOT EXECUTED
1281d7: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
1281da: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
1281dd: 88 4a 05 mov %cl,0x5(%edx) <== NOT EXECUTED
1281e0: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
1281e3: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
1281e6: 88 42 06 mov %al,0x6(%edx) <== NOT EXECUTED
1281e9: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
1281ec: 8a 55 b6 mov -0x4a(%ebp),%dl <== NOT EXECUTED
1281ef: 88 50 07 mov %dl,0x7(%eax) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
1281f2: c6 45 d0 01 movb $0x1,-0x30(%ebp) <== NOT EXECUTED
}
#endif
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);
1281f6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1281f9: 57 push %edi <== NOT EXECUTED
1281fa: 53 push %ebx <== NOT EXECUTED
1281fb: e8 70 98 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
128200: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc)
128202: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128205: 85 c0 test %eax,%eax <== NOT EXECUTED
128207: 0f 85 65 ff ff ff jne 128172 <rtems_rfs_rtems_chown+0x46><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
12820d: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
128210: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
128213: 53 push %ebx <== NOT EXECUTED
128214: e8 d3 5c 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
128219: 59 pop %ecx <== NOT EXECUTED
12821a: ff 36 pushl (%esi) <== NOT EXECUTED
12821c: e8 d3 ad fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
128221: 31 c0 xor %eax,%eax <== NOT EXECUTED
return rtems_rfs_rtems_error ("chown: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
128223: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
128226: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
128229: 5b pop %ebx <== NOT EXECUTED
12822a: 5e pop %esi <== NOT EXECUTED
12822b: 5f pop %edi <== NOT EXECUTED
12822c: c9 leave <== NOT EXECUTED
12822d: c3 ret <== NOT EXECUTED
#if defined (RTEMS_POSIX_API)
uid = geteuid();
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
{
rtems_rfs_inode_close (fs, &inode);
12822e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
128231: 57 push %edi <== NOT EXECUTED
128232: 53 push %ebx <== NOT EXECUTED
128233: e8 38 98 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
128238: 89 d8 mov %ebx,%eax <== NOT EXECUTED
12823a: e8 51 e8 ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("chown: not able", EPERM);
12823f: e8 3c f9 01 00 call 147b80 <__errno> <== NOT EXECUTED
128244: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
12824a: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12824f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128252: e9 3e ff ff ff jmp 128195 <rtems_rfs_rtems_chown+0x69><== NOT EXECUTED
00142748 <rtems_rfs_rtems_device_close>:
* @return int
*/
static int
rtems_rfs_rtems_device_close (rtems_libio_t* iop)
{
142748: 55 push %ebp <== NOT EXECUTED
142749: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14274b: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
14274e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_libio_open_close_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
142751: 8b 50 30 mov 0x30(%eax),%edx <== NOT EXECUTED
minor = (intptr_t) iop->data1;
142754: 8b 48 34 mov 0x34(%eax),%ecx <== NOT EXECUTED
args.iop = iop;
142757: 89 45 ec mov %eax,-0x14(%ebp) <== NOT EXECUTED
args.flags = 0;
14275a: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) <== NOT EXECUTED
args.mode = 0;
142761: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED
status = rtems_io_close (major, minor, (void *) &args);
142768: 8d 45 ec lea -0x14(%ebp),%eax <== NOT EXECUTED
14276b: 50 push %eax <== NOT EXECUTED
14276c: 51 push %ecx <== NOT EXECUTED
14276d: 52 push %edx <== NOT EXECUTED
14276e: e8 01 28 00 00 call 144f74 <rtems_io_close> <== NOT EXECUTED
if (status)
142773: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142776: 85 c0 test %eax,%eax <== NOT EXECUTED
142778: 75 02 jne 14277c <rtems_rfs_rtems_device_close+0x34><== NOT EXECUTED
return rtems_deviceio_errno (status);
return 0;
}
14277a: c9 leave <== NOT EXECUTED
14277b: c3 ret <== NOT EXECUTED
args.flags = 0;
args.mode = 0;
status = rtems_io_close (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
14277c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
14277f: 50 push %eax <== NOT EXECUTED
142780: e8 97 0a 00 00 call 14321c <rtems_deviceio_errno> <== NOT EXECUTED
142785: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return 0;
}
142788: c9 leave <== NOT EXECUTED
142789: c3 ret <== NOT EXECUTED
00142620 <rtems_rfs_rtems_device_ftruncate>:
* @return int
*/
static int
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, rtems_off64_t length)
{
142620: 55 push %ebp <== NOT EXECUTED
142621: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return 0;
}
142623: 31 c0 xor %eax,%eax <== NOT EXECUTED
142625: c9 leave <== NOT EXECUTED
142626: c3 ret <== NOT EXECUTED
00142628 <rtems_rfs_rtems_device_ioctl>:
static int
rtems_rfs_rtems_device_ioctl (rtems_libio_t* iop,
uint32_t command,
void* buffer)
{
142628: 55 push %ebp <== NOT EXECUTED
142629: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14262b: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
14262e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_libio_ioctl_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
142631: 8b 50 30 mov 0x30(%eax),%edx <== NOT EXECUTED
minor = (intptr_t) iop->data1;
142634: 8b 48 34 mov 0x34(%eax),%ecx <== NOT EXECUTED
args.iop = iop;
142637: 89 45 e8 mov %eax,-0x18(%ebp) <== NOT EXECUTED
args.command = command;
14263a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
14263d: 89 45 ec mov %eax,-0x14(%ebp) <== NOT EXECUTED
args.buffer = buffer;
142640: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
142643: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
status = rtems_io_control (major, minor, (void *) &args);
142646: 8d 45 e8 lea -0x18(%ebp),%eax <== NOT EXECUTED
142649: 50 push %eax <== NOT EXECUTED
14264a: 51 push %ecx <== NOT EXECUTED
14264b: 52 push %edx <== NOT EXECUTED
14264c: e8 6f 29 00 00 call 144fc0 <rtems_io_control> <== NOT EXECUTED
if (status)
142651: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142654: 85 c0 test %eax,%eax <== NOT EXECUTED
142656: 75 08 jne 142660 <rtems_rfs_rtems_device_ioctl+0x38><== NOT EXECUTED
return rtems_deviceio_errno (status);
return args.ioctl_return;
142658: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
}
14265b: c9 leave <== NOT EXECUTED
14265c: c3 ret <== NOT EXECUTED
14265d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
args.command = command;
args.buffer = buffer;
status = rtems_io_control (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
142660: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
142663: 50 push %eax <== NOT EXECUTED
142664: e8 b3 0b 00 00 call 14321c <rtems_deviceio_errno> <== NOT EXECUTED
142669: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return args.ioctl_return;
}
14266c: c9 leave <== NOT EXECUTED
14266d: c3 ret <== NOT EXECUTED
00142614 <rtems_rfs_rtems_device_lseek>:
static rtems_off64_t
rtems_rfs_rtems_device_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
142614: 55 push %ebp <== NOT EXECUTED
142615: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return offset;
}
142617: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
14261a: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
14261d: c9 leave <== NOT EXECUTED
14261e: c3 ret <== NOT EXECUTED
0014278c <rtems_rfs_rtems_device_open>:
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode)
{
14278c: 55 push %ebp <== NOT EXECUTED
14278d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14278f: 57 push %edi <== NOT EXECUTED
142790: 56 push %esi <== NOT EXECUTED
142791: 53 push %ebx <== NOT EXECUTED
142792: 81 ec 90 00 00 00 sub $0x90,%esp <== NOT EXECUTED
142798: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
rtems_libio_open_close_args_t args;
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
14279b: 8b 46 28 mov 0x28(%esi),%eax <== NOT EXECUTED
14279e: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
1427a1: 8b 56 38 mov 0x38(%esi),%edx <== NOT EXECUTED
1427a4: 6a 00 push $0x0 <== NOT EXECUTED
1427a6: 6a 00 push $0x0 <== NOT EXECUTED
1427a8: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
1427ab: ff 30 pushl (%eax) <== NOT EXECUTED
1427ad: 89 95 70 ff ff ff mov %edx,-0x90(%ebp) <== NOT EXECUTED
1427b3: e8 40 07 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
rtems_status_code status;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
1427b8: 6a 01 push $0x1 <== NOT EXECUTED
1427ba: 8d 7d b4 lea -0x4c(%ebp),%edi <== NOT EXECUTED
1427bd: 57 push %edi <== NOT EXECUTED
1427be: 8b 95 70 ff ff ff mov -0x90(%ebp),%edx <== NOT EXECUTED
1427c4: 52 push %edx <== NOT EXECUTED
1427c5: 53 push %ebx <== NOT EXECUTED
1427c6: e8 29 f3 ff ff call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
1427cb: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1427ce: 85 c0 test %eax,%eax <== NOT EXECUTED
1427d0: 7e 3a jle 14280c <rtems_rfs_rtems_device_open+0x80><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1427d2: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1427d5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1427d8: 53 push %ebx <== NOT EXECUTED
1427d9: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) <== NOT EXECUTED
1427df: e8 08 b7 ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
1427e4: 59 pop %ecx <== NOT EXECUTED
1427e5: ff 36 pushl (%esi) <== NOT EXECUTED
1427e7: e8 08 08 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: opening inode", rc);
1427ec: e8 8f 53 00 00 call 147b80 <__errno> <== NOT EXECUTED
1427f1: 8b 95 70 ff ff ff mov -0x90(%ebp),%edx <== NOT EXECUTED
1427f7: 89 10 mov %edx,(%eax) <== NOT EXECUTED
1427f9: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1427fe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
status = rtems_io_open (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno(status);
return 0;
}
142801: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
142804: 5b pop %ebx <== NOT EXECUTED
142805: 5e pop %esi <== NOT EXECUTED
142806: 5f pop %edi <== NOT EXECUTED
142807: c9 leave <== NOT EXECUTED
142808: c3 ret <== NOT EXECUTED
142809: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
14280c: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED
14280f: 8d 42 1c lea 0x1c(%edx),%eax <== NOT EXECUTED
142812: 8a 52 1c mov 0x1c(%edx),%dl <== NOT EXECUTED
142815: 88 95 78 ff ff ff mov %dl,-0x88(%ebp) <== NOT EXECUTED
14281b: 8a 50 01 mov 0x1(%eax),%dl <== NOT EXECUTED
14281e: 88 95 77 ff ff ff mov %dl,-0x89(%ebp) <== NOT EXECUTED
142824: 8a 50 02 mov 0x2(%eax),%dl <== NOT EXECUTED
142827: 88 95 76 ff ff ff mov %dl,-0x8a(%ebp) <== NOT EXECUTED
14282d: 8a 50 03 mov 0x3(%eax),%dl <== NOT EXECUTED
142830: 88 95 75 ff ff ff mov %dl,-0x8b(%ebp) <== NOT EXECUTED
142836: 8a 50 04 mov 0x4(%eax),%dl <== NOT EXECUTED
142839: 88 55 98 mov %dl,-0x68(%ebp) <== NOT EXECUTED
14283c: 8a 50 05 mov 0x5(%eax),%dl <== NOT EXECUTED
14283f: 88 55 97 mov %dl,-0x69(%ebp) <== NOT EXECUTED
142842: 8a 50 06 mov 0x6(%eax),%dl <== NOT EXECUTED
142845: 88 55 96 mov %dl,-0x6a(%ebp) <== NOT EXECUTED
142848: 8a 40 07 mov 0x7(%eax),%al <== NOT EXECUTED
14284b: 88 45 95 mov %al,-0x6b(%ebp) <== NOT EXECUTED
}
major = rtems_rfs_inode_get_block (&inode, 0);
minor = rtems_rfs_inode_get_block (&inode, 1);
rc = rtems_rfs_inode_close (fs, &inode);
14284e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
142851: 57 push %edi <== NOT EXECUTED
142852: 53 push %ebx <== NOT EXECUTED
142853: e8 18 f2 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
142858: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc > 0)
14285a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14285d: 85 c0 test %eax,%eax <== NOT EXECUTED
14285f: 7e 2b jle 14288c <rtems_rfs_rtems_device_open+0x100><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
142861: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
142864: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
142867: 53 push %ebx <== NOT EXECUTED
142868: e8 7f b6 ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
14286d: 5a pop %edx <== NOT EXECUTED
14286e: ff 36 pushl (%esi) <== NOT EXECUTED
142870: e8 7f 07 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
142875: e8 06 53 00 00 call 147b80 <__errno> <== NOT EXECUTED
14287a: 89 38 mov %edi,(%eax) <== NOT EXECUTED
14287c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
142881: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
status = rtems_io_open (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno(status);
return 0;
}
142884: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
142887: 5b pop %ebx <== NOT EXECUTED
142888: 5e pop %esi <== NOT EXECUTED
142889: 5f pop %edi <== NOT EXECUTED
14288a: c9 leave <== NOT EXECUTED
14288b: c3 ret <== NOT EXECUTED
14288c: 0f b6 bd 75 ff ff ff movzbl -0x8b(%ebp),%edi <== NOT EXECUTED
142893: 8a 85 78 ff ff ff mov -0x88(%ebp),%al <== NOT EXECUTED
142899: c1 e0 18 shl $0x18,%eax <== NOT EXECUTED
14289c: 09 c7 or %eax,%edi <== NOT EXECUTED
14289e: 0f b6 85 77 ff ff ff movzbl -0x89(%ebp),%eax <== NOT EXECUTED
1428a5: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
1428a8: 09 c7 or %eax,%edi <== NOT EXECUTED
1428aa: 0f b6 85 76 ff ff ff movzbl -0x8a(%ebp),%eax <== NOT EXECUTED
1428b1: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
1428b4: 09 c7 or %eax,%edi <== NOT EXECUTED
1428b6: 8a 4d 98 mov -0x68(%ebp),%cl <== NOT EXECUTED
1428b9: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
1428bc: 0f b6 45 97 movzbl -0x69(%ebp),%eax <== NOT EXECUTED
1428c0: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
1428c3: 09 c1 or %eax,%ecx <== NOT EXECUTED
1428c5: 0f b6 45 95 movzbl -0x6b(%ebp),%eax <== NOT EXECUTED
1428c9: 09 c1 or %eax,%ecx <== NOT EXECUTED
1428cb: 0f b6 45 96 movzbl -0x6a(%ebp),%eax <== NOT EXECUTED
1428cf: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
1428d2: 09 c1 or %eax,%ecx <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1428d4: 8b 53 7c mov 0x7c(%ebx),%edx <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1428d7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1428da: 53 push %ebx <== NOT EXECUTED
1428db: 89 95 70 ff ff ff mov %edx,-0x90(%ebp) <== NOT EXECUTED
1428e1: 89 8d 6c ff ff ff mov %ecx,-0x94(%ebp) <== NOT EXECUTED
1428e7: e8 00 b6 ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
1428ec: 58 pop %eax <== NOT EXECUTED
1428ed: 8b 95 70 ff ff ff mov -0x90(%ebp),%edx <== NOT EXECUTED
1428f3: ff 32 pushl (%edx) <== NOT EXECUTED
1428f5: e8 fa 06 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
1428fa: 89 7e 30 mov %edi,0x30(%esi) <== NOT EXECUTED
iop->data1 = (void*)((intptr_t) minor);
1428fd: 8b 8d 6c ff ff ff mov -0x94(%ebp),%ecx <== NOT EXECUTED
142903: 89 4e 34 mov %ecx,0x34(%esi) <== NOT EXECUTED
args.iop = iop;
142906: 89 75 dc mov %esi,-0x24(%ebp) <== NOT EXECUTED
args.flags = iop->flags;
142909: 8b 46 14 mov 0x14(%esi),%eax <== NOT EXECUTED
14290c: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
args.mode = mode;
14290f: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
142912: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
status = rtems_io_open (major, minor, (void *) &args);
142915: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
142918: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
14291b: 50 push %eax <== NOT EXECUTED
14291c: 51 push %ecx <== NOT EXECUTED
14291d: 57 push %edi <== NOT EXECUTED
14291e: e8 e9 26 00 00 call 14500c <rtems_io_open> <== NOT EXECUTED
if (status)
142923: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142926: 85 c0 test %eax,%eax <== NOT EXECUTED
142928: 0f 84 d3 fe ff ff je 142801 <rtems_rfs_rtems_device_open+0x75><== NOT EXECUTED
return rtems_deviceio_errno(status);
14292e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
142931: 50 push %eax <== NOT EXECUTED
142932: e8 e5 08 00 00 call 14321c <rtems_deviceio_errno> <== NOT EXECUTED
142937: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14293a: e9 c2 fe ff ff jmp 142801 <rtems_rfs_rtems_device_open+0x75><== NOT EXECUTED
001426dc <rtems_rfs_rtems_device_read>:
* @return ssize_t
*/
static ssize_t
rtems_rfs_rtems_device_read (rtems_libio_t* iop, void* buffer, size_t count)
{
1426dc: 55 push %ebp <== NOT EXECUTED
1426dd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1426df: 56 push %esi <== NOT EXECUTED
1426e0: 53 push %ebx <== NOT EXECUTED
1426e1: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED
1426e4: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
1426e7: 8b 50 30 mov 0x30(%eax),%edx <== NOT EXECUTED
minor = (intptr_t) iop->data1;
1426ea: 8b 48 34 mov 0x34(%eax),%ecx <== NOT EXECUTED
args.iop = iop;
1426ed: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
args.offset = iop->offset;
1426f0: 8b 58 0c mov 0xc(%eax),%ebx <== NOT EXECUTED
1426f3: 8b 70 10 mov 0x10(%eax),%esi <== NOT EXECUTED
1426f6: 89 5d e0 mov %ebx,-0x20(%ebp) <== NOT EXECUTED
1426f9: 89 75 e4 mov %esi,-0x1c(%ebp) <== NOT EXECUTED
args.buffer = buffer;
1426fc: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
1426ff: 89 5d e8 mov %ebx,-0x18(%ebp) <== NOT EXECUTED
args.count = count;
142702: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED
142705: 89 5d ec mov %ebx,-0x14(%ebp) <== NOT EXECUTED
args.flags = iop->flags;
142708: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
14270b: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
args.bytes_moved = 0;
14270e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED
status = rtems_io_read (major, minor, (void *) &args);
142715: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
142718: 50 push %eax <== NOT EXECUTED
142719: 51 push %ecx <== NOT EXECUTED
14271a: 52 push %edx <== NOT EXECUTED
14271b: e8 38 29 00 00 call 145058 <rtems_io_read> <== NOT EXECUTED
if (status)
142720: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142723: 85 c0 test %eax,%eax <== NOT EXECUTED
142725: 75 0d jne 142734 <rtems_rfs_rtems_device_read+0x58><== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
142727: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
}
14272a: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
14272d: 5b pop %ebx <== NOT EXECUTED
14272e: 5e pop %esi <== NOT EXECUTED
14272f: c9 leave <== NOT EXECUTED
142730: c3 ret <== NOT EXECUTED
142731: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
142734: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
142737: 50 push %eax <== NOT EXECUTED
142738: e8 df 0a 00 00 call 14321c <rtems_deviceio_errno> <== NOT EXECUTED
14273d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
142740: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
142743: 5b pop %ebx <== NOT EXECUTED
142744: 5e pop %esi <== NOT EXECUTED
142745: c9 leave <== NOT EXECUTED
142746: c3 ret <== NOT EXECUTED
00142670 <rtems_rfs_rtems_device_write>:
static ssize_t
rtems_rfs_rtems_device_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
142670: 55 push %ebp <== NOT EXECUTED
142671: 89 e5 mov %esp,%ebp <== NOT EXECUTED
142673: 56 push %esi <== NOT EXECUTED
142674: 53 push %ebx <== NOT EXECUTED
142675: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED
142678: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
14267b: 8b 50 30 mov 0x30(%eax),%edx <== NOT EXECUTED
minor = (intptr_t) iop->data1;
14267e: 8b 48 34 mov 0x34(%eax),%ecx <== NOT EXECUTED
args.iop = iop;
142681: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
args.offset = iop->offset;
142684: 8b 58 0c mov 0xc(%eax),%ebx <== NOT EXECUTED
142687: 8b 70 10 mov 0x10(%eax),%esi <== NOT EXECUTED
14268a: 89 5d e0 mov %ebx,-0x20(%ebp) <== NOT EXECUTED
14268d: 89 75 e4 mov %esi,-0x1c(%ebp) <== NOT EXECUTED
args.buffer = (void *) buffer;
142690: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
142693: 89 5d e8 mov %ebx,-0x18(%ebp) <== NOT EXECUTED
args.count = count;
142696: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED
142699: 89 5d ec mov %ebx,-0x14(%ebp) <== NOT EXECUTED
args.flags = iop->flags;
14269c: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
14269f: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
args.bytes_moved = 0;
1426a2: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED
status = rtems_io_write (major, minor, (void *) &args);
1426a9: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
1426ac: 50 push %eax <== NOT EXECUTED
1426ad: 51 push %ecx <== NOT EXECUTED
1426ae: 52 push %edx <== NOT EXECUTED
1426af: e8 f0 29 00 00 call 1450a4 <rtems_io_write> <== NOT EXECUTED
if (status)
1426b4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1426b7: 85 c0 test %eax,%eax <== NOT EXECUTED
1426b9: 75 0d jne 1426c8 <rtems_rfs_rtems_device_write+0x58><== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
1426bb: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
}
1426be: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1426c1: 5b pop %ebx <== NOT EXECUTED
1426c2: 5e pop %esi <== NOT EXECUTED
1426c3: c9 leave <== NOT EXECUTED
1426c4: c3 ret <== NOT EXECUTED
1426c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
1426c8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1426cb: 50 push %eax <== NOT EXECUTED
1426cc: e8 4b 0b 00 00 call 14321c <rtems_deviceio_errno> <== NOT EXECUTED
1426d1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
1426d4: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1426d7: 5b pop %ebx <== NOT EXECUTED
1426d8: 5e pop %esi <== NOT EXECUTED
1426d9: c9 leave <== NOT EXECUTED
1426da: c3 ret <== NOT EXECUTED
00142940 <rtems_rfs_rtems_dir_close>:
* @param iop
* @retval 0 Always no error.
*/
static int
rtems_rfs_rtems_dir_close (rtems_libio_t* iop)
{
142940: 55 push %ebp <== NOT EXECUTED
142941: 89 e5 mov %esp,%ebp <== NOT EXECUTED
/*
* The RFS does not hold any resources. Nothing to do.
*/
return 0;
}
142943: 31 c0 xor %eax,%eax <== NOT EXECUTED
142945: c9 leave <== NOT EXECUTED
142946: c3 ret <== NOT EXECUTED
00142948 <rtems_rfs_rtems_dir_lseek>:
*/
static rtems_off64_t
rtems_rfs_rtems_dir_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
142948: 55 push %ebp <== NOT EXECUTED
142949: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14294b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
switch (whence)
14294e: 83 7d 14 01 cmpl $0x1,0x14(%ebp) <== NOT EXECUTED
142952: 76 18 jbe 14296c <rtems_rfs_rtems_dir_lseek+0x24><== NOT EXECUTED
break;
case SEEK_END: /* Movement past the end of the directory via lseek */
/* is not a permitted operation */
default:
return rtems_rfs_rtems_error ("dir_lseek: bad whence", EINVAL);
142954: e8 27 52 00 00 call 147b80 <__errno> <== NOT EXECUTED
142959: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
14295f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
142964: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
break;
}
return 0;
}
142969: c9 leave <== NOT EXECUTED
14296a: c3 ret <== NOT EXECUTED
14296b: 90 nop <== NOT EXECUTED
static rtems_off64_t
rtems_rfs_rtems_dir_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
switch (whence)
14296c: 31 c0 xor %eax,%eax <== NOT EXECUTED
14296e: 31 d2 xor %edx,%edx <== NOT EXECUTED
default:
return rtems_rfs_rtems_error ("dir_lseek: bad whence", EINVAL);
break;
}
return 0;
}
142970: c9 leave <== NOT EXECUTED
142971: c3 ret <== NOT EXECUTED
00142b40 <rtems_rfs_rtems_dir_open>:
static int
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
142b40: 55 push %ebp <== NOT EXECUTED
142b41: 89 e5 mov %esp,%ebp <== NOT EXECUTED
142b43: 57 push %edi <== NOT EXECUTED
142b44: 56 push %esi <== NOT EXECUTED
142b45: 53 push %ebx <== NOT EXECUTED
142b46: 83 ec 50 sub $0x50,%esp <== NOT EXECUTED
142b49: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
142b4c: 8b 46 28 mov 0x28(%esi),%eax <== NOT EXECUTED
142b4f: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
142b52: 8b 56 38 mov 0x38(%esi),%edx <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
142b55: 6a 00 push $0x0 <== NOT EXECUTED
142b57: 6a 00 push $0x0 <== NOT EXECUTED
142b59: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
142b5c: ff 30 pushl (%eax) <== NOT EXECUTED
142b5e: 89 55 b4 mov %edx,-0x4c(%ebp) <== NOT EXECUTED
142b61: e8 92 03 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
142b66: 6a 01 push $0x1 <== NOT EXECUTED
142b68: 8d 7d c0 lea -0x40(%ebp),%edi <== NOT EXECUTED
142b6b: 57 push %edi <== NOT EXECUTED
142b6c: 8b 55 b4 mov -0x4c(%ebp),%edx <== NOT EXECUTED
142b6f: 52 push %edx <== NOT EXECUTED
142b70: 53 push %ebx <== NOT EXECUTED
142b71: e8 7e ef ff ff call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
142b76: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
142b79: 85 c0 test %eax,%eax <== NOT EXECUTED
142b7b: 75 4f jne 142bcc <rtems_rfs_rtems_dir_open+0x8c><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
142b7d: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
142b80: 0f b6 40 02 movzbl 0x2(%eax),%eax <== NOT EXECUTED
142b84: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
142b87: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
142b8c: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
142b91: 75 6d jne 142c00 <rtems_rfs_rtems_dir_open+0xc0><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
}
iop->offset = 0;
142b93: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) <== NOT EXECUTED
142b9a: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
142ba1: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
142ba4: 57 push %edi <== NOT EXECUTED
142ba5: 53 push %ebx <== NOT EXECUTED
142ba6: e8 c5 ee ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
142bab: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
142bae: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
142bb1: e8 36 b3 ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
142bb6: 5a pop %edx <== NOT EXECUTED
142bb7: ff 36 pushl (%esi) <== NOT EXECUTED
142bb9: e8 36 04 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
142bbe: 31 c0 xor %eax,%eax <== NOT EXECUTED
142bc0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return 0;
}
142bc3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
142bc6: 5b pop %ebx <== NOT EXECUTED
142bc7: 5e pop %esi <== NOT EXECUTED
142bc8: 5f pop %edi <== NOT EXECUTED
142bc9: c9 leave <== NOT EXECUTED
142bca: c3 ret <== NOT EXECUTED
142bcb: 90 nop <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
142bcc: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
142bcf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
142bd2: 53 push %ebx <== NOT EXECUTED
142bd3: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
142bd6: e8 11 b3 ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
142bdb: 5b pop %ebx <== NOT EXECUTED
142bdc: ff 36 pushl (%esi) <== NOT EXECUTED
142bde: e8 11 04 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
142be3: e8 98 4f 00 00 call 147b80 <__errno> <== NOT EXECUTED
142be8: 8b 55 b4 mov -0x4c(%ebp),%edx <== NOT EXECUTED
142beb: 89 10 mov %edx,(%eax) <== NOT EXECUTED
142bed: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
142bf2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
iop->offset = 0;
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return 0;
}
142bf5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
142bf8: 5b pop %ebx <== NOT EXECUTED
142bf9: 5e pop %esi <== NOT EXECUTED
142bfa: 5f pop %edi <== NOT EXECUTED
142bfb: c9 leave <== NOT EXECUTED
142bfc: c3 ret <== NOT EXECUTED
142bfd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
142c00: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
142c03: 57 push %edi <== NOT EXECUTED
142c04: 53 push %ebx <== NOT EXECUTED
142c05: e8 66 ee ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
142c0a: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
142c0d: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
142c10: e8 d7 b2 ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
142c15: 59 pop %ecx <== NOT EXECUTED
142c16: ff 36 pushl (%esi) <== NOT EXECUTED
142c18: e8 d7 03 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
142c1d: e8 5e 4f 00 00 call 147b80 <__errno> <== NOT EXECUTED
142c22: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
142c28: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
142c2d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142c30: eb 91 jmp 142bc3 <rtems_rfs_rtems_dir_open+0x83><== NOT EXECUTED
00142a24 <rtems_rfs_rtems_dir_read>:
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
142a24: 55 push %ebp <== NOT EXECUTED
142a25: 89 e5 mov %esp,%ebp <== NOT EXECUTED
142a27: 57 push %edi <== NOT EXECUTED
142a28: 56 push %esi <== NOT EXECUTED
142a29: 53 push %ebx <== NOT EXECUTED
142a2a: 83 ec 50 sub $0x50,%esp <== NOT EXECUTED
142a2d: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
142a30: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
142a33: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
142a36: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
142a39: 6a 00 push $0x0 <== NOT EXECUTED
142a3b: 6a 00 push $0x0 <== NOT EXECUTED
142a3d: 8b 46 7c mov 0x7c(%esi),%eax <== NOT EXECUTED
142a40: ff 30 pushl (%eax) <== NOT EXECUTED
142a42: e8 b1 04 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
142a47: 6a 01 push $0x1 <== NOT EXECUTED
142a49: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED
142a4c: 50 push %eax <== NOT EXECUTED
142a4d: 57 push %edi <== NOT EXECUTED
142a4e: 56 push %esi <== NOT EXECUTED
142a4f: e8 a0 f0 ff ff call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
142a54: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc)
142a56: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
142a59: 85 c0 test %eax,%eax <== NOT EXECUTED
142a5b: 0f 85 9b 00 00 00 jne 142afc <rtems_rfs_rtems_dir_read+0xd8><== NOT EXECUTED
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
142a61: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx <== NOT EXECUTED
142a66: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
142a69: f7 e2 mul %edx <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
142a6b: c1 ea 08 shr $0x8,%edx <== NOT EXECUTED
142a6e: 89 55 b0 mov %edx,-0x50(%ebp) <== NOT EXECUTED
142a71: 74 5c je 142acf <rtems_rfs_rtems_dir_read+0xab><== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
142a73: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
142a76: 8b 53 10 mov 0x10(%ebx),%edx <== NOT EXECUTED
142a79: c7 45 b4 00 00 00 00 movl $0x0,-0x4c(%ebp) <== NOT EXECUTED
142a80: 31 ff xor %edi,%edi <== NOT EXECUTED
142a82: eb 2a jmp 142aae <rtems_rfs_rtems_dir_read+0x8a><== NOT EXECUTED
if (rc == ENOENT)
{
rc = 0;
break;
}
if (rc > 0)
142a84: 85 c0 test %eax,%eax <== NOT EXECUTED
142a86: 0f 8f a0 00 00 00 jg 142b2c <rtems_rfs_rtems_dir_read+0x108><== NOT EXECUTED
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
break;
}
iop->offset += size;
142a8c: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
142a8f: 31 d2 xor %edx,%edx <== NOT EXECUTED
142a91: 03 43 0c add 0xc(%ebx),%eax <== NOT EXECUTED
142a94: 13 53 10 adc 0x10(%ebx),%edx <== NOT EXECUTED
142a97: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
142a9a: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED
142a9d: 81 c7 10 01 00 00 add $0x110,%edi <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
142aa3: ff 45 b4 incl -0x4c(%ebp) <== NOT EXECUTED
142aa6: 8b 4d b4 mov -0x4c(%ebp),%ecx <== NOT EXECUTED
142aa9: 39 4d b0 cmp %ecx,-0x50(%ebp) <== NOT EXECUTED
142aac: 76 21 jbe 142acf <rtems_rfs_rtems_dir_read+0xab><== NOT EXECUTED
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
142aae: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
142ab1: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED
142ab4: 51 push %ecx <== NOT EXECUTED
142ab5: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
142ab8: 01 f9 add %edi,%ecx <== NOT EXECUTED
142aba: 51 push %ecx <== NOT EXECUTED
142abb: 52 push %edx <== NOT EXECUTED
142abc: 50 push %eax <== NOT EXECUTED
142abd: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED
142ac0: 50 push %eax <== NOT EXECUTED
142ac1: 56 push %esi <== NOT EXECUTED
142ac2: e8 8d b8 ff ff call 13e354 <rtems_rfs_dir_read> <== NOT EXECUTED
if (rc == ENOENT)
142ac7: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
142aca: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
142acd: 75 b5 jne 142a84 <rtems_rfs_rtems_dir_read+0x60><== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
142acf: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
142ad2: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED
142ad5: 50 push %eax <== NOT EXECUTED
142ad6: 56 push %esi <== NOT EXECUTED
142ad7: e8 94 ef ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
142adc: 8b 5e 7c mov 0x7c(%esi),%ebx <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
142adf: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
142ae2: e8 05 b4 ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
142ae7: 5e pop %esi <== NOT EXECUTED
142ae8: ff 33 pushl (%ebx) <== NOT EXECUTED
142aea: e8 05 05 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
142aef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return bytes_transferred;
}
142af2: 89 f8 mov %edi,%eax <== NOT EXECUTED
142af4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
142af7: 5b pop %ebx <== NOT EXECUTED
142af8: 5e pop %esi <== NOT EXECUTED
142af9: 5f pop %edi <== NOT EXECUTED
142afa: c9 leave <== NOT EXECUTED
142afb: c3 ret <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
142afc: 8b 5e 7c mov 0x7c(%esi),%ebx <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
142aff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
142b02: 56 push %esi <== NOT EXECUTED
142b03: e8 e4 b3 ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
142b08: 58 pop %eax <== NOT EXECUTED
142b09: ff 33 pushl (%ebx) <== NOT EXECUTED
142b0b: e8 e4 04 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
142b10: e8 6b 50 00 00 call 147b80 <__errno> <== NOT EXECUTED
142b15: 89 38 mov %edi,(%eax) <== NOT EXECUTED
142b17: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
142b1c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return bytes_transferred;
}
142b1f: 89 f8 mov %edi,%eax <== NOT EXECUTED
142b21: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
142b24: 5b pop %ebx <== NOT EXECUTED
142b25: 5e pop %esi <== NOT EXECUTED
142b26: 5f pop %edi <== NOT EXECUTED
142b27: c9 leave <== NOT EXECUTED
142b28: c3 ret <== NOT EXECUTED
142b29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rc = 0;
break;
}
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
142b2c: 89 45 ac mov %eax,-0x54(%ebp) <== NOT EXECUTED
142b2f: e8 4c 50 00 00 call 147b80 <__errno> <== NOT EXECUTED
142b34: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED
142b37: 89 10 mov %edx,(%eax) <== NOT EXECUTED
142b39: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
142b3e: eb 8f jmp 142acf <rtems_rfs_rtems_dir_read+0xab><== NOT EXECUTED
00142974 <rtems_rfs_rtems_dir_rmnod>:
static int
rtems_rfs_rtems_dir_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
142974: 55 push %ebp <== NOT EXECUTED
142975: 89 e5 mov %esp,%ebp <== NOT EXECUTED
142977: 57 push %edi <== NOT EXECUTED
142978: 56 push %esi <== NOT EXECUTED
142979: 53 push %ebx <== NOT EXECUTED
14297a: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
14297d: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
142980: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
142983: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
142986: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
142989: 8b 3a mov (%edx),%edi <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
14298b: 8b 30 mov (%eax),%esi <== NOT EXECUTED
uint32_t doff = rtems_rfs_rtems_get_pathloc_doff (pathloc);
14298d: 8b 50 04 mov 0x4(%eax),%edx <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD))
printf ("rtems-rfs: dir-rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
if (ino == RTEMS_RFS_ROOT_INO)
142990: 83 fe 01 cmp $0x1,%esi <== NOT EXECUTED
142993: 74 7b je 142a10 <rtems_rfs_rtems_dir_rmnod+0x9c><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
142995: 51 push %ecx <== NOT EXECUTED
142996: 6a 00 push $0x0 <== NOT EXECUTED
142998: 6a 00 push $0x0 <== NOT EXECUTED
14299a: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
14299d: ff 30 pushl (%eax) <== NOT EXECUTED
14299f: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
1429a2: e8 51 05 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
1429a7: c7 04 24 01 00 00 00 movl $0x1,(%esp) <== NOT EXECUTED
1429ae: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
1429b1: 52 push %edx <== NOT EXECUTED
1429b2: 56 push %esi <== NOT EXECUTED
1429b3: 57 push %edi <== NOT EXECUTED
1429b4: 53 push %ebx <== NOT EXECUTED
1429b5: e8 e6 f8 ff ff call 1422a0 <rtems_rfs_unlink> <== NOT EXECUTED
1429ba: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc)
1429bc: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1429bf: 85 c0 test %eax,%eax <== NOT EXECUTED
1429c1: 75 21 jne 1429e4 <rtems_rfs_rtems_dir_rmnod+0x70><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1429c3: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1429c6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1429c9: 53 push %ebx <== NOT EXECUTED
1429ca: e8 1d b5 ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
1429cf: 58 pop %eax <== NOT EXECUTED
1429d0: ff 36 pushl (%esi) <== NOT EXECUTED
1429d2: e8 1d 06 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
1429d7: 31 c0 xor %eax,%eax <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_rmnod: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
1429d9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1429dc: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1429df: 5b pop %ebx <== NOT EXECUTED
1429e0: 5e pop %esi <== NOT EXECUTED
1429e1: 5f pop %edi <== NOT EXECUTED
1429e2: c9 leave <== NOT EXECUTED
1429e3: c3 ret <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1429e4: 8b 7b 7c mov 0x7c(%ebx),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1429e7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1429ea: 53 push %ebx <== NOT EXECUTED
1429eb: e8 fc b4 ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
1429f0: 5a pop %edx <== NOT EXECUTED
1429f1: ff 37 pushl (%edi) <== NOT EXECUTED
1429f3: e8 fc 05 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_rmnod: unlinking", rc);
1429f8: e8 83 51 00 00 call 147b80 <__errno> <== NOT EXECUTED
1429fd: 89 30 mov %esi,(%eax) <== NOT EXECUTED
1429ff: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
142a04: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
142a07: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
142a0a: 5b pop %ebx <== NOT EXECUTED
142a0b: 5e pop %esi <== NOT EXECUTED
142a0c: 5f pop %edi <== NOT EXECUTED
142a0d: c9 leave <== NOT EXECUTED
142a0e: c3 ret <== NOT EXECUTED
142a0f: 90 nop <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD))
printf ("rtems-rfs: dir-rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
if (ino == RTEMS_RFS_ROOT_INO)
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
142a10: e8 6b 51 00 00 call 147b80 <__errno> <== NOT EXECUTED
142a15: c7 00 10 00 00 00 movl $0x10,(%eax) <== NOT EXECUTED
142a1b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
142a20: eb ba jmp 1429dc <rtems_rfs_rtems_dir_rmnod+0x68><== NOT EXECUTED
00127978 <rtems_rfs_rtems_eval_for_make>:
*/
int
rtems_rfs_rtems_eval_for_make (const char* path,
rtems_filesystem_location_info_t* pathloc,
const char** name)
{
127978: 55 push %ebp <== NOT EXECUTED
127979: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12797b: 57 push %edi <== NOT EXECUTED
12797c: 56 push %esi <== NOT EXECUTED
12797d: 53 push %ebx <== NOT EXECUTED
12797e: 83 ec 5c sub $0x5c,%esp <== NOT EXECUTED
127981: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
127984: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
127987: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED
12798a: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
12798d: 8b 02 mov (%edx),%eax <== NOT EXECUTED
12798f: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
rtems_rfs_ino node_ino;
uint32_t doff = 0;
127992: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf ("rtems-rfs-rtems: eval-for-make: path:%s ino:%" PRId32 "\n", path, ino);
*name = path + strlen (path);
127999: 31 c0 xor %eax,%eax <== NOT EXECUTED
12799b: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
1279a0: 89 df mov %ebx,%edi <== NOT EXECUTED
1279a2: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
1279a4: f7 d1 not %ecx <== NOT EXECUTED
1279a6: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax <== NOT EXECUTED
1279aa: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
1279ad: 89 01 mov %eax,(%ecx) <== NOT EXECUTED
1279af: 89 cf mov %ecx,%edi <== NOT EXECUTED
while (*name != path)
1279b1: eb 03 jmp 1279b6 <rtems_rfs_rtems_eval_for_make+0x3e><== NOT EXECUTED
1279b3: 90 nop <== NOT EXECUTED
{
(*name)--;
if (rtems_filesystem_is_separator (**name))
{
(*name)++;
break;
1279b4: 8b 07 mov (%edi),%eax <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf ("rtems-rfs-rtems: eval-for-make: path:%s ino:%" PRId32 "\n", path, ino);
*name = path + strlen (path);
while (*name != path)
1279b6: 39 c3 cmp %eax,%ebx <== NOT EXECUTED
1279b8: 74 1e je 1279d8 <rtems_rfs_rtems_eval_for_make+0x60><== NOT EXECUTED
{
(*name)--;
1279ba: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED
1279bd: 89 17 mov %edx,(%edi) <== NOT EXECUTED
if (rtems_filesystem_is_separator (**name))
1279bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1279c2: 0f be 40 ff movsbl -0x1(%eax),%eax <== NOT EXECUTED
1279c6: 50 push %eax <== NOT EXECUTED
1279c7: e8 00 86 fe ff call 10ffcc <rtems_filesystem_is_separator><== NOT EXECUTED
1279cc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1279cf: 85 c0 test %eax,%eax <== NOT EXECUTED
1279d1: 74 e1 je 1279b4 <rtems_rfs_rtems_eval_for_make+0x3c><== NOT EXECUTED
{
(*name)++;
1279d3: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
1279d6: ff 00 incl (%eax) <== NOT EXECUTED
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen(path));
1279d8: 31 c0 xor %eax,%eax <== NOT EXECUTED
1279da: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
1279df: 89 df mov %ebx,%edi <== NOT EXECUTED
1279e1: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
1279e3: f7 d1 not %ecx <== NOT EXECUTED
1279e5: 49 dec %ecx <== NOT EXECUTED
1279e6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1279e9: 51 push %ecx <== NOT EXECUTED
1279ea: 53 push %ebx <== NOT EXECUTED
1279eb: e8 9c 6c fe ff call 10e68c <rtems_filesystem_prefix_separators><== NOT EXECUTED
path += stripped;
1279f0: 01 c3 add %eax,%ebx <== NOT EXECUTED
1279f2: 89 5d a4 mov %ebx,-0x5c(%ebp) <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
1279f5: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1279f8: 6a 00 push $0x0 <== NOT EXECUTED
1279fa: 6a 00 push $0x0 <== NOT EXECUTED
1279fc: 8b 46 7c mov 0x7c(%esi),%eax <== NOT EXECUTED
1279ff: ff 30 pushl (%eax) <== NOT EXECUTED
127a01: e8 f2 b4 fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
127a06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
127a09: 6a 01 push $0x1 <== NOT EXECUTED
127a0b: 8d 55 b4 lea -0x4c(%ebp),%edx <== NOT EXECUTED
127a0e: 52 push %edx <== NOT EXECUTED
127a0f: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
127a12: 56 push %esi <== NOT EXECUTED
127a13: e8 dc a0 01 00 call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
127a18: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127a1b: 85 c0 test %eax,%eax <== NOT EXECUTED
127a1d: 0f 8f e5 02 00 00 jg 127d08 <rtems_rfs_rtems_eval_for_make+0x390><== NOT EXECUTED
}
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
127a23: 8b 45 c0 mov -0x40(%ebp),%eax <== NOT EXECUTED
127a26: 0f b6 40 02 movzbl 0x2(%eax),%eax <== NOT EXECUTED
127a2a: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
127a2d: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
127a32: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
127a37: 0f 84 7b 01 00 00 je 127bb8 <rtems_rfs_rtems_eval_for_make+0x240><== NOT EXECUTED
}
/*
* Is this the end of the pathname we where given ?
*/
if (path == *name)
127a3d: 8b 4d a4 mov -0x5c(%ebp),%ecx <== NOT EXECUTED
127a40: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
127a43: 39 0a cmp %ecx,(%edx) <== NOT EXECUTED
127a45: 0f 84 c1 00 00 00 je 127b0c <rtems_rfs_rtems_eval_for_make+0x194><== NOT EXECUTED
127a4b: 89 cb mov %ecx,%ebx <== NOT EXECUTED
127a4d: 31 d2 xor %edx,%edx <== NOT EXECUTED
127a4f: 89 d7 mov %edx,%edi <== NOT EXECUTED
127a51: eb 10 jmp 127a63 <rtems_rfs_rtems_eval_for_make+0xeb><== NOT EXECUTED
127a53: 90 nop <== NOT EXECUTED
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
127a54: 80 3b 00 cmpb $0x0,(%ebx) <== NOT EXECUTED
127a57: 74 1d je 127a76 <rtems_rfs_rtems_eval_for_make+0xfe><== NOT EXECUTED
(*path != '\0') &&
(node_len < (rtems_rfs_fs_max_name (fs) - 1)))
127a59: 8b 46 18 mov 0x18(%esi),%eax <== NOT EXECUTED
127a5c: 48 dec %eax <== NOT EXECUTED
127a5d: 39 c7 cmp %eax,%edi <== NOT EXECUTED
127a5f: 73 15 jae 127a76 <rtems_rfs_rtems_eval_for_make+0xfe><== NOT EXECUTED
{
node_len++;
127a61: 47 inc %edi <== NOT EXECUTED
path++;
127a62: 43 inc %ebx <== NOT EXECUTED
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
127a63: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
127a66: 0f be 03 movsbl (%ebx),%eax <== NOT EXECUTED
127a69: 50 push %eax <== NOT EXECUTED
127a6a: e8 5d 85 fe ff call 10ffcc <rtems_filesystem_is_separator><== NOT EXECUTED
127a6f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127a72: 85 c0 test %eax,%eax <== NOT EXECUTED
127a74: 74 de je 127a54 <rtems_rfs_rtems_eval_for_make+0xdc><== NOT EXECUTED
127a76: 89 fa mov %edi,%edx <== NOT EXECUTED
}
/*
* Eat any separators at start of the new path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen (path));
127a78: 31 c0 xor %eax,%eax <== NOT EXECUTED
127a7a: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
127a7f: 89 df mov %ebx,%edi <== NOT EXECUTED
127a81: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
127a83: f7 d1 not %ecx <== NOT EXECUTED
127a85: 49 dec %ecx <== NOT EXECUTED
127a86: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127a89: 51 push %ecx <== NOT EXECUTED
127a8a: 53 push %ebx <== NOT EXECUTED
127a8b: 89 55 a0 mov %edx,-0x60(%ebp) <== NOT EXECUTED
127a8e: e8 f9 6b fe ff call 10e68c <rtems_filesystem_prefix_separators><== NOT EXECUTED
path += stripped;
127a93: 01 c3 add %eax,%ebx <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
127a95: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127a98: 8b 45 a4 mov -0x5c(%ebp),%eax <== NOT EXECUTED
127a9b: 80 38 2e cmpb $0x2e,(%eax) <== NOT EXECUTED
127a9e: 8b 55 a0 mov -0x60(%ebp),%edx <== NOT EXECUTED
127aa1: 74 55 je 127af8 <rtems_rfs_rtems_eval_for_make+0x180><== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
127aa3: 80 3b 2e cmpb $0x2e,(%ebx) <== NOT EXECUTED
127aa6: 75 0a jne 127ab2 <rtems_rfs_rtems_eval_for_make+0x13a><== NOT EXECUTED
127aa8: 80 7b 01 2e cmpb $0x2e,0x1(%ebx) <== NOT EXECUTED
127aac: 0f 84 46 01 00 00 je 127bf8 <rtems_rfs_rtems_eval_for_make+0x280><== NOT EXECUTED
else
{
/*
* Read the inode so we know it exists and what type it is.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
127ab2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127ab5: 8d 4d dc lea -0x24(%ebp),%ecx <== NOT EXECUTED
127ab8: 51 push %ecx <== NOT EXECUTED
127ab9: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
127abc: 50 push %eax <== NOT EXECUTED
127abd: 52 push %edx <== NOT EXECUTED
127abe: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED
127ac1: 8d 55 b4 lea -0x4c(%ebp),%edx <== NOT EXECUTED
127ac4: 52 push %edx <== NOT EXECUTED
127ac5: 56 push %esi <== NOT EXECUTED
127ac6: e8 c5 72 01 00 call 13ed90 <rtems_rfs_dir_lookup_ino><== NOT EXECUTED
node, node_len - stripped, &ino, &doff);
if (rc > 0)
127acb: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
127ace: 85 c0 test %eax,%eax <== NOT EXECUTED
127ad0: 0f 8f 92 02 00 00 jg 127d68 <rtems_rfs_rtems_eval_for_make+0x3f0><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: down: path:%s ino:%" PRId32 "\n",
node, ino);
}
rc = rtems_rfs_inode_close (fs, &inode);
127ad6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127ad9: 8d 45 b4 lea -0x4c(%ebp),%eax <== NOT EXECUTED
127adc: 50 push %eax <== NOT EXECUTED
127add: 56 push %esi <== NOT EXECUTED
127ade: e8 8d 9f 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
127ae3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127ae6: 85 c0 test %eax,%eax <== NOT EXECUTED
127ae8: 0f 8f 60 02 00 00 jg 127d4e <rtems_rfs_rtems_eval_for_make+0x3d6><== NOT EXECUTED
127aee: 89 5d a4 mov %ebx,-0x5c(%ebp) <== NOT EXECUTED
127af1: e9 13 ff ff ff jmp 127a09 <rtems_rfs_rtems_eval_for_make+0x91><== NOT EXECUTED
127af6: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
127af8: 8a 40 01 mov 0x1(%eax),%al <== NOT EXECUTED
127afb: 84 c0 test %al,%al <== NOT EXECUTED
127afd: 0f 85 5d 01 00 00 jne 127c60 <rtems_rfs_rtems_eval_for_make+0x2e8><== NOT EXECUTED
{
if (*path)
127b03: 80 3b 00 cmpb $0x0,(%ebx) <== NOT EXECUTED
127b06: 0f 85 77 01 00 00 jne 127c83 <rtems_rfs_rtems_eval_for_make+0x30b><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: closing node", rc);
}
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
127b0c: 8b 45 c0 mov -0x40(%ebp),%eax <== NOT EXECUTED
127b0f: 0f b6 40 02 movzbl 0x2(%eax),%eax <== NOT EXECUTED
127b13: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
127b16: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
127b1b: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
127b20: 0f 85 fc 01 00 00 jne 127d22 <rtems_rfs_rtems_eval_for_make+0x3aa><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
}
if (!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_WX))
127b26: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127b29: 6a 03 push $0x3 <== NOT EXECUTED
127b2b: 8d 4d b4 lea -0x4c(%ebp),%ecx <== NOT EXECUTED
127b2e: 51 push %ecx <== NOT EXECUTED
127b2f: e8 e4 08 00 00 call 128418 <rtems_rfs_rtems_eval_perms><== NOT EXECUTED
127b34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127b37: 84 c0 test %al,%al <== NOT EXECUTED
127b39: 0f 84 92 00 00 00 je 127bd1 <rtems_rfs_rtems_eval_for_make+0x259><== NOT EXECUTED
}
/*
* Make sure the name does not already exists in the directory.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, *name, strlen (*name),
127b3f: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
127b42: 8b 11 mov (%ecx),%edx <== NOT EXECUTED
127b44: 31 c0 xor %eax,%eax <== NOT EXECUTED
127b46: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
127b4b: 89 d7 mov %edx,%edi <== NOT EXECUTED
127b4d: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
127b4f: f7 d1 not %ecx <== NOT EXECUTED
127b51: 49 dec %ecx <== NOT EXECUTED
127b52: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127b55: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
127b58: 50 push %eax <== NOT EXECUTED
127b59: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
127b5c: 50 push %eax <== NOT EXECUTED
127b5d: 51 push %ecx <== NOT EXECUTED
127b5e: 52 push %edx <== NOT EXECUTED
127b5f: 8d 45 b4 lea -0x4c(%ebp),%eax <== NOT EXECUTED
127b62: 50 push %eax <== NOT EXECUTED
127b63: 56 push %esi <== NOT EXECUTED
127b64: e8 27 72 01 00 call 13ed90 <rtems_rfs_dir_lookup_ino><== NOT EXECUTED
127b69: 89 c3 mov %eax,%ebx <== NOT EXECUTED
&node_ino, &doff);
if (rc == 0)
127b6b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
127b6e: 85 c0 test %eax,%eax <== NOT EXECUTED
127b70: 0f 84 1c 02 00 00 je 127d92 <rtems_rfs_rtems_eval_for_make+0x41a><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: found name", EEXIST);
}
if (rc != ENOENT)
127b76: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
127b79: 0f 84 19 01 00 00 je 127c98 <rtems_rfs_rtems_eval_for_make+0x320><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
127b7f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127b82: 8d 4d b4 lea -0x4c(%ebp),%ecx <== NOT EXECUTED
127b85: 51 push %ecx <== NOT EXECUTED
127b86: 56 push %esi <== NOT EXECUTED
127b87: e8 e4 9e 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
127b8c: 8b 7e 7c mov 0x7c(%esi),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
127b8f: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
127b92: e8 55 63 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
127b97: 5e pop %esi <== NOT EXECUTED
127b98: ff 37 pushl (%edi) <== NOT EXECUTED
127b9a: e8 55 b4 fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: look up", rc);
127b9f: e8 dc ff 01 00 call 147b80 <__errno> <== NOT EXECUTED
127ba4: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
127ba6: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
127bab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rc;
}
127bae: 89 d8 mov %ebx,%eax <== NOT EXECUTED
127bb0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
127bb3: 5b pop %ebx <== NOT EXECUTED
127bb4: 5e pop %esi <== NOT EXECUTED
127bb5: 5f pop %edi <== NOT EXECUTED
127bb6: c9 leave <== NOT EXECUTED
127bb7: c3 ret <== NOT EXECUTED
}
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
127bb8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127bbb: 6a 01 push $0x1 <== NOT EXECUTED
127bbd: 8d 4d b4 lea -0x4c(%ebp),%ecx <== NOT EXECUTED
127bc0: 51 push %ecx <== NOT EXECUTED
127bc1: e8 52 08 00 00 call 128418 <rtems_rfs_rtems_eval_perms><== NOT EXECUTED
127bc6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127bc9: 84 c0 test %al,%al <== NOT EXECUTED
127bcb: 0f 85 6c fe ff ff jne 127a3d <rtems_rfs_rtems_eval_for_make+0xc5><== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
}
if (!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_WX))
{
rtems_rfs_inode_close (fs, &inode);
127bd1: 50 push %eax <== NOT EXECUTED
127bd2: 50 push %eax <== NOT EXECUTED
127bd3: 8d 45 b4 lea -0x4c(%ebp),%eax <== NOT EXECUTED
127bd6: 50 push %eax <== NOT EXECUTED
127bd7: 56 push %esi <== NOT EXECUTED
127bd8: e8 93 9e 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
127bdd: 89 f0 mov %esi,%eax <== NOT EXECUTED
127bdf: e8 ac ee ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: cannot write", EACCES);
127be4: e8 97 ff 01 00 call 147b80 <__errno> <== NOT EXECUTED
127be9: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED
127bef: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
127bf2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127bf5: eb b7 jmp 127bae <rtems_rfs_rtems_eval_for_make+0x236><== NOT EXECUTED
127bf7: 90 nop <== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
127bf8: 8d 7b 02 lea 0x2(%ebx),%edi <== NOT EXECUTED
127bfb: 8a 43 02 mov 0x2(%ebx),%al <== NOT EXECUTED
127bfe: 84 c0 test %al,%al <== NOT EXECUTED
127c00: 0f 85 e0 00 00 00 jne 127ce6 <rtems_rfs_rtems_eval_for_make+0x36e><== NOT EXECUTED
{
/*
* If we are at the root inode of the file system we have a crossmount
* path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
127c06: 83 7d e4 01 cmpl $0x1,-0x1c(%ebp) <== NOT EXECUTED
127c0a: 0f 84 ab 01 00 00 je 127dbb <rtems_rfs_rtems_eval_for_make+0x443><== NOT EXECUTED
/*
* If not a directory give and up return. We cannot change dir from a
* regular file or device node.
*/
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
127c10: 8b 45 c0 mov -0x40(%ebp),%eax <== NOT EXECUTED
127c13: 0f b6 40 02 movzbl 0x2(%eax),%eax <== NOT EXECUTED
127c17: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
127c1a: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
127c1f: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
127c24: 0f 85 d6 01 00 00 jne 127e00 <rtems_rfs_rtems_eval_for_make+0x488><== NOT EXECUTED
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
127c2a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127c2d: 8d 55 dc lea -0x24(%ebp),%edx <== NOT EXECUTED
127c30: 52 push %edx <== NOT EXECUTED
127c31: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED
127c34: 51 push %ecx <== NOT EXECUTED
127c35: 6a 02 push $0x2 <== NOT EXECUTED
127c37: 68 03 33 16 00 push $0x163303 <== NOT EXECUTED
127c3c: 8d 45 b4 lea -0x4c(%ebp),%eax <== NOT EXECUTED
127c3f: 50 push %eax <== NOT EXECUTED
127c40: 56 push %esi <== NOT EXECUTED
127c41: e8 4a 71 01 00 call 13ed90 <rtems_rfs_dir_lookup_ino><== NOT EXECUTED
if (rc > 0)
127c46: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
127c49: 85 c0 test %eax,%eax <== NOT EXECUTED
127c4b: 0f 8e 85 fe ff ff jle 127ad6 <rtems_rfs_rtems_eval_for_make+0x15e><== NOT EXECUTED
127c51: 89 c7 mov %eax,%edi <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
127c53: 52 push %edx <== NOT EXECUTED
127c54: 52 push %edx <== NOT EXECUTED
127c55: 8d 55 b4 lea -0x4c(%ebp),%edx <== NOT EXECUTED
127c58: 52 push %edx <== NOT EXECUTED
127c59: e9 13 01 00 00 jmp 127d71 <rtems_rfs_rtems_eval_for_make+0x3f9><== NOT EXECUTED
127c5e: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
127c60: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
127c63: 0f be c0 movsbl %al,%eax <== NOT EXECUTED
127c66: 50 push %eax <== NOT EXECUTED
127c67: e8 60 83 fe ff call 10ffcc <rtems_filesystem_is_separator><== NOT EXECUTED
127c6c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127c6f: 85 c0 test %eax,%eax <== NOT EXECUTED
127c71: 8b 55 a0 mov -0x60(%ebp),%edx <== NOT EXECUTED
127c74: 0f 84 29 fe ff ff je 127aa3 <rtems_rfs_rtems_eval_for_make+0x12b><== NOT EXECUTED
{
if (*path)
127c7a: 80 3b 00 cmpb $0x0,(%ebx) <== NOT EXECUTED
127c7d: 0f 84 89 fe ff ff je 127b0c <rtems_rfs_rtems_eval_for_make+0x194><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
127c83: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127c86: 8d 45 b4 lea -0x4c(%ebp),%eax <== NOT EXECUTED
127c89: 50 push %eax <== NOT EXECUTED
127c8a: 56 push %esi <== NOT EXECUTED
127c8b: e8 e0 9d 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
continue;
127c90: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127c93: e9 56 fe ff ff jmp 127aee <rtems_rfs_rtems_eval_for_make+0x176><== NOT EXECUTED
/*
* Set the parent ino in the path location.
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
127c98: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
127c9b: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
127c9e: 89 02 mov %eax,(%edx) <== NOT EXECUTED
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
127ca0: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
127ca3: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
127ca6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127ca9: 8d 4d b4 lea -0x4c(%ebp),%ecx <== NOT EXECUTED
127cac: 51 push %ecx <== NOT EXECUTED
127cad: 52 push %edx <== NOT EXECUTED
127cae: e8 cd 06 00 00 call 128380 <rtems_rfs_rtems_set_handlers><== NOT EXECUTED
127cb3: 5a pop %edx <== NOT EXECUTED
127cb4: 59 pop %ecx <== NOT EXECUTED
127cb5: 3c 01 cmp $0x1,%al <== NOT EXECUTED
127cb7: 19 db sbb %ebx,%ebx <== NOT EXECUTED
127cb9: 83 e3 05 and $0x5,%ebx <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: parent ino:%" PRId32 " name:%s\n",
ino, *name);
rtems_rfs_inode_close (fs, &inode);
127cbc: 8d 45 b4 lea -0x4c(%ebp),%eax <== NOT EXECUTED
127cbf: 50 push %eax <== NOT EXECUTED
127cc0: 56 push %esi <== NOT EXECUTED
127cc1: e8 aa 9d 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
127cc6: 8b 7e 7c mov 0x7c(%esi),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
127cc9: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
127ccc: e8 1b 62 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
127cd1: 58 pop %eax <== NOT EXECUTED
127cd2: ff 37 pushl (%edi) <== NOT EXECUTED
127cd4: e8 1b b3 fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
127cd9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rc;
}
127cdc: 89 d8 mov %ebx,%eax <== NOT EXECUTED
127cde: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
127ce1: 5b pop %ebx <== NOT EXECUTED
127ce2: 5e pop %esi <== NOT EXECUTED
127ce3: 5f pop %edi <== NOT EXECUTED
127ce4: c9 leave <== NOT EXECUTED
127ce5: c3 ret <== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
127ce6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
127ce9: 0f be c0 movsbl %al,%eax <== NOT EXECUTED
127cec: 50 push %eax <== NOT EXECUTED
127ced: 89 55 a0 mov %edx,-0x60(%ebp) <== NOT EXECUTED
127cf0: e8 d7 82 fe ff call 10ffcc <rtems_filesystem_is_separator><== NOT EXECUTED
127cf5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127cf8: 85 c0 test %eax,%eax <== NOT EXECUTED
127cfa: 8b 55 a0 mov -0x60(%ebp),%edx <== NOT EXECUTED
127cfd: 0f 84 af fd ff ff je 127ab2 <rtems_rfs_rtems_eval_for_make+0x13a><== NOT EXECUTED
127d03: e9 fe fe ff ff jmp 127c06 <rtems_rfs_rtems_eval_for_make+0x28e><== NOT EXECUTED
127d08: 89 c3 mov %eax,%ebx <== NOT EXECUTED
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
127d0a: 89 f0 mov %esi,%eax <== NOT EXECUTED
127d0c: e8 7f ed ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: read ino", rc);
127d11: e8 6a fe 01 00 call 147b80 <__errno> <== NOT EXECUTED
127d16: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
127d18: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
127d1d: e9 8c fe ff ff jmp 127bae <rtems_rfs_rtems_eval_for_make+0x236><== NOT EXECUTED
}
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
127d22: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127d25: 8d 55 b4 lea -0x4c(%ebp),%edx <== NOT EXECUTED
127d28: 52 push %edx <== NOT EXECUTED
127d29: 56 push %esi <== NOT EXECUTED
127d2a: e8 41 9d 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
127d2f: 89 f0 mov %esi,%eax <== NOT EXECUTED
127d31: e8 5a ed ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
127d36: e8 45 fe 01 00 call 147b80 <__errno> <== NOT EXECUTED
127d3b: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
127d41: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
127d46: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127d49: e9 60 fe ff ff jmp 127bae <rtems_rfs_rtems_eval_for_make+0x236><== NOT EXECUTED
127d4e: 89 c7 mov %eax,%edi <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
127d50: 89 f0 mov %esi,%eax <== NOT EXECUTED
127d52: e8 39 ed ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: closing node", rc);
127d57: e8 24 fe 01 00 call 147b80 <__errno> <== NOT EXECUTED
127d5c: 89 38 mov %edi,(%eax) <== NOT EXECUTED
127d5e: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
127d63: e9 46 fe ff ff jmp 127bae <rtems_rfs_rtems_eval_for_make+0x236><== NOT EXECUTED
127d68: 89 c7 mov %eax,%edi <== NOT EXECUTED
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
node, node_len - stripped, &ino, &doff);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
127d6a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127d6d: 8d 4d b4 lea -0x4c(%ebp),%ecx <== NOT EXECUTED
127d70: 51 push %ecx <== NOT EXECUTED
127d71: 56 push %esi <== NOT EXECUTED
127d72: e8 f9 9c 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
127d77: 89 f0 mov %esi,%eax <== NOT EXECUTED
127d79: e8 12 ed ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: reading inode", rc);
127d7e: e8 fd fd 01 00 call 147b80 <__errno> <== NOT EXECUTED
127d83: 89 38 mov %edi,(%eax) <== NOT EXECUTED
127d85: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
127d8a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127d8d: e9 1c fe ff ff jmp 127bae <rtems_rfs_rtems_eval_for_make+0x236><== NOT EXECUTED
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, *name, strlen (*name),
&node_ino, &doff);
if (rc == 0)
{
rtems_rfs_inode_close (fs, &inode);
127d92: 57 push %edi <== NOT EXECUTED
127d93: 57 push %edi <== NOT EXECUTED
127d94: 8d 55 b4 lea -0x4c(%ebp),%edx <== NOT EXECUTED
127d97: 52 push %edx <== NOT EXECUTED
127d98: 56 push %esi <== NOT EXECUTED
127d99: e8 d2 9c 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
127d9e: 89 f0 mov %esi,%eax <== NOT EXECUTED
127da0: e8 eb ec ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: found name", EEXIST);
127da5: e8 d6 fd 01 00 call 147b80 <__errno> <== NOT EXECUTED
127daa: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED
127db0: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
127db3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127db6: e9 f3 fd ff ff jmp 127bae <rtems_rfs_rtems_eval_for_make+0x236><== NOT EXECUTED
{
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
127dbb: 53 push %ebx <== NOT EXECUTED
127dbc: 53 push %ebx <== NOT EXECUTED
127dbd: 8d 4d b4 lea -0x4c(%ebp),%ecx <== NOT EXECUTED
127dc0: 51 push %ecx <== NOT EXECUTED
127dc1: 56 push %esi <== NOT EXECUTED
127dc2: 89 7d a0 mov %edi,-0x60(%ebp) <== NOT EXECUTED
127dc5: e8 a6 9c 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
127dca: 89 f0 mov %esi,%eax <== NOT EXECUTED
127dcc: e8 bf ec ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
*pathloc = pathloc->mt_entry->mt_point_node;
127dd1: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
127dd4: 8b 70 10 mov 0x10(%eax),%esi <== NOT EXECUTED
127dd7: 83 c6 08 add $0x8,%esi <== NOT EXECUTED
127dda: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED
127ddf: 89 c7 mov %eax,%edi <== NOT EXECUTED
127de1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
127de3: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
127de6: 89 c1 mov %eax,%ecx <== NOT EXECUTED
127de8: 8b 40 0c mov 0xc(%eax),%eax <== NOT EXECUTED
127deb: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
127dee: 51 push %ecx <== NOT EXECUTED
127def: 8b 55 a0 mov -0x60(%ebp),%edx <== NOT EXECUTED
127df2: 52 push %edx <== NOT EXECUTED
127df3: ff 50 04 call *0x4(%eax) <== NOT EXECUTED
127df6: 89 c3 mov %eax,%ebx <== NOT EXECUTED
127df8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127dfb: e9 ae fd ff ff jmp 127bae <rtems_rfs_rtems_eval_for_make+0x236><== NOT EXECUTED
* If not a directory give and up return. We cannot change dir from a
* regular file or device node.
*/
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
127e00: 51 push %ecx <== NOT EXECUTED
127e01: 51 push %ecx <== NOT EXECUTED
127e02: 8d 45 b4 lea -0x4c(%ebp),%eax <== NOT EXECUTED
127e05: 50 push %eax <== NOT EXECUTED
127e06: 56 push %esi <== NOT EXECUTED
127e07: e8 64 9c 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
127e0c: 89 f0 mov %esi,%eax <== NOT EXECUTED
127e0e: e8 7d ec ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTSUP);
127e13: e8 68 fd 01 00 call 147b80 <__errno> <== NOT EXECUTED
127e18: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
127e1e: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
127e21: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127e24: e9 85 fd ff ff jmp 127bae <rtems_rfs_rtems_eval_for_make+0x236><== NOT EXECUTED
00126d8c <rtems_rfs_rtems_eval_path>:
int
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
126d8c: 55 push %ebp <== NOT EXECUTED
126d8d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
126d8f: 57 push %edi <== NOT EXECUTED
126d90: 56 push %esi <== NOT EXECUTED
126d91: 53 push %ebx <== NOT EXECUTED
126d92: 83 ec 64 sub $0x64,%esp <== NOT EXECUTED
126d95: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
126d98: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
126d9b: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
126d9e: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED
126da1: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
126da4: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
126da7: 8b 02 mov (%edx),%eax <== NOT EXECUTED
126da9: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
uint32_t doff = 0;
126dac: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
path, pathlen, ino);
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
126db3: 53 push %ebx <== NOT EXECUTED
126db4: 56 push %esi <== NOT EXECUTED
126db5: e8 d2 78 fe ff call 10e68c <rtems_filesystem_prefix_separators><== NOT EXECUTED
path += stripped;
126dba: 01 c6 add %eax,%esi <== NOT EXECUTED
126dbc: 89 75 b0 mov %esi,-0x50(%ebp) <== NOT EXECUTED
pathlen -= stripped;
126dbf: 29 c3 sub %eax,%ebx <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
126dc1: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
126dc4: 6a 00 push $0x0 <== NOT EXECUTED
126dc6: 6a 00 push $0x0 <== NOT EXECUTED
126dc8: 8b 4d b4 mov -0x4c(%ebp),%ecx <== NOT EXECUTED
126dcb: 8b 41 7c mov 0x7c(%ecx),%eax <== NOT EXECUTED
126dce: ff 30 pushl (%eax) <== NOT EXECUTED
126dd0: e8 23 c1 fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
126dd5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
126dd8: 6a 01 push $0x1 <== NOT EXECUTED
126dda: 8d 7d b8 lea -0x48(%ebp),%edi <== NOT EXECUTED
126ddd: 57 push %edi <== NOT EXECUTED
126dde: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
126de1: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
126de4: e8 0b ad 01 00 call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
126de9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126dec: 85 c0 test %eax,%eax <== NOT EXECUTED
126dee: 0f 8f 22 02 00 00 jg 127016 <rtems_rfs_rtems_eval_path+0x28a><== NOT EXECUTED
}
/*
* Is this the end of the pathname we where given ?
*/
if ((*path == '\0') || (pathlen == 0))
126df4: 8b 45 b0 mov -0x50(%ebp),%eax <== NOT EXECUTED
126df7: 8a 10 mov (%eax),%dl <== NOT EXECUTED
126df9: 84 d2 test %dl,%dl <== NOT EXECUTED
126dfb: 0f 84 e2 00 00 00 je 126ee3 <rtems_rfs_rtems_eval_path+0x157><== NOT EXECUTED
126e01: 85 db test %ebx,%ebx <== NOT EXECUTED
126e03: 0f 84 da 00 00 00 je 126ee3 <rtems_rfs_rtems_eval_path+0x157><== NOT EXECUTED
break;
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
126e09: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
126e0c: 0f b6 40 02 movzbl 0x2(%eax),%eax <== NOT EXECUTED
126e10: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
126e13: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
126e18: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
126e1d: 0f 84 1d 01 00 00 je 126f40 <rtems_rfs_rtems_eval_path+0x1b4><== NOT EXECUTED
126e23: 8b 75 b0 mov -0x50(%ebp),%esi <== NOT EXECUTED
126e26: 31 ff xor %edi,%edi <== NOT EXECUTED
126e28: eb 20 jmp 126e4a <rtems_rfs_rtems_eval_path+0xbe><== NOT EXECUTED
126e2a: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
126e2c: 80 3e 00 cmpb $0x0,(%esi) <== NOT EXECUTED
126e2f: 74 2c je 126e5d <rtems_rfs_rtems_eval_path+0xd1><== NOT EXECUTED
126e31: 85 db test %ebx,%ebx <== NOT EXECUTED
126e33: 0f 84 ff 00 00 00 je 126f38 <rtems_rfs_rtems_eval_path+0x1ac><== NOT EXECUTED
(*path != '\0') && pathlen &&
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
126e39: 8d 47 01 lea 0x1(%edi),%eax <== NOT EXECUTED
126e3c: 8b 55 b4 mov -0x4c(%ebp),%edx <== NOT EXECUTED
126e3f: 3b 42 18 cmp 0x18(%edx),%eax <== NOT EXECUTED
126e42: 73 19 jae 126e5d <rtems_rfs_rtems_eval_path+0xd1><== NOT EXECUTED
{
path++;
126e44: 46 inc %esi <== NOT EXECUTED
pathlen--;
126e45: 4b dec %ebx <== NOT EXECUTED
126e46: 8a 16 mov (%esi),%dl <== NOT EXECUTED
126e48: 89 c7 mov %eax,%edi <== NOT EXECUTED
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
126e4a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
126e4d: 0f be d2 movsbl %dl,%edx <== NOT EXECUTED
126e50: 52 push %edx <== NOT EXECUTED
126e51: e8 76 91 fe ff call 10ffcc <rtems_filesystem_is_separator><== NOT EXECUTED
126e56: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126e59: 85 c0 test %eax,%eax <== NOT EXECUTED
126e5b: 74 cf je 126e2c <rtems_rfs_rtems_eval_path+0xa0><== NOT EXECUTED
(*path != '\0') && pathlen &&
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
126e5d: 89 d8 mov %ebx,%eax <== NOT EXECUTED
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
126e5f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126e62: 50 push %eax <== NOT EXECUTED
126e63: 56 push %esi <== NOT EXECUTED
126e64: e8 23 78 fe ff call 10e68c <rtems_filesystem_prefix_separators><== NOT EXECUTED
126e69: 89 c2 mov %eax,%edx <== NOT EXECUTED
path += stripped;
126e6b: 01 c6 add %eax,%esi <== NOT EXECUTED
pathlen -= stripped;
126e6d: 29 c3 sub %eax,%ebx <== NOT EXECUTED
node_len += stripped;
126e6f: 8d 3c 38 lea (%eax,%edi,1),%edi <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
126e72: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126e75: 8b 4d b0 mov -0x50(%ebp),%ecx <== NOT EXECUTED
126e78: 80 39 2e cmpb $0x2e,(%ecx) <== NOT EXECUTED
126e7b: 74 4b je 126ec8 <rtems_rfs_rtems_eval_path+0x13c><== NOT EXECUTED
/*
* Look up the node name in this directory. If found drop through, close
* the current inode and let the loop open the inode so the mode can be
* read and handlers set.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
126e7d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126e80: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
126e83: 50 push %eax <== NOT EXECUTED
126e84: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED
126e87: 51 push %ecx <== NOT EXECUTED
126e88: 29 d7 sub %edx,%edi <== NOT EXECUTED
126e8a: 57 push %edi <== NOT EXECUTED
126e8b: ff 75 b0 pushl -0x50(%ebp) <== NOT EXECUTED
126e8e: 8d 7d b8 lea -0x48(%ebp),%edi <== NOT EXECUTED
126e91: 57 push %edi <== NOT EXECUTED
126e92: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
126e95: e8 f6 7e 01 00 call 13ed90 <rtems_rfs_dir_lookup_ino><== NOT EXECUTED
node, node_len - stripped, &ino, &doff);
if (rc > 0)
126e9a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
126e9d: 85 c0 test %eax,%eax <== NOT EXECUTED
126e9f: 0f 8f be 01 00 00 jg 127063 <rtems_rfs_rtems_eval_path+0x2d7><== NOT EXECUTED
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: down: path:%s ino:%" PRId32 "\n", node, ino);
}
rc = rtems_rfs_inode_close (fs, &inode);
126ea5: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126ea8: 8d 55 b8 lea -0x48(%ebp),%edx <== NOT EXECUTED
126eab: 52 push %edx <== NOT EXECUTED
126eac: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
126eaf: e8 bc ab 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
126eb4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126eb7: 85 c0 test %eax,%eax <== NOT EXECUTED
126eb9: 0f 8f 72 01 00 00 jg 127031 <rtems_rfs_rtems_eval_path+0x2a5><== NOT EXECUTED
126ebf: 89 75 b0 mov %esi,-0x50(%ebp) <== NOT EXECUTED
126ec2: e9 11 ff ff ff jmp 126dd8 <rtems_rfs_rtems_eval_path+0x4c><== NOT EXECUTED
126ec7: 90 nop <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
126ec8: 41 inc %ecx <== NOT EXECUTED
126ec9: 8b 45 b0 mov -0x50(%ebp),%eax <== NOT EXECUTED
126ecc: 8a 40 01 mov 0x1(%eax),%al <== NOT EXECUTED
126ecf: 88 45 a7 mov %al,-0x59(%ebp) <== NOT EXECUTED
126ed2: 84 c0 test %al,%al <== NOT EXECUTED
126ed4: 0f 85 89 00 00 00 jne 126f63 <rtems_rfs_rtems_eval_path+0x1d7><== NOT EXECUTED
{
if (*path)
126eda: 80 3e 00 cmpb $0x0,(%esi) <== NOT EXECUTED
126edd: 0f 85 fd 00 00 00 jne 126fe0 <rtems_rfs_rtems_eval_path+0x254><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
}
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
126ee3: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
126ee6: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
126ee9: 89 07 mov %eax,(%edi) <== NOT EXECUTED
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
126eeb: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
126eee: 89 47 04 mov %eax,0x4(%edi) <== NOT EXECUTED
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
126ef1: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126ef4: 8d 45 b8 lea -0x48(%ebp),%eax <== NOT EXECUTED
126ef7: 50 push %eax <== NOT EXECUTED
126ef8: 57 push %edi <== NOT EXECUTED
126ef9: e8 82 14 00 00 call 128380 <rtems_rfs_rtems_set_handlers><== NOT EXECUTED
126efe: 5a pop %edx <== NOT EXECUTED
126eff: 59 pop %ecx <== NOT EXECUTED
126f00: 3c 01 cmp $0x1,%al <== NOT EXECUTED
126f02: 19 db sbb %ebx,%ebx <== NOT EXECUTED
126f04: 83 e3 05 and $0x5,%ebx <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
126f07: 8d 55 b8 lea -0x48(%ebp),%edx <== NOT EXECUTED
126f0a: 52 push %edx <== NOT EXECUTED
126f0b: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
126f0e: e8 5d ab 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
126f13: 8b 4d b4 mov -0x4c(%ebp),%ecx <== NOT EXECUTED
126f16: 8b 71 7c mov 0x7c(%ecx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
126f19: 89 0c 24 mov %ecx,(%esp) <== NOT EXECUTED
126f1c: e8 cb 6f 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
126f21: 5f pop %edi <== NOT EXECUTED
126f22: ff 36 pushl (%esi) <== NOT EXECUTED
126f24: e8 cb c0 fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
126f29: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: ino:%" PRId32 "\n", ino);
return rc;
}
126f2c: 89 d8 mov %ebx,%eax <== NOT EXECUTED
126f2e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
126f31: 5b pop %ebx <== NOT EXECUTED
126f32: 5e pop %esi <== NOT EXECUTED
126f33: 5f pop %edi <== NOT EXECUTED
126f34: c9 leave <== NOT EXECUTED
126f35: c3 ret <== NOT EXECUTED
126f36: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
126f38: 31 c0 xor %eax,%eax <== NOT EXECUTED
126f3a: e9 20 ff ff ff jmp 126e5f <rtems_rfs_rtems_eval_path+0xd3><== NOT EXECUTED
126f3f: 90 nop <== NOT EXECUTED
break;
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
126f40: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126f43: 6a 01 push $0x1 <== NOT EXECUTED
126f45: 8d 55 b8 lea -0x48(%ebp),%edx <== NOT EXECUTED
126f48: 52 push %edx <== NOT EXECUTED
126f49: e8 ca 14 00 00 call 128418 <rtems_rfs_rtems_eval_perms><== NOT EXECUTED
126f4e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126f51: 84 c0 test %al,%al <== NOT EXECUTED
126f53: 0f 84 64 01 00 00 je 1270bd <rtems_rfs_rtems_eval_path+0x331><== NOT EXECUTED
126f59: 8b 4d b0 mov -0x50(%ebp),%ecx <== NOT EXECUTED
126f5c: 8a 11 mov (%ecx),%dl <== NOT EXECUTED
126f5e: e9 c0 fe ff ff jmp 126e23 <rtems_rfs_rtems_eval_path+0x97><== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
126f63: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
126f66: 0f be c0 movsbl %al,%eax <== NOT EXECUTED
126f69: 50 push %eax <== NOT EXECUTED
126f6a: 89 55 ac mov %edx,-0x54(%ebp) <== NOT EXECUTED
126f6d: 89 4d a8 mov %ecx,-0x58(%ebp) <== NOT EXECUTED
126f70: e8 57 90 fe ff call 10ffcc <rtems_filesystem_is_separator><== NOT EXECUTED
126f75: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126f78: 85 c0 test %eax,%eax <== NOT EXECUTED
126f7a: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED
126f7d: 8b 4d a8 mov -0x58(%ebp),%ecx <== NOT EXECUTED
126f80: 0f 85 54 ff ff ff jne 126eda <rtems_rfs_rtems_eval_path+0x14e><== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (node))
126f86: 8b 45 b0 mov -0x50(%ebp),%eax <== NOT EXECUTED
126f89: 80 38 2e cmpb $0x2e,(%eax) <== NOT EXECUTED
126f8c: 0f 85 eb fe ff ff jne 126e7d <rtems_rfs_rtems_eval_path+0xf1><== NOT EXECUTED
126f92: 80 39 2e cmpb $0x2e,(%ecx) <== NOT EXECUTED
126f95: 0f 85 e2 fe ff ff jne 126e7d <rtems_rfs_rtems_eval_path+0xf1><== NOT EXECUTED
126f9b: 8a 40 02 mov 0x2(%eax),%al <== NOT EXECUTED
126f9e: 84 c0 test %al,%al <== NOT EXECUTED
126fa0: 75 55 jne 126ff7 <rtems_rfs_rtems_eval_path+0x26b><== NOT EXECUTED
{
/*
* If we are at root inode of the file system we have a crossmount path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
126fa2: 83 7d e4 01 cmpl $0x1,-0x1c(%ebp) <== NOT EXECUTED
126fa6: 0f 84 bf 00 00 00 je 12706b <rtems_rfs_rtems_eval_path+0x2df><== NOT EXECUTED
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
126fac: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126faf: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
126fb2: 50 push %eax <== NOT EXECUTED
126fb3: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
126fb6: 52 push %edx <== NOT EXECUTED
126fb7: 6a 02 push $0x2 <== NOT EXECUTED
126fb9: 68 03 33 16 00 push $0x163303 <== NOT EXECUTED
126fbe: 8d 4d b8 lea -0x48(%ebp),%ecx <== NOT EXECUTED
126fc1: 51 push %ecx <== NOT EXECUTED
126fc2: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
126fc5: e8 c6 7d 01 00 call 13ed90 <rtems_rfs_dir_lookup_ino><== NOT EXECUTED
if (rc > 0)
126fca: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
126fcd: 85 c0 test %eax,%eax <== NOT EXECUTED
126fcf: 0f 8e d0 fe ff ff jle 126ea5 <rtems_rfs_rtems_eval_path+0x119><== NOT EXECUTED
126fd5: 89 c6 mov %eax,%esi <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
126fd7: 53 push %ebx <== NOT EXECUTED
126fd8: 53 push %ebx <== NOT EXECUTED
126fd9: 8d 7d b8 lea -0x48(%ebp),%edi <== NOT EXECUTED
126fdc: 57 push %edi <== NOT EXECUTED
126fdd: eb 5b jmp 12703a <rtems_rfs_rtems_eval_path+0x2ae><== NOT EXECUTED
126fdf: 90 nop <== NOT EXECUTED
*/
if (rtems_rfs_current_dir (node))
{
if (*path)
{
rtems_rfs_inode_close (fs, &inode);
126fe0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126fe3: 8d 55 b8 lea -0x48(%ebp),%edx <== NOT EXECUTED
126fe6: 52 push %edx <== NOT EXECUTED
126fe7: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
126fea: e8 81 aa 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
continue;
126fef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126ff2: e9 c8 fe ff ff jmp 126ebf <rtems_rfs_rtems_eval_path+0x133><== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (node))
126ff7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
126ffa: 0f be c0 movsbl %al,%eax <== NOT EXECUTED
126ffd: 50 push %eax <== NOT EXECUTED
126ffe: 89 55 ac mov %edx,-0x54(%ebp) <== NOT EXECUTED
127001: e8 c6 8f fe ff call 10ffcc <rtems_filesystem_is_separator><== NOT EXECUTED
127006: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127009: 85 c0 test %eax,%eax <== NOT EXECUTED
12700b: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED
12700e: 0f 84 69 fe ff ff je 126e7d <rtems_rfs_rtems_eval_path+0xf1><== NOT EXECUTED
127014: eb 8c jmp 126fa2 <rtems_rfs_rtems_eval_path+0x216><== NOT EXECUTED
127016: 89 c6 mov %eax,%esi <== NOT EXECUTED
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
127018: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
12701b: e8 70 fa ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_path: opening inode", rc);
127020: e8 5b 0b 02 00 call 147b80 <__errno> <== NOT EXECUTED
127025: 89 30 mov %esi,(%eax) <== NOT EXECUTED
127027: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
12702c: e9 fb fe ff ff jmp 126f2c <rtems_rfs_rtems_eval_path+0x1a0><== NOT EXECUTED
127031: 89 c6 mov %eax,%esi <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
127033: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127036: 8d 4d b8 lea -0x48(%ebp),%ecx <== NOT EXECUTED
127039: 51 push %ecx <== NOT EXECUTED
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
node, node_len - stripped, &ino, &doff);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
12703a: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
12703d: e8 2e aa 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
127042: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
127045: e8 46 fa ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return ((errno = rc) == 0) ? 0 : -1;
12704a: e8 31 0b 02 00 call 147b80 <__errno> <== NOT EXECUTED
12704f: 89 30 mov %esi,(%eax) <== NOT EXECUTED
127051: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
127056: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: ino:%" PRId32 "\n", ino);
return rc;
}
127059: 89 d8 mov %ebx,%eax <== NOT EXECUTED
12705b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12705e: 5b pop %ebx <== NOT EXECUTED
12705f: 5e pop %esi <== NOT EXECUTED
127060: 5f pop %edi <== NOT EXECUTED
127061: c9 leave <== NOT EXECUTED
127062: c3 ret <== NOT EXECUTED
127063: 89 c6 mov %eax,%esi <== NOT EXECUTED
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
node, node_len - stripped, &ino, &doff);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
127065: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127068: 57 push %edi <== NOT EXECUTED
127069: eb cf jmp 12703a <rtems_rfs_rtems_eval_path+0x2ae><== NOT EXECUTED
12706b: 89 fa mov %edi,%edx <== NOT EXECUTED
12706d: 89 75 b0 mov %esi,-0x50(%ebp) <== NOT EXECUTED
if (ino == RTEMS_RFS_ROOT_INO)
{
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
127070: 56 push %esi <== NOT EXECUTED
127071: 56 push %esi <== NOT EXECUTED
127072: 8d 7d b8 lea -0x48(%ebp),%edi <== NOT EXECUTED
127075: 57 push %edi <== NOT EXECUTED
127076: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
127079: 89 55 ac mov %edx,-0x54(%ebp) <== NOT EXECUTED
12707c: e8 ef a9 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
127081: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
127084: e8 07 fa ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
*pathloc = pathloc->mt_entry->mt_point_node;
127089: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
12708c: 8b 70 10 mov 0x10(%eax),%esi <== NOT EXECUTED
12708f: 83 c6 08 add $0x8,%esi <== NOT EXECUTED
127092: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED
127097: 89 c7 mov %eax,%edi <== NOT EXECUTED
127099: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
12709b: 89 c1 mov %eax,%ecx <== NOT EXECUTED
12709d: 8b 40 0c mov 0xc(%eax),%eax <== NOT EXECUTED
1270a0: 51 push %ecx <== NOT EXECUTED
1270a1: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
1270a4: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED
1270a7: 8d 1c 1a lea (%edx,%ebx,1),%ebx <== NOT EXECUTED
1270aa: 53 push %ebx <== NOT EXECUTED
1270ab: 8b 7d b0 mov -0x50(%ebp),%edi <== NOT EXECUTED
1270ae: 29 d7 sub %edx,%edi <== NOT EXECUTED
1270b0: 57 push %edi <== NOT EXECUTED
1270b1: ff 10 call *(%eax) <== NOT EXECUTED
1270b3: 89 c3 mov %eax,%ebx <== NOT EXECUTED
1270b5: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1270b8: e9 6f fe ff ff jmp 126f2c <rtems_rfs_rtems_eval_path+0x1a0><== NOT EXECUTED
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
{
rtems_rfs_inode_close (fs, &inode);
1270bd: 57 push %edi <== NOT EXECUTED
1270be: 57 push %edi <== NOT EXECUTED
1270bf: 8d 7d b8 lea -0x48(%ebp),%edi <== NOT EXECUTED
1270c2: 57 push %edi <== NOT EXECUTED
1270c3: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
1270c6: e8 a5 a9 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1270cb: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
1270ce: e8 bd f9 ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_path: eval perms", EACCES);
1270d3: e8 a8 0a 02 00 call 147b80 <__errno> <== NOT EXECUTED
1270d8: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED
1270de: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
1270e1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1270e4: e9 43 fe ff ff jmp 126f2c <rtems_rfs_rtems_eval_path+0x1a0><== NOT EXECUTED
00128418 <rtems_rfs_rtems_eval_perms>:
#include "rtems-rfs-rtems.h"
bool
rtems_rfs_rtems_eval_perms (rtems_rfs_inode_handle* inode, int flags)
{
128418: 55 push %ebp <== NOT EXECUTED
128419: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12841b: 57 push %edi <== NOT EXECUTED
12841c: 56 push %esi <== NOT EXECUTED
12841d: 53 push %ebx <== NOT EXECUTED
12841e: 83 ec 4c sub $0x4c,%esp <== NOT EXECUTED
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
128421: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
128424: 8b 40 0c mov 0xc(%eax),%eax <== NOT EXECUTED
128427: 8d 50 04 lea 0x4(%eax),%edx <== NOT EXECUTED
12842a: 8a 4a 02 mov 0x2(%edx),%cl <== NOT EXECUTED
12842d: 88 4d b8 mov %cl,-0x48(%ebp) <== NOT EXECUTED
128430: 8a 4a 03 mov 0x3(%edx),%cl <== NOT EXECUTED
128433: 88 4d b7 mov %cl,-0x49(%ebp) <== NOT EXECUTED
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
128436: 8a 48 04 mov 0x4(%eax),%cl <== NOT EXECUTED
128439: 88 4d d8 mov %cl,-0x28(%ebp) <== NOT EXECUTED
12843c: 8a 52 01 mov 0x1(%edx),%dl <== NOT EXECUTED
12843f: 88 55 d7 mov %dl,-0x29(%ebp) <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
128442: 0f b6 70 02 movzbl 0x2(%eax),%esi <== NOT EXECUTED
128446: 0f b6 78 03 movzbl 0x3(%eax),%edi <== NOT EXECUTED
uid = rtems_rfs_inode_get_uid (inode);
gid = rtems_rfs_inode_get_gid (inode);
mode = rtems_rfs_inode_get_mode (inode);
#if defined (RTEMS_POSIX_API)
st_uid = geteuid ();
12844a: e8 e5 63 00 00 call 12e834 <geteuid> <== NOT EXECUTED
12844f: 89 c3 mov %eax,%ebx <== NOT EXECUTED
st_gid = getegid ();
128451: e8 ce 63 00 00 call 12e824 <getegid> <== NOT EXECUTED
/*
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
128456: 66 85 db test %bx,%bx <== NOT EXECUTED
128459: 74 2d je 128488 <rtems_rfs_rtems_eval_perms+0x70><== NOT EXECUTED
12845b: 8a 55 b8 mov -0x48(%ebp),%dl <== NOT EXECUTED
12845e: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
128461: 0f b6 4d b7 movzbl -0x49(%ebp),%ecx <== NOT EXECUTED
128465: 09 ca or %ecx,%edx <== NOT EXECUTED
128467: 66 39 d3 cmp %dx,%bx <== NOT EXECUTED
12846a: 74 4c je 1284b8 <rtems_rfs_rtems_eval_perms+0xa0><== NOT EXECUTED
12846c: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
flags_to_test |= flags << 6;
if ((st_uid == 0) || (st_gid == gid))
12846f: 8a 4d d8 mov -0x28(%ebp),%cl <== NOT EXECUTED
128472: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
128475: 0f b6 5d d7 movzbl -0x29(%ebp),%ebx <== NOT EXECUTED
128479: c1 e3 10 shl $0x10,%ebx <== NOT EXECUTED
12847c: 09 d9 or %ebx,%ecx <== NOT EXECUTED
12847e: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
128481: 66 39 c8 cmp %cx,%ax <== NOT EXECUTED
128484: 75 13 jne 128499 <rtems_rfs_rtems_eval_perms+0x81><== NOT EXECUTED
128486: eb 09 jmp 128491 <rtems_rfs_rtems_eval_perms+0x79><== NOT EXECUTED
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
flags_to_test |= flags << 6;
128488: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
12848b: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED
12848e: 0b 55 0c or 0xc(%ebp),%edx <== NOT EXECUTED
if ((st_uid == 0) || (st_gid == gid))
flags_to_test |= flags << 3;
128491: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
128494: c1 e0 03 shl $0x3,%eax <== NOT EXECUTED
128497: 09 c2 or %eax,%edx <== NOT EXECUTED
128499: c1 e6 08 shl $0x8,%esi <== NOT EXECUTED
12849c: 81 e7 ff 00 00 00 and $0xff,%edi <== NOT EXECUTED
1284a2: 09 fe or %edi,%esi <== NOT EXECUTED
1284a4: 81 e6 ff 01 00 00 and $0x1ff,%esi <== NOT EXECUTED
1284aa: 85 d6 test %edx,%esi <== NOT EXECUTED
1284ac: 0f 95 c0 setne %al <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PERMS))
printf("rtems-rfs: eval-perms: perms failed\n");
return false;
}
1284af: 83 c4 4c add $0x4c,%esp <== NOT EXECUTED
1284b2: 5b pop %ebx <== NOT EXECUTED
1284b3: 5e pop %esi <== NOT EXECUTED
1284b4: 5f pop %edi <== NOT EXECUTED
1284b5: c9 leave <== NOT EXECUTED
1284b6: c3 ret <== NOT EXECUTED
1284b7: 90 nop <== NOT EXECUTED
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
flags_to_test |= flags << 6;
1284b8: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
1284bb: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED
1284be: 0b 55 0c or 0xc(%ebp),%edx <== NOT EXECUTED
1284c1: eb ac jmp 12846f <rtems_rfs_rtems_eval_perms+0x57><== NOT EXECUTED
00127fe4 <rtems_rfs_rtems_fchmod>:
* @return int
*/
int
rtems_rfs_rtems_fchmod (rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
127fe4: 55 push %ebp <== NOT EXECUTED
127fe5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
127fe7: 57 push %edi <== NOT EXECUTED
127fe8: 56 push %esi <== NOT EXECUTED
127fe9: 53 push %ebx <== NOT EXECUTED
127fea: 83 ec 50 sub $0x50,%esp <== NOT EXECUTED
127fed: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
127ff0: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
127ff3: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
127ff6: 8b 38 mov (%eax),%edi <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
127ff8: 6a 00 push $0x0 <== NOT EXECUTED
127ffa: 6a 00 push $0x0 <== NOT EXECUTED
127ffc: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
127fff: ff 30 pushl (%eax) <== NOT EXECUTED
128001: e8 f2 ae fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
printf ("rtems-rfs-rtems: fchmod: in: ino:%" PRId32 " mode:%06" PRIomode_t "\n",
ino, mode);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
128006: 6a 01 push $0x1 <== NOT EXECUTED
128008: 8d 75 c0 lea -0x40(%ebp),%esi <== NOT EXECUTED
12800b: 56 push %esi <== NOT EXECUTED
12800c: 57 push %edi <== NOT EXECUTED
12800d: 53 push %ebx <== NOT EXECUTED
12800e: e8 e1 9a 01 00 call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
128013: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc)
128015: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
128018: 85 c0 test %eax,%eax <== NOT EXECUTED
12801a: 74 2c je 128048 <rtems_rfs_rtems_fchmod+0x64><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
12801c: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
12801f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
128022: 53 push %ebx <== NOT EXECUTED
128023: e8 c4 5e 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
128028: 5a pop %edx <== NOT EXECUTED
128029: ff 36 pushl (%esi) <== NOT EXECUTED
12802b: e8 c4 af fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: opening inode", rc);
128030: e8 4b fb 01 00 call 147b80 <__errno> <== NOT EXECUTED
128035: 89 38 mov %edi,(%eax) <== NOT EXECUTED
128037: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12803c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
12803f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
128042: 5b pop %ebx <== NOT EXECUTED
128043: 5e pop %esi <== NOT EXECUTED
128044: 5f pop %edi <== NOT EXECUTED
128045: c9 leave <== NOT EXECUTED
128046: c3 ret <== NOT EXECUTED
128047: 90 nop <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
128048: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
12804b: 8a 40 02 mov 0x2(%eax),%al <== NOT EXECUTED
12804e: 88 45 a8 mov %al,-0x58(%ebp) <== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
128051: e8 de 67 00 00 call 12e834 <geteuid> <== NOT EXECUTED
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
128056: 8b 7d cc mov -0x34(%ebp),%edi <== NOT EXECUTED
128059: 8d 4f 04 lea 0x4(%edi),%ecx <== NOT EXECUTED
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
12805c: 0f b6 51 02 movzbl 0x2(%ecx),%edx <== NOT EXECUTED
128060: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
128063: 0f b6 49 03 movzbl 0x3(%ecx),%ecx <== NOT EXECUTED
128067: 09 ca or %ecx,%edx <== NOT EXECUTED
128069: 66 39 d0 cmp %dx,%ax <== NOT EXECUTED
12806c: 74 09 je 128077 <rtems_rfs_rtems_fchmod+0x93><== NOT EXECUTED
12806e: 66 85 c0 test %ax,%ax <== NOT EXECUTED
128071: 0f 85 8a 00 00 00 jne 128101 <rtems_rfs_rtems_fchmod+0x11d><== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
128077: 8a 45 a8 mov -0x58(%ebp),%al <== NOT EXECUTED
12807a: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: not owner", EPERM);
}
#endif
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
12807d: 25 00 f0 ff ff and $0xfffff000,%eax <== NOT EXECUTED
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
128082: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
128085: 81 e2 ff 0f 00 00 and $0xfff,%edx <== NOT EXECUTED
12808b: 09 d0 or %edx,%eax <== NOT EXECUTED
* @prarm mode The mode.
*/
static inline void
rtems_rfs_inode_set_mode (rtems_rfs_inode_handle* handle, uint16_t mode)
{
rtems_rfs_write_u16 (&handle->node->mode, mode);
12808d: 89 c2 mov %eax,%edx <== NOT EXECUTED
12808f: 66 c1 ea 08 shr $0x8,%dx <== NOT EXECUTED
128093: 88 57 02 mov %dl,0x2(%edi) <== NOT EXECUTED
128096: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
128099: 88 42 03 mov %al,0x3(%edx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
12809c: c6 45 d0 01 movb $0x1,-0x30(%ebp) <== NOT EXECUTED
rtems_rfs_inode_set_mode (&inode, imode);
rc = rtems_rfs_inode_close (fs, &inode);
1280a0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1280a3: 56 push %esi <== NOT EXECUTED
1280a4: 53 push %ebx <== NOT EXECUTED
1280a5: e8 c6 99 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
1280aa: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
1280ac: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1280af: 85 c0 test %eax,%eax <== NOT EXECUTED
1280b1: 7e 2d jle 1280e0 <rtems_rfs_rtems_fchmod+0xfc><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1280b3: 8b 7b 7c mov 0x7c(%ebx),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1280b6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1280b9: 53 push %ebx <== NOT EXECUTED
1280ba: e8 2d 5e 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
1280bf: 58 pop %eax <== NOT EXECUTED
1280c0: ff 37 pushl (%edi) <== NOT EXECUTED
1280c2: e8 2d af fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
1280c7: e8 b4 fa 01 00 call 147b80 <__errno> <== NOT EXECUTED
1280cc: 89 30 mov %esi,(%eax) <== NOT EXECUTED
1280ce: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1280d3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
1280d6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1280d9: 5b pop %ebx <== NOT EXECUTED
1280da: 5e pop %esi <== NOT EXECUTED
1280db: 5f pop %edi <== NOT EXECUTED
1280dc: c9 leave <== NOT EXECUTED
1280dd: c3 ret <== NOT EXECUTED
1280de: 66 90 xchg %ax,%ax <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1280e0: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1280e3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1280e6: 53 push %ebx <== NOT EXECUTED
1280e7: e8 00 5e 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
1280ec: 5b pop %ebx <== NOT EXECUTED
1280ed: ff 36 pushl (%esi) <== NOT EXECUTED
1280ef: e8 00 af fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
1280f4: 31 c0 xor %eax,%eax <== NOT EXECUTED
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
1280f6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1280f9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1280fc: 5b pop %ebx <== NOT EXECUTED
1280fd: 5e pop %esi <== NOT EXECUTED
1280fe: 5f pop %edi <== NOT EXECUTED
1280ff: c9 leave <== NOT EXECUTED
128100: c3 ret <== NOT EXECUTED
#if defined (RTEMS_POSIX_API)
uid = geteuid();
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
{
rtems_rfs_inode_close (fs, &inode);
128101: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
128104: 56 push %esi <== NOT EXECUTED
128105: 53 push %ebx <== NOT EXECUTED
128106: e8 65 99 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
12810b: 89 d8 mov %ebx,%eax <== NOT EXECUTED
12810d: e8 7e e9 ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("fchmod: not owner", EPERM);
128112: e8 69 fa 01 00 call 147b80 <__errno> <== NOT EXECUTED
128117: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
12811d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
128122: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128125: e9 15 ff ff ff jmp 12803f <rtems_rfs_rtems_fchmod+0x5b><== NOT EXECUTED
00126a88 <rtems_rfs_rtems_fcntl>:
*/
int
rtems_rfs_rtems_fcntl (int cmd,
rtems_libio_t* iop)
{
126a88: 55 push %ebp <== NOT EXECUTED
126a89: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return 0;
}
126a8b: 31 c0 xor %eax,%eax <== NOT EXECUTED
126a8d: c9 leave <== NOT EXECUTED
126a8e: c3 ret <== NOT EXECUTED
00126d50 <rtems_rfs_rtems_fdatasync>:
* @param iop
* @return int
*/
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
126d50: 55 push %ebp <== NOT EXECUTED
126d51: 89 e5 mov %esp,%ebp <== NOT EXECUTED
126d53: 53 push %ebx <== NOT EXECUTED
126d54: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
126d57: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
126d5a: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED
126d5d: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED
126d60: e8 c7 71 01 00 call 13df2c <rtems_rfs_buffer_sync> <== NOT EXECUTED
126d65: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc)
126d67: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126d6a: 85 c0 test %eax,%eax <== NOT EXECUTED
126d6c: 75 0a jne 126d78 <rtems_rfs_rtems_fdatasync+0x28><== NOT EXECUTED
126d6e: 31 c0 xor %eax,%eax <== NOT EXECUTED
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
return 0;
}
126d70: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
126d73: c9 leave <== NOT EXECUTED
126d74: c3 ret <== NOT EXECUTED
126d75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
if (rc)
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
126d78: e8 03 0e 02 00 call 147b80 <__errno> <== NOT EXECUTED
126d7d: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
126d7f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return 0;
}
126d84: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
126d87: c9 leave <== NOT EXECUTED
126d88: c3 ret <== NOT EXECUTED
00142d48 <rtems_rfs_rtems_file_close>:
* @param iop
* @return int
*/
static int
rtems_rfs_rtems_file_close (rtems_libio_t* iop)
{
142d48: 55 push %ebp <== NOT EXECUTED
142d49: 89 e5 mov %esp,%ebp <== NOT EXECUTED
142d4b: 57 push %edi <== NOT EXECUTED
142d4c: 56 push %esi <== NOT EXECUTED
142d4d: 53 push %ebx <== NOT EXECUTED
142d4e: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
142d51: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
142d54: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_file_fs (file);
142d57: 8b 46 1c mov 0x1c(%esi),%eax <== NOT EXECUTED
142d5a: 8b 98 98 00 00 00 mov 0x98(%eax),%ebx <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
142d60: 6a 00 push $0x0 <== NOT EXECUTED
142d62: 6a 00 push $0x0 <== NOT EXECUTED
142d64: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
142d67: ff 30 pushl (%eax) <== NOT EXECUTED
142d69: e8 8a 01 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_CLOSE))
printf("rtems-rfs: file-close: handle:%p\n", file);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_file_close (fs, file);
142d6e: 5f pop %edi <== NOT EXECUTED
142d6f: 58 pop %eax <== NOT EXECUTED
142d70: 56 push %esi <== NOT EXECUTED
142d71: 53 push %ebx <== NOT EXECUTED
142d72: e8 21 cc ff ff call 13f998 <rtems_rfs_file_close> <== NOT EXECUTED
142d77: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
142d79: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142d7c: 85 c0 test %eax,%eax <== NOT EXECUTED
142d7e: 7e 0c jle 142d8c <rtems_rfs_rtems_file_close+0x44><== NOT EXECUTED
rc = rtems_rfs_rtems_error ("file-close: file close", rc);
142d80: e8 fb 4d 00 00 call 147b80 <__errno> <== NOT EXECUTED
142d85: 89 30 mov %esi,(%eax) <== NOT EXECUTED
142d87: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
142d8c: 8b 7b 7c mov 0x7c(%ebx),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
142d8f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
142d92: 53 push %ebx <== NOT EXECUTED
142d93: e8 54 b1 ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
142d98: 5b pop %ebx <== NOT EXECUTED
142d99: ff 37 pushl (%edi) <== NOT EXECUTED
142d9b: e8 54 02 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rc;
}
142da0: 89 f0 mov %esi,%eax <== NOT EXECUTED
142da2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
142da5: 5b pop %ebx <== NOT EXECUTED
142da6: 5e pop %esi <== NOT EXECUTED
142da7: 5f pop %edi <== NOT EXECUTED
142da8: c9 leave <== NOT EXECUTED
142da9: c3 ret <== NOT EXECUTED
00142dac <rtems_rfs_rtems_file_ftruncate>:
* @return int
*/
int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
rtems_off64_t length)
{
142dac: 55 push %ebp <== NOT EXECUTED
142dad: 89 e5 mov %esp,%ebp <== NOT EXECUTED
142daf: 57 push %edi <== NOT EXECUTED
142db0: 56 push %esi <== NOT EXECUTED
142db1: 53 push %ebx <== NOT EXECUTED
142db2: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED
142db5: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
142db8: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
142dbb: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
142dbe: 8b 5f 38 mov 0x38(%edi),%ebx <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
142dc1: 6a 00 push $0x0 <== NOT EXECUTED
142dc3: 6a 00 push $0x0 <== NOT EXECUTED
142dc5: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
142dc8: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
142dce: 8b 40 7c mov 0x7c(%eax),%eax <== NOT EXECUTED
142dd1: ff 30 pushl (%eax) <== NOT EXECUTED
142dd3: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
142dd6: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED
142dd9: e8 1a 01 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%Ld\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
rc = rtems_rfs_file_set_size (file, length);
142dde: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
142de1: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
142de4: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
142de7: 51 push %ecx <== NOT EXECUTED
142de8: 52 push %edx <== NOT EXECUTED
142de9: 53 push %ebx <== NOT EXECUTED
142dea: e8 09 c6 ff ff call 13f3f8 <rtems_rfs_file_set_size><== NOT EXECUTED
142def: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc)
142df1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142df4: 85 c0 test %eax,%eax <== NOT EXECUTED
142df6: 74 0c je 142e04 <rtems_rfs_rtems_file_ftruncate+0x58><== NOT EXECUTED
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
142df8: e8 83 4d 00 00 call 147b80 <__errno> <== NOT EXECUTED
142dfd: 89 30 mov %esi,(%eax) <== NOT EXECUTED
142dff: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
142e04: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
142e07: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
142e0a: 8d 90 84 00 00 00 lea 0x84(%eax),%edx <== NOT EXECUTED
142e10: 52 push %edx <== NOT EXECUTED
142e11: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
142e17: e8 40 a3 ff ff call 13d15c <rtems_rfs_block_get_size><== NOT EXECUTED
142e1c: 89 47 04 mov %eax,0x4(%edi) <== NOT EXECUTED
142e1f: 89 57 08 mov %edx,0x8(%edi) <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
142e22: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
142e25: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
142e2b: 8b 58 7c mov 0x7c(%eax),%ebx <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
142e2e: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
142e31: e8 b6 b0 ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
142e36: 5a pop %edx <== NOT EXECUTED
142e37: ff 33 pushl (%ebx) <== NOT EXECUTED
142e39: e8 b6 01 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rc;
}
142e3e: 89 f0 mov %esi,%eax <== NOT EXECUTED
142e40: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
142e43: 5b pop %ebx <== NOT EXECUTED
142e44: 5e pop %esi <== NOT EXECUTED
142e45: 5f pop %edi <== NOT EXECUTED
142e46: c9 leave <== NOT EXECUTED
142e47: c3 ret <== NOT EXECUTED
00142c34 <rtems_rfs_rtems_file_ioctl>:
* @param buffer
*/
int
rtems_rfs_rtems_file_ioctl (rtems_libio_t* iop, uint32_t command, void* buffer)
{
142c34: 55 push %ebp <== NOT EXECUTED
142c35: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return 0;
}
142c37: 31 c0 xor %eax,%eax <== NOT EXECUTED
142c39: c9 leave <== NOT EXECUTED
142c3a: c3 ret <== NOT EXECUTED
00143018 <rtems_rfs_rtems_file_lseek>:
*/
rtems_off64_t
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
143018: 55 push %ebp <== NOT EXECUTED
143019: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14301b: 57 push %edi <== NOT EXECUTED
14301c: 56 push %esi <== NOT EXECUTED
14301d: 53 push %ebx <== NOT EXECUTED
14301e: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED
143021: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
143024: 8b 5e 38 mov 0x38(%esi),%ebx <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
143027: 6a 00 push $0x0 <== NOT EXECUTED
143029: 6a 00 push $0x0 <== NOT EXECUTED
14302b: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
14302e: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
143034: 8b 40 7c mov 0x7c(%eax),%eax <== NOT EXECUTED
143037: ff 30 pushl (%eax) <== NOT EXECUTED
143039: e8 ba fe fc ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%Ld\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
14303e: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED
143041: 8b 56 10 mov 0x10(%esi),%edx <== NOT EXECUTED
143044: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
143047: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
rc = rtems_rfs_file_seek (file, pos, &pos);
14304a: 8d 4d e0 lea -0x20(%ebp),%ecx <== NOT EXECUTED
14304d: 51 push %ecx <== NOT EXECUTED
14304e: 52 push %edx <== NOT EXECUTED
14304f: 50 push %eax <== NOT EXECUTED
143050: 53 push %ebx <== NOT EXECUTED
143051: e8 e6 c6 ff ff call 13f73c <rtems_rfs_file_seek> <== NOT EXECUTED
143056: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc)
143058: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
14305b: 85 c0 test %eax,%eax <== NOT EXECUTED
14305d: 74 39 je 143098 <rtems_rfs_rtems_file_lseek+0x80><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
14305f: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
143062: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
143068: 8b 58 7c mov 0x7c(%eax),%ebx <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
14306b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
14306e: 50 push %eax <== NOT EXECUTED
14306f: e8 78 ae ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
143074: 58 pop %eax <== NOT EXECUTED
143075: ff 33 pushl (%ebx) <== NOT EXECUTED
143077: e8 78 ff fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rtems_rfs_rtems_error ("file_lseek: lseek", rc);
14307c: e8 ff 4a 00 00 call 147b80 <__errno> <== NOT EXECUTED
143081: 89 38 mov %edi,(%eax) <== NOT EXECUTED
143083: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
143088: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
14308d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return iop->offset;
}
143090: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
143093: 5b pop %ebx <== NOT EXECUTED
143094: 5e pop %esi <== NOT EXECUTED
143095: 5f pop %edi <== NOT EXECUTED
143096: c9 leave <== NOT EXECUTED
143097: c3 ret <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file_lseek: lseek", rc);
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
143098: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
14309b: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1430a1: 8b 58 7c mov 0x7c(%eax),%ebx <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1430a4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1430a7: 50 push %eax <== NOT EXECUTED
1430a8: e8 3f ae ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
1430ad: 5f pop %edi <== NOT EXECUTED
1430ae: ff 33 pushl (%ebx) <== NOT EXECUTED
1430b0: e8 3f ff fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return iop->offset;
1430b5: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED
1430b8: 8b 56 10 mov 0x10(%esi),%edx <== NOT EXECUTED
1430bb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1430be: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1430c1: 5b pop %ebx <== NOT EXECUTED
1430c2: 5e pop %esi <== NOT EXECUTED
1430c3: 5f pop %edi <== NOT EXECUTED
1430c4: c9 leave <== NOT EXECUTED
1430c5: c3 ret <== NOT EXECUTED
001430c8 <rtems_rfs_rtems_file_open>:
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
1430c8: 55 push %ebp <== NOT EXECUTED
1430c9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1430cb: 57 push %edi <== NOT EXECUTED
1430cc: 56 push %esi <== NOT EXECUTED
1430cd: 53 push %ebx <== NOT EXECUTED
1430ce: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED
1430d1: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
1430d4: 8b 46 28 mov 0x28(%esi),%eax <== NOT EXECUTED
1430d7: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
1430da: 6a 00 push $0x0 <== NOT EXECUTED
1430dc: 6a 00 push $0x0 <== NOT EXECUTED
1430de: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
1430e1: ff 30 pushl (%eax) <== NOT EXECUTED
1430e3: e8 10 fe fc ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
1430e8: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
1430eb: 50 push %eax <== NOT EXECUTED
1430ec: 6a 00 push $0x0 <== NOT EXECUTED
1430ee: ff 76 38 pushl 0x38(%esi) <== NOT EXECUTED
1430f1: 53 push %ebx <== NOT EXECUTED
1430f2: e8 69 ca ff ff call 13fb60 <rtems_rfs_file_open> <== NOT EXECUTED
1430f7: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc > 0)
1430f9: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1430fc: 85 c0 test %eax,%eax <== NOT EXECUTED
1430fe: 7e 2c jle 14312c <rtems_rfs_rtems_file_open+0x64><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
143100: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
143103: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
143106: 53 push %ebx <== NOT EXECUTED
143107: e8 e0 ad ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
14310c: 59 pop %ecx <== NOT EXECUTED
14310d: ff 36 pushl (%esi) <== NOT EXECUTED
14310f: e8 e0 fe fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("file-open: open", rc);
143114: e8 67 4a 00 00 call 147b80 <__errno> <== NOT EXECUTED
143119: 89 38 mov %edi,(%eax) <== NOT EXECUTED
14311b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
143120: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
iop->file_info = file;
rtems_rfs_rtems_unlock (fs);
return 0;
}
143123: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
143126: 5b pop %ebx <== NOT EXECUTED
143127: 5e pop %esi <== NOT EXECUTED
143128: 5f pop %edi <== NOT EXECUTED
143129: c9 leave <== NOT EXECUTED
14312a: c3 ret <== NOT EXECUTED
14312b: 90 nop <== NOT EXECUTED
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
iop->size = rtems_rfs_file_size (file);
14312c: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
14312f: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
143132: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
143135: 8d 90 84 00 00 00 lea 0x84(%eax),%edx <== NOT EXECUTED
14313b: 52 push %edx <== NOT EXECUTED
14313c: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
143142: e8 15 a0 ff ff call 13d15c <rtems_rfs_block_get_size><== NOT EXECUTED
143147: 89 46 04 mov %eax,0x4(%esi) <== NOT EXECUTED
14314a: 89 56 08 mov %edx,0x8(%esi) <== NOT EXECUTED
iop->file_info = file;
14314d: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
143150: 89 46 38 mov %eax,0x38(%esi) <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
143153: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
143156: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
143159: e8 8e ad ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
14315e: 5a pop %edx <== NOT EXECUTED
14315f: ff 36 pushl (%esi) <== NOT EXECUTED
143161: e8 8e fe fc ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
143166: 31 c0 xor %eax,%eax <== NOT EXECUTED
143168: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return 0;
}
14316b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
14316e: 5b pop %ebx <== NOT EXECUTED
14316f: 5e pop %esi <== NOT EXECUTED
143170: 5f pop %edi <== NOT EXECUTED
143171: c9 leave <== NOT EXECUTED
143172: c3 ret <== NOT EXECUTED
00142c3c <rtems_rfs_rtems_file_read>:
*/
ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
142c3c: 55 push %ebp <== NOT EXECUTED
142c3d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
142c3f: 57 push %edi <== NOT EXECUTED
142c40: 56 push %esi <== NOT EXECUTED
142c41: 53 push %ebx <== NOT EXECUTED
142c42: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED
142c45: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
142c48: 8b 5e 38 mov 0x38(%esi),%ebx <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
142c4b: 6a 00 push $0x0 <== NOT EXECUTED
142c4d: 6a 00 push $0x0 <== NOT EXECUTED
142c4f: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
142c52: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
142c58: 8b 40 7c mov 0x7c(%eax),%eax <== NOT EXECUTED
142c5b: ff 30 pushl (%eax) <== NOT EXECUTED
142c5d: e8 96 02 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_READ))
printf("rtems-rfs: file-read: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
142c62: 8b 7e 0c mov 0xc(%esi),%edi <== NOT EXECUTED
142c65: 8b 76 10 mov 0x10(%esi),%esi <== NOT EXECUTED
if (pos < rtems_rfs_file_size (file))
142c68: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
142c6b: 5a pop %edx <== NOT EXECUTED
142c6c: 59 pop %ecx <== NOT EXECUTED
142c6d: 8d 90 84 00 00 00 lea 0x84(%eax),%edx <== NOT EXECUTED
142c73: 52 push %edx <== NOT EXECUTED
142c74: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
142c7a: e8 dd a4 ff ff call 13d15c <rtems_rfs_block_get_size><== NOT EXECUTED
142c7f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142c82: 39 d6 cmp %edx,%esi <== NOT EXECUTED
142c84: 72 36 jb 142cbc <rtems_rfs_rtems_file_read+0x80><== NOT EXECUTED
142c86: 76 30 jbe 142cb8 <rtems_rfs_rtems_file_read+0x7c><== NOT EXECUTED
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
data += size;
142c88: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
142c8f: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
142c92: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
142c98: 8b 58 7c mov 0x7c(%eax),%ebx <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
142c9b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
142c9e: 50 push %eax <== NOT EXECUTED
142c9f: e8 48 b2 ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
142ca4: 58 pop %eax <== NOT EXECUTED
142ca5: ff 33 pushl (%ebx) <== NOT EXECUTED
142ca7: e8 48 03 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return read;
}
142cac: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
142caf: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
142cb2: 5b pop %ebx <== NOT EXECUTED
142cb3: 5e pop %esi <== NOT EXECUTED
142cb4: 5f pop %edi <== NOT EXECUTED
142cb5: c9 leave <== NOT EXECUTED
142cb6: c3 ret <== NOT EXECUTED
142cb7: 90 nop <== NOT EXECUTED
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
142cb8: 39 c7 cmp %eax,%edi <== NOT EXECUTED
142cba: 73 cc jae 142c88 <rtems_rfs_rtems_file_read+0x4c><== NOT EXECUTED
{
while (count)
142cbc: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
142cbf: 85 d2 test %edx,%edx <== NOT EXECUTED
142cc1: 74 c5 je 142c88 <rtems_rfs_rtems_file_read+0x4c><== NOT EXECUTED
void* buffer,
size_t count)
{
rtems_rfs_file_handle* file = iop->file_info;
rtems_rfs_pos pos;
uint8_t* data = buffer;
142cc3: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
142cc6: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
142cc9: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
142cd0: eb 0d jmp 142cdf <rtems_rfs_rtems_file_read+0xa3><== NOT EXECUTED
142cd2: 66 90 xchg %ax,%ax <== NOT EXECUTED
memcpy (data, rtems_rfs_file_data (file), size);
data += size;
count -= size;
read += size;
142cd4: 01 55 d0 add %edx,-0x30(%ebp) <== NOT EXECUTED
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
{
while (count)
142cd7: 29 55 10 sub %edx,0x10(%ebp) <== NOT EXECUTED
142cda: 74 b3 je 142c8f <rtems_rfs_rtems_file_read+0x53><== NOT EXECUTED
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
data += size;
142cdc: 01 55 d4 add %edx,-0x2c(%ebp) <== NOT EXECUTED
{
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
142cdf: 56 push %esi <== NOT EXECUTED
142ce0: 6a 01 push $0x1 <== NOT EXECUTED
142ce2: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
142ce5: 50 push %eax <== NOT EXECUTED
142ce6: 53 push %ebx <== NOT EXECUTED
142ce7: e8 98 c5 ff ff call 13f284 <rtems_rfs_file_io_start><== NOT EXECUTED
if (rc > 0)
142cec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142cef: 85 c0 test %eax,%eax <== NOT EXECUTED
142cf1: 7f 3d jg 142d30 <rtems_rfs_rtems_file_read+0xf4><== NOT EXECUTED
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
break;
}
if (size == 0)
142cf3: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
142cf6: 89 d1 mov %edx,%ecx <== NOT EXECUTED
142cf8: 85 d2 test %edx,%edx <== NOT EXECUTED
142cfa: 74 93 je 142c8f <rtems_rfs_rtems_file_read+0x53><== NOT EXECUTED
break;
if (size > count)
142cfc: 3b 55 10 cmp 0x10(%ebp),%edx <== NOT EXECUTED
142cff: 76 0a jbe 142d0b <rtems_rfs_rtems_file_read+0xcf><== NOT EXECUTED
size = count;
142d01: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
142d04: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
142d07: 89 c1 mov %eax,%ecx <== NOT EXECUTED
142d09: 89 c2 mov %eax,%edx <== NOT EXECUTED
memcpy (data, rtems_rfs_file_data (file), size);
142d0b: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
142d0e: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED
142d11: 03 73 14 add 0x14(%ebx),%esi <== NOT EXECUTED
142d14: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED
142d17: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
data += size;
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
142d19: 51 push %ecx <== NOT EXECUTED
142d1a: 6a 01 push $0x1 <== NOT EXECUTED
142d1c: 52 push %edx <== NOT EXECUTED
142d1d: 53 push %ebx <== NOT EXECUTED
142d1e: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
142d21: e8 e2 ca ff ff call 13f808 <rtems_rfs_file_io_end> <== NOT EXECUTED
if (rc > 0)
142d26: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142d29: 85 c0 test %eax,%eax <== NOT EXECUTED
142d2b: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
142d2e: 7e a4 jle 142cd4 <rtems_rfs_rtems_file_read+0x98><== NOT EXECUTED
142d30: 89 c6 mov %eax,%esi <== NOT EXECUTED
{
read = rtems_rfs_rtems_error ("file-read: read: io-end", rc);
142d32: e8 49 4e 00 00 call 147b80 <__errno> <== NOT EXECUTED
142d37: 89 30 mov %esi,(%eax) <== NOT EXECUTED
142d39: c7 45 d0 ff ff ff ff movl $0xffffffff,-0x30(%ebp) <== NOT EXECUTED
142d40: e9 4a ff ff ff jmp 142c8f <rtems_rfs_rtems_file_read+0x53><== NOT EXECUTED
00142e48 <rtems_rfs_rtems_file_write>:
*/
ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
142e48: 55 push %ebp <== NOT EXECUTED
142e49: 89 e5 mov %esp,%ebp <== NOT EXECUTED
142e4b: 57 push %edi <== NOT EXECUTED
142e4c: 56 push %esi <== NOT EXECUTED
142e4d: 53 push %ebx <== NOT EXECUTED
142e4e: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
142e51: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
142e54: 8b 58 38 mov 0x38(%eax),%ebx <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
142e57: 6a 00 push $0x0 <== NOT EXECUTED
142e59: 6a 00 push $0x0 <== NOT EXECUTED
142e5b: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
142e5e: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
142e64: 8b 40 7c mov 0x7c(%eax),%eax <== NOT EXECUTED
142e67: ff 30 pushl (%eax) <== NOT EXECUTED
142e69: e8 8a 00 fd ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_WRITE))
printf("rtems-rfs: file-write: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
142e6e: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
142e71: 8b 71 0c mov 0xc(%ecx),%esi <== NOT EXECUTED
142e74: 8b 79 10 mov 0x10(%ecx),%edi <== NOT EXECUTED
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
142e77: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
142e7a: 5a pop %edx <== NOT EXECUTED
142e7b: 59 pop %ecx <== NOT EXECUTED
142e7c: 8d 90 84 00 00 00 lea 0x84(%eax),%edx <== NOT EXECUTED
142e82: 52 push %edx <== NOT EXECUTED
142e83: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
142e89: e8 ce a2 ff ff call 13d15c <rtems_rfs_block_get_size><== NOT EXECUTED
142e8e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142e91: 39 d7 cmp %edx,%edi <== NOT EXECUTED
142e93: 72 26 jb 142ebb <rtems_rfs_rtems_file_write+0x73><== NOT EXECUTED
142e95: 0f 86 09 01 00 00 jbe 142fa4 <rtems_rfs_rtems_file_write+0x15c><== NOT EXECUTED
{
rc = rtems_rfs_file_set_size (file, pos + 1);
142e9b: 50 push %eax <== NOT EXECUTED
142e9c: 89 f0 mov %esi,%eax <== NOT EXECUTED
142e9e: 89 fa mov %edi,%edx <== NOT EXECUTED
142ea0: 83 c0 01 add $0x1,%eax <== NOT EXECUTED
142ea3: 83 d2 00 adc $0x0,%edx <== NOT EXECUTED
142ea6: 52 push %edx <== NOT EXECUTED
142ea7: 50 push %eax <== NOT EXECUTED
142ea8: 53 push %ebx <== NOT EXECUTED
142ea9: e8 4a c5 ff ff call 13f3f8 <rtems_rfs_file_set_size><== NOT EXECUTED
142eae: 89 c2 mov %eax,%edx <== NOT EXECUTED
if (rc)
142eb0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142eb3: 85 c0 test %eax,%eax <== NOT EXECUTED
142eb5: 0f 85 f9 00 00 00 jne 142fb4 <rtems_rfs_rtems_file_write+0x16c><== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file-write: write extend", rc);
}
}
rtems_rfs_file_set_bpos (file, pos);
142ebb: 8d 43 10 lea 0x10(%ebx),%eax <== NOT EXECUTED
142ebe: 50 push %eax <== NOT EXECUTED
142ebf: 57 push %edi <== NOT EXECUTED
142ec0: 56 push %esi <== NOT EXECUTED
142ec1: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
142ec4: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
142eca: e8 c9 a1 ff ff call 13d098 <rtems_rfs_block_get_bpos><== NOT EXECUTED
while (count)
142ecf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142ed2: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
142ed5: 85 d2 test %edx,%edx <== NOT EXECUTED
142ed7: 0f 84 2c 01 00 00 je 143009 <rtems_rfs_rtems_file_write+0x1c1><== NOT EXECUTED
const void* buffer,
size_t count)
{
rtems_rfs_file_handle* file = iop->file_info;
rtems_rfs_pos pos;
const uint8_t* data = buffer;
142edd: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
142ee0: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
142ee3: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
142eea: eb 0b jmp 142ef7 <rtems_rfs_rtems_file_write+0xaf><== NOT EXECUTED
memcpy (rtems_rfs_file_data (file), data, size);
data += size;
count -= size;
write += size;
142eec: 01 75 d0 add %esi,-0x30(%ebp) <== NOT EXECUTED
}
}
rtems_rfs_file_set_bpos (file, pos);
while (count)
142eef: 29 75 10 sub %esi,0x10(%ebp) <== NOT EXECUTED
142ef2: 74 63 je 142f57 <rtems_rfs_rtems_file_write+0x10f><== NOT EXECUTED
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
data += size;
142ef4: 01 75 d4 add %esi,-0x2c(%ebp) <== NOT EXECUTED
rtems_rfs_file_set_bpos (file, pos);
while (count)
{
size_t size = count;
142ef7: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
142efa: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
rc = rtems_rfs_file_io_start (file, &size, false);
142efd: 50 push %eax <== NOT EXECUTED
142efe: 6a 00 push $0x0 <== NOT EXECUTED
142f00: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
142f03: 50 push %eax <== NOT EXECUTED
142f04: 53 push %ebx <== NOT EXECUTED
142f05: e8 7a c3 ff ff call 13f284 <rtems_rfs_file_io_start><== NOT EXECUTED
if (rc)
142f0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142f0d: 85 c0 test %eax,%eax <== NOT EXECUTED
142f0f: 0f 85 df 00 00 00 jne 142ff4 <rtems_rfs_rtems_file_write+0x1ac><== NOT EXECUTED
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
break;
}
if (size > count)
142f15: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
142f18: 3b 4d 10 cmp 0x10(%ebp),%ecx <== NOT EXECUTED
142f1b: 76 06 jbe 142f23 <rtems_rfs_rtems_file_write+0xdb><== NOT EXECUTED
size = count;
142f1d: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
142f20: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
memcpy (rtems_rfs_file_data (file), data, size);
142f23: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
142f26: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
142f29: 03 43 14 add 0x14(%ebx),%eax <== NOT EXECUTED
142f2c: 89 c7 mov %eax,%edi <== NOT EXECUTED
142f2e: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED
142f31: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
data += size;
142f33: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
142f36: 57 push %edi <== NOT EXECUTED
142f37: 6a 00 push $0x0 <== NOT EXECUTED
142f39: 56 push %esi <== NOT EXECUTED
142f3a: 53 push %ebx <== NOT EXECUTED
142f3b: e8 c8 c8 ff ff call 13f808 <rtems_rfs_file_io_end> <== NOT EXECUTED
if (rc)
142f40: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142f43: 85 c0 test %eax,%eax <== NOT EXECUTED
142f45: 74 a5 je 142eec <rtems_rfs_rtems_file_write+0xa4><== NOT EXECUTED
142f47: 89 c7 mov %eax,%edi <== NOT EXECUTED
{
write = rtems_rfs_rtems_error ("file-write: write close", rc);
142f49: e8 32 4c 00 00 call 147b80 <__errno> <== NOT EXECUTED
142f4e: 89 38 mov %edi,(%eax) <== NOT EXECUTED
142f50: c7 45 d0 ff ff ff ff movl $0xffffffff,-0x30(%ebp) <== NOT EXECUTED
break;
}
}
iop->size = rtems_rfs_file_size (file);
142f57: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
142f5a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
142f5d: 8d 90 84 00 00 00 lea 0x84(%eax),%edx <== NOT EXECUTED
142f63: 52 push %edx <== NOT EXECUTED
142f64: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
142f6a: e8 ed a1 ff ff call 13d15c <rtems_rfs_block_get_size><== NOT EXECUTED
142f6f: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
142f72: 89 41 04 mov %eax,0x4(%ecx) <== NOT EXECUTED
142f75: 89 51 08 mov %edx,0x8(%ecx) <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
142f78: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
142f7b: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
142f81: 8b 58 7c mov 0x7c(%eax),%ebx <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
142f84: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
142f87: e8 60 af ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
142f8c: 59 pop %ecx <== NOT EXECUTED
142f8d: ff 33 pushl (%ebx) <== NOT EXECUTED
142f8f: e8 60 00 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
142f94: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return write;
}
142f97: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
142f9a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
142f9d: 5b pop %ebx <== NOT EXECUTED
142f9e: 5e pop %esi <== NOT EXECUTED
142f9f: 5f pop %edi <== NOT EXECUTED
142fa0: c9 leave <== NOT EXECUTED
142fa1: c3 ret <== NOT EXECUTED
142fa2: 66 90 xchg %ax,%ax <== NOT EXECUTED
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
142fa4: 39 c6 cmp %eax,%esi <== NOT EXECUTED
142fa6: 0f 82 0f ff ff ff jb 142ebb <rtems_rfs_rtems_file_write+0x73><== NOT EXECUTED
142fac: e9 ea fe ff ff jmp 142e9b <rtems_rfs_rtems_file_write+0x53><== NOT EXECUTED
142fb1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
rc = rtems_rfs_file_set_size (file, pos + 1);
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
142fb4: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
142fb7: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
142fbd: 8b 58 7c mov 0x7c(%eax),%ebx <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
142fc0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
142fc3: 50 push %eax <== NOT EXECUTED
142fc4: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
142fc7: e8 20 af ff ff call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
142fcc: 59 pop %ecx <== NOT EXECUTED
142fcd: ff 33 pushl (%ebx) <== NOT EXECUTED
142fcf: e8 20 00 fd ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rtems_rfs_rtems_error ("file-write: write extend", rc);
142fd4: e8 a7 4b 00 00 call 147b80 <__errno> <== NOT EXECUTED
142fd9: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
142fdc: 89 10 mov %edx,(%eax) <== NOT EXECUTED
142fde: c7 45 d0 ff ff ff ff movl $0xffffffff,-0x30(%ebp) <== NOT EXECUTED
142fe5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return write;
}
142fe8: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
142feb: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
142fee: 5b pop %ebx <== NOT EXECUTED
142fef: 5e pop %esi <== NOT EXECUTED
142ff0: 5f pop %edi <== NOT EXECUTED
142ff1: c9 leave <== NOT EXECUTED
142ff2: c3 ret <== NOT EXECUTED
142ff3: 90 nop <== NOT EXECUTED
142ff4: 89 c6 mov %eax,%esi <== NOT EXECUTED
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
if (rc)
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
142ff6: e8 85 4b 00 00 call 147b80 <__errno> <== NOT EXECUTED
142ffb: 89 30 mov %esi,(%eax) <== NOT EXECUTED
142ffd: c7 45 d0 ff ff ff ff movl $0xffffffff,-0x30(%ebp) <== NOT EXECUTED
143004: e9 4e ff ff ff jmp 142f57 <rtems_rfs_rtems_file_write+0x10f><== NOT EXECUTED
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
data += size;
143009: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
143010: e9 42 ff ff ff jmp 142f57 <rtems_rfs_rtems_file_write+0x10f><== NOT EXECUTED
00126a80 <rtems_rfs_rtems_freenodinfo>:
* @retval 0 Always returned.
*/
int
rtems_rfs_rtems_freenodinfo (rtems_filesystem_location_info_t* pathloc)
{
126a80: 55 push %ebp <== NOT EXECUTED
126a81: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return 0;
}
126a83: 31 c0 xor %eax,%eax <== NOT EXECUTED
126a85: c9 leave <== NOT EXECUTED
126a86: c3 ret <== NOT EXECUTED
00128370 <rtems_rfs_rtems_imode>:
return true;
}
uint16_t
rtems_rfs_rtems_imode (mode_t mode)
{
128370: 55 push %ebp <== NOT EXECUTED
128371: 89 e5 mov %esp,%ebp <== NOT EXECUTED
/*
* Mapping matches RTEMS so no need to change.
*/
return mode;
}
128373: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
128376: c9 leave <== NOT EXECUTED
128377: c3 ret <== NOT EXECUTED
00126af4 <rtems_rfs_rtems_initialise>:
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
126af4: 55 push %ebp <== NOT EXECUTED
126af5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
126af7: 57 push %edi <== NOT EXECUTED
126af8: 56 push %esi <== NOT EXECUTED
126af9: 53 push %ebx <== NOT EXECUTED
126afa: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
rtems_rfs_rtems_private* rtems;
rtems_rfs_file_system* fs;
uint32_t flags = 0;
uint32_t max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
const char* options = data;
126afd: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
126b00: 85 db test %ebx,%ebx <== NOT EXECUTED
126b02: 0f 84 9c 01 00 00 je 126ca4 <rtems_rfs_rtems_initialise+0x1b0><== NOT EXECUTED
126b08: c7 45 d0 05 00 00 00 movl $0x5,-0x30(%ebp) <== NOT EXECUTED
126b0f: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
126b16: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
printf ("options=%s\n", options);
126b18: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126b1b: 53 push %ebx <== NOT EXECUTED
126b1c: 68 bd 48 16 00 push $0x1648bd <== NOT EXECUTED
126b21: e8 7e 4f 02 00 call 14baa4 <printf> <== NOT EXECUTED
if (strncmp (options, "hold-bitmaps",
126b26: 89 de mov %ebx,%esi <== NOT EXECUTED
126b28: bf c9 48 16 00 mov $0x1648c9,%edi <== NOT EXECUTED
126b2d: b9 0c 00 00 00 mov $0xc,%ecx <== NOT EXECUTED
126b32: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED
126b34: 0f 97 c2 seta %dl <== NOT EXECUTED
126b37: 0f 92 c0 setb %al <== NOT EXECUTED
126b3a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126b3d: 38 c2 cmp %al,%dl <== NOT EXECUTED
126b3f: 75 6f jne 126bb0 <rtems_rfs_rtems_initialise+0xbc><== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
126b41: 83 4d d4 01 orl $0x1,-0x2c(%ebp) <== NOT EXECUTED
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
options = strchr (options, ',');
126b45: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
126b48: 6a 2c push $0x2c <== NOT EXECUTED
126b4a: 53 push %ebx <== NOT EXECUTED
126b4b: e8 e0 67 02 00 call 14d330 <strchr> <== NOT EXECUTED
126b50: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (options)
126b53: 85 c0 test %eax,%eax <== NOT EXECUTED
126b55: 74 09 je 126b60 <rtems_rfs_rtems_initialise+0x6c><== NOT EXECUTED
{
++options;
126b57: 8d 58 01 lea 0x1(%eax),%ebx <== NOT EXECUTED
if (*options == '\0')
126b5a: 80 78 01 00 cmpb $0x0,0x1(%eax) <== NOT EXECUTED
126b5e: 75 b8 jne 126b18 <rtems_rfs_rtems_initialise+0x24><== NOT EXECUTED
options = NULL;
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
126b60: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
126b63: 6a 04 push $0x4 <== NOT EXECUTED
126b65: e8 9e 82 fe ff call 10ee08 <malloc> <== NOT EXECUTED
126b6a: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (!rtems)
126b6c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126b6f: 85 c0 test %eax,%eax <== NOT EXECUTED
126b71: 0f 84 40 01 00 00 je 126cb7 <rtems_rfs_rtems_initialise+0x1c3><== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
memset (rtems, 0, sizeof (rtems_rfs_rtems_private));
126b77: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
rc = rtems_rfs_mutex_create (&rtems->access);
126b7d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
126b80: 50 push %eax <== NOT EXECUTED
126b81: e8 66 ba 01 00 call 1425ec <rtems_rfs_mutex_create><== NOT EXECUTED
126b86: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
126b88: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126b8b: 85 c0 test %eax,%eax <== NOT EXECUTED
126b8d: 7e 6d jle 126bfc <rtems_rfs_rtems_initialise+0x108><== NOT EXECUTED
}
rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs);
if (rc)
{
free (rtems);
126b8f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
126b92: 53 push %ebx <== NOT EXECUTED
126b93: e8 d0 7c fe ff call 10e868 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: open", rc);
126b98: e8 e3 0f 02 00 call 147b80 <__errno> <== NOT EXECUTED
126b9d: 89 30 mov %esi,(%eax) <== NOT EXECUTED
126b9f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
126ba4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
return 0;
}
126ba7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
126baa: 5b pop %ebx <== NOT EXECUTED
126bab: 5e pop %esi <== NOT EXECUTED
126bac: 5f pop %edi <== NOT EXECUTED
126bad: c9 leave <== NOT EXECUTED
126bae: c3 ret <== NOT EXECUTED
126baf: 90 nop <== NOT EXECUTED
{
printf ("options=%s\n", options);
if (strncmp (options, "hold-bitmaps",
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
126bb0: b9 0e 00 00 00 mov $0xe,%ecx <== NOT EXECUTED
126bb5: 89 de mov %ebx,%esi <== NOT EXECUTED
126bb7: bf d6 48 16 00 mov $0x1648d6,%edi <== NOT EXECUTED
126bbc: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED
126bbe: 75 0c jne 126bcc <rtems_rfs_rtems_initialise+0xd8><== NOT EXECUTED
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
126bc0: 83 4d d4 02 orl $0x2,-0x2c(%ebp) <== NOT EXECUTED
126bc4: e9 7c ff ff ff jmp 126b45 <rtems_rfs_rtems_initialise+0x51><== NOT EXECUTED
126bc9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
else if (strncmp (options, "max-held-bufs",
126bcc: bf e5 48 16 00 mov $0x1648e5,%edi <== NOT EXECUTED
126bd1: b9 0d 00 00 00 mov $0xd,%ecx <== NOT EXECUTED
126bd6: 89 de mov %ebx,%esi <== NOT EXECUTED
126bd8: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED
126bda: 0f 85 ac 00 00 00 jne 126c8c <rtems_rfs_rtems_initialise+0x198><== NOT EXECUTED
sizeof ("max-held-bufs") - 1) == 0)
{
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
126be0: 51 push %ecx <== NOT EXECUTED
126be1: 6a 00 push $0x0 <== NOT EXECUTED
126be3: 6a 00 push $0x0 <== NOT EXECUTED
126be5: 8d 43 0e lea 0xe(%ebx),%eax <== NOT EXECUTED
126be8: 50 push %eax <== NOT EXECUTED
126be9: e8 86 83 02 00 call 14ef74 <strtoul> <== NOT EXECUTED
126bee: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
126bf1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126bf4: e9 4c ff ff ff jmp 126b45 <rtems_rfs_rtems_initialise+0x51><== NOT EXECUTED
126bf9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
126bfc: 52 push %edx <== NOT EXECUTED
126bfd: 6a 00 push $0x0 <== NOT EXECUTED
126bff: 6a 00 push $0x0 <== NOT EXECUTED
126c01: ff 33 pushl (%ebx) <== NOT EXECUTED
126c03: e8 f0 c2 fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
126c08: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126c0b: 85 c0 test %eax,%eax <== NOT EXECUTED
126c0d: 75 50 jne 126c5f <rtems_rfs_rtems_initialise+0x16b><== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
}
rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs);
126c0f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
126c12: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
126c15: 50 push %eax <== NOT EXECUTED
126c16: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
126c19: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
126c1c: 53 push %ebx <== NOT EXECUTED
126c1d: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
126c20: ff 70 70 pushl 0x70(%eax) <== NOT EXECUTED
126c23: e8 54 92 01 00 call 13fe7c <rtems_rfs_fs_open> <== NOT EXECUTED
126c28: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc)
126c2a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
126c2d: 85 c0 test %eax,%eax <== NOT EXECUTED
126c2f: 0f 85 5a ff ff ff jne 126b8f <rtems_rfs_rtems_initialise+0x9b><== NOT EXECUTED
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
126c35: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
126c38: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
126c3b: 89 42 34 mov %eax,0x34(%edx) <== NOT EXECUTED
mt_entry->mt_fs_root.node_access = (void*) RTEMS_RFS_ROOT_INO;
126c3e: c7 42 1c 01 00 00 00 movl $0x1,0x1c(%edx) <== NOT EXECUTED
mt_entry->mt_fs_root.handlers = &rtems_rfs_rtems_dir_handlers;
126c45: c7 42 24 e0 99 16 00 movl $0x1699e0,0x24(%edx) <== NOT EXECUTED
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
126c4c: c7 42 28 40 49 16 00 movl $0x164940,0x28(%edx) <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
126c53: e8 38 fe ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
126c58: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
126c5a: e9 48 ff ff ff jmp 126ba7 <rtems_rfs_rtems_initialise+0xb3><== NOT EXECUTED
}
rc = rtems_rfs_mutex_lock (&rtems->access);
if (rc > 0)
{
rtems_rfs_mutex_destroy (&rtems->access);
126c5f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
126c62: 53 push %ebx <== NOT EXECUTED
126c63: e8 64 b9 01 00 call 1425cc <rtems_rfs_mutex_destroy><== NOT EXECUTED
free (rtems);
126c68: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
126c6b: e8 f8 7b fe ff call 10e868 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
126c70: e8 0b 0f 02 00 call 147b80 <__errno> <== NOT EXECUTED
126c75: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
126c7b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
126c80: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
return 0;
}
126c83: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
126c86: 5b pop %ebx <== NOT EXECUTED
126c87: 5e pop %esi <== NOT EXECUTED
126c88: 5f pop %edi <== NOT EXECUTED
126c89: c9 leave <== NOT EXECUTED
126c8a: c3 ret <== NOT EXECUTED
126c8b: 90 nop <== NOT EXECUTED
sizeof ("max-held-bufs") - 1) == 0)
{
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
126c8c: e8 ef 0e 02 00 call 147b80 <__errno> <== NOT EXECUTED
126c91: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
126c97: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
return 0;
}
126c9c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
126c9f: 5b pop %ebx <== NOT EXECUTED
126ca0: 5e pop %esi <== NOT EXECUTED
126ca1: 5f pop %edi <== NOT EXECUTED
126ca2: c9 leave <== NOT EXECUTED
126ca3: c3 ret <== NOT EXECUTED
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
126ca4: c7 45 d0 05 00 00 00 movl $0x5,-0x30(%ebp) <== NOT EXECUTED
126cab: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
126cb2: e9 a9 fe ff ff jmp 126b60 <rtems_rfs_rtems_initialise+0x6c><== NOT EXECUTED
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
if (!rtems)
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
126cb7: e8 c4 0e 02 00 call 147b80 <__errno> <== NOT EXECUTED
126cbc: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
126cc2: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
126cc5: e9 dd fe ff ff jmp 126ba7 <rtems_rfs_rtems_initialise+0xb3><== NOT EXECUTED
00127378 <rtems_rfs_rtems_link>:
*/
int
rtems_rfs_rtems_link (rtems_filesystem_location_info_t* to_loc,
rtems_filesystem_location_info_t* parent_loc,
const char* name)
{
127378: 55 push %ebp <== NOT EXECUTED
127379: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12737b: 57 push %edi <== NOT EXECUTED
12737c: 56 push %esi <== NOT EXECUTED
12737d: 53 push %ebx <== NOT EXECUTED
12737e: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED
127381: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (to_loc);
127384: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
127387: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED
rtems_rfs_ino target = rtems_rfs_rtems_get_pathloc_ino (to_loc);
12738a: 8b 30 mov (%eax),%esi <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
12738c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
12738f: 8b 10 mov (%eax),%edx <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
127391: 6a 00 push $0x0 <== NOT EXECUTED
127393: 6a 00 push $0x0 <== NOT EXECUTED
127395: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
127398: ff 30 pushl (%eax) <== NOT EXECUTED
12739a: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
12739d: e8 56 bb fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
printf ("rtems-rfs-rtems: link: in: parent:%" PRId32 " target:%" PRId32 "\n",
parent, target);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_link (fs, name, strlen (name), parent, target, false);
1273a2: 31 c0 xor %eax,%eax <== NOT EXECUTED
1273a4: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
1273a9: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
1273ac: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
1273ae: f7 d1 not %ecx <== NOT EXECUTED
1273b0: 49 dec %ecx <== NOT EXECUTED
1273b1: 5a pop %edx <== NOT EXECUTED
1273b2: 5f pop %edi <== NOT EXECUTED
1273b3: 6a 00 push $0x0 <== NOT EXECUTED
1273b5: 56 push %esi <== NOT EXECUTED
1273b6: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
1273b9: 52 push %edx <== NOT EXECUTED
1273ba: 51 push %ecx <== NOT EXECUTED
1273bb: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
1273be: 53 push %ebx <== NOT EXECUTED
1273bf: e8 b0 b0 01 00 call 142474 <rtems_rfs_link> <== NOT EXECUTED
1273c4: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc)
1273c6: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1273c9: 85 c0 test %eax,%eax <== NOT EXECUTED
1273cb: 74 2b je 1273f8 <rtems_rfs_rtems_link+0x80><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1273cd: 8b 7b 7c mov 0x7c(%ebx),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1273d0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1273d3: 53 push %ebx <== NOT EXECUTED
1273d4: e8 13 6b 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
1273d9: 58 pop %eax <== NOT EXECUTED
1273da: ff 37 pushl (%edi) <== NOT EXECUTED
1273dc: e8 13 bc fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("link: linking", rc);
1273e1: e8 9a 07 02 00 call 147b80 <__errno> <== NOT EXECUTED
1273e6: 89 30 mov %esi,(%eax) <== NOT EXECUTED
1273e8: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1273ed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
1273f0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1273f3: 5b pop %ebx <== NOT EXECUTED
1273f4: 5e pop %esi <== NOT EXECUTED
1273f5: 5f pop %edi <== NOT EXECUTED
1273f6: c9 leave <== NOT EXECUTED
1273f7: c3 ret <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1273f8: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1273fb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1273fe: 53 push %ebx <== NOT EXECUTED
1273ff: e8 e8 6a 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
127404: 5f pop %edi <== NOT EXECUTED
127405: ff 36 pushl (%esi) <== NOT EXECUTED
127407: e8 e8 bb fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
12740c: 31 c0 xor %eax,%eax <== NOT EXECUTED
return rtems_rfs_rtems_error ("link: linking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
12740e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
127411: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
127414: 5b pop %ebx <== NOT EXECUTED
127415: 5e pop %esi <== NOT EXECUTED
127416: 5f pop %edi <== NOT EXECUTED
127417: c9 leave <== NOT EXECUTED
127418: c3 ret <== NOT EXECUTED
00127e2c <rtems_rfs_rtems_mknod>:
int
rtems_rfs_rtems_mknod (const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc)
{
127e2c: 55 push %ebp <== NOT EXECUTED
127e2d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
127e2f: 57 push %edi <== NOT EXECUTED
127e30: 56 push %esi <== NOT EXECUTED
127e31: 53 push %ebx <== NOT EXECUTED
127e32: 83 ec 4c sub $0x4c,%esp <== NOT EXECUTED
127e35: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
127e38: 89 45 ac mov %eax,-0x54(%ebp) <== NOT EXECUTED
127e3b: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
127e3e: 89 4d a8 mov %ecx,-0x58(%ebp) <== NOT EXECUTED
127e41: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
127e44: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
127e47: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (pathloc);
127e4a: 8b 00 mov (%eax),%eax <== NOT EXECUTED
127e4c: 89 45 b0 mov %eax,-0x50(%ebp) <== NOT EXECUTED
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
127e4f: e8 e0 69 00 00 call 12e834 <geteuid> <== NOT EXECUTED
127e54: 66 89 45 b6 mov %ax,-0x4a(%ebp) <== NOT EXECUTED
gid = getegid ();
127e58: e8 c7 69 00 00 call 12e824 <getegid> <== NOT EXECUTED
127e5d: 89 c6 mov %eax,%esi <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
127e5f: 51 push %ecx <== NOT EXECUTED
127e60: 6a 00 push $0x0 <== NOT EXECUTED
127e62: 6a 00 push $0x0 <== NOT EXECUTED
127e64: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
127e67: ff 30 pushl (%eax) <== NOT EXECUTED
127e69: e8 8a b0 fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
rtems_rfs_rtems_imode (mode),
127e6e: 5a pop %edx <== NOT EXECUTED
127e6f: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
127e72: e8 f9 04 00 00 call 128370 <rtems_rfs_rtems_imode> <== NOT EXECUTED
127e77: 89 c2 mov %eax,%edx <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
127e79: 31 c0 xor %eax,%eax <== NOT EXECUTED
127e7b: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
127e80: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
127e83: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
127e85: f7 d1 not %ecx <== NOT EXECUTED
127e87: 49 dec %ecx <== NOT EXECUTED
127e88: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
127e8b: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
127e8e: 0f b7 f6 movzwl %si,%esi <== NOT EXECUTED
127e91: 56 push %esi <== NOT EXECUTED
127e92: 0f b7 45 b6 movzwl -0x4a(%ebp),%eax <== NOT EXECUTED
127e96: 50 push %eax <== NOT EXECUTED
127e97: 6a 01 push $0x1 <== NOT EXECUTED
127e99: 0f b7 d2 movzwl %dx,%edx <== NOT EXECUTED
127e9c: 52 push %edx <== NOT EXECUTED
127e9d: 51 push %ecx <== NOT EXECUTED
127e9e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
127ea1: ff 75 b0 pushl -0x50(%ebp) <== NOT EXECUTED
127ea4: 53 push %ebx <== NOT EXECUTED
127ea5: e8 ba 9d 01 00 call 141c64 <rtems_rfs_inode_create><== NOT EXECUTED
127eaa: 89 c6 mov %eax,%esi <== NOT EXECUTED
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
127eac: 83 c4 30 add $0x30,%esp <== NOT EXECUTED
127eaf: 85 c0 test %eax,%eax <== NOT EXECUTED
127eb1: 7e 2d jle 127ee0 <rtems_rfs_rtems_mknod+0xb4><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
127eb3: 8b 7b 7c mov 0x7c(%ebx),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
127eb6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
127eb9: 53 push %ebx <== NOT EXECUTED
127eba: e8 2d 60 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
127ebf: 58 pop %eax <== NOT EXECUTED
127ec0: ff 37 pushl (%edi) <== NOT EXECUTED
127ec2: e8 2d b1 fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: inode open", rc);
127ec7: e8 b4 fc 01 00 call 147b80 <__errno> <== NOT EXECUTED
127ecc: 89 30 mov %esi,(%eax) <== NOT EXECUTED
127ece: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
127ed3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
127ed6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
127ed9: 5b pop %ebx <== NOT EXECUTED
127eda: 5e pop %esi <== NOT EXECUTED
127edb: 5f pop %edi <== NOT EXECUTED
127edc: c9 leave <== NOT EXECUTED
127edd: c3 ret <== NOT EXECUTED
127ede: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: inode create", rc);
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
127ee0: 6a 01 push $0x1 <== NOT EXECUTED
127ee2: 8d 7d bc lea -0x44(%ebp),%edi <== NOT EXECUTED
127ee5: 57 push %edi <== NOT EXECUTED
127ee6: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
127ee9: 53 push %ebx <== NOT EXECUTED
127eea: e8 05 9c 01 00 call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
127eef: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
127ef1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127ef4: 85 c0 test %eax,%eax <== NOT EXECUTED
127ef6: 7f bb jg 127eb3 <rtems_rfs_rtems_mknod+0x87><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: inode open", rc);
}
if (S_ISDIR(mode) || S_ISREG(mode))
127ef8: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
127efb: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
127f00: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
127f05: 74 77 je 127f7e <rtems_rfs_rtems_mknod+0x152><== NOT EXECUTED
127f07: 3d 00 80 00 00 cmp $0x8000,%eax <== NOT EXECUTED
127f0c: 74 70 je 127f7e <rtems_rfs_rtems_mknod+0x152><== NOT EXECUTED
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
127f0e: 3d 00 20 00 00 cmp $0x2000,%eax <== NOT EXECUTED
127f13: 74 0b je 127f20 <rtems_rfs_rtems_mknod+0xf4><== NOT EXECUTED
127f15: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED
127f1a: 0f 85 9a 00 00 00 jne 127fba <rtems_rfs_rtems_mknod+0x18e><== NOT EXECUTED
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
127f20: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
127f23: 8b 45 a8 mov -0x58(%ebp),%eax <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
127f26: 89 d6 mov %edx,%esi <== NOT EXECUTED
127f28: c1 ee 18 shr $0x18,%esi <== NOT EXECUTED
127f2b: 89 75 b0 mov %esi,-0x50(%ebp) <== NOT EXECUTED
127f2e: 8a 4d b0 mov -0x50(%ebp),%cl <== NOT EXECUTED
127f31: 8b 75 c8 mov -0x38(%ebp),%esi <== NOT EXECUTED
127f34: 88 4e 1c mov %cl,0x1c(%esi) <== NOT EXECUTED
127f37: 89 d1 mov %edx,%ecx <== NOT EXECUTED
127f39: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
127f3c: 8b 75 c8 mov -0x38(%ebp),%esi <== NOT EXECUTED
127f3f: 88 4e 1d mov %cl,0x1d(%esi) <== NOT EXECUTED
127f42: 89 d1 mov %edx,%ecx <== NOT EXECUTED
127f44: c1 e9 08 shr $0x8,%ecx <== NOT EXECUTED
127f47: 8b 75 c8 mov -0x38(%ebp),%esi <== NOT EXECUTED
127f4a: 88 4e 1e mov %cl,0x1e(%esi) <== NOT EXECUTED
127f4d: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
127f50: 88 51 1f mov %dl,0x1f(%ecx) <== NOT EXECUTED
127f53: 89 c1 mov %eax,%ecx <== NOT EXECUTED
127f55: c1 e9 18 shr $0x18,%ecx <== NOT EXECUTED
127f58: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
127f5b: 88 4a 20 mov %cl,0x20(%edx) <== NOT EXECUTED
127f5e: 89 c1 mov %eax,%ecx <== NOT EXECUTED
127f60: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
127f63: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
127f66: 88 4a 21 mov %cl,0x21(%edx) <== NOT EXECUTED
127f69: 89 c1 mov %eax,%ecx <== NOT EXECUTED
127f6b: c1 e9 08 shr $0x8,%ecx <== NOT EXECUTED
127f6e: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
127f71: 88 4a 22 mov %cl,0x22(%edx) <== NOT EXECUTED
127f74: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
127f77: 88 42 23 mov %al,0x23(%edx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
127f7a: c6 45 cc 01 movb $0x1,-0x34(%ebp) <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
}
rc = rtems_rfs_inode_close (fs, &inode);
127f7e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127f81: 57 push %edi <== NOT EXECUTED
127f82: 53 push %ebx <== NOT EXECUTED
127f83: e8 e8 9a 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
127f88: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
127f8a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127f8d: 85 c0 test %eax,%eax <== NOT EXECUTED
127f8f: 7e 1b jle 127fac <rtems_rfs_rtems_mknod+0x180><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
127f91: 89 d8 mov %ebx,%eax <== NOT EXECUTED
127f93: e8 f8 ea ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
127f98: e8 e3 fb 01 00 call 147b80 <__errno> <== NOT EXECUTED
127f9d: 89 30 mov %esi,(%eax) <== NOT EXECUTED
127f9f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
127fa4: e9 2d ff ff ff jmp 127ed6 <rtems_rfs_rtems_mknod+0xaa><== NOT EXECUTED
127fa9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
127fac: 89 d8 mov %ebx,%eax <== NOT EXECUTED
127fae: e8 dd ea ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
127fb3: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
127fb5: e9 1c ff ff ff jmp 127ed6 <rtems_rfs_rtems_mknod+0xaa><== NOT EXECUTED
rtems_rfs_inode_set_block (&inode, 0, major);
rtems_rfs_inode_set_block (&inode, 1, minor);
}
else
{
rtems_rfs_inode_close (fs, &inode);
127fba: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127fbd: 57 push %edi <== NOT EXECUTED
127fbe: 53 push %ebx <== NOT EXECUTED
127fbf: e8 ac 9a 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
127fc4: 89 d8 mov %ebx,%eax <== NOT EXECUTED
127fc6: e8 c5 ea ff ff call 126a90 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
127fcb: e8 b0 fb 01 00 call 147b80 <__errno> <== NOT EXECUTED
127fd0: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
127fd6: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
127fdb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127fde: e9 f3 fe ff ff jmp 127ed6 <rtems_rfs_rtems_mknod+0xaa><== NOT EXECUTED
00128378 <rtems_rfs_rtems_mode>:
mode_t
rtems_rfs_rtems_mode (int imode)
{
128378: 55 push %ebp <== NOT EXECUTED
128379: 89 e5 mov %esp,%ebp <== NOT EXECUTED
/*
* Mapping matches RTEMS so no need to change.
*/
return imode;
}
12837b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12837e: c9 leave <== NOT EXECUTED
12837f: c3 ret <== NOT EXECUTED
00128258 <rtems_rfs_rtems_node_type>:
* @return rtems_filesystem_node_types_t
*/
rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (rtems_filesystem_location_info_t* pathloc)
{
128258: 55 push %ebp <== NOT EXECUTED
128259: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12825b: 57 push %edi <== NOT EXECUTED
12825c: 56 push %esi <== NOT EXECUTED
12825d: 53 push %ebx <== NOT EXECUTED
12825e: 83 ec 40 sub $0x40,%esp <== NOT EXECUTED
128261: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
128264: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
128267: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
12826a: 8b 30 mov (%eax),%esi <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
12826c: 6a 00 push $0x0 <== NOT EXECUTED
12826e: 6a 00 push $0x0 <== NOT EXECUTED
128270: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
128273: ff 30 pushl (%eax) <== NOT EXECUTED
128275: e8 7e ac fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
uint16_t mode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
12827a: 6a 01 push $0x1 <== NOT EXECUTED
12827c: 8d 7d c0 lea -0x40(%ebp),%edi <== NOT EXECUTED
12827f: 57 push %edi <== NOT EXECUTED
128280: 56 push %esi <== NOT EXECUTED
128281: 53 push %ebx <== NOT EXECUTED
128282: e8 6d 98 01 00 call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
128287: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
128289: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12828c: 85 c0 test %eax,%eax <== NOT EXECUTED
12828e: 7e 30 jle 1282c0 <rtems_rfs_rtems_node_type+0x68><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
128290: 8b 7b 7c mov 0x7c(%ebx),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
128293: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
128296: 53 push %ebx <== NOT EXECUTED
128297: e8 50 5c 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
12829c: 59 pop %ecx <== NOT EXECUTED
12829d: ff 37 pushl (%edi) <== NOT EXECUTED
12829f: e8 50 ad fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("node_type: opening inode", rc);
1282a4: e8 d7 f8 01 00 call 147b80 <__errno> <== NOT EXECUTED
1282a9: 89 30 mov %esi,(%eax) <== NOT EXECUTED
1282ab: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
1282b0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return type;
}
1282b3: 89 f0 mov %esi,%eax <== NOT EXECUTED
1282b5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1282b8: 5b pop %ebx <== NOT EXECUTED
1282b9: 5e pop %esi <== NOT EXECUTED
1282ba: 5f pop %edi <== NOT EXECUTED
1282bb: c9 leave <== NOT EXECUTED
1282bc: c3 ret <== NOT EXECUTED
1282bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* link is actually the normal path to a regular file, directory, device
* etc's inode. Links to inodes can be considered "the real" one, yet they
* are all links.
*/
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISDIR (mode))
1282c0: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
1282c3: 0f b6 40 02 movzbl 0x2(%eax),%eax <== NOT EXECUTED
1282c7: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
1282ca: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
1282cf: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
1282d4: 74 66 je 12833c <rtems_rfs_rtems_node_type+0xe4><== NOT EXECUTED
type = RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
1282d6: 3d 00 a0 00 00 cmp $0xa000,%eax <== NOT EXECUTED
1282db: 0f 84 87 00 00 00 je 128368 <rtems_rfs_rtems_node_type+0x110><== NOT EXECUTED
type = RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
1282e1: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED
1282e6: 74 4c je 128334 <rtems_rfs_rtems_node_type+0xdc><== NOT EXECUTED
1282e8: 3d 00 20 00 00 cmp $0x2000,%eax <== NOT EXECUTED
1282ed: 74 45 je 128334 <rtems_rfs_rtems_node_type+0xdc><== NOT EXECUTED
1282ef: be 05 00 00 00 mov $0x5,%esi <== NOT EXECUTED
type = RTEMS_FILESYSTEM_DEVICE;
else
type = RTEMS_FILESYSTEM_MEMORY_FILE;
rc = rtems_rfs_inode_close (fs, &inode);
1282f4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1282f7: 57 push %edi <== NOT EXECUTED
1282f8: 53 push %ebx <== NOT EXECUTED
1282f9: e8 72 97 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
1282fe: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc > 0)
128300: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128303: 85 c0 test %eax,%eax <== NOT EXECUTED
128305: 7e 3d jle 128344 <rtems_rfs_rtems_node_type+0xec><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
128307: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
12830a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12830d: 53 push %ebx <== NOT EXECUTED
12830e: e8 d9 5b 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
128313: 5a pop %edx <== NOT EXECUTED
128314: ff 36 pushl (%esi) <== NOT EXECUTED
128316: e8 d9 ac fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
12831b: e8 60 f8 01 00 call 147b80 <__errno> <== NOT EXECUTED
128320: 89 38 mov %edi,(%eax) <== NOT EXECUTED
128322: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
128327: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return type;
}
12832a: 89 f0 mov %esi,%eax <== NOT EXECUTED
12832c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12832f: 5b pop %ebx <== NOT EXECUTED
128330: 5e pop %esi <== NOT EXECUTED
128331: 5f pop %edi <== NOT EXECUTED
128332: c9 leave <== NOT EXECUTED
128333: c3 ret <== NOT EXECUTED
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISDIR (mode))
type = RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
type = RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
128334: be 02 00 00 00 mov $0x2,%esi <== NOT EXECUTED
128339: eb b9 jmp 1282f4 <rtems_rfs_rtems_node_type+0x9c><== NOT EXECUTED
12833b: 90 nop <== NOT EXECUTED
* link is actually the normal path to a regular file, directory, device
* etc's inode. Links to inodes can be considered "the real" one, yet they
* are all links.
*/
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISDIR (mode))
12833c: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
128341: eb b1 jmp 1282f4 <rtems_rfs_rtems_node_type+0x9c><== NOT EXECUTED
128343: 90 nop <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
128344: 8b 7b 7c mov 0x7c(%ebx),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
128347: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12834a: 53 push %ebx <== NOT EXECUTED
12834b: e8 9c 5b 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
128350: 58 pop %eax <== NOT EXECUTED
128351: ff 37 pushl (%edi) <== NOT EXECUTED
128353: e8 9c ac fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return type;
128358: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
12835b: 89 f0 mov %esi,%eax <== NOT EXECUTED
12835d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
128360: 5b pop %ebx <== NOT EXECUTED
128361: 5e pop %esi <== NOT EXECUTED
128362: 5f pop %edi <== NOT EXECUTED
128363: c9 leave <== NOT EXECUTED
128364: c3 ret <== NOT EXECUTED
128365: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* are all links.
*/
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISDIR (mode))
type = RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
128368: be 04 00 00 00 mov $0x4,%esi <== NOT EXECUTED
12836d: eb 85 jmp 1282f4 <rtems_rfs_rtems_node_type+0x9c><== NOT EXECUTED
001270ec <rtems_rfs_rtems_readlink>:
int
rtems_rfs_rtems_readlink (rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
1270ec: 55 push %ebp <== NOT EXECUTED
1270ed: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1270ef: 57 push %edi <== NOT EXECUTED
1270f0: 56 push %esi <== NOT EXECUTED
1270f1: 53 push %ebx <== NOT EXECUTED
1270f2: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED
1270f5: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
1270f8: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
1270fb: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
1270fe: 8b 30 mov (%eax),%esi <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
127100: 6a 00 push $0x0 <== NOT EXECUTED
127102: 6a 00 push $0x0 <== NOT EXECUTED
127104: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
127107: ff 30 pushl (%eax) <== NOT EXECUTED
127109: e8 ea bd fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_READLINK))
printf ("rtems-rfs-rtems: readlink: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink_read (fs, ino, buf, bufsize, &length);
12710e: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
127111: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
127114: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
127117: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
12711a: 56 push %esi <== NOT EXECUTED
12711b: 53 push %ebx <== NOT EXECUTED
12711c: e8 b7 ad 01 00 call 141ed8 <rtems_rfs_symlink_read><== NOT EXECUTED
127121: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc)
127123: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
127126: 85 c0 test %eax,%eax <== NOT EXECUTED
127128: 74 2e je 127158 <rtems_rfs_rtems_readlink+0x6c><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
12712a: 8b 7b 7c mov 0x7c(%ebx),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
12712d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
127130: 53 push %ebx <== NOT EXECUTED
127131: e8 b6 6d 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
127136: 5a pop %edx <== NOT EXECUTED
127137: ff 37 pushl (%edi) <== NOT EXECUTED
127139: e8 b6 be fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("readlink: reading link", rc);
12713e: e8 3d 0a 02 00 call 147b80 <__errno> <== NOT EXECUTED
127143: 89 30 mov %esi,(%eax) <== NOT EXECUTED
127145: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12714a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return (int) length;
}
12714d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
127150: 5b pop %ebx <== NOT EXECUTED
127151: 5e pop %esi <== NOT EXECUTED
127152: 5f pop %edi <== NOT EXECUTED
127153: c9 leave <== NOT EXECUTED
127154: c3 ret <== NOT EXECUTED
127155: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
127158: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
12715b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12715e: 53 push %ebx <== NOT EXECUTED
12715f: e8 88 6d 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
127164: 58 pop %eax <== NOT EXECUTED
127165: ff 36 pushl (%esi) <== NOT EXECUTED
127167: e8 88 be fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
return rtems_rfs_rtems_error ("readlink: reading link", rc);
}
rtems_rfs_rtems_unlock (fs);
return (int) length;
12716c: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
12716f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
127172: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
127175: 5b pop %ebx <== NOT EXECUTED
127176: 5e pop %esi <== NOT EXECUTED
127177: 5f pop %edi <== NOT EXECUTED
127178: c9 leave <== NOT EXECUTED
127179: c3 ret <== NOT EXECUTED
00127548 <rtems_rfs_rtems_rename>:
int
rtems_rfs_rtems_rename(rtems_filesystem_location_info_t* old_parent_loc,
rtems_filesystem_location_info_t* old_loc,
rtems_filesystem_location_info_t* new_parent_loc,
const char* new_name)
{
127548: 55 push %ebp <== NOT EXECUTED
127549: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12754b: 57 push %edi <== NOT EXECUTED
12754c: 56 push %esi <== NOT EXECUTED
12754d: 53 push %ebx <== NOT EXECUTED
12754e: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED
127551: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
127554: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
127557: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED
rtems_rfs_ino new_parent;
rtems_rfs_ino ino;
uint32_t doff;
int rc;
old_parent = rtems_rfs_rtems_get_pathloc_ino (old_parent_loc);
12755a: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
12755d: 8b 12 mov (%edx),%edx <== NOT EXECUTED
12755f: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
new_parent = rtems_rfs_rtems_get_pathloc_ino (new_parent_loc);
127562: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
127565: 8b 12 mov (%edx),%edx <== NOT EXECUTED
ino = rtems_rfs_rtems_get_pathloc_ino (old_loc);
127567: 8b 30 mov (%eax),%esi <== NOT EXECUTED
doff = rtems_rfs_rtems_get_pathloc_doff (old_loc);
127569: 8b 40 04 mov 0x4(%eax),%eax <== NOT EXECUTED
12756c: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
12756f: 6a 00 push $0x0 <== NOT EXECUTED
127571: 6a 00 push $0x0 <== NOT EXECUTED
127573: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
127576: ff 30 pushl (%eax) <== NOT EXECUTED
127578: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
12757b: e8 78 b9 fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
/*
* Link to the inode before unlinking so the inode is not erased when
* unlinked.
*/
rc = rtems_rfs_link (fs, new_name, strlen (new_name), new_parent, ino, true);
127580: 31 c0 xor %eax,%eax <== NOT EXECUTED
127582: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
127587: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
12758a: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
12758c: f7 d1 not %ecx <== NOT EXECUTED
12758e: 49 dec %ecx <== NOT EXECUTED
12758f: 5f pop %edi <== NOT EXECUTED
127590: 58 pop %eax <== NOT EXECUTED
127591: 6a 01 push $0x1 <== NOT EXECUTED
127593: 56 push %esi <== NOT EXECUTED
127594: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
127597: 52 push %edx <== NOT EXECUTED
127598: 51 push %ecx <== NOT EXECUTED
127599: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
12759c: 53 push %ebx <== NOT EXECUTED
12759d: e8 d2 ae 01 00 call 142474 <rtems_rfs_link> <== NOT EXECUTED
1275a2: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc)
1275a4: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1275a7: 85 c0 test %eax,%eax <== NOT EXECUTED
1275a9: 74 2d je 1275d8 <rtems_rfs_rtems_rename+0x90><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1275ab: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1275ae: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1275b1: 53 push %ebx <== NOT EXECUTED
1275b2: e8 35 69 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
1275b7: 5a pop %edx <== NOT EXECUTED
1275b8: ff 36 pushl (%esi) <== NOT EXECUTED
1275ba: e8 35 ba fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rename: linking", rc);
1275bf: e8 bc 05 02 00 call 147b80 <__errno> <== NOT EXECUTED
1275c4: 89 38 mov %edi,(%eax) <== NOT EXECUTED
1275c6: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1275cb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
1275ce: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1275d1: 5b pop %ebx <== NOT EXECUTED
1275d2: 5e pop %esi <== NOT EXECUTED
1275d3: 5f pop %edi <== NOT EXECUTED
1275d4: c9 leave <== NOT EXECUTED
1275d5: c3 ret <== NOT EXECUTED
1275d6: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Unlink all inodes even directories with the dir option as false because a
* directory may not be empty.
*/
rc = rtems_rfs_unlink (fs, old_parent, ino, doff,
1275d8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1275db: 6a 02 push $0x2 <== NOT EXECUTED
1275dd: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
1275e0: 56 push %esi <== NOT EXECUTED
1275e1: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
1275e4: 53 push %ebx <== NOT EXECUTED
1275e5: e8 b6 ac 01 00 call 1422a0 <rtems_rfs_unlink> <== NOT EXECUTED
1275ea: 89 c6 mov %eax,%esi <== NOT EXECUTED
rtems_rfs_unlink_dir_allowed);
if (rc)
1275ec: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1275ef: 85 c0 test %eax,%eax <== NOT EXECUTED
1275f1: 74 2d je 127620 <rtems_rfs_rtems_rename+0xd8><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1275f3: 8b 7b 7c mov 0x7c(%ebx),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1275f6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1275f9: 53 push %ebx <== NOT EXECUTED
1275fa: e8 ed 68 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
1275ff: 58 pop %eax <== NOT EXECUTED
127600: ff 37 pushl (%edi) <== NOT EXECUTED
127602: e8 ed b9 fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rename: unlinking", rc);
127607: e8 74 05 02 00 call 147b80 <__errno> <== NOT EXECUTED
12760c: 89 30 mov %esi,(%eax) <== NOT EXECUTED
12760e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
127613: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
127616: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
127619: 5b pop %ebx <== NOT EXECUTED
12761a: 5e pop %esi <== NOT EXECUTED
12761b: 5f pop %edi <== NOT EXECUTED
12761c: c9 leave <== NOT EXECUTED
12761d: c3 ret <== NOT EXECUTED
12761e: 66 90 xchg %ax,%ax <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
127620: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
127623: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
127626: 53 push %ebx <== NOT EXECUTED
127627: e8 c0 68 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
12762c: 5b pop %ebx <== NOT EXECUTED
12762d: ff 36 pushl (%esi) <== NOT EXECUTED
12762f: e8 c0 b9 fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
127634: 31 c0 xor %eax,%eax <== NOT EXECUTED
return rtems_rfs_rtems_error ("rename: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
127636: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
127639: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12763c: 5b pop %ebx <== NOT EXECUTED
12763d: 5e pop %esi <== NOT EXECUTED
12763e: 5f pop %edi <== NOT EXECUTED
12763f: c9 leave <== NOT EXECUTED
127640: c3 ret <== NOT EXECUTED
00127248 <rtems_rfs_rtems_rmnod>:
* @return int
*/
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
127248: 55 push %ebp <== NOT EXECUTED
127249: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12724b: 57 push %edi <== NOT EXECUTED
12724c: 56 push %esi <== NOT EXECUTED
12724d: 53 push %ebx <== NOT EXECUTED
12724e: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED
127251: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
127254: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
127257: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
12725a: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
12725d: 8b 32 mov (%edx),%esi <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
12725f: 8b 38 mov (%eax),%edi <== NOT EXECUTED
uint32_t doff = rtems_rfs_rtems_get_pathloc_doff (pathloc);
127261: 8b 50 04 mov 0x4(%eax),%edx <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
127264: 6a 00 push $0x0 <== NOT EXECUTED
127266: 6a 00 push $0x0 <== NOT EXECUTED
127268: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
12726b: ff 30 pushl (%eax) <== NOT EXECUTED
12726d: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
127270: e8 83 bc fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
printf ("rtems-rfs: rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
127275: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED
12727c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
12727f: 52 push %edx <== NOT EXECUTED
127280: 57 push %edi <== NOT EXECUTED
127281: 56 push %esi <== NOT EXECUTED
127282: 53 push %ebx <== NOT EXECUTED
127283: e8 18 b0 01 00 call 1422a0 <rtems_rfs_unlink> <== NOT EXECUTED
127288: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc)
12728a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12728d: 85 c0 test %eax,%eax <== NOT EXECUTED
12728f: 74 2b je 1272bc <rtems_rfs_rtems_rmnod+0x74><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
127291: 8b 7b 7c mov 0x7c(%ebx),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
127294: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
127297: 53 push %ebx <== NOT EXECUTED
127298: e8 4f 6c 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
12729d: 5a pop %edx <== NOT EXECUTED
12729e: ff 37 pushl (%edi) <== NOT EXECUTED
1272a0: e8 4f bd fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
1272a5: e8 d6 08 02 00 call 147b80 <__errno> <== NOT EXECUTED
1272aa: 89 30 mov %esi,(%eax) <== NOT EXECUTED
1272ac: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1272b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
1272b4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1272b7: 5b pop %ebx <== NOT EXECUTED
1272b8: 5e pop %esi <== NOT EXECUTED
1272b9: 5f pop %edi <== NOT EXECUTED
1272ba: c9 leave <== NOT EXECUTED
1272bb: c3 ret <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1272bc: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1272bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1272c2: 53 push %ebx <== NOT EXECUTED
1272c3: e8 24 6c 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
1272c8: 58 pop %eax <== NOT EXECUTED
1272c9: ff 36 pushl (%esi) <== NOT EXECUTED
1272cb: e8 24 bd fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
1272d0: 31 c0 xor %eax,%eax <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
1272d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1272d5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1272d8: 5b pop %ebx <== NOT EXECUTED
1272d9: 5e pop %esi <== NOT EXECUTED
1272da: 5f pop %edi <== NOT EXECUTED
1272db: c9 leave <== NOT EXECUTED
1272dc: c3 ret <== NOT EXECUTED
00128380 <rtems_rfs_rtems_set_handlers>:
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
128380: 55 push %ebp <== NOT EXECUTED
128381: 89 e5 mov %esp,%ebp <== NOT EXECUTED
128383: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
128386: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
128389: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
12838c: 8b 40 0c mov 0xc(%eax),%eax <== NOT EXECUTED
12838f: 0f b6 50 02 movzbl 0x2(%eax),%edx <== NOT EXECUTED
128393: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
128396: 0f b6 40 03 movzbl 0x3(%eax),%eax <== NOT EXECUTED
12839a: 09 d0 or %edx,%eax <== NOT EXECUTED
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
12839c: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx) <== NOT EXECUTED
if (RTEMS_RFS_S_ISDIR (mode))
1283a3: 0f b7 d0 movzwl %ax,%edx <== NOT EXECUTED
1283a6: 89 d0 mov %edx,%eax <== NOT EXECUTED
1283a8: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
1283ad: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
1283b2: 74 4c je 128400 <rtems_rfs_rtems_set_handlers+0x80><== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
1283b4: 3d 00 20 00 00 cmp $0x2000,%eax <== NOT EXECUTED
1283b9: 74 2d je 1283e8 <rtems_rfs_rtems_set_handlers+0x68><== NOT EXECUTED
1283bb: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED
1283c0: 74 26 je 1283e8 <rtems_rfs_rtems_set_handlers+0x68><== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
1283c2: 3d 00 a0 00 00 cmp $0xa000,%eax <== NOT EXECUTED
1283c7: 74 2b je 1283f4 <rtems_rfs_rtems_set_handlers+0x74><== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
1283c9: 3d 00 80 00 00 cmp $0x8000,%eax <== NOT EXECUTED
1283ce: 74 3c je 12840c <rtems_rfs_rtems_set_handlers+0x8c><== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (file);
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
1283d0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1283d3: 52 push %edx <== NOT EXECUTED
1283d4: 68 88 49 16 00 push $0x164988 <== NOT EXECUTED
1283d9: e8 c6 36 02 00 call 14baa4 <printf> <== NOT EXECUTED
1283de: 31 c0 xor %eax,%eax <== NOT EXECUTED
return false;
1283e0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return true;
}
1283e3: c9 leave <== NOT EXECUTED
1283e4: c3 ret <== NOT EXECUTED
1283e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
1283e8: c7 41 08 a0 99 16 00 movl $0x1699a0,0x8(%ecx) <== NOT EXECUTED
1283ef: b0 01 mov $0x1,%al <== NOT EXECUTED
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
}
1283f1: c9 leave <== NOT EXECUTED
1283f2: c3 ret <== NOT EXECUTED
1283f3: 90 nop <== NOT EXECUTED
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
1283f4: c7 41 08 00 49 16 00 movl $0x164900,0x8(%ecx) <== NOT EXECUTED
1283fb: b0 01 mov $0x1,%al <== NOT EXECUTED
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
}
1283fd: c9 leave <== NOT EXECUTED
1283fe: c3 ret <== NOT EXECUTED
1283ff: 90 nop <== NOT EXECUTED
rtems_rfs_inode_handle* inode)
{
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
128400: c7 41 08 e0 99 16 00 movl $0x1699e0,0x8(%ecx) <== NOT EXECUTED
128407: b0 01 mov $0x1,%al <== NOT EXECUTED
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
}
128409: c9 leave <== NOT EXECUTED
12840a: c3 ret <== NOT EXECUTED
12840b: 90 nop <== NOT EXECUTED
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
loc->handlers = rtems_rfs_rtems_handlers (file);
12840c: c7 41 08 20 9a 16 00 movl $0x169a20,0x8(%ecx) <== NOT EXECUTED
128413: b0 01 mov $0x1,%al <== NOT EXECUTED
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
}
128415: c9 leave <== NOT EXECUTED
128416: c3 ret <== NOT EXECUTED
00126ab0 <rtems_rfs_rtems_shutdown>:
/**
* Shutdown the file system.
*/
int
rtems_rfs_rtems_shutdown (rtems_filesystem_mount_table_entry_t* mt_entry)
{
126ab0: 55 push %ebp <== NOT EXECUTED
126ab1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
126ab3: 56 push %esi <== NOT EXECUTED
126ab4: 53 push %ebx <== NOT EXECUTED
rtems_rfs_file_system* fs = mt_entry->fs_info;
126ab5: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
126ab8: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED
rtems_rfs_rtems_private* rtems;
int rc;
rtems = rtems_rfs_fs_user (fs);
126abb: 8b 70 7c mov 0x7c(%eax),%esi <== NOT EXECUTED
rc = rtems_rfs_fs_close(fs);
126abe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
126ac1: 50 push %eax <== NOT EXECUTED
126ac2: e8 3d 93 01 00 call 13fe04 <rtems_rfs_fs_close> <== NOT EXECUTED
126ac7: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
126ac9: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
126acc: e8 fb ba 01 00 call 1425cc <rtems_rfs_mutex_destroy><== NOT EXECUTED
free (rtems);
126ad1: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
126ad4: e8 8f 7d fe ff call 10e868 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("shutdown: close", rc);
126ad9: e8 a2 10 02 00 call 147b80 <__errno> <== NOT EXECUTED
126ade: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
126ae0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
126ae3: 83 fb 01 cmp $0x1,%ebx <== NOT EXECUTED
126ae6: 19 c0 sbb %eax,%eax <== NOT EXECUTED
126ae8: f7 d0 not %eax <== NOT EXECUTED
}
126aea: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
126aed: 5b pop %ebx <== NOT EXECUTED
126aee: 5e pop %esi <== NOT EXECUTED
126aef: c9 leave <== NOT EXECUTED
126af0: c3 ret <== NOT EXECUTED
00127644 <rtems_rfs_rtems_stat>:
*/
int
rtems_rfs_rtems_stat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
127644: 55 push %ebp <== NOT EXECUTED
127645: 89 e5 mov %esp,%ebp <== NOT EXECUTED
127647: 57 push %edi <== NOT EXECUTED
127648: 56 push %esi <== NOT EXECUTED
127649: 53 push %ebx <== NOT EXECUTED
12764a: 83 ec 50 sub $0x50,%esp <== NOT EXECUTED
12764d: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
127650: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
127653: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
127656: 8b 72 34 mov 0x34(%edx),%esi <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
127659: 8b 38 mov (%eax),%edi <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
12765b: 6a 00 push $0x0 <== NOT EXECUTED
12765d: 6a 00 push $0x0 <== NOT EXECUTED
12765f: 8b 46 7c mov 0x7c(%esi),%eax <== NOT EXECUTED
127662: ff 30 pushl (%eax) <== NOT EXECUTED
127664: e8 8f b8 fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_STAT))
printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
127669: 6a 01 push $0x1 <== NOT EXECUTED
12766b: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
12766e: 50 push %eax <== NOT EXECUTED
12766f: 57 push %edi <== NOT EXECUTED
127670: 56 push %esi <== NOT EXECUTED
127671: e8 7e a4 01 00 call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
127676: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
127679: 85 c0 test %eax,%eax <== NOT EXECUTED
12767b: 0f 85 b3 01 00 00 jne 127834 <rtems_rfs_rtems_stat+0x1f0><== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
127681: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
return rtems_rfs_rtems_error ("stat: opening inode", rc);
}
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
127684: 0f b6 48 02 movzbl 0x2(%eax),%ecx <== NOT EXECUTED
127688: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
12768b: 0f b6 50 03 movzbl 0x3(%eax),%edx <== NOT EXECUTED
12768f: 09 ca or %ecx,%edx <== NOT EXECUTED
127691: 0f b7 d2 movzwl %dx,%edx <== NOT EXECUTED
127694: 89 55 b0 mov %edx,-0x50(%ebp) <== NOT EXECUTED
127697: 81 e2 00 f0 00 00 and $0xf000,%edx <== NOT EXECUTED
12769d: 81 fa 00 20 00 00 cmp $0x2000,%edx <== NOT EXECUTED
1276a3: 0f 84 33 01 00 00 je 1277dc <rtems_rfs_rtems_stat+0x198><== NOT EXECUTED
1276a9: 81 fa 00 60 00 00 cmp $0x6000,%edx <== NOT EXECUTED
1276af: 0f 84 27 01 00 00 je 1277dc <rtems_rfs_rtems_stat+0x198><== NOT EXECUTED
buf->st_rdev =
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
1276b5: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED
1276b8: 8b 50 04 mov 0x4(%eax),%edx <== NOT EXECUTED
1276bb: 8b 00 mov (%eax),%eax <== NOT EXECUTED
1276bd: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
1276bf: 89 53 04 mov %edx,0x4(%ebx) <== NOT EXECUTED
buf->st_ino = ino;
1276c2: 89 7b 08 mov %edi,0x8(%ebx) <== NOT EXECUTED
buf->st_mode = rtems_rfs_rtems_mode (mode);
1276c5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1276c8: ff 75 b0 pushl -0x50(%ebp) <== NOT EXECUTED
1276cb: e8 a8 0c 00 00 call 128378 <rtems_rfs_rtems_mode> <== NOT EXECUTED
1276d0: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
1276d3: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
1276d6: 0f b6 08 movzbl (%eax),%ecx <== NOT EXECUTED
1276d9: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
1276dc: 0f b6 50 01 movzbl 0x1(%eax),%edx <== NOT EXECUTED
1276e0: 09 ca or %ecx,%edx <== NOT EXECUTED
if (links == 0xffff)
1276e2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1276e5: 66 83 fa ff cmp $0xffffffff,%dx <== NOT EXECUTED
1276e9: 0f 84 79 01 00 00 je 127868 <rtems_rfs_rtems_stat+0x224><== NOT EXECUTED
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
1276ef: 66 89 53 10 mov %dx,0x10(%ebx) <== NOT EXECUTED
buf->st_uid = rtems_rfs_inode_get_uid (&inode);
1276f3: 0f b6 50 06 movzbl 0x6(%eax),%edx <== NOT EXECUTED
1276f7: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
1276fa: 0f b6 48 07 movzbl 0x7(%eax),%ecx <== NOT EXECUTED
1276fe: 09 ca or %ecx,%edx <== NOT EXECUTED
127700: 66 89 53 12 mov %dx,0x12(%ebx) <== NOT EXECUTED
buf->st_gid = rtems_rfs_inode_get_gid (&inode);
127704: 0f b6 50 04 movzbl 0x4(%eax),%edx <== NOT EXECUTED
127708: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
12770b: 0f b6 40 05 movzbl 0x5(%eax),%eax <== NOT EXECUTED
12770f: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
127712: 09 c2 or %eax,%edx <== NOT EXECUTED
127714: c1 ea 10 shr $0x10,%edx <== NOT EXECUTED
127717: 66 89 53 14 mov %dx,0x14(%ebx) <== NOT EXECUTED
/*
* Need to check is the ino is an open file. If so we take the values from
* the open file rather than the inode.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
12771b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12771e: 57 push %edi <== NOT EXECUTED
12771f: 56 push %esi <== NOT EXECUTED
127720: e8 2f 7b 01 00 call 13f254 <rtems_rfs_file_get_shared><== NOT EXECUTED
if (shared)
127725: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127728: 85 c0 test %eax,%eax <== NOT EXECUTED
12772a: 0f 84 64 01 00 00 je 127894 <rtems_rfs_rtems_stat+0x250><== NOT EXECUTED
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
127730: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx <== NOT EXECUTED
127736: 89 53 28 mov %edx,0x28(%ebx) <== NOT EXECUTED
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
127739: 8b 90 90 00 00 00 mov 0x90(%eax),%edx <== NOT EXECUTED
12773f: 89 53 30 mov %edx,0x30(%ebx) <== NOT EXECUTED
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
127742: 8b 90 94 00 00 00 mov 0x94(%eax),%edx <== NOT EXECUTED
127748: 89 53 38 mov %edx,0x38(%ebx) <== NOT EXECUTED
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
12774b: 8b 90 84 00 00 00 mov 0x84(%eax),%edx <== NOT EXECUTED
127751: 89 53 44 mov %edx,0x44(%ebx) <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
127754: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
127757: 81 e2 00 f0 00 00 and $0xf000,%edx <== NOT EXECUTED
12775d: 81 fa 00 a0 00 00 cmp $0xa000,%edx <== NOT EXECUTED
127763: 74 63 je 1277c8 <rtems_rfs_rtems_stat+0x184><== NOT EXECUTED
*/
static inline rtems_rfs_pos
rtems_rfs_file_shared_get_size (rtems_rfs_file_system* fs,
rtems_rfs_file_shared* shared)
{
return rtems_rfs_block_get_size (fs, &shared->size);
127765: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127768: 05 84 00 00 00 add $0x84,%eax <== NOT EXECUTED
12776d: 50 push %eax <== NOT EXECUTED
12776e: 56 push %esi <== NOT EXECUTED
12776f: e8 e8 59 01 00 call 13d15c <rtems_rfs_block_get_size><== NOT EXECUTED
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
127774: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED
127777: 89 53 24 mov %edx,0x24(%ebx) <== NOT EXECUTED
12777a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
12777d: 8b 46 08 mov 0x8(%esi),%eax <== NOT EXECUTED
127780: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
127783: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
127786: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
127789: 50 push %eax <== NOT EXECUTED
12778a: 56 push %esi <== NOT EXECUTED
12778b: e8 e0 a2 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
127790: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
127792: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127795: 85 c0 test %eax,%eax <== NOT EXECUTED
127797: 0f 8e d3 00 00 00 jle 127870 <rtems_rfs_rtems_stat+0x22c><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
12779d: 8b 7e 7c mov 0x7c(%esi),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1277a0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1277a3: 56 push %esi <== NOT EXECUTED
1277a4: e8 43 67 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
1277a9: 59 pop %ecx <== NOT EXECUTED
1277aa: ff 37 pushl (%edi) <== NOT EXECUTED
1277ac: e8 43 b8 fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: closing inode", rc);
1277b1: e8 ca 03 02 00 call 147b80 <__errno> <== NOT EXECUTED
1277b6: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
1277b8: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1277bd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
1277c0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1277c3: 5b pop %ebx <== NOT EXECUTED
1277c4: 5e pop %esi <== NOT EXECUTED
1277c5: 5f pop %edi <== NOT EXECUTED
1277c6: c9 leave <== NOT EXECUTED
1277c7: c3 ret <== NOT EXECUTED
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
1277c8: 0f b7 80 88 00 00 00 movzwl 0x88(%eax),%eax <== NOT EXECUTED
1277cf: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED
1277d2: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED
1277d9: eb a2 jmp 12777d <rtems_rfs_rtems_stat+0x139><== NOT EXECUTED
1277db: 90 nop <== NOT EXECUTED
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
1277dc: 8d 48 1c lea 0x1c(%eax),%ecx <== NOT EXECUTED
1277df: 0f b6 51 04 movzbl 0x4(%ecx),%edx <== NOT EXECUTED
1277e3: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
1277e6: 89 55 b4 mov %edx,-0x4c(%ebp) <== NOT EXECUTED
1277e9: 0f b6 51 05 movzbl 0x5(%ecx),%edx <== NOT EXECUTED
1277ed: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
1277f0: 09 55 b4 or %edx,-0x4c(%ebp) <== NOT EXECUTED
1277f3: 0f b6 51 07 movzbl 0x7(%ecx),%edx <== NOT EXECUTED
1277f7: 09 55 b4 or %edx,-0x4c(%ebp) <== NOT EXECUTED
1277fa: 0f b6 51 06 movzbl 0x6(%ecx),%edx <== NOT EXECUTED
1277fe: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
127801: 09 55 b4 or %edx,-0x4c(%ebp) <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
127804: 0f b6 51 03 movzbl 0x3(%ecx),%edx <== NOT EXECUTED
127808: 0f b6 40 1c movzbl 0x1c(%eax),%eax <== NOT EXECUTED
12780c: c1 e0 18 shl $0x18,%eax <== NOT EXECUTED
12780f: 09 c2 or %eax,%edx <== NOT EXECUTED
127811: 0f b6 41 01 movzbl 0x1(%ecx),%eax <== NOT EXECUTED
127815: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
127818: 09 c2 or %eax,%edx <== NOT EXECUTED
12781a: 0f b6 41 02 movzbl 0x2(%ecx),%eax <== NOT EXECUTED
12781e: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
127821: 09 c2 or %eax,%edx <== NOT EXECUTED
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
{
buf->st_rdev =
127823: 89 53 18 mov %edx,0x18(%ebx) <== NOT EXECUTED
127826: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
127829: 89 43 1c mov %eax,0x1c(%ebx) <== NOT EXECUTED
12782c: e9 84 fe ff ff jmp 1276b5 <rtems_rfs_rtems_stat+0x71><== NOT EXECUTED
127831: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
127834: 8b 5e 7c mov 0x7c(%esi),%ebx <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
127837: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12783a: 56 push %esi <== NOT EXECUTED
12783b: 89 45 ac mov %eax,-0x54(%ebp) <== NOT EXECUTED
12783e: e8 a9 66 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
127843: 5e pop %esi <== NOT EXECUTED
127844: ff 33 pushl (%ebx) <== NOT EXECUTED
127846: e8 a9 b7 fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: opening inode", rc);
12784b: e8 30 03 02 00 call 147b80 <__errno> <== NOT EXECUTED
127850: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED
127853: 89 10 mov %edx,(%eax) <== NOT EXECUTED
127855: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
12785a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return rtems_rfs_rtems_error ("stat: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
12785d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
127860: 5b pop %ebx <== NOT EXECUTED
127861: 5e pop %esi <== NOT EXECUTED
127862: 5f pop %edi <== NOT EXECUTED
127863: c9 leave <== NOT EXECUTED
127864: c3 ret <== NOT EXECUTED
127865: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
127868: 31 d2 xor %edx,%edx <== NOT EXECUTED
12786a: e9 80 fe ff ff jmp 1276ef <rtems_rfs_rtems_stat+0xab><== NOT EXECUTED
12786f: 90 nop <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
127870: 8b 5e 7c mov 0x7c(%esi),%ebx <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
127873: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
127876: 56 push %esi <== NOT EXECUTED
127877: e8 70 66 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
12787c: 5a pop %edx <== NOT EXECUTED
12787d: ff 33 pushl (%ebx) <== NOT EXECUTED
12787f: e8 70 b7 fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
127884: 31 c0 xor %eax,%eax <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
127886: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
127889: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12788c: 5b pop %ebx <== NOT EXECUTED
12788d: 5e pop %esi <== NOT EXECUTED
12788e: 5f pop %edi <== NOT EXECUTED
12788f: c9 leave <== NOT EXECUTED
127890: c3 ret <== NOT EXECUTED
127891: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
127894: 8b 7d cc mov -0x34(%ebp),%edi <== NOT EXECUTED
127897: 8d 57 10 lea 0x10(%edi),%edx <== NOT EXECUTED
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
}
else
{
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
12789a: 0f b6 42 03 movzbl 0x3(%edx),%eax <== NOT EXECUTED
12789e: 0f b6 4f 10 movzbl 0x10(%edi),%ecx <== NOT EXECUTED
1278a2: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
1278a5: 09 c8 or %ecx,%eax <== NOT EXECUTED
1278a7: 0f b6 4a 01 movzbl 0x1(%edx),%ecx <== NOT EXECUTED
1278ab: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
1278ae: 09 c8 or %ecx,%eax <== NOT EXECUTED
1278b0: 0f b6 52 02 movzbl 0x2(%edx),%edx <== NOT EXECUTED
1278b4: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
1278b7: 09 d0 or %edx,%eax <== NOT EXECUTED
1278b9: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
1278bc: 8d 57 14 lea 0x14(%edi),%edx <== NOT EXECUTED
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
1278bf: 0f b6 42 03 movzbl 0x3(%edx),%eax <== NOT EXECUTED
1278c3: 0f b6 4f 14 movzbl 0x14(%edi),%ecx <== NOT EXECUTED
1278c7: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
1278ca: 09 c8 or %ecx,%eax <== NOT EXECUTED
1278cc: 0f b6 4a 01 movzbl 0x1(%edx),%ecx <== NOT EXECUTED
1278d0: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
1278d3: 09 c8 or %ecx,%eax <== NOT EXECUTED
1278d5: 0f b6 52 02 movzbl 0x2(%edx),%edx <== NOT EXECUTED
1278d9: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
1278dc: 09 d0 or %edx,%eax <== NOT EXECUTED
1278de: 89 43 30 mov %eax,0x30(%ebx) <== NOT EXECUTED
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
1278e1: 8d 57 18 lea 0x18(%edi),%edx <== NOT EXECUTED
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
1278e4: 0f b6 42 03 movzbl 0x3(%edx),%eax <== NOT EXECUTED
1278e8: 0f b6 4f 18 movzbl 0x18(%edi),%ecx <== NOT EXECUTED
1278ec: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
1278ef: 09 c8 or %ecx,%eax <== NOT EXECUTED
1278f1: 0f b6 4a 01 movzbl 0x1(%edx),%ecx <== NOT EXECUTED
1278f5: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
1278f8: 09 c8 or %ecx,%eax <== NOT EXECUTED
1278fa: 0f b6 52 02 movzbl 0x2(%edx),%edx <== NOT EXECUTED
1278fe: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
127901: 09 d0 or %edx,%eax <== NOT EXECUTED
127903: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
127906: 8d 57 0c lea 0xc(%edi),%edx <== NOT EXECUTED
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
127909: 0f b6 42 03 movzbl 0x3(%edx),%eax <== NOT EXECUTED
12790d: 0f b6 4f 0c movzbl 0xc(%edi),%ecx <== NOT EXECUTED
127911: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
127914: 09 c8 or %ecx,%eax <== NOT EXECUTED
127916: 0f b6 4a 01 movzbl 0x1(%edx),%ecx <== NOT EXECUTED
12791a: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
12791d: 09 c8 or %ecx,%eax <== NOT EXECUTED
12791f: 0f b6 52 02 movzbl 0x2(%edx),%edx <== NOT EXECUTED
127923: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
127926: 09 d0 or %edx,%eax <== NOT EXECUTED
127928: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
12792b: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
12792e: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
127933: 3d 00 a0 00 00 cmp $0xa000,%eax <== NOT EXECUTED
127938: 75 22 jne 12795c <rtems_rfs_rtems_stat+0x318><== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
12793a: 0f b6 57 0a movzbl 0xa(%edi),%edx <== NOT EXECUTED
12793e: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
127941: 0f b6 47 0b movzbl 0xb(%edi),%eax <== NOT EXECUTED
127945: 09 d0 or %edx,%eax <== NOT EXECUTED
127947: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED
12794a: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED
12794d: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED
127954: e9 24 fe ff ff jmp 12777d <rtems_rfs_rtems_stat+0x139><== NOT EXECUTED
127959: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
12795c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12795f: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED
127962: 52 push %edx <== NOT EXECUTED
127963: 56 push %esi <== NOT EXECUTED
127964: e8 23 9e 01 00 call 14178c <rtems_rfs_inode_get_size><== NOT EXECUTED
127969: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED
12796c: 89 53 24 mov %edx,0x24(%ebx) <== NOT EXECUTED
12796f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
127972: e9 06 fe ff ff jmp 12777d <rtems_rfs_rtems_stat+0x139><== NOT EXECUTED
00126ccc <rtems_rfs_rtems_statvfs>:
* @return int
*/
int
rtems_rfs_rtems_statvfs (rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
126ccc: 55 push %ebp <== NOT EXECUTED
126ccd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
126ccf: 56 push %esi <== NOT EXECUTED
126cd0: 53 push %ebx <== NOT EXECUTED
126cd1: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
126cd4: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
126cd7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
126cda: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED
126cdd: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
126ce0: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
126ce3: 50 push %eax <== NOT EXECUTED
126ce4: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
126ce7: 50 push %eax <== NOT EXECUTED
126ce8: 56 push %esi <== NOT EXECUTED
126ce9: e8 22 a6 01 00 call 141310 <rtems_rfs_group_usage> <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
126cee: 8b 46 08 mov 0x8(%esi),%eax <== NOT EXECUTED
126cf1: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
126cf3: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED
126cf6: 8b 50 24 mov 0x24(%eax),%edx <== NOT EXECUTED
126cf9: 89 53 04 mov %edx,0x4(%ebx) <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
126cfc: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
126cff: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED
126d02: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
126d09: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
126d0c: 2b 45 f4 sub -0xc(%ebp),%eax <== NOT EXECUTED
126d0f: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED
126d12: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
126d19: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED
126d1c: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) <== NOT EXECUTED
sb->f_files = rtems_rfs_fs_inodes (fs);
126d23: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED
126d26: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
126d29: 2b 45 f0 sub -0x10(%ebp),%eax <== NOT EXECUTED
126d2c: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED
sb->f_favail = sb->f_ffree;
126d2f: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
126d32: c7 43 2c 01 20 09 28 movl $0x28092001,0x2c(%ebx) <== NOT EXECUTED
sb->f_flag = rtems_rfs_fs_flags (fs);
126d39: 8b 06 mov (%esi),%eax <== NOT EXECUTED
126d3b: 89 43 30 mov %eax,0x30(%ebx) <== NOT EXECUTED
sb->f_namemax = rtems_rfs_fs_max_name (fs);
126d3e: 8b 46 18 mov 0x18(%esi),%eax <== NOT EXECUTED
126d41: 89 43 34 mov %eax,0x34(%ebx) <== NOT EXECUTED
return 0;
}
126d44: 31 c0 xor %eax,%eax <== NOT EXECUTED
126d46: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
126d49: 5b pop %ebx <== NOT EXECUTED
126d4a: 5e pop %esi <== NOT EXECUTED
126d4b: c9 leave <== NOT EXECUTED
126d4c: c3 ret <== NOT EXECUTED
0012717c <rtems_rfs_rtems_symlink>:
int
rtems_rfs_rtems_symlink (rtems_filesystem_location_info_t* parent_loc,
const char* link_name,
const char* node_name)
{
12717c: 55 push %ebp <== NOT EXECUTED
12717d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12717f: 57 push %edi <== NOT EXECUTED
127180: 56 push %esi <== NOT EXECUTED
127181: 53 push %ebx <== NOT EXECUTED
127182: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
127185: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
127188: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
12718b: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
12718e: 8b 00 mov (%eax),%eax <== NOT EXECUTED
127190: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
127193: e8 9c 76 00 00 call 12e834 <geteuid> <== NOT EXECUTED
127198: 66 89 45 e6 mov %ax,-0x1a(%ebp) <== NOT EXECUTED
gid = getegid ();
12719c: e8 83 76 00 00 call 12e824 <getegid> <== NOT EXECUTED
1271a1: 89 c6 mov %eax,%esi <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
1271a3: 57 push %edi <== NOT EXECUTED
1271a4: 6a 00 push $0x0 <== NOT EXECUTED
1271a6: 6a 00 push $0x0 <== NOT EXECUTED
1271a8: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
1271ab: ff 30 pushl (%eax) <== NOT EXECUTED
1271ad: e8 46 bd fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
link_name, strlen (link_name),
1271b2: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
1271b7: 31 c0 xor %eax,%eax <== NOT EXECUTED
1271b9: 89 d1 mov %edx,%ecx <== NOT EXECUTED
1271bb: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED
1271be: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
1271c0: f7 d1 not %ecx <== NOT EXECUTED
1271c2: 49 dec %ecx <== NOT EXECUTED
1271c3: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
1271c6: 89 d1 mov %edx,%ecx <== NOT EXECUTED
1271c8: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
1271cb: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
1271cd: 89 ca mov %ecx,%edx <== NOT EXECUTED
1271cf: f7 d2 not %edx <== NOT EXECUTED
1271d1: 4a dec %edx <== NOT EXECUTED
1271d2: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
1271d5: 0f b7 f6 movzwl %si,%esi <== NOT EXECUTED
1271d8: 56 push %esi <== NOT EXECUTED
1271d9: 0f b7 45 e6 movzwl -0x1a(%ebp),%eax <== NOT EXECUTED
1271dd: 50 push %eax <== NOT EXECUTED
1271de: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
1271e1: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
1271e4: 52 push %edx <== NOT EXECUTED
1271e5: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
1271e8: 53 push %ebx <== NOT EXECUTED
1271e9: e8 b2 ae 01 00 call 1420a0 <rtems_rfs_symlink> <== NOT EXECUTED
1271ee: 89 c6 mov %eax,%esi <== NOT EXECUTED
link_name, strlen (link_name),
uid, gid, parent);
if (rc)
1271f0: 83 c4 30 add $0x30,%esp <== NOT EXECUTED
1271f3: 85 c0 test %eax,%eax <== NOT EXECUTED
1271f5: 74 2d je 127224 <rtems_rfs_rtems_symlink+0xa8><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1271f7: 8b 7b 7c mov 0x7c(%ebx),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1271fa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1271fd: 53 push %ebx <== NOT EXECUTED
1271fe: e8 e9 6c 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
127203: 5b pop %ebx <== NOT EXECUTED
127204: ff 37 pushl (%edi) <== NOT EXECUTED
127206: e8 e9 bd fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("symlink: linking", rc);
12720b: e8 70 09 02 00 call 147b80 <__errno> <== NOT EXECUTED
127210: 89 30 mov %esi,(%eax) <== NOT EXECUTED
127212: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
127217: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
12721a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12721d: 5b pop %ebx <== NOT EXECUTED
12721e: 5e pop %esi <== NOT EXECUTED
12721f: 5f pop %edi <== NOT EXECUTED
127220: c9 leave <== NOT EXECUTED
127221: c3 ret <== NOT EXECUTED
127222: 66 90 xchg %ax,%ax <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
127224: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
127227: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12722a: 53 push %ebx <== NOT EXECUTED
12722b: e8 bc 6c 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
127230: 59 pop %ecx <== NOT EXECUTED
127231: ff 36 pushl (%esi) <== NOT EXECUTED
127233: e8 bc bd fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
127238: 31 c0 xor %eax,%eax <== NOT EXECUTED
return rtems_rfs_rtems_error ("symlink: linking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
12723a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
12723d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
127240: 5b pop %ebx <== NOT EXECUTED
127241: 5e pop %esi <== NOT EXECUTED
127242: 5f pop %edi <== NOT EXECUTED
127243: c9 leave <== NOT EXECUTED
127244: c3 ret <== NOT EXECUTED
001272e0 <rtems_rfs_rtems_unlink>:
*/
int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
1272e0: 55 push %ebp <== NOT EXECUTED
1272e1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1272e3: 57 push %edi <== NOT EXECUTED
1272e4: 56 push %esi <== NOT EXECUTED
1272e5: 53 push %ebx <== NOT EXECUTED
1272e6: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED
1272e9: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
1272ec: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
1272ef: 8b 4a 10 mov 0x10(%edx),%ecx <== NOT EXECUTED
1272f2: 8b 59 34 mov 0x34(%ecx),%ebx <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
1272f5: 8b 32 mov (%edx),%esi <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (loc);
1272f7: 8b 38 mov (%eax),%edi <== NOT EXECUTED
uint32_t doff = rtems_rfs_rtems_get_pathloc_doff (loc);
1272f9: 8b 50 04 mov 0x4(%eax),%edx <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
1272fc: 6a 00 push $0x0 <== NOT EXECUTED
1272fe: 6a 00 push $0x0 <== NOT EXECUTED
127300: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
127303: ff 30 pushl (%eax) <== NOT EXECUTED
127305: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
127308: e8 eb bb fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_UNLINK))
printf("rtems-rfs-rtems: unlink: parent:%" PRId32 " doff:%" PRIu32 " ino:%" PRId32 "\n",
parent, doff, ino);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
12730d: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED
127314: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
127317: 52 push %edx <== NOT EXECUTED
127318: 57 push %edi <== NOT EXECUTED
127319: 56 push %esi <== NOT EXECUTED
12731a: 53 push %ebx <== NOT EXECUTED
12731b: e8 80 af 01 00 call 1422a0 <rtems_rfs_unlink> <== NOT EXECUTED
127320: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc)
127322: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
127325: 85 c0 test %eax,%eax <== NOT EXECUTED
127327: 74 2b je 127354 <rtems_rfs_rtems_unlink+0x74><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
127329: 8b 7b 7c mov 0x7c(%ebx),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
12732c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12732f: 53 push %ebx <== NOT EXECUTED
127330: e8 b7 6b 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
127335: 5b pop %ebx <== NOT EXECUTED
127336: ff 37 pushl (%edi) <== NOT EXECUTED
127338: e8 b7 bc fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("unlink: unlink inode", rc);
12733d: e8 3e 08 02 00 call 147b80 <__errno> <== NOT EXECUTED
127342: 89 30 mov %esi,(%eax) <== NOT EXECUTED
127344: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
127349: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
12734c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12734f: 5b pop %ebx <== NOT EXECUTED
127350: 5e pop %esi <== NOT EXECUTED
127351: 5f pop %edi <== NOT EXECUTED
127352: c9 leave <== NOT EXECUTED
127353: c3 ret <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
127354: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
127357: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12735a: 53 push %ebx <== NOT EXECUTED
12735b: e8 8c 6b 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
127360: 59 pop %ecx <== NOT EXECUTED
127361: ff 36 pushl (%esi) <== NOT EXECUTED
127363: e8 8c bc fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
127368: 31 c0 xor %eax,%eax <== NOT EXECUTED
return rtems_rfs_rtems_error ("unlink: unlink inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
12736a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
12736d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
127370: 5b pop %ebx <== NOT EXECUTED
127371: 5e pop %esi <== NOT EXECUTED
127372: 5f pop %edi <== NOT EXECUTED
127373: c9 leave <== NOT EXECUTED
127374: c3 ret <== NOT EXECUTED
00126a90 <rtems_rfs_rtems_unlock>:
/**
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
126a90: 55 push %ebp <== NOT EXECUTED
126a91: 89 e5 mov %esp,%ebp <== NOT EXECUTED
126a93: 53 push %ebx <== NOT EXECUTED
126a94: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
126a97: 8b 58 7c mov 0x7c(%eax),%ebx <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
126a9a: 50 push %eax <== NOT EXECUTED
126a9b: e8 4c 74 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
126aa0: 58 pop %eax <== NOT EXECUTED
126aa1: ff 33 pushl (%ebx) <== NOT EXECUTED
126aa3: e8 4c c5 fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
126aa8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_mutex_unlock (&rtems->access);
}
126aab: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
126aae: c9 leave <== NOT EXECUTED
126aaf: c3 ret <== NOT EXECUTED
0012741c <rtems_rfs_rtems_utime>:
int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
12741c: 55 push %ebp <== NOT EXECUTED
12741d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12741f: 57 push %edi <== NOT EXECUTED
127420: 56 push %esi <== NOT EXECUTED
127421: 53 push %ebx <== NOT EXECUTED
127422: 83 ec 50 sub $0x50,%esp <== NOT EXECUTED
127425: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
127428: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
12742b: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
12742e: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
127431: 8b 10 mov (%eax),%edx <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
127433: 6a 00 push $0x0 <== NOT EXECUTED
127435: 6a 00 push $0x0 <== NOT EXECUTED
127437: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
12743a: ff 30 pushl (%eax) <== NOT EXECUTED
12743c: 89 55 b4 mov %edx,-0x4c(%ebp) <== NOT EXECUTED
12743f: e8 b4 ba fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
127444: 6a 01 push $0x1 <== NOT EXECUTED
127446: 8d 7d c0 lea -0x40(%ebp),%edi <== NOT EXECUTED
127449: 57 push %edi <== NOT EXECUTED
12744a: 8b 55 b4 mov -0x4c(%ebp),%edx <== NOT EXECUTED
12744d: 52 push %edx <== NOT EXECUTED
12744e: 53 push %ebx <== NOT EXECUTED
12744f: e8 a0 a6 01 00 call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
127454: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
127457: 85 c0 test %eax,%eax <== NOT EXECUTED
127459: 74 31 je 12748c <rtems_rfs_rtems_utime+0x70><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
12745b: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
12745e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
127461: 53 push %ebx <== NOT EXECUTED
127462: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
127465: e8 82 6a 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
12746a: 59 pop %ecx <== NOT EXECUTED
12746b: ff 36 pushl (%esi) <== NOT EXECUTED
12746d: e8 82 bb fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("utime: read inode", rc);
127472: e8 09 07 02 00 call 147b80 <__errno> <== NOT EXECUTED
127477: 8b 55 b4 mov -0x4c(%ebp),%edx <== NOT EXECUTED
12747a: 89 10 mov %edx,(%eax) <== NOT EXECUTED
12747c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
127481: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
127484: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
127487: 5b pop %ebx <== NOT EXECUTED
127488: 5e pop %esi <== NOT EXECUTED
127489: 5f pop %edi <== NOT EXECUTED
12748a: c9 leave <== NOT EXECUTED
12748b: c3 ret <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
12748c: 89 f2 mov %esi,%edx <== NOT EXECUTED
12748e: c1 ea 18 shr $0x18,%edx <== NOT EXECUTED
127491: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
127494: 88 50 10 mov %dl,0x10(%eax) <== NOT EXECUTED
127497: 89 f2 mov %esi,%edx <== NOT EXECUTED
127499: c1 ea 10 shr $0x10,%edx <== NOT EXECUTED
12749c: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
12749f: 88 50 11 mov %dl,0x11(%eax) <== NOT EXECUTED
1274a2: 89 f2 mov %esi,%edx <== NOT EXECUTED
1274a4: c1 ea 08 shr $0x8,%edx <== NOT EXECUTED
1274a7: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
1274aa: 88 50 12 mov %dl,0x12(%eax) <== NOT EXECUTED
1274ad: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
1274b0: 89 f2 mov %esi,%edx <== NOT EXECUTED
1274b2: 88 50 13 mov %dl,0x13(%eax) <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
1274b5: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
1274b8: c1 ea 18 shr $0x18,%edx <== NOT EXECUTED
1274bb: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
1274be: 88 50 14 mov %dl,0x14(%eax) <== NOT EXECUTED
1274c1: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
1274c4: c1 ea 10 shr $0x10,%edx <== NOT EXECUTED
1274c7: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
1274ca: 88 50 15 mov %dl,0x15(%eax) <== NOT EXECUTED
1274cd: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
1274d0: c1 ea 08 shr $0x8,%edx <== NOT EXECUTED
1274d3: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
1274d6: 88 50 16 mov %dl,0x16(%eax) <== NOT EXECUTED
1274d9: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
1274dc: 8a 55 10 mov 0x10(%ebp),%dl <== NOT EXECUTED
1274df: 88 50 17 mov %dl,0x17(%eax) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
1274e2: c6 45 d0 01 movb $0x1,-0x30(%ebp) <== NOT EXECUTED
}
rtems_rfs_inode_set_atime (&inode, atime);
rtems_rfs_inode_set_mtime (&inode, mtime);
rc = rtems_rfs_inode_close (fs, &inode);
1274e6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1274e9: 57 push %edi <== NOT EXECUTED
1274ea: 53 push %ebx <== NOT EXECUTED
1274eb: e8 80 a5 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
1274f0: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc)
1274f2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1274f5: 85 c0 test %eax,%eax <== NOT EXECUTED
1274f7: 74 2b je 127524 <rtems_rfs_rtems_utime+0x108><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1274f9: 8b 7b 7c mov 0x7c(%ebx),%edi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1274fc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1274ff: 53 push %ebx <== NOT EXECUTED
127500: e8 e7 69 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
127505: 5a pop %edx <== NOT EXECUTED
127506: ff 37 pushl (%edi) <== NOT EXECUTED
127508: e8 e7 ba fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("utime: closing inode", rc);
12750d: e8 6e 06 02 00 call 147b80 <__errno> <== NOT EXECUTED
127512: 89 30 mov %esi,(%eax) <== NOT EXECUTED
127514: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
127519: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
12751c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12751f: 5b pop %ebx <== NOT EXECUTED
127520: 5e pop %esi <== NOT EXECUTED
127521: 5f pop %edi <== NOT EXECUTED
127522: c9 leave <== NOT EXECUTED
127523: c3 ret <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
127524: 8b 73 7c mov 0x7c(%ebx),%esi <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
127527: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12752a: 53 push %ebx <== NOT EXECUTED
12752b: e8 bc 69 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
127530: 58 pop %eax <== NOT EXECUTED
127531: ff 36 pushl (%esi) <== NOT EXECUTED
127533: e8 bc ba fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
127538: 31 c0 xor %eax,%eax <== NOT EXECUTED
return rtems_rfs_rtems_error ("utime: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
12753a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
12753d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
127540: 5b pop %ebx <== NOT EXECUTED
127541: 5e pop %esi <== NOT EXECUTED
127542: 5f pop %edi <== NOT EXECUTED
127543: c9 leave <== NOT EXECUTED
127544: c3 ret <== NOT EXECUTED
00140358 <rtems_rfs_rup_quotient>:
* Return a rounded up integer quotient given a dividend and divisor. That is:
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
140358: 55 push %ebp <== NOT EXECUTED
140359: 89 e5 mov %esp,%ebp <== NOT EXECUTED
14035b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
14035e: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
if (dividend == 0)
140361: 85 c0 test %eax,%eax <== NOT EXECUTED
140363: 74 0b je 140370 <rtems_rfs_rup_quotient+0x18><== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
140365: 48 dec %eax <== NOT EXECUTED
140366: 31 d2 xor %edx,%edx <== NOT EXECUTED
140368: f7 f1 div %ecx <== NOT EXECUTED
14036a: 40 inc %eax <== NOT EXECUTED
}
14036b: c9 leave <== NOT EXECUTED
14036c: c3 ret <== NOT EXECUTED
14036d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
140370: b0 01 mov $0x1,%al <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
}
140372: c9 leave <== NOT EXECUTED
140373: c3 ret <== NOT EXECUTED
00129144 <rtems_rfs_shell_block>:
return 0;
}
static int
rtems_rfs_shell_block (rtems_rfs_file_system* fs, int argc, char *argv[])
{
129144: 55 push %ebp <== NOT EXECUTED
129145: 89 e5 mov %esp,%ebp <== NOT EXECUTED
129147: 57 push %edi <== NOT EXECUTED
129148: 56 push %esi <== NOT EXECUTED
129149: 53 push %ebx <== NOT EXECUTED
12914a: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
12914d: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
uint8_t* data;
bool state;
int b;
int rc;
if (argc <= 1)
129150: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) <== NOT EXECUTED
129154: 0f 8e be 01 00 00 jle 129318 <rtems_rfs_shell_block+0x1d4><== NOT EXECUTED
{
printf ("error: no block number provided\n");
return 1;
}
block = strtoul (argv[1], 0, 0);
12915a: 50 push %eax <== NOT EXECUTED
12915b: 6a 00 push $0x0 <== NOT EXECUTED
12915d: 6a 00 push $0x0 <== NOT EXECUTED
12915f: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
129162: ff 70 04 pushl 0x4(%eax) <== NOT EXECUTED
129165: e8 0a 5e 02 00 call 14ef74 <strtoul> <== NOT EXECUTED
12916a: 89 c3 mov %eax,%ebx <== NOT EXECUTED
12916c: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
12916f: 6a 00 push $0x0 <== NOT EXECUTED
129171: 6a 00 push $0x0 <== NOT EXECUTED
129173: 8b 46 7c mov 0x7c(%esi),%eax <== NOT EXECUTED
129176: ff 30 pushl (%eax) <== NOT EXECUTED
129178: e8 7b 9d fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
12917d: 8d 45 e7 lea -0x19(%ebp),%eax <== NOT EXECUTED
129180: 50 push %eax <== NOT EXECUTED
129181: 53 push %ebx <== NOT EXECUTED
129182: 6a 00 push $0x0 <== NOT EXECUTED
129184: 56 push %esi <== NOT EXECUTED
129185: e8 ee 81 01 00 call 141378 <rtems_rfs_group_bitmap_test><== NOT EXECUTED
12918a: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc > 0)
12918c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12918f: 85 c0 test %eax,%eax <== NOT EXECUTED
129191: 0f 8f a9 00 00 00 jg 129240 <rtems_rfs_shell_block+0xfc><== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free");
129197: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) <== NOT EXECUTED
12919b: 0f 85 1f 01 00 00 jne 1292c0 <rtems_rfs_shell_block+0x17c><== NOT EXECUTED
1291a1: b8 b9 25 16 00 mov $0x1625b9,%eax <== NOT EXECUTED
1291a6: 57 push %edi <== NOT EXECUTED
1291a7: 50 push %eax <== NOT EXECUTED
1291a8: 53 push %ebx <== NOT EXECUTED
1291a9: 68 81 4a 16 00 push $0x164a81 <== NOT EXECUTED
1291ae: e8 f1 28 02 00 call 14baa4 <printf> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
1291b3: c6 45 d8 00 movb $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->bnum = 0;
1291b7: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
1291be: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
printf ("error: opening buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
1291c5: 6a 01 push $0x1 <== NOT EXECUTED
1291c7: 53 push %ebx <== NOT EXECUTED
1291c8: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
1291cb: 50 push %eax <== NOT EXECUTED
1291cc: 56 push %esi <== NOT EXECUTED
1291cd: e8 5a 4f 01 00 call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
1291d2: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc > 0)
1291d4: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1291d7: 85 c0 test %eax,%eax <== NOT EXECUTED
1291d9: 0f 8f ed 00 00 00 jg 1292cc <rtems_rfs_shell_block+0x188><== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
1291df: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
1291e2: 8b 78 20 mov 0x20(%eax),%edi <== NOT EXECUTED
b < rtems_rfs_fs_block_size (fs);
1291e5: 8b 5e 08 mov 0x8(%esi),%ebx <== NOT EXECUTED
1291e8: 85 db test %ebx,%ebx <== NOT EXECUTED
1291ea: 0f 84 94 00 00 00 je 129284 <rtems_rfs_shell_block+0x140><== NOT EXECUTED
1291f0: 31 db xor %ebx,%ebx <== NOT EXECUTED
1291f2: eb 30 jmp 129224 <rtems_rfs_shell_block+0xe0><== NOT EXECUTED
b++, data++)
{
int mod = b % 16;
if (mod == 0)
{
if (b)
1291f4: 85 db test %ebx,%ebx <== NOT EXECUTED
1291f6: 75 78 jne 129270 <rtems_rfs_shell_block+0x12c><== NOT EXECUTED
printf ("\n");
printf ("%04x ", b);
1291f8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1291fb: 53 push %ebx <== NOT EXECUTED
1291fc: 68 d1 f4 15 00 push $0x15f4d1 <== NOT EXECUTED
129201: e8 9e 28 02 00 call 14baa4 <printf> <== NOT EXECUTED
129206: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
if (mod == 8)
printf (" ");
printf ("%02x ", *data);
129209: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12920c: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax <== NOT EXECUTED
129210: 50 push %eax <== NOT EXECUTED
129211: 68 92 4a 16 00 push $0x164a92 <== NOT EXECUTED
129216: e8 89 28 02 00 call 14baa4 <printf> <== NOT EXECUTED
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
b < rtems_rfs_fs_block_size (fs);
b++, data++)
12921b: 43 inc %ebx <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
b < rtems_rfs_fs_block_size (fs);
12921c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12921f: 39 5e 08 cmp %ebx,0x8(%esi) <== NOT EXECUTED
129222: 76 60 jbe 129284 <rtems_rfs_shell_block+0x140><== NOT EXECUTED
b++, data++)
{
int mod = b % 16;
if (mod == 0)
129224: 89 d8 mov %ebx,%eax <== NOT EXECUTED
129226: 83 e0 0f and $0xf,%eax <== NOT EXECUTED
129229: 74 c9 je 1291f4 <rtems_rfs_shell_block+0xb0><== NOT EXECUTED
{
if (b)
printf ("\n");
printf ("%04x ", b);
}
if (mod == 8)
12922b: 83 f8 08 cmp $0x8,%eax <== NOT EXECUTED
12922e: 75 d9 jne 129209 <rtems_rfs_shell_block+0xc5><== NOT EXECUTED
printf (" ");
129230: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129233: 6a 20 push $0x20 <== NOT EXECUTED
129235: e8 ca 29 02 00 call 14bc04 <putchar> <== NOT EXECUTED
12923a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12923d: eb ca jmp 129209 <rtems_rfs_shell_block+0xc5><== NOT EXECUTED
12923f: 90 nop <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
129240: 89 f0 mov %esi,%eax <== NOT EXECUTED
129242: e8 29 f5 ff ff call 128770 <rtems_rfs_shell_unlock_rfs><== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
129247: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12924a: 57 push %edi <== NOT EXECUTED
12924b: e8 dc 42 02 00 call 14d52c <strerror> <== NOT EXECUTED
129250: 50 push %eax <== NOT EXECUTED
129251: 57 push %edi <== NOT EXECUTED
129252: 53 push %ebx <== NOT EXECUTED
129253: 68 bc 4f 16 00 push $0x164fbc <== NOT EXECUTED
129258: e8 47 28 02 00 call 14baa4 <printf> <== NOT EXECUTED
12925d: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
129262: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
}
rtems_rfs_shell_unlock_rfs (fs);
return 0;
}
129265: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129268: 5b pop %ebx <== NOT EXECUTED
129269: 5e pop %esi <== NOT EXECUTED
12926a: 5f pop %edi <== NOT EXECUTED
12926b: c9 leave <== NOT EXECUTED
12926c: c3 ret <== NOT EXECUTED
12926d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
int mod = b % 16;
if (mod == 0)
{
if (b)
printf ("\n");
129270: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129273: 6a 0a push $0xa <== NOT EXECUTED
129275: e8 8a 29 02 00 call 14bc04 <putchar> <== NOT EXECUTED
12927a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12927d: e9 76 ff ff ff jmp 1291f8 <rtems_rfs_shell_block+0xb4><== NOT EXECUTED
129282: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (mod == 8)
printf (" ");
printf ("%02x ", *data);
}
printf ("\n");
129284: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129287: 6a 0a push $0xa <== NOT EXECUTED
129289: e8 76 29 02 00 call 14bc04 <putchar> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
12928e: 5a pop %edx <== NOT EXECUTED
12928f: 59 pop %ecx <== NOT EXECUTED
129290: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
129293: 50 push %eax <== NOT EXECUTED
129294: 56 push %esi <== NOT EXECUTED
129295: e8 8e 4d 01 00 call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
12929a: c6 45 d8 00 movb $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->bnum = 0;
12929e: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
1292a5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
printf ("error: closing buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
rtems_rfs_shell_unlock_rfs (fs);
1292ac: 89 f0 mov %esi,%eax <== NOT EXECUTED
1292ae: e8 bd f4 ff ff call 128770 <rtems_rfs_shell_unlock_rfs><== NOT EXECUTED
1292b3: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
1292b5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1292b8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1292bb: 5b pop %ebx <== NOT EXECUTED
1292bc: 5e pop %esi <== NOT EXECUTED
1292bd: 5f pop %edi <== NOT EXECUTED
1292be: c9 leave <== NOT EXECUTED
1292bf: c3 ret <== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free");
1292c0: b8 77 4a 16 00 mov $0x164a77,%eax <== NOT EXECUTED
1292c5: e9 dc fe ff ff jmp 1291a6 <rtems_rfs_shell_block+0x62><== NOT EXECUTED
1292ca: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
1292cc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1292cf: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
1292d2: 50 push %eax <== NOT EXECUTED
1292d3: 56 push %esi <== NOT EXECUTED
1292d4: e8 4f 4d 01 00 call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
1292d9: c6 45 d8 00 movb $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->bnum = 0;
1292dd: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
1292e4: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_shell_unlock_rfs (fs);
1292eb: 89 f0 mov %esi,%eax <== NOT EXECUTED
1292ed: e8 7e f4 ff ff call 128770 <rtems_rfs_shell_unlock_rfs><== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
1292f2: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
1292f5: e8 32 42 02 00 call 14d52c <strerror> <== NOT EXECUTED
1292fa: 50 push %eax <== NOT EXECUTED
1292fb: 57 push %edi <== NOT EXECUTED
1292fc: 53 push %ebx <== NOT EXECUTED
1292fd: 68 ec 4f 16 00 push $0x164fec <== NOT EXECUTED
129302: e8 9d 27 02 00 call 14baa4 <printf> <== NOT EXECUTED
129307: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
12930c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
}
rtems_rfs_shell_unlock_rfs (fs);
return 0;
}
12930f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129312: 5b pop %ebx <== NOT EXECUTED
129313: 5e pop %esi <== NOT EXECUTED
129314: 5f pop %edi <== NOT EXECUTED
129315: c9 leave <== NOT EXECUTED
129316: c3 ret <== NOT EXECUTED
129317: 90 nop <== NOT EXECUTED
int b;
int rc;
if (argc <= 1)
{
printf ("error: no block number provided\n");
129318: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12931b: 68 9c 4f 16 00 push $0x164f9c <== NOT EXECUTED
129320: e8 93 29 02 00 call 14bcb8 <puts> <== NOT EXECUTED
129325: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
12932a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_shell_unlock_rfs (fs);
return 0;
}
12932d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129330: 5b pop %ebx <== NOT EXECUTED
129331: 5e pop %esi <== NOT EXECUTED
129332: 5f pop %edi <== NOT EXECUTED
129333: c9 leave <== NOT EXECUTED
129334: c3 ret <== NOT EXECUTED
00129338 <rtems_rfs_shell_data>:
return rc;
}
static int
rtems_rfs_shell_data (rtems_rfs_file_system* fs, int argc, char *argv[])
{
129338: 55 push %ebp <== NOT EXECUTED
129339: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12933b: 57 push %edi <== NOT EXECUTED
12933c: 56 push %esi <== NOT EXECUTED
12933d: 53 push %ebx <== NOT EXECUTED
12933e: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED
129341: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
size_t blocks;
size_t inodes;
int bpcent;
int ipcent;
printf ("RFS Filesystem Data\n");
129344: 68 98 4a 16 00 push $0x164a98 <== NOT EXECUTED
129349: e8 6a 29 02 00 call 14bcb8 <puts> <== NOT EXECUTED
printf (" flags: %08" PRIx32 "\n", fs->flags);
12934e: 5f pop %edi <== NOT EXECUTED
12934f: 58 pop %eax <== NOT EXECUTED
129350: ff 33 pushl (%ebx) <== NOT EXECUTED
129352: 68 ac 4a 16 00 push $0x164aac <== NOT EXECUTED
129357: e8 48 27 02 00 call 14baa4 <printf> <== NOT EXECUTED
#if 0
printf (" device: %08lx\n", rtems_rfs_fs_device (fs));
#endif
printf (" blocks: %zu\n", rtems_rfs_fs_blocks (fs));
12935c: 59 pop %ecx <== NOT EXECUTED
12935d: 5e pop %esi <== NOT EXECUTED
12935e: ff 73 04 pushl 0x4(%ebx) <== NOT EXECUTED
129361: 68 c7 4a 16 00 push $0x164ac7 <== NOT EXECUTED
129366: e8 39 27 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" block size: %zu\n", rtems_rfs_fs_block_size (fs));
12936b: 58 pop %eax <== NOT EXECUTED
12936c: 5a pop %edx <== NOT EXECUTED
12936d: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
129370: 68 e0 4a 16 00 push $0x164ae0 <== NOT EXECUTED
129375: e8 2a 27 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" size: %" PRIu64 "\n", rtems_rfs_fs_size (fs));
12937a: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
12937d: e8 5e 6a 01 00 call 13fde0 <rtems_rfs_fs_size> <== NOT EXECUTED
129382: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
129385: 52 push %edx <== NOT EXECUTED
129386: 50 push %eax <== NOT EXECUTED
129387: 68 f9 4a 16 00 push $0x164af9 <== NOT EXECUTED
12938c: e8 13 27 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" media block size: %" PRIu32 "\n", rtems_rfs_fs_media_block_size (fs));
129391: 5e pop %esi <== NOT EXECUTED
129392: 5f pop %edi <== NOT EXECUTED
129393: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
129396: ff 70 24 pushl 0x24(%eax) <== NOT EXECUTED
129399: 68 13 4b 16 00 push $0x164b13 <== NOT EXECUTED
12939e: e8 01 27 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" media size: %" PRIu64 "\n", rtems_rfs_fs_media_size (fs));
1293a3: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
1293a6: e8 45 6a 01 00 call 13fdf0 <rtems_rfs_fs_media_size><== NOT EXECUTED
1293ab: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1293ae: 52 push %edx <== NOT EXECUTED
1293af: 50 push %eax <== NOT EXECUTED
1293b0: 68 2c 4b 16 00 push $0x164b2c <== NOT EXECUTED
1293b5: e8 ea 26 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" inodes: %" PRIu32 "\n", rtems_rfs_fs_inodes (fs));
1293ba: 5a pop %edx <== NOT EXECUTED
1293bb: 59 pop %ecx <== NOT EXECUTED
1293bc: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1293bf: 68 46 4b 16 00 push $0x164b46 <== NOT EXECUTED
1293c4: e8 db 26 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" bad blocks: %" PRIu32 "\n", fs->bad_blocks);
1293c9: 5f pop %edi <== NOT EXECUTED
1293ca: 58 pop %eax <== NOT EXECUTED
1293cb: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED
1293ce: 68 5f 4b 16 00 push $0x164b5f <== NOT EXECUTED
1293d3: e8 cc 26 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" max. name length: %" PRIu32 "\n", rtems_rfs_fs_max_name (fs));
1293d8: 59 pop %ecx <== NOT EXECUTED
1293d9: 5e pop %esi <== NOT EXECUTED
1293da: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED
1293dd: 68 78 4b 16 00 push $0x164b78 <== NOT EXECUTED
1293e2: e8 bd 26 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" groups: %d\n", fs->group_count);
1293e7: 58 pop %eax <== NOT EXECUTED
1293e8: 5a pop %edx <== NOT EXECUTED
1293e9: ff 73 20 pushl 0x20(%ebx) <== NOT EXECUTED
1293ec: 68 91 4b 16 00 push $0x164b91 <== NOT EXECUTED
1293f1: e8 ae 26 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" group blocks: %zd\n", fs->group_blocks);
1293f6: 5e pop %esi <== NOT EXECUTED
1293f7: 5f pop %edi <== NOT EXECUTED
1293f8: ff 73 24 pushl 0x24(%ebx) <== NOT EXECUTED
1293fb: 68 a9 4b 16 00 push $0x164ba9 <== NOT EXECUTED
129400: e8 9f 26 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" group inodes: %zd\n", fs->group_inodes);
129405: 5a pop %edx <== NOT EXECUTED
129406: 59 pop %ecx <== NOT EXECUTED
129407: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
12940a: 68 c2 4b 16 00 push $0x164bc2 <== NOT EXECUTED
12940f: e8 90 26 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" inodes per block: %zd\n", fs->inodes_per_block);
129414: 5f pop %edi <== NOT EXECUTED
129415: 58 pop %eax <== NOT EXECUTED
129416: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
129419: 68 db 4b 16 00 push $0x164bdb <== NOT EXECUTED
12941e: e8 81 26 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" blocks per block: %zd\n", fs->blocks_per_block);
129423: 59 pop %ecx <== NOT EXECUTED
129424: 5e pop %esi <== NOT EXECUTED
129425: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
129428: 68 f4 4b 16 00 push $0x164bf4 <== NOT EXECUTED
12942d: e8 72 26 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" singly blocks: %zd\n", fs->block_map_singly_blocks);
129432: 58 pop %eax <== NOT EXECUTED
129433: 5a pop %edx <== NOT EXECUTED
129434: ff 73 34 pushl 0x34(%ebx) <== NOT EXECUTED
129437: 68 0d 4c 16 00 push $0x164c0d <== NOT EXECUTED
12943c: e8 63 26 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" doublly blocks: %zd\n", fs->block_map_doubly_blocks);
129441: 5e pop %esi <== NOT EXECUTED
129442: 5f pop %edi <== NOT EXECUTED
129443: ff 73 38 pushl 0x38(%ebx) <== NOT EXECUTED
129446: 68 26 4c 16 00 push $0x164c26 <== NOT EXECUTED
12944b: e8 54 26 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" max. held buffers: %" PRId32 "\n", fs->max_held_buffers);
129450: 5a pop %edx <== NOT EXECUTED
129451: 59 pop %ecx <== NOT EXECUTED
129452: ff 73 3c pushl 0x3c(%ebx) <== NOT EXECUTED
129455: 68 3f 4c 16 00 push $0x164c3f <== NOT EXECUTED
12945a: e8 45 26 02 00 call 14baa4 <printf> <== NOT EXECUTED
12945f: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
129462: 6a 00 push $0x0 <== NOT EXECUTED
129464: 6a 00 push $0x0 <== NOT EXECUTED
129466: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
129469: ff 30 pushl (%eax) <== NOT EXECUTED
12946b: e8 88 9a fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rtems_rfs_group_usage (fs, &blocks, &inodes);
129470: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
129473: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
129476: 50 push %eax <== NOT EXECUTED
129477: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
12947a: 50 push %eax <== NOT EXECUTED
12947b: 53 push %ebx <== NOT EXECUTED
12947c: e8 8f 7e 01 00 call 141310 <rtems_rfs_group_usage> <== NOT EXECUTED
rtems_rfs_shell_unlock_rfs (fs);
129481: 89 d8 mov %ebx,%eax <== NOT EXECUTED
129483: e8 e8 f2 ff ff call 128770 <rtems_rfs_shell_unlock_rfs><== NOT EXECUTED
bpcent = (blocks * 1000) / rtems_rfs_fs_blocks (fs);
129488: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED
12948b: 8d 04 b6 lea (%esi,%esi,4),%eax <== NOT EXECUTED
12948e: 8d 04 80 lea (%eax,%eax,4),%eax <== NOT EXECUTED
129491: 8d 0c 80 lea (%eax,%eax,4),%ecx <== NOT EXECUTED
129494: c1 e1 03 shl $0x3,%ecx <== NOT EXECUTED
129497: 89 c8 mov %ecx,%eax <== NOT EXECUTED
129499: 31 d2 xor %edx,%edx <== NOT EXECUTED
12949b: f7 73 04 divl 0x4(%ebx) <== NOT EXECUTED
12949e: 89 c1 mov %eax,%ecx <== NOT EXECUTED
ipcent = (inodes * 1000) / rtems_rfs_fs_inodes (fs);
1294a0: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
1294a3: 8d 04 80 lea (%eax,%eax,4),%eax <== NOT EXECUTED
1294a6: 8d 04 80 lea (%eax,%eax,4),%eax <== NOT EXECUTED
1294a9: 8d 3c 80 lea (%eax,%eax,4),%edi <== NOT EXECUTED
1294ac: c1 e7 03 shl $0x3,%edi <== NOT EXECUTED
1294af: 89 f8 mov %edi,%eax <== NOT EXECUTED
1294b1: 31 d2 xor %edx,%edx <== NOT EXECUTED
1294b3: f7 73 10 divl 0x10(%ebx) <== NOT EXECUTED
1294b6: 89 c7 mov %eax,%edi <== NOT EXECUTED
printf (" blocks used: %zd (%d.%d%%)\n",
1294b8: bb 0a 00 00 00 mov $0xa,%ebx <== NOT EXECUTED
1294bd: 89 c8 mov %ecx,%eax <== NOT EXECUTED
1294bf: 99 cltd <== NOT EXECUTED
1294c0: f7 fb idiv %ebx <== NOT EXECUTED
1294c2: 52 push %edx <== NOT EXECUTED
1294c3: bb 67 66 66 66 mov $0x66666667,%ebx <== NOT EXECUTED
1294c8: 89 c8 mov %ecx,%eax <== NOT EXECUTED
1294ca: f7 eb imul %ebx <== NOT EXECUTED
1294cc: c1 fa 02 sar $0x2,%edx <== NOT EXECUTED
1294cf: c1 f9 1f sar $0x1f,%ecx <== NOT EXECUTED
1294d2: 29 ca sub %ecx,%edx <== NOT EXECUTED
1294d4: 52 push %edx <== NOT EXECUTED
1294d5: 56 push %esi <== NOT EXECUTED
1294d6: 68 a8 50 16 00 push $0x1650a8 <== NOT EXECUTED
1294db: e8 c4 25 02 00 call 14baa4 <printf> <== NOT EXECUTED
blocks, bpcent / 10, bpcent % 10);
printf (" inodes used: %zd (%d.%d%%)\n",
1294e0: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1294e3: 89 f8 mov %edi,%eax <== NOT EXECUTED
1294e5: f7 eb imul %ebx <== NOT EXECUTED
1294e7: c1 fa 02 sar $0x2,%edx <== NOT EXECUTED
1294ea: 89 f8 mov %edi,%eax <== NOT EXECUTED
1294ec: c1 f8 1f sar $0x1f,%eax <== NOT EXECUTED
1294ef: 29 c2 sub %eax,%edx <== NOT EXECUTED
1294f1: 8d 04 92 lea (%edx,%edx,4),%eax <== NOT EXECUTED
1294f4: d1 e0 shl %eax <== NOT EXECUTED
1294f6: 29 c7 sub %eax,%edi <== NOT EXECUTED
1294f8: 57 push %edi <== NOT EXECUTED
1294f9: 52 push %edx <== NOT EXECUTED
1294fa: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
1294fd: 68 cc 50 16 00 push $0x1650cc <== NOT EXECUTED
129502: e8 9d 25 02 00 call 14baa4 <printf> <== NOT EXECUTED
inodes, ipcent / 10, ipcent % 10);
return 0;
}
129507: 31 c0 xor %eax,%eax <== NOT EXECUTED
129509: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12950c: 5b pop %ebx <== NOT EXECUTED
12950d: 5e pop %esi <== NOT EXECUTED
12950e: 5f pop %edi <== NOT EXECUTED
12950f: c9 leave <== NOT EXECUTED
129510: c3 ret <== NOT EXECUTED
00128de4 <rtems_rfs_shell_dir>:
return 0;
}
static int
rtems_rfs_shell_dir (rtems_rfs_file_system* fs, int argc, char *argv[])
{
128de4: 55 push %ebp <== NOT EXECUTED
128de5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
128de7: 57 push %edi <== NOT EXECUTED
128de8: 56 push %esi <== NOT EXECUTED
128de9: 53 push %ebx <== NOT EXECUTED
128dea: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
bool state;
int entry;
int b;
int rc;
if (argc <= 1)
128ded: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) <== NOT EXECUTED
128df1: 0f 8e 19 03 00 00 jle 129110 <rtems_rfs_shell_dir+0x32c><== NOT EXECUTED
{
printf ("error: no block number provided\n");
return 1;
}
block = strtoul (argv[1], 0, 0);
128df7: 50 push %eax <== NOT EXECUTED
128df8: 6a 00 push $0x0 <== NOT EXECUTED
128dfa: 6a 00 push $0x0 <== NOT EXECUTED
128dfc: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
128dff: ff 70 04 pushl 0x4(%eax) <== NOT EXECUTED
128e02: e8 6d 61 02 00 call 14ef74 <strtoul> <== NOT EXECUTED
128e07: 89 c3 mov %eax,%ebx <== NOT EXECUTED
128e09: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
128e0c: 6a 00 push $0x0 <== NOT EXECUTED
128e0e: 6a 00 push $0x0 <== NOT EXECUTED
128e10: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
128e13: 8b 42 7c mov 0x7c(%edx),%eax <== NOT EXECUTED
128e16: ff 30 pushl (%eax) <== NOT EXECUTED
128e18: e8 db a0 fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
128e1d: 8d 45 e7 lea -0x19(%ebp),%eax <== NOT EXECUTED
128e20: 50 push %eax <== NOT EXECUTED
128e21: 53 push %ebx <== NOT EXECUTED
128e22: 6a 00 push $0x0 <== NOT EXECUTED
128e24: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
128e27: e8 4c 85 01 00 call 141378 <rtems_rfs_group_bitmap_test><== NOT EXECUTED
128e2c: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
128e2e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
128e31: 85 c0 test %eax,%eax <== NOT EXECUTED
128e33: 0f 8f d3 01 00 00 jg 12900c <rtems_rfs_shell_dir+0x228><== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free");
128e39: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) <== NOT EXECUTED
128e3d: 0f 85 75 02 00 00 jne 1290b8 <rtems_rfs_shell_dir+0x2d4><== NOT EXECUTED
128e43: b8 b9 25 16 00 mov $0x1625b9,%eax <== NOT EXECUTED
128e48: 57 push %edi <== NOT EXECUTED
128e49: 50 push %eax <== NOT EXECUTED
128e4a: 53 push %ebx <== NOT EXECUTED
128e4b: 68 81 4a 16 00 push $0x164a81 <== NOT EXECUTED
128e50: e8 4f 2c 02 00 call 14baa4 <printf> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
128e55: c6 45 d8 00 movb $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->bnum = 0;
128e59: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
128e60: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
printf ("error: opening buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
128e67: 6a 01 push $0x1 <== NOT EXECUTED
128e69: 53 push %ebx <== NOT EXECUTED
128e6a: 8d 4d d8 lea -0x28(%ebp),%ecx <== NOT EXECUTED
128e6d: 51 push %ecx <== NOT EXECUTED
128e6e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
128e71: e8 b6 52 01 00 call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
128e76: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
128e78: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
128e7b: 85 c0 test %eax,%eax <== NOT EXECUTED
128e7d: 0f 8f 3f 02 00 00 jg 1290c2 <rtems_rfs_shell_dir+0x2de><== NOT EXECUTED
return 1;
}
b = 0;
entry = 1;
data = rtems_rfs_buffer_data (&buffer);
128e83: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
128e86: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED
while (b < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE - 1))
128e89: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
128e8c: 83 7a 08 0b cmpl $0xb,0x8(%edx) <== NOT EXECUTED
128e90: 0f 84 ea 01 00 00 je 129080 <rtems_rfs_shell_dir+0x29c><== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
128e96: 8a 0e mov (%esi),%cl <== NOT EXECUTED
128e98: 8a 5e 01 mov 0x1(%esi),%bl <== NOT EXECUTED
128e9b: 0f b6 7e 02 movzbl 0x2(%esi),%edi <== NOT EXECUTED
128e9f: 8a 46 03 mov 0x3(%esi),%al <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (data);
128ea2: 0f b6 56 08 movzbl 0x8(%esi),%edx <== NOT EXECUTED
128ea6: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
128ea9: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
128eac: 0f b6 56 09 movzbl 0x9(%esi),%edx <== NOT EXECUTED
128eb0: 09 55 d4 or %edx,-0x2c(%ebp) <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
128eb3: 81 7d d4 ff ff 00 00 cmpl $0xffff,-0x2c(%ebp) <== NOT EXECUTED
128eba: 0f 84 c0 01 00 00 je 129080 <rtems_rfs_shell_dir+0x29c><== NOT EXECUTED
break;
if ((elength < RTEMS_RFS_DIR_ENTRY_SIZE) ||
128ec0: 83 7d d4 09 cmpl $0x9,-0x2c(%ebp) <== NOT EXECUTED
128ec4: 0f 8e 9b 01 00 00 jle 129065 <rtems_rfs_shell_dir+0x281><== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
128eca: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
128ecd: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
128ed0: 09 c8 or %ecx,%eax <== NOT EXECUTED
128ed2: 0f b6 db movzbl %bl,%ebx <== NOT EXECUTED
128ed5: c1 e3 10 shl $0x10,%ebx <== NOT EXECUTED
128ed8: 09 d8 or %ebx,%eax <== NOT EXECUTED
128eda: 81 e7 ff 00 00 00 and $0xff,%edi <== NOT EXECUTED
128ee0: c1 e7 08 shl $0x8,%edi <== NOT EXECUTED
128ee3: 09 f8 or %edi,%eax <== NOT EXECUTED
128ee5: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED
128eec: c7 45 c8 01 00 00 00 movl $0x1,-0x38(%ebp) <== NOT EXECUTED
128ef3: 90 nop <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if ((elength < RTEMS_RFS_DIR_ENTRY_SIZE) ||
(elength >= rtems_rfs_fs_max_name (fs)))
128ef4: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
128ef7: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
128efa: 3b 51 18 cmp 0x18(%ecx),%edx <== NOT EXECUTED
128efd: 0f 83 69 01 00 00 jae 12906c <rtems_rfs_shell_dir+0x288><== NOT EXECUTED
{
printf (" %5d: entry length appears corrupt: %d\n", entry, elength);
break;
}
if ((eino < RTEMS_RFS_ROOT_INO) || (eino >= rtems_rfs_fs_inodes (fs)))
128f03: 85 c0 test %eax,%eax <== NOT EXECUTED
128f05: 0f 84 22 02 00 00 je 12912d <rtems_rfs_shell_dir+0x349><== NOT EXECUTED
128f0b: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
128f0e: 39 41 10 cmp %eax,0x10(%ecx) <== NOT EXECUTED
128f11: 0f 86 16 02 00 00 jbe 12912d <rtems_rfs_shell_dir+0x349><== NOT EXECUTED
{
printf (" %5d: entry ino appears corrupt: ino=%" PRId32 "\n", entry, eino);
break;
}
length = elength - RTEMS_RFS_DIR_ENTRY_SIZE;
128f17: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
128f1a: 83 ea 0a sub $0xa,%edx <== NOT EXECUTED
128f1d: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
printf (" %5d: %04x inode=%-6" PRIu32 " hash=%08" PRIx32 " name[%03u]=",
128f20: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
128f23: 52 push %edx <== NOT EXECUTED
128f24: 0f b6 56 04 movzbl 0x4(%esi),%edx <== NOT EXECUTED
128f28: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
128f2b: 0f b6 4e 05 movzbl 0x5(%esi),%ecx <== NOT EXECUTED
128f2f: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
128f32: 09 ca or %ecx,%edx <== NOT EXECUTED
128f34: 0f b6 4e 07 movzbl 0x7(%esi),%ecx <== NOT EXECUTED
128f38: 09 ca or %ecx,%edx <== NOT EXECUTED
128f3a: 0f b6 4e 06 movzbl 0x6(%esi),%ecx <== NOT EXECUTED
128f3e: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
128f41: 09 ca or %ecx,%edx <== NOT EXECUTED
128f43: 52 push %edx <== NOT EXECUTED
128f44: 50 push %eax <== NOT EXECUTED
128f45: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
128f48: ff 75 c8 pushl -0x38(%ebp) <== NOT EXECUTED
128f4b: 68 78 50 16 00 push $0x165078 <== NOT EXECUTED
128f50: e8 4f 2b 02 00 call 14baa4 <printf> <== NOT EXECUTED
128f55: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
128f58: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED
128f5b: 83 ff 32 cmp $0x32,%edi <== NOT EXECUTED
128f5e: 0f 8e d8 00 00 00 jle 12903c <rtems_rfs_shell_dir+0x258><== NOT EXECUTED
128f64: bf 32 00 00 00 mov $0x32,%edi <== NOT EXECUTED
length);
if (length > 50)
length = 50;
for (c = 0; c < length; c++)
128f69: 31 db xor %ebx,%ebx <== NOT EXECUTED
128f6b: 90 nop <== NOT EXECUTED
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
128f6c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
128f6f: 0f b6 44 1e 0a movzbl 0xa(%esi,%ebx,1),%eax <== NOT EXECUTED
128f74: 50 push %eax <== NOT EXECUTED
128f75: e8 8a 2c 02 00 call 14bc04 <putchar> <== NOT EXECUTED
length);
if (length > 50)
length = 50;
for (c = 0; c < length; c++)
128f7a: 43 inc %ebx <== NOT EXECUTED
128f7b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128f7e: 39 df cmp %ebx,%edi <== NOT EXECUTED
128f80: 7f ea jg 128f6c <rtems_rfs_shell_dir+0x188><== NOT EXECUTED
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
128f82: 39 7d d0 cmp %edi,-0x30(%ebp) <== NOT EXECUTED
128f85: 0f 8f c5 00 00 00 jg 129050 <rtems_rfs_shell_dir+0x26c><== NOT EXECUTED
printf ("...");
printf ("\n");
128f8b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
128f8e: 6a 0a push $0xa <== NOT EXECUTED
128f90: e8 6f 2c 02 00 call 14bc04 <putchar> <== NOT EXECUTED
b += elength;
128f95: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
128f98: 01 4d cc add %ecx,-0x34(%ebp) <== NOT EXECUTED
b = 0;
entry = 1;
data = rtems_rfs_buffer_data (&buffer);
while (b < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE - 1))
128f9b: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
128f9e: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
128fa1: 83 e8 0b sub $0xb,%eax <== NOT EXECUTED
128fa4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128fa7: 39 45 cc cmp %eax,-0x34(%ebp) <== NOT EXECUTED
128faa: 0f 83 d0 00 00 00 jae 129080 <rtems_rfs_shell_dir+0x29c><== NOT EXECUTED
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
printf ("...");
printf ("\n");
b += elength;
data += elength;
128fb0: 03 75 d4 add -0x2c(%ebp),%esi <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
128fb3: 8a 0e mov (%esi),%cl <== NOT EXECUTED
128fb5: 8a 5e 01 mov 0x1(%esi),%bl <== NOT EXECUTED
128fb8: 0f b6 7e 02 movzbl 0x2(%esi),%edi <== NOT EXECUTED
128fbc: 8a 46 03 mov 0x3(%esi),%al <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (data);
128fbf: 0f b6 56 08 movzbl 0x8(%esi),%edx <== NOT EXECUTED
128fc3: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
128fc6: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
128fc9: 0f b6 56 09 movzbl 0x9(%esi),%edx <== NOT EXECUTED
128fcd: 09 55 d4 or %edx,-0x2c(%ebp) <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
128fd0: 81 7d d4 ff ff 00 00 cmpl $0xffff,-0x2c(%ebp) <== NOT EXECUTED
128fd7: 0f 84 a3 00 00 00 je 129080 <rtems_rfs_shell_dir+0x29c><== NOT EXECUTED
printf ("...");
printf ("\n");
b += elength;
data += elength;
entry++;
128fdd: ff 45 c8 incl -0x38(%ebp) <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (data);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if ((elength < RTEMS_RFS_DIR_ENTRY_SIZE) ||
128fe0: 83 7d d4 09 cmpl $0x9,-0x2c(%ebp) <== NOT EXECUTED
128fe4: 0f 8e 82 00 00 00 jle 12906c <rtems_rfs_shell_dir+0x288><== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
128fea: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
128fed: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
128ff0: 09 c8 or %ecx,%eax <== NOT EXECUTED
128ff2: 0f b6 db movzbl %bl,%ebx <== NOT EXECUTED
128ff5: c1 e3 10 shl $0x10,%ebx <== NOT EXECUTED
128ff8: 09 d8 or %ebx,%eax <== NOT EXECUTED
128ffa: 81 e7 ff 00 00 00 and $0xff,%edi <== NOT EXECUTED
129000: c1 e7 08 shl $0x8,%edi <== NOT EXECUTED
129003: 09 f8 or %edi,%eax <== NOT EXECUTED
129005: e9 ea fe ff ff jmp 128ef4 <rtems_rfs_shell_dir+0x110><== NOT EXECUTED
12900a: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
12900c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
12900f: e8 5c f7 ff ff call 128770 <rtems_rfs_shell_unlock_rfs><== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
129014: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129017: 56 push %esi <== NOT EXECUTED
129018: e8 0f 45 02 00 call 14d52c <strerror> <== NOT EXECUTED
12901d: 50 push %eax <== NOT EXECUTED
12901e: 56 push %esi <== NOT EXECUTED
12901f: 53 push %ebx <== NOT EXECUTED
129020: 68 bc 4f 16 00 push $0x164fbc <== NOT EXECUTED
129025: e8 7a 2a 02 00 call 14baa4 <printf> <== NOT EXECUTED
12902a: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
12902f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
}
rtems_rfs_shell_unlock_rfs (fs);
return 0;
}
129032: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129035: 5b pop %ebx <== NOT EXECUTED
129036: 5e pop %esi <== NOT EXECUTED
129037: 5f pop %edi <== NOT EXECUTED
129038: c9 leave <== NOT EXECUTED
129039: c3 ret <== NOT EXECUTED
12903a: 66 90 xchg %ax,%ax <== NOT EXECUTED
length);
if (length > 50)
length = 50;
for (c = 0; c < length; c++)
12903c: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
12903f: 85 c9 test %ecx,%ecx <== NOT EXECUTED
129041: 0f 8f 22 ff ff ff jg 128f69 <rtems_rfs_shell_dir+0x185><== NOT EXECUTED
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
129047: 39 7d d0 cmp %edi,-0x30(%ebp) <== NOT EXECUTED
12904a: 0f 8e 3b ff ff ff jle 128f8b <rtems_rfs_shell_dir+0x1a7><== NOT EXECUTED
printf ("...");
129050: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129053: 68 02 33 16 00 push $0x163302 <== NOT EXECUTED
129058: e8 47 2a 02 00 call 14baa4 <printf> <== NOT EXECUTED
12905d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129060: e9 26 ff ff ff jmp 128f8b <rtems_rfs_shell_dir+0x1a7><== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (data);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if ((elength < RTEMS_RFS_DIR_ENTRY_SIZE) ||
129065: c7 45 c8 01 00 00 00 movl $0x1,-0x38(%ebp) <== NOT EXECUTED
(elength >= rtems_rfs_fs_max_name (fs)))
{
printf (" %5d: entry length appears corrupt: %d\n", entry, elength);
12906c: 56 push %esi <== NOT EXECUTED
12906d: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
129070: ff 75 c8 pushl -0x38(%ebp) <== NOT EXECUTED
129073: 68 24 50 16 00 push $0x165024 <== NOT EXECUTED
129078: e8 27 2a 02 00 call 14baa4 <printf> <== NOT EXECUTED
break;
12907d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
129080: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
129083: 8d 4d d8 lea -0x28(%ebp),%ecx <== NOT EXECUTED
129086: 51 push %ecx <== NOT EXECUTED
129087: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
12908a: e8 99 4f 01 00 call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
12908f: c6 45 d8 00 movb $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->bnum = 0;
129093: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
12909a: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
printf ("error: closing buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
rtems_rfs_shell_unlock_rfs (fs);
1290a1: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
1290a4: e8 c7 f6 ff ff call 128770 <rtems_rfs_shell_unlock_rfs><== NOT EXECUTED
1290a9: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
1290ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1290ae: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1290b1: 5b pop %ebx <== NOT EXECUTED
1290b2: 5e pop %esi <== NOT EXECUTED
1290b3: 5f pop %edi <== NOT EXECUTED
1290b4: c9 leave <== NOT EXECUTED
1290b5: c3 ret <== NOT EXECUTED
1290b6: 66 90 xchg %ax,%ax <== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free");
1290b8: b8 77 4a 16 00 mov $0x164a77,%eax <== NOT EXECUTED
1290bd: e9 86 fd ff ff jmp 128e48 <rtems_rfs_shell_dir+0x64><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
1290c2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1290c5: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
1290c8: 50 push %eax <== NOT EXECUTED
1290c9: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
1290cc: e8 57 4f 01 00 call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
1290d1: c6 45 d8 00 movb $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->bnum = 0;
1290d5: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
1290dc: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_shell_unlock_rfs (fs);
1290e3: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
1290e6: e8 85 f6 ff ff call 128770 <rtems_rfs_shell_unlock_rfs><== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
1290eb: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
1290ee: e8 39 44 02 00 call 14d52c <strerror> <== NOT EXECUTED
1290f3: 50 push %eax <== NOT EXECUTED
1290f4: 56 push %esi <== NOT EXECUTED
1290f5: 53 push %ebx <== NOT EXECUTED
1290f6: 68 ec 4f 16 00 push $0x164fec <== NOT EXECUTED
1290fb: e8 a4 29 02 00 call 14baa4 <printf> <== NOT EXECUTED
129100: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
129105: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
}
rtems_rfs_shell_unlock_rfs (fs);
return 0;
}
129108: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12910b: 5b pop %ebx <== NOT EXECUTED
12910c: 5e pop %esi <== NOT EXECUTED
12910d: 5f pop %edi <== NOT EXECUTED
12910e: c9 leave <== NOT EXECUTED
12910f: c3 ret <== NOT EXECUTED
int b;
int rc;
if (argc <= 1)
{
printf ("error: no block number provided\n");
129110: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129113: 68 9c 4f 16 00 push $0x164f9c <== NOT EXECUTED
129118: e8 9b 2b 02 00 call 14bcb8 <puts> <== NOT EXECUTED
12911d: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
129122: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_shell_unlock_rfs (fs);
return 0;
}
129125: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129128: 5b pop %ebx <== NOT EXECUTED
129129: 5e pop %esi <== NOT EXECUTED
12912a: 5f pop %edi <== NOT EXECUTED
12912b: c9 leave <== NOT EXECUTED
12912c: c3 ret <== NOT EXECUTED
break;
}
if ((eino < RTEMS_RFS_ROOT_INO) || (eino >= rtems_rfs_fs_inodes (fs)))
{
printf (" %5d: entry ino appears corrupt: ino=%" PRId32 "\n", entry, eino);
12912d: 53 push %ebx <== NOT EXECUTED
12912e: 50 push %eax <== NOT EXECUTED
12912f: ff 75 c8 pushl -0x38(%ebp) <== NOT EXECUTED
129132: 68 4c 50 16 00 push $0x16504c <== NOT EXECUTED
129137: e8 68 29 02 00 call 14baa4 <printf> <== NOT EXECUTED
break;
12913c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12913f: e9 3c ff ff ff jmp 129080 <rtems_rfs_shell_dir+0x29c><== NOT EXECUTED
00128c6c <rtems_rfs_shell_group>:
return 0;
}
static int
rtems_rfs_shell_group (rtems_rfs_file_system* fs, int argc, char *argv[])
{
128c6c: 55 push %ebp <== NOT EXECUTED
128c6d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
128c6f: 57 push %edi <== NOT EXECUTED
128c70: 56 push %esi <== NOT EXECUTED
128c71: 53 push %ebx <== NOT EXECUTED
128c72: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
128c75: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
128c78: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
128c7b: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
int start;
int end;
int g;
start = 0;
end = fs->group_count - 1;
128c7e: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
128c81: 89 c2 mov %eax,%edx <== NOT EXECUTED
switch (argc)
128c83: 83 f9 02 cmp $0x2,%ecx <== NOT EXECUTED
128c86: 0f 84 9c 00 00 00 je 128d28 <rtems_rfs_shell_group+0xbc><== NOT EXECUTED
128c8c: 83 f9 03 cmp $0x3,%ecx <== NOT EXECUTED
128c8f: 74 5b je 128cec <rtems_rfs_shell_group+0x80><== NOT EXECUTED
128c91: 49 dec %ecx <== NOT EXECUTED
128c92: 74 20 je 128cb4 <rtems_rfs_shell_group+0x48><== NOT EXECUTED
case 3:
start = strtoul (argv[1], 0, 0);
end = strtoul (argv[2], 0, 0);
break;
default:
printf ("error: too many arguments.\n");
128c94: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
128c97: 68 5c 4a 16 00 push $0x164a5c <== NOT EXECUTED
128c9c: e8 17 30 02 00 call 14bcb8 <puts> <== NOT EXECUTED
128ca1: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
128ca6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_shell_unlock_rfs (fs);
return 0;
}
128ca9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
128cac: 5b pop %ebx <== NOT EXECUTED
128cad: 5e pop %esi <== NOT EXECUTED
128cae: 5f pop %edi <== NOT EXECUTED
128caf: c9 leave <== NOT EXECUTED
128cb0: c3 ret <== NOT EXECUTED
128cb1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int start;
int end;
int g;
start = 0;
end = fs->group_count - 1;
128cb4: 8d 48 ff lea -0x1(%eax),%ecx <== NOT EXECUTED
128cb7: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED
128cba: 31 f6 xor %esi,%esi <== NOT EXECUTED
default:
printf ("error: too many arguments.\n");
return 1;
}
if ((start < 0) || (end < 0) ||
128cbc: 8b 7d dc mov -0x24(%ebp),%edi <== NOT EXECUTED
128cbf: 85 ff test %edi,%edi <== NOT EXECUTED
128cc1: 78 61 js 128d24 <rtems_rfs_shell_group+0xb8><== NOT EXECUTED
128cc3: 39 c6 cmp %eax,%esi <== NOT EXECUTED
128cc5: 7d 05 jge 128ccc <rtems_rfs_shell_group+0x60><== NOT EXECUTED
128cc7: 39 45 dc cmp %eax,-0x24(%ebp) <== NOT EXECUTED
128cca: 7c 74 jl 128d40 <rtems_rfs_shell_group+0xd4><== NOT EXECUTED
(start >= fs->group_count) || (end >= fs->group_count))
{
printf ("error: group out of range (0->%d).\n", fs->group_count);
128ccc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
128ccf: 52 push %edx <== NOT EXECUTED
128cd0: 68 30 4f 16 00 push $0x164f30 <== NOT EXECUTED
128cd5: e8 ca 2d 02 00 call 14baa4 <printf> <== NOT EXECUTED
128cda: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
128cdf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_shell_unlock_rfs (fs);
return 0;
}
128ce2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
128ce5: 5b pop %ebx <== NOT EXECUTED
128ce6: 5e pop %esi <== NOT EXECUTED
128ce7: 5f pop %edi <== NOT EXECUTED
128ce8: c9 leave <== NOT EXECUTED
128ce9: c3 ret <== NOT EXECUTED
128cea: 66 90 xchg %ax,%ax <== NOT EXECUTED
break;
case 2:
start = end = strtoul (argv[1], 0, 0);
break;
case 3:
start = strtoul (argv[1], 0, 0);
128cec: 50 push %eax <== NOT EXECUTED
128ced: 6a 00 push $0x0 <== NOT EXECUTED
128cef: 6a 00 push $0x0 <== NOT EXECUTED
128cf1: ff 77 04 pushl 0x4(%edi) <== NOT EXECUTED
128cf4: e8 7b 62 02 00 call 14ef74 <strtoul> <== NOT EXECUTED
128cf9: 89 c6 mov %eax,%esi <== NOT EXECUTED
end = strtoul (argv[2], 0, 0);
128cfb: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
128cfe: 6a 00 push $0x0 <== NOT EXECUTED
128d00: 6a 00 push $0x0 <== NOT EXECUTED
128d02: ff 77 08 pushl 0x8(%edi) <== NOT EXECUTED
128d05: e8 6a 62 02 00 call 14ef74 <strtoul> <== NOT EXECUTED
128d0a: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
break;
128d0d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
default:
printf ("error: too many arguments.\n");
return 1;
}
if ((start < 0) || (end < 0) ||
128d10: 85 f6 test %esi,%esi <== NOT EXECUTED
128d12: 0f 88 c4 00 00 00 js 128ddc <rtems_rfs_shell_group+0x170><== NOT EXECUTED
128d18: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
128d1b: 89 c2 mov %eax,%edx <== NOT EXECUTED
128d1d: 8b 7d dc mov -0x24(%ebp),%edi <== NOT EXECUTED
128d20: 85 ff test %edi,%edi <== NOT EXECUTED
128d22: 79 9f jns 128cc3 <rtems_rfs_shell_group+0x57><== NOT EXECUTED
128d24: 89 c2 mov %eax,%edx <== NOT EXECUTED
128d26: eb a4 jmp 128ccc <rtems_rfs_shell_group+0x60><== NOT EXECUTED
switch (argc)
{
case 1:
break;
case 2:
start = end = strtoul (argv[1], 0, 0);
128d28: 52 push %edx <== NOT EXECUTED
128d29: 6a 00 push $0x0 <== NOT EXECUTED
128d2b: 6a 00 push $0x0 <== NOT EXECUTED
128d2d: ff 77 04 pushl 0x4(%edi) <== NOT EXECUTED
128d30: e8 3f 62 02 00 call 14ef74 <strtoul> <== NOT EXECUTED
128d35: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
128d38: 89 c6 mov %eax,%esi <== NOT EXECUTED
break;
128d3a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128d3d: eb d1 jmp 128d10 <rtems_rfs_shell_group+0xa4><== NOT EXECUTED
128d3f: 90 nop <== NOT EXECUTED
128d40: 51 push %ecx <== NOT EXECUTED
128d41: 6a 00 push $0x0 <== NOT EXECUTED
128d43: 6a 00 push $0x0 <== NOT EXECUTED
128d45: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED
128d48: ff 30 pushl (%eax) <== NOT EXECUTED
128d4a: e8 a9 a1 fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (g = start; g <= end; g++)
128d4f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128d52: 3b 75 dc cmp -0x24(%ebp),%esi <== NOT EXECUTED
128d55: 7f 71 jg 128dc8 <rtems_rfs_shell_group+0x15c><== NOT EXECUTED
128d57: 8d 04 b6 lea (%esi,%esi,4),%eax <== NOT EXECUTED
128d5a: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED
128d5d: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
128d60: 89 75 e4 mov %esi,-0x1c(%ebp) <== NOT EXECUTED
128d63: 89 5d d8 mov %ebx,-0x28(%ebp) <== NOT EXECUTED
128d66: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
128d68: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
128d6b: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED
128d6e: 03 48 1c add 0x1c(%eax),%ecx <== NOT EXECUTED
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
128d71: 8b 79 04 mov 0x4(%ecx),%edi <== NOT EXECUTED
128d74: 89 fe mov %edi,%esi <== NOT EXECUTED
128d76: 2b 71 18 sub 0x18(%ecx),%esi <== NOT EXECUTED
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
128d79: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED
128d7c: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
128d7f: 89 c3 mov %eax,%ebx <== NOT EXECUTED
128d81: 2b 59 3c sub 0x3c(%ecx),%ebx <== NOT EXECUTED
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
128d84: 8d 04 9b lea (%ebx,%ebx,4),%eax <== NOT EXECUTED
128d87: 8d 04 80 lea (%eax,%eax,4),%eax <== NOT EXECUTED
128d8a: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
128d8d: 31 d2 xor %edx,%edx <== NOT EXECUTED
128d8f: f7 75 d4 divl -0x2c(%ebp) <== NOT EXECUTED
128d92: 50 push %eax <== NOT EXECUTED
128d93: 53 push %ebx <== NOT EXECUTED
128d94: 8d 04 b6 lea (%esi,%esi,4),%eax <== NOT EXECUTED
128d97: 8d 04 80 lea (%eax,%eax,4),%eax <== NOT EXECUTED
128d9a: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
128d9d: 31 d2 xor %edx,%edx <== NOT EXECUTED
128d9f: f7 f7 div %edi <== NOT EXECUTED
128da1: 50 push %eax <== NOT EXECUTED
128da2: 56 push %esi <== NOT EXECUTED
128da3: 57 push %edi <== NOT EXECUTED
128da4: ff 31 pushl (%ecx) <== NOT EXECUTED
128da6: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
128da9: 68 54 4f 16 00 push $0x164f54 <== NOT EXECUTED
128dae: e8 f1 2c 02 00 call 14baa4 <printf> <== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (g = start; g <= end; g++)
128db3: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED
128db6: 83 45 e0 50 addl $0x50,-0x20(%ebp) <== NOT EXECUTED
128dba: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
128dbd: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED
128dc0: 39 4d e4 cmp %ecx,-0x1c(%ebp) <== NOT EXECUTED
128dc3: 7e a3 jle 128d68 <rtems_rfs_shell_group+0xfc><== NOT EXECUTED
128dc5: 8b 5d d8 mov -0x28(%ebp),%ebx <== NOT EXECUTED
g, group->base, group->size,
blocks, (blocks * 100) / group->size,
inodes, (inodes * 100) / fs->group_inodes);
}
rtems_rfs_shell_unlock_rfs (fs);
128dc8: 89 d8 mov %ebx,%eax <== NOT EXECUTED
128dca: e8 a1 f9 ff ff call 128770 <rtems_rfs_shell_unlock_rfs><== NOT EXECUTED
128dcf: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
}
128dd1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
128dd4: 5b pop %ebx <== NOT EXECUTED
128dd5: 5e pop %esi <== NOT EXECUTED
128dd6: 5f pop %edi <== NOT EXECUTED
128dd7: c9 leave <== NOT EXECUTED
128dd8: c3 ret <== NOT EXECUTED
128dd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
default:
printf ("error: too many arguments.\n");
return 1;
}
if ((start < 0) || (end < 0) ||
128ddc: 8b 53 20 mov 0x20(%ebx),%edx <== NOT EXECUTED
128ddf: e9 e8 fe ff ff jmp 128ccc <rtems_rfs_shell_group+0x60><== NOT EXECUTED
00128790 <rtems_rfs_shell_inode>:
return 0;
}
static int
rtems_rfs_shell_inode (rtems_rfs_file_system* fs, int argc, char *argv[])
{
128790: 55 push %ebp <== NOT EXECUTED
128791: 89 e5 mov %esp,%ebp <== NOT EXECUTED
128793: 57 push %edi <== NOT EXECUTED
128794: 56 push %esi <== NOT EXECUTED
128795: 53 push %ebx <== NOT EXECUTED
128796: 81 ec 8c 00 00 00 sub $0x8c,%esp <== NOT EXECUTED
12879c: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
bool have_end;
int arg;
int b;
int rc;
total = fs->group_inodes * fs->group_count;
12879f: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
1287a2: 0f af 46 28 imul 0x28(%esi),%eax <== NOT EXECUTED
1287a6: 89 45 94 mov %eax,-0x6c(%ebp) <== NOT EXECUTED
start = RTEMS_RFS_ROOT_INO;
end = total - 1;
1287a9: 48 dec %eax <== NOT EXECUTED
1287aa: 89 45 88 mov %eax,-0x78(%ebp) <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
1287ad: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) <== NOT EXECUTED
1287b1: 0f 8e 3c 04 00 00 jle 128bf3 <rtems_rfs_shell_inode+0x463><== NOT EXECUTED
1287b7: 8b 55 88 mov -0x78(%ebp),%edx <== NOT EXECUTED
1287ba: 89 55 8c mov %edx,-0x74(%ebp) <== NOT EXECUTED
1287bd: bb 01 00 00 00 mov $0x1,%ebx <== NOT EXECUTED
1287c2: 31 ff xor %edi,%edi <== NOT EXECUTED
1287c4: 31 d2 xor %edx,%edx <== NOT EXECUTED
1287c6: c6 85 77 ff ff ff 00 movb $0x0,-0x89(%ebp) <== NOT EXECUTED
1287cd: c6 85 7f ff ff ff 00 movb $0x0,-0x81(%ebp) <== NOT EXECUTED
1287d4: c6 45 87 00 movb $0x0,-0x79(%ebp) <== NOT EXECUTED
1287d8: c7 45 90 01 00 00 00 movl $0x1,-0x70(%ebp) <== NOT EXECUTED
1287df: 89 75 80 mov %esi,-0x80(%ebp) <== NOT EXECUTED
1287e2: 89 d6 mov %edx,%esi <== NOT EXECUTED
1287e4: 8b 55 8c mov -0x74(%ebp),%edx <== NOT EXECUTED
1287e7: eb 2b jmp 128814 <rtems_rfs_shell_inode+0x84><== NOT EXECUTED
1287e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
}
}
else
{
if (have_end && have_start)
1287ec: 89 f1 mov %esi,%ecx <== NOT EXECUTED
1287ee: 84 c9 test %cl,%cl <== NOT EXECUTED
1287f0: 0f 85 98 00 00 00 jne 12888e <rtems_rfs_shell_inode+0xfe><== NOT EXECUTED
printf ("warning: option ignored: %s\n", argv[arg]);
else if (!have_start)
{
start = end = strtoul (argv[arg], 0, 0);
1287f6: 52 push %edx <== NOT EXECUTED
1287f7: 6a 00 push $0x0 <== NOT EXECUTED
1287f9: 6a 00 push $0x0 <== NOT EXECUTED
1287fb: 50 push %eax <== NOT EXECUTED
1287fc: e8 73 67 02 00 call 14ef74 <strtoul> <== NOT EXECUTED
128801: 89 c2 mov %eax,%edx <== NOT EXECUTED
128803: 89 45 90 mov %eax,-0x70(%ebp) <== NOT EXECUTED
128806: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
12880b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
12880e: 43 inc %ebx <== NOT EXECUTED
12880f: 39 5d 0c cmp %ebx,0xc(%ebp) <== NOT EXECUTED
128812: 7e 32 jle 128846 <rtems_rfs_shell_inode+0xb6><== NOT EXECUTED
{
if (argv[arg][0] == '-')
128814: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
128817: 8b 04 99 mov (%ecx,%ebx,4),%eax <== NOT EXECUTED
12881a: 80 38 2d cmpb $0x2d,(%eax) <== NOT EXECUTED
12881d: 74 5d je 12887c <rtems_rfs_shell_inode+0xec><== NOT EXECUTED
break;
}
}
else
{
if (have_end && have_start)
12881f: 89 f9 mov %edi,%ecx <== NOT EXECUTED
128821: 84 c9 test %cl,%cl <== NOT EXECUTED
128823: 75 c7 jne 1287ec <rtems_rfs_shell_inode+0x5c><== NOT EXECUTED
printf ("warning: option ignored: %s\n", argv[arg]);
else if (!have_start)
128825: 89 f2 mov %esi,%edx <== NOT EXECUTED
128827: 84 d2 test %dl,%dl <== NOT EXECUTED
128829: 74 cb je 1287f6 <rtems_rfs_shell_inode+0x66><== NOT EXECUTED
start = end = strtoul (argv[arg], 0, 0);
have_start = true;
}
else
{
end = strtoul (argv[arg], 0, 0);
12882b: 57 push %edi <== NOT EXECUTED
12882c: 6a 00 push $0x0 <== NOT EXECUTED
12882e: 6a 00 push $0x0 <== NOT EXECUTED
128830: 50 push %eax <== NOT EXECUTED
128831: e8 3e 67 02 00 call 14ef74 <strtoul> <== NOT EXECUTED
128836: 89 c2 mov %eax,%edx <== NOT EXECUTED
128838: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
12883d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
128840: 43 inc %ebx <== NOT EXECUTED
128841: 39 5d 0c cmp %ebx,0xc(%ebp) <== NOT EXECUTED
128844: 7f ce jg 128814 <rtems_rfs_shell_inode+0x84><== NOT EXECUTED
128846: 89 55 8c mov %edx,-0x74(%ebp) <== NOT EXECUTED
128849: 8b 75 80 mov -0x80(%ebp),%esi <== NOT EXECUTED
have_end = true;
}
}
}
if ((start >= total) || (end >= total))
12884c: 8b 4d 90 mov -0x70(%ebp),%ecx <== NOT EXECUTED
12884f: 39 4d 94 cmp %ecx,-0x6c(%ebp) <== NOT EXECUTED
128852: 76 08 jbe 12885c <rtems_rfs_shell_inode+0xcc><== NOT EXECUTED
128854: 8b 5d 8c mov -0x74(%ebp),%ebx <== NOT EXECUTED
128857: 39 5d 94 cmp %ebx,-0x6c(%ebp) <== NOT EXECUTED
12885a: 77 78 ja 1288d4 <rtems_rfs_shell_inode+0x144><== NOT EXECUTED
{
printf ("error: inode out of range (0->%" PRId32 ").\n", total - 1);
12885c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12885f: ff 75 88 pushl -0x78(%ebp) <== NOT EXECUTED
128862: 68 44 4e 16 00 push $0x164e44 <== NOT EXECUTED
128867: e8 38 32 02 00 call 14baa4 <printf> <== NOT EXECUTED
12886c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
128871: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_rfs_shell_unlock_rfs (fs);
return 0;
}
128874: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
128877: 5b pop %ebx <== NOT EXECUTED
128878: 5e pop %esi <== NOT EXECUTED
128879: 5f pop %edi <== NOT EXECUTED
12887a: c9 leave <== NOT EXECUTED
12887b: c3 ret <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
12887c: 8a 48 01 mov 0x1(%eax),%cl <== NOT EXECUTED
12887f: 80 f9 65 cmp $0x65,%cl <== NOT EXECUTED
128882: 74 44 je 1288c8 <rtems_rfs_shell_inode+0x138><== NOT EXECUTED
128884: 80 f9 66 cmp $0x66,%cl <== NOT EXECUTED
128887: 74 33 je 1288bc <rtems_rfs_shell_inode+0x12c><== NOT EXECUTED
128889: 80 f9 61 cmp $0x61,%cl <== NOT EXECUTED
12888c: 74 22 je 1288b0 <rtems_rfs_shell_inode+0x120><== NOT EXECUTED
}
}
else
{
if (have_end && have_start)
printf ("warning: option ignored: %s\n", argv[arg]);
12888e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
128891: 50 push %eax <== NOT EXECUTED
128892: 68 fd 49 16 00 push $0x1649fd <== NOT EXECUTED
128897: 89 95 70 ff ff ff mov %edx,-0x90(%ebp) <== NOT EXECUTED
12889d: e8 02 32 02 00 call 14baa4 <printf> <== NOT EXECUTED
break;
}
}
else
{
if (have_end && have_start)
1288a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1288a5: 8b 95 70 ff ff ff mov -0x90(%ebp),%edx <== NOT EXECUTED
1288ab: e9 5e ff ff ff jmp 12880e <rtems_rfs_shell_inode+0x7e><== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
1288b0: c6 45 87 01 movb $0x1,-0x79(%ebp) <== NOT EXECUTED
1288b4: e9 55 ff ff ff jmp 12880e <rtems_rfs_shell_inode+0x7e><== NOT EXECUTED
1288b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
1288bc: c6 85 77 ff ff ff 01 movb $0x1,-0x89(%ebp) <== NOT EXECUTED
case 'e':
error_check_only = true;
break;
case 'f':
forced = true;
break;
1288c3: e9 46 ff ff ff jmp 12880e <rtems_rfs_shell_inode+0x7e><== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
1288c8: c6 85 7f ff ff ff 01 movb $0x1,-0x81(%ebp) <== NOT EXECUTED
1288cf: e9 3a ff ff ff jmp 12880e <rtems_rfs_shell_inode+0x7e><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
1288d4: 53 push %ebx <== NOT EXECUTED
1288d5: 6a 00 push $0x0 <== NOT EXECUTED
1288d7: 6a 00 push $0x0 <== NOT EXECUTED
1288d9: 8b 46 7c mov 0x7c(%esi),%eax <== NOT EXECUTED
1288dc: ff 30 pushl (%eax) <== NOT EXECUTED
1288de: e8 15 a6 fe ff call 112ef8 <rtems_semaphore_obtain><== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (ino = start; ino <= end; ino++)
1288e3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1288e6: 8b 45 8c mov -0x74(%ebp),%eax <== NOT EXECUTED
1288e9: 39 45 90 cmp %eax,-0x70(%ebp) <== NOT EXECUTED
1288ec: 0f 87 58 02 00 00 ja 128b4a <rtems_rfs_shell_inode+0x3ba><== NOT EXECUTED
1288f2: 8b 7d 90 mov -0x70(%ebp),%edi <== NOT EXECUTED
1288f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
rtems_rfs_inode_handle inode;
bool allocated;
rc = rtems_rfs_group_bitmap_test (fs, true, ino, &allocated);
1288f8: 8d 55 e7 lea -0x19(%ebp),%edx <== NOT EXECUTED
1288fb: 52 push %edx <== NOT EXECUTED
1288fc: 57 push %edi <== NOT EXECUTED
1288fd: 6a 01 push $0x1 <== NOT EXECUTED
1288ff: 56 push %esi <== NOT EXECUTED
128900: e8 73 8a 01 00 call 141378 <rtems_rfs_group_bitmap_test><== NOT EXECUTED
if (rc > 0)
128905: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128908: 85 c0 test %eax,%eax <== NOT EXECUTED
12890a: 0f 8f b7 02 00 00 jg 128bc7 <rtems_rfs_shell_inode+0x437><== NOT EXECUTED
printf ("error: testing inode state: ino=%" PRIu32 ": (%d) %s\n",
ino, rc, strerror (rc));
return 1;
}
if (show_all || allocated)
128910: 80 7d 87 00 cmpb $0x0,-0x79(%ebp) <== NOT EXECUTED
128914: 75 0a jne 128920 <rtems_rfs_shell_inode+0x190><== NOT EXECUTED
128916: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) <== NOT EXECUTED
12891a: 0f 84 20 02 00 00 je 128b40 <rtems_rfs_shell_inode+0x3b0><== NOT EXECUTED
{
uint16_t mode;
bool error;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
128920: 6a 01 push $0x1 <== NOT EXECUTED
128922: 8d 4d bc lea -0x44(%ebp),%ecx <== NOT EXECUTED
128925: 51 push %ecx <== NOT EXECUTED
128926: 57 push %edi <== NOT EXECUTED
128927: 56 push %esi <== NOT EXECUTED
128928: e8 c7 91 01 00 call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
12892d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128930: 85 c0 test %eax,%eax <== NOT EXECUTED
128932: 0f 8f dc 02 00 00 jg 128c14 <rtems_rfs_shell_inode+0x484><== NOT EXECUTED
128938: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
12893b: 0f b6 42 02 movzbl 0x2(%edx),%eax <== NOT EXECUTED
12893f: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
128942: 0f b6 5a 03 movzbl 0x3(%edx),%ebx <== NOT EXECUTED
128946: 09 c3 or %eax,%ebx <== NOT EXECUTED
error = false;
mode = rtems_rfs_inode_get_mode (&inode);
if (error_check_only)
128948: 80 bd 7f ff ff ff 00 cmpb $0x0,-0x81(%ebp) <== NOT EXECUTED
12894f: 74 3e je 12898f <rtems_rfs_shell_inode+0x1ff><== NOT EXECUTED
{
if (!RTEMS_RFS_S_ISDIR (mode) &&
128951: 89 d8 mov %ebx,%eax <== NOT EXECUTED
128953: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
128958: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
12895d: 0f 84 c5 01 00 00 je 128b28 <rtems_rfs_shell_inode+0x398><== NOT EXECUTED
128963: 3d 00 20 00 00 cmp $0x2000,%eax <== NOT EXECUTED
128968: 0f 84 ba 01 00 00 je 128b28 <rtems_rfs_shell_inode+0x398><== NOT EXECUTED
12896e: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED
128973: 0f 84 af 01 00 00 je 128b28 <rtems_rfs_shell_inode+0x398><== NOT EXECUTED
128979: 3d 00 80 00 00 cmp $0x8000,%eax <== NOT EXECUTED
12897e: 0f 84 a4 01 00 00 je 128b28 <rtems_rfs_shell_inode+0x398><== NOT EXECUTED
}
#endif
}
}
if (!error_check_only || error)
128984: 3d 00 a0 00 00 cmp $0xa000,%eax <== NOT EXECUTED
128989: 0f 84 99 01 00 00 je 128b28 <rtems_rfs_shell_inode+0x398><== NOT EXECUTED
{
printf (" %5" PRIu32 ": pos=%06" PRIu32 ":%04zx %c ",
12898f: 80 7d e7 01 cmpb $0x1,-0x19(%ebp) <== NOT EXECUTED
128993: 19 c0 sbb %eax,%eax <== NOT EXECUTED
128995: 83 e0 05 and $0x5,%eax <== NOT EXECUTED
128998: 83 c0 41 add $0x41,%eax <== NOT EXECUTED
12899b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12899e: 50 push %eax <== NOT EXECUTED
12899f: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
1289a2: c1 e2 03 shl $0x3,%edx <== NOT EXECUTED
1289a5: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax <== NOT EXECUTED
1289ac: 29 d0 sub %edx,%eax <== NOT EXECUTED
1289ae: 50 push %eax <== NOT EXECUTED
1289af: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
1289b2: 57 push %edi <== NOT EXECUTED
1289b3: 68 1a 4a 16 00 push $0x164a1a <== NOT EXECUTED
1289b8: e8 e7 30 02 00 call 14baa4 <printf> <== NOT EXECUTED
ino, rtems_rfs_buffer_bnum (&inode.buffer),
inode.offset * RTEMS_RFS_INODE_SIZE,
allocated ? 'A' : 'F');
if (!allocated && !forced)
1289bd: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1289c0: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) <== NOT EXECUTED
1289c4: 75 0d jne 1289d3 <rtems_rfs_shell_inode+0x243><== NOT EXECUTED
1289c6: 80 bd 77 ff ff ff 00 cmpb $0x0,-0x89(%ebp) <== NOT EXECUTED
1289cd: 0f 84 b1 01 00 00 je 128b84 <rtems_rfs_shell_inode+0x3f4><== NOT EXECUTED
printf (" --\n");
else
{
const char* type;
type = "UKN";
if (RTEMS_RFS_S_ISDIR (mode))
1289d3: 0f b7 d3 movzwl %bx,%edx <== NOT EXECUTED
1289d6: 89 d0 mov %edx,%eax <== NOT EXECUTED
1289d8: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
1289dd: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
1289e2: 0f 84 7c 01 00 00 je 128b64 <rtems_rfs_shell_inode+0x3d4><== NOT EXECUTED
type = "DIR";
else if (RTEMS_RFS_S_ISCHR (mode))
1289e8: 3d 00 20 00 00 cmp $0x2000,%eax <== NOT EXECUTED
1289ed: 0f 84 81 01 00 00 je 128b74 <rtems_rfs_shell_inode+0x3e4><== NOT EXECUTED
type = "CHR";
else if (RTEMS_RFS_S_ISBLK (mode))
1289f3: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED
1289f8: 0f 84 9a 01 00 00 je 128b98 <rtems_rfs_shell_inode+0x408><== NOT EXECUTED
type = "BLK";
else if (RTEMS_RFS_S_ISREG (mode))
1289fe: 3d 00 80 00 00 cmp $0x8000,%eax <== NOT EXECUTED
128a03: 0f 84 9f 01 00 00 je 128ba8 <rtems_rfs_shell_inode+0x418><== NOT EXECUTED
type = "REG";
else if (RTEMS_RFS_S_ISLNK (mode))
128a09: 3d 00 a0 00 00 cmp $0xa000,%eax <== NOT EXECUTED
128a0e: 0f 84 a4 01 00 00 je 128bb8 <rtems_rfs_shell_inode+0x428><== NOT EXECUTED
128a14: c7 85 78 ff ff ff 4d movl $0x164a4d,-0x88(%ebp) <== NOT EXECUTED
128a1b: 4a 16 00
128a1e: 66 90 xchg %ax,%ax <== NOT EXECUTED
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
128a20: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
128a23: 8d 48 0c lea 0xc(%eax),%ecx <== NOT EXECUTED
128a26: 8a 58 0c mov 0xc(%eax),%bl <== NOT EXECUTED
128a29: 88 5d 98 mov %bl,-0x68(%ebp) <== NOT EXECUTED
128a2c: 8a 59 01 mov 0x1(%ecx),%bl <== NOT EXECUTED
128a2f: 88 5d 94 mov %bl,-0x6c(%ebp) <== NOT EXECUTED
128a32: 8a 59 02 mov 0x2(%ecx),%bl <== NOT EXECUTED
128a35: 88 5d 90 mov %bl,-0x70(%ebp) <== NOT EXECUTED
128a38: 8a 49 03 mov 0x3(%ecx),%cl <== NOT EXECUTED
128a3b: 88 4d 88 mov %cl,-0x78(%ebp) <== NOT EXECUTED
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
128a3e: 8a 58 0a mov 0xa(%eax),%bl <== NOT EXECUTED
128a41: 8a 48 0b mov 0xb(%eax),%cl <== NOT EXECUTED
128a44: 88 4d b7 mov %cl,-0x49(%ebp) <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
128a47: 0f b6 08 movzbl (%eax),%ecx <== NOT EXECUTED
128a4a: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
128a4d: 0f b6 40 01 movzbl 0x1(%eax),%eax <== NOT EXECUTED
128a51: 09 c8 or %ecx,%eax <== NOT EXECUTED
if (links == 0xffff)
128a53: 66 83 f8 ff cmp $0xffffffff,%ax <== NOT EXECUTED
128a57: 0f 84 fb 00 00 00 je 128b58 <rtems_rfs_shell_inode+0x3c8><== NOT EXECUTED
128a5d: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED
128a60: 89 45 80 mov %eax,-0x80(%ebp) <== NOT EXECUTED
type = "LNK";
printf ("links=%03i mode=%04x (%s/%03o) bo=%04u bc=%04" PRIu32 " b=[",
128a63: 51 push %ecx <== NOT EXECUTED
128a64: 0f b6 45 88 movzbl -0x78(%ebp),%eax <== NOT EXECUTED
128a68: 8a 4d 98 mov -0x68(%ebp),%cl <== NOT EXECUTED
128a6b: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
128a6e: 09 c8 or %ecx,%eax <== NOT EXECUTED
128a70: 0f b6 4d 94 movzbl -0x6c(%ebp),%ecx <== NOT EXECUTED
128a74: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
128a77: 09 c8 or %ecx,%eax <== NOT EXECUTED
128a79: 0f b6 4d 90 movzbl -0x70(%ebp),%ecx <== NOT EXECUTED
128a7d: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
128a80: 09 c8 or %ecx,%eax <== NOT EXECUTED
128a82: 50 push %eax <== NOT EXECUTED
128a83: c1 e3 08 shl $0x8,%ebx <== NOT EXECUTED
128a86: 0f b6 45 b7 movzbl -0x49(%ebp),%eax <== NOT EXECUTED
128a8a: 09 c3 or %eax,%ebx <== NOT EXECUTED
128a8c: 0f b7 db movzwl %bx,%ebx <== NOT EXECUTED
128a8f: 53 push %ebx <== NOT EXECUTED
128a90: 89 d0 mov %edx,%eax <== NOT EXECUTED
128a92: 25 ff 03 00 00 and $0x3ff,%eax <== NOT EXECUTED
128a97: 50 push %eax <== NOT EXECUTED
128a98: ff b5 78 ff ff ff pushl -0x88(%ebp) <== NOT EXECUTED
128a9e: 52 push %edx <== NOT EXECUTED
128a9f: ff 75 80 pushl -0x80(%ebp) <== NOT EXECUTED
128aa2: 68 cc 4e 16 00 push $0x164ecc <== NOT EXECUTED
128aa7: e8 f8 2f 02 00 call 14baa4 <printf> <== NOT EXECUTED
128aac: 31 db xor %ebx,%ebx <== NOT EXECUTED
128aae: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
128ab1: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
128ab4: 83 c2 1c add $0x1c,%edx <== NOT EXECUTED
rtems_rfs_inode_get_links (&inode),
mode, type, mode & ((1 << 10) - 1),
rtems_rfs_inode_get_block_offset (&inode),
rtems_rfs_inode_get_block_count (&inode));
for (b = 0; b < (RTEMS_RFS_INODE_BLOCKS - 1); b++)
printf ("%" PRIu32 " ", rtems_rfs_inode_get_block (&inode, b));
128ab7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
128aba: 0f b6 44 1a 03 movzbl 0x3(%edx,%ebx,1),%eax <== NOT EXECUTED
128abf: 0f b6 0c 1a movzbl (%edx,%ebx,1),%ecx <== NOT EXECUTED
128ac3: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
128ac6: 09 c8 or %ecx,%eax <== NOT EXECUTED
128ac8: 0f b6 4c 1a 01 movzbl 0x1(%edx,%ebx,1),%ecx <== NOT EXECUTED
128acd: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
128ad0: 09 c8 or %ecx,%eax <== NOT EXECUTED
128ad2: 0f b6 54 1a 02 movzbl 0x2(%edx,%ebx,1),%edx <== NOT EXECUTED
128ad7: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
128ada: 09 d0 or %edx,%eax <== NOT EXECUTED
128adc: 50 push %eax <== NOT EXECUTED
128add: 68 51 4a 16 00 push $0x164a51 <== NOT EXECUTED
128ae2: e8 bd 2f 02 00 call 14baa4 <printf> <== NOT EXECUTED
128ae7: 83 c3 04 add $0x4,%ebx <== NOT EXECUTED
printf ("links=%03i mode=%04x (%s/%03o) bo=%04u bc=%04" PRIu32 " b=[",
rtems_rfs_inode_get_links (&inode),
mode, type, mode & ((1 << 10) - 1),
rtems_rfs_inode_get_block_offset (&inode),
rtems_rfs_inode_get_block_count (&inode));
for (b = 0; b < (RTEMS_RFS_INODE_BLOCKS - 1); b++)
128aea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128aed: 83 fb 10 cmp $0x10,%ebx <== NOT EXECUTED
128af0: 75 bf jne 128ab1 <rtems_rfs_shell_inode+0x321><== NOT EXECUTED
128af2: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
128af5: 83 c2 1c add $0x1c,%edx <== NOT EXECUTED
printf ("%" PRIu32 " ", rtems_rfs_inode_get_block (&inode, b));
printf ("%" PRIu32 "]\n", rtems_rfs_inode_get_block (&inode, b));
128af8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
128afb: 0f b6 42 10 movzbl 0x10(%edx),%eax <== NOT EXECUTED
128aff: c1 e0 18 shl $0x18,%eax <== NOT EXECUTED
128b02: 0f b6 4a 11 movzbl 0x11(%edx),%ecx <== NOT EXECUTED
128b06: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
128b09: 09 c8 or %ecx,%eax <== NOT EXECUTED
128b0b: 0f b6 4a 13 movzbl 0x13(%edx),%ecx <== NOT EXECUTED
128b0f: 09 c8 or %ecx,%eax <== NOT EXECUTED
128b11: 0f b6 52 12 movzbl 0x12(%edx),%edx <== NOT EXECUTED
128b15: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
128b18: 09 d0 or %edx,%eax <== NOT EXECUTED
128b1a: 50 push %eax <== NOT EXECUTED
128b1b: 68 56 4a 16 00 push $0x164a56 <== NOT EXECUTED
128b20: e8 7f 2f 02 00 call 14baa4 <printf> <== NOT EXECUTED
128b25: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
rc = rtems_rfs_inode_close (fs, &inode);
128b28: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
128b2b: 8d 5d bc lea -0x44(%ebp),%ebx <== NOT EXECUTED
128b2e: 53 push %ebx <== NOT EXECUTED
128b2f: 56 push %esi <== NOT EXECUTED
128b30: e8 3b 8f 01 00 call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
128b35: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128b38: 85 c0 test %eax,%eax <== NOT EXECUTED
128b3a: 0f 8f 00 01 00 00 jg 128c40 <rtems_rfs_shell_inode+0x4b0><== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (ino = start; ino <= end; ino++)
128b40: 47 inc %edi <== NOT EXECUTED
128b41: 3b 7d 8c cmp -0x74(%ebp),%edi <== NOT EXECUTED
128b44: 0f 86 ae fd ff ff jbe 1288f8 <rtems_rfs_shell_inode+0x168><== NOT EXECUTED
return 1;
}
}
}
rtems_rfs_shell_unlock_rfs (fs);
128b4a: 89 f0 mov %esi,%eax <== NOT EXECUTED
128b4c: e8 1f fc ff ff call 128770 <rtems_rfs_shell_unlock_rfs><== NOT EXECUTED
128b51: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
128b53: e9 1c fd ff ff jmp 128874 <rtems_rfs_shell_inode+0xe4><== NOT EXECUTED
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
128b58: c7 45 80 00 00 00 00 movl $0x0,-0x80(%ebp) <== NOT EXECUTED
128b5f: e9 ff fe ff ff jmp 128a63 <rtems_rfs_shell_inode+0x2d3><== NOT EXECUTED
printf (" --\n");
else
{
const char* type;
type = "UKN";
if (RTEMS_RFS_S_ISDIR (mode))
128b64: c7 85 78 ff ff ff 39 movl $0x164a39,-0x88(%ebp) <== NOT EXECUTED
128b6b: 4a 16 00
128b6e: e9 ad fe ff ff jmp 128a20 <rtems_rfs_shell_inode+0x290><== NOT EXECUTED
128b73: 90 nop <== NOT EXECUTED
type = "DIR";
else if (RTEMS_RFS_S_ISCHR (mode))
128b74: c7 85 78 ff ff ff 3d movl $0x164a3d,-0x88(%ebp) <== NOT EXECUTED
128b7b: 4a 16 00
128b7e: e9 9d fe ff ff jmp 128a20 <rtems_rfs_shell_inode+0x290><== NOT EXECUTED
128b83: 90 nop <== NOT EXECUTED
ino, rtems_rfs_buffer_bnum (&inode.buffer),
inode.offset * RTEMS_RFS_INODE_SIZE,
allocated ? 'A' : 'F');
if (!allocated && !forced)
printf (" --\n");
128b84: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
128b87: 68 35 4a 16 00 push $0x164a35 <== NOT EXECUTED
128b8c: e8 27 31 02 00 call 14bcb8 <puts> <== NOT EXECUTED
printf (" %5" PRIu32 ": pos=%06" PRIu32 ":%04zx %c ",
ino, rtems_rfs_buffer_bnum (&inode.buffer),
inode.offset * RTEMS_RFS_INODE_SIZE,
allocated ? 'A' : 'F');
if (!allocated && !forced)
128b91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128b94: eb 92 jmp 128b28 <rtems_rfs_shell_inode+0x398><== NOT EXECUTED
128b96: 66 90 xchg %ax,%ax <== NOT EXECUTED
type = "UKN";
if (RTEMS_RFS_S_ISDIR (mode))
type = "DIR";
else if (RTEMS_RFS_S_ISCHR (mode))
type = "CHR";
else if (RTEMS_RFS_S_ISBLK (mode))
128b98: c7 85 78 ff ff ff 41 movl $0x164a41,-0x88(%ebp) <== NOT EXECUTED
128b9f: 4a 16 00
128ba2: e9 79 fe ff ff jmp 128a20 <rtems_rfs_shell_inode+0x290><== NOT EXECUTED
128ba7: 90 nop <== NOT EXECUTED
type = "BLK";
else if (RTEMS_RFS_S_ISREG (mode))
128ba8: c7 85 78 ff ff ff 45 movl $0x164a45,-0x88(%ebp) <== NOT EXECUTED
128baf: 4a 16 00
128bb2: e9 69 fe ff ff jmp 128a20 <rtems_rfs_shell_inode+0x290><== NOT EXECUTED
128bb7: 90 nop <== NOT EXECUTED
type = "REG";
else if (RTEMS_RFS_S_ISLNK (mode))
128bb8: c7 85 78 ff ff ff 49 movl $0x164a49,-0x88(%ebp) <== NOT EXECUTED
128bbf: 4a 16 00
128bc2: e9 59 fe ff ff jmp 128a20 <rtems_rfs_shell_inode+0x290><== NOT EXECUTED
128bc7: 89 c3 mov %eax,%ebx <== NOT EXECUTED
bool allocated;
rc = rtems_rfs_group_bitmap_test (fs, true, ino, &allocated);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
128bc9: 89 f0 mov %esi,%eax <== NOT EXECUTED
128bcb: e8 a0 fb ff ff call 128770 <rtems_rfs_shell_unlock_rfs><== NOT EXECUTED
printf ("error: testing inode state: ino=%" PRIu32 ": (%d) %s\n",
128bd0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
128bd3: 53 push %ebx <== NOT EXECUTED
128bd4: e8 53 49 02 00 call 14d52c <strerror> <== NOT EXECUTED
128bd9: 50 push %eax <== NOT EXECUTED
128bda: 53 push %ebx <== NOT EXECUTED
128bdb: 57 push %edi <== NOT EXECUTED
128bdc: 68 6c 4e 16 00 push $0x164e6c <== NOT EXECUTED
128be1: e8 be 2e 02 00 call 14baa4 <printf> <== NOT EXECUTED
128be6: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
ino, rc, strerror (rc));
return 1;
128beb: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
128bee: e9 81 fc ff ff jmp 128874 <rtems_rfs_shell_inode+0xe4><== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
128bf3: 89 45 8c mov %eax,-0x74(%ebp) <== NOT EXECUTED
128bf6: c6 85 77 ff ff ff 00 movb $0x0,-0x89(%ebp) <== NOT EXECUTED
128bfd: c6 85 7f ff ff ff 00 movb $0x0,-0x81(%ebp) <== NOT EXECUTED
128c04: c6 45 87 00 movb $0x0,-0x79(%ebp) <== NOT EXECUTED
128c08: c7 45 90 01 00 00 00 movl $0x1,-0x70(%ebp) <== NOT EXECUTED
128c0f: e9 38 fc ff ff jmp 12884c <rtems_rfs_shell_inode+0xbc><== NOT EXECUTED
128c14: 89 c3 mov %eax,%ebx <== NOT EXECUTED
bool error;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
128c16: 89 f0 mov %esi,%eax <== NOT EXECUTED
128c18: e8 53 fb ff ff call 128770 <rtems_rfs_shell_unlock_rfs><== NOT EXECUTED
printf ("error: opening inode handle: ino=%" PRIu32 ": (%d) %s\n",
128c1d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
128c20: 53 push %ebx <== NOT EXECUTED
128c21: e8 06 49 02 00 call 14d52c <strerror> <== NOT EXECUTED
128c26: 50 push %eax <== NOT EXECUTED
128c27: 53 push %ebx <== NOT EXECUTED
128c28: 57 push %edi <== NOT EXECUTED
128c29: 68 9c 4e 16 00 push $0x164e9c <== NOT EXECUTED
128c2e: e8 71 2e 02 00 call 14baa4 <printf> <== NOT EXECUTED
128c33: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
ino, rc, strerror (rc));
return 1;
128c38: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
128c3b: e9 34 fc ff ff jmp 128874 <rtems_rfs_shell_inode+0xe4><== NOT EXECUTED
128c40: 89 c3 mov %eax,%ebx <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
128c42: 89 f0 mov %esi,%eax <== NOT EXECUTED
128c44: e8 27 fb ff ff call 128770 <rtems_rfs_shell_unlock_rfs><== NOT EXECUTED
printf ("error: closing inode handle: ino=%" PRIu32 ": (%d) %s\n",
128c49: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
128c4c: 53 push %ebx <== NOT EXECUTED
128c4d: e8 da 48 02 00 call 14d52c <strerror> <== NOT EXECUTED
128c52: 50 push %eax <== NOT EXECUTED
128c53: 53 push %ebx <== NOT EXECUTED
128c54: 57 push %edi <== NOT EXECUTED
128c55: 68 00 4f 16 00 push $0x164f00 <== NOT EXECUTED
128c5a: e8 45 2e 02 00 call 14baa4 <printf> <== NOT EXECUTED
128c5f: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
ino, rc, strerror (rc));
return 1;
128c64: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
128c67: e9 08 fc ff ff jmp 128874 <rtems_rfs_shell_inode+0xe4><== NOT EXECUTED
00128770 <rtems_rfs_shell_unlock_rfs>:
/**
* Unlock the file system.
*/
static void
rtems_rfs_shell_unlock_rfs (rtems_rfs_file_system* fs)
{
128770: 55 push %ebp <== NOT EXECUTED
128771: 89 e5 mov %esp,%ebp <== NOT EXECUTED
128773: 53 push %ebx <== NOT EXECUTED
128774: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
128777: 8b 58 7c mov 0x7c(%eax),%ebx <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
12877a: 50 push %eax <== NOT EXECUTED
12877b: e8 6c 57 01 00 call 13deec <rtems_rfs_buffers_release><== NOT EXECUTED
128780: 5a pop %edx <== NOT EXECUTED
128781: ff 33 pushl (%ebx) <== NOT EXECUTED
128783: e8 6c a8 fe ff call 112ff4 <rtems_semaphore_release><== NOT EXECUTED
128788: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
#if __rtems__
rtems_rfs_rtems_unlock (fs);
#endif
}
12878b: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
12878e: c9 leave <== NOT EXECUTED
12878f: c3 ret <== NOT EXECUTED
001284c4 <rtems_rfs_shell_usage>:
}
void
rtems_rfs_shell_usage (const char* arg)
{
1284c4: 55 push %ebp <== NOT EXECUTED
1284c5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1284c7: 53 push %ebx <== NOT EXECUTED
1284c8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1284cb: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
printf ("%s: RFS debugger\n", arg);
1284ce: 53 push %ebx <== NOT EXECUTED
1284cf: 68 ac 49 16 00 push $0x1649ac <== NOT EXECUTED
1284d4: e8 cb 35 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" %s [-hl] <path> <command>\n", arg);
1284d9: 58 pop %eax <== NOT EXECUTED
1284da: 5a pop %edx <== NOT EXECUTED
1284db: 53 push %ebx <== NOT EXECUTED
1284dc: 68 be 49 16 00 push $0x1649be <== NOT EXECUTED
1284e1: e8 be 35 02 00 call 14baa4 <printf> <== NOT EXECUTED
printf (" where:\n");
1284e6: c7 04 24 db 49 16 00 movl $0x1649db,(%esp) <== NOT EXECUTED
1284ed: e8 c6 37 02 00 call 14bcb8 <puts> <== NOT EXECUTED
printf (" path: Path to the mounted RFS file system\n");
1284f2: c7 04 24 b4 4c 16 00 movl $0x164cb4,(%esp) <== NOT EXECUTED
1284f9: e8 ba 37 02 00 call 14bcb8 <puts> <== NOT EXECUTED
printf (" command: A debugger command. See -l for a list plus help.\n");
1284fe: c7 04 24 e8 4c 16 00 movl $0x164ce8,(%esp) <== NOT EXECUTED
128505: e8 ae 37 02 00 call 14bcb8 <puts> <== NOT EXECUTED
printf (" -h: This help\n");
12850a: c7 04 24 e5 49 16 00 movl $0x1649e5,(%esp) <== NOT EXECUTED
128511: e8 a2 37 02 00 call 14bcb8 <puts> <== NOT EXECUTED
printf (" -l: The debugger command list.\n");
128516: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128519: c7 45 08 28 4d 16 00 movl $0x164d28,0x8(%ebp) <== NOT EXECUTED
}
128520: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
128523: c9 leave <== NOT EXECUTED
printf (" %s [-hl] <path> <command>\n", arg);
printf (" where:\n");
printf (" path: Path to the mounted RFS file system\n");
printf (" command: A debugger command. See -l for a list plus help.\n");
printf (" -h: This help\n");
printf (" -l: The debugger command list.\n");
128524: e9 8f 37 02 00 jmp 14bcb8 <puts> <== NOT EXECUTED
001420a0 <rtems_rfs_symlink>:
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
1420a0: 55 push %ebp <== NOT EXECUTED
1420a1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1420a3: 57 push %edi <== NOT EXECUTED
1420a4: 56 push %esi <== NOT EXECUTED
1420a5: 53 push %ebx <== NOT EXECUTED
1420a6: 81 ec 9c 00 00 00 sub $0x9c,%esp <== NOT EXECUTED
1420ac: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
1420af: 8b 75 1c mov 0x1c(%ebp),%esi <== NOT EXECUTED
1420b2: 8b 55 20 mov 0x20(%ebp),%edx <== NOT EXECUTED
printf (" link:");
for (c = 0; c < link_length; c++)
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
1420b5: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
1420b8: 3b 43 08 cmp 0x8(%ebx),%eax <== NOT EXECUTED
1420bb: 72 0f jb 1420cc <rtems_rfs_symlink+0x2c><== NOT EXECUTED
1420bd: be 5b 00 00 00 mov $0x5b,%esi <== NOT EXECUTED
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
1420c2: 89 f0 mov %esi,%eax <== NOT EXECUTED
1420c4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1420c7: 5b pop %ebx <== NOT EXECUTED
1420c8: 5e pop %esi <== NOT EXECUTED
1420c9: 5f pop %edi <== NOT EXECUTED
1420ca: c9 leave <== NOT EXECUTED
1420cb: c3 ret <== NOT EXECUTED
}
if (link_length >= rtems_rfs_fs_block_size (fs))
return ENAMETOOLONG;
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
1420cc: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
1420d1: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED
1420d4: 31 c0 xor %eax,%eax <== NOT EXECUTED
1420d6: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
1420d8: f7 d1 not %ecx <== NOT EXECUTED
1420da: 49 dec %ecx <== NOT EXECUTED
1420db: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1420de: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
1420e1: 50 push %eax <== NOT EXECUTED
1420e2: 0f b7 d2 movzwl %dx,%edx <== NOT EXECUTED
1420e5: 52 push %edx <== NOT EXECUTED
1420e6: 0f b7 f6 movzwl %si,%esi <== NOT EXECUTED
1420e9: 56 push %esi <== NOT EXECUTED
1420ea: 6a 01 push $0x1 <== NOT EXECUTED
1420ec: 68 ff a1 00 00 push $0xa1ff <== NOT EXECUTED
1420f1: 51 push %ecx <== NOT EXECUTED
1420f2: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
1420f5: ff 75 24 pushl 0x24(%ebp) <== NOT EXECUTED
1420f8: 53 push %ebx <== NOT EXECUTED
1420f9: e8 66 fb ff ff call 141c64 <rtems_rfs_inode_create><== NOT EXECUTED
1420fe: 89 c6 mov %eax,%esi <== NOT EXECUTED
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
142100: 83 c4 30 add $0x30,%esp <== NOT EXECUTED
142103: 85 c0 test %eax,%eax <== NOT EXECUTED
142105: 7f bb jg 1420c2 <rtems_rfs_symlink+0x22><== NOT EXECUTED
return rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
142107: 6a 01 push $0x1 <== NOT EXECUTED
142109: 8d 7d ac lea -0x54(%ebp),%edi <== NOT EXECUTED
14210c: 57 push %edi <== NOT EXECUTED
14210d: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
142110: 53 push %ebx <== NOT EXECUTED
142111: e8 de f9 ff ff call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
142116: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
142118: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14211b: 85 c0 test %eax,%eax <== NOT EXECUTED
14211d: 7f a3 jg 1420c2 <rtems_rfs_symlink+0x22><== NOT EXECUTED
/*
* If the link length is less than the length of data union in the inode
* place the link into the data area else allocate a block and write the link
* to that.
*/
if (link_length < RTEMS_RFS_INODE_DATA_NAME_SIZE)
14211f: 83 7d 18 13 cmpl $0x13,0x18(%ebp) <== NOT EXECUTED
142123: 77 6f ja 142194 <rtems_rfs_symlink+0xf4><== NOT EXECUTED
{
memset (inode.node->data.name, 0, RTEMS_RFS_INODE_DATA_NAME_SIZE);
142125: 8b 55 b8 mov -0x48(%ebp),%edx <== NOT EXECUTED
142128: 83 c2 1c add $0x1c,%edx <== NOT EXECUTED
14212b: b9 14 00 00 00 mov $0x14,%ecx <== NOT EXECUTED
142130: 89 d7 mov %edx,%edi <== NOT EXECUTED
142132: 31 c0 xor %eax,%eax <== NOT EXECUTED
142134: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
memcpy (inode.node->data.name, link, link_length);
142136: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
142139: 83 c0 1c add $0x1c,%eax <== NOT EXECUTED
14213c: 89 c7 mov %eax,%edi <== NOT EXECUTED
14213e: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED
142141: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED
142144: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
142146: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
142149: c6 40 0c 00 movb $0x0,0xc(%eax) <== NOT EXECUTED
14214d: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
142150: c6 40 0d 00 movb $0x0,0xd(%eax) <== NOT EXECUTED
142154: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
142157: c6 40 0e 00 movb $0x0,0xe(%eax) <== NOT EXECUTED
14215b: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
14215e: c6 40 0f 00 movb $0x0,0xf(%eax) <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rtems_rfs_inode_set_block_offset (&inode, link_length);
142162: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
142165: 89 c1 mov %eax,%ecx <== NOT EXECUTED
142167: 66 c1 e9 08 shr $0x8,%cx <== NOT EXECUTED
14216b: 8b 55 b8 mov -0x48(%ebp),%edx <== NOT EXECUTED
14216e: 88 4a 0a mov %cl,0xa(%edx) <== NOT EXECUTED
142171: 8b 55 b8 mov -0x48(%ebp),%edx <== NOT EXECUTED
142174: 88 42 0b mov %al,0xb(%edx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
142177: c6 45 bc 01 movb $0x1,-0x44(%ebp) <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
14217b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
14217e: 8d 7d ac lea -0x54(%ebp),%edi <== NOT EXECUTED
142181: 57 push %edi <== NOT EXECUTED
142182: 53 push %ebx <== NOT EXECUTED
142183: e8 e8 f8 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
142188: 89 c6 mov %eax,%esi <== NOT EXECUTED
return rc;
14218a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14218d: e9 30 ff ff ff jmp 1420c2 <rtems_rfs_symlink+0x22><== NOT EXECUTED
142192: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
uint8_t* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
142194: 50 push %eax <== NOT EXECUTED
142195: 8d bd 5c ff ff ff lea -0xa4(%ebp),%edi <== NOT EXECUTED
14219b: 57 push %edi <== NOT EXECUTED
14219c: 8d 45 ac lea -0x54(%ebp),%eax <== NOT EXECUTED
14219f: 50 push %eax <== NOT EXECUTED
1421a0: 53 push %ebx <== NOT EXECUTED
1421a1: e8 36 bb ff ff call 13dcdc <rtems_rfs_block_map_open><== NOT EXECUTED
1421a6: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
1421a8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1421ab: 85 c0 test %eax,%eax <== NOT EXECUTED
1421ad: 7e 15 jle 1421c4 <rtems_rfs_symlink+0x124><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
1421af: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
1421b2: 8d 7d ac lea -0x54(%ebp),%edi <== NOT EXECUTED
1421b5: 57 push %edi <== NOT EXECUTED
1421b6: 53 push %ebx <== NOT EXECUTED
1421b7: e8 b4 f8 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
1421bc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1421bf: e9 fe fe ff ff jmp 1420c2 <rtems_rfs_symlink+0x22><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
1421c4: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
1421c7: 50 push %eax <== NOT EXECUTED
1421c8: 6a 01 push $0x1 <== NOT EXECUTED
1421ca: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax <== NOT EXECUTED
1421d0: 50 push %eax <== NOT EXECUTED
1421d1: 53 push %ebx <== NOT EXECUTED
1421d2: e8 35 b6 ff ff call 13d80c <rtems_rfs_block_map_grow><== NOT EXECUTED
1421d7: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
1421d9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1421dc: 85 c0 test %eax,%eax <== NOT EXECUTED
1421de: 7e 24 jle 142204 <rtems_rfs_symlink+0x164><== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
1421e0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1421e3: 8d bd 5c ff ff ff lea -0xa4(%ebp),%edi <== NOT EXECUTED
1421e9: 57 push %edi <== NOT EXECUTED
1421ea: 53 push %ebx <== NOT EXECUTED
1421eb: e8 40 b9 ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
1421f0: 59 pop %ecx <== NOT EXECUTED
1421f1: 5f pop %edi <== NOT EXECUTED
}
rc = rtems_rfs_block_map_close (fs, &map);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
1421f2: 8d 45 ac lea -0x54(%ebp),%eax <== NOT EXECUTED
1421f5: 50 push %eax <== NOT EXECUTED
1421f6: 53 push %ebx <== NOT EXECUTED
1421f7: e8 74 f8 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
1421fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1421ff: e9 be fe ff ff jmp 1420c2 <rtems_rfs_symlink+0x22><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
142204: c6 45 d4 00 movb $0x0,-0x2c(%ebp) <== NOT EXECUTED
handle->bnum = 0;
142208: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
14220f: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
142216: 6a 00 push $0x0 <== NOT EXECUTED
142218: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
14221b: 8d 7d d4 lea -0x2c(%ebp),%edi <== NOT EXECUTED
14221e: 57 push %edi <== NOT EXECUTED
14221f: 53 push %ebx <== NOT EXECUTED
142220: e8 07 bf ff ff call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
142225: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
142227: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14222a: 85 c0 test %eax,%eax <== NOT EXECUTED
14222c: 7e 17 jle 142245 <rtems_rfs_symlink+0x1a5><== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
14222e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
142231: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax <== NOT EXECUTED
142237: 50 push %eax <== NOT EXECUTED
142238: 53 push %ebx <== NOT EXECUTED
142239: e8 f2 b8 ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
14223e: 58 pop %eax <== NOT EXECUTED
14223f: 5a pop %edx <== NOT EXECUTED
142240: e9 6d ff ff ff jmp 1421b2 <rtems_rfs_symlink+0x112><== NOT EXECUTED
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
142245: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
142248: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
14224b: 8b 4b 08 mov 0x8(%ebx),%ecx <== NOT EXECUTED
14224e: b0 ff mov $0xff,%al <== NOT EXECUTED
142250: 89 d7 mov %edx,%edi <== NOT EXECUTED
142252: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
memcpy (data, link, link_length);
142254: 89 d7 mov %edx,%edi <== NOT EXECUTED
142256: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED
142259: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED
14225c: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
14225e: 57 push %edi <== NOT EXECUTED
14225f: 57 push %edi <== NOT EXECUTED
142260: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED
142263: 50 push %eax <== NOT EXECUTED
142264: 53 push %ebx <== NOT EXECUTED
142265: e8 be bd ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
14226a: c6 45 d4 00 movb $0x0,-0x2c(%ebp) <== NOT EXECUTED
handle->bnum = 0;
14226e: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
142275: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
14227c: 59 pop %ecx <== NOT EXECUTED
14227d: 5e pop %esi <== NOT EXECUTED
14227e: 8d bd 5c ff ff ff lea -0xa4(%ebp),%edi <== NOT EXECUTED
142284: 57 push %edi <== NOT EXECUTED
142285: 53 push %ebx <== NOT EXECUTED
142286: e8 a5 b8 ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
14228b: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
14228d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142290: 85 c0 test %eax,%eax <== NOT EXECUTED
142292: 0f 8e ca fe ff ff jle 142162 <rtems_rfs_symlink+0xc2><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
142298: 52 push %edx <== NOT EXECUTED
142299: 52 push %edx <== NOT EXECUTED
14229a: e9 53 ff ff ff jmp 1421f2 <rtems_rfs_symlink+0x152><== NOT EXECUTED
00141ed8 <rtems_rfs_symlink_read>:
rtems_rfs_symlink_read (rtems_rfs_file_system* fs,
rtems_rfs_ino link,
char* path,
size_t size,
size_t* length)
{
141ed8: 55 push %ebp <== NOT EXECUTED
141ed9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
141edb: 57 push %edi <== NOT EXECUTED
141edc: 56 push %esi <== NOT EXECUTED
141edd: 53 push %ebx <== NOT EXECUTED
141ede: 81 ec ac 00 00 00 sub $0xac,%esp <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
rc = rtems_rfs_inode_open (fs, link, &inode, true);
141ee4: 6a 01 push $0x1 <== NOT EXECUTED
141ee6: 8d 5d b0 lea -0x50(%ebp),%ebx <== NOT EXECUTED
141ee9: 53 push %ebx <== NOT EXECUTED
141eea: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
141eed: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141ef0: e8 ff fb ff ff call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
141ef5: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc)
141ef7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141efa: 85 c0 test %eax,%eax <== NOT EXECUTED
141efc: 75 2a jne 141f28 <rtems_rfs_symlink_read+0x50><== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
141efe: 8b 75 bc mov -0x44(%ebp),%esi <== NOT EXECUTED
return rc;
if (!RTEMS_RFS_S_ISLNK (rtems_rfs_inode_get_mode (&inode)))
141f01: 0f b6 46 02 movzbl 0x2(%esi),%eax <== NOT EXECUTED
141f05: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
141f08: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
141f0d: 3d 00 a0 00 00 cmp $0xa000,%eax <== NOT EXECUTED
141f12: 74 20 je 141f34 <rtems_rfs_symlink_read+0x5c><== NOT EXECUTED
*length = rtems_rfs_inode_get_block_offset (&inode);
if (size < *length)
{
rtems_rfs_inode_close (fs, &inode);
141f14: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141f17: 53 push %ebx <== NOT EXECUTED
141f18: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141f1b: e8 50 fb ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
141f20: be 16 00 00 00 mov $0x16,%esi <== NOT EXECUTED
return EINVAL;
141f25: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
path[*length] = '\0';
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
141f28: 89 f0 mov %esi,%eax <== NOT EXECUTED
141f2a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
141f2d: 5b pop %ebx <== NOT EXECUTED
141f2e: 5e pop %esi <== NOT EXECUTED
141f2f: 5f pop %edi <== NOT EXECUTED
141f30: c9 leave <== NOT EXECUTED
141f31: c3 ret <== NOT EXECUTED
141f32: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
*length = rtems_rfs_inode_get_block_offset (&inode);
141f34: 0f b6 46 0a movzbl 0xa(%esi),%eax <== NOT EXECUTED
141f38: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
141f3b: 0f b6 4e 0b movzbl 0xb(%esi),%ecx <== NOT EXECUTED
141f3f: 09 c1 or %eax,%ecx <== NOT EXECUTED
141f41: 0f b7 c9 movzwl %cx,%ecx <== NOT EXECUTED
141f44: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
141f47: 89 08 mov %ecx,(%eax) <== NOT EXECUTED
if (size < *length)
141f49: 3b 4d 14 cmp 0x14(%ebp),%ecx <== NOT EXECUTED
141f4c: 77 c6 ja 141f14 <rtems_rfs_symlink_read+0x3c><== NOT EXECUTED
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
141f4e: 8d 46 0c lea 0xc(%esi),%eax <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
if (rtems_rfs_inode_get_block_count (&inode) == 0)
141f51: 80 78 03 00 cmpb $0x0,0x3(%eax) <== NOT EXECUTED
141f55: 75 39 jne 141f90 <rtems_rfs_symlink_read+0xb8><== NOT EXECUTED
141f57: 80 7e 0c 00 cmpb $0x0,0xc(%esi) <== NOT EXECUTED
141f5b: 75 33 jne 141f90 <rtems_rfs_symlink_read+0xb8><== NOT EXECUTED
141f5d: 80 78 01 00 cmpb $0x0,0x1(%eax) <== NOT EXECUTED
141f61: 75 2d jne 141f90 <rtems_rfs_symlink_read+0xb8><== NOT EXECUTED
141f63: 80 78 02 00 cmpb $0x0,0x2(%eax) <== NOT EXECUTED
141f67: 75 27 jne 141f90 <rtems_rfs_symlink_read+0xb8><== NOT EXECUTED
{
memcpy (path, inode.node->data.name, *length);
141f69: 83 c6 1c add $0x1c,%esi <== NOT EXECUTED
141f6c: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
141f6f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
path[*length] = '\0';
141f71: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED
141f74: 8b 02 mov (%edx),%eax <== NOT EXECUTED
141f76: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
141f79: c6 04 02 00 movb $0x0,(%edx,%eax,1) <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
141f7d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141f80: 53 push %ebx <== NOT EXECUTED
141f81: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141f84: e8 e7 fa ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
141f89: 89 c6 mov %eax,%esi <== NOT EXECUTED
return rc;
141f8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141f8e: eb 98 jmp 141f28 <rtems_rfs_symlink_read+0x50><== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
char* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
141f90: 50 push %eax <== NOT EXECUTED
141f91: 8d 95 60 ff ff ff lea -0xa0(%ebp),%edx <== NOT EXECUTED
141f97: 52 push %edx <== NOT EXECUTED
141f98: 53 push %ebx <== NOT EXECUTED
141f99: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141f9c: e8 3b bd ff ff call 13dcdc <rtems_rfs_block_map_open><== NOT EXECUTED
141fa1: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
141fa3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141fa6: 85 c0 test %eax,%eax <== NOT EXECUTED
141fa8: 7e 16 jle 141fc0 <rtems_rfs_symlink_read+0xe8><== NOT EXECUTED
}
rc = rtems_rfs_block_map_close (fs, &map);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
141faa: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141fad: 53 push %ebx <== NOT EXECUTED
141fae: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141fb1: e8 ba fa ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
141fb6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
141fb9: e9 6a ff ff ff jmp 141f28 <rtems_rfs_symlink_read+0x50><== NOT EXECUTED
141fbe: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
141fc0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
141fc3: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
141fc6: 50 push %eax <== NOT EXECUTED
141fc7: 6a 00 push $0x0 <== NOT EXECUTED
141fc9: 6a 00 push $0x0 <== NOT EXECUTED
141fcb: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax <== NOT EXECUTED
141fd1: 50 push %eax <== NOT EXECUTED
141fd2: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141fd5: e8 7e b3 ff ff call 13d358 <rtems_rfs_block_map_seek><== NOT EXECUTED
141fda: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
141fdc: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
141fdf: 85 c0 test %eax,%eax <== NOT EXECUTED
141fe1: 7e 25 jle 142008 <rtems_rfs_symlink_read+0x130><== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
141fe3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
141fe6: 8d 95 60 ff ff ff lea -0xa0(%ebp),%edx <== NOT EXECUTED
141fec: 52 push %edx <== NOT EXECUTED
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
141fed: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141ff0: e8 3b bb ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
141ff5: 59 pop %ecx <== NOT EXECUTED
141ff6: 5f pop %edi <== NOT EXECUTED
141ff7: 53 push %ebx <== NOT EXECUTED
141ff8: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
141ffb: e8 70 fa ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
142000: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142003: e9 20 ff ff ff jmp 141f28 <rtems_rfs_symlink_read+0x50><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
142008: c6 45 d8 00 movb $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->bnum = 0;
14200c: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
142013: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
14201a: 6a 00 push $0x0 <== NOT EXECUTED
14201c: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
14201f: 8d 55 d8 lea -0x28(%ebp),%edx <== NOT EXECUTED
142022: 52 push %edx <== NOT EXECUTED
142023: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
142026: 89 95 54 ff ff ff mov %edx,-0xac(%ebp) <== NOT EXECUTED
14202c: e8 fb c0 ff ff call 13e12c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
142031: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
142033: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142036: 85 c0 test %eax,%eax <== NOT EXECUTED
142038: 8b 95 54 ff ff ff mov -0xac(%ebp),%edx <== NOT EXECUTED
14203e: 7e 0c jle 14204c <rtems_rfs_symlink_read+0x174><== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
142040: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
142043: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax <== NOT EXECUTED
142049: 50 push %eax <== NOT EXECUTED
14204a: eb a1 jmp 141fed <rtems_rfs_symlink_read+0x115><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
memcpy (path, data, *length);
14204c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
14204f: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED
142052: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
142055: 8b 08 mov (%eax),%ecx <== NOT EXECUTED
142057: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
14205a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
14205c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
14205f: 52 push %edx <== NOT EXECUTED
142060: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
142063: e8 c0 bf ff ff call 13e028 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
142068: c6 45 d8 00 movb $0x0,-0x28(%ebp) <== NOT EXECUTED
handle->bnum = 0;
14206c: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
handle->buffer = NULL;
142073: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
14207a: 58 pop %eax <== NOT EXECUTED
14207b: 5a pop %edx <== NOT EXECUTED
14207c: 8d 95 60 ff ff ff lea -0xa0(%ebp),%edx <== NOT EXECUTED
142082: 52 push %edx <== NOT EXECUTED
142083: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
142086: e8 a5 ba ff ff call 13db30 <rtems_rfs_block_map_close><== NOT EXECUTED
14208b: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
14208d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142090: 85 c0 test %eax,%eax <== NOT EXECUTED
142092: 0f 8e d9 fe ff ff jle 141f71 <rtems_rfs_symlink_read+0x99><== NOT EXECUTED
142098: e9 0d ff ff ff jmp 141faa <rtems_rfs_symlink_read+0xd2><== NOT EXECUTED
001422a0 <rtems_rfs_unlink>:
rtems_rfs_unlink (rtems_rfs_file_system* fs,
rtems_rfs_ino parent,
rtems_rfs_ino target,
uint32_t doff,
rtems_rfs_unlink_dir dir_mode)
{
1422a0: 55 push %ebp <== NOT EXECUTED
1422a1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1422a3: 57 push %edi <== NOT EXECUTED
1422a4: 56 push %esi <== NOT EXECUTED
1422a5: 53 push %ebx <== NOT EXECUTED
1422a6: 83 ec 6c sub $0x6c,%esp <== NOT EXECUTED
1422a9: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
1422ac: 6a 01 push $0x1 <== NOT EXECUTED
1422ae: 8d 7d 98 lea -0x68(%ebp),%edi <== NOT EXECUTED
1422b1: 57 push %edi <== NOT EXECUTED
1422b2: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
1422b5: 56 push %esi <== NOT EXECUTED
1422b6: e8 39 f8 ff ff call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
1422bb: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc)
1422bd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1422c0: 85 c0 test %eax,%eax <== NOT EXECUTED
1422c2: 75 33 jne 1422f7 <rtems_rfs_unlink+0x57> <== NOT EXECUTED
/*
* If a directory process the unlink mode.
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
1422c4: 8b 45 a4 mov -0x5c(%ebp),%eax <== NOT EXECUTED
1422c7: 0f b6 40 02 movzbl 0x2(%eax),%eax <== NOT EXECUTED
1422cb: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
1422ce: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
1422d3: 3d 00 40 00 00 cmp $0x4000,%eax <== NOT EXECUTED
if (dir)
1422d8: 0f 94 45 97 sete -0x69(%ebp) <== NOT EXECUTED
1422dc: 75 30 jne 14230e <rtems_rfs_unlink+0x6e> <== NOT EXECUTED
{
switch (dir_mode)
1422de: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
1422e1: 85 c0 test %eax,%eax <== NOT EXECUTED
1422e3: 75 1f jne 142304 <rtems_rfs_unlink+0x64> <== NOT EXECUTED
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link is a directory\n");
rtems_rfs_inode_close (fs, &target_inode);
1422e5: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1422e8: 57 push %edi <== NOT EXECUTED
1422e9: 56 push %esi <== NOT EXECUTED
1422ea: e8 81 f7 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
1422ef: bb 15 00 00 00 mov $0x15,%ebx <== NOT EXECUTED
return EISDIR;
1422f4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
1422f7: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1422f9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1422fc: 5b pop %ebx <== NOT EXECUTED
1422fd: 5e pop %esi <== NOT EXECUTED
1422fe: 5f pop %edi <== NOT EXECUTED
1422ff: c9 leave <== NOT EXECUTED
142300: c3 ret <== NOT EXECUTED
142301: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
if (dir)
{
switch (dir_mode)
142304: 83 7d 18 01 cmpl $0x1,0x18(%ebp) <== NOT EXECUTED
142308: 0f 84 d6 00 00 00 je 1423e4 <rtems_rfs_unlink+0x144><== NOT EXECUTED
default:
break;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
14230e: 6a 01 push $0x1 <== NOT EXECUTED
142310: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
142313: 50 push %eax <== NOT EXECUTED
142314: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
142317: 56 push %esi <== NOT EXECUTED
142318: e8 d7 f7 ff ff call 141af4 <rtems_rfs_inode_open> <== NOT EXECUTED
14231d: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc)
14231f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142322: 85 c0 test %eax,%eax <== NOT EXECUTED
142324: 0f 85 a2 00 00 00 jne 1423cc <rtems_rfs_unlink+0x12c><== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_del_entry (fs, &parent_inode, target, doff);
14232a: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
14232d: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
142330: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
142333: 50 push %eax <== NOT EXECUTED
142334: 56 push %esi <== NOT EXECUTED
142335: e8 5a c3 ff ff call 13e694 <rtems_rfs_dir_del_entry><== NOT EXECUTED
14233a: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
14233c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14233f: 85 c0 test %eax,%eax <== NOT EXECUTED
142341: 7f 4d jg 142390 <rtems_rfs_unlink+0xf0> <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
142343: 8b 4d a4 mov -0x5c(%ebp),%ecx <== NOT EXECUTED
142346: 0f b6 11 movzbl (%ecx),%edx <== NOT EXECUTED
142349: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
14234c: 0f b6 41 01 movzbl 0x1(%ecx),%eax <== NOT EXECUTED
142350: 09 d0 or %edx,%eax <== NOT EXECUTED
if (links == 0xffff)
142352: 66 83 f8 ff cmp $0xffffffff,%ax <== NOT EXECUTED
142356: 0f 84 b8 00 00 00 je 142414 <rtems_rfs_unlink+0x174><== NOT EXECUTED
links = rtems_rfs_inode_get_links (&target_inode);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
if (links > 1)
14235c: 66 83 f8 01 cmp $0x1,%ax <== NOT EXECUTED
142360: 0f 86 ae 00 00 00 jbe 142414 <rtems_rfs_unlink+0x174><== NOT EXECUTED
{
links--;
142366: 48 dec %eax <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
142367: 89 c2 mov %eax,%edx <== NOT EXECUTED
142369: 66 c1 ea 08 shr $0x8,%dx <== NOT EXECUTED
14236d: 88 11 mov %dl,(%ecx) <== NOT EXECUTED
14236f: 8b 55 a4 mov -0x5c(%ebp),%edx <== NOT EXECUTED
142372: 88 42 01 mov %al,0x1(%edx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
142375: c6 45 a8 01 movb $0x1,-0x58(%ebp) <== NOT EXECUTED
links--;
rtems_rfs_inode_set_links (&parent_inode, links);
}
}
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
142379: 53 push %ebx <== NOT EXECUTED
14237a: 6a 01 push $0x1 <== NOT EXECUTED
14237c: 6a 01 push $0x1 <== NOT EXECUTED
14237e: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
142381: 50 push %eax <== NOT EXECUTED
142382: e8 5d f4 ff ff call 1417e4 <rtems_rfs_inode_time_stamp_now><== NOT EXECUTED
142387: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
142389: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14238c: 85 c0 test %eax,%eax <== NOT EXECUTED
14238e: 7e 24 jle 1423b4 <rtems_rfs_unlink+0x114><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
142390: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
142393: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
142396: 50 push %eax <== NOT EXECUTED
142397: 56 push %esi <== NOT EXECUTED
142398: e8 d3 f6 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
14239d: 5a pop %edx <== NOT EXECUTED
14239e: 59 pop %ecx <== NOT EXECUTED
14239f: 57 push %edi <== NOT EXECUTED
1423a0: 56 push %esi <== NOT EXECUTED
1423a1: e8 ca f6 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
1423a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
1423a9: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1423ab: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1423ae: 5b pop %ebx <== NOT EXECUTED
1423af: 5e pop %esi <== NOT EXECUTED
1423b0: 5f pop %edi <== NOT EXECUTED
1423b1: c9 leave <== NOT EXECUTED
1423b2: c3 ret <== NOT EXECUTED
1423b3: 90 nop <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
1423b4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1423b7: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
1423ba: 50 push %eax <== NOT EXECUTED
1423bb: 56 push %esi <== NOT EXECUTED
1423bc: e8 af f6 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
1423c1: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
1423c3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1423c6: 85 c0 test %eax,%eax <== NOT EXECUTED
1423c8: 7e 36 jle 142400 <rtems_rfs_unlink+0x160><== NOT EXECUTED
1423ca: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
1423cc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1423cf: 57 push %edi <== NOT EXECUTED
1423d0: 56 push %esi <== NOT EXECUTED
1423d1: e8 9a f6 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
1423d6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
1423d9: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1423db: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1423de: 5b pop %ebx <== NOT EXECUTED
1423df: 5e pop %esi <== NOT EXECUTED
1423e0: 5f pop %edi <== NOT EXECUTED
1423e1: c9 leave <== NOT EXECUTED
1423e2: c3 ret <== NOT EXECUTED
1423e3: 90 nop <== NOT EXECUTED
printf ("rtems-rfs: link is a directory\n");
rtems_rfs_inode_close (fs, &target_inode);
return EISDIR;
case rtems_rfs_unlink_dir_if_empty:
rc = rtems_rfs_dir_empty (fs, &target_inode);
1423e4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1423e7: 57 push %edi <== NOT EXECUTED
1423e8: 56 push %esi <== NOT EXECUTED
1423e9: e8 3a cc ff ff call 13f028 <rtems_rfs_dir_empty> <== NOT EXECUTED
1423ee: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
1423f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1423f3: 85 c0 test %eax,%eax <== NOT EXECUTED
1423f5: 0f 8e 13 ff ff ff jle 14230e <rtems_rfs_unlink+0x6e> <== NOT EXECUTED
1423fb: eb cf jmp 1423cc <rtems_rfs_unlink+0x12c><== NOT EXECUTED
1423fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
142400: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
142403: 57 push %edi <== NOT EXECUTED
142404: 56 push %esi <== NOT EXECUTED
142405: e8 66 f6 ff ff call 141a70 <rtems_rfs_inode_close> <== NOT EXECUTED
14240a: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
rc, strerror (rc));
return rc;
14240c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
14240f: e9 e3 fe ff ff jmp 1422f7 <rtems_rfs_unlink+0x57> <== NOT EXECUTED
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
142414: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
142417: 57 push %edi <== NOT EXECUTED
142418: 56 push %esi <== NOT EXECUTED
142419: e8 8a f7 ff ff call 141ba8 <rtems_rfs_inode_delete><== NOT EXECUTED
14241e: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc > 0)
142420: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
142423: 85 c0 test %eax,%eax <== NOT EXECUTED
142425: 0f 8f 65 ff ff ff jg 142390 <rtems_rfs_unlink+0xf0> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
if (dir)
14242b: 80 7d 97 00 cmpb $0x0,-0x69(%ebp) <== NOT EXECUTED
14242f: 0f 84 44 ff ff ff je 142379 <rtems_rfs_unlink+0xd9> <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
142435: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
142438: 0f b6 0a movzbl (%edx),%ecx <== NOT EXECUTED
14243b: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
14243e: 0f b6 42 01 movzbl 0x1(%edx),%eax <== NOT EXECUTED
142442: 09 c8 or %ecx,%eax <== NOT EXECUTED
if (links == 0xffff)
142444: 66 83 f8 ff cmp $0xffffffff,%ax <== NOT EXECUTED
142448: 74 1e je 142468 <rtems_rfs_unlink+0x1c8><== NOT EXECUTED
{
links = rtems_rfs_inode_get_links (&parent_inode);
if (links > 1)
14244a: 66 83 f8 01 cmp $0x1,%ax <== NOT EXECUTED
14244e: 76 1e jbe 14246e <rtems_rfs_unlink+0x1ce><== NOT EXECUTED
links--;
142450: 48 dec %eax <== NOT EXECUTED
142451: 89 c1 mov %eax,%ecx <== NOT EXECUTED
142453: 66 c1 e9 08 shr $0x8,%cx <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
142457: 88 0a mov %cl,(%edx) <== NOT EXECUTED
142459: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
14245c: 88 42 01 mov %al,0x1(%edx) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
14245f: c6 45 d0 01 movb $0x1,-0x30(%ebp) <== NOT EXECUTED
142463: e9 11 ff ff ff jmp 142379 <rtems_rfs_unlink+0xd9> <== NOT EXECUTED
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
142468: 31 c0 xor %eax,%eax <== NOT EXECUTED
14246a: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
14246c: eb e9 jmp 142457 <rtems_rfs_unlink+0x1b7><== NOT EXECUTED
}
if (dir)
{
links = rtems_rfs_inode_get_links (&parent_inode);
if (links > 1)
14246e: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
142470: eb e5 jmp 142457 <rtems_rfs_unlink+0x1b7><== NOT EXECUTED
0010ba6c <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
10ba6c: 55 push %ebp
10ba6d: 89 e5 mov %esp,%ebp
10ba6f: 57 push %edi
10ba70: 56 push %esi
10ba71: 53 push %ebx
10ba72: 83 ec 3c sub $0x3c,%esp
10ba75: 8b 75 08 mov 0x8(%ebp),%esi
10ba78: 8b 5d 10 mov 0x10(%ebp),%ebx
10ba7b: 8b 7d 18 mov 0x18(%ebp),%edi
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
10ba7e: 85 f6 test %esi,%esi
10ba80: 74 4a je 10bacc <rtems_semaphore_create+0x60>
return RTEMS_INVALID_NAME;
if ( !id )
10ba82: 85 ff test %edi,%edi
10ba84: 0f 84 f6 00 00 00 je 10bb80 <rtems_semaphore_create+0x114>
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
10ba8a: 89 da mov %ebx,%edx
10ba8c: 81 e2 c0 00 00 00 and $0xc0,%edx
10ba92: 74 48 je 10badc <rtems_semaphore_create+0x70>
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
10ba94: 89 d8 mov %ebx,%eax
10ba96: 83 e0 30 and $0x30,%eax
10ba99: 83 f8 10 cmp $0x10,%eax
10ba9c: 74 0e je 10baac <rtems_semaphore_create+0x40>
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
10ba9e: b8 0b 00 00 00 mov $0xb,%eax
}
10baa3: 8d 65 f4 lea -0xc(%ebp),%esp
10baa6: 5b pop %ebx
10baa7: 5e pop %esi
10baa8: 5f pop %edi
10baa9: c9 leave
10baaa: c3 ret
10baab: 90 nop
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
10baac: f6 c3 04 test $0x4,%bl
10baaf: 74 ed je 10ba9e <rtems_semaphore_create+0x32>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
10bab1: 81 fa c0 00 00 00 cmp $0xc0,%edx
10bab7: 74 e5 je 10ba9e <rtems_semaphore_create+0x32>
10bab9: b9 10 00 00 00 mov $0x10,%ecx
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
10babe: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10bac2: 76 1f jbe 10bae3 <rtems_semaphore_create+0x77>
10bac4: b8 0a 00 00 00 mov $0xa,%eax
10bac9: eb d8 jmp 10baa3 <rtems_semaphore_create+0x37>
10bacb: 90 nop
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
10bacc: b8 03 00 00 00 mov $0x3,%eax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10bad1: 8d 65 f4 lea -0xc(%ebp),%esp
10bad4: 5b pop %ebx
10bad5: 5e pop %esi
10bad6: 5f pop %edi
10bad7: c9 leave
10bad8: c3 ret
10bad9: 8d 76 00 lea 0x0(%esi),%esi
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
10badc: 89 d9 mov %ebx,%ecx
10bade: 83 e1 30 and $0x30,%ecx
10bae1: 75 db jne 10babe <rtems_semaphore_create+0x52>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10bae3: a1 f8 93 12 00 mov 0x1293f8,%eax
10bae8: 40 inc %eax
10bae9: a3 f8 93 12 00 mov %eax,0x1293f8
* This function allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.
*/
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
{
return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
10baee: 83 ec 0c sub $0xc,%esp
10baf1: 68 40 93 12 00 push $0x129340
10baf6: 89 4d c4 mov %ecx,-0x3c(%ebp)
10baf9: e8 4a 14 00 00 call 10cf48 <_Objects_Allocate>
10bafe: 89 c2 mov %eax,%edx
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
10bb00: 83 c4 10 add $0x10,%esp
10bb03: 85 c0 test %eax,%eax
10bb05: 8b 4d c4 mov -0x3c(%ebp),%ecx
10bb08: 0f 84 ba 00 00 00 je 10bbc8 <rtems_semaphore_create+0x15c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
10bb0e: 89 58 10 mov %ebx,0x10(%eax)
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
10bb11: 85 c9 test %ecx,%ecx
10bb13: 74 77 je 10bb8c <rtems_semaphore_create+0x120>
/*
* It is either simple binary semaphore or a more powerful mutex
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
10bb15: 31 c0 xor %eax,%eax
10bb17: f6 c3 04 test $0x4,%bl
10bb1a: 0f 95 c0 setne %al
10bb1d: 89 45 d8 mov %eax,-0x28(%ebp)
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
10bb20: 83 f9 10 cmp $0x10,%ecx
10bb23: 0f 84 ae 00 00 00 je 10bbd7 <rtems_semaphore_create+0x16b>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
10bb29: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp)
the_mutex_attr.only_owner_release = false;
10bb30: c6 45 d4 00 movb $0x0,-0x2c(%ebp)
}
mutex_status = _CORE_mutex_Initialize(
10bb34: 50 push %eax
10bb35: 31 c0 xor %eax,%eax
10bb37: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10bb3b: 0f 94 c0 sete %al
10bb3e: 50 push %eax
10bb3f: 8d 45 d0 lea -0x30(%ebp),%eax
10bb42: 50 push %eax
10bb43: 8d 42 14 lea 0x14(%edx),%eax
10bb46: 50 push %eax
10bb47: 89 55 c4 mov %edx,-0x3c(%ebp)
10bb4a: e8 09 0c 00 00 call 10c758 <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attr,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
10bb4f: 83 c4 10 add $0x10,%esp
10bb52: 83 f8 06 cmp $0x6,%eax
10bb55: 8b 55 c4 mov -0x3c(%ebp),%edx
10bb58: 0f 84 a9 00 00 00 je 10bc07 <rtems_semaphore_create+0x19b><== NEVER TAKEN
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bb5e: 8b 42 08 mov 0x8(%edx),%eax
10bb61: 0f b7 d8 movzwl %ax,%ebx
10bb64: 8b 0d 5c 93 12 00 mov 0x12935c,%ecx
10bb6a: 89 14 99 mov %edx,(%ecx,%ebx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10bb6d: 89 72 0c mov %esi,0xc(%edx)
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
10bb70: 89 07 mov %eax,(%edi)
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
10bb72: e8 f5 20 00 00 call 10dc6c <_Thread_Enable_dispatch>
10bb77: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10bb79: e9 25 ff ff ff jmp 10baa3 <rtems_semaphore_create+0x37>
10bb7e: 66 90 xchg %ax,%ax
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
10bb80: b8 09 00 00 00 mov $0x9,%eax
10bb85: e9 19 ff ff ff jmp 10baa3 <rtems_semaphore_create+0x37>
10bb8a: 66 90 xchg %ax,%ax
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
10bb8c: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
10bb93: 31 c0 xor %eax,%eax
10bb95: f6 c3 04 test $0x4,%bl
10bb98: 0f 95 c0 setne %al
10bb9b: 89 45 e4 mov %eax,-0x1c(%ebp)
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10bb9e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
10bba5: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
_CORE_semaphore_Initialize(
10bbac: 51 push %ecx
10bbad: ff 75 0c pushl 0xc(%ebp)
10bbb0: 8d 45 e0 lea -0x20(%ebp),%eax
10bbb3: 50 push %eax
10bbb4: 8d 42 14 lea 0x14(%edx),%eax
10bbb7: 50 push %eax
10bbb8: 89 55 c4 mov %edx,-0x3c(%ebp)
10bbbb: e8 3c 0e 00 00 call 10c9fc <_CORE_semaphore_Initialize>
10bbc0: 83 c4 10 add $0x10,%esp
10bbc3: 8b 55 c4 mov -0x3c(%ebp),%edx
10bbc6: eb 96 jmp 10bb5e <rtems_semaphore_create+0xf2>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
10bbc8: e8 9f 20 00 00 call 10dc6c <_Thread_Enable_dispatch>
10bbcd: b8 05 00 00 00 mov $0x5,%eax
return RTEMS_TOO_MANY;
10bbd2: e9 cc fe ff ff jmp 10baa3 <rtems_semaphore_create+0x37>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
10bbd7: 8b 45 14 mov 0x14(%ebp),%eax
10bbda: 89 45 dc mov %eax,-0x24(%ebp)
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10bbdd: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
the_mutex_attr.only_owner_release = false;
10bbe4: c6 45 d4 00 movb $0x0,-0x2c(%ebp)
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
10bbe8: 83 7d d8 01 cmpl $0x1,-0x28(%ebp)
10bbec: 0f 85 42 ff ff ff jne 10bb34 <rtems_semaphore_create+0xc8>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
10bbf2: f6 c3 40 test $0x40,%bl
10bbf5: 74 30 je 10bc27 <rtems_semaphore_create+0x1bb>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
10bbf7: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp)
the_mutex_attr.only_owner_release = true;
10bbfe: c6 45 d4 01 movb $0x1,-0x2c(%ebp)
10bc02: e9 2d ff ff ff jmp 10bb34 <rtems_semaphore_create+0xc8>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
10bc07: 83 ec 08 sub $0x8,%esp
10bc0a: 52 push %edx
10bc0b: 68 40 93 12 00 push $0x129340
10bc10: e8 b3 16 00 00 call 10d2c8 <_Objects_Free>
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
10bc15: e8 52 20 00 00 call 10dc6c <_Thread_Enable_dispatch>
10bc1a: b8 13 00 00 00 mov $0x13,%eax
return RTEMS_INVALID_PRIORITY;
10bc1f: 83 c4 10 add $0x10,%esp
10bc22: e9 7c fe ff ff jmp 10baa3 <rtems_semaphore_create+0x37>
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
the_mutex_attr.only_owner_release = true;
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
10bc27: 84 db test %bl,%bl
10bc29: 0f 89 05 ff ff ff jns 10bb34 <rtems_semaphore_create+0xc8>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
10bc2f: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp)
the_mutex_attr.only_owner_release = true;
10bc36: c6 45 d4 01 movb $0x1,-0x2c(%ebp)
10bc3a: e9 f5 fe ff ff jmp 10bb34 <rtems_semaphore_create+0xc8>
0010bc40 <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
10bc40: 55 push %ebp
10bc41: 89 e5 mov %esp,%ebp
10bc43: 53 push %ebx
10bc44: 83 ec 18 sub $0x18,%esp
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
10bc47: 8d 45 f4 lea -0xc(%ebp),%eax
10bc4a: 50 push %eax
10bc4b: ff 75 08 pushl 0x8(%ebp)
10bc4e: 68 40 93 12 00 push $0x129340
10bc53: e8 a0 17 00 00 call 10d3f8 <_Objects_Get>
10bc58: 89 c3 mov %eax,%ebx
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
10bc5a: 83 c4 10 add $0x10,%esp
10bc5d: 8b 4d f4 mov -0xc(%ebp),%ecx
10bc60: 85 c9 test %ecx,%ecx
10bc62: 74 0c je 10bc70 <rtems_semaphore_delete+0x30>
10bc64: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bc69: 8b 5d fc mov -0x4(%ebp),%ebx
10bc6c: c9 leave
10bc6d: c3 ret
10bc6e: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
10bc70: 8b 40 10 mov 0x10(%eax),%eax
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10bc73: 83 e0 30 and $0x30,%eax
10bc76: 74 58 je 10bcd0 <rtems_semaphore_delete+0x90>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
10bc78: 8b 53 64 mov 0x64(%ebx),%edx
10bc7b: 85 d2 test %edx,%edx
10bc7d: 75 15 jne 10bc94 <rtems_semaphore_delete+0x54>
10bc7f: 83 f8 20 cmp $0x20,%eax
10bc82: 74 10 je 10bc94 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
10bc84: e8 e3 1f 00 00 call 10dc6c <_Thread_Enable_dispatch>
10bc89: b8 0c 00 00 00 mov $0xc,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bc8e: 8b 5d fc mov -0x4(%ebp),%ebx
10bc91: c9 leave
10bc92: c3 ret
10bc93: 90 nop
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
10bc94: 50 push %eax
10bc95: 6a 04 push $0x4
10bc97: 6a 00 push $0x0
10bc99: 8d 43 14 lea 0x14(%ebx),%eax
10bc9c: 50 push %eax
10bc9d: e8 aa 0a 00 00 call 10c74c <_CORE_mutex_Flush>
10bca2: 83 c4 10 add $0x10,%esp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
10bca5: 83 ec 08 sub $0x8,%esp
10bca8: 53 push %ebx
10bca9: 68 40 93 12 00 push $0x129340
10bcae: e8 11 13 00 00 call 10cfc4 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
10bcb3: 58 pop %eax
10bcb4: 5a pop %edx
10bcb5: 53 push %ebx
10bcb6: 68 40 93 12 00 push $0x129340
10bcbb: e8 08 16 00 00 call 10d2c8 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
10bcc0: e8 a7 1f 00 00 call 10dc6c <_Thread_Enable_dispatch>
10bcc5: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10bcc7: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bcca: 8b 5d fc mov -0x4(%ebp),%ebx
10bccd: c9 leave
10bcce: c3 ret
10bccf: 90 nop
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
10bcd0: 51 push %ecx
10bcd1: 6a 02 push $0x2
10bcd3: 6a 00 push $0x0
10bcd5: 8d 43 14 lea 0x14(%ebx),%eax
10bcd8: 50 push %eax
10bcd9: e8 12 0d 00 00 call 10c9f0 <_CORE_semaphore_Flush>
10bcde: 83 c4 10 add $0x10,%esp
10bce1: eb c2 jmp 10bca5 <rtems_semaphore_delete+0x65>
0010bce4 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
10bce4: 55 push %ebp
10bce5: 89 e5 mov %esp,%ebp
10bce7: 57 push %edi
10bce8: 56 push %esi
10bce9: 53 push %ebx
10bcea: 83 ec 1c sub $0x1c,%esp
10bced: 8b 5d 08 mov 0x8(%ebp),%ebx
10bcf0: 8b 75 0c mov 0xc(%ebp),%esi
10bcf3: 8b 7d 10 mov 0x10(%ebp),%edi
Objects_Id id,
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
10bcf6: 8d 45 e0 lea -0x20(%ebp),%eax
10bcf9: 50 push %eax
10bcfa: 8d 45 e4 lea -0x1c(%ebp),%eax
10bcfd: 50 push %eax
10bcfe: 53 push %ebx
10bcff: 68 40 93 12 00 push $0x129340
10bd04: e8 97 16 00 00 call 10d3a0 <_Objects_Get_isr_disable>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
10bd09: 83 c4 10 add $0x10,%esp
10bd0c: 8b 4d e4 mov -0x1c(%ebp),%ecx
10bd0f: 85 c9 test %ecx,%ecx
10bd11: 74 0d je 10bd20 <rtems_semaphore_obtain+0x3c>
10bd13: b8 04 00 00 00 mov $0x4,%eax
break;
}
return RTEMS_INVALID_ID;
}
10bd18: 8d 65 f4 lea -0xc(%ebp),%esp
10bd1b: 5b pop %ebx
10bd1c: 5e pop %esi
10bd1d: 5f pop %edi
10bd1e: c9 leave
10bd1f: c3 ret
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10bd20: f6 40 10 30 testb $0x30,0x10(%eax)
10bd24: 74 36 je 10bd5c <rtems_semaphore_obtain+0x78>
_CORE_mutex_Seize(
10bd26: 83 ec 0c sub $0xc,%esp
10bd29: ff 75 e0 pushl -0x20(%ebp)
10bd2c: 57 push %edi
10bd2d: 83 e6 01 and $0x1,%esi
10bd30: 83 f6 01 xor $0x1,%esi
10bd33: 56 push %esi
10bd34: 53 push %ebx
10bd35: 83 c0 14 add $0x14,%eax
10bd38: 50 push %eax
10bd39: e8 12 0b 00 00 call 10c850 <_CORE_mutex_Seize>
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
10bd3e: 83 c4 14 add $0x14,%esp
10bd41: a1 b8 94 12 00 mov 0x1294b8,%eax
10bd46: ff 70 34 pushl 0x34(%eax)
10bd49: e8 12 01 00 00 call 10be60 <_Semaphore_Translate_core_mutex_return_code>
10bd4e: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10bd51: 8d 65 f4 lea -0xc(%ebp),%esp
10bd54: 5b pop %ebx
10bd55: 5e pop %esi
10bd56: 5f pop %edi
10bd57: c9 leave
10bd58: c3 ret
10bd59: 8d 76 00 lea 0x0(%esi),%esi
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
10bd5c: 8b 15 b8 94 12 00 mov 0x1294b8,%edx
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10bd62: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ( the_semaphore->count != 0 ) {
10bd69: 8b 48 5c mov 0x5c(%eax),%ecx
10bd6c: 85 c9 test %ecx,%ecx
10bd6e: 75 2c jne 10bd9c <rtems_semaphore_obtain+0xb8>
the_semaphore->count -= 1;
_ISR_Enable( *level_p );
return;
}
if ( !wait ) {
10bd70: 83 e6 01 and $0x1,%esi
10bd73: 74 33 je 10bda8 <rtems_semaphore_obtain+0xc4>
_ISR_Enable( *level_p );
10bd75: ff 75 e0 pushl -0x20(%ebp)
10bd78: 9d popf
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
10bd79: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx)
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
10bd80: 83 ec 0c sub $0xc,%esp
10bd83: a1 b8 94 12 00 mov 0x1294b8,%eax
10bd88: ff 70 34 pushl 0x34(%eax)
10bd8b: e8 e0 00 00 00 call 10be70 <_Semaphore_Translate_core_semaphore_return_code>
10bd90: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10bd93: 8d 65 f4 lea -0xc(%ebp),%esp
10bd96: 5b pop %ebx
10bd97: 5e pop %esi
10bd98: 5f pop %edi
10bd99: c9 leave
10bd9a: c3 ret
10bd9b: 90 nop
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
10bd9c: 49 dec %ecx
10bd9d: 89 48 5c mov %ecx,0x5c(%eax)
_ISR_Enable( *level_p );
10bda0: ff 75 e0 pushl -0x20(%ebp)
10bda3: 9d popf
10bda4: eb da jmp 10bd80 <rtems_semaphore_obtain+0x9c>
10bda6: 66 90 xchg %ax,%ax
10bda8: 8b 0d f8 93 12 00 mov 0x1293f8,%ecx
10bdae: 41 inc %ecx
10bdaf: 89 0d f8 93 12 00 mov %ecx,0x1293f8
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;
10bdb5: c7 40 44 01 00 00 00 movl $0x1,0x44(%eax)
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
10bdbc: 83 c0 14 add $0x14,%eax
10bdbf: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
10bdc2: 89 5a 20 mov %ebx,0x20(%edx)
_ISR_Enable( *level_p );
10bdc5: ff 75 e0 pushl -0x20(%ebp)
10bdc8: 9d popf
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
10bdc9: 52 push %edx
10bdca: 68 b4 e4 10 00 push $0x10e4b4
10bdcf: 57 push %edi
10bdd0: 50 push %eax
10bdd1: e8 ce 23 00 00 call 10e1a4 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10bdd6: e8 91 1e 00 00 call 10dc6c <_Thread_Enable_dispatch>
10bddb: 83 c4 10 add $0x10,%esp
10bdde: eb a0 jmp 10bd80 <rtems_semaphore_obtain+0x9c>
0010bde0 <rtems_semaphore_release>:
#endif
rtems_status_code rtems_semaphore_release(
rtems_id id
)
{
10bde0: 55 push %ebp
10bde1: 89 e5 mov %esp,%ebp
10bde3: 53 push %ebx
10bde4: 83 ec 18 sub $0x18,%esp
10bde7: 8b 5d 08 mov 0x8(%ebp),%ebx
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
10bdea: 8d 45 f4 lea -0xc(%ebp),%eax
10bded: 50 push %eax
10bdee: 53 push %ebx
10bdef: 68 40 93 12 00 push $0x129340
10bdf4: e8 ff 15 00 00 call 10d3f8 <_Objects_Get>
Objects_Locations location;
CORE_mutex_Status mutex_status;
CORE_semaphore_Status semaphore_status;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
10bdf9: 83 c4 10 add $0x10,%esp
10bdfc: 8b 55 f4 mov -0xc(%ebp),%edx
10bdff: 85 d2 test %edx,%edx
10be01: 74 0d je 10be10 <rtems_semaphore_release+0x30>
10be03: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10be08: 8b 5d fc mov -0x4(%ebp),%ebx
10be0b: c9 leave
10be0c: c3 ret
10be0d: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10be10: f6 40 10 30 testb $0x30,0x10(%eax)
10be14: 75 26 jne 10be3c <rtems_semaphore_release+0x5c>
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
} else {
semaphore_status = _CORE_semaphore_Surrender(
10be16: 52 push %edx
10be17: 6a 00 push $0x0
10be19: 53 push %ebx
10be1a: 83 c0 14 add $0x14,%eax
10be1d: 50 push %eax
10be1e: e8 19 0c 00 00 call 10ca3c <_CORE_semaphore_Surrender>
10be23: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.semaphore,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10be25: e8 42 1e 00 00 call 10dc6c <_Thread_Enable_dispatch>
return
_Semaphore_Translate_core_semaphore_return_code( semaphore_status );
10be2a: 89 1c 24 mov %ebx,(%esp)
10be2d: e8 3e 00 00 00 call 10be70 <_Semaphore_Translate_core_semaphore_return_code>
&the_semaphore->Core_control.semaphore,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
return
10be32: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10be35: 8b 5d fc mov -0x4(%ebp),%ebx
10be38: c9 leave
10be39: c3 ret
10be3a: 66 90 xchg %ax,%ax
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
mutex_status = _CORE_mutex_Surrender(
10be3c: 51 push %ecx
10be3d: 6a 00 push $0x0
10be3f: 53 push %ebx
10be40: 83 c0 14 add $0x14,%eax
10be43: 50 push %eax
10be44: e8 a7 0a 00 00 call 10c8f0 <_CORE_mutex_Surrender>
10be49: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.mutex,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10be4b: e8 1c 1e 00 00 call 10dc6c <_Thread_Enable_dispatch>
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
10be50: 89 1c 24 mov %ebx,(%esp)
10be53: e8 08 00 00 00 call 10be60 <_Semaphore_Translate_core_mutex_return_code>
10be58: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10be5b: 8b 5d fc mov -0x4(%ebp),%ebx
10be5e: c9 leave
10be5f: c3 ret
00129514 <rtems_shell_debugrfs>:
printf (" -l: The debugger command list.\n");
}
int
rtems_shell_debugrfs (int argc, char *argv[])
{
129514: 55 push %ebp <== NOT EXECUTED
129515: 89 e5 mov %esp,%ebp <== NOT EXECUTED
129517: 57 push %edi <== NOT EXECUTED
129518: 56 push %esi <== NOT EXECUTED
129519: 53 push %ebx <== NOT EXECUTED
12951a: 81 ec bc 00 00 00 sub $0xbc,%esp <== NOT EXECUTED
"Display a block as a table for directory entrie, dir <bno>" },
{ "group", rtems_rfs_shell_group,
"Display the group data of a file system, group, group <group>, group <start> <end>" },
{ "inode", rtems_rfs_shell_inode,
"Display an inode, inode <ino>, inode> <ino>..<ino>" }
};
129520: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax <== NOT EXECUTED
129526: 89 85 44 ff ff ff mov %eax,-0xbc(%ebp) <== NOT EXECUTED
12952c: be 80 53 16 00 mov $0x165380,%esi <== NOT EXECUTED
129531: b9 0f 00 00 00 mov $0xf,%ecx <== NOT EXECUTED
129536: 89 c7 mov %eax,%edi <== NOT EXECUTED
129538: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
int arg;
int t;
for (arg = 1; arg < argc; arg++)
12953a: 83 7d 08 01 cmpl $0x1,0x8(%ebp) <== NOT EXECUTED
12953e: 0f 8e ec 00 00 00 jle 129630 <rtems_shell_debugrfs+0x11c><== NOT EXECUTED
{
if (argv[arg][0] != '-')
129544: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
129547: 8b 58 04 mov 0x4(%eax),%ebx <== NOT EXECUTED
12954a: 80 3b 2d cmpb $0x2d,(%ebx) <== NOT EXECUTED
12954d: 0f 84 01 01 00 00 je 129654 <rtems_shell_debugrfs+0x140><== NOT EXECUTED
printf ("error: unknown option: %s\n", argv[arg]);
return 1;
}
}
if ((argc - arg) < 2)
129553: 83 7d 08 02 cmpl $0x2,0x8(%ebp) <== NOT EXECUTED
129557: 0f 84 d3 00 00 00 je 129630 <rtems_shell_debugrfs+0x11c><== NOT EXECUTED
rtems_rfs_get_fs (const char* path, rtems_rfs_file_system** fs)
{
struct statvfs sb;
int rc;
rc = statvfs (path, &sb);
12955d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
129560: 8d 45 9c lea -0x64(%ebp),%eax <== NOT EXECUTED
129563: 50 push %eax <== NOT EXECUTED
129564: 53 push %ebx <== NOT EXECUTED
129565: e8 ba 68 00 00 call 12fe24 <statvfs> <== NOT EXECUTED
if (rc < 0)
12956a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12956d: 85 c0 test %eax,%eax <== NOT EXECUTED
12956f: 0f 88 fa 01 00 00 js 12976f <rtems_shell_debugrfs+0x25b><== NOT EXECUTED
printf ("error: cannot statvfs path: %s: (%d) %s\n",
path, errno, strerror (errno));
return -1;
}
if (sb.f_fsid != RTEMS_RFS_SB_MAGIC)
129575: 81 7d c8 01 20 09 28 cmpl $0x28092001,-0x38(%ebp) <== NOT EXECUTED
12957c: 0f 85 d2 01 00 00 jne 129754 <rtems_shell_debugrfs+0x240><== NOT EXECUTED
* Now find the path location on the file system. This will give the file
* system data.
*/
{
rtems_filesystem_location_info_t pathloc;
rc = rtems_filesystem_evaluate_path (path, strlen (path), 0, &pathloc, true);
129582: 31 c0 xor %eax,%eax <== NOT EXECUTED
129584: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
129589: 89 df mov %ebx,%edi <== NOT EXECUTED
12958b: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
12958d: f7 d1 not %ecx <== NOT EXECUTED
12958f: 49 dec %ecx <== NOT EXECUTED
129590: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129593: 6a 01 push $0x1 <== NOT EXECUTED
129595: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED
129598: 56 push %esi <== NOT EXECUTED
129599: 6a 00 push $0x0 <== NOT EXECUTED
12959b: 51 push %ecx <== NOT EXECUTED
12959c: 53 push %ebx <== NOT EXECUTED
12959d: e8 56 52 fe ff call 10e7f8 <rtems_filesystem_evaluate_path><== NOT EXECUTED
1295a2: 89 c3 mov %eax,%ebx <== NOT EXECUTED
*fs = rtems_rfs_rtems_pathloc_dev (&pathloc);
1295a4: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
1295a7: 8b 78 34 mov 0x34(%eax),%edi <== NOT EXECUTED
rtems_filesystem_freenode (&pathloc);
1295aa: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
1295ad: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1295b0: 85 c0 test %eax,%eax <== NOT EXECUTED
1295b2: 74 10 je 1295c4 <rtems_shell_debugrfs+0xb0><== NOT EXECUTED
1295b4: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
1295b7: 85 c0 test %eax,%eax <== NOT EXECUTED
1295b9: 74 09 je 1295c4 <rtems_shell_debugrfs+0xb0><== NOT EXECUTED
1295bb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1295be: 56 push %esi <== NOT EXECUTED
1295bf: ff d0 call *%eax <== NOT EXECUTED
1295c1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ((argc - arg) < 2)
printf ("error: you need at least a path and command, try %s -h\n", argv[0]);
else
{
rtems_rfs_file_system* fs;
if (rtems_rfs_get_fs (argv[arg], &fs) == 0)
1295c4: 85 db test %ebx,%ebx <== NOT EXECUTED
1295c6: 0f 85 c0 00 00 00 jne 12968c <rtems_shell_debugrfs+0x178><== NOT EXECUTED
1295cc: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
1295cf: 83 c0 08 add $0x8,%eax <== NOT EXECUTED
1295d2: 89 85 50 ff ff ff mov %eax,-0xb0(%ebp) <== NOT EXECUTED
1295d8: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
1295db: 8b 70 08 mov 0x8(%eax),%esi <== NOT EXECUTED
1295de: 8d 95 60 ff ff ff lea -0xa0(%ebp),%edx <== NOT EXECUTED
1295e4: 31 db xor %ebx,%ebx <== NOT EXECUTED
1295e6: 89 bd 54 ff ff ff mov %edi,-0xac(%ebp) <== NOT EXECUTED
1295ec: 89 df mov %ebx,%edi <== NOT EXECUTED
1295ee: 89 d3 mov %edx,%ebx <== NOT EXECUTED
{
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
if (strcmp (argv[arg + 1], table[t].name) == 0)
1295f0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1295f3: ff 33 pushl (%ebx) <== NOT EXECUTED
1295f5: 56 push %esi <== NOT EXECUTED
1295f6: e8 31 3e 02 00 call 14d42c <strcmp> <== NOT EXECUTED
1295fb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1295fe: 85 c0 test %eax,%eax <== NOT EXECUTED
129600: 0f 84 22 01 00 00 je 129728 <rtems_shell_debugrfs+0x214><== NOT EXECUTED
else
{
rtems_rfs_file_system* fs;
if (rtems_rfs_get_fs (argv[arg], &fs) == 0)
{
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
129606: 47 inc %edi <== NOT EXECUTED
129607: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED
12960a: 83 ff 05 cmp $0x5,%edi <== NOT EXECUTED
12960d: 75 e1 jne 1295f0 <rtems_shell_debugrfs+0xdc><== NOT EXECUTED
if (strcmp (argv[arg + 1], table[t].name) == 0)
return table[t].handler (fs, argc - 2, argv + 2);
printf ("error: command not found: %s\n", argv[arg + 1]);
12960f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
129612: 56 push %esi <== NOT EXECUTED
129613: 68 90 4c 16 00 push $0x164c90 <== NOT EXECUTED
129618: e8 87 24 02 00 call 14baa4 <printf> <== NOT EXECUTED
12961d: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
129622: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
return 1;
}
129625: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129628: 5b pop %ebx <== NOT EXECUTED
129629: 5e pop %esi <== NOT EXECUTED
12962a: 5f pop %edi <== NOT EXECUTED
12962b: c9 leave <== NOT EXECUTED
12962c: c3 ret <== NOT EXECUTED
12962d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return 1;
}
}
if ((argc - arg) < 2)
printf ("error: you need at least a path and command, try %s -h\n", argv[0]);
129630: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
129633: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
129636: ff 30 pushl (%eax) <== NOT EXECUTED
129638: 68 f0 50 16 00 push $0x1650f0 <== NOT EXECUTED
12963d: e8 62 24 02 00 call 14baa4 <printf> <== NOT EXECUTED
129642: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
129647: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("error: command not found: %s\n", argv[arg + 1]);
}
}
return 1;
}
12964a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12964d: 5b pop %ebx <== NOT EXECUTED
12964e: 5e pop %esi <== NOT EXECUTED
12964f: 5f pop %edi <== NOT EXECUTED
129650: c9 leave <== NOT EXECUTED
129651: c3 ret <== NOT EXECUTED
129652: 66 90 xchg %ax,%ax <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] != '-')
break;
switch (argv[arg][1])
129654: 8a 43 01 mov 0x1(%ebx),%al <== NOT EXECUTED
129657: 3c 68 cmp $0x68,%al <== NOT EXECUTED
129659: 74 1d je 129678 <rtems_shell_debugrfs+0x164><== NOT EXECUTED
12965b: 3c 6c cmp $0x6c,%al <== NOT EXECUTED
12965d: 74 3d je 12969c <rtems_shell_debugrfs+0x188><== NOT EXECUTED
printf ("%s: commands are:\n", argv[0]);
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
printf (" %s\t\t%s\n", table[t].name, table[t].help);
return 0;
default:
printf ("error: unknown option: %s\n", argv[arg]);
12965f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
129662: 53 push %ebx <== NOT EXECUTED
129663: 68 75 4c 16 00 push $0x164c75 <== NOT EXECUTED
129668: e8 37 24 02 00 call 14baa4 <printf> <== NOT EXECUTED
12966d: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
129672: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129675: eb ae jmp 129625 <rtems_shell_debugrfs+0x111><== NOT EXECUTED
129677: 90 nop <== NOT EXECUTED
break;
switch (argv[arg][1])
{
case 'h':
rtems_rfs_shell_usage (argv[0]);
129678: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12967b: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
12967e: ff 30 pushl (%eax) <== NOT EXECUTED
129680: e8 3f ee ff ff call 1284c4 <rtems_rfs_shell_usage> <== NOT EXECUTED
129685: 31 c0 xor %eax,%eax <== NOT EXECUTED
return 0;
129687: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12968a: eb 99 jmp 129625 <rtems_shell_debugrfs+0x111><== NOT EXECUTED
if ((argc - arg) < 2)
printf ("error: you need at least a path and command, try %s -h\n", argv[0]);
else
{
rtems_rfs_file_system* fs;
if (rtems_rfs_get_fs (argv[arg], &fs) == 0)
12968c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
printf ("error: command not found: %s\n", argv[arg + 1]);
}
}
return 1;
}
129691: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
129694: 5b pop %ebx <== NOT EXECUTED
129695: 5e pop %esi <== NOT EXECUTED
129696: 5f pop %edi <== NOT EXECUTED
129697: c9 leave <== NOT EXECUTED
129698: c3 ret <== NOT EXECUTED
129699: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
case 'h':
rtems_rfs_shell_usage (argv[0]);
return 0;
case 'l':
printf ("%s: commands are:\n", argv[0]);
12969c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12969f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
1296a2: ff 30 pushl (%eax) <== NOT EXECUTED
1296a4: 68 58 4c 16 00 push $0x164c58 <== NOT EXECUTED
1296a9: e8 f6 23 02 00 call 14baa4 <printf> <== NOT EXECUTED
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
printf (" %s\t\t%s\n", table[t].name, table[t].help);
1296ae: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1296b1: ff b5 68 ff ff ff pushl -0x98(%ebp) <== NOT EXECUTED
1296b7: ff b5 60 ff ff ff pushl -0xa0(%ebp) <== NOT EXECUTED
1296bd: 68 6b 4c 16 00 push $0x164c6b <== NOT EXECUTED
1296c2: e8 dd 23 02 00 call 14baa4 <printf> <== NOT EXECUTED
1296c7: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1296ca: ff b5 74 ff ff ff pushl -0x8c(%ebp) <== NOT EXECUTED
1296d0: ff b5 6c ff ff ff pushl -0x94(%ebp) <== NOT EXECUTED
1296d6: 68 6b 4c 16 00 push $0x164c6b <== NOT EXECUTED
1296db: e8 c4 23 02 00 call 14baa4 <printf> <== NOT EXECUTED
1296e0: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1296e3: ff 75 80 pushl -0x80(%ebp) <== NOT EXECUTED
1296e6: ff b5 78 ff ff ff pushl -0x88(%ebp) <== NOT EXECUTED
1296ec: 68 6b 4c 16 00 push $0x164c6b <== NOT EXECUTED
1296f1: e8 ae 23 02 00 call 14baa4 <printf> <== NOT EXECUTED
1296f6: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1296f9: ff 75 8c pushl -0x74(%ebp) <== NOT EXECUTED
1296fc: ff 75 84 pushl -0x7c(%ebp) <== NOT EXECUTED
1296ff: 68 6b 4c 16 00 push $0x164c6b <== NOT EXECUTED
129704: e8 9b 23 02 00 call 14baa4 <printf> <== NOT EXECUTED
129709: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
12970c: ff 75 98 pushl -0x68(%ebp) <== NOT EXECUTED
12970f: ff 75 90 pushl -0x70(%ebp) <== NOT EXECUTED
129712: 68 6b 4c 16 00 push $0x164c6b <== NOT EXECUTED
129717: e8 88 23 02 00 call 14baa4 <printf> <== NOT EXECUTED
12971c: 31 c0 xor %eax,%eax <== NOT EXECUTED
12971e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
129721: e9 ff fe ff ff jmp 129625 <rtems_shell_debugrfs+0x111><== NOT EXECUTED
129726: 66 90 xchg %ax,%ax <== NOT EXECUTED
129728: 89 fb mov %edi,%ebx <== NOT EXECUTED
12972a: 8b bd 54 ff ff ff mov -0xac(%ebp),%edi <== NOT EXECUTED
rtems_rfs_file_system* fs;
if (rtems_rfs_get_fs (argv[arg], &fs) == 0)
{
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
if (strcmp (argv[arg + 1], table[t].name) == 0)
return table[t].handler (fs, argc - 2, argv + 2);
129730: 52 push %edx <== NOT EXECUTED
129731: 8d 04 5b lea (%ebx,%ebx,2),%eax <== NOT EXECUTED
129734: ff b5 50 ff ff ff pushl -0xb0(%ebp) <== NOT EXECUTED
12973a: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
12973d: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED
129740: 52 push %edx <== NOT EXECUTED
129741: 57 push %edi <== NOT EXECUTED
129742: ff 94 85 64 ff ff ff call *-0x9c(%ebp,%eax,4) <== NOT EXECUTED
129749: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12974c: e9 d4 fe ff ff jmp 129625 <rtems_shell_debugrfs+0x111><== NOT EXECUTED
129751: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return -1;
}
if (sb.f_fsid != RTEMS_RFS_SB_MAGIC)
{
printf ("error: path '%s' is not on an RFS file system\n", path);
129754: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
129757: 53 push %ebx <== NOT EXECUTED
129758: 68 54 51 16 00 push $0x165154 <== NOT EXECUTED
12975d: e8 42 23 02 00 call 14baa4 <printf> <== NOT EXECUTED
129762: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
129767: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12976a: e9 b6 fe ff ff jmp 129625 <rtems_shell_debugrfs+0x111><== NOT EXECUTED
int rc;
rc = statvfs (path, &sb);
if (rc < 0)
{
printf ("error: cannot statvfs path: %s: (%d) %s\n",
12976f: e8 0c e4 01 00 call 147b80 <__errno> <== NOT EXECUTED
129774: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
129777: ff 30 pushl (%eax) <== NOT EXECUTED
129779: e8 ae 3d 02 00 call 14d52c <strerror> <== NOT EXECUTED
12977e: 89 c6 mov %eax,%esi <== NOT EXECUTED
129780: e8 fb e3 01 00 call 147b80 <__errno> <== NOT EXECUTED
129785: 56 push %esi <== NOT EXECUTED
129786: ff 30 pushl (%eax) <== NOT EXECUTED
129788: 53 push %ebx <== NOT EXECUTED
129789: 68 28 51 16 00 push $0x165128 <== NOT EXECUTED
12978e: e8 11 23 02 00 call 14baa4 <printf> <== NOT EXECUTED
129793: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
129798: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12979b: e9 85 fe ff ff jmp 129625 <rtems_shell_debugrfs+0x111><== NOT EXECUTED
0012852c <rtems_shell_rfs_format>:
return 1;
}
int
rtems_shell_rfs_format (int argc, char* argv[])
{
12852c: 55 push %ebp <== NOT EXECUTED
12852d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12852f: 57 push %edi <== NOT EXECUTED
128530: 56 push %esi <== NOT EXECUTED
128531: 53 push %ebx <== NOT EXECUTED
128532: 83 ec 4c sub $0x4c,%esp <== NOT EXECUTED
128535: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
128538: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED
12853b: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
12853e: b9 18 00 00 00 mov $0x18,%ecx <== NOT EXECUTED
128543: 31 c0 xor %eax,%eax <== NOT EXECUTED
128545: 8b 7d b4 mov -0x4c(%ebp),%edi <== NOT EXECUTED
128548: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
12854a: 83 7d 08 01 cmpl $0x1,0x8(%ebp) <== NOT EXECUTED
12854e: 0f 8e 99 01 00 00 jle 1286ed <rtems_shell_rfs_format+0x1c1><== NOT EXECUTED
128554: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
128559: 31 d2 xor %edx,%edx <== NOT EXECUTED
12855b: 89 df mov %ebx,%edi <== NOT EXECUTED
12855d: 89 d3 mov %edx,%ebx <== NOT EXECUTED
12855f: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
128562: eb 0f jmp 128573 <rtems_shell_rfs_format+0x47><== NOT EXECUTED
return 1;
}
}
else
{
if (!driver)
128564: 85 db test %ebx,%ebx <== NOT EXECUTED
128566: 0f 85 38 01 00 00 jne 1286a4 <rtems_shell_rfs_format+0x178><== NOT EXECUTED
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
for (arg = 1; arg < argc; arg++)
12856c: 46 inc %esi <== NOT EXECUTED
12856d: 39 f2 cmp %esi,%edx <== NOT EXECUTED
12856f: 7e 4b jle 1285bc <rtems_shell_rfs_format+0x90><== NOT EXECUTED
128571: 89 c3 mov %eax,%ebx <== NOT EXECUTED
{
if (argv[arg][0] == '-')
128573: 8b 04 b7 mov (%edi,%esi,4),%eax <== NOT EXECUTED
128576: 80 38 2d cmpb $0x2d,(%eax) <== NOT EXECUTED
128579: 75 e9 jne 128564 <rtems_shell_rfs_format+0x38><== NOT EXECUTED
{
switch (argv[arg][1])
12857b: 8a 48 01 mov 0x1(%eax),%cl <== NOT EXECUTED
12857e: 83 e9 49 sub $0x49,%ecx <== NOT EXECUTED
128581: 80 f9 2d cmp $0x2d,%cl <== NOT EXECUTED
128584: 76 1e jbe 1285a4 <rtems_shell_rfs_format+0x78><== NOT EXECUTED
}
config.inode_overhead = strtoul (argv[arg], 0, 0);
break;
default:
printf ("error: invalid option: %s\n", argv[arg]);
128586: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
128589: 50 push %eax <== NOT EXECUTED
12858a: 68 1d e3 15 00 push $0x15e31d <== NOT EXECUTED
12858f: e8 10 35 02 00 call 14baa4 <printf> <== NOT EXECUTED
128594: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
128599: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
driver, strerror (errno));
return 1;
}
return 0;
}
12859c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12859f: 5b pop %ebx <== NOT EXECUTED
1285a0: 5e pop %esi <== NOT EXECUTED
1285a1: 5f pop %edi <== NOT EXECUTED
1285a2: c9 leave <== NOT EXECUTED
1285a3: c3 ret <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
1285a4: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED
1285a7: ff 24 8d c0 52 16 00 jmp *0x1652c0(,%ecx,4) <== NOT EXECUTED
1285ae: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
case 'v':
config.verbose = true;
1285b0: c6 45 e5 01 movb $0x1,-0x1b(%ebp) <== NOT EXECUTED
1285b4: 89 d8 mov %ebx,%eax <== NOT EXECUTED
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
for (arg = 1; arg < argc; arg++)
1285b6: 46 inc %esi <== NOT EXECUTED
1285b7: 39 f2 cmp %esi,%edx <== NOT EXECUTED
1285b9: 7f b6 jg 128571 <rtems_shell_rfs_format+0x45><== NOT EXECUTED
1285bb: 90 nop <== NOT EXECUTED
1285bc: 89 c7 mov %eax,%edi <== NOT EXECUTED
return 1;
}
}
}
if (!driver) {
1285be: 85 c0 test %eax,%eax <== NOT EXECUTED
1285c0: 0f 84 27 01 00 00 je 1286ed <rtems_shell_rfs_format+0x1c1><== NOT EXECUTED
printf ("error: no driver name provided\n");
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
1285c6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1285c9: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED
1285cc: 50 push %eax <== NOT EXECUTED
1285cd: 57 push %edi <== NOT EXECUTED
1285ce: e8 15 7e 01 00 call 1403e8 <rtems_rfs_format> <== NOT EXECUTED
1285d3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1285d6: 85 c0 test %eax,%eax <== NOT EXECUTED
1285d8: 0f 88 e4 00 00 00 js 1286c2 <rtems_shell_rfs_format+0x196><== NOT EXECUTED
1285de: 31 c0 xor %eax,%eax <== NOT EXECUTED
driver, strerror (errno));
return 1;
}
return 0;
}
1285e0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1285e3: 5b pop %ebx <== NOT EXECUTED
1285e4: 5e pop %esi <== NOT EXECUTED
1285e5: 5f pop %edi <== NOT EXECUTED
1285e6: c9 leave <== NOT EXECUTED
1285e7: c3 ret <== NOT EXECUTED
case 'v':
config.verbose = true;
break;
case 's':
arg++;
1285e8: 46 inc %esi <== NOT EXECUTED
if (arg >= argc)
1285e9: 39 f2 cmp %esi,%edx <== NOT EXECUTED
1285eb: 0f 8e 30 01 00 00 jle 128721 <rtems_shell_rfs_format+0x1f5><== NOT EXECUTED
{
printf ("error: block size needs an argument\n");
return 1;
}
config.block_size = strtoul (argv[arg], 0, 0);
1285f1: 50 push %eax <== NOT EXECUTED
1285f2: 6a 00 push $0x0 <== NOT EXECUTED
1285f4: 6a 00 push $0x0 <== NOT EXECUTED
1285f6: ff 34 b7 pushl (%edi,%esi,4) <== NOT EXECUTED
1285f9: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED
1285fc: e8 73 69 02 00 call 14ef74 <strtoul> <== NOT EXECUTED
128601: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
128604: 89 d8 mov %ebx,%eax <== NOT EXECUTED
break;
128606: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128609: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
12860c: e9 5b ff ff ff jmp 12856c <rtems_shell_rfs_format+0x40><== NOT EXECUTED
128611: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case 'I':
config.initialise_inodes = true;
break;
case 'o':
arg++;
128614: 46 inc %esi <== NOT EXECUTED
if (arg >= argc)
128615: 39 f2 cmp %esi,%edx <== NOT EXECUTED
128617: 0f 8e 38 01 00 00 jle 128755 <rtems_shell_rfs_format+0x229><== NOT EXECUTED
{
printf ("error: inode percentage overhead needs an argument\n");
return 1;
}
config.inode_overhead = strtoul (argv[arg], 0, 0);
12861d: 51 push %ecx <== NOT EXECUTED
12861e: 6a 00 push $0x0 <== NOT EXECUTED
128620: 6a 00 push $0x0 <== NOT EXECUTED
128622: ff 34 b7 pushl (%edi,%esi,4) <== NOT EXECUTED
128625: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED
128628: e8 47 69 02 00 call 14ef74 <strtoul> <== NOT EXECUTED
12862d: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
128630: 89 d8 mov %ebx,%eax <== NOT EXECUTED
break;
128632: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128635: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
128638: e9 2f ff ff ff jmp 12856c <rtems_shell_rfs_format+0x40><== NOT EXECUTED
12863d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
config.group_blocks = strtoul (argv[arg], 0, 0);
break;
case 'i':
arg++;
128640: 46 inc %esi <== NOT EXECUTED
if (arg >= argc)
128641: 39 f2 cmp %esi,%edx <== NOT EXECUTED
128643: 0f 8e f2 00 00 00 jle 12873b <rtems_shell_rfs_format+0x20f><== NOT EXECUTED
{
printf ("error: group inode count needs an argument\n");
return 1;
}
config.group_inodes = strtoul (argv[arg], 0, 0);
128649: 50 push %eax <== NOT EXECUTED
12864a: 6a 00 push $0x0 <== NOT EXECUTED
12864c: 6a 00 push $0x0 <== NOT EXECUTED
12864e: ff 34 b7 pushl (%edi,%esi,4) <== NOT EXECUTED
128651: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED
128654: e8 1b 69 02 00 call 14ef74 <strtoul> <== NOT EXECUTED
128659: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED
12865c: 89 d8 mov %ebx,%eax <== NOT EXECUTED
break;
12865e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128661: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
128664: e9 03 ff ff ff jmp 12856c <rtems_shell_rfs_format+0x40><== NOT EXECUTED
128669: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
config.block_size = strtoul (argv[arg], 0, 0);
break;
case 'b':
arg++;
12866c: 46 inc %esi <== NOT EXECUTED
if (arg >= argc)
12866d: 39 f2 cmp %esi,%edx <== NOT EXECUTED
12866f: 0f 8e 92 00 00 00 jle 128707 <rtems_shell_rfs_format+0x1db><== NOT EXECUTED
{
printf ("error: group block count needs an argument\n");
return 1;
}
config.group_blocks = strtoul (argv[arg], 0, 0);
128675: 51 push %ecx <== NOT EXECUTED
128676: 6a 00 push $0x0 <== NOT EXECUTED
128678: 6a 00 push $0x0 <== NOT EXECUTED
12867a: ff 34 b7 pushl (%edi,%esi,4) <== NOT EXECUTED
12867d: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED
128680: e8 ef 68 02 00 call 14ef74 <strtoul> <== NOT EXECUTED
128685: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
128688: 89 d8 mov %ebx,%eax <== NOT EXECUTED
break;
12868a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12868d: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
128690: e9 d7 fe ff ff jmp 12856c <rtems_shell_rfs_format+0x40><== NOT EXECUTED
128695: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
config.group_inodes = strtoul (argv[arg], 0, 0);
break;
case 'I':
config.initialise_inodes = true;
128698: c6 45 e4 01 movb $0x1,-0x1c(%ebp) <== NOT EXECUTED
12869c: 89 d8 mov %ebx,%eax <== NOT EXECUTED
break;
12869e: e9 c9 fe ff ff jmp 12856c <rtems_shell_rfs_format+0x40><== NOT EXECUTED
1286a3: 90 nop <== NOT EXECUTED
{
if (!driver)
driver = argv[arg];
else
{
printf ("error: only one driver name allowed: %s\n", argv[arg]);
1286a4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1286a7: 50 push %eax <== NOT EXECUTED
1286a8: 68 78 ec 15 00 push $0x15ec78 <== NOT EXECUTED
1286ad: e8 f2 33 02 00 call 14baa4 <printf> <== NOT EXECUTED
1286b2: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
1286b7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
driver, strerror (errno));
return 1;
}
return 0;
}
1286ba: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1286bd: 5b pop %ebx <== NOT EXECUTED
1286be: 5e pop %esi <== NOT EXECUTED
1286bf: 5f pop %edi <== NOT EXECUTED
1286c0: c9 leave <== NOT EXECUTED
1286c1: c3 ret <== NOT EXECUTED
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
{
printf ("error: format of %s failed: %s\n",
1286c2: e8 b9 f4 01 00 call 147b80 <__errno> <== NOT EXECUTED
1286c7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1286ca: ff 30 pushl (%eax) <== NOT EXECUTED
1286cc: e8 5b 4e 02 00 call 14d52c <strerror> <== NOT EXECUTED
1286d1: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1286d4: 50 push %eax <== NOT EXECUTED
1286d5: 57 push %edi <== NOT EXECUTED
1286d6: 68 24 4e 16 00 push $0x164e24 <== NOT EXECUTED
1286db: e8 c4 33 02 00 call 14baa4 <printf> <== NOT EXECUTED
1286e0: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
driver, strerror (errno));
return 1;
1286e5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1286e8: e9 af fe ff ff jmp 12859c <rtems_shell_rfs_format+0x70><== NOT EXECUTED
}
}
}
if (!driver) {
printf ("error: no driver name provided\n");
1286ed: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1286f0: 68 04 4e 16 00 push $0x164e04 <== NOT EXECUTED
1286f5: e8 be 35 02 00 call 14bcb8 <puts> <== NOT EXECUTED
1286fa: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
1286ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128702: e9 95 fe ff ff jmp 12859c <rtems_shell_rfs_format+0x70><== NOT EXECUTED
case 'b':
arg++;
if (arg >= argc)
{
printf ("error: group block count needs an argument\n");
128707: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12870a: 68 78 4d 16 00 push $0x164d78 <== NOT EXECUTED
12870f: e8 a4 35 02 00 call 14bcb8 <puts> <== NOT EXECUTED
128714: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
128719: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12871c: e9 7b fe ff ff jmp 12859c <rtems_shell_rfs_format+0x70><== NOT EXECUTED
case 's':
arg++;
if (arg >= argc)
{
printf ("error: block size needs an argument\n");
128721: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
128724: 68 54 4d 16 00 push $0x164d54 <== NOT EXECUTED
128729: e8 8a 35 02 00 call 14bcb8 <puts> <== NOT EXECUTED
12872e: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
128733: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128736: e9 61 fe ff ff jmp 12859c <rtems_shell_rfs_format+0x70><== NOT EXECUTED
case 'i':
arg++;
if (arg >= argc)
{
printf ("error: group inode count needs an argument\n");
12873b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12873e: 68 a4 4d 16 00 push $0x164da4 <== NOT EXECUTED
128743: e8 70 35 02 00 call 14bcb8 <puts> <== NOT EXECUTED
128748: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
12874d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
128750: e9 47 fe ff ff jmp 12859c <rtems_shell_rfs_format+0x70><== NOT EXECUTED
case 'o':
arg++;
if (arg >= argc)
{
printf ("error: inode percentage overhead needs an argument\n");
128755: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
128758: 68 d0 4d 16 00 push $0x164dd0 <== NOT EXECUTED
12875d: e8 56 35 02 00 call 14bcb8 <puts> <== NOT EXECUTED
128762: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
return 1;
128767: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12876a: e9 2d fe ff ff jmp 12859c <rtems_shell_rfs_format+0x70><== NOT EXECUTED
0011866c <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
11866c: 55 push %ebp
11866d: 89 e5 mov %esp,%ebp
11866f: 53 push %ebx
118670: 83 ec 14 sub $0x14,%esp
118673: 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 )
118676: 85 db test %ebx,%ebx
118678: 75 0a jne 118684 <rtems_signal_send+0x18>
11867a: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11867f: 8b 5d fc mov -0x4(%ebp),%ebx
118682: c9 leave
118683: c3 ret
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
118684: 83 ec 08 sub $0x8,%esp
118687: 8d 45 f4 lea -0xc(%ebp),%eax
11868a: 50 push %eax
11868b: ff 75 08 pushl 0x8(%ebp)
11868e: e8 39 3c 00 00 call 11c2cc <_Thread_Get>
switch ( location ) {
118693: 83 c4 10 add $0x10,%esp
118696: 8b 55 f4 mov -0xc(%ebp),%edx
118699: 85 d2 test %edx,%edx
11869b: 74 0b je 1186a8 <rtems_signal_send+0x3c>
11869d: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1186a2: 8b 5d fc mov -0x4(%ebp),%ebx
1186a5: c9 leave
1186a6: c3 ret
1186a7: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
1186a8: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx
asr = &api->Signal;
1186ae: 8b 4a 0c mov 0xc(%edx),%ecx
1186b1: 85 c9 test %ecx,%ecx
1186b3: 74 43 je 1186f8 <rtems_signal_send+0x8c>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
1186b5: 80 7a 08 00 cmpb $0x0,0x8(%edx)
1186b9: 74 29 je 1186e4 <rtems_signal_send+0x78>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
1186bb: 9c pushf
1186bc: fa cli
1186bd: 59 pop %ecx
*signal_set |= signals;
1186be: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
1186c1: 51 push %ecx
1186c2: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
1186c3: c6 40 74 01 movb $0x1,0x74(%eax)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
1186c7: 8b 15 f4 43 14 00 mov 0x1443f4,%edx
1186cd: 85 d2 test %edx,%edx
1186cf: 74 1b je 1186ec <rtems_signal_send+0x80>
1186d1: 3b 05 18 44 14 00 cmp 0x144418,%eax
1186d7: 75 13 jne 1186ec <rtems_signal_send+0x80><== NEVER TAKEN
_ISR_Signals_to_thread_executing = true;
1186d9: c6 05 c8 44 14 00 01 movb $0x1,0x1444c8
1186e0: eb 0a jmp 1186ec <rtems_signal_send+0x80>
1186e2: 66 90 xchg %ax,%ax
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
1186e4: 9c pushf
1186e5: fa cli
1186e6: 58 pop %eax
*signal_set |= signals;
1186e7: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
1186ea: 50 push %eax
1186eb: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
1186ec: e8 8b 3b 00 00 call 11c27c <_Thread_Enable_dispatch>
1186f1: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1186f3: 8b 5d fc mov -0x4(%ebp),%ebx
1186f6: c9 leave
1186f7: c3 ret
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
1186f8: e8 7f 3b 00 00 call 11c27c <_Thread_Enable_dispatch>
1186fd: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_NOT_DEFINED;
118702: e9 78 ff ff ff jmp 11867f <rtems_signal_send+0x13>
0010cd48 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
10cd48: 55 push %ebp
10cd49: 89 e5 mov %esp,%ebp
10cd4b: 57 push %edi
10cd4c: 56 push %esi
10cd4d: 8b 45 08 mov 0x8(%ebp),%eax
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
10cd50: 8b 50 08 mov 0x8(%eax),%edx
10cd53: 85 d2 test %edx,%edx
10cd55: 74 15 je 10cd6c <rtems_stack_checker_begin_extension+0x24><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
10cd57: 8b b8 c8 00 00 00 mov 0xc8(%eax),%edi
10cd5d: 83 c7 08 add $0x8,%edi
10cd60: be c0 4d 17 00 mov $0x174dc0,%esi
10cd65: b9 04 00 00 00 mov $0x4,%ecx
10cd6a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
10cd6c: 5e pop %esi
10cd6d: 5f pop %edi
10cd6e: c9 leave
10cd6f: c3 ret
0010d160 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
10d160: 55 push %ebp
10d161: 89 e5 mov %esp,%ebp
10d163: 57 push %edi
10d164: 8b 7d 0c mov 0xc(%ebp),%edi
Stack_check_Initialize();
10d167: e8 94 ff ff ff call 10d100 <Stack_check_Initialize>
if (the_thread)
10d16c: 85 ff test %edi,%edi
10d16e: 74 12 je 10d182 <rtems_stack_checker_create_extension+0x22><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
10d170: 8b 8f c4 00 00 00 mov 0xc4(%edi),%ecx
10d176: 8b 97 c8 00 00 00 mov 0xc8(%edi),%edx
10d17c: b0 a5 mov $0xa5,%al
10d17e: 89 d7 mov %edx,%edi
10d180: f3 aa rep stos %al,%es:(%edi)
return true;
}
10d182: b0 01 mov $0x1,%al
10d184: 5f pop %edi
10d185: c9 leave
10d186: c3 ret
0010d030 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
10d030: 55 push %ebp
10d031: 89 e5 mov %esp,%ebp
10d033: 57 push %edi
10d034: 56 push %esi
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
10d035: a1 18 50 17 00 mov 0x175018,%eax
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
10d03a: 8b b0 c8 00 00 00 mov 0xc8(%eax),%esi
10d040: 39 f5 cmp %esi,%ebp
10d042: 73 48 jae 10d08c <rtems_stack_checker_is_blown+0x5c><== ALWAYS TAKEN
10d044: 31 c0 xor %eax,%eax
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
10d046: 8b 0d cc 20 17 00 mov 0x1720cc,%ecx
10d04c: 85 c9 test %ecx,%ecx
10d04e: 75 28 jne 10d078 <rtems_stack_checker_is_blown+0x48><== ALWAYS TAKEN
10d050: b2 01 mov $0x1,%dl <== NOT EXECUTED
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
10d052: 84 c0 test %al,%al
10d054: 74 04 je 10d05a <rtems_stack_checker_is_blown+0x2a><== NEVER TAKEN
10d056: 84 d2 test %dl,%dl
10d058: 75 42 jne 10d09c <rtems_stack_checker_is_blown+0x6c><== ALWAYS TAKEN
return false;
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
10d05a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10d05d: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
10d060: 52 push %edx <== NOT EXECUTED
10d061: ff 35 18 50 17 00 pushl 0x175018 <== NOT EXECUTED
10d067: e8 08 ff ff ff call 10cf74 <Stack_check_report_blown_task><== NOT EXECUTED
10d06c: b0 01 mov $0x1,%al <== NOT EXECUTED
return true;
10d06e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10d071: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10d074: 5e pop %esi <== NOT EXECUTED
10d075: 5f pop %edi <== NOT EXECUTED
10d076: c9 leave <== NOT EXECUTED
10d077: c3 ret <== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
pattern_ok = (!memcmp(
10d078: 83 c6 08 add $0x8,%esi
10d07b: bf c0 4d 17 00 mov $0x174dc0,%edi
10d080: b9 10 00 00 00 mov $0x10,%ecx
10d085: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10d087: 0f 94 c2 sete %dl
10d08a: eb c6 jmp 10d052 <rtems_stack_checker_is_blown+0x22>
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
10d08c: 8b 90 c4 00 00 00 mov 0xc4(%eax),%edx
10d092: 8d 04 16 lea (%esi,%edx,1),%eax
10d095: 39 c5 cmp %eax,%ebp
10d097: 0f 96 c0 setbe %al
10d09a: eb aa jmp 10d046 <rtems_stack_checker_is_blown+0x16>
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
10d09c: 31 c0 xor %eax,%eax
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
return true;
}
10d09e: 8d 65 f8 lea -0x8(%ebp),%esp
10d0a1: 5e pop %esi
10d0a2: 5f pop %edi
10d0a3: c9 leave
10d0a4: c3 ret
0010cf5c <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
10cf5c: 55 push %ebp <== NOT EXECUTED
10cf5d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10cf5f: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
10cf62: 68 c4 fa 10 00 push $0x10fac4 <== NOT EXECUTED
10cf67: 6a 00 push $0x0 <== NOT EXECUTED
10cf69: e8 8a ff ff ff call 10cef8 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
10cf6e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10cf71: c9 leave <== NOT EXECUTED
10cf72: c3 ret <== NOT EXECUTED
0010cef8 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10cef8: 55 push %ebp <== NOT EXECUTED
10cef9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10cefb: 56 push %esi <== NOT EXECUTED
10cefc: 53 push %ebx <== NOT EXECUTED
10cefd: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
10cf00: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
print_context = context;
10cf03: 89 35 d0 20 17 00 mov %esi,0x1720d0 <== NOT EXECUTED
print_handler = print;
10cf09: 89 1d d4 20 17 00 mov %ebx,0x1720d4 <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
10cf0f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10cf12: 68 78 09 16 00 push $0x160978 <== NOT EXECUTED
10cf17: 56 push %esi <== NOT EXECUTED
10cf18: ff d3 call *%ebx <== NOT EXECUTED
(*print)( context,
10cf1a: 58 pop %eax <== NOT EXECUTED
10cf1b: 5a pop %edx <== NOT EXECUTED
10cf1c: 68 f8 09 16 00 push $0x1609f8 <== NOT EXECUTED
10cf21: 56 push %esi <== NOT EXECUTED
10cf22: 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 );
10cf24: c7 04 24 a8 cd 10 00 movl $0x10cda8,(%esp) <== NOT EXECUTED
10cf2b: e8 30 77 00 00 call 114660 <rtems_iterate_over_all_threads><== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
10cf30: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED
10cf37: e8 6c fe ff ff call 10cda8 <Stack_check_Dump_threads_usage><== NOT EXECUTED
print_context = NULL;
10cf3c: c7 05 d0 20 17 00 00 movl $0x0,0x1720d0 <== NOT EXECUTED
10cf43: 00 00 00
print_handler = NULL;
10cf46: c7 05 d4 20 17 00 00 movl $0x0,0x1720d4 <== NOT EXECUTED
10cf4d: 00 00 00
10cf50: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10cf53: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10cf56: 5b pop %ebx <== NOT EXECUTED
10cf57: 5e pop %esi <== NOT EXECUTED
10cf58: c9 leave <== NOT EXECUTED
10cf59: c3 ret <== NOT EXECUTED
0010d0a8 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
10d0a8: 55 push %ebp
10d0a9: 89 e5 mov %esp,%ebp
10d0ab: 57 push %edi
10d0ac: 56 push %esi
10d0ad: 8b 45 08 mov 0x8(%ebp),%eax
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;
10d0b0: 8b 90 c8 00 00 00 mov 0xc8(%eax),%edx
10d0b6: 8d 72 08 lea 0x8(%edx),%esi
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
10d0b9: 39 d5 cmp %edx,%ebp
10d0bb: 72 0a jb 10d0c7 <rtems_stack_checker_switch_extension+0x1f><== NEVER TAKEN
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
Stack_Control *the_stack = &running->Start.Initial_stack;
10d0bd: 03 90 c4 00 00 00 add 0xc4(%eax),%edx
10d0c3: 39 d5 cmp %edx,%ebp
10d0c5: 76 21 jbe 10d0e8 <rtems_stack_checker_switch_extension+0x40><== ALWAYS TAKEN
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
10d0c7: bf c0 4d 17 00 mov $0x174dc0,%edi <== NOT EXECUTED
10d0cc: b9 10 00 00 00 mov $0x10,%ecx <== NOT EXECUTED
10d0d1: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED
10d0d3: 0f 94 c2 sete %dl <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
10d0d6: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
10d0d9: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
10d0dc: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
}
10d0df: 5e pop %esi <== NOT EXECUTED
10d0e0: 5f pop %edi <== NOT EXECUTED
10d0e1: 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 );
10d0e2: e9 8d fe ff ff jmp 10cf74 <Stack_check_report_blown_task><== NOT EXECUTED
10d0e7: 90 nop <== NOT EXECUTED
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
10d0e8: bf c0 4d 17 00 mov $0x174dc0,%edi
10d0ed: b9 10 00 00 00 mov $0x10,%ecx
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
10d0f2: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10d0f4: 74 06 je 10d0fc <rtems_stack_checker_switch_extension+0x54><== ALWAYS TAKEN
10d0f6: 31 d2 xor %edx,%edx <== NOT EXECUTED
10d0f8: eb dc jmp 10d0d6 <rtems_stack_checker_switch_extension+0x2e><== NOT EXECUTED
10d0fa: 66 90 xchg %ax,%ax <== NOT EXECUTED
Stack_check_report_blown_task( running, pattern_ok );
}
}
10d0fc: 5e pop %esi
10d0fd: 5f pop %edi
10d0fe: c9 leave
10d0ff: c3 ret
00110e50 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
110e50: 55 push %ebp
110e51: 89 e5 mov %esp,%ebp
110e53: 57 push %edi
110e54: 56 push %esi
110e55: 53 push %ebx
110e56: 83 ec 2c sub $0x2c,%esp
110e59: 8b 75 08 mov 0x8(%ebp),%esi
110e5c: 8b 5d 0c mov 0xc(%ebp),%ebx
110e5f: 8b 7d 10 mov 0x10(%ebp),%edi
double result;
char *end;
if ( !n )
110e62: 85 db test %ebx,%ebx
110e64: 0f 84 ae 00 00 00 je 110f18 <rtems_string_to_double+0xc8>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110e6a: e8 71 2c 00 00 call 113ae0 <__errno>
110e6f: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110e75: c7 03 00 00 00 00 movl $0x0,(%ebx)
110e7b: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtod( s, &end );
110e82: 83 ec 08 sub $0x8,%esp
110e85: 8d 45 e4 lea -0x1c(%ebp),%eax
110e88: 50 push %eax
110e89: 56 push %esi
110e8a: e8 dd 56 00 00 call 11656c <strtod>
if ( endptr )
110e8f: 83 c4 10 add $0x10,%esp
110e92: 85 ff test %edi,%edi
110e94: 74 05 je 110e9b <rtems_string_to_double+0x4b>
*endptr = end;
110e96: 8b 45 e4 mov -0x1c(%ebp),%eax
110e99: 89 07 mov %eax,(%edi)
if ( end == s )
110e9b: 39 75 e4 cmp %esi,-0x1c(%ebp)
110e9e: 74 68 je 110f08 <rtems_string_to_double+0xb8>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
110ea0: dd 5d c8 fstpl -0x38(%ebp)
110ea3: e8 38 2c 00 00 call 113ae0 <__errno>
110ea8: 83 38 22 cmpl $0x22,(%eax)
110eab: dd 45 c8 fldl -0x38(%ebp)
110eae: 74 0c je 110ebc <rtems_string_to_double+0x6c>
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
110eb0: dd 1b fstpl (%ebx)
110eb2: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
110eb4: 8d 65 f4 lea -0xc(%ebp),%esp
110eb7: 5b pop %ebx
110eb8: 5e pop %esi
110eb9: 5f pop %edi
110eba: c9 leave
110ebb: c3 ret
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
110ebc: d9 ee fldz
110ebe: d9 c9 fxch %st(1)
110ec0: dd e1 fucom %st(1)
110ec2: df e0 fnstsw %ax
110ec4: dd d9 fstp %st(1)
110ec6: 80 e4 45 and $0x45,%ah
110ec9: 80 fc 40 cmp $0x40,%ah
110ecc: 74 26 je 110ef4 <rtems_string_to_double+0xa4><== NEVER TAKEN
110ece: dd 05 30 5a 12 00 fldl 0x125a30
110ed4: d9 c9 fxch %st(1)
110ed6: dd e1 fucom %st(1)
110ed8: df e0 fnstsw %ax
110eda: dd d9 fstp %st(1)
110edc: f6 c4 45 test $0x45,%ah
110edf: 74 17 je 110ef8 <rtems_string_to_double+0xa8><== ALWAYS TAKEN
110ee1: dd 05 38 5a 12 00 fldl 0x125a38 <== NOT EXECUTED
110ee7: dd e9 fucomp %st(1) <== NOT EXECUTED
110ee9: df e0 fnstsw %ax <== NOT EXECUTED
110eeb: f6 c4 45 test $0x45,%ah <== NOT EXECUTED
110eee: 75 c0 jne 110eb0 <rtems_string_to_double+0x60><== NOT EXECUTED
110ef0: dd d8 fstp %st(0) <== NOT EXECUTED
110ef2: eb 06 jmp 110efa <rtems_string_to_double+0xaa><== NOT EXECUTED
110ef4: dd d8 fstp %st(0) <== NOT EXECUTED
110ef6: eb 02 jmp 110efa <rtems_string_to_double+0xaa><== NOT EXECUTED
110ef8: dd d8 fstp %st(0)
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
110efa: b8 0a 00 00 00 mov $0xa,%eax
}
110eff: 8d 65 f4 lea -0xc(%ebp),%esp
110f02: 5b pop %ebx
110f03: 5e pop %esi
110f04: 5f pop %edi
110f05: c9 leave
110f06: c3 ret
110f07: 90 nop
110f08: dd d8 fstp %st(0)
result = strtod( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
110f0a: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
110f0f: 8d 65 f4 lea -0xc(%ebp),%esp
110f12: 5b pop %ebx
110f13: 5e pop %esi
110f14: 5f pop %edi
110f15: c9 leave
110f16: c3 ret
110f17: 90 nop
)
{
double result;
char *end;
if ( !n )
110f18: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
110f1d: 8d 65 f4 lea -0xc(%ebp),%esp
110f20: 5b pop %ebx
110f21: 5e pop %esi
110f22: 5f pop %edi
110f23: c9 leave
110f24: c3 ret
00110f28 <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
110f28: 55 push %ebp
110f29: 89 e5 mov %esp,%ebp
110f2b: 57 push %edi
110f2c: 56 push %esi
110f2d: 53 push %ebx
110f2e: 83 ec 2c sub $0x2c,%esp
110f31: 8b 75 08 mov 0x8(%ebp),%esi
110f34: 8b 5d 0c mov 0xc(%ebp),%ebx
110f37: 8b 7d 10 mov 0x10(%ebp),%edi
float result;
char *end;
if ( !n )
110f3a: 85 db test %ebx,%ebx
110f3c: 0f 84 aa 00 00 00 je 110fec <rtems_string_to_float+0xc4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110f42: e8 99 2b 00 00 call 113ae0 <__errno>
110f47: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110f4d: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtof( s, &end );
110f53: 83 ec 08 sub $0x8,%esp
110f56: 8d 45 e4 lea -0x1c(%ebp),%eax
110f59: 50 push %eax
110f5a: 56 push %esi
110f5b: e8 c8 55 00 00 call 116528 <strtof>
if ( endptr )
110f60: 83 c4 10 add $0x10,%esp
110f63: 85 ff test %edi,%edi
110f65: 74 05 je 110f6c <rtems_string_to_float+0x44>
*endptr = end;
110f67: 8b 45 e4 mov -0x1c(%ebp),%eax
110f6a: 89 07 mov %eax,(%edi)
if ( end == s )
110f6c: 39 75 e4 cmp %esi,-0x1c(%ebp)
110f6f: 74 6b je 110fdc <rtems_string_to_float+0xb4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
110f71: d9 5d c8 fstps -0x38(%ebp)
110f74: e8 67 2b 00 00 call 113ae0 <__errno>
110f79: 83 38 22 cmpl $0x22,(%eax)
110f7c: d9 45 c8 flds -0x38(%ebp)
110f7f: 74 0f je 110f90 <rtems_string_to_float+0x68>
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
110f81: d9 1b fstps (%ebx)
110f83: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
110f85: 8d 65 f4 lea -0xc(%ebp),%esp
110f88: 5b pop %ebx
110f89: 5e pop %esi
110f8a: 5f pop %edi
110f8b: c9 leave
110f8c: c3 ret
110f8d: 8d 76 00 lea 0x0(%esi),%esi
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
110f90: d9 ee fldz
110f92: d9 c9 fxch %st(1)
110f94: dd e1 fucom %st(1)
110f96: df e0 fnstsw %ax
110f98: dd d9 fstp %st(1)
110f9a: 80 e4 45 and $0x45,%ah
110f9d: 80 fc 40 cmp $0x40,%ah
110fa0: 74 26 je 110fc8 <rtems_string_to_float+0xa0><== NEVER TAKEN
110fa2: d9 05 40 5a 12 00 flds 0x125a40
110fa8: d9 c9 fxch %st(1)
110faa: dd e1 fucom %st(1)
110fac: df e0 fnstsw %ax
110fae: dd d9 fstp %st(1)
110fb0: f6 c4 45 test $0x45,%ah
110fb3: 74 17 je 110fcc <rtems_string_to_float+0xa4><== ALWAYS TAKEN
110fb5: d9 05 44 5a 12 00 flds 0x125a44 <== NOT EXECUTED
110fbb: dd e9 fucomp %st(1) <== NOT EXECUTED
110fbd: df e0 fnstsw %ax <== NOT EXECUTED
110fbf: f6 c4 45 test $0x45,%ah <== NOT EXECUTED
110fc2: 75 bd jne 110f81 <rtems_string_to_float+0x59><== NOT EXECUTED
110fc4: dd d8 fstp %st(0) <== NOT EXECUTED
110fc6: eb 06 jmp 110fce <rtems_string_to_float+0xa6><== NOT EXECUTED
110fc8: dd d8 fstp %st(0) <== NOT EXECUTED
110fca: eb 02 jmp 110fce <rtems_string_to_float+0xa6><== NOT EXECUTED
110fcc: dd d8 fstp %st(0)
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
110fce: b8 0a 00 00 00 mov $0xa,%eax
}
110fd3: 8d 65 f4 lea -0xc(%ebp),%esp
110fd6: 5b pop %ebx
110fd7: 5e pop %esi
110fd8: 5f pop %edi
110fd9: c9 leave
110fda: c3 ret
110fdb: 90 nop
110fdc: dd d8 fstp %st(0)
result = strtof( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
110fde: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
110fe3: 8d 65 f4 lea -0xc(%ebp),%esp
110fe6: 5b pop %ebx
110fe7: 5e pop %esi
110fe8: 5f pop %edi
110fe9: c9 leave
110fea: c3 ret
110feb: 90 nop
)
{
float result;
char *end;
if ( !n )
110fec: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
110ff1: 8d 65 f4 lea -0xc(%ebp),%esp
110ff4: 5b pop %ebx
110ff5: 5e pop %esi
110ff6: 5f pop %edi
110ff7: c9 leave
110ff8: c3 ret
0012485c <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
12485c: 55 push %ebp
12485d: 89 e5 mov %esp,%ebp
12485f: 57 push %edi
124860: 56 push %esi
124861: 53 push %ebx
124862: 83 ec 2c sub $0x2c,%esp
124865: 8b 75 08 mov 0x8(%ebp),%esi
124868: 8b 5d 0c mov 0xc(%ebp),%ebx
12486b: 8b 7d 10 mov 0x10(%ebp),%edi
long result;
char *end;
if ( !n )
12486e: 85 db test %ebx,%ebx
124870: 0f 84 82 00 00 00 je 1248f8 <rtems_string_to_int+0x9c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
124876: e8 05 33 02 00 call 147b80 <__errno>
12487b: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
124881: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtol( s, &end, base );
124887: 50 push %eax
124888: ff 75 14 pushl 0x14(%ebp)
12488b: 8d 45 e4 lea -0x1c(%ebp),%eax
12488e: 50 push %eax
12488f: 56 push %esi
124890: e8 63 a2 02 00 call 14eaf8 <strtol>
124895: 89 c2 mov %eax,%edx
if ( endptr )
124897: 83 c4 10 add $0x10,%esp
12489a: 85 ff test %edi,%edi
12489c: 74 05 je 1248a3 <rtems_string_to_int+0x47>
*endptr = end;
12489e: 8b 45 e4 mov -0x1c(%ebp),%eax
1248a1: 89 07 mov %eax,(%edi)
if ( end == s )
1248a3: 39 75 e4 cmp %esi,-0x1c(%ebp)
1248a6: 74 40 je 1248e8 <rtems_string_to_int+0x8c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1248a8: 89 55 d4 mov %edx,-0x2c(%ebp)
1248ab: e8 d0 32 02 00 call 147b80 <__errno>
1248b0: 83 38 22 cmpl $0x22,(%eax)
1248b3: 8b 55 d4 mov -0x2c(%ebp),%edx
1248b6: 74 0c je 1248c4 <rtems_string_to_int+0x68>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
1248b8: 89 13 mov %edx,(%ebx)
1248ba: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
1248bc: 8d 65 f4 lea -0xc(%ebp),%esp
1248bf: 5b pop %ebx
1248c0: 5e pop %esi
1248c1: 5f pop %edi
1248c2: c9 leave
1248c3: c3 ret
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1248c4: 85 d2 test %edx,%edx
1248c6: 74 10 je 1248d8 <rtems_string_to_int+0x7c><== NEVER TAKEN
1248c8: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx
1248ce: 74 08 je 1248d8 <rtems_string_to_int+0x7c><== ALWAYS TAKEN
1248d0: 81 fa 00 00 00 80 cmp $0x80000000,%edx <== NOT EXECUTED
1248d6: 75 e0 jne 1248b8 <rtems_string_to_int+0x5c><== NOT EXECUTED
}
#endif
*n = result;
return RTEMS_SUCCESSFUL;
1248d8: b8 0a 00 00 00 mov $0xa,%eax
}
1248dd: 8d 65 f4 lea -0xc(%ebp),%esp
1248e0: 5b pop %ebx
1248e1: 5e pop %esi
1248e2: 5f pop %edi
1248e3: c9 leave
1248e4: c3 ret
1248e5: 8d 76 00 lea 0x0(%esi),%esi
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
1248e8: b8 0b 00 00 00 mov $0xb,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
1248ed: 8d 65 f4 lea -0xc(%ebp),%esp
1248f0: 5b pop %ebx
1248f1: 5e pop %esi
1248f2: 5f pop %edi
1248f3: c9 leave
1248f4: c3 ret
1248f5: 8d 76 00 lea 0x0(%esi),%esi
)
{
long result;
char *end;
if ( !n )
1248f8: b8 09 00 00 00 mov $0x9,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
1248fd: 8d 65 f4 lea -0xc(%ebp),%esp
124900: 5b pop %ebx
124901: 5e pop %esi
124902: 5f pop %edi
124903: c9 leave
124904: c3 ret
00111170 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
111170: 55 push %ebp
111171: 89 e5 mov %esp,%ebp
111173: 57 push %edi
111174: 56 push %esi
111175: 53 push %ebx
111176: 83 ec 2c sub $0x2c,%esp
111179: 8b 75 08 mov 0x8(%ebp),%esi
11117c: 8b 5d 0c mov 0xc(%ebp),%ebx
11117f: 8b 7d 10 mov 0x10(%ebp),%edi
long result;
char *end;
if ( !n )
111182: 85 db test %ebx,%ebx
111184: 0f 84 82 00 00 00 je 11120c <rtems_string_to_long+0x9c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
11118a: e8 51 29 00 00 call 113ae0 <__errno>
11118f: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
111195: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtol( s, &end, base );
11119b: 50 push %eax
11119c: ff 75 14 pushl 0x14(%ebp)
11119f: 8d 45 e4 lea -0x1c(%ebp),%eax
1111a2: 50 push %eax
1111a3: 56 push %esi
1111a4: e8 5f 55 00 00 call 116708 <strtol>
1111a9: 89 c2 mov %eax,%edx
if ( endptr )
1111ab: 83 c4 10 add $0x10,%esp
1111ae: 85 ff test %edi,%edi
1111b0: 74 05 je 1111b7 <rtems_string_to_long+0x47>
*endptr = end;
1111b2: 8b 45 e4 mov -0x1c(%ebp),%eax
1111b5: 89 07 mov %eax,(%edi)
if ( end == s )
1111b7: 39 75 e4 cmp %esi,-0x1c(%ebp)
1111ba: 74 40 je 1111fc <rtems_string_to_long+0x8c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1111bc: 89 55 d4 mov %edx,-0x2c(%ebp)
1111bf: e8 1c 29 00 00 call 113ae0 <__errno>
1111c4: 83 38 22 cmpl $0x22,(%eax)
1111c7: 8b 55 d4 mov -0x2c(%ebp),%edx
1111ca: 74 0c je 1111d8 <rtems_string_to_long+0x68>
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
1111cc: 89 13 mov %edx,(%ebx)
1111ce: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
1111d0: 8d 65 f4 lea -0xc(%ebp),%esp
1111d3: 5b pop %ebx
1111d4: 5e pop %esi
1111d5: 5f pop %edi
1111d6: c9 leave
1111d7: c3 ret
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1111d8: 85 d2 test %edx,%edx
1111da: 74 10 je 1111ec <rtems_string_to_long+0x7c><== NEVER TAKEN
1111dc: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx
1111e2: 74 08 je 1111ec <rtems_string_to_long+0x7c>
1111e4: 81 fa 00 00 00 80 cmp $0x80000000,%edx
1111ea: 75 e0 jne 1111cc <rtems_string_to_long+0x5c><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
1111ec: b8 0a 00 00 00 mov $0xa,%eax
}
1111f1: 8d 65 f4 lea -0xc(%ebp),%esp
1111f4: 5b pop %ebx
1111f5: 5e pop %esi
1111f6: 5f pop %edi
1111f7: c9 leave
1111f8: c3 ret
1111f9: 8d 76 00 lea 0x0(%esi),%esi
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
1111fc: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
111201: 8d 65 f4 lea -0xc(%ebp),%esp
111204: 5b pop %ebx
111205: 5e pop %esi
111206: 5f pop %edi
111207: c9 leave
111208: c3 ret
111209: 8d 76 00 lea 0x0(%esi),%esi
)
{
long result;
char *end;
if ( !n )
11120c: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
111211: 8d 65 f4 lea -0xc(%ebp),%esp
111214: 5b pop %ebx
111215: 5e pop %esi
111216: 5f pop %edi
111217: c9 leave
111218: c3 ret
001110a8 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
1110a8: 55 push %ebp
1110a9: 89 e5 mov %esp,%ebp
1110ab: 57 push %edi
1110ac: 56 push %esi
1110ad: 53 push %ebx
1110ae: 83 ec 2c sub $0x2c,%esp
1110b1: 8b 75 08 mov 0x8(%ebp),%esi
1110b4: 8b 5d 0c mov 0xc(%ebp),%ebx
long long result;
char *end;
if ( !n )
1110b7: 85 db test %ebx,%ebx
1110b9: 0f 84 a1 00 00 00 je 111160 <rtems_string_to_long_long+0xb8>
return RTEMS_INVALID_ADDRESS;
errno = 0;
1110bf: e8 1c 2a 00 00 call 113ae0 <__errno>
1110c4: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
1110ca: c7 03 00 00 00 00 movl $0x0,(%ebx)
1110d0: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtoll( s, &end, base );
1110d7: 52 push %edx
1110d8: ff 75 14 pushl 0x14(%ebp)
1110db: 8d 45 e4 lea -0x1c(%ebp),%eax
1110de: 50 push %eax
1110df: 56 push %esi
1110e0: e8 3f 56 00 00 call 116724 <strtoll>
1110e5: 89 c7 mov %eax,%edi
if ( endptr )
1110e7: 83 c4 10 add $0x10,%esp
1110ea: 8b 45 10 mov 0x10(%ebp),%eax
1110ed: 85 c0 test %eax,%eax
1110ef: 74 08 je 1110f9 <rtems_string_to_long_long+0x51>
*endptr = end;
1110f1: 8b 45 e4 mov -0x1c(%ebp),%eax
1110f4: 8b 4d 10 mov 0x10(%ebp),%ecx
1110f7: 89 01 mov %eax,(%ecx)
if ( end == s )
1110f9: 39 75 e4 cmp %esi,-0x1c(%ebp)
1110fc: 74 52 je 111150 <rtems_string_to_long_long+0xa8>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1110fe: 89 55 d4 mov %edx,-0x2c(%ebp)
111101: e8 da 29 00 00 call 113ae0 <__errno>
111106: 83 38 22 cmpl $0x22,(%eax)
111109: 8b 55 d4 mov -0x2c(%ebp),%edx
11110c: 74 12 je 111120 <rtems_string_to_long_long+0x78>
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
11110e: 89 3b mov %edi,(%ebx)
111110: 89 53 04 mov %edx,0x4(%ebx)
111113: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
111115: 8d 65 f4 lea -0xc(%ebp),%esp
111118: 5b pop %ebx
111119: 5e pop %esi
11111a: 5f pop %edi
11111b: c9 leave
11111c: c3 ret
11111d: 8d 76 00 lea 0x0(%esi),%esi
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111120: 89 d0 mov %edx,%eax
111122: 09 f8 or %edi,%eax
111124: 74 1a je 111140 <rtems_string_to_long_long+0x98><== NEVER TAKEN
111126: 89 d1 mov %edx,%ecx
111128: 81 f1 ff ff ff 7f xor $0x7fffffff,%ecx
11112e: 89 f8 mov %edi,%eax
111130: f7 d0 not %eax
111132: 09 c1 or %eax,%ecx
111134: 74 0a je 111140 <rtems_string_to_long_long+0x98>
111136: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax
11113c: 09 f8 or %edi,%eax
11113e: 75 ce jne 11110e <rtems_string_to_long_long+0x66><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
111140: b8 0a 00 00 00 mov $0xa,%eax
}
111145: 8d 65 f4 lea -0xc(%ebp),%esp
111148: 5b pop %ebx
111149: 5e pop %esi
11114a: 5f pop %edi
11114b: c9 leave
11114c: c3 ret
11114d: 8d 76 00 lea 0x0(%esi),%esi
result = strtoll( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
111150: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
111155: 8d 65 f4 lea -0xc(%ebp),%esp
111158: 5b pop %ebx
111159: 5e pop %esi
11115a: 5f pop %edi
11115b: c9 leave
11115c: c3 ret
11115d: 8d 76 00 lea 0x0(%esi),%esi
)
{
long long result;
char *end;
if ( !n )
111160: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
111165: 8d 65 f4 lea -0xc(%ebp),%esp
111168: 5b pop %ebx
111169: 5e pop %esi
11116a: 5f pop %edi
11116b: c9 leave
11116c: c3 ret
00124920 <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
124920: 55 push %ebp
124921: 89 e5 mov %esp,%ebp
124923: 57 push %edi
124924: 56 push %esi
124925: 53 push %ebx
124926: 83 ec 2c sub $0x2c,%esp
124929: 8b 75 08 mov 0x8(%ebp),%esi
12492c: 8b 5d 0c mov 0xc(%ebp),%ebx
12492f: 8b 7d 10 mov 0x10(%ebp),%edi
unsigned long result;
char *end;
if ( !n )
124932: 85 db test %ebx,%ebx
124934: 0f 84 8e 00 00 00 je 1249c8 <rtems_string_to_unsigned_char+0xa8>
return RTEMS_INVALID_ADDRESS;
errno = 0;
12493a: e8 41 32 02 00 call 147b80 <__errno>
12493f: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
124945: c6 03 00 movb $0x0,(%ebx)
result = strtoul( s, &end, base );
124948: 50 push %eax
124949: ff 75 14 pushl 0x14(%ebp)
12494c: 8d 45 e4 lea -0x1c(%ebp),%eax
12494f: 50 push %eax
124950: 56 push %esi
124951: e8 1e a6 02 00 call 14ef74 <strtoul>
124956: 89 c2 mov %eax,%edx
if ( endptr )
124958: 83 c4 10 add $0x10,%esp
12495b: 85 ff test %edi,%edi
12495d: 74 05 je 124964 <rtems_string_to_unsigned_char+0x44>
*endptr = end;
12495f: 8b 45 e4 mov -0x1c(%ebp),%eax
124962: 89 07 mov %eax,(%edi)
if ( end == s )
124964: 39 75 e4 cmp %esi,-0x1c(%ebp)
124967: 74 4f je 1249b8 <rtems_string_to_unsigned_char+0x98>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
124969: 89 55 d4 mov %edx,-0x2c(%ebp)
12496c: e8 0f 32 02 00 call 147b80 <__errno>
124971: 83 38 22 cmpl $0x22,(%eax)
124974: 8b 55 d4 mov -0x2c(%ebp),%edx
124977: 74 17 je 124990 <rtems_string_to_unsigned_char+0x70><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
124979: 81 fa ff 00 00 00 cmp $0xff,%edx
12497f: 77 1f ja 1249a0 <rtems_string_to_unsigned_char+0x80><== NEVER TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
124981: 88 13 mov %dl,(%ebx)
124983: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
124985: 8d 65 f4 lea -0xc(%ebp),%esp
124988: 5b pop %ebx
124989: 5e pop %esi
12498a: 5f pop %edi
12498b: c9 leave
12498c: c3 ret
12498d: 8d 76 00 lea 0x0(%esi),%esi
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
124990: 8d 42 ff lea -0x1(%edx),%eax <== NOT EXECUTED
124993: 83 f8 fd cmp $0xfffffffd,%eax <== NOT EXECUTED
124996: 77 13 ja 1249ab <rtems_string_to_unsigned_char+0x8b><== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
124998: 81 fa ff 00 00 00 cmp $0xff,%edx <== NOT EXECUTED
12499e: 76 e1 jbe 124981 <rtems_string_to_unsigned_char+0x61><== NOT EXECUTED
errno = ERANGE;
1249a0: e8 db 31 02 00 call 147b80 <__errno> <== NOT EXECUTED
1249a5: c7 00 22 00 00 00 movl $0x22,(%eax) <== NOT EXECUTED
1249ab: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
1249b0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1249b3: 5b pop %ebx <== NOT EXECUTED
1249b4: 5e pop %esi <== NOT EXECUTED
1249b5: 5f pop %edi <== NOT EXECUTED
1249b6: c9 leave <== NOT EXECUTED
1249b7: c3 ret <== NOT EXECUTED
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
1249b8: b8 0b 00 00 00 mov $0xb,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
1249bd: 8d 65 f4 lea -0xc(%ebp),%esp
1249c0: 5b pop %ebx
1249c1: 5e pop %esi
1249c2: 5f pop %edi
1249c3: c9 leave
1249c4: c3 ret
1249c5: 8d 76 00 lea 0x0(%esi),%esi
)
{
unsigned long result;
char *end;
if ( !n )
1249c8: b8 09 00 00 00 mov $0x9,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
1249cd: 8d 65 f4 lea -0xc(%ebp),%esp
1249d0: 5b pop %ebx
1249d1: 5e pop %esi
1249d2: 5f pop %edi
1249d3: c9 leave
1249d4: c3 ret
001112ec <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
1112ec: 55 push %ebp
1112ed: 89 e5 mov %esp,%ebp
1112ef: 57 push %edi
1112f0: 56 push %esi
1112f1: 53 push %ebx
1112f2: 83 ec 2c sub $0x2c,%esp
1112f5: 8b 75 08 mov 0x8(%ebp),%esi
1112f8: 8b 5d 0c mov 0xc(%ebp),%ebx
1112fb: 8b 7d 10 mov 0x10(%ebp),%edi
unsigned long result;
char *end;
if ( !n )
1112fe: 85 db test %ebx,%ebx
111300: 74 76 je 111378 <rtems_string_to_unsigned_int+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
111302: e8 d9 27 00 00 call 113ae0 <__errno>
111307: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
11130d: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtoul( s, &end, base );
111313: 50 push %eax
111314: ff 75 14 pushl 0x14(%ebp)
111317: 8d 45 e4 lea -0x1c(%ebp),%eax
11131a: 50 push %eax
11131b: 56 push %esi
11131c: e8 63 58 00 00 call 116b84 <strtoul>
111321: 89 c2 mov %eax,%edx
if ( endptr )
111323: 83 c4 10 add $0x10,%esp
111326: 85 ff test %edi,%edi
111328: 74 05 je 11132f <rtems_string_to_unsigned_int+0x43>
*endptr = end;
11132a: 8b 45 e4 mov -0x1c(%ebp),%eax
11132d: 89 07 mov %eax,(%edi)
if ( end == s )
11132f: 39 75 e4 cmp %esi,-0x1c(%ebp)
111332: 74 34 je 111368 <rtems_string_to_unsigned_int+0x7c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111334: 89 55 d4 mov %edx,-0x2c(%ebp)
111337: e8 a4 27 00 00 call 113ae0 <__errno>
11133c: 83 38 22 cmpl $0x22,(%eax)
11133f: 8b 55 d4 mov -0x2c(%ebp),%edx
111342: 74 0c je 111350 <rtems_string_to_unsigned_int+0x64>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
111344: 89 13 mov %edx,(%ebx)
111346: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
111348: 8d 65 f4 lea -0xc(%ebp),%esp
11134b: 5b pop %ebx
11134c: 5e pop %esi
11134d: 5f pop %edi
11134e: c9 leave
11134f: c3 ret
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111350: 8d 42 ff lea -0x1(%edx),%eax
111353: 83 f8 fd cmp $0xfffffffd,%eax
111356: 76 ec jbe 111344 <rtems_string_to_unsigned_int+0x58><== NEVER TAKEN
111358: b8 0a 00 00 00 mov $0xa,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
11135d: 8d 65 f4 lea -0xc(%ebp),%esp
111360: 5b pop %ebx
111361: 5e pop %esi
111362: 5f pop %edi
111363: c9 leave
111364: c3 ret
111365: 8d 76 00 lea 0x0(%esi),%esi
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
111368: b8 0b 00 00 00 mov $0xb,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
11136d: 8d 65 f4 lea -0xc(%ebp),%esp
111370: 5b pop %ebx
111371: 5e pop %esi
111372: 5f pop %edi
111373: c9 leave
111374: c3 ret
111375: 8d 76 00 lea 0x0(%esi),%esi
)
{
unsigned long result;
char *end;
if ( !n )
111378: b8 09 00 00 00 mov $0x9,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
11137d: 8d 65 f4 lea -0xc(%ebp),%esp
111380: 5b pop %ebx
111381: 5e pop %esi
111382: 5f pop %edi
111383: c9 leave
111384: c3 ret
001249d8 <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
1249d8: 55 push %ebp
1249d9: 89 e5 mov %esp,%ebp
1249db: 57 push %edi
1249dc: 56 push %esi
1249dd: 53 push %ebx
1249de: 83 ec 2c sub $0x2c,%esp
1249e1: 8b 75 08 mov 0x8(%ebp),%esi
1249e4: 8b 5d 0c mov 0xc(%ebp),%ebx
1249e7: 8b 7d 10 mov 0x10(%ebp),%edi
unsigned long result;
char *end;
if ( !n )
1249ea: 85 db test %ebx,%ebx
1249ec: 74 76 je 124a64 <rtems_string_to_unsigned_long+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
1249ee: e8 8d 31 02 00 call 147b80 <__errno>
1249f3: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
1249f9: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtoul( s, &end, base );
1249ff: 50 push %eax
124a00: ff 75 14 pushl 0x14(%ebp)
124a03: 8d 45 e4 lea -0x1c(%ebp),%eax
124a06: 50 push %eax
124a07: 56 push %esi
124a08: e8 67 a5 02 00 call 14ef74 <strtoul>
124a0d: 89 c2 mov %eax,%edx
if ( endptr )
124a0f: 83 c4 10 add $0x10,%esp
124a12: 85 ff test %edi,%edi
124a14: 74 05 je 124a1b <rtems_string_to_unsigned_long+0x43>
*endptr = end;
124a16: 8b 45 e4 mov -0x1c(%ebp),%eax
124a19: 89 07 mov %eax,(%edi)
if ( end == s )
124a1b: 39 75 e4 cmp %esi,-0x1c(%ebp)
124a1e: 74 34 je 124a54 <rtems_string_to_unsigned_long+0x7c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
124a20: 89 55 d4 mov %edx,-0x2c(%ebp)
124a23: e8 58 31 02 00 call 147b80 <__errno>
124a28: 83 38 22 cmpl $0x22,(%eax)
124a2b: 8b 55 d4 mov -0x2c(%ebp),%edx
124a2e: 74 0c je 124a3c <rtems_string_to_unsigned_long+0x64>
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
124a30: 89 13 mov %edx,(%ebx)
124a32: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
124a34: 8d 65 f4 lea -0xc(%ebp),%esp
124a37: 5b pop %ebx
124a38: 5e pop %esi
124a39: 5f pop %edi
124a3a: c9 leave
124a3b: c3 ret
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
124a3c: 8d 42 ff lea -0x1(%edx),%eax
124a3f: 83 f8 fd cmp $0xfffffffd,%eax
124a42: 76 ec jbe 124a30 <rtems_string_to_unsigned_long+0x58><== NEVER TAKEN
124a44: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
124a49: 8d 65 f4 lea -0xc(%ebp),%esp
124a4c: 5b pop %ebx
124a4d: 5e pop %esi
124a4e: 5f pop %edi
124a4f: c9 leave
124a50: c3 ret
124a51: 8d 76 00 lea 0x0(%esi),%esi
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
124a54: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
124a59: 8d 65 f4 lea -0xc(%ebp),%esp
124a5c: 5b pop %ebx
124a5d: 5e pop %esi
124a5e: 5f pop %edi
124a5f: c9 leave
124a60: c3 ret
124a61: 8d 76 00 lea 0x0(%esi),%esi
)
{
unsigned long result;
char *end;
if ( !n )
124a64: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
124a69: 8d 65 f4 lea -0xc(%ebp),%esp
124a6c: 5b pop %ebx
124a6d: 5e pop %esi
124a6e: 5f pop %edi
124a6f: c9 leave
124a70: c3 ret
00111388 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
111388: 55 push %ebp
111389: 89 e5 mov %esp,%ebp
11138b: 57 push %edi
11138c: 56 push %esi
11138d: 53 push %ebx
11138e: 83 ec 2c sub $0x2c,%esp
111391: 8b 75 08 mov 0x8(%ebp),%esi
111394: 8b 5d 0c mov 0xc(%ebp),%ebx
111397: 8b 7d 10 mov 0x10(%ebp),%edi
unsigned long long result;
char *end;
if ( !n )
11139a: 85 db test %ebx,%ebx
11139c: 0f 84 96 00 00 00 je 111438 <rtems_string_to_unsigned_long_long+0xb0>
return RTEMS_INVALID_ADDRESS;
errno = 0;
1113a2: e8 39 27 00 00 call 113ae0 <__errno>
1113a7: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
1113ad: c7 03 00 00 00 00 movl $0x0,(%ebx)
1113b3: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtoull( s, &end, base );
1113ba: 50 push %eax
1113bb: ff 75 14 pushl 0x14(%ebp)
1113be: 8d 45 e4 lea -0x1c(%ebp),%eax
1113c1: 50 push %eax
1113c2: 56 push %esi
1113c3: e8 d8 57 00 00 call 116ba0 <strtoull>
1113c8: 89 d1 mov %edx,%ecx
1113ca: 89 c2 mov %eax,%edx
if ( endptr )
1113cc: 83 c4 10 add $0x10,%esp
1113cf: 85 ff test %edi,%edi
1113d1: 74 05 je 1113d8 <rtems_string_to_unsigned_long_long+0x50>
*endptr = end;
1113d3: 8b 45 e4 mov -0x1c(%ebp),%eax
1113d6: 89 07 mov %eax,(%edi)
if ( end == s )
1113d8: 39 75 e4 cmp %esi,-0x1c(%ebp)
1113db: 74 4b je 111428 <rtems_string_to_unsigned_long_long+0xa0>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1113dd: 89 55 d4 mov %edx,-0x2c(%ebp)
1113e0: 89 4d d0 mov %ecx,-0x30(%ebp)
1113e3: e8 f8 26 00 00 call 113ae0 <__errno>
1113e8: 83 38 22 cmpl $0x22,(%eax)
1113eb: 8b 55 d4 mov -0x2c(%ebp),%edx
1113ee: 8b 4d d0 mov -0x30(%ebp),%ecx
1113f1: 74 11 je 111404 <rtems_string_to_unsigned_long_long+0x7c>
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
1113f3: 89 13 mov %edx,(%ebx)
1113f5: 89 4b 04 mov %ecx,0x4(%ebx)
1113f8: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
1113fa: 8d 65 f4 lea -0xc(%ebp),%esp
1113fd: 5b pop %ebx
1113fe: 5e pop %esi
1113ff: 5f pop %edi
111400: c9 leave
111401: c3 ret
111402: 66 90 xchg %ax,%ax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111404: 89 d6 mov %edx,%esi
111406: 89 cf mov %ecx,%edi
111408: 83 c6 ff add $0xffffffff,%esi
11140b: 83 d7 ff adc $0xffffffff,%edi
11140e: 83 ff ff cmp $0xffffffff,%edi
111411: 72 e0 jb 1113f3 <rtems_string_to_unsigned_long_long+0x6b><== NEVER TAKEN
111413: 83 fe fd cmp $0xfffffffd,%esi
111416: 76 db jbe 1113f3 <rtems_string_to_unsigned_long_long+0x6b><== NEVER TAKEN
111418: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
11141d: 8d 65 f4 lea -0xc(%ebp),%esp
111420: 5b pop %ebx
111421: 5e pop %esi
111422: 5f pop %edi
111423: c9 leave
111424: c3 ret
111425: 8d 76 00 lea 0x0(%esi),%esi
result = strtoull( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
111428: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
11142d: 8d 65 f4 lea -0xc(%ebp),%esp
111430: 5b pop %ebx
111431: 5e pop %esi
111432: 5f pop %edi
111433: c9 leave
111434: c3 ret
111435: 8d 76 00 lea 0x0(%esi),%esi
)
{
unsigned long long result;
char *end;
if ( !n )
111438: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
11143d: 8d 65 f4 lea -0xc(%ebp),%esp
111440: 5b pop %ebx
111441: 5e pop %esi
111442: 5f pop %edi
111443: c9 leave
111444: c3 ret
0010be80 <rtems_task_create>:
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
rtems_id *id
)
{
10be80: 55 push %ebp
10be81: 89 e5 mov %esp,%ebp
10be83: 57 push %edi
10be84: 56 push %esi
10be85: 53 push %ebx
10be86: 83 ec 1c sub $0x1c,%esp
10be89: 8b 5d 08 mov 0x8(%ebp),%ebx
10be8c: 8b 4d 0c mov 0xc(%ebp),%ecx
10be8f: 8b 7d 18 mov 0x18(%ebp),%edi
10be92: 8b 75 1c mov 0x1c(%ebp),%esi
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
10be95: 85 f6 test %esi,%esi
10be97: 0f 84 37 01 00 00 je 10bfd4 <rtems_task_create+0x154>
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10be9d: 85 db test %ebx,%ebx
10be9f: 0f 84 cb 00 00 00 je 10bf70 <rtems_task_create+0xf0>
/*
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
10bea5: 66 85 ff test %di,%di
10bea8: 78 1d js 10bec7 <rtems_task_create+0x47>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10beaa: 85 c9 test %ecx,%ecx
10beac: 75 0e jne 10bebc <rtems_task_create+0x3c>
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
10beae: b8 13 00 00 00 mov $0x13,%eax
}
10beb3: 8d 65 f4 lea -0xc(%ebp),%esp
10beb6: 5b pop %ebx
10beb7: 5e pop %esi
10beb8: 5f pop %edi
10beb9: c9 leave
10beba: c3 ret
10bebb: 90 nop
10bebc: 0f b6 05 14 52 12 00 movzbl 0x125214,%eax
10bec3: 39 c1 cmp %eax,%ecx
10bec5: 77 e7 ja 10beae <rtems_task_create+0x2e>
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10bec7: 83 ec 0c sub $0xc,%esp
10beca: ff 35 b0 94 12 00 pushl 0x1294b0
10bed0: 89 4d e4 mov %ecx,-0x1c(%ebp)
10bed3: e8 84 06 00 00 call 10c55c <_API_Mutex_Lock>
* This function allocates a task control block from
* the inactive chain of free task control blocks.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
10bed8: c7 04 24 80 93 12 00 movl $0x129380,(%esp)
10bedf: e8 64 10 00 00 call 10cf48 <_Objects_Allocate>
10bee4: 89 c2 mov %eax,%edx
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
10bee6: 83 c4 10 add $0x10,%esp
10bee9: 85 c0 test %eax,%eax
10beeb: 8b 4d e4 mov -0x1c(%ebp),%ecx
10beee: 0f 84 c0 00 00 00 je 10bfb4 <rtems_task_create+0x134>
/*
* Initialize the core thread for this task.
*/
status = _Thread_Initialize(
10bef4: 50 push %eax
10bef5: 53 push %ebx
10bef6: 8b 45 14 mov 0x14(%ebp),%eax
10bef9: 83 e0 01 and $0x1,%eax
10befc: 50 push %eax
10befd: 6a 00 push $0x0
10beff: 8b 45 14 mov 0x14(%ebp),%eax
10bf02: c1 e8 09 shr $0x9,%eax
10bf05: 83 e0 01 and $0x1,%eax
10bf08: 50 push %eax
10bf09: 8b 45 14 mov 0x14(%ebp),%eax
10bf0c: c1 e8 08 shr $0x8,%eax
10bf0f: 83 f0 01 xor $0x1,%eax
10bf12: 83 e0 01 and $0x1,%eax
10bf15: 50 push %eax
10bf16: 51 push %ecx
10bf17: 83 e7 01 and $0x1,%edi
10bf1a: 57 push %edi
10bf1b: ff 75 10 pushl 0x10(%ebp)
10bf1e: 6a 00 push $0x0
10bf20: 52 push %edx
10bf21: 68 80 93 12 00 push $0x129380
10bf26: 89 55 e4 mov %edx,-0x1c(%ebp)
10bf29: e8 da 1d 00 00 call 10dd08 <_Thread_Initialize>
NULL, /* no budget algorithm callout */
_Modes_Get_interrupt_level(initial_modes),
(Objects_Name) name
);
if ( !status ) {
10bf2e: 83 c4 30 add $0x30,%esp
10bf31: 84 c0 test %al,%al
10bf33: 8b 55 e4 mov -0x1c(%ebp),%edx
10bf36: 74 48 je 10bf80 <rtems_task_create+0x100>
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
10bf38: 8b 8a f4 00 00 00 mov 0xf4(%edx),%ecx
10bf3e: 8b 45 14 mov 0x14(%ebp),%eax
10bf41: c1 e8 0a shr $0xa,%eax
10bf44: 83 f0 01 xor $0x1,%eax
10bf47: 83 e0 01 and $0x1,%eax
10bf4a: 88 41 08 mov %al,0x8(%ecx)
*id = the_thread->Object.id;
10bf4d: 8b 42 08 mov 0x8(%edx),%eax
10bf50: 89 06 mov %eax,(%esi)
);
}
#endif
_RTEMS_Unlock_allocator();
10bf52: 83 ec 0c sub $0xc,%esp
10bf55: ff 35 b0 94 12 00 pushl 0x1294b0
10bf5b: e8 44 06 00 00 call 10c5a4 <_API_Mutex_Unlock>
10bf60: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10bf62: 83 c4 10 add $0x10,%esp
}
10bf65: 8d 65 f4 lea -0xc(%ebp),%esp
10bf68: 5b pop %ebx
10bf69: 5e pop %esi
10bf6a: 5f pop %edi
10bf6b: c9 leave
10bf6c: c3 ret
10bf6d: 8d 76 00 lea 0x0(%esi),%esi
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10bf70: b8 03 00 00 00 mov $0x3,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10bf75: 8d 65 f4 lea -0xc(%ebp),%esp
10bf78: 5b pop %ebx
10bf79: 5e pop %esi
10bf7a: 5f pop %edi
10bf7b: c9 leave
10bf7c: c3 ret
10bf7d: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
Thread_Control *the_task
)
{
_Objects_Free(
10bf80: 83 ec 0c sub $0xc,%esp
10bf83: ff 72 08 pushl 0x8(%edx)
10bf86: e8 ad 13 00 00 call 10d338 <_Objects_Get_information_id>
10bf8b: 5a pop %edx
10bf8c: 59 pop %ecx
10bf8d: 8b 55 e4 mov -0x1c(%ebp),%edx
10bf90: 52 push %edx
10bf91: 50 push %eax
10bf92: e8 31 13 00 00 call 10d2c8 <_Objects_Free>
#if defined(RTEMS_MULTIPROCESSING)
if ( is_global )
_Objects_MP_Free_global_object( the_global_object );
#endif
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
10bf97: 58 pop %eax
10bf98: ff 35 b0 94 12 00 pushl 0x1294b0
10bf9e: e8 01 06 00 00 call 10c5a4 <_API_Mutex_Unlock>
10bfa3: b8 0d 00 00 00 mov $0xd,%eax
return RTEMS_UNSATISFIED;
10bfa8: 83 c4 10 add $0x10,%esp
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10bfab: 8d 65 f4 lea -0xc(%ebp),%esp
10bfae: 5b pop %ebx
10bfaf: 5e pop %esi
10bfb0: 5f pop %edi
10bfb1: c9 leave
10bfb2: c3 ret
10bfb3: 90 nop
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10bfb4: 83 ec 0c sub $0xc,%esp
10bfb7: ff 35 b0 94 12 00 pushl 0x1294b0
10bfbd: e8 e2 05 00 00 call 10c5a4 <_API_Mutex_Unlock>
10bfc2: b8 05 00 00 00 mov $0x5,%eax
return RTEMS_TOO_MANY;
10bfc7: 83 c4 10 add $0x10,%esp
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10bfca: 8d 65 f4 lea -0xc(%ebp),%esp
10bfcd: 5b pop %ebx
10bfce: 5e pop %esi
10bfcf: 5f pop %edi
10bfd0: c9 leave
10bfd1: c3 ret
10bfd2: 66 90 xchg %ax,%ax
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
10bfd4: b8 09 00 00 00 mov $0x9,%eax
10bfd9: e9 d5 fe ff ff jmp 10beb3 <rtems_task_create+0x33>
0010bfe0 <rtems_task_delete>:
*/
rtems_status_code rtems_task_delete(
rtems_id id
)
{
10bfe0: 55 push %ebp
10bfe1: 89 e5 mov %esp,%ebp
10bfe3: 53 push %ebx
10bfe4: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
10bfe7: ff 35 b0 94 12 00 pushl 0x1294b0
10bfed: e8 6a 05 00 00 call 10c55c <_API_Mutex_Lock>
the_thread = _Thread_Get( id, &location );
10bff2: 5a pop %edx
10bff3: 59 pop %ecx
10bff4: 8d 45 f4 lea -0xc(%ebp),%eax
10bff7: 50 push %eax
10bff8: ff 75 08 pushl 0x8(%ebp)
10bffb: e8 90 1c 00 00 call 10dc90 <_Thread_Get>
10c000: 89 c3 mov %eax,%ebx
switch ( location ) {
10c002: 83 c4 10 add $0x10,%esp
10c005: 8b 45 f4 mov -0xc(%ebp),%eax
10c008: 85 c0 test %eax,%eax
10c00a: 75 44 jne 10c050 <rtems_task_delete+0x70>
case OBJECTS_LOCAL:
the_information = _Objects_Get_information_id( the_thread->Object.id );
10c00c: 83 ec 0c sub $0xc,%esp
10c00f: ff 73 08 pushl 0x8(%ebx)
10c012: e8 21 13 00 00 call 10d338 <_Objects_Get_information_id>
0 /* Not used */
);
}
#endif
_Thread_Close( the_information, the_thread );
10c017: 5a pop %edx
10c018: 59 pop %ecx
10c019: 53 push %ebx
10c01a: 50 push %eax
10c01b: e8 38 19 00 00 call 10d958 <_Thread_Close>
10c020: 58 pop %eax
10c021: ff 73 08 pushl 0x8(%ebx)
10c024: e8 0f 13 00 00 call 10d338 <_Objects_Get_information_id>
10c029: 5a pop %edx
10c02a: 59 pop %ecx
10c02b: 53 push %ebx
10c02c: 50 push %eax
10c02d: e8 96 12 00 00 call 10d2c8 <_Objects_Free>
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
10c032: 58 pop %eax
10c033: ff 35 b0 94 12 00 pushl 0x1294b0
10c039: e8 66 05 00 00 call 10c5a4 <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
10c03e: e8 29 1c 00 00 call 10dc6c <_Thread_Enable_dispatch>
10c043: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10c045: 83 c4 10 add $0x10,%esp
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
10c048: 8b 5d fc mov -0x4(%ebp),%ebx
10c04b: c9 leave
10c04c: c3 ret
10c04d: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
10c050: 83 ec 0c sub $0xc,%esp
10c053: ff 35 b0 94 12 00 pushl 0x1294b0
10c059: e8 46 05 00 00 call 10c5a4 <_API_Mutex_Unlock>
10c05e: b8 04 00 00 00 mov $0x4,%eax
return RTEMS_INVALID_ID;
10c063: 83 c4 10 add $0x10,%esp
}
10c066: 8b 5d fc mov -0x4(%ebp),%ebx
10c069: c9 leave
10c06a: c3 ret
0010daec <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
10daec: 55 push %ebp
10daed: 89 e5 mov %esp,%ebp
10daef: 56 push %esi
10daf0: 53 push %ebx
10daf1: 83 ec 10 sub $0x10,%esp
10daf4: 8b 45 08 mov 0x8(%ebp),%eax
10daf7: 8b 75 0c mov 0xc(%ebp),%esi
10dafa: 8b 5d 10 mov 0x10(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10dafd: 80 3d 04 8e 12 00 00 cmpb $0x0,0x128e04
10db04: 74 6e je 10db74 <rtems_task_get_note+0x88>
return RTEMS_NOT_CONFIGURED;
if ( !note )
10db06: 85 db test %ebx,%ebx
10db08: 74 7e je 10db88 <rtems_task_get_note+0x9c>
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10db0a: 83 fe 0f cmp $0xf,%esi
10db0d: 77 3d ja 10db4c <rtems_task_get_note+0x60>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10db0f: 85 c0 test %eax,%eax
10db11: 74 45 je 10db58 <rtems_task_get_note+0x6c>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
10db13: 8b 15 b8 d3 12 00 mov 0x12d3b8,%edx
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10db19: 3b 42 08 cmp 0x8(%edx),%eax
10db1c: 74 40 je 10db5e <rtems_task_get_note+0x72>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10db1e: 83 ec 08 sub $0x8,%esp
10db21: 8d 55 f4 lea -0xc(%ebp),%edx
10db24: 52 push %edx
10db25: 50 push %eax
10db26: e8 a1 1f 00 00 call 10facc <_Thread_Get>
switch ( location ) {
10db2b: 83 c4 10 add $0x10,%esp
10db2e: 8b 55 f4 mov -0xc(%ebp),%edx
10db31: 85 d2 test %edx,%edx
10db33: 75 4b jne 10db80 <rtems_task_get_note+0x94>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10db35: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
10db3b: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax
10db3f: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
10db41: e8 62 1f 00 00 call 10faa8 <_Thread_Enable_dispatch>
10db46: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10db48: eb 07 jmp 10db51 <rtems_task_get_note+0x65>
10db4a: 66 90 xchg %ax,%ax
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10db4c: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10db51: 8d 65 f8 lea -0x8(%ebp),%esp
10db54: 5b pop %ebx
10db55: 5e pop %esi
10db56: c9 leave
10db57: c3 ret
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10db58: 8b 15 b8 d3 12 00 mov 0x12d3b8,%edx
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10db5e: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax
10db64: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax
10db68: 89 03 mov %eax,(%ebx)
10db6a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10db6c: 8d 65 f8 lea -0x8(%ebp),%esp
10db6f: 5b pop %ebx
10db70: 5e pop %esi
10db71: c9 leave
10db72: c3 ret
10db73: 90 nop
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10db74: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10db79: 8d 65 f8 lea -0x8(%ebp),%esp
10db7c: 5b pop %ebx
10db7d: 5e pop %esi
10db7e: c9 leave
10db7f: c3 ret
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
10db80: b8 04 00 00 00 mov $0x4,%eax
10db85: eb ca jmp 10db51 <rtems_task_get_note+0x65>
10db87: 90 nop
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
10db88: b8 09 00 00 00 mov $0x9,%eax
10db8d: eb c2 jmp 10db51 <rtems_task_get_note+0x65>
00118a50 <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
rtems_id id
)
{
118a50: 55 push %ebp
118a51: 89 e5 mov %esp,%ebp
118a53: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
118a56: 8d 45 f4 lea -0xc(%ebp),%eax
118a59: 50 push %eax
118a5a: ff 75 08 pushl 0x8(%ebp)
118a5d: e8 6a 38 00 00 call 11c2cc <_Thread_Get>
switch ( location ) {
118a62: 83 c4 10 add $0x10,%esp
118a65: 8b 55 f4 mov -0xc(%ebp),%edx
118a68: 85 d2 test %edx,%edx
118a6a: 74 08 je 118a74 <rtems_task_is_suspended+0x24>
118a6c: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118a71: c9 leave
118a72: c3 ret
118a73: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
118a74: f6 40 10 02 testb $0x2,0x10(%eax)
118a78: 74 0e je 118a88 <rtems_task_is_suspended+0x38>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
118a7a: e8 fd 37 00 00 call 11c27c <_Thread_Enable_dispatch>
118a7f: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118a84: c9 leave
118a85: c3 ret
118a86: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Enable_dispatch();
118a88: e8 ef 37 00 00 call 11c27c <_Thread_Enable_dispatch>
118a8d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118a8f: c9 leave
118a90: c3 ret
00114bc0 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
114bc0: 55 push %ebp
114bc1: 89 e5 mov %esp,%ebp
114bc3: 57 push %edi
114bc4: 56 push %esi
114bc5: 53 push %ebx
114bc6: 83 ec 1c sub $0x1c,%esp
114bc9: 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 )
114bcc: 85 c9 test %ecx,%ecx
114bce: 0f 84 1c 01 00 00 je 114cf0 <rtems_task_mode+0x130>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
114bd4: 8b 1d b8 94 12 00 mov 0x1294b8,%ebx
api = executing->API_Extensions[ THREAD_API_RTEMS ];
114bda: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
114be0: 80 7b 75 01 cmpb $0x1,0x75(%ebx)
114be4: 19 f6 sbb %esi,%esi
114be6: 81 e6 00 01 00 00 and $0x100,%esi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
114bec: 8b 53 7c mov 0x7c(%ebx),%edx
114bef: 85 d2 test %edx,%edx
114bf1: 0f 85 b5 00 00 00 jne 114cac <rtems_task_mode+0xec>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
114bf7: 80 7f 08 01 cmpb $0x1,0x8(%edi)
114bfb: 19 d2 sbb %edx,%edx
114bfd: 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();
114c03: 89 55 e4 mov %edx,-0x1c(%ebp)
114c06: 89 4d e0 mov %ecx,-0x20(%ebp)
114c09: e8 6e a4 ff ff call 10f07c <_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;
114c0e: 8b 55 e4 mov -0x1c(%ebp),%edx
114c11: 09 d0 or %edx,%eax
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
114c13: 09 f0 or %esi,%eax
114c15: 8b 4d e0 mov -0x20(%ebp),%ecx
114c18: 89 01 mov %eax,(%ecx)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
114c1a: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
114c21: 74 0f je 114c32 <rtems_task_mode+0x72>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
114c23: 8b 45 08 mov 0x8(%ebp),%eax
114c26: c1 e8 08 shr $0x8,%eax
114c29: 83 f0 01 xor $0x1,%eax
114c2c: 83 e0 01 and $0x1,%eax
114c2f: 88 43 75 mov %al,0x75(%ebx)
if ( mask & RTEMS_TIMESLICE_MASK ) {
114c32: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
114c39: 74 18 je 114c53 <rtems_task_mode+0x93>
if ( _Modes_Is_timeslice(mode_set) ) {
114c3b: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
114c42: 74 74 je 114cb8 <rtems_task_mode+0xf8>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
114c44: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
114c4b: a1 c4 93 12 00 mov 0x1293c4,%eax
114c50: 89 43 78 mov %eax,0x78(%ebx)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
114c53: f6 45 0c 01 testb $0x1,0xc(%ebp)
114c57: 74 07 je 114c60 <rtems_task_mode+0xa0>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
114c59: f6 45 08 01 testb $0x1,0x8(%ebp)
114c5d: 74 69 je 114cc8 <rtems_task_mode+0x108>
114c5f: fa cli
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
114c60: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
114c67: 74 2c je 114c95 <rtems_task_mode+0xd5>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
114c69: 8b 45 08 mov 0x8(%ebp),%eax
114c6c: c1 e8 0a shr $0xa,%eax
114c6f: 83 f0 01 xor $0x1,%eax
114c72: 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;
114c75: 38 47 08 cmp %al,0x8(%edi)
114c78: 74 1b je 114c95 <rtems_task_mode+0xd5>
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;
114c7a: 88 47 08 mov %al,0x8(%edi)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
114c7d: 9c pushf
114c7e: fa cli
114c7f: 58 pop %eax
_signals = information->signals_pending;
114c80: 8b 57 18 mov 0x18(%edi),%edx
information->signals_pending = information->signals_posted;
114c83: 8b 4f 14 mov 0x14(%edi),%ecx
114c86: 89 4f 18 mov %ecx,0x18(%edi)
information->signals_posted = _signals;
114c89: 89 57 14 mov %edx,0x14(%edi)
_ISR_Enable( _level );
114c8c: 50 push %eax
114c8d: 9d popf
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
114c8e: 8b 47 14 mov 0x14(%edi),%eax
114c91: 85 c0 test %eax,%eax
114c93: 75 53 jne 114ce8 <rtems_task_mode+0x128>
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;
114c95: 31 db xor %ebx,%ebx
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
114c97: 83 3d c0 95 12 00 03 cmpl $0x3,0x1295c0
114c9e: 74 2c je 114ccc <rtems_task_mode+0x10c>
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
114ca0: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
114ca2: 83 c4 1c add $0x1c,%esp
114ca5: 5b pop %ebx
114ca6: 5e pop %esi
114ca7: 5f pop %edi
114ca8: c9 leave
114ca9: c3 ret
114caa: 66 90 xchg %ax,%ax
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
114cac: 81 ce 00 02 00 00 or $0x200,%esi
114cb2: e9 40 ff ff ff jmp 114bf7 <rtems_task_mode+0x37>
114cb7: 90 nop
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
114cb8: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
114cbf: f6 45 0c 01 testb $0x1,0xc(%ebp)
114cc3: 74 9b je 114c60 <rtems_task_mode+0xa0>
114cc5: eb 92 jmp 114c59 <rtems_task_mode+0x99>
114cc7: 90 nop
114cc8: fb sti
114cc9: eb 95 jmp 114c60 <rtems_task_mode+0xa0>
114ccb: 90 nop
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
114ccc: e8 bf 01 00 00 call 114e90 <_Thread_Evaluate_mode>
114cd1: 84 c0 test %al,%al
114cd3: 75 04 jne 114cd9 <rtems_task_mode+0x119>
114cd5: 84 db test %bl,%bl
114cd7: 74 c7 je 114ca0 <rtems_task_mode+0xe0>
_Thread_Dispatch();
114cd9: e8 32 8e ff ff call 10db10 <_Thread_Dispatch>
114cde: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
114ce0: 83 c4 1c add $0x1c,%esp
114ce3: 5b pop %ebx
114ce4: 5e pop %esi
114ce5: 5f pop %edi
114ce6: c9 leave
114ce7: c3 ret
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;
114ce8: c6 43 74 01 movb $0x1,0x74(%ebx)
114cec: b3 01 mov $0x1,%bl
114cee: eb a7 jmp 114c97 <rtems_task_mode+0xd7>
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
114cf0: b8 09 00 00 00 mov $0x9,%eax
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
114cf5: 83 c4 1c add $0x1c,%esp
114cf8: 5b pop %ebx
114cf9: 5e pop %esi
114cfa: 5f pop %edi
114cfb: c9 leave
114cfc: c3 ret
0010f32c <rtems_task_resume>:
*/
rtems_status_code rtems_task_resume(
rtems_id id
)
{
10f32c: 55 push %ebp
10f32d: 89 e5 mov %esp,%ebp
10f32f: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10f332: 8d 45 f4 lea -0xc(%ebp),%eax
10f335: 50 push %eax
10f336: ff 75 08 pushl 0x8(%ebp)
10f339: e8 d6 1c 00 00 call 111014 <_Thread_Get>
switch ( location ) {
10f33e: 83 c4 10 add $0x10,%esp
10f341: 8b 55 f4 mov -0xc(%ebp),%edx
10f344: 85 d2 test %edx,%edx
10f346: 74 08 je 10f350 <rtems_task_resume+0x24>
10f348: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10f34d: c9 leave
10f34e: c3 ret
10f34f: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
10f350: f6 40 10 02 testb $0x2,0x10(%eax)
10f354: 75 0e jne 10f364 <rtems_task_resume+0x38>
_Thread_Resume( the_thread, true );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10f356: e8 69 1c 00 00 call 110fc4 <_Thread_Enable_dispatch>
10f35b: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10f360: c9 leave
10f361: c3 ret
10f362: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
_Thread_Resume( the_thread, true );
10f364: 83 ec 08 sub $0x8,%esp
10f367: 6a 01 push $0x1
10f369: 50 push %eax
10f36a: e8 01 25 00 00 call 111870 <_Thread_Resume>
_Thread_Enable_dispatch();
10f36f: e8 50 1c 00 00 call 110fc4 <_Thread_Enable_dispatch>
10f374: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10f376: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10f379: c9 leave
10f37a: c3 ret
0010dc64 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
10dc64: 55 push %ebp
10dc65: 89 e5 mov %esp,%ebp
10dc67: 56 push %esi
10dc68: 53 push %ebx
10dc69: 83 ec 10 sub $0x10,%esp
10dc6c: 8b 45 08 mov 0x8(%ebp),%eax
10dc6f: 8b 5d 0c mov 0xc(%ebp),%ebx
10dc72: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10dc75: 80 3d 04 8e 12 00 00 cmpb $0x0,0x128e04
10dc7c: 74 66 je 10dce4 <rtems_task_set_note+0x80>
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10dc7e: 83 fb 0f cmp $0xf,%ebx
10dc81: 77 39 ja 10dcbc <rtems_task_set_note+0x58>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10dc83: 85 c0 test %eax,%eax
10dc85: 74 41 je 10dcc8 <rtems_task_set_note+0x64>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
10dc87: 8b 15 b8 d3 12 00 mov 0x12d3b8,%edx
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10dc8d: 3b 42 08 cmp 0x8(%edx),%eax
10dc90: 74 3c je 10dcce <rtems_task_set_note+0x6a>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10dc92: 83 ec 08 sub $0x8,%esp
10dc95: 8d 55 f4 lea -0xc(%ebp),%edx
10dc98: 52 push %edx
10dc99: 50 push %eax
10dc9a: e8 2d 1e 00 00 call 10facc <_Thread_Get>
switch ( location ) {
10dc9f: 83 c4 10 add $0x10,%esp
10dca2: 8b 55 f4 mov -0xc(%ebp),%edx
10dca5: 85 d2 test %edx,%edx
10dca7: 75 47 jne 10dcf0 <rtems_task_set_note+0x8c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10dca9: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
10dcaf: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4)
_Thread_Enable_dispatch();
10dcb3: e8 f0 1d 00 00 call 10faa8 <_Thread_Enable_dispatch>
10dcb8: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10dcba: eb 05 jmp 10dcc1 <rtems_task_set_note+0x5d>
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10dcbc: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10dcc1: 8d 65 f8 lea -0x8(%ebp),%esp
10dcc4: 5b pop %ebx
10dcc5: 5e pop %esi
10dcc6: c9 leave
10dcc7: c3 ret
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10dcc8: 8b 15 b8 d3 12 00 mov 0x12d3b8,%edx
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10dcce: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax
10dcd4: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4)
10dcd8: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10dcda: 8d 65 f8 lea -0x8(%ebp),%esp
10dcdd: 5b pop %ebx
10dcde: 5e pop %esi
10dcdf: c9 leave
10dce0: c3 ret
10dce1: 8d 76 00 lea 0x0(%esi),%esi
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10dce4: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10dce9: 8d 65 f8 lea -0x8(%ebp),%esp
10dcec: 5b pop %ebx
10dced: 5e pop %esi
10dcee: c9 leave
10dcef: c3 ret
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
10dcf0: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10dcf5: 8d 65 f8 lea -0x8(%ebp),%esp
10dcf8: 5b pop %ebx
10dcf9: 5e pop %esi
10dcfa: c9 leave
10dcfb: c3 ret
0010ffe8 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10ffe8: 55 push %ebp
10ffe9: 89 e5 mov %esp,%ebp
10ffeb: 56 push %esi
10ffec: 53 push %ebx
10ffed: 83 ec 10 sub $0x10,%esp
10fff0: 8b 5d 0c mov 0xc(%ebp),%ebx
10fff3: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10fff6: 85 db test %ebx,%ebx
10fff8: 74 0b je 110005 <rtems_task_set_priority+0x1d>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10fffa: 0f b6 05 14 92 12 00 movzbl 0x129214,%eax
110001: 39 c3 cmp %eax,%ebx
110003: 77 5f ja 110064 <rtems_task_set_priority+0x7c>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
110005: 85 f6 test %esi,%esi
110007: 74 67 je 110070 <rtems_task_set_priority+0x88>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
110009: 83 ec 08 sub $0x8,%esp
11000c: 8d 45 f4 lea -0xc(%ebp),%eax
11000f: 50 push %eax
110010: ff 75 08 pushl 0x8(%ebp)
110013: e8 2c 1e 00 00 call 111e44 <_Thread_Get>
switch ( location ) {
110018: 83 c4 10 add $0x10,%esp
11001b: 8b 55 f4 mov -0xc(%ebp),%edx
11001e: 85 d2 test %edx,%edx
110020: 75 36 jne 110058 <rtems_task_set_priority+0x70>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
110022: 8b 50 14 mov 0x14(%eax),%edx
110025: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
110027: 85 db test %ebx,%ebx
110029: 74 1c je 110047 <rtems_task_set_priority+0x5f>
the_thread->real_priority = new_priority;
11002b: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
11002e: 8b 48 1c mov 0x1c(%eax),%ecx
110031: 85 c9 test %ecx,%ecx
110033: 74 05 je 11003a <rtems_task_set_priority+0x52>
the_thread->current_priority > new_priority )
110035: 3b 58 14 cmp 0x14(%eax),%ebx
110038: 73 0d jae 110047 <rtems_task_set_priority+0x5f><== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
11003a: 52 push %edx
11003b: 6a 00 push $0x0
11003d: 53 push %ebx
11003e: 50 push %eax
11003f: e8 c8 18 00 00 call 11190c <_Thread_Change_priority>
110044: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
110047: e8 a8 1d 00 00 call 111df4 <_Thread_Enable_dispatch>
11004c: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11004e: 8d 65 f8 lea -0x8(%ebp),%esp
110051: 5b pop %ebx
110052: 5e pop %esi
110053: c9 leave
110054: c3 ret
110055: 8d 76 00 lea 0x0(%esi),%esi
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
110058: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11005d: 8d 65 f8 lea -0x8(%ebp),%esp
110060: 5b pop %ebx
110061: 5e pop %esi
110062: c9 leave
110063: c3 ret
110064: b8 13 00 00 00 mov $0x13,%eax
110069: 8d 65 f8 lea -0x8(%ebp),%esp
11006c: 5b pop %ebx
11006d: 5e pop %esi
11006e: c9 leave
11006f: c3 ret
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
110070: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110075: 8d 65 f8 lea -0x8(%ebp),%esp
110078: 5b pop %ebx
110079: 5e pop %esi
11007a: c9 leave
11007b: c3 ret
0010c124 <rtems_task_start>:
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
10c124: 55 push %ebp
10c125: 89 e5 mov %esp,%ebp
10c127: 53 push %ebx
10c128: 83 ec 14 sub $0x14,%esp
10c12b: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
10c12e: 85 db test %ebx,%ebx
10c130: 74 4e je 10c180 <rtems_task_start+0x5c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10c132: 83 ec 08 sub $0x8,%esp
10c135: 8d 45 f4 lea -0xc(%ebp),%eax
10c138: 50 push %eax
10c139: ff 75 08 pushl 0x8(%ebp)
10c13c: e8 4f 1b 00 00 call 10dc90 <_Thread_Get>
switch ( location ) {
10c141: 83 c4 10 add $0x10,%esp
10c144: 8b 55 f4 mov -0xc(%ebp),%edx
10c147: 85 d2 test %edx,%edx
10c149: 75 29 jne 10c174 <rtems_task_start+0x50>
case OBJECTS_LOCAL:
if ( _Thread_Start(
10c14b: 83 ec 0c sub $0xc,%esp
10c14e: ff 75 10 pushl 0x10(%ebp)
10c151: 6a 00 push $0x0
10c153: 53 push %ebx
10c154: 6a 00 push $0x0
10c156: 50 push %eax
10c157: e8 48 26 00 00 call 10e7a4 <_Thread_Start>
10c15c: 83 c4 20 add $0x20,%esp
10c15f: 84 c0 test %al,%al
10c161: 75 29 jne 10c18c <rtems_task_start+0x68>
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10c163: e8 04 1b 00 00 call 10dc6c <_Thread_Enable_dispatch>
10c168: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c16d: 8b 5d fc mov -0x4(%ebp),%ebx
10c170: c9 leave
10c171: c3 ret
10c172: 66 90 xchg %ax,%ax
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
10c174: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c179: 8b 5d fc mov -0x4(%ebp),%ebx
10c17c: c9 leave
10c17d: c3 ret
10c17e: 66 90 xchg %ax,%ax
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
10c180: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c185: 8b 5d fc mov -0x4(%ebp),%ebx
10c188: c9 leave
10c189: c3 ret
10c18a: 66 90 xchg %ax,%ax
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Start(
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
10c18c: e8 db 1a 00 00 call 10dc6c <_Thread_Enable_dispatch>
10c191: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c193: 8b 5d fc mov -0x4(%ebp),%ebx
10c196: c9 leave
10c197: c3 ret
00111e88 <rtems_task_suspend>:
*/
rtems_status_code rtems_task_suspend(
rtems_id id
)
{
111e88: 55 push %ebp
111e89: 89 e5 mov %esp,%ebp
111e8b: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
111e8e: 8d 45 f4 lea -0xc(%ebp),%eax
111e91: 50 push %eax
111e92: ff 75 08 pushl 0x8(%ebp)
111e95: e8 f6 bd ff ff call 10dc90 <_Thread_Get>
switch ( location ) {
111e9a: 83 c4 10 add $0x10,%esp
111e9d: 8b 55 f4 mov -0xc(%ebp),%edx
111ea0: 85 d2 test %edx,%edx
111ea2: 74 08 je 111eac <rtems_task_suspend+0x24>
111ea4: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111ea9: c9 leave
111eaa: c3 ret
111eab: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
111eac: f6 40 10 02 testb $0x2,0x10(%eax)
111eb0: 74 0e je 111ec0 <rtems_task_suspend+0x38>
_Thread_Suspend( the_thread );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
111eb2: e8 b5 bd ff ff call 10dc6c <_Thread_Enable_dispatch>
111eb7: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111ebc: c9 leave
111ebd: c3 ret
111ebe: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Suspend( the_thread );
111ec0: 83 ec 0c sub $0xc,%esp
111ec3: 50 push %eax
111ec4: e8 ab 0a 00 00 call 112974 <_Thread_Suspend>
_Thread_Enable_dispatch();
111ec9: e8 9e bd ff ff call 10dc6c <_Thread_Enable_dispatch>
111ece: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
111ed0: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111ed3: c9 leave
111ed4: c3 ret
00131484 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
131484: 55 push %ebp
131485: 89 e5 mov %esp,%ebp
131487: 57 push %edi
131488: 56 push %esi
131489: 53 push %ebx
13148a: 83 ec 1c sub $0x1c,%esp
13148d: 8b 5d 0c mov 0xc(%ebp),%ebx
131490: 8b 7d 10 mov 0x10(%ebp),%edi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
131493: 85 db test %ebx,%ebx
131495: 0f 84 9d 00 00 00 je 131538 <rtems_task_variable_add+0xb4>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
13149b: 83 ec 08 sub $0x8,%esp
13149e: 8d 45 e4 lea -0x1c(%ebp),%eax
1314a1: 50 push %eax
1314a2: ff 75 08 pushl 0x8(%ebp)
1314a5: e8 26 41 fe ff call 1155d0 <_Thread_Get>
1314aa: 89 c6 mov %eax,%esi
switch (location) {
1314ac: 83 c4 10 add $0x10,%esp
1314af: 8b 45 e4 mov -0x1c(%ebp),%eax
1314b2: 85 c0 test %eax,%eax
1314b4: 74 0e je 1314c4 <rtems_task_variable_add+0x40>
1314b6: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1314bb: 8d 65 f4 lea -0xc(%ebp),%esp
1314be: 5b pop %ebx
1314bf: 5e pop %esi
1314c0: 5f pop %edi
1314c1: c9 leave
1314c2: c3 ret
1314c3: 90 nop
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
1314c4: 8b 86 04 01 00 00 mov 0x104(%esi),%eax
while (tvp) {
1314ca: 85 c0 test %eax,%eax
1314cc: 75 44 jne 131512 <rtems_task_variable_add+0x8e>
1314ce: 66 90 xchg %ax,%ax
}
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
1314d0: 83 ec 0c sub $0xc,%esp
1314d3: 6a 14 push $0x14
1314d5: e8 72 52 fe ff call 11674c <_Workspace_Allocate>
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
1314da: 83 c4 10 add $0x10,%esp
1314dd: 85 c0 test %eax,%eax
1314df: 74 4b je 13152c <rtems_task_variable_add+0xa8>
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
1314e1: 8b 13 mov (%ebx),%edx
1314e3: 89 50 08 mov %edx,0x8(%eax)
new->ptr = ptr;
1314e6: 89 58 04 mov %ebx,0x4(%eax)
new->dtor = dtor;
1314e9: 89 78 10 mov %edi,0x10(%eax)
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
1314ec: 8b 96 04 01 00 00 mov 0x104(%esi),%edx
1314f2: 89 10 mov %edx,(%eax)
the_thread->task_variables = new;
1314f4: 89 86 04 01 00 00 mov %eax,0x104(%esi)
_Thread_Enable_dispatch();
1314fa: e8 81 40 fe ff call 115580 <_Thread_Enable_dispatch>
1314ff: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
131501: 8d 65 f4 lea -0xc(%ebp),%esp
131504: 5b pop %ebx
131505: 5e pop %esi
131506: 5f pop %edi
131507: c9 leave
131508: c3 ret
131509: 8d 76 00 lea 0x0(%esi),%esi
if (tvp->ptr == ptr) {
tvp->dtor = dtor;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
13150c: 8b 00 mov (%eax),%eax
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
13150e: 85 c0 test %eax,%eax
131510: 74 be je 1314d0 <rtems_task_variable_add+0x4c>
if (tvp->ptr == ptr) {
131512: 39 58 04 cmp %ebx,0x4(%eax)
131515: 75 f5 jne 13150c <rtems_task_variable_add+0x88>
tvp->dtor = dtor;
131517: 89 78 10 mov %edi,0x10(%eax)
_Thread_Enable_dispatch();
13151a: e8 61 40 fe ff call 115580 <_Thread_Enable_dispatch>
13151f: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
131521: 8d 65 f4 lea -0xc(%ebp),%esp
131524: 5b pop %ebx
131525: 5e pop %esi
131526: 5f pop %edi
131527: c9 leave
131528: c3 ret
131529: 8d 76 00 lea 0x0(%esi),%esi
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
13152c: e8 4f 40 fe ff call 115580 <_Thread_Enable_dispatch>
131531: b8 1a 00 00 00 mov $0x1a,%eax
return RTEMS_NO_MEMORY;
131536: eb 83 jmp 1314bb <rtems_task_variable_add+0x37>
{
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
131538: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
13153d: 8d 65 f4 lea -0xc(%ebp),%esp
131540: 5b pop %ebx
131541: 5e pop %esi
131542: 5f pop %edi
131543: c9 leave
131544: c3 ret
00131548 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
131548: 55 push %ebp
131549: 89 e5 mov %esp,%ebp
13154b: 53 push %ebx
13154c: 83 ec 14 sub $0x14,%esp
13154f: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
131552: 85 db test %ebx,%ebx
131554: 74 4c je 1315a2 <rtems_task_variable_delete+0x5a>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
131556: 83 ec 08 sub $0x8,%esp
131559: 8d 45 f4 lea -0xc(%ebp),%eax
13155c: 50 push %eax
13155d: ff 75 08 pushl 0x8(%ebp)
131560: e8 6b 40 fe ff call 1155d0 <_Thread_Get>
switch (location) {
131565: 83 c4 10 add $0x10,%esp
131568: 8b 55 f4 mov -0xc(%ebp),%edx
13156b: 85 d2 test %edx,%edx
13156d: 74 0d je 13157c <rtems_task_variable_delete+0x34>
13156f: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
131574: 8b 5d fc mov -0x4(%ebp),%ebx
131577: c9 leave
131578: c3 ret
131579: 8d 76 00 lea 0x0(%esi),%esi
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
13157c: 8b 90 04 01 00 00 mov 0x104(%eax),%edx
while (tvp) {
131582: 85 d2 test %edx,%edx
131584: 74 17 je 13159d <rtems_task_variable_delete+0x55>
if (tvp->ptr == ptr) {
131586: 39 5a 04 cmp %ebx,0x4(%edx)
131589: 75 0a jne 131595 <rtems_task_variable_delete+0x4d>
13158b: eb 3c jmp 1315c9 <rtems_task_variable_delete+0x81>
13158d: 8d 76 00 lea 0x0(%esi),%esi
131590: 39 5a 04 cmp %ebx,0x4(%edx)
131593: 74 17 je 1315ac <rtems_task_variable_delete+0x64>
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
131595: 89 d1 mov %edx,%ecx
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
131597: 8b 12 mov (%edx),%edx
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
131599: 85 d2 test %edx,%edx
13159b: 75 f3 jne 131590 <rtems_task_variable_delete+0x48><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
13159d: e8 de 3f fe ff call 115580 <_Thread_Enable_dispatch>
1315a2: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1315a7: 8b 5d fc mov -0x4(%ebp),%ebx
1315aa: c9 leave
1315ab: c3 ret
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
1315ac: 8b 1a mov (%edx),%ebx
1315ae: 89 19 mov %ebx,(%ecx)
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
1315b0: 83 ec 08 sub $0x8,%esp
1315b3: 52 push %edx
1315b4: 50 push %eax
1315b5: e8 a2 00 00 00 call 13165c <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
1315ba: e8 c1 3f fe ff call 115580 <_Thread_Enable_dispatch>
1315bf: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1315c1: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1315c4: 8b 5d fc mov -0x4(%ebp),%ebx
1315c7: c9 leave
1315c8: c3 ret
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
1315c9: 8b 0a mov (%edx),%ecx
1315cb: 89 88 04 01 00 00 mov %ecx,0x104(%eax)
1315d1: eb dd jmp 1315b0 <rtems_task_variable_delete+0x68>
001315d4 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
1315d4: 55 push %ebp
1315d5: 89 e5 mov %esp,%ebp
1315d7: 56 push %esi
1315d8: 53 push %ebx
1315d9: 83 ec 10 sub $0x10,%esp
1315dc: 8b 5d 0c mov 0xc(%ebp),%ebx
1315df: 8b 75 10 mov 0x10(%ebp),%esi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
1315e2: 85 db test %ebx,%ebx
1315e4: 74 56 je 13163c <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
if ( !result )
1315e6: 85 f6 test %esi,%esi
1315e8: 74 52 je 13163c <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
1315ea: 83 ec 08 sub $0x8,%esp
1315ed: 8d 45 f4 lea -0xc(%ebp),%eax
1315f0: 50 push %eax
1315f1: ff 75 08 pushl 0x8(%ebp)
1315f4: e8 d7 3f fe ff call 1155d0 <_Thread_Get>
switch (location) {
1315f9: 83 c4 10 add $0x10,%esp
1315fc: 8b 55 f4 mov -0xc(%ebp),%edx
1315ff: 85 d2 test %edx,%edx
131601: 75 2d jne 131630 <rtems_task_variable_get+0x5c>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
131603: 8b 80 04 01 00 00 mov 0x104(%eax),%eax
while (tvp) {
131609: 85 c0 test %eax,%eax
13160b: 75 09 jne 131616 <rtems_task_variable_get+0x42>
13160d: eb 39 jmp 131648 <rtems_task_variable_get+0x74>
13160f: 90 nop
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
131610: 8b 00 mov (%eax),%eax
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
131612: 85 c0 test %eax,%eax
131614: 74 32 je 131648 <rtems_task_variable_get+0x74><== NEVER TAKEN
if (tvp->ptr == ptr) {
131616: 39 58 04 cmp %ebx,0x4(%eax)
131619: 75 f5 jne 131610 <rtems_task_variable_get+0x3c>
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
13161b: 8b 40 0c mov 0xc(%eax),%eax
13161e: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
131620: e8 5b 3f fe ff call 115580 <_Thread_Enable_dispatch>
131625: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
131627: 8d 65 f8 lea -0x8(%ebp),%esp
13162a: 5b pop %ebx
13162b: 5e pop %esi
13162c: c9 leave
13162d: c3 ret
13162e: 66 90 xchg %ax,%ax
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
131630: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
131635: 8d 65 f8 lea -0x8(%ebp),%esp
131638: 5b pop %ebx
131639: 5e pop %esi
13163a: c9 leave
13163b: c3 ret
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
13163c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
131641: 8d 65 f8 lea -0x8(%ebp),%esp
131644: 5b pop %ebx
131645: 5e pop %esi
131646: c9 leave
131647: c3 ret
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
131648: e8 33 3f fe ff call 115580 <_Thread_Enable_dispatch>
13164d: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
131652: 8d 65 f8 lea -0x8(%ebp),%esp
131655: 5b pop %ebx
131656: 5e pop %esi
131657: c9 leave
131658: c3 ret
0010cfc4 <rtems_task_wake_when>:
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
10cfc4: 55 push %ebp
10cfc5: 89 e5 mov %esp,%ebp
10cfc7: 53 push %ebx
10cfc8: 83 ec 14 sub $0x14,%esp
10cfcb: 8b 5d 08 mov 0x8(%ebp),%ebx
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
10cfce: 80 3d 8c b4 12 00 00 cmpb $0x0,0x12b48c
10cfd5: 0f 84 a9 00 00 00 je 10d084 <rtems_task_wake_when+0xc0>
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
10cfdb: 85 db test %ebx,%ebx
10cfdd: 0f 84 ad 00 00 00 je 10d090 <rtems_task_wake_when+0xcc>
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
10cfe3: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
if ( !_TOD_Validate( time_buffer ) )
10cfea: 83 ec 0c sub $0xc,%esp
10cfed: 53 push %ebx
10cfee: e8 ed f3 ff ff call 10c3e0 <_TOD_Validate>
10cff3: 83 c4 10 add $0x10,%esp
10cff6: 84 c0 test %al,%al
10cff8: 75 0a jne 10d004 <rtems_task_wake_when+0x40>
_Watchdog_Insert_seconds(
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
10cffa: b8 14 00 00 00 mov $0x14,%eax
}
10cfff: 8b 5d fc mov -0x4(%ebp),%ebx
10d002: c9 leave
10d003: c3 ret
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
10d004: 83 ec 0c sub $0xc,%esp
10d007: 53 push %ebx
10d008: e8 47 f3 ff ff call 10c354 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
10d00d: 83 c4 10 add $0x10,%esp
10d010: 3b 05 0c b5 12 00 cmp 0x12b50c,%eax
10d016: 76 e2 jbe 10cffa <rtems_task_wake_when+0x36>
10d018: 8b 15 78 b4 12 00 mov 0x12b478,%edx
10d01e: 42 inc %edx
10d01f: 89 15 78 b4 12 00 mov %edx,0x12b478
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
10d025: 83 ec 08 sub $0x8,%esp
10d028: 6a 10 push $0x10
10d02a: ff 35 38 b5 12 00 pushl 0x12b538
10d030: 89 45 f4 mov %eax,-0xc(%ebp)
10d033: e8 38 24 00 00 call 10f470 <_Thread_Set_state>
_Watchdog_Initialize(
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
10d038: 8b 15 38 b5 12 00 mov 0x12b538,%edx
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
_Watchdog_Initialize(
10d03e: 8b 4a 08 mov 0x8(%edx),%ecx
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10d041: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
the_watchdog->routine = routine;
10d048: c7 42 64 ec e9 10 00 movl $0x10e9ec,0x64(%edx)
the_watchdog->id = id;
10d04f: 89 4a 68 mov %ecx,0x68(%edx)
the_watchdog->user_data = user_data;
10d052: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10d059: 8b 45 f4 mov -0xc(%ebp),%eax
10d05c: 2b 05 0c b5 12 00 sub 0x12b50c,%eax
10d062: 89 42 54 mov %eax,0x54(%edx)
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
10d065: 58 pop %eax
10d066: 59 pop %ecx
10d067: 83 c2 48 add $0x48,%edx
10d06a: 52 push %edx
10d06b: 68 4c b5 12 00 push $0x12b54c
10d070: e8 fb 2a 00 00 call 10fb70 <_Watchdog_Insert>
);
_Watchdog_Insert_seconds(
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
10d075: e8 0a 1b 00 00 call 10eb84 <_Thread_Enable_dispatch>
10d07a: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10d07c: 83 c4 10 add $0x10,%esp
10d07f: e9 7b ff ff ff jmp 10cfff <rtems_task_wake_when+0x3b>
rtems_time_of_day *time_buffer
)
{
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
10d084: b8 0b 00 00 00 mov $0xb,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10d089: 8b 5d fc mov -0x4(%ebp),%ebx
10d08c: c9 leave
10d08d: c3 ret
10d08e: 66 90 xchg %ax,%ax
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
10d090: b8 09 00 00 00 mov $0x9,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10d095: 8b 5d fc mov -0x4(%ebp),%ebx
10d098: c9 leave
10d099: c3 ret
0010a760 <rtems_termios_baud_to_index>:
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
10a760: 55 push %ebp
10a761: 89 e5 mov %esp,%ebp
10a763: 8b 45 08 mov 0x8(%ebp),%eax
int baud_index;
switch (termios_baud) {
10a766: 83 f8 09 cmp $0x9,%eax
10a769: 0f 84 f1 00 00 00 je 10a860 <rtems_termios_baud_to_index+0x100><== NEVER TAKEN
10a76f: 7e 37 jle 10a7a8 <rtems_termios_baud_to_index+0x48><== ALWAYS TAKEN
10a771: 83 f8 0e cmp $0xe,%eax <== NOT EXECUTED
10a774: 0f 84 f6 00 00 00 je 10a870 <rtems_termios_baud_to_index+0x110><== NOT EXECUTED
10a77a: 7e 5c jle 10a7d8 <rtems_termios_baud_to_index+0x78><== NOT EXECUTED
10a77c: 3d 02 10 00 00 cmp $0x1002,%eax <== NOT EXECUTED
10a781: 0f 84 01 01 00 00 je 10a888 <rtems_termios_baud_to_index+0x128><== NOT EXECUTED
10a787: 0f 8e 97 00 00 00 jle 10a824 <rtems_termios_baud_to_index+0xc4><== NOT EXECUTED
10a78d: 3d 03 10 00 00 cmp $0x1003,%eax <== NOT EXECUTED
10a792: 0f 84 e0 00 00 00 je 10a878 <rtems_termios_baud_to_index+0x118><== NOT EXECUTED
10a798: 3d 04 10 00 00 cmp $0x1004,%eax <== NOT EXECUTED
10a79d: 75 51 jne 10a7f0 <rtems_termios_baud_to_index+0x90><== 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;
10a79f: b8 13 00 00 00 mov $0x13,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a7a4: c9 leave <== NOT EXECUTED
10a7a5: c3 ret <== NOT EXECUTED
10a7a6: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a7a8: 83 f8 04 cmp $0x4,%eax
10a7ab: 0f 84 b7 00 00 00 je 10a868 <rtems_termios_baud_to_index+0x108><== NEVER TAKEN
10a7b1: 7f 45 jg 10a7f8 <rtems_termios_baud_to_index+0x98><== NEVER TAKEN
10a7b3: 83 f8 01 cmp $0x1,%eax
10a7b6: 0f 84 8c 00 00 00 je 10a848 <rtems_termios_baud_to_index+0xe8><== NEVER TAKEN
10a7bc: 0f 8e de 00 00 00 jle 10a8a0 <rtems_termios_baud_to_index+0x140><== ALWAYS TAKEN
10a7c2: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
10a7c5: 0f 84 c5 00 00 00 je 10a890 <rtems_termios_baud_to_index+0x130><== NOT EXECUTED
10a7cb: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
10a7ce: 75 20 jne 10a7f0 <rtems_termios_baud_to_index+0x90><== NOT EXECUTED
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
10a7d0: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a7d5: c9 leave <== NOT EXECUTED
10a7d6: c3 ret <== NOT EXECUTED
10a7d7: 90 nop <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a7d8: 83 f8 0b cmp $0xb,%eax <== NOT EXECUTED
10a7db: 0f 84 9f 00 00 00 je 10a880 <rtems_termios_baud_to_index+0x120><== NOT EXECUTED
10a7e1: 7c 39 jl 10a81c <rtems_termios_baud_to_index+0xbc><== NOT EXECUTED
10a7e3: 83 f8 0c cmp $0xc,%eax <== NOT EXECUTED
10a7e6: 74 50 je 10a838 <rtems_termios_baud_to_index+0xd8><== NOT EXECUTED
10a7e8: 83 f8 0d cmp $0xd,%eax <== NOT EXECUTED
10a7eb: 74 62 je 10a84f <rtems_termios_baud_to_index+0xef><== NOT EXECUTED
10a7ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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;
10a7f0: b8 ff ff ff ff mov $0xffffffff,%eax
default: baud_index = -1; break;
}
return baud_index;
}
10a7f5: c9 leave
10a7f6: c3 ret
10a7f7: 90 nop
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a7f8: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
10a7fb: 74 43 je 10a840 <rtems_termios_baud_to_index+0xe0><== NOT EXECUTED
10a7fd: 7c 15 jl 10a814 <rtems_termios_baud_to_index+0xb4><== NOT EXECUTED
10a7ff: 83 f8 07 cmp $0x7,%eax <== NOT EXECUTED
10a802: 0f 84 90 00 00 00 je 10a898 <rtems_termios_baud_to_index+0x138><== NOT EXECUTED
10a808: 83 f8 08 cmp $0x8,%eax <== NOT EXECUTED
10a80b: 75 e3 jne 10a7f0 <rtems_termios_baud_to_index+0x90><== 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;
10a80d: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a812: c9 leave <== NOT EXECUTED
10a813: c3 ret <== NOT EXECUTED
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
10a814: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a819: c9 leave <== NOT EXECUTED
10a81a: c3 ret <== NOT EXECUTED
10a81b: 90 nop <== 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;
10a81c: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a821: c9 leave <== NOT EXECUTED
10a822: c3 ret <== NOT EXECUTED
10a823: 90 nop <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a824: 83 f8 0f cmp $0xf,%eax <== NOT EXECUTED
10a827: 74 2f je 10a858 <rtems_termios_baud_to_index+0xf8><== NOT EXECUTED
10a829: 3d 01 10 00 00 cmp $0x1001,%eax <== NOT EXECUTED
10a82e: 75 c0 jne 10a7f0 <rtems_termios_baud_to_index+0x90><== 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;
10a830: b8 10 00 00 00 mov $0x10,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a835: c9 leave <== NOT EXECUTED
10a836: c3 ret <== NOT EXECUTED
10a837: 90 nop <== 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;
10a838: b8 0c 00 00 00 mov $0xc,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a83d: c9 leave <== NOT EXECUTED
10a83e: c3 ret <== NOT EXECUTED
10a83f: 90 nop <== 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;
10a840: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a845: c9 leave <== NOT EXECUTED
10a846: c3 ret <== NOT EXECUTED
10a847: 90 nop <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a848: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a84d: c9 leave <== NOT EXECUTED
10a84e: c3 ret <== 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;
10a84f: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a854: c9 leave <== NOT EXECUTED
10a855: c3 ret <== NOT EXECUTED
10a856: 66 90 xchg %ax,%ax <== 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;
10a858: b8 0f 00 00 00 mov $0xf,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a85d: c9 leave <== NOT EXECUTED
10a85e: c3 ret <== NOT EXECUTED
10a85f: 90 nop <== NOT EXECUTED
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;
10a860: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a865: c9 leave <== NOT EXECUTED
10a866: c3 ret <== NOT EXECUTED
10a867: 90 nop <== NOT EXECUTED
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
10a868: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a86d: c9 leave <== NOT EXECUTED
10a86e: c3 ret <== NOT EXECUTED
10a86f: 90 nop <== 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;
10a870: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a875: c9 leave <== NOT EXECUTED
10a876: c3 ret <== NOT EXECUTED
10a877: 90 nop <== 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;
10a878: b8 12 00 00 00 mov $0x12,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a87d: c9 leave <== NOT EXECUTED
10a87e: c3 ret <== NOT EXECUTED
10a87f: 90 nop <== 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;
10a880: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a885: c9 leave <== NOT EXECUTED
10a886: c3 ret <== NOT EXECUTED
10a887: 90 nop <== 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;
10a888: b8 11 00 00 00 mov $0x11,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a88d: c9 leave <== NOT EXECUTED
10a88e: c3 ret <== NOT EXECUTED
10a88f: 90 nop <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a890: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a895: c9 leave <== NOT EXECUTED
10a896: c3 ret <== NOT EXECUTED
10a897: 90 nop <== 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;
10a898: b8 07 00 00 00 mov $0x7,%eax <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a89d: c9 leave <== NOT EXECUTED
10a89e: c3 ret <== NOT EXECUTED
10a89f: 90 nop <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a8a0: 85 c0 test %eax,%eax
10a8a2: 0f 85 48 ff ff ff jne 10a7f0 <rtems_termios_baud_to_index+0x90><== ALWAYS TAKEN
10a8a8: 31 c0 xor %eax,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a8aa: c9 leave <== NOT EXECUTED
10a8ab: c3 ret <== NOT EXECUTED
001094cc <rtems_termios_baud_to_number>:
#include <rtems/termiostypes.h>
int32_t rtems_termios_baud_to_number(
int termios_baud
)
{
1094cc: 55 push %ebp
1094cd: 89 e5 mov %esp,%ebp
1094cf: 8b 45 08 mov 0x8(%ebp),%eax
int32_t baud;
switch (termios_baud) {
1094d2: 83 f8 09 cmp $0x9,%eax
1094d5: 0f 84 f1 00 00 00 je 1095cc <rtems_termios_baud_to_number+0x100>
1094db: 7e 37 jle 109514 <rtems_termios_baud_to_number+0x48>
1094dd: 83 f8 0e cmp $0xe,%eax
1094e0: 0f 84 f6 00 00 00 je 1095dc <rtems_termios_baud_to_number+0x110>
1094e6: 7e 5c jle 109544 <rtems_termios_baud_to_number+0x78>
1094e8: 3d 02 10 00 00 cmp $0x1002,%eax
1094ed: 0f 84 01 01 00 00 je 1095f4 <rtems_termios_baud_to_number+0x128>
1094f3: 0f 8e 97 00 00 00 jle 109590 <rtems_termios_baud_to_number+0xc4>
1094f9: 3d 03 10 00 00 cmp $0x1003,%eax
1094fe: 0f 84 e0 00 00 00 je 1095e4 <rtems_termios_baud_to_number+0x118>
109504: 3d 04 10 00 00 cmp $0x1004,%eax
109509: 75 51 jne 10955c <rtems_termios_baud_to_number+0x90><== NEVER TAKEN
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
10950b: b8 00 08 07 00 mov $0x70800,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
109510: c9 leave
109511: c3 ret
109512: 66 90 xchg %ax,%ax
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
109514: 83 f8 04 cmp $0x4,%eax
109517: 0f 84 b7 00 00 00 je 1095d4 <rtems_termios_baud_to_number+0x108>
10951d: 7f 45 jg 109564 <rtems_termios_baud_to_number+0x98>
10951f: 83 f8 01 cmp $0x1,%eax
109522: 0f 84 8c 00 00 00 je 1095b4 <rtems_termios_baud_to_number+0xe8>
109528: 0f 8e de 00 00 00 jle 10960c <rtems_termios_baud_to_number+0x140>
10952e: 83 f8 02 cmp $0x2,%eax
109531: 0f 84 c5 00 00 00 je 1095fc <rtems_termios_baud_to_number+0x130>
109537: 83 f8 03 cmp $0x3,%eax
10953a: 75 20 jne 10955c <rtems_termios_baud_to_number+0x90><== NEVER TAKEN
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
10953c: b8 6e 00 00 00 mov $0x6e,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
109541: c9 leave
109542: c3 ret
109543: 90 nop
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
109544: 83 f8 0b cmp $0xb,%eax
109547: 0f 84 9f 00 00 00 je 1095ec <rtems_termios_baud_to_number+0x120>
10954d: 7c 39 jl 109588 <rtems_termios_baud_to_number+0xbc>
10954f: 83 f8 0c cmp $0xc,%eax
109552: 74 50 je 1095a4 <rtems_termios_baud_to_number+0xd8>
109554: 83 f8 0d cmp $0xd,%eax
109557: 74 62 je 1095bb <rtems_termios_baud_to_number+0xef><== ALWAYS TAKEN
109559: 8d 76 00 lea 0x0(%esi),%esi
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
10955c: b8 ff ff ff ff mov $0xffffffff,%eax
default: baud = -1; break;
}
return baud;
}
109561: c9 leave
109562: c3 ret
109563: 90 nop
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
109564: 83 f8 06 cmp $0x6,%eax
109567: 74 43 je 1095ac <rtems_termios_baud_to_number+0xe0>
109569: 7c 15 jl 109580 <rtems_termios_baud_to_number+0xb4>
10956b: 83 f8 07 cmp $0x7,%eax
10956e: 0f 84 90 00 00 00 je 109604 <rtems_termios_baud_to_number+0x138>
109574: 83 f8 08 cmp $0x8,%eax
109577: 75 e3 jne 10955c <rtems_termios_baud_to_number+0x90><== NEVER TAKEN
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
109579: b8 58 02 00 00 mov $0x258,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
10957e: c9 leave
10957f: c3 ret
switch (termios_baud) {
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
109580: b8 96 00 00 00 mov $0x96,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
109585: c9 leave
109586: c3 ret
109587: 90 nop
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
109588: b8 08 07 00 00 mov $0x708,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
10958d: c9 leave
10958e: c3 ret
10958f: 90 nop
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
109590: 83 f8 0f cmp $0xf,%eax
109593: 74 2f je 1095c4 <rtems_termios_baud_to_number+0xf8>
109595: 3d 01 10 00 00 cmp $0x1001,%eax
10959a: 75 c0 jne 10955c <rtems_termios_baud_to_number+0x90><== NEVER TAKEN
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
10959c: b8 00 e1 00 00 mov $0xe100,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
1095a1: c9 leave
1095a2: c3 ret
1095a3: 90 nop
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
1095a4: b8 c0 12 00 00 mov $0x12c0,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
1095a9: c9 leave
1095aa: c3 ret
1095ab: 90 nop
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
1095ac: b8 c8 00 00 00 mov $0xc8,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
1095b1: c9 leave
1095b2: c3 ret
1095b3: 90 nop
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
1095b4: b8 32 00 00 00 mov $0x32,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
1095b9: c9 leave
1095ba: c3 ret
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
1095bb: b8 80 25 00 00 mov $0x2580,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
1095c0: c9 leave
1095c1: c3 ret
1095c2: 66 90 xchg %ax,%ax
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
1095c4: b8 00 96 00 00 mov $0x9600,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
1095c9: c9 leave
1095ca: c3 ret
1095cb: 90 nop
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
1095cc: b8 b0 04 00 00 mov $0x4b0,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
1095d1: c9 leave
1095d2: c3 ret
1095d3: 90 nop
switch (termios_baud) {
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
1095d4: b8 86 00 00 00 mov $0x86,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
1095d9: c9 leave
1095da: c3 ret
1095db: 90 nop
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
1095dc: b8 00 4b 00 00 mov $0x4b00,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
1095e1: c9 leave
1095e2: c3 ret
1095e3: 90 nop
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
1095e4: b8 00 84 03 00 mov $0x38400,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
1095e9: c9 leave
1095ea: c3 ret
1095eb: 90 nop
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
1095ec: b8 60 09 00 00 mov $0x960,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
1095f1: c9 leave
1095f2: c3 ret
1095f3: 90 nop
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
1095f4: b8 00 c2 01 00 mov $0x1c200,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
1095f9: c9 leave
1095fa: c3 ret
1095fb: 90 nop
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
1095fc: b8 4b 00 00 00 mov $0x4b,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
109601: c9 leave
109602: c3 ret
109603: 90 nop
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
109604: b8 2c 01 00 00 mov $0x12c,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
109609: c9 leave
10960a: c3 ret
10960b: 90 nop
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
10960c: 85 c0 test %eax,%eax
10960e: 0f 85 48 ff ff ff jne 10955c <rtems_termios_baud_to_number+0x90>
109614: 31 c0 xor %eax,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
109616: c9 leave
109617: c3 ret
00109654 <rtems_termios_bufsize>:
rtems_status_code rtems_termios_bufsize (
int cbufsize,
int raw_input,
int raw_output
)
{
109654: 55 push %ebp <== NOT EXECUTED
109655: 89 e5 mov %esp,%ebp <== NOT EXECUTED
rtems_termios_cbufsize = cbufsize;
109657: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10965a: a3 14 70 12 00 mov %eax,0x127014 <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
10965f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
109662: a3 18 70 12 00 mov %eax,0x127018 <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
109667: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
10966a: a3 1c 70 12 00 mov %eax,0x12701c <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
10966f: 31 c0 xor %eax,%eax <== NOT EXECUTED
109671: c9 leave <== NOT EXECUTED
109672: c3 ret <== NOT EXECUTED
0010aae8 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
10aae8: 55 push %ebp
10aae9: 89 e5 mov %esp,%ebp
10aaeb: 56 push %esi
10aaec: 53 push %ebx
10aaed: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10aaf0: 8b 06 mov (%esi),%eax
10aaf2: 8b 58 34 mov 0x34(%eax),%ebx
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10aaf5: 50 push %eax
10aaf6: 6a 00 push $0x0
10aaf8: 6a 00 push $0x0
10aafa: ff 35 cc 92 12 00 pushl 0x1292cc
10ab00: e8 df 11 00 00 call 10bce4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
10ab05: 83 c4 10 add $0x10,%esp
10ab08: 85 c0 test %eax,%eax
10ab0a: 0f 85 92 01 00 00 jne 10aca2 <rtems_termios_close+0x1ba><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
10ab10: 8b 43 08 mov 0x8(%ebx),%eax
10ab13: 48 dec %eax
10ab14: 89 43 08 mov %eax,0x8(%ebx)
10ab17: 85 c0 test %eax,%eax
10ab19: 0f 85 bf 00 00 00 jne 10abde <rtems_termios_close+0xf6>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
10ab1f: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10ab25: c1 e0 05 shl $0x5,%eax
10ab28: 8b 80 44 8f 12 00 mov 0x128f44(%eax),%eax
10ab2e: 85 c0 test %eax,%eax
10ab30: 0f 84 12 01 00 00 je 10ac48 <rtems_termios_close+0x160><== ALWAYS TAKEN
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
10ab36: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ab39: 53 push %ebx <== NOT EXECUTED
10ab3a: ff d0 call *%eax <== NOT EXECUTED
10ab3c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts
10ab3f: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) <== NOT EXECUTED
10ab46: 0f 84 24 01 00 00 je 10ac70 <rtems_termios_close+0x188><== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
10ab4c: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax
10ab52: 85 c0 test %eax,%eax
10ab54: 74 0d je 10ab63 <rtems_termios_close+0x7b>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
10ab56: 52 push %edx
10ab57: 56 push %esi
10ab58: ff 73 10 pushl 0x10(%ebx)
10ab5b: ff 73 0c pushl 0xc(%ebx)
10ab5e: ff d0 call *%eax
10ab60: 83 c4 10 add $0x10,%esp
if (tty->forw == NULL) {
10ab63: 8b 03 mov (%ebx),%eax
10ab65: 85 c0 test %eax,%eax
10ab67: 0f 84 9b 00 00 00 je 10ac08 <rtems_termios_close+0x120>
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
}
else {
tty->forw->back = tty->back;
10ab6d: 8b 53 04 mov 0x4(%ebx),%edx
10ab70: 89 50 04 mov %edx,0x4(%eax)
}
if (tty->back == NULL) {
10ab73: 8b 53 04 mov 0x4(%ebx),%edx
10ab76: 85 d2 test %edx,%edx
10ab78: 0f 84 ae 00 00 00 je 10ac2c <rtems_termios_close+0x144><== ALWAYS TAKEN
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
}
else {
tty->back->forw = tty->forw;
10ab7e: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
10ab80: 83 ec 0c sub $0xc,%esp
10ab83: ff 73 14 pushl 0x14(%ebx)
10ab86: e8 b5 10 00 00 call 10bc40 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
10ab8b: 58 pop %eax
10ab8c: ff 73 18 pushl 0x18(%ebx)
10ab8f: e8 ac 10 00 00 call 10bc40 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
10ab94: 5e pop %esi
10ab95: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
10ab9b: e8 a0 10 00 00 call 10bc40 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
10aba0: 83 c4 10 add $0x10,%esp
10aba3: 8b 8b a0 00 00 00 mov 0xa0(%ebx),%ecx
10aba9: 85 c9 test %ecx,%ecx
10abab: 74 4b je 10abf8 <rtems_termios_close+0x110>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
10abad: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
10abb4: 74 42 je 10abf8 <rtems_termios_close+0x110><== NEVER TAKEN
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
10abb6: 83 ec 0c sub $0xc,%esp
10abb9: ff 73 58 pushl 0x58(%ebx)
10abbc: e8 23 da ff ff call 1085e4 <free>
free (tty->rawOutBuf.theBuf);
10abc1: 5a pop %edx
10abc2: ff 73 7c pushl 0x7c(%ebx)
10abc5: e8 1a da ff ff call 1085e4 <free>
free (tty->cbuf);
10abca: 58 pop %eax
10abcb: ff 73 1c pushl 0x1c(%ebx)
10abce: e8 11 da ff ff call 1085e4 <free>
free (tty);
10abd3: 89 1c 24 mov %ebx,(%esp)
10abd6: e8 09 da ff ff call 1085e4 <free>
10abdb: 83 c4 10 add $0x10,%esp
}
rtems_semaphore_release (rtems_termios_ttyMutex);
10abde: 83 ec 0c sub $0xc,%esp
10abe1: ff 35 cc 92 12 00 pushl 0x1292cc
10abe7: e8 f4 11 00 00 call 10bde0 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
10abec: 31 c0 xor %eax,%eax
10abee: 8d 65 f8 lea -0x8(%ebp),%esp
10abf1: 5b pop %ebx
10abf2: 5e pop %esi
10abf3: c9 leave
10abf4: c3 ret
10abf5: 8d 76 00 lea 0x0(%esi),%esi
rtems_semaphore_delete (tty->isem);
rtems_semaphore_delete (tty->osem);
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
10abf8: 83 ec 0c sub $0xc,%esp
10abfb: ff 73 68 pushl 0x68(%ebx)
10abfe: e8 3d 10 00 00 call 10bc40 <rtems_semaphore_delete>
10ac03: 83 c4 10 add $0x10,%esp
10ac06: eb ae jmp 10abb6 <rtems_termios_close+0xce>
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
10ac08: 8b 43 04 mov 0x4(%ebx),%eax
10ac0b: a3 d0 92 12 00 mov %eax,0x1292d0
if ( rtems_termios_ttyTail != NULL ) {
10ac10: 85 c0 test %eax,%eax
10ac12: 0f 84 94 00 00 00 je 10acac <rtems_termios_close+0x1c4><== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
10ac18: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
10ac1e: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
10ac20: 8b 53 04 mov 0x4(%ebx),%edx <== NOT EXECUTED
10ac23: 85 d2 test %edx,%edx <== NOT EXECUTED
10ac25: 0f 85 53 ff ff ff jne 10ab7e <rtems_termios_close+0x96><== NOT EXECUTED
10ac2b: 90 nop <== NOT EXECUTED
rtems_termios_ttyHead = tty->forw;
10ac2c: a3 d4 92 12 00 mov %eax,0x1292d4
if ( rtems_termios_ttyHead != NULL ) {
10ac31: 85 c0 test %eax,%eax
10ac33: 0f 84 47 ff ff ff je 10ab80 <rtems_termios_close+0x98><== NEVER TAKEN
rtems_termios_ttyHead->back = NULL;
10ac39: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
10ac40: e9 3b ff ff ff jmp 10ab80 <rtems_termios_close+0x98>
10ac45: 8d 76 00 lea 0x0(%esi),%esi
}
else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10ac48: 51 push %ecx
10ac49: 6a 00 push $0x0
10ac4b: 6a 00 push $0x0
10ac4d: ff 73 18 pushl 0x18(%ebx)
10ac50: e8 8f 10 00 00 call 10bce4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
10ac55: 83 c4 10 add $0x10,%esp
10ac58: 85 c0 test %eax,%eax
10ac5a: 75 46 jne 10aca2 <rtems_termios_close+0x1ba><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
10ac5c: 89 d8 mov %ebx,%eax
10ac5e: e8 c1 f6 ff ff call 10a324 <drainOutput>
}
if (tty->device.outputUsesInterrupts
10ac63: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
10ac6a: 0f 85 dc fe ff ff jne 10ab4c <rtems_termios_close+0x64><== ALWAYS TAKEN
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
10ac70: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10ac73: 6a 01 push $0x1 <== NOT EXECUTED
10ac75: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED
10ac7b: e8 68 0b 00 00 call 10b7e8 <rtems_event_send> <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
10ac80: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ac83: 85 c0 test %eax,%eax <== NOT EXECUTED
10ac85: 75 1b jne 10aca2 <rtems_termios_close+0x1ba><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send(
10ac87: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10ac8a: 6a 01 push $0x1 <== NOT EXECUTED
10ac8c: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED
10ac92: e8 51 0b 00 00 call 10b7e8 <rtems_event_send> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
10ac97: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ac9a: 85 c0 test %eax,%eax <== NOT EXECUTED
10ac9c: 0f 84 aa fe ff ff je 10ab4c <rtems_termios_close+0x64><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
10aca2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10aca5: 50 push %eax <== NOT EXECUTED
10aca6: e8 4d 16 00 00 call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
10acab: 90 nop <== NOT EXECUTED
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
10acac: c7 05 d4 92 12 00 00 movl $0x0,0x1292d4
10acb3: 00 00 00
10acb6: e9 c5 fe ff ff jmp 10ab80 <rtems_termios_close+0x98>
001098b0 <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)
{
1098b0: 55 push %ebp
1098b1: 89 e5 mov %esp,%ebp
1098b3: 83 ec 08 sub $0x8,%esp
1098b6: 8b 45 08 mov 0x8(%ebp),%eax
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
1098b9: 8b 55 0c mov 0xc(%ebp),%edx
1098bc: 01 90 90 00 00 00 add %edx,0x90(%eax)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
1098c2: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
1098c9: 74 2d je 1098f8 <rtems_termios_dequeue_characters+0x48><== NEVER TAKEN
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
else if (tty->t_line == PPPDISC ) {
1098cb: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax)
1098d2: 74 0c je 1098e0 <rtems_termios_dequeue_characters+0x30><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
1098d4: 89 45 08 mov %eax,0x8(%ebp)
}
}
1098d7: 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);
1098d8: e9 b3 fd ff ff jmp 109690 <rtems_termios_refill_transmitter>
1098dd: 8d 76 00 lea 0x0(%esi),%esi
}
else if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
1098e0: 8b 15 f4 8f 12 00 mov 0x128ff4,%edx <== NOT EXECUTED
1098e6: 85 d2 test %edx,%edx <== NOT EXECUTED
1098e8: 74 09 je 1098f3 <rtems_termios_dequeue_characters+0x43><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
1098ea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1098ed: 50 push %eax <== NOT EXECUTED
1098ee: ff d2 call *%edx <== NOT EXECUTED
1098f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
}
}
1098f3: 31 c0 xor %eax,%eax <== NOT EXECUTED
1098f5: c9 leave <== NOT EXECUTED
1098f6: c3 ret <== NOT EXECUTED
1098f7: 90 nop <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId,
1098f8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1098fb: 6a 02 push $0x2 <== NOT EXECUTED
1098fd: ff b0 c8 00 00 00 pushl 0xc8(%eax) <== NOT EXECUTED
109903: e8 e0 1e 00 00 call 10b7e8 <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
109908: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10990b: 85 c0 test %eax,%eax <== NOT EXECUTED
10990d: 74 e4 je 1098f3 <rtems_termios_dequeue_characters+0x43><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
10990f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109912: 50 push %eax <== NOT EXECUTED
109913: e8 e0 29 00 00 call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
00109918 <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)
{
109918: 55 push %ebp <== NOT EXECUTED
109919: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10991b: 57 push %edi <== NOT EXECUTED
10991c: 56 push %esi <== NOT EXECUTED
10991d: 53 push %ebx <== NOT EXECUTED
10991e: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
109921: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
109924: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
109927: 8b 7d 10 mov 0x10(%ebp),%edi <== 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) {
10992a: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
109930: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
109933: 8b 80 50 8f 12 00 mov 0x128f50(%eax),%eax <== NOT EXECUTED
109939: 85 c0 test %eax,%eax <== NOT EXECUTED
10993b: 0f 84 8b 00 00 00 je 1099cc <rtems_termios_enqueue_raw_characters+0xb4><== NOT EXECUTED
while (len--) {
109941: 85 ff test %edi,%edi <== NOT EXECUTED
109943: 74 2e je 109973 <rtems_termios_enqueue_raw_characters+0x5b><== NOT EXECUTED
109945: 31 d2 xor %edx,%edx <== NOT EXECUTED
109947: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED
10994a: 89 f7 mov %esi,%edi <== NOT EXECUTED
10994c: 89 d6 mov %edx,%esi <== NOT EXECUTED
10994e: eb 0f jmp 10995f <rtems_termios_enqueue_raw_characters+0x47><== NOT EXECUTED
109950: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
109956: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
109959: 8b 80 50 8f 12 00 mov 0x128f50(%eax),%eax <== NOT EXECUTED
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
10995f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
109962: 53 push %ebx <== NOT EXECUTED
109963: 0f be 14 37 movsbl (%edi,%esi,1),%edx <== NOT EXECUTED
109967: 52 push %edx <== NOT EXECUTED
109968: ff d0 call *%eax <== NOT EXECUTED
10996a: 46 inc %esi <== 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--) {
10996b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10996e: 39 75 e4 cmp %esi,-0x1c(%ebp) <== NOT EXECUTED
109971: 75 dd jne 109950 <rtems_termios_enqueue_raw_characters+0x38><== NOT EXECUTED
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
109973: 8b 93 e4 00 00 00 mov 0xe4(%ebx),%edx <== NOT EXECUTED
109979: 85 d2 test %edx,%edx <== NOT EXECUTED
10997b: 75 3b jne 1099b8 <rtems_termios_enqueue_raw_characters+0xa0><== NOT EXECUTED
10997d: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED
109983: 85 c0 test %eax,%eax <== NOT EXECUTED
109985: 74 31 je 1099b8 <rtems_termios_enqueue_raw_characters+0xa0><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
109987: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10998a: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED
109990: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
109993: 52 push %edx <== NOT EXECUTED
109994: ff d0 call *%eax <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
109996: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED
10999d: 00 00 00
1099a0: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
1099a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
1099aa: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
1099ad: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1099b0: 5b pop %ebx <== NOT EXECUTED
1099b1: 5e pop %esi <== NOT EXECUTED
1099b2: 5f pop %edi <== NOT EXECUTED
1099b3: c9 leave <== NOT EXECUTED
1099b4: c3 ret <== NOT EXECUTED
1099b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
1099b8: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
}
1099bf: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
1099c2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1099c5: 5b pop %ebx <== NOT EXECUTED
1099c6: 5e pop %esi <== NOT EXECUTED
1099c7: 5f pop %edi <== NOT EXECUTED
1099c8: c9 leave <== NOT EXECUTED
1099c9: c3 ret <== NOT EXECUTED
1099ca: 66 90 xchg %ax,%ax <== 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,
1099cc: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED
1099cf: 89 45 cc mov %eax,-0x34(%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);
1099d2: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
1099d5: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
1099d8: c6 45 db 00 movb $0x0,-0x25(%ebp) <== NOT EXECUTED
1099dc: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
1099e3: 85 ff test %edi,%edi <== NOT EXECUTED
1099e5: 0f 84 0b 01 00 00 je 109af6 <rtems_termios_enqueue_raw_characters+0x1de><== NOT EXECUTED
1099eb: 90 nop <== NOT EXECUTED
c = *buf++;
1099ec: 8a 06 mov (%esi),%al <== NOT EXECUTED
1099ee: 88 45 e4 mov %al,-0x1c(%ebp) <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
1099f1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1099f7: f6 c4 02 test $0x2,%ah <== NOT EXECUTED
1099fa: 74 1c je 109a18 <rtems_termios_enqueue_raw_characters+0x100><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
1099fc: 0f be 45 e4 movsbl -0x1c(%ebp),%eax <== NOT EXECUTED
109a00: 0f b6 53 4a movzbl 0x4a(%ebx),%edx <== NOT EXECUTED
109a04: 39 d0 cmp %edx,%eax <== NOT EXECUTED
109a06: 0f 84 0c 01 00 00 je 109b18 <rtems_termios_enqueue_raw_characters+0x200><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
109a0c: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED
109a10: 39 d0 cmp %edx,%eax <== NOT EXECUTED
109a12: 0f 84 54 01 00 00 je 109b6c <rtems_termios_enqueue_raw_characters+0x254><== NOT EXECUTED
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
109a18: 80 7d db 00 cmpb $0x0,-0x25(%ebp) <== NOT EXECUTED
109a1c: 0f 85 11 01 00 00 jne 109b33 <rtems_termios_enqueue_raw_characters+0x21b><== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
109a22: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
109a25: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED
109a28: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
109a2b: 40 inc %eax <== NOT EXECUTED
109a2c: 31 d2 xor %edx,%edx <== NOT EXECUTED
109a2e: f7 75 dc divl -0x24(%ebp) <== NOT EXECUTED
109a31: 89 d1 mov %edx,%ecx <== NOT EXECUTED
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
109a33: 9c pushf <== NOT EXECUTED
109a34: fa cli <== NOT EXECUTED
109a35: 8f 45 d4 popl -0x2c(%ebp) <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
109a38: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED
109a3b: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED
109a3e: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED
109a41: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED
109a44: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
109a47: 2b 45 c4 sub -0x3c(%ebp),%eax <== NOT EXECUTED
109a4a: 01 c8 add %ecx,%eax <== NOT EXECUTED
109a4c: 31 d2 xor %edx,%edx <== NOT EXECUTED
109a4e: f7 75 dc divl -0x24(%ebp) <== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
109a51: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx <== NOT EXECUTED
109a57: 76 47 jbe 109aa0 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
109a59: 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)
109a5f: a8 01 test $0x1,%al <== NOT EXECUTED
109a61: 75 3d jne 109aa0 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
109a63: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109a69: 83 c8 01 or $0x1,%eax <== NOT EXECUTED
109a6c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
109a72: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109a78: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED
109a7d: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED
109a82: 0f 84 27 01 00 00 je 109baf <rtems_termios_enqueue_raw_characters+0x297><== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]),
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
109a88: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109a8e: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED
109a93: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED
109a98: 0f 84 55 01 00 00 je 109bf3 <rtems_termios_enqueue_raw_characters+0x2db><== NOT EXECUTED
109a9e: 66 90 xchg %ax,%ax <== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
109aa0: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
109aa3: 9d popf <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
109aa4: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED
109aa7: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
109aa9: 0f 84 b5 00 00 00 je 109b64 <rtems_termios_enqueue_raw_characters+0x24c><== NOT EXECUTED
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
109aaf: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED
109ab2: 8a 55 e4 mov -0x1c(%ebp),%dl <== NOT EXECUTED
109ab5: 88 14 08 mov %dl,(%eax,%ecx,1) <== NOT EXECUTED
tty->rawInBuf.Tail = newTail;
109ab8: 89 4b 60 mov %ecx,0x60(%ebx) <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
109abb: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax <== NOT EXECUTED
109ac1: 85 c0 test %eax,%eax <== NOT EXECUTED
109ac3: 75 27 jne 109aec <rtems_termios_enqueue_raw_characters+0x1d4><== NOT EXECUTED
109ac5: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED
109acb: 85 c0 test %eax,%eax <== NOT EXECUTED
109acd: 74 1d je 109aec <rtems_termios_enqueue_raw_characters+0x1d4><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
109acf: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
109ad2: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED
109ad8: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
109adb: ff d0 call *%eax <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
109add: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED
109ae4: 00 00 00
109ae7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109aea: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
109aec: 46 inc %esi <== NOT EXECUTED
109aed: 4f dec %edi <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
109aee: 85 ff test %edi,%edi <== NOT EXECUTED
109af0: 0f 85 f6 fe ff ff jne 1099ec <rtems_termios_enqueue_raw_characters+0xd4><== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
109af6: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
109af9: 01 43 78 add %eax,0x78(%ebx) <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
109afc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109aff: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED
109b02: e8 d9 22 00 00 call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
return dropped;
109b07: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
109b0a: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
109b0d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
109b10: 5b pop %ebx <== NOT EXECUTED
109b11: 5e pop %esi <== NOT EXECUTED
109b12: 5f pop %edi <== NOT EXECUTED
109b13: c9 leave <== NOT EXECUTED
109b14: c3 ret <== NOT EXECUTED
109b15: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
109b18: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED
109b1c: 39 d0 cmp %edx,%eax <== NOT EXECUTED
109b1e: 74 7e je 109b9e <rtems_termios_enqueue_raw_characters+0x286><== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
109b20: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109b26: 83 c8 10 or $0x10,%eax <== NOT EXECUTED
109b29: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
109b2f: c6 45 db 01 movb $0x1,-0x25(%ebp) <== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
109b33: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109b39: 83 e0 30 and $0x30,%eax <== NOT EXECUTED
109b3c: 83 f8 20 cmp $0x20,%eax <== NOT EXECUTED
109b3f: 75 ab jne 109aec <rtems_termios_enqueue_raw_characters+0x1d4><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
109b41: 9c pushf <== NOT EXECUTED
109b42: fa cli <== NOT EXECUTED
109b43: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
109b44: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109b4a: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
109b4d: 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) {
109b53: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED
109b59: 85 c0 test %eax,%eax <== NOT EXECUTED
109b5b: 75 20 jne 109b7d <rtems_termios_enqueue_raw_characters+0x265><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
109b5d: 52 push %edx <== NOT EXECUTED
109b5e: 9d popf <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
109b5f: 46 inc %esi <== NOT EXECUTED
109b60: 4f dec %edi <== NOT EXECUTED
109b61: eb 8b jmp 109aee <rtems_termios_enqueue_raw_characters+0x1d6><== NOT EXECUTED
109b63: 90 nop <== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
109b64: ff 45 e0 incl -0x20(%ebp) <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
109b67: 46 inc %esi <== NOT EXECUTED
109b68: 4f dec %edi <== NOT EXECUTED
109b69: eb 83 jmp 109aee <rtems_termios_enqueue_raw_characters+0x1d6><== NOT EXECUTED
109b6b: 90 nop <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
109b6c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109b72: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED
109b75: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
109b7b: eb b2 jmp 109b2f <rtems_termios_enqueue_raw_characters+0x217><== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
109b7d: 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,
109b83: 51 push %ecx <== NOT EXECUTED
109b84: 6a 01 push $0x1 <== NOT EXECUTED
109b86: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
109b89: 50 push %eax <== NOT EXECUTED
109b8a: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
109b8d: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED
109b90: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
109b96: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109b99: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
109b9c: eb bf jmp 109b5d <rtems_termios_enqueue_raw_characters+0x245><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
109b9e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109ba4: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED
109ba7: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
109bad: eb 80 jmp 109b2f <rtems_termios_enqueue_raw_characters+0x217><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
109baf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109bb5: a8 20 test $0x20,%al <== NOT EXECUTED
109bb7: 75 0e jne 109bc7 <rtems_termios_enqueue_raw_characters+0x2af><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
109bb9: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED
109bbf: 85 c0 test %eax,%eax <== NOT EXECUTED
109bc1: 0f 85 d9 fe ff ff jne 109aa0 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
109bc7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109bcd: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
109bd0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
109bd6: 52 push %edx <== NOT EXECUTED
109bd7: 6a 01 push $0x1 <== NOT EXECUTED
109bd9: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
109bdc: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
109bdf: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED
109be2: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
109be8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109beb: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
109bee: e9 ad fe ff ff jmp 109aa0 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
109bf3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109bf9: 83 c8 04 or $0x4,%eax <== NOT EXECUTED
109bfc: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
109c02: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED
109c08: 85 c0 test %eax,%eax <== NOT EXECUTED
109c0a: 0f 84 90 fe ff ff je 109aa0 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
109c10: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109c13: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
109c16: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED
109c19: ff d0 call *%eax <== NOT EXECUTED
109c1b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109c1e: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
109c21: e9 7a fe ff ff jmp 109aa0 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
00109618 <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
109618: 55 push %ebp
109619: 89 e5 mov %esp,%ebp
10961b: 83 ec 08 sub $0x8,%esp
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
10961e: a1 cc 92 12 00 mov 0x1292cc,%eax
109623: 85 c0 test %eax,%eax
109625: 74 05 je 10962c <rtems_termios_initialize+0x14>
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
109627: c9 leave
109628: c3 ret
109629: 8d 76 00 lea 0x0(%esi),%esi
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
sc = rtems_semaphore_create (
10962c: 83 ec 0c sub $0xc,%esp
10962f: 68 cc 92 12 00 push $0x1292cc
109634: 6a 00 push $0x0
109636: 6a 54 push $0x54
109638: 6a 01 push $0x1
10963a: 68 69 6d 52 54 push $0x54526d69
10963f: e8 28 24 00 00 call 10ba6c <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)
109644: 83 c4 20 add $0x20,%esp
109647: 85 c0 test %eax,%eax
109649: 74 dc je 109627 <rtems_termios_initialize+0xf><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
10964b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10964e: 50 push %eax <== NOT EXECUTED
10964f: e8 a4 2c 00 00 call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
0010a6d0 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
10a6d0: 55 push %ebp
10a6d1: 89 e5 mov %esp,%ebp
10a6d3: 57 push %edi
10a6d4: 56 push %esi
10a6d5: 53 push %ebx
10a6d6: 83 ec 20 sub $0x20,%esp
10a6d9: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10a6dc: 8b 03 mov (%ebx),%eax
10a6de: 8b 40 34 mov 0x34(%eax),%eax
10a6e1: 89 45 e4 mov %eax,-0x1c(%ebp)
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
10a6e4: 8b 73 08 mov 0x8(%ebx),%esi
rtems_status_code sc;
args->ioctl_return = 0;
10a6e7: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10a6ee: 6a 00 push $0x0
10a6f0: 6a 00 push $0x0
10a6f2: ff 70 18 pushl 0x18(%eax)
10a6f5: e8 ea 15 00 00 call 10bce4 <rtems_semaphore_obtain>
10a6fa: 89 45 e0 mov %eax,-0x20(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
10a6fd: 83 c4 10 add $0x10,%esp
10a700: 85 c0 test %eax,%eax
10a702: 75 24 jne 10a728 <rtems_termios_ioctl+0x58><== NEVER TAKEN
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
10a704: 8b 43 04 mov 0x4(%ebx),%eax
10a707: 83 f8 04 cmp $0x4,%eax
10a70a: 74 74 je 10a780 <rtems_termios_ioctl+0xb0><== NEVER TAKEN
10a70c: 77 2a ja 10a738 <rtems_termios_ioctl+0x68><== NEVER TAKEN
10a70e: 83 f8 02 cmp $0x2,%eax
10a711: 0f 84 a1 00 00 00 je 10a7b8 <rtems_termios_ioctl+0xe8>
10a717: 0f 86 3b 02 00 00 jbe 10a958 <rtems_termios_ioctl+0x288>
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
10a71d: 8b 45 e4 mov -0x1c(%ebp),%eax
10a720: e8 ff fb ff ff call 10a324 <drainOutput>
break;
10a725: eb 6d jmp 10a794 <rtems_termios_ioctl+0xc4>
10a727: 90 nop
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
10a728: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
break;
}
rtems_semaphore_release (tty->osem);
args->ioctl_return = sc;
return sc;
}
10a72b: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10a72e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10a731: 5b pop %ebx <== NOT EXECUTED
10a732: 5e pop %esi <== NOT EXECUTED
10a733: 5f pop %edi <== NOT EXECUTED
10a734: c9 leave <== NOT EXECUTED
10a735: c3 ret <== NOT EXECUTED
10a736: 66 90 xchg %ax,%ax <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
10a738: 3d 7f 66 04 40 cmp $0x4004667f,%eax <== NOT EXECUTED
10a73d: 0f 84 ed 01 00 00 je 10a930 <rtems_termios_ioctl+0x260><== NOT EXECUTED
10a743: 0f 87 2f 02 00 00 ja 10a978 <rtems_termios_ioctl+0x2a8><== NOT EXECUTED
10a749: 83 f8 05 cmp $0x5,%eax <== NOT EXECUTED
10a74c: 0f 84 aa 02 00 00 je 10a9fc <rtems_termios_ioctl+0x32c><== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
10a752: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
10a755: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax <== NOT EXECUTED
10a75b: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
10a75e: 8b 80 58 8f 12 00 mov 0x128f58(%eax),%eax <== NOT EXECUTED
10a764: 85 c0 test %eax,%eax <== NOT EXECUTED
10a766: 0f 84 ac 02 00 00 je 10aa18 <rtems_termios_ioctl+0x348><== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
10a76c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a76f: 53 push %ebx <== NOT EXECUTED
10a770: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
10a773: ff d0 call *%eax <== NOT EXECUTED
10a775: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
10a778: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a77b: eb 17 jmp 10a794 <rtems_termios_ioctl+0xc4><== NOT EXECUTED
10a77d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
10a780: 8b 06 mov (%esi),%eax <== NOT EXECUTED
10a782: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED
10a785: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
10a788: 89 81 dc 00 00 00 mov %eax,0xdc(%ecx) <== NOT EXECUTED
10a78e: 89 91 e0 00 00 00 mov %edx,0xe0(%ecx) <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
10a794: 83 ec 0c sub $0xc,%esp
10a797: 8b 45 e4 mov -0x1c(%ebp),%eax
10a79a: ff 70 18 pushl 0x18(%eax)
10a79d: e8 3e 16 00 00 call 10bde0 <rtems_semaphore_release>
args->ioctl_return = sc;
10a7a2: 8b 55 e0 mov -0x20(%ebp),%edx
10a7a5: 89 53 0c mov %edx,0xc(%ebx)
return sc;
10a7a8: 83 c4 10 add $0x10,%esp
}
10a7ab: 8b 45 e0 mov -0x20(%ebp),%eax
10a7ae: 8d 65 f4 lea -0xc(%ebp),%esp
10a7b1: 5b pop %ebx
10a7b2: 5e pop %esi
10a7b3: 5f pop %edi
10a7b4: c9 leave
10a7b5: c3 ret
10a7b6: 66 90 xchg %ax,%ax
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
10a7b8: 8b 73 08 mov 0x8(%ebx),%esi
10a7bb: 8b 4d e4 mov -0x1c(%ebp),%ecx
10a7be: 83 c1 30 add $0x30,%ecx
10a7c1: 89 4d dc mov %ecx,-0x24(%ebp)
10a7c4: b9 09 00 00 00 mov $0x9,%ecx
10a7c9: 8b 7d dc mov -0x24(%ebp),%edi
10a7cc: 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) &&
10a7ce: 8b 55 e4 mov -0x1c(%ebp),%edx
10a7d1: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax
10a7d7: f6 c4 02 test $0x2,%ah
10a7da: 74 44 je 10a820 <rtems_termios_ioctl+0x150>
10a7dc: f6 42 31 04 testb $0x4,0x31(%edx)
10a7e0: 75 3e jne 10a820 <rtems_termios_ioctl+0x150><== ALWAYS TAKEN
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
10a7e2: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
10a7e8: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED
10a7ed: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
10a7f3: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
10a7f9: a8 20 test $0x20,%al <== NOT EXECUTED
10a7fb: 74 23 je 10a820 <rtems_termios_ioctl+0x150><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
10a7fd: 9c pushf <== NOT EXECUTED
10a7fe: fa cli <== NOT EXECUTED
10a7ff: 5e pop %esi <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
10a800: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
10a806: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
10a809: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
10a80f: 8b ba 94 00 00 00 mov 0x94(%edx),%edi <== NOT EXECUTED
10a815: 85 ff test %edi,%edi <== NOT EXECUTED
10a817: 0f 85 ab 02 00 00 jne 10aac8 <rtems_termios_ioctl+0x3f8><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
10a81d: 56 push %esi <== NOT EXECUTED
10a81e: 9d popf <== NOT EXECUTED
10a81f: 90 nop <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
10a820: 8b 4d e4 mov -0x1c(%ebp),%ecx
10a823: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax
10a829: f6 c4 04 test $0x4,%ah
10a82c: 74 24 je 10a852 <rtems_termios_ioctl+0x182><== ALWAYS TAKEN
10a82e: f6 41 31 10 testb $0x10,0x31(%ecx) <== NOT EXECUTED
10a832: 75 1e jne 10a852 <rtems_termios_ioctl+0x182><== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
10a834: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED
10a83a: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED
10a83d: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
10a843: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED
10a849: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
10a84c: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) &&
10a852: 8b 55 e4 mov -0x1c(%ebp),%edx
10a855: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax
10a85b: f6 c4 01 test $0x1,%ah
10a85e: 74 4b je 10a8ab <rtems_termios_ioctl+0x1db><== ALWAYS TAKEN
10a860: 8b 7a 38 mov 0x38(%edx),%edi <== NOT EXECUTED
10a863: 85 ff test %edi,%edi <== NOT EXECUTED
10a865: 0f 88 09 02 00 00 js 10aa74 <rtems_termios_ioctl+0x3a4><== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
10a86b: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
10a871: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED
10a874: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
10a87a: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
10a880: a8 04 test $0x4,%al <== NOT EXECUTED
10a882: 74 15 je 10a899 <rtems_termios_ioctl+0x1c9><== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
10a884: 8b 82 b0 00 00 00 mov 0xb0(%edx),%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) &&
10a88a: 85 c0 test %eax,%eax <== NOT EXECUTED
10a88c: 74 0b je 10a899 <rtems_termios_ioctl+0x1c9><== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
10a88e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a891: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED
10a894: ff d0 call *%eax <== NOT EXECUTED
10a896: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
10a899: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
10a89c: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED
10a8a2: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
10a8a5: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== 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) {
10a8ab: 8b 45 e4 mov -0x1c(%ebp),%eax
10a8ae: 8b 70 38 mov 0x38(%eax),%esi
10a8b1: 85 f6 test %esi,%esi
10a8b3: 0f 88 bb 01 00 00 js 10aa74 <rtems_termios_ioctl+0x3a4><== NEVER TAKEN
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
10a8b9: 8b 4d e4 mov -0x1c(%ebp),%ecx
10a8bc: 8b 41 30 mov 0x30(%ecx),%eax
10a8bf: f6 c4 10 test $0x10,%ah
10a8c2: 74 0f je 10a8d3 <rtems_termios_ioctl+0x203><== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDXOF;
10a8c4: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED
10a8ca: 80 ce 04 or $0x4,%dh <== NOT EXECUTED
10a8cd: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx) <== NOT EXECUTED
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
10a8d3: f6 c4 04 test $0x4,%ah
10a8d6: 74 12 je 10a8ea <rtems_termios_ioctl+0x21a><== NEVER TAKEN
tty->flow_ctrl |= FL_MDXON;
10a8d8: 8b 55 e4 mov -0x1c(%ebp),%edx
10a8db: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax
10a8e1: 80 cc 02 or $0x2,%ah
10a8e4: 89 82 b8 00 00 00 mov %eax,0xb8(%edx)
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) {
10a8ea: 8b 4d e4 mov -0x1c(%ebp),%ecx
10a8ed: f6 41 3c 02 testb $0x2,0x3c(%ecx)
10a8f1: 0f 84 2d 01 00 00 je 10aa24 <rtems_termios_ioctl+0x354>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
10a8f7: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
10a8fe: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
10a905: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx)
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
10a90c: 8b 55 e4 mov -0x1c(%ebp),%edx
10a90f: 8b 82 a8 00 00 00 mov 0xa8(%edx),%eax
10a915: 85 c0 test %eax,%eax
10a917: 0f 84 77 fe ff ff je 10a794 <rtems_termios_ioctl+0xc4><== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
10a91d: 83 ec 08 sub $0x8,%esp
10a920: ff 75 dc pushl -0x24(%ebp)
10a923: ff 72 10 pushl 0x10(%edx)
10a926: ff d0 call *%eax
10a928: 83 c4 10 add $0x10,%esp
10a92b: e9 64 fe ff ff jmp 10a794 <rtems_termios_ioctl+0xc4>
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
10a930: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
10a933: 8b 42 60 mov 0x60(%edx),%eax <== NOT EXECUTED
10a936: 89 d1 mov %edx,%ecx <== NOT EXECUTED
10a938: 8b 52 5c mov 0x5c(%edx),%edx <== NOT EXECUTED
if ( rawnc < 0 )
10a93b: 29 d0 sub %edx,%eax <== NOT EXECUTED
10a93d: 0f 88 25 01 00 00 js 10aa68 <rtems_termios_ioctl+0x398><== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
10a943: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED
10a946: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
10a949: 03 41 20 add 0x20(%ecx),%eax <== NOT EXECUTED
10a94c: 2b 41 24 sub 0x24(%ecx),%eax <== NOT EXECUTED
10a94f: 89 02 mov %eax,(%edx) <== NOT EXECUTED
10a951: e9 3e fe ff ff jmp 10a794 <rtems_termios_ioctl+0xc4><== NOT EXECUTED
10a956: 66 90 xchg %ax,%ax <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
10a958: 48 dec %eax
10a959: 0f 85 f3 fd ff ff jne 10a752 <rtems_termios_ioctl+0x82><== NEVER TAKEN
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
10a95f: 8b 43 08 mov 0x8(%ebx),%eax
10a962: 8b 75 e4 mov -0x1c(%ebp),%esi
10a965: 83 c6 30 add $0x30,%esi
10a968: b9 09 00 00 00 mov $0x9,%ecx
10a96d: 89 c7 mov %eax,%edi
10a96f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
break;
10a971: e9 1e fe ff ff jmp 10a794 <rtems_termios_ioctl+0xc4>
10a976: 66 90 xchg %ax,%ax
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
10a978: 3d 1a 74 04 40 cmp $0x4004741a,%eax <== NOT EXECUTED
10a97d: 74 69 je 10a9e8 <rtems_termios_ioctl+0x318><== NOT EXECUTED
10a97f: 3d 1b 74 04 80 cmp $0x8004741b,%eax <== NOT EXECUTED
10a984: 0f 85 c8 fd ff ff jne 10a752 <rtems_termios_ioctl+0x82><== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
10a98a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
10a98d: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax <== NOT EXECUTED
10a993: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
10a996: 8b 80 44 8f 12 00 mov 0x128f44(%eax),%eax <== NOT EXECUTED
10a99c: 85 c0 test %eax,%eax <== NOT EXECUTED
10a99e: 74 0c je 10a9ac <rtems_termios_ioctl+0x2dc><== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
10a9a0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a9a3: 52 push %edx <== NOT EXECUTED
10a9a4: ff d0 call *%eax <== NOT EXECUTED
10a9a6: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
10a9a9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
tty->t_line=*(int*)(args->buffer);
10a9ac: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
10a9af: 8b 00 mov (%eax),%eax <== NOT EXECUTED
10a9b1: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
10a9b4: 89 81 cc 00 00 00 mov %eax,0xcc(%ecx) <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
10a9ba: c7 81 d0 00 00 00 00 movl $0x0,0xd0(%ecx) <== NOT EXECUTED
10a9c1: 00 00 00
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
10a9c4: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
10a9c7: 8b 80 40 8f 12 00 mov 0x128f40(%eax),%eax <== NOT EXECUTED
10a9cd: 85 c0 test %eax,%eax <== NOT EXECUTED
10a9cf: 0f 84 bf fd ff ff je 10a794 <rtems_termios_ioctl+0xc4><== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
10a9d5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a9d8: 51 push %ecx <== NOT EXECUTED
10a9d9: ff d0 call *%eax <== NOT EXECUTED
10a9db: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
10a9de: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a9e1: e9 ae fd ff ff jmp 10a794 <rtems_termios_ioctl+0xc4><== NOT EXECUTED
10a9e6: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
10a9e8: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
10a9eb: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
10a9ee: 8b 91 cc 00 00 00 mov 0xcc(%ecx),%edx <== NOT EXECUTED
10a9f4: 89 10 mov %edx,(%eax) <== NOT EXECUTED
break;
10a9f6: e9 99 fd ff ff jmp 10a794 <rtems_termios_ioctl+0xc4><== NOT EXECUTED
10a9fb: 90 nop <== NOT EXECUTED
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
10a9fc: 8b 06 mov (%esi),%eax <== NOT EXECUTED
10a9fe: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED
10aa01: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
10aa04: 89 81 d4 00 00 00 mov %eax,0xd4(%ecx) <== NOT EXECUTED
10aa0a: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx) <== NOT EXECUTED
break;
10aa10: e9 7f fd ff ff jmp 10a794 <rtems_termios_ioctl+0xc4><== NOT EXECUTED
10aa15: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
10aa18: c7 45 e0 0a 00 00 00 movl $0xa,-0x20(%ebp) <== NOT EXECUTED
10aa1f: e9 70 fd ff ff jmp 10a794 <rtems_termios_ioctl+0xc4><== NOT EXECUTED
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;
10aa24: 8b 45 e4 mov -0x1c(%ebp),%eax
10aa27: 0f b6 70 46 movzbl 0x46(%eax),%esi
10aa2b: e8 b8 0b 00 00 call 10b5e8 <rtems_clock_get_ticks_per_second>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
10aa30: 0f af c6 imul %esi,%eax
10aa33: ba cd cc cc cc mov $0xcccccccd,%edx
10aa38: f7 e2 mul %edx
10aa3a: c1 ea 03 shr $0x3,%edx
10aa3d: 8b 4d e4 mov -0x1c(%ebp),%ecx
10aa40: 89 51 54 mov %edx,0x54(%ecx)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
10aa43: 80 79 46 00 cmpb $0x0,0x46(%ecx)
10aa47: 74 42 je 10aa8b <rtems_termios_ioctl+0x3bb><== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
10aa49: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
10aa50: 89 51 70 mov %edx,0x70(%ecx) <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
10aa53: 80 79 47 00 cmpb $0x0,0x47(%ecx) <== NOT EXECUTED
10aa57: 74 55 je 10aaae <rtems_termios_ioctl+0x3de><== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
10aa59: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) <== NOT EXECUTED
10aa60: e9 a7 fe ff ff jmp 10a90c <rtems_termios_ioctl+0x23c><== NOT EXECUTED
10aa65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
10aa68: 8b 51 64 mov 0x64(%ecx),%edx <== NOT EXECUTED
10aa6b: 01 d0 add %edx,%eax <== NOT EXECUTED
10aa6d: e9 d1 fe ff ff jmp 10a943 <rtems_termios_ioctl+0x273><== NOT EXECUTED
10aa72: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
tty->flow_ctrl |= FL_MDRTS;
10aa74: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
10aa77: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
10aa7d: 80 cc 01 or $0x1,%ah <== NOT EXECUTED
10aa80: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED
10aa86: e9 2e fe ff ff jmp 10a8b9 <rtems_termios_ioctl+0x1e9><== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
10aa8b: 8b 55 e4 mov -0x1c(%ebp),%edx
10aa8e: 80 7a 47 00 cmpb $0x0,0x47(%edx)
10aa92: 74 25 je 10aab9 <rtems_termios_ioctl+0x3e9><== NEVER TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
10aa94: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
10aa9b: c7 42 70 00 00 00 00 movl $0x0,0x70(%edx)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
10aaa2: c7 42 74 00 00 00 00 movl $0x0,0x74(%edx)
10aaa9: e9 5e fe ff ff jmp 10a90c <rtems_termios_ioctl+0x23c>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
10aaae: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
10aab1: 89 50 74 mov %edx,0x74(%eax) <== NOT EXECUTED
10aab4: e9 53 fe ff ff jmp 10a90c <rtems_termios_ioctl+0x23c><== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
10aab9: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
10aabc: c7 41 6c 01 00 00 00 movl $0x1,0x6c(%ecx) <== NOT EXECUTED
10aac3: e9 44 fe ff ff jmp 10a90c <rtems_termios_ioctl+0x23c><== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
10aac8: 8b 82 84 00 00 00 mov 0x84(%edx),%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,
10aace: 51 push %ecx <== NOT EXECUTED
10aacf: 6a 01 push $0x1 <== NOT EXECUTED
10aad1: 03 42 7c add 0x7c(%edx),%eax <== NOT EXECUTED
10aad4: 50 push %eax <== NOT EXECUTED
10aad5: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED
10aad8: ff 92 a4 00 00 00 call *0xa4(%edx) <== NOT EXECUTED
10aade: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10aae1: e9 37 fd ff ff jmp 10a81d <rtems_termios_ioctl+0x14d><== NOT EXECUTED
0010aa34 <rtems_termios_number_to_baud>:
#include <rtems/termiostypes.h>
int rtems_termios_number_to_baud(
int32_t baud
)
{
10aa34: 55 push %ebp
10aa35: 89 e5 mov %esp,%ebp
10aa37: 8b 45 08 mov 0x8(%ebp),%eax
int termios_baud;
switch (baud) {
10aa3a: 3d b0 04 00 00 cmp $0x4b0,%eax
10aa3f: 0f 84 47 01 00 00 je 10ab8c <rtems_termios_number_to_baud+0x158>
10aa45: 7e 3d jle 10aa84 <rtems_termios_number_to_baud+0x50>
10aa47: 3d 00 4b 00 00 cmp $0x4b00,%eax
10aa4c: 0f 84 4a 01 00 00 je 10ab9c <rtems_termios_number_to_baud+0x168>
10aa52: 7e 64 jle 10aab8 <rtems_termios_number_to_baud+0x84>
10aa54: 3d 00 c2 01 00 cmp $0x1c200,%eax
10aa59: 0f 84 15 01 00 00 je 10ab74 <rtems_termios_number_to_baud+0x140>
10aa5f: 0f 8e af 00 00 00 jle 10ab14 <rtems_termios_number_to_baud+0xe0>
10aa65: 3d 00 84 03 00 cmp $0x38400,%eax
10aa6a: 0f 84 fc 00 00 00 je 10ab6c <rtems_termios_number_to_baud+0x138>
10aa70: 3d 00 08 07 00 cmp $0x70800,%eax
10aa75: 0f 85 89 00 00 00 jne 10ab04 <rtems_termios_number_to_baud+0xd0><== NEVER TAKEN
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
10aa7b: b8 04 10 00 00 mov $0x1004,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10aa80: c9 leave
10aa81: c3 ret
10aa82: 66 90 xchg %ax,%ax
int32_t baud
)
{
int termios_baud;
switch (baud) {
10aa84: 3d 86 00 00 00 cmp $0x86,%eax
10aa89: 0f 84 05 01 00 00 je 10ab94 <rtems_termios_number_to_baud+0x160>
10aa8f: 7e 4f jle 10aae0 <rtems_termios_number_to_baud+0xac>
10aa91: 3d c8 00 00 00 cmp $0xc8,%eax
10aa96: 0f 84 b8 00 00 00 je 10ab54 <rtems_termios_number_to_baud+0x120>
10aa9c: 7e 5e jle 10aafc <rtems_termios_number_to_baud+0xc8>
10aa9e: 3d 2c 01 00 00 cmp $0x12c,%eax
10aaa3: 0f 84 9b 00 00 00 je 10ab44 <rtems_termios_number_to_baud+0x110>
10aaa9: 3d 58 02 00 00 cmp $0x258,%eax
10aaae: 75 54 jne 10ab04 <rtems_termios_number_to_baud+0xd0><== NEVER TAKEN
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
10aab0: b8 08 00 00 00 mov $0x8,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10aab5: c9 leave
10aab6: c3 ret
10aab7: 90 nop
int32_t baud
)
{
int termios_baud;
switch (baud) {
10aab8: 3d 60 09 00 00 cmp $0x960,%eax
10aabd: 0f 84 c1 00 00 00 je 10ab84 <rtems_termios_number_to_baud+0x150>
10aac3: 7e 67 jle 10ab2c <rtems_termios_number_to_baud+0xf8>
10aac5: 3d c0 12 00 00 cmp $0x12c0,%eax
10aaca: 0f 84 8c 00 00 00 je 10ab5c <rtems_termios_number_to_baud+0x128>
10aad0: 3d 80 25 00 00 cmp $0x2580,%eax
10aad5: 75 2d jne 10ab04 <rtems_termios_number_to_baud+0xd0>
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
10aad7: b8 0d 00 00 00 mov $0xd,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10aadc: c9 leave
10aadd: c3 ret
10aade: 66 90 xchg %ax,%ax
int32_t baud
)
{
int termios_baud;
switch (baud) {
10aae0: 83 f8 32 cmp $0x32,%eax
10aae3: 74 7f je 10ab64 <rtems_termios_number_to_baud+0x130>
10aae5: 7e 25 jle 10ab0c <rtems_termios_number_to_baud+0xd8>
10aae7: 83 f8 4b cmp $0x4b,%eax
10aaea: 0f 84 8c 00 00 00 je 10ab7c <rtems_termios_number_to_baud+0x148>
10aaf0: 83 f8 6e cmp $0x6e,%eax
10aaf3: 75 0f jne 10ab04 <rtems_termios_number_to_baud+0xd0><== NEVER TAKEN
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
10aaf5: b8 03 00 00 00 mov $0x3,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10aafa: c9 leave
10aafb: c3 ret
int32_t baud
)
{
int termios_baud;
switch (baud) {
10aafc: 3d 96 00 00 00 cmp $0x96,%eax
10ab01: 74 39 je 10ab3c <rtems_termios_number_to_baud+0x108><== ALWAYS TAKEN
10ab03: 90 nop
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
case 460800: termios_baud = B460800; break;
10ab04: b8 ff ff ff ff mov $0xffffffff,%eax
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab09: c9 leave
10ab0a: c3 ret
10ab0b: 90 nop
int32_t baud
)
{
int termios_baud;
switch (baud) {
10ab0c: 85 c0 test %eax,%eax
10ab0e: 75 f4 jne 10ab04 <rtems_termios_number_to_baud+0xd0>
10ab10: 31 c0 xor %eax,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab12: c9 leave
10ab13: c3 ret
int32_t baud
)
{
int termios_baud;
switch (baud) {
10ab14: 3d 00 96 00 00 cmp $0x9600,%eax
10ab19: 74 31 je 10ab4c <rtems_termios_number_to_baud+0x118>
10ab1b: 3d 00 e1 00 00 cmp $0xe100,%eax
10ab20: 75 e2 jne 10ab04 <rtems_termios_number_to_baud+0xd0><== NEVER TAKEN
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
10ab22: b8 01 10 00 00 mov $0x1001,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab27: c9 leave
10ab28: c3 ret
10ab29: 8d 76 00 lea 0x0(%esi),%esi
int32_t baud
)
{
int termios_baud;
switch (baud) {
10ab2c: 3d 08 07 00 00 cmp $0x708,%eax
10ab31: 75 d1 jne 10ab04 <rtems_termios_number_to_baud+0xd0><== NEVER TAKEN
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
10ab33: b8 0a 00 00 00 mov $0xa,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab38: c9 leave
10ab39: c3 ret
10ab3a: 66 90 xchg %ax,%ax
switch (baud) {
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
10ab3c: b8 05 00 00 00 mov $0x5,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab41: c9 leave
10ab42: c3 ret
10ab43: 90 nop
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
10ab44: b8 07 00 00 00 mov $0x7,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab49: c9 leave
10ab4a: c3 ret
10ab4b: 90 nop
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
10ab4c: b8 0f 00 00 00 mov $0xf,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab51: c9 leave
10ab52: c3 ret
10ab53: 90 nop
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
10ab54: b8 06 00 00 00 mov $0x6,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab59: c9 leave
10ab5a: c3 ret
10ab5b: 90 nop
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
10ab5c: b8 0c 00 00 00 mov $0xc,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab61: c9 leave
10ab62: c3 ret
10ab63: 90 nop
int32_t baud
)
{
int termios_baud;
switch (baud) {
10ab64: b8 01 00 00 00 mov $0x1,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab69: c9 leave
10ab6a: c3 ret
10ab6b: 90 nop
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
10ab6c: b8 03 10 00 00 mov $0x1003,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab71: c9 leave
10ab72: c3 ret
10ab73: 90 nop
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
10ab74: b8 02 10 00 00 mov $0x1002,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab79: c9 leave
10ab7a: c3 ret
10ab7b: 90 nop
int32_t baud
)
{
int termios_baud;
switch (baud) {
10ab7c: b8 02 00 00 00 mov $0x2,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab81: c9 leave
10ab82: c3 ret
10ab83: 90 nop
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
10ab84: b8 0b 00 00 00 mov $0xb,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab89: c9 leave
10ab8a: c3 ret
10ab8b: 90 nop
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
10ab8c: b8 09 00 00 00 mov $0x9,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab91: c9 leave
10ab92: c3 ret
10ab93: 90 nop
switch (baud) {
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
10ab94: b8 04 00 00 00 mov $0x4,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10ab99: c9 leave
10ab9a: c3 ret
10ab9b: 90 nop
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
10ab9c: b8 0e 00 00 00 mov $0xe,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10aba1: c9 leave
10aba2: c3 ret
0010acbc <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
10acbc: 55 push %ebp
10acbd: 89 e5 mov %esp,%ebp
10acbf: 57 push %edi
10acc0: 56 push %esi
10acc1: 53 push %ebx
10acc2: 83 ec 20 sub $0x20,%esp
10acc5: 8b 55 08 mov 0x8(%ebp),%edx
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
10acc8: 6a 00 push $0x0
10acca: 6a 00 push $0x0
10accc: ff 35 cc 92 12 00 pushl 0x1292cc
10acd2: 89 55 dc mov %edx,-0x24(%ebp)
10acd5: e8 0a 10 00 00 call 10bce4 <rtems_semaphore_obtain>
10acda: 89 45 e4 mov %eax,-0x1c(%ebp)
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
10acdd: 83 c4 10 add $0x10,%esp
10ace0: 85 c0 test %eax,%eax
10ace2: 8b 55 dc mov -0x24(%ebp),%edx
10ace5: 75 6f jne 10ad56 <rtems_termios_open+0x9a><== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
10ace7: 8b 1d d4 92 12 00 mov 0x1292d4,%ebx
10aced: 85 db test %ebx,%ebx
10acef: 0f 84 a7 00 00 00 je 10ad9c <rtems_termios_open+0xe0>
10acf5: 8b 45 0c mov 0xc(%ebp),%eax
10acf8: eb 0c jmp 10ad06 <rtems_termios_open+0x4a>
10acfa: 66 90 xchg %ax,%ax
10acfc: 8b 1b mov (%ebx),%ebx
10acfe: 85 db test %ebx,%ebx
10ad00: 0f 84 96 00 00 00 je 10ad9c <rtems_termios_open+0xe0><== ALWAYS TAKEN
if ((tty->major == major) && (tty->minor == minor))
10ad06: 39 53 0c cmp %edx,0xc(%ebx)
10ad09: 75 f1 jne 10acfc <rtems_termios_open+0x40>
10ad0b: 39 43 10 cmp %eax,0x10(%ebx)
10ad0e: 75 ec jne 10acfc <rtems_termios_open+0x40><== NEVER TAKEN
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
10ad10: 8b 4d 10 mov 0x10(%ebp),%ecx
10ad13: 8b 01 mov (%ecx),%eax
10ad15: 89 58 34 mov %ebx,0x34(%eax)
if (!tty->refcount++) {
10ad18: 8b 43 08 mov 0x8(%ebx),%eax
10ad1b: 8d 48 01 lea 0x1(%eax),%ecx
10ad1e: 89 4b 08 mov %ecx,0x8(%ebx)
10ad21: 85 c0 test %eax,%eax
10ad23: 75 20 jne 10ad45 <rtems_termios_open+0x89>
if (tty->device.firstOpen)
10ad25: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax
10ad2b: 85 c0 test %eax,%eax
10ad2d: 74 0d je 10ad3c <rtems_termios_open+0x80>
(*tty->device.firstOpen)(major, minor, arg);
10ad2f: 56 push %esi
10ad30: ff 75 10 pushl 0x10(%ebp)
10ad33: ff 75 0c pushl 0xc(%ebp)
10ad36: 52 push %edx
10ad37: ff d0 call *%eax
10ad39: 83 c4 10 add $0x10,%esp
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10ad3c: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
10ad43: 74 1c je 10ad61 <rtems_termios_open+0xa5><== NEVER TAKEN
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
10ad45: 83 ec 0c sub $0xc,%esp
10ad48: ff 35 cc 92 12 00 pushl 0x1292cc
10ad4e: e8 8d 10 00 00 call 10bde0 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
10ad53: 83 c4 10 add $0x10,%esp
}
10ad56: 8b 45 e4 mov -0x1c(%ebp),%eax
10ad59: 8d 65 f4 lea -0xc(%ebp),%esp
10ad5c: 5b pop %ebx
10ad5d: 5e pop %esi
10ad5e: 5f pop %edi
10ad5f: c9 leave
10ad60: c3 ret
(*tty->device.firstOpen)(major, minor, arg);
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(tty->rxTaskId,
10ad61: 51 push %ecx <== NOT EXECUTED
10ad62: 53 push %ebx <== NOT EXECUTED
10ad63: 68 d0 b1 10 00 push $0x10b1d0 <== NOT EXECUTED
10ad68: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED
10ad6e: e8 b1 13 00 00 call 10c124 <rtems_task_start> <== NOT EXECUTED
rtems_termios_rxdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
10ad73: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ad76: 85 c0 test %eax,%eax <== NOT EXECUTED
10ad78: 0f 85 3e 03 00 00 jne 10b0bc <rtems_termios_open+0x400><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
10ad7e: 52 push %edx <== NOT EXECUTED
10ad7f: 53 push %ebx <== NOT EXECUTED
10ad80: 68 64 b1 10 00 push $0x10b164 <== NOT EXECUTED
10ad85: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED
10ad8b: e8 94 13 00 00 call 10c124 <rtems_task_start> <== NOT EXECUTED
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
10ad90: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ad93: 85 c0 test %eax,%eax <== NOT EXECUTED
10ad95: 74 ae je 10ad45 <rtems_termios_open+0x89><== NOT EXECUTED
10ad97: e9 20 03 00 00 jmp 10b0bc <rtems_termios_open+0x400><== NOT EXECUTED
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
10ad9c: 83 ec 08 sub $0x8,%esp
10ad9f: 68 e8 00 00 00 push $0xe8
10ada4: 6a 01 push $0x1
10ada6: 89 55 dc mov %edx,-0x24(%ebp)
10ada9: e8 1e d6 ff ff call 1083cc <calloc>
10adae: 89 45 e0 mov %eax,-0x20(%ebp)
10adb1: 89 c3 mov %eax,%ebx
if (tty == NULL) {
10adb3: 83 c4 10 add $0x10,%esp
10adb6: 85 c0 test %eax,%eax
10adb8: 8b 55 dc mov -0x24(%ebp),%edx
10adbb: 0f 84 79 02 00 00 je 10b03a <rtems_termios_open+0x37e><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
10adc1: a1 18 70 12 00 mov 0x127018,%eax
10adc6: 8b 4d e0 mov -0x20(%ebp),%ecx
10adc9: 89 41 64 mov %eax,0x64(%ecx)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
10adcc: 8b 41 64 mov 0x64(%ecx),%eax
10adcf: 83 ec 0c sub $0xc,%esp
10add2: 50 push %eax
10add3: 89 55 dc mov %edx,-0x24(%ebp)
10add6: e8 e1 da ff ff call 1088bc <malloc>
10addb: 8b 75 e0 mov -0x20(%ebp),%esi
10adde: 89 46 58 mov %eax,0x58(%esi)
if (tty->rawInBuf.theBuf == NULL) {
10ade1: 83 c4 10 add $0x10,%esp
10ade4: 85 c0 test %eax,%eax
10ade6: 8b 55 dc mov -0x24(%ebp),%edx
10ade9: 0f 84 68 02 00 00 je 10b057 <rtems_termios_open+0x39b><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
10adef: a1 1c 70 12 00 mov 0x12701c,%eax
10adf4: 8b 4d e0 mov -0x20(%ebp),%ecx
10adf7: 89 81 88 00 00 00 mov %eax,0x88(%ecx)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
10adfd: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax
10ae03: 83 ec 0c sub $0xc,%esp
10ae06: 50 push %eax
10ae07: 89 55 dc mov %edx,-0x24(%ebp)
10ae0a: e8 ad da ff ff call 1088bc <malloc>
10ae0f: 8b 75 e0 mov -0x20(%ebp),%esi
10ae12: 89 46 7c mov %eax,0x7c(%esi)
if (tty->rawOutBuf.theBuf == NULL) {
10ae15: 83 c4 10 add $0x10,%esp
10ae18: 85 c0 test %eax,%eax
10ae1a: 8b 55 dc mov -0x24(%ebp),%edx
10ae1d: 0f 84 58 02 00 00 je 10b07b <rtems_termios_open+0x3bf><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
10ae23: 83 ec 0c sub $0xc,%esp
10ae26: ff 35 14 70 12 00 pushl 0x127014
10ae2c: 89 55 dc mov %edx,-0x24(%ebp)
10ae2f: e8 88 da ff ff call 1088bc <malloc>
10ae34: 8b 4d e0 mov -0x20(%ebp),%ecx
10ae37: 89 41 1c mov %eax,0x1c(%ecx)
if (tty->cbuf == NULL) {
10ae3a: 83 c4 10 add $0x10,%esp
10ae3d: 85 c0 test %eax,%eax
10ae3f: 8b 55 dc mov -0x24(%ebp),%edx
10ae42: 0f 84 7d 02 00 00 je 10b0c5 <rtems_termios_open+0x409><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
10ae48: 8b 45 e0 mov -0x20(%ebp),%eax
10ae4b: c7 80 d4 00 00 00 00 movl $0x0,0xd4(%eax)
10ae52: 00 00 00
tty->tty_snd.sw_arg = NULL;
10ae55: c7 80 d8 00 00 00 00 movl $0x0,0xd8(%eax)
10ae5c: 00 00 00
tty->tty_rcv.sw_pfn = NULL;
10ae5f: c7 80 dc 00 00 00 00 movl $0x0,0xdc(%eax)
10ae66: 00 00 00
tty->tty_rcv.sw_arg = NULL;
10ae69: c7 80 e0 00 00 00 00 movl $0x0,0xe0(%eax)
10ae70: 00 00 00
tty->tty_rcvwakeup = 0;
10ae73: c7 80 e4 00 00 00 00 movl $0x0,0xe4(%eax)
10ae7a: 00 00 00
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
10ae7d: a1 d4 92 12 00 mov 0x1292d4,%eax
10ae82: 8b 4d e0 mov -0x20(%ebp),%ecx
10ae85: 89 01 mov %eax,(%ecx)
tty->back = NULL;
10ae87: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx)
if (rtems_termios_ttyHead != NULL)
10ae8e: 85 c0 test %eax,%eax
10ae90: 74 03 je 10ae95 <rtems_termios_open+0x1d9>
rtems_termios_ttyHead->back = tty;
10ae92: 89 48 04 mov %ecx,0x4(%eax)
rtems_termios_ttyHead = tty;
10ae95: 8b 75 e0 mov -0x20(%ebp),%esi
10ae98: 89 35 d4 92 12 00 mov %esi,0x1292d4
if (rtems_termios_ttyTail == NULL)
10ae9e: 8b 3d d0 92 12 00 mov 0x1292d0,%edi
10aea4: 85 ff test %edi,%edi
10aea6: 0f 84 ac 02 00 00 je 10b158 <rtems_termios_open+0x49c>
rtems_termios_ttyTail = tty;
tty->minor = minor;
10aeac: 8b 4d 0c mov 0xc(%ebp),%ecx
10aeaf: 8b 45 e0 mov -0x20(%ebp),%eax
10aeb2: 89 48 10 mov %ecx,0x10(%eax)
tty->major = major;
10aeb5: 89 50 0c mov %edx,0xc(%eax)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
10aeb8: 83 ec 0c sub $0xc,%esp
10aebb: 83 c0 14 add $0x14,%eax
10aebe: 50 push %eax
10aebf: 6a 00 push $0x0
10aec1: 6a 54 push $0x54
10aec3: 6a 01 push $0x1
10aec5: 0f be 05 20 70 12 00 movsbl 0x127020,%eax
10aecc: 0d 00 69 52 54 or $0x54526900,%eax
10aed1: 50 push %eax
10aed2: 89 55 dc mov %edx,-0x24(%ebp)
10aed5: e8 92 0b 00 00 call 10ba6c <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)
10aeda: 83 c4 20 add $0x20,%esp
10aedd: 85 c0 test %eax,%eax
10aedf: 8b 55 dc mov -0x24(%ebp),%edx
10aee2: 0f 85 d4 01 00 00 jne 10b0bc <rtems_termios_open+0x400><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
10aee8: 83 ec 0c sub $0xc,%esp
10aeeb: 8b 45 e0 mov -0x20(%ebp),%eax
10aeee: 83 c0 18 add $0x18,%eax
10aef1: 50 push %eax
10aef2: 6a 00 push $0x0
10aef4: 6a 54 push $0x54
10aef6: 6a 01 push $0x1
10aef8: 0f be 05 20 70 12 00 movsbl 0x127020,%eax
10aeff: 0d 00 6f 52 54 or $0x54526f00,%eax
10af04: 50 push %eax
10af05: 89 55 dc mov %edx,-0x24(%ebp)
10af08: e8 5f 0b 00 00 call 10ba6c <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)
10af0d: 83 c4 20 add $0x20,%esp
10af10: 85 c0 test %eax,%eax
10af12: 8b 55 dc mov -0x24(%ebp),%edx
10af15: 0f 85 a1 01 00 00 jne 10b0bc <rtems_termios_open+0x400><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
10af1b: 83 ec 0c sub $0xc,%esp
10af1e: 8b 45 e0 mov -0x20(%ebp),%eax
10af21: 05 8c 00 00 00 add $0x8c,%eax
10af26: 50 push %eax
10af27: 6a 00 push $0x0
10af29: 6a 20 push $0x20
10af2b: 6a 00 push $0x0
10af2d: 0f be 05 20 70 12 00 movsbl 0x127020,%eax
10af34: 0d 00 78 52 54 or $0x54527800,%eax
10af39: 50 push %eax
10af3a: 89 55 dc mov %edx,-0x24(%ebp)
10af3d: e8 2a 0b 00 00 call 10ba6c <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)
10af42: 83 c4 20 add $0x20,%esp
10af45: 85 c0 test %eax,%eax
10af47: 8b 55 dc mov -0x24(%ebp),%edx
10af4a: 0f 85 6c 01 00 00 jne 10b0bc <rtems_termios_open+0x400><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
10af50: 8b 75 e0 mov -0x20(%ebp),%esi
10af53: c7 86 94 00 00 00 00 movl $0x0,0x94(%esi)
10af5a: 00 00 00
/*
* Set callbacks
*/
tty->device = *callbacks;
10af5d: 89 f7 mov %esi,%edi
10af5f: 81 c7 98 00 00 00 add $0x98,%edi
10af65: b9 08 00 00 00 mov $0x8,%ecx
10af6a: 8b 75 14 mov 0x14(%ebp),%esi
10af6d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10af6f: 8b 45 e0 mov -0x20(%ebp),%eax
10af72: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
10af79: 0f 84 63 01 00 00 je 10b0e2 <rtems_termios_open+0x426><== NEVER TAKEN
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
10af7f: 8b 4d e0 mov -0x20(%ebp),%ecx
10af82: 8b b9 a0 00 00 00 mov 0xa0(%ecx),%edi
10af88: 85 ff test %edi,%edi
10af8a: 0f 84 f9 00 00 00 je 10b089 <rtems_termios_open+0x3cd>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
10af90: 83 b9 b4 00 00 00 02 cmpl $0x2,0xb4(%ecx)
10af97: 0f 84 ec 00 00 00 je 10b089 <rtems_termios_open+0x3cd><== NEVER TAKEN
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
10af9d: 8b 75 e0 mov -0x20(%ebp),%esi
10afa0: c7 46 30 02 25 00 00 movl $0x2502,0x30(%esi)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
10afa7: c7 46 34 05 18 00 00 movl $0x1805,0x34(%esi)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
10afae: c7 46 38 bd 08 00 00 movl $0x8bd,0x38(%esi)
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
10afb5: c7 46 3c 3b 82 00 00 movl $0x823b,0x3c(%esi)
tty->termios.c_cc[VINTR] = '\003';
10afbc: c6 46 41 03 movb $0x3,0x41(%esi)
tty->termios.c_cc[VQUIT] = '\034';
10afc0: c6 46 42 1c movb $0x1c,0x42(%esi)
tty->termios.c_cc[VERASE] = '\177';
10afc4: c6 46 43 7f movb $0x7f,0x43(%esi)
tty->termios.c_cc[VKILL] = '\025';
10afc8: c6 46 44 15 movb $0x15,0x44(%esi)
tty->termios.c_cc[VEOF] = '\004';
10afcc: c6 46 45 04 movb $0x4,0x45(%esi)
tty->termios.c_cc[VEOL] = '\000';
10afd0: c6 46 4c 00 movb $0x0,0x4c(%esi)
tty->termios.c_cc[VEOL2] = '\000';
10afd4: c6 46 51 00 movb $0x0,0x51(%esi)
tty->termios.c_cc[VSTART] = '\021';
10afd8: c6 46 49 11 movb $0x11,0x49(%esi)
tty->termios.c_cc[VSTOP] = '\023';
10afdc: c6 46 4a 13 movb $0x13,0x4a(%esi)
tty->termios.c_cc[VSUSP] = '\032';
10afe0: c6 46 4b 1a movb $0x1a,0x4b(%esi)
tty->termios.c_cc[VREPRINT] = '\022';
10afe4: c6 46 4d 12 movb $0x12,0x4d(%esi)
tty->termios.c_cc[VDISCARD] = '\017';
10afe8: c6 46 4e 0f movb $0xf,0x4e(%esi)
tty->termios.c_cc[VWERASE] = '\027';
10afec: c6 46 4f 17 movb $0x17,0x4f(%esi)
tty->termios.c_cc[VLNEXT] = '\026';
10aff0: c6 46 50 16 movb $0x16,0x50(%esi)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
10aff4: c7 86 b8 00 00 00 00 movl $0x0,0xb8(%esi)
10affb: 00 00 00
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
10affe: 8b 46 64 mov 0x64(%esi),%eax
10b001: d1 e8 shr %eax
10b003: 89 86 bc 00 00 00 mov %eax,0xbc(%esi)
tty->highwater = tty->rawInBuf.Size * 3/4;
10b009: 8b 46 64 mov 0x64(%esi),%eax
10b00c: 8d 04 40 lea (%eax,%eax,2),%eax
10b00f: c1 e8 02 shr $0x2,%eax
10b012: 89 86 c0 00 00 00 mov %eax,0xc0(%esi)
/*
* Bump name characer
*/
if (c++ == 'z')
10b018: a0 20 70 12 00 mov 0x127020,%al
10b01d: 8d 48 01 lea 0x1(%eax),%ecx
10b020: 88 0d 20 70 12 00 mov %cl,0x127020
10b026: 3c 7a cmp $0x7a,%al
10b028: 0f 85 e2 fc ff ff jne 10ad10 <rtems_termios_open+0x54><== ALWAYS TAKEN
c = 'a';
10b02e: c6 05 20 70 12 00 61 movb $0x61,0x127020 <== NOT EXECUTED
10b035: e9 d6 fc ff ff jmp 10ad10 <rtems_termios_open+0x54><== NOT EXECUTED
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
10b03a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b03d: ff 35 cc 92 12 00 pushl 0x1292cc <== NOT EXECUTED
10b043: e8 98 0d 00 00 call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
10b048: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED
return RTEMS_NO_MEMORY;
10b04f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b052: e9 ff fc ff ff jmp 10ad56 <rtems_termios_open+0x9a><== NOT EXECUTED
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
10b057: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
if (tty->rawOutBuf.theBuf == NULL) {
free((void *)(tty->rawInBuf.theBuf));
free(tty);
10b05a: 56 push %esi <== NOT EXECUTED
10b05b: e8 84 d5 ff ff call 1085e4 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
10b060: 59 pop %ecx <== NOT EXECUTED
10b061: ff 35 cc 92 12 00 pushl 0x1292cc <== NOT EXECUTED
10b067: e8 74 0d 00 00 call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
10b06c: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED
return RTEMS_NO_MEMORY;
10b073: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b076: e9 db fc ff ff jmp 10ad56 <rtems_termios_open+0x9a><== NOT EXECUTED
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
if (tty->rawOutBuf.theBuf == NULL) {
free((void *)(tty->rawInBuf.theBuf));
10b07b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b07e: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED
10b081: e8 5e d5 ff ff call 1085e4 <free> <== NOT EXECUTED
free(tty);
10b086: 5b pop %ebx <== NOT EXECUTED
10b087: eb d1 jmp 10b05a <rtems_termios_open+0x39e><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
10b089: 83 ec 0c sub $0xc,%esp
10b08c: 8b 45 e0 mov -0x20(%ebp),%eax
10b08f: 83 c0 68 add $0x68,%eax
10b092: 50 push %eax
10b093: 6a 00 push $0x0
10b095: 6a 24 push $0x24
10b097: 6a 00 push $0x0
10b099: 0f be 05 20 70 12 00 movsbl 0x127020,%eax
10b0a0: 0d 00 72 52 54 or $0x54527200,%eax
10b0a5: 50 push %eax
10b0a6: 89 55 dc mov %edx,-0x24(%ebp)
10b0a9: e8 be 09 00 00 call 10ba6c <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)
10b0ae: 83 c4 20 add $0x20,%esp
10b0b1: 85 c0 test %eax,%eax
10b0b3: 8b 55 dc mov -0x24(%ebp),%edx
10b0b6: 0f 84 e1 fe ff ff je 10af9d <rtems_termios_open+0x2e1><== ALWAYS TAKEN
sc = rtems_task_start(tty->txTaskId,
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
10b0bc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b0bf: 50 push %eax <== NOT EXECUTED
10b0c0: e8 33 12 00 00 call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
10b0c5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b0c8: ff 71 7c pushl 0x7c(%ecx) <== NOT EXECUTED
10b0cb: e8 14 d5 ff ff call 1085e4 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
10b0d0: 5a pop %edx <== NOT EXECUTED
10b0d1: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED
10b0d4: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED
10b0d7: e8 08 d5 ff ff call 1085e4 <free> <== NOT EXECUTED
free(tty);
10b0dc: 58 pop %eax <== NOT EXECUTED
10b0dd: e9 78 ff ff ff jmp 10b05a <rtems_termios_open+0x39e><== NOT EXECUTED
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
10b0e2: 51 push %ecx <== NOT EXECUTED
10b0e3: 51 push %ecx <== NOT EXECUTED
10b0e4: 05 c8 00 00 00 add $0xc8,%eax <== NOT EXECUTED
10b0e9: 50 push %eax <== NOT EXECUTED
10b0ea: 6a 00 push $0x0 <== NOT EXECUTED
10b0ec: 68 00 05 00 00 push $0x500 <== NOT EXECUTED
10b0f1: 68 00 04 00 00 push $0x400 <== NOT EXECUTED
10b0f6: 6a 0a push $0xa <== NOT EXECUTED
10b0f8: 0f be 05 20 70 12 00 movsbl 0x127020,%eax <== NOT EXECUTED
10b0ff: 0d 00 54 78 54 or $0x54785400,%eax <== NOT EXECUTED
10b104: 50 push %eax <== NOT EXECUTED
10b105: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
10b108: e8 73 0d 00 00 call 10be80 <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)
10b10d: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10b110: 85 c0 test %eax,%eax <== NOT EXECUTED
10b112: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
10b115: 75 a5 jne 10b0bc <rtems_termios_open+0x400><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
10b117: 50 push %eax <== NOT EXECUTED
10b118: 50 push %eax <== NOT EXECUTED
10b119: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10b11c: 05 c4 00 00 00 add $0xc4,%eax <== NOT EXECUTED
10b121: 50 push %eax <== NOT EXECUTED
10b122: 6a 00 push $0x0 <== NOT EXECUTED
10b124: 68 00 05 00 00 push $0x500 <== NOT EXECUTED
10b129: 68 00 04 00 00 push $0x400 <== NOT EXECUTED
10b12e: 6a 09 push $0x9 <== NOT EXECUTED
10b130: 0f be 05 20 70 12 00 movsbl 0x127020,%eax <== NOT EXECUTED
10b137: 0d 00 54 78 52 or $0x52785400,%eax <== NOT EXECUTED
10b13c: 50 push %eax <== NOT EXECUTED
10b13d: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
10b140: e8 3b 0d 00 00 call 10be80 <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)
10b145: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10b148: 85 c0 test %eax,%eax <== NOT EXECUTED
10b14a: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
10b14d: 0f 84 2c fe ff ff je 10af7f <rtems_termios_open+0x2c3><== NOT EXECUTED
10b153: e9 64 ff ff ff jmp 10b0bc <rtems_termios_open+0x400><== NOT EXECUTED
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
10b158: 89 35 d0 92 12 00 mov %esi,0x1292d0
10b15e: e9 49 fd ff ff jmp 10aeac <rtems_termios_open+0x1f0>
00109c28 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
109c28: 55 push %ebp
109c29: 89 e5 mov %esp,%ebp
109c2b: 57 push %edi
109c2c: 56 push %esi
109c2d: 53 push %ebx
109c2e: 83 ec 1c sub $0x1c,%esp
109c31: 8b 45 08 mov 0x8(%ebp),%eax
109c34: 8b 55 0c mov 0xc(%ebp),%edx
109c37: 89 55 e4 mov %edx,-0x1c(%ebp)
109c3a: 8b 5d 10 mov 0x10(%ebp),%ebx
const unsigned char *buf = _buf;
109c3d: 89 c6 mov %eax,%esi
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
109c3f: 8b bb b4 00 00 00 mov 0xb4(%ebx),%edi
109c45: 85 ff test %edi,%edi
109c47: 0f 84 eb 00 00 00 je 109d38 <rtems_termios_puts+0x110><== NEVER TAKEN
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
109c4d: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
109c53: 89 45 e0 mov %eax,-0x20(%ebp)
while (len) {
109c56: 8b 4d e4 mov -0x1c(%ebp),%ecx
109c59: 85 c9 test %ecx,%ecx
109c5b: 0f 84 cf 00 00 00 je 109d30 <rtems_termios_puts+0x108><== NEVER TAKEN
109c61: 8d 76 00 lea 0x0(%esi),%esi
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
109c64: 8b 45 e0 mov -0x20(%ebp),%eax
109c67: 40 inc %eax
109c68: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
109c6e: 31 d2 xor %edx,%edx
109c70: f7 f1 div %ecx
109c72: 89 55 dc mov %edx,-0x24(%ebp)
109c75: 89 55 e0 mov %edx,-0x20(%ebp)
rtems_interrupt_disable (level);
109c78: 9c pushf
109c79: fa cli
109c7a: 5f pop %edi
while (newHead == tty->rawOutBuf.Tail) {
109c7b: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
109c81: 3b 55 e0 cmp -0x20(%ebp),%edx
109c84: 75 3e jne 109cc4 <rtems_termios_puts+0x9c>
109c86: 89 f8 mov %edi,%eax
109c88: 89 f7 mov %esi,%edi
109c8a: 89 d6 mov %edx,%esi
tty->rawOutBufState = rob_wait;
109c8c: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
109c93: 00 00 00
rtems_interrupt_enable (level);
109c96: 50 push %eax
109c97: 9d popf
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
109c98: 52 push %edx
109c99: 6a 00 push $0x0
109c9b: 6a 00 push $0x0
109c9d: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
109ca3: e8 3c 20 00 00 call 10bce4 <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
109ca8: 83 c4 10 add $0x10,%esp
109cab: 85 c0 test %eax,%eax
109cad: 0f 85 a0 00 00 00 jne 109d53 <rtems_termios_puts+0x12b><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
109cb3: 9c pushf
109cb4: fa cli
109cb5: 58 pop %eax
* 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) {
109cb6: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
109cbc: 39 f2 cmp %esi,%edx
109cbe: 74 cc je 109c8c <rtems_termios_puts+0x64><== NEVER TAKEN
109cc0: 89 fe mov %edi,%esi
109cc2: 89 c7 mov %eax,%edi
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
109cc4: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
109cca: 8b 4b 7c mov 0x7c(%ebx),%ecx
109ccd: 8a 16 mov (%esi),%dl
109ccf: 88 14 01 mov %dl,(%ecx,%eax,1)
tty->rawOutBuf.Head = newHead;
109cd2: 8b 45 dc mov -0x24(%ebp),%eax
109cd5: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
if (tty->rawOutBufState == rob_idle) {
109cdb: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax
109ce1: 85 c0 test %eax,%eax
109ce3: 75 23 jne 109d08 <rtems_termios_puts+0xe0>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
109ce5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109ceb: a8 10 test $0x10,%al
109ced: 74 26 je 109d15 <rtems_termios_puts+0xed><== ALWAYS TAKEN
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
109cef: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109cf5: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
109cf8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
109cfe: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
109d05: 00 00 00
}
rtems_interrupt_enable (level);
109d08: 57 push %edi
109d09: 9d popf
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
109d0a: ff 4d e4 decl -0x1c(%ebp)
109d0d: 74 21 je 109d30 <rtems_termios_puts+0x108>
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
109d0f: 46 inc %esi
109d10: e9 4f ff ff ff jmp 109c64 <rtems_termios_puts+0x3c>
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,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
109d15: 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,
109d1b: 51 push %ecx
109d1c: 6a 01 push $0x1
109d1e: 03 43 7c add 0x7c(%ebx),%eax
109d21: 50 push %eax
109d22: ff 73 10 pushl 0x10(%ebx)
109d25: ff 93 a4 00 00 00 call *0xa4(%ebx)
109d2b: 83 c4 10 add $0x10,%esp
109d2e: eb ce jmp 109cfe <rtems_termios_puts+0xd6>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
109d30: 8d 65 f4 lea -0xc(%ebp),%esp
109d33: 5b pop %ebx
109d34: 5e pop %esi
109d35: 5f pop %edi
109d36: c9 leave
109d37: c3 ret
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);
109d38: 89 55 10 mov %edx,0x10(%ebp) <== NOT EXECUTED
109d3b: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
109d3e: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
109d41: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
109d44: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax <== NOT EXECUTED
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
109d4a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
109d4d: 5b pop %ebx <== NOT EXECUTED
109d4e: 5e pop %esi <== NOT EXECUTED
109d4f: 5f pop %edi <== NOT EXECUTED
109d50: 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);
109d51: ff e0 jmp *%eax <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
109d53: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109d56: 50 push %eax <== NOT EXECUTED
109d57: e8 9c 25 00 00 call 10c2f8 <rtems_fatal_error_occurred><== NOT EXECUTED
0010a384 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
10a384: 55 push %ebp
10a385: 89 e5 mov %esp,%ebp
10a387: 57 push %edi
10a388: 56 push %esi
10a389: 53 push %ebx
10a38a: 83 ec 30 sub $0x30,%esp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10a38d: 8b 55 08 mov 0x8(%ebp),%edx
10a390: 8b 02 mov (%edx),%eax
10a392: 8b 58 34 mov 0x34(%eax),%ebx
uint32_t count = args->count;
10a395: 8b 4a 10 mov 0x10(%edx),%ecx
10a398: 89 4d dc mov %ecx,-0x24(%ebp)
char *buffer = args->buffer;
10a39b: 8b 42 0c mov 0xc(%edx),%eax
10a39e: 89 45 d8 mov %eax,-0x28(%ebp)
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10a3a1: 6a 00 push $0x0
10a3a3: 6a 00 push $0x0
10a3a5: ff 73 14 pushl 0x14(%ebx)
10a3a8: e8 37 19 00 00 call 10bce4 <rtems_semaphore_obtain>
10a3ad: 89 45 e0 mov %eax,-0x20(%ebp)
if (sc != RTEMS_SUCCESSFUL)
10a3b0: 83 c4 10 add $0x10,%esp
10a3b3: 85 c0 test %eax,%eax
10a3b5: 75 35 jne 10a3ec <rtems_termios_read+0x68><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
10a3b7: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10a3bd: c1 e0 05 shl $0x5,%eax
10a3c0: 8b 80 48 8f 12 00 mov 0x128f48(%eax),%eax
10a3c6: 85 c0 test %eax,%eax
10a3c8: 74 2e je 10a3f8 <rtems_termios_read+0x74><== ALWAYS TAKEN
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
10a3ca: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a3cd: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
10a3d0: 53 push %ebx <== NOT EXECUTED
10a3d1: ff d0 call *%eax <== NOT EXECUTED
10a3d3: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
10a3d6: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED
10a3dd: 00 00 00
rtems_semaphore_release (tty->isem);
10a3e0: 59 pop %ecx <== NOT EXECUTED
10a3e1: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED
10a3e4: e8 f7 19 00 00 call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
return sc;
10a3e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
10a3ec: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10a3ef: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10a3f2: 5b pop %ebx <== NOT EXECUTED
10a3f3: 5e pop %esi <== NOT EXECUTED
10a3f4: 5f pop %edi <== NOT EXECUTED
10a3f5: c9 leave <== NOT EXECUTED
10a3f6: c3 ret <== NOT EXECUTED
10a3f7: 90 nop <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
10a3f8: 8b 43 24 mov 0x24(%ebx),%eax
10a3fb: 3b 43 20 cmp 0x20(%ebx),%eax
10a3fe: 74 5f je 10a45f <rtems_termios_read+0xdb><== ALWAYS TAKEN
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
10a400: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED
10a403: 85 c9 test %ecx,%ecx <== NOT EXECUTED
10a405: 74 29 je 10a430 <rtems_termios_read+0xac><== NOT EXECUTED
10a407: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
10a40a: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED
10a40d: 7d 21 jge 10a430 <rtems_termios_read+0xac><== NOT EXECUTED
10a40f: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED
10a412: 8b 7d dc mov -0x24(%ebp),%edi <== NOT EXECUTED
10a415: eb 06 jmp 10a41d <rtems_termios_read+0x99><== NOT EXECUTED
10a417: 90 nop <== NOT EXECUTED
10a418: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED
10a41b: 7e 10 jle 10a42d <rtems_termios_read+0xa9><== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
10a41d: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED
10a420: 8a 0c 06 mov (%esi,%eax,1),%cl <== NOT EXECUTED
10a423: 88 0a mov %cl,(%edx) <== NOT EXECUTED
10a425: 42 inc %edx <== NOT EXECUTED
10a426: 40 inc %eax <== NOT EXECUTED
10a427: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
10a42a: 4f dec %edi <== NOT EXECUTED
10a42b: 75 eb jne 10a418 <rtems_termios_read+0x94><== NOT EXECUTED
10a42d: 89 7d dc mov %edi,-0x24(%ebp) <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
10a430: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
10a433: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED
10a436: 2b 45 dc sub -0x24(%ebp),%eax <== NOT EXECUTED
10a439: 89 42 18 mov %eax,0x18(%edx) <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
10a43c: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED
10a443: 00 00 00
rtems_semaphore_release (tty->isem);
10a446: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a449: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED
10a44c: e8 8f 19 00 00 call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
return sc;
10a451: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10a454: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10a457: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10a45a: 5b pop %ebx <== NOT EXECUTED
10a45b: 5e pop %esi <== NOT EXECUTED
10a45c: 5f pop %edi <== NOT EXECUTED
10a45d: c9 leave <== NOT EXECUTED
10a45e: c3 ret <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
10a45f: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
10a466: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
tty->read_start_column = tty->column;
10a46d: 8b 43 28 mov 0x28(%ebx),%eax
10a470: 89 43 2c mov %eax,0x2c(%ebx)
if (tty->device.pollRead != NULL
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
10a473: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
10a479: 85 c0 test %eax,%eax
10a47b: 74 0e je 10a48b <rtems_termios_read+0x107><== ALWAYS TAKEN
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
10a47d: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx <== NOT EXECUTED
10a483: 85 d2 test %edx,%edx <== NOT EXECUTED
10a485: 0f 84 82 01 00 00 je 10a60d <rtems_termios_read+0x289><== 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;
10a48b: 8b 73 74 mov 0x74(%ebx),%esi
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,
10a48e: 8d 53 49 lea 0x49(%ebx),%edx
10a491: 89 55 d4 mov %edx,-0x2c(%ebp)
10a494: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp)
10a49b: 90 nop
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a49c: 8b 53 5c mov 0x5c(%ebx),%edx
10a49f: 8b 43 60 mov 0x60(%ebx),%eax
10a4a2: 39 c2 cmp %eax,%edx
10a4a4: 0f 84 06 01 00 00 je 10a5b0 <rtems_termios_read+0x22c><== ALWAYS TAKEN
10a4aa: a1 14 70 12 00 mov 0x127014,%eax <== NOT EXECUTED
10a4af: 48 dec %eax <== NOT EXECUTED
10a4b0: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED
10a4b3: 7f 3c jg 10a4f1 <rtems_termios_read+0x16d><== NOT EXECUTED
10a4b5: e9 f6 00 00 00 jmp 10a5b0 <rtems_termios_read+0x22c><== NOT EXECUTED
10a4ba: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
10a4bc: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
10a4bf: 89 da mov %ebx,%edx <== NOT EXECUTED
10a4c1: e8 3e fd ff ff call 10a204 <siproc> <== NOT EXECUTED
10a4c6: 85 c0 test %eax,%eax <== NOT EXECUTED
10a4c8: 74 07 je 10a4d1 <rtems_termios_read+0x14d><== NOT EXECUTED
wait = 0;
}
else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
10a4ca: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
10a4d1: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a4d4: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED
10a4d7: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
10a4da: 39 c2 cmp %eax,%edx <== NOT EXECUTED
10a4dc: 0f 84 ce 00 00 00 je 10a5b0 <rtems_termios_read+0x22c><== NOT EXECUTED
10a4e2: a1 14 70 12 00 mov 0x127014,%eax <== NOT EXECUTED
10a4e7: 48 dec %eax <== NOT EXECUTED
10a4e8: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED
10a4eb: 0f 8d bf 00 00 00 jge 10a5b0 <rtems_termios_read+0x22c><== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
10a4f1: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED
10a4f4: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED
10a4f7: 40 inc %eax <== NOT EXECUTED
10a4f8: 31 d2 xor %edx,%edx <== NOT EXECUTED
10a4fa: f7 f1 div %ecx <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
10a4fc: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED
10a4ff: 8a 0c 10 mov (%eax,%edx,1),%cl <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
10a502: 89 53 5c mov %edx,0x5c(%ebx) <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
10a505: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
10a508: 8b 7b 64 mov 0x64(%ebx),%edi <== NOT EXECUTED
10a50b: 8b 73 64 mov 0x64(%ebx),%esi <== NOT EXECUTED
10a50e: 8d 04 07 lea (%edi,%eax,1),%eax <== NOT EXECUTED
10a511: 29 d0 sub %edx,%eax <== NOT EXECUTED
10a513: 31 d2 xor %edx,%edx <== NOT EXECUTED
10a515: f7 f6 div %esi <== NOT EXECUTED
10a517: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx <== NOT EXECUTED
10a51d: 73 5d jae 10a57c <rtems_termios_read+0x1f8><== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
10a51f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a525: 83 e0 fe and $0xfffffffe,%eax <== NOT EXECUTED
10a528: 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))
10a52e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a534: 25 02 02 00 00 and $0x202,%eax <== NOT EXECUTED
10a539: 3d 02 02 00 00 cmp $0x202,%eax <== NOT EXECUTED
10a53e: 0f 84 94 00 00 00 je 10a5d8 <rtems_termios_read+0x254><== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
10a544: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a54a: f6 c4 01 test $0x1,%ah <== NOT EXECUTED
10a54d: 74 2d je 10a57c <rtems_termios_read+0x1f8><== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
10a54f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a555: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
10a558: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
10a55e: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
10a564: 85 c0 test %eax,%eax <== NOT EXECUTED
10a566: 74 14 je 10a57c <rtems_termios_read+0x1f8><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
10a568: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a56b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a56e: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED
10a571: ff d0 call *%eax <== NOT EXECUTED
10a573: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a576: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED
10a579: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
10a57c: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED
10a580: 0f 85 36 ff ff ff jne 10a4bc <rtems_termios_read+0x138><== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
}
else {
siproc (c, tty);
10a586: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
10a589: 89 da mov %ebx,%edx <== NOT EXECUTED
10a58b: e8 74 fc ff ff call 10a204 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
10a590: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED
10a594: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED
10a597: 0f 8d 2d ff ff ff jge 10a4ca <rtems_termios_read+0x146><== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
10a59d: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a5a0: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED
10a5a3: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
10a5a6: 39 c2 cmp %eax,%edx <== NOT EXECUTED
10a5a8: 0f 85 34 ff ff ff jne 10a4e2 <rtems_termios_read+0x15e><== NOT EXECUTED
10a5ae: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
10a5b0: 8b 45 e4 mov -0x1c(%ebp),%eax
10a5b3: 85 c0 test %eax,%eax
10a5b5: 0f 84 45 fe ff ff je 10a400 <rtems_termios_read+0x7c><== NEVER TAKEN
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
10a5bb: 57 push %edi
10a5bc: 56 push %esi
10a5bd: ff 73 6c pushl 0x6c(%ebx)
10a5c0: ff 73 68 pushl 0x68(%ebx)
10a5c3: e8 1c 17 00 00 call 10bce4 <rtems_semaphore_obtain>
tty->rawInBufSemaphoreOptions,
timeout);
if (sc != RTEMS_SUCCESSFUL)
10a5c8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a5cb: 85 c0 test %eax,%eax <== NOT EXECUTED
10a5cd: 0f 84 c9 fe ff ff je 10a49c <rtems_termios_read+0x118><== NOT EXECUTED
10a5d3: e9 28 fe ff ff jmp 10a400 <rtems_termios_read+0x7c><== 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))
10a5d8: 8b b3 94 00 00 00 mov 0x94(%ebx),%esi <== NOT EXECUTED
10a5de: 85 f6 test %esi,%esi <== NOT EXECUTED
10a5e0: 74 0e je 10a5f0 <rtems_termios_read+0x26c><== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
10a5e2: 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))
10a5e8: a8 20 test $0x20,%al <== NOT EXECUTED
10a5ea: 0f 84 54 ff ff ff je 10a544 <rtems_termios_read+0x1c0><== 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,
10a5f0: 52 push %edx <== NOT EXECUTED
10a5f1: 6a 01 push $0x1 <== NOT EXECUTED
10a5f3: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
10a5f6: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a5f9: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED
10a5fc: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10a602: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a605: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED
10a608: e9 6f ff ff ff jmp 10a57c <rtems_termios_read+0x1f8><== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
10a60d: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED
10a611: 75 1d jne 10a630 <rtems_termios_read+0x2ac><== NOT EXECUTED
10a613: eb 39 jmp 10a64e <rtems_termios_read+0x2ca><== NOT EXECUTED
10a615: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
10a618: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
10a61b: 89 da mov %ebx,%edx <== NOT EXECUTED
10a61d: e8 e2 fb ff ff call 10a204 <siproc> <== NOT EXECUTED
10a622: 85 c0 test %eax,%eax <== NOT EXECUTED
10a624: 0f 85 d6 fd ff ff jne 10a400 <rtems_termios_read+0x7c><== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
10a62a: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
10a630: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a633: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a636: ff d0 call *%eax <== NOT EXECUTED
if (n < 0) {
10a638: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a63b: 85 c0 test %eax,%eax <== NOT EXECUTED
10a63d: 79 d9 jns 10a618 <rtems_termios_read+0x294><== NOT EXECUTED
rtems_task_wake_after (1);
10a63f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a642: 6a 01 push $0x1 <== NOT EXECUTED
10a644: e8 4f 1b 00 00 call 10c198 <rtems_task_wake_after> <== NOT EXECUTED
10a649: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a64c: eb dc jmp 10a62a <rtems_termios_read+0x2a6><== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
10a64e: e8 a9 0f 00 00 call 10b5fc <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
10a653: 89 c6 mov %eax,%esi <== NOT EXECUTED
10a655: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
10a658: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a65b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a65e: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED
if (n < 0) {
10a664: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a667: 85 c0 test %eax,%eax <== NOT EXECUTED
10a669: 78 25 js 10a690 <rtems_termios_read+0x30c><== NOT EXECUTED
}
}
rtems_task_wake_after (1);
}
else {
siproc (n, tty);
10a66b: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
10a66e: 89 da mov %ebx,%edx <== NOT EXECUTED
10a670: e8 8f fb ff ff call 10a204 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
10a675: 8a 43 47 mov 0x47(%ebx),%al <== NOT EXECUTED
10a678: 0f b6 d0 movzbl %al,%edx <== NOT EXECUTED
10a67b: 39 53 20 cmp %edx,0x20(%ebx) <== NOT EXECUTED
10a67e: 0f 8d 7c fd ff ff jge 10a400 <rtems_termios_read+0x7c><== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
10a684: 84 c0 test %al,%al <== NOT EXECUTED
10a686: 74 d0 je 10a658 <rtems_termios_read+0x2d4><== NOT EXECUTED
10a688: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
10a68c: 74 ca je 10a658 <rtems_termios_read+0x2d4><== NOT EXECUTED
10a68e: eb be jmp 10a64e <rtems_termios_read+0x2ca><== NOT EXECUTED
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
10a690: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED
10a694: 74 1d je 10a6b3 <rtems_termios_read+0x32f><== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
10a696: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
10a69a: 74 08 je 10a6a4 <rtems_termios_read+0x320><== NOT EXECUTED
10a69c: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED
10a69f: 85 ff test %edi,%edi <== NOT EXECUTED
10a6a1: 75 1a jne 10a6bd <rtems_termios_read+0x339><== NOT EXECUTED
10a6a3: 90 nop <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
10a6a4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a6a7: 6a 01 push $0x1 <== NOT EXECUTED
10a6a9: e8 ea 1a 00 00 call 10c198 <rtems_task_wake_after> <== NOT EXECUTED
10a6ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a6b1: eb a5 jmp 10a658 <rtems_termios_read+0x2d4><== NOT EXECUTED
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
10a6b3: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
10a6b7: 0f 84 43 fd ff ff je 10a400 <rtems_termios_read+0x7c><== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
10a6bd: e8 3a 0f 00 00 call 10b5fc <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
10a6c2: 29 f0 sub %esi,%eax <== NOT EXECUTED
10a6c4: 3b 43 54 cmp 0x54(%ebx),%eax <== NOT EXECUTED
10a6c7: 76 db jbe 10a6a4 <rtems_termios_read+0x320><== NOT EXECUTED
10a6c9: e9 32 fd ff ff jmp 10a400 <rtems_termios_read+0x7c><== NOT EXECUTED
00109690 <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)
{
109690: 55 push %ebp
109691: 89 e5 mov %esp,%ebp
109693: 57 push %edi
109694: 56 push %esi
109695: 53 push %ebx
109696: 83 ec 0c sub $0xc,%esp
109699: 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))
10969c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1096a2: 25 03 04 00 00 and $0x403,%eax
1096a7: 3d 01 04 00 00 cmp $0x401,%eax
1096ac: 0f 84 86 01 00 00 je 109838 <rtems_termios_refill_transmitter+0x1a8><== NEVER TAKEN
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
}
else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
1096b2: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1096b8: 83 e0 03 and $0x3,%eax
1096bb: 83 f8 02 cmp $0x2,%eax
1096be: 0f 84 b0 01 00 00 je 109874 <rtems_termios_refill_transmitter+0x1e4><== NEVER TAKEN
rtems_interrupt_enable(level);
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
1096c4: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
1096ca: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
1096d0: 39 c2 cmp %eax,%edx
1096d2: 0f 84 b0 00 00 00 je 109788 <rtems_termios_refill_transmitter+0xf8><== NEVER TAKEN
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
1096d8: 9c pushf
1096d9: fa cli
1096da: 58 pop %eax
len = tty->t_dqlen;
1096db: 8b 8b 90 00 00 00 mov 0x90(%ebx),%ecx
tty->t_dqlen = 0;
1096e1: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx)
1096e8: 00 00 00
rtems_interrupt_enable(level);
1096eb: 50 push %eax
1096ec: 9d popf
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
1096ed: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
1096f3: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi
1096f9: 8d 04 01 lea (%ecx,%eax,1),%eax
1096fc: 31 d2 xor %edx,%edx
1096fe: f7 f7 div %edi
109700: 89 d6 mov %edx,%esi
tty->rawOutBuf.Tail = newTail;
109702: 89 93 84 00 00 00 mov %edx,0x84(%ebx)
if (tty->rawOutBufState == rob_wait) {
109708: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
10970f: 0f 84 e7 00 00 00 je 1097fc <rtems_termios_refill_transmitter+0x16c>
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
109715: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
10971b: 39 f0 cmp %esi,%eax
10971d: 0f 84 81 00 00 00 je 1097a4 <rtems_termios_refill_transmitter+0x114>
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
109723: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109729: 25 10 02 00 00 and $0x210,%eax
10972e: 3d 10 02 00 00 cmp $0x210,%eax
109733: 0f 84 db 00 00 00 je 109814 <rtems_termios_refill_transmitter+0x184><== NEVER TAKEN
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
109739: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
10973f: 39 c6 cmp %eax,%esi
109741: 0f 87 95 00 00 00 ja 1097dc <rtems_termios_refill_transmitter+0x14c>
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
109747: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi
10974d: 29 f7 sub %esi,%edi
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
10974f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109755: f6 c4 06 test $0x6,%ah
109758: 0f 84 95 00 00 00 je 1097f3 <rtems_termios_refill_transmitter+0x163><== ALWAYS TAKEN
10975e: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
109763: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
109768: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
10976f: 00 00 00
(*tty->device.write)(tty->minor,
109772: 52 push %edx
109773: 50 push %eax
109774: 8b 43 7c mov 0x7c(%ebx),%eax
109777: 01 f0 add %esi,%eax
109779: 50 push %eax
10977a: ff 73 10 pushl 0x10(%ebx)
10977d: ff 93 a4 00 00 00 call *0xa4(%ebx)
109783: 83 c4 10 add $0x10,%esp
109786: eb 44 jmp 1097cc <rtems_termios_refill_transmitter+0x13c>
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
109788: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) <== NOT EXECUTED
10978f: 0f 84 03 01 00 00 je 109898 <rtems_termios_refill_transmitter+0x208><== NOT EXECUTED
109795: 31 ff xor %edi,%edi <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
109797: 89 f8 mov %edi,%eax <== NOT EXECUTED
109799: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10979c: 5b pop %ebx <== NOT EXECUTED
10979d: 5e pop %esi <== NOT EXECUTED
10979e: 5f pop %edi <== NOT EXECUTED
10979f: c9 leave <== NOT EXECUTED
1097a0: c3 ret <== NOT EXECUTED
1097a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
1097a4: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
1097ab: 00 00 00
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
1097ae: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax
1097b4: 85 c0 test %eax,%eax
1097b6: 74 7a je 109832 <rtems_termios_refill_transmitter+0x1a2><== ALWAYS TAKEN
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
1097b8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1097bb: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED
1097c1: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
1097c4: 52 push %edx <== NOT EXECUTED
1097c5: ff d0 call *%eax <== NOT EXECUTED
1097c7: 31 ff xor %edi,%edi <== NOT EXECUTED
1097c9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
1097cc: 89 b3 84 00 00 00 mov %esi,0x84(%ebx)
}
return nToSend;
}
1097d2: 89 f8 mov %edi,%eax
1097d4: 8d 65 f4 lea -0xc(%ebp),%esp
1097d7: 5b pop %ebx
1097d8: 5e pop %esi
1097d9: 5f pop %edi
1097da: c9 leave
1097db: c3 ret
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
1097dc: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi
1097e2: 29 f7 sub %esi,%edi
else
nToSend = tty->rawOutBuf.Head - newTail;
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
1097e4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1097ea: f6 c4 06 test $0x6,%ah
1097ed: 0f 85 6b ff ff ff jne 10975e <rtems_termios_refill_transmitter+0xce><== NEVER TAKEN
1097f3: 89 f8 mov %edi,%eax
1097f5: e9 6e ff ff ff jmp 109768 <rtems_termios_refill_transmitter+0xd8>
1097fa: 66 90 xchg %ax,%ax
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
1097fc: 83 ec 0c sub $0xc,%esp
1097ff: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
109805: e8 d6 25 00 00 call 10bde0 <rtems_semaphore_release>
10980a: 83 c4 10 add $0x10,%esp
10980d: e9 03 ff ff ff jmp 109715 <rtems_termios_refill_transmitter+0x85>
109812: 66 90 xchg %ax,%ax
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
109814: 9c pushf <== NOT EXECUTED
109815: fa cli <== NOT EXECUTED
109816: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
109817: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10981d: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
109820: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
109826: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED
10982d: 00 00 00
rtems_interrupt_enable(level);
109830: 52 push %edx <== NOT EXECUTED
109831: 9d popf <== NOT EXECUTED
109832: 31 ff xor %edi,%edi
109834: eb 96 jmp 1097cc <rtems_termios_refill_transmitter+0x13c>
109836: 66 90 xchg %ax,%ax
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
109838: 56 push %esi <== NOT EXECUTED
109839: 6a 01 push $0x1 <== NOT EXECUTED
10983b: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED
10983e: 50 push %eax <== NOT EXECUTED
10983f: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
109842: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
109848: 9c pushf <== NOT EXECUTED
109849: fa cli <== NOT EXECUTED
10984a: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
10984b: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
109851: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109857: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
tty->flow_ctrl &= ~FL_ISNTXOF;
10985a: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
109860: 52 push %edx <== NOT EXECUTED
109861: 9d popf <== NOT EXECUTED
109862: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
109867: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
10986a: 89 f8 mov %edi,%eax <== NOT EXECUTED
10986c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10986f: 5b pop %ebx <== NOT EXECUTED
109870: 5e pop %esi <== NOT EXECUTED
109871: 5f pop %edi <== NOT EXECUTED
109872: c9 leave <== NOT EXECUTED
109873: c3 ret <== NOT EXECUTED
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor,
109874: 51 push %ecx <== NOT EXECUTED
109875: 6a 01 push $0x1 <== NOT EXECUTED
109877: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED
10987a: 50 push %eax <== NOT EXECUTED
10987b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10987e: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
109884: 9c pushf <== NOT EXECUTED
109885: fa cli <== NOT EXECUTED
109886: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
109887: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
10988d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109893: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
109896: eb c2 jmp 10985a <rtems_termios_refill_transmitter+0x1ca><== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
109898: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10989b: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED
1098a1: e8 3a 25 00 00 call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
1098a6: 31 ff xor %edi,%edi <== NOT EXECUTED
1098a8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1098ab: e9 e7 fe ff ff jmp 109797 <rtems_termios_refill_transmitter+0x107><== NOT EXECUTED
0010b1d0 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
10b1d0: 55 push %ebp <== NOT EXECUTED
10b1d1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10b1d3: 57 push %edi <== NOT EXECUTED
10b1d4: 56 push %esi <== NOT EXECUTED
10b1d5: 53 push %ebx <== NOT EXECUTED
10b1d6: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
10b1d9: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
10b1dc: 8d 75 e0 lea -0x20(%ebp),%esi <== NOT EXECUTED
10b1df: 8d 7d e7 lea -0x19(%ebp),%edi <== NOT EXECUTED
10b1e2: 66 90 xchg %ax,%ax <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
10b1e4: 56 push %esi <== NOT EXECUTED
10b1e5: 6a 00 push $0x0 <== NOT EXECUTED
10b1e7: 6a 02 push $0x2 <== NOT EXECUTED
10b1e9: 6a 03 push $0x3 <== NOT EXECUTED
10b1eb: e8 74 04 00 00 call 10b664 <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) {
10b1f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b1f3: f6 45 e0 01 testb $0x1,-0x20(%ebp) <== NOT EXECUTED
10b1f7: 75 27 jne 10b220 <rtems_termios_rxdaemon+0x50><== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
10b1f9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b1fc: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10b1ff: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED
if (c != EOF) {
10b205: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b208: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
10b20b: 74 d7 je 10b1e4 <rtems_termios_rxdaemon+0x14><== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
10b20d: 88 45 e7 mov %al,-0x19(%ebp) <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
10b210: 50 push %eax <== NOT EXECUTED
10b211: 6a 01 push $0x1 <== NOT EXECUTED
10b213: 57 push %edi <== NOT EXECUTED
10b214: 53 push %ebx <== NOT EXECUTED
10b215: e8 fe e6 ff ff call 109918 <rtems_termios_enqueue_raw_characters><== NOT EXECUTED
10b21a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b21d: eb c5 jmp 10b1e4 <rtems_termios_rxdaemon+0x14><== NOT EXECUTED
10b21f: 90 nop <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
tty->rxTaskId = 0;
10b220: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED
10b227: 00 00 00
rtems_task_delete(RTEMS_SELF);
10b22a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b22d: 6a 00 push $0x0 <== NOT EXECUTED
10b22f: e8 ac 0d 00 00 call 10bfe0 <rtems_task_delete> <== NOT EXECUTED
10b234: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b237: eb ab jmp 10b1e4 <rtems_termios_rxdaemon+0x14><== NOT EXECUTED
00109674 <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)
{
109674: 55 push %ebp <== NOT EXECUTED
109675: 89 e5 mov %esp,%ebp <== NOT EXECUTED
109677: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
/*
* send event to rx daemon task
*/
rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT);
10967a: 6a 02 push $0x2 <== NOT EXECUTED
10967c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10967f: ff b0 c4 00 00 00 pushl 0xc4(%eax) <== NOT EXECUTED
109685: e8 5e 21 00 00 call 10b7e8 <rtems_event_send> <== NOT EXECUTED
10968a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10968d: c9 leave <== NOT EXECUTED
10968e: c3 ret <== NOT EXECUTED
0010b164 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
10b164: 55 push %ebp <== NOT EXECUTED
10b165: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10b167: 56 push %esi <== NOT EXECUTED
10b168: 53 push %ebx <== NOT EXECUTED
10b169: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
10b16c: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
10b16f: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED
10b172: 66 90 xchg %ax,%ax <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
10b174: 56 push %esi <== NOT EXECUTED
10b175: 6a 00 push $0x0 <== NOT EXECUTED
10b177: 6a 02 push $0x2 <== NOT EXECUTED
10b179: 6a 03 push $0x3 <== NOT EXECUTED
10b17b: e8 e4 04 00 00 call 10b664 <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) {
10b180: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b183: f6 45 f4 01 testb $0x1,-0xc(%ebp) <== NOT EXECUTED
10b187: 75 2b jne 10b1b4 <rtems_termios_txdaemon+0x50><== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
10b189: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
10b18f: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
10b192: 8b 80 54 8f 12 00 mov 0x128f54(%eax),%eax <== NOT EXECUTED
10b198: 85 c0 test %eax,%eax <== NOT EXECUTED
10b19a: 74 09 je 10b1a5 <rtems_termios_txdaemon+0x41><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
10b19c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b19f: 53 push %ebx <== NOT EXECUTED
10b1a0: ff d0 call *%eax <== NOT EXECUTED
10b1a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
10b1a5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b1a8: 53 push %ebx <== NOT EXECUTED
10b1a9: e8 e2 e4 ff ff call 109690 <rtems_termios_refill_transmitter><== NOT EXECUTED
10b1ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b1b1: eb c1 jmp 10b174 <rtems_termios_txdaemon+0x10><== NOT EXECUTED
10b1b3: 90 nop <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
tty->txTaskId = 0;
10b1b4: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED
10b1bb: 00 00 00
rtems_task_delete(RTEMS_SELF);
10b1be: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b1c1: 6a 00 push $0x0 <== NOT EXECUTED
10b1c3: e8 18 0e 00 00 call 10bfe0 <rtems_task_delete> <== NOT EXECUTED
10b1c8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b1cb: eb a7 jmp 10b174 <rtems_termios_txdaemon+0x10><== NOT EXECUTED
0010a258 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
10a258: 55 push %ebp
10a259: 89 e5 mov %esp,%ebp
10a25b: 57 push %edi
10a25c: 56 push %esi
10a25d: 53 push %ebx
10a25e: 83 ec 20 sub $0x20,%esp
10a261: 8b 7d 08 mov 0x8(%ebp),%edi
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10a264: 8b 07 mov (%edi),%eax
10a266: 8b 70 34 mov 0x34(%eax),%esi
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10a269: 6a 00 push $0x0
10a26b: 6a 00 push $0x0
10a26d: ff 76 18 pushl 0x18(%esi)
10a270: e8 6f 1a 00 00 call 10bce4 <rtems_semaphore_obtain>
10a275: 89 45 e4 mov %eax,-0x1c(%ebp)
if (sc != RTEMS_SUCCESSFUL)
10a278: 83 c4 10 add $0x10,%esp
10a27b: 85 c0 test %eax,%eax
10a27d: 75 29 jne 10a2a8 <rtems_termios_write+0x50><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
10a27f: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax
10a285: c1 e0 05 shl $0x5,%eax
10a288: 8b 80 4c 8f 12 00 mov 0x128f4c(%eax),%eax
10a28e: 85 c0 test %eax,%eax
10a290: 74 22 je 10a2b4 <rtems_termios_write+0x5c><== ALWAYS TAKEN
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
10a292: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a295: 57 push %edi <== NOT EXECUTED
10a296: 56 push %esi <== NOT EXECUTED
10a297: ff d0 call *%eax <== NOT EXECUTED
10a299: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
10a29c: 5f pop %edi <== NOT EXECUTED
10a29d: ff 76 18 pushl 0x18(%esi) <== NOT EXECUTED
10a2a0: e8 3b 1b 00 00 call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
return sc;
10a2a5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
10a2a8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
10a2ab: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10a2ae: 5b pop %ebx <== NOT EXECUTED
10a2af: 5e pop %esi <== NOT EXECUTED
10a2b0: 5f pop %edi <== NOT EXECUTED
10a2b1: c9 leave <== NOT EXECUTED
10a2b2: c3 ret <== NOT EXECUTED
10a2b3: 90 nop <== NOT EXECUTED
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
10a2b4: f6 46 34 01 testb $0x1,0x34(%esi)
10a2b8: 74 4e je 10a308 <rtems_termios_write+0xb0><== NEVER TAKEN
uint32_t count = args->count;
10a2ba: 8b 47 10 mov 0x10(%edi),%eax
10a2bd: 89 45 e0 mov %eax,-0x20(%ebp)
char *buffer = args->buffer;
10a2c0: 8b 47 0c mov 0xc(%edi),%eax
while (count--)
10a2c3: 8b 5d e0 mov -0x20(%ebp),%ebx
10a2c6: 85 db test %ebx,%ebx
10a2c8: 74 56 je 10a320 <rtems_termios_write+0xc8><== NEVER TAKEN
10a2ca: 31 db xor %ebx,%ebx
10a2cc: 89 7d dc mov %edi,-0x24(%ebp)
10a2cf: 89 c7 mov %eax,%edi
10a2d1: 8d 76 00 lea 0x0(%esi),%esi
oproc (*buffer++, tty);
10a2d4: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax
10a2d8: 89 f2 mov %esi,%edx
10a2da: e8 7d fa ff ff call 109d5c <oproc>
10a2df: 43 inc %ebx
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
10a2e0: 3b 5d e0 cmp -0x20(%ebp),%ebx
10a2e3: 75 ef jne 10a2d4 <rtems_termios_write+0x7c>
10a2e5: 8b 7d dc mov -0x24(%ebp),%edi
10a2e8: 8b 47 10 mov 0x10(%edi),%eax
oproc (*buffer++, tty);
args->bytes_moved = args->count;
10a2eb: 89 47 18 mov %eax,0x18(%edi)
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
10a2ee: 83 ec 0c sub $0xc,%esp
10a2f1: ff 76 18 pushl 0x18(%esi)
10a2f4: e8 e7 1a 00 00 call 10bde0 <rtems_semaphore_release>
return sc;
10a2f9: 83 c4 10 add $0x10,%esp
}
10a2fc: 8b 45 e4 mov -0x1c(%ebp),%eax
10a2ff: 8d 65 f4 lea -0xc(%ebp),%esp
10a302: 5b pop %ebx
10a303: 5e pop %esi
10a304: 5f pop %edi
10a305: c9 leave
10a306: c3 ret
10a307: 90 nop
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
10a308: 51 push %ecx <== NOT EXECUTED
10a309: 56 push %esi <== NOT EXECUTED
10a30a: ff 77 10 pushl 0x10(%edi) <== NOT EXECUTED
10a30d: ff 77 0c pushl 0xc(%edi) <== NOT EXECUTED
10a310: e8 13 f9 ff ff call 109c28 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
10a315: 8b 47 10 mov 0x10(%edi),%eax <== NOT EXECUTED
10a318: 89 47 18 mov %eax,0x18(%edi) <== NOT EXECUTED
10a31b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a31e: eb ce jmp 10a2ee <rtems_termios_write+0x96><== NOT EXECUTED
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
10a320: 31 c0 xor %eax,%eax <== NOT EXECUTED
10a322: eb c7 jmp 10a2eb <rtems_termios_write+0x93><== NOT EXECUTED
00118fbc <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
118fbc: 55 push %ebp
118fbd: 89 e5 mov %esp,%ebp
118fbf: 83 ec 1c sub $0x1c,%esp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
118fc2: 8d 45 f4 lea -0xc(%ebp),%eax
118fc5: 50 push %eax
118fc6: ff 75 08 pushl 0x8(%ebp)
118fc9: 68 c0 4d 14 00 push $0x144dc0
118fce: e8 c5 29 00 00 call 11b998 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
118fd3: 83 c4 10 add $0x10,%esp
118fd6: 8b 55 f4 mov -0xc(%ebp),%edx
118fd9: 85 d2 test %edx,%edx
118fdb: 74 07 je 118fe4 <rtems_timer_cancel+0x28>
118fdd: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118fe2: c9 leave
118fe3: c3 ret
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
118fe4: 83 78 38 04 cmpl $0x4,0x38(%eax)
118fe8: 74 0f je 118ff9 <rtems_timer_cancel+0x3d><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
118fea: 83 ec 0c sub $0xc,%esp
118fed: 83 c0 10 add $0x10,%eax
118ff0: 50 push %eax
118ff1: e8 e2 46 00 00 call 11d6d8 <_Watchdog_Remove>
118ff6: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
118ff9: e8 7e 32 00 00 call 11c27c <_Thread_Enable_dispatch>
118ffe: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
119000: c9 leave
119001: c3 ret
0010c480 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
10c480: 55 push %ebp
10c481: 89 e5 mov %esp,%ebp
10c483: 57 push %edi
10c484: 56 push %esi
10c485: 53 push %ebx
10c486: 83 ec 0c sub $0xc,%esp
10c489: 8b 5d 08 mov 0x8(%ebp),%ebx
10c48c: 8b 75 0c mov 0xc(%ebp),%esi
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
10c48f: 85 db test %ebx,%ebx
10c491: 74 6d je 10c500 <rtems_timer_create+0x80>
return RTEMS_INVALID_NAME;
if ( !id )
10c493: 85 f6 test %esi,%esi
10c495: 0f 84 89 00 00 00 je 10c524 <rtems_timer_create+0xa4>
10c49b: a1 58 aa 12 00 mov 0x12aa58,%eax
10c4a0: 40 inc %eax
10c4a1: a3 58 aa 12 00 mov %eax,0x12aa58
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
{
return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
10c4a6: 83 ec 0c sub $0xc,%esp
10c4a9: 68 c0 b4 12 00 push $0x12b4c0
10c4ae: e8 b9 0e 00 00 call 10d36c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
10c4b3: 83 c4 10 add $0x10,%esp
10c4b6: 85 c0 test %eax,%eax
10c4b8: 74 56 je 10c510 <rtems_timer_create+0x90>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
10c4ba: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c4c1: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10c4c8: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10c4cf: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10c4d6: 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;
10c4dd: 8b 50 08 mov 0x8(%eax),%edx
10c4e0: 0f b7 fa movzwl %dx,%edi
10c4e3: 8b 0d dc b4 12 00 mov 0x12b4dc,%ecx
10c4e9: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10c4ec: 89 58 0c mov %ebx,0xc(%eax)
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
10c4ef: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10c4f1: e8 9a 1b 00 00 call 10e090 <_Thread_Enable_dispatch>
10c4f6: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
10c4f8: 8d 65 f4 lea -0xc(%ebp),%esp
10c4fb: 5b pop %ebx
10c4fc: 5e pop %esi
10c4fd: 5f pop %edi
10c4fe: c9 leave
10c4ff: c3 ret
rtems_id *id
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
10c500: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c505: 8d 65 f4 lea -0xc(%ebp),%esp
10c508: 5b pop %ebx
10c509: 5e pop %esi
10c50a: 5f pop %edi
10c50b: c9 leave
10c50c: c3 ret
10c50d: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
10c510: e8 7b 1b 00 00 call 10e090 <_Thread_Enable_dispatch>
10c515: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c51a: 8d 65 f4 lea -0xc(%ebp),%esp
10c51d: 5b pop %ebx
10c51e: 5e pop %esi
10c51f: 5f pop %edi
10c520: c9 leave
10c521: c3 ret
10c522: 66 90 xchg %ax,%ax
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
10c524: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c529: 8d 65 f4 lea -0xc(%ebp),%esp
10c52c: 5b pop %ebx
10c52d: 5e pop %esi
10c52e: 5f pop %edi
10c52f: c9 leave
10c530: c3 ret
001190b8 <rtems_timer_delete>:
*/
rtems_status_code rtems_timer_delete(
rtems_id id
)
{
1190b8: 55 push %ebp
1190b9: 89 e5 mov %esp,%ebp
1190bb: 53 push %ebx
1190bc: 83 ec 18 sub $0x18,%esp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
1190bf: 8d 45 f4 lea -0xc(%ebp),%eax
1190c2: 50 push %eax
1190c3: ff 75 08 pushl 0x8(%ebp)
1190c6: 68 c0 4d 14 00 push $0x144dc0
1190cb: e8 c8 28 00 00 call 11b998 <_Objects_Get>
1190d0: 89 c3 mov %eax,%ebx
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1190d2: 83 c4 10 add $0x10,%esp
1190d5: 8b 4d f4 mov -0xc(%ebp),%ecx
1190d8: 85 c9 test %ecx,%ecx
1190da: 75 38 jne 119114 <rtems_timer_delete+0x5c>
case OBJECTS_LOCAL:
_Objects_Close( &_Timer_Information, &the_timer->Object );
1190dc: 83 ec 08 sub $0x8,%esp
1190df: 50 push %eax
1190e0: 68 c0 4d 14 00 push $0x144dc0
1190e5: e8 3e 24 00 00 call 11b528 <_Objects_Close>
(void) _Watchdog_Remove( &the_timer->Ticker );
1190ea: 8d 43 10 lea 0x10(%ebx),%eax
1190ed: 89 04 24 mov %eax,(%esp)
1190f0: e8 e3 45 00 00 call 11d6d8 <_Watchdog_Remove>
*/
RTEMS_INLINE_ROUTINE void _Timer_Free (
Timer_Control *the_timer
)
{
_Objects_Free( &_Timer_Information, &the_timer->Object );
1190f5: 58 pop %eax
1190f6: 5a pop %edx
1190f7: 53 push %ebx
1190f8: 68 c0 4d 14 00 push $0x144dc0
1190fd: e8 2a 27 00 00 call 11b82c <_Objects_Free>
_Timer_Free( the_timer );
_Thread_Enable_dispatch();
119102: e8 75 31 00 00 call 11c27c <_Thread_Enable_dispatch>
119107: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
119109: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11910c: 8b 5d fc mov -0x4(%ebp),%ebx
11910f: c9 leave
119110: c3 ret
119111: 8d 76 00 lea 0x0(%esi),%esi
{
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
119114: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
119119: 8b 5d fc mov -0x4(%ebp),%ebx
11911c: c9 leave
11911d: c3 ret
0010c534 <rtems_timer_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
10c534: 55 push %ebp
10c535: 89 e5 mov %esp,%ebp
10c537: 57 push %edi
10c538: 56 push %esi
10c539: 53 push %ebx
10c53a: 83 ec 2c sub $0x2c,%esp
10c53d: 8b 5d 0c mov 0xc(%ebp),%ebx
10c540: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
10c543: 85 db test %ebx,%ebx
10c545: 0f 84 99 00 00 00 je 10c5e4 <rtems_timer_fire_after+0xb0>
return RTEMS_INVALID_NUMBER;
if ( !routine )
10c54b: 85 f6 test %esi,%esi
10c54d: 0f 84 b1 00 00 00 je 10c604 <rtems_timer_fire_after+0xd0>
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
10c553: 57 push %edi
10c554: 8d 45 e4 lea -0x1c(%ebp),%eax
10c557: 50 push %eax
10c558: ff 75 08 pushl 0x8(%ebp)
10c55b: 68 c0 b4 12 00 push $0x12b4c0
10c560: e8 b7 12 00 00 call 10d81c <_Objects_Get>
10c565: 89 c7 mov %eax,%edi
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
10c567: 83 c4 10 add $0x10,%esp
10c56a: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c56d: 85 c9 test %ecx,%ecx
10c56f: 74 0f je 10c580 <rtems_timer_fire_after+0x4c>
10c571: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c576: 8d 65 f4 lea -0xc(%ebp),%esp
10c579: 5b pop %ebx
10c57a: 5e pop %esi
10c57b: 5f pop %edi
10c57c: c9 leave
10c57d: c3 ret
10c57e: 66 90 xchg %ax,%ax
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
10c580: 8d 50 10 lea 0x10(%eax),%edx
10c583: 83 ec 0c sub $0xc,%esp
10c586: 52 push %edx
10c587: 89 55 d4 mov %edx,-0x2c(%ebp)
10c58a: e8 9d 2b 00 00 call 10f12c <_Watchdog_Remove>
_ISR_Disable( level );
10c58f: 9c pushf
10c590: fa cli
10c591: 58 pop %eax
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
10c592: 83 c4 10 add $0x10,%esp
10c595: 8b 57 18 mov 0x18(%edi),%edx
10c598: 85 d2 test %edx,%edx
10c59a: 8b 55 d4 mov -0x2c(%ebp),%edx
10c59d: 75 55 jne 10c5f4 <rtems_timer_fire_after+0xc0>
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL;
10c59f: c7 47 38 00 00 00 00 movl $0x0,0x38(%edi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c5a6: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
10c5ad: 89 77 2c mov %esi,0x2c(%edi)
the_watchdog->id = id;
10c5b0: 8b 4d 08 mov 0x8(%ebp),%ecx
10c5b3: 89 4f 30 mov %ecx,0x30(%edi)
the_watchdog->user_data = user_data;
10c5b6: 8b 4d 14 mov 0x14(%ebp),%ecx
10c5b9: 89 4f 34 mov %ecx,0x34(%edi)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
10c5bc: 50 push %eax
10c5bd: 9d popf
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10c5be: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10c5c1: 83 ec 08 sub $0x8,%esp
10c5c4: 52 push %edx
10c5c5: 68 38 ab 12 00 push $0x12ab38
10c5ca: e8 35 2a 00 00 call 10f004 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
10c5cf: e8 bc 1a 00 00 call 10e090 <_Thread_Enable_dispatch>
10c5d4: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10c5d6: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c5d9: 8d 65 f4 lea -0xc(%ebp),%esp
10c5dc: 5b pop %ebx
10c5dd: 5e pop %esi
10c5de: 5f pop %edi
10c5df: c9 leave
10c5e0: c3 ret
10c5e1: 8d 76 00 lea 0x0(%esi),%esi
{
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
10c5e4: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c5e9: 8d 65 f4 lea -0xc(%ebp),%esp
10c5ec: 5b pop %ebx
10c5ed: 5e pop %esi
10c5ee: 5f pop %edi
10c5ef: c9 leave
10c5f0: c3 ret
10c5f1: 8d 76 00 lea 0x0(%esi),%esi
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
10c5f4: 50 push %eax
10c5f5: 9d popf
_Thread_Enable_dispatch();
10c5f6: e8 95 1a 00 00 call 10e090 <_Thread_Enable_dispatch>
10c5fb: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10c5fd: e9 74 ff ff ff jmp 10c576 <rtems_timer_fire_after+0x42>
10c602: 66 90 xchg %ax,%ax
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
10c604: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c609: 8d 65 f4 lea -0xc(%ebp),%esp
10c60c: 5b pop %ebx
10c60d: 5e pop %esi
10c60e: 5f pop %edi
10c60f: c9 leave
10c610: c3 ret
00119200 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
119200: 55 push %ebp
119201: 89 e5 mov %esp,%ebp
119203: 57 push %edi
119204: 56 push %esi
119205: 53 push %ebx
119206: 83 ec 2c sub $0x2c,%esp
119209: 8b 75 08 mov 0x8(%ebp),%esi
11920c: 8b 7d 0c mov 0xc(%ebp),%edi
11920f: 8b 5d 10 mov 0x10(%ebp),%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
119212: 80 3d 6c 43 14 00 00 cmpb $0x0,0x14436c
119219: 75 0d jne 119228 <rtems_timer_fire_when+0x28>
11921b: b8 0b 00 00 00 mov $0xb,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
119220: 8d 65 f4 lea -0xc(%ebp),%esp
119223: 5b pop %ebx
119224: 5e pop %esi
119225: 5f pop %edi
119226: c9 leave
119227: c3 ret
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
119228: 83 ec 0c sub $0xc,%esp
11922b: 57 push %edi
11922c: e8 7b d4 ff ff call 1166ac <_TOD_Validate>
119231: 83 c4 10 add $0x10,%esp
119234: 84 c0 test %al,%al
119236: 74 1e je 119256 <rtems_timer_fire_when+0x56>
return RTEMS_INVALID_CLOCK;
if ( !routine )
119238: 85 db test %ebx,%ebx
11923a: 0f 84 a4 00 00 00 je 1192e4 <rtems_timer_fire_when+0xe4>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
119240: 83 ec 0c sub $0xc,%esp
119243: 57 push %edi
119244: e8 d7 d3 ff ff call 116620 <_TOD_To_seconds>
119249: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
11924b: 83 c4 10 add $0x10,%esp
11924e: 3b 05 ec 43 14 00 cmp 0x1443ec,%eax
119254: 77 0e ja 119264 <rtems_timer_fire_when+0x64>
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
119256: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11925b: 8d 65 f4 lea -0xc(%ebp),%esp
11925e: 5b pop %ebx
11925f: 5e pop %esi
119260: 5f pop %edi
119261: c9 leave
119262: c3 ret
119263: 90 nop
119264: 50 push %eax
119265: 8d 45 e4 lea -0x1c(%ebp),%eax
119268: 50 push %eax
119269: 56 push %esi
11926a: 68 c0 4d 14 00 push $0x144dc0
11926f: e8 24 27 00 00 call 11b998 <_Objects_Get>
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
119274: 83 c4 10 add $0x10,%esp
119277: 8b 4d e4 mov -0x1c(%ebp),%ecx
11927a: 85 c9 test %ecx,%ecx
11927c: 75 5a jne 1192d8 <rtems_timer_fire_when+0xd8>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
11927e: 8d 48 10 lea 0x10(%eax),%ecx
119281: 83 ec 0c sub $0xc,%esp
119284: 51 push %ecx
119285: 89 45 d4 mov %eax,-0x2c(%ebp)
119288: 89 4d d0 mov %ecx,-0x30(%ebp)
11928b: e8 48 44 00 00 call 11d6d8 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY;
119290: 8b 55 d4 mov -0x2c(%ebp),%edx
119293: c7 42 38 02 00 00 00 movl $0x2,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
11929a: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
1192a1: 89 5a 2c mov %ebx,0x2c(%edx)
the_watchdog->id = id;
1192a4: 89 72 30 mov %esi,0x30(%edx)
the_watchdog->user_data = user_data;
1192a7: 8b 45 14 mov 0x14(%ebp),%eax
1192aa: 89 42 34 mov %eax,0x34(%edx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
1192ad: 2b 3d ec 43 14 00 sub 0x1443ec,%edi
1192b3: 89 7a 1c mov %edi,0x1c(%edx)
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
1192b6: 58 pop %eax
1192b7: 5a pop %edx
1192b8: 8b 4d d0 mov -0x30(%ebp),%ecx
1192bb: 51 push %ecx
1192bc: 68 2c 44 14 00 push $0x14442c
1192c1: e8 ea 42 00 00 call 11d5b0 <_Watchdog_Insert>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
1192c6: e8 b1 2f 00 00 call 11c27c <_Thread_Enable_dispatch>
1192cb: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1192cd: 83 c4 10 add $0x10,%esp
1192d0: e9 4b ff ff ff jmp 119220 <rtems_timer_fire_when+0x20>
1192d5: 8d 76 00 lea 0x0(%esi),%esi
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1192d8: b8 04 00 00 00 mov $0x4,%eax
1192dd: e9 3e ff ff ff jmp 119220 <rtems_timer_fire_when+0x20>
1192e2: 66 90 xchg %ax,%ax
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
1192e4: b8 09 00 00 00 mov $0x9,%eax
1192e9: e9 32 ff ff ff jmp 119220 <rtems_timer_fire_when+0x20>
00119600 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
119600: 55 push %ebp
119601: 89 e5 mov %esp,%ebp
119603: 56 push %esi
119604: 53 push %ebx
119605: 83 ec 10 sub $0x10,%esp
119608: 8b 45 08 mov 0x8(%ebp),%eax
11960b: 85 c0 test %eax,%eax
11960d: 75 0d jne 11961c <rtems_timer_initiate_server+0x1c>
if (status) {
initialized = false;
}
#endif
return status;
11960f: b8 13 00 00 00 mov $0x13,%eax
}
119614: 8d 65 f8 lea -0x8(%ebp),%esp
119617: 5b pop %ebx
119618: 5e pop %esi
119619: c9 leave
11961a: c3 ret
11961b: 90 nop
11961c: 0f b6 15 54 bd 13 00 movzbl 0x13bd54,%edx
119623: 39 d0 cmp %edx,%eax
119625: 76 35 jbe 11965c <rtems_timer_initiate_server+0x5c>
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
119627: 40 inc %eax
119628: 75 e5 jne 11960f <rtems_timer_initiate_server+0xf>
11962a: 31 f6 xor %esi,%esi
11962c: 8b 15 58 43 14 00 mov 0x144358,%edx
119632: 42 inc %edx
119633: 89 15 58 43 14 00 mov %edx,0x144358
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
119639: 8a 1d e0 fb 13 00 mov 0x13fbe0,%bl
initialized = true;
11963f: c6 05 e0 fb 13 00 01 movb $0x1,0x13fbe0
_Thread_Enable_dispatch();
119646: e8 31 2c 00 00 call 11c27c <_Thread_Enable_dispatch>
if ( tmpInitialized )
11964b: 84 db test %bl,%bl
11964d: 74 11 je 119660 <rtems_timer_initiate_server+0x60>
11964f: b8 0e 00 00 00 mov $0xe,%eax
initialized = false;
}
#endif
return status;
}
119654: 8d 65 f8 lea -0x8(%ebp),%esp
119657: 5b pop %ebx
119658: 5e pop %esi
119659: c9 leave
11965a: c3 ret
11965b: 90 nop
11965c: 89 c6 mov %eax,%esi
11965e: eb cc jmp 11962c <rtems_timer_initiate_server+0x2c>
* other library rules. For example, if using a TSR written in Ada the
* Server should run at the same priority as the priority Ada task.
* Otherwise, the priority ceiling for the mutex used to protect the
* GNAT run-time is violated.
*/
status = rtems_task_create(
119660: 83 ec 08 sub $0x8,%esp
119663: 8d 45 f4 lea -0xc(%ebp),%eax
119666: 50 push %eax
119667: 8b 45 10 mov 0x10(%ebp),%eax
11966a: 80 cc 80 or $0x80,%ah
11966d: 50 push %eax
11966e: 68 00 01 00 00 push $0x100
119673: ff 75 0c pushl 0xc(%ebp)
119676: 56 push %esi
119677: 68 45 4d 49 54 push $0x54494d45
11967c: e8 87 f0 ff ff call 118708 <rtems_task_create>
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
119681: 83 c4 20 add $0x20,%esp
119684: 85 c0 test %eax,%eax
119686: 74 10 je 119698 <rtems_timer_initiate_server+0x98>
initialized = false;
119688: c6 05 e0 fb 13 00 00 movb $0x0,0x13fbe0
initialized = false;
}
#endif
return status;
}
11968f: 8d 65 f8 lea -0x8(%ebp),%esp
119692: 5b pop %ebx
119693: 5e pop %esi
119694: c9 leave
119695: c3 ret
119696: 66 90 xchg %ax,%ax
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
119698: 8b 45 f4 mov -0xc(%ebp),%eax
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
11969b: 0f b7 c8 movzwl %ax,%ecx
11969e: 8b 15 fc 42 14 00 mov 0x1442fc,%edx
1196a4: 8b 14 8a mov (%edx,%ecx,4),%edx
1196a7: 89 15 00 fc 13 00 mov %edx,0x13fc00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
1196ad: c7 05 30 fc 13 00 34 movl $0x13fc34,0x13fc30
1196b4: fc 13 00
the_chain->permanent_null = NULL;
1196b7: c7 05 34 fc 13 00 00 movl $0x0,0x13fc34
1196be: 00 00 00
the_chain->last = _Chain_Head(the_chain);
1196c1: c7 05 38 fc 13 00 30 movl $0x13fc30,0x13fc38
1196c8: fc 13 00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
1196cb: c7 05 68 fc 13 00 6c movl $0x13fc6c,0x13fc68
1196d2: fc 13 00
the_chain->permanent_null = NULL;
1196d5: c7 05 6c fc 13 00 00 movl $0x0,0x13fc6c
1196dc: 00 00 00
the_chain->last = _Chain_Head(the_chain);
1196df: c7 05 70 fc 13 00 68 movl $0x13fc68,0x13fc70
1196e6: fc 13 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1196e9: c7 05 10 fc 13 00 00 movl $0x0,0x13fc10
1196f0: 00 00 00
the_watchdog->routine = routine;
1196f3: c7 05 24 fc 13 00 e4 movl $0x11c0e4,0x13fc24
1196fa: c0 11 00
the_watchdog->id = id;
1196fd: a3 28 fc 13 00 mov %eax,0x13fc28
the_watchdog->user_data = user_data;
119702: c7 05 2c fc 13 00 00 movl $0x0,0x13fc2c
119709: 00 00 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
11970c: c7 05 48 fc 13 00 00 movl $0x0,0x13fc48
119713: 00 00 00
the_watchdog->routine = routine;
119716: c7 05 5c fc 13 00 e4 movl $0x11c0e4,0x13fc5c
11971d: c0 11 00
the_watchdog->id = id;
119720: a3 60 fc 13 00 mov %eax,0x13fc60
the_watchdog->user_data = user_data;
119725: c7 05 64 fc 13 00 00 movl $0x0,0x13fc64
11972c: 00 00 00
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
11972f: c7 05 04 fc 13 00 d4 movl $0x1199d4,0x13fc04
119736: 99 11 00
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
119739: 8b 15 c4 44 14 00 mov 0x1444c4,%edx
11973f: 89 15 3c fc 13 00 mov %edx,0x13fc3c
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
119745: 8b 15 ec 43 14 00 mov 0x1443ec,%edx
11974b: 89 15 74 fc 13 00 mov %edx,0x13fc74
ts->insert_chain = NULL;
119751: c7 05 78 fc 13 00 00 movl $0x0,0x13fc78
119758: 00 00 00
ts->active = false;
11975b: c6 05 7c fc 13 00 00 movb $0x0,0x13fc7c
/*
* The default timer server is now available.
*/
_Timer_server = ts;
119762: c7 05 00 4e 14 00 00 movl $0x13fc00,0x144e00
119769: fc 13 00
/*
* Start the timer server
*/
status = rtems_task_start(
11976c: 52 push %edx
11976d: 68 00 fc 13 00 push $0x13fc00
119772: 68 28 98 11 00 push $0x119828
119777: 50 push %eax
119778: e8 23 f6 ff ff call 118da0 <rtems_task_start>
if (status) {
initialized = false;
}
#endif
return status;
11977d: 83 c4 10 add $0x10,%esp
119780: e9 8f fe ff ff jmp 119614 <rtems_timer_initiate_server+0x14>
00119378 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
119378: 55 push %ebp
119379: 89 e5 mov %esp,%ebp
11937b: 56 push %esi
11937c: 53 push %ebx
11937d: 83 ec 24 sub $0x24,%esp
119380: 8d 45 f4 lea -0xc(%ebp),%eax
119383: 50 push %eax
119384: ff 75 08 pushl 0x8(%ebp)
119387: 68 c0 4d 14 00 push $0x144dc0
11938c: e8 07 26 00 00 call 11b998 <_Objects_Get>
119391: 89 c3 mov %eax,%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
119393: 83 c4 10 add $0x10,%esp
119396: 8b 45 f4 mov -0xc(%ebp),%eax
119399: 85 c0 test %eax,%eax
11939b: 74 0f je 1193ac <rtems_timer_reset+0x34>
11939d: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1193a2: 8d 65 f8 lea -0x8(%ebp),%esp
1193a5: 5b pop %ebx
1193a6: 5e pop %esi
1193a7: c9 leave
1193a8: c3 ret
1193a9: 8d 76 00 lea 0x0(%esi),%esi
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
1193ac: 8b 43 38 mov 0x38(%ebx),%eax
1193af: 85 c0 test %eax,%eax
1193b1: 74 1d je 1193d0 <rtems_timer_reset+0x58>
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
1193b3: 48 dec %eax
1193b4: 74 3a je 1193f0 <rtems_timer_reset+0x78>
1193b6: b8 0b 00 00 00 mov $0xb,%eax
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
1193bb: 89 45 e4 mov %eax,-0x1c(%ebp)
1193be: e8 b9 2e 00 00 call 11c27c <_Thread_Enable_dispatch>
1193c3: 8b 45 e4 mov -0x1c(%ebp),%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1193c6: 8d 65 f8 lea -0x8(%ebp),%esp
1193c9: 5b pop %ebx
1193ca: 5e pop %esi
1193cb: c9 leave
1193cc: c3 ret
1193cd: 8d 76 00 lea 0x0(%esi),%esi
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
1193d0: 83 c3 10 add $0x10,%ebx
1193d3: 83 ec 0c sub $0xc,%esp
1193d6: 53 push %ebx
1193d7: e8 fc 42 00 00 call 11d6d8 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
1193dc: 59 pop %ecx
1193dd: 5e pop %esi
1193de: 53 push %ebx
1193df: 68 38 44 14 00 push $0x144438
1193e4: e8 c7 41 00 00 call 11d5b0 <_Watchdog_Insert>
1193e9: 31 c0 xor %eax,%eax
1193eb: 83 c4 10 add $0x10,%esp
1193ee: eb cb jmp 1193bb <rtems_timer_reset+0x43>
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
Timer_server_Control *timer_server = _Timer_server;
1193f0: 8b 35 00 4e 14 00 mov 0x144e00,%esi
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
1193f6: 83 ec 0c sub $0xc,%esp
1193f9: 8d 43 10 lea 0x10(%ebx),%eax
1193fc: 50 push %eax
1193fd: e8 d6 42 00 00 call 11d6d8 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
119402: 58 pop %eax
119403: 5a pop %edx
119404: 53 push %ebx
119405: 56 push %esi
119406: ff 56 04 call *0x4(%esi)
119409: 31 c0 xor %eax,%eax
11940b: 83 c4 10 add $0x10,%esp
11940e: eb ab jmp 1193bb <rtems_timer_reset+0x43>
00119410 <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
119410: 55 push %ebp
119411: 89 e5 mov %esp,%ebp
119413: 57 push %edi
119414: 56 push %esi
119415: 53 push %ebx
119416: 83 ec 2c sub $0x2c,%esp
119419: 8b 7d 0c mov 0xc(%ebp),%edi
11941c: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
11941f: 8b 1d 00 4e 14 00 mov 0x144e00,%ebx
if ( !timer_server )
119425: 85 db test %ebx,%ebx
119427: 0f 84 9f 00 00 00 je 1194cc <rtems_timer_server_fire_after+0xbc>
return RTEMS_INCORRECT_STATE;
if ( !routine )
11942d: 85 f6 test %esi,%esi
11942f: 0f 84 a3 00 00 00 je 1194d8 <rtems_timer_server_fire_after+0xc8>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
119435: 85 ff test %edi,%edi
119437: 75 0f jne 119448 <rtems_timer_server_fire_after+0x38>
119439: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11943e: 8d 65 f4 lea -0xc(%ebp),%esp
119441: 5b pop %ebx
119442: 5e pop %esi
119443: 5f pop %edi
119444: c9 leave
119445: c3 ret
119446: 66 90 xchg %ax,%ax
119448: 52 push %edx
119449: 8d 45 e4 lea -0x1c(%ebp),%eax
11944c: 50 push %eax
11944d: ff 75 08 pushl 0x8(%ebp)
119450: 68 c0 4d 14 00 push $0x144dc0
119455: e8 3e 25 00 00 call 11b998 <_Objects_Get>
11945a: 89 c2 mov %eax,%edx
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
11945c: 83 c4 10 add $0x10,%esp
11945f: 8b 45 e4 mov -0x1c(%ebp),%eax
119462: 85 c0 test %eax,%eax
119464: 75 56 jne 1194bc <rtems_timer_server_fire_after+0xac>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
119466: 83 ec 0c sub $0xc,%esp
119469: 8d 42 10 lea 0x10(%edx),%eax
11946c: 50 push %eax
11946d: 89 55 d4 mov %edx,-0x2c(%ebp)
119470: e8 63 42 00 00 call 11d6d8 <_Watchdog_Remove>
_ISR_Disable( level );
119475: 9c pushf
119476: fa cli
119477: 58 pop %eax
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
119478: 83 c4 10 add $0x10,%esp
11947b: 8b 55 d4 mov -0x2c(%ebp),%edx
11947e: 8b 4a 18 mov 0x18(%edx),%ecx
119481: 85 c9 test %ecx,%ecx
119483: 75 5f jne 1194e4 <rtems_timer_server_fire_after+0xd4>
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
119485: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
11948c: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
119493: 89 72 2c mov %esi,0x2c(%edx)
the_watchdog->id = id;
119496: 8b 4d 08 mov 0x8(%ebp),%ecx
119499: 89 4a 30 mov %ecx,0x30(%edx)
the_watchdog->user_data = user_data;
11949c: 8b 4d 14 mov 0x14(%ebp),%ecx
11949f: 89 4a 34 mov %ecx,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
1194a2: 89 7a 1c mov %edi,0x1c(%edx)
_ISR_Enable( level );
1194a5: 50 push %eax
1194a6: 9d popf
(*timer_server->schedule_operation)( timer_server, the_timer );
1194a7: 83 ec 08 sub $0x8,%esp
1194aa: 52 push %edx
1194ab: 53 push %ebx
1194ac: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
1194af: e8 c8 2d 00 00 call 11c27c <_Thread_Enable_dispatch>
1194b4: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1194b6: 83 c4 10 add $0x10,%esp
1194b9: eb 83 jmp 11943e <rtems_timer_server_fire_after+0x2e>
1194bb: 90 nop
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1194bc: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1194c1: 8d 65 f4 lea -0xc(%ebp),%esp
1194c4: 5b pop %ebx
1194c5: 5e pop %esi
1194c6: 5f pop %edi
1194c7: c9 leave
1194c8: c3 ret
1194c9: 8d 76 00 lea 0x0(%esi),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
1194cc: b8 0e 00 00 00 mov $0xe,%eax
1194d1: e9 68 ff ff ff jmp 11943e <rtems_timer_server_fire_after+0x2e>
1194d6: 66 90 xchg %ax,%ax
return RTEMS_INCORRECT_STATE;
if ( !routine )
1194d8: b8 09 00 00 00 mov $0x9,%eax
1194dd: e9 5c ff ff ff jmp 11943e <rtems_timer_server_fire_after+0x2e>
1194e2: 66 90 xchg %ax,%ax
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
1194e4: 50 push %eax
1194e5: 9d popf
_Thread_Enable_dispatch();
1194e6: e8 91 2d 00 00 call 11c27c <_Thread_Enable_dispatch>
1194eb: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1194ed: e9 4c ff ff ff jmp 11943e <rtems_timer_server_fire_after+0x2e>
001194f4 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
1194f4: 55 push %ebp
1194f5: 89 e5 mov %esp,%ebp
1194f7: 57 push %edi
1194f8: 56 push %esi
1194f9: 53 push %ebx
1194fa: 83 ec 2c sub $0x2c,%esp
1194fd: 8b 7d 0c mov 0xc(%ebp),%edi
119500: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
119503: 8b 1d 00 4e 14 00 mov 0x144e00,%ebx
if ( !timer_server )
119509: 85 db test %ebx,%ebx
11950b: 0f 84 d7 00 00 00 je 1195e8 <rtems_timer_server_fire_when+0xf4>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
119511: 80 3d 6c 43 14 00 00 cmpb $0x0,0x14436c
119518: 0f 84 aa 00 00 00 je 1195c8 <rtems_timer_server_fire_when+0xd4><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
11951e: 85 f6 test %esi,%esi
119520: 0f 84 b2 00 00 00 je 1195d8 <rtems_timer_server_fire_when+0xe4>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
119526: 83 ec 0c sub $0xc,%esp
119529: 57 push %edi
11952a: e8 7d d1 ff ff call 1166ac <_TOD_Validate>
11952f: 83 c4 10 add $0x10,%esp
119532: 84 c0 test %al,%al
119534: 75 0e jne 119544 <rtems_timer_server_fire_when+0x50>
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
119536: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11953b: 8d 65 f4 lea -0xc(%ebp),%esp
11953e: 5b pop %ebx
11953f: 5e pop %esi
119540: 5f pop %edi
119541: c9 leave
119542: c3 ret
119543: 90 nop
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
119544: 83 ec 0c sub $0xc,%esp
119547: 57 push %edi
119548: e8 d3 d0 ff ff call 116620 <_TOD_To_seconds>
11954d: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
11954f: 83 c4 10 add $0x10,%esp
119552: 3b 05 ec 43 14 00 cmp 0x1443ec,%eax
119558: 76 dc jbe 119536 <rtems_timer_server_fire_when+0x42>
11955a: 52 push %edx
11955b: 8d 45 e4 lea -0x1c(%ebp),%eax
11955e: 50 push %eax
11955f: ff 75 08 pushl 0x8(%ebp)
119562: 68 c0 4d 14 00 push $0x144dc0
119567: e8 2c 24 00 00 call 11b998 <_Objects_Get>
11956c: 89 c2 mov %eax,%edx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
11956e: 83 c4 10 add $0x10,%esp
119571: 8b 45 e4 mov -0x1c(%ebp),%eax
119574: 85 c0 test %eax,%eax
119576: 75 7c jne 1195f4 <rtems_timer_server_fire_when+0x100>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
119578: 83 ec 0c sub $0xc,%esp
11957b: 8d 42 10 lea 0x10(%edx),%eax
11957e: 50 push %eax
11957f: 89 55 d4 mov %edx,-0x2c(%ebp)
119582: e8 51 41 00 00 call 11d6d8 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
119587: 8b 55 d4 mov -0x2c(%ebp),%edx
11958a: c7 42 38 03 00 00 00 movl $0x3,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
119591: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
119598: 89 72 2c mov %esi,0x2c(%edx)
the_watchdog->id = id;
11959b: 8b 45 08 mov 0x8(%ebp),%eax
11959e: 89 42 30 mov %eax,0x30(%edx)
the_watchdog->user_data = user_data;
1195a1: 8b 45 14 mov 0x14(%ebp),%eax
1195a4: 89 42 34 mov %eax,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
1195a7: 2b 3d ec 43 14 00 sub 0x1443ec,%edi
1195ad: 89 7a 1c mov %edi,0x1c(%edx)
(*timer_server->schedule_operation)( timer_server, the_timer );
1195b0: 58 pop %eax
1195b1: 59 pop %ecx
1195b2: 52 push %edx
1195b3: 53 push %ebx
1195b4: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
1195b7: e8 c0 2c 00 00 call 11c27c <_Thread_Enable_dispatch>
1195bc: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1195be: 83 c4 10 add $0x10,%esp
1195c1: e9 75 ff ff ff jmp 11953b <rtems_timer_server_fire_when+0x47>
1195c6: 66 90 xchg %ax,%ax
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
1195c8: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1195cd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1195d0: 5b pop %ebx <== NOT EXECUTED
1195d1: 5e pop %esi <== NOT EXECUTED
1195d2: 5f pop %edi <== NOT EXECUTED
1195d3: c9 leave <== NOT EXECUTED
1195d4: c3 ret <== NOT EXECUTED
1195d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
1195d8: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1195dd: 8d 65 f4 lea -0xc(%ebp),%esp
1195e0: 5b pop %ebx
1195e1: 5e pop %esi
1195e2: 5f pop %edi
1195e3: c9 leave
1195e4: c3 ret
1195e5: 8d 76 00 lea 0x0(%esi),%esi
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
1195e8: b8 0e 00 00 00 mov $0xe,%eax
1195ed: e9 49 ff ff ff jmp 11953b <rtems_timer_server_fire_when+0x47>
1195f2: 66 90 xchg %ax,%ax
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1195f4: b8 04 00 00 00 mov $0x4,%eax
1195f9: e9 3d ff ff ff jmp 11953b <rtems_timer_server_fire_when+0x47>
0010cc7c <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
10cc7c: 55 push %ebp <== NOT EXECUTED
10cc7d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10cc7f: 57 push %edi <== NOT EXECUTED
10cc80: 56 push %esi <== NOT EXECUTED
10cc81: 53 push %ebx <== NOT EXECUTED
10cc82: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
10cc85: 89 c3 mov %eax,%ebx <== NOT EXECUTED
10cc87: 89 d6 mov %edx,%esi <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
10cc89: 25 00 00 00 20 and $0x20000000,%eax <== NOT EXECUTED
10cc8e: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
10cc91: 74 2b je 10ccbe <rtems_verror+0x42> <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
10cc93: 8b 15 a0 fc 12 00 mov 0x12fca0,%edx <== NOT EXECUTED
10cc99: 8d 42 01 lea 0x1(%edx),%eax <== NOT EXECUTED
10cc9c: a3 a0 fc 12 00 mov %eax,0x12fca0 <== NOT EXECUTED
10cca1: 85 d2 test %edx,%edx <== NOT EXECUTED
10cca3: 74 10 je 10ccb5 <rtems_verror+0x39> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10cca5: a1 18 fe 12 00 mov 0x12fe18,%eax <== NOT EXECUTED
10ccaa: 40 inc %eax <== NOT EXECUTED
10ccab: a3 18 fe 12 00 mov %eax,0x12fe18 <== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
10ccb0: a1 a0 fc 12 00 mov 0x12fca0,%eax <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
10ccb5: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
10ccb8: 0f 8f e6 00 00 00 jg 10cda4 <rtems_verror+0x128> <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
10ccbe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ccc1: a1 40 da 12 00 mov 0x12da40,%eax <== NOT EXECUTED
10ccc6: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
10ccc9: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED
10cccc: e8 73 d8 00 00 call 11a544 <fflush> <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
10ccd1: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10ccd3: 25 ff ff ff 8f and $0x8fffffff,%eax <== NOT EXECUTED
10ccd8: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
10ccdb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ccde: f7 c3 00 00 00 40 test $0x40000000,%ebx <== NOT EXECUTED
10cce4: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED
10cce7: 0f 85 d7 00 00 00 jne 10cdc4 <rtems_verror+0x148> <== NOT EXECUTED
10cced: 31 ff xor %edi,%edi <== 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);
10ccef: 52 push %edx <== NOT EXECUTED
10ccf0: 51 push %ecx <== NOT EXECUTED
10ccf1: 56 push %esi <== NOT EXECUTED
10ccf2: a1 40 da 12 00 mov 0x12da40,%eax <== NOT EXECUTED
10ccf7: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10ccfa: e8 25 33 01 00 call 120024 <vfprintf> <== NOT EXECUTED
10ccff: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (status)
10cd01: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10cd04: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
10cd07: 85 c0 test %eax,%eax <== NOT EXECUTED
10cd09: 0f 85 c9 00 00 00 jne 10cdd8 <rtems_verror+0x15c> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
10cd0f: 83 ff 00 cmp $0x0,%edi <== NOT EXECUTED
10cd12: 74 30 je 10cd44 <rtems_verror+0xc8> <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
10cd14: 7e 15 jle 10cd2b <rtems_verror+0xaf> <== NOT EXECUTED
10cd16: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10cd19: 57 push %edi <== NOT EXECUTED
10cd1a: e8 e9 e2 00 00 call 11b008 <strerror> <== NOT EXECUTED
10cd1f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10cd22: 80 38 00 cmpb $0x0,(%eax) <== NOT EXECUTED
10cd25: 0f 85 d9 00 00 00 jne 10ce04 <rtems_verror+0x188> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
10cd2b: 51 push %ecx <== NOT EXECUTED
10cd2c: 57 push %edi <== NOT EXECUTED
10cd2d: 68 29 84 12 00 push $0x128429 <== NOT EXECUTED
10cd32: a1 40 da 12 00 mov 0x12da40,%eax <== NOT EXECUTED
10cd37: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10cd3a: e8 4d db 00 00 call 11a88c <fprintf> <== NOT EXECUTED
10cd3f: 01 c6 add %eax,%esi <== NOT EXECUTED
10cd41: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
10cd44: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10cd47: 68 ab 76 12 00 push $0x1276ab <== NOT EXECUTED
10cd4c: a1 40 da 12 00 mov 0x12da40,%eax <== NOT EXECUTED
10cd51: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10cd54: e8 33 db 00 00 call 11a88c <fprintf> <== NOT EXECUTED
10cd59: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
(void) fflush(stderr);
10cd5c: 5a pop %edx <== NOT EXECUTED
10cd5d: a1 40 da 12 00 mov 0x12da40,%eax <== NOT EXECUTED
10cd62: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10cd65: e8 da d7 00 00 call 11a544 <fflush> <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
10cd6a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10cd6d: 81 e3 00 00 00 30 and $0x30000000,%ebx <== NOT EXECUTED
10cd73: 74 1f je 10cd94 <rtems_verror+0x118> <== NOT EXECUTED
{
if (error_flag & RTEMS_ERROR_PANIC)
10cd75: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10cd78: 85 c0 test %eax,%eax <== NOT EXECUTED
10cd7a: 74 34 je 10cdb0 <rtems_verror+0x134> <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
10cd7c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10cd7f: 68 3d 84 12 00 push $0x12843d <== NOT EXECUTED
10cd84: 6a 00 push $0x0 <== NOT EXECUTED
10cd86: e8 a9 00 00 00 call 10ce34 <rtems_error> <== NOT EXECUTED
_exit(local_errno);
10cd8b: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
10cd8e: e8 35 0b 00 00 call 10d8c8 <_exit> <== NOT EXECUTED
10cd93: 90 nop <== 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");
10cd94: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
10cd97: 01 f0 add %esi,%eax <== NOT EXECUTED
rtems_error(0, "fatal error, aborting");
abort();
}
}
return chars_written;
}
10cd99: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10cd9c: 5b pop %ebx <== NOT EXECUTED
10cd9d: 5e pop %esi <== NOT EXECUTED
10cd9e: 5f pop %edi <== NOT EXECUTED
10cd9f: c9 leave <== NOT EXECUTED
10cda0: c3 ret <== NOT EXECUTED
10cda1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_exit(local_errno);
}
else
{
rtems_error(0, "fatal error, aborting");
abort();
10cda4: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
}
return chars_written;
}
10cda6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10cda9: 5b pop %ebx <== NOT EXECUTED
10cdaa: 5e pop %esi <== NOT EXECUTED
10cdab: 5f pop %edi <== NOT EXECUTED
10cdac: c9 leave <== NOT EXECUTED
10cdad: c3 ret <== NOT EXECUTED
10cdae: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_error(0, "fatal error, exiting");
_exit(local_errno);
}
else
{
rtems_error(0, "fatal error, aborting");
10cdb0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10cdb3: 68 52 84 12 00 push $0x128452 <== NOT EXECUTED
10cdb8: 6a 00 push $0x0 <== NOT EXECUTED
10cdba: e8 75 00 00 00 call 10ce34 <rtems_error> <== NOT EXECUTED
abort();
10cdbf: e8 d0 d3 00 00 call 11a194 <abort> <== NOT EXECUTED
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
10cdc4: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED
10cdc7: e8 fc d3 00 00 call 11a1c8 <__errno> <== NOT EXECUTED
10cdcc: 8b 38 mov (%eax),%edi <== NOT EXECUTED
10cdce: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED
10cdd1: e9 19 ff ff ff jmp 10ccef <rtems_verror+0x73> <== NOT EXECUTED
10cdd6: 66 90 xchg %ax,%ax <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
10cdd8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10cddb: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
10cdde: e8 81 fe ff ff call 10cc64 <rtems_status_text> <== NOT EXECUTED
10cde3: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10cde6: 50 push %eax <== NOT EXECUTED
10cde7: 68 0e 84 12 00 push $0x12840e <== NOT EXECUTED
10cdec: a1 40 da 12 00 mov 0x12da40,%eax <== NOT EXECUTED
10cdf1: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10cdf4: e8 93 da 00 00 call 11a88c <fprintf> <== NOT EXECUTED
10cdf9: 01 c6 add %eax,%esi <== NOT EXECUTED
10cdfb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10cdfe: e9 0c ff ff ff jmp 10cd0f <rtems_verror+0x93> <== NOT EXECUTED
10ce03: 90 nop <== NOT EXECUTED
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
10ce04: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ce07: 57 push %edi <== NOT EXECUTED
10ce08: e8 fb e1 00 00 call 11b008 <strerror> <== NOT EXECUTED
10ce0d: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10ce10: 50 push %eax <== NOT EXECUTED
10ce11: 68 1c 84 12 00 push $0x12841c <== NOT EXECUTED
10ce16: e9 17 ff ff ff jmp 10cd32 <rtems_verror+0xb6> <== NOT EXECUTED
0012e8c0 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
12e8c0: 55 push %ebp
12e8c1: 89 e5 mov %esp,%ebp
12e8c3: 57 push %edi
12e8c4: 56 push %esi
12e8c5: 53 push %ebx
12e8c6: 83 ec 1c sub $0x1c,%esp
12e8c9: 89 c6 mov %eax,%esi
12e8cb: 89 55 e0 mov %edx,-0x20(%ebp)
12e8ce: 31 ff xor %edi,%edi
12e8d0: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp)
12e8d7: 31 db xor %ebx,%ebx
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
12e8d9: 8b 46 04 mov 0x4(%esi),%eax
12e8dc: 48 dec %eax
12e8dd: 89 46 04 mov %eax,0x4(%esi)
12e8e0: 85 c0 test %eax,%eax
12e8e2: 78 52 js 12e936 <scanInt+0x76> <== NEVER TAKEN
12e8e4: 8b 06 mov (%esi),%eax
12e8e6: 0f b6 08 movzbl (%eax),%ecx
12e8e9: 40 inc %eax
12e8ea: 89 06 mov %eax,(%esi)
if (c == ':')
12e8ec: 83 f9 3a cmp $0x3a,%ecx
12e8ef: 74 5f je 12e950 <scanInt+0x90>
break;
if (sign == 0) {
12e8f1: 85 ff test %edi,%edi
12e8f3: 75 0e jne 12e903 <scanInt+0x43> <== NEVER TAKEN
if (c == '-') {
12e8f5: 83 f9 2d cmp $0x2d,%ecx
12e8f8: 0f 84 8a 00 00 00 je 12e988 <scanInt+0xc8> <== NEVER TAKEN
sign = -1;
limit++;
continue;
12e8fe: bf 01 00 00 00 mov $0x1,%edi
}
sign = 1;
}
if (!isdigit(c))
12e903: a1 48 fb 16 00 mov 0x16fb48,%eax
12e908: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1)
12e90d: 74 6d je 12e97c <scanInt+0xbc> <== NEVER TAKEN
return 0;
d = c - '0';
if ((i > (limit / 10))
12e90f: b8 cd cc cc cc mov $0xcccccccd,%eax
12e914: f7 65 e4 mull -0x1c(%ebp)
12e917: c1 ea 03 shr $0x3,%edx
12e91a: 39 d3 cmp %edx,%ebx
12e91c: 77 5e ja 12e97c <scanInt+0xbc> <== NEVER TAKEN
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
12e91e: 83 e9 30 sub $0x30,%ecx
if ((i > (limit / 10))
12e921: 39 d3 cmp %edx,%ebx
12e923: 74 47 je 12e96c <scanInt+0xac> <== NEVER TAKEN
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
12e925: 8d 04 9b lea (%ebx,%ebx,4),%eax
12e928: 8d 1c 41 lea (%ecx,%eax,2),%ebx
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
12e92b: 8b 46 04 mov 0x4(%esi),%eax
12e92e: 48 dec %eax
12e92f: 89 46 04 mov %eax,0x4(%esi)
12e932: 85 c0 test %eax,%eax
12e934: 79 ae jns 12e8e4 <scanInt+0x24> <== ALWAYS TAKEN
12e936: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12e939: 56 push %esi <== NOT EXECUTED
12e93a: ff 35 60 fb 16 00 pushl 0x16fb60 <== NOT EXECUTED
12e940: e8 3b e0 01 00 call 14c980 <__srget_r> <== NOT EXECUTED
12e945: 89 c1 mov %eax,%ecx <== NOT EXECUTED
12e947: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (c == ':')
12e94a: 83 f9 3a cmp $0x3a,%ecx <== NOT EXECUTED
12e94d: 75 a2 jne 12e8f1 <scanInt+0x31> <== NOT EXECUTED
12e94f: 90 nop <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
12e950: 85 ff test %edi,%edi
12e952: 74 28 je 12e97c <scanInt+0xbc> <== NEVER TAKEN
return 0;
*val = i * sign;
12e954: 0f af df imul %edi,%ebx
12e957: 8b 45 e0 mov -0x20(%ebp),%eax
12e95a: 89 18 mov %ebx,(%eax)
12e95c: b8 01 00 00 00 mov $0x1,%eax
return 1;
}
12e961: 8d 65 f4 lea -0xc(%ebp),%esp
12e964: 5b pop %ebx
12e965: 5e pop %esi
12e966: 5f pop %edi
12e967: c9 leave
12e968: c3 ret
12e969: 8d 76 00 lea 0x0(%esi),%esi
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
12e96c: 8d 04 9b lea (%ebx,%ebx,4),%eax <== NOT EXECUTED
12e96f: d1 e0 shl %eax <== NOT EXECUTED
12e971: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
12e974: 29 c2 sub %eax,%edx <== NOT EXECUTED
12e976: 39 d1 cmp %edx,%ecx <== NOT EXECUTED
12e978: 76 ab jbe 12e925 <scanInt+0x65> <== NOT EXECUTED
12e97a: 66 90 xchg %ax,%ax <== NOT EXECUTED
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
12e97c: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
12e97e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12e981: 5b pop %ebx <== NOT EXECUTED
12e982: 5e pop %esi <== NOT EXECUTED
12e983: 5f pop %edi <== NOT EXECUTED
12e984: c9 leave <== NOT EXECUTED
12e985: c3 ret <== NOT EXECUTED
12e986: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
12e988: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED
12e98b: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
continue;
12e990: e9 44 ff ff ff jmp 12e8d9 <scanInt+0x19> <== NOT EXECUTED
0012e998 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
12e998: 55 push %ebp
12e999: 89 e5 mov %esp,%ebp
12e99b: 57 push %edi
12e99c: 56 push %esi
12e99d: 53 push %ebx
12e99e: 83 ec 0c sub $0xc,%esp
12e9a1: 89 c3 mov %eax,%ebx
12e9a3: 89 ce mov %ecx,%esi
12e9a5: 8b 7d 08 mov 0x8(%ebp),%edi
int c;
*name = *bufp;
12e9a8: 8b 01 mov (%ecx),%eax
12e9aa: 89 02 mov %eax,(%edx)
12e9ac: eb 26 jmp 12e9d4 <scanString+0x3c>
12e9ae: 66 90 xchg %ax,%ax
for (;;) {
c = getc(fp);
12e9b0: 8b 13 mov (%ebx),%edx
12e9b2: 0f b6 02 movzbl (%edx),%eax
12e9b5: 42 inc %edx
12e9b6: 89 13 mov %edx,(%ebx)
if (c == ':') {
12e9b8: 83 f8 3a cmp $0x3a,%eax
12e9bb: 74 3b je 12e9f8 <scanString+0x60>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
12e9bd: 83 f8 0a cmp $0xa,%eax
12e9c0: 74 56 je 12ea18 <scanString+0x80>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
12e9c2: 83 f8 ff cmp $0xffffffff,%eax
12e9c5: 74 59 je 12ea20 <scanString+0x88> <== NEVER TAKEN
return 0;
if (*nleft < 2)
12e9c7: 83 3f 01 cmpl $0x1,(%edi)
12e9ca: 76 54 jbe 12ea20 <scanString+0x88> <== NEVER TAKEN
return 0;
**bufp = c;
12e9cc: 8b 16 mov (%esi),%edx
12e9ce: 88 02 mov %al,(%edx)
++(*bufp);
12e9d0: ff 06 incl (%esi)
--(*nleft);
12e9d2: ff 0f decl (%edi)
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
12e9d4: 8b 43 04 mov 0x4(%ebx),%eax
12e9d7: 48 dec %eax
12e9d8: 89 43 04 mov %eax,0x4(%ebx)
12e9db: 85 c0 test %eax,%eax
12e9dd: 79 d1 jns 12e9b0 <scanString+0x18>
12e9df: 83 ec 08 sub $0x8,%esp
12e9e2: 53 push %ebx
12e9e3: ff 35 60 fb 16 00 pushl 0x16fb60
12e9e9: e8 92 df 01 00 call 14c980 <__srget_r>
12e9ee: 83 c4 10 add $0x10,%esp
if (c == ':') {
12e9f1: 83 f8 3a cmp $0x3a,%eax
12e9f4: 75 c7 jne 12e9bd <scanString+0x25> <== ALWAYS TAKEN
12e9f6: 66 90 xchg %ax,%ax
if (nlFlag)
12e9f8: 8b 55 0c mov 0xc(%ebp),%edx
12e9fb: 85 d2 test %edx,%edx
12e9fd: 75 21 jne 12ea20 <scanString+0x88> <== NEVER TAKEN
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
12e9ff: 8b 06 mov (%esi),%eax
12ea01: c6 00 00 movb $0x0,(%eax)
++(*bufp);
12ea04: ff 06 incl (%esi)
--(*nleft);
12ea06: ff 0f decl (%edi)
12ea08: b8 01 00 00 00 mov $0x1,%eax
return 1;
}
12ea0d: 8d 65 f4 lea -0xc(%ebp),%esp
12ea10: 5b pop %ebx
12ea11: 5e pop %esi
12ea12: 5f pop %edi
12ea13: c9 leave
12ea14: c3 ret
12ea15: 8d 76 00 lea 0x0(%esi),%esi
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
12ea18: 8b 45 0c mov 0xc(%ebp),%eax
12ea1b: 85 c0 test %eax,%eax
12ea1d: 75 e0 jne 12e9ff <scanString+0x67> <== ALWAYS TAKEN
12ea1f: 90 nop
--(*nleft);
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
12ea20: 31 c0 xor %eax,%eax
}
12ea22: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12ea25: 5b pop %ebx <== NOT EXECUTED
12ea26: 5e pop %esi <== NOT EXECUTED
12ea27: 5f pop %edi <== NOT EXECUTED
12ea28: c9 leave <== NOT EXECUTED
12ea29: c3 ret <== NOT EXECUTED
0012ea2c <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
12ea2c: 55 push %ebp
12ea2d: 89 e5 mov %esp,%ebp
12ea2f: 57 push %edi
12ea30: 56 push %esi
12ea31: 53 push %ebx
12ea32: 83 ec 34 sub $0x34,%esp
12ea35: 89 c6 mov %eax,%esi
12ea37: 89 d3 mov %edx,%ebx
12ea39: 89 4d d4 mov %ecx,-0x2c(%ebp)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
12ea3c: 8d 7d d4 lea -0x2c(%ebp),%edi
12ea3f: 6a 00 push $0x0
12ea41: 8d 45 08 lea 0x8(%ebp),%eax
12ea44: 50 push %eax
12ea45: 89 f9 mov %edi,%ecx
12ea47: 89 f0 mov %esi,%eax
12ea49: e8 4a ff ff ff call 12e998 <scanString>
12ea4e: 83 c4 10 add $0x10,%esp
12ea51: 85 c0 test %eax,%eax
12ea53: 75 0b jne 12ea60 <scangr+0x34> <== ALWAYS TAKEN
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
12ea55: 31 c0 xor %eax,%eax
}
12ea57: 8d 65 f4 lea -0xc(%ebp),%esp
12ea5a: 5b pop %ebx
12ea5b: 5e pop %esi
12ea5c: 5f pop %edi
12ea5d: c9 leave
12ea5e: c3 ret
12ea5f: 90 nop
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
12ea60: 83 ec 08 sub $0x8,%esp
12ea63: 8d 53 04 lea 0x4(%ebx),%edx
12ea66: 6a 00 push $0x0
12ea68: 8d 45 08 lea 0x8(%ebp),%eax
12ea6b: 50 push %eax
12ea6c: 89 f9 mov %edi,%ecx
12ea6e: 89 f0 mov %esi,%eax
12ea70: e8 23 ff ff ff call 12e998 <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
12ea75: 83 c4 10 add $0x10,%esp
12ea78: 85 c0 test %eax,%eax
12ea7a: 74 d9 je 12ea55 <scangr+0x29> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
12ea7c: 8d 55 e4 lea -0x1c(%ebp),%edx
12ea7f: 89 f0 mov %esi,%eax
12ea81: e8 3a fe ff ff call 12e8c0 <scanInt>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
12ea86: 85 c0 test %eax,%eax
12ea88: 74 cb je 12ea55 <scangr+0x29> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
12ea8a: 83 ec 08 sub $0x8,%esp
12ea8d: 8d 55 e0 lea -0x20(%ebp),%edx
12ea90: 6a 01 push $0x1
12ea92: 8d 45 08 lea 0x8(%ebp),%eax
12ea95: 50 push %eax
12ea96: 89 f9 mov %edi,%ecx
12ea98: 89 f0 mov %esi,%eax
12ea9a: e8 f9 fe ff ff call 12e998 <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
12ea9f: 83 c4 10 add $0x10,%esp
12eaa2: 85 c0 test %eax,%eax
12eaa4: 74 af je 12ea55 <scangr+0x29> <== 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;
12eaa6: 8b 45 e4 mov -0x1c(%ebp),%eax
12eaa9: 66 89 43 08 mov %ax,0x8(%ebx)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
12eaad: 8b 75 e0 mov -0x20(%ebp),%esi
12eab0: 8a 06 mov (%esi),%al
12eab2: 84 c0 test %al,%al
12eab4: 74 7d je 12eb33 <scangr+0x107> <== NEVER TAKEN
12eab6: 89 f2 mov %esi,%edx
12eab8: b9 01 00 00 00 mov $0x1,%ecx
12eabd: eb 08 jmp 12eac7 <scangr+0x9b>
12eabf: 90 nop
12eac0: 42 inc %edx
12eac1: 8a 02 mov (%edx),%al
12eac3: 84 c0 test %al,%al
12eac5: 74 09 je 12ead0 <scangr+0xa4>
if(*cp == ',')
12eac7: 3c 2c cmp $0x2c,%al
12eac9: 75 f5 jne 12eac0 <scangr+0x94> <== ALWAYS TAKEN
memcount++;
12eacb: 41 inc %ecx <== NOT EXECUTED
12eacc: eb f2 jmp 12eac0 <scangr+0x94> <== NOT EXECUTED
12eace: 66 90 xchg %ax,%ax <== NOT EXECUTED
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
12ead0: 8d 04 8d 13 00 00 00 lea 0x13(,%ecx,4),%eax
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
12ead7: 39 45 08 cmp %eax,0x8(%ebp)
12eada: 0f 82 75 ff ff ff jb 12ea55 <scangr+0x29> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
12eae0: 8b 45 d4 mov -0x2c(%ebp),%eax
12eae3: 83 c0 0f add $0xf,%eax
12eae6: 83 e0 f0 and $0xfffffff0,%eax
12eae9: 89 43 0c mov %eax,0xc(%ebx)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
12eaec: 89 30 mov %esi,(%eax)
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
12eaee: 8b 45 e0 mov -0x20(%ebp),%eax
12eaf1: 8a 10 mov (%eax),%dl
12eaf3: 84 d2 test %dl,%dl
12eaf5: 74 43 je 12eb3a <scangr+0x10e> <== NEVER TAKEN
12eaf7: 40 inc %eax
12eaf8: b9 01 00 00 00 mov $0x1,%ecx
12eafd: eb 08 jmp 12eb07 <scangr+0xdb>
12eaff: 90 nop
12eb00: 8a 10 mov (%eax),%dl
12eb02: 40 inc %eax
12eb03: 84 d2 test %dl,%dl
12eb05: 74 15 je 12eb1c <scangr+0xf0>
if(*cp == ',') {
12eb07: 80 fa 2c cmp $0x2c,%dl
12eb0a: 75 f4 jne 12eb00 <scangr+0xd4> <== ALWAYS TAKEN
*cp = '\0';
12eb0c: c6 40 ff 00 movb $0x0,-0x1(%eax) <== NOT EXECUTED
grp->gr_mem[memcount++] = cp + 1;
12eb10: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
12eb13: 89 04 8a mov %eax,(%edx,%ecx,4) <== NOT EXECUTED
12eb16: 41 inc %ecx <== NOT EXECUTED
12eb17: eb e7 jmp 12eb00 <scangr+0xd4> <== NOT EXECUTED
12eb19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
12eb1c: c1 e1 02 shl $0x2,%ecx
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
12eb1f: 8b 43 0c mov 0xc(%ebx),%eax
12eb22: c7 04 08 00 00 00 00 movl $0x0,(%eax,%ecx,1)
12eb29: b8 01 00 00 00 mov $0x1,%eax
return 1;
12eb2e: e9 24 ff ff ff jmp 12ea57 <scangr+0x2b>
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
12eb33: b8 17 00 00 00 mov $0x17,%eax <== NOT EXECUTED
12eb38: eb 9d jmp 12ead7 <scangr+0xab> <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
12eb3a: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED
12eb3f: eb de jmp 12eb1f <scangr+0xf3> <== NOT EXECUTED
0012eb80 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
12eb80: 55 push %ebp
12eb81: 89 e5 mov %esp,%ebp
12eb83: 57 push %edi
12eb84: 56 push %esi
12eb85: 53 push %ebx
12eb86: 83 ec 34 sub $0x34,%esp
12eb89: 89 c6 mov %eax,%esi
12eb8b: 89 d3 mov %edx,%ebx
12eb8d: 89 4d d4 mov %ecx,-0x2c(%ebp)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
12eb90: 8d 7d d4 lea -0x2c(%ebp),%edi
12eb93: 6a 00 push $0x0
12eb95: 8d 45 08 lea 0x8(%ebp),%eax
12eb98: 50 push %eax
12eb99: 89 f9 mov %edi,%ecx
12eb9b: 89 f0 mov %esi,%eax
12eb9d: e8 f6 fd ff ff call 12e998 <scanString>
12eba2: 83 c4 10 add $0x10,%esp
12eba5: 85 c0 test %eax,%eax
12eba7: 75 0b jne 12ebb4 <scanpw+0x34> <== ALWAYS TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
12eba9: 31 c0 xor %eax,%eax
}
12ebab: 8d 65 f4 lea -0xc(%ebp),%esp
12ebae: 5b pop %ebx
12ebaf: 5e pop %esi
12ebb0: 5f pop %edi
12ebb1: c9 leave
12ebb2: c3 ret
12ebb3: 90 nop
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
12ebb4: 83 ec 08 sub $0x8,%esp
12ebb7: 8d 53 04 lea 0x4(%ebx),%edx
12ebba: 6a 00 push $0x0
12ebbc: 8d 45 08 lea 0x8(%ebp),%eax
12ebbf: 50 push %eax
12ebc0: 89 f9 mov %edi,%ecx
12ebc2: 89 f0 mov %esi,%eax
12ebc4: e8 cf fd ff ff call 12e998 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
12ebc9: 83 c4 10 add $0x10,%esp
12ebcc: 85 c0 test %eax,%eax
12ebce: 74 d9 je 12eba9 <scanpw+0x29> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
12ebd0: 8d 55 e4 lea -0x1c(%ebp),%edx
12ebd3: 89 f0 mov %esi,%eax
12ebd5: e8 e6 fc ff ff call 12e8c0 <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
12ebda: 85 c0 test %eax,%eax
12ebdc: 74 cb je 12eba9 <scanpw+0x29> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
12ebde: 8d 55 e0 lea -0x20(%ebp),%edx
12ebe1: 89 f0 mov %esi,%eax
12ebe3: e8 d8 fc ff ff call 12e8c0 <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
12ebe8: 85 c0 test %eax,%eax
12ebea: 74 bd je 12eba9 <scanpw+0x29> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
12ebec: 83 ec 08 sub $0x8,%esp
12ebef: 8d 53 0c lea 0xc(%ebx),%edx
12ebf2: 6a 00 push $0x0
12ebf4: 8d 45 08 lea 0x8(%ebp),%eax
12ebf7: 50 push %eax
12ebf8: 89 f9 mov %edi,%ecx
12ebfa: 89 f0 mov %esi,%eax
12ebfc: e8 97 fd ff ff call 12e998 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
12ec01: 83 c4 10 add $0x10,%esp
12ec04: 85 c0 test %eax,%eax
12ec06: 74 a1 je 12eba9 <scanpw+0x29> <== 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)
12ec08: 83 ec 08 sub $0x8,%esp
12ec0b: 8d 53 10 lea 0x10(%ebx),%edx
12ec0e: 6a 00 push $0x0
12ec10: 8d 45 08 lea 0x8(%ebp),%eax
12ec13: 50 push %eax
12ec14: 89 f9 mov %edi,%ecx
12ec16: 89 f0 mov %esi,%eax
12ec18: e8 7b fd ff ff call 12e998 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
12ec1d: 83 c4 10 add $0x10,%esp
12ec20: 85 c0 test %eax,%eax
12ec22: 74 85 je 12eba9 <scanpw+0x29> <== 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)
12ec24: 83 ec 08 sub $0x8,%esp
12ec27: 8d 53 14 lea 0x14(%ebx),%edx
12ec2a: 6a 00 push $0x0
12ec2c: 8d 45 08 lea 0x8(%ebp),%eax
12ec2f: 50 push %eax
12ec30: 89 f9 mov %edi,%ecx
12ec32: 89 f0 mov %esi,%eax
12ec34: e8 5f fd ff ff call 12e998 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
12ec39: 83 c4 10 add $0x10,%esp
12ec3c: 85 c0 test %eax,%eax
12ec3e: 0f 84 65 ff ff ff je 12eba9 <scanpw+0x29> <== 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))
12ec44: 83 ec 08 sub $0x8,%esp
12ec47: 8d 53 18 lea 0x18(%ebx),%edx
12ec4a: 6a 01 push $0x1
12ec4c: 8d 45 08 lea 0x8(%ebp),%eax
12ec4f: 50 push %eax
12ec50: 89 f9 mov %edi,%ecx
12ec52: 89 f0 mov %esi,%eax
12ec54: e8 3f fd ff ff call 12e998 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
12ec59: 83 c4 10 add $0x10,%esp
12ec5c: 85 c0 test %eax,%eax
12ec5e: 0f 84 45 ff ff ff je 12eba9 <scanpw+0x29> <== 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;
12ec64: 8b 45 e4 mov -0x1c(%ebp),%eax
12ec67: 66 89 43 08 mov %ax,0x8(%ebx)
pwd->pw_gid = pwgid;
12ec6b: 8b 45 e0 mov -0x20(%ebp),%eax
12ec6e: 66 89 43 0a mov %ax,0xa(%ebx)
12ec72: b8 01 00 00 00 mov $0x1,%eax
return 1;
12ec77: e9 2f ff ff ff jmp 12ebab <scanpw+0x2b>
0010c4ac <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
10c4ac: 55 push %ebp
10c4ad: 89 e5 mov %esp,%ebp
10c4af: 83 ec 08 sub $0x8,%esp
10c4b2: 8b 45 08 mov 0x8(%ebp),%eax
switch ( policy ) {
10c4b5: 85 c0 test %eax,%eax
10c4b7: 78 0a js 10c4c3 <sched_get_priority_max+0x17>
10c4b9: 83 f8 02 cmp $0x2,%eax
10c4bc: 7e 1a jle 10c4d8 <sched_get_priority_max+0x2c>
10c4be: 83 f8 04 cmp $0x4,%eax
10c4c1: 74 15 je 10c4d8 <sched_get_priority_max+0x2c><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10c4c3: e8 14 9a 00 00 call 115edc <__errno>
10c4c8: c7 00 16 00 00 00 movl $0x16,(%eax)
10c4ce: b8 ff ff ff ff mov $0xffffffff,%eax
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
10c4d3: c9 leave
10c4d4: c3 ret
10c4d5: 8d 76 00 lea 0x0(%esi),%esi
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
10c4d8: 0f b6 05 7c 67 12 00 movzbl 0x12677c,%eax
10c4df: 48 dec %eax
}
10c4e0: c9 leave
10c4e1: c3 ret
0010c4e4 <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
10c4e4: 55 push %ebp
10c4e5: 89 e5 mov %esp,%ebp
10c4e7: 83 ec 08 sub $0x8,%esp
10c4ea: 8b 45 08 mov 0x8(%ebp),%eax
switch ( policy ) {
10c4ed: 85 c0 test %eax,%eax
10c4ef: 78 0a js 10c4fb <sched_get_priority_min+0x17>
10c4f1: 83 f8 02 cmp $0x2,%eax
10c4f4: 7e 1a jle 10c510 <sched_get_priority_min+0x2c><== ALWAYS TAKEN
10c4f6: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
10c4f9: 74 15 je 10c510 <sched_get_priority_min+0x2c><== NOT EXECUTED
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10c4fb: e8 dc 99 00 00 call 115edc <__errno>
10c500: c7 00 16 00 00 00 movl $0x16,(%eax)
10c506: b8 ff ff ff ff mov $0xffffffff,%eax
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
10c50b: c9 leave
10c50c: c3 ret
10c50d: 8d 76 00 lea 0x0(%esi),%esi
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
10c510: b8 01 00 00 00 mov $0x1,%eax
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
10c515: c9 leave
10c516: c3 ret
0010c518 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
10c518: 55 push %ebp
10c519: 89 e5 mov %esp,%ebp
10c51b: 56 push %esi
10c51c: 53 push %ebx
10c51d: 8b 75 08 mov 0x8(%ebp),%esi
10c520: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10c523: 85 f6 test %esi,%esi
10c525: 75 21 jne 10c548 <sched_rr_get_interval+0x30><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
10c527: 85 db test %ebx,%ebx
10c529: 74 38 je 10c563 <sched_rr_get_interval+0x4b>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
10c52b: 83 ec 08 sub $0x8,%esp
10c52e: 53 push %ebx
10c52f: ff 35 24 a9 12 00 pushl 0x12a924
10c535: e8 62 34 00 00 call 10f99c <_Timespec_From_ticks>
10c53a: 31 c0 xor %eax,%eax
return 0;
10c53c: 83 c4 10 add $0x10,%esp
}
10c53f: 8d 65 f8 lea -0x8(%ebp),%esp
10c542: 5b pop %ebx
10c543: 5e pop %esi
10c544: c9 leave
10c545: c3 ret
10c546: 66 90 xchg %ax,%ax
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10c548: e8 63 c7 ff ff call 108cb0 <getpid>
10c54d: 39 f0 cmp %esi,%eax
10c54f: 74 d6 je 10c527 <sched_rr_get_interval+0xf>
rtems_set_errno_and_return_minus_one( ESRCH );
10c551: e8 86 99 00 00 call 115edc <__errno>
10c556: c7 00 03 00 00 00 movl $0x3,(%eax)
10c55c: b8 ff ff ff ff mov $0xffffffff,%eax
10c561: eb dc jmp 10c53f <sched_rr_get_interval+0x27>
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10c563: e8 74 99 00 00 call 115edc <__errno>
10c568: c7 00 16 00 00 00 movl $0x16,(%eax)
10c56e: b8 ff ff ff ff mov $0xffffffff,%eax
10c573: eb ca jmp 10c53f <sched_rr_get_interval+0x27>
0010ea1c <sem_close>:
*/
int sem_close(
sem_t *sem
)
{
10ea1c: 55 push %ebp
10ea1d: 89 e5 mov %esp,%ebp
10ea1f: 83 ec 1c sub $0x1c,%esp
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
10ea22: 8d 45 f4 lea -0xc(%ebp),%eax
10ea25: 50 push %eax
10ea26: 8b 45 08 mov 0x8(%ebp),%eax
10ea29: ff 30 pushl (%eax)
10ea2b: 68 00 f6 12 00 push $0x12f600
10ea30: e8 53 21 00 00 call 110b88 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
10ea35: 83 c4 10 add $0x10,%esp
10ea38: 8b 55 f4 mov -0xc(%ebp),%edx
10ea3b: 85 d2 test %edx,%edx
10ea3d: 74 15 je 10ea54 <sem_close+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10ea3f: e8 b4 a8 00 00 call 1192f8 <__errno>
10ea44: c7 00 16 00 00 00 movl $0x16,(%eax)
10ea4a: b8 ff ff ff ff mov $0xffffffff,%eax
}
10ea4f: c9 leave
10ea50: c3 ret
10ea51: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_semaphore->open_count -= 1;
10ea54: ff 48 18 decl 0x18(%eax)
_POSIX_Semaphore_Delete( the_semaphore );
10ea57: 83 ec 0c sub $0xc,%esp
10ea5a: 50 push %eax
10ea5b: e8 1c 6c 00 00 call 11567c <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
10ea60: e8 e7 29 00 00 call 11144c <_Thread_Enable_dispatch>
10ea65: 31 c0 xor %eax,%eax
return 0;
10ea67: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10ea6a: c9 leave
10ea6b: c3 ret
0010ea6c <sem_destroy>:
*/
int sem_destroy(
sem_t *sem
)
{
10ea6c: 55 push %ebp
10ea6d: 89 e5 mov %esp,%ebp
10ea6f: 83 ec 1c sub $0x1c,%esp
10ea72: 8d 45 f4 lea -0xc(%ebp),%eax
10ea75: 50 push %eax
10ea76: 8b 45 08 mov 0x8(%ebp),%eax
10ea79: ff 30 pushl (%eax)
10ea7b: 68 00 f6 12 00 push $0x12f600
10ea80: e8 03 21 00 00 call 110b88 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
10ea85: 83 c4 10 add $0x10,%esp
10ea88: 8b 55 f4 mov -0xc(%ebp),%edx
10ea8b: 85 d2 test %edx,%edx
10ea8d: 74 15 je 10eaa4 <sem_destroy+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10ea8f: e8 64 a8 00 00 call 1192f8 <__errno>
10ea94: c7 00 16 00 00 00 movl $0x16,(%eax)
10ea9a: b8 ff ff ff ff mov $0xffffffff,%eax
}
10ea9f: c9 leave
10eaa0: c3 ret
10eaa1: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == true ) {
10eaa4: 80 78 14 00 cmpb $0x0,0x14(%eax)
10eaa8: 75 16 jne 10eac0 <sem_destroy+0x54>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
_POSIX_Semaphore_Delete( the_semaphore );
10eaaa: 83 ec 0c sub $0xc,%esp
10eaad: 50 push %eax
10eaae: e8 c9 6b 00 00 call 11567c <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
10eab3: e8 94 29 00 00 call 11144c <_Thread_Enable_dispatch>
10eab8: 31 c0 xor %eax,%eax
return 0;
10eaba: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10eabd: c9 leave
10eabe: c3 ret
10eabf: 90 nop
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == true ) {
_Thread_Enable_dispatch();
10eac0: e8 87 29 00 00 call 11144c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
10eac5: e8 2e a8 00 00 call 1192f8 <__errno>
10eaca: c7 00 16 00 00 00 movl $0x16,(%eax)
10ead0: b8 ff ff ff ff mov $0xffffffff,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10ead5: c9 leave
10ead6: c3 ret
0010ead8 <sem_getvalue>:
int sem_getvalue(
sem_t *sem,
int *sval
)
{
10ead8: 55 push %ebp
10ead9: 89 e5 mov %esp,%ebp
10eadb: 83 ec 1c sub $0x1c,%esp
10eade: 8d 45 f4 lea -0xc(%ebp),%eax
10eae1: 50 push %eax
10eae2: 8b 45 08 mov 0x8(%ebp),%eax
10eae5: ff 30 pushl (%eax)
10eae7: 68 00 f6 12 00 push $0x12f600
10eaec: e8 97 20 00 00 call 110b88 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
10eaf1: 83 c4 10 add $0x10,%esp
10eaf4: 8b 55 f4 mov -0xc(%ebp),%edx
10eaf7: 85 d2 test %edx,%edx
10eaf9: 74 15 je 10eb10 <sem_getvalue+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10eafb: e8 f8 a7 00 00 call 1192f8 <__errno>
10eb00: c7 00 16 00 00 00 movl $0x16,(%eax)
10eb06: b8 ff ff ff ff mov $0xffffffff,%eax
}
10eb0b: c9 leave
10eb0c: c3 ret
10eb0d: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore );
10eb10: 8b 50 64 mov 0x64(%eax),%edx
10eb13: 8b 45 0c mov 0xc(%ebp),%eax
10eb16: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10eb18: e8 2f 29 00 00 call 11144c <_Thread_Enable_dispatch>
10eb1d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10eb1f: c9 leave
10eb20: c3 ret
0010eb6c <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
10eb6c: 55 push %ebp
10eb6d: 89 e5 mov %esp,%ebp
10eb6f: 57 push %edi
10eb70: 56 push %esi
10eb71: 53 push %ebx
10eb72: 83 ec 2c sub $0x2c,%esp
10eb75: 8b 75 08 mov 0x8(%ebp),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10eb78: a1 b8 f2 12 00 mov 0x12f2b8,%eax
10eb7d: 40 inc %eax
10eb7e: a3 b8 f2 12 00 mov %eax,0x12f2b8
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10eb83: 8b 7d 0c mov 0xc(%ebp),%edi
10eb86: 81 e7 00 02 00 00 and $0x200,%edi
10eb8c: 0f 85 86 00 00 00 jne 10ec18 <sem_open+0xac>
10eb92: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
10eb99: 83 ec 08 sub $0x8,%esp
10eb9c: 8d 45 e4 lea -0x1c(%ebp),%eax
10eb9f: 50 push %eax
10eba0: 56 push %esi
10eba1: e8 26 6b 00 00 call 1156cc <_POSIX_Semaphore_Name_to_id>
10eba6: 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 ) {
10eba8: 83 c4 10 add $0x10,%esp
10ebab: 85 c0 test %eax,%eax
10ebad: 74 25 je 10ebd4 <sem_open+0x68>
/*
* 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) ) ) {
10ebaf: 83 f8 02 cmp $0x2,%eax
10ebb2: 75 04 jne 10ebb8 <sem_open+0x4c> <== NEVER TAKEN
10ebb4: 85 ff test %edi,%edi
10ebb6: 75 6c jne 10ec24 <sem_open+0xb8>
_Thread_Enable_dispatch();
10ebb8: e8 8f 28 00 00 call 11144c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
10ebbd: e8 36 a7 00 00 call 1192f8 <__errno>
10ebc2: 89 18 mov %ebx,(%eax)
10ebc4: b8 ff ff ff ff mov $0xffffffff,%eax
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
10ebc9: 8d 65 f4 lea -0xc(%ebp),%esp
10ebcc: 5b pop %ebx
10ebcd: 5e pop %esi
10ebce: 5f pop %edi
10ebcf: c9 leave
10ebd0: c3 ret
10ebd1: 8d 76 00 lea 0x0(%esi),%esi
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10ebd4: 8b 45 0c mov 0xc(%ebp),%eax
10ebd7: 25 00 0a 00 00 and $0xa00,%eax
10ebdc: 3d 00 0a 00 00 cmp $0xa00,%eax
10ebe1: 74 65 je 10ec48 <sem_open+0xdc>
10ebe3: 50 push %eax
10ebe4: 8d 45 dc lea -0x24(%ebp),%eax
10ebe7: 50 push %eax
10ebe8: ff 75 e4 pushl -0x1c(%ebp)
10ebeb: 68 00 f6 12 00 push $0x12f600
10ebf0: e8 93 1f 00 00 call 110b88 <_Objects_Get>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
10ebf5: 89 45 e0 mov %eax,-0x20(%ebp)
the_semaphore->open_count += 1;
10ebf8: ff 40 18 incl 0x18(%eax)
_Thread_Enable_dispatch();
10ebfb: e8 4c 28 00 00 call 11144c <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10ec00: e8 47 28 00 00 call 11144c <_Thread_Enable_dispatch>
goto return_id;
10ec05: 83 c4 10 add $0x10,%esp
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;
10ec08: 8b 45 e0 mov -0x20(%ebp),%eax
10ec0b: 83 c0 08 add $0x8,%eax
#endif
return id;
}
10ec0e: 8d 65 f4 lea -0xc(%ebp),%esp
10ec11: 5b pop %ebx
10ec12: 5e pop %esi
10ec13: 5f pop %edi
10ec14: c9 leave
10ec15: c3 ret
10ec16: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
10ec18: 8b 45 14 mov 0x14(%ebp),%eax
10ec1b: 89 45 d4 mov %eax,-0x2c(%ebp)
10ec1e: e9 76 ff ff ff jmp 10eb99 <sem_open+0x2d>
10ec23: 90 nop
/*
* 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(
10ec24: 8d 45 e0 lea -0x20(%ebp),%eax
10ec27: 50 push %eax
10ec28: ff 75 d4 pushl -0x2c(%ebp)
10ec2b: 6a 00 push $0x0
10ec2d: 56 push %esi
10ec2e: e8 3d 69 00 00 call 115570 <_POSIX_Semaphore_Create_support>
10ec33: 89 c3 mov %eax,%ebx
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
10ec35: e8 12 28 00 00 call 11144c <_Thread_Enable_dispatch>
if ( status == -1 )
10ec3a: 83 c4 10 add $0x10,%esp
10ec3d: 43 inc %ebx
10ec3e: 75 c8 jne 10ec08 <sem_open+0x9c>
10ec40: b8 ff ff ff ff mov $0xffffffff,%eax
10ec45: eb c7 jmp 10ec0e <sem_open+0xa2>
10ec47: 90 nop
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
10ec48: e8 ff 27 00 00 call 11144c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
10ec4d: e8 a6 a6 00 00 call 1192f8 <__errno>
10ec52: c7 00 11 00 00 00 movl $0x11,(%eax)
10ec58: b8 ff ff ff ff mov $0xffffffff,%eax
10ec5d: eb af jmp 10ec0e <sem_open+0xa2>
0010c11c <sem_post>:
*/
int sem_post(
sem_t *sem
)
{
10c11c: 55 push %ebp
10c11d: 89 e5 mov %esp,%ebp
10c11f: 83 ec 1c sub $0x1c,%esp
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
10c122: 8d 45 f4 lea -0xc(%ebp),%eax
10c125: 50 push %eax
10c126: 8b 45 08 mov 0x8(%ebp),%eax
10c129: ff 30 pushl (%eax)
10c12b: 68 80 97 12 00 push $0x129780
10c130: e8 2b 1f 00 00 call 10e060 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
10c135: 83 c4 10 add $0x10,%esp
10c138: 8b 4d f4 mov -0xc(%ebp),%ecx
10c13b: 85 c9 test %ecx,%ecx
10c13d: 74 15 je 10c154 <sem_post+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10c13f: e8 fc 9c 00 00 call 115e40 <__errno>
10c144: c7 00 16 00 00 00 movl $0x16,(%eax)
10c14a: b8 ff ff ff ff mov $0xffffffff,%eax
}
10c14f: c9 leave
10c150: c3 ret
10c151: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Surrender(
10c154: 52 push %edx
10c155: 6a 00 push $0x0
10c157: ff 70 08 pushl 0x8(%eax)
10c15a: 83 c0 1c add $0x1c,%eax
10c15d: 50 push %eax
10c15e: e8 41 15 00 00 call 10d6a4 <_CORE_semaphore_Surrender>
NULL /* XXX need to define a routine to handle this case */
#else
NULL
#endif
);
_Thread_Enable_dispatch();
10c163: e8 6c 27 00 00 call 10e8d4 <_Thread_Enable_dispatch>
10c168: 31 c0 xor %eax,%eax
return 0;
10c16a: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10c16d: c9 leave
10c16e: c3 ret
0010ecb4 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
10ecb4: 55 push %ebp
10ecb5: 89 e5 mov %esp,%ebp
10ecb7: 53 push %ebx
10ecb8: 83 ec 1c sub $0x1c,%esp
10ecbb: 8b 5d 08 mov 0x8(%ebp),%ebx
*
* 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 );
10ecbe: 8d 45 f4 lea -0xc(%ebp),%eax
10ecc1: 50 push %eax
10ecc2: ff 75 0c pushl 0xc(%ebp)
10ecc5: e8 b6 5f 00 00 call 114c80 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10ecca: 83 c4 10 add $0x10,%esp
10eccd: 83 f8 03 cmp $0x3,%eax
10ecd0: 74 16 je 10ece8 <sem_timedwait+0x34> <== ALWAYS TAKEN
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10ecd2: 50 push %eax <== NOT EXECUTED
10ecd3: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED
10ecd6: 6a 00 push $0x0 <== NOT EXECUTED
10ecd8: 53 push %ebx <== NOT EXECUTED
10ecd9: e8 5a 6a 00 00 call 115738 <_POSIX_Semaphore_Wait_support><== NOT EXECUTED
10ecde: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
break;
}
}
return lock_status;
}
10ece1: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10ece4: c9 leave <== NOT EXECUTED
10ece5: c3 ret <== NOT EXECUTED
10ece6: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10ece8: 52 push %edx
10ece9: ff 75 f4 pushl -0xc(%ebp)
10ecec: 6a 01 push $0x1
10ecee: 53 push %ebx
10ecef: e8 44 6a 00 00 call 115738 <_POSIX_Semaphore_Wait_support>
10ecf4: 83 c4 10 add $0x10,%esp
break;
}
}
return lock_status;
}
10ecf7: 8b 5d fc mov -0x4(%ebp),%ebx
10ecfa: c9 leave
10ecfb: c3 ret
0012e854 <setgid>:
*/
int setgid(
gid_t gid
)
{
12e854: 55 push %ebp <== NOT EXECUTED
12e855: 89 e5 mov %esp,%ebp <== NOT EXECUTED
_POSIX_types_Gid = gid;
12e857: a1 20 f3 16 00 mov 0x16f320,%eax <== NOT EXECUTED
12e85c: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
12e85f: 66 89 50 34 mov %dx,0x34(%eax) <== NOT EXECUTED
return 0;
}
12e863: 31 c0 xor %eax,%eax <== NOT EXECUTED
12e865: c9 leave <== NOT EXECUTED
12e866: c3 ret <== NOT EXECUTED
0012edb8 <setgrent>:
return NULL;
return &grent;
}
void setgrent(void)
{
12edb8: 55 push %ebp <== NOT EXECUTED
12edb9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12edbb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
init_etc_passwd_group();
12edbe: e8 f5 fe ff ff call 12ecb8 <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
12edc3: a1 c4 49 17 00 mov 0x1749c4,%eax <== NOT EXECUTED
12edc8: 85 c0 test %eax,%eax <== NOT EXECUTED
12edca: 74 0c je 12edd8 <setgrent+0x20> <== NOT EXECUTED
fclose(group_fp);
12edcc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12edcf: 50 push %eax <== NOT EXECUTED
12edd0: e8 f7 8e 01 00 call 147ccc <fclose> <== NOT EXECUTED
12edd5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
12edd8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12eddb: 68 e9 1d 16 00 push $0x161de9 <== NOT EXECUTED
12ede0: 68 dc e1 15 00 push $0x15e1dc <== NOT EXECUTED
12ede5: e8 fa 96 01 00 call 1484e4 <fopen> <== NOT EXECUTED
12edea: a3 c4 49 17 00 mov %eax,0x1749c4 <== NOT EXECUTED
12edef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
12edf2: c9 leave <== NOT EXECUTED
12edf3: c3 ret <== NOT EXECUTED
0010b8f8 <setitimer>:
int setitimer(
int which,
const struct itimerval *value,
struct itimerval *ovalue
)
{
10b8f8: 55 push %ebp
10b8f9: 89 e5 mov %esp,%ebp
10b8fb: 83 ec 08 sub $0x8,%esp
if ( !value )
10b8fe: 8b 55 0c mov 0xc(%ebp),%edx
10b901: 85 d2 test %edx,%edx
10b903: 74 33 je 10b938 <setitimer+0x40>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !ovalue )
10b905: 8b 45 10 mov 0x10(%ebp),%eax
10b908: 85 c0 test %eax,%eax
10b90a: 74 2c je 10b938 <setitimer+0x40>
rtems_set_errno_and_return_minus_one( EFAULT );
switch ( which ) {
10b90c: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
10b910: 76 12 jbe 10b924 <setitimer+0x2c>
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b912: e8 11 a0 00 00 call 115928 <__errno>
10b917: c7 00 16 00 00 00 movl $0x16,(%eax)
}
10b91d: b8 ff ff ff ff mov $0xffffffff,%eax
10b922: c9 leave
10b923: c3 ret
switch ( which ) {
case ITIMER_REAL:
case ITIMER_VIRTUAL:
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
10b924: e8 ff 9f 00 00 call 115928 <__errno>
10b929: c7 00 58 00 00 00 movl $0x58,(%eax)
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b92f: b8 ff ff ff ff mov $0xffffffff,%eax
10b934: c9 leave
10b935: c3 ret
10b936: 66 90 xchg %ax,%ax
{
if ( !value )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !ovalue )
rtems_set_errno_and_return_minus_one( EFAULT );
10b938: e8 eb 9f 00 00 call 115928 <__errno>
10b93d: c7 00 0e 00 00 00 movl $0xe,(%eax)
10b943: eb d8 jmp 10b91d <setitimer+0x25>
0012ef84 <setpwent>:
return NULL;
return &pwent;
}
void setpwent(void)
{
12ef84: 55 push %ebp <== NOT EXECUTED
12ef85: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12ef87: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
init_etc_passwd_group();
12ef8a: e8 29 fd ff ff call 12ecb8 <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
12ef8f: a1 c4 48 17 00 mov 0x1748c4,%eax <== NOT EXECUTED
12ef94: 85 c0 test %eax,%eax <== NOT EXECUTED
12ef96: 74 0c je 12efa4 <setpwent+0x20> <== NOT EXECUTED
fclose(passwd_fp);
12ef98: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12ef9b: 50 push %eax <== NOT EXECUTED
12ef9c: e8 2b 8d 01 00 call 147ccc <fclose> <== NOT EXECUTED
12efa1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
12efa4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12efa7: 68 e9 1d 16 00 push $0x161de9 <== NOT EXECUTED
12efac: 68 d0 e1 15 00 push $0x15e1d0 <== NOT EXECUTED
12efb1: e8 2e 95 01 00 call 1484e4 <fopen> <== NOT EXECUTED
12efb6: a3 c4 48 17 00 mov %eax,0x1748c4 <== NOT EXECUTED
12efbb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
12efbe: c9 leave <== NOT EXECUTED
12efbf: c3 ret <== NOT EXECUTED
0010e97c <setuid>:
*/
int setuid(
uid_t uid
)
{
10e97c: 55 push %ebp <== NOT EXECUTED
10e97d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
_POSIX_types_Uid = uid;
10e97f: a1 20 f3 16 00 mov 0x16f320,%eax <== NOT EXECUTED
10e984: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
10e987: 66 89 50 32 mov %dx,0x32(%eax) <== NOT EXECUTED
return 0;
}
10e98b: 31 c0 xor %eax,%eax <== NOT EXECUTED
10e98d: c9 leave <== NOT EXECUTED
10e98e: c3 ret <== NOT EXECUTED
0010c358 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
10c358: 55 push %ebp
10c359: 89 e5 mov %esp,%ebp
10c35b: 57 push %edi
10c35c: 56 push %esi
10c35d: 53 push %ebx
10c35e: 83 ec 1c sub $0x1c,%esp
10c361: 8b 5d 08 mov 0x8(%ebp),%ebx
10c364: 8b 45 0c mov 0xc(%ebp),%eax
10c367: 8b 55 10 mov 0x10(%ebp),%edx
ISR_Level level;
if ( oact )
10c36a: 85 d2 test %edx,%edx
10c36c: 74 13 je 10c381 <sigaction+0x29>
*oact = _POSIX_signals_Vectors[ sig ];
10c36e: 8d 0c 5b lea (%ebx,%ebx,2),%ecx
10c371: 8d 34 8d c0 bb 12 00 lea 0x12bbc0(,%ecx,4),%esi
10c378: b9 03 00 00 00 mov $0x3,%ecx
10c37d: 89 d7 mov %edx,%edi
10c37f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !sig )
10c381: 85 db test %ebx,%ebx
10c383: 74 6f je 10c3f4 <sigaction+0x9c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
10c385: 8d 53 ff lea -0x1(%ebx),%edx
10c388: 83 fa 1f cmp $0x1f,%edx
10c38b: 77 67 ja 10c3f4 <sigaction+0x9c>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
10c38d: 83 fb 09 cmp $0x9,%ebx
10c390: 74 62 je 10c3f4 <sigaction+0x9c>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
10c392: 85 c0 test %eax,%eax
10c394: 74 37 je 10c3cd <sigaction+0x75> <== 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 );
10c396: 9c pushf
10c397: fa cli
10c398: 8f 45 e4 popl -0x1c(%ebp)
if ( act->sa_handler == SIG_DFL ) {
10c39b: 8b 50 08 mov 0x8(%eax),%edx
10c39e: 85 d2 test %edx,%edx
10c3a0: 74 36 je 10c3d8 <sigaction+0x80>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
10c3a2: 83 ec 0c sub $0xc,%esp
10c3a5: 53 push %ebx
10c3a6: 89 45 e0 mov %eax,-0x20(%ebp)
10c3a9: e8 46 62 00 00 call 1125f4 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
10c3ae: 8d 14 5b lea (%ebx,%ebx,2),%edx
10c3b1: 8d 3c 95 c0 bb 12 00 lea 0x12bbc0(,%edx,4),%edi
10c3b8: b9 03 00 00 00 mov $0x3,%ecx
10c3bd: 8b 45 e0 mov -0x20(%ebp),%eax
10c3c0: 89 c6 mov %eax,%esi
10c3c2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10c3c4: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10c3c7: ff 75 e4 pushl -0x1c(%ebp)
10c3ca: 9d popf
10c3cb: 31 c0 xor %eax,%eax
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
10c3cd: 8d 65 f4 lea -0xc(%ebp),%esp
10c3d0: 5b pop %ebx
10c3d1: 5e pop %esi
10c3d2: 5f pop %edi
10c3d3: c9 leave
10c3d4: c3 ret
10c3d5: 8d 76 00 lea 0x0(%esi),%esi
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
10c3d8: 8d 34 5b lea (%ebx,%ebx,2),%esi
10c3db: c1 e6 02 shl $0x2,%esi
10c3de: 8d be c0 bb 12 00 lea 0x12bbc0(%esi),%edi
10c3e4: 81 c6 00 50 12 00 add $0x125000,%esi
10c3ea: b9 03 00 00 00 mov $0x3,%ecx
10c3ef: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10c3f1: eb d4 jmp 10c3c7 <sigaction+0x6f>
10c3f3: 90 nop
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
10c3f4: e8 53 9c 00 00 call 11604c <__errno>
10c3f9: c7 00 16 00 00 00 movl $0x16,(%eax)
10c3ff: b8 ff ff ff ff mov $0xffffffff,%eax
10c404: eb c7 jmp 10c3cd <sigaction+0x75>
0010e0fc <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
10e0fc: 55 push %ebp
10e0fd: 89 e5 mov %esp,%ebp
10e0ff: 56 push %esi
10e100: 53 push %ebx
10e101: 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 );
10e104: 8d 5d f4 lea -0xc(%ebp),%ebx
10e107: 53 push %ebx
10e108: ff 75 08 pushl 0x8(%ebp)
10e10b: 6a 01 push $0x1
10e10d: e8 c6 ff ff ff call 10e0d8 <sigprocmask>
(void) sigfillset( &all_signals );
10e112: 8d 75 f0 lea -0x10(%ebp),%esi
10e115: 89 34 24 mov %esi,(%esp)
10e118: e8 0f ff ff ff call 10e02c <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
10e11d: 83 c4 0c add $0xc,%esp
10e120: 6a 00 push $0x0
10e122: 6a 00 push $0x0
10e124: 56 push %esi
10e125: e8 76 00 00 00 call 10e1a0 <sigtimedwait>
10e12a: 89 c6 mov %eax,%esi
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
10e12c: 83 c4 0c add $0xc,%esp
10e12f: 6a 00 push $0x0
10e131: 53 push %ebx
10e132: 6a 00 push $0x0
10e134: e8 9f ff ff ff call 10e0d8 <sigprocmask>
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
10e139: 83 c4 10 add $0x10,%esp
10e13c: 46 inc %esi
10e13d: 75 0d jne 10e14c <sigsuspend+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINTR );
return status;
}
10e13f: b8 ff ff ff ff mov $0xffffffff,%eax
10e144: 8d 65 f8 lea -0x8(%ebp),%esp
10e147: 5b pop %ebx
10e148: 5e pop %esi
10e149: c9 leave
10e14a: c3 ret
10e14b: 90 nop
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
rtems_set_errno_and_return_minus_one( EINTR );
10e14c: e8 a7 99 00 00 call 117af8 <__errno>
10e151: c7 00 04 00 00 00 movl $0x4,(%eax)
10e157: eb e6 jmp 10e13f <sigsuspend+0x43>
0010c790 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
10c790: 55 push %ebp
10c791: 89 e5 mov %esp,%ebp
10c793: 57 push %edi
10c794: 56 push %esi
10c795: 53 push %ebx
10c796: 83 ec 2c sub $0x2c,%esp
10c799: 8b 75 08 mov 0x8(%ebp),%esi
10c79c: 8b 5d 0c mov 0xc(%ebp),%ebx
10c79f: 8b 7d 10 mov 0x10(%ebp),%edi
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
10c7a2: 85 f6 test %esi,%esi
10c7a4: 0f 84 7a 01 00 00 je 10c924 <sigtimedwait+0x194>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
10c7aa: 85 ff test %edi,%edi
10c7ac: 0f 84 1e 01 00 00 je 10c8d0 <sigtimedwait+0x140>
if ( !_Timespec_Is_valid( timeout ) )
10c7b2: 83 ec 0c sub $0xc,%esp
10c7b5: 57 push %edi
10c7b6: e8 a9 34 00 00 call 10fc64 <_Timespec_Is_valid>
10c7bb: 83 c4 10 add $0x10,%esp
10c7be: 84 c0 test %al,%al
10c7c0: 0f 84 5e 01 00 00 je 10c924 <sigtimedwait+0x194>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
10c7c6: 83 ec 0c sub $0xc,%esp
10c7c9: 57 push %edi
10c7ca: e8 f9 34 00 00 call 10fcc8 <_Timespec_To_ticks>
if ( !interval )
10c7cf: 83 c4 10 add $0x10,%esp
10c7d2: 85 c0 test %eax,%eax
10c7d4: 0f 84 4a 01 00 00 je 10c924 <sigtimedwait+0x194> <== NEVER TAKEN
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10c7da: 85 db test %ebx,%ebx
10c7dc: 0f 84 f8 00 00 00 je 10c8da <sigtimedwait+0x14a> <== NEVER TAKEN
the_thread = _Thread_Executing;
10c7e2: 8b 15 38 ba 12 00 mov 0x12ba38,%edx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10c7e8: 8b ba f8 00 00 00 mov 0xf8(%edx),%edi
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
10c7ee: 9c pushf
10c7ef: fa cli
10c7f0: 8f 45 d0 popl -0x30(%ebp)
if ( *set & api->signals_pending ) {
10c7f3: 8b 0e mov (%esi),%ecx
10c7f5: 89 4d d4 mov %ecx,-0x2c(%ebp)
10c7f8: 8b 8f d0 00 00 00 mov 0xd0(%edi),%ecx
10c7fe: 85 4d d4 test %ecx,-0x2c(%ebp)
10c801: 0f 85 dd 00 00 00 jne 10c8e4 <sigtimedwait+0x154>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
10c807: 8b 0d 68 c1 12 00 mov 0x12c168,%ecx
10c80d: 85 4d d4 test %ecx,-0x2c(%ebp)
10c810: 75 7e jne 10c890 <sigtimedwait+0x100>
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
10c812: c7 03 ff ff ff ff movl $0xffffffff,(%ebx)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c818: 8b 0d 78 b9 12 00 mov 0x12b978,%ecx
10c81e: 41 inc %ecx
10c81f: 89 0d 78 b9 12 00 mov %ecx,0x12b978
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
10c825: c7 42 44 00 c1 12 00 movl $0x12c100,0x44(%edx)
the_thread->Wait.return_code = EINTR;
10c82c: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx)
the_thread->Wait.option = *set;
10c833: 8b 0e mov (%esi),%ecx
10c835: 89 4a 30 mov %ecx,0x30(%edx)
the_thread->Wait.return_argument = the_info;
10c838: 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;
10c83b: c7 05 30 c1 12 00 01 movl $0x1,0x12c130
10c842: 00 00 00
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
10c845: ff 75 d0 pushl -0x30(%ebp)
10c848: 9d popf
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
10c849: 52 push %edx
10c84a: 68 08 f8 10 00 push $0x10f808
10c84f: 50 push %eax
10c850: 68 00 c1 12 00 push $0x12c100
10c855: e8 9e 2c 00 00 call 10f4f8 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10c85a: e8 61 27 00 00 call 10efc0 <_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 );
10c85f: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c866: 6a 00 push $0x0
10c868: 53 push %ebx
10c869: ff 33 pushl (%ebx)
10c86b: 57 push %edi
10c86c: e8 6f 64 00 00 call 112ce0 <_POSIX_signals_Clear_signals>
errno = _Thread_Executing->Wait.return_code;
10c871: 83 c4 20 add $0x20,%esp
10c874: e8 d7 9a 00 00 call 116350 <__errno>
10c879: 8b 15 38 ba 12 00 mov 0x12ba38,%edx
10c87f: 8b 52 34 mov 0x34(%edx),%edx
10c882: 89 10 mov %edx,(%eax)
return the_info->si_signo;
10c884: 8b 33 mov (%ebx),%esi
}
10c886: 89 f0 mov %esi,%eax
10c888: 8d 65 f4 lea -0xc(%ebp),%esp
10c88b: 5b pop %ebx
10c88c: 5e pop %esi
10c88d: 5f pop %edi
10c88e: c9 leave
10c88f: c3 ret
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
10c890: 83 ec 0c sub $0xc,%esp
10c893: 51 push %ecx
10c894: e8 b3 fe ff ff call 10c74c <_POSIX_signals_Get_highest>
10c899: 89 c6 mov %eax,%esi
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
10c89b: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c8a2: 6a 01 push $0x1
10c8a4: 53 push %ebx
10c8a5: 50 push %eax
10c8a6: 57 push %edi
10c8a7: e8 34 64 00 00 call 112ce0 <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
10c8ac: ff 75 d0 pushl -0x30(%ebp)
10c8af: 9d popf
the_info->si_signo = signo;
10c8b0: 89 33 mov %esi,(%ebx)
the_info->si_code = SI_USER;
10c8b2: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_info->si_value.sival_int = 0;
10c8b9: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
return signo;
10c8c0: 83 c4 20 add $0x20,%esp
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
errno = _Thread_Executing->Wait.return_code;
return the_info->si_signo;
}
10c8c3: 89 f0 mov %esi,%eax
10c8c5: 8d 65 f4 lea -0xc(%ebp),%esp
10c8c8: 5b pop %ebx
10c8c9: 5e pop %esi
10c8ca: 5f pop %edi
10c8cb: c9 leave
10c8cc: c3 ret
10c8cd: 8d 76 00 lea 0x0(%esi),%esi
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10c8d0: 31 c0 xor %eax,%eax
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10c8d2: 85 db test %ebx,%ebx
10c8d4: 0f 85 08 ff ff ff jne 10c7e2 <sigtimedwait+0x52>
10c8da: 8d 5d dc lea -0x24(%ebp),%ebx
10c8dd: e9 00 ff ff ff jmp 10c7e2 <sigtimedwait+0x52>
10c8e2: 66 90 xchg %ax,%ax
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending );
10c8e4: 83 ec 0c sub $0xc,%esp
10c8e7: 51 push %ecx
10c8e8: e8 5f fe ff ff call 10c74c <_POSIX_signals_Get_highest>
10c8ed: 89 03 mov %eax,(%ebx)
_POSIX_signals_Clear_signals(
10c8ef: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c8f6: 6a 00 push $0x0
10c8f8: 53 push %ebx
10c8f9: 50 push %eax
10c8fa: 57 push %edi
10c8fb: e8 e0 63 00 00 call 112ce0 <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
10c900: ff 75 d0 pushl -0x30(%ebp)
10c903: 9d popf
the_info->si_code = SI_USER;
10c904: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_info->si_value.sival_int = 0;
10c90b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
return the_info->si_signo;
10c912: 8b 33 mov (%ebx),%esi
10c914: 83 c4 20 add $0x20,%esp
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
errno = _Thread_Executing->Wait.return_code;
return the_info->si_signo;
}
10c917: 89 f0 mov %esi,%eax
10c919: 8d 65 f4 lea -0xc(%ebp),%esp
10c91c: 5b pop %ebx
10c91d: 5e pop %esi
10c91e: 5f pop %edi
10c91f: c9 leave
10c920: c3 ret
10c921: 8d 76 00 lea 0x0(%esi),%esi
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10c924: e8 27 9a 00 00 call 116350 <__errno>
10c929: c7 00 16 00 00 00 movl $0x16,(%eax)
10c92f: be ff ff ff ff mov $0xffffffff,%esi
10c934: e9 4d ff ff ff jmp 10c886 <sigtimedwait+0xf6>
0010e364 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
10e364: 55 push %ebp
10e365: 89 e5 mov %esp,%ebp
10e367: 53 push %ebx
10e368: 83 ec 08 sub $0x8,%esp
10e36b: 8b 5d 0c mov 0xc(%ebp),%ebx
int status;
status = sigtimedwait( set, NULL, NULL );
10e36e: 6a 00 push $0x0
10e370: 6a 00 push $0x0
10e372: ff 75 08 pushl 0x8(%ebp)
10e375: e8 26 fe ff ff call 10e1a0 <sigtimedwait>
if ( status != -1 ) {
10e37a: 83 c4 10 add $0x10,%esp
10e37d: 83 f8 ff cmp $0xffffffff,%eax
10e380: 74 0e je 10e390 <sigwait+0x2c>
if ( sig )
10e382: 85 db test %ebx,%ebx
10e384: 74 02 je 10e388 <sigwait+0x24> <== NEVER TAKEN
*sig = status;
10e386: 89 03 mov %eax,(%ebx)
10e388: 31 c0 xor %eax,%eax
return 0;
}
return errno;
}
10e38a: 8b 5d fc mov -0x4(%ebp),%ebx
10e38d: c9 leave
10e38e: c3 ret
10e38f: 90 nop
if ( sig )
*sig = status;
return 0;
}
return errno;
10e390: e8 63 97 00 00 call 117af8 <__errno>
10e395: 8b 00 mov (%eax),%eax
}
10e397: 8b 5d fc mov -0x4(%ebp),%ebx
10e39a: c9 leave
10e39b: c3 ret
0010a204 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
10a204: 55 push %ebp <== NOT EXECUTED
10a205: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10a207: 56 push %esi <== NOT EXECUTED
10a208: 53 push %ebx <== NOT EXECUTED
10a209: 89 d3 mov %edx,%ebx <== NOT EXECUTED
10a20b: 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)) {
10a20d: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) <== NOT EXECUTED
10a214: 75 12 jne 10a228 <siproc+0x24> <== 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);
10a216: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
10a219: 89 da mov %ebx,%edx <== NOT EXECUTED
}
return i;
}
10a21b: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10a21e: 5b pop %ebx <== NOT EXECUTED
10a21f: 5e pop %esi <== NOT EXECUTED
10a220: 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);
10a221: e9 a2 fe ff ff jmp 10a0c8 <iproc> <== NOT EXECUTED
10a226: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10a228: 52 push %edx <== NOT EXECUTED
10a229: 6a 00 push $0x0 <== NOT EXECUTED
10a22b: 6a 00 push $0x0 <== NOT EXECUTED
10a22d: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED
10a230: e8 af 1a 00 00 call 10bce4 <rtems_semaphore_obtain><== NOT EXECUTED
i = iproc (c, tty);
10a235: 89 f2 mov %esi,%edx <== NOT EXECUTED
10a237: 0f b6 c2 movzbl %dl,%eax <== NOT EXECUTED
10a23a: 89 da mov %ebx,%edx <== NOT EXECUTED
10a23c: e8 87 fe ff ff call 10a0c8 <iproc> <== NOT EXECUTED
10a241: 89 c6 mov %eax,%esi <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
10a243: 58 pop %eax <== NOT EXECUTED
10a244: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED
10a247: e8 94 1b 00 00 call 10bde0 <rtems_semaphore_release><== NOT EXECUTED
10a24c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
10a24f: 89 f0 mov %esi,%eax <== NOT EXECUTED
10a251: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10a254: 5b pop %ebx <== NOT EXECUTED
10a255: 5e pop %esi <== NOT EXECUTED
10a256: c9 leave <== NOT EXECUTED
10a257: c3 ret <== NOT EXECUTED
0010fe80 <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
10fe80: 55 push %ebp
10fe81: 89 e5 mov %esp,%ebp
10fe83: 57 push %edi
10fe84: 56 push %esi
10fe85: 53 push %ebx
10fe86: 83 ec 2c sub $0x2c,%esp
10fe89: 8b 55 08 mov 0x8(%ebp),%edx
10fe8c: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
10fe8f: 85 f6 test %esi,%esi
10fe91: 0f 84 9d 00 00 00 je 10ff34 <stat+0xb4>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
10fe97: b9 ff ff ff ff mov $0xffffffff,%ecx
10fe9c: 89 d7 mov %edx,%edi
10fe9e: 31 c0 xor %eax,%eax
10fea0: f2 ae repnz scas %es:(%edi),%al
10fea2: f7 d1 not %ecx
10fea4: 49 dec %ecx
10fea5: 83 ec 0c sub $0xc,%esp
10fea8: 6a 01 push $0x1
10feaa: 8d 5d d4 lea -0x2c(%ebp),%ebx
10fead: 53 push %ebx
10feae: 6a 00 push $0x0
10feb0: 51 push %ecx
10feb1: 52 push %edx
10feb2: e8 41 e9 ff ff call 10e7f8 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
10feb7: 83 c4 20 add $0x20,%esp
10feba: 85 c0 test %eax,%eax
10febc: 75 66 jne 10ff24 <stat+0xa4>
return -1;
if ( !loc.handlers->fstat_h ){
10febe: 8b 55 dc mov -0x24(%ebp),%edx
10fec1: 8b 42 18 mov 0x18(%edx),%eax
10fec4: 85 c0 test %eax,%eax
10fec6: 74 39 je 10ff01 <stat+0x81> <== NEVER TAKEN
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
10fec8: b9 48 00 00 00 mov $0x48,%ecx
10fecd: 89 f7 mov %esi,%edi
10fecf: 31 c0 xor %eax,%eax
10fed1: f3 aa rep stos %al,%es:(%edi)
status = (*loc.handlers->fstat_h)( &loc, buf );
10fed3: 83 ec 08 sub $0x8,%esp
10fed6: 56 push %esi
10fed7: 53 push %ebx
10fed8: ff 52 18 call *0x18(%edx)
10fedb: 89 c6 mov %eax,%esi
rtems_filesystem_freenode( &loc );
10fedd: 8b 45 e0 mov -0x20(%ebp),%eax
10fee0: 83 c4 10 add $0x10,%esp
10fee3: 85 c0 test %eax,%eax
10fee5: 74 10 je 10fef7 <stat+0x77> <== NEVER TAKEN
10fee7: 8b 40 1c mov 0x1c(%eax),%eax
10feea: 85 c0 test %eax,%eax
10feec: 74 09 je 10fef7 <stat+0x77> <== NEVER TAKEN
10feee: 83 ec 0c sub $0xc,%esp
10fef1: 53 push %ebx
10fef2: ff d0 call *%eax
10fef4: 83 c4 10 add $0x10,%esp
return status;
}
10fef7: 89 f0 mov %esi,%eax
10fef9: 8d 65 f4 lea -0xc(%ebp),%esp
10fefc: 5b pop %ebx
10fefd: 5e pop %esi
10fefe: 5f pop %edi
10feff: c9 leave
10ff00: c3 ret
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
10ff01: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10ff04: 85 c0 test %eax,%eax <== NOT EXECUTED
10ff06: 74 10 je 10ff18 <stat+0x98> <== NOT EXECUTED
10ff08: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
10ff0b: 85 c0 test %eax,%eax <== NOT EXECUTED
10ff0d: 74 09 je 10ff18 <stat+0x98> <== NOT EXECUTED
10ff0f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ff12: 53 push %ebx <== NOT EXECUTED
10ff13: ff d0 call *%eax <== NOT EXECUTED
10ff15: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
10ff18: e8 63 7c 03 00 call 147b80 <__errno> <== NOT EXECUTED
10ff1d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10ff23: 90 nop <== NOT EXECUTED
10ff24: be ff ff ff ff mov $0xffffffff,%esi
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
10ff29: 89 f0 mov %esi,%eax
10ff2b: 8d 65 f4 lea -0xc(%ebp),%esp
10ff2e: 5b pop %ebx
10ff2f: 5e pop %esi
10ff30: 5f pop %edi
10ff31: c9 leave
10ff32: c3 ret
10ff33: 90 nop
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
10ff34: e8 47 7c 03 00 call 147b80 <__errno>
10ff39: c7 00 0e 00 00 00 movl $0xe,(%eax)
10ff3f: be ff ff ff ff mov $0xffffffff,%esi
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
10ff44: 89 f0 mov %esi,%eax
10ff46: 8d 65 f4 lea -0xc(%ebp),%esp
10ff49: 5b pop %ebx
10ff4a: 5e pop %esi
10ff4b: 5f pop %edi
10ff4c: c9 leave
10ff4d: c3 ret
0012fe24 <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
12fe24: 55 push %ebp <== NOT EXECUTED
12fe25: 89 e5 mov %esp,%ebp <== NOT EXECUTED
12fe27: 57 push %edi <== NOT EXECUTED
12fe28: 56 push %esi <== NOT EXECUTED
12fe29: 53 push %ebx <== NOT EXECUTED
12fe2a: 83 ec 38 sub $0x38,%esp <== NOT EXECUTED
12fe2d: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
12fe30: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
* 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 ) )
12fe33: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
12fe38: 89 d7 mov %edx,%edi <== NOT EXECUTED
12fe3a: 31 c0 xor %eax,%eax <== NOT EXECUTED
12fe3c: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
12fe3e: f7 d1 not %ecx <== NOT EXECUTED
12fe40: 49 dec %ecx <== NOT EXECUTED
12fe41: 6a 01 push $0x1 <== NOT EXECUTED
12fe43: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED
12fe46: 53 push %ebx <== NOT EXECUTED
12fe47: 6a 00 push $0x0 <== NOT EXECUTED
12fe49: 51 push %ecx <== NOT EXECUTED
12fe4a: 52 push %edx <== NOT EXECUTED
12fe4b: e8 a8 e9 fd ff call 10e7f8 <rtems_filesystem_evaluate_path><== NOT EXECUTED
12fe50: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12fe53: 85 c0 test %eax,%eax <== NOT EXECUTED
12fe55: 75 59 jne 12feb0 <statvfs+0x8c> <== NOT EXECUTED
return -1;
mt_entry = loc.mt_entry;
12fe57: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
fs_mount_root = &mt_entry->mt_fs_root;
12fe5a: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED
12fe5d: 8b 40 44 mov 0x44(%eax),%eax <== NOT EXECUTED
12fe60: 85 c0 test %eax,%eax <== NOT EXECUTED
12fe62: 74 3f je 12fea3 <statvfs+0x7f> <== NOT EXECUTED
if ( !fs_mount_root->ops->statvfs_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
memset (sb, 0, sizeof (struct statvfs));
12fe64: b9 38 00 00 00 mov $0x38,%ecx <== NOT EXECUTED
12fe69: 89 f7 mov %esi,%edi <== NOT EXECUTED
12fe6b: 31 c0 xor %eax,%eax <== NOT EXECUTED
12fe6d: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
12fe6f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
12fe72: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED
12fe75: 56 push %esi <== NOT EXECUTED
12fe76: 83 c2 1c add $0x1c,%edx <== NOT EXECUTED
12fe79: 52 push %edx <== NOT EXECUTED
12fe7a: ff 50 44 call *0x44(%eax) <== NOT EXECUTED
12fe7d: 89 c6 mov %eax,%esi <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
12fe7f: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
12fe82: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12fe85: 85 c0 test %eax,%eax <== NOT EXECUTED
12fe87: 74 10 je 12fe99 <statvfs+0x75> <== NOT EXECUTED
12fe89: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
12fe8c: 85 c0 test %eax,%eax <== NOT EXECUTED
12fe8e: 74 09 je 12fe99 <statvfs+0x75> <== NOT EXECUTED
12fe90: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12fe93: 53 push %ebx <== NOT EXECUTED
12fe94: ff d0 call *%eax <== NOT EXECUTED
12fe96: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return result;
}
12fe99: 89 f0 mov %esi,%eax <== NOT EXECUTED
12fe9b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12fe9e: 5b pop %ebx <== NOT EXECUTED
12fe9f: 5e pop %esi <== NOT EXECUTED
12fea0: 5f pop %edi <== NOT EXECUTED
12fea1: c9 leave <== NOT EXECUTED
12fea2: c3 ret <== NOT EXECUTED
mt_entry = loc.mt_entry;
fs_mount_root = &mt_entry->mt_fs_root;
if ( !fs_mount_root->ops->statvfs_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
12fea3: e8 d8 7c 01 00 call 147b80 <__errno> <== NOT EXECUTED
12fea8: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
12feae: 66 90 xchg %ax,%ax <== NOT EXECUTED
12feb0: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
rtems_filesystem_freenode( &loc );
return result;
}
12feb5: 89 f0 mov %esi,%eax <== NOT EXECUTED
12feb7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
12feba: 5b pop %ebx <== NOT EXECUTED
12febb: 5e pop %esi <== NOT EXECUTED
12febc: 5f pop %edi <== NOT EXECUTED
12febd: c9 leave <== NOT EXECUTED
12febe: c3 ret <== NOT EXECUTED
0012ff14 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
12ff14: 55 push %ebp
12ff15: 89 e5 mov %esp,%ebp
12ff17: 56 push %esi
12ff18: 53 push %ebx
12ff19: 83 ec 24 sub $0x24,%esp
12ff1c: 8b 75 0c mov 0xc(%ebp),%esi
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
12ff1f: 8d 5d dc lea -0x24(%ebp),%ebx
12ff22: 53 push %ebx
12ff23: 8d 45 f4 lea -0xc(%ebp),%eax
12ff26: 50 push %eax
12ff27: 56 push %esi
12ff28: e8 3b 00 fe ff call 10ff68 <rtems_filesystem_get_start_loc>
if ( !loc.ops->evalformake_h ) {
12ff2d: 8b 45 e8 mov -0x18(%ebp),%eax
12ff30: 8b 40 04 mov 0x4(%eax),%eax
12ff33: 83 c4 10 add $0x10,%esp
12ff36: 85 c0 test %eax,%eax
12ff38: 74 5e je 12ff98 <symlink+0x84> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
12ff3a: 51 push %ecx
12ff3b: 8d 55 f0 lea -0x10(%ebp),%edx
12ff3e: 52 push %edx
12ff3f: 53 push %ebx
12ff40: 03 75 f4 add -0xc(%ebp),%esi
12ff43: 56 push %esi
12ff44: ff d0 call *%eax
if ( result != 0 )
12ff46: 83 c4 10 add $0x10,%esp
12ff49: 85 c0 test %eax,%eax
12ff4b: 75 56 jne 12ffa3 <symlink+0x8f>
return -1;
if ( !loc.ops->symlink_h ) {
12ff4d: 8b 55 e8 mov -0x18(%ebp),%edx
12ff50: 8b 42 38 mov 0x38(%edx),%eax
12ff53: 85 c0 test %eax,%eax
12ff55: 74 2f je 12ff86 <symlink+0x72> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
12ff57: 52 push %edx
12ff58: ff 75 f0 pushl -0x10(%ebp)
12ff5b: ff 75 08 pushl 0x8(%ebp)
12ff5e: 53 push %ebx
12ff5f: ff d0 call *%eax
12ff61: 89 c6 mov %eax,%esi
rtems_filesystem_freenode( &loc );
12ff63: 8b 45 e8 mov -0x18(%ebp),%eax
12ff66: 83 c4 10 add $0x10,%esp
12ff69: 85 c0 test %eax,%eax
12ff6b: 74 10 je 12ff7d <symlink+0x69> <== NEVER TAKEN
12ff6d: 8b 40 1c mov 0x1c(%eax),%eax
12ff70: 85 c0 test %eax,%eax
12ff72: 74 09 je 12ff7d <symlink+0x69> <== NEVER TAKEN
12ff74: 83 ec 0c sub $0xc,%esp
12ff77: 53 push %ebx
12ff78: ff d0 call *%eax
12ff7a: 83 c4 10 add $0x10,%esp
return result;
}
12ff7d: 89 f0 mov %esi,%eax
12ff7f: 8d 65 f8 lea -0x8(%ebp),%esp
12ff82: 5b pop %ebx
12ff83: 5e pop %esi
12ff84: c9 leave
12ff85: c3 ret
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
12ff86: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
12ff89: 85 c0 test %eax,%eax <== NOT EXECUTED
12ff8b: 74 0b je 12ff98 <symlink+0x84> <== NOT EXECUTED
12ff8d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12ff90: 53 push %ebx <== NOT EXECUTED
12ff91: ff d0 call *%eax <== NOT EXECUTED
12ff93: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12ff96: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
12ff98: e8 e3 7b 01 00 call 147b80 <__errno> <== NOT EXECUTED
12ff9d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
12ffa3: be ff ff ff ff mov $0xffffffff,%esi
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
rtems_filesystem_freenode( &loc );
return result;
}
12ffa8: 89 f0 mov %esi,%eax
12ffaa: 8d 65 f8 lea -0x8(%ebp),%esp
12ffad: 5b pop %ebx
12ffae: 5e pop %esi
12ffaf: c9 leave
12ffb0: c3 ret
0010a708 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
10a708: 55 push %ebp
10a709: 89 e5 mov %esp,%ebp
10a70b: 53 push %ebx
10a70c: 83 ec 04 sub $0x4,%esp
10a70f: 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;
10a712: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx
if ( this_reent ) {
10a718: 85 d2 test %edx,%edx
10a71a: 74 33 je 10a74f <sync_per_thread+0x47> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
10a71c: 8b 0d 58 b4 12 00 mov 0x12b458,%ecx
10a722: 8b 99 f0 00 00 00 mov 0xf0(%ecx),%ebx
_Thread_Executing->libc_reent = this_reent;
10a728: 89 91 f0 00 00 00 mov %edx,0xf0(%ecx)
_fwalk (t->libc_reent, sync_wrapper);
10a72e: 83 ec 08 sub $0x8,%esp
10a731: 68 7c a7 10 00 push $0x10a77c
10a736: ff b0 f0 00 00 00 pushl 0xf0(%eax)
10a73c: e8 2b cb 00 00 call 11726c <_fwalk>
_Thread_Executing->libc_reent = current_reent;
10a741: a1 58 b4 12 00 mov 0x12b458,%eax
10a746: 89 98 f0 00 00 00 mov %ebx,0xf0(%eax)
10a74c: 83 c4 10 add $0x10,%esp
}
}
10a74f: 8b 5d fc mov -0x4(%ebp),%ebx
10a752: c9 leave
10a753: c3 ret
0010b7b8 <sysconf>:
*/
long sysconf(
int name
)
{
10b7b8: 55 push %ebp
10b7b9: 89 e5 mov %esp,%ebp
10b7bb: 83 ec 08 sub $0x8,%esp
10b7be: 8b 45 08 mov 0x8(%ebp),%eax
if ( name == _SC_CLK_TCK )
10b7c1: 83 f8 02 cmp $0x2,%eax
10b7c4: 74 16 je 10b7dc <sysconf+0x24>
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
10b7c6: 83 f8 04 cmp $0x4,%eax
10b7c9: 74 21 je 10b7ec <sysconf+0x34>
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
10b7cb: 83 f8 33 cmp $0x33,%eax
10b7ce: 74 24 je 10b7f4 <sysconf+0x3c>
return 1024;
if ( name == _SC_PAGESIZE )
10b7d0: 83 f8 08 cmp $0x8,%eax
10b7d3: 75 27 jne 10b7fc <sysconf+0x44>
10b7d5: 66 b8 00 10 mov $0x1000,%ax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b7d9: c9 leave
10b7da: c3 ret
10b7db: 90 nop
long sysconf(
int name
)
{
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
10b7dc: b8 40 42 0f 00 mov $0xf4240,%eax
10b7e1: 31 d2 xor %edx,%edx
10b7e3: f7 35 8c 66 12 00 divl 0x12668c
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b7e9: c9 leave
10b7ea: c3 ret
10b7eb: 90 nop
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
10b7ec: a1 6c 65 12 00 mov 0x12656c,%eax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b7f1: c9 leave
10b7f2: c3 ret
10b7f3: 90 nop
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
10b7f4: 66 b8 00 04 mov $0x400,%ax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b7f8: c9 leave
10b7f9: c3 ret
10b7fa: 66 90 xchg %ax,%ax
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
10b7fc: e8 f7 9f 00 00 call 1157f8 <__errno>
10b801: c7 00 16 00 00 00 movl $0x16,(%eax)
10b807: b8 ff ff ff ff mov $0xffffffff,%eax
}
10b80c: c9 leave
10b80d: c3 ret
00118834 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
118834: 55 push %ebp
118835: 89 e5 mov %esp,%ebp
118837: 56 push %esi
118838: 53 push %ebx
118839: 8b 5d 08 mov 0x8(%ebp),%ebx
11883c: 8b 45 0c mov 0xc(%ebp),%eax
11883f: 8b 75 10 mov 0x10(%ebp),%esi
switch (opt) {
118842: 85 c0 test %eax,%eax
118844: 74 2c je 118872 <tcsetattr+0x3e> <== ALWAYS TAKEN
118846: 48 dec %eax <== NOT EXECUTED
118847: 74 17 je 118860 <tcsetattr+0x2c> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
118849: e8 f2 4f 00 00 call 11d840 <__errno> <== NOT EXECUTED
11884e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
118854: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
118859: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
11885c: 5b pop %ebx <== NOT EXECUTED
11885d: 5e pop %esi <== NOT EXECUTED
11885e: c9 leave <== NOT EXECUTED
11885f: c3 ret <== NOT EXECUTED
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
118860: 50 push %eax <== NOT EXECUTED
118861: 6a 00 push $0x0 <== NOT EXECUTED
118863: 6a 03 push $0x3 <== NOT EXECUTED
118865: 53 push %ebx <== NOT EXECUTED
118866: e8 95 3f 00 00 call 11c800 <ioctl> <== NOT EXECUTED
11886b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11886e: 85 c0 test %eax,%eax <== NOT EXECUTED
118870: 78 e2 js 118854 <tcsetattr+0x20> <== NOT EXECUTED
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
118872: 89 75 10 mov %esi,0x10(%ebp)
118875: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp)
11887c: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
11887f: 8d 65 f8 lea -0x8(%ebp),%esp
118882: 5b pop %ebx
118883: 5e pop %esi
118884: c9 leave
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
118885: e9 76 3f 00 00 jmp 11c800 <ioctl>
0010baf8 <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
10baf8: 55 push %ebp
10baf9: 89 e5 mov %esp,%ebp
10bafb: 56 push %esi
10bafc: 53 push %ebx
10bafd: 8b 5d 0c mov 0xc(%ebp),%ebx
10bb00: 8b 75 10 mov 0x10(%ebp),%esi
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
10bb03: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
10bb07: 0f 85 db 00 00 00 jne 10bbe8 <timer_create+0xf0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
10bb0d: 85 f6 test %esi,%esi
10bb0f: 0f 84 d3 00 00 00 je 10bbe8 <timer_create+0xf0> <== NEVER TAKEN
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
10bb15: 85 db test %ebx,%ebx
10bb17: 74 21 je 10bb3a <timer_create+0x42>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
10bb19: 8b 03 mov (%ebx),%eax
10bb1b: 48 dec %eax
10bb1c: 83 f8 01 cmp $0x1,%eax
10bb1f: 0f 87 c3 00 00 00 ja 10bbe8 <timer_create+0xf0> <== 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 )
10bb25: 8b 43 04 mov 0x4(%ebx),%eax
10bb28: 85 c0 test %eax,%eax
10bb2a: 0f 84 b8 00 00 00 je 10bbe8 <timer_create+0xf0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
10bb30: 48 dec %eax
10bb31: 83 f8 1f cmp $0x1f,%eax
10bb34: 0f 87 ae 00 00 00 ja 10bbe8 <timer_create+0xf0> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10bb3a: a1 38 b5 12 00 mov 0x12b538,%eax
10bb3f: 40 inc %eax
10bb40: a3 38 b5 12 00 mov %eax,0x12b538
* 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 );
10bb45: 83 ec 0c sub $0xc,%esp
10bb48: 68 c0 b8 12 00 push $0x12b8c0
10bb4d: e8 1a 1e 00 00 call 10d96c <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
10bb52: 83 c4 10 add $0x10,%esp
10bb55: 85 c0 test %eax,%eax
10bb57: 0f 84 a2 00 00 00 je 10bbff <timer_create+0x107> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EAGAIN );
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
10bb5d: c6 40 3c 02 movb $0x2,0x3c(%eax)
ptimer->thread_id = _Thread_Executing->Object.id;
10bb61: 8b 15 f8 b5 12 00 mov 0x12b5f8,%edx
10bb67: 8b 52 08 mov 0x8(%edx),%edx
10bb6a: 89 50 38 mov %edx,0x38(%eax)
if ( evp != NULL ) {
10bb6d: 85 db test %ebx,%ebx
10bb6f: 74 11 je 10bb82 <timer_create+0x8a>
ptimer->inf.sigev_notify = evp->sigev_notify;
10bb71: 8b 13 mov (%ebx),%edx
10bb73: 89 50 40 mov %edx,0x40(%eax)
ptimer->inf.sigev_signo = evp->sigev_signo;
10bb76: 8b 53 04 mov 0x4(%ebx),%edx
10bb79: 89 50 44 mov %edx,0x44(%eax)
ptimer->inf.sigev_value = evp->sigev_value;
10bb7c: 8b 53 08 mov 0x8(%ebx),%edx
10bb7f: 89 50 48 mov %edx,0x48(%eax)
}
ptimer->overrun = 0;
10bb82: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
ptimer->timer_data.it_value.tv_sec = 0;
10bb89: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
ptimer->timer_data.it_value.tv_nsec = 0;
10bb90: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
ptimer->timer_data.it_interval.tv_sec = 0;
10bb97: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
ptimer->timer_data.it_interval.tv_nsec = 0;
10bb9e: 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;
10bba5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10bbac: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10bbb3: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10bbba: 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;
10bbc1: 8b 50 08 mov 0x8(%eax),%edx
10bbc4: 0f b7 da movzwl %dx,%ebx
10bbc7: 8b 0d dc b8 12 00 mov 0x12b8dc,%ecx
10bbcd: 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;
10bbd0: 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;
10bbd7: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10bbd9: e8 b2 2a 00 00 call 10e690 <_Thread_Enable_dispatch>
10bbde: 31 c0 xor %eax,%eax
return 0;
}
10bbe0: 8d 65 f8 lea -0x8(%ebp),%esp
10bbe3: 5b pop %ebx
10bbe4: 5e pop %esi
10bbe5: c9 leave
10bbe6: c3 ret
10bbe7: 90 nop
if ( !evp->sigev_signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
10bbe8: e8 63 a1 00 00 call 115d50 <__errno>
10bbed: c7 00 16 00 00 00 movl $0x16,(%eax)
10bbf3: b8 ff ff ff ff mov $0xffffffff,%eax
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10bbf8: 8d 65 f8 lea -0x8(%ebp),%esp
10bbfb: 5b pop %ebx
10bbfc: 5e pop %esi
10bbfd: c9 leave
10bbfe: c3 ret
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
_Thread_Enable_dispatch();
10bbff: e8 8c 2a 00 00 call 10e690 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
10bc04: e8 47 a1 00 00 call 115d50 <__errno>
10bc09: c7 00 0b 00 00 00 movl $0xb,(%eax)
10bc0f: b8 ff ff ff ff mov $0xffffffff,%eax
10bc14: eb ca jmp 10bbe0 <timer_create+0xe8>
0010c038 <timer_delete>:
int timer_delete(
timer_t timerid
)
{
10c038: 55 push %ebp
10c039: 89 e5 mov %esp,%ebp
10c03b: 53 push %ebx
10c03c: 83 ec 18 sub $0x18,%esp
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
10c03f: 8d 45 f4 lea -0xc(%ebp),%eax
10c042: 50 push %eax
10c043: ff 75 08 pushl 0x8(%ebp)
10c046: 68 c0 ba 12 00 push $0x12bac0
10c04b: e8 24 21 00 00 call 10e174 <_Objects_Get>
10c050: 89 c3 mov %eax,%ebx
*/
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
10c052: 83 c4 10 add $0x10,%esp
10c055: 8b 4d f4 mov -0xc(%ebp),%ecx
10c058: 85 c9 test %ecx,%ecx
10c05a: 74 18 je 10c074 <timer_delete+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10c05c: e8 53 a4 00 00 call 1164b4 <__errno>
10c061: c7 00 16 00 00 00 movl $0x16,(%eax)
10c067: b8 ff ff ff ff mov $0xffffffff,%eax
}
10c06c: 8b 5d fc mov -0x4(%ebp),%ebx
10c06f: c9 leave
10c070: c3 ret
10c071: 8d 76 00 lea 0x0(%esi),%esi
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Timer_Information, &ptimer->Object );
10c074: 83 ec 08 sub $0x8,%esp
10c077: 50 push %eax
10c078: 68 c0 ba 12 00 push $0x12bac0
10c07d: e8 be 1c 00 00 call 10dd40 <_Objects_Close>
ptimer->state = POSIX_TIMER_STATE_FREE;
10c082: c6 43 3c 01 movb $0x1,0x3c(%ebx)
(void) _Watchdog_Remove( &ptimer->Timer );
10c086: 8d 43 10 lea 0x10(%ebx),%eax
10c089: 89 04 24 mov %eax,(%esp)
10c08c: e8 ab 3a 00 00 call 10fb3c <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free (
POSIX_Timer_Control *the_timer
)
{
_Objects_Free( &_POSIX_Timer_Information, &the_timer->Object );
10c091: 58 pop %eax
10c092: 5a pop %edx
10c093: 53 push %ebx
10c094: 68 c0 ba 12 00 push $0x12bac0
10c099: e8 a6 1f 00 00 call 10e044 <_Objects_Free>
_POSIX_Timer_Free( ptimer );
_Thread_Enable_dispatch();
10c09e: e8 45 29 00 00 call 10e9e8 <_Thread_Enable_dispatch>
10c0a3: 31 c0 xor %eax,%eax
return 0;
10c0a5: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10c0a8: 8b 5d fc mov -0x4(%ebp),%ebx
10c0ab: c9 leave
10c0ac: c3 ret
0010cf00 <timer_getoverrun>:
* its execution, _POSIX_Timer_TSR will have to set this counter to 0.
*/
int timer_getoverrun(
timer_t timerid
)
{
10cf00: 55 push %ebp
10cf01: 89 e5 mov %esp,%ebp
10cf03: 53 push %ebx
10cf04: 83 ec 18 sub $0x18,%esp
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
10cf07: 8d 45 f4 lea -0xc(%ebp),%eax
10cf0a: 50 push %eax
10cf0b: ff 75 08 pushl 0x8(%ebp)
10cf0e: 68 60 d2 12 00 push $0x12d260
10cf13: e8 ac 20 00 00 call 10efc4 <_Objects_Get>
int overrun;
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
10cf18: 83 c4 10 add $0x10,%esp
10cf1b: 8b 55 f4 mov -0xc(%ebp),%edx
10cf1e: 85 d2 test %edx,%edx
10cf20: 74 1a je 10cf3c <timer_getoverrun+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10cf22: e8 01 a0 00 00 call 116f28 <__errno>
10cf27: c7 00 16 00 00 00 movl $0x16,(%eax)
10cf2d: bb ff ff ff ff mov $0xffffffff,%ebx
}
10cf32: 89 d8 mov %ebx,%eax
10cf34: 8b 5d fc mov -0x4(%ebp),%ebx
10cf37: c9 leave
10cf38: c3 ret
10cf39: 8d 76 00 lea 0x0(%esi),%esi
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
overrun = ptimer->overrun;
10cf3c: 8b 58 68 mov 0x68(%eax),%ebx
ptimer->overrun = 0;
10cf3f: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
_Thread_Enable_dispatch();
10cf46: e8 ed 28 00 00 call 10f838 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10cf4b: 89 d8 mov %ebx,%eax
10cf4d: 8b 5d fc mov -0x4(%ebp),%ebx
10cf50: c9 leave
10cf51: c3 ret
0010cf54 <timer_gettime>:
int timer_gettime(
timer_t timerid,
struct itimerspec *value
)
{
10cf54: 55 push %ebp
10cf55: 89 e5 mov %esp,%ebp
10cf57: 56 push %esi
10cf58: 53 push %ebx
10cf59: 83 ec 10 sub $0x10,%esp
10cf5c: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Timer_Control *ptimer;
Objects_Locations location;
struct timespec current_time;
Watchdog_Interval left;
if ( !value )
10cf5f: 85 db test %ebx,%ebx
10cf61: 74 65 je 10cfc8 <timer_gettime+0x74>
rtems_set_errno_and_return_minus_one( EINVAL );
/* Reads the current time */
_TOD_Get( ¤t_time );
10cf63: 83 ec 0c sub $0xc,%esp
10cf66: 8d 45 ec lea -0x14(%ebp),%eax
10cf69: 50 push %eax
10cf6a: e8 b5 16 00 00 call 10e624 <_TOD_Get>
10cf6f: 83 c4 0c add $0xc,%esp
10cf72: 8d 45 f4 lea -0xc(%ebp),%eax
10cf75: 50 push %eax
10cf76: ff 75 08 pushl 0x8(%ebp)
10cf79: 68 60 d2 12 00 push $0x12d260
10cf7e: e8 41 20 00 00 call 10efc4 <_Objects_Get>
10cf83: 89 c6 mov %eax,%esi
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
10cf85: 83 c4 10 add $0x10,%esp
10cf88: 8b 45 f4 mov -0xc(%ebp),%eax
10cf8b: 85 c0 test %eax,%eax
10cf8d: 75 39 jne 10cfc8 <timer_gettime+0x74>
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
10cf8f: a1 44 d0 12 00 mov 0x12d044,%eax
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
10cf94: 83 ec 08 sub $0x8,%esp
10cf97: 8d 53 08 lea 0x8(%ebx),%edx
10cf9a: 52 push %edx
10cf9b: 8b 56 1c mov 0x1c(%esi),%edx
10cf9e: 03 56 24 add 0x24(%esi),%edx
10cfa1: 29 c2 sub %eax,%edx
10cfa3: 52 push %edx
10cfa4: e8 33 35 00 00 call 1104dc <_Timespec_From_ticks>
value->it_interval = ptimer->timer_data.it_interval;
10cfa9: 8b 46 54 mov 0x54(%esi),%eax
10cfac: 8b 56 58 mov 0x58(%esi),%edx
10cfaf: 89 03 mov %eax,(%ebx)
10cfb1: 89 53 04 mov %edx,0x4(%ebx)
_Thread_Enable_dispatch();
10cfb4: e8 7f 28 00 00 call 10f838 <_Thread_Enable_dispatch>
10cfb9: 31 c0 xor %eax,%eax
return 0;
10cfbb: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10cfbe: 8d 65 f8 lea -0x8(%ebp),%esp
10cfc1: 5b pop %ebx
10cfc2: 5e pop %esi
10cfc3: c9 leave
10cfc4: c3 ret
10cfc5: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10cfc8: e8 5b 9f 00 00 call 116f28 <__errno>
10cfcd: c7 00 16 00 00 00 movl $0x16,(%eax)
10cfd3: b8 ff ff ff ff mov $0xffffffff,%eax
10cfd8: eb e4 jmp 10cfbe <timer_gettime+0x6a>
0010bc18 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
10bc18: 55 push %ebp
10bc19: 89 e5 mov %esp,%ebp
10bc1b: 57 push %edi
10bc1c: 56 push %esi
10bc1d: 53 push %ebx
10bc1e: 83 ec 3c sub $0x3c,%esp
10bc21: 8b 4d 0c mov 0xc(%ebp),%ecx
10bc24: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
10bc27: 85 db test %ebx,%ebx
10bc29: 0f 84 39 01 00 00 je 10bd68 <timer_settime+0x150> <== 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 ) ||
10bc2f: 81 7b 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%ebx)
10bc36: 0f 87 2c 01 00 00 ja 10bd68 <timer_settime+0x150>
( value->it_value.tv_nsec < 0 ) ||
( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) ||
10bc3c: 81 7b 04 ff c9 9a 3b cmpl $0x3b9ac9ff,0x4(%ebx)
10bc43: 0f 87 1f 01 00 00 ja 10bd68 <timer_settime+0x150> <== 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 ) {
10bc49: 83 f9 04 cmp $0x4,%ecx
10bc4c: 0f 84 da 00 00 00 je 10bd2c <timer_settime+0x114>
10bc52: 85 c9 test %ecx,%ecx
10bc54: 0f 85 0e 01 00 00 jne 10bd68 <timer_settime+0x150>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10bc5a: 8d 45 cc lea -0x34(%ebp),%eax
10bc5d: 89 45 c4 mov %eax,-0x3c(%ebp)
10bc60: b9 04 00 00 00 mov $0x4,%ecx
10bc65: 89 c7 mov %eax,%edi
10bc67: 89 de mov %ebx,%esi
10bc69: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
10bc6b: 50 push %eax
10bc6c: 8d 45 e4 lea -0x1c(%ebp),%eax
10bc6f: 50 push %eax
10bc70: ff 75 08 pushl 0x8(%ebp)
10bc73: 68 c0 b8 12 00 push $0x12b8c0
10bc78: e8 9f 21 00 00 call 10de1c <_Objects_Get>
10bc7d: 89 c2 mov %eax,%edx
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
10bc7f: 83 c4 10 add $0x10,%esp
10bc82: 8b 7d e4 mov -0x1c(%ebp),%edi
10bc85: 85 ff test %edi,%edi
10bc87: 0f 85 db 00 00 00 jne 10bd68 <timer_settime+0x150>
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 ) {
10bc8d: 8b 75 d4 mov -0x2c(%ebp),%esi
10bc90: 85 f6 test %esi,%esi
10bc92: 75 0b jne 10bc9f <timer_settime+0x87>
10bc94: 8b 4d d8 mov -0x28(%ebp),%ecx
10bc97: 85 c9 test %ecx,%ecx
10bc99: 0f 84 e1 00 00 00 je 10bd80 <timer_settime+0x168>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
10bc9f: 83 ec 0c sub $0xc,%esp
10bca2: 53 push %ebx
10bca3: 89 55 c0 mov %edx,-0x40(%ebp)
10bca6: e8 e9 36 00 00 call 10f394 <_Timespec_To_ticks>
10bcab: 8b 55 c0 mov -0x40(%ebp),%edx
10bcae: 89 42 64 mov %eax,0x64(%edx)
initial_period = _Timespec_To_ticks( &normalize.it_value );
10bcb1: 8d 45 d4 lea -0x2c(%ebp),%eax
10bcb4: 89 04 24 mov %eax,(%esp)
10bcb7: e8 d8 36 00 00 call 10f394 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
10bcbc: 8b 55 c0 mov -0x40(%ebp),%edx
10bcbf: 89 14 24 mov %edx,(%esp)
10bcc2: 68 ec bd 10 00 push $0x10bdec
10bcc7: ff 72 08 pushl 0x8(%edx)
10bcca: 50 push %eax
10bccb: 8d 42 10 lea 0x10(%edx),%eax
10bcce: 50 push %eax
10bccf: e8 5c 69 00 00 call 112630 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
10bcd4: 83 c4 20 add $0x20,%esp
10bcd7: 84 c0 test %al,%al
10bcd9: 8b 55 c0 mov -0x40(%ebp),%edx
10bcdc: 0f 84 ea 00 00 00 je 10bdcc <timer_settime+0x1b4>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
10bce2: 8b 45 14 mov 0x14(%ebp),%eax
10bce5: 85 c0 test %eax,%eax
10bce7: 0f 84 ef 00 00 00 je 10bddc <timer_settime+0x1c4>
*ovalue = ptimer->timer_data;
10bced: 8d 42 54 lea 0x54(%edx),%eax
10bcf0: b9 04 00 00 00 mov $0x4,%ecx
10bcf5: 8b 7d 14 mov 0x14(%ebp),%edi
10bcf8: 89 c6 mov %eax,%esi
10bcfa: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ptimer->timer_data = normalize;
10bcfc: b9 04 00 00 00 mov $0x4,%ecx
10bd01: 89 c7 mov %eax,%edi
10bd03: 8b 75 c4 mov -0x3c(%ebp),%esi
10bd06: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10bd08: c6 42 3c 03 movb $0x3,0x3c(%edx)
_TOD_Get( &ptimer->time );
10bd0c: 83 ec 0c sub $0xc,%esp
10bd0f: 83 c2 6c add $0x6c,%edx
10bd12: 52 push %edx
10bd13: e8 88 17 00 00 call 10d4a0 <_TOD_Get>
_Thread_Enable_dispatch();
10bd18: e8 73 29 00 00 call 10e690 <_Thread_Enable_dispatch>
10bd1d: 31 c0 xor %eax,%eax
return 0;
10bd1f: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10bd22: 8d 65 f4 lea -0xc(%ebp),%esp
10bd25: 5b pop %ebx
10bd26: 5e pop %esi
10bd27: 5f pop %edi
10bd28: c9 leave
10bd29: c3 ret
10bd2a: 66 90 xchg %ax,%ax
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10bd2c: 8d 45 cc lea -0x34(%ebp),%eax
10bd2f: 89 45 c4 mov %eax,-0x3c(%ebp)
10bd32: 89 c7 mov %eax,%edi
10bd34: 89 de mov %ebx,%esi
10bd36: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
10bd38: 83 ec 0c sub $0xc,%esp
10bd3b: 8d 75 dc lea -0x24(%ebp),%esi
10bd3e: 56 push %esi
10bd3f: e8 5c 17 00 00 call 10d4a0 <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
10bd44: 59 pop %ecx
10bd45: 5f pop %edi
10bd46: 8d 7d d4 lea -0x2c(%ebp),%edi
10bd49: 57 push %edi
10bd4a: 56 push %esi
10bd4b: e8 e4 35 00 00 call 10f334 <_Timespec_Greater_than>
10bd50: 83 c4 10 add $0x10,%esp
10bd53: 84 c0 test %al,%al
10bd55: 75 11 jne 10bd68 <timer_settime+0x150>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
10bd57: 52 push %edx
10bd58: 57 push %edi
10bd59: 57 push %edi
10bd5a: 56 push %esi
10bd5b: e8 f8 35 00 00 call 10f358 <_Timespec_Subtract>
10bd60: 83 c4 10 add $0x10,%esp
10bd63: e9 03 ff ff ff jmp 10bc6b <timer_settime+0x53>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10bd68: e8 e3 9f 00 00 call 115d50 <__errno>
10bd6d: c7 00 16 00 00 00 movl $0x16,(%eax)
10bd73: b8 ff ff ff ff mov $0xffffffff,%eax
}
10bd78: 8d 65 f4 lea -0xc(%ebp),%esp
10bd7b: 5b pop %ebx
10bd7c: 5e pop %esi
10bd7d: 5f pop %edi
10bd7e: c9 leave
10bd7f: c3 ret
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
10bd80: 83 ec 0c sub $0xc,%esp
10bd83: 8d 40 10 lea 0x10(%eax),%eax
10bd86: 50 push %eax
10bd87: 89 55 c0 mov %edx,-0x40(%ebp)
10bd8a: e8 0d 3a 00 00 call 10f79c <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
10bd8f: 83 c4 10 add $0x10,%esp
10bd92: 8b 55 14 mov 0x14(%ebp),%edx
10bd95: 85 d2 test %edx,%edx
10bd97: 8b 55 c0 mov -0x40(%ebp),%edx
10bd9a: 74 48 je 10bde4 <timer_settime+0x1cc>
*ovalue = ptimer->timer_data;
10bd9c: 8d 42 54 lea 0x54(%edx),%eax
10bd9f: b9 04 00 00 00 mov $0x4,%ecx
10bda4: 8b 7d 14 mov 0x14(%ebp),%edi
10bda7: 89 c6 mov %eax,%esi
10bda9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* The new data are set */
ptimer->timer_data = normalize;
10bdab: b9 04 00 00 00 mov $0x4,%ecx
10bdb0: 89 c7 mov %eax,%edi
10bdb2: 8b 75 c4 mov -0x3c(%ebp),%esi
10bdb5: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
10bdb7: c6 42 3c 04 movb $0x4,0x3c(%edx)
/* Returns with success */
_Thread_Enable_dispatch();
10bdbb: e8 d0 28 00 00 call 10e690 <_Thread_Enable_dispatch>
10bdc0: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10bdc2: 8d 65 f4 lea -0xc(%ebp),%esp
10bdc5: 5b pop %ebx
10bdc6: 5e pop %esi
10bdc7: 5f pop %edi
10bdc8: c9 leave
10bdc9: c3 ret
10bdca: 66 90 xchg %ax,%ax
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
_Thread_Enable_dispatch();
10bdcc: e8 bf 28 00 00 call 10e690 <_Thread_Enable_dispatch>
10bdd1: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10bdd3: 8d 65 f4 lea -0xc(%ebp),%esp
10bdd6: 5b pop %ebx
10bdd7: 5e pop %esi
10bdd8: 5f pop %edi
10bdd9: c9 leave
10bdda: c3 ret
10bddb: 90 nop
10bddc: 8d 42 54 lea 0x54(%edx),%eax
10bddf: e9 18 ff ff ff jmp 10bcfc <timer_settime+0xe4>
10bde4: 8d 42 54 lea 0x54(%edx),%eax
10bde7: eb c2 jmp 10bdab <timer_settime+0x193>
0010b9d0 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
10b9d0: 55 push %ebp
10b9d1: 89 e5 mov %esp,%ebp
10b9d3: 57 push %edi
10b9d4: 56 push %esi
10b9d5: 53 push %ebx
10b9d6: 83 ec 2c sub $0x2c,%esp
10b9d9: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
10b9dc: 8b 0d 1c bb 12 00 mov 0x12bb1c,%ecx
10b9e2: 85 c9 test %ecx,%ecx
10b9e4: 0f 84 8e 00 00 00 je 10ba78 <ualarm+0xa8>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
10b9ea: 83 ec 0c sub $0xc,%esp
10b9ed: 68 00 bb 12 00 push $0x12bb00
10b9f2: e8 51 39 00 00 call 10f348 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
10b9f7: 83 e8 02 sub $0x2,%eax
10b9fa: 83 c4 10 add $0x10,%esp
10b9fd: 83 f8 01 cmp $0x1,%eax
10ba00: 0f 86 a2 00 00 00 jbe 10baa8 <ualarm+0xd8> <== ALWAYS TAKEN
10ba06: 31 f6 xor %esi,%esi
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
10ba08: 85 db test %ebx,%ebx
10ba0a: 74 62 je 10ba6e <ualarm+0x9e>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
10ba0c: ba 83 de 1b 43 mov $0x431bde83,%edx
10ba11: 89 d8 mov %ebx,%eax
10ba13: f7 e2 mul %edx
10ba15: c1 ea 12 shr $0x12,%edx
10ba18: 89 55 e0 mov %edx,-0x20(%ebp)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
10ba1b: 8d 04 92 lea (%edx,%edx,4),%eax
10ba1e: 8d 04 80 lea (%eax,%eax,4),%eax
10ba21: 8d 04 80 lea (%eax,%eax,4),%eax
10ba24: 8d 04 80 lea (%eax,%eax,4),%eax
10ba27: 8d 04 80 lea (%eax,%eax,4),%eax
10ba2a: 8d 04 80 lea (%eax,%eax,4),%eax
10ba2d: c1 e0 06 shl $0x6,%eax
10ba30: 29 c3 sub %eax,%ebx
10ba32: 8d 04 9b lea (%ebx,%ebx,4),%eax
10ba35: 8d 04 80 lea (%eax,%eax,4),%eax
10ba38: 8d 04 80 lea (%eax,%eax,4),%eax
10ba3b: c1 e0 03 shl $0x3,%eax
10ba3e: 89 45 e4 mov %eax,-0x1c(%ebp)
ticks = _Timespec_To_ticks( &tp );
10ba41: 83 ec 0c sub $0xc,%esp
10ba44: 8d 5d e0 lea -0x20(%ebp),%ebx
10ba47: 53 push %ebx
10ba48: e8 7b 34 00 00 call 10eec8 <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
10ba4d: 89 1c 24 mov %ebx,(%esp)
10ba50: e8 73 34 00 00 call 10eec8 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10ba55: a3 0c bb 12 00 mov %eax,0x12bb0c
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10ba5a: 58 pop %eax
10ba5b: 5a pop %edx
10ba5c: 68 00 bb 12 00 push $0x12bb00
10ba61: 68 58 b2 12 00 push $0x12b258
10ba66: e8 b5 37 00 00 call 10f220 <_Watchdog_Insert>
10ba6b: 83 c4 10 add $0x10,%esp
}
return remaining;
}
10ba6e: 89 f0 mov %esi,%eax
10ba70: 8d 65 f4 lea -0xc(%ebp),%esp
10ba73: 5b pop %ebx
10ba74: 5e pop %esi
10ba75: 5f pop %edi
10ba76: c9 leave
10ba77: c3 ret
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10ba78: c7 05 08 bb 12 00 00 movl $0x0,0x12bb08
10ba7f: 00 00 00
the_watchdog->routine = routine;
10ba82: c7 05 1c bb 12 00 04 movl $0x10bb04,0x12bb1c
10ba89: bb 10 00
the_watchdog->id = id;
10ba8c: c7 05 20 bb 12 00 00 movl $0x0,0x12bb20
10ba93: 00 00 00
the_watchdog->user_data = user_data;
10ba96: c7 05 24 bb 12 00 00 movl $0x0,0x12bb24
10ba9d: 00 00 00
10baa0: 31 f6 xor %esi,%esi
10baa2: e9 61 ff ff ff jmp 10ba08 <ualarm+0x38>
10baa7: 90 nop
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
10baa8: a1 14 bb 12 00 mov 0x12bb14,%eax
10baad: 03 05 0c bb 12 00 add 0x12bb0c,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
10bab3: 83 ec 08 sub $0x8,%esp
10bab6: 8d 55 e0 lea -0x20(%ebp),%edx
10bab9: 52 push %edx
10baba: 2b 05 18 bb 12 00 sub 0x12bb18,%eax
10bac0: 50 push %eax
10bac1: e8 7e 33 00 00 call 10ee44 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
10bac6: 8b 45 e0 mov -0x20(%ebp),%eax
10bac9: 8d 04 80 lea (%eax,%eax,4),%eax
10bacc: 8d 04 80 lea (%eax,%eax,4),%eax
10bacf: 8d 04 80 lea (%eax,%eax,4),%eax
10bad2: 8d 04 80 lea (%eax,%eax,4),%eax
10bad5: 8d 04 80 lea (%eax,%eax,4),%eax
10bad8: 8d 3c 80 lea (%eax,%eax,4),%edi
10badb: c1 e7 06 shl $0x6,%edi
remaining += tp.tv_nsec / 1000;
10bade: b9 d3 4d 62 10 mov $0x10624dd3,%ecx
10bae3: 8b 45 e4 mov -0x1c(%ebp),%eax
10bae6: f7 e9 imul %ecx
10bae8: 89 45 d0 mov %eax,-0x30(%ebp)
10baeb: 89 55 d4 mov %edx,-0x2c(%ebp)
10baee: 8b 75 d4 mov -0x2c(%ebp),%esi
10baf1: c1 fe 06 sar $0x6,%esi
10baf4: 8b 45 e4 mov -0x1c(%ebp),%eax
10baf7: 99 cltd
10baf8: 29 d6 sub %edx,%esi
10bafa: 01 fe add %edi,%esi
10bafc: 83 c4 10 add $0x10,%esp
10baff: e9 04 ff ff ff jmp 10ba08 <ualarm+0x38>
0011416c <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
11416c: 55 push %ebp
11416d: 89 e5 mov %esp,%ebp
11416f: 57 push %edi
114170: 56 push %esi
114171: 53 push %ebx
114172: 83 ec 58 sub $0x58,%esp
114175: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
114178: 53 push %ebx
114179: e8 da 42 ff ff call 108458 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
11417e: 83 c4 10 add $0x10,%esp
114181: 85 c0 test %eax,%eax
114183: 0f 85 eb 00 00 00 jne 114274 <unlink+0x108>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
114189: 50 push %eax
11418a: 8d 45 d0 lea -0x30(%ebp),%eax
11418d: 89 45 b4 mov %eax,-0x4c(%ebp)
114190: 50 push %eax
114191: 8d 45 e4 lea -0x1c(%ebp),%eax
114194: 50 push %eax
114195: 53 push %ebx
114196: e8 ad 52 ff ff call 109448 <rtems_filesystem_get_start_loc>
11419b: 31 d2 xor %edx,%edx
11419d: c6 45 b3 00 movb $0x0,-0x4d(%ebp)
1141a1: 83 c4 10 add $0x10,%esp
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
1141a4: 8d 7d bc lea -0x44(%ebp),%edi
1141a7: b9 05 00 00 00 mov $0x5,%ecx
1141ac: 8b 75 b4 mov -0x4c(%ebp),%esi
1141af: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = path + parentpathlen;
1141b1: 01 d3 add %edx,%ebx
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
1141b3: be ff ff ff ff mov $0xffffffff,%esi
1141b8: 89 f1 mov %esi,%ecx
1141ba: 89 df mov %ebx,%edi
1141bc: 31 c0 xor %eax,%eax
1141be: f2 ae repnz scas %es:(%edi),%al
1141c0: f7 d1 not %ecx
1141c2: 49 dec %ecx
1141c3: 83 ec 08 sub $0x8,%esp
1141c6: 51 push %ecx
1141c7: 53 push %ebx
1141c8: e8 3b 42 ff ff call 108408 <rtems_filesystem_prefix_separators>
1141cd: 01 c3 add %eax,%ebx
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
1141cf: 89 f1 mov %esi,%ecx
1141d1: 89 df mov %ebx,%edi
1141d3: 31 c0 xor %eax,%eax
1141d5: f2 ae repnz scas %es:(%edi),%al
1141d7: f7 d1 not %ecx
1141d9: 49 dec %ecx
1141da: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1141e1: 8d 75 bc lea -0x44(%ebp),%esi
1141e4: 56 push %esi
1141e5: 6a 00 push $0x0
1141e7: 51 push %ecx
1141e8: 53 push %ebx
1141e9: e8 b2 42 ff ff call 1084a0 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
1141ee: 83 c4 20 add $0x20,%esp
1141f1: 85 c0 test %eax,%eax
1141f3: 0f 85 b3 00 00 00 jne 1142ac <unlink+0x140>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( !loc.ops->node_type_h ) {
1141f9: 8b 55 c8 mov -0x38(%ebp),%edx
1141fc: 8b 42 10 mov 0x10(%edx),%eax
1141ff: 85 c0 test %eax,%eax
114201: 0f 84 c9 00 00 00 je 1142d0 <unlink+0x164> <== NEVER TAKEN
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 ) {
114207: 83 ec 0c sub $0xc,%esp
11420a: 56 push %esi
11420b: ff d0 call *%eax
11420d: 83 c4 10 add $0x10,%esp
114210: 48 dec %eax
114211: 0f 84 fd 00 00 00 je 114314 <unlink+0x1a8>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
114217: 8b 55 c8 mov -0x38(%ebp),%edx
11421a: 8b 42 0c mov 0xc(%edx),%eax
11421d: 85 c0 test %eax,%eax
11421f: 0f 84 ab 00 00 00 je 1142d0 <unlink+0x164> <== NEVER TAKEN
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
114225: 83 ec 08 sub $0x8,%esp
114228: 56 push %esi
114229: ff 75 b4 pushl -0x4c(%ebp)
11422c: ff d0 call *%eax
11422e: 89 c3 mov %eax,%ebx
rtems_filesystem_freenode( &loc );
114230: 8b 45 c8 mov -0x38(%ebp),%eax
114233: 83 c4 10 add $0x10,%esp
114236: 85 c0 test %eax,%eax
114238: 74 10 je 11424a <unlink+0xde> <== NEVER TAKEN
11423a: 8b 40 1c mov 0x1c(%eax),%eax
11423d: 85 c0 test %eax,%eax
11423f: 74 09 je 11424a <unlink+0xde> <== NEVER TAKEN
114241: 83 ec 0c sub $0xc,%esp
114244: 56 push %esi
114245: ff d0 call *%eax
114247: 83 c4 10 add $0x10,%esp
if ( free_parentloc )
11424a: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
11424e: 74 19 je 114269 <unlink+0xfd>
rtems_filesystem_freenode( &parentloc );
114250: 8b 45 dc mov -0x24(%ebp),%eax
114253: 85 c0 test %eax,%eax
114255: 74 12 je 114269 <unlink+0xfd> <== NEVER TAKEN
114257: 8b 40 1c mov 0x1c(%eax),%eax
11425a: 85 c0 test %eax,%eax
11425c: 74 0b je 114269 <unlink+0xfd> <== NEVER TAKEN
11425e: 83 ec 0c sub $0xc,%esp
114261: ff 75 b4 pushl -0x4c(%ebp)
114264: ff d0 call *%eax
114266: 83 c4 10 add $0x10,%esp
return result;
}
114269: 89 d8 mov %ebx,%eax
11426b: 8d 65 f4 lea -0xc(%ebp),%esp
11426e: 5b pop %ebx
11426f: 5e pop %esi
114270: 5f pop %edi
114271: c9 leave
114272: c3 ret
114273: 90 nop
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
114274: 89 c2 mov %eax,%edx
114276: 83 ec 0c sub $0xc,%esp
114279: 6a 00 push $0x0
11427b: 8d 45 d0 lea -0x30(%ebp),%eax
11427e: 89 45 b4 mov %eax,-0x4c(%ebp)
114281: 50 push %eax
114282: 6a 02 push $0x2
114284: 52 push %edx
114285: 53 push %ebx
114286: 89 55 ac mov %edx,-0x54(%ebp)
114289: e8 e6 42 ff ff call 108574 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
11428e: 83 c4 20 add $0x20,%esp
114291: 85 c0 test %eax,%eax
114293: 8b 55 ac mov -0x54(%ebp),%edx
114296: 75 0c jne 1142a4 <unlink+0x138> <== NEVER TAKEN
114298: c6 45 b3 01 movb $0x1,-0x4d(%ebp)
11429c: e9 03 ff ff ff jmp 1141a4 <unlink+0x38>
1142a1: 8d 76 00 lea 0x0(%esi),%esi
result = (*loc.ops->unlink_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
1142a4: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
1142a9: eb be jmp 114269 <unlink+0xfd> <== NOT EXECUTED
1142ab: 90 nop <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
1142ac: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
1142b0: 74 f2 je 1142a4 <unlink+0x138> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
1142b2: 8b 45 dc mov -0x24(%ebp),%eax
1142b5: 85 c0 test %eax,%eax
1142b7: 74 eb je 1142a4 <unlink+0x138> <== NEVER TAKEN
1142b9: 8b 40 1c mov 0x1c(%eax),%eax
1142bc: 85 c0 test %eax,%eax
1142be: 74 e4 je 1142a4 <unlink+0x138> <== NEVER TAKEN
1142c0: 83 ec 0c sub $0xc,%esp
1142c3: ff 75 b4 pushl -0x4c(%ebp)
1142c6: ff d0 call *%eax
1142c8: 83 cb ff or $0xffffffff,%ebx
1142cb: 83 c4 10 add $0x10,%esp
1142ce: eb 99 jmp 114269 <unlink+0xfd>
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
1142d0: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
1142d3: 85 c0 test %eax,%eax <== NOT EXECUTED
1142d5: 74 09 je 1142e0 <unlink+0x174> <== NOT EXECUTED
1142d7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1142da: 56 push %esi <== NOT EXECUTED
1142db: ff d0 call *%eax <== NOT EXECUTED
1142dd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( free_parentloc )
1142e0: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) <== NOT EXECUTED
1142e4: 74 19 je 1142ff <unlink+0x193> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
1142e6: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
1142e9: 85 c0 test %eax,%eax <== NOT EXECUTED
1142eb: 74 12 je 1142ff <unlink+0x193> <== NOT EXECUTED
1142ed: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
1142f0: 85 c0 test %eax,%eax <== NOT EXECUTED
1142f2: 74 0b je 1142ff <unlink+0x193> <== NOT EXECUTED
1142f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1142f7: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
1142fa: ff d0 call *%eax <== NOT EXECUTED
1142fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
1142ff: e8 00 0e 00 00 call 115104 <__errno> <== NOT EXECUTED
114304: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
11430a: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
11430f: e9 55 ff ff ff jmp 114269 <unlink+0xfd> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
114314: 8b 45 c8 mov -0x38(%ebp),%eax
114317: 85 c0 test %eax,%eax
114319: 74 10 je 11432b <unlink+0x1bf> <== NEVER TAKEN
11431b: 8b 40 1c mov 0x1c(%eax),%eax
11431e: 85 c0 test %eax,%eax
114320: 74 09 je 11432b <unlink+0x1bf> <== NEVER TAKEN
114322: 83 ec 0c sub $0xc,%esp
114325: 56 push %esi
114326: ff d0 call *%eax
114328: 83 c4 10 add $0x10,%esp
if ( free_parentloc )
11432b: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
11432f: 74 19 je 11434a <unlink+0x1de> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
114331: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
114334: 85 c0 test %eax,%eax <== NOT EXECUTED
114336: 74 12 je 11434a <unlink+0x1de> <== NOT EXECUTED
114338: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
11433b: 85 c0 test %eax,%eax <== NOT EXECUTED
11433d: 74 0b je 11434a <unlink+0x1de> <== NOT EXECUTED
11433f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
114342: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
114345: ff d0 call *%eax <== NOT EXECUTED
114347: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
11434a: e8 b5 0d 00 00 call 115104 <__errno>
11434f: c7 00 15 00 00 00 movl $0x15,(%eax)
114355: bb ff ff ff ff mov $0xffffffff,%ebx
11435a: e9 0a ff ff ff jmp 114269 <unlink+0xfd>
0013004c <unmount>:
*/
int unmount(
const char *path
)
{
13004c: 55 push %ebp
13004d: 89 e5 mov %esp,%ebp
13004f: 57 push %edi
130050: 56 push %esi
130051: 53 push %ebx
130052: 83 ec 38 sub $0x38,%esp
130055: 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 ) )
130058: 31 c0 xor %eax,%eax
13005a: b9 ff ff ff ff mov $0xffffffff,%ecx
13005f: 89 d7 mov %edx,%edi
130061: f2 ae repnz scas %es:(%edi),%al
130063: f7 d1 not %ecx
130065: 49 dec %ecx
130066: 6a 01 push $0x1
130068: 8d 75 d4 lea -0x2c(%ebp),%esi
13006b: 56 push %esi
13006c: 6a 00 push $0x0
13006e: 51 push %ecx
13006f: 52 push %edx
130070: e8 83 e7 fd ff call 10e7f8 <rtems_filesystem_evaluate_path>
130075: 83 c4 20 add $0x20,%esp
130078: 85 c0 test %eax,%eax
13007a: 0f 85 8f 00 00 00 jne 13010f <unmount+0xc3>
return -1;
mt_entry = loc.mt_entry;
130080: 8b 5d e4 mov -0x1c(%ebp),%ebx
fs_mount_loc = &mt_entry->mt_point_node;
fs_root_loc = &mt_entry->mt_fs_root;
130083: 8b 43 1c mov 0x1c(%ebx),%eax
130086: 3b 45 d4 cmp -0x2c(%ebp),%eax
130089: 0f 85 f9 00 00 00 jne 130188 <unmount+0x13c>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
13008f: 8b 45 e0 mov -0x20(%ebp),%eax
130092: 85 c0 test %eax,%eax
130094: 74 10 je 1300a6 <unmount+0x5a> <== NEVER TAKEN
130096: 8b 40 1c mov 0x1c(%eax),%eax
130099: 85 c0 test %eax,%eax
13009b: 74 09 je 1300a6 <unmount+0x5a> <== NEVER TAKEN
13009d: 83 ec 0c sub $0xc,%esp
1300a0: 56 push %esi
1300a1: ff d0 call *%eax
1300a3: 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;
1300a6: 8b 43 14 mov 0x14(%ebx),%eax
1300a9: 8b 70 28 mov 0x28(%eax),%esi
1300ac: 85 f6 test %esi,%esi
1300ae: 0f 84 3c 01 00 00 je 1301f0 <unmount+0x1a4> <== NEVER TAKEN
fs_root_loc = &mt_entry->mt_fs_root;
1300b4: 8b 43 28 mov 0x28(%ebx),%eax
1300b7: 8b 48 2c mov 0x2c(%eax),%ecx
1300ba: 85 c9 test %ecx,%ecx
1300bc: 0f 84 2e 01 00 00 je 1301f0 <unmount+0x1a4> <== NEVER TAKEN
* 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 )
1300c2: a1 20 f3 16 00 mov 0x16f320,%eax
1300c7: 39 58 14 cmp %ebx,0x14(%eax)
1300ca: 0f 84 e8 00 00 00 je 1301b8 <unmount+0x16c>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
1300d0: 83 ec 08 sub $0x8,%esp
1300d3: ff 73 2c pushl 0x2c(%ebx)
1300d6: 68 38 00 13 00 push $0x130038
1300db: e8 b0 ef fd ff call 10f090 <rtems_filesystem_mount_iterate>
1300e0: 83 c4 10 add $0x10,%esp
1300e3: 84 c0 test %al,%al
1300e5: 0f 85 cd 00 00 00 jne 1301b8 <unmount+0x16c>
* 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 )
1300eb: 83 ec 0c sub $0xc,%esp
1300ee: 53 push %ebx
1300ef: e8 48 ea fd ff call 10eb3c <rtems_libio_is_open_files_in_fs>
1300f4: 83 c4 10 add $0x10,%esp
1300f7: 48 dec %eax
1300f8: 0f 84 ba 00 00 00 je 1301b8 <unmount+0x16c>
* 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 )
1300fe: 83 ec 0c sub $0xc,%esp
130101: 8b 43 14 mov 0x14(%ebx),%eax
130104: 53 push %ebx
130105: ff 50 28 call *0x28(%eax)
130108: 83 c4 10 add $0x10,%esp
13010b: 85 c0 test %eax,%eax
13010d: 74 0d je 13011c <unmount+0xd0> <== ALWAYS TAKEN
*/
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
13010f: b8 ff ff ff ff mov $0xffffffff,%eax
}
130114: 8d 65 f4 lea -0xc(%ebp),%esp
130117: 5b pop %ebx
130118: 5e pop %esi
130119: 5f pop %edi
13011a: c9 leave
13011b: c3 ret
* 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){
13011c: 83 ec 0c sub $0xc,%esp
13011f: 8b 43 28 mov 0x28(%ebx),%eax
130122: 53 push %ebx
130123: ff 50 2c call *0x2c(%eax)
130126: 83 c4 10 add $0x10,%esp
130129: 85 c0 test %eax,%eax
13012b: 0f 85 9f 00 00 00 jne 1301d0 <unmount+0x184> <== NEVER TAKEN
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 );
130131: 52 push %edx
130132: 6a 00 push $0x0
130134: 6a 00 push $0x0
130136: ff 35 e4 4d 17 00 pushl 0x174de4
13013c: e8 b7 2d fe ff call 112ef8 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
130141: 89 1c 24 mov %ebx,(%esp)
130144: e8 37 39 fe ff call 113a80 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
130149: 58 pop %eax
13014a: ff 35 e4 4d 17 00 pushl 0x174de4
130150: e8 9f 2e fe ff call 112ff4 <rtems_semaphore_release>
/*
* 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 );
130155: 8b 43 14 mov 0x14(%ebx),%eax
130158: 83 c4 10 add $0x10,%esp
13015b: 85 c0 test %eax,%eax
13015d: 74 13 je 130172 <unmount+0x126> <== NEVER TAKEN
13015f: 8b 40 1c mov 0x1c(%eax),%eax
130162: 85 c0 test %eax,%eax
130164: 74 0c je 130172 <unmount+0x126> <== NEVER TAKEN
130166: 83 ec 0c sub $0xc,%esp
130169: 8d 53 08 lea 0x8(%ebx),%edx
13016c: 52 push %edx
13016d: ff d0 call *%eax
13016f: 83 c4 10 add $0x10,%esp
free( mt_entry );
130172: 83 ec 0c sub $0xc,%esp
130175: 53 push %ebx
130176: e8 ed e6 fd ff call 10e868 <free>
13017b: 31 c0 xor %eax,%eax
return 0;
13017d: 83 c4 10 add $0x10,%esp
}
130180: 8d 65 f4 lea -0xc(%ebp),%esp
130183: 5b pop %ebx
130184: 5e pop %esi
130185: 5f pop %edi
130186: c9 leave
130187: c3 ret
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
rtems_filesystem_freenode( &loc );
130188: 8b 45 e0 mov -0x20(%ebp),%eax
13018b: 85 c0 test %eax,%eax
13018d: 74 10 je 13019f <unmount+0x153> <== NEVER TAKEN
13018f: 8b 40 1c mov 0x1c(%eax),%eax
130192: 85 c0 test %eax,%eax
130194: 74 09 je 13019f <unmount+0x153> <== NEVER TAKEN
130196: 83 ec 0c sub $0xc,%esp
130199: 56 push %esi
13019a: ff d0 call *%eax
13019c: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EACCES );
13019f: e8 dc 79 01 00 call 147b80 <__errno>
1301a4: c7 00 0d 00 00 00 movl $0xd,(%eax)
1301aa: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
1301af: 8d 65 f4 lea -0xc(%ebp),%esp
1301b2: 5b pop %ebx
1301b3: 5e pop %esi
1301b4: 5f pop %edi
1301b5: c9 leave
1301b6: c3 ret
1301b7: 90 nop
* 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 );
1301b8: e8 c3 79 01 00 call 147b80 <__errno>
1301bd: c7 00 10 00 00 00 movl $0x10,(%eax)
1301c3: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
1301c8: 8d 65 f4 lea -0xc(%ebp),%esp
1301cb: 5b pop %ebx
1301cc: 5e pop %esi
1301cd: 5f pop %edi
1301ce: c9 leave
1301cf: c3 ret
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
1301d0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1301d3: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
1301d6: 53 push %ebx <== NOT EXECUTED
1301d7: ff 50 20 call *0x20(%eax) <== NOT EXECUTED
1301da: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1301dd: 85 c0 test %eax,%eax <== NOT EXECUTED
1301df: 0f 84 2a ff ff ff je 13010f <unmount+0xc3> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
1301e5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1301e8: 6a 00 push $0x0 <== NOT EXECUTED
1301ea: e8 51 34 fe ff call 113640 <rtems_fatal_error_occurred><== NOT EXECUTED
1301ef: 90 nop <== NOT EXECUTED
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 );
1301f0: e8 8b 79 01 00 call 147b80 <__errno> <== NOT EXECUTED
1301f5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
1301fb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
130200: e9 0f ff ff ff jmp 130114 <unmount+0xc8> <== NOT EXECUTED
00130208 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
130208: 55 push %ebp
130209: 89 e5 mov %esp,%ebp
13020b: 57 push %edi
13020c: 56 push %esi
13020d: 53 push %ebx
13020e: 83 ec 38 sub $0x38,%esp
130211: 8b 55 08 mov 0x8(%ebp),%edx
130214: 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 ) )
130217: 31 c0 xor %eax,%eax
130219: b9 ff ff ff ff mov $0xffffffff,%ecx
13021e: 89 d7 mov %edx,%edi
130220: f2 ae repnz scas %es:(%edi),%al
130222: f7 d1 not %ecx
130224: 49 dec %ecx
130225: 6a 01 push $0x1
130227: 8d 75 d4 lea -0x2c(%ebp),%esi
13022a: 56 push %esi
13022b: 6a 00 push $0x0
13022d: 51 push %ecx
13022e: 52 push %edx
13022f: e8 c4 e5 fd ff call 10e7f8 <rtems_filesystem_evaluate_path>
130234: 83 c4 20 add $0x20,%esp
130237: 85 c0 test %eax,%eax
130239: 75 55 jne 130290 <utime+0x88>
return -1;
if ( !temp_loc.ops->utime_h ){
13023b: 8b 55 e0 mov -0x20(%ebp),%edx
13023e: 8b 42 30 mov 0x30(%edx),%eax
130241: 85 c0 test %eax,%eax
130243: 74 2f je 130274 <utime+0x6c> <== NEVER TAKEN
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
130245: 52 push %edx
130246: ff 73 04 pushl 0x4(%ebx)
130249: ff 33 pushl (%ebx)
13024b: 56 push %esi
13024c: ff d0 call *%eax
13024e: 89 c3 mov %eax,%ebx
rtems_filesystem_freenode( &temp_loc );
130250: 8b 45 e0 mov -0x20(%ebp),%eax
130253: 83 c4 10 add $0x10,%esp
130256: 85 c0 test %eax,%eax
130258: 74 10 je 13026a <utime+0x62> <== NEVER TAKEN
13025a: 8b 40 1c mov 0x1c(%eax),%eax
13025d: 85 c0 test %eax,%eax
13025f: 74 09 je 13026a <utime+0x62> <== NEVER TAKEN
130261: 83 ec 0c sub $0xc,%esp
130264: 56 push %esi
130265: ff d0 call *%eax
130267: 83 c4 10 add $0x10,%esp
return result;
}
13026a: 89 d8 mov %ebx,%eax
13026c: 8d 65 f4 lea -0xc(%ebp),%esp
13026f: 5b pop %ebx
130270: 5e pop %esi
130271: 5f pop %edi
130272: c9 leave
130273: c3 ret
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
130274: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
130277: 85 c0 test %eax,%eax <== NOT EXECUTED
130279: 74 09 je 130284 <utime+0x7c> <== NOT EXECUTED
13027b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
13027e: 56 push %esi <== NOT EXECUTED
13027f: ff d0 call *%eax <== NOT EXECUTED
130281: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
130284: e8 f7 78 01 00 call 147b80 <__errno> <== NOT EXECUTED
130289: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
13028f: 90 nop <== NOT EXECUTED
130290: bb ff ff ff ff mov $0xffffffff,%ebx
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
rtems_filesystem_freenode( &temp_loc );
return result;
}
130295: 89 d8 mov %ebx,%eax
130297: 8d 65 f4 lea -0xc(%ebp),%esp
13029a: 5b pop %ebx
13029b: 5e pop %esi
13029c: 5f pop %edi
13029d: c9 leave
13029e: c3 ret
0010b23c <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
10b23c: 55 push %ebp
10b23d: 89 e5 mov %esp,%ebp
10b23f: 57 push %edi
10b240: 56 push %esi
10b241: 53 push %ebx
10b242: 83 ec 4c sub $0x4c,%esp
10b245: 8b 75 08 mov 0x8(%ebp),%esi
10b248: 8b 7d 0c mov 0xc(%ebp),%edi
for (; *fmt != '\0'; fmt++) {
10b24b: 8a 06 mov (%esi),%al
10b24d: 84 c0 test %al,%al
10b24f: 75 28 jne 10b279 <vprintk+0x3d> <== ALWAYS TAKEN
10b251: e9 d1 01 00 00 jmp 10b427 <vprintk+0x1eb> <== NOT EXECUTED
10b256: 66 90 xchg %ax,%ax <== NOT EXECUTED
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
BSP_output_char(*fmt);
10b258: 83 ec 0c sub $0xc,%esp
10b25b: 0f be c0 movsbl %al,%eax
10b25e: 50 push %eax
10b25f: ff 15 84 52 12 00 call *0x125284
10b265: 89 7d bc mov %edi,-0x44(%ebp)
continue;
10b268: 83 c4 10 add $0x10,%esp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
10b26b: 46 inc %esi
10b26c: 8a 06 mov (%esi),%al
10b26e: 84 c0 test %al,%al
10b270: 0f 84 b1 01 00 00 je 10b427 <vprintk+0x1eb>
10b276: 8b 7d bc mov -0x44(%ebp),%edi
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
10b279: 3c 25 cmp $0x25,%al
10b27b: 75 db jne 10b258 <vprintk+0x1c>
BSP_output_char(*fmt);
continue;
}
fmt++;
10b27d: 46 inc %esi
if (*fmt == '0' ) {
10b27e: 8a 0e mov (%esi),%cl
10b280: 80 f9 30 cmp $0x30,%cl
10b283: 0f 84 b7 01 00 00 je 10b440 <vprintk+0x204>
10b289: b2 20 mov $0x20,%dl
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
10b28b: 80 f9 2d cmp $0x2d,%cl
10b28e: 0f 84 ba 01 00 00 je 10b44e <vprintk+0x212>
10b294: c6 45 c4 00 movb $0x0,-0x3c(%ebp)
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
10b298: 8d 41 d0 lea -0x30(%ecx),%eax
10b29b: 3c 09 cmp $0x9,%al
10b29d: 0f 87 bd 01 00 00 ja 10b460 <vprintk+0x224>
10b2a3: 31 db xor %ebx,%ebx
10b2a5: 8d 76 00 lea 0x0(%esi),%esi
width *= 10;
width += ((unsigned) *fmt - '0');
10b2a8: 8d 04 9b lea (%ebx,%ebx,4),%eax
10b2ab: 0f be c9 movsbl %cl,%ecx
10b2ae: 8d 5c 41 d0 lea -0x30(%ecx,%eax,2),%ebx
fmt++;
10b2b2: 46 inc %esi
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
10b2b3: 8a 0e mov (%esi),%cl
10b2b5: 8d 41 d0 lea -0x30(%ecx),%eax
10b2b8: 3c 09 cmp $0x9,%al
10b2ba: 76 ec jbe 10b2a8 <vprintk+0x6c>
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
10b2bc: 80 f9 6c cmp $0x6c,%cl
10b2bf: 0f 84 a7 01 00 00 je 10b46c <vprintk+0x230>
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
10b2c5: 80 f9 63 cmp $0x63,%cl
10b2c8: 0f 84 aa 01 00 00 je 10b478 <vprintk+0x23c>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
continue;
}
if ( c == 's' ) {
10b2ce: 80 f9 73 cmp $0x73,%cl
10b2d1: 0f 84 bd 01 00 00 je 10b494 <vprintk+0x258>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
10b2d7: 80 f9 6f cmp $0x6f,%cl
10b2da: 0f 84 50 01 00 00 je 10b430 <vprintk+0x1f4> <== NEVER TAKEN
10b2e0: 80 f9 4f cmp $0x4f,%cl
10b2e3: 0f 84 47 01 00 00 je 10b430 <vprintk+0x1f4>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
10b2e9: 80 f9 69 cmp $0x69,%cl
10b2ec: 74 56 je 10b344 <vprintk+0x108>
10b2ee: 80 f9 49 cmp $0x49,%cl
10b2f1: 74 51 je 10b344 <vprintk+0x108>
10b2f3: 80 f9 64 cmp $0x64,%cl
10b2f6: 74 4c je 10b344 <vprintk+0x108>
10b2f8: 80 f9 44 cmp $0x44,%cl
10b2fb: 74 47 je 10b344 <vprintk+0x108>
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
10b2fd: 80 f9 75 cmp $0x75,%cl
10b300: 0f 84 62 02 00 00 je 10b568 <vprintk+0x32c>
10b306: 80 f9 55 cmp $0x55,%cl
10b309: 0f 84 59 02 00 00 je 10b568 <vprintk+0x32c>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
10b30f: 80 f9 78 cmp $0x78,%cl
10b312: 0f 84 97 02 00 00 je 10b5af <vprintk+0x373>
10b318: 80 f9 58 cmp $0x58,%cl
10b31b: 0f 84 8e 02 00 00 je 10b5af <vprintk+0x373>
base = 16; sign = false;
} else if ( c == 'p' ) {
10b321: 80 f9 70 cmp $0x70,%cl
10b324: 0f 84 a8 02 00 00 je 10b5d2 <vprintk+0x396>
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
10b32a: 83 ec 0c sub $0xc,%esp
10b32d: 0f be c9 movsbl %cl,%ecx
10b330: 51 push %ecx
10b331: ff 15 84 52 12 00 call *0x125284
10b337: 89 7d bc mov %edi,-0x44(%ebp)
continue;
10b33a: 83 c4 10 add $0x10,%esp
10b33d: e9 29 ff ff ff jmp 10b26b <vprintk+0x2f>
10b342: 66 90 xchg %ax,%ax
10b344: b1 01 mov $0x1,%cl
10b346: c7 45 b8 0a 00 00 00 movl $0xa,-0x48(%ebp)
}
printNum(
10b34d: 0f be d2 movsbl %dl,%edx
10b350: 89 55 b4 mov %edx,-0x4c(%ebp)
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
10b353: 8d 47 04 lea 0x4(%edi),%eax
10b356: 89 45 bc mov %eax,-0x44(%ebp)
} else {
BSP_output_char(c);
continue;
}
printNum(
10b359: 8b 3f mov (%edi),%edi
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
10b35b: 84 c9 test %cl,%cl
10b35d: 74 08 je 10b367 <vprintk+0x12b>
10b35f: 85 ff test %edi,%edi
10b361: 0f 88 0f 02 00 00 js 10b576 <vprintk+0x33a>
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
10b367: 89 7d c0 mov %edi,-0x40(%ebp)
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10b36a: 8b 45 c0 mov -0x40(%ebp),%eax
10b36d: 31 d2 xor %edx,%edx
10b36f: f7 75 b8 divl -0x48(%ebp)
10b372: 89 c1 mov %eax,%ecx
10b374: 85 c0 test %eax,%eax
10b376: 0f 84 25 02 00 00 je 10b5a1 <vprintk+0x365>
10b37c: 8a 45 b8 mov -0x48(%ebp),%al
10b37f: 88 45 c4 mov %al,-0x3c(%ebp)
10b382: 31 ff xor %edi,%edi
10b384: 89 5d b0 mov %ebx,-0x50(%ebp)
10b387: 8b 55 c0 mov -0x40(%ebp),%edx
10b38a: 8b 5d b8 mov -0x48(%ebp),%ebx
10b38d: eb 05 jmp 10b394 <vprintk+0x158>
10b38f: 90 nop
10b390: 89 ca mov %ecx,%edx
10b392: 89 c1 mov %eax,%ecx
toPrint[count++] = (char) (unsigned_num - (n * base));
10b394: 8a 45 c4 mov -0x3c(%ebp),%al
10b397: f6 e1 mul %cl
10b399: 28 c2 sub %al,%dl
10b39b: 88 54 3d d4 mov %dl,-0x2c(%ebp,%edi,1)
10b39f: 47 inc %edi
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10b3a0: 89 c8 mov %ecx,%eax
10b3a2: 31 d2 xor %edx,%edx
10b3a4: f7 f3 div %ebx
10b3a6: 85 c0 test %eax,%eax
10b3a8: 75 e6 jne 10b390 <vprintk+0x154>
10b3aa: 8b 5d b0 mov -0x50(%ebp),%ebx
10b3ad: 8d 47 01 lea 0x1(%edi),%eax
10b3b0: 89 45 c4 mov %eax,-0x3c(%ebp)
10b3b3: 89 4d c0 mov %ecx,-0x40(%ebp)
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
10b3b6: 8a 45 c0 mov -0x40(%ebp),%al
10b3b9: 88 44 3d d4 mov %al,-0x2c(%ebp,%edi,1)
for (n=maxwidth ; n > count; n-- )
10b3bd: 3b 5d c4 cmp -0x3c(%ebp),%ebx
10b3c0: 76 1f jbe 10b3e1 <vprintk+0x1a5>
10b3c2: 8b 7d c4 mov -0x3c(%ebp),%edi
10b3c5: 89 75 c0 mov %esi,-0x40(%ebp)
10b3c8: 8b 75 b4 mov -0x4c(%ebp),%esi
10b3cb: 90 nop
BSP_output_char(lead);
10b3cc: 83 ec 0c sub $0xc,%esp
10b3cf: 56 push %esi
10b3d0: ff 15 84 52 12 00 call *0x125284
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
10b3d6: 4b dec %ebx
10b3d7: 83 c4 10 add $0x10,%esp
10b3da: 39 fb cmp %edi,%ebx
10b3dc: 77 ee ja 10b3cc <vprintk+0x190>
10b3de: 8b 75 c0 mov -0x40(%ebp),%esi
BSP_output_char(lead);
for (n = 0; n < count; n++) {
10b3e1: 8b 45 c4 mov -0x3c(%ebp),%eax
10b3e4: 85 c0 test %eax,%eax
10b3e6: 0f 84 7f fe ff ff je 10b26b <vprintk+0x2f> <== NEVER TAKEN
10b3ec: 8b 45 c4 mov -0x3c(%ebp),%eax
10b3ef: 8d 7c 05 d3 lea -0x2d(%ebp,%eax,1),%edi
10b3f3: 31 db xor %ebx,%ebx
10b3f5: 89 75 c0 mov %esi,-0x40(%ebp)
10b3f8: 89 c6 mov %eax,%esi
10b3fa: 66 90 xchg %ax,%ax
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
10b3fc: 83 ec 0c sub $0xc,%esp
10b3ff: 0f be 07 movsbl (%edi),%eax
10b402: 0f be 80 36 2b 12 00 movsbl 0x122b36(%eax),%eax
10b409: 50 push %eax
10b40a: ff 15 84 52 12 00 call *0x125284
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
10b410: 43 inc %ebx
10b411: 4f dec %edi
10b412: 83 c4 10 add $0x10,%esp
10b415: 39 f3 cmp %esi,%ebx
10b417: 72 e3 jb 10b3fc <vprintk+0x1c0>
10b419: 8b 75 c0 mov -0x40(%ebp),%esi
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
10b41c: 46 inc %esi
10b41d: 8a 06 mov (%esi),%al
10b41f: 84 c0 test %al,%al
10b421: 0f 85 4f fe ff ff jne 10b276 <vprintk+0x3a> <== ALWAYS TAKEN
sign,
width,
lead
);
}
}
10b427: 8d 65 f4 lea -0xc(%ebp),%esp
10b42a: 5b pop %ebx
10b42b: 5e pop %esi
10b42c: 5f pop %edi
10b42d: c9 leave
10b42e: c3 ret
10b42f: 90 nop
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
10b430: 31 c9 xor %ecx,%ecx
10b432: c7 45 b8 08 00 00 00 movl $0x8,-0x48(%ebp)
10b439: e9 0f ff ff ff jmp 10b34d <vprintk+0x111>
10b43e: 66 90 xchg %ax,%ax
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
10b440: 46 inc %esi
10b441: 8a 0e mov (%esi),%cl
10b443: b2 30 mov $0x30,%dl
}
if (*fmt == '-' ) {
10b445: 80 f9 2d cmp $0x2d,%cl
10b448: 0f 85 46 fe ff ff jne 10b294 <vprintk+0x58> <== ALWAYS TAKEN
minus = true;
fmt++;
10b44e: 46 inc %esi
10b44f: 8a 0e mov (%esi),%cl
10b451: c6 45 c4 01 movb $0x1,-0x3c(%ebp)
}
while (*fmt >= '0' && *fmt <= '9' ) {
10b455: 8d 41 d0 lea -0x30(%ecx),%eax
10b458: 3c 09 cmp $0x9,%al
10b45a: 0f 86 43 fe ff ff jbe 10b2a3 <vprintk+0x67> <== ALWAYS TAKEN
10b460: 31 db xor %ebx,%ebx
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
10b462: 80 f9 6c cmp $0x6c,%cl
10b465: 0f 85 5a fe ff ff jne 10b2c5 <vprintk+0x89>
10b46b: 90 nop
lflag = true;
c = *++fmt;
10b46c: 46 inc %esi
10b46d: 8a 0e mov (%esi),%cl
}
if ( c == 'c' ) {
10b46f: 80 f9 63 cmp $0x63,%cl
10b472: 0f 85 56 fe ff ff jne 10b2ce <vprintk+0x92> <== ALWAYS TAKEN
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
10b478: 8d 47 04 lea 0x4(%edi),%eax
10b47b: 89 45 bc mov %eax,-0x44(%ebp)
BSP_output_char(chr);
10b47e: 83 ec 0c sub $0xc,%esp
10b481: 0f be 07 movsbl (%edi),%eax
10b484: 50 push %eax
10b485: ff 15 84 52 12 00 call *0x125284
continue;
10b48b: 83 c4 10 add $0x10,%esp
10b48e: e9 d8 fd ff ff jmp 10b26b <vprintk+0x2f>
10b493: 90 nop
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
10b494: 8d 47 04 lea 0x4(%edi),%eax
10b497: 89 45 bc mov %eax,-0x44(%ebp)
10b49a: 8b 07 mov (%edi),%eax
if ( str == NULL ) {
10b49c: 85 c0 test %eax,%eax
10b49e: 0f 84 19 01 00 00 je 10b5bd <vprintk+0x381>
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
10b4a4: 80 38 00 cmpb $0x0,(%eax)
10b4a7: 0f 84 1e 01 00 00 je 10b5cb <vprintk+0x38f>
10b4ad: 31 ff xor %edi,%edi
10b4af: 90 nop
10b4b0: 47 inc %edi
10b4b1: 80 3c 38 00 cmpb $0x0,(%eax,%edi,1)
10b4b5: 75 f9 jne 10b4b0 <vprintk+0x274>
;
/* leading spaces */
if ( !minus )
10b4b7: 80 7d c4 00 cmpb $0x0,-0x3c(%ebp)
10b4bb: 75 30 jne 10b4ed <vprintk+0x2b1>
for ( i=len ; i<width ; i++ )
10b4bd: 39 fb cmp %edi,%ebx
10b4bf: 76 2c jbe 10b4ed <vprintk+0x2b1>
10b4c1: 89 fa mov %edi,%edx
10b4c3: 89 7d c0 mov %edi,-0x40(%ebp)
10b4c6: 89 c7 mov %eax,%edi
10b4c8: 89 75 b8 mov %esi,-0x48(%ebp)
10b4cb: 89 de mov %ebx,%esi
10b4cd: 89 d3 mov %edx,%ebx
10b4cf: 90 nop
BSP_output_char(' ');
10b4d0: 83 ec 0c sub $0xc,%esp
10b4d3: 6a 20 push $0x20
10b4d5: ff 15 84 52 12 00 call *0x125284
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
10b4db: 43 inc %ebx
10b4dc: 83 c4 10 add $0x10,%esp
10b4df: 39 f3 cmp %esi,%ebx
10b4e1: 72 ed jb 10b4d0 <vprintk+0x294>
10b4e3: 89 f3 mov %esi,%ebx
10b4e5: 89 f8 mov %edi,%eax
10b4e7: 8b 7d c0 mov -0x40(%ebp),%edi
10b4ea: 8b 75 b8 mov -0x48(%ebp),%esi
BSP_output_char(' ');
/* no width option */
if (width == 0) {
10b4ed: 85 db test %ebx,%ebx
10b4ef: 75 06 jne 10b4f7 <vprintk+0x2bb>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10b4f1: 85 ff test %edi,%edi
10b4f3: 74 47 je 10b53c <vprintk+0x300>
10b4f5: 89 fb mov %edi,%ebx
10b4f7: 8a 10 mov (%eax),%dl
10b4f9: 84 d2 test %dl,%dl
10b4fb: 74 3f je 10b53c <vprintk+0x300> <== NEVER TAKEN
BSP_output_char(*str);
10b4fd: 83 ec 0c sub $0xc,%esp
10b500: 0f be d2 movsbl %dl,%edx
10b503: 52 push %edx
10b504: 89 45 ac mov %eax,-0x54(%ebp)
10b507: ff 15 84 52 12 00 call *0x125284
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10b50d: 8b 45 ac mov -0x54(%ebp),%eax
10b510: 40 inc %eax
10b511: 83 c4 10 add $0x10,%esp
10b514: 89 75 c0 mov %esi,-0x40(%ebp)
10b517: 89 de mov %ebx,%esi
10b519: 89 c3 mov %eax,%ebx
10b51b: eb 14 jmp 10b531 <vprintk+0x2f5>
10b51d: 8d 76 00 lea 0x0(%esi),%esi
BSP_output_char(*str);
10b520: 83 ec 0c sub $0xc,%esp
10b523: 0f be d2 movsbl %dl,%edx
10b526: 52 push %edx
10b527: ff 15 84 52 12 00 call *0x125284
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10b52d: 43 inc %ebx
10b52e: 83 c4 10 add $0x10,%esp
10b531: 8a 13 mov (%ebx),%dl
10b533: 84 d2 test %dl,%dl
10b535: 75 e9 jne 10b520 <vprintk+0x2e4>
10b537: 89 f3 mov %esi,%ebx
10b539: 8b 75 c0 mov -0x40(%ebp),%esi
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
10b53c: 80 7d c4 00 cmpb $0x0,-0x3c(%ebp)
10b540: 0f 84 25 fd ff ff je 10b26b <vprintk+0x2f>
for ( i=len ; i<width ; i++ )
10b546: 39 df cmp %ebx,%edi
10b548: 0f 83 1d fd ff ff jae 10b26b <vprintk+0x2f>
10b54e: 66 90 xchg %ax,%ax
BSP_output_char(' ');
10b550: 83 ec 0c sub $0xc,%esp
10b553: 6a 20 push $0x20
10b555: ff 15 84 52 12 00 call *0x125284
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
10b55b: 47 inc %edi
10b55c: 83 c4 10 add $0x10,%esp
10b55f: 39 df cmp %ebx,%edi
10b561: 72 ed jb 10b550 <vprintk+0x314>
10b563: e9 03 fd ff ff jmp 10b26b <vprintk+0x2f>
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
10b568: 31 c9 xor %ecx,%ecx
10b56a: c7 45 b8 0a 00 00 00 movl $0xa,-0x48(%ebp)
10b571: e9 d7 fd ff ff jmp 10b34d <vprintk+0x111>
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
10b576: 83 ec 0c sub $0xc,%esp
10b579: 6a 2d push $0x2d
10b57b: ff 15 84 52 12 00 call *0x125284
unsigned_num = (unsigned long) -num;
10b581: f7 df neg %edi
10b583: 89 7d c0 mov %edi,-0x40(%ebp)
if (maxwidth) maxwidth--;
10b586: 83 c4 10 add $0x10,%esp
10b589: 83 fb 01 cmp $0x1,%ebx
10b58c: 83 d3 ff adc $0xffffffff,%ebx
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10b58f: 8b 45 c0 mov -0x40(%ebp),%eax
10b592: 31 d2 xor %edx,%edx
10b594: f7 75 b8 divl -0x48(%ebp)
10b597: 89 c1 mov %eax,%ecx
10b599: 85 c0 test %eax,%eax
10b59b: 0f 85 db fd ff ff jne 10b37c <vprintk+0x140> <== ALWAYS TAKEN
10b5a1: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
10b5a8: 31 ff xor %edi,%edi
10b5aa: e9 07 fe ff ff jmp 10b3b6 <vprintk+0x17a>
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
10b5af: 31 c9 xor %ecx,%ecx
10b5b1: c7 45 b8 10 00 00 00 movl $0x10,-0x48(%ebp)
10b5b8: e9 90 fd ff ff jmp 10b34d <vprintk+0x111>
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
10b5bd: b8 35 2b 12 00 mov $0x122b35,%eax
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
10b5c2: 80 38 00 cmpb $0x0,(%eax)
10b5c5: 0f 85 e2 fe ff ff jne 10b4ad <vprintk+0x271> <== NEVER TAKEN
10b5cb: 31 ff xor %edi,%edi
10b5cd: e9 e5 fe ff ff jmp 10b4b7 <vprintk+0x27b>
} else {
BSP_output_char(c);
continue;
}
printNum(
10b5d2: 0f be d2 movsbl %dl,%edx
10b5d5: 89 55 b4 mov %edx,-0x4c(%ebp)
10b5d8: 31 c9 xor %ecx,%ecx
10b5da: c7 45 b8 10 00 00 00 movl $0x10,-0x48(%ebp)
10b5e1: e9 6d fd ff ff jmp 10b353 <vprintk+0x117>
00120ae4 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
120ae4: 55 push %ebp
120ae5: 89 e5 mov %esp,%ebp
120ae7: 53 push %ebx
120ae8: 83 ec 04 sub $0x4,%esp
120aeb: 8b 5d 08 mov 0x8(%ebp),%ebx
120aee: 8b 45 0c mov 0xc(%ebp),%eax
120af1: 8b 55 10 mov 0x10(%ebp),%edx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
120af4: 3b 1d 4c 51 12 00 cmp 0x12514c,%ebx
120afa: 73 50 jae 120b4c <write+0x68> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
120afc: c1 e3 06 shl $0x6,%ebx
120aff: 03 1d 80 92 12 00 add 0x129280,%ebx
rtems_libio_check_is_open( iop );
120b05: 8b 4b 14 mov 0x14(%ebx),%ecx
120b08: f6 c5 01 test $0x1,%ch
120b0b: 74 3f je 120b4c <write+0x68> <== NEVER TAKEN
rtems_libio_check_buffer( buffer );
120b0d: 85 c0 test %eax,%eax
120b0f: 74 5f je 120b70 <write+0x8c> <== NEVER TAKEN
rtems_libio_check_count( count );
120b11: 85 d2 test %edx,%edx
120b13: 74 2f je 120b44 <write+0x60>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
120b15: 83 e1 04 and $0x4,%ecx
120b18: 74 32 je 120b4c <write+0x68> <== NEVER TAKEN
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
120b1a: 8b 4b 3c mov 0x3c(%ebx),%ecx
120b1d: 8b 49 0c mov 0xc(%ecx),%ecx
120b20: 85 c9 test %ecx,%ecx
120b22: 74 3a je 120b5e <write+0x7a> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->write_h)( iop, buffer, count );
120b24: 83 ec 04 sub $0x4,%esp
120b27: 52 push %edx
120b28: 50 push %eax
120b29: 53 push %ebx
120b2a: ff d1 call *%ecx
if ( rc > 0 )
120b2c: 83 c4 10 add $0x10,%esp
120b2f: 85 c0 test %eax,%eax
120b31: 7e 0b jle 120b3e <write+0x5a> <== NEVER TAKEN
iop->offset += rc;
120b33: 89 c1 mov %eax,%ecx
120b35: c1 f9 1f sar $0x1f,%ecx
120b38: 01 43 0c add %eax,0xc(%ebx)
120b3b: 11 4b 10 adc %ecx,0x10(%ebx)
return rc;
}
120b3e: 8b 5d fc mov -0x4(%ebp),%ebx
120b41: c9 leave
120b42: c3 ret
120b43: 90 nop
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
120b44: 31 c0 xor %eax,%eax
if ( rc > 0 )
iop->offset += rc;
return rc;
}
120b46: 8b 5d fc mov -0x4(%ebp),%ebx
120b49: c9 leave
120b4a: c3 ret
120b4b: 90 nop
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
120b4c: e8 b3 45 ff ff call 115104 <__errno> <== NOT EXECUTED
120b51: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
120b57: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
120b5c: eb e0 jmp 120b3e <write+0x5a> <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
120b5e: e8 a1 45 ff ff call 115104 <__errno> <== NOT EXECUTED
120b63: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
120b69: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
120b6e: eb ce jmp 120b3e <write+0x5a> <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
120b70: e8 8f 45 ff ff call 115104 <__errno> <== NOT EXECUTED
120b75: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
120b7b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
120b80: eb bc jmp 120b3e <write+0x5a> <== NOT EXECUTED
0010c398 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
10c398: 55 push %ebp
10c399: 89 e5 mov %esp,%ebp
10c39b: 57 push %edi
10c39c: 56 push %esi
10c39d: 53 push %ebx
10c39e: 83 ec 3c sub $0x3c,%esp
10c3a1: 8b 45 08 mov 0x8(%ebp),%eax
10c3a4: 8b 5d 0c mov 0xc(%ebp),%ebx
10c3a7: 8b 7d 10 mov 0x10(%ebp),%edi
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
10c3aa: 3b 05 0c 78 12 00 cmp 0x12780c,%eax
10c3b0: 0f 83 ee 00 00 00 jae 10c4a4 <writev+0x10c> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
10c3b6: c1 e0 06 shl $0x6,%eax
10c3b9: 8b 15 40 c1 12 00 mov 0x12c140,%edx
10c3bf: 01 d0 add %edx,%eax
10c3c1: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_libio_check_is_open( iop );
10c3c4: 8b 40 14 mov 0x14(%eax),%eax
10c3c7: f6 c4 01 test $0x1,%ah
10c3ca: 0f 84 d4 00 00 00 je 10c4a4 <writev+0x10c>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
10c3d0: a8 04 test $0x4,%al
10c3d2: 0f 84 cc 00 00 00 je 10c4a4 <writev+0x10c> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
10c3d8: 85 db test %ebx,%ebx
10c3da: 74 70 je 10c44c <writev+0xb4>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
10c3dc: 85 ff test %edi,%edi
10c3de: 7e 6c jle 10c44c <writev+0xb4>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
10c3e0: 81 ff 00 04 00 00 cmp $0x400,%edi
10c3e6: 7f 64 jg 10c44c <writev+0xb4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
10c3e8: 8b 55 e4 mov -0x1c(%ebp),%edx
10c3eb: 8b 42 3c mov 0x3c(%edx),%eax
10c3ee: 8b 70 0c mov 0xc(%eax),%esi
10c3f1: 85 f6 test %esi,%esi
10c3f3: 0f 84 bd 00 00 00 je 10c4b6 <writev+0x11e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
10c3f9: be 01 00 00 00 mov $0x1,%esi
10c3fe: 31 c0 xor %eax,%eax
10c400: 31 d2 xor %edx,%edx
10c402: eb 02 jmp 10c406 <writev+0x6e>
* 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++ ) {
10c404: 89 ca mov %ecx,%edx
if ( !iov[v].iov_base )
10c406: 8b 0c c3 mov (%ebx,%eax,8),%ecx
10c409: 85 c9 test %ecx,%ecx
10c40b: 74 3f je 10c44c <writev+0xb4>
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 )
10c40d: 8b 4c c3 04 mov 0x4(%ebx,%eax,8),%ecx
10c411: 85 c9 test %ecx,%ecx
10c413: 74 02 je 10c417 <writev+0x7f>
10c415: 31 f6 xor %esi,%esi
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
10c417: 8d 0c 0a lea (%edx,%ecx,1),%ecx
if ( total < old || total > SSIZE_MAX )
10c41a: 39 ca cmp %ecx,%edx
10c41c: 7f 2e jg 10c44c <writev+0xb4>
* 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++ ) {
10c41e: 40 inc %eax
10c41f: 39 c7 cmp %eax,%edi
10c421: 7f e1 jg 10c404 <writev+0x6c>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
10c423: 89 f1 mov %esi,%ecx
10c425: 84 c9 test %cl,%cl
10c427: 75 3d jne 10c466 <writev+0xce>
10c429: 31 f6 xor %esi,%esi
10c42b: 31 d2 xor %edx,%edx
10c42d: 89 55 c0 mov %edx,-0x40(%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 )
10c430: 8b 44 f3 04 mov 0x4(%ebx,%esi,8),%eax
10c434: 85 c0 test %eax,%eax
10c436: 75 32 jne 10c46a <writev+0xd2> <== ALWAYS TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
10c438: 46 inc %esi
10c439: 39 f7 cmp %esi,%edi
10c43b: 7f f3 jg 10c430 <writev+0x98>
10c43d: 8b 55 c0 mov -0x40(%ebp),%edx
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
10c440: 89 d0 mov %edx,%eax
10c442: 8d 65 f4 lea -0xc(%ebp),%esp
10c445: 5b pop %ebx
10c446: 5e pop %esi
10c447: 5f pop %edi
10c448: c9 leave
10c449: c3 ret
10c44a: 66 90 xchg %ax,%ax
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
10c44c: e8 b3 9a 00 00 call 115f04 <__errno>
10c451: c7 00 16 00 00 00 movl $0x16,(%eax)
10c457: ba ff ff ff ff mov $0xffffffff,%edx
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
10c45c: 89 d0 mov %edx,%eax
10c45e: 8d 65 f4 lea -0xc(%ebp),%esp
10c461: 5b pop %ebx
10c462: 5e pop %esi
10c463: 5f pop %edi
10c464: c9 leave
10c465: c3 ret
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
10c466: 31 d2 xor %edx,%edx
10c468: eb f2 jmp 10c45c <writev+0xc4>
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
10c46a: 52 push %edx
10c46b: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c46e: 8b 51 3c mov 0x3c(%ecx),%edx
10c471: 50 push %eax
10c472: ff 34 f3 pushl (%ebx,%esi,8)
10c475: 51 push %ecx
10c476: ff 52 0c call *0xc(%edx)
10c479: 89 45 c4 mov %eax,-0x3c(%ebp)
if ( bytes < 0 )
10c47c: 83 c4 10 add $0x10,%esp
10c47f: 83 f8 00 cmp $0x0,%eax
10c482: 7c 42 jl 10c4c6 <writev+0x12e> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
10c484: 74 13 je 10c499 <writev+0x101> <== NEVER TAKEN
iop->offset += bytes;
10c486: 8b 45 c4 mov -0x3c(%ebp),%eax
10c489: 99 cltd
10c48a: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c48d: 01 41 0c add %eax,0xc(%ecx)
10c490: 11 51 10 adc %edx,0x10(%ecx)
total += bytes;
10c493: 8b 45 c4 mov -0x3c(%ebp),%eax
10c496: 01 45 c0 add %eax,-0x40(%ebp)
}
if (bytes != iov[ v ].iov_len)
10c499: 8b 55 c4 mov -0x3c(%ebp),%edx
10c49c: 3b 54 f3 04 cmp 0x4(%ebx,%esi,8),%edx
10c4a0: 74 96 je 10c438 <writev+0xa0> <== ALWAYS TAKEN
10c4a2: eb 99 jmp 10c43d <writev+0xa5> <== NOT EXECUTED
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
10c4a4: e8 5b 9a 00 00 call 115f04 <__errno>
10c4a9: c7 00 09 00 00 00 movl $0x9,(%eax)
10c4af: ba ff ff ff ff mov $0xffffffff,%edx
10c4b4: eb a6 jmp 10c45c <writev+0xc4>
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
10c4b6: e8 49 9a 00 00 call 115f04 <__errno> <== NOT EXECUTED
10c4bb: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10c4c1: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED
10c4c4: eb 96 jmp 10c45c <writev+0xc4> <== NOT EXECUTED
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
10c4c6: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED
10c4c9: eb 91 jmp 10c45c <writev+0xc4> <== NOT EXECUTED