=============================================================================== 0010e168 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10e168: 55 push %ebp 10e169: 89 e5 mov %esp,%ebp 10e16b: 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; 10e16e: 8b 50 10 mov 0x10(%eax),%edx 10e171: 8b 52 34 mov 0x34(%edx),%edx switch( node->type ) { 10e174: 8b 08 mov (%eax),%ecx 10e176: 8b 49 4c mov 0x4c(%ecx),%ecx 10e179: 49 dec %ecx 10e17a: 83 f9 06 cmp $0x6,%ecx 10e17d: 77 2d ja 10e1ac <== NEVER TAKEN 10e17f: ff 24 8d 4c 05 12 00 jmp *0x12054c(,%ecx,4) case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10e186: 8b 52 0c mov 0xc(%edx),%edx 10e189: eb 15 jmp 10e1a0 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10e18b: c7 40 08 84 06 12 00 movl $0x120684,0x8(%eax) break; 10e192: eb 18 jmp 10e1ac case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 10e194: c7 40 08 f4 06 12 00 movl $0x1206f4,0x8(%eax) break; 10e19b: eb 0f jmp 10e1ac case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; 10e19d: 8b 52 08 mov 0x8(%edx),%edx 10e1a0: 89 50 08 mov %edx,0x8(%eax) break; 10e1a3: eb 07 jmp 10e1ac case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 10e1a5: c7 40 08 c8 05 12 00 movl $0x1205c8,0x8(%eax) break; } return 0; } 10e1ac: 31 c0 xor %eax,%eax 10e1ae: c9 leave 10e1af: c3 ret =============================================================================== 0010dfc4 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 10dfc4: 55 push %ebp 10dfc5: 89 e5 mov %esp,%ebp 10dfc7: 53 push %ebx 10dfc8: 83 ec 1c sub $0x1c,%esp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 10dfcb: 6a 64 push $0x64 10dfcd: 6a 01 push $0x1 10dfcf: e8 e8 94 ff ff call 1074bc 10dfd4: 89 c3 mov %eax,%ebx if ( !node ) 10dfd6: 83 c4 10 add $0x10,%esp 10dfd9: 85 c0 test %eax,%eax 10dfdb: 74 4f je 10e02c <== NEVER TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 10dfdd: 66 c7 40 34 01 00 movw $0x1,0x34(%eax) node->type = type; 10dfe3: 8b 45 08 mov 0x8(%ebp),%eax 10dfe6: 89 43 4c mov %eax,0x4c(%ebx) strncpy( node->name, name, IMFS_NAME_MAX ); 10dfe9: 51 push %ecx 10dfea: 6a 20 push $0x20 10dfec: ff 75 0c pushl 0xc(%ebp) 10dfef: 8d 43 0c lea 0xc(%ebx),%eax 10dff2: 50 push %eax 10dff3: e8 30 57 00 00 call 113728 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 10dff8: 8b 45 10 mov 0x10(%ebp),%eax 10dffb: 89 43 30 mov %eax,0x30(%ebx) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 10dffe: e8 bd 0e 00 00 call 10eec0 10e003: 66 89 43 3c mov %ax,0x3c(%ebx) node->st_gid = getegid(); 10e007: e8 a4 0e 00 00 call 10eeb0 10e00c: 66 89 43 3e mov %ax,0x3e(%ebx) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 10e010: 58 pop %eax 10e011: 5a pop %edx 10e012: 6a 00 push $0x0 10e014: 8d 45 f0 lea -0x10(%ebp),%eax 10e017: 50 push %eax 10e018: e8 f7 96 ff ff call 107714 node->stat_atime = (time_t) tv.tv_sec; 10e01d: 8b 45 f0 mov -0x10(%ebp),%eax 10e020: 89 43 40 mov %eax,0x40(%ebx) node->stat_mtime = (time_t) tv.tv_sec; 10e023: 89 43 44 mov %eax,0x44(%ebx) node->stat_ctime = (time_t) tv.tv_sec; 10e026: 89 43 48 mov %eax,0x48(%ebx) return node; 10e029: 83 c4 10 add $0x10,%esp } 10e02c: 89 d8 mov %ebx,%eax 10e02e: 8b 5d fc mov -0x4(%ebp),%ebx 10e031: c9 leave 10e032: c3 ret =============================================================================== 0010df68 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 10df68: 55 push %ebp 10df69: 89 e5 mov %esp,%ebp 10df6b: 57 push %edi 10df6c: 56 push %esi 10df6d: 53 push %ebx 10df6e: 83 ec 1c sub $0x1c,%esp 10df71: 8b 7d 0c mov 0xc(%ebp),%edi 10df74: 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; 10df77: 8b 45 08 mov 0x8(%ebp),%eax 10df7a: 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(); 10df7c: e8 3f 0f 00 00 call 10eec0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 10df81: 66 85 c0 test %ax,%ax 10df84: 74 16 je 10df9c <== ALWAYS TAKEN 10df86: 66 3b 43 3c cmp 0x3c(%ebx),%ax <== NOT EXECUTED 10df8a: 74 10 je 10df9c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 10df8c: e8 83 4a 00 00 call 112a14 <__errno> <== NOT EXECUTED 10df91: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10df97: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10df9a: eb 20 jmp 10dfbc <== NOT EXECUTED #endif jnode->st_uid = owner; 10df9c: 66 89 7b 3c mov %di,0x3c(%ebx) jnode->st_gid = group; 10dfa0: 66 89 73 3e mov %si,0x3e(%ebx) IMFS_update_ctime( jnode ); 10dfa4: 50 push %eax 10dfa5: 50 push %eax 10dfa6: 6a 00 push $0x0 10dfa8: 8d 45 e0 lea -0x20(%ebp),%eax 10dfab: 50 push %eax 10dfac: e8 63 97 ff ff call 107714 10dfb1: 8b 45 e0 mov -0x20(%ebp),%eax 10dfb4: 89 43 48 mov %eax,0x48(%ebx) 10dfb7: 31 c0 xor %eax,%eax return 0; 10dfb9: 83 c4 10 add $0x10,%esp } 10dfbc: 8d 65 f4 lea -0xc(%ebp),%esp 10dfbf: 5b pop %ebx 10dfc0: 5e pop %esi 10dfc1: 5f pop %edi 10dfc2: c9 leave 10dfc3: c3 ret =============================================================================== 0010e066 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10e066: 55 push %ebp 10e067: 89 e5 mov %esp,%ebp 10e069: 57 push %edi 10e06a: 56 push %esi 10e06b: 53 push %ebx 10e06c: 83 ec 1c sub $0x1c,%esp 10e06f: 8b 75 08 mov 0x8(%ebp),%esi 10e072: 8b 7d 0c mov 0xc(%ebp),%edi 10e075: 8b 5d 18 mov 0x18(%ebp),%ebx IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 10e078: 31 c0 xor %eax,%eax 10e07a: 85 f6 test %esi,%esi 10e07c: 0f 84 dc 00 00 00 je 10e15e <== NEVER TAKEN return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10e082: 50 push %eax 10e083: a1 54 3f 12 00 mov 0x123f54,%eax 10e088: 8b 40 2c mov 0x2c(%eax),%eax 10e08b: f7 d0 not %eax 10e08d: 23 45 14 and 0x14(%ebp),%eax 10e090: 50 push %eax 10e091: ff 75 10 pushl 0x10(%ebp) 10e094: 57 push %edi 10e095: e8 2a ff ff ff call 10dfc4 if ( !node ) 10e09a: 83 c4 10 add $0x10,%esp 10e09d: 85 c0 test %eax,%eax 10e09f: 0f 84 b9 00 00 00 je 10e15e <== NEVER TAKEN return NULL; /* * Set the type specific information */ switch (type) { 10e0a5: 4f dec %edi 10e0a6: 83 ff 06 cmp $0x6,%edi 10e0a9: 77 73 ja 10e11e <== NEVER TAKEN 10e0ab: ff 24 bd 1c 05 12 00 jmp *0x12051c(,%edi,4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e0b2: 8d 50 54 lea 0x54(%eax),%edx 10e0b5: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10e0b8: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10e0bf: 8d 50 50 lea 0x50(%eax),%edx 10e0c2: 89 50 58 mov %edx,0x58(%eax) 10e0c5: eb 6d jmp 10e134 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; 10e0c7: 8b 13 mov (%ebx),%edx 10e0c9: 89 50 50 mov %edx,0x50(%eax) break; 10e0cc: eb 66 jmp 10e134 case IMFS_DEVICE: node->info.device.major = info->device.major; 10e0ce: 8b 13 mov (%ebx),%edx 10e0d0: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 10e0d3: 8b 53 04 mov 0x4(%ebx),%edx 10e0d6: 89 50 54 mov %edx,0x54(%eax) break; 10e0d9: eb 59 jmp 10e134 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 10e0db: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED 10e0e2: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED node->info.linearfile.direct = 0; 10e0e9: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 10e0f0: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10e0f7: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10e0fe: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10e105: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10e10c: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 10e113: eb 1f jmp 10e134 case IMFS_FIFO: node->info.fifo.pipe = NULL; 10e115: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) break; 10e11c: eb 16 jmp 10e134 default: assert(0); 10e11e: 68 d7 f8 11 00 push $0x11f8d7 <== NOT EXECUTED 10e123: 68 38 05 12 00 push $0x120538 <== NOT EXECUTED 10e128: 6a 5c push $0x5c <== NOT EXECUTED 10e12a: 68 cc 04 12 00 push $0x1204cc <== NOT EXECUTED 10e12f: e8 6c 92 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 10e134: 8b 16 mov (%esi),%edx fs_info = parent_loc->mt_entry->fs_info; 10e136: 8b 4e 10 mov 0x10(%esi),%ecx 10e139: 8b 59 34 mov 0x34(%ecx),%ebx node->Parent = parent; 10e13c: 89 50 08 mov %edx,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10e13f: 8b 4b 04 mov 0x4(%ebx),%ecx 10e142: 41 inc %ecx 10e143: 89 4b 04 mov %ecx,0x4(%ebx) 10e146: 89 48 38 mov %ecx,0x38(%eax) 10e149: 53 push %ebx 10e14a: 53 push %ebx 10e14b: 50 push %eax 10e14c: 83 c2 50 add $0x50,%edx 10e14f: 52 push %edx 10e150: 89 45 e4 mov %eax,-0x1c(%ebp) 10e153: e8 dc cc ff ff call 10ae34 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 10e158: 83 c4 10 add $0x10,%esp 10e15b: 8b 45 e4 mov -0x1c(%ebp),%eax } 10e15e: 8d 65 f4 lea -0xc(%ebp),%esp 10e161: 5b pop %ebx 10e162: 5e pop %esi 10e163: 5f pop %edi 10e164: c9 leave 10e165: c3 ret =============================================================================== 0010e033 : IMFS_jnode_t *IMFS_create_root_node(void) { 10e033: 55 push %ebp 10e034: 89 e5 mov %esp,%ebp 10e036: 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) ); 10e039: 68 ed 41 00 00 push $0x41ed 10e03e: 68 85 01 12 00 push $0x120185 10e043: 6a 01 push $0x1 10e045: e8 7a ff ff ff call 10dfc4 if ( !node ) 10e04a: 83 c4 10 add $0x10,%esp 10e04d: 85 c0 test %eax,%eax 10e04f: 74 13 je 10e064 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e051: 8d 50 54 lea 0x54(%eax),%edx 10e054: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10e057: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10e05e: 8d 50 50 lea 0x50(%eax),%edx 10e061: 89 50 58 mov %edx,0x58(%eax) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 10e064: c9 leave 10e065: c3 ret =============================================================================== 00108e4b : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 108e4b: 55 push %ebp 108e4c: 89 e5 mov %esp,%ebp 108e4e: 57 push %edi 108e4f: 56 push %esi 108e50: 53 push %ebx 108e51: 83 ec 1c sub $0x1c,%esp 108e54: 8b 45 08 mov 0x8(%ebp),%eax 108e57: 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 ); 108e5a: 85 c0 test %eax,%eax 108e5c: 75 11 jne 108e6f <== ALWAYS TAKEN 108e5e: 68 39 52 12 00 push $0x125239 <== NOT EXECUTED 108e63: 68 24 53 12 00 push $0x125324 <== NOT EXECUTED 108e68: 68 84 00 00 00 push $0x84 <== NOT EXECUTED 108e6d: eb 13 jmp 108e82 <== NOT EXECUTED assert( level >= 0 ); 108e6f: 85 f6 test %esi,%esi 108e71: 79 19 jns 108e8c <== ALWAYS TAKEN 108e73: 68 47 52 12 00 push $0x125247 <== NOT EXECUTED 108e78: 68 24 53 12 00 push $0x125324 <== NOT EXECUTED 108e7d: 68 86 00 00 00 push $0x86 <== NOT EXECUTED 108e82: 68 86 51 12 00 push $0x125186 <== NOT EXECUTED 108e87: e8 2c 07 00 00 call 1095b8 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 108e8c: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 108e90: 74 11 je 108ea3 <== ALWAYS TAKEN 108e92: 68 52 52 12 00 push $0x125252 <== NOT EXECUTED 108e97: 68 24 53 12 00 push $0x125324 <== NOT EXECUTED 108e9c: 68 88 00 00 00 push $0x88 <== NOT EXECUTED 108ea1: eb df jmp 108e82 <== NOT EXECUTED the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108ea3: 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; 108ea6: 83 c0 54 add $0x54,%eax 108ea9: 89 45 e4 mov %eax,-0x1c(%ebp) for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 108eac: 8d 46 01 lea 0x1(%esi),%eax 108eaf: 89 45 e0 mov %eax,-0x20(%ebp) assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108eb2: eb 40 jmp 108ef4 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 108eb4: 31 ff xor %edi,%edi for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 108eb6: 51 push %ecx 108eb7: 51 push %ecx 108eb8: a1 e0 a4 12 00 mov 0x12a4e0,%eax 108ebd: ff 70 08 pushl 0x8(%eax) 108ec0: 68 78 52 12 00 push $0x125278 108ec5: e8 ae d4 00 00 call 116378 !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++ ) 108eca: 47 inc %edi 108ecb: 83 c4 10 add $0x10,%esp 108ece: 39 f7 cmp %esi,%edi 108ed0: 7e e4 jle 108eb6 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 108ed2: 83 ec 0c sub $0xc,%esp 108ed5: 53 push %ebx 108ed6: e8 53 fe ff ff call 108d2e if ( the_jnode->type == IMFS_DIRECTORY ) 108edb: 83 c4 10 add $0x10,%esp 108ede: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 108ee2: 75 0e jne 108ef2 IMFS_dump_directory( the_jnode, level + 1 ); 108ee4: 52 push %edx 108ee5: 52 push %edx 108ee6: ff 75 e0 pushl -0x20(%ebp) 108ee9: 53 push %ebx 108eea: e8 5c ff ff ff call 108e4b 108eef: 83 c4 10 add $0x10,%esp the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 108ef2: 8b 1b mov (%ebx),%ebx assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108ef4: 3b 5d e4 cmp -0x1c(%ebp),%ebx 108ef7: 75 bb jne 108eb4 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 108ef9: 8d 65 f4 lea -0xc(%ebp),%esp 108efc: 5b pop %ebx 108efd: 5e pop %esi 108efe: 5f pop %edi 108eff: c9 leave 108f00: c3 ret =============================================================================== 0010e2ff : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10e2ff: 55 push %ebp 10e300: 89 e5 mov %esp,%ebp 10e302: 57 push %edi 10e303: 56 push %esi 10e304: 53 push %ebx 10e305: 83 ec 4c sub $0x4c,%esp 10e308: 8b 5d 14 mov 0x14(%ebp),%ebx 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 ) ) { 10e30b: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10e312: 74 19 je 10e32d <== ALWAYS TAKEN assert( 0 ); 10e314: 68 d7 f8 11 00 push $0x11f8d7 <== NOT EXECUTED 10e319: 68 68 05 12 00 push $0x120568 <== NOT EXECUTED 10e31e: 68 08 02 00 00 push $0x208 <== NOT EXECUTED 10e323: 68 77 05 12 00 push $0x120577 <== NOT EXECUTED 10e328: e8 73 90 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10e32d: 8b 3b mov (%ebx),%edi 10e32f: c7 45 b4 00 00 00 00 movl $0x0,-0x4c(%ebp) 10e336: be 01 00 00 00 mov $0x1,%esi /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10e33b: e9 98 01 00 00 jmp 10e4d8 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10e340: 8d 45 e4 lea -0x1c(%ebp),%eax 10e343: 50 push %eax 10e344: 8d 4d c3 lea -0x3d(%ebp),%ecx 10e347: 51 push %ecx 10e348: ff 75 0c pushl 0xc(%ebp) 10e34b: 8b 45 08 mov 0x8(%ebp),%eax 10e34e: 03 45 b4 add -0x4c(%ebp),%eax 10e351: 50 push %eax 10e352: e8 15 08 00 00 call 10eb6c 10e357: 89 c6 mov %eax,%esi pathnamelen -= len; 10e359: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 10e35c: 83 c4 10 add $0x10,%esp 10e35f: 83 3b 00 cmpl $0x0,(%ebx) 10e362: 0f 84 d2 00 00 00 je 10e43a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10e368: 85 c0 test %eax,%eax 10e36a: 74 21 je 10e38d if ( node->type == IMFS_DIRECTORY ) 10e36c: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10e370: 75 1b jne 10e38d if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10e372: 57 push %edi 10e373: 57 push %edi 10e374: 6a 01 push $0x1 10e376: 53 push %ebx 10e377: 89 55 b0 mov %edx,-0x50(%ebp) 10e37a: e8 31 fe ff ff call 10e1b0 10e37f: 83 c4 10 add $0x10,%esp 10e382: 85 c0 test %eax,%eax 10e384: 8b 55 b0 mov -0x50(%ebp),%edx 10e387: 0f 84 b2 01 00 00 je 10e53f */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10e38d: 29 55 0c sub %edx,0xc(%ebp) i += len; 10e390: 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; 10e393: 8b 3b mov (%ebx),%edi switch( type ) { 10e395: 83 fe 03 cmp $0x3,%esi 10e398: 74 39 je 10e3d3 10e39a: 83 fe 04 cmp $0x4,%esi 10e39d: 0f 84 28 01 00 00 je 10e4cb 10e3a3: 83 fe 02 cmp $0x2,%esi 10e3a6: 0f 85 2c 01 00 00 jne 10e4d8 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10e3ac: a1 54 3f 12 00 mov 0x123f54,%eax 10e3b1: 3b 78 18 cmp 0x18(%eax),%edi 10e3b4: 74 8a je 10e340 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10e3b6: 8b 73 10 mov 0x10(%ebx),%esi /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10e3b9: 3b 7e 1c cmp 0x1c(%esi),%edi 10e3bc: 75 08 jne 10e3c6 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 10e3be: 83 c6 08 add $0x8,%esi 10e3c1: e9 2f 01 00 00 jmp 10e4f5 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10e3c6: 8b 7f 08 mov 0x8(%edi),%edi 10e3c9: 85 ff test %edi,%edi 10e3cb: 0f 85 f3 00 00 00 jne 10e4c4 10e3d1: eb 67 jmp 10e43a case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10e3d3: 8b 47 4c mov 0x4c(%edi),%eax 10e3d6: 83 f8 03 cmp $0x3,%eax 10e3d9: 75 15 jne 10e3f0 IMFS_evaluate_hard_link( pathloc, 0 ); 10e3db: 51 push %ecx 10e3dc: 51 push %ecx 10e3dd: 6a 00 push $0x0 10e3df: 53 push %ebx 10e3e0: e8 31 fe ff ff call 10e216 node = pathloc->node_access; 10e3e5: 8b 3b mov (%ebx),%edi if ( !node ) 10e3e7: 83 c4 10 add $0x10,%esp 10e3ea: 85 ff test %edi,%edi 10e3ec: 75 21 jne 10e40f <== ALWAYS TAKEN 10e3ee: eb 25 jmp 10e415 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 10e3f0: 83 f8 04 cmp $0x4,%eax 10e3f3: 75 1a jne 10e40f result = IMFS_evaluate_sym_link( pathloc, 0 ); 10e3f5: 52 push %edx 10e3f6: 52 push %edx 10e3f7: 6a 00 push $0x0 10e3f9: 53 push %ebx 10e3fa: e8 6d fe ff ff call 10e26c 10e3ff: 89 c6 mov %eax,%esi node = pathloc->node_access; 10e401: 8b 3b mov (%ebx),%edi if ( result == -1 ) 10e403: 83 c4 10 add $0x10,%esp 10e406: 83 f8 ff cmp $0xffffffff,%eax 10e409: 0f 84 3e 01 00 00 je 10e54d <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10e40f: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10e413: 74 10 je 10e425 rtems_set_errno_and_return_minus_one( ENOTDIR ); 10e415: e8 fa 45 00 00 call 112a14 <__errno> 10e41a: c7 00 14 00 00 00 movl $0x14,(%eax) 10e420: e9 25 01 00 00 jmp 10e54a /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 10e425: 50 push %eax 10e426: 50 push %eax 10e427: 8d 45 c3 lea -0x3d(%ebp),%eax 10e42a: 50 push %eax 10e42b: 57 push %edi 10e42c: e8 af 06 00 00 call 10eae0 10e431: 89 c7 mov %eax,%edi if ( !node ) 10e433: 83 c4 10 add $0x10,%esp 10e436: 85 c0 test %eax,%eax 10e438: 75 10 jne 10e44a rtems_set_errno_and_return_minus_one( ENOENT ); 10e43a: e8 d5 45 00 00 call 112a14 <__errno> 10e43f: c7 00 02 00 00 00 movl $0x2,(%eax) 10e445: e9 00 01 00 00 jmp 10e54a * 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 )) { 10e44a: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10e44e: 75 74 jne 10e4c4 10e450: 83 78 5c 00 cmpl $0x0,0x5c(%eax) 10e454: 74 6e je 10e4c4 10e456: 8b 75 08 mov 0x8(%ebp),%esi 10e459: 03 75 b4 add -0x4c(%ebp),%esi 10e45c: eb 06 jmp 10e464 size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ++(*index); 10e45e: ff 45 b4 incl -0x4c(%ebp) --(*len); 10e461: ff 4d 0c decl 0xc(%ebp) const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 10e464: 83 ec 0c sub $0xc,%esp 10e467: 0f be 06 movsbl (%esi),%eax 10e46a: 50 push %eax 10e46b: 89 75 b0 mov %esi,-0x50(%ebp) 10e46e: e8 95 9f ff ff call 108408 10e473: 83 c4 10 add $0x10,%esp 10e476: 85 c0 test %eax,%eax 10e478: 8b 55 b0 mov -0x50(%ebp),%edx 10e47b: 74 0c je 10e489 10e47d: 80 3e 00 cmpb $0x0,(%esi) 10e480: 74 07 je 10e489 10e482: 46 inc %esi 10e483: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10e487: 75 d5 jne 10e45e <== ALWAYS TAKEN * 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] != '.')) { 10e489: 80 3a 2e cmpb $0x2e,(%edx) 10e48c: 75 0d jne 10e49b 10e48e: 8b 45 08 mov 0x8(%ebp),%eax 10e491: 8b 4d b4 mov -0x4c(%ebp),%ecx 10e494: 80 7c 08 01 2e cmpb $0x2e,0x1(%eax,%ecx,1) 10e499: 74 1e je 10e4b9 *pathloc = node->info.directory.mt_fs->mt_fs_root; 10e49b: 8b 77 5c mov 0x5c(%edi),%esi 10e49e: 83 c6 1c add $0x1c,%esi 10e4a1: b9 05 00 00 00 mov $0x5,%ecx 10e4a6: 89 df mov %ebx,%edi 10e4a8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i], 10e4aa: 8b 43 0c mov 0xc(%ebx),%eax 10e4ad: 53 push %ebx 10e4ae: ff 75 10 pushl 0x10(%ebp) 10e4b1: ff 75 0c pushl 0xc(%ebp) 10e4b4: 52 push %edx 10e4b5: ff 10 call *(%eax) 10e4b7: eb 62 jmp 10e51b pathnamelen, flags, pathloc ); } i += 2; 10e4b9: 83 45 b4 02 addl $0x2,-0x4c(%ebp) pathnamelen -= 2; 10e4bd: 83 6d 0c 02 subl $0x2,0xc(%ebp) node = node->Parent; 10e4c1: 8b 7f 08 mov 0x8(%edi),%edi /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10e4c4: 89 3b mov %edi,(%ebx) 10e4c6: e9 75 fe ff ff jmp 10e340 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10e4cb: e8 44 45 00 00 call 112a14 <__errno> 10e4d0: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10e4d6: eb 72 jmp 10e54a /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10e4d8: 83 fe 04 cmp $0x4,%esi 10e4db: 74 08 je 10e4e5 <== NEVER TAKEN 10e4dd: 85 f6 test %esi,%esi 10e4df: 0f 85 5b fe ff ff jne 10e340 * 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 ) { 10e4e5: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10e4e9: 75 37 jne 10e522 if ( node->info.directory.mt_fs != NULL ) { 10e4eb: 8b 77 5c mov 0x5c(%edi),%esi 10e4ee: 85 f6 test %esi,%esi 10e4f0: 74 30 je 10e522 <== ALWAYS TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; 10e4f2: 83 c6 1c add $0x1c,%esi <== NOT EXECUTED 10e4f5: b9 05 00 00 00 mov $0x5,%ecx 10e4fa: 89 df mov %ebx,%edi 10e4fc: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10e4fe: 8b 45 e4 mov -0x1c(%ebp),%eax 10e501: 8b 53 0c mov 0xc(%ebx),%edx 10e504: 53 push %ebx 10e505: ff 75 10 pushl 0x10(%ebp) 10e508: 8b 4d 0c mov 0xc(%ebp),%ecx 10e50b: 01 c1 add %eax,%ecx 10e50d: 51 push %ecx 10e50e: 8b 4d b4 mov -0x4c(%ebp),%ecx 10e511: 29 c1 sub %eax,%ecx 10e513: 8b 45 08 mov 0x8(%ebp),%eax 10e516: 01 c8 add %ecx,%eax 10e518: 50 push %eax 10e519: ff 12 call *(%edx) 10e51b: 89 c6 mov %eax,%esi 10e51d: 83 c4 10 add $0x10,%esp 10e520: eb 2b jmp 10e54d flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10e522: 83 ec 0c sub $0xc,%esp 10e525: 53 push %ebx 10e526: e8 3d fc ff ff call 10e168 10e52b: 89 c6 mov %eax,%esi 10e52d: 59 pop %ecx 10e52e: 5f pop %edi /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 10e52f: ff 75 10 pushl 0x10(%ebp) 10e532: 53 push %ebx 10e533: e8 78 fc ff ff call 10e1b0 10e538: 83 c4 10 add $0x10,%esp 10e53b: 85 c0 test %eax,%eax 10e53d: 75 0e jne 10e54d rtems_set_errno_and_return_minus_one( EACCES ); 10e53f: e8 d0 44 00 00 call 112a14 <__errno> 10e544: c7 00 0d 00 00 00 movl $0xd,(%eax) 10e54a: 83 ce ff or $0xffffffff,%esi return result; } 10e54d: 89 f0 mov %esi,%eax 10e54f: 8d 65 f4 lea -0xc(%ebp),%esp 10e552: 5b pop %ebx 10e553: 5e pop %esi 10e554: 5f pop %edi 10e555: c9 leave 10e556: c3 ret =============================================================================== 0010e5da : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 10e5da: 55 push %ebp 10e5db: 89 e5 mov %esp,%ebp 10e5dd: 57 push %edi 10e5de: 56 push %esi 10e5df: 53 push %ebx 10e5e0: 83 ec 4c sub $0x4c,%esp 10e5e3: 8b 55 0c mov 0xc(%ebp),%edx /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10e5e6: 8b 1a mov (%edx),%ebx /* * Get the path length. */ pathlen = strlen( path ); 10e5e8: 31 c0 xor %eax,%eax 10e5ea: 83 c9 ff or $0xffffffff,%ecx 10e5ed: 8b 7d 08 mov 0x8(%ebp),%edi 10e5f0: f2 ae repnz scas %es:(%edi),%al 10e5f2: f7 d1 not %ecx 10e5f4: 8d 79 ff lea -0x1(%ecx),%edi 10e5f7: 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 ); 10e5fe: 89 d6 mov %edx,%esi 10e600: 8d 45 e4 lea -0x1c(%ebp),%eax 10e603: 50 push %eax 10e604: 8d 55 c3 lea -0x3d(%ebp),%edx 10e607: 52 push %edx 10e608: 57 push %edi 10e609: 8b 45 08 mov 0x8(%ebp),%eax 10e60c: 03 45 b4 add -0x4c(%ebp),%eax 10e60f: 50 push %eax 10e610: e8 57 05 00 00 call 10eb6c 10e615: 89 c2 mov %eax,%edx pathlen -= len; 10e617: 8b 4d e4 mov -0x1c(%ebp),%ecx i += len; if ( !pathloc->node_access ) 10e61a: 83 c4 10 add $0x10,%esp 10e61d: 83 3e 00 cmpl $0x0,(%esi) 10e620: 0f 84 e5 01 00 00 je 10e80b <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10e626: 85 c0 test %eax,%eax 10e628: 74 36 je 10e660 if ( node->type == IMFS_DIRECTORY ) 10e62a: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10e62e: 75 30 jne 10e660 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10e630: 50 push %eax 10e631: 50 push %eax 10e632: 6a 01 push $0x1 10e634: 56 push %esi 10e635: 89 55 ac mov %edx,-0x54(%ebp) 10e638: 89 4d a8 mov %ecx,-0x58(%ebp) 10e63b: e8 70 fb ff ff call 10e1b0 10e640: 83 c4 10 add $0x10,%esp 10e643: 85 c0 test %eax,%eax 10e645: 8b 55 ac mov -0x54(%ebp),%edx 10e648: 8b 4d a8 mov -0x58(%ebp),%ecx 10e64b: 75 13 jne 10e660 rtems_set_errno_and_return_minus_one( EACCES ); 10e64d: e8 c2 43 00 00 call 112a14 <__errno> 10e652: c7 00 0d 00 00 00 movl $0xd,(%eax) 10e658: 83 cb ff or $0xffffffff,%ebx 10e65b: e9 05 02 00 00 jmp 10e865 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 10e660: 29 cf sub %ecx,%edi i += len; 10e662: 01 4d b4 add %ecx,-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; 10e665: 8b 1e mov (%esi),%ebx switch( type ) { 10e667: 83 fa 02 cmp $0x2,%edx 10e66a: 74 1f je 10e68b 10e66c: 77 0a ja 10e678 10e66e: 85 d2 test %edx,%edx 10e670: 0f 84 43 01 00 00 je 10e7b9 10e676: eb 88 jmp 10e600 10e678: 83 fa 03 cmp $0x3,%edx 10e67b: 74 5b je 10e6d8 10e67d: 83 fa 04 cmp $0x4,%edx 10e680: 0f 85 7a ff ff ff jne 10e600 <== NEVER TAKEN 10e686: e9 3e 01 00 00 jmp 10e7c9 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10e68b: a1 54 3f 12 00 mov 0x123f54,%eax 10e690: 3b 58 18 cmp 0x18(%eax),%ebx 10e693: 0f 84 67 ff ff ff je 10e600 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 10e699: 8b 46 10 mov 0x10(%esi),%eax 10e69c: 3b 58 1c cmp 0x1c(%eax),%ebx 10e69f: 75 27 jne 10e6c8 10e6a1: 89 f2 mov %esi,%edx 10e6a3: 89 c6 mov %eax,%esi if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 10e6a5: 83 c6 08 add $0x8,%esi 10e6a8: b9 05 00 00 00 mov $0x5,%ecx 10e6ad: 89 d7 mov %edx,%edi 10e6af: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10e6b1: 53 push %ebx 10e6b2: 8b 42 0c mov 0xc(%edx),%eax 10e6b5: ff 75 10 pushl 0x10(%ebp) 10e6b8: 52 push %edx 10e6b9: 8b 55 b4 mov -0x4c(%ebp),%edx 10e6bc: 2b 55 e4 sub -0x1c(%ebp),%edx 10e6bf: 03 55 08 add 0x8(%ebp),%edx 10e6c2: 52 push %edx 10e6c3: e9 d3 00 00 00 jmp 10e79b } } else { if ( !node->Parent ) 10e6c8: 8b 5b 08 mov 0x8(%ebx),%ebx 10e6cb: 85 db test %ebx,%ebx 10e6cd: 0f 85 df 00 00 00 jne 10e7b2 10e6d3: e9 33 01 00 00 jmp 10e80b case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10e6d8: 8b 43 4c mov 0x4c(%ebx),%eax 10e6db: 83 f8 03 cmp $0x3,%eax 10e6de: 74 05 je 10e6e5 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 10e6e0: 83 f8 04 cmp $0x4,%eax 10e6e3: 75 16 jne 10e6fb result = IMFS_evaluate_link( pathloc, 0 ); 10e6e5: 51 push %ecx 10e6e6: 51 push %ecx 10e6e7: 6a 00 push $0x0 10e6e9: 56 push %esi 10e6ea: e8 68 fe ff ff call 10e557 if ( result == -1 ) 10e6ef: 83 c4 10 add $0x10,%esp 10e6f2: 83 f8 ff cmp $0xffffffff,%eax 10e6f5: 0f 84 68 01 00 00 je 10e863 <== NEVER TAKEN return -1; } node = pathloc->node_access; 10e6fb: 8b 06 mov (%esi),%eax if ( !node ) 10e6fd: 85 c0 test %eax,%eax 10e6ff: 0f 84 38 01 00 00 je 10e83d <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10e705: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10e709: 0f 85 2e 01 00 00 jne 10e83d /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10e70f: 52 push %edx 10e710: 52 push %edx 10e711: 8d 4d c3 lea -0x3d(%ebp),%ecx 10e714: 51 push %ecx 10e715: 50 push %eax 10e716: e8 c5 03 00 00 call 10eae0 10e71b: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 10e71d: 83 c4 10 add $0x10,%esp 10e720: 85 c0 test %eax,%eax 10e722: 0f 84 b1 00 00 00 je 10e7d9 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 10e728: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10e72c: 0f 85 80 00 00 00 jne 10e7b2 10e732: 83 78 5c 00 cmpl $0x0,0x5c(%eax) 10e736: 74 7a je 10e7b2 10e738: 8b 55 08 mov 0x8(%ebp),%edx 10e73b: 03 55 b4 add -0x4c(%ebp),%edx 10e73e: eb 04 jmp 10e744 size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ++(*index); 10e740: ff 45 b4 incl -0x4c(%ebp) --(*len); 10e743: 4f dec %edi 10e744: 89 55 b0 mov %edx,-0x50(%ebp) const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 10e747: 83 ec 0c sub $0xc,%esp 10e74a: 0f be 02 movsbl (%edx),%eax 10e74d: 50 push %eax 10e74e: 89 55 ac mov %edx,-0x54(%ebp) 10e751: e8 b2 9c ff ff call 108408 10e756: 83 c4 10 add $0x10,%esp 10e759: 85 c0 test %eax,%eax 10e75b: 8b 55 ac mov -0x54(%ebp),%edx 10e75e: 74 0a je 10e76a 10e760: 80 3a 00 cmpb $0x0,(%edx) 10e763: 74 05 je 10e76a <== NEVER TAKEN 10e765: 42 inc %edx 10e766: 85 ff test %edi,%edi 10e768: 75 d6 jne 10e740 <== ALWAYS TAKEN 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] != '.')) { 10e76a: 8b 45 b0 mov -0x50(%ebp),%eax 10e76d: 80 38 2e cmpb $0x2e,(%eax) 10e770: 75 0d jne 10e77f 10e772: 8b 4d 08 mov 0x8(%ebp),%ecx 10e775: 8b 55 b4 mov -0x4c(%ebp),%edx 10e778: 80 7c 11 01 2e cmpb $0x2e,0x1(%ecx,%edx,1) 10e77d: 74 29 je 10e7a8 <== ALWAYS TAKEN 10e77f: 89 f2 mov %esi,%edx *pathloc = node->info.directory.mt_fs->mt_fs_root; 10e781: 8b 73 5c mov 0x5c(%ebx),%esi 10e784: 83 c6 1c add $0x1c,%esi 10e787: b9 05 00 00 00 mov $0x5,%ecx 10e78c: 89 d7 mov %edx,%edi 10e78e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i], 10e790: 53 push %ebx 10e791: 8b 42 0c mov 0xc(%edx),%eax 10e794: ff 75 10 pushl 0x10(%ebp) 10e797: 52 push %edx 10e798: ff 75 b0 pushl -0x50(%ebp) 10e79b: ff 50 04 call *0x4(%eax) 10e79e: 89 c3 mov %eax,%ebx 10e7a0: 83 c4 10 add $0x10,%esp 10e7a3: e9 bd 00 00 00 jmp 10e865 pathloc, name ); } i += 2; 10e7a8: 83 45 b4 02 addl $0x2,-0x4c(%ebp) pathlen -= 2; 10e7ac: 83 ef 02 sub $0x2,%edi node = node->Parent; 10e7af: 8b 5b 08 mov 0x8(%ebx),%ebx } pathloc->node_access = node; 10e7b2: 89 1e mov %ebx,(%esi) 10e7b4: e9 47 fe ff ff jmp 10e600 } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 10e7b9: e8 56 42 00 00 call 112a14 <__errno> 10e7be: c7 00 11 00 00 00 movl $0x11,(%eax) 10e7c4: e9 8f fe ff ff jmp 10e658 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10e7c9: e8 46 42 00 00 call 112a14 <__errno> 10e7ce: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10e7d4: e9 7f fe ff ff jmp 10e658 10e7d9: 89 f2 mov %esi,%edx case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 10e7db: 8b 45 b4 mov -0x4c(%ebp),%eax 10e7de: 2b 45 e4 sub -0x1c(%ebp),%eax 10e7e1: 03 45 08 add 0x8(%ebp),%eax 10e7e4: 8b 4d 10 mov 0x10(%ebp),%ecx 10e7e7: 89 01 mov %eax,(%ecx) 10e7e9: 8b 5d 08 mov 0x8(%ebp),%ebx 10e7ec: 03 5d b4 add -0x4c(%ebp),%ebx /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 10e7ef: eb 2a jmp 10e81b if ( !IMFS_is_separator( path[ i ] ) ) 10e7f1: 83 ec 0c sub $0xc,%esp 10e7f4: 0f be c0 movsbl %al,%eax 10e7f7: 50 push %eax 10e7f8: 89 55 ac mov %edx,-0x54(%ebp) 10e7fb: e8 08 9c ff ff call 108408 10e800: 43 inc %ebx 10e801: 83 c4 10 add $0x10,%esp 10e804: 85 c0 test %eax,%eax 10e806: 8b 55 ac mov -0x54(%ebp),%edx 10e809: 75 10 jne 10e81b rtems_set_errno_and_return_minus_one( ENOENT ); 10e80b: e8 04 42 00 00 call 112a14 <__errno> 10e810: c7 00 02 00 00 00 movl $0x2,(%eax) 10e816: e9 3d fe ff ff jmp 10e658 /* * 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++) { 10e81b: 8a 03 mov (%ebx),%al 10e81d: 84 c0 test %al,%al 10e81f: 75 d0 jne 10e7f1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 10e821: 83 ec 0c sub $0xc,%esp 10e824: 52 push %edx 10e825: 89 55 ac mov %edx,-0x54(%ebp) 10e828: e8 3b f9 ff ff call 10e168 10e82d: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; 10e82f: 8b 55 ac mov -0x54(%ebp),%edx 10e832: 8b 02 mov (%edx),%eax 10e834: 83 c4 10 add $0x10,%esp 10e837: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10e83b: 74 10 je 10e84d <== ALWAYS TAKEN if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10e83d: e8 d2 41 00 00 call 112a14 <__errno> 10e842: c7 00 14 00 00 00 movl $0x14,(%eax) 10e848: e9 0b fe ff ff jmp 10e658 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 10e84d: 51 push %ecx 10e84e: 51 push %ecx 10e84f: 6a 03 push $0x3 10e851: 52 push %edx 10e852: e8 59 f9 ff ff call 10e1b0 10e857: 83 c4 10 add $0x10,%esp 10e85a: 85 c0 test %eax,%eax 10e85c: 75 07 jne 10e865 10e85e: e9 ea fd ff ff jmp 10e64d 10e863: 89 c3 mov %eax,%ebx <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10e865: 89 d8 mov %ebx,%eax 10e867: 8d 65 f4 lea -0xc(%ebp),%esp 10e86a: 5b pop %ebx 10e86b: 5e pop %esi 10e86c: 5f pop %edi 10e86d: c9 leave 10e86e: c3 ret =============================================================================== 0010e216 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10e216: 55 push %ebp 10e217: 89 e5 mov %esp,%ebp 10e219: 53 push %ebx 10e21a: 83 ec 04 sub $0x4,%esp 10e21d: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10e220: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10e222: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10e226: 74 0d je 10e235 <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 10e228: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e22b: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10e230: e8 5b c9 ff ff call 10ab90 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10e235: 8b 40 50 mov 0x50(%eax),%eax 10e238: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10e23a: 83 ec 0c sub $0xc,%esp 10e23d: 53 push %ebx 10e23e: e8 25 ff ff ff call 10e168 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10e243: 58 pop %eax 10e244: 5a pop %edx 10e245: ff 75 0c pushl 0xc(%ebp) 10e248: 53 push %ebx 10e249: e8 62 ff ff ff call 10e1b0 10e24e: 89 c2 mov %eax,%edx 10e250: 83 c4 10 add $0x10,%esp 10e253: 31 c0 xor %eax,%eax 10e255: 85 d2 test %edx,%edx 10e257: 75 0e jne 10e267 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 10e259: e8 b6 47 00 00 call 112a14 <__errno> <== NOT EXECUTED 10e25e: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10e264: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return result; } 10e267: 8b 5d fc mov -0x4(%ebp),%ebx 10e26a: c9 leave 10e26b: c3 ret =============================================================================== 0010e1b0 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10e1b0: 55 push %ebp 10e1b1: 89 e5 mov %esp,%ebp 10e1b3: 57 push %edi 10e1b4: 56 push %esi 10e1b5: 53 push %ebx 10e1b6: 83 ec 0c sub $0xc,%esp 10e1b9: 8b 5d 0c mov 0xc(%ebp),%ebx uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 10e1bc: f7 c3 f8 ff ff ff test $0xfffffff8,%ebx 10e1c2: 74 10 je 10e1d4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 10e1c4: e8 4b 48 00 00 call 112a14 <__errno> <== NOT EXECUTED 10e1c9: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10e1cf: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10e1d2: eb 3a jmp 10e20e <== NOT EXECUTED jnode = node->node_access; 10e1d4: 8b 45 08 mov 0x8(%ebp),%eax 10e1d7: 8b 30 mov (%eax),%esi #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 10e1d9: e8 e2 0c 00 00 call 10eec0 10e1de: 89 c7 mov %eax,%edi st_gid = getegid(); 10e1e0: e8 cb 0c 00 00 call 10eeb0 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 10e1e5: 66 3b 7e 3c cmp 0x3c(%esi),%di 10e1e9: 75 07 jne 10e1f2 flags_to_test <<= 6; 10e1eb: 89 da mov %ebx,%edx 10e1ed: c1 e2 06 shl $0x6,%edx 10e1f0: eb 0f jmp 10e201 else if ( st_gid == jnode->st_gid ) 10e1f2: 89 da mov %ebx,%edx 10e1f4: 66 3b 46 3e cmp 0x3e(%esi),%ax 10e1f8: 75 07 jne 10e201 <== NEVER TAKEN flags_to_test <<= 3; 10e1fa: 8d 14 dd 00 00 00 00 lea 0x0(,%ebx,8),%edx /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10e201: 8b 46 30 mov 0x30(%esi),%eax 10e204: 21 d0 and %edx,%eax 10e206: 39 d0 cmp %edx,%eax 10e208: 0f 94 c0 sete %al 10e20b: 0f b6 c0 movzbl %al,%eax return 1; return 0; } 10e20e: 83 c4 0c add $0xc,%esp 10e211: 5b pop %ebx 10e212: 5e pop %esi 10e213: 5f pop %edi 10e214: c9 leave 10e215: c3 ret =============================================================================== 0010e26c : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10e26c: 55 push %ebp 10e26d: 89 e5 mov %esp,%ebp 10e26f: 57 push %edi 10e270: 56 push %esi 10e271: 53 push %ebx 10e272: 83 ec 1c sub $0x1c,%esp 10e275: 8b 5d 08 mov 0x8(%ebp),%ebx 10e278: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode = node->node_access; 10e27b: 8b 3b mov (%ebx),%edi /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10e27d: 83 7f 4c 04 cmpl $0x4,0x4c(%edi) 10e281: 74 0a je 10e28d <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 10e283: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e286: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10e28b: eb 0f jmp 10e29c <== NOT EXECUTED if ( !jnode->Parent ) 10e28d: 8b 47 08 mov 0x8(%edi),%eax 10e290: 85 c0 test %eax,%eax 10e292: 75 0d jne 10e2a1 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xBAD00000 ); 10e294: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e297: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 10e29c: e8 ef c8 ff ff call 10ab90 <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 10e2a1: 89 03 mov %eax,(%ebx) rtems_filesystem_get_sym_start_loc( 10e2a3: 52 push %edx 10e2a4: 53 push %ebx 10e2a5: 8d 45 e4 lea -0x1c(%ebp),%eax 10e2a8: 50 push %eax 10e2a9: ff 77 50 pushl 0x50(%edi) 10e2ac: e8 7b 10 00 00 call 10f32c /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10e2b1: 8b 57 50 mov 0x50(%edi),%edx 10e2b4: 03 55 e4 add -0x1c(%ebp),%edx 10e2b7: 31 c0 xor %eax,%eax 10e2b9: 83 c9 ff or $0xffffffff,%ecx 10e2bc: 89 d7 mov %edx,%edi 10e2be: f2 ae repnz scas %es:(%edi),%al 10e2c0: f7 d1 not %ecx 10e2c2: 49 dec %ecx 10e2c3: 53 push %ebx 10e2c4: 56 push %esi 10e2c5: 51 push %ecx 10e2c6: 52 push %edx 10e2c7: e8 33 00 00 00 call 10e2ff 10e2cc: 89 c7 mov %eax,%edi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10e2ce: 83 c4 14 add $0x14,%esp 10e2d1: 53 push %ebx 10e2d2: e8 91 fe ff ff call 10e168 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10e2d7: 59 pop %ecx 10e2d8: 58 pop %eax 10e2d9: 56 push %esi 10e2da: 53 push %ebx 10e2db: e8 d0 fe ff ff call 10e1b0 10e2e0: 83 c4 10 add $0x10,%esp 10e2e3: 85 c0 test %eax,%eax 10e2e5: 75 0e jne 10e2f5 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 10e2e7: e8 28 47 00 00 call 112a14 <__errno> <== NOT EXECUTED 10e2ec: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10e2f2: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED return result; } 10e2f5: 89 f8 mov %edi,%eax 10e2f7: 8d 65 f4 lea -0xc(%ebp),%esp 10e2fa: 5b pop %ebx 10e2fb: 5e pop %esi 10e2fc: 5f pop %edi 10e2fd: c9 leave 10e2fe: c3 ret =============================================================================== 00111b58 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 111b58: 55 push %ebp 111b59: 89 e5 mov %esp,%ebp 111b5b: 53 push %ebx 111b5c: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 111b5f: 8b 45 08 mov 0x8(%ebp),%eax 111b62: 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(); 111b64: e8 57 d3 ff ff call 10eec0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 111b69: 66 85 c0 test %ax,%ax 111b6c: 74 16 je 111b84 <== ALWAYS TAKEN 111b6e: 66 3b 43 3c cmp 0x3c(%ebx),%ax <== NOT EXECUTED 111b72: 74 10 je 111b84 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 111b74: e8 9b 0e 00 00 call 112a14 <__errno> <== NOT EXECUTED 111b79: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 111b7f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 111b82: eb 2e jmp 111bb2 <== 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); 111b84: 8b 45 0c mov 0xc(%ebp),%eax 111b87: 25 ff 0f 00 00 and $0xfff,%eax 111b8c: 8b 53 30 mov 0x30(%ebx),%edx 111b8f: 81 e2 00 f0 ff ff and $0xfffff000,%edx 111b95: 09 d0 or %edx,%eax 111b97: 89 43 30 mov %eax,0x30(%ebx) IMFS_update_ctime( jnode ); 111b9a: 50 push %eax 111b9b: 50 push %eax 111b9c: 6a 00 push $0x0 111b9e: 8d 45 f0 lea -0x10(%ebp),%eax 111ba1: 50 push %eax 111ba2: e8 6d 5b ff ff call 107714 111ba7: 8b 45 f0 mov -0x10(%ebp),%eax 111baa: 89 43 48 mov %eax,0x48(%ebx) 111bad: 31 c0 xor %eax,%eax return 0; 111baf: 83 c4 10 add $0x10,%esp } 111bb2: 8b 5d fc mov -0x4(%ebp),%ebx 111bb5: c9 leave 111bb6: c3 ret =============================================================================== 0010e9b9 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 10e9b9: 55 push %ebp <== NOT EXECUTED 10e9ba: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e9bc: 57 push %edi <== NOT EXECUTED 10e9bd: 56 push %esi <== NOT EXECUTED 10e9be: 53 push %ebx <== NOT EXECUTED 10e9bf: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 10e9c2: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10e9c5: 8b 77 38 mov 0x38(%edi),%esi <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 10e9c8: 57 push %edi <== NOT EXECUTED 10e9c9: 8d 46 50 lea 0x50(%esi),%eax <== NOT EXECUTED 10e9cc: 50 push %eax <== NOT EXECUTED 10e9cd: e8 51 f1 ff ff call 10db23 <== NOT EXECUTED 10e9d2: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (! err) { 10e9d4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e9d7: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10e9da: 75 2c jne 10ea08 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 10e9dc: 81 67 14 ff fe ff ff andl $0xfffffeff,0x14(%edi) <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 10e9e3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e9e6: 56 push %esi <== NOT EXECUTED 10e9e7: e8 36 05 00 00 call 10ef22 <== NOT EXECUTED 10e9ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e9ef: 85 c0 test %eax,%eax <== NOT EXECUTED 10e9f1: 75 23 jne 10ea16 <== NOT EXECUTED 10e9f3: 66 83 7e 34 00 cmpw $0x0,0x34(%esi) <== NOT EXECUTED 10e9f8: 75 1c jne 10ea16 <== NOT EXECUTED free(jnode); 10e9fa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e9fd: 56 push %esi <== NOT EXECUTED 10e9fe: e8 99 8c ff ff call 10769c <== NOT EXECUTED 10ea03: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ea06: eb 0e jmp 10ea16 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10ea08: 7d 0c jge 10ea16 <== NOT EXECUTED 10ea0a: e8 05 40 00 00 call 112a14 <__errno> <== NOT EXECUTED 10ea0f: f7 db neg %ebx <== NOT EXECUTED 10ea11: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10ea13: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10ea16: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10ea18: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10ea1b: 5b pop %ebx <== NOT EXECUTED 10ea1c: 5e pop %esi <== NOT EXECUTED 10ea1d: 5f pop %edi <== NOT EXECUTED 10ea1e: c9 leave <== NOT EXECUTED 10ea1f: c3 ret <== NOT EXECUTED =============================================================================== 0010e8ac : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 10e8ac: 55 push %ebp <== NOT EXECUTED 10e8ad: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e8af: 53 push %ebx <== NOT EXECUTED 10e8b0: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 10e8b3: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10e8b6: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 10e8b9: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED int err; if (command == FIONBIO) { 10e8bc: 81 f9 7e 66 04 80 cmp $0x8004667e,%ecx <== NOT EXECUTED 10e8c2: 75 1c jne 10e8e0 <== NOT EXECUTED if (buffer == NULL) 10e8c4: bb f2 ff ff ff mov $0xfffffff2,%ebx <== NOT EXECUTED 10e8c9: 85 d2 test %edx,%edx <== NOT EXECUTED 10e8cb: 74 2a je 10e8f7 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 10e8cd: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 10e8d0: 74 06 je 10e8d8 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 10e8d2: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED 10e8d6: eb 04 jmp 10e8dc <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 10e8d8: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED 10e8dc: 31 db xor %ebx,%ebx <== NOT EXECUTED 10e8de: eb 23 jmp 10e903 <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 10e8e0: 50 push %eax <== NOT EXECUTED 10e8e1: 52 push %edx <== NOT EXECUTED 10e8e2: 51 push %ecx <== NOT EXECUTED 10e8e3: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10e8e6: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10e8e9: e8 99 ee ff ff call 10d787 <== NOT EXECUTED 10e8ee: 89 c3 mov %eax,%ebx <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10e8f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e8f3: 85 c0 test %eax,%eax <== NOT EXECUTED 10e8f5: 79 0c jns 10e903 <== NOT EXECUTED 10e8f7: e8 18 41 00 00 call 112a14 <__errno> <== NOT EXECUTED 10e8fc: f7 db neg %ebx <== NOT EXECUTED 10e8fe: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e900: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e903: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e905: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e908: c9 leave <== NOT EXECUTED 10e909: c3 ret <== NOT EXECUTED =============================================================================== 0010e870 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 10e870: 55 push %ebp <== NOT EXECUTED 10e871: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e873: 53 push %ebx <== NOT EXECUTED 10e874: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10e877: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 10e87a: 50 push %eax <== NOT EXECUTED 10e87b: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 10e87e: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10e881: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10e884: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10e887: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10e88a: e8 a1 ee ff ff call 10d730 <== NOT EXECUTED 10e88f: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10e891: 99 cltd <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10e892: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10e895: 85 d2 test %edx,%edx <== NOT EXECUTED 10e897: 79 0e jns 10e8a7 <== NOT EXECUTED 10e899: e8 76 41 00 00 call 112a14 <__errno> <== NOT EXECUTED 10e89e: f7 db neg %ebx <== NOT EXECUTED 10e8a0: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e8a2: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10e8a5: 89 c2 mov %eax,%edx <== NOT EXECUTED } 10e8a7: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e8aa: c9 leave <== NOT EXECUTED 10e8ab: c3 ret <== NOT EXECUTED =============================================================================== 0010ea20 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10ea20: 55 push %ebp 10ea21: 89 e5 mov %esp,%ebp 10ea23: 53 push %ebx 10ea24: 83 ec 0c sub $0xc,%esp 10ea27: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 10ea2a: 50 push %eax 10ea2b: 8b 40 38 mov 0x38(%eax),%eax 10ea2e: 83 c0 50 add $0x50,%eax 10ea31: 50 push %eax 10ea32: e8 bc f1 ff ff call 10dbf3 10ea37: 89 c3 mov %eax,%ebx IMFS_FIFO_RETURN(err); 10ea39: 83 c4 10 add $0x10,%esp 10ea3c: 85 c0 test %eax,%eax 10ea3e: 79 0c jns 10ea4c <== NEVER TAKEN 10ea40: e8 cf 3f 00 00 call 112a14 <__errno> 10ea45: f7 db neg %ebx 10ea47: 89 18 mov %ebx,(%eax) 10ea49: 83 cb ff or $0xffffffff,%ebx } 10ea4c: 89 d8 mov %ebx,%eax 10ea4e: 8b 5d fc mov -0x4(%ebp),%ebx 10ea51: c9 leave 10ea52: c3 ret =============================================================================== 0010e963 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10e963: 55 push %ebp <== NOT EXECUTED 10e964: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e966: 56 push %esi <== NOT EXECUTED 10e967: 53 push %ebx <== NOT EXECUTED 10e968: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10e96b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10e96e: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 10e971: 50 push %eax <== NOT EXECUTED 10e972: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10e975: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10e978: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10e97b: e8 5d ee ff ff call 10d7dd <== NOT EXECUTED 10e980: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) 10e982: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e985: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10e988: 7e 18 jle 10e9a2 <== NOT EXECUTED IMFS_update_atime(jnode); 10e98a: 52 push %edx <== NOT EXECUTED 10e98b: 52 push %edx <== NOT EXECUTED 10e98c: 6a 00 push $0x0 <== NOT EXECUTED 10e98e: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10e991: 50 push %eax <== NOT EXECUTED 10e992: e8 7d 8d ff ff call 107714 <== NOT EXECUTED 10e997: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10e99a: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED 10e99d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e9a0: eb 0e jmp 10e9b0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10e9a2: 74 0c je 10e9b0 <== NOT EXECUTED 10e9a4: e8 6b 40 00 00 call 112a14 <__errno> <== NOT EXECUTED 10e9a9: f7 db neg %ebx <== NOT EXECUTED 10e9ab: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e9ad: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e9b0: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e9b2: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10e9b5: 5b pop %ebx <== NOT EXECUTED 10e9b6: 5e pop %esi <== NOT EXECUTED 10e9b7: c9 leave <== NOT EXECUTED 10e9b8: c3 ret <== NOT EXECUTED =============================================================================== 0010e90a : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10e90a: 55 push %ebp <== NOT EXECUTED 10e90b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e90d: 56 push %esi <== NOT EXECUTED 10e90e: 53 push %ebx <== NOT EXECUTED 10e90f: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10e912: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10e915: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 10e918: 50 push %eax <== NOT EXECUTED 10e919: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10e91c: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10e91f: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10e922: e8 18 f0 ff ff call 10d93f <== NOT EXECUTED 10e927: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) { 10e929: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e92c: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10e92f: 7e 1b jle 10e94c <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 10e931: 50 push %eax <== NOT EXECUTED 10e932: 50 push %eax <== NOT EXECUTED 10e933: 6a 00 push $0x0 <== NOT EXECUTED 10e935: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10e938: 50 push %eax <== NOT EXECUTED 10e939: e8 d6 8d ff ff call 107714 <== NOT EXECUTED 10e93e: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10e941: 89 46 44 mov %eax,0x44(%esi) <== NOT EXECUTED 10e944: 89 46 48 mov %eax,0x48(%esi) <== NOT EXECUTED 10e947: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e94a: eb 0e jmp 10e95a <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10e94c: 74 0c je 10e95a <== NOT EXECUTED 10e94e: e8 c1 40 00 00 call 112a14 <__errno> <== NOT EXECUTED 10e953: f7 db neg %ebx <== NOT EXECUTED 10e955: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e957: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e95a: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e95c: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10e95f: 5b pop %ebx <== NOT EXECUTED 10e960: 5e pop %esi <== NOT EXECUTED 10e961: c9 leave <== NOT EXECUTED 10e962: c3 ret <== NOT EXECUTED =============================================================================== 0010eae0 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 10eae0: 55 push %ebp 10eae1: 89 e5 mov %esp,%ebp 10eae3: 57 push %edi 10eae4: 56 push %esi 10eae5: 53 push %ebx 10eae6: 83 ec 0c sub $0xc,%esp 10eae9: 8b 5d 08 mov 0x8(%ebp),%ebx 10eaec: 8b 7d 0c mov 0xc(%ebp),%edi /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 10eaef: 85 db test %ebx,%ebx 10eaf1: 75 16 jne 10eb09 <== ALWAYS TAKEN 10eaf3: 68 00 06 12 00 push $0x120600 <== NOT EXECUTED 10eaf8: 68 68 06 12 00 push $0x120668 <== NOT EXECUTED 10eafd: 6a 2a push $0x2a <== NOT EXECUTED 10eaff: 68 0a 06 12 00 push $0x12060a <== NOT EXECUTED 10eb04: e8 97 88 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( !name ) 10eb09: 85 ff test %edi,%edi 10eb0b: 74 52 je 10eb5f <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 10eb0d: 56 push %esi 10eb0e: 56 push %esi 10eb0f: 68 60 06 12 00 push $0x120660 10eb14: 57 push %edi 10eb15: e8 16 4a 00 00 call 113530 10eb1a: 83 c4 10 add $0x10,%esp 10eb1d: 85 c0 test %eax,%eax 10eb1f: 74 40 je 10eb61 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 10eb21: 51 push %ecx 10eb22: 51 push %ecx 10eb23: 68 62 06 12 00 push $0x120662 10eb28: 57 push %edi 10eb29: e8 02 4a 00 00 call 113530 10eb2e: 83 c4 10 add $0x10,%esp 10eb31: 85 c0 test %eax,%eax 10eb33: 75 05 jne 10eb3a <== ALWAYS TAKEN return directory->Parent; 10eb35: 8b 5b 08 mov 0x8(%ebx),%ebx <== NOT EXECUTED 10eb38: eb 27 jmp 10eb61 <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10eb3a: 8b 73 50 mov 0x50(%ebx),%esi 10eb3d: 83 c3 54 add $0x54,%ebx 10eb40: eb 19 jmp 10eb5b !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 ) ) 10eb42: 8d 46 0c lea 0xc(%esi),%eax 10eb45: 52 push %edx 10eb46: 52 push %edx 10eb47: 50 push %eax 10eb48: 57 push %edi 10eb49: e8 e2 49 00 00 call 113530 10eb4e: 83 c4 10 add $0x10,%esp 10eb51: 85 c0 test %eax,%eax 10eb53: 75 04 jne 10eb59 10eb55: 89 f3 mov %esi,%ebx 10eb57: eb 08 jmp 10eb61 the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 10eb59: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10eb5b: 39 de cmp %ebx,%esi 10eb5d: 75 e3 jne 10eb42 10eb5f: 31 db xor %ebx,%ebx if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10eb61: 89 d8 mov %ebx,%eax 10eb63: 8d 65 f4 lea -0xc(%ebp),%esp 10eb66: 5b pop %ebx 10eb67: 5e pop %esi 10eb68: 5f pop %edi 10eb69: c9 leave 10eb6a: c3 ret =============================================================================== 0010ea5c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 10ea5c: 55 push %ebp 10ea5d: 89 e5 mov %esp,%ebp 10ea5f: 57 push %edi 10ea60: 56 push %esi 10ea61: 53 push %ebx 10ea62: 83 ec 2c sub $0x2c,%esp 10ea65: 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; 10ea68: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 10ea6b: 8d 7d d4 lea -0x2c(%ebp),%edi 10ea6e: 8d 70 1c lea 0x1c(%eax),%esi 10ea71: b9 05 00 00 00 mov $0x5,%ecx 10ea76: 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; 10ea78: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 10ea7f: 8d 75 d4 lea -0x2c(%ebp),%esi */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 10ea82: 8b 7b 08 mov 0x8(%ebx),%edi loc.node_access = (void *)jnode; 10ea85: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 10ea88: 83 ec 0c sub $0xc,%esp 10ea8b: 56 push %esi 10ea8c: e8 d7 f6 ff ff call 10e168 if ( jnode->type != IMFS_DIRECTORY ) { 10ea91: 83 c4 10 add $0x10,%esp 10ea94: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10ea98: 75 08 jne 10eaa2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ea9a: 8d 43 54 lea 0x54(%ebx),%eax 10ea9d: 39 43 50 cmp %eax,0x50(%ebx) 10eaa0: 75 13 jne 10eab5 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 10eaa2: 50 push %eax 10eaa3: 50 push %eax 10eaa4: 56 push %esi 10eaa5: 6a 00 push $0x0 10eaa7: e8 e4 86 ff ff call 107190 if (result != 0) 10eaac: 83 c4 10 add $0x10,%esp 10eaaf: 85 c0 test %eax,%eax 10eab1: 75 1d jne 10ead0 <== NEVER TAKEN 10eab3: 89 fb mov %edi,%ebx return -1; jnode = next; } if ( jnode != NULL ) { 10eab5: 85 db test %ebx,%ebx 10eab7: 74 1c je 10ead5 if ( jnode->type == IMFS_DIRECTORY ) { 10eab9: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10eabd: 75 c3 jne 10ea82 <== NEVER TAKEN 10eabf: 8d 43 54 lea 0x54(%ebx),%eax 10eac2: 39 43 50 cmp %eax,0x50(%ebx) 10eac5: 74 bb je 10ea82 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 10eac7: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 10eaca: 85 db test %ebx,%ebx 10eacc: 75 b4 jne 10ea82 <== ALWAYS TAKEN 10eace: eb 05 jmp 10ead5 <== NOT EXECUTED 10ead0: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10ead3: eb 02 jmp 10ead7 <== NOT EXECUTED 10ead5: 31 c0 xor %eax,%eax return 0; } 10ead7: 8d 65 f4 lea -0xc(%ebp),%esp 10eada: 5b pop %ebx 10eadb: 5e pop %esi 10eadc: 5f pop %edi 10eadd: c9 leave 10eade: c3 ret =============================================================================== 0010eb6c : const char *path, int pathlen, char *token, int *token_len ) { 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 1c sub $0x1c,%esp 10eb75: 8b 7d 08 mov 0x8(%ebp),%edi 10eb78: 8b 75 10 mov 0x10(%ebp),%esi register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 10eb7b: 8a 17 mov (%edi),%dl 10eb7d: 31 db xor %ebx,%ebx while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10eb7f: eb 16 jmp 10eb97 token[i] = c; 10eb81: 88 14 1e mov %dl,(%esi,%ebx,1) if ( i == IMFS_NAME_MAX ) 10eb84: 83 fb 20 cmp $0x20,%ebx 10eb87: 75 0a jne 10eb93 10eb89: bf 04 00 00 00 mov $0x4,%edi 10eb8e: e9 8c 00 00 00 jmp 10ec1f return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 10eb93: 43 inc %ebx 10eb94: 8a 14 1f mov (%edi,%ebx,1),%dl /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10eb97: 83 ec 0c sub $0xc,%esp 10eb9a: 0f be c2 movsbl %dl,%eax 10eb9d: 50 push %eax 10eb9e: 88 55 e4 mov %dl,-0x1c(%ebp) 10eba1: e8 62 98 ff ff call 108408 10eba6: 83 c4 10 add $0x10,%esp 10eba9: 85 c0 test %eax,%eax 10ebab: 8a 55 e4 mov -0x1c(%ebp),%dl 10ebae: 75 05 jne 10ebb5 10ebb0: 3b 5d 0c cmp 0xc(%ebp),%ebx 10ebb3: 7c cc jl 10eb81 /* * Copy a seperator into token. */ if ( i == 0 ) { 10ebb5: 85 db test %ebx,%ebx 10ebb7: 75 19 jne 10ebd2 token[i] = c; 10ebb9: 88 16 mov %dl,(%esi) if ( (token[i] != '\0') && pathlen ) { 10ebbb: 84 d2 test %dl,%dl 10ebbd: 74 0f je 10ebce 10ebbf: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10ebc3: 74 09 je 10ebce 10ebc5: bf 01 00 00 00 mov $0x1,%edi 10ebca: b3 01 mov $0x1,%bl 10ebcc: eb 14 jmp 10ebe2 10ebce: 31 ff xor %edi,%edi 10ebd0: eb 10 jmp 10ebe2 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10ebd2: bf 03 00 00 00 mov $0x3,%edi 10ebd7: 80 7c 1e ff 00 cmpb $0x0,-0x1(%esi,%ebx,1) 10ebdc: 74 04 je 10ebe2 <== NEVER TAKEN token[i] = '\0'; 10ebde: c6 04 1e 00 movb $0x0,(%esi,%ebx,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 10ebe2: 8b 45 14 mov 0x14(%ebp),%eax 10ebe5: 89 18 mov %ebx,(%eax) /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 10ebe7: 83 ff 03 cmp $0x3,%edi 10ebea: 75 33 jne 10ec1f if ( strcmp( token, "..") == 0 ) 10ebec: 52 push %edx 10ebed: 52 push %edx 10ebee: 68 7f 06 12 00 push $0x12067f 10ebf3: 56 push %esi 10ebf4: e8 37 49 00 00 call 113530 10ebf9: 83 c4 10 add $0x10,%esp 10ebfc: 85 c0 test %eax,%eax 10ebfe: 75 06 jne 10ec06 10ec00: 66 bf 02 00 mov $0x2,%di 10ec04: eb 19 jmp 10ec1f type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 10ec06: 50 push %eax 10ec07: 50 push %eax 10ec08: 68 80 06 12 00 push $0x120680 10ec0d: 56 push %esi 10ec0e: e8 1d 49 00 00 call 113530 10ec13: 83 c4 10 add $0x10,%esp 10ec16: 85 c0 test %eax,%eax 10ec18: 75 05 jne 10ec1f 10ec1a: bf 01 00 00 00 mov $0x1,%edi type = IMFS_CURRENT_DIR; } return type; } 10ec1f: 89 f8 mov %edi,%eax 10ec21: 8d 65 f4 lea -0xc(%ebp),%esp 10ec24: 5b pop %ebx 10ec25: 5e pop %esi 10ec26: 5f pop %edi 10ec27: c9 leave 10ec28: c3 ret =============================================================================== 00106e10 : 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 ) { 106e10: 55 push %ebp 106e11: 89 e5 mov %esp,%ebp 106e13: 57 push %edi 106e14: 56 push %esi 106e15: 53 push %ebx 106e16: 83 ec 0c sub $0xc,%esp 106e19: 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, 106e1c: 8b 0d 48 21 12 00 mov 0x122148,%ecx 106e22: 31 d2 xor %edx,%edx 106e24: b8 10 00 00 00 mov $0x10,%eax int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 106e29: 39 c8 cmp %ecx,%eax 106e2b: 74 0d je 106e3a 106e2d: d1 e0 shl %eax 106e2f: 42 inc %edx 106e30: 83 fa 06 cmp $0x6,%edx 106e33: 75 f4 jne 106e29 <== ALWAYS TAKEN 106e35: b8 80 00 00 00 mov $0x80,%eax <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 106e3a: a3 a8 5d 12 00 mov %eax,0x125da8 /* * 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(); 106e3f: e8 ef 71 00 00 call 10e033 106e44: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 106e47: 8b 45 14 mov 0x14(%ebp),%eax 106e4a: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 106e4d: 8b 45 0c mov 0xc(%ebp),%eax 106e50: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 106e53: 8d 7b 38 lea 0x38(%ebx),%edi 106e56: be 9c 04 12 00 mov $0x12049c,%esi 106e5b: b9 0c 00 00 00 mov $0xc,%ecx 106e60: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 106e62: 50 push %eax 106e63: 50 push %eax 106e64: 6a 10 push $0x10 106e66: 6a 01 push $0x1 106e68: e8 4f 06 00 00 call 1074bc if ( !fs_info ) { 106e6d: 83 c4 10 add $0x10,%esp 106e70: 85 c0 test %eax,%eax 106e72: 75 1e jne 106e92 <== ALWAYS TAKEN free(temp_mt_entry->mt_fs_root.node_access); 106e74: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106e77: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED 106e7a: e8 1d 08 00 00 call 10769c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 106e7f: e8 90 bb 00 00 call 112a14 <__errno> <== NOT EXECUTED 106e84: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106e8a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106e8d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106e90: eb 36 jmp 106ec8 <== NOT EXECUTED } temp_mt_entry->fs_info = fs_info; 106e92: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 106e95: 8b 15 ac 5d 12 00 mov 0x125dac,%edx 106e9b: 89 10 mov %edx,(%eax) 106e9d: 42 inc %edx 106e9e: 89 15 ac 5d 12 00 mov %edx,0x125dac fs_info->ino_count = 1; 106ea4: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 106eab: 8b 55 10 mov 0x10(%ebp),%edx 106eae: 89 50 08 mov %edx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 106eb1: 8b 55 14 mov 0x14(%ebp),%edx 106eb4: 89 50 0c mov %edx,0xc(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 106eb7: 8b 43 1c mov 0x1c(%ebx),%eax 106eba: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 106ec1: e8 74 68 00 00 call 10d73a 106ec6: 31 c0 xor %eax,%eax return 0; } 106ec8: 8d 65 f4 lea -0xc(%ebp),%esp 106ecb: 5b pop %ebx 106ecc: 5e pop %esi 106ecd: 5f pop %edi 106ece: c9 leave 106ecf: c3 ret =============================================================================== 00106ed0 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 106ed0: 55 push %ebp 106ed1: 89 e5 mov %esp,%ebp 106ed3: 57 push %edi 106ed4: 53 push %ebx 106ed5: 83 ec 50 sub $0x50,%esp 106ed8: 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; 106edb: 8b 45 08 mov 0x8(%ebp),%eax 106ede: 8b 00 mov (%eax),%eax 106ee0: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 106ee3: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 106ee8: 76 0d jbe 106ef7 rtems_set_errno_and_return_minus_one( EMLINK ); 106eea: e8 25 bb 00 00 call 112a14 <__errno> 106eef: c7 00 1f 00 00 00 movl $0x1f,(%eax) 106ef5: eb 43 jmp 106f3a /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 106ef7: 31 c0 xor %eax,%eax 106ef9: 83 c9 ff or $0xffffffff,%ecx 106efc: 89 d7 mov %edx,%edi 106efe: f2 ae repnz scas %es:(%edi),%al 106f00: f7 d1 not %ecx 106f02: 49 dec %ecx 106f03: 8d 45 f4 lea -0xc(%ebp),%eax 106f06: 50 push %eax 106f07: 8d 5d b7 lea -0x49(%ebp),%ebx 106f0a: 53 push %ebx 106f0b: 51 push %ecx 106f0c: 52 push %edx 106f0d: e8 5a 7c 00 00 call 10eb6c * 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( 106f12: 8d 45 d8 lea -0x28(%ebp),%eax 106f15: 89 04 24 mov %eax,(%esp) 106f18: 68 ff a1 00 00 push $0xa1ff 106f1d: 53 push %ebx 106f1e: 6a 03 push $0x3 106f20: ff 75 0c pushl 0xc(%ebp) 106f23: e8 3e 71 00 00 call 10e066 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 106f28: 83 c4 20 add $0x20,%esp 106f2b: 85 c0 test %eax,%eax 106f2d: 75 10 jne 106f3f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106f2f: e8 e0 ba 00 00 call 112a14 <__errno> <== NOT EXECUTED 106f34: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106f3a: 83 c8 ff or $0xffffffff,%eax 106f3d: eb 22 jmp 106f61 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 106f3f: 8b 45 d8 mov -0x28(%ebp),%eax 106f42: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 106f46: 50 push %eax 106f47: 50 push %eax 106f48: 6a 00 push $0x0 106f4a: 8d 45 ec lea -0x14(%ebp),%eax 106f4d: 50 push %eax 106f4e: e8 c1 07 00 00 call 107714 106f53: 8b 55 ec mov -0x14(%ebp),%edx 106f56: 8b 45 d8 mov -0x28(%ebp),%eax 106f59: 89 50 48 mov %edx,0x48(%eax) 106f5c: 31 c0 xor %eax,%eax return 0; 106f5e: 83 c4 10 add $0x10,%esp } 106f61: 8d 65 f8 lea -0x8(%ebp),%esp 106f64: 5b pop %ebx 106f65: 5f pop %edi 106f66: c9 leave 106f67: c3 ret =============================================================================== 00110ddc : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 110ddc: 55 push %ebp 110ddd: 89 e5 mov %esp,%ebp 110ddf: 53 push %ebx 110de0: 83 ec 04 sub $0x4,%esp 110de3: 8b 45 08 mov 0x8(%ebp),%eax block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 110de6: 85 c0 test %eax,%eax 110de8: 75 11 jne 110dfb <== ALWAYS TAKEN 110dea: 68 d0 09 12 00 push $0x1209d0 <== NOT EXECUTED 110def: 68 7c 0b 12 00 push $0x120b7c <== NOT EXECUTED 110df4: 68 69 01 00 00 push $0x169 <== NOT EXECUTED 110df9: eb 15 jmp 110e10 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 110dfb: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 110dff: 74 19 je 110e1a <== ALWAYS TAKEN 110e01: 68 27 0a 12 00 push $0x120a27 <== NOT EXECUTED 110e06: 68 7c 0b 12 00 push $0x120b7c <== NOT EXECUTED 110e0b: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED 110e10: 68 da 09 12 00 push $0x1209da <== NOT EXECUTED 110e15: e8 86 65 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 110e1a: 52 push %edx 110e1b: 6a 01 push $0x1 110e1d: ff 75 0c pushl 0xc(%ebp) 110e20: 50 push %eax 110e21: e8 90 fb ff ff call 1109b6 110e26: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 110e28: 83 c4 10 add $0x10,%esp 110e2b: 31 c0 xor %eax,%eax 110e2d: 83 3b 00 cmpl $0x0,(%ebx) 110e30: 75 14 jne 110e46 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 110e32: e8 5d fb ff ff call 110994 110e37: 89 c2 mov %eax,%edx if ( !memory ) 110e39: b8 01 00 00 00 mov $0x1,%eax 110e3e: 85 d2 test %edx,%edx 110e40: 74 04 je 110e46 <== NEVER TAKEN return 1; *block_entry_ptr = memory; 110e42: 89 13 mov %edx,(%ebx) 110e44: 30 c0 xor %al,%al return 0; } 110e46: 8b 5d fc mov -0x4(%ebp),%ebx 110e49: c9 leave 110e4a: c3 ret =============================================================================== 00110e4b : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 110e4b: 55 push %ebp 110e4c: 89 e5 mov %esp,%ebp 110e4e: 57 push %edi 110e4f: 56 push %esi 110e50: 53 push %ebx 110e51: 83 ec 2c sub $0x2c,%esp 110e54: 8b 5d 08 mov 0x8(%ebp),%ebx 110e57: 8b 75 0c mov 0xc(%ebp),%esi 110e5a: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 110e5d: 85 db test %ebx,%ebx 110e5f: 75 11 jne 110e72 <== ALWAYS TAKEN 110e61: 68 d0 09 12 00 push $0x1209d0 <== NOT EXECUTED 110e66: 68 94 0b 12 00 push $0x120b94 <== NOT EXECUTED 110e6b: 68 31 01 00 00 push $0x131 <== NOT EXECUTED 110e70: eb 15 jmp 110e87 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 110e72: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 110e76: 74 19 je 110e91 <== ALWAYS TAKEN 110e78: 68 27 0a 12 00 push $0x120a27 <== NOT EXECUTED 110e7d: 68 94 0b 12 00 push $0x120b94 <== NOT EXECUTED 110e82: 68 35 01 00 00 push $0x135 <== NOT EXECUTED 110e87: 68 da 09 12 00 push $0x1209da <== NOT EXECUTED 110e8c: e8 0f 65 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 110e91: a1 a8 5d 12 00 mov 0x125da8,%eax 110e96: 89 c1 mov %eax,%ecx 110e98: c1 e9 02 shr $0x2,%ecx 110e9b: 8d 51 01 lea 0x1(%ecx),%edx 110e9e: 0f af d1 imul %ecx,%edx 110ea1: 42 inc %edx 110ea2: 0f af d1 imul %ecx,%edx 110ea5: 4a dec %edx 110ea6: 0f af d0 imul %eax,%edx 110ea9: 83 ff 00 cmp $0x0,%edi 110eac: 7c 16 jl 110ec4 <== NEVER TAKEN 110eae: 7f 04 jg 110eb4 <== NEVER TAKEN 110eb0: 39 d6 cmp %edx,%esi 110eb2: 72 10 jb 110ec4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 110eb4: e8 5b 1b 00 00 call 112a14 <__errno> <== NOT EXECUTED 110eb9: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 110ebf: e9 92 00 00 00 jmp 110f56 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 110ec4: 8b 53 50 mov 0x50(%ebx),%edx 110ec7: 8b 4b 54 mov 0x54(%ebx),%ecx 110eca: 89 55 e0 mov %edx,-0x20(%ebp) 110ecd: 89 4d e4 mov %ecx,-0x1c(%ebp) 110ed0: 39 cf cmp %ecx,%edi 110ed2: 7f 0e jg 110ee2 <== NEVER TAKEN 110ed4: 0f 8c 8d 00 00 00 jl 110f67 <== NEVER TAKEN 110eda: 39 d6 cmp %edx,%esi 110edc: 0f 86 85 00 00 00 jbe 110f67 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 110ee2: 89 45 d8 mov %eax,-0x28(%ebp) 110ee5: 89 c1 mov %eax,%ecx 110ee7: c1 f9 1f sar $0x1f,%ecx 110eea: 89 4d dc mov %ecx,-0x24(%ebp) 110eed: ff 75 dc pushl -0x24(%ebp) 110ef0: ff 75 d8 pushl -0x28(%ebp) 110ef3: 57 push %edi 110ef4: 56 push %esi 110ef5: e8 b2 cb 00 00 call 11daac <__divdi3> 110efa: 83 c4 10 add $0x10,%esp 110efd: 89 45 d4 mov %eax,-0x2c(%ebp) old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 110f00: ff 75 dc pushl -0x24(%ebp) 110f03: ff 75 d8 pushl -0x28(%ebp) 110f06: ff 75 e4 pushl -0x1c(%ebp) 110f09: ff 75 e0 pushl -0x20(%ebp) 110f0c: e8 9b cb 00 00 call 11daac <__divdi3> 110f11: 83 c4 10 add $0x10,%esp 110f14: 89 45 e0 mov %eax,-0x20(%ebp) 110f17: 89 c2 mov %eax,%edx /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 110f19: eb 41 jmp 110f5c if ( IMFS_memfile_addblock( the_jnode, block ) ) { 110f1b: 50 push %eax 110f1c: 50 push %eax 110f1d: 52 push %edx 110f1e: 53 push %ebx 110f1f: 89 55 d0 mov %edx,-0x30(%ebp) 110f22: e8 b5 fe ff ff call 110ddc 110f27: 83 c4 10 add $0x10,%esp 110f2a: 85 c0 test %eax,%eax 110f2c: 8b 55 d0 mov -0x30(%ebp),%edx 110f2f: 74 2a je 110f5b <== ALWAYS TAKEN 110f31: eb 13 jmp 110f46 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 110f33: 51 push %ecx <== NOT EXECUTED 110f34: 51 push %ecx <== NOT EXECUTED 110f35: 52 push %edx <== NOT EXECUTED 110f36: 53 push %ebx <== NOT EXECUTED 110f37: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 110f3a: e8 5c fc ff ff call 110b9b <== 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-- ) { 110f3f: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 110f42: 4a dec %edx <== NOT EXECUTED 110f43: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110f46: 3b 55 e0 cmp -0x20(%ebp),%edx <== NOT EXECUTED 110f49: 73 e8 jae 110f33 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 110f4b: e8 c4 1a 00 00 call 112a14 <__errno> <== NOT EXECUTED 110f50: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 110f56: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 110f59: eb 0e jmp 110f69 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 110f5b: 42 inc %edx 110f5c: 3b 55 d4 cmp -0x2c(%ebp),%edx 110f5f: 76 ba jbe 110f1b /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 110f61: 89 73 50 mov %esi,0x50(%ebx) 110f64: 89 7b 54 mov %edi,0x54(%ebx) 110f67: 31 c0 xor %eax,%eax return 0; } 110f69: 8d 65 f4 lea -0xc(%ebp),%esp 110f6c: 5b pop %ebx 110f6d: 5e pop %esi 110f6e: 5f pop %edi 110f6f: c9 leave 110f70: c3 ret =============================================================================== 001109b6 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 1109b6: 55 push %ebp 1109b7: 89 e5 mov %esp,%ebp 1109b9: 57 push %edi 1109ba: 56 push %esi 1109bb: 53 push %ebx 1109bc: 83 ec 1c sub $0x1c,%esp 1109bf: 8b 5d 08 mov 0x8(%ebp),%ebx 1109c2: 8b 7d 0c mov 0xc(%ebp),%edi 1109c5: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 1109c8: 85 db test %ebx,%ebx 1109ca: 75 11 jne 1109dd <== ALWAYS TAKEN 1109cc: 68 d0 09 12 00 push $0x1209d0 <== NOT EXECUTED 1109d1: 68 e4 0a 12 00 push $0x120ae4 <== NOT EXECUTED 1109d6: 68 88 03 00 00 push $0x388 <== NOT EXECUTED 1109db: eb 15 jmp 1109f2 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 1109dd: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 1109e1: 74 19 je 1109fc <== ALWAYS TAKEN 1109e3: 68 27 0a 12 00 push $0x120a27 <== NOT EXECUTED 1109e8: 68 e4 0a 12 00 push $0x120ae4 <== NOT EXECUTED 1109ed: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED 1109f2: 68 da 09 12 00 push $0x1209da <== NOT EXECUTED 1109f7: e8 a4 69 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 1109fc: 8b 0d a8 5d 12 00 mov 0x125da8,%ecx 110a02: c1 e9 02 shr $0x2,%ecx 110a05: 8d 41 ff lea -0x1(%ecx),%eax 110a08: 39 c7 cmp %eax,%edi 110a0a: 77 32 ja 110a3e <== NEVER TAKEN #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 110a0c: 8b 53 58 mov 0x58(%ebx),%edx if ( malloc_it ) { 110a0f: 85 f6 test %esi,%esi 110a11: 74 23 je 110a36 if ( !p ) { 110a13: 85 d2 test %edx,%edx 110a15: 75 10 jne 110a27 p = memfile_alloc_block(); 110a17: e8 78 ff ff ff call 110994 if ( !p ) 110a1c: 85 c0 test %eax,%eax 110a1e: 0f 84 03 01 00 00 je 110b27 <== NEVER TAKEN return 0; info->indirect = p; 110a24: 89 43 58 mov %eax,0x58(%ebx) } return &info->indirect[ my_block ]; 110a27: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax 110a2e: 03 43 58 add 0x58(%ebx),%eax 110a31: e9 f3 00 00 00 jmp 110b29 } if ( !p ) return 0; return &info->indirect[ my_block ]; 110a36: 8d 04 ba lea (%edx,%edi,4),%eax 110a39: e9 e5 00 00 00 jmp 110b23 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 110a3e: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 110a41: 0f af c1 imul %ecx,%eax <== NOT EXECUTED 110a44: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 110a47: 39 d7 cmp %edx,%edi <== NOT EXECUTED 110a49: 77 58 ja 110aa3 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 110a4b: 29 cf sub %ecx,%edi <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 110a4d: 89 f8 mov %edi,%eax <== NOT EXECUTED 110a4f: 31 d2 xor %edx,%edx <== NOT EXECUTED 110a51: f7 f1 div %ecx <== NOT EXECUTED 110a53: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 110a56: 89 c7 mov %eax,%edi <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 110a58: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 110a5b: 85 f6 test %esi,%esi <== NOT EXECUTED 110a5d: 74 37 je 110a96 <== NOT EXECUTED if ( !p ) { 110a5f: 85 c0 test %eax,%eax <== NOT EXECUTED 110a61: 75 10 jne 110a73 <== NOT EXECUTED p = memfile_alloc_block(); 110a63: e8 2c ff ff ff call 110994 <== NOT EXECUTED if ( !p ) 110a68: 85 c0 test %eax,%eax <== NOT EXECUTED 110a6a: 0f 84 b7 00 00 00 je 110b27 <== NOT EXECUTED return 0; info->doubly_indirect = p; 110a70: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 110a73: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED 110a76: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 110a78: 85 c0 test %eax,%eax <== NOT EXECUTED 110a7a: 75 0f jne 110a8b <== NOT EXECUTED p1 = memfile_alloc_block(); 110a7c: e8 13 ff ff ff call 110994 <== NOT EXECUTED if ( !p1 ) 110a81: 85 c0 test %eax,%eax <== NOT EXECUTED 110a83: 0f 84 9e 00 00 00 je 110b27 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 110a89: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 110a8b: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 110a8e: 8d 04 88 lea (%eax,%ecx,4),%eax <== NOT EXECUTED 110a91: e9 93 00 00 00 jmp 110b29 <== NOT EXECUTED } if ( !p ) 110a96: 85 c0 test %eax,%eax <== NOT EXECUTED 110a98: 0f 84 89 00 00 00 je 110b27 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 110a9e: 8b 14 b8 mov (%eax,%edi,4),%edx <== NOT EXECUTED 110aa1: eb 7a jmp 110b1d <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 110aa3: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 110aa6: 0f af d1 imul %ecx,%edx <== NOT EXECUTED 110aa9: 4a dec %edx <== NOT EXECUTED 110aaa: 39 d7 cmp %edx,%edi <== NOT EXECUTED 110aac: 77 79 ja 110b27 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 110aae: 29 c7 sub %eax,%edi <== NOT EXECUTED 110ab0: 89 f8 mov %edi,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 110ab2: 31 d2 xor %edx,%edx <== NOT EXECUTED 110ab4: f7 f1 div %ecx <== NOT EXECUTED 110ab6: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 110ab9: 31 d2 xor %edx,%edx <== NOT EXECUTED 110abb: f7 f1 div %ecx <== NOT EXECUTED 110abd: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 110ac0: 89 c7 mov %eax,%edi <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 110ac2: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 110ac5: 85 f6 test %esi,%esi <== NOT EXECUTED 110ac7: 74 43 je 110b0c <== NOT EXECUTED if ( !p ) { 110ac9: 85 c0 test %eax,%eax <== NOT EXECUTED 110acb: 75 0c jne 110ad9 <== NOT EXECUTED p = memfile_alloc_block(); 110acd: e8 c2 fe ff ff call 110994 <== NOT EXECUTED if ( !p ) 110ad2: 85 c0 test %eax,%eax <== NOT EXECUTED 110ad4: 74 51 je 110b27 <== NOT EXECUTED return 0; info->triply_indirect = p; 110ad6: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 110ad9: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED 110adc: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 110ade: 85 c0 test %eax,%eax <== NOT EXECUTED 110ae0: 75 0b jne 110aed <== NOT EXECUTED p1 = memfile_alloc_block(); 110ae2: e8 ad fe ff ff call 110994 <== NOT EXECUTED if ( !p1 ) 110ae7: 85 c0 test %eax,%eax <== NOT EXECUTED 110ae9: 74 3c je 110b27 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 110aeb: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 110aed: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 110af0: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 110af3: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p2 ) { 110af5: 85 c0 test %eax,%eax <== NOT EXECUTED 110af7: 75 0b jne 110b04 <== NOT EXECUTED p2 = memfile_alloc_block(); 110af9: e8 96 fe ff ff call 110994 <== NOT EXECUTED if ( !p2 ) 110afe: 85 c0 test %eax,%eax <== NOT EXECUTED 110b00: 74 25 je 110b27 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 110b02: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 110b04: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 110b07: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED 110b0a: eb 1d jmp 110b29 <== NOT EXECUTED } if ( !p ) 110b0c: 85 c0 test %eax,%eax <== NOT EXECUTED 110b0e: 74 17 je 110b27 <== 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 ]; 110b10: 8b 04 b8 mov (%eax,%edi,4),%eax <== NOT EXECUTED if ( !p1 ) 110b13: 85 c0 test %eax,%eax <== NOT EXECUTED 110b15: 74 10 je 110b27 <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 110b17: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 110b1a: 8b 14 88 mov (%eax,%ecx,4),%edx <== NOT EXECUTED if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 110b1d: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 110b20: 8d 04 8a lea (%edx,%ecx,4),%eax <== NOT EXECUTED p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; p2 = (block_p *)p1[ doubly ]; if ( !p2 ) 110b23: 85 d2 test %edx,%edx 110b25: 75 02 jne 110b29 <== ALWAYS TAKEN return 0; return (block_p *)&p2[ singly ]; 110b27: 31 c0 xor %eax,%eax /* * This means the requested block number is out of range. */ return 0; } 110b29: 8d 65 f4 lea -0xc(%ebp),%esp 110b2c: 5b pop %ebx 110b2d: 5e pop %esi 110b2e: 5f pop %edi 110b2f: c9 leave 110b30: c3 ret =============================================================================== 001112e2 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 1112e2: 55 push %ebp 1112e3: 89 e5 mov %esp,%ebp 1112e5: 57 push %edi 1112e6: 56 push %esi 1112e7: 53 push %ebx 1112e8: 83 ec 3c sub $0x3c,%esp 1112eb: 8b 75 0c mov 0xc(%ebp),%esi 1112ee: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 1112f1: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 1112f5: 75 11 jne 111308 <== ALWAYS TAKEN 1112f7: 68 d0 09 12 00 push $0x1209d0 <== NOT EXECUTED 1112fc: 68 18 0b 12 00 push $0x120b18 <== NOT EXECUTED 111301: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED 111306: eb 1d jmp 111325 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 111308: 8b 55 08 mov 0x8(%ebp),%edx 11130b: 8b 42 4c mov 0x4c(%edx),%eax 11130e: 8d 48 fb lea -0x5(%eax),%ecx 111311: 83 f9 01 cmp $0x1,%ecx 111314: 76 19 jbe 11132f <== ALWAYS TAKEN 111316: 68 91 0a 12 00 push $0x120a91 <== NOT EXECUTED 11131b: 68 18 0b 12 00 push $0x120b18 <== NOT EXECUTED 111320: 68 51 02 00 00 push $0x251 <== NOT EXECUTED 111325: 68 da 09 12 00 push $0x1209da <== NOT EXECUTED 11132a: e8 71 60 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 11132f: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 111333: 75 11 jne 111346 <== ALWAYS TAKEN 111335: 68 dc 0a 12 00 push $0x120adc <== NOT EXECUTED 11133a: 68 18 0b 12 00 push $0x120b18 <== NOT EXECUTED 11133f: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED 111344: eb df jmp 111325 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 111346: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 11134a: 75 13 jne 11135f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 11134c: e8 c3 16 00 00 call 112a14 <__errno> <== NOT EXECUTED 111351: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 111357: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 11135a: e9 d0 01 00 00 jmp 11152f <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 11135f: 83 f8 06 cmp $0x6,%eax 111362: 75 64 jne 1113c8 <== ALWAYS TAKEN unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 111364: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 111367: 8b 49 58 mov 0x58(%ecx),%ecx <== NOT EXECUTED 11136a: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 11136d: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 111370: 8b 48 50 mov 0x50(%eax),%ecx <== NOT EXECUTED 111373: 8b 58 54 mov 0x54(%eax),%ebx <== NOT EXECUTED 111376: 89 c8 mov %ecx,%eax <== NOT EXECUTED 111378: 89 da mov %ebx,%edx <== NOT EXECUTED 11137a: 29 f0 sub %esi,%eax <== NOT EXECUTED 11137c: 19 fa sbb %edi,%edx <== NOT EXECUTED 11137e: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 111381: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 111384: 31 c0 xor %eax,%eax <== NOT EXECUTED 111386: 39 d0 cmp %edx,%eax <== NOT EXECUTED 111388: 7f 0f jg 111399 <== NOT EXECUTED 11138a: 7c 08 jl 111394 <== NOT EXECUTED 11138c: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 11138f: 39 55 18 cmp %edx,0x18(%ebp) <== NOT EXECUTED 111392: 77 05 ja 111399 <== NOT EXECUTED 111394: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED 111397: eb 04 jmp 11139d <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 111399: 89 ca mov %ecx,%edx <== NOT EXECUTED 11139b: 29 f2 sub %esi,%edx <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 11139d: 03 75 c8 add -0x38(%ebp),%esi <== NOT EXECUTED 1113a0: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 1113a3: 89 d1 mov %edx,%ecx <== NOT EXECUTED 1113a5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED IMFS_update_atime( the_jnode ); 1113a7: 51 push %ecx <== NOT EXECUTED 1113a8: 51 push %ecx <== NOT EXECUTED 1113a9: 6a 00 push $0x0 <== NOT EXECUTED 1113ab: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 1113ae: 50 push %eax <== NOT EXECUTED 1113af: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 1113b2: e8 5d 63 ff ff call 107714 <== NOT EXECUTED 1113b7: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1113ba: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 1113bd: 89 41 40 mov %eax,0x40(%ecx) <== NOT EXECUTED return my_length; 1113c0: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 1113c3: e9 64 01 00 00 jmp 11152c <== 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; 1113c8: 89 f0 mov %esi,%eax if ( last_byte > the_jnode->info.file.size ) 1113ca: 8b 55 08 mov 0x8(%ebp),%edx 1113cd: 8b 5a 50 mov 0x50(%edx),%ebx 1113d0: 8b 4d 18 mov 0x18(%ebp),%ecx 1113d3: 01 f1 add %esi,%ecx 1113d5: 89 4d d0 mov %ecx,-0x30(%ebp) 1113d8: 31 c9 xor %ecx,%ecx 1113da: 3b 4a 54 cmp 0x54(%edx),%ecx 1113dd: 7f 0f jg 1113ee <== NEVER TAKEN 1113df: 7c 05 jl 1113e6 <== NEVER TAKEN 1113e1: 39 5d d0 cmp %ebx,-0x30(%ebp) 1113e4: 77 08 ja 1113ee 1113e6: 8b 45 18 mov 0x18(%ebp),%eax 1113e9: 89 45 d0 mov %eax,-0x30(%ebp) 1113ec: eb 05 jmp 1113f3 my_length = the_jnode->info.file.size - start; 1113ee: 29 c3 sub %eax,%ebx 1113f0: 89 5d d0 mov %ebx,-0x30(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 1113f3: 8b 15 a8 5d 12 00 mov 0x125da8,%edx 1113f9: 89 55 c4 mov %edx,-0x3c(%ebp) 1113fc: 89 d0 mov %edx,%eax 1113fe: 99 cltd 1113ff: 89 d3 mov %edx,%ebx 111401: 52 push %edx 111402: 50 push %eax 111403: 57 push %edi 111404: 56 push %esi 111405: 89 45 c0 mov %eax,-0x40(%ebp) 111408: e8 ef c7 00 00 call 11dbfc <__moddi3> 11140d: 83 c4 10 add $0x10,%esp 111410: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 111413: 8b 4d c0 mov -0x40(%ebp),%ecx 111416: 53 push %ebx 111417: 51 push %ecx 111418: 57 push %edi 111419: 56 push %esi 11141a: e8 8d c6 00 00 call 11daac <__divdi3> 11141f: 83 c4 10 add $0x10,%esp 111422: 89 c3 mov %eax,%ebx if ( start_offset ) { 111424: 83 7d c8 00 cmpl $0x0,-0x38(%ebp) 111428: 75 0f jne 111439 11142a: 8b 55 14 mov 0x14(%ebp),%edx 11142d: 89 55 c8 mov %edx,-0x38(%ebp) 111430: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 111437: eb 4c jmp 111485 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 ); 111439: 50 push %eax 11143a: 6a 00 push $0x0 11143c: 53 push %ebx 11143d: ff 75 08 pushl 0x8(%ebp) 111440: e8 71 f5 ff ff call 1109b6 assert( block_ptr ); 111445: 83 c4 10 add $0x10,%esp 111448: 85 c0 test %eax,%eax 11144a: 75 14 jne 111460 <== ALWAYS TAKEN 11144c: 68 57 0a 12 00 push $0x120a57 <== NOT EXECUTED 111451: 68 18 0b 12 00 push $0x120b18 <== NOT EXECUTED 111456: 68 96 02 00 00 push $0x296 <== NOT EXECUTED 11145b: e9 c5 fe ff ff jmp 111325 <== 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; 111460: 8b 4d c4 mov -0x3c(%ebp),%ecx 111463: 2b 4d c8 sub -0x38(%ebp),%ecx 111466: 8b 55 d0 mov -0x30(%ebp),%edx 111469: 39 ca cmp %ecx,%edx 11146b: 76 02 jbe 11146f 11146d: 89 ca mov %ecx,%edx to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 11146f: 8b 75 c8 mov -0x38(%ebp),%esi 111472: 03 30 add (%eax),%esi dest += to_copy; 111474: 8b 7d 14 mov 0x14(%ebp),%edi 111477: 89 d1 mov %edx,%ecx 111479: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 11147b: 89 7d c8 mov %edi,-0x38(%ebp) block++; 11147e: 43 inc %ebx my_length -= to_copy; 11147f: 29 55 d0 sub %edx,-0x30(%ebp) 111482: 89 55 cc mov %edx,-0x34(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 111485: 8b 15 a8 5d 12 00 mov 0x125da8,%edx while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 11148b: eb 40 jmp 1114cd block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 11148d: 57 push %edi 11148e: 6a 00 push $0x0 111490: 53 push %ebx 111491: ff 75 08 pushl 0x8(%ebp) 111494: 89 55 c0 mov %edx,-0x40(%ebp) 111497: e8 1a f5 ff ff call 1109b6 assert( block_ptr ); 11149c: 83 c4 10 add $0x10,%esp 11149f: 85 c0 test %eax,%eax 1114a1: 8b 55 c0 mov -0x40(%ebp),%edx 1114a4: 75 14 jne 1114ba <== ALWAYS TAKEN 1114a6: 68 57 0a 12 00 push $0x120a57 <== NOT EXECUTED 1114ab: 68 18 0b 12 00 push $0x120b18 <== NOT EXECUTED 1114b0: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED 1114b5: e9 6b fe ff ff jmp 111325 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 1114ba: 8b 30 mov (%eax),%esi 1114bc: 8b 7d c8 mov -0x38(%ebp),%edi 1114bf: 89 d1 mov %edx,%ecx 1114c1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 1114c3: 89 7d c8 mov %edi,-0x38(%ebp) block++; 1114c6: 43 inc %ebx my_length -= to_copy; 1114c7: 29 55 d0 sub %edx,-0x30(%ebp) copied += to_copy; 1114ca: 01 55 cc add %edx,-0x34(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1114cd: 8b 45 d0 mov -0x30(%ebp),%eax 1114d0: 3b 05 a8 5d 12 00 cmp 0x125da8,%eax 1114d6: 73 b5 jae 11148d * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 1114d8: 85 c0 test %eax,%eax 1114da: 74 37 je 111513 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1114dc: 56 push %esi 1114dd: 6a 00 push $0x0 1114df: 53 push %ebx 1114e0: ff 75 08 pushl 0x8(%ebp) 1114e3: e8 ce f4 ff ff call 1109b6 assert( block_ptr ); 1114e8: 83 c4 10 add $0x10,%esp 1114eb: 85 c0 test %eax,%eax 1114ed: 75 14 jne 111503 <== ALWAYS TAKEN 1114ef: 68 57 0a 12 00 push $0x120a57 <== NOT EXECUTED 1114f4: 68 18 0b 12 00 push $0x120b18 <== NOT EXECUTED 1114f9: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED 1114fe: e9 22 fe ff ff jmp 111325 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 111503: 8b 30 mov (%eax),%esi 111505: 8b 7d c8 mov -0x38(%ebp),%edi 111508: 8b 4d d0 mov -0x30(%ebp),%ecx 11150b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 11150d: 8b 55 d0 mov -0x30(%ebp),%edx 111510: 01 55 cc add %edx,-0x34(%ebp) } IMFS_update_atime( the_jnode ); 111513: 53 push %ebx 111514: 53 push %ebx 111515: 6a 00 push $0x0 111517: 8d 45 e0 lea -0x20(%ebp),%eax 11151a: 50 push %eax 11151b: e8 f4 61 ff ff call 107714 111520: 8b 45 e0 mov -0x20(%ebp),%eax 111523: 8b 4d 08 mov 0x8(%ebp),%ecx 111526: 89 41 40 mov %eax,0x40(%ecx) return copied; 111529: 8b 55 cc mov -0x34(%ebp),%edx 11152c: 83 c4 10 add $0x10,%esp } 11152f: 89 d0 mov %edx,%eax 111531: 8d 65 f4 lea -0xc(%ebp),%esp 111534: 5b pop %ebx 111535: 5e pop %esi 111536: 5f pop %edi 111537: c9 leave 111538: c3 ret =============================================================================== 00110be6 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 110be6: 55 push %ebp 110be7: 89 e5 mov %esp,%ebp 110be9: 57 push %edi 110bea: 56 push %esi 110beb: 53 push %ebx 110bec: 83 ec 1c sub $0x1c,%esp 110bef: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Perform internal consistency checks */ assert( the_jnode ); 110bf2: 85 db test %ebx,%ebx 110bf4: 75 11 jne 110c07 <== ALWAYS TAKEN 110bf6: 68 d0 09 12 00 push $0x1209d0 <== NOT EXECUTED 110bfb: 68 2c 0b 12 00 push $0x120b2c <== NOT EXECUTED 110c00: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED 110c05: eb 15 jmp 110c1c <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 110c07: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 110c0b: 74 19 je 110c26 <== ALWAYS TAKEN 110c0d: 68 27 0a 12 00 push $0x120a27 <== NOT EXECUTED 110c12: 68 2c 0b 12 00 push $0x120b2c <== NOT EXECUTED 110c17: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED 110c1c: 68 da 09 12 00 push $0x1209da <== NOT EXECUTED 110c21: e8 7a 67 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 110c26: 8b 35 a8 5d 12 00 mov 0x125da8,%esi 110c2c: c1 ee 02 shr $0x2,%esi * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 110c2f: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 110c33: 74 0f je 110c44 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 110c35: 57 push %edi 110c36: 57 push %edi 110c37: 56 push %esi 110c38: 8d 43 58 lea 0x58(%ebx),%eax 110c3b: 50 push %eax 110c3c: e8 f0 fe ff ff call 110b31 110c41: 83 c4 10 add $0x10,%esp * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 110c44: 31 ff xor %edi,%edi 110c46: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 110c4a: 75 21 jne 110c6d <== NEVER TAKEN 110c4c: eb 3a jmp 110c88 } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 110c4e: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 110c51: 8d 14 bd 00 00 00 00 lea 0x0(,%edi,4),%edx <== NOT EXECUTED 110c58: 83 3c b8 00 cmpl $0x0,(%eax,%edi,4) <== NOT EXECUTED 110c5c: 74 0e je 110c6c <== NOT EXECUTED memfile_free_blocks_in_table( 110c5e: 51 push %ecx <== NOT EXECUTED 110c5f: 51 push %ecx <== NOT EXECUTED 110c60: 56 push %esi <== NOT EXECUTED 110c61: 01 d0 add %edx,%eax <== NOT EXECUTED 110c63: 50 push %eax <== NOT EXECUTED 110c64: e8 c8 fe ff ff call 110b31 <== NOT EXECUTED 110c69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i<== 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 ); 110c79: 57 push %edi <== NOT EXECUTED 110c7a: 57 push %edi <== NOT EXECUTED 110c7b: 56 push %esi <== NOT EXECUTED 110c7c: 8d 43 5c lea 0x5c(%ebx),%eax <== NOT EXECUTED 110c7f: 50 push %eax <== NOT EXECUTED 110c80: e8 ac fe ff ff call 110b31 <== NOT EXECUTED 110c85: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 110c88: 31 ff xor %edi,%edi 110c8a: 83 7b 60 00 cmpl $0x0,0x60(%ebx) 110c8e: 75 5b jne 110ceb <== NEVER TAKEN 110c90: eb 74 jmp 110d06 110c92: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax <== NOT EXECUTED 110c99: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 110c9c: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 110c9f: 8b 04 b8 mov (%eax,%edi,4),%eax <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 110ca2: 85 c0 test %eax,%eax <== NOT EXECUTED 110ca4: 74 51 je 110cf7 <== NOT EXECUTED 110ca6: 31 d2 xor %edx,%edx <== NOT EXECUTED 110ca8: eb 21 jmp 110ccb <== NOT EXECUTED break; for ( j=0 ; j<== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 110caf: 51 push %ecx <== NOT EXECUTED 110cb0: 51 push %ecx <== NOT EXECUTED 110cb1: 56 push %esi <== NOT EXECUTED 110cb2: 50 push %eax <== NOT EXECUTED 110cb3: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 110cb6: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 110cb9: e8 73 fe ff ff call 110b31 <== NOT EXECUTED 110cbe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110cc1: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 110cc4: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j<== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 110cd8: 52 push %edx <== NOT EXECUTED 110cd9: 52 push %edx <== NOT EXECUTED 110cda: 56 push %esi <== NOT EXECUTED 110cdb: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 110cde: 03 43 60 add 0x60(%ebx),%eax <== NOT EXECUTED 110ce1: 50 push %eax <== NOT EXECUTED 110ce2: e8 4a fe ff ff call 110b31 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i<== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 110cf7: 50 push %eax <== NOT EXECUTED 110cf8: 50 push %eax <== NOT EXECUTED 110cf9: 56 push %esi <== NOT EXECUTED 110cfa: 83 c3 60 add $0x60,%ebx <== NOT EXECUTED 110cfd: 53 push %ebx <== NOT EXECUTED 110cfe: e8 2e fe ff ff call 110b31 <== NOT EXECUTED 110d03: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 110d06: 31 c0 xor %eax,%eax 110d08: 8d 65 f4 lea -0xc(%ebp),%esp 110d0b: 5b pop %ebx 110d0c: 5e pop %esi 110d0d: 5f pop %edi 110d0e: c9 leave 110d0f: c3 ret =============================================================================== 00110b9b : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 110b9b: 55 push %ebp <== NOT EXECUTED 110b9c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 110b9e: 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 ); 110ba1: 6a 00 push $0x0 <== NOT EXECUTED 110ba3: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 110ba6: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 110ba9: e8 08 fe ff ff call 1109b6 <== NOT EXECUTED assert( block_ptr ); 110bae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110bb1: 85 c0 test %eax,%eax <== NOT EXECUTED 110bb3: 75 19 jne 110bce <== NOT EXECUTED 110bb5: 68 57 0a 12 00 push $0x120a57 <== NOT EXECUTED 110bba: 68 60 0b 12 00 push $0x120b60 <== NOT EXECUTED 110bbf: 68 96 01 00 00 push $0x196 <== NOT EXECUTED 110bc4: 68 da 09 12 00 push $0x1209da <== NOT EXECUTED 110bc9: e8 d2 67 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 110bce: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 110bd0: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 110bd6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110bd9: 52 push %edx <== NOT EXECUTED 110bda: e8 9c fd ff ff call 11097b <== NOT EXECUTED } return 1; } 110bdf: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 110be4: c9 leave <== NOT EXECUTED 110be5: c3 ret <== NOT EXECUTED =============================================================================== 0011102e : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 11102e: 55 push %ebp 11102f: 89 e5 mov %esp,%ebp 111031: 57 push %edi 111032: 56 push %esi 111033: 53 push %ebx 111034: 83 ec 3c sub $0x3c,%esp 111037: 8b 75 0c mov 0xc(%ebp),%esi 11103a: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 11103d: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 111041: 75 11 jne 111054 <== ALWAYS TAKEN 111043: 68 d0 09 12 00 push $0x1209d0 <== NOT EXECUTED 111048: 68 04 0b 12 00 push $0x120b04 <== NOT EXECUTED 11104d: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED 111052: eb 18 jmp 11106c <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 111054: 8b 45 08 mov 0x8(%ebp),%eax 111057: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 11105b: 74 19 je 111076 <== ALWAYS TAKEN 11105d: 68 27 0a 12 00 push $0x120a27 <== NOT EXECUTED 111062: 68 04 0b 12 00 push $0x120b04 <== NOT EXECUTED 111067: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED 11106c: 68 da 09 12 00 push $0x1209da <== NOT EXECUTED 111071: e8 2a 63 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 111076: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 11107a: 75 11 jne 11108d <== ALWAYS TAKEN 11107c: 68 61 0a 12 00 push $0x120a61 <== NOT EXECUTED 111081: 68 04 0b 12 00 push $0x120b04 <== NOT EXECUTED 111086: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED 11108b: eb df jmp 11106c <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 11108d: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 111091: 75 0d jne 1110a0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 111093: e8 7c 19 00 00 call 112a14 <__errno> <== NOT EXECUTED 111098: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11109e: eb 33 jmp 1110d3 <== NOT EXECUTED * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 1110a0: 8b 45 18 mov 0x18(%ebp),%eax 1110a3: 01 f0 add %esi,%eax 1110a5: 31 d2 xor %edx,%edx 1110a7: 8b 4d 08 mov 0x8(%ebp),%ecx 1110aa: 3b 51 54 cmp 0x54(%ecx),%edx 1110ad: 7c 2c jl 1110db <== NEVER TAKEN 1110af: 7f 05 jg 1110b6 <== NEVER TAKEN 1110b1: 3b 41 50 cmp 0x50(%ecx),%eax 1110b4: 76 25 jbe 1110db <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 1110b6: 51 push %ecx 1110b7: 52 push %edx 1110b8: 50 push %eax 1110b9: ff 75 08 pushl 0x8(%ebp) 1110bc: e8 8a fd ff ff call 110e4b if ( status ) 1110c1: 83 c4 10 add $0x10,%esp 1110c4: 85 c0 test %eax,%eax 1110c6: 74 13 je 1110db <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 1110c8: e8 47 19 00 00 call 112a14 <__errno> <== NOT EXECUTED 1110cd: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 1110d3: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 1110d6: e9 3b 01 00 00 jmp 111216 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 1110db: a1 a8 5d 12 00 mov 0x125da8,%eax 1110e0: 89 45 c8 mov %eax,-0x38(%ebp) 1110e3: 99 cltd 1110e4: 89 d3 mov %edx,%ebx 1110e6: 52 push %edx 1110e7: 50 push %eax 1110e8: 57 push %edi 1110e9: 56 push %esi 1110ea: 89 45 c4 mov %eax,-0x3c(%ebp) 1110ed: e8 0a cb 00 00 call 11dbfc <__moddi3> 1110f2: 83 c4 10 add $0x10,%esp 1110f5: 89 45 cc mov %eax,-0x34(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 1110f8: 8b 4d c4 mov -0x3c(%ebp),%ecx 1110fb: 53 push %ebx 1110fc: 51 push %ecx 1110fd: 57 push %edi 1110fe: 56 push %esi 1110ff: e8 a8 c9 00 00 call 11daac <__divdi3> 111104: 83 c4 10 add $0x10,%esp 111107: 89 45 d0 mov %eax,-0x30(%ebp) if ( start_offset ) { 11110a: 83 7d cc 00 cmpl $0x0,-0x34(%ebp) 11110e: 75 0d jne 11111d 111110: 8b 75 14 mov 0x14(%ebp),%esi 111113: 8b 55 18 mov 0x18(%ebp),%edx 111116: 89 55 d4 mov %edx,-0x2c(%ebp) 111119: 31 db xor %ebx,%ebx 11111b: eb 52 jmp 11116f 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 ); 11111d: 50 push %eax 11111e: 6a 00 push $0x0 111120: ff 75 d0 pushl -0x30(%ebp) 111123: ff 75 08 pushl 0x8(%ebp) 111126: e8 8b f8 ff ff call 1109b6 assert( block_ptr ); 11112b: 83 c4 10 add $0x10,%esp 11112e: 85 c0 test %eax,%eax 111130: 75 14 jne 111146 <== ALWAYS TAKEN 111132: 68 57 0a 12 00 push $0x120a57 <== NOT EXECUTED 111137: 68 04 0b 12 00 push $0x120b04 <== NOT EXECUTED 11113c: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED 111141: e9 26 ff ff ff jmp 11106c <== 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; 111146: 8b 55 c8 mov -0x38(%ebp),%edx 111149: 2b 55 cc sub -0x34(%ebp),%edx 11114c: 3b 55 18 cmp 0x18(%ebp),%edx 11114f: 76 03 jbe 111154 111151: 8b 55 18 mov 0x18(%ebp),%edx if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 111154: 8b 00 mov (%eax),%eax 111156: 03 45 cc add -0x34(%ebp),%eax src += to_copy; 111159: 89 c7 mov %eax,%edi 11115b: 8b 75 14 mov 0x14(%ebp),%esi 11115e: 89 d1 mov %edx,%ecx 111160: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 111162: ff 45 d0 incl -0x30(%ebp) my_length -= to_copy; 111165: 8b 4d 18 mov 0x18(%ebp),%ecx 111168: 29 d1 sub %edx,%ecx 11116a: 89 4d d4 mov %ecx,-0x2c(%ebp) copied += to_copy; 11116d: 89 d3 mov %edx,%ebx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 11116f: 8b 15 a8 5d 12 00 mov 0x125da8,%edx while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 111175: eb 3f jmp 1111b6 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 111177: 57 push %edi 111178: 6a 00 push $0x0 11117a: ff 75 d0 pushl -0x30(%ebp) 11117d: ff 75 08 pushl 0x8(%ebp) 111180: 89 55 c4 mov %edx,-0x3c(%ebp) 111183: e8 2e f8 ff ff call 1109b6 assert( block_ptr ); 111188: 83 c4 10 add $0x10,%esp 11118b: 85 c0 test %eax,%eax 11118d: 8b 55 c4 mov -0x3c(%ebp),%edx 111190: 75 14 jne 1111a6 <== ALWAYS TAKEN 111192: 68 57 0a 12 00 push $0x120a57 <== NOT EXECUTED 111197: 68 04 0b 12 00 push $0x120b04 <== NOT EXECUTED 11119c: 68 30 03 00 00 push $0x330 <== NOT EXECUTED 1111a1: e9 c6 fe ff ff jmp 11106c <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 1111a6: 8b 00 mov (%eax),%eax src += to_copy; 1111a8: 89 c7 mov %eax,%edi 1111aa: 89 d1 mov %edx,%ecx 1111ac: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 1111ae: ff 45 d0 incl -0x30(%ebp) my_length -= to_copy; 1111b1: 29 55 d4 sub %edx,-0x2c(%ebp) * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 1111b4: 01 d3 add %edx,%ebx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1111b6: 8b 45 d4 mov -0x2c(%ebp),%eax 1111b9: 3b 05 a8 5d 12 00 cmp 0x125da8,%eax 1111bf: 73 b6 jae 111177 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 1111c1: 85 c0 test %eax,%eax 1111c3: 74 35 je 1111fa block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1111c5: 51 push %ecx 1111c6: 6a 00 push $0x0 1111c8: ff 75 d0 pushl -0x30(%ebp) 1111cb: ff 75 08 pushl 0x8(%ebp) 1111ce: e8 e3 f7 ff ff call 1109b6 assert( block_ptr ); 1111d3: 83 c4 10 add $0x10,%esp 1111d6: 85 c0 test %eax,%eax 1111d8: 75 14 jne 1111ee <== ALWAYS TAKEN 1111da: 68 57 0a 12 00 push $0x120a57 <== NOT EXECUTED 1111df: 68 04 0b 12 00 push $0x120b04 <== NOT EXECUTED 1111e4: 68 46 03 00 00 push $0x346 <== NOT EXECUTED 1111e9: e9 7e fe ff ff jmp 11106c <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 1111ee: 8b 00 mov (%eax),%eax 1111f0: 89 c7 mov %eax,%edi 1111f2: 8b 4d d4 mov -0x2c(%ebp),%ecx 1111f5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 1111f7: 03 5d d4 add -0x2c(%ebp),%ebx } IMFS_mtime_ctime_update( the_jnode ); 1111fa: 52 push %edx 1111fb: 52 push %edx 1111fc: 6a 00 push $0x0 1111fe: 8d 45 e0 lea -0x20(%ebp),%eax 111201: 50 push %eax 111202: e8 0d 65 ff ff call 107714 111207: 8b 45 e0 mov -0x20(%ebp),%eax 11120a: 8b 55 08 mov 0x8(%ebp),%edx 11120d: 89 42 44 mov %eax,0x44(%edx) 111210: 89 42 48 mov %eax,0x48(%edx) return copied; 111213: 83 c4 10 add $0x10,%esp } 111216: 89 d8 mov %ebx,%eax 111218: 8d 65 f4 lea -0xc(%ebp),%esp 11121b: 5b pop %ebx 11121c: 5e pop %esi 11121d: 5f pop %edi 11121e: c9 leave 11121f: c3 ret =============================================================================== 00106f68 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 106f68: 55 push %ebp 106f69: 89 e5 mov %esp,%ebp 106f6b: 57 push %edi 106f6c: 56 push %esi 106f6d: 53 push %ebx 106f6e: 83 ec 4c sub $0x4c,%esp 106f71: 8b 55 08 mov 0x8(%ebp),%edx 106f74: 8b 5d 10 mov 0x10(%ebp),%ebx 106f77: 8b 75 14 mov 0x14(%ebp),%esi IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 106f7a: 31 c0 xor %eax,%eax 106f7c: 83 c9 ff or $0xffffffff,%ecx 106f7f: 89 d7 mov %edx,%edi 106f81: f2 ae repnz scas %es:(%edi),%al 106f83: f7 d1 not %ecx 106f85: 49 dec %ecx 106f86: 8d 45 e4 lea -0x1c(%ebp),%eax 106f89: 50 push %eax 106f8a: 8d 45 af lea -0x51(%ebp),%eax 106f8d: 50 push %eax 106f8e: 51 push %ecx 106f8f: 52 push %edx 106f90: e8 d7 7b 00 00 call 10eb6c /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 106f95: 8b 45 0c mov 0xc(%ebp),%eax 106f98: 25 00 f0 00 00 and $0xf000,%eax 106f9d: 83 c4 10 add $0x10,%esp 106fa0: 3d 00 40 00 00 cmp $0x4000,%eax 106fa5: 74 40 je 106fe7 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 106fa7: ba 05 00 00 00 mov $0x5,%edx 106fac: 3d 00 80 00 00 cmp $0x8000,%eax 106fb1: 74 39 je 106fec type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 106fb3: 3d 00 20 00 00 cmp $0x2000,%eax 106fb8: 74 07 je 106fc1 106fba: 3d 00 60 00 00 cmp $0x6000,%eax 106fbf: 75 0d jne 106fce type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 106fc1: 89 5d d0 mov %ebx,-0x30(%ebp) 106fc4: 89 75 d4 mov %esi,-0x2c(%ebp) 106fc7: ba 02 00 00 00 mov $0x2,%edx 106fcc: eb 1e jmp 106fec } else if (S_ISFIFO(mode)) 106fce: ba 07 00 00 00 mov $0x7,%edx 106fd3: 3d 00 10 00 00 cmp $0x1000,%eax 106fd8: 74 12 je 106fec <== ALWAYS TAKEN type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 106fda: e8 35 ba 00 00 call 112a14 <__errno> <== NOT EXECUTED 106fdf: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 106fe5: eb 32 jmp 107019 <== NOT EXECUTED 106fe7: ba 01 00 00 00 mov $0x1,%edx * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 106fec: 83 ec 0c sub $0xc,%esp 106fef: 8d 45 d0 lea -0x30(%ebp),%eax 106ff2: 50 push %eax 106ff3: ff 75 0c pushl 0xc(%ebp) 106ff6: 8d 45 af lea -0x51(%ebp),%eax 106ff9: 50 push %eax 106ffa: 52 push %edx 106ffb: ff 75 18 pushl 0x18(%ebp) 106ffe: e8 63 70 00 00 call 10e066 107003: 89 c2 mov %eax,%edx new_name, mode, &info ); if ( !new_node ) 107005: 83 c4 20 add $0x20,%esp 107008: 31 c0 xor %eax,%eax 10700a: 85 d2 test %edx,%edx 10700c: 75 0e jne 10701c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 10700e: e8 01 ba 00 00 call 112a14 <__errno> <== NOT EXECUTED 107013: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107019: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return 0; } 10701c: 8d 65 f4 lea -0xc(%ebp),%esp 10701f: 5b pop %ebx 107020: 5e pop %esi 107021: 5f pop %edi 107022: c9 leave 107023: c3 ret =============================================================================== 00107024 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107024: 55 push %ebp 107025: 89 e5 mov %esp,%ebp 107027: 83 ec 08 sub $0x8,%esp 10702a: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 10702d: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107030: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107034: 74 10 je 107046 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 107036: e8 d9 b9 00 00 call 112a14 <__errno> <== NOT EXECUTED 10703b: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107041: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107044: eb 05 jmp 10704b <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 107046: 89 50 5c mov %edx,0x5c(%eax) 107049: 31 c0 xor %eax,%eax return 0; } 10704b: c9 leave 10704c: c3 ret =============================================================================== 00108d2e : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 108d2e: 55 push %ebp 108d2f: 89 e5 mov %esp,%ebp 108d31: 53 push %ebx 108d32: 83 ec 04 sub $0x4,%esp 108d35: 8b 5d 08 mov 0x8(%ebp),%ebx assert( the_jnode ); 108d38: 85 db test %ebx,%ebx 108d3a: 75 11 jne 108d4d <== ALWAYS TAKEN 108d3c: 68 7c 51 12 00 push $0x12517c <== NOT EXECUTED 108d41: 68 38 53 12 00 push $0x125338 <== NOT EXECUTED 108d46: 6a 38 push $0x38 <== NOT EXECUTED 108d48: e9 98 00 00 00 jmp 108de5 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 108d4d: 50 push %eax 108d4e: 50 push %eax 108d4f: a1 e0 a4 12 00 mov 0x12a4e0,%eax 108d54: ff 70 08 pushl 0x8(%eax) 108d57: 8d 43 0c lea 0xc(%ebx),%eax 108d5a: 50 push %eax 108d5b: e8 18 d6 00 00 call 116378 switch( the_jnode->type ) { 108d60: 8b 43 4c mov 0x4c(%ebx),%eax 108d63: 83 c4 10 add $0x10,%esp 108d66: 8d 50 ff lea -0x1(%eax),%edx 108d69: 83 fa 06 cmp $0x6,%edx 108d6c: 0f 87 b7 00 00 00 ja 108e29 <== NEVER TAKEN 108d72: a1 e0 a4 12 00 mov 0x12a4e0,%eax 108d77: ff 24 95 08 53 12 00 jmp *0x125308(,%edx,4) case IMFS_DIRECTORY: fprintf(stdout, "/" ); 108d7e: 53 push %ebx 108d7f: 53 push %ebx 108d80: ff 70 08 pushl 0x8(%eax) 108d83: 6a 2f push $0x2f 108d85: e8 02 d5 00 00 call 11628c 108d8a: eb 2b jmp 108db7 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 108d8c: ff 73 54 pushl 0x54(%ebx) 108d8f: ff 73 50 pushl 0x50(%ebx) 108d92: 68 d6 51 12 00 push $0x1251d6 108d97: eb 16 jmp 108daf the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 108d99: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 108d9c: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 108d9f: 68 e9 51 12 00 push $0x1251e9 <== NOT EXECUTED 108da4: eb 09 jmp 108daf <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 108da6: 51 push %ecx 108da7: ff 73 50 pushl 0x50(%ebx) 108daa: 68 f8 51 12 00 push $0x1251f8 108daf: ff 70 08 pushl 0x8(%eax) 108db2: e8 99 d4 00 00 call 116250 (uint32_t)the_jnode->info.file.size ); #endif break; 108db7: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 108dba: c7 45 08 4d 55 12 00 movl $0x12554d,0x8(%ebp) } 108dc1: 8b 5d fc mov -0x4(%ebp),%ebx 108dc4: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 108dc5: e9 e6 ed 00 00 jmp 117bb0 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 108dca: 52 push %edx <== NOT EXECUTED 108dcb: 52 push %edx <== NOT EXECUTED 108dcc: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108dcf: 68 04 52 12 00 push $0x125204 <== NOT EXECUTED 108dd4: e8 9f d5 00 00 call 116378 <== NOT EXECUTED assert(0); 108dd9: 68 cf 49 12 00 push $0x1249cf <== NOT EXECUTED 108dde: 68 38 53 12 00 push $0x125338 <== NOT EXECUTED 108de3: 6a 5d push $0x5d <== NOT EXECUTED 108de5: 68 86 51 12 00 push $0x125186 <== NOT EXECUTED 108dea: e8 c9 07 00 00 call 1095b8 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 108def: 53 push %ebx <== NOT EXECUTED 108df0: 53 push %ebx <== NOT EXECUTED 108df1: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108df4: 68 04 52 12 00 push $0x125204 <== NOT EXECUTED 108df9: e8 7a d5 00 00 call 116378 <== NOT EXECUTED assert(0); 108dfe: 68 cf 49 12 00 push $0x1249cf <== NOT EXECUTED 108e03: 68 38 53 12 00 push $0x125338 <== NOT EXECUTED 108e08: 6a 62 push $0x62 <== NOT EXECUTED 108e0a: eb d9 jmp 108de5 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 108e0c: 51 push %ecx <== NOT EXECUTED 108e0d: 51 push %ecx <== NOT EXECUTED 108e0e: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108e11: 68 18 52 12 00 push $0x125218 <== NOT EXECUTED 108e16: e8 5d d5 00 00 call 116378 <== NOT EXECUTED assert(0); 108e1b: 68 cf 49 12 00 push $0x1249cf <== NOT EXECUTED 108e20: 68 38 53 12 00 push $0x125338 <== NOT EXECUTED 108e25: 6a 67 push $0x67 <== NOT EXECUTED 108e27: eb bc jmp 108de5 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 108e29: 52 push %edx <== NOT EXECUTED 108e2a: 50 push %eax <== NOT EXECUTED 108e2b: 68 2b 52 12 00 push $0x12522b <== NOT EXECUTED 108e30: a1 e0 a4 12 00 mov 0x12a4e0,%eax <== NOT EXECUTED 108e35: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108e38: e8 13 d4 00 00 call 116250 <== NOT EXECUTED assert(0); 108e3d: 68 cf 49 12 00 push $0x1249cf <== NOT EXECUTED 108e42: 68 38 53 12 00 push $0x125338 <== NOT EXECUTED 108e47: 6a 6c push $0x6c <== NOT EXECUTED 108e49: eb 9a jmp 108de5 <== NOT EXECUTED =============================================================================== 00107060 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 107060: 55 push %ebp 107061: 89 e5 mov %esp,%ebp 107063: 56 push %esi 107064: 53 push %ebx 107065: 8b 75 0c mov 0xc(%ebp),%esi 107068: 8b 5d 10 mov 0x10(%ebp),%ebx IMFS_jnode_t *node; int i; node = loc->node_access; 10706b: 8b 45 08 mov 0x8(%ebp),%eax 10706e: 8b 10 mov (%eax),%edx if ( node->type != IMFS_SYM_LINK ) 107070: 31 c0 xor %eax,%eax 107072: 83 7a 4c 04 cmpl $0x4,0x4c(%edx) 107076: 74 14 je 10708c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 107078: e8 97 b9 00 00 call 112a14 <__errno> <== NOT EXECUTED 10707d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107083: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107086: eb 12 jmp 10709a <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 107088: 88 0c 06 mov %cl,(%esi,%eax,1) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 10708b: 40 inc %eax 10708c: 39 d8 cmp %ebx,%eax 10708e: 73 0a jae 10709a 107090: 8b 4a 50 mov 0x50(%edx),%ecx 107093: 8a 0c 01 mov (%ecx,%eax,1),%cl 107096: 84 c9 test %cl,%cl 107098: 75 ee jne 107088 buf[i] = node->info.sym_link.name[i]; return i; } 10709a: 5b pop %ebx 10709b: 5e pop %esi 10709c: c9 leave 10709d: c3 ret =============================================================================== 001070a0 : 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 */ ) { 1070a0: 55 push %ebp 1070a1: 89 e5 mov %esp,%ebp 1070a3: 53 push %ebx 1070a4: 83 ec 18 sub $0x18,%esp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 1070a7: 8b 45 0c mov 0xc(%ebp),%eax 1070aa: 8b 18 mov (%eax),%ebx strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 1070ac: 6a 20 push $0x20 1070ae: ff 75 14 pushl 0x14(%ebp) 1070b1: 8d 43 0c lea 0xc(%ebx),%eax 1070b4: 50 push %eax 1070b5: e8 6e c6 00 00 call 113728 if ( the_jnode->Parent != NULL ) 1070ba: 83 c4 10 add $0x10,%esp 1070bd: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 1070c1: 74 0c je 1070cf <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 1070c3: 83 ec 0c sub $0xc,%esp 1070c6: 53 push %ebx 1070c7: e8 8c 3d 00 00 call 10ae58 <_Chain_Extract> 1070cc: 83 c4 10 add $0x10,%esp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 1070cf: 8b 45 10 mov 0x10(%ebp),%eax 1070d2: 8b 00 mov (%eax),%eax the_jnode->Parent = new_parent; 1070d4: 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 ); 1070d7: 51 push %ecx 1070d8: 51 push %ecx 1070d9: 53 push %ebx 1070da: 83 c0 50 add $0x50,%eax 1070dd: 50 push %eax 1070de: e8 51 3d 00 00 call 10ae34 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 1070e3: 58 pop %eax 1070e4: 5a pop %edx 1070e5: 6a 00 push $0x0 1070e7: 8d 45 f0 lea -0x10(%ebp),%eax 1070ea: 50 push %eax 1070eb: e8 24 06 00 00 call 107714 1070f0: 8b 45 f0 mov -0x10(%ebp),%eax 1070f3: 89 43 48 mov %eax,0x48(%ebx) return 0; } 1070f6: 31 c0 xor %eax,%eax 1070f8: 8b 5d fc mov -0x4(%ebp),%ebx 1070fb: c9 leave 1070fc: c3 ret =============================================================================== 0010ec2c : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 10ec2c: 55 push %ebp 10ec2d: 89 e5 mov %esp,%ebp 10ec2f: 56 push %esi 10ec30: 53 push %ebx 10ec31: 83 ec 10 sub $0x10,%esp 10ec34: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 10ec37: 8b 1e mov (%esi),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 10ec39: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10ec3d: 74 13 je 10ec52 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10ec3f: 83 ec 0c sub $0xc,%esp 10ec42: 53 push %ebx 10ec43: e8 10 c2 ff ff call 10ae58 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 10ec48: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10ec4f: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 10ec52: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 10ec56: 50 push %eax 10ec57: 50 push %eax 10ec58: 6a 00 push $0x0 10ec5a: 8d 45 f0 lea -0x10(%ebp),%eax 10ec5d: 50 push %eax 10ec5e: e8 b1 8a ff ff call 107714 10ec63: 8b 45 f0 mov -0x10(%ebp),%eax 10ec66: 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) ) { 10ec69: 89 1c 24 mov %ebx,(%esp) 10ec6c: e8 b1 02 00 00 call 10ef22 10ec71: 83 c4 10 add $0x10,%esp 10ec74: 85 c0 test %eax,%eax 10ec76: 75 3f jne 10ecb7 <== NEVER TAKEN 10ec78: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 10ec7d: 75 38 jne 10ecb7 <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 10ec7f: a1 54 3f 12 00 mov 0x123f54,%eax 10ec84: 8b 50 04 mov 0x4(%eax),%edx 10ec87: 3b 16 cmp (%esi),%edx 10ec89: 75 07 jne 10ec92 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 10ec8b: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 10ec92: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 10ec96: 75 13 jne 10ecab if ( the_jnode->info.sym_link.name ) 10ec98: 8b 43 50 mov 0x50(%ebx),%eax 10ec9b: 85 c0 test %eax,%eax 10ec9d: 74 0c je 10ecab <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); 10ec9f: 83 ec 0c sub $0xc,%esp 10eca2: 50 push %eax 10eca3: e8 f4 89 ff ff call 10769c 10eca8: 83 c4 10 add $0x10,%esp } free( the_jnode ); 10ecab: 83 ec 0c sub $0xc,%esp 10ecae: 53 push %ebx 10ecaf: e8 e8 89 ff ff call 10769c 10ecb4: 83 c4 10 add $0x10,%esp } return 0; } 10ecb7: 31 c0 xor %eax,%eax 10ecb9: 8d 65 f8 lea -0x8(%ebp),%esp 10ecbc: 5b pop %ebx 10ecbd: 5e pop %esi 10ecbe: c9 leave 10ecbf: c3 ret =============================================================================== 0010ecc0 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 10ecc0: 55 push %ebp 10ecc1: 89 e5 mov %esp,%ebp 10ecc3: 56 push %esi 10ecc4: 53 push %ebx 10ecc5: 8b 4d 08 mov 0x8(%ebp),%ecx 10ecc8: 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; 10eccb: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 10eccd: 8b 5a 4c mov 0x4c(%edx),%ebx 10ecd0: 83 eb 02 sub $0x2,%ebx 10ecd3: 83 fb 05 cmp $0x5,%ebx 10ecd6: 77 33 ja 10ed0b <== NEVER TAKEN 10ecd8: ff 24 9d 64 07 12 00 jmp *0x120764(,%ebx,4) case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 10ecdf: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 10ece2: 8b 72 50 mov 0x50(%edx),%esi 10ece5: 89 70 18 mov %esi,0x18(%eax) 10ece8: 89 58 1c mov %ebx,0x1c(%eax) break; 10eceb: eb 2e jmp 10ed1b case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 10eced: 8b 5a 50 mov 0x50(%edx),%ebx 10ecf0: 8b 72 54 mov 0x54(%edx),%esi 10ecf3: 89 58 20 mov %ebx,0x20(%eax) 10ecf6: 89 70 24 mov %esi,0x24(%eax) break; 10ecf9: eb 20 jmp 10ed1b case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 10ecfb: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED 10ed02: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) <== NOT EXECUTED break; 10ed09: eb 10 jmp 10ed1b <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ed0b: e8 04 3d 00 00 call 112a14 <__errno> <== NOT EXECUTED 10ed10: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10ed16: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10ed19: eb 50 jmp 10ed6b <== 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 ); 10ed1b: 8b 49 10 mov 0x10(%ecx),%ecx 10ed1e: 8b 49 34 mov 0x34(%ecx),%ecx 10ed21: 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 = 10ed23: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 10ed29: 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; 10ed2c: 8b 4a 30 mov 0x30(%edx),%ecx 10ed2f: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 10ed32: 8b 4a 34 mov 0x34(%edx),%ecx 10ed35: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 10ed39: 8b 4a 38 mov 0x38(%edx),%ecx 10ed3c: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 10ed3f: 8b 4a 3c mov 0x3c(%edx),%ecx 10ed42: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 10ed46: 66 8b 4a 3e mov 0x3e(%edx),%cx 10ed4a: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 10ed4e: 8b 4a 40 mov 0x40(%edx),%ecx 10ed51: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 10ed54: 8b 4a 44 mov 0x44(%edx),%ecx 10ed57: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 10ed5a: 8b 52 48 mov 0x48(%edx),%edx 10ed5d: 89 50 38 mov %edx,0x38(%eax) buf->st_blksize = imfs_rq_memfile_bytes_per_block; 10ed60: 8b 15 48 21 12 00 mov 0x122148,%edx 10ed66: 89 50 40 mov %edx,0x40(%eax) 10ed69: 31 c0 xor %eax,%eax return 0; } 10ed6b: 5b pop %ebx 10ed6c: 5e pop %esi 10ed6d: c9 leave 10ed6e: c3 ret =============================================================================== 00107100 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 107100: 55 push %ebp 107101: 89 e5 mov %esp,%ebp 107103: 57 push %edi 107104: 53 push %ebx 107105: 83 ec 40 sub $0x40,%esp 107108: 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 ); 10710b: 31 c0 xor %eax,%eax 10710d: 83 c9 ff or $0xffffffff,%ecx 107110: 89 d7 mov %edx,%edi 107112: f2 ae repnz scas %es:(%edi),%al 107114: f7 d1 not %ecx 107116: 49 dec %ecx 107117: 8d 45 f4 lea -0xc(%ebp),%eax 10711a: 50 push %eax 10711b: 8d 5d bf lea -0x41(%ebp),%ebx 10711e: 53 push %ebx 10711f: 51 push %ecx 107120: 52 push %edx 107121: e8 46 7a 00 00 call 10eb6c /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 107126: 58 pop %eax 107127: ff 75 0c pushl 0xc(%ebp) 10712a: e8 a9 c4 00 00 call 1135d8 10712f: 89 45 e0 mov %eax,-0x20(%ebp) if (info.sym_link.name == NULL) { 107132: 83 c4 10 add $0x10,%esp 107135: 85 c0 test %eax,%eax 107137: 75 10 jne 107149 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 107139: e8 d6 b8 00 00 call 112a14 <__errno> <== NOT EXECUTED 10713e: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107144: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107147: eb 3e jmp 107187 <== NOT EXECUTED * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107149: 83 ec 0c sub $0xc,%esp 10714c: 8d 45 e0 lea -0x20(%ebp),%eax 10714f: 50 push %eax 107150: 68 ff a1 00 00 push $0xa1ff 107155: 53 push %ebx 107156: 6a 04 push $0x4 107158: ff 75 08 pushl 0x8(%ebp) 10715b: e8 06 6f 00 00 call 10e066 107160: 89 c2 mov %eax,%edx new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 107162: 83 c4 20 add $0x20,%esp 107165: 31 c0 xor %eax,%eax 107167: 85 d2 test %edx,%edx 107169: 75 1c jne 107187 <== ALWAYS TAKEN free(info.sym_link.name); 10716b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10716e: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 107171: e8 26 05 00 00 call 10769c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 107176: e8 99 b8 00 00 call 112a14 <__errno> <== NOT EXECUTED 10717b: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107181: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107184: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 107187: 8d 65 f8 lea -0x8(%ebp),%esp 10718a: 5b pop %ebx 10718b: 5f pop %edi 10718c: c9 leave 10718d: c3 ret =============================================================================== 00107190 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 107190: 55 push %ebp 107191: 89 e5 mov %esp,%ebp 107193: 57 push %edi 107194: 56 push %esi 107195: 53 push %ebx 107196: 83 ec 2c sub $0x2c,%esp IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 107199: 8b 45 0c mov 0xc(%ebp),%eax 10719c: 8b 18 mov (%eax),%ebx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 10719e: 83 7b 4c 03 cmpl $0x3,0x4c(%ebx) 1071a2: 75 7a jne 10721e if ( !node->info.hard_link.link_node ) 1071a4: 8b 43 50 mov 0x50(%ebx),%eax 1071a7: 85 c0 test %eax,%eax 1071a9: 75 10 jne 1071bb <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 1071ab: e8 64 b8 00 00 call 112a14 <__errno> <== NOT EXECUTED 1071b0: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1071b6: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1071b9: eb 75 jmp 107230 <== NOT EXECUTED the_link = *loc; 1071bb: 8d 7d cc lea -0x34(%ebp),%edi 1071be: b9 05 00 00 00 mov $0x5,%ecx 1071c3: 8b 75 0c mov 0xc(%ebp),%esi 1071c6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 1071c8: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 1071cb: 83 ec 0c sub $0xc,%esp 1071ce: 8d 75 cc lea -0x34(%ebp),%esi 1071d1: 56 push %esi 1071d2: e8 91 6f 00 00 call 10e168 /* * 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) 1071d7: 8b 43 50 mov 0x50(%ebx),%eax 1071da: 8b 50 34 mov 0x34(%eax),%edx 1071dd: 83 c4 10 add $0x10,%esp 1071e0: 66 83 fa 01 cmp $0x1,%dx 1071e4: 75 1a jne 107200 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 1071e6: 51 push %ecx 1071e7: 51 push %ecx 1071e8: 56 push %esi 1071e9: ff 75 08 pushl 0x8(%ebp) 1071ec: 8b 45 d4 mov -0x2c(%ebp),%eax 1071ef: ff 50 34 call *0x34(%eax) 1071f2: 89 c2 mov %eax,%edx if ( result != 0 ) 1071f4: 83 c4 10 add $0x10,%esp 1071f7: 83 c8 ff or $0xffffffff,%eax 1071fa: 85 d2 test %edx,%edx 1071fc: 74 20 je 10721e 1071fe: eb 30 jmp 107230 return -1; } else { node->info.hard_link.link_node->st_nlink --; 107200: 4a dec %edx 107201: 66 89 50 34 mov %dx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 107205: 52 push %edx 107206: 52 push %edx 107207: 6a 00 push $0x0 107209: 8d 45 e0 lea -0x20(%ebp),%eax 10720c: 50 push %eax 10720d: e8 02 05 00 00 call 107714 107212: 8b 43 50 mov 0x50(%ebx),%eax 107215: 8b 55 e0 mov -0x20(%ebp),%edx 107218: 89 50 48 mov %edx,0x48(%eax) 10721b: 83 c4 10 add $0x10,%esp /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 10721e: 50 push %eax 10721f: 50 push %eax 107220: 8b 55 0c mov 0xc(%ebp),%edx 107223: 8b 42 08 mov 0x8(%edx),%eax 107226: 52 push %edx 107227: ff 75 08 pushl 0x8(%ebp) 10722a: ff 50 34 call *0x34(%eax) return result; 10722d: 83 c4 10 add $0x10,%esp } 107230: 8d 65 f4 lea -0xc(%ebp),%esp 107233: 5b pop %ebx 107234: 5e pop %esi 107235: 5f pop %edi 107236: c9 leave 107237: c3 ret =============================================================================== 00107238 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107238: 55 push %ebp 107239: 89 e5 mov %esp,%ebp 10723b: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 10723e: 8b 45 08 mov 0x8(%ebp),%eax 107241: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107244: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107248: 74 0d je 107257 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 10724a: e8 c5 b7 00 00 call 112a14 <__errno> <== NOT EXECUTED 10724f: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107255: eb 11 jmp 107268 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 107257: 83 78 5c 00 cmpl $0x0,0x5c(%eax) 10725b: 75 10 jne 10726d <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 10725d: e8 b2 b7 00 00 call 112a14 <__errno> <== NOT EXECUTED 107262: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107268: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10726b: eb 09 jmp 107276 <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 10726d: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) 107274: 31 c0 xor %eax,%eax return 0; } 107276: c9 leave 107277: c3 ret =============================================================================== 00107894 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 107894: 55 push %ebp 107895: 89 e5 mov %esp,%ebp 107897: 57 push %edi 107898: 56 push %esi 107899: 53 push %ebx 10789a: 83 ec 0c sub $0xc,%esp 10789d: 8b 5d 08 mov 0x8(%ebp),%ebx 1078a0: 8b 75 0c mov 0xc(%ebp),%esi #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 1078a3: a1 30 45 12 00 mov 0x124530,%eax 1078a8: 85 c0 test %eax,%eax 1078aa: 74 02 je 1078ae (*rtems_malloc_statistics_helpers->initialize)(); 1078ac: ff 10 call *(%eax) } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1078ae: e8 7c ff ff ff call 10782f /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1078b3: a1 34 45 12 00 mov 0x124534,%eax 1078b8: 85 c0 test %eax,%eax 1078ba: 74 12 je 1078ce <== ALWAYS TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1078bc: 52 push %edx <== NOT EXECUTED 1078bd: 52 push %edx <== NOT EXECUTED 1078be: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1078c1: 53 push %ebx <== NOT EXECUTED 1078c2: ff 10 call *(%eax) <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1078c4: 8d 34 33 lea (%ebx,%esi,1),%esi <== NOT EXECUTED 1078c7: 29 c6 sub %eax,%esi <== NOT EXECUTED 1078c9: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1078cb: 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 ( 1078ce: 80 3d 2d 45 12 00 00 cmpb $0x0,0x12452d 1078d5: 75 11 jne 1078e8 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1078d7: 80 3d 20 22 12 00 00 cmpb $0x0,0x122220 1078de: 74 08 je 1078e8 ) { memset( heap_begin, 0, heap_size ); 1078e0: 31 c0 xor %eax,%eax 1078e2: 89 df mov %ebx,%edi 1078e4: 89 f1 mov %esi,%ecx 1078e6: 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 ) { 1078e8: 80 3d 2d 45 12 00 00 cmpb $0x0,0x12452d 1078ef: 75 20 jne 107911 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1078f1: 6a 04 push $0x4 1078f3: 56 push %esi 1078f4: 53 push %ebx 1078f5: ff 35 50 21 12 00 pushl 0x122150 1078fb: e8 84 3a 00 00 call 10b384 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 107900: 83 c4 10 add $0x10,%esp 107903: 85 c0 test %eax,%eax 107905: 75 0a jne 107911 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 107907: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10790a: 6a 1a push $0x1a <== NOT EXECUTED 10790c: e8 7f 32 00 00 call 10ab90 <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 107911: 8b 1d d0 60 12 00 mov 0x1260d0,%ebx 107917: 83 ec 0c sub $0xc,%esp 10791a: ff 35 50 21 12 00 pushl 0x122150 107920: e8 f7 44 00 00 call 10be1c <_Protected_heap_Get_size> 107925: 8d 1c 18 lea (%eax,%ebx,1),%ebx 107928: 89 1d d0 60 12 00 mov %ebx,0x1260d0 10792e: 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 } 107931: 8d 65 f4 lea -0xc(%ebp),%esp 107934: 5b pop %ebx 107935: 5e pop %esi 107936: 5f pop %edi 107937: c9 leave 107938: c3 ret =============================================================================== 0010b6a2 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 10b6a2: 55 push %ebp <== NOT EXECUTED 10b6a3: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b6a5: 57 push %edi <== NOT EXECUTED 10b6a6: 56 push %esi <== NOT EXECUTED 10b6a7: 53 push %ebx <== NOT EXECUTED 10b6a8: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 10b6ab: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 10b6ae: 85 db test %ebx,%ebx <== NOT EXECUTED 10b6b0: 0f 84 fa 00 00 00 je 10b7b0 <== NOT EXECUTED return; if ( !print_handler ) 10b6b6: a1 a8 73 16 00 mov 0x1673a8,%eax <== NOT EXECUTED 10b6bb: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 10b6be: 85 c0 test %eax,%eax <== NOT EXECUTED 10b6c0: 0f 84 ea 00 00 00 je 10b7b0 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 10b6c6: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 10b6c9: 75 1d jne 10b6e8 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 10b6cb: 83 3d cc 9f 16 00 00 cmpl $0x0,0x169fcc <== NOT EXECUTED 10b6d2: 0f 84 d8 00 00 00 je 10b7b0 <== NOT EXECUTED 10b6d8: be c8 9f 16 00 mov $0x169fc8,%esi <== NOT EXECUTED 10b6dd: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED 10b6e4: 31 db xor %ebx,%ebx <== NOT EXECUTED 10b6e6: eb 0f jmp 10b6f7 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 10b6e8: 8d b3 c4 00 00 00 lea 0xc4(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 10b6ee: 8b 8b d8 00 00 00 mov 0xd8(%ebx),%ecx <== NOT EXECUTED 10b6f4: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 10b6f7: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 10b6fa: 83 c2 10 add $0x10,%edx <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 10b6fd: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10b6ff: 83 e8 10 sub $0x10,%eax <== NOT EXECUTED 10b702: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 10b705: 50 push %eax <== NOT EXECUTED 10b706: 52 push %edx <== NOT EXECUTED 10b707: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 10b70a: e8 6c ff ff ff call 10b67b <== NOT EXECUTED if ( high_water_mark ) 10b70f: 59 pop %ecx <== NOT EXECUTED 10b710: 5f pop %edi <== NOT EXECUTED 10b711: 31 ff xor %edi,%edi <== NOT EXECUTED 10b713: 85 c0 test %eax,%eax <== NOT EXECUTED 10b715: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 10b718: 74 08 je 10b722 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 10b71a: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 10b71d: 8d 3c 0a lea (%edx,%ecx,1),%edi <== NOT EXECUTED 10b720: 29 c7 sub %eax,%edi <== NOT EXECUTED else used = 0; if ( the_thread ) { 10b722: 85 db test %ebx,%ebx <== NOT EXECUTED 10b724: 74 26 je 10b74c <== NOT EXECUTED (*print_handler)( 10b726: 52 push %edx <== NOT EXECUTED 10b727: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 10b72a: 50 push %eax <== NOT EXECUTED 10b72b: 6a 05 push $0x5 <== NOT EXECUTED 10b72d: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10b730: e8 47 52 00 00 call 11097c <== NOT EXECUTED 10b735: 50 push %eax <== NOT EXECUTED 10b736: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10b739: 68 5c 6a 15 00 push $0x156a5c <== NOT EXECUTED 10b73e: ff 35 a4 73 16 00 pushl 0x1673a4 <== NOT EXECUTED 10b744: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 10b747: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10b74a: eb 14 jmp 10b760 <== 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 ); 10b74c: 50 push %eax <== NOT EXECUTED 10b74d: 6a ff push $0xffffffff <== NOT EXECUTED 10b74f: 68 69 6a 15 00 push $0x156a69 <== NOT EXECUTED 10b754: ff 35 a4 73 16 00 pushl 0x1673a4 <== NOT EXECUTED 10b75a: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 10b75d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } (*print_handler)( 10b760: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 10b763: 53 push %ebx <== NOT EXECUTED 10b764: 53 push %ebx <== NOT EXECUTED 10b765: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10b768: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 10b76b: 8b 16 mov (%esi),%edx <== NOT EXECUTED 10b76d: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 10b771: 52 push %edx <== NOT EXECUTED 10b772: 50 push %eax <== NOT EXECUTED 10b773: 68 77 6a 15 00 push $0x156a77 <== NOT EXECUTED 10b778: ff 35 a4 73 16 00 pushl 0x1673a4 <== NOT EXECUTED 10b77e: ff 15 a8 73 16 00 call *0x1673a8 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 10b784: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10b787: 83 3d a0 73 16 00 00 cmpl $0x0,0x1673a0 <== NOT EXECUTED 10b78e: a1 a8 73 16 00 mov 0x1673a8,%eax <== NOT EXECUTED 10b793: 75 09 jne 10b79e <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 10b795: 51 push %ecx <== NOT EXECUTED 10b796: 51 push %ecx <== NOT EXECUTED 10b797: 68 95 6a 15 00 push $0x156a95 <== NOT EXECUTED 10b79c: eb 07 jmp 10b7a5 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 10b79e: 52 push %edx <== NOT EXECUTED 10b79f: 57 push %edi <== NOT EXECUTED 10b7a0: 68 a2 6a 15 00 push $0x156aa2 <== NOT EXECUTED 10b7a5: ff 35 a4 73 16 00 pushl 0x1673a4 <== NOT EXECUTED 10b7ab: ff d0 call *%eax <== NOT EXECUTED 10b7ad: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 10b7b0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b7b3: 5b pop %ebx <== NOT EXECUTED 10b7b4: 5e pop %esi <== NOT EXECUTED 10b7b5: 5f pop %edi <== NOT EXECUTED 10b7b6: c9 leave <== NOT EXECUTED 10b7b7: c3 ret <== NOT EXECUTED =============================================================================== 0010b9b5 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 10b9b5: 55 push %ebp 10b9b6: 89 e5 mov %esp,%ebp 10b9b8: 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) 10b9b9: 83 3d a0 73 16 00 00 cmpl $0x0,0x1673a0 10b9c0: 75 4d jne 10ba0f 10b9c2: 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 ]; 10b9c4: 89 c2 mov %eax,%edx 10b9c6: 83 e2 03 and $0x3,%edx 10b9c9: 8b 14 95 dc 6b 15 00 mov 0x156bdc(,%edx,4),%edx 10b9d0: 89 14 85 b8 9f 16 00 mov %edx,0x169fb8(,%eax,4) /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 10b9d7: 40 inc %eax 10b9d8: 83 f8 04 cmp $0x4,%eax 10b9db: 75 e7 jne 10b9c4 /* * 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) { 10b9dd: 8b 15 34 a1 16 00 mov 0x16a134,%edx 10b9e3: 85 d2 test %edx,%edx 10b9e5: 74 1e je 10ba05 <== NEVER TAKEN 10b9e7: 8b 0d f4 a0 16 00 mov 0x16a0f4,%ecx 10b9ed: 85 c9 test %ecx,%ecx 10b9ef: 74 14 je 10ba05 <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 10b9f1: 89 15 cc 9f 16 00 mov %edx,0x169fcc Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 10b9f7: 29 d1 sub %edx,%ecx 10b9f9: 89 0d c8 9f 16 00 mov %ecx,0x169fc8 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 10b9ff: b0 a5 mov $0xa5,%al 10ba01: 89 d7 mov %edx,%edi 10ba03: f3 aa rep stos %al,%es:(%edi) } #endif Stack_check_Initialized = 1; 10ba05: c7 05 a0 73 16 00 01 movl $0x1,0x1673a0 10ba0c: 00 00 00 } 10ba0f: 5f pop %edi 10ba10: c9 leave 10ba11: c3 ret =============================================================================== 0010b67b : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 10b67b: 55 push %ebp <== NOT EXECUTED 10b67c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b67e: 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; 10b681: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10b684: 83 c0 10 add $0x10,%eax <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 10b687: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED 10b68a: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 10b68d: eb 0b jmp 10b69a <== NOT EXECUTED if (*base != U32_PATTERN) 10b68f: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED 10b695: 75 09 jne 10b6a0 <== 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++) 10b697: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 10b69a: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10b69c: 72 f1 jb 10b68f <== NOT EXECUTED 10b69e: 31 c0 xor %eax,%eax <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 10b6a0: c9 leave <== NOT EXECUTED 10b6a1: c3 ret <== NOT EXECUTED =============================================================================== 0010b830 : * * 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) { 10b830: 55 push %ebp <== NOT EXECUTED 10b831: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b833: 56 push %esi <== NOT EXECUTED 10b834: 53 push %ebx <== NOT EXECUTED 10b835: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 10b838: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10b83b: 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); 10b83e: 8b b3 c8 00 00 00 mov 0xc8(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 10b844: 68 09 6b 15 00 push $0x156b09 <== NOT EXECUTED 10b849: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 10b84c: e8 1b 27 00 00 call 10df6c <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 10b851: 5a pop %edx <== NOT EXECUTED 10b852: 59 pop %ecx <== NOT EXECUTED 10b853: 53 push %ebx <== NOT EXECUTED 10b854: 68 19 6b 15 00 push $0x156b19 <== NOT EXECUTED 10b859: e8 0e 27 00 00 call 10df6c <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 10b85e: 59 pop %ecx <== NOT EXECUTED 10b85f: 58 pop %eax <== NOT EXECUTED 10b860: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10b863: 68 36 6b 15 00 push $0x156b36 <== NOT EXECUTED 10b868: e8 ff 26 00 00 call 10df6c <== NOT EXECUTED printk( 10b86d: 58 pop %eax <== NOT EXECUTED 10b86e: 5a pop %edx <== NOT EXECUTED 10b86f: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 10b872: 68 48 6b 15 00 push $0x156b48 <== NOT EXECUTED 10b877: e8 f0 26 00 00 call 10df6c <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 10b87c: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10b87f: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 10b882: 50 push %eax <== NOT EXECUTED 10b883: 6a 20 push $0x20 <== NOT EXECUTED 10b885: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10b888: e8 ef 50 00 00 call 11097c <== NOT EXECUTED 10b88d: 5a pop %edx <== NOT EXECUTED 10b88e: 59 pop %ecx <== NOT EXECUTED 10b88f: 50 push %eax <== NOT EXECUTED 10b890: 68 5c 6b 15 00 push $0x156b5c <== NOT EXECUTED 10b895: e8 d2 26 00 00 call 10df6c <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 10b89a: 8b 8b c8 00 00 00 mov 0xc8(%ebx),%ecx <== NOT EXECUTED 10b8a0: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax <== NOT EXECUTED 10b8a6: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 10b8a9: 53 push %ebx <== NOT EXECUTED 10b8aa: 51 push %ecx <== NOT EXECUTED 10b8ab: 50 push %eax <== NOT EXECUTED 10b8ac: 68 72 6b 15 00 push $0x156b72 <== NOT EXECUTED 10b8b1: e8 b6 26 00 00 call 10df6c <== 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) { 10b8b6: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10b8b9: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 10b8bc: 84 d2 test %dl,%dl <== NOT EXECUTED 10b8be: 75 17 jne 10b8d7 <== 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); 10b8c0: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 10b8c3: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 10b8c6: 56 push %esi <== NOT EXECUTED 10b8c7: 50 push %eax <== NOT EXECUTED 10b8c8: 6a 10 push $0x10 <== NOT EXECUTED 10b8ca: 68 a3 6b 15 00 push $0x156ba3 <== NOT EXECUTED 10b8cf: e8 98 26 00 00 call 10df6c <== NOT EXECUTED 10b8d4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 10b8d7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b8da: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 10b8df: e8 c8 59 00 00 call 1112ac <== NOT EXECUTED =============================================================================== 0013d61a : return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 13d61a: 55 push %ebp <== NOT EXECUTED 13d61b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13d61d: 57 push %edi <== NOT EXECUTED 13d61e: 56 push %esi <== NOT EXECUTED 13d61f: 53 push %ebx <== NOT EXECUTED 13d620: 83 ec 6c sub $0x6c,%esp <== NOT EXECUTED 13d623: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED 13d626: 89 55 b0 mov %edx,-0x50(%ebp) <== NOT EXECUTED 13d629: 89 4d ac mov %ecx,-0x54(%ebp) <== NOT EXECUTED 13d62c: 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; 13d62f: c6 01 00 movb $0x0,(%ecx) <== NOT EXECUTED /* * Load the bitmap. */ rc = rtems_rfs_bitmap_load_map (control, &map); 13d632: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED 13d635: e8 8c fc ff ff call 13d2c6 <== NOT EXECUTED if (rc > 0) 13d63a: 85 c0 test %eax,%eax <== NOT EXECUTED 13d63c: 0f 8f aa 01 00 00 jg 13d7ec <== NOT EXECUTED return rc; /* * Calculate the bit we are testing plus the end point we search over. */ test_bit = *bit; 13d642: 8b 55 b0 mov -0x50(%ebp),%edx <== NOT EXECUTED 13d645: 8b 02 mov (%edx),%eax <== NOT EXECUTED end_bit = test_bit + (window * direction); 13d647: 89 da mov %ebx,%edx <== NOT EXECUTED 13d649: c1 e2 0b shl $0xb,%edx <== NOT EXECUTED if (end_bit < 0) 13d64c: 01 c2 add %eax,%edx <== NOT EXECUTED 13d64e: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 13d651: 79 09 jns 13d65c <== NOT EXECUTED 13d653: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 13d65a: eb 0f jmp 13d66b <== NOT EXECUTED end_bit = 0; else if (end_bit >= control->size) 13d65c: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 13d65f: 8b 51 0c mov 0xc(%ecx),%edx <== NOT EXECUTED 13d662: 39 55 d4 cmp %edx,-0x2c(%ebp) <== NOT EXECUTED 13d665: 72 04 jb 13d66b <== NOT EXECUTED end_bit = control->size - 1; 13d667: 4a dec %edx <== NOT EXECUTED 13d668: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED map_index = rtems_rfs_bitmap_map_index (test_bit); 13d66b: 89 c2 mov %eax,%edx <== NOT EXECUTED 13d66d: c1 fa 05 sar $0x5,%edx <== NOT EXECUTED 13d670: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED map_offset = rtems_rfs_bitmap_map_offset (test_bit); 13d673: 89 c6 mov %eax,%esi <== NOT EXECUTED 13d675: 83 e6 1f and $0x1f,%esi <== NOT EXECUTED search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); 13d678: 83 e2 1f and $0x1f,%edx <== NOT EXECUTED search_bits = &control->search_bits[search_index]; 13d67b: 89 c1 mov %eax,%ecx <== NOT EXECUTED 13d67d: c1 f9 0a sar $0xa,%ecx <== NOT EXECUTED 13d680: c1 e1 02 shl $0x2,%ecx <== NOT EXECUTED 13d683: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED 13d686: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 13d689: 8b 49 14 mov 0x14(%ecx),%ecx <== NOT EXECUTED 13d68c: 01 4d d0 add %ecx,-0x30(%ebp) <== NOT EXECUTED map_bits = &map[map_index]; 13d68f: 8b 7d cc mov -0x34(%ebp),%edi <== NOT EXECUTED 13d692: c1 e7 02 shl $0x2,%edi <== NOT EXECUTED 13d695: 03 7d e4 add -0x1c(%ebp),%edi <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 13d698: 8d 0c 9d 00 00 00 00 lea 0x0(,%ebx,4),%ecx <== NOT EXECUTED 13d69f: 89 4d b4 mov %ecx,-0x4c(%ebp) <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 13d6a2: 89 d9 mov %ebx,%ecx <== NOT EXECUTED 13d6a4: c1 e1 05 shl $0x5,%ecx <== NOT EXECUTED 13d6a7: 89 4d a8 mov %ecx,-0x58(%ebp) <== 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)) 13d6aa: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 13d6ad: 8b 09 mov (%ecx),%ecx <== NOT EXECUTED 13d6af: 89 4d c0 mov %ecx,-0x40(%ebp) <== NOT EXECUTED 13d6b2: 85 c9 test %ecx,%ecx <== NOT EXECUTED 13d6b4: 0f 84 d2 00 00 00 je 13d78c <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 13d6ba: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 13d6bd: 01 d9 add %ebx,%ecx <== NOT EXECUTED 13d6bf: c1 e1 05 shl $0x5,%ecx <== NOT EXECUTED 13d6c2: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED 13d6c5: 89 55 bc mov %edx,-0x44(%ebp) <== NOT EXECUTED 13d6c8: e9 b3 00 00 00 jmp 13d780 <== 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); 13d6cd: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 13d6d2: 8a 4d bc mov -0x44(%ebp),%cl <== NOT EXECUTED 13d6d5: d3 e2 shl %cl,%edx <== NOT EXECUTED 13d6d7: 89 55 b8 mov %edx,-0x48(%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)) 13d6da: 8b 4d c0 mov -0x40(%ebp),%ecx <== NOT EXECUTED 13d6dd: 85 ca test %ecx,%edx <== NOT EXECUTED 13d6df: 75 53 jne 13d734 <== NOT EXECUTED 13d6e1: eb 6a jmp 13d74d <== 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)) 13d6e3: 8b 17 mov (%edi),%edx <== NOT EXECUTED 13d6e5: 89 55 bc mov %edx,-0x44(%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); 13d6e8: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 13d6ed: 89 f1 mov %esi,%ecx <== NOT EXECUTED 13d6ef: d3 e2 shl %cl,%edx <== NOT EXECUTED 13d6f1: 89 55 a4 mov %edx,-0x5c(%ebp) <== 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)) 13d6f4: 85 55 bc test %edx,-0x44(%ebp) <== NOT EXECUTED 13d6f7: 74 30 je 13d729 <== 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); 13d6f9: f7 d2 not %edx <== NOT EXECUTED 13d6fb: 23 55 bc and -0x44(%ebp),%edx <== 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); 13d6fe: 89 17 mov %edx,(%edi) <== NOT EXECUTED if (rtems_rfs_bitmap_match(*map_bits, 13d700: 85 d2 test %edx,%edx <== NOT EXECUTED 13d702: 75 0a jne 13d70e <== NOT EXECUTED RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 13d704: 8b 55 b8 mov -0x48(%ebp),%edx <== NOT EXECUTED 13d707: f7 d2 not %edx <== NOT EXECUTED 13d709: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 13d70c: 21 11 and %edx,(%ecx) <== NOT EXECUTED 1 << search_offset); control->free--; 13d70e: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 13d711: ff 4a 10 decl 0x10(%edx) <== NOT EXECUTED *bit = test_bit; 13d714: 8b 4d b0 mov -0x50(%ebp),%ecx <== NOT EXECUTED 13d717: 89 01 mov %eax,(%ecx) <== NOT EXECUTED *found = true; 13d719: 8b 45 ac mov -0x54(%ebp),%eax <== NOT EXECUTED 13d71c: c6 00 01 movb $0x1,(%eax) <== NOT EXECUTED rtems_rfs_buffer_mark_dirty (control->buffer); 13d71f: 8b 02 mov (%edx),%eax <== NOT EXECUTED 13d721: c6 00 01 movb $0x1,(%eax) <== NOT EXECUTED 13d724: e9 c1 00 00 00 jmp 13d7ea <== NOT EXECUTED return 0; } if (test_bit == end_bit) 13d729: 3b 45 d4 cmp -0x2c(%ebp),%eax <== NOT EXECUTED 13d72c: 74 19 je 13d747 <== NOT EXECUTED 13d72e: 01 de add %ebx,%esi <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 13d730: 01 d8 add %ebx,%eax <== NOT EXECUTED 13d732: eb 06 jmp 13d73a <== NOT EXECUTED 13d734: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED 13d737: 89 55 94 mov %edx,-0x6c(%ebp) <== 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) 13d73a: 83 fe 1f cmp $0x1f,%esi <== NOT EXECUTED 13d73d: 76 a4 jbe 13d6e3 <== NOT EXECUTED 13d73f: 8b 4d 94 mov -0x6c(%ebp),%ecx <== NOT EXECUTED 13d742: 89 4d bc mov %ecx,-0x44(%ebp) <== NOT EXECUTED 13d745: eb 06 jmp 13d74d <== NOT EXECUTED 13d747: 8b 45 94 mov -0x6c(%ebp),%eax <== NOT EXECUTED 13d74a: 89 45 bc mov %eax,-0x44(%ebp) <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 13d74d: 03 7d b4 add -0x4c(%ebp),%edi <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 13d750: 01 5d cc add %ebx,-0x34(%ebp) <== NOT EXECUTED } } map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 13d753: 85 db test %ebx,%ebx <== NOT EXECUTED 13d755: 0f 9f c0 setg %al <== NOT EXECUTED 13d758: 0f b6 f0 movzbl %al,%esi <== NOT EXECUTED 13d75b: 4e dec %esi <== NOT EXECUTED 13d75c: 83 e6 1f and $0x1f,%esi <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; 13d75f: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 13d762: 8d 04 16 lea (%esi,%edx,1),%eax <== NOT EXECUTED search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 13d765: 3b 45 d4 cmp -0x2c(%ebp),%eax <== NOT EXECUTED 13d768: 7f 04 jg 13d76e <== NOT EXECUTED 13d76a: 85 db test %ebx,%ebx <== NOT EXECUTED 13d76c: 78 51 js 13d7bf <== NOT EXECUTED 13d76e: 8b 4d a8 mov -0x58(%ebp),%ecx <== NOT EXECUTED 13d771: 01 4d c4 add %ecx,-0x3c(%ebp) <== NOT EXECUTED 13d774: 3b 45 d4 cmp -0x2c(%ebp),%eax <== NOT EXECUTED 13d777: 7c 04 jl 13d77d <== NOT EXECUTED 13d779: 85 db test %ebx,%ebx <== NOT EXECUTED 13d77b: 7f 42 jg 13d7bf <== NOT EXECUTED 13d77d: 01 5d bc add %ebx,-0x44(%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) 13d780: 83 7d bc 1f cmpl $0x1f,-0x44(%ebp) <== NOT EXECUTED 13d784: 0f 86 43 ff ff ff jbe 13d6cd <== NOT EXECUTED 13d78a: eb 33 jmp 13d7bf <== 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); 13d78c: 83 e0 e0 and $0xffffffe0,%eax <== NOT EXECUTED if (direction > 0) 13d78f: 85 db test %ebx,%ebx <== NOT EXECUTED 13d791: 7e 13 jle 13d7a6 <== NOT EXECUTED { bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset; 13d793: b9 20 00 00 00 mov $0x20,%ecx <== NOT EXECUTED 13d798: 29 d1 sub %edx,%ecx <== NOT EXECUTED test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); 13d79a: 89 ca mov %ecx,%edx <== NOT EXECUTED 13d79c: c1 e2 05 shl $0x5,%edx <== NOT EXECUTED 13d79f: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED 13d7a2: 31 f6 xor %esi,%esi <== NOT EXECUTED 13d7a4: eb 10 jmp 13d7b6 <== NOT EXECUTED map_offset = 0; } else { bits_skipped = search_offset + 1; 13d7a6: 8d 4a 01 lea 0x1(%edx),%ecx <== 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; 13d7a9: c1 e2 05 shl $0x5,%edx <== NOT EXECUTED 13d7ac: f7 d2 not %edx <== NOT EXECUTED 13d7ae: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED 13d7b1: be 1f 00 00 00 mov $0x1f,%esi <== NOT EXECUTED map_offset = rtems_rfs_bitmap_element_bits () - 1; } map_bits += direction * bits_skipped; 13d7b6: 0f af cb imul %ebx,%ecx <== NOT EXECUTED 13d7b9: 8d 3c 8f lea (%edi,%ecx,4),%edi <== NOT EXECUTED map_index += direction * bits_skipped; 13d7bc: 01 4d cc add %ecx,-0x34(%ebp) <== NOT EXECUTED } search_bits += direction; 13d7bf: 8b 55 b4 mov -0x4c(%ebp),%edx <== NOT EXECUTED 13d7c2: 01 55 d0 add %edx,-0x30(%ebp) <== NOT EXECUTED search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 13d7c5: 31 d2 xor %edx,%edx <== NOT EXECUTED 13d7c7: 85 db test %ebx,%ebx <== NOT EXECUTED 13d7c9: 0f 9f c2 setg %dl <== NOT EXECUTED 13d7cc: 4a dec %edx <== NOT EXECUTED 13d7cd: 83 e2 1f and $0x1f,%edx <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 13d7d0: 3b 45 d4 cmp -0x2c(%ebp),%eax <== NOT EXECUTED 13d7d3: 7c 0d jl 13d7e2 <== NOT EXECUTED 13d7d5: 85 db test %ebx,%ebx <== NOT EXECUTED 13d7d7: 0f 88 cd fe ff ff js 13d6aa <== NOT EXECUTED 13d7dd: 3b 45 d4 cmp -0x2c(%ebp),%eax <== NOT EXECUTED 13d7e0: 7f 08 jg 13d7ea <== NOT EXECUTED 13d7e2: 85 db test %ebx,%ebx <== NOT EXECUTED 13d7e4: 0f 8f c0 fe ff ff jg 13d6aa <== NOT EXECUTED 13d7ea: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; } 13d7ec: 83 c4 6c add $0x6c,%esp <== NOT EXECUTED 13d7ef: 5b pop %ebx <== NOT EXECUTED 13d7f0: 5e pop %esi <== NOT EXECUTED 13d7f1: 5f pop %edi <== NOT EXECUTED 13d7f2: c9 leave <== NOT EXECUTED 13d7f3: c3 ret <== NOT EXECUTED =============================================================================== 00100200 <_Barrier_Manager_initialization>: #include #include #include void _Barrier_Manager_initialization(void) { 100200: 55 push %ebp 100201: 89 e5 mov %esp,%ebp } 100203: c9 leave 100204: c3 ret =============================================================================== 0010cedc <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10cedc: 55 push %ebp 10cedd: 89 e5 mov %esp,%ebp 10cedf: 57 push %edi 10cee0: 56 push %esi 10cee1: 53 push %ebx 10cee2: 83 ec 1c sub $0x1c,%esp 10cee5: 8b 5d 08 mov 0x8(%ebp),%ebx 10cee8: 8b 4d 0c mov 0xc(%ebp),%ecx 10ceeb: 8b 45 14 mov 0x14(%ebp),%eax 10ceee: 89 45 e4 mov %eax,-0x1c(%ebp) 10cef1: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10cef4: 8b 35 dc 92 12 00 mov 0x1292dc,%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 ); 10cefa: 9c pushf 10cefb: fa cli 10cefc: 5f pop %edi switch ( the_rwlock->current_state ) { 10cefd: 8b 43 44 mov 0x44(%ebx),%eax 10cf00: 85 c0 test %eax,%eax 10cf02: 74 05 je 10cf09 <_CORE_RWLock_Obtain_for_reading+0x2d> 10cf04: 48 dec %eax 10cf05: 75 35 jne 10cf3c <_CORE_RWLock_Obtain_for_reading+0x60> 10cf07: eb 09 jmp 10cf12 <_CORE_RWLock_Obtain_for_reading+0x36> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10cf09: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) 10cf10: eb 1c jmp 10cf2e <_CORE_RWLock_Obtain_for_reading+0x52> 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 ); 10cf12: 83 ec 0c sub $0xc,%esp 10cf15: 53 push %ebx 10cf16: 88 55 dc mov %dl,-0x24(%ebp) 10cf19: 89 4d e0 mov %ecx,-0x20(%ebp) 10cf1c: e8 77 1a 00 00 call 10e998 <_Thread_queue_First> if ( !waiter ) { 10cf21: 83 c4 10 add $0x10,%esp 10cf24: 85 c0 test %eax,%eax 10cf26: 8a 55 dc mov -0x24(%ebp),%dl 10cf29: 8b 4d e0 mov -0x20(%ebp),%ecx 10cf2c: 75 0e jne 10cf3c <_CORE_RWLock_Obtain_for_reading+0x60><== NEVER TAKEN the_rwlock->number_of_readers += 1; 10cf2e: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10cf31: 57 push %edi 10cf32: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10cf33: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10cf3a: eb 48 jmp 10cf84 <_CORE_RWLock_Obtain_for_reading+0xa8> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10cf3c: 84 d2 test %dl,%dl 10cf3e: 75 0b jne 10cf4b <_CORE_RWLock_Obtain_for_reading+0x6f> _ISR_Enable( level ); 10cf40: 57 push %edi 10cf41: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10cf42: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) 10cf49: eb 39 jmp 10cf84 <_CORE_RWLock_Obtain_for_reading+0xa8> 10cf4b: 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; 10cf52: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10cf55: 89 4e 20 mov %ecx,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10cf58: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10cf5f: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10cf66: 57 push %edi 10cf67: 9d popf _Thread_queue_Enqueue_with_handler( 10cf68: c7 45 10 b0 d0 10 00 movl $0x10d0b0,0x10(%ebp) 10cf6f: 8b 45 e4 mov -0x1c(%ebp),%eax 10cf72: 89 45 0c mov %eax,0xc(%ebp) 10cf75: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10cf78: 8d 65 f4 lea -0xc(%ebp),%esp 10cf7b: 5b pop %ebx 10cf7c: 5e pop %esi 10cf7d: 5f pop %edi 10cf7e: 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( 10cf7f: e9 54 17 00 00 jmp 10e6d8 <_Thread_queue_Enqueue_with_handler> timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10cf84: 8d 65 f4 lea -0xc(%ebp),%esp 10cf87: 5b pop %ebx 10cf88: 5e pop %esi 10cf89: 5f pop %edi 10cf8a: c9 leave 10cf8b: c3 ret =============================================================================== 0010d010 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10d010: 55 push %ebp 10d011: 89 e5 mov %esp,%ebp 10d013: 53 push %ebx 10d014: 83 ec 04 sub $0x4,%esp 10d017: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10d01a: 8b 15 dc 92 12 00 mov 0x1292dc,%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 ); 10d020: 9c pushf 10d021: fa cli 10d022: 58 pop %eax if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10d023: 8b 4b 44 mov 0x44(%ebx),%ecx 10d026: 85 c9 test %ecx,%ecx 10d028: 75 0b jne 10d035 <_CORE_RWLock_Release+0x25> _ISR_Enable( level ); 10d02a: 50 push %eax 10d02b: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10d02c: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) return CORE_RWLOCK_SUCCESSFUL; 10d033: eb 72 jmp 10d0a7 <_CORE_RWLock_Release+0x97> } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 10d035: 49 dec %ecx 10d036: 75 0f jne 10d047 <_CORE_RWLock_Release+0x37> the_rwlock->number_of_readers -= 1; 10d038: 8b 4b 48 mov 0x48(%ebx),%ecx 10d03b: 49 dec %ecx 10d03c: 89 4b 48 mov %ecx,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10d03f: 85 c9 test %ecx,%ecx 10d041: 74 04 je 10d047 <_CORE_RWLock_Release+0x37> /* must be unlocked again */ _ISR_Enable( level ); 10d043: 50 push %eax 10d044: 9d popf return CORE_RWLOCK_SUCCESSFUL; 10d045: eb 60 jmp 10d0a7 <_CORE_RWLock_Release+0x97> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10d047: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 10d04e: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10d055: 50 push %eax 10d056: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10d057: 83 ec 0c sub $0xc,%esp 10d05a: 53 push %ebx 10d05b: e8 74 15 00 00 call 10e5d4 <_Thread_queue_Dequeue> if ( next ) { 10d060: 83 c4 10 add $0x10,%esp 10d063: 85 c0 test %eax,%eax 10d065: 74 40 je 10d0a7 <_CORE_RWLock_Release+0x97> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10d067: 83 78 30 01 cmpl $0x1,0x30(%eax) 10d06b: 75 09 jne 10d076 <_CORE_RWLock_Release+0x66> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10d06d: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10d074: eb 31 jmp 10d0a7 <_CORE_RWLock_Release+0x97> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10d076: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10d079: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 10d080: 83 ec 0c sub $0xc,%esp 10d083: 53 push %ebx 10d084: e8 0f 19 00 00 call 10e998 <_Thread_queue_First> if ( !next || 10d089: 83 c4 10 add $0x10,%esp 10d08c: 85 c0 test %eax,%eax 10d08e: 74 17 je 10d0a7 <_CORE_RWLock_Release+0x97> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 10d090: 83 78 30 01 cmpl $0x1,0x30(%eax) 10d094: 74 11 je 10d0a7 <_CORE_RWLock_Release+0x97><== NEVER TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10d096: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10d099: 52 push %edx 10d09a: 52 push %edx 10d09b: 50 push %eax 10d09c: 53 push %ebx 10d09d: e8 f2 17 00 00 call 10e894 <_Thread_queue_Extract> } 10d0a2: 83 c4 10 add $0x10,%esp 10d0a5: eb d9 jmp 10d080 <_CORE_RWLock_Release+0x70> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10d0a7: 31 c0 xor %eax,%eax 10d0a9: 8b 5d fc mov -0x4(%ebp),%ebx 10d0ac: c9 leave 10d0ad: c3 ret =============================================================================== 0010d0b0 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10d0b0: 55 push %ebp 10d0b1: 89 e5 mov %esp,%ebp 10d0b3: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d0b6: 8d 45 f4 lea -0xc(%ebp),%eax 10d0b9: 50 push %eax 10d0ba: ff 75 08 pushl 0x8(%ebp) 10d0bd: e8 82 11 00 00 call 10e244 <_Thread_Get> switch ( location ) { 10d0c2: 83 c4 10 add $0x10,%esp 10d0c5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10d0c9: 75 17 jne 10d0e2 <_CORE_RWLock_Timeout+0x32><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10d0cb: 83 ec 0c sub $0xc,%esp 10d0ce: 50 push %eax 10d0cf: e8 84 19 00 00 call 10ea58 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d0d4: a1 20 92 12 00 mov 0x129220,%eax 10d0d9: 48 dec %eax 10d0da: a3 20 92 12 00 mov %eax,0x129220 10d0df: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10d0e2: c9 leave 10d0e3: c3 ret =============================================================================== 00117a5c <_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 ) { 117a5c: 55 push %ebp 117a5d: 89 e5 mov %esp,%ebp 117a5f: 57 push %edi 117a60: 56 push %esi 117a61: 53 push %ebx 117a62: 83 ec 1c sub $0x1c,%esp 117a65: 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 ) { 117a68: b8 01 00 00 00 mov $0x1,%eax 117a6d: 8b 55 10 mov 0x10(%ebp),%edx 117a70: 3b 53 4c cmp 0x4c(%ebx),%edx 117a73: 77 4c ja 117ac1 <_CORE_message_queue_Broadcast+0x65><== NEVER TAKEN * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 117a75: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 117a7c: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 117a80: 74 23 je 117aa5 <_CORE_message_queue_Broadcast+0x49> *count = 0; 117a82: 8b 45 1c mov 0x1c(%ebp),%eax 117a85: c7 00 00 00 00 00 movl $0x0,(%eax) 117a8b: eb 32 jmp 117abf <_CORE_message_queue_Broadcast+0x63> */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 117a8d: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 117a90: 8b 42 2c mov 0x2c(%edx),%eax 117a93: 89 c7 mov %eax,%edi 117a95: 8b 75 0c mov 0xc(%ebp),%esi 117a98: 8b 4d 10 mov 0x10(%ebp),%ecx 117a9b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 117a9d: 8b 42 28 mov 0x28(%edx),%eax 117aa0: 8b 55 10 mov 0x10(%ebp),%edx 117aa3: 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))) { 117aa5: 83 ec 0c sub $0xc,%esp 117aa8: 53 push %ebx 117aa9: e8 ca 21 00 00 call 119c78 <_Thread_queue_Dequeue> 117aae: 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 = 117ab0: 83 c4 10 add $0x10,%esp 117ab3: 85 c0 test %eax,%eax 117ab5: 75 d6 jne 117a8d <_CORE_message_queue_Broadcast+0x31> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 117ab7: 8b 55 e4 mov -0x1c(%ebp),%edx 117aba: 8b 45 1c mov 0x1c(%ebp),%eax 117abd: 89 10 mov %edx,(%eax) 117abf: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 117ac1: 8d 65 f4 lea -0xc(%ebp),%esp 117ac4: 5b pop %ebx 117ac5: 5e pop %esi 117ac6: 5f pop %edi 117ac7: c9 leave 117ac8: c3 ret =============================================================================== 001128e4 <_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 ) { 1128e4: 55 push %ebp 1128e5: 89 e5 mov %esp,%ebp 1128e7: 57 push %edi 1128e8: 56 push %esi 1128e9: 53 push %ebx 1128ea: 83 ec 0c sub $0xc,%esp 1128ed: 8b 5d 08 mov 0x8(%ebp),%ebx 1128f0: 8b 75 10 mov 0x10(%ebp),%esi 1128f3: 8b 55 14 mov 0x14(%ebp),%edx size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 1128f6: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1128f9: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 112900: 89 53 4c mov %edx,0x4c(%ebx) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 112903: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 11290a: 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)) { 112911: 89 d0 mov %edx,%eax 112913: f6 c2 03 test $0x3,%dl 112916: 74 0a je 112922 <_CORE_message_queue_Initialize+0x3e> allocated_message_size += sizeof(uint32_t); 112918: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 11291b: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 11291e: 39 d0 cmp %edx,%eax 112920: 72 5f jb 112981 <_CORE_message_queue_Initialize+0x9d><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 112922: 8d 78 14 lea 0x14(%eax),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 112925: 89 fa mov %edi,%edx 112927: 0f af d6 imul %esi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 11292a: 39 c2 cmp %eax,%edx 11292c: 72 53 jb 112981 <_CORE_message_queue_Initialize+0x9d><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 11292e: 83 ec 0c sub $0xc,%esp 112931: 52 push %edx 112932: e8 85 26 00 00 call 114fbc <_Workspace_Allocate> 112937: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 11293a: 83 c4 10 add $0x10,%esp 11293d: 85 c0 test %eax,%eax 11293f: 74 40 je 112981 <_CORE_message_queue_Initialize+0x9d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 112941: 57 push %edi 112942: 56 push %esi 112943: 50 push %eax 112944: 8d 43 68 lea 0x68(%ebx),%eax 112947: 50 push %eax 112948: e8 db 53 00 00 call 117d28 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11294d: 8d 43 54 lea 0x54(%ebx),%eax 112950: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 112953: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 11295a: 8d 43 50 lea 0x50(%ebx),%eax 11295d: 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( 112960: 6a 06 push $0x6 112962: 68 80 00 00 00 push $0x80 112967: 8b 45 0c mov 0xc(%ebp),%eax 11296a: 83 38 01 cmpl $0x1,(%eax) 11296d: 0f 94 c0 sete %al 112970: 0f b6 c0 movzbl %al,%eax 112973: 50 push %eax 112974: 53 push %ebx 112975: e8 22 1d 00 00 call 11469c <_Thread_queue_Initialize> 11297a: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 11297c: 83 c4 20 add $0x20,%esp 11297f: eb 02 jmp 112983 <_CORE_message_queue_Initialize+0x9f> 112981: 31 c0 xor %eax,%eax } 112983: 8d 65 f4 lea -0xc(%ebp),%esp 112986: 5b pop %ebx 112987: 5e pop %esi 112988: 5f pop %edi 112989: c9 leave 11298a: c3 ret =============================================================================== 0011298c <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 11298c: 55 push %ebp 11298d: 89 e5 mov %esp,%ebp 11298f: 57 push %edi 112990: 56 push %esi 112991: 53 push %ebx 112992: 83 ec 2c sub $0x2c,%esp 112995: 8b 55 08 mov 0x8(%ebp),%edx 112998: 8b 45 0c mov 0xc(%ebp),%eax 11299b: 89 45 dc mov %eax,-0x24(%ebp) 11299e: 8b 5d 10 mov 0x10(%ebp),%ebx 1129a1: 89 5d e0 mov %ebx,-0x20(%ebp) 1129a4: 8b 4d 14 mov 0x14(%ebp),%ecx 1129a7: 8b 75 1c mov 0x1c(%ebp),%esi 1129aa: 89 75 d4 mov %esi,-0x2c(%ebp) 1129ad: 8a 45 18 mov 0x18(%ebp),%al 1129b0: 88 45 db mov %al,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 1129b3: a1 34 e4 12 00 mov 0x12e434,%eax executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1129b8: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _ISR_Disable( level ); 1129bf: 9c pushf 1129c0: fa cli 1129c1: 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)); 1129c4: 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; 1129c7: 8d 72 54 lea 0x54(%edx),%esi 1129ca: 39 f3 cmp %esi,%ebx 1129cc: 0f 84 8a 00 00 00 je 112a5c <_CORE_message_queue_Seize+0xd0> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 1129d2: 8b 33 mov (%ebx),%esi the_chain->first = new_first; 1129d4: 89 72 50 mov %esi,0x50(%edx) new_first->previous = _Chain_Head(the_chain); 1129d7: 8d 7a 50 lea 0x50(%edx),%edi 1129da: 89 7e 04 mov %edi,0x4(%esi) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 1129dd: 85 db test %ebx,%ebx 1129df: 74 7b je 112a5c <_CORE_message_queue_Seize+0xd0><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 1129e1: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 1129e4: ff 75 e4 pushl -0x1c(%ebp) 1129e7: 9d popf *size_p = the_message->Contents.size; 1129e8: 8b 43 0c mov 0xc(%ebx),%eax 1129eb: 89 01 mov %eax,(%ecx) _Thread_Executing->Wait.count = 1129ed: 8b 73 08 mov 0x8(%ebx),%esi 1129f0: a1 34 e4 12 00 mov 0x12e434,%eax 1129f5: 89 70 24 mov %esi,0x24(%eax) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 1129f8: 8d 73 10 lea 0x10(%ebx),%esi 1129fb: 89 75 e4 mov %esi,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1129fe: 8b 09 mov (%ecx),%ecx 112a00: 8b 7d e0 mov -0x20(%ebp),%edi 112a03: 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 ); 112a05: 83 ec 0c sub $0xc,%esp 112a08: 52 push %edx 112a09: 89 55 d0 mov %edx,-0x30(%ebp) 112a0c: e8 7b 19 00 00 call 11438c <_Thread_queue_Dequeue> if ( !the_thread ) { 112a11: 83 c4 10 add $0x10,%esp 112a14: 85 c0 test %eax,%eax 112a16: 8b 55 d0 mov -0x30(%ebp),%edx 112a19: 75 15 jne 112a30 <_CORE_message_queue_Seize+0xa4> RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 112a1b: 89 5d 0c mov %ebx,0xc(%ebp) 112a1e: 83 c2 68 add $0x68,%edx 112a21: 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 ); } 112a24: 8d 65 f4 lea -0xc(%ebp),%esp 112a27: 5b pop %ebx 112a28: 5e pop %esi 112a29: 5f pop %edi 112a2a: c9 leave 112a2b: e9 34 fe ff ff jmp 112864 <_Chain_Append> CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 112a30: 8b 48 24 mov 0x24(%eax),%ecx 112a33: 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; 112a36: 8b 48 30 mov 0x30(%eax),%ecx 112a39: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 112a3c: 8b 70 2c mov 0x2c(%eax),%esi 112a3f: 8b 7d e4 mov -0x1c(%ebp),%edi 112a42: 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( 112a44: 8b 43 08 mov 0x8(%ebx),%eax 112a47: 89 45 10 mov %eax,0x10(%ebp) 112a4a: 89 5d 0c mov %ebx,0xc(%ebp) 112a4d: 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 ); } 112a50: 8d 65 f4 lea -0xc(%ebp),%esp 112a53: 5b pop %ebx 112a54: 5e pop %esi 112a55: 5f pop %edi 112a56: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 112a57: e9 ec 53 00 00 jmp 117e48 <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 112a5c: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 112a60: 75 13 jne 112a75 <_CORE_message_queue_Seize+0xe9> _ISR_Enable( level ); 112a62: ff 75 e4 pushl -0x1c(%ebp) 112a65: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 112a66: c7 40 34 04 00 00 00 movl $0x4,0x34(%eax) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 112a6d: 8d 65 f4 lea -0xc(%ebp),%esp 112a70: 5b pop %ebx 112a71: 5e pop %esi 112a72: 5f pop %edi 112a73: c9 leave 112a74: c3 ret RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 112a75: 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; 112a7c: 89 50 44 mov %edx,0x44(%eax) executing->Wait.id = id; 112a7f: 8b 5d dc mov -0x24(%ebp),%ebx 112a82: 89 58 20 mov %ebx,0x20(%eax) executing->Wait.return_argument_second.mutable_object = buffer; 112a85: 8b 75 e0 mov -0x20(%ebp),%esi 112a88: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.return_argument = size_p; 112a8b: 89 48 28 mov %ecx,0x28(%eax) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 112a8e: ff 75 e4 pushl -0x1c(%ebp) 112a91: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 112a92: c7 45 10 40 47 11 00 movl $0x114740,0x10(%ebp) 112a99: 8b 45 d4 mov -0x2c(%ebp),%eax 112a9c: 89 45 0c mov %eax,0xc(%ebp) 112a9f: 89 55 08 mov %edx,0x8(%ebp) } 112aa2: 8d 65 f4 lea -0xc(%ebp),%esp 112aa5: 5b pop %ebx 112aa6: 5e pop %esi 112aa7: 5f pop %edi 112aa8: 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 ); 112aa9: e9 e2 19 00 00 jmp 114490 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010b081 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10b081: 55 push %ebp 10b082: 89 e5 mov %esp,%ebp 10b084: 53 push %ebx 10b085: 83 ec 14 sub $0x14,%esp 10b088: 8b 5d 08 mov 0x8(%ebp),%ebx 10b08b: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10b08e: a1 08 62 12 00 mov 0x126208,%eax 10b093: 85 c0 test %eax,%eax 10b095: 74 19 je 10b0b0 <_CORE_mutex_Seize+0x2f> 10b097: 84 d2 test %dl,%dl 10b099: 74 15 je 10b0b0 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN 10b09b: 83 3d a0 63 12 00 01 cmpl $0x1,0x1263a0 10b0a2: 76 0c jbe 10b0b0 <_CORE_mutex_Seize+0x2f> 10b0a4: 53 push %ebx 10b0a5: 6a 13 push $0x13 10b0a7: 6a 00 push $0x0 10b0a9: 6a 00 push $0x0 10b0ab: e8 c4 05 00 00 call 10b674 <_Internal_error_Occurred> 10b0b0: 51 push %ecx 10b0b1: 51 push %ecx 10b0b2: 8d 45 18 lea 0x18(%ebp),%eax 10b0b5: 50 push %eax 10b0b6: 53 push %ebx 10b0b7: 88 55 f4 mov %dl,-0xc(%ebp) 10b0ba: e8 01 50 00 00 call 1100c0 <_CORE_mutex_Seize_interrupt_trylock> 10b0bf: 83 c4 10 add $0x10,%esp 10b0c2: 85 c0 test %eax,%eax 10b0c4: 8a 55 f4 mov -0xc(%ebp),%dl 10b0c7: 74 48 je 10b111 <_CORE_mutex_Seize+0x90> 10b0c9: 84 d2 test %dl,%dl 10b0cb: 75 12 jne 10b0df <_CORE_mutex_Seize+0x5e> 10b0cd: ff 75 18 pushl 0x18(%ebp) 10b0d0: 9d popf 10b0d1: a1 c4 62 12 00 mov 0x1262c4,%eax 10b0d6: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10b0dd: eb 32 jmp 10b111 <_CORE_mutex_Seize+0x90> 10b0df: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10b0e6: a1 c4 62 12 00 mov 0x1262c4,%eax 10b0eb: 89 58 44 mov %ebx,0x44(%eax) 10b0ee: 8b 55 0c mov 0xc(%ebp),%edx 10b0f1: 89 50 20 mov %edx,0x20(%eax) 10b0f4: a1 08 62 12 00 mov 0x126208,%eax 10b0f9: 40 inc %eax 10b0fa: a3 08 62 12 00 mov %eax,0x126208 10b0ff: ff 75 18 pushl 0x18(%ebp) 10b102: 9d popf 10b103: 50 push %eax 10b104: 50 push %eax 10b105: ff 75 14 pushl 0x14(%ebp) 10b108: 53 push %ebx 10b109: e8 26 ff ff ff call 10b034 <_CORE_mutex_Seize_interrupt_blocking> 10b10e: 83 c4 10 add $0x10,%esp } 10b111: 8b 5d fc mov -0x4(%ebp),%ebx 10b114: c9 leave 10b115: c3 ret =============================================================================== 0010b244 <_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 ) { 10b244: 55 push %ebp 10b245: 89 e5 mov %esp,%ebp 10b247: 53 push %ebx 10b248: 83 ec 10 sub $0x10,%esp 10b24b: 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)) ) { 10b24e: 53 push %ebx 10b24f: e8 70 14 00 00 call 10c6c4 <_Thread_queue_Dequeue> 10b254: 89 c2 mov %eax,%edx 10b256: 83 c4 10 add $0x10,%esp 10b259: 31 c0 xor %eax,%eax 10b25b: 85 d2 test %edx,%edx 10b25d: 75 15 jne 10b274 <_CORE_semaphore_Surrender+0x30> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10b25f: 9c pushf 10b260: fa cli 10b261: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10b262: 8b 53 48 mov 0x48(%ebx),%edx 10b265: b0 04 mov $0x4,%al 10b267: 3b 53 40 cmp 0x40(%ebx),%edx 10b26a: 73 06 jae 10b272 <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN the_semaphore->count += 1; 10b26c: 42 inc %edx 10b26d: 89 53 48 mov %edx,0x48(%ebx) 10b270: 30 c0 xor %al,%al else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10b272: 51 push %ecx 10b273: 9d popf } return status; } 10b274: 8b 5d fc mov -0x4(%ebp),%ebx 10b277: c9 leave 10b278: c3 ret =============================================================================== 00100208 <_Dual_ported_memory_Manager_initialization>: #include #include #include 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 #include #include void _Event_Manager_initialization(void) { 100210: 55 push %ebp 100211: 89 e5 mov %esp,%ebp } 100213: c9 leave 100214: c3 ret =============================================================================== 0010a088 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10a088: 55 push %ebp 10a089: 89 e5 mov %esp,%ebp 10a08b: 57 push %edi 10a08c: 56 push %esi 10a08d: 53 push %ebx 10a08e: 83 ec 1c sub $0x1c,%esp 10a091: 8b 45 08 mov 0x8(%ebp),%eax 10a094: 8b 75 0c mov 0xc(%ebp),%esi 10a097: 8b 55 10 mov 0x10(%ebp),%edx 10a09a: 89 55 dc mov %edx,-0x24(%ebp) 10a09d: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10a0a0: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10a0a6: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10a0ad: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi _ISR_Disable( level ); 10a0b3: 9c pushf 10a0b4: fa cli 10a0b5: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10a0b8: 8b 17 mov (%edi),%edx 10a0ba: 89 55 e0 mov %edx,-0x20(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10a0bd: 21 c2 and %eax,%edx 10a0bf: 74 1b je 10a0dc <_Event_Seize+0x54> 10a0c1: 39 c2 cmp %eax,%edx 10a0c3: 74 08 je 10a0cd <_Event_Seize+0x45> 10a0c5: f7 c6 02 00 00 00 test $0x2,%esi 10a0cb: 74 0f je 10a0dc <_Event_Seize+0x54> <== NEVER TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10a0cd: 89 d0 mov %edx,%eax 10a0cf: f7 d0 not %eax 10a0d1: 23 45 e0 and -0x20(%ebp),%eax 10a0d4: 89 07 mov %eax,(%edi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10a0d6: ff 75 e4 pushl -0x1c(%ebp) 10a0d9: 9d popf 10a0da: eb 13 jmp 10a0ef <_Event_Seize+0x67> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10a0dc: f7 c6 01 00 00 00 test $0x1,%esi 10a0e2: 74 12 je 10a0f6 <_Event_Seize+0x6e> _ISR_Enable( level ); 10a0e4: ff 75 e4 pushl -0x1c(%ebp) 10a0e7: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10a0e8: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10a0ef: 89 11 mov %edx,(%ecx) return; 10a0f1: e9 91 00 00 00 jmp 10a187 <_Event_Seize+0xff> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 10a0f6: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10a0f9: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10a0fc: 89 4b 28 mov %ecx,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10a0ff: c7 05 48 6b 12 00 01 movl $0x1,0x126b48 10a106: 00 00 00 _ISR_Enable( level ); 10a109: ff 75 e4 pushl -0x1c(%ebp) 10a10c: 9d popf if ( ticks ) { 10a10d: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 10a111: 74 34 je 10a147 <_Event_Seize+0xbf> _Watchdog_Initialize( 10a113: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a116: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10a11d: c7 43 64 c0 a2 10 00 movl $0x10a2c0,0x64(%ebx) the_watchdog->id = id; 10a124: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10a127: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a12e: 8b 45 dc mov -0x24(%ebp),%eax 10a131: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a134: 52 push %edx 10a135: 52 push %edx 10a136: 8d 43 48 lea 0x48(%ebx),%eax 10a139: 50 push %eax 10a13a: 68 e4 62 12 00 push $0x1262e4 10a13f: e8 a0 2f 00 00 call 10d0e4 <_Watchdog_Insert> 10a144: 83 c4 10 add $0x10,%esp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10a147: 50 push %eax 10a148: 50 push %eax 10a149: 68 00 01 00 00 push $0x100 10a14e: 53 push %ebx 10a14f: e8 c0 29 00 00 call 10cb14 <_Thread_Set_state> _ISR_Disable( level ); 10a154: 9c pushf 10a155: fa cli 10a156: 5a pop %edx sync_state = _Event_Sync_state; 10a157: a1 48 6b 12 00 mov 0x126b48,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10a15c: c7 05 48 6b 12 00 00 movl $0x0,0x126b48 10a163: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10a166: 83 c4 10 add $0x10,%esp 10a169: 83 f8 01 cmp $0x1,%eax 10a16c: 75 04 jne 10a172 <_Event_Seize+0xea> _ISR_Enable( level ); 10a16e: 52 push %edx 10a16f: 9d popf 10a170: eb 15 jmp 10a187 <_Event_Seize+0xff> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10a172: 89 55 10 mov %edx,0x10(%ebp) 10a175: 89 5d 0c mov %ebx,0xc(%ebp) 10a178: 89 45 08 mov %eax,0x8(%ebp) } 10a17b: 8d 65 f4 lea -0xc(%ebp),%esp 10a17e: 5b pop %ebx 10a17f: 5e pop %esi 10a180: 5f pop %edi 10a181: 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 ); 10a182: e9 a1 1c 00 00 jmp 10be28 <_Thread_blocking_operation_Cancel> } 10a187: 8d 65 f4 lea -0xc(%ebp),%esp 10a18a: 5b pop %ebx 10a18b: 5e pop %esi 10a18c: 5f pop %edi 10a18d: c9 leave 10a18e: c3 ret =============================================================================== 0010a1dc <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10a1dc: 55 push %ebp 10a1dd: 89 e5 mov %esp,%ebp 10a1df: 57 push %edi 10a1e0: 56 push %esi 10a1e1: 53 push %ebx 10a1e2: 83 ec 2c sub $0x2c,%esp 10a1e5: 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 ]; 10a1e8: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 10a1ee: 8b 43 30 mov 0x30(%ebx),%eax 10a1f1: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 10a1f4: 9c pushf 10a1f5: fa cli 10a1f6: 58 pop %eax pending_events = api->pending_events; 10a1f7: 8b 17 mov (%edi),%edx 10a1f9: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 10a1fc: 8b 73 24 mov 0x24(%ebx),%esi seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10a1ff: 21 f2 and %esi,%edx 10a201: 0f 84 ac 00 00 00 je 10a2b3 <_Event_Surrender+0xd7> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10a207: 8b 0d a0 62 12 00 mov 0x1262a0,%ecx 10a20d: 85 c9 test %ecx,%ecx 10a20f: 74 47 je 10a258 <_Event_Surrender+0x7c> 10a211: 3b 1d c4 62 12 00 cmp 0x1262c4,%ebx 10a217: 75 3f jne 10a258 <_Event_Surrender+0x7c> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10a219: 8b 0d 48 6b 12 00 mov 0x126b48,%ecx /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10a21f: 83 f9 02 cmp $0x2,%ecx 10a222: 74 09 je 10a22d <_Event_Surrender+0x51> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10a224: 8b 0d 48 6b 12 00 mov 0x126b48,%ecx /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10a22a: 49 dec %ecx 10a22b: 75 2b jne 10a258 <_Event_Surrender+0x7c> _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) ) { 10a22d: 39 f2 cmp %esi,%edx 10a22f: 74 06 je 10a237 <_Event_Surrender+0x5b> 10a231: f6 45 e0 02 testb $0x2,-0x20(%ebp) 10a235: 74 7c je 10a2b3 <_Event_Surrender+0xd7> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10a237: 89 d6 mov %edx,%esi 10a239: f7 d6 not %esi 10a23b: 23 75 d4 and -0x2c(%ebp),%esi 10a23e: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 10a240: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a247: 8b 4b 28 mov 0x28(%ebx),%ecx 10a24a: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10a24c: c7 05 48 6b 12 00 03 movl $0x3,0x126b48 10a253: 00 00 00 10a256: eb 5b jmp 10a2b3 <_Event_Surrender+0xd7> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10a258: f6 43 11 01 testb $0x1,0x11(%ebx) 10a25c: 74 55 je 10a2b3 <_Event_Surrender+0xd7> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10a25e: 39 f2 cmp %esi,%edx 10a260: 74 06 je 10a268 <_Event_Surrender+0x8c> 10a262: f6 45 e0 02 testb $0x2,-0x20(%ebp) 10a266: 74 4b je 10a2b3 <_Event_Surrender+0xd7> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10a268: 89 d6 mov %edx,%esi 10a26a: f7 d6 not %esi 10a26c: 23 75 d4 and -0x2c(%ebp),%esi 10a26f: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 10a271: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a278: 8b 4b 28 mov 0x28(%ebx),%ecx 10a27b: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 10a27d: 50 push %eax 10a27e: 9d popf 10a27f: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10a280: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10a284: 74 06 je 10a28c <_Event_Surrender+0xb0> _ISR_Enable( level ); 10a286: 50 push %eax 10a287: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10a288: 51 push %ecx 10a289: 51 push %ecx 10a28a: eb 17 jmp 10a2a3 <_Event_Surrender+0xc7> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10a28c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10a293: 50 push %eax 10a294: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10a295: 83 ec 0c sub $0xc,%esp 10a298: 8d 43 48 lea 0x48(%ebx),%eax 10a29b: 50 push %eax 10a29c: e8 57 2f 00 00 call 10d1f8 <_Watchdog_Remove> 10a2a1: 58 pop %eax 10a2a2: 5a pop %edx 10a2a3: 68 f8 ff 03 10 push $0x1003fff8 10a2a8: 53 push %ebx 10a2a9: e8 e6 1c 00 00 call 10bf94 <_Thread_Clear_state> 10a2ae: 83 c4 10 add $0x10,%esp 10a2b1: eb 02 jmp 10a2b5 <_Event_Surrender+0xd9> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10a2b3: 50 push %eax 10a2b4: 9d popf } 10a2b5: 8d 65 f4 lea -0xc(%ebp),%esp 10a2b8: 5b pop %ebx 10a2b9: 5e pop %esi 10a2ba: 5f pop %edi 10a2bb: c9 leave 10a2bc: c3 ret =============================================================================== 0010a2c0 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10a2c0: 55 push %ebp 10a2c1: 89 e5 mov %esp,%ebp 10a2c3: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10a2c6: 8d 45 f4 lea -0xc(%ebp),%eax 10a2c9: 50 push %eax 10a2ca: ff 75 08 pushl 0x8(%ebp) 10a2cd: e8 62 20 00 00 call 10c334 <_Thread_Get> switch ( location ) { 10a2d2: 83 c4 10 add $0x10,%esp 10a2d5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a2d9: 75 49 jne 10a324 <_Event_Timeout+0x64> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 10a2db: 9c pushf 10a2dc: fa cli 10a2dd: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10a2de: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10a2e5: 3b 05 c4 62 12 00 cmp 0x1262c4,%eax 10a2eb: 75 13 jne 10a300 <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10a2ed: 8b 0d 48 6b 12 00 mov 0x126b48,%ecx 10a2f3: 49 dec %ecx 10a2f4: 75 0a jne 10a300 <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10a2f6: c7 05 48 6b 12 00 02 movl $0x2,0x126b48 10a2fd: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10a300: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10a307: 52 push %edx 10a308: 9d popf 10a309: 52 push %edx 10a30a: 52 push %edx 10a30b: 68 f8 ff 03 10 push $0x1003fff8 10a310: 50 push %eax 10a311: e8 7e 1c 00 00 call 10bf94 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10a316: a1 08 62 12 00 mov 0x126208,%eax 10a31b: 48 dec %eax 10a31c: a3 08 62 12 00 mov %eax,0x126208 10a321: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10a324: c9 leave 10a325: c3 ret =============================================================================== 00100248 <_Extension_Manager_initialization>: #include #include #include void _Extension_Manager_initialization(void) { 100248: 55 push %ebp 100249: 89 e5 mov %esp,%ebp } 10024b: c9 leave 10024c: c3 ret =============================================================================== 001101e8 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 1101e8: 55 push %ebp 1101e9: 89 e5 mov %esp,%ebp 1101eb: 57 push %edi 1101ec: 56 push %esi 1101ed: 53 push %ebx 1101ee: 83 ec 2c sub $0x2c,%esp 1101f1: 8b 75 08 mov 0x8(%ebp),%esi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 1101f4: 8b 4e 08 mov 0x8(%esi),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 1101f7: 8b 46 10 mov 0x10(%esi),%eax 1101fa: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 1101fd: 8b 45 0c mov 0xc(%ebp),%eax 110200: 83 c0 04 add $0x4,%eax 110203: 89 45 cc mov %eax,-0x34(%ebp) 110206: 0f 82 2f 01 00 00 jb 11033b <_Heap_Allocate_aligned_with_boundary+0x153> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 11020c: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 110210: 74 18 je 11022a <_Heap_Allocate_aligned_with_boundary+0x42> if ( boundary < alloc_size ) { 110212: 8b 45 0c mov 0xc(%ebp),%eax 110215: 39 45 14 cmp %eax,0x14(%ebp) 110218: 0f 82 1d 01 00 00 jb 11033b <_Heap_Allocate_aligned_with_boundary+0x153> return NULL; } if ( alignment == 0 ) { 11021e: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 110222: 75 06 jne 11022a <_Heap_Allocate_aligned_with_boundary+0x42> 110224: 8b 45 e0 mov -0x20(%ebp),%eax 110227: 89 45 10 mov %eax,0x10(%ebp) 11022a: 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; 110231: 8b 45 e0 mov -0x20(%ebp),%eax 110234: 83 c0 07 add $0x7,%eax 110237: 89 45 c8 mov %eax,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 11023a: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 110241: 8b 45 0c mov 0xc(%ebp),%eax 110244: 29 45 d8 sub %eax,-0x28(%ebp) 110247: 89 f7 mov %esi,%edi 110249: e9 ba 00 00 00 jmp 110308 <_Heap_Allocate_aligned_with_boundary+0x120> while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 11024e: 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 ) { 110251: 8b 59 04 mov 0x4(%ecx),%ebx 110254: 3b 5d cc cmp -0x34(%ebp),%ebx 110257: 0f 86 a8 00 00 00 jbe 110305 <_Heap_Allocate_aligned_with_boundary+0x11d> if ( alignment == 0 ) { 11025d: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 110261: 8d 41 08 lea 0x8(%ecx),%eax 110264: 89 45 dc mov %eax,-0x24(%ebp) 110267: 75 07 jne 110270 <_Heap_Allocate_aligned_with_boundary+0x88> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 110269: 89 c3 mov %eax,%ebx 11026b: e9 91 00 00 00 jmp 110301 <_Heap_Allocate_aligned_with_boundary+0x119> uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 110270: 8b 47 14 mov 0x14(%edi),%eax 110273: 89 45 d4 mov %eax,-0x2c(%ebp) uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 110276: 83 e3 fe and $0xfffffffe,%ebx 110279: 8d 1c 19 lea (%ecx,%ebx,1),%ebx uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 11027c: 8b 75 c8 mov -0x38(%ebp),%esi 11027f: 29 c6 sub %eax,%esi 110281: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 110283: 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); 110286: 89 d8 mov %ebx,%eax 110288: 31 d2 xor %edx,%edx 11028a: f7 75 10 divl 0x10(%ebp) 11028d: 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 ) { 11028f: 39 f3 cmp %esi,%ebx 110291: 76 0b jbe 11029e <_Heap_Allocate_aligned_with_boundary+0xb6> 110293: 89 f0 mov %esi,%eax 110295: 31 d2 xor %edx,%edx 110297: f7 75 10 divl 0x10(%ebp) 11029a: 89 f3 mov %esi,%ebx 11029c: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 11029e: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 1102a2: 74 3f je 1102e3 <_Heap_Allocate_aligned_with_boundary+0xfb> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 1102a4: 8b 45 0c mov 0xc(%ebp),%eax 1102a7: 8d 34 03 lea (%ebx,%eax,1),%esi /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 1102aa: 8b 45 dc mov -0x24(%ebp),%eax 1102ad: 03 45 0c add 0xc(%ebp),%eax 1102b0: 89 45 d0 mov %eax,-0x30(%ebp) 1102b3: eb 19 jmp 1102ce <_Heap_Allocate_aligned_with_boundary+0xe6> uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 1102b5: 3b 55 d0 cmp -0x30(%ebp),%edx 1102b8: 72 4b jb 110305 <_Heap_Allocate_aligned_with_boundary+0x11d> return 0; } alloc_begin = boundary_line - alloc_size; 1102ba: 89 d3 mov %edx,%ebx 1102bc: 2b 5d 0c sub 0xc(%ebp),%ebx 1102bf: 89 d8 mov %ebx,%eax 1102c1: 31 d2 xor %edx,%edx 1102c3: f7 75 10 divl 0x10(%ebp) 1102c6: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 1102c8: 8b 45 0c mov 0xc(%ebp),%eax 1102cb: 8d 34 03 lea (%ebx,%eax,1),%esi 1102ce: 89 f0 mov %esi,%eax 1102d0: 31 d2 xor %edx,%edx 1102d2: f7 75 14 divl 0x14(%ebp) 1102d5: 89 f0 mov %esi,%eax 1102d7: 29 d0 sub %edx,%eax 1102d9: 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 ) { 1102db: 39 f0 cmp %esi,%eax 1102dd: 73 04 jae 1102e3 <_Heap_Allocate_aligned_with_boundary+0xfb> 1102df: 39 c3 cmp %eax,%ebx 1102e1: 72 d2 jb 1102b5 <_Heap_Allocate_aligned_with_boundary+0xcd> boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 1102e3: 3b 5d dc cmp -0x24(%ebp),%ebx 1102e6: 72 1d jb 110305 <_Heap_Allocate_aligned_with_boundary+0x11d> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 1102e8: be f8 ff ff ff mov $0xfffffff8,%esi 1102ed: 29 ce sub %ecx,%esi 1102ef: 01 de add %ebx,%esi 1102f1: 89 d8 mov %ebx,%eax 1102f3: 31 d2 xor %edx,%edx 1102f5: f7 75 e0 divl -0x20(%ebp) if ( free_size >= min_block_size || free_size == 0 ) { 1102f8: 29 d6 sub %edx,%esi 1102fa: 74 05 je 110301 <_Heap_Allocate_aligned_with_boundary+0x119> 1102fc: 3b 75 d4 cmp -0x2c(%ebp),%esi 1102ff: 72 04 jb 110305 <_Heap_Allocate_aligned_with_boundary+0x11d> boundary ); } } if ( alloc_begin != 0 ) { 110301: 85 db test %ebx,%ebx 110303: 75 11 jne 110316 <_Heap_Allocate_aligned_with_boundary+0x12e><== ALWAYS TAKEN break; } block = block->next; 110305: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110308: 39 f9 cmp %edi,%ecx 11030a: 0f 85 3e ff ff ff jne 11024e <_Heap_Allocate_aligned_with_boundary+0x66> 110310: 89 fe mov %edi,%esi 110312: 31 db xor %ebx,%ebx 110314: eb 16 jmp 11032c <_Heap_Allocate_aligned_with_boundary+0x144> 110316: 89 fe mov %edi,%esi block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 110318: 8b 45 e4 mov -0x1c(%ebp),%eax 11031b: 01 47 4c add %eax,0x4c(%edi) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 11031e: ff 75 0c pushl 0xc(%ebp) 110321: 53 push %ebx 110322: 51 push %ecx 110323: 57 push %edi 110324: e8 6f b2 ff ff call 10b598 <_Heap_Block_allocate> 110329: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 11032c: 8b 45 e4 mov -0x1c(%ebp),%eax 11032f: 39 46 44 cmp %eax,0x44(%esi) 110332: 73 03 jae 110337 <_Heap_Allocate_aligned_with_boundary+0x14f> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 110334: 89 46 44 mov %eax,0x44(%esi) } return (void *) alloc_begin; 110337: 89 d8 mov %ebx,%eax 110339: eb 02 jmp 11033d <_Heap_Allocate_aligned_with_boundary+0x155> 11033b: 31 c0 xor %eax,%eax } 11033d: 8d 65 f4 lea -0xc(%ebp),%esp 110340: 5b pop %ebx 110341: 5e pop %esi 110342: 5f pop %edi 110343: c9 leave 110344: c3 ret =============================================================================== 00113640 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 113640: 55 push %ebp 113641: 89 e5 mov %esp,%ebp 113643: 56 push %esi 113644: 53 push %ebx 113645: 8b 4d 08 mov 0x8(%ebp),%ecx 113648: 8b 55 0c mov 0xc(%ebp),%edx Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 11364b: 8b 71 1c mov 0x1c(%ecx),%esi uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 11364e: 8b 59 24 mov 0x24(%ecx),%ebx * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 113651: 39 f2 cmp %esi,%edx 113653: 73 0a jae 11365f <_Heap_Extend+0x1f> uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 113655: b8 01 00 00 00 mov $0x1,%eax 11365a: 3b 51 18 cmp 0x18(%ecx),%edx 11365d: 73 5f jae 1136be <_Heap_Extend+0x7e> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 11365f: b8 02 00 00 00 mov $0x2,%eax 113664: 39 f2 cmp %esi,%edx 113666: 75 56 jne 1136be <_Heap_Extend+0x7e> { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 113668: 03 55 10 add 0x10(%ebp),%edx * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 11366b: 89 51 1c mov %edx,0x1c(%ecx) extend_size = new_heap_area_end 11366e: 29 da sub %ebx,%edx 113670: 8d 72 f8 lea -0x8(%edx),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 113673: 89 f0 mov %esi,%eax 113675: 31 d2 xor %edx,%edx 113677: f7 71 10 divl 0x10(%ecx) 11367a: 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; 11367c: 8b 45 14 mov 0x14(%ebp),%eax 11367f: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 113681: 31 c0 xor %eax,%eax 113683: 3b 71 14 cmp 0x14(%ecx),%esi 113686: 72 36 jb 1136be <_Heap_Extend+0x7e> <== NEVER TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 113688: 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; 11368b: 8b 43 04 mov 0x4(%ebx),%eax 11368e: 83 e0 01 and $0x1,%eax 113691: 09 f0 or %esi,%eax 113693: 89 43 04 mov %eax,0x4(%ebx) Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 113696: 8b 41 20 mov 0x20(%ecx),%eax 113699: 29 d0 sub %edx,%eax 11369b: 83 c8 01 or $0x1,%eax 11369e: 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; 1136a1: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 1136a4: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 1136a7: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 1136aa: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 1136ad: 50 push %eax 1136ae: 50 push %eax 1136af: 83 c3 08 add $0x8,%ebx 1136b2: 53 push %ebx 1136b3: 51 push %ecx 1136b4: e8 df a8 ff ff call 10df98 <_Heap_Free> 1136b9: 31 c0 xor %eax,%eax 1136bb: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 1136be: 8d 65 f8 lea -0x8(%ebp),%esp 1136c1: 5b pop %ebx 1136c2: 5e pop %esi 1136c3: c9 leave 1136c4: c3 ret =============================================================================== 00110348 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 110348: 55 push %ebp 110349: 89 e5 mov %esp,%ebp 11034b: 57 push %edi 11034c: 56 push %esi 11034d: 53 push %ebx 11034e: 83 ec 14 sub $0x14,%esp 110351: 8b 4d 08 mov 0x8(%ebp),%ecx 110354: 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 ) 110357: 8d 58 f8 lea -0x8(%eax),%ebx 11035a: 31 d2 xor %edx,%edx 11035c: f7 71 10 divl 0x10(%ecx) 11035f: 29 d3 sub %edx,%ebx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 110361: 8b 41 20 mov 0x20(%ecx),%eax 110364: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 110367: 31 c0 xor %eax,%eax 110369: 3b 5d f0 cmp -0x10(%ebp),%ebx 11036c: 72 08 jb 110376 <_Heap_Free+0x2e> 11036e: 31 c0 xor %eax,%eax 110370: 39 59 24 cmp %ebx,0x24(%ecx) 110373: 0f 93 c0 setae %al Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 110376: 85 c0 test %eax,%eax 110378: 0f 84 2d 01 00 00 je 1104ab <_Heap_Free+0x163> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11037e: 8b 7b 04 mov 0x4(%ebx),%edi 110381: 89 fa mov %edi,%edx 110383: 83 e2 fe and $0xfffffffe,%edx 110386: 89 55 e0 mov %edx,-0x20(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 110389: 8d 04 13 lea (%ebx,%edx,1),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11038c: 31 f6 xor %esi,%esi 11038e: 3b 45 f0 cmp -0x10(%ebp),%eax 110391: 72 0e jb 1103a1 <_Heap_Free+0x59> <== NEVER TAKEN 110393: 39 41 24 cmp %eax,0x24(%ecx) 110396: 0f 93 c2 setae %dl 110399: 89 d6 mov %edx,%esi 11039b: 81 e6 ff 00 00 00 and $0xff,%esi } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 1103a1: 85 f6 test %esi,%esi 1103a3: 0f 84 02 01 00 00 je 1104ab <_Heap_Free+0x163> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 1103a9: 8b 70 04 mov 0x4(%eax),%esi _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 1103ac: f7 c6 01 00 00 00 test $0x1,%esi 1103b2: 0f 84 f3 00 00 00 je 1104ab <_Heap_Free+0x163> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 1103b8: 83 e6 fe and $0xfffffffe,%esi 1103bb: 89 75 e8 mov %esi,-0x18(%ebp) return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 1103be: 8b 51 24 mov 0x24(%ecx),%edx 1103c1: 89 55 e4 mov %edx,-0x1c(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 1103c4: 31 f6 xor %esi,%esi 1103c6: 39 d0 cmp %edx,%eax 1103c8: 74 0d je 1103d7 <_Heap_Free+0x8f> 1103ca: 8b 55 e8 mov -0x18(%ebp),%edx 1103cd: 8b 74 10 04 mov 0x4(%eax,%edx,1),%esi 1103d1: 83 e6 01 and $0x1,%esi 1103d4: 83 f6 01 xor $0x1,%esi && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 1103d7: 83 e7 01 and $0x1,%edi 1103da: 75 64 jne 110440 <_Heap_Free+0xf8> uintptr_t const prev_size = block->prev_size; 1103dc: 8b 13 mov (%ebx),%edx 1103de: 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); 1103e1: 29 d3 sub %edx,%ebx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 1103e3: 31 ff xor %edi,%edi 1103e5: 3b 5d f0 cmp -0x10(%ebp),%ebx 1103e8: 72 0e jb 1103f8 <_Heap_Free+0xb0> <== NEVER TAKEN 1103ea: 39 5d e4 cmp %ebx,-0x1c(%ebp) 1103ed: 0f 93 c2 setae %dl 1103f0: 89 d7 mov %edx,%edi 1103f2: 81 e7 ff 00 00 00 and $0xff,%edi Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 1103f8: 85 ff test %edi,%edi 1103fa: 0f 84 ab 00 00 00 je 1104ab <_Heap_Free+0x163> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 110400: f6 43 04 01 testb $0x1,0x4(%ebx) 110404: 0f 84 a1 00 00 00 je 1104ab <_Heap_Free+0x163> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 11040a: 89 f2 mov %esi,%edx 11040c: 84 d2 test %dl,%dl 11040e: 74 1a je 11042a <_Heap_Free+0xe2> uintptr_t const size = block_size + prev_size + next_block_size; 110410: 8b 75 e0 mov -0x20(%ebp),%esi 110413: 03 75 e8 add -0x18(%ebp),%esi 110416: 03 75 ec add -0x14(%ebp),%esi return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 110419: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = block->prev; 11041c: 8b 40 0c mov 0xc(%eax),%eax prev->next = next; 11041f: 89 78 08 mov %edi,0x8(%eax) next->prev = prev; 110422: 89 47 0c mov %eax,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 110425: ff 49 38 decl 0x38(%ecx) 110428: eb 34 jmp 11045e <_Heap_Free+0x116> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 11042a: 8b 75 e0 mov -0x20(%ebp),%esi 11042d: 03 75 ec add -0x14(%ebp),%esi prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110430: 89 f7 mov %esi,%edi 110432: 83 cf 01 or $0x1,%edi 110435: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110438: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = size; 11043c: 89 30 mov %esi,(%eax) 11043e: eb 5b jmp 11049b <_Heap_Free+0x153> } } else if ( next_is_free ) { /* coalesce next */ 110440: 89 f2 mov %esi,%edx 110442: 84 d2 test %dl,%dl 110444: 74 25 je 11046b <_Heap_Free+0x123> uintptr_t const size = block_size + next_block_size; 110446: 8b 75 e8 mov -0x18(%ebp),%esi 110449: 03 75 e0 add -0x20(%ebp),%esi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 11044c: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = old_block->prev; 11044f: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 110452: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 110455: 89 43 0c mov %eax,0xc(%ebx) next->prev = new_block; 110458: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 11045b: 89 58 08 mov %ebx,0x8(%eax) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 11045e: 89 f0 mov %esi,%eax 110460: 83 c8 01 or $0x1,%eax 110463: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 110466: 89 34 33 mov %esi,(%ebx,%esi,1) 110469: eb 30 jmp 11049b <_Heap_Free+0x153> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 11046b: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 11046e: 89 73 08 mov %esi,0x8(%ebx) new_block->prev = block_before; 110471: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 110474: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 110477: 89 5e 0c mov %ebx,0xc(%esi) } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 11047a: 8b 75 e0 mov -0x20(%ebp),%esi 11047d: 83 ce 01 or $0x1,%esi 110480: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110483: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = block_size; 110487: 8b 55 e0 mov -0x20(%ebp),%edx 11048a: 89 10 mov %edx,(%eax) /* Statistics */ ++stats->free_blocks; 11048c: 8b 41 38 mov 0x38(%ecx),%eax 11048f: 40 inc %eax 110490: 89 41 38 mov %eax,0x38(%ecx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 110493: 39 41 3c cmp %eax,0x3c(%ecx) 110496: 73 03 jae 11049b <_Heap_Free+0x153> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 110498: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 11049b: ff 49 40 decl 0x40(%ecx) ++stats->frees; 11049e: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 1104a1: 8b 45 e0 mov -0x20(%ebp),%eax 1104a4: 01 41 30 add %eax,0x30(%ecx) 1104a7: b0 01 mov $0x1,%al return( true ); 1104a9: eb 02 jmp 1104ad <_Heap_Free+0x165> 1104ab: 31 c0 xor %eax,%eax } 1104ad: 83 c4 14 add $0x14,%esp 1104b0: 5b pop %ebx 1104b1: 5e pop %esi 1104b2: 5f pop %edi 1104b3: c9 leave 1104b4: c3 ret =============================================================================== 0011e5e4 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11e5e4: 55 push %ebp 11e5e5: 89 e5 mov %esp,%ebp 11e5e7: 56 push %esi 11e5e8: 53 push %ebx 11e5e9: 8b 5d 08 mov 0x8(%ebp),%ebx 11e5ec: 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 ) 11e5ef: 8d 4e f8 lea -0x8(%esi),%ecx 11e5f2: 89 f0 mov %esi,%eax 11e5f4: 31 d2 xor %edx,%edx 11e5f6: f7 73 10 divl 0x10(%ebx) 11e5f9: 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; 11e5fb: 8b 53 20 mov 0x20(%ebx),%edx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11e5fe: 31 c0 xor %eax,%eax 11e600: 39 d1 cmp %edx,%ecx 11e602: 72 08 jb 11e60c <_Heap_Size_of_alloc_area+0x28> 11e604: 31 c0 xor %eax,%eax 11e606: 39 4b 24 cmp %ecx,0x24(%ebx) 11e609: 0f 93 c0 setae %al uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 11e60c: 85 c0 test %eax,%eax 11e60e: 74 2e je 11e63e <_Heap_Size_of_alloc_area+0x5a> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11e610: 8b 41 04 mov 0x4(%ecx),%eax 11e613: 83 e0 fe and $0xfffffffe,%eax 11e616: 01 c1 add %eax,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11e618: 31 c0 xor %eax,%eax 11e61a: 39 d1 cmp %edx,%ecx 11e61c: 72 08 jb 11e626 <_Heap_Size_of_alloc_area+0x42><== NEVER TAKEN 11e61e: 31 c0 xor %eax,%eax 11e620: 39 4b 24 cmp %ecx,0x24(%ebx) 11e623: 0f 93 c0 setae %al } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11e626: 85 c0 test %eax,%eax 11e628: 74 14 je 11e63e <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN 11e62a: f6 41 04 01 testb $0x1,0x4(%ecx) 11e62e: 74 0e je 11e63e <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11e630: 29 f1 sub %esi,%ecx 11e632: 8d 51 04 lea 0x4(%ecx),%edx 11e635: 8b 45 10 mov 0x10(%ebp),%eax 11e638: 89 10 mov %edx,(%eax) 11e63a: b0 01 mov $0x1,%al return true; 11e63c: eb 02 jmp 11e640 <_Heap_Size_of_alloc_area+0x5c> 11e63e: 31 c0 xor %eax,%eax } 11e640: 5b pop %ebx 11e641: 5e pop %esi 11e642: c9 leave 11e643: c3 ret =============================================================================== 0010c06d <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10c06d: 55 push %ebp 10c06e: 89 e5 mov %esp,%ebp 10c070: 57 push %edi 10c071: 56 push %esi 10c072: 53 push %ebx 10c073: 83 ec 4c sub $0x4c,%esp 10c076: 8b 7d 08 mov 0x8(%ebp),%edi 10c079: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t const page_size = heap->page_size; 10c07c: 8b 4f 10 mov 0x10(%edi),%ecx uintptr_t const min_block_size = heap->min_block_size; 10c07f: 8b 47 14 mov 0x14(%edi),%eax 10c082: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10c085: 8b 57 24 mov 0x24(%edi),%edx 10c088: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *block = heap->first_block; 10c08b: 8b 5f 20 mov 0x20(%edi),%ebx Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10c08e: c7 45 e4 7f c3 10 00 movl $0x10c37f,-0x1c(%ebp) 10c095: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10c099: 75 07 jne 10c0a2 <_Heap_Walk+0x35> 10c09b: c7 45 e4 68 c0 10 00 movl $0x10c068,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10c0a2: 83 3d 28 84 12 00 03 cmpl $0x3,0x128428 10c0a9: 0f 85 c6 02 00 00 jne 10c375 <_Heap_Walk+0x308> Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 10c0af: 50 push %eax 10c0b0: ff 77 0c pushl 0xc(%edi) 10c0b3: ff 77 08 pushl 0x8(%edi) 10c0b6: ff 75 d0 pushl -0x30(%ebp) 10c0b9: 53 push %ebx 10c0ba: ff 77 1c pushl 0x1c(%edi) 10c0bd: ff 77 18 pushl 0x18(%edi) 10c0c0: ff 75 dc pushl -0x24(%ebp) 10c0c3: 51 push %ecx 10c0c4: 68 f4 12 12 00 push $0x1212f4 10c0c9: 6a 00 push $0x0 10c0cb: 56 push %esi 10c0cc: 89 4d bc mov %ecx,-0x44(%ebp) 10c0cf: 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 ) { 10c0d2: 83 c4 30 add $0x30,%esp 10c0d5: 8b 4d bc mov -0x44(%ebp),%ecx 10c0d8: 85 c9 test %ecx,%ecx 10c0da: 75 0b jne 10c0e7 <_Heap_Walk+0x7a> (*printer)( source, true, "page size is zero\n" ); 10c0dc: 53 push %ebx 10c0dd: 68 85 13 12 00 push $0x121385 10c0e2: e9 5b 02 00 00 jmp 10c342 <_Heap_Walk+0x2d5> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10c0e7: f6 c1 03 test $0x3,%cl 10c0ea: 74 0b je 10c0f7 <_Heap_Walk+0x8a> (*printer)( 10c0ec: 51 push %ecx 10c0ed: 68 98 13 12 00 push $0x121398 10c0f2: e9 4b 02 00 00 jmp 10c342 <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10c0f7: 8b 45 dc mov -0x24(%ebp),%eax 10c0fa: 31 d2 xor %edx,%edx 10c0fc: f7 f1 div %ecx 10c0fe: 85 d2 test %edx,%edx 10c100: 74 0d je 10c10f <_Heap_Walk+0xa2> (*printer)( 10c102: ff 75 dc pushl -0x24(%ebp) 10c105: 68 b6 13 12 00 push $0x1213b6 10c10a: e9 33 02 00 00 jmp 10c342 <_Heap_Walk+0x2d5> ); return false; } if ( 10c10f: 8d 43 08 lea 0x8(%ebx),%eax 10c112: 31 d2 xor %edx,%edx 10c114: f7 f1 div %ecx 10c116: 85 d2 test %edx,%edx 10c118: 74 0b je 10c125 <_Heap_Walk+0xb8> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10c11a: 53 push %ebx 10c11b: 68 da 13 12 00 push $0x1213da 10c120: e9 1d 02 00 00 jmp 10c342 <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10c125: f6 43 04 01 testb $0x1,0x4(%ebx) 10c129: 75 0b jne 10c136 <_Heap_Walk+0xc9> (*printer)( 10c12b: 51 push %ecx 10c12c: 68 0b 14 12 00 push $0x12140b 10c131: e9 0c 02 00 00 jmp 10c342 <_Heap_Walk+0x2d5> ); return false; } if ( first_block->prev_size != page_size ) { 10c136: 8b 03 mov (%ebx),%eax 10c138: 89 45 d4 mov %eax,-0x2c(%ebp) 10c13b: 39 c8 cmp %ecx,%eax 10c13d: 74 0f je 10c14e <_Heap_Walk+0xe1> (*printer)( 10c13f: 83 ec 0c sub $0xc,%esp 10c142: 51 push %ecx 10c143: 50 push %eax 10c144: 68 39 14 12 00 push $0x121439 10c149: e9 3d 01 00 00 jmp 10c28b <_Heap_Walk+0x21e> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10c14e: 8b 55 d0 mov -0x30(%ebp),%edx 10c151: 8b 42 04 mov 0x4(%edx),%eax 10c154: 83 e0 fe and $0xfffffffe,%eax 10c157: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10c15c: 75 0b jne 10c169 <_Heap_Walk+0xfc> (*printer)( 10c15e: 52 push %edx 10c15f: 68 64 14 12 00 push $0x121464 10c164: e9 d9 01 00 00 jmp 10c342 <_Heap_Walk+0x2d5> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10c169: 8b 4f 10 mov 0x10(%edi),%ecx 10c16c: 89 4d d8 mov %ecx,-0x28(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c16f: 8b 4f 08 mov 0x8(%edi),%ecx 10c172: 89 7d e0 mov %edi,-0x20(%ebp) 10c175: eb 6a jmp 10c1e1 <_Heap_Walk+0x174> RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10c177: 31 c0 xor %eax,%eax 10c179: 39 4f 20 cmp %ecx,0x20(%edi) 10c17c: 77 08 ja 10c186 <_Heap_Walk+0x119> 10c17e: 31 c0 xor %eax,%eax 10c180: 39 4f 24 cmp %ecx,0x24(%edi) 10c183: 0f 93 c0 setae %al const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 10c186: 85 c0 test %eax,%eax 10c188: 75 0b jne 10c195 <_Heap_Walk+0x128> (*printer)( 10c18a: 51 push %ecx 10c18b: 68 79 14 12 00 push $0x121479 10c190: e9 ad 01 00 00 jmp 10c342 <_Heap_Walk+0x2d5> ); return false; } if ( 10c195: 8d 41 08 lea 0x8(%ecx),%eax 10c198: 31 d2 xor %edx,%edx 10c19a: f7 75 d8 divl -0x28(%ebp) 10c19d: 85 d2 test %edx,%edx 10c19f: 74 0b je 10c1ac <_Heap_Walk+0x13f> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10c1a1: 51 push %ecx 10c1a2: 68 99 14 12 00 push $0x121499 10c1a7: e9 96 01 00 00 jmp 10c342 <_Heap_Walk+0x2d5> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10c1ac: 8b 41 04 mov 0x4(%ecx),%eax 10c1af: 83 e0 fe and $0xfffffffe,%eax 10c1b2: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10c1b7: 74 0b je 10c1c4 <_Heap_Walk+0x157> (*printer)( 10c1b9: 51 push %ecx 10c1ba: 68 c9 14 12 00 push $0x1214c9 10c1bf: e9 7e 01 00 00 jmp 10c342 <_Heap_Walk+0x2d5> ); return false; } if ( free_block->prev != prev_block ) { 10c1c4: 8b 41 0c mov 0xc(%ecx),%eax 10c1c7: 3b 45 e0 cmp -0x20(%ebp),%eax 10c1ca: 74 0f je 10c1db <_Heap_Walk+0x16e> (*printer)( 10c1cc: 83 ec 0c sub $0xc,%esp 10c1cf: 50 push %eax 10c1d0: 51 push %ecx 10c1d1: 68 e5 14 12 00 push $0x1214e5 10c1d6: e9 b0 00 00 00 jmp 10c28b <_Heap_Walk+0x21e> return false; } prev_block = free_block; free_block = free_block->next; 10c1db: 89 4d e0 mov %ecx,-0x20(%ebp) 10c1de: 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 ) { 10c1e1: 39 f9 cmp %edi,%ecx 10c1e3: 75 92 jne 10c177 <_Heap_Walk+0x10a> 10c1e5: 89 75 e0 mov %esi,-0x20(%ebp) 10c1e8: e9 7f 01 00 00 jmp 10c36c <_Heap_Walk+0x2ff> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c1ed: 8b 43 04 mov 0x4(%ebx),%eax 10c1f0: 89 c1 mov %eax,%ecx 10c1f2: 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); 10c1f5: 8d 34 0b lea (%ebx,%ecx,1),%esi uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 10c1f8: a8 01 test $0x1,%al 10c1fa: 74 0c je 10c208 <_Heap_Walk+0x19b> (*printer)( 10c1fc: 83 ec 0c sub $0xc,%esp 10c1ff: 51 push %ecx 10c200: 53 push %ebx 10c201: 68 17 15 12 00 push $0x121517 10c206: eb 0b jmp 10c213 <_Heap_Walk+0x1a6> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10c208: 50 push %eax 10c209: 50 push %eax 10c20a: ff 33 pushl (%ebx) 10c20c: 51 push %ecx 10c20d: 53 push %ebx 10c20e: 68 2e 15 12 00 push $0x12152e 10c213: 6a 00 push $0x0 10c215: ff 75 e0 pushl -0x20(%ebp) 10c218: 89 4d bc mov %ecx,-0x44(%ebp) 10c21b: ff 55 e4 call *-0x1c(%ebp) 10c21e: 83 c4 20 add $0x20,%esp 10c221: 8b 4d bc mov -0x44(%ebp),%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10c224: 31 c0 xor %eax,%eax 10c226: 39 77 20 cmp %esi,0x20(%edi) 10c229: 77 08 ja 10c233 <_Heap_Walk+0x1c6> <== NEVER TAKEN 10c22b: 31 c0 xor %eax,%eax 10c22d: 39 77 24 cmp %esi,0x24(%edi) 10c230: 0f 93 c0 setae %al block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10c233: 85 c0 test %eax,%eax 10c235: 75 11 jne 10c248 <_Heap_Walk+0x1db> 10c237: 89 f1 mov %esi,%ecx 10c239: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c23c: 83 ec 0c sub $0xc,%esp 10c23f: 51 push %ecx 10c240: 53 push %ebx 10c241: 68 53 15 12 00 push $0x121553 10c246: eb 43 jmp 10c28b <_Heap_Walk+0x21e> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10c248: 89 c8 mov %ecx,%eax 10c24a: 31 d2 xor %edx,%edx 10c24c: f7 75 d4 divl -0x2c(%ebp) 10c24f: 85 d2 test %edx,%edx 10c251: 74 0f je 10c262 <_Heap_Walk+0x1f5> 10c253: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c256: 83 ec 0c sub $0xc,%esp 10c259: 51 push %ecx 10c25a: 53 push %ebx 10c25b: 68 80 15 12 00 push $0x121580 10c260: eb 29 jmp 10c28b <_Heap_Walk+0x21e> ); return false; } if ( block_size < min_block_size ) { 10c262: 3b 4d dc cmp -0x24(%ebp),%ecx 10c265: 73 11 jae 10c278 <_Heap_Walk+0x20b> 10c267: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c26a: 57 push %edi 10c26b: 57 push %edi 10c26c: ff 75 dc pushl -0x24(%ebp) 10c26f: 51 push %ecx 10c270: 53 push %ebx 10c271: 68 ae 15 12 00 push $0x1215ae 10c276: eb 13 jmp 10c28b <_Heap_Walk+0x21e> ); return false; } if ( next_block_begin <= block_begin ) { 10c278: 39 de cmp %ebx,%esi 10c27a: 77 1f ja 10c29b <_Heap_Walk+0x22e> 10c27c: 89 f1 mov %esi,%ecx 10c27e: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c281: 83 ec 0c sub $0xc,%esp 10c284: 51 push %ecx 10c285: 53 push %ebx 10c286: 68 d9 15 12 00 push $0x1215d9 10c28b: 6a 01 push $0x1 10c28d: 56 push %esi 10c28e: ff 55 e4 call *-0x1c(%ebp) 10c291: 31 c0 xor %eax,%eax "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 10c293: 83 c4 20 add $0x20,%esp 10c296: e9 dc 00 00 00 jmp 10c377 <_Heap_Walk+0x30a> } if ( !_Heap_Is_prev_used( next_block ) ) { 10c29b: f6 46 04 01 testb $0x1,0x4(%esi) 10c29f: 0f 85 c5 00 00 00 jne 10c36a <_Heap_Walk+0x2fd> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c2a5: 8b 47 08 mov 0x8(%edi),%eax 10c2a8: 89 45 c0 mov %eax,-0x40(%ebp) block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10c2ab: 8b 53 04 mov 0x4(%ebx),%edx 10c2ae: 89 55 c4 mov %edx,-0x3c(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c2b1: 83 e2 fe and $0xfffffffe,%edx 10c2b4: 89 55 cc mov %edx,-0x34(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c2b7: 01 da add %ebx,%edx 10c2b9: 89 55 c8 mov %edx,-0x38(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10c2bc: 8b 4b 08 mov 0x8(%ebx),%ecx 10c2bf: 89 4d b4 mov %ecx,-0x4c(%ebp) return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10c2c2: ba 0d 16 12 00 mov $0x12160d,%edx 10c2c7: 3b 4f 0c cmp 0xc(%edi),%ecx 10c2ca: 74 0e je 10c2da <_Heap_Walk+0x26d> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10c2cc: ba 17 16 12 00 mov $0x121617,%edx 10c2d1: 39 f9 cmp %edi,%ecx 10c2d3: 74 05 je 10c2da <_Heap_Walk+0x26d> 10c2d5: ba 41 12 12 00 mov $0x121241,%edx Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10c2da: 8b 43 0c mov 0xc(%ebx),%eax 10c2dd: 89 45 d8 mov %eax,-0x28(%ebp) 10c2e0: b8 21 16 12 00 mov $0x121621,%eax 10c2e5: 8b 4d c0 mov -0x40(%ebp),%ecx 10c2e8: 39 4d d8 cmp %ecx,-0x28(%ebp) 10c2eb: 74 0f je 10c2fc <_Heap_Walk+0x28f> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10c2ed: b8 2c 16 12 00 mov $0x12162c,%eax 10c2f2: 39 7d d8 cmp %edi,-0x28(%ebp) 10c2f5: 74 05 je 10c2fc <_Heap_Walk+0x28f> 10c2f7: b8 41 12 12 00 mov $0x121241,%eax Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10c2fc: 52 push %edx 10c2fd: ff 75 b4 pushl -0x4c(%ebp) 10c300: 50 push %eax 10c301: ff 75 d8 pushl -0x28(%ebp) 10c304: 53 push %ebx 10c305: 68 36 16 12 00 push $0x121636 10c30a: 6a 00 push $0x0 10c30c: ff 75 e0 pushl -0x20(%ebp) 10c30f: 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 ) { 10c312: 8b 55 c8 mov -0x38(%ebp),%edx 10c315: 8b 02 mov (%edx),%eax 10c317: 83 c4 20 add $0x20,%esp 10c31a: 39 45 cc cmp %eax,-0x34(%ebp) 10c31d: 74 14 je 10c333 <_Heap_Walk+0x2c6> 10c31f: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c322: 51 push %ecx 10c323: 52 push %edx 10c324: 50 push %eax 10c325: ff 75 cc pushl -0x34(%ebp) 10c328: 53 push %ebx 10c329: 68 62 16 12 00 push $0x121662 10c32e: e9 58 ff ff ff jmp 10c28b <_Heap_Walk+0x21e> ); return false; } if ( !prev_used ) { 10c333: f6 45 c4 01 testb $0x1,-0x3c(%ebp) 10c337: 75 16 jne 10c34f <_Heap_Walk+0x2e2> 10c339: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c33c: 53 push %ebx 10c33d: 68 9b 16 12 00 push $0x12169b 10c342: 6a 01 push $0x1 10c344: 56 push %esi 10c345: ff 55 e4 call *-0x1c(%ebp) 10c348: 31 c0 xor %eax,%eax 10c34a: 83 c4 10 add $0x10,%esp 10c34d: eb 28 jmp 10c377 <_Heap_Walk+0x30a> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c34f: 8b 47 08 mov 0x8(%edi),%eax 10c352: eb 07 jmp 10c35b <_Heap_Walk+0x2ee> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 10c354: 39 d8 cmp %ebx,%eax 10c356: 74 12 je 10c36a <_Heap_Walk+0x2fd> return true; } free_block = free_block->next; 10c358: 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 ) { 10c35b: 39 f8 cmp %edi,%eax 10c35d: 75 f5 jne 10c354 <_Heap_Walk+0x2e7> 10c35f: 8b 75 e0 mov -0x20(%ebp),%esi return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10c362: 53 push %ebx 10c363: 68 ca 16 12 00 push $0x1216ca 10c368: eb d8 jmp 10c342 <_Heap_Walk+0x2d5> ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 10c36a: 89 f3 mov %esi,%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10c36c: 3b 5d d0 cmp -0x30(%ebp),%ebx 10c36f: 0f 85 78 fe ff ff jne 10c1ed <_Heap_Walk+0x180> 10c375: b0 01 mov $0x1,%al block = next_block; } return true; } 10c377: 8d 65 f4 lea -0xc(%ebp),%esp 10c37a: 5b pop %ebx 10c37b: 5e pop %esi 10c37c: 5f pop %edi 10c37d: c9 leave 10c37e: c3 ret =============================================================================== 0010b674 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10b674: 55 push %ebp 10b675: 89 e5 mov %esp,%ebp 10b677: 53 push %ebx 10b678: 83 ec 08 sub $0x8,%esp 10b67b: 8b 45 08 mov 0x8(%ebp),%eax 10b67e: 8b 55 0c mov 0xc(%ebp),%edx 10b681: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10b684: a3 ac 62 12 00 mov %eax,0x1262ac _Internal_errors_What_happened.is_internal = is_internal; 10b689: 88 15 b0 62 12 00 mov %dl,0x1262b0 _Internal_errors_What_happened.the_error = the_error; 10b68f: 89 1d b4 62 12 00 mov %ebx,0x1262b4 _User_extensions_Fatal( the_source, is_internal, the_error ); 10b695: 53 push %ebx 10b696: 0f b6 d2 movzbl %dl,%edx 10b699: 52 push %edx 10b69a: 50 push %eax 10b69b: e8 27 19 00 00 call 10cfc7 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10b6a0: c7 05 a0 63 12 00 05 movl $0x5,0x1263a0 <== NOT EXECUTED 10b6a7: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10b6aa: fa cli <== NOT EXECUTED 10b6ab: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b6ad: f4 hlt <== NOT EXECUTED 10b6ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b6b1: eb fe jmp 10b6b1 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00100218 <_Message_queue_Manager_initialization>: #include #include #include void _Message_queue_Manager_initialization(void) { 100218: 55 push %ebp 100219: 89 e5 mov %esp,%ebp } 10021b: c9 leave 10021c: c3 ret =============================================================================== 0010b70c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10b70c: 55 push %ebp 10b70d: 89 e5 mov %esp,%ebp 10b70f: 56 push %esi 10b710: 53 push %ebx 10b711: 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 ) 10b714: 31 c9 xor %ecx,%ecx 10b716: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10b71a: 74 53 je 10b76f <_Objects_Allocate+0x63><== NEVER TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b71c: 8d 73 20 lea 0x20(%ebx),%esi 10b71f: 83 ec 0c sub $0xc,%esp 10b722: 56 push %esi 10b723: e8 48 f7 ff ff call 10ae70 <_Chain_Get> 10b728: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10b72a: 83 c4 10 add $0x10,%esp 10b72d: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b731: 74 3c je 10b76f <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10b733: 85 c0 test %eax,%eax 10b735: 75 1a jne 10b751 <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10b737: 83 ec 0c sub $0xc,%esp 10b73a: 53 push %ebx 10b73b: e8 60 00 00 00 call 10b7a0 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b740: 89 34 24 mov %esi,(%esp) 10b743: e8 28 f7 ff ff call 10ae70 <_Chain_Get> 10b748: 89 c1 mov %eax,%ecx } if ( the_object ) { 10b74a: 83 c4 10 add $0x10,%esp 10b74d: 85 c0 test %eax,%eax 10b74f: 74 1e je 10b76f <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10b751: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10b755: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b759: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10b75b: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b75f: 31 d2 xor %edx,%edx 10b761: f7 f6 div %esi 10b763: c1 e0 02 shl $0x2,%eax 10b766: 03 43 30 add 0x30(%ebx),%eax 10b769: ff 08 decl (%eax) information->inactive--; 10b76b: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10b76f: 89 c8 mov %ecx,%eax 10b771: 8d 65 f8 lea -0x8(%ebp),%esp 10b774: 5b pop %ebx 10b775: 5e pop %esi 10b776: c9 leave 10b777: c3 ret =============================================================================== 0010b7a0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10b7a0: 55 push %ebp 10b7a1: 89 e5 mov %esp,%ebp 10b7a3: 57 push %edi 10b7a4: 56 push %esi 10b7a5: 53 push %ebx 10b7a6: 83 ec 4c sub $0x4c,%esp 10b7a9: 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 ); 10b7ac: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10b7b0: 89 45 c8 mov %eax,-0x38(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10b7b3: 8b 4b 34 mov 0x34(%ebx),%ecx 10b7b6: 85 c9 test %ecx,%ecx 10b7b8: 75 0e jne 10b7c8 <_Objects_Extend_information+0x28> 10b7ba: 89 45 d4 mov %eax,-0x2c(%ebp) 10b7bd: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b7c4: 31 d2 xor %edx,%edx 10b7c6: eb 31 jmp 10b7f9 <_Objects_Extend_information+0x59> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10b7c8: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b7cc: 8b 43 10 mov 0x10(%ebx),%eax 10b7cf: 31 d2 xor %edx,%edx 10b7d1: 66 f7 f6 div %si 10b7d4: 0f b7 d0 movzwl %ax,%edx 10b7d7: 8b 7d c8 mov -0x38(%ebp),%edi 10b7da: 89 7d d4 mov %edi,-0x2c(%ebp) 10b7dd: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b7e4: 31 c0 xor %eax,%eax for ( ; block < block_count; block++ ) { 10b7e6: eb 0a jmp 10b7f2 <_Objects_Extend_information+0x52> if ( information->object_blocks[ block ] == NULL ) 10b7e8: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4) 10b7ec: 74 08 je 10b7f6 <_Objects_Extend_information+0x56> 10b7ee: 01 75 d4 add %esi,-0x2c(%ebp) if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10b7f1: 40 inc %eax 10b7f2: 39 d0 cmp %edx,%eax 10b7f4: 72 f2 jb 10b7e8 <_Objects_Extend_information+0x48> 10b7f6: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10b7f9: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10b7fd: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b801: 8d 0c 08 lea (%eax,%ecx,1),%ecx 10b804: 89 4d b8 mov %ecx,-0x48(%ebp) /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 10b807: 81 f9 ff ff 00 00 cmp $0xffff,%ecx 10b80d: 0f 87 db 01 00 00 ja 10b9ee <_Objects_Extend_information+0x24e><== NEVER TAKEN /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 10b813: 0f af 43 18 imul 0x18(%ebx),%eax if ( information->auto_extend ) { 10b817: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b81b: 74 1e je 10b83b <_Objects_Extend_information+0x9b> new_object_block = _Workspace_Allocate( block_size ); 10b81d: 83 ec 0c sub $0xc,%esp 10b820: 50 push %eax 10b821: 89 55 b4 mov %edx,-0x4c(%ebp) 10b824: e8 cb 1a 00 00 call 10d2f4 <_Workspace_Allocate> 10b829: 89 45 bc mov %eax,-0x44(%ebp) if ( !new_object_block ) 10b82c: 83 c4 10 add $0x10,%esp 10b82f: 85 c0 test %eax,%eax 10b831: 8b 55 b4 mov -0x4c(%ebp),%edx 10b834: 75 1a jne 10b850 <_Objects_Extend_information+0xb0> 10b836: e9 b3 01 00 00 jmp 10b9ee <_Objects_Extend_information+0x24e> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10b83b: 83 ec 0c sub $0xc,%esp 10b83e: 50 push %eax 10b83f: 89 55 b4 mov %edx,-0x4c(%ebp) 10b842: e8 81 1a 00 00 call 10d2c8 <_Workspace_Allocate_or_fatal_error> 10b847: 89 45 bc mov %eax,-0x44(%ebp) 10b84a: 83 c4 10 add $0x10,%esp 10b84d: 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 ) { 10b850: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b854: 39 45 d4 cmp %eax,-0x2c(%ebp) 10b857: 0f 82 14 01 00 00 jb 10b971 <_Objects_Extend_information+0x1d1> */ /* * Up the block count and maximum */ block_count++; 10b85d: 8d 72 01 lea 0x1(%edx),%esi * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10b860: 83 ec 0c sub $0xc,%esp 10b863: 8b 4d b8 mov -0x48(%ebp),%ecx 10b866: 03 4d c8 add -0x38(%ebp),%ecx 10b869: 8d 04 76 lea (%esi,%esi,2),%eax 10b86c: 8d 04 01 lea (%ecx,%eax,1),%eax 10b86f: c1 e0 02 shl $0x2,%eax 10b872: 50 push %eax 10b873: 89 55 b4 mov %edx,-0x4c(%ebp) 10b876: e8 79 1a 00 00 call 10d2f4 <_Workspace_Allocate> if ( !object_blocks ) { 10b87b: 83 c4 10 add $0x10,%esp 10b87e: 85 c0 test %eax,%eax 10b880: 8b 55 b4 mov -0x4c(%ebp),%edx 10b883: 75 13 jne 10b898 <_Objects_Extend_information+0xf8> _Workspace_Free( new_object_block ); 10b885: 83 ec 0c sub $0xc,%esp 10b888: ff 75 bc pushl -0x44(%ebp) 10b88b: e8 7d 1a 00 00 call 10d30d <_Workspace_Free> return; 10b890: 83 c4 10 add $0x10,%esp 10b893: e9 56 01 00 00 jmp 10b9ee <_Objects_Extend_information+0x24e> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10b898: 8d 0c b0 lea (%eax,%esi,4),%ecx 10b89b: 89 4d c0 mov %ecx,-0x40(%ebp) 10b89e: 8d 34 f0 lea (%eax,%esi,8),%esi 10b8a1: 89 75 c4 mov %esi,-0x3c(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10b8a4: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b8a8: 31 c9 xor %ecx,%ecx 10b8aa: 3b 75 c8 cmp -0x38(%ebp),%esi 10b8ad: 76 3e jbe 10b8ed <_Objects_Extend_information+0x14d> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 10b8af: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi 10b8b6: 89 75 d0 mov %esi,-0x30(%ebp) 10b8b9: 8b 73 34 mov 0x34(%ebx),%esi 10b8bc: 89 c7 mov %eax,%edi 10b8be: 8b 4d d0 mov -0x30(%ebp),%ecx 10b8c1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10b8c3: 8b 73 30 mov 0x30(%ebx),%esi 10b8c6: 8b 7d c0 mov -0x40(%ebp),%edi 10b8c9: 8b 4d d0 mov -0x30(%ebp),%ecx 10b8cc: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b8ce: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b8d2: 03 4d c8 add -0x38(%ebp),%ecx 10b8d5: c1 e1 02 shl $0x2,%ecx 10b8d8: 8b 73 1c mov 0x1c(%ebx),%esi 10b8db: 8b 7d c4 mov -0x3c(%ebp),%edi 10b8de: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10b8e0: eb 10 jmp 10b8f2 <_Objects_Extend_information+0x152> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10b8e2: 8b 7d c4 mov -0x3c(%ebp),%edi 10b8e5: c7 04 8f 00 00 00 00 movl $0x0,(%edi,%ecx,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10b8ec: 41 inc %ecx 10b8ed: 3b 4d c8 cmp -0x38(%ebp),%ecx 10b8f0: 72 f0 jb 10b8e2 <_Objects_Extend_information+0x142> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10b8f2: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) inactive_per_block[block_count] = 0; 10b8f9: 8b 4d c0 mov -0x40(%ebp),%ecx 10b8fc: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b903: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b907: 8b 75 d4 mov -0x2c(%ebp),%esi 10b90a: 01 d6 add %edx,%esi 10b90c: 8b 7d d4 mov -0x2c(%ebp),%edi 10b90f: 8b 55 c4 mov -0x3c(%ebp),%edx 10b912: 8d 0c ba lea (%edx,%edi,4),%ecx 10b915: 89 fa mov %edi,%edx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b917: eb 0a jmp 10b923 <_Objects_Extend_information+0x183> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10b919: 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++ ) { 10b91f: 42 inc %edx 10b920: 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 ; 10b923: 39 f2 cmp %esi,%edx 10b925: 72 f2 jb 10b919 <_Objects_Extend_information+0x179> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10b927: 9c pushf 10b928: fa cli 10b929: 5e pop %esi old_tables = information->object_blocks; 10b92a: 8b 53 34 mov 0x34(%ebx),%edx information->object_blocks = object_blocks; 10b92d: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10b930: 8b 4d c0 mov -0x40(%ebp),%ecx 10b933: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10b936: 8b 7d c4 mov -0x3c(%ebp),%edi 10b939: 89 7b 1c mov %edi,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10b93c: 8b 45 b8 mov -0x48(%ebp),%eax 10b93f: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10b943: 8b 03 mov (%ebx),%eax 10b945: c1 e0 18 shl $0x18,%eax 10b948: 0d 00 00 01 00 or $0x10000,%eax 10b94d: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b951: c1 e1 1b shl $0x1b,%ecx 10b954: 09 c8 or %ecx,%eax 10b956: 0f b7 4d b8 movzwl -0x48(%ebp),%ecx 10b95a: 09 c8 or %ecx,%eax 10b95c: 89 43 0c mov %eax,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10b95f: 56 push %esi 10b960: 9d popf if ( old_tables ) 10b961: 85 d2 test %edx,%edx 10b963: 74 0c je 10b971 <_Objects_Extend_information+0x1d1> _Workspace_Free( old_tables ); 10b965: 83 ec 0c sub $0xc,%esp 10b968: 52 push %edx 10b969: e8 9f 19 00 00 call 10d30d <_Workspace_Free> 10b96e: 83 c4 10 add $0x10,%esp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10b971: 8b 55 cc mov -0x34(%ebp),%edx 10b974: c1 e2 02 shl $0x2,%edx 10b977: 89 55 d0 mov %edx,-0x30(%ebp) 10b97a: 8b 43 34 mov 0x34(%ebx),%eax 10b97d: 8b 75 bc mov -0x44(%ebp),%esi 10b980: 8b 4d cc mov -0x34(%ebp),%ecx 10b983: 89 34 88 mov %esi,(%eax,%ecx,4) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10b986: ff 73 18 pushl 0x18(%ebx) 10b989: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b98d: 52 push %edx 10b98e: ff 34 88 pushl (%eax,%ecx,4) 10b991: 8d 45 dc lea -0x24(%ebp),%eax 10b994: 50 push %eax 10b995: 89 45 b4 mov %eax,-0x4c(%ebp) 10b998: e8 6f 45 00 00 call 10ff0c <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b99d: 8d 7b 20 lea 0x20(%ebx),%edi 10b9a0: 8b 75 d4 mov -0x2c(%ebp),%esi 10b9a3: eb 23 jmp 10b9c8 <_Objects_Extend_information+0x228> */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 10b9a5: 8b 13 mov (%ebx),%edx 10b9a7: c1 e2 18 shl $0x18,%edx 10b9aa: 81 ca 00 00 01 00 or $0x10000,%edx 10b9b0: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b9b4: c1 e1 1b shl $0x1b,%ecx 10b9b7: 09 ca or %ecx,%edx 10b9b9: 09 f2 or %esi,%edx 10b9bb: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b9be: 52 push %edx 10b9bf: 52 push %edx 10b9c0: 50 push %eax 10b9c1: 57 push %edi 10b9c2: e8 6d f4 ff ff call 10ae34 <_Chain_Append> index++; 10b9c7: 46 inc %esi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10b9c8: 8d 45 dc lea -0x24(%ebp),%eax 10b9cb: 89 04 24 mov %eax,(%esp) 10b9ce: e8 9d f4 ff ff call 10ae70 <_Chain_Get> 10b9d3: 83 c4 10 add $0x10,%esp 10b9d6: 85 c0 test %eax,%eax 10b9d8: 75 cb jne 10b9a5 <_Objects_Extend_information+0x205> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10b9da: 8b 43 30 mov 0x30(%ebx),%eax 10b9dd: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b9e1: 8b 4d d0 mov -0x30(%ebp),%ecx 10b9e4: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10b9e7: 8b 43 14 mov 0x14(%ebx),%eax 10b9ea: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10b9ee: 8d 65 f4 lea -0xc(%ebp),%esp 10b9f1: 5b pop %ebx 10b9f2: 5e pop %esi 10b9f3: 5f pop %edi 10b9f4: c9 leave 10b9f5: c3 ret =============================================================================== 0010ba88 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10ba88: 55 push %ebp 10ba89: 89 e5 mov %esp,%ebp 10ba8b: 56 push %esi 10ba8c: 53 push %ebx 10ba8d: 8b 75 08 mov 0x8(%ebp),%esi 10ba90: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10ba93: 85 db test %ebx,%ebx 10ba95: 74 2d je 10bac4 <_Objects_Get_information+0x3c> /* * 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 ); 10ba97: 83 ec 0c sub $0xc,%esp 10ba9a: 56 push %esi 10ba9b: e8 18 4a 00 00 call 1104b8 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10baa0: 83 c4 10 add $0x10,%esp 10baa3: 85 c0 test %eax,%eax 10baa5: 74 1d je 10bac4 <_Objects_Get_information+0x3c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10baa7: 39 c3 cmp %eax,%ebx 10baa9: 77 19 ja 10bac4 <_Objects_Get_information+0x3c> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10baab: 8b 04 b5 dc 61 12 00 mov 0x1261dc(,%esi,4),%eax 10bab2: 85 c0 test %eax,%eax 10bab4: 74 0e je 10bac4 <_Objects_Get_information+0x3c><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10bab6: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10bab9: 85 c0 test %eax,%eax 10babb: 74 09 je 10bac6 <_Objects_Get_information+0x3e><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10babd: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10bac2: 75 02 jne 10bac6 <_Objects_Get_information+0x3e> 10bac4: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10bac6: 8d 65 f8 lea -0x8(%ebp),%esp 10bac9: 5b pop %ebx 10baca: 5e pop %esi 10bacb: c9 leave 10bacc: c3 ret =============================================================================== 00118ff8 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 118ff8: 55 push %ebp 118ff9: 89 e5 mov %esp,%ebp 118ffb: 53 push %ebx 118ffc: 8b 55 08 mov 0x8(%ebp),%edx 118fff: 8b 4d 10 mov 0x10(%ebp),%ecx /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 119002: b8 01 00 00 00 mov $0x1,%eax 119007: 2b 42 08 sub 0x8(%edx),%eax 11900a: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11900d: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 119011: 39 c3 cmp %eax,%ebx 119013: 72 12 jb 119027 <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 119015: 8b 52 1c mov 0x1c(%edx),%edx 119018: 8b 04 82 mov (%edx,%eax,4),%eax 11901b: 85 c0 test %eax,%eax 11901d: 74 08 je 119027 <_Objects_Get_no_protection+0x2f><== NEVER TAKEN *location = OBJECTS_LOCAL; 11901f: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 119025: eb 08 jmp 11902f <_Objects_Get_no_protection+0x37> /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 119027: c7 01 01 00 00 00 movl $0x1,(%ecx) 11902d: 31 c0 xor %eax,%eax return NULL; } 11902f: 5b pop %ebx 119030: c9 leave 119031: c3 ret =============================================================================== 0010f120 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10f120: 55 push %ebp 10f121: 89 e5 mov %esp,%ebp 10f123: 83 ec 18 sub $0x18,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10f126: 8b 45 08 mov 0x8(%ebp),%eax 10f129: 85 c0 test %eax,%eax 10f12b: 75 08 jne 10f135 <_Objects_Id_to_name+0x15> 10f12d: a1 a8 1b 13 00 mov 0x131ba8,%eax 10f132: 8b 40 08 mov 0x8(%eax),%eax */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10f135: 89 c2 mov %eax,%edx 10f137: c1 ea 18 shr $0x18,%edx 10f13a: 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 ) 10f13d: 8d 4a ff lea -0x1(%edx),%ecx 10f140: 83 f9 03 cmp $0x3,%ecx 10f143: 77 38 ja 10f17d <_Objects_Id_to_name+0x5d> 10f145: eb 3d jmp 10f184 <_Objects_Id_to_name+0x64> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10f147: 89 c1 mov %eax,%ecx 10f149: c1 e9 1b shr $0x1b,%ecx 10f14c: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10f14f: 85 d2 test %edx,%edx 10f151: 74 2a je 10f17d <_Objects_Id_to_name+0x5d><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 10f153: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10f157: 75 24 jne 10f17d <_Objects_Id_to_name+0x5d><== NEVER TAKEN return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 10f159: 51 push %ecx 10f15a: 8d 4d f4 lea -0xc(%ebp),%ecx 10f15d: 51 push %ecx 10f15e: 50 push %eax 10f15f: 52 push %edx 10f160: e8 63 ff ff ff call 10f0c8 <_Objects_Get> if ( !the_object ) 10f165: 83 c4 10 add $0x10,%esp 10f168: 85 c0 test %eax,%eax 10f16a: 74 11 je 10f17d <_Objects_Id_to_name+0x5d> return OBJECTS_INVALID_ID; *name = the_object->name; 10f16c: 8b 50 0c mov 0xc(%eax),%edx 10f16f: 8b 45 0c mov 0xc(%ebp),%eax 10f172: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10f174: e8 b4 07 00 00 call 10f92d <_Thread_Enable_dispatch> 10f179: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10f17b: eb 05 jmp 10f182 <_Objects_Id_to_name+0x62> 10f17d: b8 03 00 00 00 mov $0x3,%eax } 10f182: c9 leave 10f183: c3 ret the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10f184: 8b 14 95 c0 1a 13 00 mov 0x131ac0(,%edx,4),%edx 10f18b: 85 d2 test %edx,%edx 10f18d: 75 b8 jne 10f147 <_Objects_Id_to_name+0x27> 10f18f: eb ec jmp 10f17d <_Objects_Id_to_name+0x5d> =============================================================================== 0010c2e0 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10c2e0: 55 push %ebp 10c2e1: 89 e5 mov %esp,%ebp 10c2e3: 57 push %edi 10c2e4: 56 push %esi 10c2e5: 53 push %ebx 10c2e6: 83 ec 34 sub $0x34,%esp 10c2e9: 8b 55 08 mov 0x8(%ebp),%edx 10c2ec: 8b 7d 0c mov 0xc(%ebp),%edi 10c2ef: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10c2f2: 0f b7 42 3a movzwl 0x3a(%edx),%eax 10c2f6: 50 push %eax 10c2f7: 53 push %ebx 10c2f8: 89 55 d4 mov %edx,-0x2c(%ebp) 10c2fb: e8 c4 83 00 00 call 1146c4 10c300: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10c302: 83 c4 10 add $0x10,%esp 10c305: 8b 55 d4 mov -0x2c(%ebp),%edx 10c308: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10c30c: 74 54 je 10c362 <_Objects_Set_name+0x82> char *d; d = _Workspace_Allocate( length + 1 ); 10c30e: 83 ec 0c sub $0xc,%esp 10c311: 8d 40 01 lea 0x1(%eax),%eax 10c314: 50 push %eax 10c315: e8 8e 16 00 00 call 10d9a8 <_Workspace_Allocate> 10c31a: 89 c2 mov %eax,%edx if ( !d ) 10c31c: 83 c4 10 add $0x10,%esp 10c31f: 31 c0 xor %eax,%eax 10c321: 85 d2 test %edx,%edx 10c323: 74 79 je 10c39e <_Objects_Set_name+0xbe><== NEVER TAKEN return false; if ( the_object->name.name_p ) { 10c325: 8b 47 0c mov 0xc(%edi),%eax 10c328: 85 c0 test %eax,%eax 10c32a: 74 19 je 10c345 <_Objects_Set_name+0x65> _Workspace_Free( (void *)the_object->name.name_p ); 10c32c: 83 ec 0c sub $0xc,%esp 10c32f: 50 push %eax 10c330: 89 55 d4 mov %edx,-0x2c(%ebp) 10c333: e8 89 16 00 00 call 10d9c1 <_Workspace_Free> the_object->name.name_p = NULL; 10c338: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) 10c33f: 83 c4 10 add $0x10,%esp 10c342: 8b 55 d4 mov -0x2c(%ebp),%edx } strncpy( d, name, length ); 10c345: 50 push %eax 10c346: 56 push %esi 10c347: 53 push %ebx 10c348: 52 push %edx 10c349: 89 55 d4 mov %edx,-0x2c(%ebp) 10c34c: e8 f7 82 00 00 call 114648 d[length] = '\0'; 10c351: 8b 55 d4 mov -0x2c(%ebp),%edx 10c354: c6 04 32 00 movb $0x0,(%edx,%esi,1) the_object->name.name_p = d; 10c358: 89 57 0c mov %edx,0xc(%edi) 10c35b: b0 01 mov $0x1,%al 10c35d: 83 c4 10 add $0x10,%esp 10c360: eb 3c jmp 10c39e <_Objects_Set_name+0xbe> } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10c362: 8a 03 mov (%ebx),%al 10c364: 88 45 d8 mov %al,-0x28(%ebp) 10c367: 83 fe 01 cmp $0x1,%esi 10c36a: 76 3a jbe 10c3a6 <_Objects_Set_name+0xc6> 10c36c: 0f be 53 01 movsbl 0x1(%ebx),%edx 10c370: c1 e2 10 shl $0x10,%edx 10c373: 83 fe 02 cmp $0x2,%esi 10c376: 76 33 jbe 10c3ab <_Objects_Set_name+0xcb> 10c378: 0f be 43 02 movsbl 0x2(%ebx),%eax 10c37c: c1 e0 08 shl $0x8,%eax 10c37f: b9 20 00 00 00 mov $0x20,%ecx 10c384: 83 fe 03 cmp $0x3,%esi 10c387: 76 04 jbe 10c38d <_Objects_Set_name+0xad> 10c389: 0f be 4b 03 movsbl 0x3(%ebx),%ecx 10c38d: 8a 5d d8 mov -0x28(%ebp),%bl 10c390: c1 e3 18 shl $0x18,%ebx 10c393: 09 d3 or %edx,%ebx 10c395: 09 c3 or %eax,%ebx 10c397: 09 cb or %ecx,%ebx 10c399: 89 5f 0c mov %ebx,0xc(%edi) 10c39c: b0 01 mov $0x1,%al ); } return true; } 10c39e: 8d 65 f4 lea -0xc(%ebp),%esp 10c3a1: 5b pop %ebx 10c3a2: 5e pop %esi 10c3a3: 5f pop %edi 10c3a4: c9 leave 10c3a5: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10c3a6: ba 00 00 20 00 mov $0x200000,%edx 10c3ab: b8 00 20 00 00 mov $0x2000,%eax 10c3b0: b9 20 00 00 00 mov $0x20,%ecx 10c3b5: eb d6 jmp 10c38d <_Objects_Set_name+0xad> =============================================================================== 0010b1e4 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10b1e4: 55 push %ebp 10b1e5: 89 e5 mov %esp,%ebp 10b1e7: 57 push %edi 10b1e8: 56 push %esi 10b1e9: 53 push %ebx 10b1ea: 83 ec 34 sub $0x34,%esp 10b1ed: 8b 7d 08 mov 0x8(%ebp),%edi 10b1f0: 8b 75 0c mov 0xc(%ebp),%esi 10b1f3: 8a 45 14 mov 0x14(%ebp),%al 10b1f6: 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 ) ) { 10b1f9: 8d 5d e4 lea -0x1c(%ebp),%ebx 10b1fc: 53 push %ebx 10b1fd: 56 push %esi 10b1fe: e8 82 01 00 00 call 10b385 <_POSIX_Mutex_Get> 10b203: 83 c4 10 add $0x10,%esp 10b206: 85 c0 test %eax,%eax 10b208: 0f 84 ae 00 00 00 je 10b2bc <_POSIX_Condition_variables_Wait_support+0xd8> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b20e: a1 08 82 12 00 mov 0x128208,%eax 10b213: 48 dec %eax 10b214: a3 08 82 12 00 mov %eax,0x128208 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10b219: 52 push %edx 10b21a: 52 push %edx 10b21b: 53 push %ebx 10b21c: 57 push %edi 10b21d: e8 16 fe ff ff call 10b038 <_POSIX_Condition_variables_Get> 10b222: 89 c3 mov %eax,%ebx switch ( location ) { 10b224: 83 c4 10 add $0x10,%esp 10b227: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b22b: 0f 85 8b 00 00 00 jne 10b2bc <_POSIX_Condition_variables_Wait_support+0xd8> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 10b231: 8b 40 14 mov 0x14(%eax),%eax 10b234: 85 c0 test %eax,%eax 10b236: 74 0b je 10b243 <_POSIX_Condition_variables_Wait_support+0x5f> 10b238: 3b 06 cmp (%esi),%eax 10b23a: 74 07 je 10b243 <_POSIX_Condition_variables_Wait_support+0x5f> _Thread_Enable_dispatch(); 10b23c: e8 b4 2d 00 00 call 10dff5 <_Thread_Enable_dispatch> 10b241: eb 79 jmp 10b2bc <_POSIX_Condition_variables_Wait_support+0xd8> return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10b243: 83 ec 0c sub $0xc,%esp 10b246: 56 push %esi 10b247: e8 20 03 00 00 call 10b56c _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10b24c: 83 c4 10 add $0x10,%esp 10b24f: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10b253: 75 4d jne 10b2a2 <_POSIX_Condition_variables_Wait_support+0xbe> the_cond->Mutex = *mutex; 10b255: 8b 06 mov (%esi),%eax 10b257: 89 43 14 mov %eax,0x14(%ebx) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b25a: c7 43 48 01 00 00 00 movl $0x1,0x48(%ebx) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 10b261: a1 c4 82 12 00 mov 0x1282c4,%eax 10b266: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10b26d: 83 c3 18 add $0x18,%ebx 10b270: 89 58 44 mov %ebx,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10b273: 8b 17 mov (%edi),%edx 10b275: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10b278: 50 push %eax 10b279: 68 a4 e7 10 00 push $0x10e7a4 10b27e: ff 75 10 pushl 0x10(%ebp) 10b281: 53 push %ebx 10b282: e8 25 32 00 00 call 10e4ac <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b287: e8 69 2d 00 00 call 10dff5 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 10b28c: a1 c4 82 12 00 mov 0x1282c4,%eax 10b291: 8b 58 34 mov 0x34(%eax),%ebx if ( status && status != ETIMEDOUT ) 10b294: 83 c4 10 add $0x10,%esp 10b297: 83 fb 74 cmp $0x74,%ebx 10b29a: 74 10 je 10b2ac <_POSIX_Condition_variables_Wait_support+0xc8> 10b29c: 85 db test %ebx,%ebx 10b29e: 74 0c je 10b2ac <_POSIX_Condition_variables_Wait_support+0xc8><== ALWAYS TAKEN 10b2a0: eb 1f jmp 10b2c1 <_POSIX_Condition_variables_Wait_support+0xdd><== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 10b2a2: e8 4e 2d 00 00 call 10dff5 <_Thread_Enable_dispatch> 10b2a7: bb 74 00 00 00 mov $0x74,%ebx /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10b2ac: 83 ec 0c sub $0xc,%esp 10b2af: 56 push %esi 10b2b0: e8 37 02 00 00 call 10b4ec if ( mutex_status ) 10b2b5: 83 c4 10 add $0x10,%esp 10b2b8: 85 c0 test %eax,%eax 10b2ba: 74 05 je 10b2c1 <_POSIX_Condition_variables_Wait_support+0xdd> 10b2bc: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return EINVAL; } 10b2c1: 89 d8 mov %ebx,%eax 10b2c3: 8d 65 f4 lea -0xc(%ebp),%esp 10b2c6: 5b pop %ebx 10b2c7: 5e pop %esi 10b2c8: 5f pop %edi 10b2c9: c9 leave 10b2ca: c3 ret =============================================================================== 00111ec4 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 111ec4: 55 push %ebp 111ec5: 89 e5 mov %esp,%ebp 111ec7: 57 push %edi 111ec8: 56 push %esi 111ec9: 53 push %ebx 111eca: 83 ec 1c sub $0x1c,%esp Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 111ecd: 8b 45 08 mov 0x8(%ebp),%eax 111ed0: 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); 111ed3: 89 d0 mov %edx,%eax 111ed5: c1 e8 18 shr $0x18,%eax 111ed8: 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 ]; 111edb: 0f b7 d2 movzwl %dx,%edx 111ede: c1 e2 02 shl $0x2,%edx 111ee1: 89 55 e4 mov %edx,-0x1c(%ebp) 111ee4: 83 c0 04 add $0x4,%eax 111ee7: 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; 111eea: 8b 3d 58 66 12 00 mov 0x126658,%edi 111ef0: bb 01 00 00 00 mov $0x1,%ebx 111ef5: b2 01 mov $0x1,%dl done = true; for ( index = 1 ; index <= max ; ++index ) { 111ef7: eb 38 jmp 111f31 <_POSIX_Keys_Run_destructors+0x6d> POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; 111ef9: 0f b7 cb movzwl %bx,%ecx 111efc: a1 64 66 12 00 mov 0x126664,%eax 111f01: 8b 04 88 mov (%eax,%ecx,4),%eax if ( key != NULL && key->destructor != NULL ) { 111f04: 85 c0 test %eax,%eax 111f06: 74 28 je 111f30 <_POSIX_Keys_Run_destructors+0x6c> 111f08: 83 78 10 00 cmpl $0x0,0x10(%eax) 111f0c: 74 22 je 111f30 <_POSIX_Keys_Run_destructors+0x6c> void *value = key->Values [ thread_api ][ thread_index ]; 111f0e: 8b 75 e4 mov -0x1c(%ebp),%esi 111f11: 8b 4d e0 mov -0x20(%ebp),%ecx 111f14: 03 74 88 04 add 0x4(%eax,%ecx,4),%esi 111f18: 8b 0e mov (%esi),%ecx if ( value != NULL ) { 111f1a: 85 c9 test %ecx,%ecx 111f1c: 74 12 je 111f30 <_POSIX_Keys_Run_destructors+0x6c><== ALWAYS TAKEN key->Values [ thread_api ][ thread_index ] = NULL; 111f1e: c7 06 00 00 00 00 movl $0x0,(%esi) <== NOT EXECUTED (*key->destructor)( value ); 111f24: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111f27: 51 push %ecx <== NOT EXECUTED 111f28: ff 50 10 call *0x10(%eax) <== NOT EXECUTED 111f2b: 31 d2 xor %edx,%edx <== NOT EXECUTED 111f2d: 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 ) { 111f30: 43 inc %ebx 111f31: 66 39 fb cmp %di,%bx 111f34: 76 c3 jbe 111ef9 <_POSIX_Keys_Run_destructors+0x35> * 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 ) { 111f36: 84 d2 test %dl,%dl 111f38: 74 b0 je 111eea <_POSIX_Keys_Run_destructors+0x26><== NEVER TAKEN done = false; } } } } } 111f3a: 8d 65 f4 lea -0xc(%ebp),%esp 111f3d: 5b pop %ebx 111f3e: 5e pop %esi 111f3f: 5f pop %edi 111f40: c9 leave 111f41: c3 ret =============================================================================== 0010e6e0 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10e6e0: 55 push %ebp 10e6e1: 89 e5 mov %esp,%ebp 10e6e3: 57 push %edi 10e6e4: 56 push %esi 10e6e5: 53 push %ebx 10e6e6: 83 ec 30 sub $0x30,%esp 10e6e9: 8b 75 08 mov 0x8(%ebp),%esi 10e6ec: 8b 5d 14 mov 0x14(%ebp),%ebx 10e6ef: 8a 55 18 mov 0x18(%ebp),%dl RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 10e6f2: 8d 45 e4 lea -0x1c(%ebp),%eax 10e6f5: 50 push %eax 10e6f6: 56 push %esi 10e6f7: 68 3c f3 12 00 push $0x12f33c 10e6fc: 88 55 d4 mov %dl,-0x2c(%ebp) 10e6ff: e8 1c 2b 00 00 call 111220 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10e704: 83 c4 10 add $0x10,%esp 10e707: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10e70b: 8a 55 d4 mov -0x2c(%ebp),%dl 10e70e: 0f 85 b9 00 00 00 jne 10e7cd <_POSIX_Message_queue_Receive_support+0xed> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10e714: 8b 78 14 mov 0x14(%eax),%edi 10e717: 89 f9 mov %edi,%ecx 10e719: 83 e1 03 and $0x3,%ecx 10e71c: 49 dec %ecx 10e71d: 75 0a jne 10e729 <_POSIX_Message_queue_Receive_support+0x49> _Thread_Enable_dispatch(); 10e71f: e8 35 33 00 00 call 111a59 <_Thread_Enable_dispatch> 10e724: e9 a4 00 00 00 jmp 10e7cd <_POSIX_Message_queue_Receive_support+0xed> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10e729: 8b 48 10 mov 0x10(%eax),%ecx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10e72c: 8b 45 10 mov 0x10(%ebp),%eax 10e72f: 3b 41 68 cmp 0x68(%ecx),%eax 10e732: 73 15 jae 10e749 <_POSIX_Message_queue_Receive_support+0x69> _Thread_Enable_dispatch(); 10e734: e8 20 33 00 00 call 111a59 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10e739: e8 6a 9c 00 00 call 1183a8 <__errno> 10e73e: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10e744: e9 8f 00 00 00 jmp 10e7d8 <_POSIX_Message_queue_Receive_support+0xf8> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10e749: 31 c0 xor %eax,%eax 10e74b: 84 d2 test %dl,%dl 10e74d: 74 0b je 10e75a <_POSIX_Message_queue_Receive_support+0x7a><== NEVER TAKEN do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 10e74f: 89 f8 mov %edi,%eax 10e751: c1 e8 0e shr $0xe,%eax 10e754: 83 f0 01 xor $0x1,%eax 10e757: 83 e0 01 and $0x1,%eax /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10e75a: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10e761: 52 push %edx 10e762: 52 push %edx 10e763: ff 75 1c pushl 0x1c(%ebp) 10e766: 0f b6 c0 movzbl %al,%eax 10e769: 50 push %eax 10e76a: 8d 45 e0 lea -0x20(%ebp),%eax 10e76d: 50 push %eax 10e76e: ff 75 0c pushl 0xc(%ebp) 10e771: 56 push %esi 10e772: 83 c1 1c add $0x1c,%ecx 10e775: 51 push %ecx 10e776: e8 d1 1c 00 00 call 11044c <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10e77b: 83 c4 20 add $0x20,%esp 10e77e: e8 d6 32 00 00 call 111a59 <_Thread_Enable_dispatch> if (msg_prio) { 10e783: 85 db test %ebx,%ebx 10e785: 74 15 je 10e79c <_POSIX_Message_queue_Receive_support+0xbc><== NEVER TAKEN *msg_prio = _POSIX_Message_queue_Priority_from_core( 10e787: 8b 15 04 ef 12 00 mov 0x12ef04,%edx 10e78d: 8b 42 24 mov 0x24(%edx),%eax 10e790: c1 f8 1f sar $0x1f,%eax 10e793: 8b 52 24 mov 0x24(%edx),%edx 10e796: 31 c2 xor %eax,%edx 10e798: 89 13 mov %edx,(%ebx) 10e79a: 29 03 sub %eax,(%ebx) _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) 10e79c: a1 04 ef 12 00 mov 0x12ef04,%eax 10e7a1: 83 78 34 00 cmpl $0x0,0x34(%eax) 10e7a5: 75 05 jne 10e7ac <_POSIX_Message_queue_Receive_support+0xcc> return length_out; 10e7a7: 8b 45 e0 mov -0x20(%ebp),%eax 10e7aa: eb 2f jmp 10e7db <_POSIX_Message_queue_Receive_support+0xfb> rtems_set_errno_and_return_minus_one( 10e7ac: e8 f7 9b 00 00 call 1183a8 <__errno> 10e7b1: 89 c3 mov %eax,%ebx 10e7b3: 83 ec 0c sub $0xc,%esp 10e7b6: a1 04 ef 12 00 mov 0x12ef04,%eax 10e7bb: ff 70 34 pushl 0x34(%eax) 10e7be: e8 fd 01 00 00 call 10e9c0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10e7c3: 89 03 mov %eax,(%ebx) 10e7c5: 83 c8 ff or $0xffffffff,%eax 10e7c8: 83 c4 10 add $0x10,%esp 10e7cb: eb 0e jmp 10e7db <_POSIX_Message_queue_Receive_support+0xfb> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10e7cd: e8 d6 9b 00 00 call 1183a8 <__errno> 10e7d2: c7 00 09 00 00 00 movl $0x9,(%eax) 10e7d8: 83 c8 ff or $0xffffffff,%eax } 10e7db: 8d 65 f4 lea -0xc(%ebp),%esp 10e7de: 5b pop %ebx 10e7df: 5e pop %esi 10e7e0: 5f pop %edi 10e7e1: c9 leave 10e7e2: c3 ret =============================================================================== 0010f704 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 10f704: 55 push %ebp 10f705: 89 e5 mov %esp,%ebp 10f707: 83 ec 08 sub $0x8,%esp 10f70a: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10f70d: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10f713: 83 b8 d4 00 00 00 00 cmpl $0x0,0xd4(%eax) 10f71a: 75 2c jne 10f748 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44><== NEVER TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 10f71c: 83 b8 d8 00 00 00 01 cmpl $0x1,0xd8(%eax) 10f723: 75 23 jne 10f748 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> thread_support->cancelation_requested ) { 10f725: 83 b8 dc 00 00 00 00 cmpl $0x0,0xdc(%eax) 10f72c: 74 1a je 10f748 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10f72e: a1 00 72 12 00 mov 0x127200,%eax 10f733: 48 dec %eax 10f734: a3 00 72 12 00 mov %eax,0x127200 _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 10f739: 50 push %eax 10f73a: 50 push %eax 10f73b: 6a ff push $0xffffffff 10f73d: 52 push %edx 10f73e: e8 fd 05 00 00 call 10fd40 <_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 && 10f743: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 10f746: c9 leave 10f747: c3 ret 10f748: 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(); 10f749: e9 53 cf ff ff jmp 10c6a1 <_Thread_Enable_dispatch> =============================================================================== 001107b0 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 1107b0: 55 push %ebp 1107b1: 89 e5 mov %esp,%ebp 1107b3: 57 push %edi 1107b4: 56 push %esi 1107b5: 53 push %ebx 1107b6: 83 ec 18 sub $0x18,%esp 1107b9: 8b 7d 08 mov 0x8(%ebp),%edi 1107bc: 8b 5d 0c mov 0xc(%ebp),%ebx 1107bf: 8b 75 10 mov 0x10(%ebp),%esi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 1107c2: ff 33 pushl (%ebx) 1107c4: e8 c7 ff ff ff call 110790 <_POSIX_Priority_Is_valid> 1107c9: 83 c4 10 add $0x10,%esp 1107cc: 84 c0 test %al,%al 1107ce: 0f 84 97 00 00 00 je 11086b <_POSIX_Thread_Translate_sched_param+0xbb><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 1107d4: c7 06 00 00 00 00 movl $0x0,(%esi) *budget_callout = NULL; 1107da: 8b 45 14 mov 0x14(%ebp),%eax 1107dd: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 1107e3: 85 ff test %edi,%edi 1107e5: 75 08 jne 1107ef <_POSIX_Thread_Translate_sched_param+0x3f> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 1107e7: c7 06 01 00 00 00 movl $0x1,(%esi) 1107ed: eb 18 jmp 110807 <_POSIX_Thread_Translate_sched_param+0x57> return 0; } if ( policy == SCHED_FIFO ) { 1107ef: 83 ff 01 cmp $0x1,%edi 1107f2: 75 08 jne 1107fc <_POSIX_Thread_Translate_sched_param+0x4c> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 1107f4: c7 06 00 00 00 00 movl $0x0,(%esi) 1107fa: eb 0b jmp 110807 <_POSIX_Thread_Translate_sched_param+0x57> return 0; } if ( policy == SCHED_RR ) { 1107fc: 83 ff 02 cmp $0x2,%edi 1107ff: 75 0a jne 11080b <_POSIX_Thread_Translate_sched_param+0x5b> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 110801: c7 06 02 00 00 00 movl $0x2,(%esi) 110807: 31 c0 xor %eax,%eax return 0; 110809: eb 65 jmp 110870 <_POSIX_Thread_Translate_sched_param+0xc0> } if ( policy == SCHED_SPORADIC ) { 11080b: 83 ff 04 cmp $0x4,%edi 11080e: 75 5b jne 11086b <_POSIX_Thread_Translate_sched_param+0xbb> if ( (param->sched_ss_repl_period.tv_sec == 0) && 110810: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 110814: 75 06 jne 11081c <_POSIX_Thread_Translate_sched_param+0x6c> (param->sched_ss_repl_period.tv_nsec == 0) ) 110816: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) 11081a: 74 4f je 11086b <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 11081c: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 110820: 75 06 jne 110828 <_POSIX_Thread_Translate_sched_param+0x78> (param->sched_ss_init_budget.tv_nsec == 0) ) 110822: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 110826: 74 43 je 11086b <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 110828: 83 ec 0c sub $0xc,%esp 11082b: 8d 43 08 lea 0x8(%ebx),%eax 11082e: 50 push %eax 11082f: e8 14 d6 ff ff call 10de48 <_Timespec_To_ticks> 110834: 89 c7 mov %eax,%edi 110836: 8d 43 10 lea 0x10(%ebx),%eax 110839: 89 04 24 mov %eax,(%esp) 11083c: e8 07 d6 ff ff call 10de48 <_Timespec_To_ticks> 110841: 83 c4 10 add $0x10,%esp 110844: 39 c7 cmp %eax,%edi 110846: 72 23 jb 11086b <_POSIX_Thread_Translate_sched_param+0xbb> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 110848: 83 ec 0c sub $0xc,%esp 11084b: ff 73 04 pushl 0x4(%ebx) 11084e: e8 3d ff ff ff call 110790 <_POSIX_Priority_Is_valid> 110853: 83 c4 10 add $0x10,%esp 110856: 84 c0 test %al,%al 110858: 74 11 je 11086b <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 11085a: c7 06 03 00 00 00 movl $0x3,(%esi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 110860: 8b 45 14 mov 0x14(%ebp),%eax 110863: c7 00 57 ac 10 00 movl $0x10ac57,(%eax) 110869: eb 9c jmp 110807 <_POSIX_Thread_Translate_sched_param+0x57> return 0; 11086b: b8 16 00 00 00 mov $0x16,%eax } return EINVAL; } 110870: 8d 65 f4 lea -0xc(%ebp),%esp 110873: 5b pop %ebx 110874: 5e pop %esi 110875: 5f pop %edi 110876: c9 leave 110877: c3 ret =============================================================================== 0010f723 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 10f723: 55 push %ebp 10f724: 89 e5 mov %esp,%ebp 10f726: 57 push %edi 10f727: 56 push %esi 10f728: 53 push %ebx 10f729: 83 ec 28 sub $0x28,%esp 10f72c: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 10f72f: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 10f735: 53 push %ebx 10f736: e8 2d 27 00 00 call 111e68 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 10f73b: 89 1c 24 mov %ebx,(%esp) 10f73e: e8 81 27 00 00 call 111ec4 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 10f743: 8b 53 28 mov 0x28(%ebx),%edx while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 10f746: 8d 7e 40 lea 0x40(%esi),%edi 10f749: 83 c4 10 add $0x10,%esp 10f74c: eb 05 jmp 10f753 <_POSIX_Threads_Delete_extension+0x30> *(void **)the_thread->Wait.return_argument = value_ptr; 10f74e: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 10f751: 89 10 mov %edx,(%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 )) ) 10f753: 83 ec 0c sub $0xc,%esp 10f756: 57 push %edi 10f757: 89 55 e4 mov %edx,-0x1c(%ebp) 10f75a: e8 65 cf ff ff call 10c6c4 <_Thread_queue_Dequeue> 10f75f: 83 c4 10 add $0x10,%esp 10f762: 85 c0 test %eax,%eax 10f764: 8b 55 e4 mov -0x1c(%ebp),%edx 10f767: 75 e5 jne 10f74e <_POSIX_Threads_Delete_extension+0x2b><== NEVER TAKEN *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 10f769: 83 be 80 00 00 00 04 cmpl $0x4,0x80(%esi) 10f770: 75 12 jne 10f784 <_POSIX_Threads_Delete_extension+0x61> (void) _Watchdog_Remove( &api->Sporadic_timer ); 10f772: 83 ec 0c sub $0xc,%esp 10f775: 8d 86 a4 00 00 00 lea 0xa4(%esi),%eax 10f77b: 50 push %eax 10f77c: e8 77 da ff ff call 10d1f8 <_Watchdog_Remove> 10f781: 83 c4 10 add $0x10,%esp deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 10f784: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10f78b: 00 00 00 (void) _Workspace_Free( api ); 10f78e: 89 75 08 mov %esi,0x8(%ebp) } 10f791: 8d 65 f4 lea -0xc(%ebp),%esp 10f794: 5b pop %ebx 10f795: 5e pop %esi 10f796: 5f pop %edi 10f797: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 10f798: e9 70 db ff ff jmp 10d30d <_Workspace_Free> =============================================================================== 0010a994 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10a994: 55 push %ebp 10a995: 89 e5 mov %esp,%ebp 10a997: 57 push %edi 10a998: 56 push %esi 10a999: 53 push %ebx 10a99a: 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; 10a99d: 8b 3d 10 32 12 00 mov 0x123210,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10a9a3: 8b 15 0c 32 12 00 mov 0x12320c,%edx if ( !user_threads || maximum == 0 ) 10a9a9: 85 d2 test %edx,%edx 10a9ab: 74 54 je 10aa01 <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN 10a9ad: 85 ff test %edi,%edi 10a9af: 74 50 je 10aa01 <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN 10a9b1: 31 db xor %ebx,%ebx for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 10a9b3: 8d 75 a8 lea -0x58(%ebp),%esi 10a9b6: 83 ec 0c sub $0xc,%esp 10a9b9: 56 push %esi 10a9ba: 89 55 a4 mov %edx,-0x5c(%ebp) 10a9bd: e8 b6 5e 00 00 call 110878 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10a9c2: 5a pop %edx 10a9c3: 59 pop %ecx 10a9c4: 6a 02 push $0x2 10a9c6: 56 push %esi 10a9c7: e8 d4 5e 00 00 call 1108a0 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10a9cc: 59 pop %ecx 10a9cd: 58 pop %eax 10a9ce: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10a9d2: 56 push %esi 10a9d3: e8 f8 5e 00 00 call 1108d0 status = pthread_create( 10a9d8: 6a 00 push $0x0 10a9da: ff 34 df pushl (%edi,%ebx,8) 10a9dd: 56 push %esi 10a9de: 8d 45 e4 lea -0x1c(%ebp),%eax 10a9e1: 50 push %eax 10a9e2: e8 75 fc ff ff call 10a65c &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10a9e7: 83 c4 20 add $0x20,%esp 10a9ea: 85 c0 test %eax,%eax 10a9ec: 8b 55 a4 mov -0x5c(%ebp),%edx 10a9ef: 74 0b je 10a9fc <_POSIX_Threads_Initialize_user_threads_body+0x68> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10a9f1: 52 push %edx 10a9f2: 50 push %eax 10a9f3: 6a 01 push $0x1 10a9f5: 6a 02 push $0x2 10a9f7: e8 b8 1b 00 00 call 10c5b4 <_Internal_error_Occurred> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 10a9fc: 43 inc %ebx 10a9fd: 39 d3 cmp %edx,%ebx 10a9ff: 72 b5 jb 10a9b6 <_POSIX_Threads_Initialize_user_threads_body+0x22><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10aa01: 8d 65 f4 lea -0xc(%ebp),%esp 10aa04: 5b pop %ebx 10aa05: 5e pop %esi 10aa06: 5f pop %edi 10aa07: c9 leave 10aa08: c3 ret =============================================================================== 0010f933 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 10f933: 55 push %ebp 10f934: 89 e5 mov %esp,%ebp 10f936: 56 push %esi 10f937: 53 push %ebx 10f938: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10f93b: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 10f941: 83 ec 0c sub $0xc,%esp 10f944: 8d 86 94 00 00 00 lea 0x94(%esi),%eax 10f94a: 50 push %eax 10f94b: e8 a0 0f 00 00 call 1108f0 <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 10f950: 89 43 78 mov %eax,0x78(%ebx) 10f953: 0f b6 05 f4 21 12 00 movzbl 0x1221f4,%eax 10f95a: 2b 86 84 00 00 00 sub 0x84(%esi),%eax new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 10f960: 89 43 18 mov %eax,0x18(%ebx) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 10f963: 83 c4 10 add $0x10,%esp 10f966: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) 10f96a: 75 12 jne 10f97e <_POSIX_Threads_Sporadic_budget_TSR+0x4b><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 10f96c: 39 43 14 cmp %eax,0x14(%ebx) 10f96f: 76 0d jbe 10f97e <_POSIX_Threads_Sporadic_budget_TSR+0x4b> _Thread_Change_priority( the_thread, new_priority, true ); 10f971: 52 push %edx 10f972: 6a 01 push $0x1 10f974: 50 push %eax 10f975: 53 push %ebx 10f976: e8 f9 c4 ff ff call 10be74 <_Thread_Change_priority> 10f97b: 83 c4 10 add $0x10,%esp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 10f97e: 83 ec 0c sub $0xc,%esp 10f981: 8d 86 8c 00 00 00 lea 0x8c(%esi),%eax 10f987: 50 push %eax 10f988: e8 63 0f 00 00 call 1108f0 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10f98d: 89 86 b0 00 00 00 mov %eax,0xb0(%esi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10f993: 83 c4 10 add $0x10,%esp 10f996: 81 c6 a4 00 00 00 add $0xa4,%esi 10f99c: 89 75 0c mov %esi,0xc(%ebp) 10f99f: c7 45 08 e4 62 12 00 movl $0x1262e4,0x8(%ebp) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 10f9a6: 8d 65 f8 lea -0x8(%ebp),%esp 10f9a9: 5b pop %ebx 10f9aa: 5e pop %esi 10f9ab: c9 leave 10f9ac: e9 33 d7 ff ff jmp 10d0e4 <_Watchdog_Insert> =============================================================================== 0010f8f3 <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 10f8f3: 55 push %ebp 10f8f4: 89 e5 mov %esp,%ebp 10f8f6: 83 ec 08 sub $0x8,%esp 10f8f9: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10f8fc: 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 */ 10f902: 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); 10f909: 0f b6 15 f4 21 12 00 movzbl 0x1221f4,%edx 10f910: 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; 10f916: 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 ) { 10f919: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10f91d: 75 12 jne 10f931 <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 10f91f: 39 50 14 cmp %edx,0x14(%eax) 10f922: 73 0d jae 10f931 <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, true ); 10f924: 51 push %ecx 10f925: 6a 01 push $0x1 10f927: 52 push %edx 10f928: 50 push %eax 10f929: e8 46 c5 ff ff call 10be74 <_Thread_Change_priority> 10f92e: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 10f931: c9 leave 10f932: c3 ret =============================================================================== 0010a6cc <_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) { 10a6cc: 55 push %ebp 10a6cd: 89 e5 mov %esp,%ebp 10a6cf: 53 push %ebx 10a6d0: 83 ec 04 sub $0x4,%esp 10a6d3: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10a6d6: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10a6d9: 83 7b 54 00 cmpl $0x0,0x54(%ebx) 10a6dd: 75 06 jne 10a6e5 <_POSIX_Timer_TSR+0x19> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 10a6df: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 10a6e3: 74 34 je 10a719 <_POSIX_Timer_TSR+0x4d> <== NEVER TAKEN activated = _POSIX_Timer_Insert_helper( 10a6e5: 83 ec 0c sub $0xc,%esp 10a6e8: 53 push %ebx 10a6e9: 68 cc a6 10 00 push $0x10a6cc 10a6ee: ff 73 08 pushl 0x8(%ebx) 10a6f1: ff 73 64 pushl 0x64(%ebx) 10a6f4: 8d 43 10 lea 0x10(%ebx),%eax 10a6f7: 50 push %eax 10a6f8: e8 9f 5d 00 00 call 11049c <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10a6fd: 83 c4 20 add $0x20,%esp 10a700: 84 c0 test %al,%al 10a702: 74 30 je 10a734 <_POSIX_Timer_TSR+0x68> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10a704: 83 ec 0c sub $0xc,%esp 10a707: 8d 43 6c lea 0x6c(%ebx),%eax 10a70a: 50 push %eax 10a70b: e8 48 14 00 00 call 10bb58 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a710: 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 ) || 10a714: 83 c4 10 add $0x10,%esp 10a717: eb 04 jmp 10a71d <_POSIX_Timer_TSR+0x51> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10a719: 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 ) ) { 10a71d: 50 push %eax 10a71e: 50 push %eax 10a71f: ff 73 44 pushl 0x44(%ebx) 10a722: ff 73 38 pushl 0x38(%ebx) 10a725: e8 46 59 00 00 call 110070 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10a72a: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10a731: 83 c4 10 add $0x10,%esp } 10a734: 8b 5d fc mov -0x4(%ebp),%ebx 10a737: c9 leave 10a738: c3 ret =============================================================================== 00112170 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 112170: 55 push %ebp 112171: 89 e5 mov %esp,%ebp 112173: 57 push %edi 112174: 56 push %esi 112175: 53 push %ebx 112176: 83 ec 38 sub $0x38,%esp 112179: 8b 5d 08 mov 0x8(%ebp),%ebx 11217c: 8b 75 0c mov 0xc(%ebp),%esi siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 11217f: 6a 01 push $0x1 112181: 0f b6 45 10 movzbl 0x10(%ebp),%eax 112185: 50 push %eax 112186: 8d 7d dc lea -0x24(%ebp),%edi 112189: 57 push %edi 11218a: 56 push %esi 11218b: 53 push %ebx 11218c: e8 5b 00 00 00 call 1121ec <_POSIX_signals_Clear_signals> 112191: 83 c4 20 add $0x20,%esp 112194: 84 c0 test %al,%al 112196: 74 48 je 1121e0 <_POSIX_signals_Check_signal+0x70> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 112198: 6b d6 0c imul $0xc,%esi,%edx 11219b: 8b 82 70 67 12 00 mov 0x126770(%edx),%eax 1121a1: 83 f8 01 cmp $0x1,%eax 1121a4: 74 3a je 1121e0 <_POSIX_signals_Check_signal+0x70><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 1121a6: 8b 8b cc 00 00 00 mov 0xcc(%ebx),%ecx 1121ac: 89 4d d4 mov %ecx,-0x2c(%ebp) api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 1121af: 0b 8a 6c 67 12 00 or 0x12676c(%edx),%ecx 1121b5: 89 8b cc 00 00 00 mov %ecx,0xcc(%ebx) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 1121bb: 83 ba 68 67 12 00 02 cmpl $0x2,0x126768(%edx) 1121c2: 75 06 jne 1121ca <_POSIX_signals_Check_signal+0x5a> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 1121c4: 52 push %edx 1121c5: 6a 00 push $0x0 1121c7: 57 push %edi 1121c8: eb 03 jmp 1121cd <_POSIX_signals_Check_signal+0x5d> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 1121ca: 83 ec 0c sub $0xc,%esp 1121cd: 56 push %esi 1121ce: ff d0 call *%eax 1121d0: 83 c4 10 add $0x10,%esp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 1121d3: 8b 45 d4 mov -0x2c(%ebp),%eax 1121d6: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) 1121dc: b0 01 mov $0x1,%al return true; 1121de: eb 02 jmp 1121e2 <_POSIX_signals_Check_signal+0x72> 1121e0: 31 c0 xor %eax,%eax } 1121e2: 8d 65 f4 lea -0xc(%ebp),%esp 1121e5: 5b pop %ebx 1121e6: 5e pop %esi 1121e7: 5f pop %edi 1121e8: c9 leave 1121e9: c3 ret =============================================================================== 0011296c <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 11296c: 55 push %ebp 11296d: 89 e5 mov %esp,%ebp 11296f: 53 push %ebx 112970: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 112973: 9c pushf 112974: fa cli 112975: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 112976: 6b c1 0c imul $0xc,%ecx,%eax 112979: 83 b8 68 67 12 00 02 cmpl $0x2,0x126768(%eax) 112980: 75 0e jne 112990 <_POSIX_signals_Clear_process_signals+0x24> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 112982: 8d 98 64 69 12 00 lea 0x126964(%eax),%ebx 112988: 39 98 60 69 12 00 cmp %ebx,0x126960(%eax) 11298e: 75 1d jne 1129ad <_POSIX_signals_Clear_process_signals+0x41><== NEVER TAKEN if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 112990: 49 dec %ecx 112991: b8 fe ff ff ff mov $0xfffffffe,%eax 112996: d3 c0 rol %cl,%eax 112998: 23 05 5c 69 12 00 and 0x12695c,%eax 11299e: a3 5c 69 12 00 mov %eax,0x12695c if ( !_POSIX_signals_Pending ) 1129a3: 85 c0 test %eax,%eax 1129a5: 75 06 jne 1129ad <_POSIX_signals_Clear_process_signals+0x41><== NEVER TAKEN _Thread_Do_post_task_switch_extension--; 1129a7: ff 0d a8 62 12 00 decl 0x1262a8 } _ISR_Enable( level ); 1129ad: 52 push %edx 1129ae: 9d popf } 1129af: 5b pop %ebx 1129b0: c9 leave 1129b1: c3 ret =============================================================================== 0010b014 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 10b014: 55 push %ebp 10b015: 89 e5 mov %esp,%ebp 10b017: 56 push %esi 10b018: 53 push %ebx 10b019: 8b 55 08 mov 0x8(%ebp),%edx 10b01c: b8 1b 00 00 00 mov $0x1b,%eax int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10b021: bb 01 00 00 00 mov $0x1,%ebx 10b026: 8d 48 ff lea -0x1(%eax),%ecx 10b029: 89 de mov %ebx,%esi 10b02b: d3 e6 shl %cl,%esi 10b02d: 85 d6 test %edx,%esi 10b02f: 75 1e jne 10b04f <_POSIX_signals_Get_highest+0x3b><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10b031: 40 inc %eax 10b032: 83 f8 20 cmp $0x20,%eax 10b035: 75 ef jne 10b026 <_POSIX_signals_Get_highest+0x12> 10b037: 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 ) ) { 10b039: bb 01 00 00 00 mov $0x1,%ebx 10b03e: 8d 48 ff lea -0x1(%eax),%ecx 10b041: 89 de mov %ebx,%esi 10b043: d3 e6 shl %cl,%esi 10b045: 85 d6 test %edx,%esi 10b047: 75 06 jne 10b04f <_POSIX_signals_Get_highest+0x3b> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10b049: 40 inc %eax 10b04a: 83 f8 1b cmp $0x1b,%eax 10b04d: 75 ef jne 10b03e <_POSIX_signals_Get_highest+0x2a><== ALWAYS TAKEN * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 10b04f: 5b pop %ebx 10b050: 5e pop %esi 10b051: c9 leave 10b052: c3 ret =============================================================================== 0010f5d9 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 10f5d9: 55 push %ebp 10f5da: 89 e5 mov %esp,%ebp 10f5dc: 57 push %edi 10f5dd: 56 push %esi 10f5de: 53 push %ebx 10f5df: 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 ]; 10f5e2: 8b 45 08 mov 0x8(%ebp),%eax 10f5e5: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx /* * 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; 10f5eb: a1 c4 62 12 00 mov 0x1262c4,%eax 10f5f0: 8b 78 34 mov 0x34(%eax),%edi /* * api may be NULL in case of a thread close in progress */ if ( !api ) 10f5f3: 85 db test %ebx,%ebx 10f5f5: 74 72 je 10f669 <_POSIX_signals_Post_switch_extension+0x90><== NEVER TAKEN * * 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 ); 10f5f7: 9c pushf 10f5f8: fa cli 10f5f9: 59 pop %ecx if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 10f5fa: 8b 15 5c 69 12 00 mov 0x12695c,%edx 10f600: 0b 93 d0 00 00 00 or 0xd0(%ebx),%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 & 10f606: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10f60c: f7 d0 not %eax 10f60e: 85 c2 test %eax,%edx 10f610: 75 0c jne 10f61e <_POSIX_signals_Post_switch_extension+0x45> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 10f612: 51 push %ecx 10f613: 9d popf _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } _Thread_Executing->Wait.return_code = hold_errno; 10f614: a1 c4 62 12 00 mov 0x1262c4,%eax 10f619: 89 78 34 mov %edi,0x34(%eax) 10f61c: eb 4b jmp 10f669 <_POSIX_signals_Post_switch_extension+0x90> if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 10f61e: 51 push %ecx 10f61f: 9d popf 10f620: be 1b 00 00 00 mov $0x1b,%esi for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 10f625: 52 push %edx 10f626: 6a 00 push $0x0 10f628: 56 push %esi 10f629: 53 push %ebx 10f62a: e8 41 2b 00 00 call 112170 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 10f62f: 83 c4 0c add $0xc,%esp 10f632: 6a 01 push $0x1 10f634: 56 push %esi 10f635: 53 push %ebx 10f636: e8 35 2b 00 00 call 112170 <_POSIX_signals_Check_signal> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10f63b: 46 inc %esi 10f63c: 83 c4 10 add $0x10,%esp 10f63f: 83 fe 20 cmp $0x20,%esi 10f642: 75 e1 jne 10f625 <_POSIX_signals_Post_switch_extension+0x4c> 10f644: 66 be 01 00 mov $0x1,%si _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 ); 10f648: 50 push %eax 10f649: 6a 00 push $0x0 10f64b: 56 push %esi 10f64c: 53 push %ebx 10f64d: e8 1e 2b 00 00 call 112170 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 10f652: 83 c4 0c add $0xc,%esp 10f655: 6a 01 push $0x1 10f657: 56 push %esi 10f658: 53 push %ebx 10f659: e8 12 2b 00 00 call 112170 <_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++ ) { 10f65e: 46 inc %esi 10f65f: 83 c4 10 add $0x10,%esp 10f662: 83 fe 1b cmp $0x1b,%esi 10f665: 75 e1 jne 10f648 <_POSIX_signals_Post_switch_extension+0x6f> 10f667: eb 8e jmp 10f5f7 <_POSIX_signals_Post_switch_extension+0x1e> _POSIX_signals_Check_signal( api, signo, true ); } } _Thread_Executing->Wait.return_code = hold_errno; } 10f669: 8d 65 f4 lea -0xc(%ebp),%esp 10f66c: 5b pop %ebx 10f66d: 5e pop %esi 10f66e: 5f pop %edi 10f66f: c9 leave 10f670: c3 ret =============================================================================== 001122fc <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 1122fc: 55 push %ebp 1122fd: 89 e5 mov %esp,%ebp 1122ff: 57 push %edi 112300: 56 push %esi 112301: 53 push %ebx 112302: 83 ec 0c sub $0xc,%esp 112305: 8b 5d 08 mov 0x8(%ebp),%ebx 112308: 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 ]; 11230b: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 112311: 8d 4a ff lea -0x1(%edx),%ecx 112314: b8 01 00 00 00 mov $0x1,%eax 112319: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 11231b: 8b 4b 10 mov 0x10(%ebx),%ecx 11231e: 89 cf mov %ecx,%edi 112320: 81 e7 00 80 00 10 and $0x10008000,%edi 112326: 81 ff 00 80 00 10 cmp $0x10008000,%edi 11232c: 75 50 jne 11237e <_POSIX_signals_Unblock_thread+0x82> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 11232e: 85 43 30 test %eax,0x30(%ebx) 112331: 75 10 jne 112343 <_POSIX_signals_Unblock_thread+0x47> 112333: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx 112339: f7 d1 not %ecx 11233b: 85 c8 test %ecx,%eax 11233d: 0f 84 ae 00 00 00 je 1123f1 <_POSIX_signals_Unblock_thread+0xf5> the_thread->Wait.return_code = EINTR; 112343: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 11234a: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 11234d: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 112351: 75 12 jne 112365 <_POSIX_signals_Unblock_thread+0x69> the_info->si_signo = signo; 112353: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 112355: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 11235c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 112363: eb 0c jmp 112371 <_POSIX_signals_Unblock_thread+0x75> } else { *the_info = *info; 112365: b9 03 00 00 00 mov $0x3,%ecx 11236a: 89 c7 mov %eax,%edi 11236c: 8b 75 10 mov 0x10(%ebp),%esi 11236f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 112371: 83 ec 0c sub $0xc,%esp 112374: 53 push %ebx 112375: e8 0a a6 ff ff call 10c984 <_Thread_queue_Extract_with_proxy> 11237a: b0 01 mov $0x1,%al 11237c: eb 52 jmp 1123d0 <_POSIX_signals_Unblock_thread+0xd4> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 11237e: 8b 96 cc 00 00 00 mov 0xcc(%esi),%edx 112384: f7 d2 not %edx 112386: 85 d0 test %edx,%eax 112388: 74 67 je 1123f1 <_POSIX_signals_Unblock_thread+0xf5> * 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; 11238a: c6 43 74 01 movb $0x1,0x74(%ebx) if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 11238e: f7 c1 00 00 00 10 test $0x10000000,%ecx 112394: 74 3f je 1123d5 <_POSIX_signals_Unblock_thread+0xd9> the_thread->Wait.return_code = EINTR; 112396: 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) ) 11239d: f7 c1 e0 be 03 00 test $0x3bee0,%ecx 1123a3: 74 0b je 1123b0 <_POSIX_signals_Unblock_thread+0xb4> _Thread_queue_Extract_with_proxy( the_thread ); 1123a5: 83 ec 0c sub $0xc,%esp 1123a8: 53 push %ebx 1123a9: e8 d6 a5 ff ff call 10c984 <_Thread_queue_Extract_with_proxy> 1123ae: eb 1e jmp 1123ce <_POSIX_signals_Unblock_thread+0xd2> else if ( _States_Is_delaying(the_thread->current_state) ){ 1123b0: 80 e1 08 and $0x8,%cl 1123b3: 74 3c je 1123f1 <_POSIX_signals_Unblock_thread+0xf5><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 1123b5: 83 ec 0c sub $0xc,%esp 1123b8: 8d 43 48 lea 0x48(%ebx),%eax 1123bb: 50 push %eax 1123bc: e8 37 ae ff ff call 10d1f8 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1123c1: 58 pop %eax 1123c2: 5a pop %edx 1123c3: 68 f8 ff 03 10 push $0x1003fff8 1123c8: 53 push %ebx 1123c9: e8 c6 9b ff ff call 10bf94 <_Thread_Clear_state> 1123ce: 31 c0 xor %eax,%eax 1123d0: 83 c4 10 add $0x10,%esp 1123d3: eb 1e jmp 1123f3 <_POSIX_signals_Unblock_thread+0xf7> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 1123d5: 85 c9 test %ecx,%ecx 1123d7: 75 18 jne 1123f1 <_POSIX_signals_Unblock_thread+0xf5><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1123d9: a1 a0 62 12 00 mov 0x1262a0,%eax 1123de: 85 c0 test %eax,%eax 1123e0: 74 0f je 1123f1 <_POSIX_signals_Unblock_thread+0xf5> 1123e2: 3b 1d c4 62 12 00 cmp 0x1262c4,%ebx 1123e8: 75 07 jne 1123f1 <_POSIX_signals_Unblock_thread+0xf5><== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 1123ea: c6 05 58 63 12 00 01 movb $0x1,0x126358 1123f1: 31 c0 xor %eax,%eax } } return false; } 1123f3: 8d 65 f4 lea -0xc(%ebp),%esp 1123f6: 5b pop %ebx 1123f7: 5e pop %esi 1123f8: 5f pop %edi 1123f9: c9 leave 1123fa: c3 ret =============================================================================== 00100220 <_Partition_Manager_initialization>: #include #include #include void _Partition_Manager_initialization(void) { 100220: 55 push %ebp 100221: 89 e5 mov %esp,%ebp } 100223: c9 leave 100224: c3 ret =============================================================================== 0010fcce <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10fcce: 55 push %ebp 10fccf: 89 e5 mov %esp,%ebp 10fcd1: 57 push %edi 10fcd2: 56 push %esi 10fcd3: 53 push %ebx 10fcd4: 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 ]; 10fcd7: 8b 45 08 mov 0x8(%ebp),%eax 10fcda: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx if ( !api ) 10fce0: 85 db test %ebx,%ebx 10fce2: 74 45 je 10fd29 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10fce4: 9c pushf 10fce5: fa cli 10fce6: 58 pop %eax signal_set = asr->signals_posted; 10fce7: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10fcea: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10fcf1: 50 push %eax 10fcf2: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10fcf3: 85 ff test %edi,%edi 10fcf5: 74 32 je 10fd29 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 10fcf7: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10fcfa: 50 push %eax 10fcfb: 8d 75 e4 lea -0x1c(%ebp),%esi 10fcfe: 56 push %esi 10fcff: 68 ff ff 00 00 push $0xffff 10fd04: ff 73 10 pushl 0x10(%ebx) 10fd07: e8 ac 28 00 00 call 1125b8 (*asr->handler)( signal_set ); 10fd0c: 89 3c 24 mov %edi,(%esp) 10fd0f: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10fd12: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10fd15: 83 c4 0c add $0xc,%esp 10fd18: 56 push %esi 10fd19: 68 ff ff 00 00 push $0xffff 10fd1e: ff 75 e4 pushl -0x1c(%ebp) 10fd21: e8 92 28 00 00 call 1125b8 10fd26: 83 c4 10 add $0x10,%esp } 10fd29: 8d 65 f4 lea -0xc(%ebp),%esp 10fd2c: 5b pop %ebx 10fd2d: 5e pop %esi 10fd2e: 5f pop %edi 10fd2f: c9 leave 10fd30: c3 ret =============================================================================== 00100240 <_Rate_monotonic_Manager_initialization>: #include #include void _Rate_monotonic_Manager_initialization(void) { 100240: 55 push %ebp 100241: 89 e5 mov %esp,%ebp } 100243: c9 leave 100244: c3 ret =============================================================================== 0013b98c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 13b98c: 55 push %ebp 13b98d: 89 e5 mov %esp,%ebp 13b98f: 53 push %ebx 13b990: 83 ec 18 sub $0x18,%esp 13b993: 8d 45 f4 lea -0xc(%ebp),%eax 13b996: 50 push %eax 13b997: ff 75 08 pushl 0x8(%ebp) 13b99a: 68 24 ac 16 00 push $0x16ac24 13b99f: e8 64 6d fd ff call 112708 <_Objects_Get> 13b9a4: 89 c3 mov %eax,%ebx /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13b9a6: 83 c4 10 add $0x10,%esp 13b9a9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 13b9ad: 75 64 jne 13ba13 <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 13b9af: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 13b9b2: f6 40 11 40 testb $0x40,0x11(%eax) 13b9b6: 74 18 je 13b9d0 <_Rate_monotonic_Timeout+0x44> the_thread->Wait.id == the_period->Object.id ) { 13b9b8: 8b 50 20 mov 0x20(%eax),%edx 13b9bb: 3b 53 08 cmp 0x8(%ebx),%edx 13b9be: 75 10 jne 13b9d0 <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 13b9c0: 52 push %edx 13b9c1: 52 push %edx 13b9c2: 68 f8 ff 03 10 push $0x1003fff8 13b9c7: 50 push %eax 13b9c8: e8 5f 72 fd ff call 112c2c <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 13b9cd: 59 pop %ecx 13b9ce: eb 10 jmp 13b9e0 <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 13b9d0: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 13b9d4: 75 2b jne 13ba01 <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 13b9d6: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 13b9dd: 83 ec 0c sub $0xc,%esp 13b9e0: 53 push %ebx 13b9e1: e8 52 fc ff ff call 13b638 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13b9e6: 8b 43 3c mov 0x3c(%ebx),%eax 13b9e9: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13b9ec: 58 pop %eax 13b9ed: 5a pop %edx 13b9ee: 83 c3 10 add $0x10,%ebx 13b9f1: 53 push %ebx 13b9f2: 68 00 a2 16 00 push $0x16a200 13b9f7: e8 ac 83 fd ff call 113da8 <_Watchdog_Insert> 13b9fc: 83 c4 10 add $0x10,%esp 13b9ff: eb 07 jmp 13ba08 <_Rate_monotonic_Timeout+0x7c> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 13ba01: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 13ba08: a1 24 a1 16 00 mov 0x16a124,%eax 13ba0d: 48 dec %eax 13ba0e: a3 24 a1 16 00 mov %eax,0x16a124 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 13ba13: 8b 5d fc mov -0x4(%ebp),%ebx 13ba16: c9 leave 13ba17: c3 ret =============================================================================== 00100228 <_Region_Manager_initialization>: #include #include #include void _Region_Manager_initialization(void) { 100228: 55 push %ebp 100229: 89 e5 mov %esp,%ebp } 10022b: c9 leave 10022c: c3 ret =============================================================================== 0010b120 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10b120: 55 push %ebp 10b121: 89 e5 mov %esp,%ebp 10b123: 53 push %ebx 10b124: 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(); 10b127: 8b 1d 64 5c 12 00 mov 0x125c64,%ebx if ((!the_tod) || 10b12d: 85 c9 test %ecx,%ecx 10b12f: 74 59 je 10b18a <_TOD_Validate+0x6a> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || 10b131: b8 40 42 0f 00 mov $0xf4240,%eax 10b136: 31 d2 xor %edx,%edx 10b138: f7 f3 div %ebx 10b13a: 39 41 18 cmp %eax,0x18(%ecx) 10b13d: 73 4b jae 10b18a <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10b13f: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10b143: 77 45 ja 10b18a <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10b145: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10b149: 77 3f ja 10b18a <_TOD_Validate+0x6a> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10b14b: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10b14f: 77 39 ja 10b18a <_TOD_Validate+0x6a> (the_tod->month == 0) || 10b151: 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) || 10b154: 85 c0 test %eax,%eax 10b156: 74 32 je 10b18a <_TOD_Validate+0x6a> <== NEVER TAKEN 10b158: 83 f8 0c cmp $0xc,%eax 10b15b: 77 2d ja 10b18a <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10b15d: 8b 19 mov (%ecx),%ebx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10b15f: 81 fb c3 07 00 00 cmp $0x7c3,%ebx 10b165: 76 23 jbe 10b18a <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10b167: 8b 51 08 mov 0x8(%ecx),%edx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10b16a: 85 d2 test %edx,%edx 10b16c: 74 1c je 10b18a <_TOD_Validate+0x6a> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10b16e: 80 e3 03 and $0x3,%bl 10b171: 75 09 jne 10b17c <_TOD_Validate+0x5c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10b173: 8b 04 85 20 2b 12 00 mov 0x122b20(,%eax,4),%eax 10b17a: eb 07 jmp 10b183 <_TOD_Validate+0x63> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10b17c: 8b 04 85 ec 2a 12 00 mov 0x122aec(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10b183: 39 c2 cmp %eax,%edx 10b185: 0f 96 c0 setbe %al 10b188: eb 02 jmp 10b18c <_TOD_Validate+0x6c> 10b18a: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10b18c: 5b pop %ebx 10b18d: c9 leave 10b18e: c3 ret =============================================================================== 0010be74 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10be74: 55 push %ebp 10be75: 89 e5 mov %esp,%ebp 10be77: 57 push %edi 10be78: 56 push %esi 10be79: 53 push %ebx 10be7a: 83 ec 28 sub $0x28,%esp 10be7d: 8b 5d 08 mov 0x8(%ebp),%ebx 10be80: 8b 7d 0c mov 0xc(%ebp),%edi 10be83: 8a 45 10 mov 0x10(%ebp),%al 10be86: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10be89: 8b 73 10 mov 0x10(%ebx),%esi /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 10be8c: 53 push %ebx 10be8d: e8 4e 0d 00 00 call 10cbe0 <_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 ) 10be92: 83 c4 10 add $0x10,%esp 10be95: 39 7b 14 cmp %edi,0x14(%ebx) 10be98: 74 0c je 10bea6 <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10be9a: 50 push %eax 10be9b: 50 push %eax 10be9c: 57 push %edi 10be9d: 53 push %ebx 10be9e: e8 09 0c 00 00 call 10caac <_Thread_Set_priority> 10bea3: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10bea6: 9c pushf 10bea7: fa cli 10bea8: 59 pop %ecx /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 10bea9: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10beac: 83 f8 04 cmp $0x4,%eax 10beaf: 74 2f je 10bee0 <_Thread_Change_priority+0x6c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10beb1: 83 e6 04 and $0x4,%esi 10beb4: 75 08 jne 10bebe <_Thread_Change_priority+0x4a><== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10beb6: 89 c2 mov %eax,%edx 10beb8: 83 e2 fb and $0xfffffffb,%edx 10bebb: 89 53 10 mov %edx,0x10(%ebx) _ISR_Enable( level ); 10bebe: 51 push %ecx 10bebf: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10bec0: a9 e0 be 03 00 test $0x3bee0,%eax 10bec5: 0f 84 c0 00 00 00 je 10bf8b <_Thread_Change_priority+0x117> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10becb: 89 5d 0c mov %ebx,0xc(%ebp) 10bece: 8b 43 44 mov 0x44(%ebx),%eax 10bed1: 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 ); } 10bed4: 8d 65 f4 lea -0xc(%ebp),%esp 10bed7: 5b pop %ebx 10bed8: 5e pop %esi 10bed9: 5f pop %edi 10beda: 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 ); 10bedb: e9 44 0b 00 00 jmp 10ca24 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10bee0: 83 e6 04 and $0x4,%esi 10bee3: 75 53 jne 10bf38 <_Thread_Change_priority+0xc4><== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10bee5: 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; 10beec: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10bef2: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx 10bef9: 66 09 10 or %dx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10befc: 66 a1 b8 62 12 00 mov 0x1262b8,%ax 10bf02: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10bf08: 66 a3 b8 62 12 00 mov %ax,0x1262b8 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10bf0e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10bf12: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10bf18: 74 0e je 10bf28 <_Thread_Change_priority+0xb4> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10bf1a: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10bf1d: 8b 10 mov (%eax),%edx after_node->next = the_node; 10bf1f: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10bf21: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10bf23: 89 5a 04 mov %ebx,0x4(%edx) 10bf26: eb 10 jmp 10bf38 <_Thread_Change_priority+0xc4> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10bf28: 8d 50 04 lea 0x4(%eax),%edx 10bf2b: 89 13 mov %edx,(%ebx) old_last_node = the_chain->last; 10bf2d: 8b 50 08 mov 0x8(%eax),%edx the_chain->last = the_node; 10bf30: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10bf33: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 10bf35: 89 53 04 mov %edx,0x4(%ebx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10bf38: 51 push %ecx 10bf39: 9d popf 10bf3a: 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 ); 10bf3b: 66 8b 1d b8 62 12 00 mov 0x1262b8,%bx 10bf42: 31 c0 xor %eax,%eax 10bf44: 89 c2 mov %eax,%edx 10bf46: 66 0f bc d3 bsf %bx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10bf4a: 0f b7 d2 movzwl %dx,%edx 10bf4d: 66 8b 9c 12 30 63 12 mov 0x126330(%edx,%edx,1),%bx 10bf54: 00 10bf55: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10bf59: c1 e2 04 shl $0x4,%edx 10bf5c: 0f b7 c0 movzwl %ax,%eax 10bf5f: 01 c2 add %eax,%edx 10bf61: 6b d2 0c imul $0xc,%edx,%edx 10bf64: 8b 1d d0 61 12 00 mov 0x1261d0,%ebx 10bf6a: 8b 14 1a mov (%edx,%ebx,1),%edx 10bf6d: 89 15 94 62 12 00 mov %edx,0x126294 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10bf73: a1 c4 62 12 00 mov 0x1262c4,%eax * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10bf78: 39 d0 cmp %edx,%eax 10bf7a: 74 0d je 10bf89 <_Thread_Change_priority+0x115> _Thread_Executing->is_preemptible ) 10bf7c: 80 78 75 00 cmpb $0x0,0x75(%eax) 10bf80: 74 07 je 10bf89 <_Thread_Change_priority+0x115> _Context_Switch_necessary = true; 10bf82: c6 05 d4 62 12 00 01 movb $0x1,0x1262d4 _ISR_Enable( level ); 10bf89: 51 push %ecx 10bf8a: 9d popf } 10bf8b: 8d 65 f4 lea -0xc(%ebp),%esp 10bf8e: 5b pop %ebx 10bf8f: 5e pop %esi 10bf90: 5f pop %edi 10bf91: c9 leave 10bf92: c3 ret =============================================================================== 0010bf94 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10bf94: 55 push %ebp 10bf95: 89 e5 mov %esp,%ebp 10bf97: 53 push %ebx 10bf98: 8b 45 08 mov 0x8(%ebp),%eax 10bf9b: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10bf9e: 9c pushf 10bf9f: fa cli 10bfa0: 59 pop %ecx current_state = the_thread->current_state; 10bfa1: 8b 58 10 mov 0x10(%eax),%ebx if ( current_state & state ) { 10bfa4: 85 da test %ebx,%edx 10bfa6: 74 71 je 10c019 <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10bfa8: f7 d2 not %edx 10bfaa: 21 da and %ebx,%edx current_state = 10bfac: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10bfaf: 85 d2 test %edx,%edx 10bfb1: 75 66 jne 10c019 <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10bfb3: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10bfb9: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10bfc0: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10bfc3: 66 8b 15 b8 62 12 00 mov 0x1262b8,%dx 10bfca: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10bfd0: 66 89 15 b8 62 12 00 mov %dx,0x1262b8 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10bfd7: 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); 10bfdd: 8d 5a 04 lea 0x4(%edx),%ebx 10bfe0: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10bfe2: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10bfe5: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10bfe8: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10bfea: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10bfed: 51 push %ecx 10bfee: 9d popf 10bfef: 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 ) { 10bff0: 8b 50 14 mov 0x14(%eax),%edx 10bff3: 8b 1d 94 62 12 00 mov 0x126294,%ebx 10bff9: 3b 53 14 cmp 0x14(%ebx),%edx 10bffc: 73 1b jae 10c019 <_Thread_Clear_state+0x85> _Thread_Heir = the_thread; 10bffe: a3 94 62 12 00 mov %eax,0x126294 if ( _Thread_Executing->is_preemptible || 10c003: a1 c4 62 12 00 mov 0x1262c4,%eax 10c008: 80 78 75 00 cmpb $0x0,0x75(%eax) 10c00c: 75 04 jne 10c012 <_Thread_Clear_state+0x7e> 10c00e: 85 d2 test %edx,%edx 10c010: 75 07 jne 10c019 <_Thread_Clear_state+0x85><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10c012: c6 05 d4 62 12 00 01 movb $0x1,0x1262d4 } } } _ISR_Enable( level ); 10c019: 51 push %ecx 10c01a: 9d popf } 10c01b: 5b pop %ebx 10c01c: c9 leave 10c01d: c3 ret =============================================================================== 0010c194 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c194: 55 push %ebp 10c195: 89 e5 mov %esp,%ebp 10c197: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c19a: 8d 45 f4 lea -0xc(%ebp),%eax 10c19d: 50 push %eax 10c19e: ff 75 08 pushl 0x8(%ebp) 10c1a1: e8 8e 01 00 00 call 10c334 <_Thread_Get> switch ( location ) { 10c1a6: 83 c4 10 add $0x10,%esp 10c1a9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c1ad: 75 1b jne 10c1ca <_Thread_Delay_ended+0x36><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10c1af: 52 push %edx 10c1b0: 52 push %edx 10c1b1: 68 18 00 00 10 push $0x10000018 10c1b6: 50 push %eax 10c1b7: e8 d8 fd ff ff call 10bf94 <_Thread_Clear_state> 10c1bc: a1 08 62 12 00 mov 0x126208,%eax 10c1c1: 48 dec %eax 10c1c2: a3 08 62 12 00 mov %eax,0x126208 10c1c7: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10c1ca: c9 leave 10c1cb: c3 ret =============================================================================== 0010c1cc <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10c1cc: 55 push %ebp 10c1cd: 89 e5 mov %esp,%ebp 10c1cf: 57 push %edi 10c1d0: 56 push %esi 10c1d1: 53 push %ebx 10c1d2: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10c1d5: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx _ISR_Disable( level ); 10c1db: 9c pushf 10c1dc: fa cli 10c1dd: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10c1de: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10c1e1: e9 f1 00 00 00 jmp 10c2d7 <_Thread_Dispatch+0x10b> heir = _Thread_Heir; 10c1e6: 8b 35 94 62 12 00 mov 0x126294,%esi _Thread_Dispatch_disable_level = 1; 10c1ec: c7 05 08 62 12 00 01 movl $0x1,0x126208 10c1f3: 00 00 00 _Context_Switch_necessary = false; 10c1f6: c6 05 d4 62 12 00 00 movb $0x0,0x1262d4 _Thread_Executing = heir; 10c1fd: 89 35 c4 62 12 00 mov %esi,0x1262c4 #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 ) 10c203: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10c207: 75 09 jne 10c212 <_Thread_Dispatch+0x46> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c209: 8b 15 d4 61 12 00 mov 0x1261d4,%edx 10c20f: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10c212: 50 push %eax 10c213: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10c214: 83 ec 0c sub $0xc,%esp 10c217: 8d 45 e0 lea -0x20(%ebp),%eax 10c21a: 50 push %eax 10c21b: e8 6c 3f 00 00 call 11018c <_TOD_Get_uptime> _Timestamp_Subtract( 10c220: 83 c4 0c add $0xc,%esp 10c223: 57 push %edi 10c224: 8d 45 e0 lea -0x20(%ebp),%eax 10c227: 50 push %eax 10c228: 68 cc 62 12 00 push $0x1262cc 10c22d: e8 4e 0c 00 00 call 10ce80 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10c232: 58 pop %eax 10c233: 5a pop %edx 10c234: 57 push %edi 10c235: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c23b: 50 push %eax 10c23c: e8 0f 0c 00 00 call 10ce50 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10c241: 8b 45 e0 mov -0x20(%ebp),%eax 10c244: 8b 55 e4 mov -0x1c(%ebp),%edx 10c247: a3 cc 62 12 00 mov %eax,0x1262cc 10c24c: 89 15 d0 62 12 00 mov %edx,0x1262d0 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10c252: a1 90 62 12 00 mov 0x126290,%eax 10c257: 83 c4 10 add $0x10,%esp 10c25a: 85 c0 test %eax,%eax 10c25c: 74 10 je 10c26e <_Thread_Dispatch+0xa2> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10c25e: 8b 10 mov (%eax),%edx 10c260: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10c266: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10c26c: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10c26e: 51 push %ecx 10c26f: 51 push %ecx 10c270: 56 push %esi 10c271: 53 push %ebx 10c272: e8 39 0e 00 00 call 10d0b0 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10c277: 58 pop %eax 10c278: 5a pop %edx 10c279: 81 c6 d4 00 00 00 add $0xd4,%esi 10c27f: 56 push %esi 10c280: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10c286: 50 push %eax 10c287: e8 e4 10 00 00 call 10d370 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10c28c: 83 c4 10 add $0x10,%esp 10c28f: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10c296: 74 36 je 10c2ce <_Thread_Dispatch+0x102> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 10c298: a1 8c 62 12 00 mov 0x12628c,%eax 10c29d: 39 c3 cmp %eax,%ebx 10c29f: 74 2d je 10c2ce <_Thread_Dispatch+0x102> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10c2a1: 85 c0 test %eax,%eax 10c2a3: 74 11 je 10c2b6 <_Thread_Dispatch+0xea> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10c2a5: 83 ec 0c sub $0xc,%esp 10c2a8: 05 ec 00 00 00 add $0xec,%eax 10c2ad: 50 push %eax 10c2ae: e8 f1 10 00 00 call 10d3a4 <_CPU_Context_save_fp> 10c2b3: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10c2b6: 83 ec 0c sub $0xc,%esp 10c2b9: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10c2bf: 50 push %eax 10c2c0: e8 e9 10 00 00 call 10d3ae <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10c2c5: 89 1d 8c 62 12 00 mov %ebx,0x12628c 10c2cb: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10c2ce: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx _ISR_Disable( level ); 10c2d4: 9c pushf 10c2d5: fa cli 10c2d6: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10c2d7: 8a 15 d4 62 12 00 mov 0x1262d4,%dl 10c2dd: 84 d2 test %dl,%dl 10c2df: 0f 85 01 ff ff ff jne 10c1e6 <_Thread_Dispatch+0x1a> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10c2e5: c7 05 08 62 12 00 00 movl $0x0,0x126208 10c2ec: 00 00 00 _ISR_Enable( level ); 10c2ef: 50 push %eax 10c2f0: 9d popf if ( _Thread_Do_post_task_switch_extension || 10c2f1: 83 3d a8 62 12 00 00 cmpl $0x0,0x1262a8 10c2f8: 75 06 jne 10c300 <_Thread_Dispatch+0x134> executing->do_post_task_switch_extension ) { 10c2fa: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10c2fe: 74 09 je 10c309 <_Thread_Dispatch+0x13d> executing->do_post_task_switch_extension = false; 10c300: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10c304: e8 16 ea ff ff call 10ad1f <_API_extensions_Run_postswitch> } } 10c309: 8d 65 f4 lea -0xc(%ebp),%esp 10c30c: 5b pop %ebx 10c30d: 5e pop %esi 10c30e: 5f pop %edi 10c30f: c9 leave 10c310: c3 ret =============================================================================== 001127d4 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 1127d4: 55 push %ebp 1127d5: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 1127d7: a1 c4 62 12 00 mov 0x1262c4,%eax if ( !_States_Is_ready( executing->current_state ) || 1127dc: 83 78 10 00 cmpl $0x0,0x10(%eax) 1127e0: 75 0e jne 1127f0 <_Thread_Evaluate_mode+0x1c><== NEVER TAKEN 1127e2: 3b 05 94 62 12 00 cmp 0x126294,%eax 1127e8: 74 11 je 1127fb <_Thread_Evaluate_mode+0x27> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 1127ea: 80 78 75 00 cmpb $0x0,0x75(%eax) 1127ee: 74 0b je 1127fb <_Thread_Evaluate_mode+0x27><== NEVER TAKEN _Context_Switch_necessary = true; 1127f0: c6 05 d4 62 12 00 01 movb $0x1,0x1262d4 1127f7: b0 01 mov $0x1,%al return true; 1127f9: eb 02 jmp 1127fd <_Thread_Evaluate_mode+0x29> 1127fb: 31 c0 xor %eax,%eax } return false; } 1127fd: c9 leave 1127fe: c3 ret =============================================================================== 00112800 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 112800: 55 push %ebp 112801: 89 e5 mov %esp,%ebp 112803: 53 push %ebx 112804: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 112807: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 11280d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 112813: 85 c0 test %eax,%eax 112815: 74 03 je 11281a <_Thread_Handler+0x1a> 112817: fa cli 112818: eb 01 jmp 11281b <_Thread_Handler+0x1b> 11281a: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 11281b: a0 c4 5e 12 00 mov 0x125ec4,%al 112820: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 112823: c6 05 c4 5e 12 00 01 movb $0x1,0x125ec4 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 11282a: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 112831: 74 24 je 112857 <_Thread_Handler+0x57> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 112833: a1 8c 62 12 00 mov 0x12628c,%eax 112838: 39 c3 cmp %eax,%ebx 11283a: 74 1b je 112857 <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 11283c: 85 c0 test %eax,%eax 11283e: 74 11 je 112851 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 112840: 83 ec 0c sub $0xc,%esp 112843: 05 ec 00 00 00 add $0xec,%eax 112848: 50 push %eax 112849: e8 56 ab ff ff call 10d3a4 <_CPU_Context_save_fp> 11284e: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 112851: 89 1d 8c 62 12 00 mov %ebx,0x12628c /* * 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 ); 112857: 83 ec 0c sub $0xc,%esp 11285a: 53 push %ebx 11285b: e8 04 a7 ff ff call 10cf64 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 112860: e8 ac 9a ff ff call 10c311 <_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) */ { 112865: 83 c4 10 add $0x10,%esp 112868: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 11286c: 75 05 jne 112873 <_Thread_Handler+0x73> INIT_NAME (); 11286e: e8 dd bf 00 00 call 11e850 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 112873: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 112879: 85 c0 test %eax,%eax 11287b: 75 0b jne 112888 <_Thread_Handler+0x88> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 11287d: 83 ec 0c sub $0xc,%esp 112880: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 112886: eb 0c jmp 112894 <_Thread_Handler+0x94> executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 112888: 48 dec %eax 112889: 75 15 jne 1128a0 <_Thread_Handler+0xa0> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 11288b: 83 ec 0c sub $0xc,%esp 11288e: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 112894: 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 = 11289a: 89 43 28 mov %eax,0x28(%ebx) 11289d: 83 c4 10 add $0x10,%esp * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 1128a0: 83 ec 0c sub $0xc,%esp 1128a3: 53 push %ebx 1128a4: e8 ec a6 ff ff call 10cf95 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 1128a9: 83 c4 0c add $0xc,%esp 1128ac: 6a 06 push $0x6 1128ae: 6a 01 push $0x1 1128b0: 6a 00 push $0x0 1128b2: e8 bd 8d ff ff call 10b674 <_Internal_error_Occurred> =============================================================================== 0010c3a8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10c3a8: 55 push %ebp 10c3a9: 89 e5 mov %esp,%ebp 10c3ab: 57 push %edi 10c3ac: 56 push %esi 10c3ad: 53 push %ebx 10c3ae: 83 ec 1c sub $0x1c,%esp 10c3b1: 8b 5d 0c mov 0xc(%ebp),%ebx 10c3b4: 8b 4d 10 mov 0x10(%ebp),%ecx 10c3b7: 8b 75 14 mov 0x14(%ebp),%esi 10c3ba: 8a 55 18 mov 0x18(%ebp),%dl 10c3bd: 8a 45 20 mov 0x20(%ebp),%al 10c3c0: 88 45 e7 mov %al,-0x19(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10c3c3: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10c3ca: 00 00 00 10c3cd: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10c3d4: 00 00 00 10c3d7: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10c3de: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10c3e1: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10c3e8: 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 ) { 10c3eb: 85 c9 test %ecx,%ecx 10c3ed: 75 30 jne 10c41f <_Thread_Initialize+0x77> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10c3ef: 51 push %ecx 10c3f0: 51 push %ecx 10c3f1: 56 push %esi 10c3f2: 53 push %ebx 10c3f3: 88 55 e0 mov %dl,-0x20(%ebp) 10c3f6: e8 59 08 00 00 call 10cc54 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10c3fb: 83 c4 10 add $0x10,%esp 10c3fe: 39 f0 cmp %esi,%eax 10c400: 8a 55 e0 mov -0x20(%ebp),%dl 10c403: 72 04 jb 10c409 <_Thread_Initialize+0x61> 10c405: 85 c0 test %eax,%eax 10c407: 75 07 jne 10c410 <_Thread_Initialize+0x68><== ALWAYS TAKEN 10c409: 31 c0 xor %eax,%eax 10c40b: e9 d9 01 00 00 jmp 10c5e9 <_Thread_Initialize+0x241> return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10c410: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10c416: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10c41d: eb 09 jmp 10c428 <_Thread_Initialize+0x80> } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 10c41f: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10c426: 89 f0 mov %esi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10c428: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10c42e: 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 ) { 10c434: 31 ff xor %edi,%edi 10c436: 84 d2 test %dl,%dl 10c438: 74 19 je 10c453 <_Thread_Initialize+0xab> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10c43a: 83 ec 0c sub $0xc,%esp 10c43d: 6a 6c push $0x6c 10c43f: e8 b0 0e 00 00 call 10d2f4 <_Workspace_Allocate> 10c444: 89 c7 mov %eax,%edi if ( !fp_area ) 10c446: 83 c4 10 add $0x10,%esp 10c449: 31 f6 xor %esi,%esi 10c44b: 85 c0 test %eax,%eax 10c44d: 0f 84 10 01 00 00 je 10c563 <_Thread_Initialize+0x1bb> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10c453: 89 bb ec 00 00 00 mov %edi,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10c459: 89 bb cc 00 00 00 mov %edi,0xcc(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c45f: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10c466: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10c46d: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10c474: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10c47b: a1 a4 62 12 00 mov 0x1262a4,%eax 10c480: 31 f6 xor %esi,%esi 10c482: 85 c0 test %eax,%eax 10c484: 74 1d je 10c4a3 <_Thread_Initialize+0xfb> extensions_area = _Workspace_Allocate( 10c486: 83 ec 0c sub $0xc,%esp 10c489: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10c490: 50 push %eax 10c491: e8 5e 0e 00 00 call 10d2f4 <_Workspace_Allocate> 10c496: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10c498: 83 c4 10 add $0x10,%esp 10c49b: 85 c0 test %eax,%eax 10c49d: 0f 84 c0 00 00 00 je 10c563 <_Thread_Initialize+0x1bb> goto failed; } the_thread->extensions = (void **) extensions_area; 10c4a3: 89 b3 00 01 00 00 mov %esi,0x100(%ebx) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 10c4a9: 85 f6 test %esi,%esi 10c4ab: 74 1c je 10c4c9 <_Thread_Initialize+0x121> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10c4ad: 8b 0d a4 62 12 00 mov 0x1262a4,%ecx 10c4b3: 31 c0 xor %eax,%eax 10c4b5: eb 0e jmp 10c4c5 <_Thread_Initialize+0x11d> the_thread->extensions[i] = NULL; 10c4b7: 8b 93 00 01 00 00 mov 0x100(%ebx),%edx 10c4bd: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10c4c4: 40 inc %eax 10c4c5: 39 c8 cmp %ecx,%eax 10c4c7: 76 ee jbe 10c4b7 <_Thread_Initialize+0x10f> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10c4c9: 8a 45 e7 mov -0x19(%ebp),%al 10c4cc: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10c4d2: 8b 45 24 mov 0x24(%ebp),%eax 10c4d5: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10c4db: 8b 45 28 mov 0x28(%ebp),%eax 10c4de: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10c4e4: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10c4e8: 75 08 jne 10c4f2 <_Thread_Initialize+0x14a> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c4ea: a1 d4 61 12 00 mov 0x1261d4,%eax 10c4ef: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10c4f2: 8b 45 2c mov 0x2c(%ebp),%eax 10c4f5: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10c4fb: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10c502: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10c509: 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; 10c510: 8b 45 1c mov 0x1c(%ebp),%eax 10c513: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10c516: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10c51c: 52 push %edx 10c51d: 52 push %edx 10c51e: 50 push %eax 10c51f: 53 push %ebx 10c520: e8 87 05 00 00 call 10caac <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10c525: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10c52c: 00 00 00 10c52f: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10c536: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c539: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c53d: 8b 45 08 mov 0x8(%ebp),%eax 10c540: 8b 40 1c mov 0x1c(%eax),%eax 10c543: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c546: 8b 45 30 mov 0x30(%ebp),%eax 10c549: 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 ); 10c54c: 89 1c 24 mov %ebx,(%esp) 10c54f: e8 b0 0a 00 00 call 10d004 <_User_extensions_Thread_create> 10c554: 88 c2 mov %al,%dl if ( extension_status ) 10c556: 83 c4 10 add $0x10,%esp 10c559: b0 01 mov $0x1,%al 10c55b: 84 d2 test %dl,%dl 10c55d: 0f 85 86 00 00 00 jne 10c5e9 <_Thread_Initialize+0x241> return true; failed: if ( the_thread->libc_reent ) 10c563: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10c569: 85 c0 test %eax,%eax 10c56b: 74 0c je 10c579 <_Thread_Initialize+0x1d1> _Workspace_Free( the_thread->libc_reent ); 10c56d: 83 ec 0c sub $0xc,%esp 10c570: 50 push %eax 10c571: e8 97 0d 00 00 call 10d30d <_Workspace_Free> 10c576: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10c579: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10c57f: 85 c0 test %eax,%eax 10c581: 74 0c je 10c58f <_Thread_Initialize+0x1e7> _Workspace_Free( the_thread->API_Extensions[i] ); 10c583: 83 ec 0c sub $0xc,%esp 10c586: 50 push %eax 10c587: e8 81 0d 00 00 call 10d30d <_Workspace_Free> 10c58c: 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] ) 10c58f: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10c595: 85 c0 test %eax,%eax 10c597: 74 0c je 10c5a5 <_Thread_Initialize+0x1fd> _Workspace_Free( the_thread->API_Extensions[i] ); 10c599: 83 ec 0c sub $0xc,%esp 10c59c: 50 push %eax 10c59d: e8 6b 0d 00 00 call 10d30d <_Workspace_Free> 10c5a2: 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] ) 10c5a5: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10c5ab: 85 c0 test %eax,%eax 10c5ad: 74 0c je 10c5bb <_Thread_Initialize+0x213><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10c5af: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c5b2: 50 push %eax <== NOT EXECUTED 10c5b3: e8 55 0d 00 00 call 10d30d <_Workspace_Free> <== NOT EXECUTED 10c5b8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10c5bb: 85 f6 test %esi,%esi 10c5bd: 74 0c je 10c5cb <_Thread_Initialize+0x223> (void) _Workspace_Free( extensions_area ); 10c5bf: 83 ec 0c sub $0xc,%esp 10c5c2: 56 push %esi 10c5c3: e8 45 0d 00 00 call 10d30d <_Workspace_Free> 10c5c8: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10c5cb: 85 ff test %edi,%edi 10c5cd: 74 0c je 10c5db <_Thread_Initialize+0x233> (void) _Workspace_Free( fp_area ); 10c5cf: 83 ec 0c sub $0xc,%esp 10c5d2: 57 push %edi 10c5d3: e8 35 0d 00 00 call 10d30d <_Workspace_Free> 10c5d8: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10c5db: 83 ec 0c sub $0xc,%esp 10c5de: 53 push %ebx 10c5df: e8 c0 06 00 00 call 10cca4 <_Thread_Stack_Free> 10c5e4: 31 c0 xor %eax,%eax return false; 10c5e6: 83 c4 10 add $0x10,%esp } 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 =============================================================================== 0010f8bc <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f8bc: 55 push %ebp 10f8bd: 89 e5 mov %esp,%ebp 10f8bf: 53 push %ebx 10f8c0: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f8c3: 9c pushf 10f8c4: fa cli 10f8c5: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 10f8c6: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f8c9: f6 c2 02 test $0x2,%dl 10f8cc: 74 70 je 10f93e <_Thread_Resume+0x82> <== NEVER TAKEN 10f8ce: 83 e2 fd and $0xfffffffd,%edx current_state = 10f8d1: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10f8d4: 85 d2 test %edx,%edx 10f8d6: 75 66 jne 10f93e <_Thread_Resume+0x82> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10f8d8: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f8de: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10f8e5: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10f8e8: 66 8b 15 88 93 12 00 mov 0x129388,%dx 10f8ef: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10f8f5: 66 89 15 88 93 12 00 mov %dx,0x129388 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10f8fc: 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); 10f902: 8d 5a 04 lea 0x4(%edx),%ebx 10f905: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10f907: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f90a: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f90d: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f90f: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10f912: 51 push %ecx 10f913: 9d popf 10f914: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10f915: 8b 50 14 mov 0x14(%eax),%edx 10f918: 8b 1d 64 93 12 00 mov 0x129364,%ebx 10f91e: 3b 53 14 cmp 0x14(%ebx),%edx 10f921: 73 1b jae 10f93e <_Thread_Resume+0x82> _Thread_Heir = the_thread; 10f923: a3 64 93 12 00 mov %eax,0x129364 if ( _Thread_Executing->is_preemptible || 10f928: a1 94 93 12 00 mov 0x129394,%eax 10f92d: 80 78 75 00 cmpb $0x0,0x75(%eax) 10f931: 75 04 jne 10f937 <_Thread_Resume+0x7b> 10f933: 85 d2 test %edx,%edx 10f935: 75 07 jne 10f93e <_Thread_Resume+0x82> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10f937: c6 05 a4 93 12 00 01 movb $0x1,0x1293a4 } } } _ISR_Enable( level ); 10f93e: 51 push %ecx 10f93f: 9d popf } 10f940: 5b pop %ebx 10f941: c9 leave 10f942: c3 ret =============================================================================== 0010cca4 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10cca4: 55 push %ebp 10cca5: 89 e5 mov %esp,%ebp 10cca7: 83 ec 08 sub $0x8,%esp 10ccaa: 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 ) 10ccad: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax) 10ccb4: 74 1f je 10ccd5 <_Thread_Stack_Free+0x31><== 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 ) 10ccb6: 8b 15 1c 22 12 00 mov 0x12221c,%edx 10ccbc: 85 d2 test %edx,%edx 10ccbe: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10ccc4: 74 06 je 10cccc <_Thread_Stack_Free+0x28> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10ccc6: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10ccc9: 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 ); 10ccca: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10cccc: 89 45 08 mov %eax,0x8(%ebp) } 10cccf: 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 ); 10ccd0: e9 38 06 00 00 jmp 10d30d <_Workspace_Free> } 10ccd5: c9 leave <== NOT EXECUTED 10ccd6: c3 ret <== NOT EXECUTED =============================================================================== 0010cd8c <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10cd8c: 55 push %ebp 10cd8d: 89 e5 mov %esp,%ebp 10cd8f: 53 push %ebx 10cd90: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10cd93: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10cd99: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10cd9d: 74 4c je 10cdeb <_Thread_Tickle_timeslice+0x5f> return; if ( !_States_Is_ready( executing->current_state ) ) 10cd9f: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10cda3: 75 46 jne 10cdeb <_Thread_Tickle_timeslice+0x5f> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10cda5: 8b 43 7c mov 0x7c(%ebx),%eax 10cda8: 83 f8 01 cmp $0x1,%eax 10cdab: 72 3e jb 10cdeb <_Thread_Tickle_timeslice+0x5f> 10cdad: 83 f8 02 cmp $0x2,%eax 10cdb0: 76 07 jbe 10cdb9 <_Thread_Tickle_timeslice+0x2d> 10cdb2: 83 f8 03 cmp $0x3,%eax 10cdb5: 75 34 jne 10cdeb <_Thread_Tickle_timeslice+0x5f><== NEVER TAKEN 10cdb7: eb 1a jmp 10cdd3 <_Thread_Tickle_timeslice+0x47> case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 10cdb9: 8b 43 78 mov 0x78(%ebx),%eax 10cdbc: 48 dec %eax 10cdbd: 89 43 78 mov %eax,0x78(%ebx) 10cdc0: 85 c0 test %eax,%eax 10cdc2: 7f 27 jg 10cdeb <_Thread_Tickle_timeslice+0x5f> _Thread_Reset_timeslice(); 10cdc4: e8 03 3a 00 00 call 1107cc <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10cdc9: a1 d4 61 12 00 mov 0x1261d4,%eax 10cdce: 89 43 78 mov %eax,0x78(%ebx) 10cdd1: eb 18 jmp 10cdeb <_Thread_Tickle_timeslice+0x5f> } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10cdd3: 8b 43 78 mov 0x78(%ebx),%eax 10cdd6: 48 dec %eax 10cdd7: 89 43 78 mov %eax,0x78(%ebx) 10cdda: 85 c0 test %eax,%eax 10cddc: 75 0d jne 10cdeb <_Thread_Tickle_timeslice+0x5f> (*executing->budget_callout)( executing ); 10cdde: 83 ec 0c sub $0xc,%esp 10cde1: 53 push %ebx 10cde2: ff 93 80 00 00 00 call *0x80(%ebx) 10cde8: 83 c4 10 add $0x10,%esp break; #endif } } 10cdeb: 8b 5d fc mov -0x4(%ebp),%ebx 10cdee: c9 leave 10cdef: c3 ret =============================================================================== 0010cdf0 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10cdf0: 55 push %ebp 10cdf1: 89 e5 mov %esp,%ebp 10cdf3: 56 push %esi 10cdf4: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10cdf5: a1 c4 62 12 00 mov 0x1262c4,%eax ready = executing->ready; 10cdfa: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10ce00: 9c pushf 10ce01: fa cli 10ce02: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10ce03: 8b 1a mov (%edx),%ebx 10ce05: 3b 5a 08 cmp 0x8(%edx),%ebx 10ce08: 74 2e je 10ce38 <_Thread_Yield_processor+0x48> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10ce0a: 8b 30 mov (%eax),%esi previous = the_node->previous; 10ce0c: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10ce0f: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10ce12: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10ce14: 8d 5a 04 lea 0x4(%edx),%ebx 10ce17: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10ce19: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10ce1c: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10ce1f: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10ce21: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10ce24: 51 push %ecx 10ce25: 9d popf 10ce26: fa cli if ( _Thread_Is_heir( executing ) ) 10ce27: 3b 05 94 62 12 00 cmp 0x126294,%eax 10ce2d: 75 11 jne 10ce40 <_Thread_Yield_processor+0x50><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10ce2f: 8b 02 mov (%edx),%eax 10ce31: a3 94 62 12 00 mov %eax,0x126294 10ce36: eb 08 jmp 10ce40 <_Thread_Yield_processor+0x50> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10ce38: 3b 05 94 62 12 00 cmp 0x126294,%eax 10ce3e: 74 07 je 10ce47 <_Thread_Yield_processor+0x57><== ALWAYS TAKEN _Context_Switch_necessary = true; 10ce40: c6 05 d4 62 12 00 01 movb $0x1,0x1262d4 _ISR_Enable( level ); 10ce47: 51 push %ecx 10ce48: 9d popf } 10ce49: 5b pop %ebx 10ce4a: 5e pop %esi 10ce4b: c9 leave 10ce4c: c3 ret =============================================================================== 0010c854 <_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 ) { 10c854: 55 push %ebp 10c855: 89 e5 mov %esp,%ebp 10c857: 57 push %edi 10c858: 56 push %esi 10c859: 53 push %ebx 10c85a: 83 ec 10 sub $0x10,%esp 10c85d: 8b 4d 08 mov 0x8(%ebp),%ecx 10c860: 8b 45 0c mov 0xc(%ebp),%eax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c863: 8d 50 3c lea 0x3c(%eax),%edx 10c866: 89 50 38 mov %edx,0x38(%eax) the_chain->permanent_null = NULL; 10c869: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) the_chain->last = _Chain_Head(the_chain); 10c870: 8d 50 38 lea 0x38(%eax),%edx 10c873: 89 50 40 mov %edx,0x40(%eax) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10c876: 8b 58 14 mov 0x14(%eax),%ebx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10c879: 89 de mov %ebx,%esi 10c87b: c1 ee 06 shr $0x6,%esi 10c87e: 6b f6 0c imul $0xc,%esi,%esi 10c881: 8d 34 31 lea (%ecx,%esi,1),%esi block_state = the_thread_queue->state; 10c884: 8b 79 38 mov 0x38(%ecx),%edi if ( _Thread_queue_Is_reverse_search( priority ) ) 10c887: f6 c3 20 test $0x20,%bl 10c88a: 75 65 jne 10c8f1 <_Thread_queue_Enqueue_priority+0x9d> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c88c: 8d 56 04 lea 0x4(%esi),%edx 10c88f: 89 55 e8 mov %edx,-0x18(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10c892: 9c pushf 10c893: fa cli 10c894: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->first; 10c897: 8b 16 mov (%esi),%edx 10c899: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) 10c8a0: 89 75 e4 mov %esi,-0x1c(%ebp) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c8a3: eb 1f jmp 10c8c4 <_Thread_queue_Enqueue_priority+0x70> search_priority = search_thread->current_priority; 10c8a5: 8b 72 14 mov 0x14(%edx),%esi 10c8a8: 89 75 ec mov %esi,-0x14(%ebp) if ( priority <= search_priority ) 10c8ab: 39 f3 cmp %esi,%ebx 10c8ad: 76 1a jbe 10c8c9 <_Thread_queue_Enqueue_priority+0x75> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10c8af: ff 75 f0 pushl -0x10(%ebp) 10c8b2: 9d popf 10c8b3: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c8b4: 85 7a 10 test %edi,0x10(%edx) 10c8b7: 75 09 jne 10c8c2 <_Thread_queue_Enqueue_priority+0x6e><== ALWAYS TAKEN 10c8b9: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED _ISR_Enable( level ); 10c8bc: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10c8bf: 9d popf <== NOT EXECUTED goto restart_forward_search; 10c8c0: eb d0 jmp 10c892 <_Thread_queue_Enqueue_priority+0x3e><== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10c8c2: 8b 12 mov (%edx),%edx restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c8c4: 3b 55 e8 cmp -0x18(%ebp),%edx 10c8c7: 75 dc jne 10c8a5 <_Thread_queue_Enqueue_priority+0x51> 10c8c9: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10c8cc: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c8d0: 0f 85 9e 00 00 00 jne 10c974 <_Thread_queue_Enqueue_priority+0x120><== NEVER TAKEN THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c8d6: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c8dd: 3b 5d ec cmp -0x14(%ebp),%ebx 10c8e0: 74 7b je 10c95d <_Thread_queue_Enqueue_priority+0x109> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10c8e2: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c8e5: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c8e7: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c8ea: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c8ec: 89 42 04 mov %eax,0x4(%edx) 10c8ef: eb 5e jmp 10c94f <_Thread_queue_Enqueue_priority+0xfb> the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10c8f1: 0f b6 15 f4 21 12 00 movzbl 0x1221f4,%edx 10c8f8: 42 inc %edx 10c8f9: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 10c8fc: 9c pushf 10c8fd: fa cli 10c8fe: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->last; 10c901: 8b 56 08 mov 0x8(%esi),%edx 10c904: 89 75 e8 mov %esi,-0x18(%ebp) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c907: eb 20 jmp 10c929 <_Thread_queue_Enqueue_priority+0xd5> search_priority = search_thread->current_priority; 10c909: 8b 72 14 mov 0x14(%edx),%esi 10c90c: 89 75 ec mov %esi,-0x14(%ebp) if ( priority >= search_priority ) 10c90f: 39 f3 cmp %esi,%ebx 10c911: 73 1b jae 10c92e <_Thread_queue_Enqueue_priority+0xda> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10c913: ff 75 f0 pushl -0x10(%ebp) 10c916: 9d popf 10c917: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c918: 85 7a 10 test %edi,0x10(%edx) 10c91b: 75 09 jne 10c926 <_Thread_queue_Enqueue_priority+0xd2> 10c91d: 8b 75 e8 mov -0x18(%ebp),%esi _ISR_Enable( level ); 10c920: ff 75 f0 pushl -0x10(%ebp) 10c923: 9d popf goto restart_reverse_search; 10c924: eb cb jmp 10c8f1 <_Thread_queue_Enqueue_priority+0x9d> } search_thread = (Thread_Control *) 10c926: 8b 52 04 mov 0x4(%edx),%edx restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c929: 3b 55 e8 cmp -0x18(%ebp),%edx 10c92c: 75 db jne 10c909 <_Thread_queue_Enqueue_priority+0xb5> 10c92e: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10c931: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c935: 75 3d jne 10c974 <_Thread_queue_Enqueue_priority+0x120> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c937: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c93e: 3b 5d ec cmp -0x14(%ebp),%ebx 10c941: 74 1a je 10c95d <_Thread_queue_Enqueue_priority+0x109> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10c943: 8b 1a mov (%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10c945: 89 18 mov %ebx,(%eax) the_node->previous = search_node; 10c947: 89 50 04 mov %edx,0x4(%eax) search_node->next = the_node; 10c94a: 89 02 mov %eax,(%edx) next_node->previous = the_node; 10c94c: 89 43 04 mov %eax,0x4(%ebx) the_thread->Wait.queue = the_thread_queue; 10c94f: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c952: ff 75 f0 pushl -0x10(%ebp) 10c955: 9d popf 10c956: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c95b: eb 1f jmp 10c97c <_Thread_queue_Enqueue_priority+0x128> 10c95d: 83 c2 3c add $0x3c,%edx equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10c960: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c963: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c965: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c968: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c96a: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c96d: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c970: 56 push %esi 10c971: 9d popf 10c972: eb e2 jmp 10c956 <_Thread_queue_Enqueue_priority+0x102> * 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; 10c974: 8b 45 10 mov 0x10(%ebp),%eax 10c977: 89 30 mov %esi,(%eax) return the_thread_queue->sync_state; 10c979: 8b 41 30 mov 0x30(%ecx),%eax } 10c97c: 83 c4 10 add $0x10,%esp 10c97f: 5b pop %ebx 10c980: 5e pop %esi 10c981: 5f pop %edi 10c982: c9 leave 10c983: c3 ret =============================================================================== 0010ca24 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10ca24: 55 push %ebp 10ca25: 89 e5 mov %esp,%ebp 10ca27: 57 push %edi 10ca28: 56 push %esi 10ca29: 53 push %ebx 10ca2a: 83 ec 1c sub $0x1c,%esp 10ca2d: 8b 75 08 mov 0x8(%ebp),%esi 10ca30: 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 ) 10ca33: 85 f6 test %esi,%esi 10ca35: 74 36 je 10ca6d <_Thread_queue_Requeue+0x49><== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10ca37: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10ca3b: 75 30 jne 10ca6d <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10ca3d: 9c pushf 10ca3e: fa cli 10ca3f: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10ca40: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10ca47: 74 22 je 10ca6b <_Thread_queue_Requeue+0x47><== NEVER TAKEN 10ca49: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10ca50: 50 push %eax 10ca51: 6a 01 push $0x1 10ca53: 57 push %edi 10ca54: 56 push %esi 10ca55: e8 da 3b 00 00 call 110634 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10ca5a: 83 c4 0c add $0xc,%esp 10ca5d: 8d 45 e4 lea -0x1c(%ebp),%eax 10ca60: 50 push %eax 10ca61: 57 push %edi 10ca62: 56 push %esi 10ca63: e8 ec fd ff ff call 10c854 <_Thread_queue_Enqueue_priority> 10ca68: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10ca6b: 53 push %ebx 10ca6c: 9d popf } } 10ca6d: 8d 65 f4 lea -0xc(%ebp),%esp 10ca70: 5b pop %ebx 10ca71: 5e pop %esi 10ca72: 5f pop %edi 10ca73: c9 leave 10ca74: c3 ret =============================================================================== 0010ca78 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10ca78: 55 push %ebp 10ca79: 89 e5 mov %esp,%ebp 10ca7b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ca7e: 8d 45 f4 lea -0xc(%ebp),%eax 10ca81: 50 push %eax 10ca82: ff 75 08 pushl 0x8(%ebp) 10ca85: e8 aa f8 ff ff call 10c334 <_Thread_Get> switch ( location ) { 10ca8a: 83 c4 10 add $0x10,%esp 10ca8d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ca91: 75 17 jne 10caaa <_Thread_queue_Timeout+0x32><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10ca93: 83 ec 0c sub $0xc,%esp 10ca96: 50 push %eax 10ca97: e8 44 3c 00 00 call 1106e0 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10ca9c: a1 08 62 12 00 mov 0x126208,%eax 10caa1: 48 dec %eax 10caa2: a3 08 62 12 00 mov %eax,0x126208 10caa7: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10caaa: c9 leave 10caab: c3 ret =============================================================================== 00100238 <_Timer_Manager_initialization>: #include #include void _Timer_Manager_initialization(void) { 100238: 55 push %ebp 100239: 89 e5 mov %esp,%ebp } 10023b: c9 leave 10023c: c3 ret =============================================================================== 0011721c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 11721c: 55 push %ebp 11721d: 89 e5 mov %esp,%ebp 11721f: 57 push %edi 117220: 56 push %esi 117221: 53 push %ebx 117222: 83 ec 4c sub $0x4c,%esp 117225: 8b 5d 08 mov 0x8(%ebp),%ebx 117228: 8d 45 dc lea -0x24(%ebp),%eax 11722b: 8d 55 e0 lea -0x20(%ebp),%edx 11722e: 89 55 b4 mov %edx,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 117231: 89 55 dc mov %edx,-0x24(%ebp) the_chain->permanent_null = NULL; 117234: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 11723b: 89 45 e4 mov %eax,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11723e: 8d 75 d0 lea -0x30(%ebp),%esi 117241: 8d 55 d4 lea -0x2c(%ebp),%edx 117244: 89 55 b0 mov %edx,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 117247: 89 55 d0 mov %edx,-0x30(%ebp) the_chain->permanent_null = NULL; 11724a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 117251: 89 75 d8 mov %esi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 117254: 8d 53 30 lea 0x30(%ebx),%edx 117257: 89 55 c0 mov %edx,-0x40(%ebp) /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11725a: 8d 7b 68 lea 0x68(%ebx),%edi static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 11725d: 8d 4b 08 lea 0x8(%ebx),%ecx 117260: 89 4d b8 mov %ecx,-0x48(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 117263: 8d 53 40 lea 0x40(%ebx),%edx 117266: 89 55 bc mov %edx,-0x44(%ebp) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 117269: 8d 4d dc lea -0x24(%ebp),%ecx 11726c: 89 4b 78 mov %ecx,0x78(%ebx) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 11726f: a1 28 f7 13 00 mov 0x13f728,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 117274: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 117277: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11727a: 51 push %ecx 11727b: 8d 4d d0 lea -0x30(%ebp),%ecx 11727e: 51 push %ecx 11727f: 29 d0 sub %edx,%eax 117281: 50 push %eax 117282: ff 75 c0 pushl -0x40(%ebp) 117285: e8 d6 36 00 00 call 11a960 <_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(); 11728a: a1 6c f6 13 00 mov 0x13f66c,%eax 11728f: 89 45 c4 mov %eax,-0x3c(%ebp) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 117292: 8b 43 74 mov 0x74(%ebx),%eax /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 117295: 83 c4 10 add $0x10,%esp 117298: 39 45 c4 cmp %eax,-0x3c(%ebp) 11729b: 76 13 jbe 1172b0 <_Timer_server_Body+0x94> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11729d: 52 push %edx 11729e: 8d 55 d0 lea -0x30(%ebp),%edx 1172a1: 52 push %edx 1172a2: 8b 4d c4 mov -0x3c(%ebp),%ecx 1172a5: 29 c1 sub %eax,%ecx 1172a7: 51 push %ecx 1172a8: 57 push %edi 1172a9: e8 b2 36 00 00 call 11a960 <_Watchdog_Adjust_to_chain> 1172ae: eb 0f jmp 1172bf <_Timer_server_Body+0xa3> } else if ( snapshot < last_snapshot ) { 1172b0: 73 10 jae 1172c2 <_Timer_server_Body+0xa6> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 1172b2: 51 push %ecx 1172b3: 2b 45 c4 sub -0x3c(%ebp),%eax 1172b6: 50 push %eax 1172b7: 6a 01 push $0x1 1172b9: 57 push %edi 1172ba: e8 35 36 00 00 call 11a8f4 <_Watchdog_Adjust> 1172bf: 83 c4 10 add $0x10,%esp } watchdogs->last_snapshot = snapshot; 1172c2: 8b 45 c4 mov -0x3c(%ebp),%eax 1172c5: 89 43 74 mov %eax,0x74(%ebx) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 1172c8: 8b 43 78 mov 0x78(%ebx),%eax 1172cb: 83 ec 0c sub $0xc,%esp 1172ce: 50 push %eax 1172cf: e8 2c 07 00 00 call 117a00 <_Chain_Get> if ( timer == NULL ) { 1172d4: 83 c4 10 add $0x10,%esp 1172d7: 85 c0 test %eax,%eax 1172d9: 74 29 je 117304 <_Timer_server_Body+0xe8><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1172db: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 1172de: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 1172e1: 75 0b jne 1172ee <_Timer_server_Body+0xd2><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 1172e3: 52 push %edx <== NOT EXECUTED 1172e4: 52 push %edx <== NOT EXECUTED 1172e5: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1172e8: 50 push %eax <== NOT EXECUTED 1172e9: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED 1172ec: eb 0c jmp 1172fa <_Timer_server_Body+0xde><== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 1172ee: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 1172f1: 75 d5 jne 1172c8 <_Timer_server_Body+0xac><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1172f3: 51 push %ecx <== NOT EXECUTED 1172f4: 51 push %ecx <== NOT EXECUTED 1172f5: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1172f8: 50 push %eax <== NOT EXECUTED 1172f9: 57 push %edi <== NOT EXECUTED 1172fa: e8 e9 36 00 00 call 11a9e8 <_Watchdog_Insert> <== NOT EXECUTED 1172ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 117302: eb c4 jmp 1172c8 <_Timer_server_Body+0xac><== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 117304: 9c pushf 117305: fa cli 117306: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 117307: 8b 55 b4 mov -0x4c(%ebp),%edx 11730a: 39 55 dc cmp %edx,-0x24(%ebp) 11730d: 75 13 jne 117322 <_Timer_server_Body+0x106><== NEVER TAKEN ts->insert_chain = NULL; 11730f: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 117316: 50 push %eax 117317: 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 ) ) { 117318: 8b 4d b0 mov -0x50(%ebp),%ecx 11731b: 39 4d d0 cmp %ecx,-0x30(%ebp) 11731e: 75 09 jne 117329 <_Timer_server_Body+0x10d> 117320: eb 3e jmp 117360 <_Timer_server_Body+0x144> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 117322: 50 push %eax <== NOT EXECUTED 117323: 9d popf <== NOT EXECUTED 117324: e9 46 ff ff ff jmp 11726f <_Timer_server_Body+0x53><== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 117329: 9c pushf 11732a: fa cli 11732b: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11732c: 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)) 11732f: 3b 45 b0 cmp -0x50(%ebp),%eax 117332: 74 25 je 117359 <_Timer_server_Body+0x13d> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 117334: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 117336: 89 4d d0 mov %ecx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 117339: 89 71 04 mov %esi,0x4(%ecx) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 11733c: 85 c0 test %eax,%eax 11733e: 74 19 je 117359 <_Timer_server_Body+0x13d><== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 117340: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 117347: 52 push %edx 117348: 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 ); 117349: 52 push %edx 11734a: 52 push %edx 11734b: ff 70 24 pushl 0x24(%eax) 11734e: ff 70 20 pushl 0x20(%eax) 117351: ff 50 1c call *0x1c(%eax) } 117354: 83 c4 10 add $0x10,%esp 117357: eb d0 jmp 117329 <_Timer_server_Body+0x10d> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 117359: 52 push %edx 11735a: 9d popf 11735b: e9 09 ff ff ff jmp 117269 <_Timer_server_Body+0x4d> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 117360: c6 43 7c 00 movb $0x0,0x7c(%ebx) 117364: a1 dc f5 13 00 mov 0x13f5dc,%eax 117369: 40 inc %eax 11736a: a3 dc f5 13 00 mov %eax,0x13f5dc /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 11736f: 50 push %eax 117370: 50 push %eax 117371: 6a 08 push $0x8 117373: ff 33 pushl (%ebx) 117375: e8 5a 2e 00 00 call 11a1d4 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 11737a: 89 d8 mov %ebx,%eax 11737c: e8 0f fe ff ff call 117190 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 117381: 89 d8 mov %ebx,%eax 117383: e8 4e fe ff ff call 1171d6 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 117388: e8 0c 25 00 00 call 119899 <_Thread_Enable_dispatch> ts->active = true; 11738d: 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 ); 117391: 59 pop %ecx 117392: ff 75 b8 pushl -0x48(%ebp) 117395: e8 62 37 00 00 call 11aafc <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 11739a: 5a pop %edx 11739b: ff 75 bc pushl -0x44(%ebp) 11739e: e8 59 37 00 00 call 11aafc <_Watchdog_Remove> 1173a3: 83 c4 10 add $0x10,%esp 1173a6: e9 be fe ff ff jmp 117269 <_Timer_server_Body+0x4d> =============================================================================== 001173ab <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1173ab: 55 push %ebp 1173ac: 89 e5 mov %esp,%ebp 1173ae: 57 push %edi 1173af: 56 push %esi 1173b0: 53 push %ebx 1173b1: 83 ec 2c sub $0x2c,%esp 1173b4: 8b 5d 08 mov 0x8(%ebp),%ebx 1173b7: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 1173ba: 8b 53 78 mov 0x78(%ebx),%edx 1173bd: 85 d2 test %edx,%edx 1173bf: 0f 85 e6 00 00 00 jne 1174ab <_Timer_server_Schedule_operation_method+0x100><== NEVER TAKEN 1173c5: 8b 15 dc f5 13 00 mov 0x13f5dc,%edx 1173cb: 42 inc %edx 1173cc: 89 15 dc f5 13 00 mov %edx,0x13f5dc * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1173d2: 8b 50 38 mov 0x38(%eax),%edx 1173d5: 83 fa 01 cmp $0x1,%edx 1173d8: 75 5a jne 117434 <_Timer_server_Schedule_operation_method+0x89> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 1173da: 9c pushf 1173db: fa cli 1173dc: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 1173df: 8b 0d 28 f7 13 00 mov 0x13f728,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 1173e5: 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)); 1173e8: 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; 1173eb: 8d 7b 34 lea 0x34(%ebx),%edi 1173ee: 39 fa cmp %edi,%edx 1173f0: 74 19 je 11740b <_Timer_server_Schedule_operation_method+0x60> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 1173f2: 89 cf mov %ecx,%edi 1173f4: 29 f7 sub %esi,%edi 1173f6: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 1173f9: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 1173fc: 31 f6 xor %esi,%esi 1173fe: 3b 7d e4 cmp -0x1c(%ebp),%edi 117401: 76 05 jbe 117408 <_Timer_server_Schedule_operation_method+0x5d> delta_interval -= delta; 117403: 89 fe mov %edi,%esi 117405: 2b 75 e4 sub -0x1c(%ebp),%esi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 117408: 89 72 10 mov %esi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 11740b: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 11740e: ff 75 e0 pushl -0x20(%ebp) 117411: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 117412: 57 push %edi 117413: 57 push %edi 117414: 83 c0 10 add $0x10,%eax 117417: 50 push %eax 117418: 8d 43 30 lea 0x30(%ebx),%eax 11741b: 50 push %eax 11741c: e8 c7 35 00 00 call 11a9e8 <_Watchdog_Insert> if ( !ts->active ) { 117421: 8a 43 7c mov 0x7c(%ebx),%al 117424: 83 c4 10 add $0x10,%esp 117427: 84 c0 test %al,%al 117429: 75 74 jne 11749f <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_interval_system_watchdog( ts ); 11742b: 89 d8 mov %ebx,%eax 11742d: e8 5e fd ff ff call 117190 <_Timer_server_Reset_interval_system_watchdog> 117432: eb 6b jmp 11749f <_Timer_server_Schedule_operation_method+0xf4> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 117434: 83 fa 03 cmp $0x3,%edx 117437: 75 66 jne 11749f <_Timer_server_Schedule_operation_method+0xf4> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 117439: 9c pushf 11743a: fa cli 11743b: 8f 45 e0 popl -0x20(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 11743e: 8b 0d 6c f6 13 00 mov 0x13f66c,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 117444: 8b 53 74 mov 0x74(%ebx),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 117447: 8b 73 68 mov 0x68(%ebx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11744a: 8d 7b 6c lea 0x6c(%ebx),%edi 11744d: 39 fe cmp %edi,%esi 11744f: 74 27 je 117478 <_Timer_server_Schedule_operation_method+0xcd> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 117451: 8b 7e 10 mov 0x10(%esi),%edi 117454: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 117457: 39 d1 cmp %edx,%ecx 117459: 76 15 jbe 117470 <_Timer_server_Schedule_operation_method+0xc5> /* * We advanced in time. */ delta = snapshot - last_snapshot; 11745b: 89 cf mov %ecx,%edi 11745d: 29 d7 sub %edx,%edi 11745f: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { 117462: 31 d2 xor %edx,%edx 117464: 39 7d d4 cmp %edi,-0x2c(%ebp) 117467: 76 0c jbe 117475 <_Timer_server_Schedule_operation_method+0xca><== NEVER TAKEN delta_interval -= delta; 117469: 8b 55 d4 mov -0x2c(%ebp),%edx 11746c: 29 fa sub %edi,%edx 11746e: eb 05 jmp 117475 <_Timer_server_Schedule_operation_method+0xca> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 117470: 03 55 d4 add -0x2c(%ebp),%edx delta_interval += delta; 117473: 29 ca sub %ecx,%edx } first_watchdog->delta_interval = delta_interval; 117475: 89 56 10 mov %edx,0x10(%esi) } ts->TOD_watchdogs.last_snapshot = snapshot; 117478: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 11747b: ff 75 e0 pushl -0x20(%ebp) 11747e: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 11747f: 56 push %esi 117480: 56 push %esi 117481: 83 c0 10 add $0x10,%eax 117484: 50 push %eax 117485: 8d 43 68 lea 0x68(%ebx),%eax 117488: 50 push %eax 117489: e8 5a 35 00 00 call 11a9e8 <_Watchdog_Insert> if ( !ts->active ) { 11748e: 8a 43 7c mov 0x7c(%ebx),%al 117491: 83 c4 10 add $0x10,%esp 117494: 84 c0 test %al,%al 117496: 75 07 jne 11749f <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_tod_system_watchdog( ts ); 117498: 89 d8 mov %ebx,%eax 11749a: e8 37 fd ff ff call 1171d6 <_Timer_server_Reset_tod_system_watchdog> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 11749f: 8d 65 f4 lea -0xc(%ebp),%esp 1174a2: 5b pop %ebx 1174a3: 5e pop %esi 1174a4: 5f pop %edi 1174a5: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1174a6: e9 ee 23 00 00 jmp 119899 <_Thread_Enable_dispatch> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 1174ab: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 1174ae: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1174b1: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1174b4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1174b7: 5b pop %ebx <== NOT EXECUTED 1174b8: 5e pop %esi <== NOT EXECUTED 1174b9: 5f pop %edi <== NOT EXECUTED 1174ba: c9 leave <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 1174bb: e9 04 05 00 00 jmp 1179c4 <_Chain_Append> <== NOT EXECUTED =============================================================================== 0010e918 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e918: 55 push %ebp 10e919: 89 e5 mov %esp,%ebp 10e91b: 57 push %edi 10e91c: 56 push %esi 10e91d: 53 push %ebx 10e91e: 83 ec 1c sub $0x1c,%esp 10e921: 8b 75 08 mov 0x8(%ebp),%esi 10e924: 8b 7d 0c mov 0xc(%ebp),%edi 10e927: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e92a: 9c pushf 10e92b: fa cli 10e92c: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e92d: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e92f: 8d 4e 04 lea 0x4(%esi),%ecx * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10e932: 39 ca cmp %ecx,%edx 10e934: 74 44 je 10e97a <_Watchdog_Adjust+0x62> switch ( direction ) { 10e936: 85 ff test %edi,%edi 10e938: 74 3c je 10e976 <_Watchdog_Adjust+0x5e> 10e93a: 4f dec %edi 10e93b: 75 3d jne 10e97a <_Watchdog_Adjust+0x62> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e93d: 01 5a 10 add %ebx,0x10(%edx) break; 10e940: eb 38 jmp 10e97a <_Watchdog_Adjust+0x62> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e942: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e944: 8b 7a 10 mov 0x10(%edx),%edi 10e947: 39 fb cmp %edi,%ebx 10e949: 73 07 jae 10e952 <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e94b: 29 df sub %ebx,%edi 10e94d: 89 7a 10 mov %edi,0x10(%edx) break; 10e950: eb 28 jmp 10e97a <_Watchdog_Adjust+0x62> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e952: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e959: 50 push %eax 10e95a: 9d popf _Watchdog_Tickle( header ); 10e95b: 83 ec 0c sub $0xc,%esp 10e95e: 56 push %esi 10e95f: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e962: e8 99 01 00 00 call 10eb00 <_Watchdog_Tickle> _ISR_Disable( level ); 10e967: 9c pushf 10e968: fa cli 10e969: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e96a: 83 c4 10 add $0x10,%esp 10e96d: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e970: 39 0e cmp %ecx,(%esi) 10e972: 74 06 je 10e97a <_Watchdog_Adjust+0x62> while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 10e974: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e976: 85 db test %ebx,%ebx 10e978: 75 c8 jne 10e942 <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10e97a: 50 push %eax 10e97b: 9d popf } 10e97c: 8d 65 f4 lea -0xc(%ebp),%esp 10e97f: 5b pop %ebx 10e980: 5e pop %esi 10e981: 5f pop %edi 10e982: c9 leave 10e983: c3 ret =============================================================================== 0010d1f8 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10d1f8: 55 push %ebp 10d1f9: 89 e5 mov %esp,%ebp 10d1fb: 56 push %esi 10d1fc: 53 push %ebx 10d1fd: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10d200: 9c pushf 10d201: fa cli 10d202: 5e pop %esi previous_state = the_watchdog->state; 10d203: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10d206: 83 f8 01 cmp $0x1,%eax 10d209: 74 09 je 10d214 <_Watchdog_Remove+0x1c> 10d20b: 72 44 jb 10d251 <_Watchdog_Remove+0x59> 10d20d: 83 f8 03 cmp $0x3,%eax 10d210: 77 3f ja 10d251 <_Watchdog_Remove+0x59> <== NEVER TAKEN 10d212: eb 09 jmp 10d21d <_Watchdog_Remove+0x25> /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 10d214: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10d21b: eb 34 jmp 10d251 <_Watchdog_Remove+0x59> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10d21d: 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 ); 10d224: 8b 0a mov (%edx),%ecx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10d226: 83 39 00 cmpl $0x0,(%ecx) 10d229: 74 06 je 10d231 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10d22b: 8b 5a 10 mov 0x10(%edx),%ebx 10d22e: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10d231: 8b 0d 50 63 12 00 mov 0x126350,%ecx 10d237: 85 c9 test %ecx,%ecx 10d239: 74 0c je 10d247 <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10d23b: 8b 0d a0 62 12 00 mov 0x1262a0,%ecx 10d241: 89 0d c0 62 12 00 mov %ecx,0x1262c0 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10d247: 8b 1a mov (%edx),%ebx previous = the_node->previous; 10d249: 8b 4a 04 mov 0x4(%edx),%ecx next->previous = previous; 10d24c: 89 4b 04 mov %ecx,0x4(%ebx) previous->next = next; 10d24f: 89 19 mov %ebx,(%ecx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10d251: 8b 0d 54 63 12 00 mov 0x126354,%ecx 10d257: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10d25a: 56 push %esi 10d25b: 9d popf return( previous_state ); } 10d25c: 5b pop %ebx 10d25d: 5e pop %esi 10d25e: c9 leave 10d25f: c3 ret =============================================================================== 0010e428 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10e428: 55 push %ebp 10e429: 89 e5 mov %esp,%ebp 10e42b: 57 push %edi 10e42c: 56 push %esi 10e42d: 53 push %ebx 10e42e: 83 ec 20 sub $0x20,%esp 10e431: 8b 7d 08 mov 0x8(%ebp),%edi 10e434: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10e437: 9c pushf 10e438: fa cli 10e439: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10e43c: 56 push %esi 10e43d: 57 push %edi 10e43e: 68 24 27 12 00 push $0x122724 10e443: e8 34 aa ff ff call 108e7c */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e448: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e44a: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10e44d: 83 c4 10 add $0x10,%esp 10e450: 39 f3 cmp %esi,%ebx 10e452: 74 1d je 10e471 <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10e454: 52 push %edx 10e455: 52 push %edx 10e456: 53 push %ebx 10e457: 6a 00 push $0x0 10e459: e8 32 00 00 00 call 10e490 <_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 ) 10e45e: 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 ; 10e460: 83 c4 10 add $0x10,%esp 10e463: 39 f3 cmp %esi,%ebx 10e465: 75 ed jne 10e454 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10e467: 50 push %eax 10e468: 50 push %eax 10e469: 57 push %edi 10e46a: 68 3b 27 12 00 push $0x12273b 10e46f: eb 08 jmp 10e479 <_Watchdog_Report_chain+0x51> } else { printk( "Chain is empty\n" ); 10e471: 83 ec 0c sub $0xc,%esp 10e474: 68 4a 27 12 00 push $0x12274a 10e479: e8 fe a9 ff ff call 108e7c 10e47e: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10e481: ff 75 e4 pushl -0x1c(%ebp) 10e484: 9d popf } 10e485: 8d 65 f4 lea -0xc(%ebp),%esp 10e488: 5b pop %ebx 10e489: 5e pop %esi 10e48a: 5f pop %edi 10e48b: c9 leave 10e48c: c3 ret =============================================================================== 0011e1dc <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 11e1dc: 55 push %ebp 11e1dd: 89 e5 mov %esp,%ebp 11e1df: 83 ec 08 sub $0x8,%esp 11e1e2: e8 76 06 00 00 call 11e85d <_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(); 11e1e7: e8 8c ff ff ff call 11e178 rtems_shutdown_executive(status); 11e1ec: 83 ec 0c sub $0xc,%esp 11e1ef: ff 75 08 pushl 0x8(%ebp) 11e1f2: e8 e9 00 00 00 call 11e2e0 11e1f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11e1fa: eb fe jmp 11e1fa <_exit+0x1e> <== NOT EXECUTED =============================================================================== 00125f6a <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 125f6a: 55 push %ebp <== NOT EXECUTED 125f6b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125f6d: 57 push %edi <== NOT EXECUTED 125f6e: 56 push %esi <== NOT EXECUTED 125f6f: 53 push %ebx <== NOT EXECUTED 125f70: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 125f73: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 125f76: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 125f79: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED 125f7c: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 125f7f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 125f86: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 125f89: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 125f8c: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 125f8f: 31 db xor %ebx,%ebx <== NOT EXECUTED uint32_t c = 0; while (count > 0) 125f91: eb 50 jmp 125fe3 <_fat_block_read+0x79> <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 125f93: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 125f96: 51 push %ecx <== NOT EXECUTED 125f97: 6a 01 push $0x1 <== NOT EXECUTED 125f99: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 125f9c: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 125f9f: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 125fa2: e8 ff fa ff ff call 125aa6 <== NOT EXECUTED if (rc != RC_OK) 125fa7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125faa: 85 c0 test %eax,%eax <== NOT EXECUTED 125fac: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 125faf: 74 05 je 125fb6 <_fat_block_read+0x4c> <== NOT EXECUTED 125fb1: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 125fb4: eb 31 jmp 125fe7 <_fat_block_read+0x7d> <== NOT EXECUTED return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 125fb6: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 125fb9: 0f b7 01 movzwl (%ecx),%eax <== NOT EXECUTED 125fbc: 29 f0 sub %esi,%eax <== NOT EXECUTED 125fbe: 39 d0 cmp %edx,%eax <== NOT EXECUTED 125fc0: 76 02 jbe 125fc4 <_fat_block_read+0x5a> <== NOT EXECUTED 125fc2: 89 d0 mov %edx,%eax <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 125fc4: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED 125fc7: 01 d9 add %ebx,%ecx <== NOT EXECUTED 125fc9: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 125fcc: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 125fcf: 03 71 20 add 0x20(%ecx),%esi <== NOT EXECUTED 125fd2: 8b 7d cc mov -0x34(%ebp),%edi <== NOT EXECUTED 125fd5: 89 c1 mov %eax,%ecx <== NOT EXECUTED 125fd7: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED count -= c; 125fd9: 29 c2 sub %eax,%edx <== NOT EXECUTED cmpltd += c; 125fdb: 8d 1c 18 lea (%eax,%ebx,1),%ebx <== NOT EXECUTED blk++; 125fde: ff 45 d4 incl -0x2c(%ebp) <== NOT EXECUTED 125fe1: 31 f6 xor %esi,%esi <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 125fe3: 85 d2 test %edx,%edx <== NOT EXECUTED 125fe5: 75 ac jne 125f93 <_fat_block_read+0x29> <== NOT EXECUTED cmpltd += c; blk++; ofs = 0; } return cmpltd; } 125fe7: 89 d8 mov %ebx,%eax <== NOT EXECUTED 125fe9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125fec: 5b pop %ebx <== NOT EXECUTED 125fed: 5e pop %esi <== NOT EXECUTED 125fee: 5f pop %edi <== NOT EXECUTED 125fef: c9 leave <== NOT EXECUTED 125ff0: c3 ret <== NOT EXECUTED =============================================================================== 00125a91 <_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) { 125a91: 55 push %ebp <== NOT EXECUTED 125a92: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125a94: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 125a97: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 125a9a: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED 125a9d: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 125aa0: 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); 125aa1: e9 b9 fe ff ff jmp 12595f <== NOT EXECUTED =============================================================================== 00125c78 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 125c78: 55 push %ebp <== NOT EXECUTED 125c79: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125c7b: 57 push %edi <== NOT EXECUTED 125c7c: 56 push %esi <== NOT EXECUTED 125c7d: 53 push %ebx <== NOT EXECUTED 125c7e: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 125c81: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 125c84: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 125c87: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 125c8e: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 125c91: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 125c94: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 125c97: 31 d2 xor %edx,%edx <== NOT EXECUTED uint32_t c = 0; while(count > 0) 125c99: eb 6b jmp 125d06 <_fat_block_write+0x8e> <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bps - ofs)); 125c9b: 0f b7 03 movzwl (%ebx),%eax <== NOT EXECUTED 125c9e: 89 c1 mov %eax,%ecx <== NOT EXECUTED 125ca0: 29 f1 sub %esi,%ecx <== NOT EXECUTED 125ca2: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 125ca5: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 125ca8: 39 4d d4 cmp %ecx,-0x2c(%ebp) <== NOT EXECUTED 125cab: 76 03 jbe 125cb0 <_fat_block_write+0x38> <== NOT EXECUTED 125cad: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED if (c == fs_info->vol.bps) 125cb0: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 125cb3: 75 08 jne 125cbd <_fat_block_write+0x45> <== NOT EXECUTED rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 125cb5: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 125cb8: 50 push %eax <== NOT EXECUTED 125cb9: 6a 02 push $0x2 <== NOT EXECUTED 125cbb: eb 06 jmp 125cc3 <_fat_block_write+0x4b> <== NOT EXECUTED else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 125cbd: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 125cc0: 51 push %ecx <== NOT EXECUTED 125cc1: 6a 01 push $0x1 <== NOT EXECUTED 125cc3: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 125cc6: 53 push %ebx <== NOT EXECUTED 125cc7: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 125cca: e8 d7 fd ff ff call 125aa6 <== NOT EXECUTED 125ccf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125cd2: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED if (rc != RC_OK) 125cd5: 85 c0 test %eax,%eax <== NOT EXECUTED 125cd7: 74 05 je 125cde <_fat_block_write+0x66> <== NOT EXECUTED 125cd9: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 125cdc: eb 2e jmp 125d0c <_fat_block_write+0x94> <== NOT EXECUTED return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 125cde: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 125ce1: 03 70 20 add 0x20(%eax),%esi <== NOT EXECUTED 125ce4: 89 f0 mov %esi,%eax <== NOT EXECUTED 125ce6: 8b 75 18 mov 0x18(%ebp),%esi <== NOT EXECUTED 125ce9: 01 d6 add %edx,%esi <== NOT EXECUTED 125ceb: 89 c7 mov %eax,%edi <== NOT EXECUTED 125ced: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 125cf0: 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; 125cf2: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; 125cf9: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 125cfc: 29 45 14 sub %eax,0x14(%ebp) <== NOT EXECUTED cmpltd +=c; 125cff: 01 c2 add %eax,%edx <== NOT EXECUTED blk++; 125d01: ff 45 d0 incl -0x30(%ebp) <== NOT EXECUTED 125d04: 31 f6 xor %esi,%esi <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 125d06: 83 7d 14 00 cmpl $0x0,0x14(%ebp) <== NOT EXECUTED 125d0a: 75 8f jne 125c9b <_fat_block_write+0x23> <== NOT EXECUTED cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 125d0c: 89 d0 mov %edx,%eax <== NOT EXECUTED 125d0e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125d11: 5b pop %ebx <== NOT EXECUTED 125d12: 5e pop %esi <== NOT EXECUTED 125d13: 5f pop %edi <== NOT EXECUTED 125d14: c9 leave <== NOT EXECUTED 125d15: c3 ret <== NOT EXECUTED =============================================================================== 0013ad76 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 13ad76: 55 push %ebp <== NOT EXECUTED 13ad77: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13ad79: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 13ad7c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 13ad7f: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED return fcntl( fd, cmd, arg ); 13ad82: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 13ad85: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED 13ad88: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 13ad8b: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 13ad8e: c9 leave <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 13ad8f: e9 98 fe ff ff jmp 13ac2c <== NOT EXECUTED =============================================================================== 0010eeda <_getpid_r>: #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 10eeda: 55 push %ebp <== NOT EXECUTED 10eedb: 89 e5 mov %esp,%ebp <== NOT EXECUTED return getpid(); } 10eedd: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 10eee2: c9 leave <== NOT EXECUTED 10eee3: c3 ret <== NOT EXECUTED =============================================================================== 00107763 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 107763: 55 push %ebp <== NOT EXECUTED 107764: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107766: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 107769: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10776a: e9 a5 ff ff ff jmp 107714 <== NOT EXECUTED =============================================================================== 00128c63 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 128c63: 55 push %ebp <== NOT EXECUTED 128c64: 89 e5 mov %esp,%ebp <== NOT EXECUTED 128c66: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 128c69: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return link( existing, new ); 128c6c: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 128c6f: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 128c72: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 128c75: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 128c76: e9 61 fe ff ff jmp 128adc <== NOT EXECUTED =============================================================================== 00128e1e <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 128e1e: 55 push %ebp <== NOT EXECUTED 128e1f: 89 e5 mov %esp,%ebp <== NOT EXECUTED 128e21: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 128e24: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 128e27: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 128e2a: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 128e2d: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 128e30: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 128e31: e9 3a ff ff ff jmp 128d70 <== NOT EXECUTED =============================================================================== 0011e2a8 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 11e2a8: 55 push %ebp <== NOT EXECUTED 11e2a9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11e2ab: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11e2ae: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return realloc( ptr, size ); 11e2b1: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 11e2b4: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 11e2b7: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 11e2ba: c9 leave <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 11e2bb: e9 48 00 00 00 jmp 11e308 <== NOT EXECUTED =============================================================================== 00154000 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 154000: 55 push %ebp 154001: 89 e5 mov %esp,%ebp 154003: 57 push %edi 154004: 56 push %esi 154005: 53 push %ebx 154006: 83 ec 78 sub $0x78,%esp /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 154009: ff 75 0c pushl 0xc(%ebp) 15400c: e8 23 8d fb ff call 10cd34 154011: 89 45 94 mov %eax,-0x6c(%ebp) if ( old_parent_pathlen == 0 ) 154014: 83 c4 10 add $0x10,%esp 154017: 85 c0 test %eax,%eax 154019: 8d 45 b8 lea -0x48(%ebp),%eax 15401c: 75 15 jne 154033 <_rename_r+0x33> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 15401e: 52 push %edx 15401f: 50 push %eax 154020: 8d 45 e4 lea -0x1c(%ebp),%eax 154023: 50 push %eax 154024: ff 75 0c pushl 0xc(%ebp) 154027: e8 88 a3 fb ff call 10e3b4 15402c: 31 db xor %ebx,%ebx 15402e: 83 c4 10 add $0x10,%esp 154031: eb 20 jmp 154053 <_rename_r+0x53> else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 154033: 83 ec 0c sub $0xc,%esp 154036: 6a 00 push $0x0 154038: 50 push %eax 154039: 6a 02 push $0x2 15403b: ff 75 94 pushl -0x6c(%ebp) 15403e: ff 75 0c pushl 0xc(%ebp) 154041: e8 eb 8d fb ff call 10ce31 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 154046: 83 c4 20 add $0x20,%esp 154049: 85 c0 test %eax,%eax 15404b: 0f 85 3d 02 00 00 jne 15428e <_rename_r+0x28e> <== NEVER TAKEN 154051: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 154053: 8d 7d cc lea -0x34(%ebp),%edi 154056: 8d 75 b8 lea -0x48(%ebp),%esi 154059: b9 05 00 00 00 mov $0x5,%ecx 15405e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = old + old_parent_pathlen; 154060: 8b 75 0c mov 0xc(%ebp),%esi 154063: 03 75 94 add -0x6c(%ebp),%esi 154066: 89 75 e0 mov %esi,-0x20(%ebp) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 154069: 83 c9 ff or $0xffffffff,%ecx 15406c: 89 f7 mov %esi,%edi 15406e: 31 c0 xor %eax,%eax 154070: f2 ae repnz scas %es:(%edi),%al 154072: f7 d1 not %ecx 154074: 49 dec %ecx 154075: 57 push %edi 154076: 57 push %edi 154077: 51 push %ecx 154078: 56 push %esi 154079: e8 7a 8c fb ff call 10ccf8 15407e: 01 c6 add %eax,%esi 154080: 89 75 e0 mov %esi,-0x20(%ebp) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 154083: 83 c9 ff or $0xffffffff,%ecx 154086: 89 f7 mov %esi,%edi 154088: 31 c0 xor %eax,%eax 15408a: f2 ae repnz scas %es:(%edi),%al 15408c: f7 d1 not %ecx 15408e: 49 dec %ecx 15408f: c7 04 24 00 00 00 00 movl $0x0,(%esp) 154096: 8d 7d cc lea -0x34(%ebp),%edi 154099: 57 push %edi 15409a: 6a 00 push $0x0 15409c: 51 push %ecx 15409d: 56 push %esi 15409e: e8 d4 8c fb ff call 10cd77 0, &old_loc, false ); if ( result != 0 ) { 1540a3: 83 c4 20 add $0x20,%esp 1540a6: 85 c0 test %eax,%eax 1540a8: 74 29 je 1540d3 <_rename_r+0xd3> if ( free_old_parentloc ) 1540aa: 84 db test %bl,%bl 1540ac: 0f 84 dc 01 00 00 je 15428e <_rename_r+0x28e> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 1540b2: 8b 45 c4 mov -0x3c(%ebp),%eax 1540b5: 85 c0 test %eax,%eax 1540b7: 0f 84 d1 01 00 00 je 15428e <_rename_r+0x28e> <== NEVER TAKEN 1540bd: 8b 40 1c mov 0x1c(%eax),%eax 1540c0: 85 c0 test %eax,%eax 1540c2: 0f 84 c6 01 00 00 je 15428e <_rename_r+0x28e> <== NEVER TAKEN 1540c8: 83 ec 0c sub $0xc,%esp 1540cb: 8d 55 b8 lea -0x48(%ebp),%edx 1540ce: e9 89 00 00 00 jmp 15415c <_rename_r+0x15c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 1540d3: 51 push %ecx 1540d4: 8d 75 a4 lea -0x5c(%ebp),%esi 1540d7: 56 push %esi 1540d8: 8d 45 e4 lea -0x1c(%ebp),%eax 1540db: 50 push %eax 1540dc: ff 75 10 pushl 0x10(%ebp) 1540df: e8 d0 a2 fb ff call 10e3b4 if ( !new_parent_loc.ops->evalformake_h ) { 1540e4: 8b 45 b0 mov -0x50(%ebp),%eax 1540e7: 8b 40 04 mov 0x4(%eax),%eax 1540ea: 83 c4 10 add $0x10,%esp 1540ed: 85 c0 test %eax,%eax 1540ef: 0f 84 f3 00 00 00 je 1541e8 <_rename_r+0x1e8> 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 ); 1540f5: 52 push %edx 1540f6: 8d 55 e0 lea -0x20(%ebp),%edx 1540f9: 52 push %edx 1540fa: 56 push %esi 1540fb: 8b 55 10 mov 0x10(%ebp),%edx 1540fe: 03 55 e4 add -0x1c(%ebp),%edx 154101: 52 push %edx 154102: ff d0 call *%eax if ( result != 0 ) { 154104: 83 c4 10 add $0x10,%esp 154107: 85 c0 test %eax,%eax 154109: 74 5f je 15416a <_rename_r+0x16a> rtems_filesystem_freenode( &new_parent_loc ); 15410b: 8b 45 b0 mov -0x50(%ebp),%eax 15410e: 85 c0 test %eax,%eax 154110: 74 10 je 154122 <_rename_r+0x122> <== NEVER TAKEN 154112: 8b 40 1c mov 0x1c(%eax),%eax 154115: 85 c0 test %eax,%eax 154117: 74 09 je 154122 <_rename_r+0x122> <== NEVER TAKEN 154119: 83 ec 0c sub $0xc,%esp 15411c: 56 push %esi 15411d: ff d0 call *%eax 15411f: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 154122: 84 db test %bl,%bl 154124: 74 1a je 154140 <_rename_r+0x140> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 154126: 8b 45 c4 mov -0x3c(%ebp),%eax 154129: 85 c0 test %eax,%eax 15412b: 74 13 je 154140 <_rename_r+0x140> <== NEVER TAKEN 15412d: 8b 40 1c mov 0x1c(%eax),%eax 154130: 85 c0 test %eax,%eax 154132: 74 0c je 154140 <_rename_r+0x140> <== NEVER TAKEN 154134: 83 ec 0c sub $0xc,%esp 154137: 8d 55 b8 lea -0x48(%ebp),%edx 15413a: 52 push %edx 15413b: ff d0 call *%eax 15413d: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 154140: 8b 45 d8 mov -0x28(%ebp),%eax 154143: 85 c0 test %eax,%eax 154145: 0f 84 43 01 00 00 je 15428e <_rename_r+0x28e> <== NEVER TAKEN 15414b: 8b 40 1c mov 0x1c(%eax),%eax 15414e: 85 c0 test %eax,%eax 154150: 0f 84 38 01 00 00 je 15428e <_rename_r+0x28e> <== NEVER TAKEN 154156: 83 ec 0c sub $0xc,%esp 154159: 8d 55 cc lea -0x34(%ebp),%edx 15415c: 52 push %edx 15415d: ff d0 call *%eax 15415f: 83 cf ff or $0xffffffff,%edi 154162: 83 c4 10 add $0x10,%esp 154165: e9 27 01 00 00 jmp 154291 <_rename_r+0x291> /* * 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 ) { 15416a: 8b 45 c8 mov -0x38(%ebp),%eax 15416d: 3b 45 b4 cmp -0x4c(%ebp),%eax 154170: 8b 45 b0 mov -0x50(%ebp),%eax 154173: 74 5c je 1541d1 <_rename_r+0x1d1> rtems_filesystem_freenode( &new_parent_loc ); 154175: 85 c0 test %eax,%eax 154177: 74 10 je 154189 <_rename_r+0x189> <== NEVER TAKEN 154179: 8b 40 1c mov 0x1c(%eax),%eax 15417c: 85 c0 test %eax,%eax 15417e: 74 09 je 154189 <_rename_r+0x189> <== NEVER TAKEN 154180: 83 ec 0c sub $0xc,%esp 154183: 56 push %esi 154184: ff d0 call *%eax 154186: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 154189: 84 db test %bl,%bl 15418b: 74 1a je 1541a7 <_rename_r+0x1a7> rtems_filesystem_freenode( &old_parent_loc ); 15418d: 8b 45 c4 mov -0x3c(%ebp),%eax 154190: 85 c0 test %eax,%eax 154192: 74 13 je 1541a7 <_rename_r+0x1a7> <== NEVER TAKEN 154194: 8b 40 1c mov 0x1c(%eax),%eax 154197: 85 c0 test %eax,%eax 154199: 74 0c je 1541a7 <_rename_r+0x1a7> <== NEVER TAKEN 15419b: 83 ec 0c sub $0xc,%esp 15419e: 8d 55 b8 lea -0x48(%ebp),%edx 1541a1: 52 push %edx 1541a2: ff d0 call *%eax 1541a4: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 1541a7: 8b 45 d8 mov -0x28(%ebp),%eax 1541aa: 85 c0 test %eax,%eax 1541ac: 74 13 je 1541c1 <_rename_r+0x1c1> <== NEVER TAKEN 1541ae: 8b 40 1c mov 0x1c(%eax),%eax 1541b1: 85 c0 test %eax,%eax 1541b3: 74 0c je 1541c1 <_rename_r+0x1c1> <== NEVER TAKEN 1541b5: 83 ec 0c sub $0xc,%esp 1541b8: 8d 55 cc lea -0x34(%ebp),%edx 1541bb: 52 push %edx 1541bc: ff d0 call *%eax 1541be: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 1541c1: e8 4e 9e fe ff call 13e014 <__errno> 1541c6: c7 00 12 00 00 00 movl $0x12,(%eax) 1541cc: e9 bd 00 00 00 jmp 15428e <_rename_r+0x28e> } if ( !new_parent_loc.ops->rename_h ) { 1541d1: 8b 50 40 mov 0x40(%eax),%edx 1541d4: 85 d2 test %edx,%edx 1541d6: 75 55 jne 15422d <_rename_r+0x22d> rtems_filesystem_freenode( &new_parent_loc ); 1541d8: 8b 40 1c mov 0x1c(%eax),%eax 1541db: 85 c0 test %eax,%eax 1541dd: 74 09 je 1541e8 <_rename_r+0x1e8> <== NEVER TAKEN 1541df: 83 ec 0c sub $0xc,%esp 1541e2: 56 push %esi 1541e3: ff d0 call *%eax 1541e5: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 1541e8: 84 db test %bl,%bl 1541ea: 74 1a je 154206 <_rename_r+0x206> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 1541ec: 8b 45 c4 mov -0x3c(%ebp),%eax 1541ef: 85 c0 test %eax,%eax 1541f1: 74 13 je 154206 <_rename_r+0x206> <== NEVER TAKEN 1541f3: 8b 40 1c mov 0x1c(%eax),%eax 1541f6: 85 c0 test %eax,%eax 1541f8: 74 0c je 154206 <_rename_r+0x206> <== NEVER TAKEN 1541fa: 83 ec 0c sub $0xc,%esp 1541fd: 8d 55 b8 lea -0x48(%ebp),%edx 154200: 52 push %edx 154201: ff d0 call *%eax 154203: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 154206: 8b 45 d8 mov -0x28(%ebp),%eax 154209: 85 c0 test %eax,%eax 15420b: 74 13 je 154220 <_rename_r+0x220> <== NEVER TAKEN 15420d: 8b 40 1c mov 0x1c(%eax),%eax 154210: 85 c0 test %eax,%eax 154212: 74 0c je 154220 <_rename_r+0x220> <== NEVER TAKEN 154214: 83 ec 0c sub $0xc,%esp 154217: 8d 55 cc lea -0x34(%ebp),%edx 15421a: 52 push %edx 15421b: ff d0 call *%eax 15421d: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTSUP ); 154220: e8 ef 9d fe ff call 13e014 <__errno> 154225: c7 00 86 00 00 00 movl $0x86,(%eax) 15422b: eb 61 jmp 15428e <_rename_r+0x28e> } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 15422d: ff 75 e0 pushl -0x20(%ebp) 154230: 56 push %esi 154231: 57 push %edi 154232: 8d 45 b8 lea -0x48(%ebp),%eax 154235: 50 push %eax 154236: ff d2 call *%edx 154238: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &new_parent_loc ); 15423a: 8b 45 b0 mov -0x50(%ebp),%eax 15423d: 83 c4 10 add $0x10,%esp 154240: 85 c0 test %eax,%eax 154242: 74 10 je 154254 <_rename_r+0x254> <== NEVER TAKEN 154244: 8b 40 1c mov 0x1c(%eax),%eax 154247: 85 c0 test %eax,%eax 154249: 74 09 je 154254 <_rename_r+0x254> <== NEVER TAKEN 15424b: 83 ec 0c sub $0xc,%esp 15424e: 56 push %esi 15424f: ff d0 call *%eax 154251: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 154254: 84 db test %bl,%bl 154256: 74 1a je 154272 <_rename_r+0x272> rtems_filesystem_freenode( &old_parent_loc ); 154258: 8b 45 c4 mov -0x3c(%ebp),%eax 15425b: 85 c0 test %eax,%eax 15425d: 74 13 je 154272 <_rename_r+0x272> <== NEVER TAKEN 15425f: 8b 40 1c mov 0x1c(%eax),%eax 154262: 85 c0 test %eax,%eax 154264: 74 0c je 154272 <_rename_r+0x272> <== NEVER TAKEN 154266: 83 ec 0c sub $0xc,%esp 154269: 8d 55 b8 lea -0x48(%ebp),%edx 15426c: 52 push %edx 15426d: ff d0 call *%eax 15426f: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 154272: 8b 45 d8 mov -0x28(%ebp),%eax 154275: 85 c0 test %eax,%eax 154277: 74 18 je 154291 <_rename_r+0x291> <== NEVER TAKEN 154279: 8b 40 1c mov 0x1c(%eax),%eax 15427c: 85 c0 test %eax,%eax 15427e: 74 11 je 154291 <_rename_r+0x291> <== NEVER TAKEN 154280: 83 ec 0c sub $0xc,%esp 154283: 8d 55 cc lea -0x34(%ebp),%edx 154286: 52 push %edx 154287: ff d0 call *%eax 154289: e9 d4 fe ff ff jmp 154162 <_rename_r+0x162> 15428e: 83 cf ff or $0xffffffff,%edi return result; } 154291: 89 f8 mov %edi,%eax 154293: 8d 65 f4 lea -0xc(%ebp),%esp 154296: 5b pop %ebx 154297: 5e pop %esi 154298: 5f pop %edi 154299: c9 leave 15429a: c3 ret =============================================================================== 0010e39a <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 10e39a: 55 push %ebp <== NOT EXECUTED 10e39b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e39d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10e3a0: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 10e3a3: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10e3a6: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10e3a9: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10e3ac: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 10e3ad: e9 3a ff ff ff jmp 10e2ec <== NOT EXECUTED =============================================================================== 00111e53 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 111e53: 55 push %ebp <== NOT EXECUTED 111e54: 89 e5 mov %esp,%ebp <== NOT EXECUTED 111e56: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 111e59: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 111e5c: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 111e5f: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 111e60: e9 27 fe ff ff jmp 111c8c <== NOT EXECUTED =============================================================================== 0010a458 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10a458: 55 push %ebp 10a459: 89 e5 mov %esp,%ebp 10a45b: 56 push %esi 10a45c: 53 push %ebx 10a45d: 83 ec 10 sub $0x10,%esp 10a460: 8b 5d 08 mov 0x8(%ebp),%ebx 10a463: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 10a466: 85 db test %ebx,%ebx 10a468: 74 09 je 10a473 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 10a46a: 81 7b 04 3f 42 0f 00 cmpl $0xf423f,0x4(%ebx) 10a471: 76 13 jbe 10a486 rtems_set_errno_and_return_minus_one( EINVAL ); 10a473: e8 58 8f 00 00 call 1133d0 <__errno> 10a478: c7 00 16 00 00 00 movl $0x16,(%eax) 10a47e: 83 c8 ff or $0xffffffff,%eax 10a481: e9 9a 00 00 00 jmp 10a520 if ( olddelta ) { 10a486: 85 f6 test %esi,%esi 10a488: 74 0d je 10a497 olddelta->tv_sec = 0; 10a48a: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 10a490: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 10a497: 69 03 40 42 0f 00 imul $0xf4240,(%ebx),%eax adjustment += delta->tv_usec; 10a49d: 03 43 04 add 0x4(%ebx),%eax /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 10a4a0: 3b 05 04 32 12 00 cmp 0x123204,%eax 10a4a6: 72 76 jb 10a51e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a4a8: a1 30 73 12 00 mov 0x127330,%eax 10a4ad: 40 inc %eax 10a4ae: a3 30 73 12 00 mov %eax,0x127330 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 10a4b3: 83 ec 0c sub $0xc,%esp 10a4b6: 8d 45 f0 lea -0x10(%ebp),%eax 10a4b9: 50 push %eax 10a4ba: e8 f1 14 00 00 call 10b9b0 <_TOD_Get> ts.tv_sec += delta->tv_sec; 10a4bf: 8b 03 mov (%ebx),%eax 10a4c1: 01 45 f0 add %eax,-0x10(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 10a4c4: 69 43 04 e8 03 00 00 imul $0x3e8,0x4(%ebx),%eax 10a4cb: 8b 4d f0 mov -0x10(%ebp),%ecx 10a4ce: 03 45 f4 add -0xc(%ebp),%eax /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10a4d1: 83 c4 10 add $0x10,%esp 10a4d4: eb 05 jmp 10a4db 10a4d6: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax 10a4db: 89 ca mov %ecx,%edx 10a4dd: 41 inc %ecx 10a4de: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10a4e3: 77 f1 ja 10a4d6 10a4e5: eb 05 jmp 10a4ec 10a4e7: 05 00 ca 9a 3b add $0x3b9aca00,%eax 10a4ec: 89 d1 mov %edx,%ecx 10a4ee: 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) ) { 10a4ef: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10a4f4: 76 f1 jbe 10a4e7 10a4f6: 89 45 f4 mov %eax,-0xc(%ebp) 10a4f9: 89 4d f0 mov %ecx,-0x10(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 10a4fc: 83 ec 0c sub $0xc,%esp 10a4ff: 8d 45 f0 lea -0x10(%ebp),%eax 10a502: 50 push %eax 10a503: e8 38 15 00 00 call 10ba40 <_TOD_Set> _Thread_Enable_dispatch(); 10a508: e8 94 25 00 00 call 10caa1 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 10a50d: 83 c4 10 add $0x10,%esp 10a510: 85 f6 test %esi,%esi 10a512: 74 0a je 10a51e <== NEVER TAKEN *olddelta = *delta; 10a514: 8b 03 mov (%ebx),%eax 10a516: 8b 53 04 mov 0x4(%ebx),%edx 10a519: 89 06 mov %eax,(%esi) 10a51b: 89 56 04 mov %edx,0x4(%esi) 10a51e: 31 c0 xor %eax,%eax return 0; } 10a520: 8d 65 f8 lea -0x8(%ebp),%esp 10a523: 5b pop %ebx 10a524: 5e pop %esi 10a525: c9 leave 10a526: c3 ret =============================================================================== 001074bc : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 1074bc: 55 push %ebp 1074bd: 89 e5 mov %esp,%ebp 1074bf: 57 push %edi 1074c0: 53 push %ebx 1074c1: 8b 5d 0c mov 0xc(%ebp),%ebx 1074c4: ff 05 e4 60 12 00 incl 0x1260e4 length = nelem * elsize; 1074ca: 0f af 5d 08 imul 0x8(%ebp),%ebx cptr = malloc( length ); 1074ce: 83 ec 0c sub $0xc,%esp 1074d1: 53 push %ebx 1074d2: e8 65 04 00 00 call 10793c 1074d7: 89 c2 mov %eax,%edx if ( cptr ) 1074d9: 83 c4 10 add $0x10,%esp 1074dc: 85 c0 test %eax,%eax 1074de: 74 08 je 1074e8 <== NEVER TAKEN memset( cptr, '\0', length ); 1074e0: 31 c0 xor %eax,%eax 1074e2: 89 d7 mov %edx,%edi 1074e4: 89 d9 mov %ebx,%ecx 1074e6: f3 aa rep stos %al,%es:(%edi) MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 1074e8: ff 0d d4 60 12 00 decl 0x1260d4 return cptr; } 1074ee: 89 d0 mov %edx,%eax 1074f0: 8d 65 f8 lea -0x8(%ebp),%esp 1074f3: 5b pop %ebx 1074f4: 5f pop %edi 1074f5: c9 leave 1074f6: c3 ret =============================================================================== 00127ddc : #include int chdir( const char *pathname ) { 127ddc: 55 push %ebp 127ddd: 89 e5 mov %esp,%ebp 127ddf: 57 push %edi 127de0: 56 push %esi 127de1: 83 ec 20 sub $0x20,%esp 127de4: 8b 55 08 mov 0x8(%ebp),%edx rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 127de7: 85 d2 test %edx,%edx 127de9: 75 0d jne 127df8 rtems_set_errno_and_return_minus_one( EFAULT ); 127deb: e8 24 62 01 00 call 13e014 <__errno> 127df0: c7 00 0e 00 00 00 movl $0xe,(%eax) 127df6: eb 53 jmp 127e4b /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 127df8: 31 c0 xor %eax,%eax 127dfa: 83 c9 ff or $0xffffffff,%ecx 127dfd: 89 d7 mov %edx,%edi 127dff: f2 ae repnz scas %es:(%edi),%al 127e01: f7 d1 not %ecx 127e03: 49 dec %ecx 127e04: 83 ec 0c sub $0xc,%esp 127e07: 6a 01 push $0x1 127e09: 8d 75 e4 lea -0x1c(%ebp),%esi 127e0c: 56 push %esi 127e0d: 6a 01 push $0x1 127e0f: 51 push %ecx 127e10: 52 push %edx 127e11: e8 1b 50 fe ff call 10ce31 127e16: 89 c2 mov %eax,%edx pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 127e18: 83 c4 20 add $0x20,%esp 127e1b: 83 c8 ff or $0xffffffff,%eax 127e1e: 85 d2 test %edx,%edx 127e20: 0f 85 8f 00 00 00 jne 127eb5 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 127e26: 8b 55 f0 mov -0x10(%ebp),%edx 127e29: 8b 42 10 mov 0x10(%edx),%eax 127e2c: 85 c0 test %eax,%eax 127e2e: 75 20 jne 127e50 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 127e30: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 127e33: 85 c0 test %eax,%eax <== NOT EXECUTED 127e35: 74 09 je 127e40 <== NOT EXECUTED 127e37: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 127e3a: 56 push %esi <== NOT EXECUTED 127e3b: ff d0 call *%eax <== NOT EXECUTED 127e3d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 127e40: e8 cf 61 01 00 call 13e014 <__errno> <== NOT EXECUTED 127e45: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 127e4b: 83 c8 ff or $0xffffffff,%eax 127e4e: eb 65 jmp 127eb5 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 127e50: 83 ec 0c sub $0xc,%esp 127e53: 56 push %esi 127e54: ff d0 call *%eax 127e56: 83 c4 10 add $0x10,%esp 127e59: 48 dec %eax 127e5a: 74 24 je 127e80 rtems_filesystem_freenode( &loc ); 127e5c: 8b 45 f0 mov -0x10(%ebp),%eax 127e5f: 85 c0 test %eax,%eax 127e61: 74 10 je 127e73 <== NEVER TAKEN 127e63: 8b 40 1c mov 0x1c(%eax),%eax 127e66: 85 c0 test %eax,%eax 127e68: 74 09 je 127e73 <== NEVER TAKEN 127e6a: 83 ec 0c sub $0xc,%esp 127e6d: 56 push %esi 127e6e: ff d0 call *%eax 127e70: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 127e73: e8 9c 61 01 00 call 13e014 <__errno> 127e78: c7 00 14 00 00 00 movl $0x14,(%eax) 127e7e: eb cb jmp 127e4b } rtems_filesystem_freenode( &rtems_filesystem_current ); 127e80: 8b 15 fc 46 16 00 mov 0x1646fc,%edx 127e86: 8b 42 10 mov 0x10(%edx),%eax 127e89: 85 c0 test %eax,%eax 127e8b: 74 13 je 127ea0 <== NEVER TAKEN 127e8d: 8b 40 1c mov 0x1c(%eax),%eax 127e90: 85 c0 test %eax,%eax 127e92: 74 0c je 127ea0 <== NEVER TAKEN 127e94: 83 ec 0c sub $0xc,%esp 127e97: 83 c2 04 add $0x4,%edx 127e9a: 52 push %edx 127e9b: ff d0 call *%eax 127e9d: 83 c4 10 add $0x10,%esp rtems_filesystem_current = loc; 127ea0: 8b 3d fc 46 16 00 mov 0x1646fc,%edi 127ea6: 83 c7 04 add $0x4,%edi 127ea9: 8d 75 e4 lea -0x1c(%ebp),%esi 127eac: b9 05 00 00 00 mov $0x5,%ecx 127eb1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 127eb3: 31 c0 xor %eax,%eax return 0; } 127eb5: 8d 65 f8 lea -0x8(%ebp),%esp 127eb8: 5e pop %esi 127eb9: 5f pop %edi 127eba: c9 leave 127ebb: c3 ret =============================================================================== 0010ca08 : int chmod( const char *path, mode_t mode ) { 10ca08: 55 push %ebp 10ca09: 89 e5 mov %esp,%ebp 10ca0b: 57 push %edi 10ca0c: 56 push %esi 10ca0d: 53 push %ebx 10ca0e: 83 ec 38 sub $0x38,%esp 10ca11: 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 ); 10ca14: 31 c0 xor %eax,%eax 10ca16: 83 c9 ff or $0xffffffff,%ecx 10ca19: 89 d7 mov %edx,%edi 10ca1b: f2 ae repnz scas %es:(%edi),%al 10ca1d: f7 d1 not %ecx 10ca1f: 49 dec %ecx 10ca20: 6a 01 push $0x1 10ca22: 8d 5d d4 lea -0x2c(%ebp),%ebx 10ca25: 53 push %ebx 10ca26: 6a 00 push $0x0 10ca28: 51 push %ecx 10ca29: 52 push %edx 10ca2a: e8 02 04 00 00 call 10ce31 if ( status != 0 ) 10ca2f: 83 c4 20 add $0x20,%esp 10ca32: 83 ce ff or $0xffffffff,%esi 10ca35: 85 c0 test %eax,%eax 10ca37: 75 7d jne 10cab6 return -1; if ( !loc.handlers ){ 10ca39: 8b 45 dc mov -0x24(%ebp),%eax 10ca3c: 85 c0 test %eax,%eax 10ca3e: 75 24 jne 10ca64 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10ca40: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10ca43: 85 c0 test %eax,%eax <== NOT EXECUTED 10ca45: 74 10 je 10ca57 <== NOT EXECUTED 10ca47: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10ca4a: 85 c0 test %eax,%eax <== NOT EXECUTED 10ca4c: 74 09 je 10ca57 <== NOT EXECUTED 10ca4e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ca51: 53 push %ebx <== NOT EXECUTED 10ca52: ff d0 call *%eax <== NOT EXECUTED 10ca54: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 10ca57: e8 b8 15 03 00 call 13e014 <__errno> <== NOT EXECUTED 10ca5c: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10ca62: eb 29 jmp 10ca8d <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 10ca64: 8b 40 1c mov 0x1c(%eax),%eax 10ca67: 85 c0 test %eax,%eax 10ca69: 75 27 jne 10ca92 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10ca6b: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10ca6e: 85 c0 test %eax,%eax <== NOT EXECUTED 10ca70: 74 10 je 10ca82 <== NOT EXECUTED 10ca72: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10ca75: 85 c0 test %eax,%eax <== NOT EXECUTED 10ca77: 74 09 je 10ca82 <== NOT EXECUTED 10ca79: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ca7c: 53 push %ebx <== NOT EXECUTED 10ca7d: ff d0 call *%eax <== NOT EXECUTED 10ca7f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ca82: e8 8d 15 03 00 call 13e014 <__errno> <== NOT EXECUTED 10ca87: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10ca8d: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 10ca90: eb 24 jmp 10cab6 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 10ca92: 52 push %edx 10ca93: 52 push %edx 10ca94: ff 75 0c pushl 0xc(%ebp) 10ca97: 53 push %ebx 10ca98: ff d0 call *%eax 10ca9a: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10ca9c: 8b 45 e0 mov -0x20(%ebp),%eax 10ca9f: 83 c4 10 add $0x10,%esp 10caa2: 85 c0 test %eax,%eax 10caa4: 74 10 je 10cab6 <== NEVER TAKEN 10caa6: 8b 40 1c mov 0x1c(%eax),%eax 10caa9: 85 c0 test %eax,%eax 10caab: 74 09 je 10cab6 <== NEVER TAKEN 10caad: 83 ec 0c sub $0xc,%esp 10cab0: 53 push %ebx 10cab1: ff d0 call *%eax 10cab3: 83 c4 10 add $0x10,%esp return result; } 10cab6: 89 f0 mov %esi,%eax 10cab8: 8d 65 f4 lea -0xc(%ebp),%esp 10cabb: 5b pop %ebx 10cabc: 5e pop %esi 10cabd: 5f pop %edi 10cabe: c9 leave 10cabf: c3 ret =============================================================================== 00127ebc : int chown( const char *path, uid_t owner, gid_t group ) { 127ebc: 55 push %ebp 127ebd: 89 e5 mov %esp,%ebp 127ebf: 57 push %edi 127ec0: 56 push %esi 127ec1: 53 push %ebx 127ec2: 83 ec 48 sub $0x48,%esp 127ec5: 8b 55 08 mov 0x8(%ebp),%edx 127ec8: 8b 75 0c mov 0xc(%ebp),%esi 127ecb: 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 ) ) 127ece: 31 c0 xor %eax,%eax 127ed0: 83 c9 ff or $0xffffffff,%ecx 127ed3: 89 d7 mov %edx,%edi 127ed5: f2 ae repnz scas %es:(%edi),%al 127ed7: f7 d1 not %ecx 127ed9: 49 dec %ecx 127eda: 6a 01 push $0x1 127edc: 8d 7d d4 lea -0x2c(%ebp),%edi 127edf: 57 push %edi 127ee0: 6a 00 push $0x0 127ee2: 51 push %ecx 127ee3: 52 push %edx 127ee4: e8 48 4f fe ff call 10ce31 127ee9: 83 c4 20 add $0x20,%esp 127eec: 83 ca ff or $0xffffffff,%edx 127eef: 85 c0 test %eax,%eax 127ef1: 75 58 jne 127f4b return -1; if ( !loc.ops->chown_h ) { 127ef3: 8b 55 e0 mov -0x20(%ebp),%edx 127ef6: 8b 42 18 mov 0x18(%edx),%eax 127ef9: 85 c0 test %eax,%eax 127efb: 75 20 jne 127f1d <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 127efd: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 127f00: 85 c0 test %eax,%eax <== NOT EXECUTED 127f02: 74 09 je 127f0d <== NOT EXECUTED 127f04: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 127f07: 57 push %edi <== NOT EXECUTED 127f08: ff d0 call *%eax <== NOT EXECUTED 127f0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 127f0d: e8 02 61 01 00 call 13e014 <__errno> <== NOT EXECUTED 127f12: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 127f18: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 127f1b: eb 2e jmp 127f4b <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); 127f1d: 52 push %edx 127f1e: 0f b7 db movzwl %bx,%ebx 127f21: 53 push %ebx 127f22: 0f b7 f6 movzwl %si,%esi 127f25: 56 push %esi 127f26: 57 push %edi 127f27: ff d0 call *%eax 127f29: 89 c2 mov %eax,%edx rtems_filesystem_freenode( &loc ); 127f2b: 8b 45 e0 mov -0x20(%ebp),%eax 127f2e: 83 c4 10 add $0x10,%esp 127f31: 85 c0 test %eax,%eax 127f33: 74 16 je 127f4b <== NEVER TAKEN 127f35: 8b 40 1c mov 0x1c(%eax),%eax 127f38: 85 c0 test %eax,%eax 127f3a: 74 0f je 127f4b <== NEVER TAKEN 127f3c: 83 ec 0c sub $0xc,%esp 127f3f: 57 push %edi 127f40: 89 55 c4 mov %edx,-0x3c(%ebp) 127f43: ff d0 call *%eax 127f45: 83 c4 10 add $0x10,%esp 127f48: 8b 55 c4 mov -0x3c(%ebp),%edx return result; } 127f4b: 89 d0 mov %edx,%eax 127f4d: 8d 65 f4 lea -0xc(%ebp),%esp 127f50: 5b pop %ebx 127f51: 5e pop %esi 127f52: 5f pop %edi 127f53: c9 leave 127f54: c3 ret =============================================================================== 00127f58 : #include int chroot( const char *pathname ) { 127f58: 55 push %ebp 127f59: 89 e5 mov %esp,%ebp 127f5b: 57 push %edi 127f5c: 56 push %esi 127f5d: 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) { 127f60: 81 3d fc 46 16 00 24 cmpl $0x16a024,0x1646fc 127f67: a0 16 00 127f6a: 75 1e jne 127f8a <== NEVER TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ 127f6c: e8 1b 13 00 00 call 12928c if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 127f71: 81 3d fc 46 16 00 24 cmpl $0x16a024,0x1646fc 127f78: a0 16 00 127f7b: 75 0d jne 127f8a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 127f7d: e8 92 60 01 00 call 13e014 <__errno> <== NOT EXECUTED 127f82: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 127f88: eb 22 jmp 127fac <== NOT EXECUTED } result = chdir(pathname); 127f8a: 83 ec 0c sub $0xc,%esp 127f8d: ff 75 08 pushl 0x8(%ebp) 127f90: e8 47 fe ff ff call 127ddc if (result) { 127f95: 83 c4 10 add $0x10,%esp 127f98: 85 c0 test %eax,%eax 127f9a: 74 15 je 127fb1 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( errno ); 127f9c: e8 73 60 01 00 call 13e014 <__errno> <== NOT EXECUTED 127fa1: 89 c6 mov %eax,%esi <== NOT EXECUTED 127fa3: e8 6c 60 01 00 call 13e014 <__errno> <== NOT EXECUTED 127fa8: 8b 00 mov (%eax),%eax <== NOT EXECUTED 127faa: 89 06 mov %eax,(%esi) <== NOT EXECUTED 127fac: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 127faf: eb 53 jmp 128004 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 127fb1: 83 ec 0c sub $0xc,%esp 127fb4: 6a 00 push $0x0 127fb6: 8d 45 e4 lea -0x1c(%ebp),%eax 127fb9: 50 push %eax 127fba: 6a 00 push $0x0 127fbc: 6a 01 push $0x1 127fbe: 68 be 87 15 00 push $0x1587be 127fc3: e8 69 4e fe ff call 10ce31 127fc8: 83 c4 20 add $0x20,%esp 127fcb: 85 c0 test %eax,%eax 127fcd: 75 cd jne 127f9c <== 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); 127fcf: 8b 15 fc 46 16 00 mov 0x1646fc,%edx 127fd5: 8b 42 24 mov 0x24(%edx),%eax 127fd8: 85 c0 test %eax,%eax 127fda: 74 13 je 127fef <== NEVER TAKEN 127fdc: 8b 40 1c mov 0x1c(%eax),%eax 127fdf: 85 c0 test %eax,%eax 127fe1: 74 0c je 127fef <== NEVER TAKEN 127fe3: 83 ec 0c sub $0xc,%esp 127fe6: 83 c2 18 add $0x18,%edx 127fe9: 52 push %edx 127fea: ff d0 call *%eax 127fec: 83 c4 10 add $0x10,%esp rtems_filesystem_root = loc; 127fef: 8b 3d fc 46 16 00 mov 0x1646fc,%edi 127ff5: 83 c7 18 add $0x18,%edi 127ff8: 8d 75 e4 lea -0x1c(%ebp),%esi 127ffb: b9 05 00 00 00 mov $0x5,%ecx 128000: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 128002: 31 c0 xor %eax,%eax return 0; } 128004: 8d 65 f8 lea -0x8(%ebp),%esp 128007: 5e pop %esi 128008: 5f pop %edi 128009: c9 leave 12800a: c3 ret =============================================================================== 0010a3e8 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10a3e8: 55 push %ebp 10a3e9: 89 e5 mov %esp,%ebp 10a3eb: 83 ec 08 sub $0x8,%esp 10a3ee: 8b 45 08 mov 0x8(%ebp),%eax 10a3f1: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10a3f4: 85 d2 test %edx,%edx 10a3f6: 74 3c je 10a434 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10a3f8: 83 f8 01 cmp $0x1,%eax 10a3fb: 75 0b jne 10a408 _TOD_Get(tp); 10a3fd: 83 ec 0c sub $0xc,%esp 10a400: 52 push %edx 10a401: e8 96 1b 00 00 call 10bf9c <_TOD_Get> 10a406: eb 13 jmp 10a41b return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 10a408: 83 f8 04 cmp $0x4,%eax 10a40b: 74 05 je 10a412 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { 10a40d: 83 f8 02 cmp $0x2,%eax 10a410: 75 10 jne 10a422 _TOD_Get_uptime_as_timespec( tp ); 10a412: 83 ec 0c sub $0xc,%esp 10a415: 52 push %edx 10a416: e8 dd 1b 00 00 call 10bff8 <_TOD_Get_uptime_as_timespec> 10a41b: 31 c0 xor %eax,%eax return 0; 10a41d: 83 c4 10 add $0x10,%esp 10a420: eb 20 jmp 10a442 } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 10a422: 83 f8 03 cmp $0x3,%eax 10a425: 75 0d jne 10a434 rtems_set_errno_and_return_minus_one( ENOSYS ); 10a427: e8 d0 93 00 00 call 1137fc <__errno> 10a42c: c7 00 58 00 00 00 movl $0x58,(%eax) 10a432: eb 0b jmp 10a43f #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10a434: e8 c3 93 00 00 call 1137fc <__errno> 10a439: c7 00 16 00 00 00 movl $0x16,(%eax) 10a43f: 83 c8 ff or $0xffffffff,%eax return 0; } 10a442: c9 leave 10a443: c3 ret =============================================================================== 00129a40 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 129a40: 55 push %ebp 129a41: 89 e5 mov %esp,%ebp 129a43: 83 ec 08 sub $0x8,%esp 129a46: 8b 45 08 mov 0x8(%ebp),%eax 129a49: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 129a4c: 85 d2 test %edx,%edx 129a4e: 74 44 je 129a94 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 129a50: 83 f8 01 cmp $0x1,%eax 129a53: 75 28 jne 129a7d if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 129a55: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 129a5b: 76 37 jbe 129a94 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 129a5d: a1 24 a1 16 00 mov 0x16a124,%eax 129a62: 40 inc %eax 129a63: a3 24 a1 16 00 mov %eax,0x16a124 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 129a68: 83 ec 0c sub $0xc,%esp 129a6b: 52 push %edx 129a6c: e8 33 15 00 00 call 12afa4 <_TOD_Set> _Thread_Enable_dispatch(); 129a71: e8 33 95 fe ff call 112fa9 <_Thread_Enable_dispatch> 129a76: 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; 129a78: 83 c4 10 add $0x10,%esp 129a7b: eb 25 jmp 129aa2 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) 129a7d: 83 f8 02 cmp $0x2,%eax 129a80: 74 05 je 129a87 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 129a82: 83 f8 03 cmp $0x3,%eax 129a85: 75 0d jne 129a94 rtems_set_errno_and_return_minus_one( ENOSYS ); 129a87: e8 88 45 01 00 call 13e014 <__errno> 129a8c: c7 00 58 00 00 00 movl $0x58,(%eax) 129a92: eb 0b jmp 129a9f #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 129a94: e8 7b 45 01 00 call 13e014 <__errno> 129a99: c7 00 16 00 00 00 movl $0x16,(%eax) 129a9f: 83 c8 ff or $0xffffffff,%eax return 0; } 129aa2: c9 leave 129aa3: c3 ret =============================================================================== 0010ed70 : #include int close( int fd ) { 10ed70: 55 push %ebp 10ed71: 89 e5 mov %esp,%ebp 10ed73: 56 push %esi 10ed74: 53 push %ebx 10ed75: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 10ed78: 3b 1d 44 21 12 00 cmp 0x122144,%ebx 10ed7e: 73 0f jae 10ed8f iop = rtems_libio_iop(fd); 10ed80: c1 e3 06 shl $0x6,%ebx 10ed83: 03 1d b8 60 12 00 add 0x1260b8,%ebx rtems_libio_check_is_open(iop); 10ed89: f6 43 15 01 testb $0x1,0x15(%ebx) 10ed8d: 75 10 jne 10ed9f 10ed8f: e8 80 3c 00 00 call 112a14 <__errno> 10ed94: c7 00 09 00 00 00 movl $0x9,(%eax) 10ed9a: 83 c8 ff or $0xffffffff,%eax 10ed9d: eb 3f jmp 10edde rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 10ed9f: 8b 43 3c mov 0x3c(%ebx),%eax 10eda2: 8b 40 04 mov 0x4(%eax),%eax 10eda5: 31 f6 xor %esi,%esi 10eda7: 85 c0 test %eax,%eax 10eda9: 74 0b je 10edb6 <== NEVER TAKEN rc = (*iop->handlers->close_h)( iop ); 10edab: 83 ec 0c sub $0xc,%esp 10edae: 53 push %ebx 10edaf: ff d0 call *%eax 10edb1: 89 c6 mov %eax,%esi 10edb3: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &iop->pathinfo ); 10edb6: 8b 43 24 mov 0x24(%ebx),%eax 10edb9: 85 c0 test %eax,%eax 10edbb: 74 13 je 10edd0 <== NEVER TAKEN 10edbd: 8b 40 1c mov 0x1c(%eax),%eax 10edc0: 85 c0 test %eax,%eax 10edc2: 74 0c je 10edd0 10edc4: 83 ec 0c sub $0xc,%esp 10edc7: 8d 53 18 lea 0x18(%ebx),%edx 10edca: 52 push %edx 10edcb: ff d0 call *%eax 10edcd: 83 c4 10 add $0x10,%esp rtems_libio_free( iop ); 10edd0: 83 ec 0c sub $0xc,%esp 10edd3: 53 push %ebx 10edd4: e8 01 02 00 00 call 10efda return rc; 10edd9: 89 f0 mov %esi,%eax 10eddb: 83 c4 10 add $0x10,%esp } 10edde: 8d 65 f8 lea -0x8(%ebp),%esp 10ede1: 5b pop %ebx 10ede2: 5e pop %esi 10ede3: c9 leave 10ede4: c3 ret =============================================================================== 001077a1 : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 1077a1: 55 push %ebp 1077a2: 89 e5 mov %esp,%ebp 1077a4: 57 push %edi 1077a5: 56 push %esi 1077a6: 53 push %ebx 1077a7: 83 ec 2c sub $0x2c,%esp 1077aa: 89 c3 mov %eax,%ebx 1077ac: 89 d6 mov %edx,%esi 1077ae: 89 4d d4 mov %ecx,-0x2c(%ebp) ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 1077b1: 89 45 e4 mov %eax,-0x1c(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 1077b4: 89 55 d8 mov %edx,-0x28(%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) { 1077b7: 8b 3d cc 8d 12 00 mov 0x128dcc,%edi 1077bd: 39 f8 cmp %edi,%eax 1077bf: 72 4e jb 10780f rtems_disk_device_table *table = disktab; 1077c1: a1 c8 8d 12 00 mov 0x128dc8,%eax rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 1077c6: 8d 14 3f lea (%edi,%edi,1),%edx 1077c9: 89 55 e0 mov %edx,-0x20(%ebp) if (major >= new_size) { 1077cc: 39 d3 cmp %edx,%ebx 1077ce: 72 06 jb 1077d6 <== NEVER TAKEN new_size = major + 1; 1077d0: 89 d9 mov %ebx,%ecx 1077d2: 41 inc %ecx 1077d3: 89 4d e0 mov %ecx,-0x20(%ebp) } table = realloc(table, new_size * sizeof(*table)); 1077d6: 52 push %edx 1077d7: 52 push %edx 1077d8: 8b 55 e0 mov -0x20(%ebp),%edx 1077db: c1 e2 03 shl $0x3,%edx 1077de: 52 push %edx 1077df: 50 push %eax 1077e0: e8 b7 18 00 00 call 10909c 1077e5: 89 c2 mov %eax,%edx if (table == NULL) { 1077e7: 83 c4 10 add $0x10,%esp 1077ea: 85 c0 test %eax,%eax 1077ec: 0f 84 35 01 00 00 je 107927 <== ALWAYS TAKEN return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 1077f2: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 1077f5: 29 f9 sub %edi,%ecx <== NOT EXECUTED 1077f7: c1 e1 03 shl $0x3,%ecx <== NOT EXECUTED 1077fa: 8d 3c f8 lea (%eax,%edi,8),%edi <== NOT EXECUTED 1077fd: 31 c0 xor %eax,%eax <== NOT EXECUTED 1077ff: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED disktab = table; 107801: 89 15 c8 8d 12 00 mov %edx,0x128dc8 <== NOT EXECUTED disktab_size = new_size; 107807: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10780a: a3 cc 8d 12 00 mov %eax,0x128dcc <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 10780f: 8b 55 e4 mov -0x1c(%ebp),%edx 107812: c1 e2 03 shl $0x3,%edx 107815: 89 55 dc mov %edx,-0x24(%ebp) 107818: 03 15 c8 8d 12 00 add 0x128dc8,%edx 10781e: 8b 02 mov (%edx),%eax 107820: 85 c0 test %eax,%eax 107822: 74 08 je 10782c 107824: 8b 4d d8 mov -0x28(%ebp),%ecx 107827: 3b 4a 04 cmp 0x4(%edx),%ecx 10782a: 72 5e jb 10788a <== ALWAYS TAKEN rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; 10782c: 8b 7a 04 mov 0x4(%edx),%edi rtems_device_minor_number new_size = 0; if (old_size == 0) { 10782f: ba 08 00 00 00 mov $0x8,%edx 107834: 85 ff test %edi,%edi 107836: 74 03 je 10783b <== ALWAYS TAKEN new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 107838: 8d 14 3f lea (%edi,%edi,1),%edx <== NOT EXECUTED } if (minor >= new_size) { 10783b: 39 55 d8 cmp %edx,-0x28(%ebp) 10783e: 72 04 jb 107844 new_size = minor + 1; 107840: 8b 55 d8 mov -0x28(%ebp),%edx 107843: 42 inc %edx } table = realloc(table, new_size * sizeof(*table)); 107844: 51 push %ecx 107845: 51 push %ecx 107846: 8d 0c 95 00 00 00 00 lea 0x0(,%edx,4),%ecx 10784d: 51 push %ecx 10784e: 50 push %eax 10784f: 89 55 cc mov %edx,-0x34(%ebp) 107852: e8 45 18 00 00 call 10909c 107857: 89 45 e0 mov %eax,-0x20(%ebp) if (table == NULL) { 10785a: 83 c4 10 add $0x10,%esp 10785d: 85 c0 test %eax,%eax 10785f: 8b 55 cc mov -0x34(%ebp),%edx 107862: 0f 84 bf 00 00 00 je 107927 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 107868: 89 d1 mov %edx,%ecx 10786a: 29 f9 sub %edi,%ecx 10786c: c1 e1 02 shl $0x2,%ecx 10786f: 8d 3c b8 lea (%eax,%edi,4),%edi 107872: 89 7d d0 mov %edi,-0x30(%ebp) 107875: 31 c0 xor %eax,%eax 107877: f3 aa rep stos %al,%es:(%edi) disktab [major].minor = table; 107879: 8b 45 dc mov -0x24(%ebp),%eax 10787c: 03 05 c8 8d 12 00 add 0x128dc8,%eax 107882: 8b 4d e0 mov -0x20(%ebp),%ecx 107885: 89 08 mov %ecx,(%eax) disktab [major].size = new_size; 107887: 89 50 04 mov %edx,0x4(%eax) } return disktab [major].minor + minor; 10788a: a1 c8 8d 12 00 mov 0x128dc8,%eax 10788f: 8b 55 d8 mov -0x28(%ebp),%edx 107892: c1 e2 02 shl $0x2,%edx { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 107895: 8b 4d e4 mov -0x1c(%ebp),%ecx 107898: 03 14 c8 add (%eax,%ecx,8),%edx 10789b: 89 55 e4 mov %edx,-0x1c(%ebp) 10789e: 0f 84 83 00 00 00 je 107927 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 1078a4: b8 0c 00 00 00 mov $0xc,%eax 1078a9: 83 3a 00 cmpl $0x0,(%edx) 1078ac: 75 7e jne 10792c return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 1078ae: 83 ec 0c sub $0xc,%esp 1078b1: 6a 34 push $0x34 1078b3: e8 70 0d 00 00 call 108628 1078b8: 89 c7 mov %eax,%edi if (dd == NULL) { 1078ba: 83 c4 10 add $0x10,%esp 1078bd: 85 c0 test %eax,%eax 1078bf: 74 66 je 107927 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (name != NULL) { 1078c1: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 1078c5: 74 3d je 107904 alloc_name = strdup(name); 1078c7: 83 ec 0c sub $0xc,%esp 1078ca: ff 75 d4 pushl -0x2c(%ebp) 1078cd: e8 fe f1 00 00 call 116ad0 if (alloc_name == NULL) { 1078d2: 83 c4 10 add $0x10,%esp 1078d5: 85 c0 test %eax,%eax 1078d7: 75 5b jne 107934 <== ALWAYS TAKEN free(dd); 1078d9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1078dc: 57 push %edi <== NOT EXECUTED 1078dd: e8 a6 0a 00 00 call 108388 <== NOT EXECUTED 1078e2: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED 1078e7: eb 16 jmp 1078ff <== NOT EXECUTED } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 1078e9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1078ec: 52 push %edx <== NOT EXECUTED 1078ed: e8 96 0a 00 00 call 108388 <== NOT EXECUTED free(dd); 1078f2: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED 1078f5: e8 8e 0a 00 00 call 108388 <== NOT EXECUTED 1078fa: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED return RTEMS_UNSATISFIED; 1078ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107902: eb 28 jmp 10792c <== NOT EXECUTED 107904: 31 c9 xor %ecx,%ecx } } dd->dev = dev; 107906: 89 1f mov %ebx,(%edi) 107908: 89 77 04 mov %esi,0x4(%edi) dd->name = alloc_name; 10790b: 89 4f 10 mov %ecx,0x10(%edi) dd->uses = 0; 10790e: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi) dd->deleted = false; 107915: c6 47 30 00 movb $0x0,0x30(%edi) *dd_entry = dd; 107919: 8b 45 e4 mov -0x1c(%ebp),%eax 10791c: 89 38 mov %edi,(%eax) *dd_ptr = dd; 10791e: 8b 45 08 mov 0x8(%ebp),%eax 107921: 89 38 mov %edi,(%eax) 107923: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 107925: eb 05 jmp 10792c 107927: b8 1a 00 00 00 mov $0x1a,%eax } 10792c: 8d 65 f4 lea -0xc(%ebp),%esp 10792f: 5b pop %ebx 107930: 5e pop %esi 107931: 5f pop %edi 107932: c9 leave 107933: c3 ret return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 107934: 56 push %esi 107935: 53 push %ebx 107936: 68 ff 61 00 00 push $0x61ff 10793b: 50 push %eax 10793c: 89 45 cc mov %eax,-0x34(%ebp) 10793f: 89 45 c8 mov %eax,-0x38(%ebp) 107942: e8 a1 0d 00 00 call 1086e8 107947: 83 c4 10 add $0x10,%esp 10794a: 85 c0 test %eax,%eax 10794c: 8b 55 cc mov -0x34(%ebp),%edx 10794f: 8b 4d c8 mov -0x38(%ebp),%ecx 107952: 79 b2 jns 107906 <== ALWAYS TAKEN 107954: eb 93 jmp 1078e9 <== NOT EXECUTED =============================================================================== 0010d470 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 10d470: 55 push %ebp 10d471: 89 e5 mov %esp,%ebp 10d473: 83 ec 1c sub $0x1c,%esp 10d476: 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; 10d479: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10d47c: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10d47f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10d486: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10d48d: 8d 55 ec lea -0x14(%ebp),%edx 10d490: 52 push %edx 10d491: ff 70 0c pushl 0xc(%eax) 10d494: ff 70 08 pushl 0x8(%eax) 10d497: e8 68 10 00 00 call 10e504 10d49c: 89 c2 mov %eax,%edx np->major, np->minor, (void *) &args ); if ( status ) { 10d49e: 83 c4 10 add $0x10,%esp 10d4a1: 31 c0 xor %eax,%eax 10d4a3: 85 d2 test %edx,%edx 10d4a5: 74 0c je 10d4b3 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 10d4a7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d4aa: 52 push %edx <== NOT EXECUTED 10d4ab: e8 c0 00 00 00 call 10d570 <== NOT EXECUTED 10d4b0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10d4b3: c9 leave 10d4b4: c3 ret =============================================================================== 0010d4c7 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10d4c7: 55 push %ebp 10d4c8: 89 e5 mov %esp,%ebp 10d4ca: 57 push %edi 10d4cb: 56 push %esi 10d4cc: 53 push %ebx 10d4cd: 83 ec 1c sub $0x1c,%esp 10d4d0: 8b 4d 0c mov 0xc(%ebp),%ecx 10d4d3: 8b 5d 14 mov 0x14(%ebp),%ebx int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 10d4d6: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10d4dd: 74 0d je 10d4ec <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 10d4df: e8 14 21 00 00 call 10f5f8 <__errno> <== NOT EXECUTED 10d4e4: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10d4ea: eb 77 jmp 10d563 <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 10d4ec: 8b 33 mov (%ebx),%esi if (!device_name_table) 10d4ee: 85 f6 test %esi,%esi 10d4f0: 74 04 je 10d4f6 <== NEVER TAKEN 10d4f2: 31 ff xor %edi,%edi 10d4f4: eb 5a jmp 10d550 rtems_set_errno_and_return_minus_one( EFAULT ); 10d4f6: e8 fd 20 00 00 call 10f5f8 <__errno> <== NOT EXECUTED 10d4fb: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10d501: eb 60 jmp 10d563 <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 10d503: 8b 16 mov (%esi),%edx 10d505: 85 d2 test %edx,%edx 10d507: 74 43 je 10d54c continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10d509: 50 push %eax 10d50a: 51 push %ecx 10d50b: 52 push %edx 10d50c: ff 75 08 pushl 0x8(%ebp) 10d50f: 89 55 e4 mov %edx,-0x1c(%ebp) 10d512: 89 4d e0 mov %ecx,-0x20(%ebp) 10d515: e8 e2 2c 00 00 call 1101fc 10d51a: 83 c4 10 add $0x10,%esp 10d51d: 85 c0 test %eax,%eax 10d51f: 8b 55 e4 mov -0x1c(%ebp),%edx 10d522: 8b 4d e0 mov -0x20(%ebp),%ecx 10d525: 75 25 jne 10d54c <== NEVER TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10d527: 80 3c 0a 00 cmpb $0x0,(%edx,%ecx,1) 10d52b: 75 1f jne 10d54c <== NEVER TAKEN continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 10d52d: 89 33 mov %esi,(%ebx) pathloc->handlers = &devFS_file_handlers; 10d52f: c7 43 08 68 ff 11 00 movl $0x11ff68,0x8(%ebx) pathloc->ops = &devFS_ops; 10d536: c7 43 0c 20 ff 11 00 movl $0x11ff20,0xc(%ebx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10d53d: a1 c0 ff 11 00 mov 0x11ffc0,%eax 10d542: 8b 40 28 mov 0x28(%eax),%eax 10d545: 89 43 10 mov %eax,0x10(%ebx) 10d548: 31 c0 xor %eax,%eax return 0; 10d54a: eb 1a jmp 10d566 /* 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++) { 10d54c: 47 inc %edi 10d54d: 83 c6 14 add $0x14,%esi 10d550: 3b 3d 48 e1 11 00 cmp 0x11e148,%edi 10d556: 72 ab jb 10d503 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10d558: e8 9b 20 00 00 call 10f5f8 <__errno> 10d55d: c7 00 02 00 00 00 movl $0x2,(%eax) 10d563: 83 c8 ff or $0xffffffff,%eax } 10d566: 8d 65 f4 lea -0xc(%ebp),%esp 10d569: 5b pop %ebx 10d56a: 5e pop %esi 10d56b: 5f pop %edi 10d56c: c9 leave 10d56d: c3 ret =============================================================================== 00106d80 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 106d80: 55 push %ebp 106d81: 89 e5 mov %esp,%ebp 106d83: 57 push %edi 106d84: 53 push %ebx 106d85: 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( 106d88: 83 ec 0c sub $0xc,%esp 106d8b: 6b 05 48 e1 11 00 14 imul $0x14,0x11e148,%eax 106d92: 50 push %eax 106d93: e8 94 62 00 00 call 10d02c <_Workspace_Allocate> 106d98: 89 c2 mov %eax,%edx sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 106d9a: 83 c4 10 add $0x10,%esp 106d9d: 85 c0 test %eax,%eax 106d9f: 75 10 jne 106db1 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106da1: e8 52 88 00 00 call 10f5f8 <__errno> <== NOT EXECUTED 106da6: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106dac: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106daf: eb 20 jmp 106dd1 <== NOT EXECUTED memset( 106db1: 6b 0d 48 e1 11 00 14 imul $0x14,0x11e148,%ecx 106db8: 31 c0 xor %eax,%eax 106dba: 89 d7 mov %edx,%edi 106dbc: 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; 106dbe: c7 43 24 68 ff 11 00 movl $0x11ff68,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 106dc5: c7 43 28 20 ff 11 00 movl $0x11ff20,0x28(%ebx) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 106dcc: 89 53 1c mov %edx,0x1c(%ebx) 106dcf: 31 c0 xor %eax,%eax return 0; } 106dd1: 8d 65 f8 lea -0x8(%ebp),%esp 106dd4: 5b pop %ebx 106dd5: 5f pop %edi 106dd6: c9 leave 106dd7: c3 ret =============================================================================== 00106ee4 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 106ee4: 55 push %ebp 106ee5: 89 e5 mov %esp,%ebp 106ee7: 83 ec 1c sub $0x1c,%esp 106eea: 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; 106eed: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 106ef0: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 106ef3: 8b 55 0c mov 0xc(%ebp),%edx 106ef6: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 106ef9: 8b 55 10 mov 0x10(%ebp),%edx 106efc: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( 106eff: 8d 55 e8 lea -0x18(%ebp),%edx 106f02: 52 push %edx 106f03: ff 70 0c pushl 0xc(%eax) 106f06: ff 70 08 pushl 0x8(%eax) 106f09: e8 82 39 00 00 call 10a890 np->major, np->minor, (void *) &args ); if ( status ) 106f0e: 83 c4 10 add $0x10,%esp 106f11: 85 c0 test %eax,%eax 106f13: 74 0e je 106f23 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 106f15: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106f18: 50 push %eax <== NOT EXECUTED 106f19: e8 52 66 00 00 call 10d570 <== NOT EXECUTED 106f1e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106f21: eb 03 jmp 106f26 <== NOT EXECUTED return args.ioctl_return; 106f23: 8b 45 f4 mov -0xc(%ebp),%eax } 106f26: c9 leave 106f27: c3 ret =============================================================================== 00106dd8 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 106dd8: 55 push %ebp 106dd9: 89 e5 mov %esp,%ebp 106ddb: 57 push %edi 106ddc: 56 push %esi 106ddd: 53 push %ebx 106dde: 83 ec 1c sub $0x1c,%esp 106de1: 8b 7d 08 mov 0x8(%ebp),%edi 106de4: 8b 4d 10 mov 0x10(%ebp),%ecx 106de7: 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') && 106dea: 80 3f 64 cmpb $0x64,(%edi) 106ded: 75 18 jne 106e07 <== NEVER TAKEN 106def: 80 7f 01 65 cmpb $0x65,0x1(%edi) 106df3: 75 12 jne 106e07 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 106df5: 80 7f 02 76 cmpb $0x76,0x2(%edi) 106df9: 75 0c jne 106e07 <== NEVER TAKEN 106dfb: 31 c0 xor %eax,%eax 106dfd: 80 7f 03 00 cmpb $0x0,0x3(%edi) 106e01: 0f 84 c9 00 00 00 je 106ed0 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 106e07: 8b 45 0c mov 0xc(%ebp),%eax 106e0a: 25 00 f0 00 00 and $0xf000,%eax 106e0f: 3d 00 20 00 00 cmp $0x2000,%eax 106e14: 74 14 je 106e2a <== ALWAYS TAKEN 106e16: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED 106e1b: 74 0d je 106e2a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 106e1d: e8 d6 87 00 00 call 10f5f8 <__errno> <== NOT EXECUTED 106e22: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 106e28: eb 23 jmp 106e4d <== NOT EXECUTED ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 106e2a: 89 4d e0 mov %ecx,-0x20(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 106e2d: 89 55 e4 mov %edx,-0x1c(%ebp) else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 106e30: 8b 45 18 mov 0x18(%ebp),%eax 106e33: 8b 08 mov (%eax),%ecx if (!device_name_table) 106e35: 85 c9 test %ecx,%ecx 106e37: 74 09 je 106e42 <== NEVER TAKEN 106e39: 89 ca mov %ecx,%edx 106e3b: 83 ce ff or $0xffffffff,%esi 106e3e: 31 db xor %ebx,%ebx 106e40: eb 46 jmp 106e88 rtems_set_errno_and_return_minus_one( EFAULT ); 106e42: e8 b1 87 00 00 call 10f5f8 <__errno> <== NOT EXECUTED 106e47: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 106e4d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106e50: eb 7e jmp 106ed0 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 106e52: 8b 02 mov (%edx),%eax 106e54: 85 c0 test %eax,%eax 106e56: 74 2a je 106e82 <== ALWAYS TAKEN slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 106e58: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 106e5b: 50 push %eax <== NOT EXECUTED 106e5c: 57 push %edi <== NOT EXECUTED 106e5d: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 106e60: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED 106e63: e8 70 92 00 00 call 1100d8 <== NOT EXECUTED 106e68: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106e6b: 85 c0 test %eax,%eax <== NOT EXECUTED 106e6d: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 106e70: 8b 4d d8 mov -0x28(%ebp),%ecx <== NOT EXECUTED 106e73: 75 0f jne 106e84 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); 106e75: e8 7e 87 00 00 call 10f5f8 <__errno> <== NOT EXECUTED 106e7a: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED 106e80: eb cb jmp 106e4d <== NOT EXECUTED 106e82: 89 de mov %ebx,%esi /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 106e84: 43 inc %ebx 106e85: 83 c2 14 add $0x14,%edx 106e88: 3b 1d 48 e1 11 00 cmp 0x11e148,%ebx 106e8e: 72 c2 jb 106e52 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 106e90: 83 fe ff cmp $0xffffffff,%esi 106e93: 75 0d jne 106ea2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106e95: e8 5e 87 00 00 call 10f5f8 <__errno> <== NOT EXECUTED 106e9a: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106ea0: eb ab jmp 106e4d <== NOT EXECUTED _ISR_Disable(level); 106ea2: 9c pushf 106ea3: fa cli 106ea4: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 106ea5: 6b d6 14 imul $0x14,%esi,%edx 106ea8: 8d 14 11 lea (%ecx,%edx,1),%edx 106eab: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 106ead: 31 c0 xor %eax,%eax 106eaf: 83 c9 ff or $0xffffffff,%ecx 106eb2: f2 ae repnz scas %es:(%edi),%al 106eb4: f7 d1 not %ecx 106eb6: 49 dec %ecx 106eb7: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 106eba: 8b 45 e0 mov -0x20(%ebp),%eax 106ebd: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 106ec0: 8b 45 e4 mov -0x1c(%ebp),%eax 106ec3: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 106ec6: 8b 45 0c mov 0xc(%ebp),%eax 106ec9: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 106ecc: 53 push %ebx 106ecd: 9d popf 106ece: 31 c0 xor %eax,%eax return 0; } 106ed0: 8d 65 f4 lea -0xc(%ebp),%esp 106ed3: 5b pop %ebx 106ed4: 5e pop %esi 106ed5: 5f pop %edi 106ed6: c9 leave 106ed7: c3 ret =============================================================================== 00106f28 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 106f28: 55 push %ebp 106f29: 89 e5 mov %esp,%ebp 106f2b: 83 ec 1c sub $0x1c,%esp 106f2e: 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; 106f31: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 106f34: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 106f37: 8b 40 14 mov 0x14(%eax),%eax 106f3a: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 106f3d: 8b 45 14 mov 0x14(%ebp),%eax 106f40: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 106f43: 8d 45 ec lea -0x14(%ebp),%eax 106f46: 50 push %eax 106f47: ff 72 0c pushl 0xc(%edx) 106f4a: ff 72 08 pushl 0x8(%edx) 106f4d: e8 16 3a 00 00 call 10a968 106f52: 89 c2 mov %eax,%edx np->major, np->minor, (void *) &args ); if ( status ) 106f54: 83 c4 10 add $0x10,%esp 106f57: 31 c0 xor %eax,%eax 106f59: 85 d2 test %edx,%edx 106f5b: 74 0c je 106f69 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 106f5d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106f60: 52 push %edx <== NOT EXECUTED 106f61: e8 0a 66 00 00 call 10d570 <== NOT EXECUTED 106f66: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 106f69: c9 leave 106f6a: c3 ret =============================================================================== 00106f6c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 106f6c: 55 push %ebp <== NOT EXECUTED 106f6d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106f6f: 53 push %ebx <== NOT EXECUTED 106f70: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 106f73: 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; 106f76: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 106f79: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 106f7c: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 106f7f: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 106f82: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 106f85: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 106f88: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 106f8b: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 106f8e: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 106f91: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 106f94: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 106f97: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 106f9a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 106fa1: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 106fa4: 50 push %eax <== NOT EXECUTED 106fa5: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED 106fa8: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED 106fab: e8 e8 39 00 00 call 10a998 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 106fb0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106fb3: 85 c0 test %eax,%eax <== NOT EXECUTED 106fb5: 74 0e je 106fc5 <== NOT EXECUTED return rtems_deviceio_errno(status); 106fb7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106fba: 50 push %eax <== NOT EXECUTED 106fbb: e8 b0 65 00 00 call 10d570 <== NOT EXECUTED 106fc0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106fc3: eb 03 jmp 106fc8 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 106fc5: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 106fc8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 106fcb: c9 leave <== NOT EXECUTED 106fcc: c3 ret <== NOT EXECUTED =============================================================================== 00106fd0 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 106fd0: 55 push %ebp 106fd1: 89 e5 mov %esp,%ebp 106fd3: 53 push %ebx 106fd4: 83 ec 04 sub $0x4,%esp 106fd7: 8b 55 0c mov 0xc(%ebp),%edx rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 106fda: 8b 45 08 mov 0x8(%ebp),%eax 106fdd: 8b 00 mov (%eax),%eax if (!the_dev) 106fdf: 85 c0 test %eax,%eax 106fe1: 75 10 jne 106ff3 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 106fe3: e8 10 86 00 00 call 10f5f8 <__errno> <== NOT EXECUTED 106fe8: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 106fee: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106ff1: eb 14 jmp 107007 <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 106ff3: 8b 48 0c mov 0xc(%eax),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 106ff6: 8b 58 08 mov 0x8(%eax),%ebx 106ff9: 89 5a 18 mov %ebx,0x18(%edx) 106ffc: 89 4a 1c mov %ecx,0x1c(%edx) buf->st_mode = the_dev->mode; 106fff: 8b 40 10 mov 0x10(%eax),%eax 107002: 89 42 0c mov %eax,0xc(%edx) 107005: 31 c0 xor %eax,%eax return 0; } 107007: 5a pop %edx 107008: 5b pop %ebx 107009: c9 leave 10700a: c3 ret =============================================================================== 0010700c : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10700c: 55 push %ebp 10700d: 89 e5 mov %esp,%ebp 10700f: 53 push %ebx 107010: 83 ec 28 sub $0x28,%esp 107013: 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; 107016: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107019: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 10701c: 8b 48 0c mov 0xc(%eax),%ecx 10701f: 8b 58 10 mov 0x10(%eax),%ebx 107022: 89 4d e0 mov %ecx,-0x20(%ebp) 107025: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 107028: 8b 4d 0c mov 0xc(%ebp),%ecx 10702b: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 10702e: 8b 4d 10 mov 0x10(%ebp),%ecx 107031: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 107034: 8b 40 14 mov 0x14(%eax),%eax 107037: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 10703a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 107041: 8d 45 dc lea -0x24(%ebp),%eax 107044: 50 push %eax 107045: ff 72 0c pushl 0xc(%edx) 107048: ff 72 08 pushl 0x8(%edx) 10704b: e8 78 39 00 00 call 10a9c8 np->major, np->minor, (void *) &args ); if ( status ) 107050: 83 c4 10 add $0x10,%esp 107053: 85 c0 test %eax,%eax 107055: 74 0e je 107065 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 107057: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10705a: 50 push %eax <== NOT EXECUTED 10705b: e8 10 65 00 00 call 10d570 <== NOT EXECUTED 107060: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107063: eb 03 jmp 107068 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 107065: 8b 45 f4 mov -0xc(%ebp),%eax } 107068: 8b 5d fc mov -0x4(%ebp),%ebx 10706b: c9 leave 10706c: c3 ret =============================================================================== 001117bc : */ int device_close( rtems_libio_t *iop ) { 1117bc: 55 push %ebp 1117bd: 89 e5 mov %esp,%ebp 1117bf: 83 ec 1c sub $0x1c,%esp 1117c2: 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; 1117c5: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 1117c8: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 1117cb: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 1117d2: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 1117d9: 8d 55 ec lea -0x14(%ebp),%edx 1117dc: 52 push %edx 1117dd: ff 70 54 pushl 0x54(%eax) 1117e0: ff 70 50 pushl 0x50(%eax) 1117e3: e8 e8 0e 00 00 call 1126d0 1117e8: 89 c2 mov %eax,%edx the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 1117ea: 83 c4 10 add $0x10,%esp 1117ed: 31 c0 xor %eax,%eax 1117ef: 85 d2 test %edx,%edx 1117f1: 74 0c je 1117ff <== ALWAYS TAKEN return rtems_deviceio_errno(status); 1117f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1117f6: 52 push %edx <== NOT EXECUTED 1117f7: e8 20 11 00 00 call 11291c <== NOT EXECUTED 1117fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 1117ff: c9 leave 111800: c3 ret =============================================================================== 001116b6 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 1116b6: 55 push %ebp 1116b7: 89 e5 mov %esp,%ebp 1116b9: 83 ec 1c sub $0x1c,%esp 1116bc: 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; 1116bf: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 1116c2: 8b 55 0c mov 0xc(%ebp),%edx 1116c5: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 1116c8: 8b 55 10 mov 0x10(%ebp),%edx 1116cb: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->file_info; 1116ce: 8b 40 38 mov 0x38(%eax),%eax status = rtems_io_control( 1116d1: 8d 55 e8 lea -0x18(%ebp),%edx 1116d4: 52 push %edx 1116d5: ff 70 54 pushl 0x54(%eax) 1116d8: ff 70 50 pushl 0x50(%eax) 1116db: e8 20 10 00 00 call 112700 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 1116e0: 83 c4 10 add $0x10,%esp 1116e3: 85 c0 test %eax,%eax 1116e5: 74 0e je 1116f5 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 1116e7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1116ea: 50 push %eax <== NOT EXECUTED 1116eb: e8 2c 12 00 00 call 11291c <== NOT EXECUTED 1116f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1116f3: eb 03 jmp 1116f8 <== NOT EXECUTED return args.ioctl_return; 1116f5: 8b 45 f4 mov -0xc(%ebp),%eax } 1116f8: c9 leave 1116f9: c3 ret =============================================================================== 00111801 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 111801: 55 push %ebp 111802: 89 e5 mov %esp,%ebp 111804: 83 ec 1c sub $0x1c,%esp 111807: 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; 11180a: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 11180d: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 111810: 8b 40 14 mov 0x14(%eax),%eax 111813: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 111816: 8b 45 14 mov 0x14(%ebp),%eax 111819: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 11181c: 8d 45 ec lea -0x14(%ebp),%eax 11181f: 50 push %eax 111820: ff 72 54 pushl 0x54(%edx) 111823: ff 72 50 pushl 0x50(%edx) 111826: e8 05 0f 00 00 call 112730 11182b: 89 c2 mov %eax,%edx the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 11182d: 83 c4 10 add $0x10,%esp 111830: 31 c0 xor %eax,%eax 111832: 85 d2 test %edx,%edx 111834: 74 0c je 111842 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 111836: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111839: 52 push %edx <== NOT EXECUTED 11183a: e8 dd 10 00 00 call 11291c <== NOT EXECUTED 11183f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 111842: c9 leave 111843: c3 ret =============================================================================== 0011175b : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 11175b: 55 push %ebp 11175c: 89 e5 mov %esp,%ebp 11175e: 53 push %ebx 11175f: 83 ec 28 sub $0x28,%esp 111762: 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; 111765: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 111768: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 11176b: 8b 48 0c mov 0xc(%eax),%ecx 11176e: 8b 58 10 mov 0x10(%eax),%ebx 111771: 89 4d e0 mov %ecx,-0x20(%ebp) 111774: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = buffer; 111777: 8b 4d 0c mov 0xc(%ebp),%ecx 11177a: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 11177d: 8b 4d 10 mov 0x10(%ebp),%ecx 111780: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 111783: 8b 40 14 mov 0x14(%eax),%eax 111786: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 111789: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_read( 111790: 8d 45 dc lea -0x24(%ebp),%eax 111793: 50 push %eax 111794: ff 72 54 pushl 0x54(%edx) 111797: ff 72 50 pushl 0x50(%edx) 11179a: e8 c1 0f 00 00 call 112760 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 11179f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1117a2: 85 c0 test %eax,%eax <== NOT EXECUTED 1117a4: 74 0e je 1117b4 <== NOT EXECUTED return rtems_deviceio_errno(status); 1117a6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1117a9: 50 push %eax <== NOT EXECUTED 1117aa: e8 6d 11 00 00 call 11291c <== NOT EXECUTED 1117af: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1117b2: eb 03 jmp 1117b7 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 1117b4: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 1117b7: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1117ba: c9 leave <== NOT EXECUTED 1117bb: c3 ret <== NOT EXECUTED =============================================================================== 001116fa : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 1116fa: 55 push %ebp 1116fb: 89 e5 mov %esp,%ebp 1116fd: 53 push %ebx 1116fe: 83 ec 28 sub $0x28,%esp 111701: 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; 111704: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 111707: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 11170a: 8b 48 0c mov 0xc(%eax),%ecx 11170d: 8b 58 10 mov 0x10(%eax),%ebx 111710: 89 4d e0 mov %ecx,-0x20(%ebp) 111713: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 111716: 8b 4d 0c mov 0xc(%ebp),%ecx 111719: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 11171c: 8b 4d 10 mov 0x10(%ebp),%ecx 11171f: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 111722: 8b 40 14 mov 0x14(%eax),%eax 111725: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 111728: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 11172f: 8d 45 dc lea -0x24(%ebp),%eax 111732: 50 push %eax 111733: ff 72 54 pushl 0x54(%edx) 111736: ff 72 50 pushl 0x50(%edx) 111739: e8 52 10 00 00 call 112790 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 11173e: 83 c4 10 add $0x10,%esp 111741: 85 c0 test %eax,%eax 111743: 74 0e je 111753 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 111745: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111748: 50 push %eax <== NOT EXECUTED 111749: e8 ce 11 00 00 call 11291c <== NOT EXECUTED 11174e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111751: eb 03 jmp 111756 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 111753: 8b 45 f4 mov -0xc(%ebp),%eax } 111756: 8b 5d fc mov -0x4(%ebp),%ebx 111759: c9 leave 11175a: c3 ret =============================================================================== 001074ec : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 1074ec: 55 push %ebp 1074ed: 89 e5 mov %esp,%ebp 1074ef: 83 ec 0c sub $0xc,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1074f2: 6a 00 push $0x0 1074f4: 6a 00 push $0x0 1074f6: ff 35 d0 8d 12 00 pushl 0x128dd0 1074fc: e8 9f 40 00 00 call 10b5a0 107501: 89 c2 mov %eax,%edx if (sc == RTEMS_SUCCESSFUL) { 107503: 83 c4 10 add $0x10,%esp 107506: b8 16 00 00 00 mov $0x16,%eax 10750b: 85 d2 test %edx,%edx 10750d: 75 09 jne 107518 <== NEVER TAKEN diskdevs_protected = true; 10750f: c6 05 d4 8d 12 00 01 movb $0x1,0x128dd4 107516: 30 c0 xor %al,%al return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } 107518: c9 leave 107519: c3 ret =============================================================================== 0010751a : static void disk_unlock(void) { 10751a: 55 push %ebp 10751b: 89 e5 mov %esp,%ebp 10751d: 83 ec 14 sub $0x14,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 107520: c6 05 d4 8d 12 00 00 movb $0x0,0x128dd4 sc = rtems_semaphore_release(diskdevs_mutex); 107527: ff 35 d0 8d 12 00 pushl 0x128dd0 10752d: e8 5a 41 00 00 call 10b68c if (sc != RTEMS_SUCCESSFUL) { 107532: 83 c4 10 add $0x10,%esp 107535: 85 c0 test %eax,%eax 107537: 74 0d je 107546 <== ALWAYS TAKEN /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 107539: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10753c: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED 107541: e8 ae 45 00 00 call 10baf4 <== NOT EXECUTED } } 107546: c9 leave 107547: c3 ret =============================================================================== 00109056 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 109056: 55 push %ebp 109057: 89 e5 mov %esp,%ebp 109059: 53 push %ebx 10905a: 83 ec 04 sub $0x4,%esp 10905d: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 10905f: 83 b8 b4 00 00 00 00 cmpl $0x0,0xb4(%eax) 109066: 75 2e jne 109096 109068: eb 41 jmp 1090ab rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 10906a: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 109071: 00 00 00 rtems_interrupt_enable (level); 109074: 50 push %eax 109075: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 109076: 50 push %eax 109077: 6a 00 push $0x0 109079: 6a 00 push $0x0 10907b: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109081: e8 72 15 00 00 call 10a5f8 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109086: 83 c4 10 add $0x10,%esp 109089: 85 c0 test %eax,%eax 10908b: 74 09 je 109096 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 10908d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109090: 50 push %eax <== NOT EXECUTED 109091: e8 fa 1a 00 00 call 10ab90 <== NOT EXECUTED rtems_interrupt_disable (level); 109096: 9c pushf 109097: fa cli 109098: 58 pop %eax rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 109099: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 10909f: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 1090a5: 39 d1 cmp %edx,%ecx 1090a7: 75 c1 jne 10906a RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 1090a9: 50 push %eax 1090aa: 9d popf } } 1090ab: 8b 5d fc mov -0x4(%ebp),%ebx 1090ae: c9 leave 1090af: c3 ret =============================================================================== 00107ca0 : int dup2( int fildes, int fildes2 ) { 107ca0: 55 push %ebp 107ca1: 89 e5 mov %esp,%ebp 107ca3: 57 push %edi 107ca4: 56 push %esi 107ca5: 53 push %ebx 107ca6: 83 ec 64 sub $0x64,%esp 107ca9: 8b 5d 08 mov 0x8(%ebp),%ebx 107cac: 8b 75 0c mov 0xc(%ebp),%esi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 107caf: 8d 7d a0 lea -0x60(%ebp),%edi 107cb2: 57 push %edi 107cb3: 53 push %ebx 107cb4: e8 ab 04 00 00 call 108164 if ( status == -1 ) 107cb9: 83 c4 10 add $0x10,%esp 107cbc: 40 inc %eax 107cbd: 74 1e je 107cdd <== NEVER TAKEN /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 107cbf: 52 push %edx 107cc0: 52 push %edx 107cc1: 57 push %edi 107cc2: 56 push %esi 107cc3: e8 9c 04 00 00 call 108164 if ( status == -1 ) 107cc8: 83 c4 10 add $0x10,%esp 107ccb: 40 inc %eax 107ccc: 74 0f je 107cdd <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 107cce: 50 push %eax <== NOT EXECUTED 107ccf: 56 push %esi <== NOT EXECUTED 107cd0: 6a 00 push $0x0 <== NOT EXECUTED 107cd2: 53 push %ebx <== NOT EXECUTED 107cd3: e8 c8 01 00 00 call 107ea0 <== NOT EXECUTED 107cd8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107cdb: eb 03 jmp 107ce0 <== NOT EXECUTED 107cdd: 83 c8 ff or $0xffffffff,%eax } 107ce0: 8d 65 f4 lea -0xc(%ebp),%esp 107ce3: 5b pop %ebx 107ce4: 5e pop %esi 107ce5: 5f pop %edi 107ce6: c9 leave 107ce7: c3 ret =============================================================================== 00108c73 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 108c73: 55 push %ebp <== NOT EXECUTED 108c74: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108c76: 53 push %ebx <== NOT EXECUTED 108c77: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 108c7a: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED 108c7e: 74 3e je 108cbe <== NOT EXECUTED 108c80: 0f b6 c8 movzbl %al,%ecx <== NOT EXECUTED 108c83: 8b 1d 20 40 12 00 mov 0x124020,%ebx <== NOT EXECUTED 108c89: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) <== NOT EXECUTED 108c8e: 74 2e je 108cbe <== NOT EXECUTED 108c90: 3c 09 cmp $0x9,%al <== NOT EXECUTED 108c92: 74 2a je 108cbe <== NOT EXECUTED 108c94: 3c 0a cmp $0xa,%al <== NOT EXECUTED 108c96: 74 26 je 108cbe <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; 108c98: c6 45 f6 5e movb $0x5e,-0xa(%ebp) <== NOT EXECUTED echobuf[1] = c ^ 0x40; 108c9c: 83 f0 40 xor $0x40,%eax <== NOT EXECUTED 108c9f: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 108ca2: 50 push %eax <== NOT EXECUTED 108ca3: 52 push %edx <== NOT EXECUTED 108ca4: 6a 02 push $0x2 <== NOT EXECUTED 108ca6: 8d 45 f6 lea -0xa(%ebp),%eax <== NOT EXECUTED 108ca9: 50 push %eax <== NOT EXECUTED 108caa: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 108cad: e8 83 fd ff ff call 108a35 <== NOT EXECUTED tty->column += 2; 108cb2: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 108cb5: 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')) { 108cb9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108cbc: eb 08 jmp 108cc6 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 108cbe: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108cc1: e8 8f fe ff ff call 108b55 <== NOT EXECUTED } } 108cc6: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108cc9: c9 leave <== NOT EXECUTED 108cca: c3 ret <== NOT EXECUTED =============================================================================== 001282e4 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 1282e4: 55 push %ebp <== NOT EXECUTED 1282e5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1282e7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp != NULL) 1282ea: a1 0c 9c 16 00 mov 0x169c0c,%eax <== NOT EXECUTED 1282ef: 85 c0 test %eax,%eax <== NOT EXECUTED 1282f1: 74 0c je 1282ff <== NOT EXECUTED fclose(group_fp); 1282f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1282f6: 50 push %eax <== NOT EXECUTED 1282f7: e8 64 5e 01 00 call 13e160 <== NOT EXECUTED 1282fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 1282ff: c9 leave <== NOT EXECUTED 128300: c3 ret <== NOT EXECUTED =============================================================================== 00128301 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 128301: 55 push %ebp <== NOT EXECUTED 128302: 89 e5 mov %esp,%ebp <== NOT EXECUTED 128304: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp != NULL) 128307: a1 24 9b 16 00 mov 0x169b24,%eax <== NOT EXECUTED 12830c: 85 c0 test %eax,%eax <== NOT EXECUTED 12830e: 74 0c je 12831c <== NOT EXECUTED fclose(passwd_fp); 128310: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128313: 50 push %eax <== NOT EXECUTED 128314: e8 47 5e 01 00 call 13e160 <== NOT EXECUTED 128319: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12831c: c9 leave <== NOT EXECUTED 12831d: c3 ret <== NOT EXECUTED =============================================================================== 00108ccb : * 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) { 108ccb: 55 push %ebp <== NOT EXECUTED 108ccc: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108cce: 57 push %edi <== NOT EXECUTED 108ccf: 56 push %esi <== NOT EXECUTED 108cd0: 53 push %ebx <== NOT EXECUTED 108cd1: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 108cd4: 89 c3 mov %eax,%ebx <== NOT EXECUTED 108cd6: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED if (tty->ccount == 0) 108cd9: 83 78 20 00 cmpl $0x0,0x20(%eax) <== NOT EXECUTED 108cdd: 0f 84 59 01 00 00 je 108e3c <== NOT EXECUTED return; if (lineFlag) { 108ce3: 85 d2 test %edx,%edx <== NOT EXECUTED 108ce5: 0f 84 46 01 00 00 je 108e31 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 108ceb: 8b 40 3c mov 0x3c(%eax),%eax <== NOT EXECUTED 108cee: a8 08 test $0x8,%al <== NOT EXECUTED 108cf0: 75 0c jne 108cfe <== NOT EXECUTED tty->ccount = 0; 108cf2: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED return; 108cf9: e9 3e 01 00 00 jmp 108e3c <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 108cfe: a8 10 test $0x10,%al <== NOT EXECUTED 108d00: 0f 85 2b 01 00 00 jne 108e31 <== NOT EXECUTED tty->ccount = 0; 108d06: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 108d0d: 0f b6 43 44 movzbl 0x44(%ebx),%eax <== NOT EXECUTED 108d11: 89 da mov %ebx,%edx <== NOT EXECUTED 108d13: e8 5b ff ff ff call 108c73 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 108d18: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 108d1c: 0f 84 1a 01 00 00 je 108e3c <== NOT EXECUTED echo ('\n', tty); 108d22: 89 da mov %ebx,%edx <== NOT EXECUTED 108d24: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 108d29: eb 30 jmp 108d5b <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 108d2b: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108d2e: 8d 48 ff lea -0x1(%eax),%ecx <== NOT EXECUTED 108d31: 89 4b 20 mov %ecx,0x20(%ebx) <== NOT EXECUTED 108d34: 8a 54 02 ff mov -0x1(%edx,%eax,1),%dl <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 108d38: 8b 7b 3c mov 0x3c(%ebx),%edi <== NOT EXECUTED 108d3b: f7 c7 08 00 00 00 test $0x8,%edi <== NOT EXECUTED 108d41: 0f 84 e4 00 00 00 je 108e2b <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 108d47: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 108d4b: 75 1a jne 108d67 <== NOT EXECUTED 108d4d: f7 c7 10 00 00 00 test $0x10,%edi <== NOT EXECUTED 108d53: 75 12 jne 108d67 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 108d55: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 108d59: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 108d5b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108d5e: 5b pop %ebx <== NOT EXECUTED 108d5f: 5e pop %esi <== NOT EXECUTED 108d60: 5f pop %edi <== NOT EXECUTED 108d61: 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); 108d62: e9 0c ff ff ff jmp 108c73 <== NOT EXECUTED } else if (c == '\t') { 108d67: 80 fa 09 cmp $0x9,%dl <== NOT EXECUTED 108d6a: 8b 0d 20 40 12 00 mov 0x124020,%ecx <== NOT EXECUTED 108d70: 75 5d jne 108dcf <== NOT EXECUTED int col = tty->read_start_column; 108d72: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED * Erase a character or line * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) 108d75: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 108d7a: 81 e7 00 02 00 00 and $0x200,%edi <== NOT EXECUTED 108d80: 89 7d e0 mov %edi,-0x20(%ebp) <== NOT EXECUTED 108d83: 89 c7 mov %eax,%edi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 108d85: eb 27 jmp 108dae <== NOT EXECUTED c = tty->cbuf[i++]; 108d87: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 108d8a: 8a 44 10 ff mov -0x1(%eax,%edx,1),%al <== NOT EXECUTED if (c == '\t') { 108d8e: 3c 09 cmp $0x9,%al <== NOT EXECUTED 108d90: 75 05 jne 108d97 <== NOT EXECUTED col = (col | 7) + 1; 108d92: 83 ce 07 or $0x7,%esi <== NOT EXECUTED 108d95: eb 15 jmp 108dac <== NOT EXECUTED } else if (iscntrl (c)) { 108d97: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108d9a: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) <== NOT EXECUTED 108d9f: 74 0b je 108dac <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 108da1: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 108da5: 74 06 je 108dad <== NOT EXECUTED col += 2; 108da7: 83 c6 02 add $0x2,%esi <== NOT EXECUTED 108daa: eb 01 jmp 108dad <== NOT EXECUTED } else { col++; 108dac: 46 inc %esi <== NOT EXECUTED 108dad: 42 inc %edx <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 108dae: 39 fa cmp %edi,%edx <== NOT EXECUTED 108db0: 75 d5 jne 108d87 <== NOT EXECUTED 108db2: eb 14 jmp 108dc8 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 108db4: 57 push %edi <== NOT EXECUTED 108db5: 53 push %ebx <== NOT EXECUTED 108db6: 6a 01 push $0x1 <== NOT EXECUTED 108db8: 68 84 01 12 00 push $0x120184 <== NOT EXECUTED 108dbd: e8 73 fc ff ff call 108a35 <== NOT EXECUTED tty->column--; 108dc2: ff 4b 28 decl 0x28(%ebx) <== NOT EXECUTED 108dc5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 108dc8: 39 73 28 cmp %esi,0x28(%ebx) <== NOT EXECUTED 108dcb: 7f e7 jg 108db4 <== NOT EXECUTED 108dcd: eb 5c jmp 108e2b <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 108dcf: 0f b6 f2 movzbl %dl,%esi <== NOT EXECUTED 108dd2: f6 44 31 01 20 testb $0x20,0x1(%ecx,%esi,1) <== NOT EXECUTED 108dd7: 74 24 je 108dfd <== NOT EXECUTED 108dd9: 81 e7 00 02 00 00 and $0x200,%edi <== NOT EXECUTED 108ddf: 74 1c je 108dfd <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 108de1: 51 push %ecx <== NOT EXECUTED 108de2: 53 push %ebx <== NOT EXECUTED 108de3: 6a 03 push $0x3 <== NOT EXECUTED 108de5: 68 82 01 12 00 push $0x120182 <== NOT EXECUTED 108dea: e8 46 fc ff ff call 108a35 <== NOT EXECUTED if (tty->column) 108def: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108df2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108df5: 85 c0 test %eax,%eax <== NOT EXECUTED 108df7: 74 04 je 108dfd <== NOT EXECUTED tty->column--; 108df9: 48 dec %eax <== NOT EXECUTED 108dfa: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 108dfd: a1 20 40 12 00 mov 0x124020,%eax <== NOT EXECUTED 108e02: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1) <== NOT EXECUTED 108e07: 74 06 je 108e0f <== NOT EXECUTED 108e09: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 108e0d: 74 1c je 108e2b <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 108e0f: 52 push %edx <== NOT EXECUTED 108e10: 53 push %ebx <== NOT EXECUTED 108e11: 6a 03 push $0x3 <== NOT EXECUTED 108e13: 68 82 01 12 00 push $0x120182 <== NOT EXECUTED 108e18: e8 18 fc ff ff call 108a35 <== NOT EXECUTED if (tty->column) 108e1d: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108e20: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108e23: 85 c0 test %eax,%eax <== NOT EXECUTED 108e25: 74 04 je 108e2b <== NOT EXECUTED tty->column--; 108e27: 48 dec %eax <== NOT EXECUTED 108e28: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } } } if (!lineFlag) 108e2b: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 108e2f: 74 0b je 108e3c <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 108e31: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108e34: 85 c0 test %eax,%eax <== NOT EXECUTED 108e36: 0f 85 ef fe ff ff jne 108d2b <== NOT EXECUTED } } if (!lineFlag) break; } } 108e3c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108e3f: 5b pop %ebx <== NOT EXECUTED 108e40: 5e pop %esi <== NOT EXECUTED 108e41: 5f pop %edi <== NOT EXECUTED 108e42: c9 leave <== NOT EXECUTED 108e43: c3 ret <== NOT EXECUTED =============================================================================== 00125aa6 : #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) { 125aa6: 55 push %ebp <== NOT EXECUTED 125aa7: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125aa9: 57 push %edi <== NOT EXECUTED 125aaa: 56 push %esi <== NOT EXECUTED 125aab: 53 push %ebx <== NOT EXECUTED 125aac: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 125aaf: 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) 125ab2: 80 bb 81 00 00 00 00 cmpb $0x0,0x81(%ebx) <== NOT EXECUTED 125ab9: 75 4b jne 125b06 <== NOT EXECUTED { if (op_type == FAT_OP_TYPE_READ) 125abb: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED 125abf: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED 125ac5: 75 11 jne 125ad8 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 125ac7: 50 push %eax <== NOT EXECUTED 125ac8: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 125acb: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 125ace: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 125ad1: e8 3e 54 fe ff call 10af14 <== NOT EXECUTED 125ad6: eb 0f jmp 125ae7 <== NOT EXECUTED else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 125ad8: 50 push %eax <== NOT EXECUTED 125ad9: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 125adc: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 125adf: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 125ae2: e8 6f 53 fe ff call 10ae56 <== NOT EXECUTED 125ae7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 125aea: 85 c0 test %eax,%eax <== NOT EXECUTED 125aec: 0f 85 54 01 00 00 jne 125c46 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 125af2: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 125af5: 89 43 7c mov %eax,0x7c(%ebx) <== NOT EXECUTED fs_info->c.modified = 0; 125af8: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 125aff: c6 83 81 00 00 00 01 movb $0x1,0x81(%ebx) <== NOT EXECUTED } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 125b06: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED 125b09: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx <== NOT EXECUTED 125b0d: 31 d2 xor %edx,%edx <== NOT EXECUTED 125b0f: 39 c8 cmp %ecx,%eax <== NOT EXECUTED 125b11: 72 08 jb 125b1b <== NOT EXECUTED 125b13: 31 d2 xor %edx,%edx <== NOT EXECUTED 125b15: 3b 43 1c cmp 0x1c(%ebx),%eax <== NOT EXECUTED 125b18: 0f 92 c2 setb %dl <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 125b1b: 3b 45 0c cmp 0xc(%ebp),%eax <== NOT EXECUTED 125b1e: 0f 84 3f 01 00 00 je 125c63 <== NOT EXECUTED { if (fs_info->c.modified) 125b24: 80 bb 80 00 00 00 00 cmpb $0x0,0x80(%ebx) <== NOT EXECUTED 125b2b: 0f 84 c6 00 00 00 je 125bf7 <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 125b31: 84 d2 test %dl,%dl <== NOT EXECUTED 125b33: 74 1c je 125b51 <== NOT EXECUTED 125b35: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 125b39: 75 16 jne 125b51 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 125b3b: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax <== NOT EXECUTED 125b41: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 125b44: 8b b3 84 00 00 00 mov 0x84(%ebx),%esi <== NOT EXECUTED 125b4a: 8b 76 20 mov 0x20(%esi),%esi <== NOT EXECUTED 125b4d: 89 c7 mov %eax,%edi <== NOT EXECUTED 125b4f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 125b51: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125b54: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 125b5a: 88 55 d0 mov %dl,-0x30(%ebp) <== NOT EXECUTED 125b5d: e8 ac 44 fe ff call 10a00e <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; 125b62: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED fs_info->c.modified = 0; 125b69: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 125b70: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125b73: 85 c0 test %eax,%eax <== NOT EXECUTED 125b75: 8a 55 d0 mov -0x30(%ebp),%dl <== NOT EXECUTED 125b78: 0f 85 c8 00 00 00 jne 125c46 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 125b7e: 84 d2 test %dl,%dl <== NOT EXECUTED 125b80: 0f 84 8d 00 00 00 je 125c13 <== NOT EXECUTED 125b86: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 125b8a: 0f 85 83 00 00 00 jne 125c13 <== NOT EXECUTED 125b90: c6 45 d7 01 movb $0x1,-0x29(%ebp) <== NOT EXECUTED 125b94: eb 57 jmp 125bed <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 125b96: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 125b99: 50 push %eax <== NOT EXECUTED 125b9a: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 125b9e: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED 125ba2: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 125ba5: 50 push %eax <== NOT EXECUTED 125ba6: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 125ba9: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 125bac: e8 a5 52 fe ff call 10ae56 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 125bb1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125bb4: 85 c0 test %eax,%eax <== NOT EXECUTED 125bb6: 75 25 jne 125bdd <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 125bb8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 125bbb: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED 125bbe: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 125bc1: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi <== NOT EXECUTED 125bc7: 89 c7 mov %eax,%edi <== NOT EXECUTED 125bc9: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 125bcb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125bce: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 125bd1: e8 38 44 fe ff call 10a00e <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 125bd6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125bd9: 85 c0 test %eax,%eax <== NOT EXECUTED 125bdb: 74 0d je 125bea <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 125bdd: e8 32 84 01 00 call 13e014 <__errno> <== NOT EXECUTED 125be2: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 125be8: eb 67 jmp 125c51 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 125bea: fe 45 d7 incb -0x29(%ebp) <== NOT EXECUTED 125bed: 8a 45 d7 mov -0x29(%ebp),%al <== NOT EXECUTED 125bf0: 3a 43 09 cmp 0x9(%ebx),%al <== NOT EXECUTED 125bf3: 72 a1 jb 125b96 <== NOT EXECUTED 125bf5: eb 1c jmp 125c13 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 125bf7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125bfa: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 125c00: e8 72 44 fe ff call 10a077 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; 125c05: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 125c0c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125c0f: 85 c0 test %eax,%eax <== NOT EXECUTED 125c11: 75 33 jne 125c46 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 125c13: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED 125c17: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED 125c1d: 75 11 jne 125c30 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 125c1f: 50 push %eax <== NOT EXECUTED 125c20: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 125c23: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 125c26: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 125c29: e8 e6 52 fe ff call 10af14 <== NOT EXECUTED 125c2e: eb 0f jmp 125c3f <== NOT EXECUTED else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 125c30: 50 push %eax <== NOT EXECUTED 125c31: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 125c34: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 125c37: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 125c3a: e8 17 52 fe ff call 10ae56 <== NOT EXECUTED 125c3f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 125c42: 85 c0 test %eax,%eax <== NOT EXECUTED 125c44: 74 10 je 125c56 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 125c46: e8 c9 83 01 00 call 13e014 <__errno> <== NOT EXECUTED 125c4b: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 125c51: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 125c54: eb 1a jmp 125c70 <== NOT EXECUTED fs_info->c.blk_num = blk; 125c56: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 125c59: 89 43 7c mov %eax,0x7c(%ebx) <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 125c5c: c6 83 81 00 00 00 01 movb $0x1,0x81(%ebx) <== NOT EXECUTED } *buf = fs_info->c.buf; 125c63: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx <== NOT EXECUTED 125c69: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 125c6c: 89 10 mov %edx,(%eax) <== NOT EXECUTED 125c6e: 31 c0 xor %eax,%eax <== NOT EXECUTED return RC_OK; } 125c70: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125c73: 5b pop %ebx <== NOT EXECUTED 125c74: 5e pop %esi <== NOT EXECUTED 125c75: 5f pop %edi <== NOT EXECUTED 125c76: c9 leave <== NOT EXECUTED 125c77: c3 ret <== NOT EXECUTED =============================================================================== 0012595f : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 12595f: 55 push %ebp <== NOT EXECUTED 125960: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125962: 57 push %edi <== NOT EXECUTED 125963: 56 push %esi <== NOT EXECUTED 125964: 53 push %ebx <== NOT EXECUTED 125965: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 125968: 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) 12596b: 31 c0 xor %eax,%eax <== NOT EXECUTED 12596d: 80 bb 81 00 00 00 00 cmpb $0x0,0x81(%ebx) <== NOT EXECUTED 125974: 0f 84 0f 01 00 00 je 125a89 <== NOT EXECUTED return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 12597a: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED 12597d: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx <== NOT EXECUTED 125981: 31 d2 xor %edx,%edx <== NOT EXECUTED 125983: 39 c8 cmp %ecx,%eax <== NOT EXECUTED 125985: 72 08 jb 12598f <== NOT EXECUTED 125987: 31 d2 xor %edx,%edx <== NOT EXECUTED 125989: 3b 43 1c cmp 0x1c(%ebx),%eax <== NOT EXECUTED 12598c: 0f 92 c2 setb %dl <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 12598f: 80 bb 80 00 00 00 00 cmpb $0x0,0x80(%ebx) <== NOT EXECUTED 125996: 0f 84 c2 00 00 00 je 125a5e <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 12599c: 84 d2 test %dl,%dl <== NOT EXECUTED 12599e: 74 1c je 1259bc <== NOT EXECUTED 1259a0: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 1259a4: 75 16 jne 1259bc <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 1259a6: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax <== NOT EXECUTED 1259ac: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 1259af: 8b b3 84 00 00 00 mov 0x84(%ebx),%esi <== NOT EXECUTED 1259b5: 8b 76 20 mov 0x20(%esi),%esi <== NOT EXECUTED 1259b8: 89 c7 mov %eax,%edi <== NOT EXECUTED 1259ba: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED sc = rtems_bdbuf_release_modified(fs_info->c.buf); 1259bc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1259bf: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 1259c5: 88 55 d0 mov %dl,-0x30(%ebp) <== NOT EXECUTED 1259c8: e8 41 46 fe ff call 10a00e <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 1259cd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1259d0: 85 c0 test %eax,%eax <== NOT EXECUTED 1259d2: 8a 55 d0 mov -0x30(%ebp),%dl <== NOT EXECUTED 1259d5: 0f 85 98 00 00 00 jne 125a73 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 1259db: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) 1259e2: 84 d2 test %dl,%dl <== NOT EXECUTED 1259e4: 0f 84 96 00 00 00 je 125a80 <== NOT EXECUTED 1259ea: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 1259ee: 0f 85 8c 00 00 00 jne 125a80 <== NOT EXECUTED 1259f4: c6 45 d7 01 movb $0x1,-0x29(%ebp) <== NOT EXECUTED 1259f8: eb 5a jmp 125a54 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 1259fa: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 1259fd: 50 push %eax <== NOT EXECUTED 1259fe: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 125a02: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED 125a06: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 125a09: 50 push %eax <== NOT EXECUTED 125a0a: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 125a0d: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 125a10: e8 41 54 fe ff call 10ae56 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 125a15: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125a18: 85 c0 test %eax,%eax <== NOT EXECUTED 125a1a: 74 10 je 125a2c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 125a1c: e8 f3 85 01 00 call 13e014 <__errno> <== NOT EXECUTED 125a21: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 125a27: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 125a2a: eb 5d jmp 125a89 <== NOT EXECUTED memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 125a2c: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 125a2f: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED 125a32: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 125a35: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi <== NOT EXECUTED 125a3b: 89 c7 mov %eax,%edi <== NOT EXECUTED 125a3d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 125a3f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125a42: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 125a45: e8 c4 45 fe ff call 10a00e <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 125a4a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125a4d: 85 c0 test %eax,%eax <== NOT EXECUTED 125a4f: 75 cb jne 125a1c <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 125a51: fe 45 d7 incb -0x29(%ebp) <== NOT EXECUTED 125a54: 8a 45 d7 mov -0x29(%ebp),%al <== NOT EXECUTED 125a57: 3a 43 09 cmp 0x9(%ebx),%al <== NOT EXECUTED 125a5a: 72 9e jb 1259fa <== NOT EXECUTED 125a5c: eb 22 jmp 125a80 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 125a5e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125a61: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 125a67: e8 0b 46 fe ff call 10a077 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 125a6c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125a6f: 85 c0 test %eax,%eax <== NOT EXECUTED 125a71: 74 0d je 125a80 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 125a73: e8 9c 85 01 00 call 13e014 <__errno> <== NOT EXECUTED 125a78: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 125a7e: eb a7 jmp 125a27 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 125a80: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED 125a87: 31 c0 xor %eax,%eax <== NOT EXECUTED return RC_OK; } 125a89: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125a8c: 5b pop %ebx <== NOT EXECUTED 125a8d: 5e pop %esi <== NOT EXECUTED 125a8e: 5f pop %edi <== NOT EXECUTED 125a8f: c9 leave <== NOT EXECUTED 125a90: c3 ret <== NOT EXECUTED =============================================================================== 001265e3 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 1265e3: 55 push %ebp <== NOT EXECUTED 1265e4: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1265e6: 56 push %esi <== NOT EXECUTED 1265e7: 53 push %ebx <== NOT EXECUTED 1265e8: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 1265eb: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 1265ee: 8b 56 34 mov 0x34(%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)) ) 1265f1: 85 c0 test %eax,%eax <== NOT EXECUTED 1265f3: 75 0b jne 126600 <== NOT EXECUTED 1265f5: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED 1265f9: 74 05 je 126600 <== NOT EXECUTED return fs_info->vol.rdir_loc; 1265fb: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1265fe: eb 0c jmp 12660c <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 126600: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 126603: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED 126607: d3 e0 shl %cl,%eax <== NOT EXECUTED 126609: 03 42 30 add 0x30(%edx),%eax <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 12660c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12660f: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 126612: 0f b6 5a 04 movzbl 0x4(%edx),%ebx <== NOT EXECUTED 126616: 0f b6 4a 02 movzbl 0x2(%edx),%ecx <== NOT EXECUTED 12661a: d3 e3 shl %cl,%ebx <== NOT EXECUTED 12661c: 53 push %ebx <== NOT EXECUTED 12661d: 6a 00 push $0x0 <== NOT EXECUTED 12661f: 50 push %eax <== NOT EXECUTED 126620: 56 push %esi <== NOT EXECUTED 126621: e8 44 f9 ff ff call 125f6a <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 126626: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 126629: 5b pop %ebx <== NOT EXECUTED 12662a: 5e pop %esi <== NOT EXECUTED 12662b: c9 leave <== NOT EXECUTED 12662c: c3 ret <== NOT EXECUTED =============================================================================== 00125e7d : fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 125e7d: 55 push %ebp <== NOT EXECUTED 125e7e: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125e80: 56 push %esi <== NOT EXECUTED 125e81: 53 push %ebx <== NOT EXECUTED 125e82: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 125e85: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 125e88: 8b 56 34 mov 0x34(%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)) ) 125e8b: 85 c0 test %eax,%eax <== NOT EXECUTED 125e8d: 75 0b jne 125e9a <== NOT EXECUTED 125e8f: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED 125e93: 74 05 je 125e9a <== NOT EXECUTED return fs_info->vol.rdir_loc; 125e95: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 125e98: eb 0c jmp 125ea6 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 125e9a: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 125e9d: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED 125ea1: d3 e0 shl %cl,%eax <== NOT EXECUTED 125ea3: 03 42 30 add 0x30(%edx),%eax <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, 125ea6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125ea9: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 125eac: 0f b6 5a 04 movzbl 0x4(%edx),%ebx <== NOT EXECUTED 125eb0: 0f b6 4a 02 movzbl 0x2(%edx),%ecx <== NOT EXECUTED 125eb4: d3 e3 shl %cl,%ebx <== NOT EXECUTED 125eb6: 53 push %ebx <== NOT EXECUTED 125eb7: 6a 00 push $0x0 <== NOT EXECUTED 125eb9: 50 push %eax <== NOT EXECUTED 125eba: 56 push %esi <== NOT EXECUTED 125ebb: e8 b8 fd ff ff call 125c78 <_fat_block_write> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 125ec0: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 125ec3: 5b pop %ebx <== NOT EXECUTED 125ec4: 5e pop %esi <== NOT EXECUTED 125ec5: c9 leave <== NOT EXECUTED 125ec6: c3 ret <== NOT EXECUTED =============================================================================== 00125d16 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 125d16: 55 push %ebp <== NOT EXECUTED 125d17: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125d19: 57 push %edi <== NOT EXECUTED 125d1a: 56 push %esi <== NOT EXECUTED 125d1b: 53 push %ebx <== NOT EXECUTED 125d1c: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 125d1f: 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; 125d22: 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); 125d25: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 125d28: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 125d2b: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 125d2e: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 125d31: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 125d34: 50 push %eax <== NOT EXECUTED 125d35: 6a 04 push $0x4 <== NOT EXECUTED 125d37: 68 e8 01 00 00 push $0x1e8 <== NOT EXECUTED 125d3c: 0f b7 46 3c movzwl 0x3c(%esi),%eax <== NOT EXECUTED 125d40: 50 push %eax <== NOT EXECUTED 125d41: 53 push %ebx <== NOT EXECUTED 125d42: e8 31 ff ff ff call 125c78 <_fat_block_write> <== NOT EXECUTED 125d47: 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, 125d49: 83 c4 14 add $0x14,%esp <== NOT EXECUTED 125d4c: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 125d4f: 50 push %eax <== NOT EXECUTED 125d50: 6a 04 push $0x4 <== NOT EXECUTED 125d52: 68 ec 01 00 00 push $0x1ec <== NOT EXECUTED 125d57: 0f b7 46 3c movzwl 0x3c(%esi),%eax <== NOT EXECUTED 125d5b: 50 push %eax <== NOT EXECUTED 125d5c: 53 push %ebx <== NOT EXECUTED 125d5d: e8 16 ff ff ff call 125c78 <_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) ) 125d62: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 125d65: 85 c0 test %eax,%eax <== NOT EXECUTED 125d67: 78 06 js 125d6f <== NOT EXECUTED 125d69: 31 c0 xor %eax,%eax <== NOT EXECUTED 125d6b: 85 ff test %edi,%edi <== NOT EXECUTED 125d6d: 79 03 jns 125d72 <== NOT EXECUTED 125d6f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; return RC_OK; } 125d72: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125d75: 5b pop %ebx <== NOT EXECUTED 125d76: 5e pop %esi <== NOT EXECUTED 125d77: 5f pop %edi <== NOT EXECUTED 125d78: c9 leave <== NOT EXECUTED 125d79: c3 ret <== NOT EXECUTED =============================================================================== 001255cd : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 1255cd: 55 push %ebp <== NOT EXECUTED 1255ce: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1255d0: 57 push %edi <== NOT EXECUTED 1255d1: 56 push %esi <== NOT EXECUTED 1255d2: 53 push %ebx <== NOT EXECUTED 1255d3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1255d6: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 1255d9: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 1255dc: 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) 1255df: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 1255e2: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 1255e5: 76 0b jbe 1255f2 <== NOT EXECUTED { fat_fd->links_num--; 1255e7: 48 dec %eax <== NOT EXECUTED 1255e8: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED 1255eb: 31 c0 xor %eax,%eax <== NOT EXECUTED return rc; 1255ed: e9 82 00 00 00 jmp 125674 <== NOT EXECUTED } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 1255f2: f6 43 30 01 testb $0x1,0x30(%ebx) <== NOT EXECUTED 1255f6: 74 3f je 125637 <== NOT EXECUTED { rc = fat_file_truncate(mt_entry, fat_fd, 0); 1255f8: 50 push %eax <== NOT EXECUTED 1255f9: 6a 00 push $0x0 <== NOT EXECUTED 1255fb: 53 push %ebx <== NOT EXECUTED 1255fc: 56 push %esi <== NOT EXECUTED 1255fd: e8 9d f9 ff ff call 124f9f <== NOT EXECUTED if ( rc != RC_OK ) 125602: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125605: 85 c0 test %eax,%eax <== NOT EXECUTED 125607: 75 6b jne 125674 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 125609: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12560c: 53 push %ebx <== NOT EXECUTED 12560d: e8 86 c0 fe ff call 111698 <_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) ) 125612: 5a pop %edx <== NOT EXECUTED 125613: 59 pop %ecx <== NOT EXECUTED 125614: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 125617: 56 push %esi <== NOT EXECUTED 125618: e8 92 02 00 00 call 1258af <== NOT EXECUTED 12561d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125620: 84 c0 test %al,%al <== NOT EXECUTED 125622: 74 0e je 125632 <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); 125624: 50 push %eax <== NOT EXECUTED 125625: 50 push %eax <== NOT EXECUTED 125626: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 125629: 56 push %esi <== NOT EXECUTED 12562a: e8 59 02 00 00 call 125888 <== NOT EXECUTED 12562f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(fat_fd); 125632: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125635: eb 25 jmp 12565c <== NOT EXECUTED } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 125637: 51 push %ecx <== NOT EXECUTED 125638: 51 push %ecx <== NOT EXECUTED 125639: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 12563c: 56 push %esi <== NOT EXECUTED 12563d: e8 6d 02 00 00 call 1258af <== NOT EXECUTED 125642: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125645: 84 c0 test %al,%al <== NOT EXECUTED 125647: 74 09 je 125652 <== NOT EXECUTED { fat_fd->links_num = 0; 125649: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED 125650: eb 13 jmp 125665 <== NOT EXECUTED 125652: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125655: 53 push %ebx <== NOT EXECUTED 125656: e8 3d c0 fe ff call 111698 <_Chain_Extract> <== NOT EXECUTED } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 12565b: 5a pop %edx <== NOT EXECUTED 12565c: 53 push %ebx <== NOT EXECUTED 12565d: e8 3a 78 fe ff call 10ce9c <== NOT EXECUTED 125662: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 125665: 89 7d 08 mov %edi,0x8(%ebp) <== NOT EXECUTED return rc; } 125668: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12566b: 5b pop %ebx <== NOT EXECUTED 12566c: 5e pop %esi <== NOT EXECUTED 12566d: 5f pop %edi <== NOT EXECUTED 12566e: c9 leave <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 12566f: e9 eb 02 00 00 jmp 12595f <== NOT EXECUTED return rc; } 125674: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125677: 5b pop %ebx <== NOT EXECUTED 125678: 5e pop %esi <== NOT EXECUTED 125679: 5f pop %edi <== NOT EXECUTED 12567a: c9 leave <== NOT EXECUTED 12567b: c3 ret <== NOT EXECUTED =============================================================================== 00124dd4 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 124dd4: 55 push %ebp <== NOT EXECUTED 124dd5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 124dd7: 57 push %edi <== NOT EXECUTED 124dd8: 56 push %esi <== NOT EXECUTED 124dd9: 53 push %ebx <== NOT EXECUTED 124dda: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 124ddd: 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; 124de0: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 124de3: 8b 72 34 mov 0x34(%edx),%esi <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 124de6: 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) 124de9: 31 db xor %ebx,%ebx <== NOT EXECUTED 124deb: 83 78 18 00 cmpl $0x0,0x18(%eax) <== NOT EXECUTED 124def: 0f 84 c9 00 00 00 je 124ebe <== 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; 124df5: 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; 124dfc: 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); 124dff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124e02: 56 push %esi <== NOT EXECUTED 124e03: e8 57 0b 00 00 call 12595f <== NOT EXECUTED 124e08: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (rc != RC_OK) 124e0a: 83 c4 10 add $0x10,%esp <== 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); 124e0d: 89 c7 mov %eax,%edi <== 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); if (rc != RC_OK) 124e0f: 85 c0 test %eax,%eax <== NOT EXECUTED 124e11: 0f 84 94 00 00 00 je 124eab <== NOT EXECUTED 124e17: e9 a2 00 00 00 jmp 124ebe <== 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; 124e1c: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 124e1f: 8b 42 34 mov 0x34(%edx),%eax <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 124e22: 85 db test %ebx,%ebx <== NOT EXECUTED 124e24: 75 0b jne 124e31 <== NOT EXECUTED 124e26: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED 124e2a: 74 05 je 124e31 <== NOT EXECUTED return fs_info->vol.rdir_loc; 124e2c: 8b 58 1c mov 0x1c(%eax),%ebx <== NOT EXECUTED 124e2f: eb 0c jmp 124e3d <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 124e31: 83 eb 02 sub $0x2,%ebx <== NOT EXECUTED 124e34: 0f b6 48 05 movzbl 0x5(%eax),%ecx <== NOT EXECUTED 124e38: d3 e3 shl %cl,%ebx <== NOT EXECUTED 124e3a: 03 58 30 add 0x30(%eax),%ebx <== NOT EXECUTED 124e3d: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== 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++ ) 124e44: eb 41 jmp 124e87 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 124e46: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 124e49: 50 push %eax <== NOT EXECUTED 124e4a: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 124e4d: 01 d8 add %ebx,%eax <== NOT EXECUTED 124e4f: 50 push %eax <== NOT EXECUTED 124e50: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED 124e53: ff 76 54 pushl 0x54(%esi) <== NOT EXECUTED 124e56: e8 b9 60 fe ff call 10af14 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 124e5b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124e5e: 85 c0 test %eax,%eax <== NOT EXECUTED 124e60: 75 12 jne 124e74 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 124e62: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124e65: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 124e68: e8 18 5a fe ff call 10a885 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 124e6d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124e70: 85 c0 test %eax,%eax <== NOT EXECUTED 124e72: 74 10 je 124e84 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 124e74: e8 9b 91 01 00 call 13e014 <__errno> <== NOT EXECUTED 124e79: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 124e7f: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 124e82: eb 3a jmp 124ebe <== 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++ ) 124e84: ff 45 d4 incl -0x2c(%ebp) <== NOT EXECUTED 124e87: 0f b6 46 04 movzbl 0x4(%esi),%eax <== NOT EXECUTED 124e8b: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 124e8e: 72 b6 jb 124e46 <== 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); 124e90: 52 push %edx <== NOT EXECUTED 124e91: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED 124e94: 52 push %edx <== NOT EXECUTED 124e95: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 124e98: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 124e9b: e8 51 55 01 00 call 13a3f1 <== NOT EXECUTED if ( rc != RC_OK ) 124ea0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124ea3: 85 c0 test %eax,%eax <== NOT EXECUTED 124ea5: 74 04 je 124eab <== NOT EXECUTED 124ea7: 89 c3 mov %eax,%ebx <== NOT EXECUTED 124ea9: eb 13 jmp 124ebe <== 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) 124eab: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED 124eae: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED 124eb1: 21 d8 and %ebx,%eax <== NOT EXECUTED 124eb3: 3b 46 10 cmp 0x10(%esi),%eax <== NOT EXECUTED 124eb6: 0f 82 60 ff ff ff jb 124e1c <== NOT EXECUTED 124ebc: 89 fb mov %edi,%ebx <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 124ebe: 89 d8 mov %ebx,%eax <== NOT EXECUTED 124ec0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 124ec3: 5b pop %ebx <== NOT EXECUTED 124ec4: 5e pop %esi <== NOT EXECUTED 124ec5: 5f pop %edi <== NOT EXECUTED 124ec6: c9 leave <== NOT EXECUTED 124ec7: c3 ret <== NOT EXECUTED =============================================================================== 00125079 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 125079: 55 push %ebp <== NOT EXECUTED 12507a: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12507c: 57 push %edi <== NOT EXECUTED 12507d: 56 push %esi <== NOT EXECUTED 12507e: 53 push %ebx <== NOT EXECUTED 12507f: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 125082: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 125085: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 125088: 8b 7e 34 mov 0x34(%esi),%edi <== NOT EXECUTED uint32_t chain = 0; 12508b: 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; 125092: 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; 125099: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 12509c: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 12509f: 89 10 mov %edx,(%eax) <== NOT EXECUTED if (new_length <= fat_fd->fat_file_size) 1250a1: 8b 43 18 mov 0x18(%ebx),%eax <== NOT EXECUTED 1250a4: 39 c2 cmp %eax,%edx <== NOT EXECUTED 1250a6: 0f 86 61 01 00 00 jbe 12520d <== NOT EXECUTED return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 1250ac: 83 7b 20 01 cmpl $0x1,0x20(%ebx) <== NOT EXECUTED 1250b0: 75 0c jne 1250be <== NOT EXECUTED 1250b2: 83 7b 24 00 cmpl $0x0,0x24(%ebx) <== NOT EXECUTED 1250b6: 75 06 jne 1250be <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 1250b8: f6 47 0a 03 testb $0x3,0xa(%edi) <== NOT EXECUTED 1250bc: 75 73 jne 125131 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 1250be: 0f b7 4f 06 movzwl 0x6(%edi),%ecx <== NOT EXECUTED 1250c2: 8d 51 ff lea -0x1(%ecx),%edx <== NOT EXECUTED 1250c5: 89 55 d0 mov %edx,-0x30(%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 - 1250c8: 21 c2 and %eax,%edx <== NOT EXECUTED 1250ca: 29 d1 sub %edx,%ecx <== NOT EXECUTED 1250cc: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 1250cf: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 1250d2: 21 55 d4 and %edx,-0x2c(%ebp) <== 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; 1250d5: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 1250d8: 29 c2 sub %eax,%edx <== NOT EXECUTED 1250da: 89 d0 mov %edx,%eax <== NOT EXECUTED if (bytes2add > bytes_remain) 1250dc: 3b 55 d4 cmp -0x2c(%ebp),%edx <== NOT EXECUTED 1250df: 0f 86 28 01 00 00 jbe 12520d <== 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) 1250e5: 2b 45 d4 sub -0x2c(%ebp),%eax <== NOT EXECUTED 1250e8: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 1250eb: 0f 84 1c 01 00 00 je 12520d <== NOT EXECUTED return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 1250f1: 48 dec %eax <== NOT EXECUTED 1250f2: 0f b6 4f 08 movzbl 0x8(%edi),%ecx <== NOT EXECUTED 1250f6: d3 e8 shr %cl,%eax <== NOT EXECUTED 1250f8: 8d 48 01 lea 0x1(%eax),%ecx <== NOT EXECUTED rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 1250fb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1250fe: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 125101: 50 push %eax <== NOT EXECUTED 125102: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 125105: 50 push %eax <== NOT EXECUTED 125106: 51 push %ecx <== NOT EXECUTED 125107: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12510a: 50 push %eax <== NOT EXECUTED 12510b: 56 push %esi <== NOT EXECUTED 12510c: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 12510f: e8 f3 54 01 00 call 13a607 <== NOT EXECUTED &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 125114: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 125117: 89 c2 mov %eax,%edx <== NOT EXECUTED 125119: 85 c0 test %eax,%eax <== NOT EXECUTED 12511b: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 12511e: 0f 85 eb 00 00 00 jne 12520f <== NOT EXECUTED return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 125124: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 125127: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED 12512b: 75 17 jne 125144 <== NOT EXECUTED 12512d: 85 c0 test %eax,%eax <== NOT EXECUTED 12512f: 75 13 jne 125144 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); 125131: e8 de 8e 01 00 call 13e014 <__errno> <== NOT EXECUTED 125136: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 12513c: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 12513f: e9 cb 00 00 00 jmp 12520f <== NOT EXECUTED /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 125144: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 125146: 74 20 je 125168 <== NOT EXECUTED *a_length = new_length - 125148: f7 d0 not %eax <== NOT EXECUTED 12514a: 01 c8 add %ecx,%eax <== NOT EXECUTED 12514c: 0f b6 4f 08 movzbl 0x8(%edi),%ecx <== NOT EXECUTED 125150: d3 e0 shl %cl,%eax <== NOT EXECUTED 125152: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 125155: 29 c2 sub %eax,%edx <== NOT EXECUTED 125157: 89 d0 mov %edx,%eax <== NOT EXECUTED 125159: 0f b7 57 06 movzwl 0x6(%edi),%edx <== NOT EXECUTED 12515d: 4a dec %edx <== NOT EXECUTED 12515e: 23 55 d0 and -0x30(%ebp),%edx <== NOT EXECUTED 125161: 29 d0 sub %edx,%eax <== NOT EXECUTED 125163: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 125166: 89 02 mov %eax,(%edx) <== 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 ) 125168: 8b 43 18 mov 0x18(%ebx),%eax <== NOT EXECUTED 12516b: 85 c0 test %eax,%eax <== NOT EXECUTED 12516d: 75 12 jne 125181 <== NOT EXECUTED { fat_fd->map.disk_cln = fat_fd->cln = chain; 12516f: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 125172: 89 43 1c mov %eax,0x1c(%ebx) <== NOT EXECUTED 125175: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED fat_fd->map.file_cln = 0; 125178: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) <== NOT EXECUTED 12517f: eb 4a jmp 1251cb <== NOT EXECUTED } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 125181: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED 125184: 83 fa ff cmp $0xffffffff,%edx <== NOT EXECUTED 125187: 74 05 je 12518e <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; 125189: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 12518c: eb 1b jmp 1251a9 <== NOT EXECUTED } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 12518e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125191: 8d 55 e0 lea -0x20(%ebp),%edx <== NOT EXECUTED 125194: 52 push %edx <== NOT EXECUTED 125195: 48 dec %eax <== NOT EXECUTED 125196: 50 push %eax <== NOT EXECUTED 125197: 6a 01 push $0x1 <== NOT EXECUTED 125199: 53 push %ebx <== NOT EXECUTED 12519a: 56 push %esi <== NOT EXECUTED 12519b: e8 76 fd ff ff call 124f16 <== NOT EXECUTED 1251a0: 89 c2 mov %eax,%edx <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 1251a2: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1251a5: 85 c0 test %eax,%eax <== NOT EXECUTED 1251a7: 75 48 jne 1251f1 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 1251a9: 50 push %eax <== NOT EXECUTED 1251aa: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 1251ad: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 1251b0: 56 push %esi <== NOT EXECUTED 1251b1: e8 22 50 01 00 call 13a1d8 <== NOT EXECUTED 1251b6: 89 c2 mov %eax,%edx <== NOT EXECUTED if ( rc != RC_OK ) 1251b8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1251bb: 85 c0 test %eax,%eax <== NOT EXECUTED 1251bd: 75 32 jne 1251f1 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 1251bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1251c2: 57 push %edi <== NOT EXECUTED 1251c3: e8 97 07 00 00 call 12595f <== NOT EXECUTED 1251c8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 1251cb: 83 7d d8 00 cmpl $0x0,-0x28(%ebp) <== NOT EXECUTED 1251cf: 74 36 je 125207 <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 1251d1: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 1251d4: 89 43 3c mov %eax,0x3c(%ebx) <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) 1251d7: 83 7b 10 01 cmpl $0x1,0x10(%ebx) <== NOT EXECUTED 1251db: 75 2a jne 125207 <== NOT EXECUTED { rc = fat_init_clusters_chain(mt_entry, chain); 1251dd: 57 push %edi <== NOT EXECUTED 1251de: 57 push %edi <== NOT EXECUTED 1251df: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 1251e2: 56 push %esi <== NOT EXECUTED 1251e3: e8 df 0c 00 00 call 125ec7 <== NOT EXECUTED 1251e8: 89 c2 mov %eax,%edx <== NOT EXECUTED if ( rc != RC_OK ) 1251ea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1251ed: 85 c0 test %eax,%eax <== NOT EXECUTED 1251ef: 74 16 je 125207 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); 1251f1: 53 push %ebx <== NOT EXECUTED 1251f2: 53 push %ebx <== NOT EXECUTED 1251f3: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 1251f6: 56 push %esi <== NOT EXECUTED 1251f7: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 1251fa: e8 5c 53 01 00 call 13a55b <== NOT EXECUTED return rc; 1251ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125202: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 125205: eb 08 jmp 12520f <== NOT EXECUTED } } } fat_fd->fat_file_size = new_length; 125207: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 12520a: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED return RC_OK; 12520d: 31 d2 xor %edx,%edx <== NOT EXECUTED } 12520f: 89 d0 mov %edx,%eax <== NOT EXECUTED 125211: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125214: 5b pop %ebx <== NOT EXECUTED 125215: 5e pop %esi <== NOT EXECUTED 125216: 5f pop %edi <== NOT EXECUTED 125217: c9 leave <== NOT EXECUTED 125218: c3 ret <== NOT EXECUTED =============================================================================== 00124f16 : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 124f16: 55 push %ebp <== NOT EXECUTED 124f17: 89 e5 mov %esp,%ebp <== NOT EXECUTED 124f19: 56 push %esi <== NOT EXECUTED 124f1a: 53 push %ebx <== NOT EXECUTED 124f1b: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 124f1e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 124f21: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 124f24: 8b 48 34 mov 0x34(%eax),%ecx <== NOT EXECUTED uint32_t cur_cln = 0; 124f27: 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) 124f2e: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED 124f32: 75 56 jne 124f8a <== NOT EXECUTED { case F_CLU_NUM: pos = va_arg(ap, uint32_t ); 124f34: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED ret = va_arg(ap, uint32_t *); 124f37: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 124f3a: 3b 72 18 cmp 0x18(%edx),%esi <== NOT EXECUTED 124f3d: 72 0d jb 124f4c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 124f3f: e8 d0 90 01 00 call 13e014 <__errno> <== NOT EXECUTED 124f44: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 124f4a: eb 49 jmp 124f95 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 124f4c: 83 7a 20 01 cmpl $0x1,0x20(%edx) <== NOT EXECUTED 124f50: 75 16 jne 124f68 <== NOT EXECUTED 124f52: 83 7a 24 00 cmpl $0x0,0x24(%edx) <== NOT EXECUTED 124f56: 75 10 jne 124f68 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 124f58: f6 41 0a 03 testb $0x3,0xa(%ecx) <== NOT EXECUTED 124f5c: 74 0a je 124f68 <== NOT EXECUTED { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 124f5e: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 124f64: 31 c0 xor %eax,%eax <== NOT EXECUTED return RC_OK; 124f66: eb 30 jmp 124f98 <== NOT EXECUTED } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 124f68: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124f6b: 0f b6 49 08 movzbl 0x8(%ecx),%ecx <== NOT EXECUTED 124f6f: d3 ee shr %cl,%esi <== NOT EXECUTED 124f71: 89 f1 mov %esi,%ecx <== NOT EXECUTED 124f73: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED 124f76: 56 push %esi <== NOT EXECUTED 124f77: e8 db fd ff ff call 124d57 <== NOT EXECUTED if ( rc != RC_OK ) 124f7c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124f7f: 85 c0 test %eax,%eax <== NOT EXECUTED 124f81: 75 15 jne 124f98 <== NOT EXECUTED return rc; *ret = cur_cln; 124f83: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 124f86: 89 13 mov %edx,(%ebx) <== NOT EXECUTED break; 124f88: eb 0e jmp 124f98 <== NOT EXECUTED default: errno = EINVAL; 124f8a: e8 85 90 01 00 call 13e014 <__errno> <== NOT EXECUTED 124f8f: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 124f95: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED rc = -1; break; } return rc; } 124f98: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 124f9b: 5b pop %ebx <== NOT EXECUTED 124f9c: 5e pop %esi <== NOT EXECUTED 124f9d: c9 leave <== NOT EXECUTED 124f9e: c3 ret <== NOT EXECUTED =============================================================================== 00124d57 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 124d57: 55 push %ebp <== NOT EXECUTED 124d58: 89 e5 mov %esp,%ebp <== NOT EXECUTED 124d5a: 57 push %edi <== NOT EXECUTED 124d5b: 56 push %esi <== NOT EXECUTED 124d5c: 53 push %ebx <== NOT EXECUTED 124d5d: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 124d60: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 124d63: 89 d3 mov %edx,%ebx <== NOT EXECUTED 124d65: 89 ce mov %ecx,%esi <== NOT EXECUTED int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 124d67: 8b 52 34 mov 0x34(%edx),%edx <== NOT EXECUTED 124d6a: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 124d6c: 75 05 jne 124d73 <== NOT EXECUTED *disk_cln = fat_fd->map.disk_cln; 124d6e: 8b 43 38 mov 0x38(%ebx),%eax <== NOT EXECUTED 124d71: eb 50 jmp 124dc3 <== NOT EXECUTED { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 124d73: 76 0e jbe 124d83 <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; 124d75: 8b 43 38 mov 0x38(%ebx),%eax <== NOT EXECUTED 124d78: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 124d7b: 89 c8 mov %ecx,%eax <== NOT EXECUTED 124d7d: 29 d0 sub %edx,%eax <== NOT EXECUTED 124d7f: 89 c2 mov %eax,%edx <== NOT EXECUTED 124d81: eb 08 jmp 124d8b <== NOT EXECUTED } else { cur_cln = fat_fd->cln; 124d83: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 124d86: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 124d89: 89 ca mov %ecx,%edx <== NOT EXECUTED 124d8b: 31 ff xor %edi,%edi <== NOT EXECUTED } /* skip over the clusters */ for (i = 0; i < count; i++) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 124d8d: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 124d90: eb 24 jmp 124db6 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 124d92: 50 push %eax <== NOT EXECUTED 124d93: 51 push %ecx <== NOT EXECUTED 124d94: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 124d97: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 124d9a: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 124d9d: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED 124da0: e8 4c 56 01 00 call 13a3f1 <== NOT EXECUTED if ( rc != RC_OK ) 124da5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124da8: 85 c0 test %eax,%eax <== NOT EXECUTED 124daa: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 124dad: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 124db0: 74 03 je 124db5 <== NOT EXECUTED return rc; 124db2: 99 cltd <== NOT EXECUTED 124db3: eb 17 jmp 124dcc <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 124db5: 47 inc %edi <== NOT EXECUTED 124db6: 39 d7 cmp %edx,%edi <== NOT EXECUTED 124db8: 72 d8 jb 124d92 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 124dba: 89 73 34 mov %esi,0x34(%ebx) <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 124dbd: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 124dc0: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED *disk_cln = cur_cln; 124dc3: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 124dc6: 89 02 mov %eax,(%edx) <== NOT EXECUTED 124dc8: 31 c0 xor %eax,%eax <== NOT EXECUTED 124dca: 31 d2 xor %edx,%edx <== NOT EXECUTED } return RC_OK; } 124dcc: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 124dcf: 5b pop %ebx <== NOT EXECUTED 124dd0: 5e pop %esi <== NOT EXECUTED 124dd1: 5f pop %edi <== NOT EXECUTED 124dd2: c9 leave <== NOT EXECUTED 124dd3: c3 ret <== NOT EXECUTED =============================================================================== 00124ec8 : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 124ec8: 55 push %ebp <== NOT EXECUTED 124ec9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 124ecb: 57 push %edi <== NOT EXECUTED 124ecc: 56 push %esi <== NOT EXECUTED 124ecd: 53 push %ebx <== NOT EXECUTED 124ece: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124ed1: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 124ed4: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 124ed7: 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) + 124eda: 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) 124edd: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 124ee0: 74 02 je 124ee4 <== 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)) ) 124ee2: 85 c0 test %eax,%eax <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 124ee4: 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 ); 124ee7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124eea: 53 push %ebx <== NOT EXECUTED 124eeb: e8 a8 c7 fe ff call 111698 <_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 ); 124ef0: 59 pop %ecx <== NOT EXECUTED 124ef1: 58 pop %eax <== NOT EXECUTED 124ef2: 53 push %ebx <== NOT EXECUTED 124ef3: 89 f8 mov %edi,%eax <== NOT EXECUTED 124ef5: c1 e8 05 shr $0x5,%eax <== NOT EXECUTED 124ef8: 83 e0 01 and $0x1,%eax <== NOT EXECUTED 124efb: 6b c0 0c imul $0xc,%eax,%eax <== NOT EXECUTED 124efe: 03 46 68 add 0x68(%esi),%eax <== NOT EXECUTED 124f01: 50 push %eax <== NOT EXECUTED 124f02: e8 6d c7 fe ff call 111674 <_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; 124f07: 80 4b 30 01 orb $0x1,0x30(%ebx) <== NOT EXECUTED 124f0b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 124f0e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 124f11: 5b pop %ebx <== NOT EXECUTED 124f12: 5e pop %esi <== NOT EXECUTED 124f13: 5f pop %edi <== NOT EXECUTED 124f14: c9 leave <== NOT EXECUTED 124f15: c3 ret <== NOT EXECUTED =============================================================================== 0012567c : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 12567c: 55 push %ebp <== NOT EXECUTED 12567d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12567f: 57 push %edi <== NOT EXECUTED 125680: 56 push %esi <== NOT EXECUTED 125681: 53 push %ebx <== NOT EXECUTED 125682: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 125685: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 125688: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12568b: 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) + 12568e: 8b 06 mov (%esi),%eax <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 125690: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 125695: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 125698: 74 23 je 1256bd <== 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)) ) 12569a: 85 c0 test %eax,%eax <== NOT EXECUTED 12569c: 75 0b jne 1256a9 <== NOT EXECUTED 12569e: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 1256a2: 74 05 je 1256a9 <== NOT EXECUTED return fs_info->vol.rdir_loc; 1256a4: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 1256a7: eb 0c jmp 1256b5 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 1256a9: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 1256ac: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 1256b0: d3 e0 shl %cl,%eax <== NOT EXECUTED 1256b2: 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) << 1256b5: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 1256b9: d3 e0 shl %cl,%eax <== NOT EXECUTED 1256bb: 89 c1 mov %eax,%ecx <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 1256bd: 8b 56 04 mov 0x4(%esi),%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) + 1256c0: 89 d0 mov %edx,%eax <== NOT EXECUTED 1256c2: c1 e8 09 shr $0x9,%eax <== NOT EXECUTED 1256c5: 8d 04 01 lea (%ecx,%eax,1),%eax <== NOT EXECUTED 1256c8: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED 1256cb: c1 ea 05 shr $0x5,%edx <== NOT EXECUTED 1256ce: 83 e2 0f and $0xf,%edx <== NOT EXECUTED 1256d1: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 1256d4: 89 55 e4 mov %edx,-0x1c(%ebp) <== 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; 1256d7: 89 d0 mov %edx,%eax <== NOT EXECUTED 1256d9: 83 e0 01 and $0x1,%eax <== NOT EXECUTED 1256dc: 6b c0 0c imul $0xc,%eax,%eax <== NOT EXECUTED 1256df: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED 1256e2: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 1256e5: 01 c2 add %eax,%edx <== NOT EXECUTED 1256e7: 8b 02 mov (%edx),%eax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1256e9: 83 c2 04 add $0x4,%edx <== NOT EXECUTED 1256ec: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 1256ef: eb 5c jmp 12574d <== NOT EXECUTED 1256f1: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 1256f4: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 1256f9: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 1256fc: 74 23 je 125721 <== 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)) ) 1256fe: 85 d2 test %edx,%edx <== NOT EXECUTED 125700: 75 0b jne 12570d <== NOT EXECUTED 125702: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 125706: 74 05 je 12570d <== NOT EXECUTED return fs_info->vol.rdir_loc; 125708: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 12570b: eb 0c jmp 125719 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12570d: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED 125710: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 125714: d3 e2 shl %cl,%edx <== NOT EXECUTED 125716: 03 53 30 add 0x30(%ebx),%edx <== 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) << 125719: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 12571d: d3 e2 shl %cl,%edx <== NOT EXECUTED 12571f: 89 d1 mov %edx,%ecx <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 125721: 8b 78 24 mov 0x24(%eax),%edi <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) { 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) 125724: 89 fa mov %edi,%edx <== NOT EXECUTED 125726: c1 ea 09 shr $0x9,%edx <== NOT EXECUTED 125729: 8d 14 11 lea (%ecx,%edx,1),%edx <== NOT EXECUTED 12572c: c1 e2 04 shl $0x4,%edx <== NOT EXECUTED 12572f: c1 ef 05 shr $0x5,%edi <== NOT EXECUTED 125732: 83 e7 0f and $0xf,%edi <== NOT EXECUTED 125735: 01 fa add %edi,%edx <== NOT EXECUTED 125737: 39 55 e4 cmp %edx,-0x1c(%ebp) <== NOT EXECUTED 12573a: 75 0f jne 12574b <== 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; 12573c: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 12573f: 89 02 mov %eax,(%edx) <== NOT EXECUTED lfat_fd->links_num++; 125741: ff 40 08 incl 0x8(%eax) <== NOT EXECUTED 125744: 31 c0 xor %eax,%eax <== NOT EXECUTED return rc; 125746: e9 22 01 00 00 jmp 12586d <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 12574b: 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) ; ) 12574d: 3b 45 e0 cmp -0x20(%ebp),%eax <== NOT EXECUTED 125750: 75 9f jne 1256f1 <== NOT EXECUTED 125752: e9 1e 01 00 00 jmp 125875 <== 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) + 125757: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 12575a: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 12575f: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 125762: 74 23 je 125787 <== 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)) ) 125764: 85 d2 test %edx,%edx <== NOT EXECUTED 125766: 75 0b jne 125773 <== NOT EXECUTED 125768: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12576c: 74 05 je 125773 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12576e: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 125771: eb 0c jmp 12577f <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 125773: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED 125776: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 12577a: d3 e2 shl %cl,%edx <== NOT EXECUTED 12577c: 03 53 30 add 0x30(%ebx),%edx <== 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) << 12577f: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 125783: d3 e2 shl %cl,%edx <== NOT EXECUTED 125785: 89 d1 mov %edx,%ecx <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 125787: 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) 12578a: 89 fa mov %edi,%edx <== NOT EXECUTED 12578c: c1 ea 09 shr $0x9,%edx <== NOT EXECUTED 12578f: 8d 14 11 lea (%ecx,%edx,1),%edx <== NOT EXECUTED 125792: c1 e2 04 shl $0x4,%edx <== NOT EXECUTED 125795: c1 ef 05 shr $0x5,%edi <== NOT EXECUTED 125798: 83 e7 0f and $0xf,%edi <== NOT EXECUTED 12579b: 01 fa add %edi,%edx <== NOT EXECUTED 12579d: 39 55 e4 cmp %edx,-0x1c(%ebp) <== NOT EXECUTED 1257a0: 75 0e jne 1257b0 <== NOT EXECUTED { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 1257a2: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 1257a6: 74 18 je 1257c0 <== NOT EXECUTED 1257a8: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1257ab: 3b 50 0c cmp 0xc(%eax),%edx <== NOT EXECUTED 1257ae: 74 10 je 1257c0 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 1257b0: 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) ; ) 1257b2: 3b 45 e0 cmp -0x20(%ebp),%eax <== NOT EXECUTED 1257b5: 75 a0 jne 125757 <== NOT EXECUTED 1257b7: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) <== NOT EXECUTED 1257be: eb 07 jmp 1257c7 <== NOT EXECUTED 1257c0: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%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)); 1257c7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1257ca: 6a 44 push $0x44 <== NOT EXECUTED 1257cc: e8 17 7c fe ff call 10d3e8 <== NOT EXECUTED 1257d1: 89 c2 mov %eax,%edx <== NOT EXECUTED 1257d3: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 1257d6: 89 10 mov %edx,(%eax) <== NOT EXECUTED if ( lfat_fd == NULL ) 1257d8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1257db: 85 d2 test %edx,%edx <== NOT EXECUTED 1257dd: 75 10 jne 1257ef <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 1257df: e8 30 88 01 00 call 13e014 <__errno> <== NOT EXECUTED 1257e4: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 1257ea: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1257ed: eb 7e jmp 12586d <== NOT EXECUTED memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 1257ef: b9 11 00 00 00 mov $0x11,%ecx <== NOT EXECUTED 1257f4: 31 c0 xor %eax,%eax <== NOT EXECUTED 1257f6: 89 d7 mov %edx,%edi <== NOT EXECUTED 1257f8: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED lfat_fd->links_num = 1; 1257fa: c7 42 08 01 00 00 00 movl $0x1,0x8(%edx) <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; 125801: 80 62 30 fe andb $0xfe,0x30(%edx) <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 125805: c7 42 3c ff ff ff ff movl $0xffffffff,0x3c(%edx) <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 12580c: 8d 7a 20 lea 0x20(%edx),%edi <== NOT EXECUTED 12580f: b1 04 mov $0x4,%cl <== NOT EXECUTED 125811: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED if ( rc != RC_OK ) 125813: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 125817: 74 08 je 125821 <== NOT EXECUTED lfat_fd->ino = key; 125819: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12581c: 89 42 0c mov %eax,0xc(%edx) <== NOT EXECUTED 12581f: eb 38 jmp 125859 <== NOT EXECUTED else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 125821: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125824: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 125827: 89 55 d8 mov %edx,-0x28(%ebp) <== NOT EXECUTED 12582a: e8 94 00 00 00 call 1258c3 <== NOT EXECUTED 12582f: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED 125832: 89 42 0c mov %eax,0xc(%edx) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 125835: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125838: 85 c0 test %eax,%eax <== NOT EXECUTED 12583a: 75 1d jne 125859 <== NOT EXECUTED { free((*fat_fd)); 12583c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12583f: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 125842: ff 32 pushl (%edx) <== NOT EXECUTED 125844: e8 53 76 fe ff call 10ce9c <== 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 ); 125849: e8 c6 87 01 00 call 13e014 <__errno> <== NOT EXECUTED 12584e: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 125854: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 125857: eb 11 jmp 12586a <== 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 ); 125859: 51 push %ecx <== NOT EXECUTED 12585a: 51 push %ecx <== NOT EXECUTED 12585b: 52 push %edx <== NOT EXECUTED 12585c: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 12585f: 03 43 64 add 0x64(%ebx),%eax <== NOT EXECUTED 125862: 50 push %eax <== NOT EXECUTED 125863: e8 0c be fe ff call 111674 <_Chain_Append> <== NOT EXECUTED 125868: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 12586a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12586d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125870: 5b pop %ebx <== NOT EXECUTED 125871: 5e pop %esi <== NOT EXECUTED 125872: 5f pop %edi <== NOT EXECUTED 125873: c9 leave <== NOT EXECUTED 125874: c3 ret <== 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; 125875: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 125878: 03 53 68 add 0x68(%ebx),%edx <== NOT EXECUTED 12587b: 8b 02 mov (%edx),%eax <== NOT EXECUTED 12587d: 83 c2 04 add $0x4,%edx <== NOT EXECUTED 125880: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 125883: e9 2a ff ff ff jmp 1257b2 <== NOT EXECUTED =============================================================================== 0012541b : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 12541b: 55 push %ebp <== NOT EXECUTED 12541c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12541e: 57 push %edi <== NOT EXECUTED 12541f: 56 push %esi <== NOT EXECUTED 125420: 53 push %ebx <== NOT EXECUTED 125421: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 125424: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 125427: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 12542a: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12542d: 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) 125430: 85 f6 test %esi,%esi <== NOT EXECUTED 125432: 0f 84 86 01 00 00 je 1255be <== NOT EXECUTED /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 125438: 8b 47 18 mov 0x18(%edi),%eax <== NOT EXECUTED 12543b: 39 45 10 cmp %eax,0x10(%ebp) <== NOT EXECUTED 12543e: 0f 83 7a 01 00 00 jae 1255be <== NOT EXECUTED return FAT_EOF; if ((count > fat_fd->fat_file_size) || 125444: 39 c6 cmp %eax,%esi <== NOT EXECUTED 125446: 77 09 ja 125451 <== NOT EXECUTED 125448: 89 c2 mov %eax,%edx <== NOT EXECUTED 12544a: 29 f2 sub %esi,%edx <== NOT EXECUTED 12544c: 39 55 10 cmp %edx,0x10(%ebp) <== NOT EXECUTED 12544f: 76 05 jbe 125456 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 125451: 89 c6 mov %eax,%esi <== NOT EXECUTED 125453: 2b 75 10 sub 0x10(%ebp),%esi <== 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; 125456: 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)) && 12545d: 83 7f 20 01 cmpl $0x1,0x20(%edi) <== NOT EXECUTED 125461: 75 57 jne 1254ba <== NOT EXECUTED 125463: 83 7f 24 00 cmpl $0x0,0x24(%edi) <== NOT EXECUTED 125467: 75 51 jne 1254ba <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 125469: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12546d: 74 4b je 1254ba <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 12546f: 8b 47 1c mov 0x1c(%edi),%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)) ) 125472: 85 c0 test %eax,%eax <== NOT EXECUTED 125474: 75 05 jne 12547b <== NOT EXECUTED return fs_info->vol.rdir_loc; 125476: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 125479: eb 0c jmp 125487 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12547b: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 12547e: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 125482: d3 e0 shl %cl,%eax <== NOT EXECUTED 125484: 03 43 30 add 0x30(%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); 125487: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12548a: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED 12548d: 56 push %esi <== NOT EXECUTED 12548e: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 125491: 4a dec %edx <== NOT EXECUTED 125492: 23 55 10 and 0x10(%ebp),%edx <== NOT EXECUTED 125495: 52 push %edx <== NOT EXECUTED 125496: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 12549a: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 12549d: d3 ea shr %cl,%edx <== NOT EXECUTED 12549f: 01 d0 add %edx,%eax <== NOT EXECUTED 1254a1: 50 push %eax <== NOT EXECUTED 1254a2: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1254a5: e8 c0 0a 00 00 call 125f6a <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 1254aa: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1254ad: 85 c0 test %eax,%eax <== NOT EXECUTED 1254af: 0f 89 10 01 00 00 jns 1255c5 <== NOT EXECUTED 1254b5: e9 08 01 00 00 jmp 1255c2 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 1254ba: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 1254be: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 1254c1: d3 e8 shr %cl,%eax <== NOT EXECUTED 1254c3: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); 1254c6: 66 8b 53 06 mov 0x6(%ebx),%dx <== NOT EXECUTED 1254ca: 66 89 55 d0 mov %dx,-0x30(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 1254ce: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1254d1: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 1254d4: 51 push %ecx <== NOT EXECUTED 1254d5: 89 c1 mov %eax,%ecx <== NOT EXECUTED 1254d7: 89 fa mov %edi,%edx <== NOT EXECUTED 1254d9: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1254dc: e8 76 f8 ff ff call 124d57 <== NOT EXECUTED if (rc != RC_OK) 1254e1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1254e4: 85 c0 test %eax,%eax <== NOT EXECUTED 1254e6: 0f 85 d9 00 00 00 jne 1255c5 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 1254ec: 0f b7 45 d0 movzwl -0x30(%ebp),%eax <== NOT EXECUTED 1254f0: 48 dec %eax <== NOT EXECUTED 1254f1: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 1254f4: 21 d0 and %edx,%eax <== NOT EXECUTED 1254f6: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 1254f9: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 1254fc: 31 d2 xor %edx,%edx <== NOT EXECUTED 1254fe: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 125505: 89 7d c4 mov %edi,-0x3c(%ebp) <== NOT EXECUTED 125508: e9 89 00 00 00 jmp 125596 <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 12550d: 0f b7 7b 06 movzwl 0x6(%ebx),%edi <== NOT EXECUTED 125511: 2b 7d cc sub -0x34(%ebp),%edi <== NOT EXECUTED 125514: 39 f7 cmp %esi,%edi <== NOT EXECUTED 125516: 76 02 jbe 12551a <== NOT EXECUTED 125518: 89 f7 mov %esi,%edi <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 12551a: 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; 12551d: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 125520: 8b 51 34 mov 0x34(%ecx),%edx <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 125523: 85 c0 test %eax,%eax <== NOT EXECUTED 125525: 75 0b jne 125532 <== NOT EXECUTED 125527: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED 12552b: 74 05 je 125532 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12552d: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 125530: eb 0c jmp 12553e <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 125532: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 125535: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED 125539: d3 e0 shl %cl,%eax <== NOT EXECUTED 12553b: 03 42 30 add 0x30(%edx),%eax <== NOT EXECUTED 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); 12553e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125541: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED 125544: 03 55 d4 add -0x2c(%ebp),%edx <== NOT EXECUTED 125547: 52 push %edx <== NOT EXECUTED 125548: 57 push %edi <== NOT EXECUTED 125549: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 12554c: 4a dec %edx <== NOT EXECUTED 12554d: 23 55 cc and -0x34(%ebp),%edx <== NOT EXECUTED 125550: 52 push %edx <== NOT EXECUTED 125551: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 125555: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 125558: d3 ea shr %cl,%edx <== NOT EXECUTED 12555a: 01 d0 add %edx,%eax <== NOT EXECUTED 12555c: 50 push %eax <== NOT EXECUTED 12555d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 125560: e8 05 0a 00 00 call 125f6a <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 125565: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 125568: 85 c0 test %eax,%eax <== NOT EXECUTED 12556a: 78 56 js 1255c2 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; 12556c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 12556f: 50 push %eax <== NOT EXECUTED 125570: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 125573: 51 push %ecx <== NOT EXECUTED 125574: 52 push %edx <== NOT EXECUTED 125575: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 125578: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 12557b: e8 71 4e 01 00 call 13a3f1 <== NOT EXECUTED if ( rc != RC_OK ) 125580: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125583: 85 c0 test %eax,%eax <== NOT EXECUTED 125585: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 125588: 75 3b jne 1255c5 <== NOT EXECUTED ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 12558a: 29 fe sub %edi,%esi <== NOT EXECUTED cmpltd += c; 12558c: 01 7d d4 add %edi,-0x2c(%ebp) <== NOT EXECUTED 12558f: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 125596: 85 f6 test %esi,%esi <== NOT EXECUTED 125598: 0f 85 6f ff ff ff jne 12550d <== NOT EXECUTED 12559e: 8b 7d c4 mov -0x3c(%ebp),%edi <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 1255a1: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 1255a4: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED 1255a7: 8d 44 31 ff lea -0x1(%ecx,%esi,1),%eax <== NOT EXECUTED 1255ab: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 1255af: d3 e8 shr %cl,%eax <== NOT EXECUTED 1255b1: 03 45 c8 add -0x38(%ebp),%eax <== NOT EXECUTED 1255b4: 89 47 34 mov %eax,0x34(%edi) <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 1255b7: 89 57 38 mov %edx,0x38(%edi) <== NOT EXECUTED return cmpltd; 1255ba: 89 f0 mov %esi,%eax <== NOT EXECUTED 1255bc: eb 07 jmp 1255c5 <== NOT EXECUTED 1255be: 31 c0 xor %eax,%eax <== NOT EXECUTED 1255c0: eb 03 jmp 1255c5 <== NOT EXECUTED 1255c2: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED } 1255c5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1255c8: 5b pop %ebx <== NOT EXECUTED 1255c9: 5e pop %esi <== NOT EXECUTED 1255ca: 5f pop %edi <== NOT EXECUTED 1255cb: c9 leave <== NOT EXECUTED 1255cc: c3 ret <== NOT EXECUTED =============================================================================== 00124ccc : * RETURNS: * RC_OK */ int fat_file_reopen(fat_file_fd_t *fat_fd) { 124ccc: 55 push %ebp <== NOT EXECUTED 124ccd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 124ccf: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED fat_fd->links_num++; 124cd2: ff 40 08 incl 0x8(%eax) <== NOT EXECUTED return RC_OK; } 124cd5: 31 c0 xor %eax,%eax <== NOT EXECUTED 124cd7: c9 leave <== NOT EXECUTED 124cd8: c3 ret <== NOT EXECUTED =============================================================================== 00124cd9 : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 124cd9: 55 push %ebp <== NOT EXECUTED 124cda: 89 e5 mov %esp,%ebp <== NOT EXECUTED 124cdc: 57 push %edi <== NOT EXECUTED 124cdd: 56 push %esi <== NOT EXECUTED 124cde: 53 push %ebx <== NOT EXECUTED 124cdf: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 124ce2: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 124ce5: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 124ce8: 8b 72 34 mov 0x34(%edx),%esi <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 124ceb: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 124cee: 83 7b 20 01 cmpl $0x1,0x20(%ebx) <== NOT EXECUTED 124cf2: 75 14 jne 124d08 <== NOT EXECUTED 124cf4: 83 7b 24 00 cmpl $0x0,0x24(%ebx) <== NOT EXECUTED 124cf8: 75 0e jne 124d08 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 124cfa: f6 46 0a 03 testb $0x3,0xa(%esi) <== NOT EXECUTED 124cfe: 74 08 je 124d08 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; 124d00: 8b 46 28 mov 0x28(%esi),%eax <== NOT EXECUTED 124d03: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED 124d06: eb 45 jmp 124d4d <== 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; 124d08: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 124d0b: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) <== NOT EXECUTED 124d12: 31 c0 xor %eax,%eax <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 124d14: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 124d17: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 124d1a: eb 21 jmp 124d3d <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 124d1c: 50 push %eax <== NOT EXECUTED 124d1d: 51 push %ecx <== NOT EXECUTED 124d1e: 57 push %edi <== NOT EXECUTED 124d1f: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 124d22: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED 124d25: e8 c7 56 01 00 call 13a3f1 <== NOT EXECUTED if ( rc != RC_OK ) 124d2a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124d2d: 85 c0 test %eax,%eax <== NOT EXECUTED 124d2f: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 124d32: 75 1b jne 124d4f <== NOT EXECUTED return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 124d34: 0f b7 46 06 movzwl 0x6(%esi),%eax <== NOT EXECUTED 124d38: 01 43 18 add %eax,0x18(%ebx) <== NOT EXECUTED 124d3b: 89 f8 mov %edi,%eax <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 124d3d: 8b 7d e4 mov -0x1c(%ebp),%edi <== NOT EXECUTED 124d40: 8b 56 0c mov 0xc(%esi),%edx <== NOT EXECUTED 124d43: 21 fa and %edi,%edx <== NOT EXECUTED 124d45: 3b 56 10 cmp 0x10(%esi),%edx <== NOT EXECUTED 124d48: 72 d2 jb 124d1c <== NOT EXECUTED if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 124d4a: 89 43 3c mov %eax,0x3c(%ebx) <== NOT EXECUTED 124d4d: 31 c0 xor %eax,%eax <== NOT EXECUTED return rc; } 124d4f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 124d52: 5b pop %ebx <== NOT EXECUTED 124d53: 5e pop %esi <== NOT EXECUTED 124d54: 5f pop %edi <== NOT EXECUTED 124d55: c9 leave <== NOT EXECUTED 124d56: c3 ret <== NOT EXECUTED =============================================================================== 00124f9f : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 124f9f: 55 push %ebp <== NOT EXECUTED 124fa0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 124fa2: 57 push %edi <== NOT EXECUTED 124fa3: 56 push %esi <== NOT EXECUTED 124fa4: 53 push %ebx <== NOT EXECUTED 124fa5: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 124fa8: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED 124fab: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 124fae: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 124fb1: 8b 5f 34 mov 0x34(%edi),%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 ) 124fb4: 8b 46 18 mov 0x18(%esi),%eax <== NOT EXECUTED 124fb7: 39 c2 cmp %eax,%edx <== NOT EXECUTED 124fb9: 0f 83 b0 00 00 00 jae 12506f <== 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; 124fbf: 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; 124fc6: 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); 124fcd: 85 c0 test %eax,%eax <== NOT EXECUTED 124fcf: 75 19 jne 124fea <== NOT EXECUTED 124fd1: 68 8d ad 15 00 push $0x15ad8d <== NOT EXECUTED 124fd6: 68 f4 ad 15 00 push $0x15adf4 <== NOT EXECUTED 124fdb: 68 6d 02 00 00 push $0x26d <== NOT EXECUTED 124fe0: 68 a3 ad 15 00 push $0x15ada3 <== NOT EXECUTED 124fe5: e8 c6 78 fe ff call 10c8b0 <__assert_func> <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 124fea: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 124fee: 0f b7 5b 06 movzwl 0x6(%ebx),%ebx <== NOT EXECUTED 124ff2: 8d 5c 1a ff lea -0x1(%edx,%ebx,1),%ebx <== NOT EXECUTED 124ff6: d3 eb shr %cl,%ebx <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 124ff8: 89 da mov %ebx,%edx <== NOT EXECUTED 124ffa: d3 e2 shl %cl,%edx <== NOT EXECUTED 124ffc: 39 c2 cmp %eax,%edx <== NOT EXECUTED 124ffe: 73 6f jae 12506f <== NOT EXECUTED return RC_OK; if (cl_start != 0) 125000: 85 db test %ebx,%ebx <== NOT EXECUTED 125002: 74 1a je 12501e <== NOT EXECUTED { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 125004: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125007: 8d 4b ff lea -0x1(%ebx),%ecx <== NOT EXECUTED 12500a: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 12500d: 50 push %eax <== NOT EXECUTED 12500e: 89 f2 mov %esi,%edx <== NOT EXECUTED 125010: 89 f8 mov %edi,%eax <== NOT EXECUTED 125012: e8 40 fd ff ff call 124d57 <== NOT EXECUTED if (rc != RC_OK) 125017: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12501a: 85 c0 test %eax,%eax <== NOT EXECUTED 12501c: 75 53 jne 125071 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 12501e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125021: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 125024: 50 push %eax <== NOT EXECUTED 125025: 89 d9 mov %ebx,%ecx <== NOT EXECUTED 125027: 89 f2 mov %esi,%edx <== NOT EXECUTED 125029: 89 f8 mov %edi,%eax <== NOT EXECUTED 12502b: e8 27 fd ff ff call 124d57 <== NOT EXECUTED if (rc != RC_OK) 125030: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125033: 85 c0 test %eax,%eax <== NOT EXECUTED 125035: 75 3a jne 125071 <== NOT EXECUTED return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 125037: 51 push %ecx <== NOT EXECUTED 125038: 51 push %ecx <== NOT EXECUTED 125039: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12503c: 57 push %edi <== NOT EXECUTED 12503d: e8 19 55 01 00 call 13a55b <== NOT EXECUTED if (rc != RC_OK) 125042: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125045: 85 c0 test %eax,%eax <== NOT EXECUTED 125047: 75 28 jne 125071 <== NOT EXECUTED return rc; if (cl_start != 0) 125049: 85 db test %ebx,%ebx <== NOT EXECUTED 12504b: 74 24 je 125071 <== NOT EXECUTED { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 12504d: 52 push %edx <== NOT EXECUTED 12504e: 6a ff push $0xffffffff <== NOT EXECUTED 125050: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 125053: 57 push %edi <== NOT EXECUTED 125054: e8 7f 51 01 00 call 13a1d8 <== NOT EXECUTED if ( rc != RC_OK ) 125059: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12505c: 85 c0 test %eax,%eax <== NOT EXECUTED 12505e: 75 11 jne 125071 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; 125060: 4b dec %ebx <== NOT EXECUTED 125061: 89 5e 34 mov %ebx,0x34(%esi) <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 125064: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 125067: 89 56 38 mov %edx,0x38(%esi) <== NOT EXECUTED fat_fd->map.last_cln = new_last_cln; 12506a: 89 56 3c mov %edx,0x3c(%esi) <== NOT EXECUTED 12506d: eb 02 jmp 125071 <== NOT EXECUTED 12506f: 31 c0 xor %eax,%eax <== NOT EXECUTED } return RC_OK; } 125071: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125074: 5b pop %ebx <== NOT EXECUTED 125075: 5e pop %esi <== NOT EXECUTED 125076: 5f pop %edi <== NOT EXECUTED 125077: c9 leave <== NOT EXECUTED 125078: c3 ret <== NOT EXECUTED =============================================================================== 00125219 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 125219: 55 push %ebp <== NOT EXECUTED 12521a: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12521c: 57 push %edi <== NOT EXECUTED 12521d: 56 push %esi <== NOT EXECUTED 12521e: 53 push %ebx <== NOT EXECUTED 12521f: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 125222: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 125225: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 125228: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12522b: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 12522e: 31 c0 xor %eax,%eax <== NOT EXECUTED 125230: 85 ff test %edi,%edi <== NOT EXECUTED 125232: 0f 84 db 01 00 00 je 125413 <== 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; 125238: 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; 12523f: 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 ) 125246: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 125249: 3b 56 18 cmp 0x18(%esi),%edx <== NOT EXECUTED 12524c: 77 0e ja 12525c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 12524e: 8b 46 14 mov 0x14(%esi),%eax <== NOT EXECUTED 125251: 39 c7 cmp %eax,%edi <== NOT EXECUTED 125253: 77 07 ja 12525c <== NOT EXECUTED 125255: 29 f8 sub %edi,%eax <== NOT EXECUTED 125257: 39 45 10 cmp %eax,0x10(%ebp) <== NOT EXECUTED 12525a: 76 10 jbe 12526c <== NOT EXECUTED (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 12525c: e8 b3 8d 01 00 call 13e014 <__errno> <== NOT EXECUTED 125261: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 125267: e9 a4 01 00 00 jmp 125410 <== NOT EXECUTED rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 12526c: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 12526f: 8d 14 0f lea (%edi,%ecx,1),%edx <== NOT EXECUTED 125272: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 125275: 50 push %eax <== NOT EXECUTED 125276: 52 push %edx <== NOT EXECUTED 125277: 56 push %esi <== NOT EXECUTED 125278: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12527b: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 12527e: e8 f6 fd ff ff call 125079 <== NOT EXECUTED if (rc != RC_OK) 125283: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125286: 85 c0 test %eax,%eax <== NOT EXECUTED 125288: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 12528b: 0f 85 82 01 00 00 jne 125413 <== NOT EXECUTED /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 125291: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 125294: 39 d0 cmp %edx,%eax <== NOT EXECUTED 125296: 74 05 je 12529d <== NOT EXECUTED count = c - start; 125298: 89 c7 mov %eax,%edi <== NOT EXECUTED 12529a: 2b 7d 10 sub 0x10(%ebp),%edi <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12529d: 83 7e 20 01 cmpl $0x1,0x20(%esi) <== NOT EXECUTED 1252a1: 75 63 jne 125306 <== NOT EXECUTED 1252a3: 83 7e 24 00 cmpl $0x0,0x24(%esi) <== NOT EXECUTED 1252a7: 75 5d jne 125306 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 1252a9: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 1252ad: 74 57 je 125306 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 1252af: 8b 46 1c mov 0x1c(%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; 1252b2: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 1252b5: 8b 51 34 mov 0x34(%ecx),%edx <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 1252b8: 85 c0 test %eax,%eax <== NOT EXECUTED 1252ba: 75 0b jne 1252c7 <== NOT EXECUTED 1252bc: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED 1252c0: 74 05 je 1252c7 <== NOT EXECUTED return fs_info->vol.rdir_loc; 1252c2: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1252c5: eb 0c jmp 1252d3 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 1252c7: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 1252ca: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED 1252ce: d3 e0 shl %cl,%eax <== NOT EXECUTED 1252d0: 03 42 30 add 0x30(%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); 1252d3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1252d6: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED 1252d9: 57 push %edi <== NOT EXECUTED 1252da: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 1252dd: 4a dec %edx <== NOT EXECUTED 1252de: 23 55 10 and 0x10(%ebp),%edx <== NOT EXECUTED 1252e1: 52 push %edx <== NOT EXECUTED 1252e2: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 1252e6: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 1252e9: d3 ef shr %cl,%edi <== NOT EXECUTED 1252eb: 01 f8 add %edi,%eax <== NOT EXECUTED 1252ed: 50 push %eax <== NOT EXECUTED 1252ee: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1252f1: e8 82 09 00 00 call 125c78 <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 1252f6: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1252f9: 85 c0 test %eax,%eax <== NOT EXECUTED 1252fb: 0f 89 12 01 00 00 jns 125413 <== NOT EXECUTED 125301: e9 0a 01 00 00 jmp 125410 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 125306: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 12530a: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 12530d: d3 e8 shr %cl,%eax <== NOT EXECUTED 12530f: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); 125312: 66 8b 53 06 mov 0x6(%ebx),%dx <== NOT EXECUTED 125316: 66 89 55 d0 mov %dx,-0x30(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 12531a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12531d: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 125320: 51 push %ecx <== NOT EXECUTED 125321: 89 c1 mov %eax,%ecx <== NOT EXECUTED 125323: 89 f2 mov %esi,%edx <== NOT EXECUTED 125325: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 125328: e8 2a fa ff ff call 124d57 <== NOT EXECUTED if (rc != RC_OK) 12532d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125330: 85 c0 test %eax,%eax <== NOT EXECUTED 125332: 0f 85 db 00 00 00 jne 125413 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 125338: 0f b7 45 d0 movzwl -0x30(%ebp),%eax <== NOT EXECUTED 12533c: 48 dec %eax <== NOT EXECUTED 12533d: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 125340: 21 d0 and %edx,%eax <== NOT EXECUTED 125342: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 125345: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 125348: 31 d2 xor %edx,%edx <== NOT EXECUTED 12534a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 125351: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED 125354: e9 8f 00 00 00 jmp 1253e8 <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 125359: 0f b7 43 06 movzwl 0x6(%ebx),%eax <== NOT EXECUTED 12535d: 2b 45 cc sub -0x34(%ebp),%eax <== NOT EXECUTED 125360: 39 f8 cmp %edi,%eax <== NOT EXECUTED 125362: 76 02 jbe 125366 <== NOT EXECUTED 125364: 89 f8 mov %edi,%eax <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 125366: 8b 75 e4 mov -0x1c(%ebp),%esi <== 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; 125369: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 12536c: 8b 51 34 mov 0x34(%ecx),%edx <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12536f: 85 f6 test %esi,%esi <== NOT EXECUTED 125371: 75 0b jne 12537e <== NOT EXECUTED 125373: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED 125377: 74 05 je 12537e <== NOT EXECUTED return fs_info->vol.rdir_loc; 125379: 8b 72 1c mov 0x1c(%edx),%esi <== NOT EXECUTED 12537c: eb 0c jmp 12538a <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12537e: 83 ee 02 sub $0x2,%esi <== NOT EXECUTED 125381: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED 125385: d3 e6 shl %cl,%esi <== NOT EXECUTED 125387: 03 72 30 add 0x30(%edx),%esi <== NOT EXECUTED sec += (ofs >> fs_info->vol.sec_log2); 12538a: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 12538e: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 125391: d3 ea shr %cl,%edx <== NOT EXECUTED 125393: 01 d6 add %edx,%esi <== NOT EXECUTED byte = ofs & (fs_info->vol.bps - 1); 125395: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 125398: 4a dec %edx <== NOT EXECUTED 125399: 23 55 cc and -0x34(%ebp),%edx <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 12539c: 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); 12539f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1253a2: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED 1253a5: 03 4d d4 add -0x2c(%ebp),%ecx <== NOT EXECUTED 1253a8: 51 push %ecx <== NOT EXECUTED 1253a9: 50 push %eax <== NOT EXECUTED 1253aa: 52 push %edx <== NOT EXECUTED 1253ab: 56 push %esi <== NOT EXECUTED 1253ac: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1253af: e8 c4 08 00 00 call 125c78 <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 1253b4: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1253b7: 85 c0 test %eax,%eax <== NOT EXECUTED 1253b9: 78 55 js 125410 <== NOT EXECUTED return -1; count -= c; 1253bb: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED cmpltd += c; save_cln = cur_cln; 1253be: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 1253c1: 51 push %ecx <== NOT EXECUTED 1253c2: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 1253c5: 51 push %ecx <== NOT EXECUTED 1253c6: 52 push %edx <== NOT EXECUTED 1253c7: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1253ca: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 1253cd: e8 1f 50 01 00 call 13a3f1 <== NOT EXECUTED if ( rc != RC_OK ) 1253d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1253d5: 85 c0 test %eax,%eax <== NOT EXECUTED 1253d7: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 1253da: 75 37 jne 125413 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 1253dc: 29 f7 sub %esi,%edi <== NOT EXECUTED cmpltd += c; 1253de: 01 75 d4 add %esi,-0x2c(%ebp) <== NOT EXECUTED 1253e1: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 1253e8: 85 ff test %edi,%edi <== NOT EXECUTED 1253ea: 0f 85 69 ff ff ff jne 125359 <== NOT EXECUTED 1253f0: 8b 75 c4 mov -0x3c(%ebp),%esi <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 1253f3: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 1253f6: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED 1253f9: 8d 44 39 ff lea -0x1(%ecx,%edi,1),%eax <== NOT EXECUTED 1253fd: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 125401: d3 e8 shr %cl,%eax <== NOT EXECUTED 125403: 03 45 c8 add -0x38(%ebp),%eax <== NOT EXECUTED 125406: 89 46 34 mov %eax,0x34(%esi) <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 125409: 89 56 38 mov %edx,0x38(%esi) <== NOT EXECUTED return cmpltd; 12540c: 89 f8 mov %edi,%eax <== NOT EXECUTED 12540e: eb 03 jmp 125413 <== NOT EXECUTED 125410: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED } 125413: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125416: 5b pop %ebx <== NOT EXECUTED 125417: 5e pop %esi <== NOT EXECUTED 125418: 5f pop %edi <== NOT EXECUTED 125419: c9 leave <== NOT EXECUTED 12541a: c3 ret <== NOT EXECUTED =============================================================================== 0013a55b : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 13a55b: 55 push %ebp <== NOT EXECUTED 13a55c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13a55e: 57 push %edi <== NOT EXECUTED 13a55f: 56 push %esi <== NOT EXECUTED 13a560: 53 push %ebx <== NOT EXECUTED 13a561: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 13a564: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 13a567: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t cur_cln = chain; uint32_t next_cln = 0; 13a56a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 13a571: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 13a574: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 13a57b: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 13a582: eb 4c jmp 13a5d0 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 13a584: 52 push %edx <== NOT EXECUTED 13a585: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 13a588: 50 push %eax <== NOT EXECUTED 13a589: 56 push %esi <== NOT EXECUTED 13a58a: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 13a58d: e8 5f fe ff ff call 13a3f1 <== NOT EXECUTED 13a592: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( rc != RC_OK ) 13a594: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13a597: 85 c0 test %eax,%eax <== NOT EXECUTED 13a599: 74 19 je 13a5b4 <== NOT EXECUTED { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 13a59b: 8b 43 40 mov 0x40(%ebx),%eax <== NOT EXECUTED 13a59e: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 13a5a1: 74 06 je 13a5a9 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 13a5a3: 03 45 d4 add -0x2c(%ebp),%eax <== NOT EXECUTED 13a5a6: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED fat_buf_release(fs_info); 13a5a9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13a5ac: 53 push %ebx <== NOT EXECUTED 13a5ad: e8 ad b3 fe ff call 12595f <== NOT EXECUTED 13a5b2: eb 46 jmp 13a5fa <== NOT EXECUTED return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 13a5b4: 50 push %eax <== NOT EXECUTED 13a5b5: 6a 00 push $0x0 <== NOT EXECUTED 13a5b7: 56 push %esi <== NOT EXECUTED 13a5b8: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 13a5bb: e8 18 fc ff ff call 13a1d8 <== NOT EXECUTED if ( rc != RC_OK ) 13a5c0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13a5c3: 85 c0 test %eax,%eax <== NOT EXECUTED 13a5c5: 74 03 je 13a5ca <== NOT EXECUTED 13a5c7: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; 13a5ca: ff 45 d4 incl -0x2c(%ebp) <== NOT EXECUTED cur_cln = next_cln; 13a5cd: 8b 75 e4 mov -0x1c(%ebp),%esi <== 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) 13a5d0: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 13a5d3: 21 f0 and %esi,%eax <== NOT EXECUTED 13a5d5: 3b 43 10 cmp 0x10(%ebx),%eax <== NOT EXECUTED 13a5d8: 72 aa jb 13a584 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 13a5da: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 13a5dd: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 13a5e0: 8b 43 40 mov 0x40(%ebx),%eax <== NOT EXECUTED 13a5e3: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 13a5e6: 74 06 je 13a5ee <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 13a5e8: 03 45 d4 add -0x2c(%ebp),%eax <== NOT EXECUTED 13a5eb: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED fat_buf_release(fs_info); 13a5ee: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13a5f1: 53 push %ebx <== NOT EXECUTED 13a5f2: e8 68 b3 fe ff call 12595f <== NOT EXECUTED 13a5f7: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED 13a5fa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (rc1 != RC_OK) return rc1; return RC_OK; } 13a5fd: 89 f8 mov %edi,%eax <== NOT EXECUTED 13a5ff: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 13a602: 5b pop %ebx <== NOT EXECUTED 13a603: 5e pop %esi <== NOT EXECUTED 13a604: 5f pop %edi <== NOT EXECUTED 13a605: c9 leave <== NOT EXECUTED 13a606: c3 ret <== NOT EXECUTED =============================================================================== 00125888 : void fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 125888: 55 push %ebp <== NOT EXECUTED 125889: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12588b: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 12588e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 125891: 8b 50 34 mov 0x34(%eax),%edx <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 125894: 2b 4a 78 sub 0x78(%edx),%ecx <== NOT EXECUTED 125897: 89 c8 mov %ecx,%eax <== NOT EXECUTED 125899: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED 12589c: 03 42 6c add 0x6c(%edx),%eax <== NOT EXECUTED 12589f: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED 1258a2: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 1258a7: d3 e2 shl %cl,%edx <== NOT EXECUTED 1258a9: f7 d2 not %edx <== NOT EXECUTED 1258ab: 20 10 and %dl,(%eax) <== NOT EXECUTED } 1258ad: c9 leave <== NOT EXECUTED 1258ae: c3 ret <== NOT EXECUTED =============================================================================== 0013a3f1 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 13a3f1: 55 push %ebp <== NOT EXECUTED 13a3f2: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13a3f4: 57 push %edi <== NOT EXECUTED 13a3f5: 56 push %esi <== NOT EXECUTED 13a3f6: 53 push %ebx <== NOT EXECUTED 13a3f7: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 13a3fa: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 13a3fd: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 13a400: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 13a403: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED rtems_bdbuf_buffer *block0 = NULL; 13a406: 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)) ) 13a40d: 83 ff 01 cmp $0x1,%edi <== NOT EXECUTED 13a410: 0f 86 2d 01 00 00 jbe 13a543 <== NOT EXECUTED 13a416: 8b 46 34 mov 0x34(%esi),%eax <== NOT EXECUTED 13a419: 40 inc %eax <== NOT EXECUTED 13a41a: 39 c7 cmp %eax,%edi <== NOT EXECUTED 13a41c: 0f 87 21 01 00 00 ja 13a543 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 13a422: 0f b6 56 0a movzbl 0xa(%esi),%edx <== NOT EXECUTED 13a426: 89 d0 mov %edx,%eax <== NOT EXECUTED 13a428: 83 e0 01 and $0x1,%eax <== NOT EXECUTED 13a42b: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 13a42e: 74 08 je 13a438 <== NOT EXECUTED 13a430: 89 f8 mov %edi,%eax <== NOT EXECUTED 13a432: d1 e8 shr %eax <== NOT EXECUTED 13a434: 01 f8 add %edi,%eax <== NOT EXECUTED 13a436: eb 0f jmp 13a447 <== NOT EXECUTED 13a438: 8d 04 3f lea (%edi,%edi,1),%eax <== NOT EXECUTED 13a43b: f6 c2 02 test $0x2,%dl <== NOT EXECUTED 13a43e: 75 07 jne 13a447 <== NOT EXECUTED 13a440: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax <== NOT EXECUTED 13a447: 0f b6 4e 02 movzbl 0x2(%esi),%ecx <== NOT EXECUTED 13a44b: d3 e8 shr %cl,%eax <== NOT EXECUTED 13a44d: 8b 4e 4c mov 0x4c(%esi),%ecx <== NOT EXECUTED 13a450: 01 c8 add %ecx,%eax <== NOT EXECUTED 13a452: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 13a455: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED 13a459: 74 08 je 13a463 <== NOT EXECUTED 13a45b: 89 f9 mov %edi,%ecx <== NOT EXECUTED 13a45d: d1 e9 shr %ecx <== NOT EXECUTED 13a45f: 01 f9 add %edi,%ecx <== NOT EXECUTED 13a461: eb 11 jmp 13a474 <== NOT EXECUTED 13a463: 80 e2 02 and $0x2,%dl <== NOT EXECUTED 13a466: 74 05 je 13a46d <== NOT EXECUTED 13a468: 8d 0c 3f lea (%edi,%edi,1),%ecx <== NOT EXECUTED 13a46b: eb 07 jmp 13a474 <== NOT EXECUTED 13a46d: 8d 0c bd 00 00 00 00 lea 0x0(,%edi,4),%ecx <== NOT EXECUTED 13a474: 8b 06 mov (%esi),%eax <== NOT EXECUTED 13a476: 66 89 45 d4 mov %ax,-0x2c(%ebp) <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 13a47a: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 13a47d: 50 push %eax <== NOT EXECUTED 13a47e: 6a 01 push $0x1 <== NOT EXECUTED 13a480: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 13a483: 56 push %esi <== NOT EXECUTED 13a484: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 13a487: e8 1a b6 fe ff call 125aa6 <== NOT EXECUTED 13a48c: 89 c2 mov %eax,%edx <== NOT EXECUTED if (rc != RC_OK) 13a48e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13a491: 85 c0 test %eax,%eax <== NOT EXECUTED 13a493: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 13a496: 0f 85 b5 00 00 00 jne 13a551 <== 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); 13a49c: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax <== NOT EXECUTED 13a4a0: 48 dec %eax <== NOT EXECUTED 13a4a1: 21 c8 and %ecx,%eax <== 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 ) 13a4a3: 8a 4e 0a mov 0xa(%esi),%cl <== NOT EXECUTED 13a4a6: 80 f9 02 cmp $0x2,%cl <== NOT EXECUTED 13a4a9: 74 7f je 13a52a <== NOT EXECUTED 13a4ab: 80 f9 04 cmp $0x4,%cl <== NOT EXECUTED 13a4ae: 0f 84 82 00 00 00 je 13a536 <== NOT EXECUTED 13a4b4: fe c9 dec %cl <== NOT EXECUTED 13a4b6: 0f 85 87 00 00 00 jne 13a543 <== 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))); 13a4bc: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 13a4bf: 8b 49 20 mov 0x20(%ecx),%ecx <== NOT EXECUTED 13a4c2: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 13a4c5: 0f b6 0c 01 movzbl (%ecx,%eax,1),%ecx <== NOT EXECUTED 13a4c9: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 13a4cc: 89 0b mov %ecx,(%ebx) <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 13a4ce: 0f b7 0e movzwl (%esi),%ecx <== NOT EXECUTED 13a4d1: 49 dec %ecx <== NOT EXECUTED 13a4d2: 39 c8 cmp %ecx,%eax <== NOT EXECUTED 13a4d4: 75 32 jne 13a508 <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 13a4d6: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 13a4d9: 50 push %eax <== NOT EXECUTED 13a4da: 6a 01 push $0x1 <== NOT EXECUTED 13a4dc: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 13a4df: 40 inc %eax <== NOT EXECUTED 13a4e0: 50 push %eax <== NOT EXECUTED 13a4e1: 56 push %esi <== NOT EXECUTED 13a4e2: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 13a4e5: e8 bc b5 fe ff call 125aa6 <== NOT EXECUTED &block0); if (rc != RC_OK) 13a4ea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13a4ed: 85 c0 test %eax,%eax <== NOT EXECUTED 13a4ef: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 13a4f2: 74 04 je 13a4f8 <== NOT EXECUTED 13a4f4: 89 c2 mov %eax,%edx <== NOT EXECUTED 13a4f6: eb 59 jmp 13a551 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 13a4f8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 13a4fb: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED 13a4fe: 0f b6 00 movzbl (%eax),%eax <== NOT EXECUTED 13a501: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 13a504: 09 03 or %eax,(%ebx) <== NOT EXECUTED 13a506: eb 10 jmp 13a518 <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 13a508: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 13a50b: 0f b6 44 01 01 movzbl 0x1(%ecx,%eax,1),%eax <== NOT EXECUTED 13a510: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 13a513: 0b 45 d4 or -0x2c(%ebp),%eax <== NOT EXECUTED 13a516: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) 13a518: 83 e7 01 and $0x1,%edi <== NOT EXECUTED 13a51b: 74 05 je 13a522 <== NOT EXECUTED *ret_val = (*ret_val) >> FAT12_SHIFT; 13a51d: c1 2b 04 shrl $0x4,(%ebx) <== NOT EXECUTED 13a520: eb 2f jmp 13a551 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; 13a522: 81 23 ff 0f 00 00 andl $0xfff,(%ebx) <== NOT EXECUTED 13a528: eb 27 jmp 13a551 <== NOT EXECUTED break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); 13a52a: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 13a52d: 8b 49 20 mov 0x20(%ecx),%ecx <== NOT EXECUTED 13a530: 0f b7 04 01 movzwl (%ecx,%eax,1),%eax <== NOT EXECUTED 13a534: eb 09 jmp 13a53f <== NOT EXECUTED break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); 13a536: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 13a539: 8b 49 20 mov 0x20(%ecx),%ecx <== NOT EXECUTED 13a53c: 8b 04 01 mov (%ecx,%eax,1),%eax <== NOT EXECUTED 13a53f: 89 03 mov %eax,(%ebx) <== NOT EXECUTED break; 13a541: eb 0e jmp 13a551 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one(EIO); 13a543: e8 cc 3a 00 00 call 13e014 <__errno> <== NOT EXECUTED 13a548: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 13a54e: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED break; } return RC_OK; } 13a551: 89 d0 mov %edx,%eax <== NOT EXECUTED 13a553: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 13a556: 5b pop %ebx <== NOT EXECUTED 13a557: 5e pop %esi <== NOT EXECUTED 13a558: 5f pop %edi <== NOT EXECUTED 13a559: c9 leave <== NOT EXECUTED 13a55a: c3 ret <== NOT EXECUTED =============================================================================== 001258c3 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 1258c3: 55 push %ebp <== NOT EXECUTED 1258c4: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1258c6: 57 push %edi <== NOT EXECUTED 1258c7: 56 push %esi <== NOT EXECUTED 1258c8: 53 push %ebx <== NOT EXECUTED 1258c9: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 1258cc: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1258cf: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED 1258d2: eb 77 jmp 12594b <== 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)) 1258d4: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED 1258d7: 89 f0 mov %esi,%eax <== NOT EXECUTED 1258d9: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED 1258dc: 03 43 6c add 0x6c(%ebx),%eax <== NOT EXECUTED 1258df: 8a 08 mov (%eax),%cl <== NOT EXECUTED 1258e1: 88 4d e3 mov %cl,-0x1d(%ebp) <== NOT EXECUTED 1258e4: 89 f1 mov %esi,%ecx <== NOT EXECUTED 1258e6: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED 1258e9: 0f be 7d e3 movsbl -0x1d(%ebp),%edi <== NOT EXECUTED 1258ed: 0f a3 cf bt %ecx,%edi <== NOT EXECUTED 1258f0: 72 14 jb 125906 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 1258f2: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 1258f7: d3 e2 shl %cl,%edx <== NOT EXECUTED 1258f9: 0a 55 e3 or -0x1d(%ebp),%dl <== NOT EXECUTED 1258fc: 88 10 mov %dl,(%eax) <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 1258fe: 8b 43 70 mov 0x70(%ebx),%eax <== NOT EXECUTED 125901: 03 43 78 add 0x78(%ebx),%eax <== NOT EXECUTED 125904: eb 51 jmp 125957 <== NOT EXECUTED } fs_info->index++; 125906: 46 inc %esi <== NOT EXECUTED 125907: 89 73 70 mov %esi,0x70(%ebx) <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 12590a: 3b 73 74 cmp 0x74(%ebx),%esi <== NOT EXECUTED 12590d: 72 07 jb 125916 <== NOT EXECUTED fs_info->index = 0; 12590f: 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++) 125916: 42 inc %edx <== NOT EXECUTED 125917: 3b 55 e4 cmp -0x1c(%ebp),%edx <== NOT EXECUTED 12591a: 72 b8 jb 1258d4 <== 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)) 12591c: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12591f: d1 e0 shl %eax <== NOT EXECUTED 125921: ba ff ff ff 0f mov $0xfffffff,%edx <== NOT EXECUTED 125926: 2b 53 78 sub 0x78(%ebx),%edx <== NOT EXECUTED 125929: 39 d0 cmp %edx,%eax <== NOT EXECUTED 12592b: 73 28 jae 125955 <== NOT EXECUTED { fs_info->uino_pool_size <<= 1; 12592d: 89 43 74 mov %eax,0x74(%ebx) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 125930: 52 push %edx <== NOT EXECUTED 125931: 52 push %edx <== NOT EXECUTED 125932: 50 push %eax <== NOT EXECUTED 125933: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 125936: e8 0d 87 fe ff call 10e048 <== NOT EXECUTED 12593b: 89 43 6c mov %eax,0x6c(%ebx) <== NOT EXECUTED if (fs_info->uino != NULL) 12593e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125941: 85 c0 test %eax,%eax <== NOT EXECUTED 125943: 74 10 je 125955 <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 125945: 8b 43 74 mov 0x74(%ebx),%eax <== NOT EXECUTED 125948: 89 43 70 mov %eax,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++) 12594b: 8b 43 74 mov 0x74(%ebx),%eax <== NOT EXECUTED 12594e: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 125951: 31 d2 xor %edx,%edx <== NOT EXECUTED 125953: eb c2 jmp 125917 <== NOT EXECUTED 125955: 31 c0 xor %eax,%eax <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 125957: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12595a: 5b pop %ebx <== NOT EXECUTED 12595b: 5e pop %esi <== NOT EXECUTED 12595c: 5f pop %edi <== NOT EXECUTED 12595d: c9 leave <== NOT EXECUTED 12595e: c3 ret <== NOT EXECUTED =============================================================================== 00125ec7 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 125ec7: 55 push %ebp <== NOT EXECUTED 125ec8: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125eca: 57 push %edi <== NOT EXECUTED 125ecb: 56 push %esi <== NOT EXECUTED 125ecc: 53 push %ebx <== NOT EXECUTED 125ecd: 83 ec 34 sub $0x34,%esp <== NOT EXECUTED 125ed0: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 125ed3: 8b 77 34 mov 0x34(%edi),%esi <== NOT EXECUTED uint32_t cur_cln = start_cln; 125ed6: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 125ed9: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 125edc: 6a 01 push $0x1 <== NOT EXECUTED 125ede: 0f b7 46 06 movzwl 0x6(%esi),%eax <== NOT EXECUTED 125ee2: 50 push %eax <== NOT EXECUTED 125ee3: e8 e4 6a fe ff call 10c9cc <== NOT EXECUTED 125ee8: 89 c3 mov %eax,%ebx <== NOT EXECUTED if ( buf == NULL ) 125eea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125eed: 85 c0 test %eax,%eax <== NOT EXECUTED 125eef: 75 56 jne 125f47 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 125ef1: e8 1e 81 01 00 call 13e014 <__errno> <== NOT EXECUTED 125ef6: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 125efc: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 125eff: eb 61 jmp 125f62 <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); 125f01: 52 push %edx <== NOT EXECUTED 125f02: 53 push %ebx <== NOT EXECUTED 125f03: 50 push %eax <== NOT EXECUTED 125f04: 57 push %edi <== NOT EXECUTED 125f05: e8 73 ff ff ff call 125e7d <== NOT EXECUTED if ( ret == -1 ) 125f0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125f0d: 40 inc %eax <== NOT EXECUTED 125f0e: 75 0e jne 125f1e <== NOT EXECUTED { free(buf); 125f10: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125f13: 53 push %ebx <== NOT EXECUTED 125f14: e8 83 6f fe ff call 10ce9c <== NOT EXECUTED 125f19: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 125f1c: eb 41 jmp 125f5f <== NOT EXECUTED return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 125f1e: 51 push %ecx <== NOT EXECUTED 125f1f: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 125f22: 50 push %eax <== NOT EXECUTED 125f23: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 125f26: 57 push %edi <== NOT EXECUTED 125f27: e8 c5 44 01 00 call 13a3f1 <== NOT EXECUTED if ( rc != RC_OK ) 125f2c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125f2f: 85 c0 test %eax,%eax <== NOT EXECUTED 125f31: 74 14 je 125f47 <== NOT EXECUTED { free(buf); 125f33: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125f36: 53 push %ebx <== NOT EXECUTED 125f37: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 125f3a: e8 5d 6f fe ff call 10ce9c <== NOT EXECUTED return rc; 125f3f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125f42: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 125f45: eb 1b jmp 125f62 <== NOT EXECUTED buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 125f47: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 125f4a: 8b 56 0c mov 0xc(%esi),%edx <== NOT EXECUTED 125f4d: 21 c2 and %eax,%edx <== NOT EXECUTED 125f4f: 3b 56 10 cmp 0x10(%esi),%edx <== NOT EXECUTED 125f52: 72 ad jb 125f01 <== NOT EXECUTED free(buf); return rc; } } free(buf); 125f54: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125f57: 53 push %ebx <== NOT EXECUTED 125f58: e8 3f 6f fe ff call 10ce9c <== NOT EXECUTED 125f5d: 31 c0 xor %eax,%eax <== NOT EXECUTED return rc; 125f5f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 125f62: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125f65: 5b pop %ebx <== NOT EXECUTED 125f66: 5e pop %esi <== NOT EXECUTED 125f67: 5f pop %edi <== NOT EXECUTED 125f68: c9 leave <== NOT EXECUTED 125f69: c3 ret <== NOT EXECUTED =============================================================================== 00125ff1 : * 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) { 125ff1: 55 push %ebp <== NOT EXECUTED 125ff2: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125ff4: 57 push %edi <== NOT EXECUTED 125ff5: 56 push %esi <== NOT EXECUTED 125ff6: 53 push %ebx <== NOT EXECUTED 125ff7: 81 ec d4 00 00 00 sub $0xd4,%esp <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 125ffd: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 126000: 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; 126003: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED rc = stat(mt_entry->dev, &stat_buf); 12600a: 8d 45 90 lea -0x70(%ebp),%eax <== NOT EXECUTED 12600d: 50 push %eax <== NOT EXECUTED 12600e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 126011: ff 70 70 pushl 0x70(%eax) <== NOT EXECUTED 126014: e8 d3 82 fe ff call 10e2ec <== NOT EXECUTED 126019: 89 c6 mov %eax,%esi <== NOT EXECUTED if (rc == -1) 12601b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12601e: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 126021: 0f 84 b2 05 00 00 je 1265d9 <== NOT EXECUTED return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 126027: 8b 45 9c mov -0x64(%ebp),%eax <== NOT EXECUTED 12602a: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED 12602f: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED 126034: 74 0d je 126043 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOTTY); 126036: e8 d9 7f 01 00 call 13e014 <__errno> <== NOT EXECUTED 12603b: c7 00 19 00 00 00 movl $0x19,(%eax) <== NOT EXECUTED 126041: eb 22 jmp 126065 <== NOT EXECUTED /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 126043: 56 push %esi <== NOT EXECUTED 126044: 56 push %esi <== NOT EXECUTED 126045: ff 75 ac pushl -0x54(%ebp) <== NOT EXECUTED 126048: ff 75 a8 pushl -0x58(%ebp) <== NOT EXECUTED 12604b: e8 9d 5c fe ff call 10bced <== NOT EXECUTED 126050: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED if (vol->dd == NULL) 126053: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 126056: 85 c0 test %eax,%eax <== NOT EXECUTED 126058: 75 13 jne 12606d <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 12605a: e8 b5 7f 01 00 call 13e014 <__errno> <== NOT EXECUTED 12605f: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 126065: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 126068: e9 6c 05 00 00 jmp 1265d9 <== NOT EXECUTED vol->dev = stat_buf.st_rdev; 12606d: 8b 45 a8 mov -0x58(%ebp),%eax <== NOT EXECUTED 126070: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED 126073: 89 43 54 mov %eax,0x54(%ebx) <== NOT EXECUTED 126076: 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); 126079: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 12607c: 51 push %ecx <== NOT EXECUTED 12607d: 6a 00 push $0x0 <== NOT EXECUTED 12607f: 52 push %edx <== NOT EXECUTED 126080: 50 push %eax <== NOT EXECUTED 126081: e8 8e 4e fe ff call 10af14 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 126086: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 126089: 85 c0 test %eax,%eax <== NOT EXECUTED 12608b: 75 25 jne 1260b2 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 12608d: 8d 95 36 ff ff ff lea -0xca(%ebp),%edx <== NOT EXECUTED 126093: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 126096: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED 126099: b9 5a 00 00 00 mov $0x5a,%ecx <== NOT EXECUTED 12609e: 89 d7 mov %edx,%edi <== NOT EXECUTED 1260a0: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED sc = rtems_bdbuf_release( block); 1260a2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1260a5: 50 push %eax <== NOT EXECUTED 1260a6: e8 cc 3f fe ff call 10a077 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 1260ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1260ae: 85 c0 test %eax,%eax <== NOT EXECUTED 1260b0: 74 1b je 1260cd <== NOT EXECUTED { rtems_disk_release(vol->dd); 1260b2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1260b5: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 1260b8: e8 b7 5d fe ff call 10be74 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 1260bd: e8 52 7f 01 00 call 13e014 <__errno> <== NOT EXECUTED 1260c2: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 1260c8: e9 06 05 00 00 jmp 1265d3 <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 1260cd: 0f b6 95 42 ff ff ff movzbl -0xbe(%ebp),%edx <== NOT EXECUTED 1260d4: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 1260d7: 0f b6 85 41 ff ff ff movzbl -0xbf(%ebp),%eax <== NOT EXECUTED 1260de: 09 d0 or %edx,%eax <== NOT EXECUTED 1260e0: 66 89 03 mov %ax,(%ebx) <== NOT EXECUTED if ( (vol->bps != 512) && 1260e3: 66 3d 00 04 cmp $0x400,%ax <== NOT EXECUTED 1260e7: 74 16 je 1260ff <== NOT EXECUTED 1260e9: 66 3d 00 02 cmp $0x200,%ax <== NOT EXECUTED 1260ed: 74 10 je 1260ff <== NOT EXECUTED 1260ef: 66 3d 00 08 cmp $0x800,%ax <== NOT EXECUTED 1260f3: 74 0a je 1260ff <== NOT EXECUTED 1260f5: 66 3d 00 10 cmp $0x1000,%ax <== NOT EXECUTED 1260f9: 0f 85 43 02 00 00 jne 126342 <== 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; 1260ff: c6 43 03 00 movb $0x0,0x3(%ebx) <== NOT EXECUTED 126103: 66 c1 e8 09 shr $0x9,%ax <== NOT EXECUTED 126107: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 12610a: eb 05 jmp 126111 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 12610c: d1 f8 sar %eax <== NOT EXECUTED 12610e: fe 43 03 incb 0x3(%ebx) <== 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; 126111: a8 01 test $0x1,%al <== NOT EXECUTED 126113: 74 f7 je 12610c <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 126115: c6 43 02 00 movb $0x0,0x2(%ebx) <== NOT EXECUTED 126119: 0f b7 03 movzwl (%ebx),%eax <== NOT EXECUTED 12611c: eb 05 jmp 126123 <== NOT EXECUTED i >>= 1, vol->sec_log2++); 12611e: d1 f8 sar %eax <== NOT EXECUTED 126120: fe 43 02 incb 0x2(%ebx) <== 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; 126123: a8 01 test $0x1,%al <== NOT EXECUTED 126125: 74 f7 je 12611e <== NOT EXECUTED if ( (ret1 < 0) || (ret2 < 0) ) return -1; return RC_OK; } 126127: 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); 12612d: 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) 126130: 84 c0 test %al,%al <== NOT EXECUTED 126132: 0f 84 0a 02 00 00 je 126342 <== 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; 126138: c6 43 05 00 movb $0x0,0x5(%ebx) <== NOT EXECUTED 12613c: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 12613f: eb 05 jmp 126146 <== NOT EXECUTED i >>= 1, vol->spc_log2++); 126141: d1 f8 sar %eax <== NOT EXECUTED 126143: fe 43 05 incb 0x5(%ebx) <== 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; 126146: a8 01 test $0x1,%al <== NOT EXECUTED 126148: 74 f7 je 126141 <== 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) 12614a: 0f b7 03 movzwl (%ebx),%eax <== NOT EXECUTED 12614d: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 126151: d3 e0 shl %cl,%eax <== NOT EXECUTED 126153: 66 89 43 06 mov %ax,0x6(%ebx) <== NOT EXECUTED 126157: 66 3d 00 80 cmp $0x8000,%ax <== NOT EXECUTED 12615b: 0f 87 e1 01 00 00 ja 126342 <== 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; 126161: c6 43 08 00 movb $0x0,0x8(%ebx) <== NOT EXECUTED 126165: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 126168: eb 05 jmp 12616f <== NOT EXECUTED i >>= 1, vol->bpc_log2++); 12616a: d1 f8 sar %eax <== NOT EXECUTED 12616c: fe 43 08 incb 0x8(%ebx) <== 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; 12616f: a8 01 test $0x1,%al <== NOT EXECUTED 126171: 74 f7 je 12616a <== NOT EXECUTED i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 126173: 8a 85 46 ff ff ff mov -0xba(%ebp),%al <== NOT EXECUTED 126179: 88 43 09 mov %al,0x9(%ebx) <== NOT EXECUTED vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 12617c: 0f b6 95 45 ff ff ff movzbl -0xbb(%ebp),%edx <== NOT EXECUTED 126183: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 126186: 0f b6 85 44 ff ff ff movzbl -0xbc(%ebp),%eax <== NOT EXECUTED 12618d: 09 d0 or %edx,%eax <== NOT EXECUTED 12618f: 66 89 43 14 mov %ax,0x14(%ebx) <== NOT EXECUTED vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 126193: 0f b6 95 48 ff ff ff movzbl -0xb8(%ebp),%edx <== NOT EXECUTED 12619a: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 12619d: 0f b6 85 47 ff ff ff movzbl -0xb9(%ebp),%eax <== NOT EXECUTED 1261a4: 09 d0 or %edx,%eax <== NOT EXECUTED 1261a6: 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)) / 1261aa: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 1261ad: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 1261b0: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1261b3: 8d 44 01 ff lea -0x1(%ecx,%eax,1),%eax <== NOT EXECUTED 1261b7: 99 cltd <== NOT EXECUTED 1261b8: f7 f9 idiv %ecx <== NOT EXECUTED 1261ba: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 1261bd: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 1261c1: d3 e0 shl %cl,%eax <== NOT EXECUTED 1261c3: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 1261c6: 0f b6 85 4d ff ff ff movzbl -0xb3(%ebp),%eax <== NOT EXECUTED 1261cd: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 1261d0: 0f b6 95 4c ff ff ff movzbl -0xb4(%ebp),%edx <== NOT EXECUTED 1261d7: 66 09 d0 or %dx,%ax <== NOT EXECUTED 1261da: 74 05 je 1261e1 <== NOT EXECUTED vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 1261dc: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 1261df: eb 2b jmp 12620c <== NOT EXECUTED else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 1261e1: 0f b6 85 5b ff ff ff movzbl -0xa5(%ebp),%eax <== NOT EXECUTED 1261e8: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 1261eb: 0f b6 95 5c ff ff ff movzbl -0xa4(%ebp),%edx <== NOT EXECUTED 1261f2: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 1261f5: 09 d0 or %edx,%eax <== NOT EXECUTED 1261f7: 0f b6 95 5a ff ff ff movzbl -0xa6(%ebp),%edx <== NOT EXECUTED 1261fe: 09 d0 or %edx,%eax <== NOT EXECUTED 126200: 0f b6 95 5d ff ff ff movzbl -0xa3(%ebp),%edx <== NOT EXECUTED 126207: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12620a: 09 d0 or %edx,%eax <== NOT EXECUTED 12620c: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 12620f: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED 126213: 8b 4b 24 mov 0x24(%ebx),%ecx <== NOT EXECUTED 126216: 01 d1 add %edx,%ecx <== NOT EXECUTED 126218: 0f b6 43 09 movzbl 0x9(%ebx),%eax <== NOT EXECUTED 12621c: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED 126220: 01 c1 add %eax,%ecx <== NOT EXECUTED 126222: 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; 126225: 01 d0 add %edx,%eax <== NOT EXECUTED 126227: 89 43 1c mov %eax,0x1c(%ebx) <== NOT EXECUTED if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 12622a: 0f b6 85 4a ff ff ff movzbl -0xb6(%ebp),%eax <== NOT EXECUTED 126231: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 126234: 0f b6 95 49 ff ff ff movzbl -0xb7(%ebp),%edx <== NOT EXECUTED 12623b: 66 09 d0 or %dx,%ax <== NOT EXECUTED 12623e: 74 05 je 126245 <== NOT EXECUTED vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 126240: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 126243: eb 2b jmp 126270 <== NOT EXECUTED else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 126245: 0f b6 85 57 ff ff ff movzbl -0xa9(%ebp),%eax <== NOT EXECUTED 12624c: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12624f: 0f b6 95 58 ff ff ff movzbl -0xa8(%ebp),%edx <== NOT EXECUTED 126256: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 126259: 09 d0 or %edx,%eax <== NOT EXECUTED 12625b: 0f b6 95 56 ff ff ff movzbl -0xaa(%ebp),%edx <== NOT EXECUTED 126262: 09 d0 or %edx,%eax <== NOT EXECUTED 126264: 0f b6 95 59 ff ff ff movzbl -0xa7(%ebp),%edx <== NOT EXECUTED 12626b: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12626e: 09 d0 or %edx,%eax <== NOT EXECUTED 126270: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 126273: 8b 43 2c mov 0x2c(%ebx),%eax <== NOT EXECUTED 126276: 2b 43 30 sub 0x30(%ebx),%eax <== NOT EXECUTED 126279: 0f b6 4b 04 movzbl 0x4(%ebx),%ecx <== NOT EXECUTED 12627d: 31 d2 xor %edx,%edx <== NOT EXECUTED 12627f: f7 f1 div %ecx <== NOT EXECUTED 126281: 89 43 34 mov %eax,0x34(%ebx) <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 126284: 3d f4 0f 00 00 cmp $0xff4,%eax <== NOT EXECUTED 126289: 77 14 ja 12629f <== NOT EXECUTED { vol->type = FAT_FAT12; 12628b: c6 43 0a 01 movb $0x1,0xa(%ebx) <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; 12628f: c7 43 0c ff 0f 00 00 movl $0xfff,0xc(%ebx) <== NOT EXECUTED vol->eoc_val = FAT_FAT12_EOC; 126296: c7 43 10 f8 0f 00 00 movl $0xff8,0x10(%ebx) <== NOT EXECUTED 12629d: eb 2d jmp 1262cc <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 12629f: 3d f4 ff 00 00 cmp $0xfff4,%eax <== NOT EXECUTED 1262a4: 77 14 ja 1262ba <== NOT EXECUTED { vol->type = FAT_FAT16; 1262a6: c6 43 0a 02 movb $0x2,0xa(%ebx) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 1262aa: c7 43 0c ff ff 00 00 movl $0xffff,0xc(%ebx) <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 1262b1: c7 43 10 f8 ff 00 00 movl $0xfff8,0x10(%ebx) <== NOT EXECUTED 1262b8: eb 12 jmp 1262cc <== NOT EXECUTED } else { vol->type = FAT_FAT32; 1262ba: c6 43 0a 04 movb $0x4,0xa(%ebx) <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 1262be: c7 43 0c ff ff ff 0f movl $0xfffffff,0xc(%ebx) <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 1262c5: c7 43 10 f8 ff ff 0f movl $0xffffff8,0x10(%ebx) <== NOT EXECUTED fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; register fat_vol_t *vol = &fs_info->vol; 1262cc: 80 7b 0a 04 cmpb $0x4,0xa(%ebx) <== NOT EXECUTED 1262d0: 0f 85 92 01 00 00 jne 126468 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 1262d6: 0f b6 85 63 ff ff ff movzbl -0x9d(%ebp),%eax <== NOT EXECUTED 1262dd: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 1262e0: 0f b6 95 64 ff ff ff movzbl -0x9c(%ebp),%edx <== NOT EXECUTED 1262e7: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 1262ea: 09 d0 or %edx,%eax <== NOT EXECUTED 1262ec: 0f b6 95 62 ff ff ff movzbl -0x9e(%ebp),%edx <== NOT EXECUTED 1262f3: 09 d0 or %edx,%eax <== NOT EXECUTED 1262f5: 0f b6 95 65 ff ff ff movzbl -0x9b(%ebp),%edx <== NOT EXECUTED 1262fc: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 1262ff: 09 d0 or %edx,%eax <== NOT EXECUTED 126301: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 126304: 8a 85 5e ff ff ff mov -0xa2(%ebp),%al <== NOT EXECUTED 12630a: 83 e0 80 and $0xffffff80,%eax <== NOT EXECUTED 12630d: 88 43 48 mov %al,0x48(%ebx) <== NOT EXECUTED if (vol->mirror) 126310: 84 c0 test %al,%al <== NOT EXECUTED 126312: 74 0e je 126322 <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 126314: 8a 85 5e ff ff ff mov -0xa2(%ebp),%al <== NOT EXECUTED 12631a: 83 e0 0f and $0xf,%eax <== NOT EXECUTED 12631d: 88 43 50 mov %al,0x50(%ebx) <== NOT EXECUTED 126320: eb 04 jmp 126326 <== NOT EXECUTED else vol->afat = 0; 126322: c6 43 50 00 movb $0x0,0x50(%ebx) <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 126326: 0f b6 95 67 ff ff ff movzbl -0x99(%ebp),%edx <== NOT EXECUTED 12632d: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 126330: 0f b6 85 66 ff ff ff movzbl -0x9a(%ebp),%eax <== NOT EXECUTED 126337: 09 d0 or %edx,%eax <== NOT EXECUTED 126339: 66 89 43 3c mov %ax,0x3c(%ebx) <== NOT EXECUTED if( vol->info_sec == 0 ) 12633d: 66 85 c0 test %ax,%ax <== NOT EXECUTED 126340: 75 05 jne 126347 <== NOT EXECUTED { rtems_disk_release(vol->dd); 126342: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126345: eb 58 jmp 12639f <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, 126347: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12634a: 8d 75 d8 lea -0x28(%ebp),%esi <== NOT EXECUTED 12634d: 56 push %esi <== NOT EXECUTED 12634e: 6a 04 push $0x4 <== NOT EXECUTED 126350: 6a 00 push $0x0 <== NOT EXECUTED 126352: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 126355: 50 push %eax <== NOT EXECUTED 126356: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 126359: e8 0c fc ff ff call 125f6a <_fat_block_read> <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 12635e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 126361: 85 c0 test %eax,%eax <== NOT EXECUTED 126363: 79 05 jns 12636a <== NOT EXECUTED { rtems_disk_release(vol->dd); 126365: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126368: eb 7b jmp 1263e5 <== NOT EXECUTED return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 12636a: 0f b6 45 d9 movzbl -0x27(%ebp),%eax <== NOT EXECUTED 12636e: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 126371: 0f b6 55 da movzbl -0x26(%ebp),%edx <== NOT EXECUTED 126375: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 126378: 09 d0 or %edx,%eax <== NOT EXECUTED 12637a: 0f b6 55 d8 movzbl -0x28(%ebp),%edx <== NOT EXECUTED 12637e: 09 d0 or %edx,%eax <== NOT EXECUTED 126380: 0f b6 55 db movzbl -0x25(%ebp),%edx <== NOT EXECUTED 126384: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 126387: 09 d0 or %edx,%eax <== NOT EXECUTED 126389: 3d 52 52 61 41 cmp $0x41615252,%eax <== NOT EXECUTED 12638e: 74 27 je 1263b7 <== 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); 126390: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126393: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 126396: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED 126399: e8 c1 f5 ff ff call 12595f <== 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); 12639e: 59 pop %ecx <== NOT EXECUTED 12639f: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 1263a2: e8 cd 5a fe ff call 10be74 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 1263a7: e8 68 7c 01 00 call 13e014 <__errno> <== NOT EXECUTED 1263ac: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1263b2: e9 1c 02 00 00 jmp 1265d3 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 1263b7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1263ba: 56 push %esi <== NOT EXECUTED 1263bb: 6a 0c push $0xc <== NOT EXECUTED 1263bd: 68 e4 01 00 00 push $0x1e4 <== NOT EXECUTED 1263c2: 0f b7 43 3c movzwl 0x3c(%ebx),%eax <== NOT EXECUTED 1263c6: 50 push %eax <== NOT EXECUTED 1263c7: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1263ca: e8 9b fb ff ff call 125f6a <_fat_block_read> <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 1263cf: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1263d2: 85 c0 test %eax,%eax <== NOT EXECUTED 1263d4: 79 1c jns 1263f2 <== 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); 1263d6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1263d9: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1263dc: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED 1263df: e8 7b f5 ff ff call 12595f <== 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); 1263e4: 5a pop %edx <== NOT EXECUTED 1263e5: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 1263e8: e8 87 5a fe ff call 10be74 <== NOT EXECUTED 1263ed: e9 e1 01 00 00 jmp 1265d3 <== NOT EXECUTED return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 1263f2: 0f b6 45 dd movzbl -0x23(%ebp),%eax <== NOT EXECUTED 1263f6: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 1263f9: 0f b6 55 de movzbl -0x22(%ebp),%edx <== NOT EXECUTED 1263fd: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 126400: 09 d0 or %edx,%eax <== NOT EXECUTED 126402: 0f b6 55 dc movzbl -0x24(%ebp),%edx <== NOT EXECUTED 126406: 09 d0 or %edx,%eax <== NOT EXECUTED 126408: 0f b6 55 df movzbl -0x21(%ebp),%edx <== NOT EXECUTED 12640c: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12640f: 09 d0 or %edx,%eax <== NOT EXECUTED 126411: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 126414: 0f b6 45 e1 movzbl -0x1f(%ebp),%eax <== NOT EXECUTED 126418: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12641b: 0f b6 55 e2 movzbl -0x1e(%ebp),%edx <== NOT EXECUTED 12641f: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 126422: 09 d0 or %edx,%eax <== NOT EXECUTED 126424: 0f b6 55 e0 movzbl -0x20(%ebp),%edx <== NOT EXECUTED 126428: 09 d0 or %edx,%eax <== NOT EXECUTED 12642a: 0f b6 55 e3 movzbl -0x1d(%ebp),%edx <== NOT EXECUTED 12642e: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 126431: 09 d0 or %edx,%eax <== NOT EXECUTED 126433: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 126436: 50 push %eax <== NOT EXECUTED 126437: 6a ff push $0xffffffff <== NOT EXECUTED 126439: 6a ff push $0xffffffff <== NOT EXECUTED 12643b: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12643e: e8 d3 f8 ff ff call 125d16 <== NOT EXECUTED 126443: 89 c6 mov %eax,%esi <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 126445: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 126448: 85 c0 test %eax,%eax <== NOT EXECUTED 12644a: 74 39 je 126485 <== 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); 12644c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12644f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 126452: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED 126455: e8 05 f5 ff ff call 12595f <== 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); 12645a: 5f pop %edi <== NOT EXECUTED 12645b: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12645e: e8 11 5a fe ff call 10be74 <== NOT EXECUTED 126463: e9 6e 01 00 00 jmp 1265d6 <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 126468: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) <== NOT EXECUTED vol->mirror = 0; 12646f: c6 43 48 00 movb $0x0,0x48(%ebx) <== NOT EXECUTED vol->afat = 0; 126473: c6 43 50 00 movb $0x0,0x50(%ebx) <== NOT EXECUTED vol->free_cls = 0xFFFFFFFF; 126477: c7 43 40 ff ff ff ff movl $0xffffffff,0x40(%ebx) <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; 12647e: 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); 126485: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126488: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12648b: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED 12648e: e8 cc f4 ff ff call 12595f <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 126493: 0f b6 43 50 movzbl 0x50(%ebx),%eax <== NOT EXECUTED 126497: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED 12649b: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED 12649f: 01 d0 add %edx,%eax <== NOT EXECUTED 1264a1: 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)); 1264a4: 5a pop %edx <== NOT EXECUTED 1264a5: 59 pop %ecx <== NOT EXECUTED 1264a6: 6a 0c push $0xc <== NOT EXECUTED 1264a8: 6a 02 push $0x2 <== NOT EXECUTED 1264aa: e8 1d 65 fe ff call 10c9cc <== NOT EXECUTED 1264af: 89 43 64 mov %eax,0x64(%ebx) <== NOT EXECUTED if ( fs_info->vhash == NULL ) 1264b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1264b5: 85 c0 test %eax,%eax <== NOT EXECUTED 1264b7: 74 39 je 1264f2 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1264b9: 8d 50 04 lea 0x4(%eax),%edx <== NOT EXECUTED 1264bc: 89 10 mov %edx,(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 1264be: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 1264c5: 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); 1264c8: 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); 1264cb: 8d 48 10 lea 0x10(%eax),%ecx <== NOT EXECUTED 1264ce: 89 48 0c mov %ecx,0xc(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 1264d1: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 1264d8: 89 52 08 mov %edx,0x8(%edx) <== NOT EXECUTED fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 1264db: 50 push %eax <== NOT EXECUTED 1264dc: 50 push %eax <== NOT EXECUTED 1264dd: 6a 0c push $0xc <== NOT EXECUTED 1264df: 6a 02 push $0x2 <== NOT EXECUTED 1264e1: e8 e6 64 fe ff call 10c9cc <== NOT EXECUTED 1264e6: 89 43 68 mov %eax,0x68(%ebx) <== NOT EXECUTED if ( fs_info->rhash == NULL ) 1264e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1264ec: 85 c0 test %eax,%eax <== NOT EXECUTED 1264ee: 75 12 jne 126502 <== NOT EXECUTED 1264f0: eb 69 jmp 12655b <== 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); 1264f2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1264f5: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 1264f8: e8 77 59 fe ff call 10be74 <== NOT EXECUTED 1264fd: e9 c6 00 00 00 jmp 1265c8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 126502: 8d 50 04 lea 0x4(%eax),%edx <== NOT EXECUTED 126505: 89 10 mov %edx,(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 126507: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 12650e: 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); 126511: 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); 126514: 8d 48 10 lea 0x10(%eax),%ecx <== NOT EXECUTED 126517: 89 48 0c mov %ecx,0xc(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 12651a: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 126521: 89 52 08 mov %edx,0x8(%edx) <== NOT EXECUTED fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 126524: c7 43 74 00 01 00 00 movl $0x100,0x74(%ebx) <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 12652b: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 12652f: 8b 43 2c mov 0x2c(%ebx),%eax <== NOT EXECUTED 126532: d3 e0 shl %cl,%eax <== NOT EXECUTED 126534: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED 126537: 89 43 78 mov %eax,0x78(%ebx) <== NOT EXECUTED fs_info->index = 0; 12653a: 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)); 126541: 57 push %edi <== NOT EXECUTED 126542: 57 push %edi <== NOT EXECUTED 126543: 6a 01 push $0x1 <== NOT EXECUTED 126545: 68 00 01 00 00 push $0x100 <== NOT EXECUTED 12654a: e8 7d 64 fe ff call 10c9cc <== NOT EXECUTED 12654f: 89 43 6c mov %eax,0x6c(%ebx) <== NOT EXECUTED if ( fs_info->uino == NULL ) 126552: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 126555: 85 c0 test %eax,%eax <== NOT EXECUTED 126557: 75 2d jne 126586 <== NOT EXECUTED 126559: eb 11 jmp 12656c <== 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); 12655b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12655e: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 126561: e8 0e 59 fe ff call 10be74 <== NOT EXECUTED free(fs_info->vhash); 126566: 5e pop %esi <== NOT EXECUTED 126567: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 12656a: eb 57 jmp 1265c3 <== 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); 12656c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12656f: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 126572: e8 fd 58 fe ff call 10be74 <== NOT EXECUTED free(fs_info->vhash); 126577: 59 pop %ecx <== NOT EXECUTED 126578: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 12657b: e8 1c 69 fe ff call 10ce9c <== NOT EXECUTED free(fs_info->rhash); 126580: 5a pop %edx <== NOT EXECUTED 126581: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 126584: eb 3d jmp 1265c3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 126586: 50 push %eax <== NOT EXECUTED 126587: 50 push %eax <== NOT EXECUTED 126588: 6a 01 push $0x1 <== NOT EXECUTED 12658a: 0f b7 03 movzwl (%ebx),%eax <== NOT EXECUTED 12658d: 50 push %eax <== NOT EXECUTED 12658e: e8 39 64 fe ff call 10c9cc <== NOT EXECUTED 126593: 89 83 88 00 00 00 mov %eax,0x88(%ebx) <== NOT EXECUTED if (fs_info->sec_buf == NULL) 126599: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12659c: 31 f6 xor %esi,%esi <== NOT EXECUTED 12659e: 85 c0 test %eax,%eax <== NOT EXECUTED 1265a0: 75 37 jne 1265d9 <== NOT EXECUTED { rtems_disk_release(vol->dd); 1265a2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1265a5: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 1265a8: e8 c7 58 fe ff call 10be74 <== NOT EXECUTED free(fs_info->vhash); 1265ad: 5f pop %edi <== NOT EXECUTED 1265ae: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 1265b1: e8 e6 68 fe ff call 10ce9c <== NOT EXECUTED free(fs_info->rhash); 1265b6: 5e pop %esi <== NOT EXECUTED 1265b7: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 1265ba: e8 dd 68 fe ff call 10ce9c <== NOT EXECUTED free(fs_info->uino); 1265bf: 59 pop %ecx <== NOT EXECUTED 1265c0: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 1265c3: e8 d4 68 fe ff call 10ce9c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 1265c8: e8 47 7a 01 00 call 13e014 <__errno> <== NOT EXECUTED 1265cd: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 1265d3: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 1265d6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return RC_OK; } 1265d9: 89 f0 mov %esi,%eax <== NOT EXECUTED 1265db: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1265de: 5b pop %ebx <== NOT EXECUTED 1265df: 5e pop %esi <== NOT EXECUTED 1265e0: 5f pop %edi <== NOT EXECUTED 1265e1: c9 leave <== NOT EXECUTED 1265e2: c3 ret <== NOT EXECUTED =============================================================================== 001258af : inline bool fat_ino_is_unique( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 1258af: 55 push %ebp <== NOT EXECUTED 1258b0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1258b2: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1258b5: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED 1258b8: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 1258bb: 3b 50 78 cmp 0x78(%eax),%edx <== NOT EXECUTED 1258be: 0f 93 c0 setae %al <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return (ino >= fs_info->uino_base); } 1258c1: c9 leave <== NOT EXECUTED 1258c2: c3 ret <== NOT EXECUTED =============================================================================== 0013a607 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 13a607: 55 push %ebp <== NOT EXECUTED 13a608: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13a60a: 57 push %edi <== NOT EXECUTED 13a60b: 56 push %esi <== NOT EXECUTED 13a60c: 53 push %ebx <== NOT EXECUTED 13a60d: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 13a610: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 13a613: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 13a616: 8b 78 34 mov 0x34(%eax),%edi <== NOT EXECUTED uint32_t cl4find = 2; uint32_t next_cln = 0; 13a619: 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; 13a620: 8b 47 34 mov 0x34(%edi),%eax <== NOT EXECUTED 13a623: 83 c0 02 add $0x2,%eax <== NOT EXECUTED 13a626: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED uint32_t i = 2; *cls_added = 0; 13a629: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED if (count == 0) 13a62f: 31 f6 xor %esi,%esi <== NOT EXECUTED 13a631: 83 7d 10 00 cmpl $0x0,0x10(%ebp) <== NOT EXECUTED 13a635: 0f 84 3f 01 00 00 je 13a77a <== NOT EXECUTED return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 13a63b: 8b 5f 44 mov 0x44(%edi),%ebx <== NOT EXECUTED 13a63e: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 13a641: 75 05 jne 13a648 <== NOT EXECUTED 13a643: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED 13a648: c7 45 d4 02 00 00 00 movl $0x2,-0x2c(%ebp) <== NOT EXECUTED 13a64f: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 13a651: 89 d6 mov %edx,%esi <== NOT EXECUTED 13a653: e9 f3 00 00 00 jmp 13a74b <== NOT EXECUTED * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 13a658: 50 push %eax <== NOT EXECUTED 13a659: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 13a65c: 50 push %eax <== NOT EXECUTED 13a65d: 53 push %ebx <== NOT EXECUTED 13a65e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 13a661: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 13a664: e8 88 fd ff ff call 13a3f1 <== NOT EXECUTED if ( rc != RC_OK ) 13a669: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13a66c: 85 c0 test %eax,%eax <== NOT EXECUTED 13a66e: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 13a671: 74 0f je 13a682 <== NOT EXECUTED 13a673: 89 f2 mov %esi,%edx <== NOT EXECUTED { if (*cls_added != 0) 13a675: 89 c6 mov %eax,%esi <== NOT EXECUTED 13a677: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 13a67a: 0f 84 fa 00 00 00 je 13a77a <== NOT EXECUTED 13a680: eb 49 jmp 13a6cb <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 13a682: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 13a686: 0f 85 b1 00 00 00 jne 13a73d <== 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) 13a68c: 83 3e 00 cmpl $0x0,(%esi) <== NOT EXECUTED 13a68f: 75 1f jne 13a6b0 <== NOT EXECUTED { *chain = cl4find; 13a691: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 13a694: 89 18 mov %ebx,(%eax) <== NOT EXECUTED rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 13a696: 52 push %edx <== NOT EXECUTED 13a697: 6a ff push $0xffffffff <== NOT EXECUTED 13a699: 53 push %ebx <== NOT EXECUTED 13a69a: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 13a69d: e8 36 fb ff ff call 13a1d8 <== NOT EXECUTED if ( rc != RC_OK ) 13a6a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13a6a5: 85 c0 test %eax,%eax <== NOT EXECUTED 13a6a7: 74 71 je 13a71a <== NOT EXECUTED 13a6a9: 89 c6 mov %eax,%esi <== NOT EXECUTED 13a6ab: e9 ca 00 00 00 jmp 13a77a <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 13a6b0: 50 push %eax <== NOT EXECUTED 13a6b1: 6a ff push $0xffffffff <== NOT EXECUTED 13a6b3: 53 push %ebx <== NOT EXECUTED 13a6b4: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 13a6b7: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 13a6ba: e8 19 fb ff ff call 13a1d8 <== NOT EXECUTED if ( rc != RC_OK ) 13a6bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13a6c2: 85 c0 test %eax,%eax <== NOT EXECUTED 13a6c4: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 13a6c7: 74 16 je 13a6df <== NOT EXECUTED 13a6c9: 89 c6 mov %eax,%esi <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 13a6cb: 52 push %edx <== NOT EXECUTED 13a6cc: 52 push %edx <== NOT EXECUTED 13a6cd: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 13a6d0: ff 30 pushl (%eax) <== NOT EXECUTED 13a6d2: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 13a6d5: e8 81 fe ff ff call 13a55b <== NOT EXECUTED 13a6da: e9 98 00 00 00 jmp 13a777 <== NOT EXECUTED return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 13a6df: 50 push %eax <== NOT EXECUTED 13a6e0: 53 push %ebx <== NOT EXECUTED 13a6e1: 51 push %ecx <== NOT EXECUTED 13a6e2: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 13a6e5: e8 ee fa ff ff call 13a1d8 <== NOT EXECUTED if ( rc != RC_OK ) 13a6ea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13a6ed: 85 c0 test %eax,%eax <== NOT EXECUTED 13a6ef: 74 29 je 13a71a <== NOT EXECUTED 13a6f1: 89 c6 mov %eax,%esi <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 13a6f3: 51 push %ecx <== NOT EXECUTED 13a6f4: 51 push %ecx <== NOT EXECUTED 13a6f5: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 13a6f8: ff 30 pushl (%eax) <== NOT EXECUTED 13a6fa: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 13a6fd: e8 59 fe ff ff call 13a55b <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 13a702: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 13a705: 6a 00 push $0x0 <== NOT EXECUTED 13a707: 53 push %ebx <== NOT EXECUTED 13a708: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 13a70b: e8 c8 fa ff ff call 13a1d8 <== NOT EXECUTED fat_buf_release(fs_info); 13a710: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED 13a713: e8 47 b2 fe ff call 12595f <== NOT EXECUTED 13a718: eb 5d jmp 13a777 <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 13a71a: 8b 06 mov (%esi),%eax <== NOT EXECUTED 13a71c: 40 inc %eax <== NOT EXECUTED 13a71d: 89 06 mov %eax,(%esi) <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 13a71f: 3b 45 10 cmp 0x10(%ebp),%eax <== NOT EXECUTED 13a722: 75 17 jne 13a73b <== NOT EXECUTED { fs_info->vol.next_cl = save_cln; 13a724: 89 5f 44 mov %ebx,0x44(%edi) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 13a727: 8b 47 40 mov 0x40(%edi),%eax <== NOT EXECUTED 13a72a: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 13a72d: 74 05 je 13a734 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 13a72f: 2b 06 sub (%esi),%eax <== NOT EXECUTED 13a731: 89 47 40 mov %eax,0x40(%edi) <== NOT EXECUTED *last_cl = save_cln; 13a734: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED 13a737: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 13a739: eb 31 jmp 13a76c <== NOT EXECUTED fat_buf_release(fs_info); return rc; 13a73b: 89 d9 mov %ebx,%ecx <== NOT EXECUTED } } i++; cl4find++; 13a73d: 43 inc %ebx <== NOT EXECUTED if (cl4find >= data_cls_val) 13a73e: 3b 5d d0 cmp -0x30(%ebp),%ebx <== NOT EXECUTED 13a741: 72 05 jb 13a748 <== NOT EXECUTED 13a743: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; 13a748: ff 45 d4 incl -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) 13a74b: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 13a74e: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 13a751: 0f 82 01 ff ff ff jb 13a658 <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 13a757: 89 4f 44 mov %ecx,0x44(%edi) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 13a75a: 8b 47 40 mov 0x40(%edi),%eax <== NOT EXECUTED 13a75d: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 13a760: 74 05 je 13a767 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 13a762: 2b 06 sub (%esi),%eax <== NOT EXECUTED 13a764: 89 47 40 mov %eax,0x40(%edi) <== NOT EXECUTED *last_cl = save_cln; 13a767: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED 13a76a: 89 08 mov %ecx,(%eax) <== NOT EXECUTED fat_buf_release(fs_info); 13a76c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13a76f: 57 push %edi <== NOT EXECUTED 13a770: e8 ea b1 fe ff call 12595f <== NOT EXECUTED 13a775: 31 f6 xor %esi,%esi <== NOT EXECUTED return RC_OK; 13a777: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 13a77a: 89 f0 mov %esi,%eax <== NOT EXECUTED 13a77c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 13a77f: 5b pop %ebx <== NOT EXECUTED 13a780: 5e pop %esi <== NOT EXECUTED 13a781: 5f pop %edi <== NOT EXECUTED 13a782: c9 leave <== NOT EXECUTED 13a783: c3 ret <== NOT EXECUTED =============================================================================== 0013a1d8 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 13a1d8: 55 push %ebp <== NOT EXECUTED 13a1d9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13a1db: 57 push %edi <== NOT EXECUTED 13a1dc: 56 push %esi <== NOT EXECUTED 13a1dd: 53 push %ebx <== NOT EXECUTED 13a1de: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 13a1e1: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 13a1e4: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 13a1e7: 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; 13a1ea: 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)) ) 13a1f1: 83 fe 01 cmp $0x1,%esi <== NOT EXECUTED 13a1f4: 0f 86 e1 01 00 00 jbe 13a3db <== NOT EXECUTED 13a1fa: 8b 43 34 mov 0x34(%ebx),%eax <== NOT EXECUTED 13a1fd: 40 inc %eax <== NOT EXECUTED 13a1fe: 39 c6 cmp %eax,%esi <== NOT EXECUTED 13a200: 0f 87 d5 01 00 00 ja 13a3db <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 13a206: 0f b6 43 0a movzbl 0xa(%ebx),%eax <== NOT EXECUTED 13a20a: 89 c2 mov %eax,%edx <== NOT EXECUTED 13a20c: 83 e2 01 and $0x1,%edx <== NOT EXECUTED 13a20f: 74 08 je 13a219 <== NOT EXECUTED 13a211: 89 f7 mov %esi,%edi <== NOT EXECUTED 13a213: d1 ef shr %edi <== NOT EXECUTED 13a215: 01 f7 add %esi,%edi <== NOT EXECUTED 13a217: eb 0e jmp 13a227 <== NOT EXECUTED 13a219: 8d 3c 36 lea (%esi,%esi,1),%edi <== NOT EXECUTED 13a21c: a8 02 test $0x2,%al <== NOT EXECUTED 13a21e: 75 07 jne 13a227 <== NOT EXECUTED 13a220: 8d 3c b5 00 00 00 00 lea 0x0(,%esi,4),%edi <== NOT EXECUTED 13a227: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 13a22b: d3 ef shr %cl,%edi <== NOT EXECUTED 13a22d: 03 7b 4c add 0x4c(%ebx),%edi <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 13a230: 85 d2 test %edx,%edx <== NOT EXECUTED 13a232: 74 08 je 13a23c <== NOT EXECUTED 13a234: 89 f2 mov %esi,%edx <== NOT EXECUTED 13a236: d1 ea shr %edx <== NOT EXECUTED 13a238: 01 f2 add %esi,%edx <== NOT EXECUTED 13a23a: eb 0e jmp 13a24a <== NOT EXECUTED 13a23c: 8d 14 36 lea (%esi,%esi,1),%edx <== NOT EXECUTED 13a23f: a8 02 test $0x2,%al <== NOT EXECUTED 13a241: 75 07 jne 13a24a <== NOT EXECUTED 13a243: 8d 14 b5 00 00 00 00 lea 0x0(,%esi,4),%edx <== NOT EXECUTED 13a24a: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 13a24c: 66 89 45 d6 mov %ax,-0x2a(%ebp) <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 13a250: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 13a253: 51 push %ecx <== NOT EXECUTED 13a254: 6a 01 push $0x1 <== NOT EXECUTED 13a256: 57 push %edi <== NOT EXECUTED 13a257: 53 push %ebx <== NOT EXECUTED 13a258: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 13a25b: e8 46 b8 fe ff call 125aa6 <== NOT EXECUTED if (rc != RC_OK) 13a260: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13a263: 85 c0 test %eax,%eax <== NOT EXECUTED 13a265: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 13a268: 0f 85 7b 01 00 00 jne 13a3e9 <== 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); 13a26e: 0f b7 4d d6 movzwl -0x2a(%ebp),%ecx <== NOT EXECUTED 13a272: 49 dec %ecx <== NOT EXECUTED 13a273: 21 d1 and %edx,%ecx <== 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 ) 13a275: 8a 53 0a mov 0xa(%ebx),%dl <== NOT EXECUTED 13a278: 80 fa 02 cmp $0x2,%dl <== NOT EXECUTED 13a27b: 0f 84 2b 01 00 00 je 13a3ac <== NOT EXECUTED 13a281: 80 fa 04 cmp $0x4,%dl <== NOT EXECUTED 13a284: 0f 84 31 01 00 00 je 13a3bb <== NOT EXECUTED 13a28a: fe ca dec %dl <== NOT EXECUTED 13a28c: 0f 85 49 01 00 00 jne 13a3db <== NOT EXECUTED { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 13a292: 83 e6 01 and $0x1,%esi <== NOT EXECUTED 13a295: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 13a298: 0f 84 89 00 00 00 je 13a327 <== NOT EXECUTED { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 13a29e: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 13a2a1: c1 e6 04 shl $0x4,%esi <== NOT EXECUTED 13a2a4: 66 89 75 d6 mov %si,-0x2a(%ebp) <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 13a2a8: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 13a2ab: 01 ca add %ecx,%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)) = 13a2ad: 80 22 0f andb $0xf,(%edx) <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 13a2b0: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 13a2b3: 8b 72 20 mov 0x20(%edx),%esi <== NOT EXECUTED 13a2b6: 01 ce add %ecx,%esi <== NOT EXECUTED 13a2b8: 89 75 c4 mov %esi,-0x3c(%ebp) <== 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)) = 13a2bb: 8a 55 d6 mov -0x2a(%ebp),%dl <== NOT EXECUTED 13a2be: 08 16 or %dl,(%esi) <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 13a2c0: 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) ) 13a2c7: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 13a2ca: 4a dec %edx <== NOT EXECUTED 13a2cb: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 13a2cd: 75 35 jne 13a304 <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 13a2cf: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 13a2d2: 51 push %ecx <== NOT EXECUTED 13a2d3: 6a 01 push $0x1 <== NOT EXECUTED 13a2d5: 47 inc %edi <== NOT EXECUTED 13a2d6: 57 push %edi <== NOT EXECUTED 13a2d7: 53 push %ebx <== NOT EXECUTED 13a2d8: e8 c9 b7 fe ff call 125aa6 <== NOT EXECUTED &block0); if (rc != RC_OK) 13a2dd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13a2e0: 85 c0 test %eax,%eax <== NOT EXECUTED 13a2e2: 0f 85 01 01 00 00 jne 13a3e9 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 13a2e8: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 13a2eb: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 13a2ee: c6 02 00 movb $0x0,(%edx) <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 13a2f1: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 13a2f4: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = 13a2f7: 66 8b 4d d6 mov -0x2a(%ebp),%cx <== NOT EXECUTED 13a2fb: 66 c1 e9 08 shr $0x8,%cx <== NOT EXECUTED 13a2ff: e9 83 00 00 00 jmp 13a387 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 13a304: 8d 51 01 lea 0x1(%ecx),%edx <== NOT EXECUTED 13a307: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED 13a30a: 8b 5b 20 mov 0x20(%ebx),%ebx <== NOT EXECUTED 13a30d: c6 44 0b 01 00 movb $0x0,0x1(%ebx,%ecx,1) <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 13a312: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 13a315: 03 51 20 add 0x20(%ecx),%edx <== NOT EXECUTED } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = 13a318: 66 8b 4d d6 mov -0x2a(%ebp),%cx <== NOT EXECUTED 13a31c: 66 c1 e9 08 shr $0x8,%cx <== NOT EXECUTED 13a320: 08 0a or %cl,(%edx) <== NOT EXECUTED 13a322: e9 c2 00 00 00 jmp 13a3e9 <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 13a327: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 13a32a: 66 81 e6 ff 0f and $0xfff,%si <== NOT EXECUTED 13a32f: 66 89 75 d6 mov %si,-0x2a(%ebp) <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 13a333: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 13a336: c6 04 0a 00 movb $0x0,(%edx,%ecx,1) <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 13a33a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 13a33d: 8b 72 20 mov 0x20(%edx),%esi <== NOT EXECUTED 13a340: 01 ce add %ecx,%esi <== NOT EXECUTED 13a342: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 13a345: 8a 55 d6 mov -0x2a(%ebp),%dl <== NOT EXECUTED 13a348: 08 16 or %dl,(%esi) <== NOT EXECUTED 13a34a: 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) ) 13a351: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 13a354: 4a dec %edx <== NOT EXECUTED 13a355: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 13a357: 75 32 jne 13a38b <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 13a359: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 13a35c: 51 push %ecx <== NOT EXECUTED 13a35d: 6a 01 push $0x1 <== NOT EXECUTED 13a35f: 47 inc %edi <== NOT EXECUTED 13a360: 57 push %edi <== NOT EXECUTED 13a361: 53 push %ebx <== NOT EXECUTED 13a362: e8 3f b7 fe ff call 125aa6 <== NOT EXECUTED &block0); if (rc != RC_OK) 13a367: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13a36a: 85 c0 test %eax,%eax <== NOT EXECUTED 13a36c: 75 7b jne 13a3e9 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 13a36e: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 13a371: 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)) = 13a374: 80 22 f0 andb $0xf0,(%edx) <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 13a377: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 13a37a: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 13a37d: 66 8b 75 d6 mov -0x2a(%ebp),%si <== NOT EXECUTED 13a381: 66 c1 ee 08 shr $0x8,%si <== NOT EXECUTED 13a385: 89 f1 mov %esi,%ecx <== NOT EXECUTED 13a387: 08 0a or %cl,(%edx) <== NOT EXECUTED 13a389: eb 47 jmp 13a3d2 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 13a38b: 41 inc %ecx <== NOT EXECUTED 13a38c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 13a38f: 8b 5a 20 mov 0x20(%edx),%ebx <== NOT EXECUTED 13a392: 8d 14 19 lea (%ecx,%ebx,1),%edx <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 13a395: 80 22 f0 andb $0xf0,(%edx) <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 13a398: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 13a39b: 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)) = 13a39e: 66 8b 75 d6 mov -0x2a(%ebp),%si <== NOT EXECUTED 13a3a2: 66 c1 ee 08 shr $0x8,%si <== NOT EXECUTED 13a3a6: 89 f2 mov %esi,%edx <== NOT EXECUTED 13a3a8: 08 11 or %dl,(%ecx) <== NOT EXECUTED 13a3aa: eb 3d jmp 13a3e9 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 13a3ac: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 13a3af: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 13a3b2: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 13a3b5: 66 89 34 0a mov %si,(%edx,%ecx,1) <== NOT EXECUTED 13a3b9: eb 17 jmp 13a3d2 <== 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)); 13a3bb: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 13a3be: 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)) = 13a3c1: 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)) = 13a3c7: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 13a3ca: 81 e6 ff ff ff 0f and $0xfffffff,%esi <== NOT EXECUTED 13a3d0: 09 31 or %esi,(%ecx) <== NOT EXECUTED 13a3d2: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED 13a3d9: eb 0e jmp 13a3e9 <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 13a3db: e8 34 3c 00 00 call 13e014 <__errno> <== NOT EXECUTED 13a3e0: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 13a3e6: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED break; } return RC_OK; } 13a3e9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 13a3ec: 5b pop %ebx <== NOT EXECUTED 13a3ed: 5e pop %esi <== NOT EXECUTED 13a3ee: 5f pop %edi <== NOT EXECUTED 13a3ef: c9 leave <== NOT EXECUTED 13a3f0: c3 ret <== NOT EXECUTED =============================================================================== 00125d7a : * 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) { 125d7a: 55 push %ebp <== NOT EXECUTED 125d7b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125d7d: 57 push %edi <== NOT EXECUTED 125d7e: 56 push %esi <== NOT EXECUTED 125d7f: 53 push %ebx <== NOT EXECUTED 125d80: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 125d83: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 125d86: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) 125d89: 31 f6 xor %esi,%esi <== NOT EXECUTED 125d8b: f6 43 0a 04 testb $0x4,0xa(%ebx) <== NOT EXECUTED 125d8f: 74 19 je 125daa <== NOT EXECUTED { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 125d91: 52 push %edx <== NOT EXECUTED 125d92: ff 73 44 pushl 0x44(%ebx) <== NOT EXECUTED 125d95: ff 73 40 pushl 0x40(%ebx) <== NOT EXECUTED 125d98: 50 push %eax <== NOT EXECUTED 125d99: e8 78 ff ff ff call 125d16 <== NOT EXECUTED 125d9e: 89 c6 mov %eax,%esi <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 125da0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125da3: 85 c0 test %eax,%eax <== NOT EXECUTED 125da5: 74 03 je 125daa <== NOT EXECUTED 125da7: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); 125daa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125dad: 53 push %ebx <== NOT EXECUTED 125dae: e8 ac fb ff ff call 12595f <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 125db3: 59 pop %ecx <== NOT EXECUTED 125db4: 5f pop %edi <== NOT EXECUTED 125db5: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 125db8: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 125dbb: e8 62 39 fe ff call 109722 <== NOT EXECUTED 125dc0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125dc3: 85 c0 test %eax,%eax <== NOT EXECUTED 125dc5: 74 03 je 125dca <== NOT EXECUTED 125dc7: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 125dca: 31 ff xor %edi,%edi <== 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; 125dcc: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 125dcf: 01 f8 add %edi,%eax <== NOT EXECUTED 125dd1: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 125dd4: eb 0c jmp 125de2 <== NOT EXECUTED free(node); 125dd6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125dd9: 50 push %eax <== NOT EXECUTED 125dda: e8 bd 70 fe ff call 10ce9c <== NOT EXECUTED 125ddf: 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 ); 125de2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125de5: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 125de8: e8 c3 b8 fe ff call 1116b0 <_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 ) 125ded: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125df0: 85 c0 test %eax,%eax <== NOT EXECUTED 125df2: 75 e2 jne 125dd6 <== NOT EXECUTED 125df4: 83 c7 0c add $0xc,%edi <== 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++) 125df7: 83 ff 18 cmp $0x18,%edi <== NOT EXECUTED 125dfa: 75 d0 jne 125dcc <== NOT EXECUTED 125dfc: 66 31 ff xor %di,%di <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 125dff: 8b 43 68 mov 0x68(%ebx),%eax <== NOT EXECUTED 125e02: 01 f8 add %edi,%eax <== NOT EXECUTED 125e04: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 125e07: eb 0c jmp 125e15 <== NOT EXECUTED free(node); 125e09: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125e0c: 50 push %eax <== NOT EXECUTED 125e0d: e8 8a 70 fe ff call 10ce9c <== NOT EXECUTED 125e12: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125e15: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125e18: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 125e1b: e8 90 b8 fe ff call 1116b0 <_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 ) 125e20: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125e23: 85 c0 test %eax,%eax <== NOT EXECUTED 125e25: 75 e2 jne 125e09 <== NOT EXECUTED 125e27: 83 c7 0c add $0xc,%edi <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 125e2a: 83 ff 18 cmp $0x18,%edi <== NOT EXECUTED 125e2d: 75 d0 jne 125dff <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 125e2f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125e32: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 125e35: e8 62 70 fe ff call 10ce9c <== NOT EXECUTED free(fs_info->rhash); 125e3a: 5a pop %edx <== NOT EXECUTED 125e3b: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 125e3e: e8 59 70 fe ff call 10ce9c <== NOT EXECUTED free(fs_info->uino); 125e43: 58 pop %eax <== NOT EXECUTED 125e44: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 125e47: e8 50 70 fe ff call 10ce9c <== NOT EXECUTED free(fs_info->sec_buf); 125e4c: 5f pop %edi <== NOT EXECUTED 125e4d: ff b3 88 00 00 00 pushl 0x88(%ebx) <== NOT EXECUTED 125e53: e8 44 70 fe ff call 10ce9c <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 125e58: 59 pop %ecx <== NOT EXECUTED 125e59: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 125e5c: e8 13 60 fe ff call 10be74 <== NOT EXECUTED if (rc) 125e61: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125e64: 85 f6 test %esi,%esi <== NOT EXECUTED 125e66: 74 0b je 125e73 <== NOT EXECUTED errno = EIO; 125e68: e8 a7 81 01 00 call 13e014 <__errno> <== NOT EXECUTED 125e6d: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED return rc; } 125e73: 89 f0 mov %esi,%eax <== NOT EXECUTED 125e75: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125e78: 5b pop %ebx <== NOT EXECUTED 125e79: 5e pop %esi <== NOT EXECUTED 125e7a: 5f pop %edi <== NOT EXECUTED 125e7b: c9 leave <== NOT EXECUTED 125e7c: c3 ret <== NOT EXECUTED =============================================================================== 0013ab38 : #include int fchdir( int fd ) { 13ab38: 55 push %ebp <== NOT EXECUTED 13ab39: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13ab3b: 57 push %edi <== NOT EXECUTED 13ab3c: 56 push %esi <== NOT EXECUTED 13ab3d: 53 push %ebx <== NOT EXECUTED 13ab3e: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 13ab41: 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 ); 13ab44: 3b 1d 44 26 16 00 cmp 0x162644,%ebx <== NOT EXECUTED 13ab4a: 73 0f jae 13ab5b <== NOT EXECUTED iop = rtems_libio_iop( fd ); 13ab4c: c1 e3 06 shl $0x6,%ebx <== NOT EXECUTED 13ab4f: 03 1d d4 9f 16 00 add 0x169fd4,%ebx <== NOT EXECUTED rtems_libio_check_is_open(iop); 13ab55: f6 43 15 01 testb $0x1,0x15(%ebx) <== NOT EXECUTED 13ab59: 75 10 jne 13ab6b <== NOT EXECUTED 13ab5b: e8 b4 34 00 00 call 13e014 <__errno> <== NOT EXECUTED 13ab60: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 13ab66: e9 83 00 00 00 jmp 13abee <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 13ab6b: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 13ab6e: 85 c0 test %eax,%eax <== NOT EXECUTED 13ab70: 74 07 je 13ab79 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 13ab72: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED 13ab75: 85 c0 test %eax,%eax <== NOT EXECUTED 13ab77: 75 0d jne 13ab86 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 13ab79: e8 96 34 00 00 call 13e014 <__errno> <== NOT EXECUTED 13ab7e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 13ab84: eb 68 jmp 13abee <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 13ab86: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13ab89: 83 c3 18 add $0x18,%ebx <== NOT EXECUTED 13ab8c: 53 push %ebx <== NOT EXECUTED 13ab8d: ff d0 call *%eax <== NOT EXECUTED 13ab8f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13ab92: 48 dec %eax <== NOT EXECUTED 13ab93: 74 0d je 13aba2 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 13ab95: e8 7a 34 00 00 call 13e014 <__errno> <== NOT EXECUTED 13ab9a: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 13aba0: eb 4c jmp 13abee <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 13aba2: a1 fc 46 16 00 mov 0x1646fc,%eax <== NOT EXECUTED 13aba7: 8d 7d c0 lea -0x40(%ebp),%edi <== NOT EXECUTED 13abaa: 8d 70 04 lea 0x4(%eax),%esi <== NOT EXECUTED 13abad: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 13abb2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 13abb4: 8d 78 04 lea 0x4(%eax),%edi <== NOT EXECUTED 13abb7: b1 05 mov $0x5,%cl <== NOT EXECUTED 13abb9: 89 de mov %ebx,%esi <== NOT EXECUTED 13abbb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 13abbd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13abc0: 6a 00 push $0x0 <== NOT EXECUTED 13abc2: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED 13abc5: 50 push %eax <== NOT EXECUTED 13abc6: 6a 00 push $0x0 <== NOT EXECUTED 13abc8: 6a 01 push $0x1 <== NOT EXECUTED 13abca: 68 be 87 15 00 push $0x1587be <== NOT EXECUTED 13abcf: e8 5d 22 fd ff call 10ce31 <== NOT EXECUTED 13abd4: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 13abd7: 85 c0 test %eax,%eax <== NOT EXECUTED 13abd9: 74 18 je 13abf3 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 13abdb: 8b 3d fc 46 16 00 mov 0x1646fc,%edi <== NOT EXECUTED 13abe1: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 13abe4: 8d 75 c0 lea -0x40(%ebp),%esi <== NOT EXECUTED 13abe7: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 13abec: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 13abee: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 13abf1: eb 2f jmp 13ac22 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 13abf3: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 13abf6: 85 c0 test %eax,%eax <== NOT EXECUTED 13abf8: 74 13 je 13ac0d <== NOT EXECUTED 13abfa: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 13abfd: 85 c0 test %eax,%eax <== NOT EXECUTED 13abff: 74 0c je 13ac0d <== NOT EXECUTED 13ac01: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13ac04: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED 13ac07: 52 push %edx <== NOT EXECUTED 13ac08: ff d0 call *%eax <== NOT EXECUTED 13ac0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_current = loc; 13ac0d: 8b 3d fc 46 16 00 mov 0x1646fc,%edi <== NOT EXECUTED 13ac13: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 13ac16: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 13ac19: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 13ac1e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 13ac20: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; } 13ac22: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 13ac25: 5b pop %ebx <== NOT EXECUTED 13ac26: 5e pop %esi <== NOT EXECUTED 13ac27: 5f pop %edi <== NOT EXECUTED 13ac28: c9 leave <== NOT EXECUTED 13ac29: c3 ret <== NOT EXECUTED =============================================================================== 0012800c : int fchmod( int fd, mode_t mode ) { 12800c: 55 push %ebp <== NOT EXECUTED 12800d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12800f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 128012: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 128015: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 128018: 3b 05 44 26 16 00 cmp 0x162644,%eax <== NOT EXECUTED 12801e: 73 0f jae 12802f <== NOT EXECUTED iop = rtems_libio_iop( fd ); 128020: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 128023: 03 05 d4 9f 16 00 add 0x169fd4,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 128029: f6 40 15 01 testb $0x1,0x15(%eax) <== NOT EXECUTED 12802d: 75 0d jne 12803c <== NOT EXECUTED 12802f: e8 e0 5f 01 00 call 13e014 <__errno> <== NOT EXECUTED 128034: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 12803a: eb 28 jmp 128064 <== NOT EXECUTED /* * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) 12803c: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 12803f: 83 7a 1c 00 cmpl $0x0,0x1c(%edx) <== NOT EXECUTED 128043: 75 0d jne 128052 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 128045: e8 ca 5f 01 00 call 13e014 <__errno> <== NOT EXECUTED 12804a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 128050: eb 12 jmp 128064 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 128052: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED 128055: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 128058: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 12805b: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 12805e: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED } 128061: 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 ); 128062: ff e0 jmp *%eax <== NOT EXECUTED } 128064: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 128067: c9 leave <== NOT EXECUTED 128068: c3 ret <== NOT EXECUTED =============================================================================== 0012806c : int fchown( int fd, uid_t owner, gid_t group ) { 12806c: 55 push %ebp <== NOT EXECUTED 12806d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12806f: 53 push %ebx <== NOT EXECUTED 128070: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 128073: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 128076: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 128079: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 12807c: 3b 05 44 26 16 00 cmp 0x162644,%eax <== NOT EXECUTED 128082: 73 11 jae 128095 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 128084: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 128087: 03 05 d4 9f 16 00 add 0x169fd4,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 12808d: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 128090: f6 c6 01 test $0x1,%dh <== NOT EXECUTED 128093: 75 0d jne 1280a2 <== NOT EXECUTED 128095: e8 7a 5f 01 00 call 13e014 <__errno> <== NOT EXECUTED 12809a: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 1280a0: eb 40 jmp 1280e2 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1280a2: 80 e2 04 and $0x4,%dl <== NOT EXECUTED 1280a5: 75 0d jne 1280b4 <== NOT EXECUTED 1280a7: e8 68 5f 01 00 call 13e014 <__errno> <== NOT EXECUTED 1280ac: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1280b2: eb 2e jmp 1280e2 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 1280b4: 8b 50 24 mov 0x24(%eax),%edx <== NOT EXECUTED 1280b7: 8b 52 18 mov 0x18(%edx),%edx <== NOT EXECUTED 1280ba: 85 d2 test %edx,%edx <== NOT EXECUTED 1280bc: 75 0d jne 1280cb <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1280be: e8 51 5f 01 00 call 13e014 <__errno> <== NOT EXECUTED 1280c3: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1280c9: eb 17 jmp 1280e2 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 1280cb: 0f b7 db movzwl %bx,%ebx <== NOT EXECUTED 1280ce: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 1280d1: 0f b7 c9 movzwl %cx,%ecx <== NOT EXECUTED 1280d4: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 1280d7: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 1280da: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 1280dd: 59 pop %ecx <== NOT EXECUTED 1280de: 5b pop %ebx <== NOT EXECUTED 1280df: 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 ); 1280e0: ff e2 jmp *%edx <== NOT EXECUTED } 1280e2: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1280e5: 5a pop %edx <== NOT EXECUTED 1280e6: 5b pop %ebx <== NOT EXECUTED 1280e7: c9 leave <== NOT EXECUTED 1280e8: c3 ret <== NOT EXECUTED =============================================================================== 0013ac2c : int fcntl( int fd, int cmd, ... ) { 13ac2c: 55 push %ebp 13ac2d: 89 e5 mov %esp,%ebp 13ac2f: 57 push %edi 13ac30: 56 push %esi 13ac31: 53 push %ebx 13ac32: 83 ec 0c sub $0xc,%esp 13ac35: 8b 5d 08 mov 0x8(%ebp),%ebx #include #include /* 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, ...)); 13ac38: 8d 55 10 lea 0x10(%ebp),%edx int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 13ac3b: 8b 0d 44 26 16 00 mov 0x162644,%ecx 13ac41: 39 cb cmp %ecx,%ebx 13ac43: 73 16 jae 13ac5b <== NEVER TAKEN iop = rtems_libio_iop( fd ); 13ac45: a1 d4 9f 16 00 mov 0x169fd4,%eax 13ac4a: c1 e3 06 shl $0x6,%ebx 13ac4d: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 13ac50: 8b 73 14 mov 0x14(%ebx),%esi 13ac53: f7 c6 00 01 00 00 test $0x100,%esi 13ac59: 75 10 jne 13ac6b <== ALWAYS TAKEN 13ac5b: e8 b4 33 00 00 call 13e014 <__errno> <== NOT EXECUTED 13ac60: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 13ac66: e9 fe 00 00 00 jmp 13ad69 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 13ac6b: 83 7d 0c 09 cmpl $0x9,0xc(%ebp) 13ac6f: 0f 87 c1 00 00 00 ja 13ad36 13ac75: 8b 7d 0c mov 0xc(%ebp),%edi 13ac78: ff 24 bd f0 ec 15 00 jmp *0x15ecf0(,%edi,4) case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 13ac7f: 8b 32 mov (%edx),%esi if ( fd2 ) 13ac81: 85 f6 test %esi,%esi 13ac83: 74 10 je 13ac95 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); 13ac85: 31 d2 xor %edx,%edx <== NOT EXECUTED 13ac87: 39 ce cmp %ecx,%esi <== NOT EXECUTED 13ac89: 73 1c jae 13aca7 <== NOT EXECUTED 13ac8b: 89 f2 mov %esi,%edx <== NOT EXECUTED 13ac8d: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED 13ac90: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 13ac93: eb 12 jmp 13aca7 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 13ac95: e8 49 25 fd ff call 10d1e3 13ac9a: 89 c2 mov %eax,%edx if ( diop == 0 ) { 13ac9c: 83 ce ff or $0xffffffff,%esi 13ac9f: 85 c0 test %eax,%eax 13aca1: 0f 84 c5 00 00 00 je 13ad6c <== NEVER TAKEN ret = -1; break; } } diop->handlers = iop->handlers; 13aca7: 8b 43 3c mov 0x3c(%ebx),%eax 13acaa: 89 42 3c mov %eax,0x3c(%edx) diop->file_info = iop->file_info; 13acad: 8b 43 38 mov 0x38(%ebx),%eax 13acb0: 89 42 38 mov %eax,0x38(%edx) diop->flags = iop->flags; 13acb3: 8b 43 14 mov 0x14(%ebx),%eax 13acb6: 89 42 14 mov %eax,0x14(%edx) diop->pathinfo = iop->pathinfo; 13acb9: 8d 7a 18 lea 0x18(%edx),%edi 13acbc: 8d 73 18 lea 0x18(%ebx),%esi 13acbf: b9 05 00 00 00 mov $0x5,%ecx 13acc4: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 13acc6: 89 d6 mov %edx,%esi 13acc8: 2b 35 d4 9f 16 00 sub 0x169fd4,%esi 13acce: c1 fe 06 sar $0x6,%esi 13acd1: eb 70 jmp 13ad43 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 13acd3: c1 ee 0b shr $0xb,%esi 13acd6: 83 e6 01 and $0x1,%esi 13acd9: eb 6c jmp 13ad47 * 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 ) ) 13acdb: 83 3a 00 cmpl $0x0,(%edx) 13acde: 74 08 je 13ace8 <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 13ace0: 81 ce 00 08 00 00 or $0x800,%esi 13ace6: eb 06 jmp 13acee else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 13ace8: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi <== NOT EXECUTED 13acee: 89 73 14 mov %esi,0x14(%ebx) 13acf1: 31 f6 xor %esi,%esi 13acf3: eb 52 jmp 13ad47 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 13acf5: 83 ec 0c sub $0xc,%esp 13acf8: 56 push %esi 13acf9: e8 9a 23 fd ff call 10d098 13acfe: 89 c6 mov %eax,%esi 13ad00: 83 c4 10 add $0x10,%esp 13ad03: eb 3e jmp 13ad43 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 13ad05: 83 ec 0c sub $0xc,%esp 13ad08: ff 32 pushl (%edx) 13ad0a: e8 5f 25 fd ff call 10d26e /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 13ad0f: 25 01 02 00 00 and $0x201,%eax 13ad14: 8b 53 14 mov 0x14(%ebx),%edx 13ad17: 81 e2 fe fd ff ff and $0xfffffdfe,%edx 13ad1d: 09 d0 or %edx,%eax 13ad1f: 89 43 14 mov %eax,0x14(%ebx) 13ad22: 31 f6 xor %esi,%esi 13ad24: 83 c4 10 add $0x10,%esp 13ad27: eb 1e jmp 13ad47 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 13ad29: e8 e6 32 00 00 call 13e014 <__errno> 13ad2e: c7 00 86 00 00 00 movl $0x86,(%eax) 13ad34: eb 33 jmp 13ad69 ret = -1; break; default: errno = EINVAL; 13ad36: e8 d9 32 00 00 call 13e014 <__errno> 13ad3b: c7 00 16 00 00 00 movl $0x16,(%eax) 13ad41: eb 26 jmp 13ad69 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 13ad43: 85 f6 test %esi,%esi 13ad45: 78 25 js 13ad6c <== NEVER TAKEN if (iop->handlers->fcntl_h) { 13ad47: 8b 43 3c mov 0x3c(%ebx),%eax 13ad4a: 8b 40 30 mov 0x30(%eax),%eax 13ad4d: 85 c0 test %eax,%eax 13ad4f: 74 1b je 13ad6c <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 13ad51: 52 push %edx 13ad52: 52 push %edx 13ad53: 53 push %ebx 13ad54: ff 75 0c pushl 0xc(%ebp) 13ad57: ff d0 call *%eax 13ad59: 89 c3 mov %eax,%ebx if (err) { 13ad5b: 83 c4 10 add $0x10,%esp 13ad5e: 85 c0 test %eax,%eax 13ad60: 74 0a je 13ad6c <== ALWAYS TAKEN errno = err; 13ad62: e8 ad 32 00 00 call 13e014 <__errno> <== NOT EXECUTED 13ad67: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 13ad69: 83 ce ff or $0xffffffff,%esi va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 13ad6c: 89 f0 mov %esi,%eax 13ad6e: 8d 65 f4 lea -0xc(%ebp),%esp 13ad71: 5b pop %ebx 13ad72: 5e pop %esi 13ad73: 5f pop %edi 13ad74: c9 leave 13ad75: c3 ret =============================================================================== 00108008 : #include int fdatasync( int fd ) { 108008: 55 push %ebp 108009: 89 e5 mov %esp,%ebp 10800b: 83 ec 08 sub $0x8,%esp 10800e: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108011: 3b 05 44 41 12 00 cmp 0x124144,%eax 108017: 73 16 jae 10802f <== NEVER TAKEN iop = rtems_libio_iop( fd ); 108019: c1 e0 06 shl $0x6,%eax 10801c: 03 05 b8 80 12 00 add 0x1280b8,%eax rtems_libio_check_is_open(iop); 108022: 8b 50 14 mov 0x14(%eax),%edx 108025: f6 c6 01 test $0x1,%dh 108028: 74 05 je 10802f <== NEVER TAKEN rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); 10802a: 80 e2 04 and $0x4,%dl 10802d: 75 0d jne 10803c 10802f: e8 74 b9 00 00 call 1139a8 <__errno> 108034: c7 00 09 00 00 00 movl $0x9,(%eax) 10803a: eb 1d jmp 108059 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 10803c: 8b 50 3c mov 0x3c(%eax),%edx 10803f: 8b 52 2c mov 0x2c(%edx),%edx 108042: 85 d2 test %edx,%edx 108044: 75 0d jne 108053 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 108046: e8 5d b9 00 00 call 1139a8 <__errno> 10804b: c7 00 86 00 00 00 movl $0x86,(%eax) 108051: eb 06 jmp 108059 return (*iop->handlers->fdatasync_h)( iop ); 108053: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 108056: c9 leave <== NOT EXECUTED */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 108057: ff e2 jmp *%edx <== NOT EXECUTED } 108059: 83 c8 ff or $0xffffffff,%eax 10805c: c9 leave 10805d: c3 ret =============================================================================== 0010dbf3 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 10dbf3: 55 push %ebp 10dbf4: 89 e5 mov %esp,%ebp 10dbf6: 57 push %edi 10dbf7: 56 push %esi 10dbf8: 53 push %ebx 10dbf9: 83 ec 30 sub $0x30,%esp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 10dbfc: 6a 00 push $0x0 10dbfe: 6a 00 push $0x0 10dc00: ff 35 b8 5e 12 00 pushl 0x125eb8 10dc06: e8 ed c9 ff ff call 10a5f8 10dc0b: 89 c2 mov %eax,%edx 10dc0d: 83 c4 10 add $0x10,%esp 10dc10: be fc ff ff ff mov $0xfffffffc,%esi 10dc15: 85 c0 test %eax,%eax 10dc17: 0f 85 3e 03 00 00 jne 10df5b RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 10dc1d: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10dc20: 8b 18 mov (%eax),%ebx <== NOT EXECUTED if (pipe == NULL) { 10dc22: 85 db test %ebx,%ebx <== NOT EXECUTED 10dc24: 0f 85 50 01 00 00 jne 10dd7a <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 10dc2a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dc2d: 6a 34 push $0x34 <== NOT EXECUTED 10dc2f: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 10dc32: e8 05 9d ff ff call 10793c <== NOT EXECUTED 10dc37: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10dc39: 89 c6 mov %eax,%esi <== NOT EXECUTED if (pipe == NULL) 10dc3b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dc3e: 85 c0 test %eax,%eax <== NOT EXECUTED 10dc40: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10dc43: 0f 84 2a 01 00 00 je 10dd73 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 10dc49: b9 0d 00 00 00 mov $0xd,%ecx <== NOT EXECUTED 10dc4e: 89 c7 mov %eax,%edi <== NOT EXECUTED 10dc50: 89 d0 mov %edx,%eax <== NOT EXECUTED 10dc52: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED pipe->Size = PIPE_BUF; 10dc54: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 10dc5b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dc5e: 68 00 02 00 00 push $0x200 <== NOT EXECUTED 10dc63: e8 d4 9c ff ff call 10793c <== NOT EXECUTED 10dc68: 89 03 mov %eax,(%ebx) <== NOT EXECUTED if (! pipe->Buffer) 10dc6a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dc6d: 85 c0 test %eax,%eax <== NOT EXECUTED 10dc6f: 0f 84 f2 00 00 00 je 10dd67 <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 10dc75: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED 10dc78: 50 push %eax <== NOT EXECUTED 10dc79: 6a 00 push $0x0 <== NOT EXECUTED 10dc7b: 6a 00 push $0x0 <== NOT EXECUTED 10dc7d: 0f be 05 78 3f 12 00 movsbl 0x123f78,%eax <== NOT EXECUTED 10dc84: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED 10dc89: 50 push %eax <== NOT EXECUTED 10dc8a: e8 9d 1d 00 00 call 10fa2c <== NOT EXECUTED 10dc8f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dc92: 85 c0 test %eax,%eax <== NOT EXECUTED 10dc94: 0f 85 c0 00 00 00 jne 10dd5a <== 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( 10dc9a: 8d 43 30 lea 0x30(%ebx),%eax <== NOT EXECUTED 10dc9d: 50 push %eax <== NOT EXECUTED 10dc9e: 6a 00 push $0x0 <== NOT EXECUTED 10dca0: 6a 00 push $0x0 <== NOT EXECUTED 10dca2: 0f be 05 78 3f 12 00 movsbl 0x123f78,%eax <== NOT EXECUTED 10dca9: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED 10dcae: 50 push %eax <== NOT EXECUTED 10dcaf: e8 78 1d 00 00 call 10fa2c <== NOT EXECUTED 10dcb4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dcb7: 85 c0 test %eax,%eax <== NOT EXECUTED 10dcb9: 0f 85 8d 00 00 00 jne 10dd4c <== 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( 10dcbf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dcc2: 8d 43 28 lea 0x28(%ebx),%eax <== NOT EXECUTED 10dcc5: 50 push %eax <== NOT EXECUTED 10dcc6: 6a 00 push $0x0 <== NOT EXECUTED 10dcc8: 6a 10 push $0x10 <== NOT EXECUTED 10dcca: 6a 01 push $0x1 <== NOT EXECUTED 10dccc: 0f be 05 78 3f 12 00 movsbl 0x123f78,%eax <== NOT EXECUTED 10dcd3: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED 10dcd8: 50 push %eax <== NOT EXECUTED 10dcd9: e8 ee c6 ff ff call 10a3cc <== NOT EXECUTED 10dcde: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10dce1: 85 c0 test %eax,%eax <== NOT EXECUTED 10dce3: 75 59 jne 10dd3e <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 10dce5: 52 push %edx <== NOT EXECUTED 10dce6: 8d 75 e0 lea -0x20(%ebp),%esi <== NOT EXECUTED 10dce9: 56 push %esi <== NOT EXECUTED 10dcea: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10dced: 68 08 6b 12 00 push $0x126b08 <== NOT EXECUTED 10dcf2: e8 29 de ff ff call 10bb20 <_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 10dcf7: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 10dcfe: e8 0e e6 ff ff call 10c311 <_Thread_Enable_dispatch><== NOT EXECUTED 10dd03: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10dd06: 56 push %esi <== NOT EXECUTED 10dd07: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10dd0a: 68 08 6b 12 00 push $0x126b08 <== NOT EXECUTED 10dd0f: e8 0c de ff ff call 10bb20 <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 10dd14: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 10dd1b: e8 f1 e5 ff ff call 10c311 <_Thread_Enable_dispatch><== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 10dd20: a0 78 3f 12 00 mov 0x123f78,%al <== NOT EXECUTED 10dd25: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10dd28: 88 15 78 3f 12 00 mov %dl,0x123f78 <== NOT EXECUTED 10dd2e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dd31: 3c 7a cmp $0x7a,%al <== NOT EXECUTED 10dd33: 75 45 jne 10dd7a <== NOT EXECUTED c = 'a'; 10dd35: c6 05 78 3f 12 00 61 movb $0x61,0x123f78 <== NOT EXECUTED 10dd3c: eb 3c jmp 10dd7a <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 10dd3e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd41: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10dd44: e8 9b 1d 00 00 call 10fae4 <== NOT EXECUTED 10dd49: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 10dd4c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd4f: ff 76 2c pushl 0x2c(%esi) <== NOT EXECUTED 10dd52: e8 8d 1d 00 00 call 10fae4 <== NOT EXECUTED 10dd57: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 10dd5a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd5d: ff 36 pushl (%esi) <== NOT EXECUTED 10dd5f: e8 38 99 ff ff call 10769c <== NOT EXECUTED 10dd64: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_buf: free(pipe); 10dd67: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd6a: 56 push %esi <== NOT EXECUTED 10dd6b: e8 2c 99 ff ff call 10769c <== NOT EXECUTED 10dd70: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dd73: be f4 ff ff ff mov $0xfffffff4,%esi <== NOT EXECUTED 10dd78: eb 34 jmp 10ddae <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 10dd7a: 50 push %eax <== NOT EXECUTED 10dd7b: 6a 00 push $0x0 <== NOT EXECUTED 10dd7d: 6a 00 push $0x0 <== NOT EXECUTED 10dd7f: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dd82: e8 71 c8 ff ff call 10a5f8 <== NOT EXECUTED 10dd87: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dd8a: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10dd8d: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10dd8f: f7 d6 not %esi <== NOT EXECUTED 10dd91: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 10dd94: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10dd97: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 10dd9a: 75 12 jne 10ddae <== NOT EXECUTED if (err) 10dd9c: 85 f6 test %esi,%esi <== NOT EXECUTED 10dd9e: 74 09 je 10dda9 <== NOT EXECUTED pipe_free(pipe); 10dda0: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10dda2: e8 41 fd ff ff call 10dae8 <== NOT EXECUTED 10dda7: eb 05 jmp 10ddae <== NOT EXECUTED else *pipep = pipe; 10dda9: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10ddac: 89 18 mov %ebx,(%eax) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 10ddae: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ddb1: ff 35 b8 5e 12 00 pushl 0x125eb8 <== NOT EXECUTED 10ddb7: e8 28 c9 ff ff call 10a6e4 <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 10ddbc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ddbf: 85 f6 test %esi,%esi <== NOT EXECUTED 10ddc1: 0f 85 94 01 00 00 jne 10df5b <== NOT EXECUTED return err; pipe = *pipep; 10ddc7: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10ddca: 8b 1a mov (%edx),%ebx <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 10ddcc: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10ddcf: 8b 42 14 mov 0x14(%edx),%eax <== NOT EXECUTED 10ddd2: 83 e0 06 and $0x6,%eax <== NOT EXECUTED 10ddd5: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10ddd8: 0f 84 91 00 00 00 je 10de6f <== NOT EXECUTED 10ddde: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10dde1: 0f 84 10 01 00 00 je 10def7 <== NOT EXECUTED 10dde7: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10ddea: 0f 85 49 01 00 00 jne 10df39 <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; 10ddf0: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10ddf3: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10ddf6: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10ddf9: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10ddfc: 85 c0 test %eax,%eax <== NOT EXECUTED 10ddfe: 75 11 jne 10de11 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10de00: 57 push %edi <== NOT EXECUTED 10de01: 57 push %edi <== NOT EXECUTED 10de02: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10de05: 50 push %eax <== NOT EXECUTED 10de06: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10de09: e8 36 1d 00 00 call 10fb44 <== NOT EXECUTED 10de0e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (pipe->Writers == 0) { 10de11: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10de15: 0f 85 1e 01 00 00 jne 10df39 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 10de1b: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10de1e: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10de22: 0f 85 11 01 00 00 jne 10df39 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 10de28: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 10de2b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10de2e: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10de31: e8 ae c8 ff ff call 10a6e4 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10de36: 5a pop %edx <== NOT EXECUTED 10de37: 59 pop %ecx <== NOT EXECUTED 10de38: 6a 00 push $0x0 <== NOT EXECUTED 10de3a: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10de3d: e8 5a 1d 00 00 call 10fb9c <== NOT EXECUTED 10de42: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10de45: 85 c0 test %eax,%eax <== NOT EXECUTED 10de47: 0f 85 f9 00 00 00 jne 10df46 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 10de4d: 50 push %eax <== NOT EXECUTED 10de4e: 6a 00 push $0x0 <== NOT EXECUTED 10de50: 6a 00 push $0x0 <== NOT EXECUTED 10de52: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10de55: e8 9e c7 ff ff call 10a5f8 <== NOT EXECUTED 10de5a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10de5d: 85 c0 test %eax,%eax <== NOT EXECUTED 10de5f: 0f 85 e1 00 00 00 jne 10df46 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 10de65: 3b 7b 24 cmp 0x24(%ebx),%edi <== NOT EXECUTED 10de68: 74 c1 je 10de2b <== NOT EXECUTED 10de6a: e9 ca 00 00 00 jmp 10df39 <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 10de6f: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10de72: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10de75: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10de78: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10de7b: 85 c0 test %eax,%eax <== NOT EXECUTED 10de7d: 75 11 jne 10de90 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10de7f: 57 push %edi <== NOT EXECUTED 10de80: 57 push %edi <== NOT EXECUTED 10de81: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10de84: 50 push %eax <== NOT EXECUTED 10de85: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10de88: e8 b7 1c 00 00 call 10fb44 <== NOT EXECUTED 10de8d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 10de90: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10de94: 0f 85 9f 00 00 00 jne 10df39 <== NOT EXECUTED 10de9a: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10de9d: f6 42 14 01 testb $0x1,0x14(%edx) <== NOT EXECUTED 10dea1: 74 18 je 10debb <== NOT EXECUTED PIPE_UNLOCK(pipe); 10dea3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dea6: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dea9: e8 36 c8 ff ff call 10a6e4 <== NOT EXECUTED 10deae: be fa ff ff ff mov $0xfffffffa,%esi <== NOT EXECUTED err = -ENXIO; goto out_error; 10deb3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10deb6: e9 90 00 00 00 jmp 10df4b <== NOT EXECUTED } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 10debb: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 10debe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dec1: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dec4: e8 1b c8 ff ff call 10a6e4 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10dec9: 5a pop %edx <== NOT EXECUTED 10deca: 59 pop %ecx <== NOT EXECUTED 10decb: 6a 00 push $0x0 <== NOT EXECUTED 10decd: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10ded0: e8 c7 1c 00 00 call 10fb9c <== NOT EXECUTED 10ded5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ded8: 85 c0 test %eax,%eax <== NOT EXECUTED 10deda: 75 6a jne 10df46 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 10dedc: 50 push %eax <== NOT EXECUTED 10dedd: 6a 00 push $0x0 <== NOT EXECUTED 10dedf: 6a 00 push $0x0 <== NOT EXECUTED 10dee1: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dee4: e8 0f c7 ff ff call 10a5f8 <== NOT EXECUTED 10dee9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10deec: 85 c0 test %eax,%eax <== NOT EXECUTED 10deee: 75 56 jne 10df46 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 10def0: 3b 7b 20 cmp 0x20(%ebx),%edi <== NOT EXECUTED 10def3: 74 c9 je 10debe <== NOT EXECUTED 10def5: eb 42 jmp 10df39 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 10def7: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10defa: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10defd: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10df00: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10df03: 85 c0 test %eax,%eax <== NOT EXECUTED 10df05: 75 11 jne 10df18 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10df07: 57 push %edi <== NOT EXECUTED 10df08: 57 push %edi <== NOT EXECUTED 10df09: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10df0c: 50 push %eax <== NOT EXECUTED 10df0d: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10df10: e8 2f 1c 00 00 call 10fb44 <== NOT EXECUTED 10df15: 83 c4 10 add $0x10,%esp <== NOT EXECUTED pipe->writerCounter ++; 10df18: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10df1b: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10df1e: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10df21: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10df24: 85 c0 test %eax,%eax <== NOT EXECUTED 10df26: 75 11 jne 10df39 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10df28: 51 push %ecx <== NOT EXECUTED 10df29: 51 push %ecx <== NOT EXECUTED 10df2a: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10df2d: 50 push %eax <== NOT EXECUTED 10df2e: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10df31: e8 0e 1c 00 00 call 10fb44 <== NOT EXECUTED 10df36: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 10df39: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10df3c: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10df3f: e8 a0 c7 ff ff call 10a6e4 <== NOT EXECUTED 10df44: eb 12 jmp 10df58 <== NOT EXECUTED return 0; 10df46: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED out_error: pipe_release(pipep, iop); 10df4b: 52 push %edx <== NOT EXECUTED 10df4c: 52 push %edx <== NOT EXECUTED 10df4d: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10df50: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10df53: e8 cb fb ff ff call 10db23 <== NOT EXECUTED return err; 10df58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10df5b: 89 f0 mov %esi,%eax 10df5d: 8d 65 f4 lea -0xc(%ebp),%esp 10df60: 5b pop %ebx 10df61: 5e pop %esi 10df62: 5f pop %edi 10df63: c9 leave 10df64: c3 ret =============================================================================== 00108060 : long fpathconf( int fd, int name ) { 108060: 55 push %ebp 108061: 89 e5 mov %esp,%ebp 108063: 83 ec 08 sub $0x8,%esp 108066: 8b 45 08 mov 0x8(%ebp),%eax 108069: 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); 10806c: 3b 05 44 41 12 00 cmp 0x124144,%eax 108072: 73 0f jae 108083 iop = rtems_libio_iop(fd); 108074: c1 e0 06 shl $0x6,%eax 108077: 03 05 b8 80 12 00 add 0x1280b8,%eax rtems_libio_check_is_open(iop); 10807d: f6 40 15 01 testb $0x1,0x15(%eax) 108081: 75 0d jne 108090 <== ALWAYS TAKEN 108083: e8 20 b9 00 00 call 1139a8 <__errno> 108088: c7 00 09 00 00 00 movl $0x9,(%eax) 10808e: eb 56 jmp 1080e6 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 108090: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 108093: 83 fa 0b cmp $0xb,%edx 108096: 77 43 ja 1080db 108098: ff 24 95 b0 1b 12 00 jmp *0x121bb0(,%edx,4) case _PC_LINK_MAX: return_value = the_limits->link_max; 10809f: 8b 40 38 mov 0x38(%eax),%eax break; 1080a2: eb 45 jmp 1080e9 case _PC_MAX_CANON: return_value = the_limits->max_canon; 1080a4: 8b 40 3c mov 0x3c(%eax),%eax break; 1080a7: eb 40 jmp 1080e9 case _PC_MAX_INPUT: return_value = the_limits->max_input; 1080a9: 8b 40 40 mov 0x40(%eax),%eax break; 1080ac: eb 3b jmp 1080e9 case _PC_NAME_MAX: return_value = the_limits->name_max; 1080ae: 8b 40 44 mov 0x44(%eax),%eax break; 1080b1: eb 36 jmp 1080e9 case _PC_PATH_MAX: return_value = the_limits->path_max; 1080b3: 8b 40 48 mov 0x48(%eax),%eax break; 1080b6: eb 31 jmp 1080e9 case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 1080b8: 8b 40 4c mov 0x4c(%eax),%eax break; 1080bb: eb 2c jmp 1080e9 case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 1080bd: 8b 40 54 mov 0x54(%eax),%eax break; 1080c0: eb 27 jmp 1080e9 case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 1080c2: 8b 40 58 mov 0x58(%eax),%eax break; 1080c5: eb 22 jmp 1080e9 case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 1080c7: 8b 40 64 mov 0x64(%eax),%eax break; 1080ca: eb 1d jmp 1080e9 case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 1080cc: 8b 40 50 mov 0x50(%eax),%eax break; 1080cf: eb 18 jmp 1080e9 case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 1080d1: 8b 40 5c mov 0x5c(%eax),%eax break; 1080d4: eb 13 jmp 1080e9 case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 1080d6: 8b 40 60 mov 0x60(%eax),%eax break; 1080d9: eb 0e jmp 1080e9 default: rtems_set_errno_and_return_minus_one( EINVAL ); 1080db: e8 c8 b8 00 00 call 1139a8 <__errno> 1080e0: c7 00 16 00 00 00 movl $0x16,(%eax) 1080e6: 83 c8 ff or $0xffffffff,%eax break; } return return_value; } 1080e9: c9 leave 1080ea: c3 ret =============================================================================== 0010769c : void free( void *ptr ) { MSBUMP(free_calls, 1); 10769c: 55 push %ebp 10769d: 89 e5 mov %esp,%ebp 10769f: 53 push %ebx 1076a0: 83 ec 04 sub $0x4,%esp 1076a3: 8b 5d 08 mov 0x8(%ebp),%ebx 1076a6: ff 05 dc 60 12 00 incl 0x1260dc if ( !ptr ) 1076ac: 85 db test %ebx,%ebx 1076ae: 74 5f je 10770f /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1076b0: 83 3d a0 63 12 00 03 cmpl $0x3,0x1263a0 1076b7: 75 15 jne 1076ce 1076b9: e8 56 01 00 00 call 107814 1076be: 84 c0 test %al,%al 1076c0: 75 0c jne 1076ce <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1076c2: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1076c5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1076c8: 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); 1076c9: e9 84 01 00 00 jmp 107852 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1076ce: a1 30 45 12 00 mov 0x124530,%eax 1076d3: 85 c0 test %eax,%eax 1076d5: 74 0a je 1076e1 (*rtems_malloc_statistics_helpers->at_free)(ptr); 1076d7: 83 ec 0c sub $0xc,%esp 1076da: 53 push %ebx 1076db: ff 50 08 call *0x8(%eax) 1076de: 83 c4 10 add $0x10,%esp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 1076e1: 50 push %eax 1076e2: 50 push %eax 1076e3: 53 push %ebx 1076e4: ff 35 50 21 12 00 pushl 0x122150 1076ea: e8 f9 46 00 00 call 10bde8 <_Protected_heap_Free> 1076ef: 83 c4 10 add $0x10,%esp 1076f2: 84 c0 test %al,%al 1076f4: 75 19 jne 10770f <== 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 1076f6: a1 50 21 12 00 mov 0x122150,%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", 1076fb: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED 1076fe: ff 70 18 pushl 0x18(%eax) <== NOT EXECUTED 107701: 53 push %ebx <== NOT EXECUTED 107702: 68 17 01 12 00 push $0x120117 <== NOT EXECUTED 107707: e8 8c 0c 00 00 call 108398 <== NOT EXECUTED 10770c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 10770f: 8b 5d fc mov -0x4(%ebp),%ebx 107712: c9 leave 107713: c3 ret =============================================================================== 001291a0 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 1291a0: 55 push %ebp <== NOT EXECUTED 1291a1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1291a3: 53 push %ebx <== NOT EXECUTED 1291a4: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 1291a7: 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 1291aa: 81 fb 24 a0 16 00 cmp $0x16a024,%ebx <== NOT EXECUTED 1291b0: 74 40 je 1291f2 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 1291b2: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 1291b5: 85 c0 test %eax,%eax <== NOT EXECUTED 1291b7: 74 13 je 1291cc <== NOT EXECUTED 1291b9: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1291bc: 85 c0 test %eax,%eax <== NOT EXECUTED 1291be: 74 0c je 1291cc <== NOT EXECUTED 1291c0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1291c3: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED 1291c6: 52 push %edx <== NOT EXECUTED 1291c7: ff d0 call *%eax <== NOT EXECUTED 1291c9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 1291cc: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 1291cf: 85 c0 test %eax,%eax <== NOT EXECUTED 1291d1: 74 13 je 1291e6 <== NOT EXECUTED 1291d3: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1291d6: 85 c0 test %eax,%eax <== NOT EXECUTED 1291d8: 74 0c je 1291e6 <== NOT EXECUTED 1291da: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1291dd: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED 1291e0: 52 push %edx <== NOT EXECUTED 1291e1: ff d0 call *%eax <== NOT EXECUTED 1291e3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(env); 1291e6: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 1291e9: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1291ec: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 1291ed: e9 aa 3c fe ff jmp 10ce9c <== NOT EXECUTED } } 1291f2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1291f5: c9 leave <== NOT EXECUTED 1291f6: c3 ret <== NOT EXECUTED =============================================================================== 0011dfc4 : int fstat( int fd, struct stat *sbuf ) { 11dfc4: 55 push %ebp 11dfc5: 89 e5 mov %esp,%ebp 11dfc7: 57 push %edi 11dfc8: 53 push %ebx 11dfc9: 8b 55 08 mov 0x8(%ebp),%edx 11dfcc: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11dfcf: 85 db test %ebx,%ebx 11dfd1: 75 0d jne 11dfe0 rtems_set_errno_and_return_minus_one( EFAULT ); 11dfd3: e8 3c 4a ff ff call 112a14 <__errno> 11dfd8: c7 00 0e 00 00 00 movl $0xe,(%eax) 11dfde: eb 5d jmp 11e03d /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11dfe0: 3b 15 44 21 12 00 cmp 0x122144,%edx 11dfe6: 73 16 jae 11dffe 11dfe8: c1 e2 06 shl $0x6,%edx 11dfeb: 03 15 b8 60 12 00 add 0x1260b8,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11dff1: f6 42 15 01 testb $0x1,0x15(%edx) 11dff5: 74 07 je 11dffe <== NEVER TAKEN if ( !iop->handlers ) 11dff7: 8b 42 3c mov 0x3c(%edx),%eax 11dffa: 85 c0 test %eax,%eax 11dffc: 75 0d jne 11e00b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 11dffe: e8 11 4a ff ff call 112a14 <__errno> 11e003: c7 00 09 00 00 00 movl $0x9,(%eax) 11e009: eb 32 jmp 11e03d if ( !iop->handlers->fstat_h ) 11e00b: 83 78 18 00 cmpl $0x0,0x18(%eax) 11e00f: 75 0d jne 11e01e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11e011: e8 fe 49 ff ff call 112a14 <__errno> <== NOT EXECUTED 11e016: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11e01c: eb 1f jmp 11e03d <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11e01e: b9 12 00 00 00 mov $0x12,%ecx 11e023: 31 c0 xor %eax,%eax 11e025: 89 df mov %ebx,%edi 11e027: f3 ab rep stos %eax,%es:(%edi) return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 11e029: 8b 42 3c mov 0x3c(%edx),%eax 11e02c: 89 5d 0c mov %ebx,0xc(%ebp) 11e02f: 83 c2 18 add $0x18,%edx 11e032: 89 55 08 mov %edx,0x8(%ebp) 11e035: 8b 40 18 mov 0x18(%eax),%eax } 11e038: 5b pop %ebx 11e039: 5f pop %edi 11e03a: 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 ); 11e03b: ff e0 jmp *%eax } 11e03d: 83 c8 ff or $0xffffffff,%eax 11e040: 5b pop %ebx 11e041: 5f pop %edi 11e042: c9 leave 11e043: c3 ret =============================================================================== 00128184 : #include int fsync( int fd ) { 128184: 55 push %ebp 128185: 89 e5 mov %esp,%ebp 128187: 83 ec 08 sub $0x8,%esp 12818a: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 12818d: 3b 05 44 26 16 00 cmp 0x162644,%eax 128193: 73 16 jae 1281ab <== NEVER TAKEN iop = rtems_libio_iop( fd ); 128195: c1 e0 06 shl $0x6,%eax 128198: 03 05 d4 9f 16 00 add 0x169fd4,%eax rtems_libio_check_is_open(iop); 12819e: f6 40 15 01 testb $0x1,0x15(%eax) 1281a2: 74 07 je 1281ab <== NEVER TAKEN /* * Now process the fsync(). */ if ( !iop->handlers ) 1281a4: 8b 50 3c mov 0x3c(%eax),%edx 1281a7: 85 d2 test %edx,%edx 1281a9: 75 0d jne 1281b8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 1281ab: e8 64 5e 01 00 call 13e014 <__errno> <== NOT EXECUTED 1281b0: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 1281b6: eb 1a jmp 1281d2 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 1281b8: 8b 52 28 mov 0x28(%edx),%edx 1281bb: 85 d2 test %edx,%edx 1281bd: 75 0d jne 1281cc rtems_set_errno_and_return_minus_one( ENOTSUP ); 1281bf: e8 50 5e 01 00 call 13e014 <__errno> 1281c4: c7 00 86 00 00 00 movl $0x86,(%eax) 1281ca: eb 06 jmp 1281d2 return (*iop->handlers->fsync_h)( iop ); 1281cc: 89 45 08 mov %eax,0x8(%ebp) } 1281cf: 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 ); 1281d0: ff e2 jmp *%edx } 1281d2: 83 c8 ff or $0xffffffff,%eax 1281d5: c9 leave 1281d6: c3 ret =============================================================================== 0010edf8 : int ftruncate( int fd, off_t length ) { 10edf8: 55 push %ebp 10edf9: 89 e5 mov %esp,%ebp 10edfb: 57 push %edi 10edfc: 56 push %esi 10edfd: 53 push %ebx 10edfe: 83 ec 3c sub $0x3c,%esp 10ee01: 8b 5d 08 mov 0x8(%ebp),%ebx 10ee04: 8b 45 0c mov 0xc(%ebp),%eax 10ee07: 8b 55 10 mov 0x10(%ebp),%edx 10ee0a: 89 45 c0 mov %eax,-0x40(%ebp) 10ee0d: 89 55 c4 mov %edx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 10ee10: 3b 1d 44 21 12 00 cmp 0x122144,%ebx 10ee16: 73 11 jae 10ee29 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 10ee18: c1 e3 06 shl $0x6,%ebx 10ee1b: 03 1d b8 60 12 00 add 0x1260b8,%ebx rtems_libio_check_is_open(iop); 10ee21: 8b 43 14 mov 0x14(%ebx),%eax 10ee24: f6 c4 01 test $0x1,%ah 10ee27: 75 0d jne 10ee36 <== ALWAYS TAKEN 10ee29: e8 e6 3b 00 00 call 112a14 <__errno> <== NOT EXECUTED 10ee2e: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10ee34: eb 5f jmp 10ee95 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10ee36: a8 04 test $0x4,%al 10ee38: 74 39 je 10ee73 <== NEVER TAKEN /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 10ee3a: 8d 7d d4 lea -0x2c(%ebp),%edi 10ee3d: 8d 73 18 lea 0x18(%ebx),%esi 10ee40: b9 05 00 00 00 mov $0x5,%ecx 10ee45: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 10ee47: 8b 45 e0 mov -0x20(%ebp),%eax 10ee4a: 8b 40 10 mov 0x10(%eax),%eax 10ee4d: 85 c0 test %eax,%eax 10ee4f: 74 39 je 10ee8a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 10ee51: 83 ec 0c sub $0xc,%esp 10ee54: 8d 55 d4 lea -0x2c(%ebp),%edx 10ee57: 52 push %edx 10ee58: ff d0 call *%eax 10ee5a: 83 c4 10 add $0x10,%esp 10ee5d: 48 dec %eax 10ee5e: 75 0d jne 10ee6d rtems_set_errno_and_return_minus_one( EISDIR ); 10ee60: e8 af 3b 00 00 call 112a14 <__errno> 10ee65: c7 00 15 00 00 00 movl $0x15,(%eax) 10ee6b: eb 28 jmp 10ee95 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10ee6d: f6 43 14 04 testb $0x4,0x14(%ebx) 10ee71: 75 0d jne 10ee80 <== ALWAYS TAKEN 10ee73: e8 9c 3b 00 00 call 112a14 <__errno> <== NOT EXECUTED 10ee78: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10ee7e: eb 15 jmp 10ee95 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 10ee80: 8b 43 3c mov 0x3c(%ebx),%eax 10ee83: 8b 40 20 mov 0x20(%eax),%eax 10ee86: 85 c0 test %eax,%eax 10ee88: 75 10 jne 10ee9a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ee8a: e8 85 3b 00 00 call 112a14 <__errno> <== NOT EXECUTED 10ee8f: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10ee95: 83 c8 ff or $0xffffffff,%eax 10ee98: eb 0d jmp 10eea7 return (*iop->handlers->ftruncate_h)( iop, length ); 10ee9a: 52 push %edx 10ee9b: ff 75 c4 pushl -0x3c(%ebp) 10ee9e: ff 75 c0 pushl -0x40(%ebp) 10eea1: 53 push %ebx 10eea2: ff d0 call *%eax 10eea4: 83 c4 10 add $0x10,%esp } 10eea7: 8d 65 f4 lea -0xc(%ebp),%esp 10eeaa: 5b pop %ebx 10eeab: 5e pop %esi 10eeac: 5f pop %edi 10eead: c9 leave 10eeae: c3 ret =============================================================================== 00107330 : } } static rtems_disk_device * get_disk_entry(dev_t dev, bool lookup_only) { 107330: 55 push %ebp 107331: 89 e5 mov %esp,%ebp 107333: 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) { 107334: 3b 05 cc 8d 12 00 cmp 0x128dcc,%eax 10733a: 73 2e jae 10736a <== NEVER TAKEN 10733c: 8b 1d c8 8d 12 00 mov 0x128dc8,%ebx 107342: 85 db test %ebx,%ebx 107344: 74 24 je 10736a <== NEVER TAKEN rtems_disk_device_table *dtab = disktab + major; 107346: 8d 04 c3 lea (%ebx,%eax,8),%eax if (minor < dtab->size && dtab->minor != NULL) { 107349: 3b 50 04 cmp 0x4(%eax),%edx 10734c: 73 1c jae 10736a <== NEVER TAKEN 10734e: 8b 00 mov (%eax),%eax 107350: 85 c0 test %eax,%eax 107352: 74 16 je 10736a <== NEVER TAKEN rtems_disk_device *dd = dtab->minor [minor]; 107354: 8b 04 90 mov (%eax,%edx,4),%eax if (dd != NULL && !lookup_only) { 107357: 85 c0 test %eax,%eax 107359: 74 11 je 10736c 10735b: 84 c9 test %cl,%cl 10735d: 75 0d jne 10736c if (!dd->deleted) { 10735f: 80 78 30 00 cmpb $0x0,0x30(%eax) 107363: 75 05 jne 10736a ++dd->uses; 107365: ff 40 14 incl 0x14(%eax) 107368: eb 02 jmp 10736c 10736a: 31 c0 xor %eax,%eax return dd; } } return NULL; } 10736c: 5b pop %ebx 10736d: c9 leave 10736e: c3 ret =============================================================================== 00153f3c : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 153f3c: 55 push %ebp 153f3d: 89 e5 mov %esp,%ebp 153f3f: 57 push %edi 153f40: 56 push %esi 153f41: 53 push %ebx 153f42: 83 ec 2c sub $0x2c,%esp 153f45: 8b 45 08 mov 0x8(%ebp),%eax /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 153f48: 31 db xor %ebx,%ebx 153f4a: 3b 05 44 26 16 00 cmp 0x162644,%eax 153f50: 73 0b jae 153f5d <== NEVER TAKEN 153f52: 89 c3 mov %eax,%ebx 153f54: c1 e3 06 shl $0x6,%ebx 153f57: 03 1d d4 9f 16 00 add 0x169fd4,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 153f5d: 8d 7d d4 lea -0x2c(%ebp),%edi 153f60: 8d 73 18 lea 0x18(%ebx),%esi 153f63: b9 05 00 00 00 mov $0x5,%ecx 153f68: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 153f6a: 8b 45 e0 mov -0x20(%ebp),%eax 153f6d: 8b 40 10 mov 0x10(%eax),%eax 153f70: 85 c0 test %eax,%eax 153f72: 74 29 je 153f9d <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 153f74: 83 ec 0c sub $0xc,%esp 153f77: 8d 55 d4 lea -0x2c(%ebp),%edx 153f7a: 52 push %edx 153f7b: ff d0 call *%eax 153f7d: 83 c4 10 add $0x10,%esp 153f80: 48 dec %eax 153f81: 74 10 je 153f93 rtems_set_errno_and_return_minus_one( ENOTDIR ); 153f83: e8 8c a0 fe ff call 13e014 <__errno> 153f88: c7 00 14 00 00 00 movl $0x14,(%eax) 153f8e: 83 c8 ff or $0xffffffff,%eax 153f91: eb 24 jmp 153fb7 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 153f93: 8b 43 3c mov 0x3c(%ebx),%eax 153f96: 8b 40 08 mov 0x8(%eax),%eax 153f99: 85 c0 test %eax,%eax 153f9b: 75 0d jne 153faa <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 153f9d: e8 72 a0 fe ff call 13e014 <__errno> <== NOT EXECUTED 153fa2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 153fa8: eb e4 jmp 153f8e <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 153faa: 52 push %edx 153fab: ff 75 10 pushl 0x10(%ebp) 153fae: ff 75 0c pushl 0xc(%ebp) 153fb1: 53 push %ebx 153fb2: ff d0 call *%eax 153fb4: 83 c4 10 add $0x10,%esp } 153fb7: 8d 65 f4 lea -0xc(%ebp),%esp 153fba: 5b pop %ebx 153fbb: 5e pop %esi 153fbc: 5f pop %edi 153fbd: c9 leave 153fbe: c3 ret =============================================================================== 001282b0 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 1282b0: 55 push %ebp <== NOT EXECUTED 1282b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1282b3: a1 fc 46 16 00 mov 0x1646fc,%eax <== NOT EXECUTED 1282b8: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED return _POSIX_types_Gid; } 1282bb: c9 leave <== NOT EXECUTED 1282bc: c3 ret <== NOT EXECUTED =============================================================================== 001287ce : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 1287ce: 55 push %ebp 1287cf: 89 e5 mov %esp,%ebp 1287d1: 57 push %edi 1287d2: 56 push %esi 1287d3: 53 push %ebx 1287d4: 83 ec 1c sub $0x1c,%esp 1287d7: 89 c7 mov %eax,%edi 1287d9: 89 55 e4 mov %edx,-0x1c(%ebp) 1287dc: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 1287de: e8 df fe ff ff call 1286c2 if ((fp = fopen("/etc/group", "r")) == NULL) { 1287e3: 53 push %ebx 1287e4: 53 push %ebx 1287e5: 68 ca 7d 15 00 push $0x157dca 1287ea: 68 96 4b 15 00 push $0x154b96 1287ef: e8 84 61 01 00 call 13e978 1287f4: 89 c3 mov %eax,%ebx 1287f6: 83 c4 10 add $0x10,%esp 1287f9: 85 c0 test %eax,%eax 1287fb: 75 10 jne 12880d <== ALWAYS TAKEN errno = EINVAL; 1287fd: e8 12 58 01 00 call 13e014 <__errno> <== NOT EXECUTED 128802: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 128808: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 12880b: eb 6b jmp 128878 <== NOT EXECUTED } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 12880d: 83 ec 0c sub $0xc,%esp 128810: ff 75 0c pushl 0xc(%ebp) 128813: 8b 4d 08 mov 0x8(%ebp),%ecx 128816: 89 f2 mov %esi,%edx 128818: 89 d8 mov %ebx,%eax 12881a: e8 39 fc ff ff call 128458 12881f: 83 c4 10 add $0x10,%esp 128822: 85 c0 test %eax,%eax 128824: 75 19 jne 12883f <== ALWAYS TAKEN errno = EINVAL; 128826: e8 e9 57 01 00 call 13e014 <__errno> <== NOT EXECUTED 12882b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 128831: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128834: 53 push %ebx <== NOT EXECUTED 128835: e8 26 59 01 00 call 13e160 <== NOT EXECUTED 12883a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12883d: eb 36 jmp 128875 <== NOT EXECUTED return -1; } if (name) { 12883f: 85 ff test %edi,%edi 128841: 74 11 je 128854 <== NEVER TAKEN match = (strcmp(grp->gr_name, name) == 0); 128843: 51 push %ecx 128844: 51 push %ecx 128845: 57 push %edi 128846: ff 36 pushl (%esi) 128848: e8 6f b0 01 00 call 1438bc 12884d: 83 c4 10 add $0x10,%esp 128850: 85 c0 test %eax,%eax 128852: eb 07 jmp 12885b } else { match = (grp->gr_gid == gid); 128854: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 128858: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 12885b: 0f 94 c0 sete %al 12885e: 0f b6 c0 movzbl %al,%eax } if (match) { 128861: 85 c0 test %eax,%eax 128863: 74 a8 je 12880d fclose(fp); 128865: 83 ec 0c sub $0xc,%esp 128868: 53 push %ebx 128869: e8 f2 58 01 00 call 13e160 *result = grp; 12886e: 8b 45 10 mov 0x10(%ebp),%eax 128871: 89 30 mov %esi,(%eax) 128873: 31 c0 xor %eax,%eax return 0; 128875: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 128878: 8d 65 f4 lea -0xc(%ebp),%esp 12887b: 5b pop %ebx 12887c: 5e pop %esi 12887d: 5f pop %edi 12887e: c9 leave 12887f: c3 ret =============================================================================== 00128557 : return NULL; return p; } struct group *getgrent(void) { 128557: 55 push %ebp <== NOT EXECUTED 128558: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12855a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp == NULL) 12855d: a1 0c 9c 16 00 mov 0x169c0c,%eax <== NOT EXECUTED 128562: 85 c0 test %eax,%eax <== NOT EXECUTED 128564: 74 25 je 12858b <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 128566: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128569: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12856e: b9 10 9c 16 00 mov $0x169c10,%ecx <== NOT EXECUTED 128573: ba d8 9c 16 00 mov $0x169cd8,%edx <== NOT EXECUTED 128578: e8 db fe ff ff call 128458 <== NOT EXECUTED 12857d: 89 c2 mov %eax,%edx <== NOT EXECUTED 12857f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 128582: b8 d8 9c 16 00 mov $0x169cd8,%eax <== NOT EXECUTED 128587: 85 d2 test %edx,%edx <== NOT EXECUTED 128589: 75 02 jne 12858d <== NOT EXECUTED 12858b: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &grent; } 12858d: c9 leave <== NOT EXECUTED 12858e: c3 ret <== NOT EXECUTED =============================================================================== 001288aa : } struct group *getgrgid( gid_t gid ) { 1288aa: 55 push %ebp <== NOT EXECUTED 1288ab: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1288ad: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 1288b0: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 1288b3: 50 push %eax <== NOT EXECUTED 1288b4: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 1288b9: 68 10 9c 16 00 push $0x169c10 <== NOT EXECUTED 1288be: 68 d8 9c 16 00 push $0x169cd8 <== NOT EXECUTED 1288c3: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 1288c7: 50 push %eax <== NOT EXECUTED 1288c8: e8 b3 ff ff ff call 128880 <== NOT EXECUTED 1288cd: 89 c2 mov %eax,%edx <== NOT EXECUTED 1288cf: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1288d2: 31 c0 xor %eax,%eax <== NOT EXECUTED 1288d4: 85 d2 test %edx,%edx <== NOT EXECUTED 1288d6: 75 03 jne 1288db <== NOT EXECUTED return NULL; return p; 1288d8: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 1288db: c9 leave <== NOT EXECUTED 1288dc: c3 ret <== NOT EXECUTED =============================================================================== 00128880 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 128880: 55 push %ebp <== NOT EXECUTED 128881: 89 e5 mov %esp,%ebp <== NOT EXECUTED 128883: 53 push %ebx <== NOT EXECUTED 128884: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 128887: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12888a: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 12888d: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 128891: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 128894: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 128897: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 12889a: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 12889d: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 1288a0: 31 c0 xor %eax,%eax <== NOT EXECUTED } 1288a2: 5b pop %ebx <== NOT EXECUTED 1288a3: 5b pop %ebx <== NOT EXECUTED 1288a4: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 1288a5: e9 24 ff ff ff jmp 1287ce <== NOT EXECUTED =============================================================================== 00128906 : } struct group *getgrnam( const char *name ) { 128906: 55 push %ebp 128907: 89 e5 mov %esp,%ebp 128909: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 12890c: 8d 45 f4 lea -0xc(%ebp),%eax 12890f: 50 push %eax 128910: 68 c8 00 00 00 push $0xc8 128915: 68 10 9c 16 00 push $0x169c10 12891a: 68 d8 9c 16 00 push $0x169cd8 12891f: ff 75 08 pushl 0x8(%ebp) 128922: e8 b6 ff ff ff call 1288dd 128927: 89 c2 mov %eax,%edx 128929: 83 c4 20 add $0x20,%esp 12892c: 31 c0 xor %eax,%eax 12892e: 85 d2 test %edx,%edx 128930: 75 03 jne 128935 <== NEVER TAKEN return NULL; return p; 128932: 8b 45 f4 mov -0xc(%ebp),%eax } 128935: c9 leave 128936: c3 ret =============================================================================== 00128972 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 128972: 55 push %ebp 128973: 89 e5 mov %esp,%ebp 128975: 57 push %edi 128976: 56 push %esi 128977: 53 push %ebx 128978: 83 ec 1c sub $0x1c,%esp 12897b: 89 c7 mov %eax,%edi 12897d: 89 55 e4 mov %edx,-0x1c(%ebp) 128980: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 128982: e8 3b fd ff ff call 1286c2 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 128987: 51 push %ecx 128988: 51 push %ecx 128989: 68 ca 7d 15 00 push $0x157dca 12898e: 68 51 4b 15 00 push $0x154b51 128993: e8 e0 5f 01 00 call 13e978 128998: 89 c3 mov %eax,%ebx 12899a: 83 c4 10 add $0x10,%esp 12899d: 85 c0 test %eax,%eax 12899f: 75 10 jne 1289b1 <== ALWAYS TAKEN errno = EINVAL; 1289a1: e8 6e 56 01 00 call 13e014 <__errno> <== NOT EXECUTED 1289a6: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1289ac: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 1289af: eb 6b jmp 128a1c <== NOT EXECUTED } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 1289b1: 83 ec 0c sub $0xc,%esp 1289b4: ff 75 0c pushl 0xc(%ebp) 1289b7: 8b 4d 08 mov 0x8(%ebp),%ecx 1289ba: 89 f2 mov %esi,%edx 1289bc: 89 d8 mov %ebx,%eax 1289be: e8 cc fb ff ff call 12858f 1289c3: 83 c4 10 add $0x10,%esp 1289c6: 85 c0 test %eax,%eax 1289c8: 75 19 jne 1289e3 <== ALWAYS TAKEN errno = EINVAL; 1289ca: e8 45 56 01 00 call 13e014 <__errno> <== NOT EXECUTED 1289cf: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 1289d5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1289d8: 53 push %ebx <== NOT EXECUTED 1289d9: e8 82 57 01 00 call 13e160 <== NOT EXECUTED 1289de: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1289e1: eb 36 jmp 128a19 <== NOT EXECUTED return -1; } if (name) { 1289e3: 85 ff test %edi,%edi 1289e5: 74 11 je 1289f8 <== NEVER TAKEN match = (strcmp(pwd->pw_name, name) == 0); 1289e7: 52 push %edx 1289e8: 52 push %edx 1289e9: 57 push %edi 1289ea: ff 36 pushl (%esi) 1289ec: e8 cb ae 01 00 call 1438bc 1289f1: 83 c4 10 add $0x10,%esp 1289f4: 85 c0 test %eax,%eax 1289f6: eb 07 jmp 1289ff } else { match = (pwd->pw_uid == uid); 1289f8: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 1289fc: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 1289ff: 0f 94 c0 sete %al 128a02: 0f b6 c0 movzbl %al,%eax } if (match) { 128a05: 85 c0 test %eax,%eax 128a07: 74 a8 je 1289b1 fclose(fp); 128a09: 83 ec 0c sub $0xc,%esp 128a0c: 53 push %ebx 128a0d: e8 4e 57 01 00 call 13e160 *result = pwd; 128a12: 8b 45 10 mov 0x10(%ebp),%eax 128a15: 89 30 mov %esi,(%eax) 128a17: 31 c0 xor %eax,%eax return 0; 128a19: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 128a1c: 8d 65 f4 lea -0xc(%ebp),%esp 128a1f: 5b pop %ebx 128a20: 5e pop %esi 128a21: 5f pop %edi 128a22: c9 leave 128a23: c3 ret =============================================================================== 0012868a : return NULL; return p; } struct passwd *getpwent(void) { 12868a: 55 push %ebp <== NOT EXECUTED 12868b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12868d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp == NULL) 128690: a1 24 9b 16 00 mov 0x169b24,%eax <== NOT EXECUTED 128695: 85 c0 test %eax,%eax <== NOT EXECUTED 128697: 74 25 je 1286be <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 128699: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12869c: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 1286a1: b9 28 9b 16 00 mov $0x169b28,%ecx <== NOT EXECUTED 1286a6: ba f0 9b 16 00 mov $0x169bf0,%edx <== NOT EXECUTED 1286ab: e8 df fe ff ff call 12858f <== NOT EXECUTED 1286b0: 89 c2 mov %eax,%edx <== NOT EXECUTED 1286b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1286b5: b8 f0 9b 16 00 mov $0x169bf0,%eax <== NOT EXECUTED 1286ba: 85 d2 test %edx,%edx <== NOT EXECUTED 1286bc: 75 02 jne 1286c0 <== NOT EXECUTED 1286be: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &pwent; } 1286c0: c9 leave <== NOT EXECUTED 1286c1: c3 ret <== NOT EXECUTED =============================================================================== 00128aaa : } struct passwd *getpwnam( const char *name ) { 128aaa: 55 push %ebp 128aab: 89 e5 mov %esp,%ebp 128aad: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 128ab0: 8d 45 f4 lea -0xc(%ebp),%eax 128ab3: 50 push %eax 128ab4: 68 c8 00 00 00 push $0xc8 128ab9: 68 28 9b 16 00 push $0x169b28 128abe: 68 f0 9b 16 00 push $0x169bf0 128ac3: ff 75 08 pushl 0x8(%ebp) 128ac6: e8 b6 ff ff ff call 128a81 128acb: 89 c2 mov %eax,%edx 128acd: 83 c4 20 add $0x20,%esp 128ad0: 31 c0 xor %eax,%eax 128ad2: 85 d2 test %edx,%edx 128ad4: 75 03 jne 128ad9 <== NEVER TAKEN return NULL; return p; 128ad6: 8b 45 f4 mov -0xc(%ebp),%eax } 128ad9: c9 leave 128ada: c3 ret =============================================================================== 00128a4e : } struct passwd *getpwuid( uid_t uid ) { 128a4e: 55 push %ebp <== NOT EXECUTED 128a4f: 89 e5 mov %esp,%ebp <== NOT EXECUTED 128a51: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 128a54: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 128a57: 50 push %eax <== NOT EXECUTED 128a58: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 128a5d: 68 28 9b 16 00 push $0x169b28 <== NOT EXECUTED 128a62: 68 f0 9b 16 00 push $0x169bf0 <== NOT EXECUTED 128a67: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 128a6b: 50 push %eax <== NOT EXECUTED 128a6c: e8 b3 ff ff ff call 128a24 <== NOT EXECUTED 128a71: 89 c2 mov %eax,%edx <== NOT EXECUTED 128a73: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 128a76: 31 c0 xor %eax,%eax <== NOT EXECUTED 128a78: 85 d2 test %edx,%edx <== NOT EXECUTED 128a7a: 75 03 jne 128a7f <== NOT EXECUTED return NULL; return p; 128a7c: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 128a7f: c9 leave <== NOT EXECUTED 128a80: c3 ret <== NOT EXECUTED =============================================================================== 00128a24 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 128a24: 55 push %ebp <== NOT EXECUTED 128a25: 89 e5 mov %esp,%ebp <== NOT EXECUTED 128a27: 53 push %ebx <== NOT EXECUTED 128a28: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 128a2b: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 128a2e: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 128a31: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 128a35: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 128a38: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 128a3b: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 128a3e: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 128a41: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 128a44: 31 c0 xor %eax,%eax <== NOT EXECUTED } 128a46: 5b pop %ebx <== NOT EXECUTED 128a47: 5b pop %ebx <== NOT EXECUTED 128a48: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 128a49: e9 24 ff ff ff jmp 128972 <== NOT EXECUTED =============================================================================== 00107714 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 107714: 55 push %ebp 107715: 89 e5 mov %esp,%ebp 107717: 56 push %esi 107718: 53 push %ebx 107719: 83 ec 10 sub $0x10,%esp 10771c: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 10771f: 85 db test %ebx,%ebx 107721: 75 10 jne 107733 <== ALWAYS TAKEN errno = EFAULT; 107723: e8 ec b2 00 00 call 112a14 <__errno> <== NOT EXECUTED 107728: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10772e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 107731: eb 29 jmp 10775c <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 107733: 9c pushf 107734: fa cli 107735: 5e pop %esi _TOD_Get( &now ); 107736: 83 ec 0c sub $0xc,%esp 107739: 8d 45 f0 lea -0x10(%ebp),%eax 10773c: 50 push %eax 10773d: e8 3a 3b 00 00 call 10b27c <_TOD_Get> _ISR_Enable(level); 107742: 56 push %esi 107743: 9d popf useconds = (suseconds_t)now.tv_nsec; 107744: 8b 45 f4 mov -0xc(%ebp),%eax useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 107747: 8b 55 f0 mov -0x10(%ebp),%edx 10774a: 89 13 mov %edx,(%ebx) time->tv_usec = useconds; 10774c: b9 e8 03 00 00 mov $0x3e8,%ecx 107751: 99 cltd 107752: f7 f9 idiv %ecx 107754: 89 43 04 mov %eax,0x4(%ebx) 107757: 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; 107759: 83 c4 10 add $0x10,%esp } 10775c: 8d 65 f8 lea -0x8(%ebp),%esp 10775f: 5b pop %ebx 107760: 5e pop %esi 107761: c9 leave 107762: c3 ret =============================================================================== 0010cf88 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 10cf88: 55 push %ebp <== NOT EXECUTED 10cf89: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cf8b: a1 fc 46 16 00 mov 0x1646fc,%eax <== NOT EXECUTED 10cf90: 66 8b 40 32 mov 0x32(%eax),%ax <== NOT EXECUTED return _POSIX_types_Uid; } 10cf94: c9 leave <== NOT EXECUTED 10cf95: c3 ret <== NOT EXECUTED =============================================================================== 00111844 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 111844: 55 push %ebp 111845: 89 e5 mov %esp,%ebp 111847: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 11184a: 8b 4a 38 mov 0x38(%edx),%ecx 11184d: 83 c8 ff or $0xffffffff,%eax 111850: 83 79 4c 01 cmpl $0x1,0x4c(%ecx) 111854: 75 10 jne 111866 <== NEVER TAKEN if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 111856: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) 11185d: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 111864: 31 c0 xor %eax,%eax return 0; } 111866: c9 leave 111867: c3 ret =============================================================================== 00111a1a : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 111a1a: 55 push %ebp 111a1b: 89 e5 mov %esp,%ebp 111a1d: 57 push %edi 111a1e: 56 push %esi 111a1f: 53 push %ebx 111a20: 81 ec 4c 01 00 00 sub $0x14c,%esp 111a26: 8b 45 10 mov 0x10(%ebp),%eax int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; 111a29: 8b 4d 08 mov 0x8(%ebp),%ecx 111a2c: 8b 51 38 mov 0x38(%ecx),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 111a2f: 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; 111a32: 83 c2 54 add $0x54,%edx 111a35: 89 95 cc fe ff ff mov %edx,-0x134(%ebp) the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 111a3b: 31 d2 xor %edx,%edx 111a3d: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 111a43: 0f 84 02 01 00 00 je 111b4b <== NEVER TAKEN /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 111a49: 8b 51 0c mov 0xc(%ecx),%edx 111a4c: 89 95 c8 fe ff ff mov %edx,-0x138(%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); 111a52: b9 10 01 00 00 mov $0x110,%ecx 111a57: 31 d2 xor %edx,%edx 111a59: f7 f1 div %ecx 111a5b: 69 c0 10 01 00 00 imul $0x110,%eax,%eax 111a61: 03 85 c8 fe ff ff add -0x138(%ebp),%eax 111a67: 89 85 c4 fe ff ff mov %eax,-0x13c(%ebp) 111a6d: c7 85 d4 fe ff ff 00 movl $0x0,-0x12c(%ebp) 111a74: 00 00 00 111a77: 31 d2 xor %edx,%edx 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 ); 111a79: 8d 8d d8 fe ff ff lea -0x128(%ebp),%ecx 111a7f: 89 8d b4 fe ff ff mov %ecx,-0x14c(%ebp) 111a85: 89 95 d0 fe ff ff mov %edx,-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); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 111a8b: e9 a3 00 00 00 jmp 111b33 current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 111a90: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 111a96: 0f 84 a9 00 00 00 je 111b45 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 111a9c: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 111aa2: 39 85 d4 fe ff ff cmp %eax,-0x12c(%ebp) 111aa8: 7c 7d jl 111b27 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 111aaa: 8b 85 d4 fe ff ff mov -0x12c(%ebp),%eax 111ab0: 99 cltd 111ab1: 89 85 dc fe ff ff mov %eax,-0x124(%ebp) 111ab7: 89 95 e0 fe ff ff mov %edx,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 111abd: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp) 111ac4: 10 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 111ac6: 8b 43 38 mov 0x38(%ebx),%eax 111ac9: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 111acf: 8d 53 0c lea 0xc(%ebx),%edx 111ad2: 31 c0 xor %eax,%eax 111ad4: 83 c9 ff or $0xffffffff,%ecx 111ad7: 89 d7 mov %edx,%edi 111ad9: f2 ae repnz scas %es:(%edi),%al 111adb: f7 d1 not %ecx 111add: 49 dec %ecx 111ade: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 111ae5: 51 push %ecx 111ae6: 51 push %ecx 111ae7: 52 push %edx 111ae8: 8d 95 e8 fe ff ff lea -0x118(%ebp),%edx 111aee: 52 push %edx 111aef: e8 94 1a 00 00 call 113588 memcpy( 111af4: 8b 45 0c mov 0xc(%ebp),%eax 111af7: 03 85 d0 fe ff ff add -0x130(%ebp),%eax 111afd: b9 44 00 00 00 mov $0x44,%ecx 111b02: 89 c7 mov %eax,%edi 111b04: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 111b0a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 111b0c: 8b 4d 08 mov 0x8(%ebp),%ecx 111b0f: 81 41 0c 10 01 00 00 addl $0x110,0xc(%ecx) 111b16: 83 51 10 00 adcl $0x0,0x10(%ecx) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 111b1a: 81 85 d0 fe ff ff 10 addl $0x110,-0x130(%ebp) 111b21: 01 00 00 111b24: 83 c4 10 add $0x10,%esp } the_node = the_node->next; 111b27: 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( 111b29: 81 85 d4 fe ff ff 10 addl $0x110,-0x12c(%ebp) 111b30: 01 00 00 /* 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 ( 111b33: 8b 85 c4 fe ff ff mov -0x13c(%ebp),%eax 111b39: 39 85 d4 fe ff ff cmp %eax,-0x12c(%ebp) 111b3f: 0f 8c 4b ff ff ff jl 111a90 111b45: 8b 95 d0 fe ff ff mov -0x130(%ebp),%edx the_node = the_node->next; } /* Success */ return bytes_transferred; } 111b4b: 89 d0 mov %edx,%eax 111b4d: 8d 65 f4 lea -0xc(%ebp),%esp 111b50: 5b pop %ebx 111b51: 5e pop %esi 111b52: 5f pop %edi 111b53: c9 leave 111b54: c3 ret =============================================================================== 00111968 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 111968: 55 push %ebp 111969: 89 e5 mov %esp,%ebp 11196b: 56 push %esi 11196c: 53 push %ebx 11196d: 83 ec 10 sub $0x10,%esp 111970: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 111973: 8b 1e mov (%esi),%ebx 111975: 8d 43 54 lea 0x54(%ebx),%eax 111978: 39 43 50 cmp %eax,0x50(%ebx) 11197b: 74 0d je 11198a /* * 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 ); 11197d: e8 92 10 00 00 call 112a14 <__errno> 111982: c7 00 5a 00 00 00 movl $0x5a,(%eax) 111988: eb 19 jmp 1119a3 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 11198a: 8b 46 10 mov 0x10(%esi),%eax 11198d: 39 58 1c cmp %ebx,0x1c(%eax) 111990: 74 06 je 111998 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 111992: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 111996: 74 10 je 1119a8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); 111998: e8 77 10 00 00 call 112a14 <__errno> 11199d: c7 00 10 00 00 00 movl $0x10,(%eax) 1119a3: 83 c8 ff or $0xffffffff,%eax 1119a6: eb 6b jmp 111a13 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 1119a8: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 1119ac: 74 13 je 1119c1 1119ae: 83 ec 0c sub $0xc,%esp 1119b1: 53 push %ebx 1119b2: e8 a1 94 ff ff call 10ae58 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 1119b7: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 1119be: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 1119c1: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 1119c5: 50 push %eax 1119c6: 50 push %eax 1119c7: 6a 00 push $0x0 1119c9: 8d 45 f0 lea -0x10(%ebp),%eax 1119cc: 50 push %eax 1119cd: e8 42 5d ff ff call 107714 1119d2: 8b 45 f0 mov -0x10(%ebp),%eax 1119d5: 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) ) { 1119d8: 89 1c 24 mov %ebx,(%esp) 1119db: e8 42 d5 ff ff call 10ef22 1119e0: 83 c4 10 add $0x10,%esp 1119e3: 85 c0 test %eax,%eax 1119e5: 75 2a jne 111a11 1119e7: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 1119ec: 75 23 jne 111a11 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 1119ee: a1 54 3f 12 00 mov 0x123f54,%eax 1119f3: 8b 50 04 mov 0x4(%eax),%edx 1119f6: 3b 16 cmp (%esi),%edx 1119f8: 75 07 jne 111a01 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 1119fa: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 111a01: 83 ec 0c sub $0xc,%esp 111a04: 53 push %ebx 111a05: e8 92 5c ff ff call 10769c 111a0a: 31 c0 xor %eax,%eax 111a0c: 83 c4 10 add $0x10,%esp 111a0f: eb 02 jmp 111a13 111a11: 31 c0 xor %eax,%eax } return 0; } 111a13: 8d 65 f8 lea -0x8(%ebp),%esp 111a16: 5b pop %ebx 111a17: 5e pop %esi 111a18: c9 leave 111a19: c3 ret =============================================================================== 001286c2 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 1286c2: 55 push %ebp 1286c3: 89 e5 mov %esp,%ebp 1286c5: 53 push %ebx 1286c6: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 1286c9: 80 3d 20 9b 16 00 00 cmpb $0x0,0x169b20 1286d0: 0f 85 b8 00 00 00 jne 12878e return; etc_passwd_initted = 1; 1286d6: c6 05 20 9b 16 00 01 movb $0x1,0x169b20 mkdir("/etc", 0777); 1286dd: 50 push %eax 1286de: 50 push %eax 1286df: 68 ff 01 00 00 push $0x1ff 1286e4: 68 37 4a 15 00 push $0x154a37 1286e9: e8 42 4e fe ff call 10d530 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 1286ee: 59 pop %ecx 1286ef: 5b pop %ebx 1286f0: 68 ca 7d 15 00 push $0x157dca 1286f5: 68 51 4b 15 00 push $0x154b51 1286fa: e8 79 62 01 00 call 13e978 1286ff: 83 c4 10 add $0x10,%esp 128702: 85 c0 test %eax,%eax 128704: 74 06 je 12870c <== ALWAYS TAKEN fclose(fp); 128706: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128709: 50 push %eax <== NOT EXECUTED 12870a: eb 2a jmp 128736 <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 12870c: 52 push %edx 12870d: 52 push %edx 12870e: 68 40 7a 15 00 push $0x157a40 128713: 68 51 4b 15 00 push $0x154b51 128718: e8 5b 62 01 00 call 13e978 12871d: 89 c3 mov %eax,%ebx 12871f: 83 c4 10 add $0x10,%esp 128722: 85 c0 test %eax,%eax 128724: 74 18 je 12873e <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 128726: 50 push %eax 128727: 50 push %eax 128728: 53 push %ebx 128729: 68 e2 b0 15 00 push $0x15b0e2 12872e: e8 89 63 01 00 call 13eabc "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 128733: 89 1c 24 mov %ebx,(%esp) 128736: e8 25 5a 01 00 call 13e160 12873b: 83 c4 10 add $0x10,%esp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 12873e: 51 push %ecx 12873f: 51 push %ecx 128740: 68 ca 7d 15 00 push $0x157dca 128745: 68 96 4b 15 00 push $0x154b96 12874a: e8 29 62 01 00 call 13e978 12874f: 83 c4 10 add $0x10,%esp 128752: 85 c0 test %eax,%eax 128754: 74 06 je 12875c <== ALWAYS TAKEN fclose(fp); 128756: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128759: 50 push %eax <== NOT EXECUTED 12875a: eb 2a jmp 128786 <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 12875c: 52 push %edx 12875d: 52 push %edx 12875e: 68 40 7a 15 00 push $0x157a40 128763: 68 96 4b 15 00 push $0x154b96 128768: e8 0b 62 01 00 call 13e978 12876d: 89 c3 mov %eax,%ebx 12876f: 83 c4 10 add $0x10,%esp 128772: 85 c0 test %eax,%eax 128774: 74 18 je 12878e <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 128776: 50 push %eax 128777: 50 push %eax 128778: 53 push %ebx 128779: 68 49 b1 15 00 push $0x15b149 12877e: e8 39 63 01 00 call 13eabc "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 128783: 89 1c 24 mov %ebx,(%esp) 128786: e8 d5 59 01 00 call 13e160 12878b: 83 c4 10 add $0x10,%esp } } 12878e: 8b 5d fc mov -0x4(%ebp),%ebx 128791: c9 leave 128792: c3 ret =============================================================================== 0010a3d8 : int ioctl( int fd, ioctl_command_t command, ... ) { 10a3d8: 55 push %ebp 10a3d9: 89 e5 mov %esp,%ebp 10a3db: 83 ec 08 sub $0x8,%esp 10a3de: 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 ); 10a3e1: 3b 05 44 51 12 00 cmp 0x125144,%eax 10a3e7: 73 19 jae 10a402 iop = rtems_libio_iop( fd ); 10a3e9: c1 e0 06 shl $0x6,%eax 10a3ec: 03 05 88 91 12 00 add 0x129188,%eax rtems_libio_check_is_open(iop); 10a3f2: f6 40 15 01 testb $0x1,0x15(%eax) 10a3f6: 74 0a je 10a402 <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 10a3f8: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Now process the ioctl(). */ if ( !iop->handlers ) 10a3fb: 8b 50 3c mov 0x3c(%eax),%edx 10a3fe: 85 d2 test %edx,%edx 10a400: 75 0d jne 10a40f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 10a402: e8 bd bd 00 00 call 1161c4 <__errno> 10a407: c7 00 09 00 00 00 movl $0x9,(%eax) 10a40d: eb 12 jmp 10a421 if ( !iop->handlers->ioctl_h ) 10a40f: 8b 52 10 mov 0x10(%edx),%edx 10a412: 85 d2 test %edx,%edx 10a414: 75 10 jne 10a426 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a416: e8 a9 bd 00 00 call 1161c4 <__errno> <== NOT EXECUTED 10a41b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10a421: 83 c8 ff or $0xffffffff,%eax 10a424: eb 0d jmp 10a433 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 10a426: 83 ec 04 sub $0x4,%esp 10a429: 51 push %ecx 10a42a: ff 75 0c pushl 0xc(%ebp) 10a42d: 50 push %eax 10a42e: ff d2 call *%edx return rc; 10a430: 83 c4 10 add $0x10,%esp } 10a433: c9 leave 10a434: c3 ret =============================================================================== 00108e44 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 108e44: 55 push %ebp <== NOT EXECUTED 108e45: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108e47: 53 push %ebx <== NOT EXECUTED 108e48: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 108e4b: 89 d3 mov %edx,%ebx <== NOT EXECUTED 108e4d: 88 c1 mov %al,%cl <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 108e4f: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED 108e52: a8 20 test $0x20,%al <== NOT EXECUTED 108e54: 74 03 je 108e59 <== NOT EXECUTED c &= 0x7f; 108e56: 83 e1 7f and $0x7f,%ecx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 108e59: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 108e5c: 74 17 je 108e75 <== NOT EXECUTED c = tolower (c); 108e5e: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED 108e61: 8b 15 20 40 12 00 mov 0x124020,%edx <== NOT EXECUTED 108e67: 0f be 54 0a 01 movsbl 0x1(%edx,%ecx,1),%edx <== NOT EXECUTED 108e6c: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 108e6f: 4a dec %edx <== NOT EXECUTED 108e70: 75 03 jne 108e75 <== NOT EXECUTED 108e72: 83 c1 20 add $0x20,%ecx <== NOT EXECUTED if (c == '\r') { 108e75: 80 f9 0d cmp $0xd,%cl <== NOT EXECUTED 108e78: 75 11 jne 108e8b <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 108e7a: 84 c0 test %al,%al <== NOT EXECUTED 108e7c: 0f 88 d3 00 00 00 js 108f55 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 108e82: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 108e85: 74 19 je 108ea0 <== NOT EXECUTED 108e87: b1 0a mov $0xa,%cl <== NOT EXECUTED 108e89: eb 15 jmp 108ea0 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 108e8b: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED 108e8e: 75 08 jne 108e98 <== NOT EXECUTED 108e90: a8 40 test $0x40,%al <== NOT EXECUTED 108e92: 74 0c je 108ea0 <== NOT EXECUTED 108e94: b1 0d mov $0xd,%cl <== NOT EXECUTED 108e96: eb 08 jmp 108ea0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 108e98: 84 c9 test %cl,%cl <== NOT EXECUTED 108e9a: 0f 84 87 00 00 00 je 108f27 <== NOT EXECUTED 108ea0: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED 108ea3: f6 c2 02 test $0x2,%dl <== NOT EXECUTED 108ea6: 74 7f je 108f27 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 108ea8: 3a 4b 43 cmp 0x43(%ebx),%cl <== NOT EXECUTED 108eab: 75 04 jne 108eb1 <== NOT EXECUTED erase (tty, 0); 108ead: 31 d2 xor %edx,%edx <== NOT EXECUTED 108eaf: eb 0a jmp 108ebb <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { 108eb1: 3a 4b 44 cmp 0x44(%ebx),%cl <== NOT EXECUTED 108eb4: 75 11 jne 108ec7 <== NOT EXECUTED erase (tty, 1); 108eb6: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 108ebb: 89 d8 mov %ebx,%eax <== NOT EXECUTED 108ebd: e8 09 fe ff ff call 108ccb <== NOT EXECUTED 108ec2: e9 8e 00 00 00 jmp 108f55 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 108ec7: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 108ecc: 3a 4b 45 cmp 0x45(%ebx),%cl <== NOT EXECUTED 108ecf: 0f 84 82 00 00 00 je 108f57 <== NOT EXECUTED return 1; } else if (c == '\n') { 108ed5: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED 108ed8: 75 1a jne 108ef4 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 108eda: 80 e2 48 and $0x48,%dl <== NOT EXECUTED 108edd: 74 09 je 108ee8 <== NOT EXECUTED echo (c, tty); 108edf: 89 da mov %ebx,%edx <== NOT EXECUTED 108ee1: b0 0a mov $0xa,%al <== NOT EXECUTED 108ee3: e8 8b fd ff ff call 108c73 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108ee8: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108eeb: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108eee: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED 108ef2: eb 28 jmp 108f1c <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 108ef4: 3a 4b 4c cmp 0x4c(%ebx),%cl <== NOT EXECUTED 108ef7: 74 05 je 108efe <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 108ef9: 3a 4b 51 cmp 0x51(%ebx),%cl <== NOT EXECUTED 108efc: 75 29 jne 108f27 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 108efe: 80 e2 08 and $0x8,%dl <== NOT EXECUTED 108f01: 74 10 je 108f13 <== NOT EXECUTED echo (c, tty); 108f03: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 108f06: 89 da mov %ebx,%edx <== NOT EXECUTED 108f08: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED 108f0b: e8 63 fd ff ff call 108c73 <== NOT EXECUTED 108f10: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108f13: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108f16: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108f19: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED 108f1c: 40 inc %eax <== NOT EXECUTED 108f1d: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED 108f20: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 108f25: eb 30 jmp 108f57 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 108f27: a1 44 3f 12 00 mov 0x123f44,%eax <== NOT EXECUTED 108f2c: 48 dec %eax <== NOT EXECUTED 108f2d: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 108f30: 7d 23 jge 108f55 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 108f32: f6 43 3c 08 testb $0x8,0x3c(%ebx) <== NOT EXECUTED 108f36: 74 10 je 108f48 <== NOT EXECUTED echo (c, tty); 108f38: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 108f3b: 89 da mov %ebx,%edx <== NOT EXECUTED 108f3d: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED 108f40: e8 2e fd ff ff call 108c73 <== NOT EXECUTED 108f45: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108f48: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108f4b: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108f4e: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED 108f51: 40 inc %eax <== NOT EXECUTED 108f52: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED 108f55: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 108f57: 83 c4 14 add $0x14,%esp <== NOT EXECUTED 108f5a: 5b pop %ebx <== NOT EXECUTED 108f5b: c9 leave <== NOT EXECUTED 108f5c: c3 ret <== NOT EXECUTED =============================================================================== 00111f44 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 111f44: 55 push %ebp 111f45: 89 e5 mov %esp,%ebp 111f47: 57 push %edi 111f48: 56 push %esi 111f49: 53 push %ebx 111f4a: 83 ec 3c sub $0x3c,%esp 111f4d: 8b 5d 0c mov 0xc(%ebp),%ebx 111f50: 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() ) 111f53: e8 78 cf ff ff call 10eed0 111f58: 39 45 08 cmp %eax,0x8(%ebp) 111f5b: 74 0d je 111f6a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); 111f5d: e8 b2 0a 00 00 call 112a14 <__errno> <== NOT EXECUTED 111f62: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED 111f68: eb 0f jmp 111f79 <== NOT EXECUTED /* * Validate the signal passed. */ if ( !sig ) 111f6a: 85 db test %ebx,%ebx 111f6c: 75 13 jne 111f81 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 111f6e: e8 a1 0a 00 00 call 112a14 <__errno> <== NOT EXECUTED 111f73: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 111f79: 83 c8 ff or $0xffffffff,%eax 111f7c: e9 e7 01 00 00 jmp 112168 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 111f81: 8d 4b ff lea -0x1(%ebx),%ecx if ( !is_valid_signo(sig) ) 111f84: 83 f9 1f cmp $0x1f,%ecx 111f87: 77 e5 ja 111f6e <== 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 ) 111f89: 6b d3 0c imul $0xc,%ebx,%edx 111f8c: 31 c0 xor %eax,%eax 111f8e: 83 ba 70 67 12 00 01 cmpl $0x1,0x126770(%edx) 111f95: 0f 84 cd 01 00 00 je 112168 /* * 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 ) ) 111f9b: 83 fb 04 cmp $0x4,%ebx 111f9e: 74 0a je 111faa 111fa0: 83 fb 08 cmp $0x8,%ebx 111fa3: 74 05 je 111faa 111fa5: 83 fb 0b cmp $0xb,%ebx 111fa8: 75 16 jne 111fc0 return pthread_kill( pthread_self(), sig ); 111faa: e8 e9 05 00 00 call 112598 111faf: 56 push %esi 111fb0: 56 push %esi 111fb1: 53 push %ebx 111fb2: 50 push %eax 111fb3: e8 38 05 00 00 call 1124f0 111fb8: 83 c4 10 add $0x10,%esp 111fbb: e9 a8 01 00 00 jmp 112168 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 111fc0: be 01 00 00 00 mov $0x1,%esi 111fc5: d3 e6 shl %cl,%esi /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 111fc7: 89 5d dc mov %ebx,-0x24(%ebp) siginfo->si_code = SI_USER; 111fca: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 111fd1: 85 ff test %edi,%edi 111fd3: 75 09 jne 111fde siginfo->si_value.sival_int = 0; 111fd5: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 111fdc: eb 05 jmp 111fe3 } else { siginfo->si_value = *value; 111fde: 8b 07 mov (%edi),%eax 111fe0: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 111fe3: a1 08 62 12 00 mov 0x126208,%eax 111fe8: 40 inc %eax 111fe9: a3 08 62 12 00 mov %eax,0x126208 /* * 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; 111fee: 8b 15 c4 62 12 00 mov 0x1262c4,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 111ff4: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax 111ffa: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 112000: f7 d0 not %eax 112002: 85 c6 test %eax,%esi 112004: 0f 85 e0 00 00 00 jne 1120ea /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 11200a: a1 f4 68 12 00 mov 0x1268f4,%eax 11200f: eb 23 jmp 112034 !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 112011: 89 c2 mov %eax,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 112013: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 112019: 85 70 30 test %esi,0x30(%eax) 11201c: 0f 85 c8 00 00 00 jne 1120ea /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 112022: 8b 89 cc 00 00 00 mov 0xcc(%ecx),%ecx 112028: f7 d1 not %ecx 11202a: 85 ce test %ecx,%esi 11202c: 0f 85 b8 00 00 00 jne 1120ea 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 ) { 112032: 8b 00 mov (%eax),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 112034: 3d f8 68 12 00 cmp $0x1268f8,%eax 112039: 75 d6 jne 112011 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 11203b: 0f b6 05 f4 21 12 00 movzbl 0x1221f4,%eax 112042: 40 inc %eax 112043: 89 45 d4 mov %eax,-0x2c(%ebp) 112046: 31 d2 xor %edx,%edx 112048: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp) for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 11204f: 8b 4d cc mov -0x34(%ebp),%ecx 112052: 8b 04 8d dc 61 12 00 mov 0x1261dc(,%ecx,4),%eax 112059: 85 c0 test %eax,%eax 11205b: 74 7c je 1120d9 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 11205d: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 112060: 0f b7 78 10 movzwl 0x10(%eax),%edi 112064: 89 7d c0 mov %edi,-0x40(%ebp) object_table = the_info->local_table; 112067: 8b 40 1c mov 0x1c(%eax),%eax 11206a: 89 45 c4 mov %eax,-0x3c(%ebp) 11206d: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp) for ( index = 1 ; index <= maximum ; index++ ) { 112074: eb 5b jmp 1120d1 the_thread = (Thread_Control *) object_table[ index ]; 112076: 8b 4d d0 mov -0x30(%ebp),%ecx 112079: 8b 7d c4 mov -0x3c(%ebp),%edi 11207c: 8b 04 8f mov (%edi,%ecx,4),%eax if ( !the_thread ) 11207f: 85 c0 test %eax,%eax 112081: 74 41 je 1120c4 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 112083: 8b 48 14 mov 0x14(%eax),%ecx 112086: 3b 4d d4 cmp -0x2c(%ebp),%ecx 112089: 77 39 ja 1120c4 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11208b: 8b b8 f8 00 00 00 mov 0xf8(%eax),%edi 112091: 8b bf cc 00 00 00 mov 0xcc(%edi),%edi 112097: f7 d7 not %edi 112099: 85 fe test %edi,%esi 11209b: 74 27 je 1120c4 * * 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 ) { 11209d: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1120a0: 72 27 jb 1120c9 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 1120a2: 8b 7a 10 mov 0x10(%edx),%edi 1120a5: 89 7d c8 mov %edi,-0x38(%ebp) 1120a8: 85 ff test %edi,%edi 1120aa: 74 18 je 1120c4 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 1120ac: 8b 78 10 mov 0x10(%eax),%edi 1120af: 85 ff test %edi,%edi 1120b1: 74 16 je 1120c9 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 1120b3: f7 45 c8 00 00 00 10 testl $0x10000000,-0x38(%ebp) 1120ba: 75 08 jne 1120c4 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 1120bc: 81 e7 00 00 00 10 and $0x10000000,%edi 1120c2: 75 05 jne 1120c9 1120c4: 8b 4d d4 mov -0x2c(%ebp),%ecx 1120c7: eb 02 jmp 1120cb 1120c9: 89 c2 mov %eax,%edx #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 1120cb: ff 45 d0 incl -0x30(%ebp) 1120ce: 89 4d d4 mov %ecx,-0x2c(%ebp) 1120d1: 8b 45 c0 mov -0x40(%ebp),%eax 1120d4: 39 45 d0 cmp %eax,-0x30(%ebp) 1120d7: 76 9d jbe 112076 * + 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++) { 1120d9: ff 45 cc incl -0x34(%ebp) 1120dc: 83 7d cc 05 cmpl $0x5,-0x34(%ebp) 1120e0: 0f 85 69 ff ff ff jne 11204f } } } } if ( interested ) { 1120e6: 85 d2 test %edx,%edx 1120e8: 74 17 je 112101 * 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; 1120ea: c6 42 74 01 movb $0x1,0x74(%edx) /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 1120ee: 51 push %ecx 1120ef: 8d 45 dc lea -0x24(%ebp),%eax 1120f2: 50 push %eax 1120f3: 53 push %ebx 1120f4: 52 push %edx 1120f5: e8 02 02 00 00 call 1122fc <_POSIX_signals_Unblock_thread> 1120fa: 83 c4 10 add $0x10,%esp 1120fd: 84 c0 test %al,%al 1120ff: 75 60 jne 112161 /* * 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 ); 112101: 83 ec 0c sub $0xc,%esp 112104: 56 push %esi 112105: e8 ce 01 00 00 call 1122d8 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 11210a: 6b db 0c imul $0xc,%ebx,%ebx 11210d: 83 c4 10 add $0x10,%esp 112110: 83 bb 68 67 12 00 02 cmpl $0x2,0x126768(%ebx) 112117: 75 48 jne 112161 psiginfo = (POSIX_signals_Siginfo_node *) 112119: 83 ec 0c sub $0xc,%esp 11211c: 68 e8 68 12 00 push $0x1268e8 112121: e8 4a 8d ff ff call 10ae70 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 112126: 83 c4 10 add $0x10,%esp 112129: 85 c0 test %eax,%eax 11212b: 75 15 jne 112142 _Thread_Enable_dispatch(); 11212d: e8 df a1 ff ff call 10c311 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 112132: e8 dd 08 00 00 call 112a14 <__errno> 112137: c7 00 0b 00 00 00 movl $0xb,(%eax) 11213d: e9 37 fe ff ff jmp 111f79 } psiginfo->Info = *siginfo; 112142: 8d 78 08 lea 0x8(%eax),%edi 112145: 8d 75 dc lea -0x24(%ebp),%esi 112148: b9 03 00 00 00 mov $0x3,%ecx 11214d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 11214f: 52 push %edx 112150: 52 push %edx 112151: 50 push %eax 112152: 81 c3 60 69 12 00 add $0x126960,%ebx 112158: 53 push %ebx 112159: e8 d6 8c ff ff call 10ae34 <_Chain_Append> 11215e: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 112161: e8 ab a1 ff ff call 10c311 <_Thread_Enable_dispatch> 112166: 31 c0 xor %eax,%eax return 0; } 112168: 8d 65 f4 lea -0xc(%ebp),%esp 11216b: 5b pop %ebx 11216c: 5e pop %esi 11216d: 5f pop %edi 11216e: c9 leave 11216f: c3 ret =============================================================================== 00128adc : int link( const char *existing, const char *new ) { 128adc: 55 push %ebp 128add: 89 e5 mov %esp,%ebp 128adf: 57 push %edi 128ae0: 56 push %esi 128ae1: 53 push %ebx 128ae2: 83 ec 48 sub $0x48,%esp 128ae5: 8b 55 08 mov 0x8(%ebp),%edx 128ae8: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 128aeb: 31 c0 xor %eax,%eax 128aed: 83 c9 ff or $0xffffffff,%ecx 128af0: 89 d7 mov %edx,%edi 128af2: f2 ae repnz scas %es:(%edi),%al 128af4: f7 d1 not %ecx 128af6: 49 dec %ecx 128af7: 6a 01 push $0x1 128af9: 8d 75 cc lea -0x34(%ebp),%esi 128afc: 56 push %esi 128afd: 6a 00 push $0x0 128aff: 51 push %ecx 128b00: 52 push %edx 128b01: e8 2b 43 fe ff call 10ce31 0, &existing_loc, true ); if ( result != 0 ) 128b06: 83 c4 20 add $0x20,%esp 128b09: 83 cf ff or $0xffffffff,%edi 128b0c: 85 c0 test %eax,%eax 128b0e: 0f 85 45 01 00 00 jne 128c59 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 128b14: 57 push %edi 128b15: 8d 7d b8 lea -0x48(%ebp),%edi 128b18: 57 push %edi 128b19: 8d 45 e4 lea -0x1c(%ebp),%eax 128b1c: 50 push %eax 128b1d: 53 push %ebx 128b1e: e8 91 58 fe ff call 10e3b4 if ( !parent_loc.ops->evalformake_h ) { 128b23: 8b 45 c4 mov -0x3c(%ebp),%eax 128b26: 8b 40 04 mov 0x4(%eax),%eax 128b29: 83 c4 10 add $0x10,%esp 128b2c: 85 c0 test %eax,%eax 128b2e: 75 1f jne 128b4f <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); 128b30: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 128b33: 85 c0 test %eax,%eax <== NOT EXECUTED 128b35: 0f 84 d0 00 00 00 je 128c0b <== NOT EXECUTED 128b3b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 128b3e: 85 c0 test %eax,%eax <== NOT EXECUTED 128b40: 0f 84 c5 00 00 00 je 128c0b <== NOT EXECUTED 128b46: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128b49: 56 push %esi <== NOT EXECUTED 128b4a: e9 b7 00 00 00 jmp 128c06 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 128b4f: 51 push %ecx 128b50: 8d 55 e0 lea -0x20(%ebp),%edx 128b53: 52 push %edx 128b54: 57 push %edi 128b55: 03 5d e4 add -0x1c(%ebp),%ebx 128b58: 53 push %ebx 128b59: ff d0 call *%eax 128b5b: 89 c3 mov %eax,%ebx if ( result != 0 ) { 128b5d: 83 c4 10 add $0x10,%esp 128b60: 85 c0 test %eax,%eax 128b62: 74 26 je 128b8a rtems_filesystem_freenode( &existing_loc ); 128b64: 8b 45 d8 mov -0x28(%ebp),%eax 128b67: 85 c0 test %eax,%eax 128b69: 74 10 je 128b7b <== NEVER TAKEN 128b6b: 8b 40 1c mov 0x1c(%eax),%eax 128b6e: 85 c0 test %eax,%eax 128b70: 74 09 je 128b7b <== NEVER TAKEN 128b72: 83 ec 0c sub $0xc,%esp 128b75: 56 push %esi 128b76: ff d0 call *%eax 128b78: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( result ); 128b7b: e8 94 54 01 00 call 13e014 <__errno> 128b80: 89 18 mov %ebx,(%eax) 128b82: 83 cf ff or $0xffffffff,%edi 128b85: e9 cf 00 00 00 jmp 128c59 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 128b8a: 8b 45 c8 mov -0x38(%ebp),%eax 128b8d: 3b 45 dc cmp -0x24(%ebp),%eax 128b90: 74 3e je 128bd0 rtems_filesystem_freenode( &existing_loc ); 128b92: 8b 45 d8 mov -0x28(%ebp),%eax 128b95: 85 c0 test %eax,%eax 128b97: 74 10 je 128ba9 <== NEVER TAKEN 128b99: 8b 40 1c mov 0x1c(%eax),%eax 128b9c: 85 c0 test %eax,%eax 128b9e: 74 09 je 128ba9 <== NEVER TAKEN 128ba0: 83 ec 0c sub $0xc,%esp 128ba3: 56 push %esi 128ba4: ff d0 call *%eax 128ba6: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 128ba9: 8b 45 c4 mov -0x3c(%ebp),%eax 128bac: 85 c0 test %eax,%eax 128bae: 74 13 je 128bc3 <== NEVER TAKEN 128bb0: 8b 40 1c mov 0x1c(%eax),%eax 128bb3: 85 c0 test %eax,%eax 128bb5: 74 0c je 128bc3 <== NEVER TAKEN 128bb7: 83 ec 0c sub $0xc,%esp 128bba: 8d 55 b8 lea -0x48(%ebp),%edx 128bbd: 52 push %edx 128bbe: ff d0 call *%eax 128bc0: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 128bc3: e8 4c 54 01 00 call 13e014 <__errno> 128bc8: c7 00 12 00 00 00 movl $0x12,(%eax) 128bce: eb b2 jmp 128b82 } if ( !parent_loc.ops->link_h ) { 128bd0: 8b 45 c4 mov -0x3c(%ebp),%eax 128bd3: 8b 40 08 mov 0x8(%eax),%eax 128bd6: 85 c0 test %eax,%eax 128bd8: 75 41 jne 128c1b <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); 128bda: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 128bdd: 85 c0 test %eax,%eax <== NOT EXECUTED 128bdf: 74 10 je 128bf1 <== NOT EXECUTED 128be1: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 128be4: 85 c0 test %eax,%eax <== NOT EXECUTED 128be6: 74 09 je 128bf1 <== NOT EXECUTED 128be8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128beb: 56 push %esi <== NOT EXECUTED 128bec: ff d0 call *%eax <== NOT EXECUTED 128bee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 128bf1: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED 128bf4: 85 c0 test %eax,%eax <== NOT EXECUTED 128bf6: 74 13 je 128c0b <== NOT EXECUTED 128bf8: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 128bfb: 85 c0 test %eax,%eax <== NOT EXECUTED 128bfd: 74 0c je 128c0b <== NOT EXECUTED 128bff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128c02: 8d 55 b8 lea -0x48(%ebp),%edx <== NOT EXECUTED 128c05: 52 push %edx <== NOT EXECUTED 128c06: ff d0 call *%eax <== NOT EXECUTED 128c08: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 128c0b: e8 04 54 01 00 call 13e014 <__errno> <== NOT EXECUTED 128c10: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 128c16: e9 67 ff ff ff jmp 128b82 <== NOT EXECUTED } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 128c1b: 52 push %edx 128c1c: ff 75 e0 pushl -0x20(%ebp) 128c1f: 57 push %edi 128c20: 56 push %esi 128c21: ff d0 call *%eax 128c23: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &existing_loc ); 128c25: 8b 45 d8 mov -0x28(%ebp),%eax 128c28: 83 c4 10 add $0x10,%esp 128c2b: 85 c0 test %eax,%eax 128c2d: 74 10 je 128c3f <== NEVER TAKEN 128c2f: 8b 40 1c mov 0x1c(%eax),%eax 128c32: 85 c0 test %eax,%eax 128c34: 74 09 je 128c3f <== NEVER TAKEN 128c36: 83 ec 0c sub $0xc,%esp 128c39: 56 push %esi 128c3a: ff d0 call *%eax 128c3c: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 128c3f: 8b 45 c4 mov -0x3c(%ebp),%eax 128c42: 85 c0 test %eax,%eax 128c44: 74 13 je 128c59 <== NEVER TAKEN 128c46: 8b 40 1c mov 0x1c(%eax),%eax 128c49: 85 c0 test %eax,%eax 128c4b: 74 0c je 128c59 <== NEVER TAKEN 128c4d: 83 ec 0c sub $0xc,%esp 128c50: 8d 55 b8 lea -0x48(%ebp),%edx 128c53: 52 push %edx 128c54: ff d0 call *%eax 128c56: 83 c4 10 add $0x10,%esp return result; } 128c59: 89 f8 mov %edi,%eax 128c5b: 8d 65 f4 lea -0xc(%ebp),%esp 128c5e: 5b pop %ebx 128c5f: 5e pop %esi 128c60: 5f pop %edi 128c61: c9 leave 128c62: c3 ret =============================================================================== 0011e070 : off_t lseek( int fd, off_t offset, int whence ) { 11e070: 55 push %ebp 11e071: 89 e5 mov %esp,%ebp 11e073: 57 push %edi 11e074: 56 push %esi 11e075: 53 push %ebx 11e076: 83 ec 1c sub $0x1c,%esp 11e079: 8b 5d 08 mov 0x8(%ebp),%ebx 11e07c: 8b 45 0c mov 0xc(%ebp),%eax 11e07f: 8b 55 10 mov 0x10(%ebp),%edx 11e082: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11e085: 3b 1d 44 21 12 00 cmp 0x122144,%ebx 11e08b: 73 0f jae 11e09c <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11e08d: c1 e3 06 shl $0x6,%ebx 11e090: 03 1d b8 60 12 00 add 0x1260b8,%ebx rtems_libio_check_is_open(iop); 11e096: f6 43 15 01 testb $0x1,0x15(%ebx) 11e09a: 75 0d jne 11e0a9 <== ALWAYS TAKEN 11e09c: e8 73 49 ff ff call 112a14 <__errno> <== NOT EXECUTED 11e0a1: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11e0a7: eb 61 jmp 11e10a <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 11e0a9: 8b 73 3c mov 0x3c(%ebx),%esi 11e0ac: 83 7e 14 00 cmpl $0x0,0x14(%esi) 11e0b0: 75 0d jne 11e0bf <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11e0b2: e8 5d 49 ff ff call 112a14 <__errno> <== NOT EXECUTED 11e0b7: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11e0bd: eb 4b jmp 11e10a <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; 11e0bf: 8b 73 0c mov 0xc(%ebx),%esi 11e0c2: 8b 7b 10 mov 0x10(%ebx),%edi 11e0c5: 89 75 e0 mov %esi,-0x20(%ebp) 11e0c8: 89 7d e4 mov %edi,-0x1c(%ebp) switch ( whence ) { 11e0cb: 83 f9 01 cmp $0x1,%ecx 11e0ce: 74 11 je 11e0e1 11e0d0: 83 f9 02 cmp $0x2,%ecx 11e0d3: 74 18 je 11e0ed 11e0d5: 85 c9 test %ecx,%ecx 11e0d7: 75 26 jne 11e0ff case SEEK_SET: iop->offset = offset; 11e0d9: 89 43 0c mov %eax,0xc(%ebx) 11e0dc: 89 53 10 mov %edx,0x10(%ebx) break; 11e0df: eb 30 jmp 11e111 case SEEK_CUR: iop->offset += offset; 11e0e1: 8b 75 e0 mov -0x20(%ebp),%esi 11e0e4: 8b 7d e4 mov -0x1c(%ebp),%edi 11e0e7: 01 c6 add %eax,%esi 11e0e9: 11 d7 adc %edx,%edi 11e0eb: eb 0a jmp 11e0f7 break; case SEEK_END: iop->offset = iop->size + offset; 11e0ed: 89 c6 mov %eax,%esi 11e0ef: 89 d7 mov %edx,%edi 11e0f1: 03 73 04 add 0x4(%ebx),%esi 11e0f4: 13 7b 08 adc 0x8(%ebx),%edi 11e0f7: 89 73 0c mov %esi,0xc(%ebx) 11e0fa: 89 7b 10 mov %edi,0x10(%ebx) break; 11e0fd: eb 12 jmp 11e111 default: rtems_set_errno_and_return_minus_one( EINVAL ); 11e0ff: e8 10 49 ff ff call 112a14 <__errno> 11e104: c7 00 16 00 00 00 movl $0x16,(%eax) 11e10a: 83 c8 ff or $0xffffffff,%eax 11e10d: 89 c2 mov %eax,%edx 11e10f: eb 23 jmp 11e134 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 11e111: 8b 73 3c mov 0x3c(%ebx),%esi 11e114: 51 push %ecx 11e115: 52 push %edx 11e116: 50 push %eax 11e117: 53 push %ebx 11e118: ff 56 14 call *0x14(%esi) if ( status == (off_t) -1 ) 11e11b: 83 c4 10 add $0x10,%esp 11e11e: 83 fa ff cmp $0xffffffff,%edx 11e121: 75 11 jne 11e134 11e123: 83 f8 ff cmp $0xffffffff,%eax 11e126: 75 0c jne 11e134 <== NEVER TAKEN iop->offset = old_offset; 11e128: 8b 75 e0 mov -0x20(%ebp),%esi 11e12b: 8b 7d e4 mov -0x1c(%ebp),%edi 11e12e: 89 73 0c mov %esi,0xc(%ebx) 11e131: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11e134: 8d 65 f4 lea -0xc(%ebp),%esp 11e137: 5b pop %ebx 11e138: 5e pop %esi 11e139: 5f pop %edi 11e13a: c9 leave 11e13b: c3 ret =============================================================================== 00128d70 : int _STAT_NAME( const char *path, struct stat *buf ) { 128d70: 55 push %ebp <== NOT EXECUTED 128d71: 89 e5 mov %esp,%ebp <== NOT EXECUTED 128d73: 57 push %edi <== NOT EXECUTED 128d74: 56 push %esi <== NOT EXECUTED 128d75: 53 push %ebx <== NOT EXECUTED 128d76: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 128d79: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 128d7c: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 128d7f: 85 f6 test %esi,%esi <== NOT EXECUTED 128d81: 75 0d jne 128d90 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 128d83: e8 8c 52 01 00 call 13e014 <__errno> <== NOT EXECUTED 128d88: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 128d8e: eb 53 jmp 128de3 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 128d90: 31 c0 xor %eax,%eax <== NOT EXECUTED 128d92: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 128d95: 89 d7 mov %edx,%edi <== NOT EXECUTED 128d97: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 128d99: f7 d1 not %ecx <== NOT EXECUTED 128d9b: 49 dec %ecx <== NOT EXECUTED 128d9c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128d9f: 6a 00 push $0x0 <== NOT EXECUTED 128da1: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 128da4: 53 push %ebx <== NOT EXECUTED 128da5: 6a 00 push $0x0 <== NOT EXECUTED 128da7: 51 push %ecx <== NOT EXECUTED 128da8: 52 push %edx <== NOT EXECUTED 128da9: e8 83 40 fe ff call 10ce31 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 128dae: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 128db1: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 128db4: 85 c0 test %eax,%eax <== NOT EXECUTED 128db6: 75 5c jne 128e14 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 128db8: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 128dbb: 83 7a 18 00 cmpl $0x0,0x18(%edx) <== NOT EXECUTED 128dbf: 75 27 jne 128de8 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 128dc1: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 128dc4: 85 c0 test %eax,%eax <== NOT EXECUTED 128dc6: 74 10 je 128dd8 <== NOT EXECUTED 128dc8: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 128dcb: 85 c0 test %eax,%eax <== NOT EXECUTED 128dcd: 74 09 je 128dd8 <== NOT EXECUTED 128dcf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128dd2: 53 push %ebx <== NOT EXECUTED 128dd3: ff d0 call *%eax <== NOT EXECUTED 128dd5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 128dd8: e8 37 52 01 00 call 13e014 <__errno> <== NOT EXECUTED 128ddd: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 128de3: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 128de6: eb 2c jmp 128e14 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 128de8: b9 12 00 00 00 mov $0x12,%ecx <== NOT EXECUTED 128ded: 89 f7 mov %esi,%edi <== NOT EXECUTED 128def: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 128df1: 50 push %eax <== NOT EXECUTED 128df2: 50 push %eax <== NOT EXECUTED 128df3: 56 push %esi <== NOT EXECUTED 128df4: 53 push %ebx <== NOT EXECUTED 128df5: ff 52 18 call *0x18(%edx) <== NOT EXECUTED 128df8: 89 c7 mov %eax,%edi <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 128dfa: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 128dfd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 128e00: 85 c0 test %eax,%eax <== NOT EXECUTED 128e02: 74 10 je 128e14 <== NOT EXECUTED 128e04: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 128e07: 85 c0 test %eax,%eax <== NOT EXECUTED 128e09: 74 09 je 128e14 <== NOT EXECUTED 128e0b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128e0e: 53 push %ebx <== NOT EXECUTED 128e0f: ff d0 call *%eax <== NOT EXECUTED 128e11: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return status; } 128e14: 89 f8 mov %edi,%eax <== NOT EXECUTED 128e16: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 128e19: 5b pop %ebx <== NOT EXECUTED 128e1a: 5e pop %esi <== NOT EXECUTED 128e1b: 5f pop %edi <== NOT EXECUTED 128e1c: c9 leave <== NOT EXECUTED 128e1d: c3 ret <== NOT EXECUTED =============================================================================== 0010793c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 10793c: 55 push %ebp 10793d: 89 e5 mov %esp,%ebp 10793f: 57 push %edi 107940: 56 push %esi 107941: 53 push %ebx 107942: 83 ec 0c sub $0xc,%esp 107945: 8b 75 08 mov 0x8(%ebp),%esi 107948: ff 05 d4 60 12 00 incl 0x1260d4 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 10794e: e8 17 ff ff ff call 10786a /* * Validate the parameters */ if ( !size ) 107953: 85 f6 test %esi,%esi 107955: 74 7c je 1079d3 <== 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()) && 107957: 83 3d a0 63 12 00 03 cmpl $0x3,0x1263a0 10795e: 75 09 jne 107969 107960: e8 af fe ff ff call 107814 107965: 84 c0 test %al,%al 107967: 74 6a je 1079d3 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 107969: 6a 00 push $0x0 10796b: 6a 00 push $0x0 10796d: 56 push %esi 10796e: ff 35 50 21 12 00 pushl 0x122150 107974: e8 37 44 00 00 call 10bdb0 <_Protected_heap_Allocate_aligned_with_boundary> 107979: 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 ) { 10797b: 83 c4 10 add $0x10,%esp if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 10797e: 89 c7 mov %eax,%edi * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 107980: 85 c0 test %eax,%eax 107982: 75 26 jne 1079aa if (rtems_malloc_sbrk_helpers) 107984: a1 34 45 12 00 mov 0x124534,%eax 107989: 85 c0 test %eax,%eax 10798b: 74 10 je 10799d <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 10798d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107990: 56 push %esi <== NOT EXECUTED 107991: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 107994: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( !return_this ) { 107996: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107999: 85 c0 test %eax,%eax <== NOT EXECUTED 10799b: 75 0d jne 1079aa <== NOT EXECUTED errno = ENOMEM; 10799d: e8 72 b0 00 00 call 112a14 <__errno> 1079a2: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 1079a8: eb 2b jmp 1079d5 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 1079aa: a1 38 45 12 00 mov 0x124538,%eax 1079af: 85 c0 test %eax,%eax 1079b1: 74 09 je 1079bc <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 1079b3: 52 push %edx <== NOT EXECUTED 1079b4: 52 push %edx <== NOT EXECUTED 1079b5: 56 push %esi <== NOT EXECUTED 1079b6: 57 push %edi <== NOT EXECUTED 1079b7: ff d0 call *%eax <== NOT EXECUTED 1079b9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1079bc: a1 30 45 12 00 mov 0x124530,%eax 1079c1: 89 fb mov %edi,%ebx 1079c3: 85 c0 test %eax,%eax 1079c5: 74 0e je 1079d5 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1079c7: 83 ec 0c sub $0xc,%esp 1079ca: 57 push %edi 1079cb: ff 50 04 call *0x4(%eax) 1079ce: 83 c4 10 add $0x10,%esp 1079d1: eb 02 jmp 1079d5 1079d3: 31 db xor %ebx,%ebx if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1079d5: 89 d8 mov %ebx,%eax 1079d7: 8d 65 f4 lea -0xc(%ebp),%esp 1079da: 5b pop %ebx 1079db: 5e pop %esi 1079dc: 5f pop %edi 1079dd: c9 leave 1079de: c3 ret =============================================================================== 00107852 : } void malloc_deferred_free( void *pointer ) { 107852: 55 push %ebp <== NOT EXECUTED 107853: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107855: 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 ); 107858: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10785b: 68 c4 60 12 00 push $0x1260c4 <== NOT EXECUTED 107860: e8 cf 35 00 00 call 10ae34 <_Chain_Append> <== NOT EXECUTED 107865: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 107868: c9 leave <== NOT EXECUTED 107869: c3 ret <== NOT EXECUTED =============================================================================== 0010786a : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 10786a: 55 push %ebp 10786b: 89 e5 mov %esp,%ebp 10786d: 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) 107870: eb 0c jmp 10787e free(to_be_freed); 107872: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107875: 50 push %eax <== NOT EXECUTED 107876: e8 21 fe ff ff call 10769c <== NOT EXECUTED 10787b: 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 ); 10787e: 83 ec 0c sub $0xc,%esp 107881: 68 c4 60 12 00 push $0x1260c4 107886: e8 e5 35 00 00 call 10ae70 <_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) 10788b: 83 c4 10 add $0x10,%esp 10788e: 85 c0 test %eax,%eax 107890: 75 e0 jne 107872 <== NEVER TAKEN free(to_be_freed); } 107892: c9 leave 107893: c3 ret =============================================================================== 00107814 : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 107814: 55 push %ebp 107815: 89 e5 mov %esp,%ebp if ( _Thread_Dispatch_disable_level > 0 ) 107817: 8b 15 08 62 12 00 mov 0x126208,%edx 10781d: 31 c0 xor %eax,%eax 10781f: 85 d2 test %edx,%edx 107821: 75 0a jne 10782d <== NEVER TAKEN return false; if ( _ISR_Nest_level > 0 ) 107823: a1 a0 62 12 00 mov 0x1262a0,%eax #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 107828: 85 c0 test %eax,%eax 10782a: 0f 94 c0 sete %al if ( _ISR_Nest_level > 0 ) return false; return true; } 10782d: c9 leave 10782e: c3 ret =============================================================================== 00110994 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 110994: 55 push %ebp 110995: 89 e5 mov %esp,%ebp 110997: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 11099a: ff 35 a8 5d 12 00 pushl 0x125da8 1109a0: 6a 01 push $0x1 1109a2: e8 15 6b ff ff call 1074bc if ( memory ) 1109a7: 83 c4 10 add $0x10,%esp 1109aa: 85 c0 test %eax,%eax 1109ac: 74 06 je 1109b4 <== NEVER TAKEN memfile_blocks_allocated++; 1109ae: ff 05 bc 5e 12 00 incl 0x125ebc return memory; } 1109b4: c9 leave 1109b5: c3 ret =============================================================================== 00110d10 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 110d10: 55 push %ebp 110d11: 89 e5 mov %esp,%ebp 110d13: 53 push %ebx 110d14: 83 ec 10 sub $0x10,%esp 110d17: 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) ) { 110d1a: 53 push %ebx 110d1b: e8 02 e2 ff ff call 10ef22 110d20: 83 c4 10 add $0x10,%esp 110d23: 85 c0 test %eax,%eax 110d25: 75 36 jne 110d5d 110d27: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 110d2c: 75 2f jne 110d5d <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 110d2e: a1 54 3f 12 00 mov 0x123f54,%eax 110d33: 39 58 04 cmp %ebx,0x4(%eax) 110d36: 75 07 jne 110d3f <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 110d38: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 110d3f: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 110d43: 74 0c je 110d51 <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); 110d45: 83 ec 0c sub $0xc,%esp 110d48: 53 push %ebx 110d49: e8 98 fe ff ff call 110be6 110d4e: 83 c4 10 add $0x10,%esp free( the_jnode ); 110d51: 83 ec 0c sub $0xc,%esp 110d54: 53 push %ebx 110d55: e8 42 69 ff ff call 10769c 110d5a: 83 c4 10 add $0x10,%esp } return 0; } 110d5d: 31 c0 xor %eax,%eax 110d5f: 8b 5d fc mov -0x4(%ebp),%ebx 110d62: c9 leave 110d63: c3 ret =============================================================================== 00110b31 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 110b31: 55 push %ebp 110b32: 89 e5 mov %esp,%ebp 110b34: 57 push %edi 110b35: 56 push %esi 110b36: 53 push %ebx 110b37: 83 ec 0c sub $0xc,%esp 110b3a: 8b 75 08 mov 0x8(%ebp),%esi /* * Perform internal consistency checks */ assert( block_table ); 110b3d: 85 f6 test %esi,%esi 110b3f: 75 19 jne 110b5a <== ALWAYS TAKEN 110b41: 68 4b 0a 12 00 push $0x120a4b <== NOT EXECUTED 110b46: 68 40 0b 12 00 push $0x120b40 <== NOT EXECUTED 110b4b: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED 110b50: 68 da 09 12 00 push $0x1209da <== NOT EXECUTED 110b55: e8 46 68 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 110b5a: 8b 3e mov (%esi),%edi 110b5c: 31 db xor %ebx,%ebx for ( i=0 ; i if ( b[i] ) { 110b60: 8b 04 9f mov (%edi,%ebx,4),%eax 110b63: 85 c0 test %eax,%eax 110b65: 74 13 je 110b7a memfile_free_block( b[i] ); 110b67: 83 ec 0c sub $0xc,%esp 110b6a: 50 push %eax 110b6b: e8 0b fe ff ff call 11097b b[i] = 0; 110b70: c7 04 9f 00 00 00 00 movl $0x0,(%edi,%ebx,4) 110b77: 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 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 110b80: 83 ec 0c sub $0xc,%esp 110b83: ff 36 pushl (%esi) 110b85: e8 f1 fd ff ff call 11097b *block_table = 0; 110b8a: c7 06 00 00 00 00 movl $0x0,(%esi) 110b90: 83 c4 10 add $0x10,%esp } 110b93: 8d 65 f4 lea -0xc(%ebp),%esp 110b96: 5b pop %ebx 110b97: 5e pop %esi 110b98: 5f pop %edi 110b99: c9 leave 110b9a: c3 ret =============================================================================== 00110f71 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 110f71: 55 push %ebp 110f72: 89 e5 mov %esp,%ebp 110f74: 53 push %ebx 110f75: 83 ec 14 sub $0x14,%esp 110f78: 8b 4d 08 mov 0x8(%ebp),%ecx 110f7b: 8b 45 0c mov 0xc(%ebp),%eax 110f7e: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 110f81: 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 ) 110f84: 3b 53 54 cmp 0x54(%ebx),%edx 110f87: 7c 12 jl 110f9b <== NEVER TAKEN 110f89: 7f 05 jg 110f90 <== NEVER TAKEN 110f8b: 3b 43 50 cmp 0x50(%ebx),%eax 110f8e: 76 0b jbe 110f9b <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 110f90: 51 push %ecx <== NOT EXECUTED 110f91: 52 push %edx <== NOT EXECUTED 110f92: 50 push %eax <== NOT EXECUTED 110f93: 53 push %ebx <== NOT EXECUTED 110f94: e8 b2 fe ff ff call 110e4b <== NOT EXECUTED 110f99: eb 21 jmp 110fbc <== NOT EXECUTED * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 110f9b: 89 43 50 mov %eax,0x50(%ebx) 110f9e: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 110fa1: 89 41 04 mov %eax,0x4(%ecx) 110fa4: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 110fa7: 52 push %edx 110fa8: 52 push %edx 110fa9: 6a 00 push $0x0 110fab: 8d 45 f0 lea -0x10(%ebp),%eax 110fae: 50 push %eax 110faf: e8 60 67 ff ff call 107714 110fb4: 8b 45 f0 mov -0x10(%ebp),%eax 110fb7: 89 43 40 mov %eax,0x40(%ebx) 110fba: 31 c0 xor %eax,%eax return 0; 110fbc: 83 c4 10 add $0x10,%esp } 110fbf: 8b 5d fc mov -0x4(%ebp),%ebx 110fc2: c9 leave 110fc3: c3 ret =============================================================================== 00110fc4 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 110fc4: 55 push %ebp 110fc5: 89 e5 mov %esp,%ebp 110fc7: 56 push %esi 110fc8: 53 push %ebx 110fc9: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 110fcc: 8b 73 38 mov 0x38(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 110fcf: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 110fd3: 75 1a jne 110fef <== ALWAYS TAKEN if (iop->offset > the_jnode->info.linearfile.size) 110fd5: 8b 56 50 mov 0x50(%esi),%edx <== NOT EXECUTED 110fd8: 8b 46 54 mov 0x54(%esi),%eax <== NOT EXECUTED 110fdb: 39 43 10 cmp %eax,0x10(%ebx) <== NOT EXECUTED 110fde: 7c 41 jl 111021 <== NOT EXECUTED 110fe0: 7f 05 jg 110fe7 <== NOT EXECUTED 110fe2: 39 53 0c cmp %edx,0xc(%ebx) <== NOT EXECUTED 110fe5: 76 3a jbe 111021 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 110fe7: 89 53 0c mov %edx,0xc(%ebx) <== NOT EXECUTED 110fea: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED 110fed: eb 32 jmp 111021 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 110fef: 50 push %eax 110ff0: ff 73 10 pushl 0x10(%ebx) 110ff3: ff 73 0c pushl 0xc(%ebx) 110ff6: 56 push %esi 110ff7: e8 4f fe ff ff call 110e4b 110ffc: 83 c4 10 add $0x10,%esp 110fff: 85 c0 test %eax,%eax 111001: 74 12 je 111015 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 111003: e8 0c 1a 00 00 call 112a14 <__errno> <== NOT EXECUTED 111008: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 11100e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 111011: 89 c2 mov %eax,%edx <== NOT EXECUTED 111013: eb 12 jmp 111027 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 111015: 8b 46 50 mov 0x50(%esi),%eax 111018: 8b 56 54 mov 0x54(%esi),%edx 11101b: 89 43 04 mov %eax,0x4(%ebx) 11101e: 89 53 08 mov %edx,0x8(%ebx) } return iop->offset; 111021: 8b 43 0c mov 0xc(%ebx),%eax 111024: 8b 53 10 mov 0x10(%ebx),%edx } 111027: 8d 65 f8 lea -0x8(%ebp),%esp 11102a: 5b pop %ebx 11102b: 5e pop %esi 11102c: c9 leave 11102d: c3 ret =============================================================================== 00111253 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 111253: 55 push %ebp 111254: 89 e5 mov %esp,%ebp 111256: 56 push %esi 111257: 53 push %ebx 111258: 8b 75 08 mov 0x8(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 11125b: 8b 5e 38 mov 0x38(%esi),%ebx /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 11125e: f7 46 14 04 02 00 00 testl $0x204,0x14(%esi) 111265: 74 54 je 1112bb && (the_jnode->type == IMFS_LINEAR_FILE)) { 111267: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 11126b: 75 4e jne 1112bb <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; 11126d: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 111270: 8b 53 58 mov 0x58(%ebx),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 111273: c7 43 4c 05 00 00 00 movl $0x5,0x4c(%ebx) <== NOT EXECUTED the_jnode->info.file.size = 0; 11127a: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) <== NOT EXECUTED 111281: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 111288: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 11128f: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 111296: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) <== NOT EXECUTED if ((count != 0) 11129d: 85 c0 test %eax,%eax <== NOT EXECUTED 11129f: 74 1a je 1112bb <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 1112a1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1112a4: 50 push %eax <== NOT EXECUTED 1112a5: 52 push %edx <== NOT EXECUTED 1112a6: 6a 00 push $0x0 <== NOT EXECUTED 1112a8: 6a 00 push $0x0 <== NOT EXECUTED 1112aa: 53 push %ebx <== NOT EXECUTED 1112ab: e8 7e fd ff ff call 11102e <== NOT EXECUTED 1112b0: 89 c2 mov %eax,%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 1112b2: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1112b5: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1112b8: 42 inc %edx <== NOT EXECUTED 1112b9: 74 20 je 1112db <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 1112bb: f6 46 15 02 testb $0x2,0x15(%esi) 1112bf: 74 0c je 1112cd iop->offset = the_jnode->info.file.size; 1112c1: 8b 43 50 mov 0x50(%ebx),%eax 1112c4: 8b 53 54 mov 0x54(%ebx),%edx 1112c7: 89 46 0c mov %eax,0xc(%esi) 1112ca: 89 56 10 mov %edx,0x10(%esi) iop->size = the_jnode->info.file.size; 1112cd: 8b 43 50 mov 0x50(%ebx),%eax 1112d0: 8b 53 54 mov 0x54(%ebx),%edx 1112d3: 89 46 04 mov %eax,0x4(%esi) 1112d6: 89 56 08 mov %edx,0x8(%esi) 1112d9: 31 c0 xor %eax,%eax return 0; } 1112db: 8d 65 f8 lea -0x8(%ebp),%esp 1112de: 5b pop %ebx 1112df: 5e pop %esi 1112e0: c9 leave 1112e1: c3 ret =============================================================================== 00110d64 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 110d64: 55 push %ebp 110d65: 89 e5 mov %esp,%ebp 110d67: 53 push %ebx 110d68: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 110d6b: 8b 45 0c mov 0xc(%ebp),%eax 110d6e: 8b 18 mov (%eax),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 110d70: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 110d74: 74 13 je 110d89 <== NEVER TAKEN 110d76: 83 ec 0c sub $0xc,%esp 110d79: 53 push %ebx 110d7a: e8 d9 a0 ff ff call 10ae58 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 110d7f: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 110d86: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 110d89: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 110d8d: 50 push %eax 110d8e: 50 push %eax 110d8f: 6a 00 push $0x0 110d91: 8d 45 f0 lea -0x10(%ebp),%eax 110d94: 50 push %eax 110d95: e8 7a 69 ff ff call 107714 110d9a: 8b 45 f0 mov -0x10(%ebp),%eax 110d9d: 89 43 48 mov %eax,0x48(%ebx) return memfile_check_rmnod( the_jnode ); 110da0: 89 1c 24 mov %ebx,(%esp) 110da3: e8 68 ff ff ff call 110d10 } 110da8: 8b 5d fc mov -0x4(%ebp),%ebx 110dab: c9 leave 110dac: c3 ret =============================================================================== 001079fc : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1079fc: 55 push %ebp 1079fd: 89 e5 mov %esp,%ebp 1079ff: 57 push %edi 107a00: 56 push %esi 107a01: 53 push %ebx 107a02: 83 ec 3c sub $0x3c,%esp 107a05: 8b 5d 08 mov 0x8(%ebp),%ebx 107a08: 8b 7d 0c mov 0xc(%ebp),%edi 107a0b: 8b 45 10 mov 0x10(%ebp),%eax 107a0e: 8b 55 14 mov 0x14(%ebp),%edx 107a11: 89 45 c0 mov %eax,-0x40(%ebp) 107a14: 89 55 c4 mov %edx,-0x3c(%ebp) int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 107a17: 89 f8 mov %edi,%eax 107a19: 25 00 f0 00 00 and $0xf000,%eax 107a1e: 3d 00 40 00 00 cmp $0x4000,%eax 107a23: 74 2b je 107a50 107a25: 77 0e ja 107a35 107a27: 3d 00 10 00 00 cmp $0x1000,%eax 107a2c: 74 22 je 107a50 107a2e: 3d 00 20 00 00 cmp $0x2000,%eax 107a33: eb 0c jmp 107a41 107a35: 3d 00 60 00 00 cmp $0x6000,%eax 107a3a: 74 14 je 107a50 107a3c: 3d 00 80 00 00 cmp $0x8000,%eax 107a41: 74 0d je 107a50 <== ALWAYS TAKEN case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 107a43: e8 cc af 00 00 call 112a14 <__errno> <== NOT EXECUTED 107a48: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107a4e: eb 27 jmp 107a77 <== NOT EXECUTED } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 107a50: 51 push %ecx 107a51: 8d 75 cc lea -0x34(%ebp),%esi 107a54: 56 push %esi 107a55: 8d 45 e4 lea -0x1c(%ebp),%eax 107a58: 50 push %eax 107a59: 53 push %ebx 107a5a: e8 51 09 00 00 call 1083b0 if ( !temp_loc.ops->evalformake_h ) { 107a5f: 8b 45 d8 mov -0x28(%ebp),%eax 107a62: 8b 40 04 mov 0x4(%eax),%eax 107a65: 83 c4 10 add $0x10,%esp 107a68: 85 c0 test %eax,%eax 107a6a: 75 10 jne 107a7c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 107a6c: e8 a3 af 00 00 call 112a14 <__errno> <== NOT EXECUTED 107a71: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 107a77: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 107a7a: eb 5e jmp 107ada <== NOT EXECUTED } result = (*temp_loc.ops->evalformake_h)( 107a7c: 52 push %edx 107a7d: 8d 55 e0 lea -0x20(%ebp),%edx 107a80: 52 push %edx 107a81: 56 push %esi 107a82: 03 5d e4 add -0x1c(%ebp),%ebx 107a85: 53 push %ebx 107a86: ff d0 call *%eax &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 107a88: 83 c4 10 add $0x10,%esp 107a8b: 83 cb ff or $0xffffffff,%ebx 107a8e: 85 c0 test %eax,%eax 107a90: 75 48 jne 107ada return -1; if ( !temp_loc.ops->mknod_h ) { 107a92: 8b 55 d8 mov -0x28(%ebp),%edx 107a95: 8b 42 14 mov 0x14(%edx),%eax 107a98: 85 c0 test %eax,%eax 107a9a: 75 12 jne 107aae <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); 107a9c: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 107a9f: 85 c0 test %eax,%eax <== NOT EXECUTED 107aa1: 74 c9 je 107a6c <== NOT EXECUTED 107aa3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107aa6: 56 push %esi <== NOT EXECUTED 107aa7: ff d0 call *%eax <== NOT EXECUTED 107aa9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107aac: eb be jmp 107a6c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 107aae: 83 ec 0c sub $0xc,%esp 107ab1: 56 push %esi 107ab2: ff 75 c4 pushl -0x3c(%ebp) 107ab5: ff 75 c0 pushl -0x40(%ebp) 107ab8: 57 push %edi 107ab9: ff 75 e0 pushl -0x20(%ebp) 107abc: ff d0 call *%eax 107abe: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &temp_loc ); 107ac0: 8b 45 d8 mov -0x28(%ebp),%eax 107ac3: 83 c4 20 add $0x20,%esp 107ac6: 85 c0 test %eax,%eax 107ac8: 74 10 je 107ada <== NEVER TAKEN 107aca: 8b 40 1c mov 0x1c(%eax),%eax 107acd: 85 c0 test %eax,%eax 107acf: 74 09 je 107ada 107ad1: 83 ec 0c sub $0xc,%esp 107ad4: 56 push %esi 107ad5: ff d0 call *%eax 107ad7: 83 c4 10 add $0x10,%esp return result; } 107ada: 89 d8 mov %ebx,%eax 107adc: 8d 65 f4 lea -0xc(%ebp),%esp 107adf: 5b pop %ebx 107ae0: 5e pop %esi 107ae1: 5f pop %edi 107ae2: c9 leave 107ae3: c3 ret =============================================================================== 00107b4e : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 107b4e: 55 push %ebp 107b4f: 89 e5 mov %esp,%ebp 107b51: 57 push %edi 107b52: 56 push %esi 107b53: 53 push %ebx 107b54: 83 ec 4c sub $0x4c,%esp 107b57: 8b 75 08 mov 0x8(%ebp),%esi /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 107b5a: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 107b5e: 77 15 ja 107b75 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 107b60: 83 ec 0c sub $0xc,%esp 107b63: ff 75 10 pushl 0x10(%ebp) 107b66: e8 d4 76 00 00 call 10f23f 107b6b: 89 45 b0 mov %eax,-0x50(%ebp) if ( !mount_h ) 107b6e: 83 c4 10 add $0x10,%esp 107b71: 85 c0 test %eax,%eax 107b73: 75 10 jne 107b85 rtems_set_errno_and_return_minus_one( EINVAL ); 107b75: e8 9a ae 00 00 call 112a14 <__errno> 107b7a: c7 00 16 00 00 00 movl $0x16,(%eax) 107b80: e9 45 02 00 00 jmp 107dca { 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; 107b85: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 107b89: 0f 95 45 bb setne -0x45(%ebp) const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 107b8d: c7 45 bc 10 01 12 00 movl $0x120110,-0x44(%ebp) 107b94: 80 7d bb 00 cmpb $0x0,-0x45(%ebp) 107b98: 74 06 je 107ba0 107b9a: 8b 45 0c mov 0xc(%ebp),%eax 107b9d: 89 45 bc mov %eax,-0x44(%ebp) size_t filesystemtype_size = strlen( filesystemtype ) + 1; 107ba0: 83 ca ff or $0xffffffff,%edx 107ba3: 31 c0 xor %eax,%eax 107ba5: 89 d1 mov %edx,%ecx 107ba7: 8b 7d 10 mov 0x10(%ebp),%edi 107baa: f2 ae repnz scas %es:(%edi),%al 107bac: f7 d1 not %ecx 107bae: 89 4d c0 mov %ecx,-0x40(%ebp) size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 107bb1: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 107bb8: 85 f6 test %esi,%esi 107bba: 74 0b je 107bc7 107bbc: 89 d1 mov %edx,%ecx 107bbe: 89 f7 mov %esi,%edi 107bc0: f2 ae repnz scas %es:(%edi),%al 107bc2: f7 d1 not %ecx 107bc4: 89 4d c4 mov %ecx,-0x3c(%ebp) size_t target_length = strlen( target ); 107bc7: 31 c0 xor %eax,%eax 107bc9: 83 c9 ff or $0xffffffff,%ecx 107bcc: 8b 7d bc mov -0x44(%ebp),%edi 107bcf: f2 ae repnz scas %es:(%edi),%al 107bd1: f7 d1 not %ecx 107bd3: 49 dec %ecx 107bd4: 89 4d b4 mov %ecx,-0x4c(%ebp) 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 ); 107bd7: 53 push %ebx 107bd8: 53 push %ebx 107bd9: 8b 55 c0 mov -0x40(%ebp),%edx 107bdc: 8d 44 11 75 lea 0x75(%ecx,%edx,1),%eax 107be0: 03 45 c4 add -0x3c(%ebp),%eax 107be3: 50 push %eax 107be4: 6a 01 push $0x1 107be6: e8 d1 f8 ff ff call 1074bc 107beb: 89 c3 mov %eax,%ebx if ( mt_entry != NULL ) { 107bed: 83 c4 10 add $0x10,%esp 107bf0: 85 c0 test %eax,%eax 107bf2: 74 62 je 107c56 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); 107bf4: 8d 78 74 lea 0x74(%eax),%edi strcpy( str, filesystemtype ); 107bf7: 52 push %edx 107bf8: 52 push %edx 107bf9: ff 75 10 pushl 0x10(%ebp) 107bfc: 57 push %edi 107bfd: e8 86 b9 00 00 call 113588 mt_entry->type = str; 107c02: 89 7b 6c mov %edi,0x6c(%ebx) str += filesystemtype_size; 107c05: 03 7d c0 add -0x40(%ebp),%edi if ( source_or_null != NULL ) { 107c08: 83 c4 10 add $0x10,%esp 107c0b: 85 f6 test %esi,%esi 107c0d: 74 12 je 107c21 strcpy( str, source_or_null ); 107c0f: 50 push %eax 107c10: 50 push %eax 107c11: 56 push %esi 107c12: 57 push %edi 107c13: e8 70 b9 00 00 call 113588 mt_entry->dev = str; 107c18: 89 7b 70 mov %edi,0x70(%ebx) str += source_size; 107c1b: 03 7d c4 add -0x3c(%ebp),%edi 107c1e: 83 c4 10 add $0x10,%esp } strcpy( str, target ); 107c21: 51 push %ecx 107c22: 51 push %ecx 107c23: ff 75 bc pushl -0x44(%ebp) 107c26: 57 push %edi 107c27: e8 5c b9 00 00 call 113588 mt_entry->target = str; 107c2c: 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; 107c2f: 89 5b 2c mov %ebx,0x2c(%ebx) mt_entry->options = options; 107c32: 8b 4d 14 mov 0x14(%ebp),%ecx 107c35: 89 4b 30 mov %ecx,0x30(%ebx) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 107c38: 8d 7b 38 lea 0x38(%ebx),%edi 107c3b: be 50 01 12 00 mov $0x120150,%esi 107c40: b9 0c 00 00 00 mov $0xc,%ecx 107c45: 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 ) { 107c47: 83 c4 10 add $0x10,%esp 107c4a: 80 7d bb 00 cmpb $0x0,-0x45(%ebp) 107c4e: 0f 84 bf 00 00 00 je 107d13 107c54: eb 10 jmp 107c66 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107c56: e8 b9 ad 00 00 call 112a14 <__errno> <== NOT EXECUTED 107c5b: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107c61: e9 64 01 00 00 jmp 107dca <== NOT EXECUTED * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 107c66: 83 ec 0c sub $0xc,%esp 107c69: 6a 01 push $0x1 107c6b: 8d 75 d4 lea -0x2c(%ebp),%esi 107c6e: 56 push %esi 107c6f: 6a 07 push $0x7 107c71: ff 75 b4 pushl -0x4c(%ebp) 107c74: ff 75 0c pushl 0xc(%ebp) 107c77: e8 b5 f9 ff ff call 107631 107c7c: 83 c4 20 add $0x20,%esp 107c7f: 40 inc %eax 107c80: 0f 84 16 01 00 00 je 107d9c <== NEVER TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 107c86: 8b 45 e0 mov -0x20(%ebp),%eax 107c89: 8b 40 10 mov 0x10(%eax),%eax 107c8c: 85 c0 test %eax,%eax 107c8e: 74 61 je 107cf1 <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 107c90: 83 ec 0c sub $0xc,%esp 107c93: 56 push %esi 107c94: ff d0 call *%eax 107c96: 83 c4 10 add $0x10,%esp 107c99: 48 dec %eax 107c9a: 74 10 je 107cac errno = ENOTDIR; 107c9c: e8 73 ad 00 00 call 112a14 <__errno> 107ca1: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 107ca7: e9 f2 00 00 00 jmp 107d9e /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 107cac: 52 push %edx 107cad: 52 push %edx 107cae: ff 75 d4 pushl -0x2c(%ebp) 107cb1: 68 e4 7a 10 00 push $0x107ae4 107cb6: e8 3a fe ff ff call 107af5 107cbb: 83 c4 10 add $0x10,%esp 107cbe: 84 c0 test %al,%al 107cc0: 74 10 je 107cd2 errno = EBUSY; 107cc2: e8 4d ad 00 00 call 112a14 <__errno> 107cc7: c7 00 10 00 00 00 movl $0x10,(%eax) goto cleanup_and_bail; 107ccd: e9 cc 00 00 00 jmp 107d9e * 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; 107cd2: 8b 45 d4 mov -0x2c(%ebp),%eax 107cd5: 89 43 08 mov %eax,0x8(%ebx) mt_entry->mt_point_node.handlers = loc.handlers; 107cd8: 8b 45 dc mov -0x24(%ebp),%eax 107cdb: 89 43 10 mov %eax,0x10(%ebx) mt_entry->mt_point_node.ops = loc.ops; 107cde: 8b 45 e0 mov -0x20(%ebp),%eax 107ce1: 89 43 14 mov %eax,0x14(%ebx) mt_entry->mt_point_node.mt_entry = loc.mt_entry; 107ce4: 8b 55 e4 mov -0x1c(%ebp),%edx 107ce7: 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 ){ 107cea: 8b 40 20 mov 0x20(%eax),%eax 107ced: 85 c0 test %eax,%eax 107cef: 75 10 jne 107d01 <== ALWAYS TAKEN errno = ENOTSUP; 107cf1: e8 1e ad 00 00 call 112a14 <__errno> <== NOT EXECUTED 107cf6: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 107cfc: e9 9d 00 00 00 jmp 107d9e <== NOT EXECUTED } if ( loc.ops->mount_h( mt_entry ) ) { 107d01: 83 ec 0c sub $0xc,%esp 107d04: 53 push %ebx 107d05: ff d0 call *%eax 107d07: 83 c4 10 add $0x10,%esp 107d0a: 85 c0 test %eax,%eax 107d0c: 74 20 je 107d2e <== ALWAYS TAKEN 107d0e: e9 8b 00 00 00 jmp 107d9e <== NOT EXECUTED 107d13: 31 f6 xor %esi,%esi 107d15: 81 3d 34 3f 12 00 38 cmpl $0x123f38,0x123f34 107d1c: 3f 12 00 107d1f: 74 0d je 107d2e <== ALWAYS TAKEN } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 107d21: e8 ee ac 00 00 call 112a14 <__errno> <== NOT EXECUTED 107d26: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 107d2c: eb 70 jmp 107d9e <== NOT EXECUTED * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 107d2e: 50 push %eax 107d2f: 50 push %eax 107d30: ff 75 18 pushl 0x18(%ebp) 107d33: 53 push %ebx 107d34: ff 55 b0 call *-0x50(%ebp) 107d37: 83 c4 10 add $0x10,%esp 107d3a: 85 c0 test %eax,%eax 107d3c: 74 15 je 107d53 <== ALWAYS TAKEN /* * Try to undo the mount operation */ if ( loc.ops->unmount_h ) { 107d3e: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 107d41: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 107d44: 85 c0 test %eax,%eax <== NOT EXECUTED 107d46: 74 56 je 107d9e <== NOT EXECUTED loc.ops->unmount_h( mt_entry ); 107d48: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d4b: 53 push %ebx <== NOT EXECUTED 107d4c: ff d0 call *%eax <== NOT EXECUTED 107d4e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107d51: eb 4b jmp 107d9e <== 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 ); 107d53: 57 push %edi 107d54: 6a 00 push $0x0 107d56: 6a 00 push $0x0 107d58: ff 35 c0 60 12 00 pushl 0x1260c0 107d5e: e8 95 28 00 00 call 10a5f8 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 107d63: 59 pop %ecx 107d64: 5e pop %esi 107d65: 53 push %ebx 107d66: 68 34 3f 12 00 push $0x123f34 107d6b: e8 c4 30 00 00 call 10ae34 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 107d70: 5a pop %edx 107d71: ff 35 c0 60 12 00 pushl 0x1260c0 107d77: e8 68 29 00 00 call 10a6e4 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 107d7c: 83 c4 10 add $0x10,%esp 107d7f: 31 c0 xor %eax,%eax 107d81: 80 7d bb 00 cmpb $0x0,-0x45(%ebp) 107d85: 75 46 jne 107dcd rtems_filesystem_root = mt_entry->mt_fs_root; 107d87: 8b 3d 54 3f 12 00 mov 0x123f54,%edi 107d8d: 83 c7 18 add $0x18,%edi 107d90: 8d 73 1c lea 0x1c(%ebx),%esi 107d93: b9 05 00 00 00 mov $0x5,%ecx 107d98: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 107d9a: eb 31 jmp 107dcd 107d9c: 31 f6 xor %esi,%esi return 0; cleanup_and_bail: free( mt_entry ); 107d9e: 83 ec 0c sub $0xc,%esp 107da1: 53 push %ebx 107da2: e8 f5 f8 ff ff call 10769c if ( loc_to_free ) 107da7: 83 c4 10 add $0x10,%esp 107daa: 85 f6 test %esi,%esi 107dac: 74 1c je 107dca <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); 107dae: 8b 46 0c mov 0xc(%esi),%eax 107db1: 85 c0 test %eax,%eax 107db3: 74 15 je 107dca <== NEVER TAKEN 107db5: 8b 40 1c mov 0x1c(%eax),%eax 107db8: 85 c0 test %eax,%eax 107dba: 74 0e je 107dca <== NEVER TAKEN 107dbc: 83 ec 0c sub $0xc,%esp 107dbf: 56 push %esi 107dc0: ff d0 call *%eax 107dc2: 83 c8 ff or $0xffffffff,%eax 107dc5: 83 c4 10 add $0x10,%esp 107dc8: eb 03 jmp 107dcd 107dca: 83 c8 ff or $0xffffffff,%eax return -1; } 107dcd: 8d 65 f4 lea -0xc(%ebp),%esp 107dd0: 5b pop %ebx 107dd1: 5e pop %esi 107dd2: 5f pop %edi 107dd3: c9 leave 107dd4: c3 ret =============================================================================== 00132938 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 132938: 55 push %ebp <== NOT EXECUTED 132939: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13293b: 57 push %edi <== NOT EXECUTED 13293c: 56 push %esi <== NOT EXECUTED 13293d: 53 push %ebx <== NOT EXECUTED 13293e: 81 ec cc 00 00 00 sub $0xcc,%esp <== NOT EXECUTED 132944: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 132947: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 13294a: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED 13294d: 89 85 44 ff ff ff mov %eax,-0xbc(%ebp) <== NOT EXECUTED fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 132953: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 132955: 89 85 40 ff ff ff mov %eax,-0xc0(%ebp) <== NOT EXECUTED fat_file_fd_t *fat_fd = NULL; 13295b: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED time_t time_ret = 0; uint16_t time_val = 0; 132962: 66 c7 45 e6 00 00 movw $0x0,-0x1a(%ebp) <== NOT EXECUTED uint16_t date = 0; 132968: 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; 13296e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED dir_pos->sname.ofs = 0; 132975: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 13297c: c7 45 d8 ff ff ff ff movl $0xffffffff,-0x28(%ebp) <== NOT EXECUTED dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 132983: 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); 13298a: 8d 75 b0 lea -0x50(%ebp),%esi <== NOT EXECUTED 13298d: 31 c0 xor %eax,%eax <== NOT EXECUTED 13298f: b9 08 00 00 00 mov $0x8,%ecx <== NOT EXECUTED 132994: 89 f7 mov %esi,%edi <== NOT EXECUTED 132996: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 132998: 8d 95 50 ff ff ff lea -0xb0(%ebp),%edx <== NOT EXECUTED 13299e: b1 10 mov $0x10,%cl <== NOT EXECUTED 1329a0: 89 d7 mov %edx,%edi <== NOT EXECUTED 1329a2: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED name_type = msdos_long_to_short (name, name_len, 1329a4: 6a 0b push $0xb <== NOT EXECUTED 1329a6: 56 push %esi <== NOT EXECUTED 1329a7: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 1329aa: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1329ad: e8 14 1b 00 00 call 1344c6 <== NOT EXECUTED 1329b2: 89 85 3c ff ff ff mov %eax,-0xc4(%ebp) <== NOT EXECUTED MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 1329b8: c6 45 bc 00 movb $0x0,-0x44(%ebp) <== NOT EXECUTED /* set up last write date and time */ time_ret = time(NULL); 1329bc: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED 1329c3: e8 28 63 01 00 call 148cf0