=============================================================================== 0010fc78 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10fc78: 55 push %ebp 10fc79: 89 e5 mov %esp,%ebp 10fc7b: 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; 10fc7e: 8b 50 10 mov 0x10(%eax),%edx 10fc81: 8b 4a 34 mov 0x34(%edx),%ecx switch( node->type ) { 10fc84: 8b 10 mov (%eax),%edx 10fc86: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10fc8a: 77 12 ja 10fc9e <== NEVER TAKEN 10fc8c: 8b 52 4c mov 0x4c(%edx),%edx 10fc8f: ff 24 95 74 1c 12 00 jmp *0x121c74(,%edx,4) 10fc96: 66 90 xchg %ax,%ax case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10fc98: 8b 51 0c mov 0xc(%ecx),%edx 10fc9b: 89 50 08 mov %edx,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10fc9e: 31 c0 xor %eax,%eax 10fca0: c9 leave 10fca1: c3 ret 10fca2: 66 90 xchg %ax,%ax break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 10fca4: 8b 51 08 mov 0x8(%ecx),%edx 10fca7: 89 50 08 mov %edx,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10fcaa: 31 c0 xor %eax,%eax 10fcac: c9 leave 10fcad: c3 ret 10fcae: 66 90 xchg %ax,%ax case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 10fcb0: c7 40 08 40 1e 12 00 movl $0x121e40,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10fcb7: 31 c0 xor %eax,%eax 10fcb9: c9 leave 10fcba: c3 ret 10fcbb: 90 nop break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 10fcbc: c7 40 08 00 1d 12 00 movl $0x121d00,0x8(%eax) break; } return 0; } 10fcc3: 31 c0 xor %eax,%eax 10fcc5: c9 leave 10fcc6: c3 ret 10fcc7: 90 nop switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10fcc8: c7 40 08 c0 1d 12 00 movl $0x121dc0,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10fccf: 31 c0 xor %eax,%eax 10fcd1: c9 leave 10fcd2: c3 ret =============================================================================== 0010facc : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 10facc: 55 push %ebp 10facd: 89 e5 mov %esp,%ebp 10facf: 53 push %ebx 10fad0: 83 ec 1c sub $0x1c,%esp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 10fad3: 6a 64 push $0x64 10fad5: 6a 01 push $0x1 10fad7: e8 f0 88 ff ff call 1083cc 10fadc: 89 c3 mov %eax,%ebx if ( !node ) 10fade: 83 c4 10 add $0x10,%esp 10fae1: 85 c0 test %eax,%eax 10fae3: 74 49 je 10fb2e <== NEVER TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 10fae5: 66 c7 40 34 01 00 movw $0x1,0x34(%eax) node->type = type; 10faeb: 8b 45 08 mov 0x8(%ebp),%eax 10faee: 89 43 4c mov %eax,0x4c(%ebx) strncpy( node->name, name, IMFS_NAME_MAX ); 10faf1: 51 push %ecx 10faf2: 6a 20 push $0x20 10faf4: ff 75 0c pushl 0xc(%ebp) 10faf7: 8d 43 0c lea 0xc(%ebx),%eax 10fafa: 50 push %eax 10fafb: e8 8c 4f 00 00 call 114a8c /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 10fb00: 8b 45 10 mov 0x10(%ebp),%eax 10fb03: 89 43 30 mov %eax,0x30(%ebx) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); #else node->st_uid = 0; 10fb06: 66 c7 43 3c 00 00 movw $0x0,0x3c(%ebx) node->st_gid = 0; 10fb0c: 66 c7 43 3e 00 00 movw $0x0,0x3e(%ebx) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 10fb12: 58 pop %eax 10fb13: 5a pop %edx 10fb14: 6a 00 push $0x0 10fb16: 8d 45 f0 lea -0x10(%ebp),%eax 10fb19: 50 push %eax 10fb1a: e8 41 8b ff ff call 108660 node->stat_atime = (time_t) tv.tv_sec; 10fb1f: 8b 45 f0 mov -0x10(%ebp),%eax 10fb22: 89 43 40 mov %eax,0x40(%ebx) node->stat_mtime = (time_t) tv.tv_sec; 10fb25: 89 43 44 mov %eax,0x44(%ebx) node->stat_ctime = (time_t) tv.tv_sec; 10fb28: 89 43 48 mov %eax,0x48(%ebx) return node; 10fb2b: 83 c4 10 add $0x10,%esp } 10fb2e: 89 d8 mov %ebx,%eax 10fb30: 8b 5d fc mov -0x4(%ebp),%ebx 10fb33: c9 leave 10fb34: c3 ret =============================================================================== 0010fb6c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10fb6c: 55 push %ebp 10fb6d: 89 e5 mov %esp,%ebp 10fb6f: 57 push %edi 10fb70: 56 push %esi 10fb71: 53 push %ebx 10fb72: 83 ec 1c sub $0x1c,%esp 10fb75: 8b 5d 08 mov 0x8(%ebp),%ebx 10fb78: 8b 75 0c mov 0xc(%ebp),%esi 10fb7b: 8b 7d 18 mov 0x18(%ebp),%edi IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 10fb7e: 85 db test %ebx,%ebx 10fb80: 75 0a jne 10fb8c <== ALWAYS TAKEN 10fb82: 31 c0 xor %eax,%eax node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 10fb84: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10fb87: 5b pop %ebx <== NOT EXECUTED 10fb88: 5e pop %esi <== NOT EXECUTED 10fb89: 5f pop %edi <== NOT EXECUTED 10fb8a: c9 leave <== NOT EXECUTED 10fb8b: c3 ret <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10fb8c: 50 push %eax 10fb8d: a1 24 50 12 00 mov 0x125024,%eax 10fb92: 8b 40 2c mov 0x2c(%eax),%eax 10fb95: f7 d0 not %eax 10fb97: 23 45 14 and 0x14(%ebp),%eax 10fb9a: 50 push %eax 10fb9b: ff 75 10 pushl 0x10(%ebp) 10fb9e: 56 push %esi 10fb9f: e8 28 ff ff ff call 10facc if ( !node ) 10fba4: 83 c4 10 add $0x10,%esp 10fba7: 85 c0 test %eax,%eax 10fba9: 74 d9 je 10fb84 <== NEVER TAKEN return NULL; /* * Set the type specific information */ switch (type) { 10fbab: 83 fe 07 cmp $0x7,%esi 10fbae: 76 18 jbe 10fbc8 <== ALWAYS TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 10fbb0: 68 ba 15 12 00 push $0x1215ba <== NOT EXECUTED 10fbb5: 68 60 1c 12 00 push $0x121c60 <== NOT EXECUTED 10fbba: 6a 5c push $0x5c <== NOT EXECUTED 10fbbc: 68 f0 1b 12 00 push $0x121bf0 <== NOT EXECUTED 10fbc1: e8 de 86 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED 10fbc6: 66 90 xchg %ax,%ax <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 10fbc8: ff 24 b5 40 1c 12 00 jmp *0x121c40(,%esi,4) 10fbcf: 90 nop case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 10fbd0: 8b 17 mov (%edi),%edx 10fbd2: 89 50 50 mov %edx,0x50(%eax) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 10fbd5: 8b 13 mov (%ebx),%edx fs_info = parent_loc->mt_entry->fs_info; 10fbd7: 8b 4b 10 mov 0x10(%ebx),%ecx 10fbda: 8b 59 34 mov 0x34(%ecx),%ebx node->Parent = parent; 10fbdd: 89 50 08 mov %edx,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10fbe0: 8b 4b 04 mov 0x4(%ebx),%ecx 10fbe3: 41 inc %ecx 10fbe4: 89 4b 04 mov %ecx,0x4(%ebx) 10fbe7: 89 48 38 mov %ecx,0x38(%eax) 10fbea: 83 ec 08 sub $0x8,%esp 10fbed: 50 push %eax 10fbee: 83 c2 50 add $0x50,%edx 10fbf1: 52 push %edx 10fbf2: 89 45 e4 mov %eax,-0x1c(%ebp) 10fbf5: e8 8e c9 ff ff call 10c588 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 10fbfa: 83 c4 10 add $0x10,%esp 10fbfd: 8b 45 e4 mov -0x1c(%ebp),%eax } 10fc00: 8d 65 f4 lea -0xc(%ebp),%esp 10fc03: 5b pop %ebx 10fc04: 5e pop %esi 10fc05: 5f pop %edi 10fc06: c9 leave 10fc07: c3 ret node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 10fc08: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED 10fc0f: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED node->info.linearfile.direct = 0; 10fc16: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 10fc1d: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10fc24: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10fc2b: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10fc32: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10fc39: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 10fc40: eb 93 jmp 10fbd5 10fc42: 66 90 xchg %ax,%ax case IMFS_FIFO: node->info.fifo.pipe = NULL; 10fc44: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) break; 10fc4b: eb 88 jmp 10fbd5 10fc4d: 8d 76 00 lea 0x0(%esi),%esi case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 10fc50: 8b 17 mov (%edi),%edx 10fc52: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 10fc55: 8b 57 04 mov 0x4(%edi),%edx 10fc58: 89 50 54 mov %edx,0x54(%eax) break; 10fc5b: e9 75 ff ff ff jmp 10fbd5 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10fc60: 8d 50 54 lea 0x54(%eax),%edx 10fc63: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10fc66: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10fc6d: 8d 50 50 lea 0x50(%eax),%edx 10fc70: 89 50 58 mov %edx,0x58(%eax) 10fc73: e9 5d ff ff ff jmp 10fbd5 =============================================================================== 0010fb38 : IMFS_jnode_t *IMFS_create_root_node(void) { 10fb38: 55 push %ebp 10fb39: 89 e5 mov %esp,%ebp 10fb3b: 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) ); 10fb3e: 68 ed 41 00 00 push $0x41ed 10fb43: 68 75 18 12 00 push $0x121875 10fb48: 6a 01 push $0x1 10fb4a: e8 7d ff ff ff call 10facc if ( !node ) 10fb4f: 83 c4 10 add $0x10,%esp 10fb52: 85 c0 test %eax,%eax 10fb54: 74 13 je 10fb69 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10fb56: 8d 50 54 lea 0x54(%eax),%edx 10fb59: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10fb5c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10fb63: 8d 50 50 lea 0x50(%eax),%edx 10fb66: 89 50 58 mov %edx,0x58(%eax) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 10fb69: c9 leave 10fb6a: c3 ret =============================================================================== 00109d64 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 109d64: 55 push %ebp 109d65: 89 e5 mov %esp,%ebp 109d67: 57 push %edi 109d68: 56 push %esi 109d69: 53 push %ebx 109d6a: 83 ec 1c sub $0x1c,%esp 109d6d: 8b 45 08 mov 0x8(%ebp),%eax 109d70: 8b 75 0c mov 0xc(%ebp),%esi rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 109d73: 85 c0 test %eax,%eax 109d75: 74 7a je 109df1 <== NEVER TAKEN assert( level >= 0 ); 109d77: 85 f6 test %esi,%esi 109d79: 0f 88 a4 00 00 00 js 109e23 <== NEVER TAKEN assert( the_directory->type == IMFS_DIRECTORY ); 109d7f: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 109d83: 0f 85 81 00 00 00 jne 109e0a <== NEVER TAKEN the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 109d89: 8b 78 50 mov 0x50(%eax),%edi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 109d8c: 83 c0 54 add $0x54,%eax 109d8f: 89 45 e4 mov %eax,-0x1c(%ebp) 109d92: 39 c7 cmp %eax,%edi 109d94: 74 41 je 109dd7 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 109d96: 8d 46 01 lea 0x1(%esi),%eax 109d99: 89 45 e0 mov %eax,-0x20(%ebp) for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 109d9c: 31 db xor %ebx,%ebx 109d9e: 66 90 xchg %ax,%ax for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 109da0: a1 e0 be 12 00 mov 0x12bee0,%eax 109da5: ff 70 08 pushl 0x8(%eax) 109da8: 6a 04 push $0x4 109daa: 6a 01 push $0x1 109dac: 68 15 6c 12 00 push $0x126c15 109db1: e8 ba e8 00 00 call 118670 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 109db6: 43 inc %ebx 109db7: 83 c4 10 add $0x10,%esp 109dba: 39 de cmp %ebx,%esi 109dbc: 7d e2 jge 109da0 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 109dbe: 83 ec 0c sub $0xc,%esp 109dc1: 57 push %edi 109dc2: e8 f5 fd ff ff call 109bbc if ( the_jnode->type == IMFS_DIRECTORY ) 109dc7: 83 c4 10 add $0x10,%esp 109dca: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 109dce: 74 10 je 109de0 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 109dd0: 8b 3f mov (%edi),%edi assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 109dd2: 3b 7d e4 cmp -0x1c(%ebp),%edi 109dd5: 75 c5 jne 109d9c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 109dd7: 8d 65 f4 lea -0xc(%ebp),%esp 109dda: 5b pop %ebx 109ddb: 5e pop %esi 109ddc: 5f pop %edi 109ddd: c9 leave 109dde: c3 ret 109ddf: 90 nop for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 109de0: 83 ec 08 sub $0x8,%esp 109de3: ff 75 e0 pushl -0x20(%ebp) 109de6: 57 push %edi 109de7: e8 78 ff ff ff call 109d64 109dec: 83 c4 10 add $0x10,%esp 109def: eb df jmp 109dd0 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 109df1: 68 fc 6b 12 00 push $0x126bfc <== NOT EXECUTED 109df6: 68 44 6d 12 00 push $0x126d44 <== NOT EXECUTED 109dfb: 68 84 00 00 00 push $0x84 <== NOT EXECUTED 109e00: 68 38 6c 12 00 push $0x126c38 <== NOT EXECUTED 109e05: e8 92 07 00 00 call 10a59c <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 109e0a: 68 88 6c 12 00 push $0x126c88 <== NOT EXECUTED 109e0f: 68 44 6d 12 00 push $0x126d44 <== NOT EXECUTED 109e14: 68 88 00 00 00 push $0x88 <== NOT EXECUTED 109e19: 68 38 6c 12 00 push $0x126c38 <== NOT EXECUTED 109e1e: e8 79 07 00 00 call 10a59c <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 109e23: 68 0a 6c 12 00 push $0x126c0a <== NOT EXECUTED 109e28: 68 44 6d 12 00 push $0x126d44 <== NOT EXECUTED 109e2d: 68 86 00 00 00 push $0x86 <== NOT EXECUTED 109e32: 68 38 6c 12 00 push $0x126c38 <== NOT EXECUTED 109e37: e8 60 07 00 00 call 10a59c <__assert_func> <== NOT EXECUTED =============================================================================== 0010fe08 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10fe08: 55 push %ebp 10fe09: 89 e5 mov %esp,%ebp 10fe0b: 57 push %edi 10fe0c: 56 push %esi 10fe0d: 53 push %ebx 10fe0e: 83 ec 4c sub $0x4c,%esp IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 10fe11: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10fe18: 0f 85 0b 03 00 00 jne 110129 <== NEVER TAKEN /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10fe1e: 8b 45 14 mov 0x14(%ebp),%eax 10fe21: 8b 38 mov (%eax),%edi 10fe23: 31 db xor %ebx,%ebx * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10fe25: 8d 55 e4 lea -0x1c(%ebp),%edx 10fe28: 52 push %edx 10fe29: 8d 4d c3 lea -0x3d(%ebp),%ecx 10fe2c: 51 push %ecx 10fe2d: ff 75 0c pushl 0xc(%ebp) 10fe30: 8b 45 08 mov 0x8(%ebp),%eax 10fe33: 01 d8 add %ebx,%eax 10fe35: 50 push %eax 10fe36: e8 39 0a 00 00 call 110874 10fe3b: 89 c6 mov %eax,%esi pathnamelen -= len; 10fe3d: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 10fe40: 8b 4d 14 mov 0x14(%ebp),%ecx 10fe43: 8b 01 mov (%ecx),%eax 10fe45: 83 c4 10 add $0x10,%esp 10fe48: 85 c0 test %eax,%eax 10fe4a: 0f 84 14 02 00 00 je 110064 <== NEVER TAKEN */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10fe50: 29 55 0c sub %edx,0xc(%ebp) i += len; 10fe53: 01 d3 add %edx,%ebx rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10fe55: 85 f6 test %esi,%esi 10fe57: 75 47 jne 10fea0 * 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 ) { 10fe59: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10fe5d: 0f 84 9d 01 00 00 je 110000 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10fe63: 83 ec 0c sub $0xc,%esp 10fe66: ff 75 14 pushl 0x14(%ebp) 10fe69: e8 0a fe ff ff call 10fc78 10fe6e: 89 c6 mov %eax,%esi 10fe70: 59 pop %ecx 10fe71: 5b pop %ebx /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 10fe72: ff 75 10 pushl 0x10(%ebp) 10fe75: ff 75 14 pushl 0x14(%ebp) 10fe78: e8 57 fe ff ff call 10fcd4 10fe7d: 83 c4 10 add $0x10,%esp 10fe80: 85 c0 test %eax,%eax 10fe82: 0f 85 d4 00 00 00 jne 10ff5c rtems_set_errno_and_return_minus_one( EACCES ); 10fe88: e8 b3 3f 00 00 call 113e40 <__errno> 10fe8d: c7 00 0d 00 00 00 movl $0xd,(%eax) 10fe93: be ff ff ff ff mov $0xffffffff,%esi 10fe98: e9 bf 00 00 00 jmp 10ff5c 10fe9d: 8d 76 00 lea 0x0(%esi),%esi /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 10fea0: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10fea4: 0f 84 be 00 00 00 je 10ff68 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10feaa: 89 c7 mov %eax,%edi switch( type ) { 10feac: 83 fe 03 cmp $0x3,%esi 10feaf: 74 1b je 10fecc 10feb1: 83 fe 04 cmp $0x4,%esi 10feb4: 0f 84 92 00 00 00 je 10ff4c 10feba: 83 fe 02 cmp $0x2,%esi 10febd: 74 59 je 10ff18 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10febf: 83 fe 04 cmp $0x4,%esi 10fec2: 0f 85 5d ff ff ff jne 10fe25 <== ALWAYS TAKEN 10fec8: eb 8f jmp 10fe59 <== NOT EXECUTED 10feca: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10fecc: 8b 40 4c mov 0x4c(%eax),%eax 10fecf: 83 f8 03 cmp $0x3,%eax 10fed2: 0f 84 68 01 00 00 je 110040 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 10fed8: 83 f8 04 cmp $0x4,%eax 10fedb: 0f 84 ef 01 00 00 je 1100d0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10fee1: 48 dec %eax 10fee2: 0f 85 d3 01 00 00 jne 1100bb /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 10fee8: 83 ec 08 sub $0x8,%esp 10feeb: 8d 45 c3 lea -0x3d(%ebp),%eax 10feee: 50 push %eax 10feef: 57 push %edi 10fef0: e8 ef 08 00 00 call 1107e4 10fef5: 89 c7 mov %eax,%edi if ( !node ) 10fef7: 83 c4 10 add $0x10,%esp 10fefa: 85 c0 test %eax,%eax 10fefc: 0f 84 62 01 00 00 je 110064 * 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 )) { 10ff02: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10ff06: 0f 84 80 00 00 00 je 10ff8c /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10ff0c: 8b 4d 14 mov 0x14(%ebp),%ecx 10ff0f: 89 39 mov %edi,(%ecx) break; 10ff11: e9 0f ff ff ff jmp 10fe25 10ff16: 66 90 xchg %ax,%ax case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10ff18: 8b 15 24 50 12 00 mov 0x125024,%edx 10ff1e: 39 42 18 cmp %eax,0x18(%edx) 10ff21: 0f 84 fe fe ff ff je 10fe25 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10ff27: 8b 4d 14 mov 0x14(%ebp),%ecx 10ff2a: 8b 51 10 mov 0x10(%ecx),%edx /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10ff2d: 39 42 1c cmp %eax,0x1c(%edx) 10ff30: 0f 84 bf 01 00 00 je 1100f5 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10ff36: 8b 78 08 mov 0x8(%eax),%edi 10ff39: 85 ff test %edi,%edi 10ff3b: 0f 84 23 01 00 00 je 110064 rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; } pathloc->node_access = node; 10ff41: 8b 45 14 mov 0x14(%ebp),%eax 10ff44: 89 38 mov %edi,(%eax) break; 10ff46: e9 da fe ff ff jmp 10fe25 10ff4b: 90 nop case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10ff4c: e8 ef 3e 00 00 call 113e40 <__errno> 10ff51: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10ff57: be ff ff ff ff mov $0xffffffff,%esi if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10ff5c: 89 f0 mov %esi,%eax 10ff5e: 8d 65 f4 lea -0xc(%ebp),%esp 10ff61: 5b pop %ebx 10ff62: 5e pop %esi 10ff63: 5f pop %edi 10ff64: c9 leave 10ff65: c3 ret 10ff66: 66 90 xchg %ax,%ax /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10ff68: 83 ec 08 sub $0x8,%esp 10ff6b: 6a 01 push $0x1 10ff6d: ff 75 14 pushl 0x14(%ebp) 10ff70: e8 5f fd ff ff call 10fcd4 10ff75: 83 c4 10 add $0x10,%esp 10ff78: 85 c0 test %eax,%eax 10ff7a: 0f 84 08 ff ff ff je 10fe88 10ff80: 8b 55 14 mov 0x14(%ebp),%edx 10ff83: 8b 02 mov (%edx),%eax 10ff85: e9 20 ff ff ff jmp 10feaa 10ff8a: 66 90 xchg %ax,%ax * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 10ff8c: 8b 70 5c mov 0x5c(%eax),%esi 10ff8f: 85 f6 test %esi,%esi 10ff91: 0f 84 75 ff ff ff je 10ff0c 10ff97: 8b 75 08 mov 0x8(%ebp),%esi 10ff9a: 01 de add %ebx,%esi 10ff9c: 89 45 b0 mov %eax,-0x50(%ebp) 10ff9f: 8b 7d 0c mov 0xc(%ebp),%edi 10ffa2: eb 15 jmp 10ffb9 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 10ffa4: 8a 06 mov (%esi),%al 10ffa6: 84 c0 test %al,%al 10ffa8: 0f 84 ce 00 00 00 je 11007c 10ffae: 46 inc %esi 10ffaf: 85 ff test %edi,%edi 10ffb1: 0f 84 f9 00 00 00 je 1100b0 <== NEVER TAKEN ++(*index); 10ffb7: 43 inc %ebx --(*len); 10ffb8: 4f dec %edi 10ffb9: 89 75 b4 mov %esi,-0x4c(%ebp) const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 10ffbc: 83 ec 0c sub $0xc,%esp 10ffbf: 0f be 06 movsbl (%esi),%eax 10ffc2: 50 push %eax 10ffc3: e8 e4 94 ff ff call 1094ac 10ffc8: 83 c4 10 add $0x10,%esp 10ffcb: 85 c0 test %eax,%eax 10ffcd: 75 d5 jne 10ffa4 10ffcf: 89 7d 0c mov %edi,0xc(%ebp) 10ffd2: 8b 7d b0 mov -0x50(%ebp),%edi 10ffd5: 8b 55 b4 mov -0x4c(%ebp),%edx 10ffd8: 8a 02 mov (%edx),%al * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 10ffda: 3c 2e cmp $0x2e,%al 10ffdc: 0f 85 a0 00 00 00 jne 110082 10ffe2: 8b 4d 08 mov 0x8(%ebp),%ecx 10ffe5: 80 7c 19 01 2e cmpb $0x2e,0x1(%ecx,%ebx,1) 10ffea: 0f 85 92 00 00 00 jne 110082 *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; 10fff0: 83 c3 02 add $0x2,%ebx pathnamelen -= 2; 10fff3: 83 6d 0c 02 subl $0x2,0xc(%ebp) node = node->Parent; 10fff7: 8b 7f 08 mov 0x8(%edi),%edi 10fffa: e9 0d ff ff ff jmp 10ff0c 10ffff: 90 nop * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { 110000: 8b 70 5c mov 0x5c(%eax),%esi 110003: 85 f6 test %esi,%esi 110005: 0f 84 58 fe ff ff je 10fe63 <== ALWAYS TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; 11000b: 83 c6 1c add $0x1c,%esi <== NOT EXECUTED 11000e: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 110013: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 110016: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 110018: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 11001b: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 11001e: 8b 41 0c mov 0xc(%ecx),%eax <== NOT EXECUTED 110021: 51 push %ecx <== NOT EXECUTED 110022: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 110025: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 110028: 01 d1 add %edx,%ecx <== NOT EXECUTED 11002a: 51 push %ecx <== NOT EXECUTED 11002b: 29 d3 sub %edx,%ebx <== NOT EXECUTED 11002d: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 110030: 01 da add %ebx,%edx <== NOT EXECUTED 110032: 52 push %edx <== NOT EXECUTED 110033: ff 10 call *(%eax) <== NOT EXECUTED 110035: 89 c6 mov %eax,%esi <== NOT EXECUTED 110037: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11003a: e9 1d ff ff ff jmp 10ff5c <== NOT EXECUTED 11003f: 90 nop <== NOT EXECUTED * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 110040: 83 ec 08 sub $0x8,%esp 110043: 6a 00 push $0x0 110045: ff 75 14 pushl 0x14(%ebp) 110048: e8 c3 fc ff ff call 10fd10 node = pathloc->node_access; 11004d: 8b 55 14 mov 0x14(%ebp),%edx 110050: 8b 3a mov (%edx),%edi if ( !node ) 110052: 83 c4 10 add $0x10,%esp 110055: 85 ff test %edi,%edi 110057: 74 62 je 1100bb <== NEVER TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 110059: 8b 47 4c mov 0x4c(%edi),%eax 11005c: e9 80 fe ff ff jmp 10fee1 110061: 8d 76 00 lea 0x0(%esi),%esi */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 110064: e8 d7 3d 00 00 call 113e40 <__errno> 110069: c7 00 02 00 00 00 movl $0x2,(%eax) 11006f: be ff ff ff ff mov $0xffffffff,%esi 110074: e9 e3 fe ff ff jmp 10ff5c 110079: 8d 76 00 lea 0x0(%esi),%esi 11007c: 89 7d 0c mov %edi,0xc(%ebp) 11007f: 8b 7d b0 mov -0x50(%ebp),%edi * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 110082: 8b 77 5c mov 0x5c(%edi),%esi 110085: 83 c6 1c add $0x1c,%esi 110088: b9 05 00 00 00 mov $0x5,%ecx 11008d: 8b 7d 14 mov 0x14(%ebp),%edi 110090: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i], 110092: 8b 55 14 mov 0x14(%ebp),%edx 110095: 8b 42 0c mov 0xc(%edx),%eax 110098: 52 push %edx 110099: ff 75 10 pushl 0x10(%ebp) 11009c: ff 75 0c pushl 0xc(%ebp) 11009f: ff 75 b4 pushl -0x4c(%ebp) 1100a2: ff 10 call *(%eax) 1100a4: 89 c6 mov %eax,%esi 1100a6: 83 c4 10 add $0x10,%esp 1100a9: e9 ae fe ff ff jmp 10ff5c 1100ae: 66 90 xchg %ax,%ax 1100b0: 89 7d 0c mov %edi,0xc(%ebp) <== NOT EXECUTED 1100b3: 8b 7d b0 mov -0x50(%ebp),%edi <== NOT EXECUTED 1100b6: e9 1f ff ff ff jmp 10ffda <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 1100bb: e8 80 3d 00 00 call 113e40 <__errno> 1100c0: c7 00 14 00 00 00 movl $0x14,(%eax) 1100c6: be ff ff ff ff mov $0xffffffff,%esi 1100cb: e9 8c fe ff ff jmp 10ff5c if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 1100d0: 83 ec 08 sub $0x8,%esp 1100d3: 6a 00 push $0x0 1100d5: ff 75 14 pushl 0x14(%ebp) 1100d8: e8 8f fc ff ff call 10fd6c 1100dd: 89 c6 mov %eax,%esi node = pathloc->node_access; 1100df: 8b 4d 14 mov 0x14(%ebp),%ecx 1100e2: 8b 39 mov (%ecx),%edi if ( result == -1 ) 1100e4: 83 c4 10 add $0x10,%esp 1100e7: 83 f8 ff cmp $0xffffffff,%eax 1100ea: 0f 85 69 ff ff ff jne 110059 <== ALWAYS TAKEN 1100f0: e9 67 fe ff ff jmp 10ff5c <== NOT EXECUTED */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 1100f5: 8d 72 08 lea 0x8(%edx),%esi 1100f8: b9 05 00 00 00 mov $0x5,%ecx 1100fd: 8b 7d 14 mov 0x14(%ebp),%edi 110100: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 110102: 8b 55 e4 mov -0x1c(%ebp),%edx 110105: 8b 4d 14 mov 0x14(%ebp),%ecx 110108: 8b 41 0c mov 0xc(%ecx),%eax 11010b: 51 push %ecx 11010c: ff 75 10 pushl 0x10(%ebp) 11010f: 8b 4d 0c mov 0xc(%ebp),%ecx 110112: 01 d1 add %edx,%ecx 110114: 51 push %ecx 110115: 29 d3 sub %edx,%ebx 110117: 8b 55 08 mov 0x8(%ebp),%edx 11011a: 01 da add %ebx,%edx 11011c: 52 push %edx 11011d: ff 10 call *(%eax) 11011f: 89 c6 mov %eax,%esi 110121: 83 c4 10 add $0x10,%esp 110124: e9 33 fe ff ff jmp 10ff5c char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); 110129: 68 ba 15 12 00 push $0x1215ba <== NOT EXECUTED 11012e: 68 94 1c 12 00 push $0x121c94 <== NOT EXECUTED 110133: 68 08 02 00 00 push $0x208 <== NOT EXECUTED 110138: 68 a4 1c 12 00 push $0x121ca4 <== NOT EXECUTED 11013d: e8 62 81 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 001101f0 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 1101f0: 55 push %ebp 1101f1: 89 e5 mov %esp,%ebp 1101f3: 57 push %edi 1101f4: 56 push %esi 1101f5: 53 push %ebx 1101f6: 83 ec 4c sub $0x4c,%esp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 1101f9: 8b 45 0c mov 0xc(%ebp),%eax 1101fc: 8b 18 mov (%eax),%ebx /* * Get the path length. */ pathlen = strlen( path ); 1101fe: 31 c0 xor %eax,%eax 110200: b9 ff ff ff ff mov $0xffffffff,%ecx 110205: 8b 7d 08 mov 0x8(%ebp),%edi 110208: f2 ae repnz scas %es:(%edi),%al 11020a: f7 d1 not %ecx 11020c: 8d 71 ff lea -0x1(%ecx),%esi 11020f: 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 ); 110216: 8d 55 e4 lea -0x1c(%ebp),%edx 110219: 52 push %edx 11021a: 8d 4d c3 lea -0x3d(%ebp),%ecx 11021d: 51 push %ecx 11021e: 56 push %esi 11021f: 8b 45 08 mov 0x8(%ebp),%eax 110222: 03 45 b4 add -0x4c(%ebp),%eax 110225: 50 push %eax 110226: e8 49 06 00 00 call 110874 11022b: 89 c7 mov %eax,%edi pathlen -= len; 11022d: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 110230: 8b 4d 0c mov 0xc(%ebp),%ecx 110233: 8b 01 mov (%ecx),%eax 110235: 83 c4 10 add $0x10,%esp 110238: 85 c0 test %eax,%eax 11023a: 0f 84 e8 00 00 00 je 110328 <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 110240: 85 ff test %edi,%edi 110242: 75 1c jne 110260 pathloc->node_access = node; } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 110244: e8 f7 3b 00 00 call 113e40 <__errno> 110249: c7 00 11 00 00 00 movl $0x11,(%eax) 11024f: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 110254: 89 d8 mov %ebx,%eax 110256: 8d 65 f4 lea -0xc(%ebp),%esp 110259: 5b pop %ebx 11025a: 5e pop %esi 11025b: 5f pop %edi 11025c: c9 leave 11025d: c3 ret 11025e: 66 90 xchg %ax,%ax /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 110260: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 110264: 0f 84 d6 00 00 00 je 110340 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 11026a: 29 d6 sub %edx,%esi i += len; 11026c: 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; 11026f: 89 c3 mov %eax,%ebx switch( type ) { 110271: 83 ff 02 cmp $0x2,%edi 110274: 0f 84 86 00 00 00 je 110300 11027a: 76 24 jbe 1102a0 11027c: 83 ff 03 cmp $0x3,%edi 11027f: 74 2b je 1102ac 110281: 83 ff 04 cmp $0x4,%edi 110284: 75 90 jne 110216 <== NEVER TAKEN case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 110286: e8 b5 3b 00 00 call 113e40 <__errno> 11028b: c7 00 5b 00 00 00 movl $0x5b,(%eax) 110291: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 110296: 89 d8 mov %ebx,%eax 110298: 8d 65 f4 lea -0xc(%ebp),%esp 11029b: 5b pop %ebx 11029c: 5e pop %esi 11029d: 5f pop %edi 11029e: c9 leave 11029f: c3 ret if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 1102a0: 85 ff test %edi,%edi 1102a2: 74 a0 je 110244 <== NEVER TAKEN 1102a4: e9 6d ff ff ff jmp 110216 1102a9: 8d 76 00 lea 0x0(%esi),%esi case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 1102ac: 8b 40 4c mov 0x4c(%eax),%eax 1102af: 83 f8 03 cmp $0x3,%eax 1102b2: 0f 84 fd 01 00 00 je 1104b5 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 1102b8: 83 f8 04 cmp $0x4,%eax 1102bb: 0f 84 13 02 00 00 je 1104d4 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 1102c1: 85 db test %ebx,%ebx 1102c3: 0f 84 d7 01 00 00 je 1104a0 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 1102c9: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 1102cd: 0f 85 cd 01 00 00 jne 1104a0 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 1102d3: 83 ec 08 sub $0x8,%esp 1102d6: 8d 4d c3 lea -0x3d(%ebp),%ecx 1102d9: 51 push %ecx 1102da: 53 push %ebx 1102db: e8 04 05 00 00 call 1107e4 1102e0: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 1102e2: 83 c4 10 add $0x10,%esp 1102e5: 85 c0 test %eax,%eax 1102e7: 0f 84 eb 00 00 00 je 1103d8 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 1102ed: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 1102f1: 74 75 je 110368 i += 2; pathlen -= 2; node = node->Parent; } pathloc->node_access = node; 1102f3: 8b 4d 0c mov 0xc(%ebp),%ecx 1102f6: 89 19 mov %ebx,(%ecx) 1102f8: e9 19 ff ff ff jmp 110216 1102fd: 8d 76 00 lea 0x0(%esi),%esi case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 110300: 8b 15 24 50 12 00 mov 0x125024,%edx 110306: 39 42 18 cmp %eax,0x18(%edx) 110309: 0f 84 07 ff ff ff je 110216 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 11030f: 8b 4d 0c mov 0xc(%ebp),%ecx 110312: 8b 51 10 mov 0x10(%ecx),%edx 110315: 39 42 1c cmp %eax,0x1c(%edx) 110318: 0f 84 d5 01 00 00 je 1104f3 } else { *pathloc = pathloc->mt_entry->mt_point_node; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 11031e: 8b 58 08 mov 0x8(%eax),%ebx 110321: 85 db test %ebx,%ebx 110323: 75 ce jne 1102f3 110325: 8d 76 00 lea 0x0(%esi),%esi * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 110328: e8 13 3b 00 00 call 113e40 <__errno> 11032d: c7 00 02 00 00 00 movl $0x2,(%eax) 110333: bb ff ff ff ff mov $0xffffffff,%ebx 110338: e9 17 ff ff ff jmp 110254 11033d: 8d 76 00 lea 0x0(%esi),%esi * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 110340: 83 ec 08 sub $0x8,%esp 110343: 6a 01 push $0x1 110345: ff 75 0c pushl 0xc(%ebp) 110348: 89 55 a8 mov %edx,-0x58(%ebp) 11034b: e8 84 f9 ff ff call 10fcd4 110350: 83 c4 10 add $0x10,%esp 110353: 85 c0 test %eax,%eax 110355: 8b 55 a8 mov -0x58(%ebp),%edx 110358: 0f 84 2d 01 00 00 je 11048b 11035e: 8b 4d 0c mov 0xc(%ebp),%ecx 110361: 8b 01 mov (%ecx),%eax 110363: e9 02 ff ff ff jmp 11026a */ if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 110368: 8b 40 5c mov 0x5c(%eax),%eax 11036b: 85 c0 test %eax,%eax 11036d: 74 84 je 1102f3 11036f: 8b 7d 08 mov 0x8(%ebp),%edi 110372: 03 7d b4 add -0x4c(%ebp),%edi 110375: 89 5d ac mov %ebx,-0x54(%ebp) 110378: 8b 5d b4 mov -0x4c(%ebp),%ebx 11037b: eb 18 jmp 110395 11037d: 8d 76 00 lea 0x0(%esi),%esi const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 110380: 8a 07 mov (%edi),%al 110382: 84 c0 test %al,%al 110384: 0f 84 92 00 00 00 je 11041c <== NEVER TAKEN 11038a: 47 inc %edi 11038b: 85 f6 test %esi,%esi 11038d: 0f 84 b9 00 00 00 je 11044c <== NEVER TAKEN ++(*index); 110393: 43 inc %ebx --(*len); 110394: 4e dec %esi 110395: 89 7d b0 mov %edi,-0x50(%ebp) const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 110398: 83 ec 0c sub $0xc,%esp 11039b: 0f be 07 movsbl (%edi),%eax 11039e: 50 push %eax 11039f: e8 08 91 ff ff call 1094ac 1103a4: 83 c4 10 add $0x10,%esp 1103a7: 85 c0 test %eax,%eax 1103a9: 75 d5 jne 110380 1103ab: 89 5d b4 mov %ebx,-0x4c(%ebp) 1103ae: 8b 5d ac mov -0x54(%ebp),%ebx 1103b1: 8b 55 b0 mov -0x50(%ebp),%edx 1103b4: 8a 02 mov (%edx),%al if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { 1103b6: 3c 2e cmp $0x2e,%al 1103b8: 75 65 jne 11041f 1103ba: 8b 45 08 mov 0x8(%ebp),%eax 1103bd: 8b 4d b4 mov -0x4c(%ebp),%ecx 1103c0: 80 7c 08 01 2e cmpb $0x2e,0x1(%eax,%ecx,1) 1103c5: 75 58 jne 11041f <== NEVER TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; 1103c7: 83 45 b4 02 addl $0x2,-0x4c(%ebp) pathlen -= 2; 1103cb: 83 ee 02 sub $0x2,%esi node = node->Parent; 1103ce: 8b 5b 08 mov 0x8(%ebx),%ebx 1103d1: e9 1d ff ff ff jmp 1102f3 1103d6: 66 90 xchg %ax,%ax case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 1103d8: 8b 45 b4 mov -0x4c(%ebp),%eax 1103db: 2b 45 e4 sub -0x1c(%ebp),%eax 1103de: 03 45 08 add 0x8(%ebp),%eax 1103e1: 8b 55 10 mov 0x10(%ebp),%edx 1103e4: 89 02 mov %eax,(%edx) /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 1103e6: 8b 55 08 mov 0x8(%ebp),%edx 1103e9: 8b 4d b4 mov -0x4c(%ebp),%ecx 1103ec: 8a 04 0a mov (%edx,%ecx,1),%al 1103ef: 84 c0 test %al,%al 1103f1: 74 65 je 110458 1103f3: 89 d3 mov %edx,%ebx 1103f5: 01 cb add %ecx,%ebx 1103f7: eb 0b jmp 110404 1103f9: 8d 76 00 lea 0x0(%esi),%esi 1103fc: 8a 43 01 mov 0x1(%ebx),%al 1103ff: 43 inc %ebx 110400: 84 c0 test %al,%al 110402: 74 54 je 110458 if ( !IMFS_is_separator( path[ i ] ) ) 110404: 83 ec 0c sub $0xc,%esp 110407: 0f be c0 movsbl %al,%eax 11040a: 50 push %eax 11040b: e8 9c 90 ff ff call 1094ac 110410: 83 c4 10 add $0x10,%esp 110413: 85 c0 test %eax,%eax 110415: 75 e5 jne 1103fc 110417: e9 0c ff ff ff jmp 110328 11041c: 8b 5d ac mov -0x54(%ebp),%ebx <== NOT EXECUTED done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 11041f: 8b 73 5c mov 0x5c(%ebx),%esi 110422: 83 c6 1c add $0x1c,%esi 110425: b9 05 00 00 00 mov $0x5,%ecx 11042a: 8b 7d 0c mov 0xc(%ebp),%edi 11042d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i], 11042f: 57 push %edi 110430: 8b 55 0c mov 0xc(%ebp),%edx 110433: 8b 42 0c mov 0xc(%edx),%eax 110436: ff 75 10 pushl 0x10(%ebp) 110439: 52 push %edx 11043a: ff 75 b0 pushl -0x50(%ebp) 11043d: ff 50 04 call *0x4(%eax) 110440: 89 c3 mov %eax,%ebx 110442: 83 c4 10 add $0x10,%esp 110445: e9 0a fe ff ff jmp 110254 11044a: 66 90 xchg %ax,%ax 11044c: 89 5d b4 mov %ebx,-0x4c(%ebp) <== NOT EXECUTED 11044f: 8b 5d ac mov -0x54(%ebp),%ebx <== NOT EXECUTED 110452: e9 5f ff ff ff jmp 1103b6 <== NOT EXECUTED 110457: 90 nop <== NOT EXECUTED /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 110458: 83 ec 0c sub $0xc,%esp 11045b: ff 75 0c pushl 0xc(%ebp) 11045e: e8 15 f8 ff ff call 10fc78 110463: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; 110465: 8b 4d 0c mov 0xc(%ebp),%ecx 110468: 8b 01 mov (%ecx),%eax 11046a: 83 c4 10 add $0x10,%esp 11046d: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 110471: 75 2d jne 1104a0 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 110473: 83 ec 08 sub $0x8,%esp 110476: 6a 03 push $0x3 110478: ff 75 0c pushl 0xc(%ebp) 11047b: e8 54 f8 ff ff call 10fcd4 110480: 83 c4 10 add $0x10,%esp 110483: 85 c0 test %eax,%eax 110485: 0f 85 c9 fd ff ff jne 110254 rtems_set_errno_and_return_minus_one( EACCES ); 11048b: e8 b0 39 00 00 call 113e40 <__errno> 110490: c7 00 0d 00 00 00 movl $0xd,(%eax) 110496: bb ff ff ff ff mov $0xffffffff,%ebx 11049b: e9 b4 fd ff ff jmp 110254 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 1104a0: e8 9b 39 00 00 call 113e40 <__errno> 1104a5: c7 00 14 00 00 00 movl $0x14,(%eax) 1104ab: bb ff ff ff ff mov $0xffffffff,%ebx 1104b0: e9 9f fd ff ff jmp 110254 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 1104b5: 83 ec 08 sub $0x8,%esp 1104b8: 6a 00 push $0x0 1104ba: ff 75 0c pushl 0xc(%ebp) 1104bd: e8 82 fc ff ff call 110144 if ( result == -1 ) 1104c2: 83 c4 10 add $0x10,%esp 1104c5: 83 f8 ff cmp $0xffffffff,%eax 1104c8: 74 58 je 110522 <== NEVER TAKEN 1104ca: 8b 45 0c mov 0xc(%ebp),%eax 1104cd: 8b 18 mov (%eax),%ebx 1104cf: e9 ed fd ff ff jmp 1102c1 return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 1104d4: 83 ec 08 sub $0x8,%esp 1104d7: 6a 00 push $0x0 1104d9: ff 75 0c pushl 0xc(%ebp) 1104dc: e8 63 fc ff ff call 110144 if ( result == -1 ) 1104e1: 83 c4 10 add $0x10,%esp 1104e4: 83 f8 ff cmp $0xffffffff,%eax 1104e7: 74 39 je 110522 <== NEVER TAKEN 1104e9: 8b 55 0c mov 0xc(%ebp),%edx 1104ec: 8b 1a mov (%edx),%ebx 1104ee: e9 ce fd ff ff jmp 1102c1 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 1104f3: 8d 72 08 lea 0x8(%edx),%esi 1104f6: b9 05 00 00 00 mov $0x5,%ecx 1104fb: 8b 7d 0c mov 0xc(%ebp),%edi 1104fe: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 110500: 52 push %edx 110501: 8b 55 0c mov 0xc(%ebp),%edx 110504: 8b 42 0c mov 0xc(%edx),%eax 110507: ff 75 10 pushl 0x10(%ebp) 11050a: 52 push %edx 11050b: 8b 55 b4 mov -0x4c(%ebp),%edx 11050e: 2b 55 e4 sub -0x1c(%ebp),%edx 110511: 03 55 08 add 0x8(%ebp),%edx 110514: 52 push %edx 110515: ff 50 04 call *0x4(%eax) 110518: 89 c3 mov %eax,%ebx 11051a: 83 c4 10 add $0x10,%esp 11051d: e9 32 fd ff ff jmp 110254 110522: 89 c3 mov %eax,%ebx <== NOT EXECUTED 110524: e9 2b fd ff ff jmp 110254 <== NOT EXECUTED =============================================================================== 0010fd10 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10fd10: 55 push %ebp 10fd11: 89 e5 mov %esp,%ebp 10fd13: 53 push %ebx 10fd14: 83 ec 04 sub $0x4,%esp 10fd17: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10fd1a: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10fd1c: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10fd20: 75 3c jne 10fd5e <== NEVER TAKEN /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10fd22: 8b 40 50 mov 0x50(%eax),%eax 10fd25: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10fd27: 83 ec 0c sub $0xc,%esp 10fd2a: 53 push %ebx 10fd2b: e8 48 ff ff ff call 10fc78 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10fd30: 58 pop %eax 10fd31: 5a pop %edx 10fd32: ff 75 0c pushl 0xc(%ebp) 10fd35: 53 push %ebx 10fd36: e8 99 ff ff ff call 10fcd4 10fd3b: 83 c4 10 add $0x10,%esp 10fd3e: 85 c0 test %eax,%eax 10fd40: 74 0a je 10fd4c <== NEVER TAKEN 10fd42: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10fd44: 8b 5d fc mov -0x4(%ebp),%ebx 10fd47: c9 leave 10fd48: c3 ret 10fd49: 8d 76 00 lea 0x0(%esi),%esi /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10fd4c: e8 ef 40 00 00 call 113e40 <__errno> <== NOT EXECUTED 10fd51: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10fd57: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10fd5c: eb e6 jmp 10fd44 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 10fd5e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fd61: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10fd66: e8 89 c5 ff ff call 10c2f4 <== NOT EXECUTED =============================================================================== 00110144 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 110144: 55 push %ebp 110145: 89 e5 mov %esp,%ebp 110147: 57 push %edi 110148: 56 push %esi 110149: 53 push %ebx 11014a: 83 ec 0c sub $0xc,%esp 11014d: 8b 75 08 mov 0x8(%ebp),%esi 110150: 8b 7d 0c mov 0xc(%ebp),%edi 110153: 8b 15 24 50 12 00 mov 0x125024,%edx 110159: eb 0e jmp 110169 11015b: 90 nop */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 11015c: 83 f8 04 cmp $0x4,%eax 11015f: 74 53 je 1101b4 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 110161: 83 e8 03 sub $0x3,%eax 110164: 83 f8 01 cmp $0x1,%eax 110167: 77 3a ja 1101a3 <== ALWAYS TAKEN { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 110169: 8b 1e mov (%esi),%ebx /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 11016b: 8b 42 30 mov 0x30(%edx),%eax 11016e: 40 inc %eax 11016f: 66 89 42 30 mov %ax,0x30(%edx) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 110173: 66 83 f8 05 cmp $0x5,%ax 110177: 77 57 ja 1101d0 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 110179: 8b 43 4c mov 0x4c(%ebx),%eax 11017c: 83 f8 03 cmp $0x3,%eax 11017f: 75 db jne 11015c result = IMFS_evaluate_hard_link( node, flags ); 110181: 83 ec 08 sub $0x8,%esp 110184: 57 push %edi 110185: 56 push %esi 110186: e8 85 fb ff ff call 10fd10 11018b: 83 c4 10 add $0x10,%esp else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 11018e: 85 c0 test %eax,%eax 110190: 75 33 jne 1101c5 <== NEVER TAKEN 110192: 8b 43 4c mov 0x4c(%ebx),%eax 110195: 8b 15 24 50 12 00 mov 0x125024,%edx 11019b: 83 e8 03 sub $0x3,%eax 11019e: 83 f8 01 cmp $0x1,%eax 1101a1: 76 c6 jbe 110169 <== ALWAYS TAKEN 1101a3: 31 c0 xor %eax,%eax /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 1101a5: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) return result; } 1101ab: 8d 65 f4 lea -0xc(%ebp),%esp 1101ae: 5b pop %ebx 1101af: 5e pop %esi 1101b0: 5f pop %edi 1101b1: c9 leave 1101b2: c3 ret 1101b3: 90 nop if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 1101b4: 83 ec 08 sub $0x8,%esp 1101b7: 57 push %edi 1101b8: 56 push %esi 1101b9: e8 ae fb ff ff call 10fd6c 1101be: 83 c4 10 add $0x10,%esp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 1101c1: 85 c0 test %eax,%eax 1101c3: 74 cd je 110192 1101c5: 8b 15 24 50 12 00 mov 0x125024,%edx 1101cb: eb d8 jmp 1101a5 1101cd: 8d 76 00 lea 0x0(%esi),%esi * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; 1101d0: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) rtems_set_errno_and_return_minus_one( ELOOP ); 1101d6: e8 65 3c 00 00 call 113e40 <__errno> 1101db: c7 00 5c 00 00 00 movl $0x5c,(%eax) 1101e1: b8 ff ff ff ff mov $0xffffffff,%eax */ rtems_filesystem_link_counts = 0; return result; } 1101e6: 8d 65 f4 lea -0xc(%ebp),%esp 1101e9: 5b pop %ebx 1101ea: 5e pop %esi 1101eb: 5f pop %edi 1101ec: c9 leave 1101ed: c3 ret =============================================================================== 0010fcd4 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10fcd4: 55 push %ebp 10fcd5: 89 e5 mov %esp,%ebp 10fcd7: 83 ec 08 sub $0x8,%esp 10fcda: 8b 45 0c mov 0xc(%ebp),%eax uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 10fcdd: a9 f8 ff ff ff test $0xfffffff8,%eax 10fce2: 75 18 jne 10fcfc <== NEVER TAKEN /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10fce4: c1 e0 06 shl $0x6,%eax 10fce7: 8b 55 08 mov 0x8(%ebp),%edx 10fcea: 8b 12 mov (%edx),%edx 10fcec: 8b 52 30 mov 0x30(%edx),%edx 10fcef: 21 c2 and %eax,%edx 10fcf1: 39 d0 cmp %edx,%eax 10fcf3: 0f 94 c0 sete %al 10fcf6: 0f b6 c0 movzbl %al,%eax return 1; return 0; } 10fcf9: c9 leave 10fcfa: c3 ret 10fcfb: 90 nop gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 10fcfc: e8 3f 41 00 00 call 113e40 <__errno> <== NOT EXECUTED 10fd01: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10fd07: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 10fd0c: c9 leave <== NOT EXECUTED 10fd0d: c3 ret <== NOT EXECUTED =============================================================================== 0010fd6c : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10fd6c: 55 push %ebp 10fd6d: 89 e5 mov %esp,%ebp 10fd6f: 57 push %edi 10fd70: 56 push %esi 10fd71: 53 push %ebx 10fd72: 83 ec 1c sub $0x1c,%esp 10fd75: 8b 5d 08 mov 0x8(%ebp),%ebx 10fd78: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode = node->node_access; 10fd7b: 8b 3b mov (%ebx),%edi /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10fd7d: 83 7f 4c 04 cmpl $0x4,0x4c(%edi) 10fd81: 75 78 jne 10fdfb <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 10fd83: 8b 47 08 mov 0x8(%edi),%eax 10fd86: 85 c0 test %eax,%eax 10fd88: 74 64 je 10fdee <== NEVER TAKEN /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 10fd8a: 89 03 mov %eax,(%ebx) rtems_filesystem_get_sym_start_loc( 10fd8c: 52 push %edx 10fd8d: 53 push %ebx 10fd8e: 8d 45 e4 lea -0x1c(%ebp),%eax 10fd91: 50 push %eax 10fd92: ff 77 50 pushl 0x50(%edi) 10fd95: e8 26 13 00 00 call 1110c0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10fd9a: 8b 57 50 mov 0x50(%edi),%edx 10fd9d: 03 55 e4 add -0x1c(%ebp),%edx 10fda0: 31 c0 xor %eax,%eax 10fda2: b9 ff ff ff ff mov $0xffffffff,%ecx 10fda7: 89 d7 mov %edx,%edi 10fda9: f2 ae repnz scas %es:(%edi),%al 10fdab: f7 d1 not %ecx 10fdad: 49 dec %ecx 10fdae: 53 push %ebx 10fdaf: 56 push %esi 10fdb0: 51 push %ecx 10fdb1: 52 push %edx 10fdb2: e8 51 00 00 00 call 10fe08 10fdb7: 89 c7 mov %eax,%edi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10fdb9: 83 c4 14 add $0x14,%esp 10fdbc: 53 push %ebx 10fdbd: e8 b6 fe ff ff call 10fc78 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10fdc2: 59 pop %ecx 10fdc3: 58 pop %eax 10fdc4: 56 push %esi 10fdc5: 53 push %ebx 10fdc6: e8 09 ff ff ff call 10fcd4 10fdcb: 83 c4 10 add $0x10,%esp 10fdce: 85 c0 test %eax,%eax 10fdd0: 74 0a je 10fddc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10fdd2: 89 f8 mov %edi,%eax 10fdd4: 8d 65 f4 lea -0xc(%ebp),%esp 10fdd7: 5b pop %ebx 10fdd8: 5e pop %esi 10fdd9: 5f pop %edi 10fdda: c9 leave 10fddb: c3 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10fddc: e8 5f 40 00 00 call 113e40 <__errno> <== NOT EXECUTED 10fde1: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10fde7: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED 10fdec: eb e4 jmp 10fdd2 <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 10fdee: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fdf1: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 10fdf6: e8 f9 c4 ff ff call 10c2f4 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 10fdfb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fdfe: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10fe03: e8 ec c4 ff ff call 10c2f4 <== NOT EXECUTED =============================================================================== 001106a0 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 1106a0: 55 push %ebp <== NOT EXECUTED 1106a1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1106a3: 57 push %edi <== NOT EXECUTED 1106a4: 56 push %esi <== NOT EXECUTED 1106a5: 53 push %ebx <== NOT EXECUTED 1106a6: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 1106a9: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 1106ac: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 1106af: 53 push %ebx <== NOT EXECUTED 1106b0: 8d 47 50 lea 0x50(%edi),%eax <== NOT EXECUTED 1106b3: 50 push %eax <== NOT EXECUTED 1106b4: e8 eb ee ff ff call 10f5a4 <== NOT EXECUTED 1106b9: 89 c6 mov %eax,%esi <== NOT EXECUTED if (! err) { 1106bb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1106be: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 1106c1: 74 0d je 1106d0 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err); 1106c3: 7c 37 jl 1106fc <== NOT EXECUTED } 1106c5: 89 f0 mov %esi,%eax <== NOT EXECUTED 1106c7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1106ca: 5b pop %ebx <== NOT EXECUTED 1106cb: 5e pop %esi <== NOT EXECUTED 1106cc: 5f pop %edi <== NOT EXECUTED 1106cd: c9 leave <== NOT EXECUTED 1106ce: c3 ret <== NOT EXECUTED 1106cf: 90 nop <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 1106d0: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 1106d7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1106da: 57 push %edi <== NOT EXECUTED 1106db: e8 64 05 00 00 call 110c44 <== NOT EXECUTED 1106e0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1106e3: 85 c0 test %eax,%eax <== NOT EXECUTED 1106e5: 75 de jne 1106c5 <== NOT EXECUTED 1106e7: 66 83 7f 34 00 cmpw $0x0,0x34(%edi) <== NOT EXECUTED 1106ec: 75 d7 jne 1106c5 <== NOT EXECUTED free(jnode); 1106ee: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1106f1: 57 push %edi <== NOT EXECUTED 1106f2: e8 ed 7e ff ff call 1085e4 <== NOT EXECUTED 1106f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1106fa: eb c9 jmp 1106c5 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 1106fc: e8 3f 37 00 00 call 113e40 <__errno> <== NOT EXECUTED 110701: f7 de neg %esi <== NOT EXECUTED 110703: 89 30 mov %esi,(%eax) <== NOT EXECUTED 110705: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 11070a: eb b9 jmp 1106c5 <== NOT EXECUTED =============================================================================== 00110570 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 110570: 55 push %ebp <== NOT EXECUTED 110571: 89 e5 mov %esp,%ebp <== NOT EXECUTED 110573: 53 push %ebx <== NOT EXECUTED 110574: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 110577: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 11057a: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 11057d: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED int err; if (command == FIONBIO) { 110580: 81 fa 7e 66 04 80 cmp $0x8004667e,%edx <== NOT EXECUTED 110586: 74 1c je 1105a4 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 110588: 50 push %eax <== NOT EXECUTED 110589: 51 push %ecx <== NOT EXECUTED 11058a: 52 push %edx <== NOT EXECUTED 11058b: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 11058e: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 110591: e8 0a ec ff ff call 10f1a0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 110596: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110599: 85 c0 test %eax,%eax <== NOT EXECUTED 11059b: 78 3e js 1105db <== NOT EXECUTED } 11059d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1105a0: c9 leave <== NOT EXECUTED 1105a1: c3 ret <== NOT EXECUTED 1105a2: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 1105a4: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1105a6: 74 20 je 1105c8 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 1105a8: 8b 11 mov (%ecx),%edx <== NOT EXECUTED 1105aa: 85 d2 test %edx,%edx <== NOT EXECUTED 1105ac: 74 0e je 1105bc <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 1105ae: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED 1105b2: 31 c0 xor %eax,%eax <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 1105b4: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1105b7: c9 leave <== NOT EXECUTED 1105b8: c3 ret <== NOT EXECUTED 1105b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 1105bc: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED 1105c0: 31 c0 xor %eax,%eax <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 1105c2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1105c5: c9 leave <== NOT EXECUTED 1105c6: c3 ret <== NOT EXECUTED 1105c7: 90 nop <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 1105c8: bb 0e 00 00 00 mov $0xe,%ebx <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 1105cd: e8 6e 38 00 00 call 113e40 <__errno> <== NOT EXECUTED 1105d2: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 1105d4: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1105d9: eb c2 jmp 11059d <== NOT EXECUTED 1105db: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1105dd: f7 db neg %ebx <== NOT EXECUTED 1105df: eb ec jmp 1105cd <== NOT EXECUTED =============================================================================== 0011052c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 11052c: 55 push %ebp <== NOT EXECUTED 11052d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11052f: 53 push %ebx <== NOT EXECUTED 110530: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 110533: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 110536: 50 push %eax <== NOT EXECUTED 110537: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 11053a: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 11053d: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 110540: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 110543: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 110546: e8 f5 eb ff ff call 10f140 <== NOT EXECUTED 11054b: 89 c3 mov %eax,%ebx <== NOT EXECUTED 11054d: 99 cltd <== NOT EXECUTED IMFS_FIFO_RETURN(err); 11054e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 110551: 85 d2 test %edx,%edx <== NOT EXECUTED 110553: 78 05 js 11055a <== NOT EXECUTED } 110555: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 110558: c9 leave <== NOT EXECUTED 110559: c3 ret <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 11055a: e8 e1 38 00 00 call 113e40 <__errno> <== NOT EXECUTED 11055f: f7 db neg %ebx <== NOT EXECUTED 110561: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 110563: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110568: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 11056d: eb e6 jmp 110555 <== NOT EXECUTED =============================================================================== 0011070c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 11070c: 55 push %ebp 11070d: 89 e5 mov %esp,%ebp 11070f: 53 push %ebx 110710: 83 ec 0c sub $0xc,%esp 110713: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 110716: 50 push %eax 110717: 8b 40 38 mov 0x38(%eax),%eax 11071a: 83 c0 50 add $0x50,%eax 11071d: 50 push %eax 11071e: e8 95 ef ff ff call 10f6b8 110723: 89 c3 mov %eax,%ebx IMFS_FIFO_RETURN(err); 110725: 83 c4 10 add $0x10,%esp 110728: 85 c0 test %eax,%eax 11072a: 78 07 js 110733 <== ALWAYS TAKEN } 11072c: 89 d8 mov %ebx,%eax 11072e: 8b 5d fc mov -0x4(%ebp),%ebx 110731: c9 leave 110732: c3 ret ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); 110733: e8 08 37 00 00 call 113e40 <__errno> 110738: f7 db neg %ebx 11073a: 89 18 mov %ebx,(%eax) 11073c: bb ff ff ff ff mov $0xffffffff,%ebx 110741: eb e9 jmp 11072c =============================================================================== 00110644 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 110644: 55 push %ebp <== NOT EXECUTED 110645: 89 e5 mov %esp,%ebp <== NOT EXECUTED 110647: 56 push %esi <== NOT EXECUTED 110648: 53 push %ebx <== NOT EXECUTED 110649: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 11064c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 11064f: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 110652: 50 push %eax <== NOT EXECUTED 110653: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 110656: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 110659: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 11065c: e8 83 ed ff ff call 10f3e4 <== NOT EXECUTED 110661: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) 110663: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110666: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 110669: 7e 21 jle 11068c <== NOT EXECUTED IMFS_update_atime(jnode); 11066b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11066e: 6a 00 push $0x0 <== NOT EXECUTED 110670: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 110673: 50 push %eax <== NOT EXECUTED 110674: e8 e7 7f ff ff call 108660 <== NOT EXECUTED 110679: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 11067c: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED 11067f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 110682: 89 d8 mov %ebx,%eax <== NOT EXECUTED 110684: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 110687: 5b pop %ebx <== NOT EXECUTED 110688: 5e pop %esi <== NOT EXECUTED 110689: c9 leave <== NOT EXECUTED 11068a: c3 ret <== NOT EXECUTED 11068b: 90 nop <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 11068c: 74 f4 je 110682 <== NOT EXECUTED 11068e: e8 ad 37 00 00 call 113e40 <__errno> <== NOT EXECUTED 110693: f7 db neg %ebx <== NOT EXECUTED 110695: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 110697: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 11069c: eb e4 jmp 110682 <== NOT EXECUTED =============================================================================== 001105e4 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 1105e4: 55 push %ebp <== NOT EXECUTED 1105e5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1105e7: 56 push %esi <== NOT EXECUTED 1105e8: 53 push %ebx <== NOT EXECUTED 1105e9: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 1105ec: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 1105ef: 8b 58 38 mov 0x38(%eax),%ebx <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 1105f2: 50 push %eax <== NOT EXECUTED 1105f3: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1105f6: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 1105f9: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 1105fc: e8 ff eb ff ff call 10f200 <== NOT EXECUTED 110601: 89 c6 mov %eax,%esi <== NOT EXECUTED if (err > 0) { 110603: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110606: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 110609: 7e 25 jle 110630 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 11060b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11060e: 6a 00 push $0x0 <== NOT EXECUTED 110610: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 110613: 50 push %eax <== NOT EXECUTED 110614: e8 47 80 ff ff call 108660 <== NOT EXECUTED 110619: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 11061c: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED 11061f: 89 43 48 mov %eax,0x48(%ebx) <== NOT EXECUTED 110622: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 110625: 89 f0 mov %esi,%eax <== NOT EXECUTED 110627: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 11062a: 5b pop %ebx <== NOT EXECUTED 11062b: 5e pop %esi <== NOT EXECUTED 11062c: c9 leave <== NOT EXECUTED 11062d: c3 ret <== NOT EXECUTED 11062e: 66 90 xchg %ax,%ax <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 110630: 74 f3 je 110625 <== NOT EXECUTED 110632: e8 09 38 00 00 call 113e40 <__errno> <== NOT EXECUTED 110637: f7 de neg %esi <== NOT EXECUTED 110639: 89 30 mov %esi,(%eax) <== NOT EXECUTED 11063b: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 110640: eb e3 jmp 110625 <== NOT EXECUTED =============================================================================== 001107e4 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 1107e4: 55 push %ebp 1107e5: 89 e5 mov %esp,%ebp 1107e7: 57 push %edi 1107e8: 56 push %esi 1107e9: 53 push %ebx 1107ea: 83 ec 0c sub $0xc,%esp 1107ed: 8b 45 08 mov 0x8(%ebp),%eax 1107f0: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 1107f3: 85 c0 test %eax,%eax 1107f5: 74 67 je 11085e <== NEVER TAKEN if ( !name ) 1107f7: 85 db test %ebx,%ebx 1107f9: 74 2d je 110828 <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 1107fb: bf 97 1d 12 00 mov $0x121d97,%edi 110800: b9 02 00 00 00 mov $0x2,%ecx 110805: 89 de mov %ebx,%esi 110807: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 110809: 74 13 je 11081e <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 11080b: bf 99 1d 12 00 mov $0x121d99,%edi 110810: b9 03 00 00 00 mov $0x3,%ecx 110815: 89 de mov %ebx,%esi 110817: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 110819: 75 19 jne 110834 <== ALWAYS TAKEN return directory->Parent; 11081b: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 11081e: 8d 65 f4 lea -0xc(%ebp),%esp 110821: 5b pop %ebx 110822: 5e pop %esi 110823: 5f pop %edi 110824: c9 leave 110825: c3 ret 110826: 66 90 xchg %ax,%ax if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 110828: 31 c0 xor %eax,%eax if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 11082a: 8d 65 f4 lea -0xc(%ebp),%esp 11082d: 5b pop %ebx 11082e: 5e pop %esi 11082f: 5f pop %edi 110830: c9 leave 110831: c3 ret 110832: 66 90 xchg %ax,%ax if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 110834: 8b 70 50 mov 0x50(%eax),%esi 110837: 8d 78 54 lea 0x54(%eax),%edi 11083a: 39 fe cmp %edi,%esi 11083c: 75 08 jne 110846 11083e: eb e8 jmp 110828 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 110840: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 110842: 39 fe cmp %edi,%esi 110844: 74 e2 je 110828 !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 ) ) 110846: 8d 46 0c lea 0xc(%esi),%eax 110849: 83 ec 08 sub $0x8,%esp 11084c: 50 push %eax 11084d: 53 push %ebx 11084e: e8 b5 40 00 00 call 114908 110853: 83 c4 10 add $0x10,%esp 110856: 85 c0 test %eax,%eax 110858: 75 e6 jne 110840 11085a: 89 f0 mov %esi,%eax 11085c: eb c0 jmp 11081e /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 11085e: 68 38 1d 12 00 push $0x121d38 <== NOT EXECUTED 110863: 68 9c 1d 12 00 push $0x121d9c <== NOT EXECUTED 110868: 6a 2a push $0x2a <== NOT EXECUTED 11086a: 68 44 1d 12 00 push $0x121d44 <== NOT EXECUTED 11086f: e8 30 7a ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 0011074c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 11074c: 55 push %ebp 11074d: 89 e5 mov %esp,%ebp 11074f: 57 push %edi 110750: 56 push %esi 110751: 53 push %ebx 110752: 83 ec 3c sub $0x3c,%esp 110755: 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; 110758: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 11075b: 8d 55 d4 lea -0x2c(%ebp),%edx 11075e: 89 55 c4 mov %edx,-0x3c(%ebp) 110761: 8d 70 1c lea 0x1c(%eax),%esi 110764: b9 05 00 00 00 mov $0x5,%ecx 110769: 89 d7 mov %edx,%edi 11076b: 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; 11076d: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; 110774: 8b 73 08 mov 0x8(%ebx),%esi loc.node_access = (void *)jnode; 110777: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 11077a: 83 ec 0c sub $0xc,%esp 11077d: 8d 45 d4 lea -0x2c(%ebp),%eax 110780: 50 push %eax 110781: e8 f2 f4 ff ff call 10fc78 if ( jnode->type != IMFS_DIRECTORY ) { 110786: 83 c4 10 add $0x10,%esp 110789: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 11078d: 75 2d jne 1107bc */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11078f: 8d 43 54 lea 0x54(%ebx),%eax 110792: 39 43 50 cmp %eax,0x50(%ebx) 110795: 74 3e je 1107d5 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 110797: 85 db test %ebx,%ebx 110799: 74 15 je 1107b0 if ( jnode->type == IMFS_DIRECTORY ) { 11079b: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 11079f: 75 d3 jne 110774 <== NEVER TAKEN 1107a1: 8d 43 54 lea 0x54(%ebx),%eax 1107a4: 39 43 50 cmp %eax,0x50(%ebx) 1107a7: 74 cb je 110774 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 1107a9: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 1107ac: 85 db test %ebx,%ebx 1107ae: 75 c4 jne 110774 <== ALWAYS TAKEN 1107b0: 31 c0 xor %eax,%eax return 0; } 1107b2: 8d 65 f4 lea -0xc(%ebp),%esp 1107b5: 5b pop %ebx 1107b6: 5e pop %esi 1107b7: 5f pop %edi 1107b8: c9 leave 1107b9: c3 ret 1107ba: 66 90 xchg %ax,%ax next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 1107bc: 83 ec 08 sub $0x8,%esp 1107bf: 8d 55 d4 lea -0x2c(%ebp),%edx 1107c2: 52 push %edx if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 1107c3: 6a 00 push $0x0 1107c5: e8 8a 78 ff ff call 108054 if (result != 0) 1107ca: 83 c4 10 add $0x10,%esp 1107cd: 85 c0 test %eax,%eax 1107cf: 75 0d jne 1107de <== NEVER TAKEN 1107d1: 89 f3 mov %esi,%ebx 1107d3: eb c2 jmp 110797 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 1107d5: 83 ec 08 sub $0x8,%esp 1107d8: 8d 45 d4 lea -0x2c(%ebp),%eax 1107db: 50 push %eax 1107dc: eb e5 jmp 1107c3 if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 1107de: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1107e1: eb cf jmp 1107b2 <== NOT EXECUTED =============================================================================== 00110874 : const char *path, int pathlen, char *token, int *token_len ) { 110874: 55 push %ebp 110875: 89 e5 mov %esp,%ebp 110877: 57 push %edi 110878: 56 push %esi 110879: 53 push %ebx 11087a: 83 ec 1c sub $0x1c,%esp 11087d: 8b 7d 08 mov 0x8(%ebp),%edi 110880: 8b 5d 10 mov 0x10(%ebp),%ebx register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 110883: 8a 17 mov (%edi),%dl 110885: 31 f6 xor %esi,%esi 110887: 89 7d e4 mov %edi,-0x1c(%ebp) 11088a: 89 df mov %ebx,%edi 11088c: 88 d3 mov %dl,%bl while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 11088e: eb 07 jmp 110897 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 110890: 46 inc %esi 110891: 8b 45 e4 mov -0x1c(%ebp),%eax 110894: 8a 1c 30 mov (%eax,%esi,1),%bl /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 110897: 83 ec 0c sub $0xc,%esp 11089a: 0f be c3 movsbl %bl,%eax 11089d: 50 push %eax 11089e: e8 09 8c ff ff call 1094ac 1108a3: 83 c4 10 add $0x10,%esp 1108a6: 85 c0 test %eax,%eax 1108a8: 75 1a jne 1108c4 1108aa: 3b 75 0c cmp 0xc(%ebp),%esi 1108ad: 7d 15 jge 1108c4 token[i] = c; 1108af: 88 1c 37 mov %bl,(%edi,%esi,1) if ( i == IMFS_NAME_MAX ) 1108b2: 83 fe 20 cmp $0x20,%esi 1108b5: 75 d9 jne 110890 1108b7: b8 04 00 00 00 mov $0x4,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 1108bc: 8d 65 f4 lea -0xc(%ebp),%esp 1108bf: 5b pop %ebx 1108c0: 5e pop %esi 1108c1: 5f pop %edi 1108c2: c9 leave 1108c3: c3 ret 1108c4: 88 da mov %bl,%dl 1108c6: 89 fb mov %edi,%ebx /* * Copy a seperator into token. */ if ( i == 0 ) { 1108c8: 85 f6 test %esi,%esi 1108ca: 75 14 jne 1108e0 token[i] = c; 1108cc: 88 17 mov %dl,(%edi) if ( (token[i] != '\0') && pathlen ) { 1108ce: 84 d2 test %dl,%dl 1108d0: 74 07 je 1108d9 1108d2: 8b 45 0c mov 0xc(%ebp),%eax 1108d5: 85 c0 test %eax,%eax 1108d7: 75 63 jne 11093c type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 1108d9: 31 c0 xor %eax,%eax 1108db: eb 68 jmp 110945 1108dd: 8d 76 00 lea 0x0(%esi),%esi i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 1108e0: 80 7c 37 ff 00 cmpb $0x0,-0x1(%edi,%esi,1) 1108e5: 74 04 je 1108eb <== NEVER TAKEN token[i] = '\0'; 1108e7: c6 04 37 00 movb $0x0,(%edi,%esi,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 1108eb: 8b 45 14 mov 0x14(%ebp),%eax 1108ee: 89 30 mov %esi,(%eax) * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 1108f0: bf b3 1d 12 00 mov $0x121db3,%edi 1108f5: b9 03 00 00 00 mov $0x3,%ecx 1108fa: 89 de mov %ebx,%esi 1108fc: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 1108fe: 75 10 jne 110910 110900: b8 02 00 00 00 mov $0x2,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 110905: 8d 65 f4 lea -0xc(%ebp),%esp 110908: 5b pop %ebx 110909: 5e pop %esi 11090a: 5f pop %edi 11090b: c9 leave 11090c: c3 ret 11090d: 8d 76 00 lea 0x0(%esi),%esi */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 110910: bf b4 1d 12 00 mov $0x121db4,%edi 110915: b9 02 00 00 00 mov $0x2,%ecx 11091a: 89 de mov %ebx,%esi 11091c: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 11091e: 0f 97 c0 seta %al 110921: 0f 92 c2 setb %dl 110924: 28 d0 sub %dl,%al 110926: 0f be c0 movsbl %al,%eax 110929: 83 f8 01 cmp $0x1,%eax 11092c: 19 c0 sbb %eax,%eax 11092e: 83 e0 fe and $0xfffffffe,%eax 110931: 83 c0 03 add $0x3,%eax type = IMFS_CURRENT_DIR; } return type; } 110934: 8d 65 f4 lea -0xc(%ebp),%esp 110937: 5b pop %ebx 110938: 5e pop %esi 110939: 5f pop %edi 11093a: c9 leave 11093b: c3 ret */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 11093c: b8 01 00 00 00 mov $0x1,%eax 110941: 66 be 01 00 mov $0x1,%si /* * Set token_len to the number of characters copied. */ *token_len = i; 110945: 8b 55 14 mov 0x14(%ebp),%edx 110948: 89 32 mov %esi,(%edx) 11094a: e9 6d ff ff ff jmp 1108bc =============================================================================== 00107c7c : rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 107c7c: 55 push %ebp 107c7d: 89 e5 mov %esp,%ebp 107c7f: 57 push %edi 107c80: 56 push %esi 107c81: 53 push %ebx 107c82: 83 ec 0c sub $0xc,%esp 107c85: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 107c88: 8b 0d 50 31 12 00 mov 0x123150,%ecx int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 107c8e: 83 f9 10 cmp $0x10,%ecx 107c91: 74 18 je 107cab <== NEVER TAKEN 107c93: 31 d2 xor %edx,%edx 107c95: b8 20 00 00 00 mov $0x20,%eax 107c9a: 39 c1 cmp %eax,%ecx 107c9c: 74 0d je 107cab 107c9e: d1 e0 shl %eax 107ca0: 42 inc %edx 107ca1: 83 fa 05 cmp $0x5,%edx 107ca4: 75 f4 jne 107c9a <== ALWAYS TAKEN 107ca6: b9 80 00 00 00 mov $0x80,%ecx <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 107cab: 89 0d 98 6e 12 00 mov %ecx,0x126e98 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 107cb1: e8 82 7e 00 00 call 10fb38 107cb6: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 107cb9: 8b 45 14 mov 0x14(%ebp),%eax 107cbc: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 107cbf: 8b 45 0c mov 0xc(%ebp),%eax 107cc2: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 107cc5: 8d 7b 38 lea 0x38(%ebx),%edi 107cc8: be c0 1b 12 00 mov $0x121bc0,%esi 107ccd: b9 0c 00 00 00 mov $0xc,%ecx 107cd2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 107cd4: 83 ec 08 sub $0x8,%esp 107cd7: 6a 10 push $0x10 107cd9: 6a 01 push $0x1 107cdb: e8 ec 06 00 00 call 1083cc if ( !fs_info ) { 107ce0: 83 c4 10 add $0x10,%esp 107ce3: 85 c0 test %eax,%eax 107ce5: 74 3e je 107d25 <== NEVER TAKEN free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 107ce7: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 107cea: 8b 15 9c 6e 12 00 mov 0x126e9c,%edx 107cf0: 89 10 mov %edx,(%eax) 107cf2: 42 inc %edx 107cf3: 89 15 9c 6e 12 00 mov %edx,0x126e9c fs_info->ino_count = 1; 107cf9: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 107d00: 8b 55 10 mov 0x10(%ebp),%edx 107d03: 89 50 08 mov %edx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 107d06: 8b 55 14 mov 0x14(%ebp),%edx 107d09: 89 50 0c mov %edx,0xc(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 107d0c: 8b 43 1c mov 0x1c(%ebx),%eax 107d0f: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 107d16: e8 31 74 00 00 call 10f14c 107d1b: 31 c0 xor %eax,%eax return 0; } 107d1d: 8d 65 f4 lea -0xc(%ebp),%esp 107d20: 5b pop %ebx 107d21: 5e pop %esi 107d22: 5f pop %edi 107d23: c9 leave 107d24: c3 ret /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 107d25: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d28: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED 107d2b: e8 b4 08 00 00 call 1085e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 107d30: e8 0b c1 00 00 call 113e40 <__errno> <== NOT EXECUTED 107d35: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107d3b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107d40: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107d43: eb d8 jmp 107d1d <== NOT EXECUTED =============================================================================== 00107d48 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 107d48: 55 push %ebp 107d49: 89 e5 mov %esp,%ebp 107d4b: 57 push %edi 107d4c: 53 push %ebx 107d4d: 83 ec 50 sub $0x50,%esp 107d50: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 107d53: 8b 45 08 mov 0x8(%ebp),%eax 107d56: 8b 00 mov (%eax),%eax 107d58: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 107d5b: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 107d60: 77 66 ja 107dc8 rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 107d62: 31 c0 xor %eax,%eax 107d64: b9 ff ff ff ff mov $0xffffffff,%ecx 107d69: 89 d7 mov %edx,%edi 107d6b: f2 ae repnz scas %es:(%edi),%al 107d6d: f7 d1 not %ecx 107d6f: 49 dec %ecx 107d70: 8d 45 f4 lea -0xc(%ebp),%eax 107d73: 50 push %eax 107d74: 8d 5d b7 lea -0x49(%ebp),%ebx 107d77: 53 push %ebx 107d78: 51 push %ecx 107d79: 52 push %edx 107d7a: e8 f5 8a 00 00 call 110874 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107d7f: 8d 45 d8 lea -0x28(%ebp),%eax 107d82: 89 04 24 mov %eax,(%esp) 107d85: 68 ff a1 00 00 push $0xa1ff 107d8a: 53 push %ebx 107d8b: 6a 03 push $0x3 107d8d: ff 75 0c pushl 0xc(%ebp) 107d90: e8 d7 7d 00 00 call 10fb6c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 107d95: 83 c4 20 add $0x20,%esp 107d98: 85 c0 test %eax,%eax 107d9a: 74 3e je 107dda <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 107d9c: 8b 45 d8 mov -0x28(%ebp),%eax 107d9f: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 107da3: 83 ec 08 sub $0x8,%esp 107da6: 6a 00 push $0x0 107da8: 8d 45 ec lea -0x14(%ebp),%eax 107dab: 50 push %eax 107dac: e8 af 08 00 00 call 108660 107db1: 8b 55 ec mov -0x14(%ebp),%edx 107db4: 8b 45 d8 mov -0x28(%ebp),%eax 107db7: 89 50 48 mov %edx,0x48(%eax) 107dba: 31 c0 xor %eax,%eax return 0; 107dbc: 83 c4 10 add $0x10,%esp } 107dbf: 8d 65 f8 lea -0x8(%ebp),%esp 107dc2: 5b pop %ebx 107dc3: 5f pop %edi 107dc4: c9 leave 107dc5: c3 ret 107dc6: 66 90 xchg %ax,%ax /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); 107dc8: e8 73 c0 00 00 call 113e40 <__errno> 107dcd: c7 00 1f 00 00 00 movl $0x1f,(%eax) 107dd3: b8 ff ff ff ff mov $0xffffffff,%eax 107dd8: eb e5 jmp 107dbf ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107dda: e8 61 c0 00 00 call 113e40 <__errno> <== NOT EXECUTED 107ddf: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107de5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107dea: eb d3 jmp 107dbf <== NOT EXECUTED =============================================================================== 00112664 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 112664: 55 push %ebp 112665: 89 e5 mov %esp,%ebp 112667: 53 push %ebx 112668: 83 ec 04 sub $0x4,%esp 11266b: 8b 45 08 mov 0x8(%ebp),%eax block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 11266e: 85 c0 test %eax,%eax 112670: 74 50 je 1126c2 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 112672: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 112676: 75 31 jne 1126a9 <== NEVER TAKEN if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 112678: 52 push %edx 112679: 6a 01 push $0x1 11267b: ff 75 0c pushl 0xc(%ebp) 11267e: 50 push %eax 11267f: e8 b8 fa ff ff call 11213c 112684: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 112686: 83 c4 10 add $0x10,%esp 112689: 8b 00 mov (%eax),%eax 11268b: 85 c0 test %eax,%eax 11268d: 74 09 je 112698 #endif memory = memfile_alloc_block(); if ( !memory ) return 1; *block_entry_ptr = memory; 11268f: 31 c0 xor %eax,%eax return 0; } 112691: 8b 5d fc mov -0x4(%ebp),%ebx 112694: c9 leave 112695: c3 ret 112696: 66 90 xchg %ax,%ax #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 112698: e8 7b fa ff ff call 112118 if ( !memory ) 11269d: 85 c0 test %eax,%eax 11269f: 74 04 je 1126a5 <== NEVER TAKEN return 1; *block_entry_ptr = memory; 1126a1: 89 03 mov %eax,(%ebx) 1126a3: eb ea jmp 11268f fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 1126a5: b0 01 mov $0x1,%al <== NOT EXECUTED 1126a7: eb e8 jmp 112691 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1126a9: 68 fc 1f 12 00 push $0x121ffc <== NOT EXECUTED 1126ae: 68 fb 20 12 00 push $0x1220fb <== NOT EXECUTED 1126b3: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED 1126b8: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 1126bd: e8 e2 5b ff ff call 1082a4 <__assert_func> <== NOT EXECUTED ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 1126c2: 68 80 1f 12 00 push $0x121f80 <== NOT EXECUTED 1126c7: 68 fb 20 12 00 push $0x1220fb <== NOT EXECUTED 1126cc: 68 69 01 00 00 push $0x169 <== NOT EXECUTED 1126d1: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 1126d6: e8 c9 5b ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 001126dc : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 1126dc: 55 push %ebp 1126dd: 89 e5 mov %esp,%ebp 1126df: 57 push %edi 1126e0: 56 push %esi 1126e1: 53 push %ebx 1126e2: 83 ec 2c sub $0x2c,%esp 1126e5: 8b 5d 08 mov 0x8(%ebp),%ebx 1126e8: 8b 45 0c mov 0xc(%ebp),%eax 1126eb: 8b 55 10 mov 0x10(%ebp),%edx 1126ee: 89 45 d8 mov %eax,-0x28(%ebp) 1126f1: 89 55 dc mov %edx,-0x24(%ebp) /* * Perform internal consistency checks */ assert( the_jnode ); 1126f4: 85 db test %ebx,%ebx 1126f6: 0f 84 29 01 00 00 je 112825 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1126fc: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 112700: 0f 85 06 01 00 00 jne 11280c <== NEVER TAKEN if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 112706: a1 98 6e 12 00 mov 0x126e98,%eax 11270b: 89 c1 mov %eax,%ecx 11270d: c1 e9 02 shr $0x2,%ecx 112710: 8d 51 01 lea 0x1(%ecx),%edx 112713: 0f af d1 imul %ecx,%edx 112716: 42 inc %edx 112717: 0f af d1 imul %ecx,%edx 11271a: 4a dec %edx 11271b: 0f af d0 imul %eax,%edx 11271e: 31 c9 xor %ecx,%ecx 112720: 3b 4d dc cmp -0x24(%ebp),%ecx 112723: 7f 1c jg 112741 <== NEVER TAKEN 112725: 7d 15 jge 11273c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 112727: e8 14 17 00 00 call 113e40 <__errno> <== NOT EXECUTED 11272c: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 112732: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 112737: e9 9e 00 00 00 jmp 1127da <== NOT EXECUTED assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 11273c: 3b 55 d8 cmp -0x28(%ebp),%edx 11273f: 76 e6 jbe 112727 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 112741: 8b 53 50 mov 0x50(%ebx),%edx 112744: 8b 4b 54 mov 0x54(%ebx),%ecx 112747: 89 55 e0 mov %edx,-0x20(%ebp) 11274a: 89 4d e4 mov %ecx,-0x1c(%ebp) 11274d: 39 4d dc cmp %ecx,-0x24(%ebp) 112750: 0f 8e 8e 00 00 00 jle 1127e4 <== ALWAYS TAKEN /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 112756: 89 45 d0 mov %eax,-0x30(%ebp) 112759: 89 c1 mov %eax,%ecx 11275b: c1 f9 1f sar $0x1f,%ecx 11275e: 89 4d d4 mov %ecx,-0x2c(%ebp) 112761: ff 75 d4 pushl -0x2c(%ebp) 112764: ff 75 d0 pushl -0x30(%ebp) 112767: ff 75 dc pushl -0x24(%ebp) 11276a: ff 75 d8 pushl -0x28(%ebp) 11276d: e8 0a c7 00 00 call 11ee7c <__divdi3> 112772: 83 c4 10 add $0x10,%esp 112775: 89 c6 mov %eax,%esi old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 112777: ff 75 d4 pushl -0x2c(%ebp) 11277a: ff 75 d0 pushl -0x30(%ebp) 11277d: ff 75 e4 pushl -0x1c(%ebp) 112780: ff 75 e0 pushl -0x20(%ebp) 112783: e8 f4 c6 00 00 call 11ee7c <__divdi3> 112788: 83 c4 10 add $0x10,%esp 11278b: 89 45 e0 mov %eax,-0x20(%ebp) /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 11278e: 39 c6 cmp %eax,%esi 112790: 72 6a jb 1127fc <== NEVER TAKEN 112792: 89 c7 mov %eax,%edi 112794: eb 07 jmp 11279d 112796: 66 90 xchg %ax,%ax 112798: 47 inc %edi 112799: 39 fe cmp %edi,%esi 11279b: 72 5f jb 1127fc if ( IMFS_memfile_addblock( the_jnode, block ) ) { 11279d: 83 ec 08 sub $0x8,%esp 1127a0: 57 push %edi 1127a1: 53 push %ebx 1127a2: e8 bd fe ff ff call 112664 1127a7: 83 c4 10 add $0x10,%esp 1127aa: 85 c0 test %eax,%eax 1127ac: 74 ea je 112798 <== ALWAYS TAKEN for ( ; block>=old_blocks ; block-- ) { 1127ae: 39 7d e0 cmp %edi,-0x20(%ebp) <== NOT EXECUTED 1127b1: 77 17 ja 1127ca <== NOT EXECUTED 1127b3: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED 1127b6: 66 90 xchg %ax,%ax <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 1127b8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1127bb: 57 push %edi <== NOT EXECUTED 1127bc: 53 push %ebx <== NOT EXECUTED 1127bd: e8 d6 fb ff ff call 112398 <== 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-- ) { 1127c2: 4f dec %edi <== NOT EXECUTED 1127c3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1127c6: 39 fe cmp %edi,%esi <== NOT EXECUTED 1127c8: 76 ee jbe 1127b8 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 1127ca: e8 71 16 00 00 call 113e40 <__errno> <== NOT EXECUTED 1127cf: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 1127d5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 1127da: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1127dd: 5b pop %ebx <== NOT EXECUTED 1127de: 5e pop %esi <== NOT EXECUTED 1127df: 5f pop %edi <== NOT EXECUTED 1127e0: c9 leave <== NOT EXECUTED 1127e1: c3 ret <== NOT EXECUTED 1127e2: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 1127e4: 7c 09 jl 1127ef <== NEVER TAKEN 1127e6: 39 55 d8 cmp %edx,-0x28(%ebp) 1127e9: 0f 87 67 ff ff ff ja 112756 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 1127ef: 31 c0 xor %eax,%eax return 0; } 1127f1: 8d 65 f4 lea -0xc(%ebp),%esp 1127f4: 5b pop %ebx 1127f5: 5e pop %esi 1127f6: 5f pop %edi 1127f7: c9 leave 1127f8: c3 ret 1127f9: 8d 76 00 lea 0x0(%esi),%esi /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 1127fc: 8b 45 d8 mov -0x28(%ebp),%eax 1127ff: 8b 55 dc mov -0x24(%ebp),%edx 112802: 89 43 50 mov %eax,0x50(%ebx) 112805: 89 53 54 mov %edx,0x54(%ebx) 112808: 31 c0 xor %eax,%eax 11280a: eb e5 jmp 1127f1 assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 11280c: 68 fc 1f 12 00 push $0x121ffc <== NOT EXECUTED 112811: 68 11 21 12 00 push $0x122111 <== NOT EXECUTED 112816: 68 35 01 00 00 push $0x135 <== NOT EXECUTED 11281b: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112820: e8 7f 5a ff ff call 1082a4 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 112825: 68 80 1f 12 00 push $0x121f80 <== NOT EXECUTED 11282a: 68 11 21 12 00 push $0x122111 <== NOT EXECUTED 11282f: 68 31 01 00 00 push $0x131 <== NOT EXECUTED 112834: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112839: e8 66 5a ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 0011213c : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 11213c: 55 push %ebp 11213d: 89 e5 mov %esp,%ebp 11213f: 57 push %edi 112140: 56 push %esi 112141: 53 push %ebx 112142: 83 ec 1c sub $0x1c,%esp 112145: 8b 5d 08 mov 0x8(%ebp),%ebx 112148: 8b 7d 0c mov 0xc(%ebp),%edi 11214b: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 11214e: 85 db test %ebx,%ebx 112150: 0f 84 59 01 00 00 je 1122af <== NEVER TAKEN if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 112156: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 11215a: 0f 85 68 01 00 00 jne 1122c8 <== NEVER TAKEN /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 112160: 8b 0d 98 6e 12 00 mov 0x126e98,%ecx 112166: c1 e9 02 shr $0x2,%ecx 112169: 8d 41 ff lea -0x1(%ecx),%eax 11216c: 39 c7 cmp %eax,%edi 11216e: 76 44 jbe 1121b4 <== ALWAYS TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 112170: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 112173: 0f af c1 imul %ecx,%eax <== NOT EXECUTED 112176: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 112179: 39 d7 cmp %edx,%edi <== NOT EXECUTED 11217b: 77 57 ja 1121d4 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 11217d: 89 f8 mov %edi,%eax <== NOT EXECUTED 11217f: 29 c8 sub %ecx,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 112181: 31 d2 xor %edx,%edx <== NOT EXECUTED 112183: f7 f1 div %ecx <== NOT EXECUTED 112185: 89 c1 mov %eax,%ecx <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 112187: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 11218a: 85 f6 test %esi,%esi <== NOT EXECUTED 11218c: 0f 84 96 00 00 00 je 112228 <== NOT EXECUTED if ( !p ) { 112192: 85 c0 test %eax,%eax <== NOT EXECUTED 112194: 0f 84 dd 00 00 00 je 112277 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 11219a: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 11219d: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 11219f: 85 c0 test %eax,%eax <== NOT EXECUTED 1121a1: 0f 84 ba 00 00 00 je 112261 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 1121a7: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 1121aa: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1121ad: 5b pop %ebx <== NOT EXECUTED 1121ae: 5e pop %esi <== NOT EXECUTED 1121af: 5f pop %edi <== NOT EXECUTED 1121b0: c9 leave <== NOT EXECUTED 1121b1: c3 ret <== NOT EXECUTED 1121b2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 1121b4: 8b 43 58 mov 0x58(%ebx),%eax if ( malloc_it ) { 1121b7: 85 f6 test %esi,%esi 1121b9: 0f 84 85 00 00 00 je 112244 if ( !p ) { 1121bf: 85 c0 test %eax,%eax 1121c1: 0f 84 89 00 00 00 je 112250 p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 1121c7: 8d 04 b8 lea (%eax,%edi,4),%eax /* * This means the requested block number is out of range. */ return 0; } 1121ca: 8d 65 f4 lea -0xc(%ebp),%esp 1121cd: 5b pop %ebx 1121ce: 5e pop %esi 1121cf: 5f pop %edi 1121d0: c9 leave 1121d1: c3 ret 1121d2: 66 90 xchg %ax,%ax #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 1121d4: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 1121d7: 0f af d1 imul %ecx,%edx <== NOT EXECUTED 1121da: 4a dec %edx <== NOT EXECUTED 1121db: 39 d7 cmp %edx,%edi <== NOT EXECUTED 1121dd: 77 59 ja 112238 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 1121df: 29 c7 sub %eax,%edi <== NOT EXECUTED 1121e1: 89 f8 mov %edi,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 1121e3: 31 d2 xor %edx,%edx <== NOT EXECUTED 1121e5: f7 f1 div %ecx <== NOT EXECUTED 1121e7: 89 d7 mov %edx,%edi <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 1121e9: 31 d2 xor %edx,%edx <== NOT EXECUTED 1121eb: f7 f1 div %ecx <== NOT EXECUTED 1121ed: 89 c1 mov %eax,%ecx <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 1121ef: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 1121f2: 85 f6 test %esi,%esi <== NOT EXECUTED 1121f4: 0f 84 9a 00 00 00 je 112294 <== NOT EXECUTED if ( !p ) { 1121fa: 85 c0 test %eax,%eax <== NOT EXECUTED 1121fc: 0f 84 df 00 00 00 je 1122e1 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 112202: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 112205: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 112207: 85 c0 test %eax,%eax <== NOT EXECUTED 112209: 0f 84 f3 00 00 00 je 112302 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 11220f: 8d 1c 90 lea (%eax,%edx,4),%ebx <== NOT EXECUTED 112212: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p2 ) { 112214: 85 c0 test %eax,%eax <== NOT EXECUTED 112216: 75 af jne 1121c7 <== NOT EXECUTED p2 = memfile_alloc_block(); 112218: e8 fb fe ff ff call 112118 <== NOT EXECUTED if ( !p2 ) 11221d: 85 c0 test %eax,%eax <== NOT EXECUTED 11221f: 74 17 je 112238 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 112221: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 112223: eb a2 jmp 1121c7 <== NOT EXECUTED 112225: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 112228: 85 c0 test %eax,%eax <== NOT EXECUTED 11222a: 74 0c je 112238 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 11222c: 8b 04 88 mov (%eax,%ecx,4),%eax <== NOT EXECUTED if ( !p ) 11222f: 85 c0 test %eax,%eax <== NOT EXECUTED 112231: 0f 85 70 ff ff ff jne 1121a7 <== NOT EXECUTED 112237: 90 nop <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 112238: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 11223a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11223d: 5b pop %ebx <== NOT EXECUTED 11223e: 5e pop %esi <== NOT EXECUTED 11223f: 5f pop %edi <== NOT EXECUTED 112240: c9 leave <== NOT EXECUTED 112241: c3 ret <== NOT EXECUTED 112242: 66 90 xchg %ax,%ax <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 112244: 85 c0 test %eax,%eax 112246: 0f 85 7b ff ff ff jne 1121c7 <== ALWAYS TAKEN p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 11224c: 31 c0 xor %eax,%eax 11224e: eb ea jmp 11223a <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 112250: e8 c3 fe ff ff call 112118 if ( !p ) 112255: 85 c0 test %eax,%eax 112257: 74 df je 112238 <== NEVER TAKEN return 0; info->indirect = p; 112259: 89 43 58 mov %eax,0x58(%ebx) 11225c: e9 66 ff ff ff jmp 1121c7 info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 112261: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 112264: e8 af fe ff ff call 112118 <== NOT EXECUTED if ( !p1 ) 112269: 85 c0 test %eax,%eax <== NOT EXECUTED 11226b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 11226e: 74 c8 je 112238 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 112270: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 112272: e9 30 ff ff ff jmp 1121a7 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 112277: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 11227a: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 11227d: e8 96 fe ff ff call 112118 <== NOT EXECUTED if ( !p ) 112282: 85 c0 test %eax,%eax <== NOT EXECUTED 112284: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 112287: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 11228a: 74 ac je 112238 <== NOT EXECUTED return 0; info->doubly_indirect = p; 11228c: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED 11228f: e9 06 ff ff ff jmp 11219a <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 112294: 85 c0 test %eax,%eax <== NOT EXECUTED 112296: 74 a0 je 112238 <== 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 ]; 112298: 8b 04 88 mov (%eax,%ecx,4),%eax <== NOT EXECUTED if ( !p1 ) 11229b: 85 c0 test %eax,%eax <== NOT EXECUTED 11229d: 74 99 je 112238 <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 11229f: 8b 14 90 mov (%eax,%edx,4),%edx <== NOT EXECUTED if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 1122a2: 8d 04 ba lea (%edx,%edi,4),%eax <== NOT EXECUTED p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; p2 = (block_p *)p1[ doubly ]; if ( !p2 ) 1122a5: 85 d2 test %edx,%edx <== NOT EXECUTED 1122a7: 0f 85 fd fe ff ff jne 1121aa <== NOT EXECUTED 1122ad: eb 89 jmp 112238 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 1122af: 68 80 1f 12 00 push $0x121f80 <== NOT EXECUTED 1122b4: 68 6c 20 12 00 push $0x12206c <== NOT EXECUTED 1122b9: 68 88 03 00 00 push $0x388 <== NOT EXECUTED 1122be: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 1122c3: e8 dc 5f ff ff call 1082a4 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 1122c8: 68 fc 1f 12 00 push $0x121ffc <== NOT EXECUTED 1122cd: 68 6c 20 12 00 push $0x12206c <== NOT EXECUTED 1122d2: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED 1122d7: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 1122dc: e8 c3 5f ff ff call 1082a4 <__assert_func> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 1122e1: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 1122e4: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 1122e7: e8 2c fe ff ff call 112118 <== NOT EXECUTED if ( !p ) 1122ec: 85 c0 test %eax,%eax <== NOT EXECUTED 1122ee: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1122f1: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 1122f4: 0f 84 3e ff ff ff je 112238 <== NOT EXECUTED return 0; info->triply_indirect = p; 1122fa: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED 1122fd: e9 00 ff ff ff jmp 112202 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 112302: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 112305: e8 0e fe ff ff call 112118 <== NOT EXECUTED if ( !p1 ) 11230a: 85 c0 test %eax,%eax <== NOT EXECUTED 11230c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 11230f: 0f 84 23 ff ff ff je 112238 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 112315: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 112317: e9 f3 fe ff ff jmp 11220f <== NOT EXECUTED =============================================================================== 00112c5c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 112c5c: 55 push %ebp 112c5d: 89 e5 mov %esp,%ebp 112c5f: 57 push %edi 112c60: 56 push %esi 112c61: 53 push %ebx 112c62: 83 ec 4c sub $0x4c,%esp 112c65: 8b 75 0c mov 0xc(%ebp),%esi 112c68: 8b 7d 10 mov 0x10(%ebp),%edi 112c6b: 8b 45 18 mov 0x18(%ebp),%eax /* * Perform internal consistency checks */ assert( the_jnode ); 112c6e: 8b 55 08 mov 0x8(%ebp),%edx 112c71: 85 d2 test %edx,%edx 112c73: 0f 84 8e 02 00 00 je 112f07 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 112c79: 8b 4d 08 mov 0x8(%ebp),%ecx 112c7c: 8b 51 4c mov 0x4c(%ecx),%edx 112c7f: 8d 4a fb lea -0x5(%edx),%ecx 112c82: 83 f9 01 cmp $0x1,%ecx 112c85: 0f 87 63 02 00 00 ja 112eee <== NEVER TAKEN /* * Error checks on arguments */ assert( dest ); 112c8b: 8b 5d 14 mov 0x14(%ebp),%ebx 112c8e: 85 db test %ebx,%ebx 112c90: 0f 84 26 02 00 00 je 112ebc <== NEVER TAKEN /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 112c96: 85 c0 test %eax,%eax 112c98: 0f 84 f0 01 00 00 je 112e8e <== NEVER TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 112c9e: 83 fa 06 cmp $0x6,%edx 112ca1: 0f 84 5d 01 00 00 je 112e04 <== NEVER TAKEN /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; 112ca7: 89 f2 mov %esi,%edx if ( last_byte > the_jnode->info.file.size ) 112ca9: 8b 4d 08 mov 0x8(%ebp),%ecx 112cac: 8b 49 50 mov 0x50(%ecx),%ecx 112caf: 89 4d cc mov %ecx,-0x34(%ebp) 112cb2: 8d 1c 30 lea (%eax,%esi,1),%ebx 112cb5: 89 5d d0 mov %ebx,-0x30(%ebp) 112cb8: 31 c9 xor %ecx,%ecx 112cba: 8b 5d 08 mov 0x8(%ebp),%ebx 112cbd: 3b 4b 54 cmp 0x54(%ebx),%ecx 112cc0: 0f 8e e2 00 00 00 jle 112da8 <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; 112cc6: 8b 5d cc mov -0x34(%ebp),%ebx 112cc9: 29 d3 sub %edx,%ebx 112ccb: 89 5d cc mov %ebx,-0x34(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 112cce: a1 98 6e 12 00 mov 0x126e98,%eax 112cd3: 89 45 d0 mov %eax,-0x30(%ebp) 112cd6: 99 cltd 112cd7: 89 d3 mov %edx,%ebx 112cd9: 52 push %edx 112cda: 50 push %eax 112cdb: 57 push %edi 112cdc: 56 push %esi 112cdd: 89 45 c0 mov %eax,-0x40(%ebp) 112ce0: e8 e7 c2 00 00 call 11efcc <__moddi3> 112ce5: 83 c4 10 add $0x10,%esp 112ce8: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 112ceb: 8b 4d c0 mov -0x40(%ebp),%ecx 112cee: 53 push %ebx 112cef: 51 push %ecx 112cf0: 57 push %edi 112cf1: 56 push %esi 112cf2: e8 85 c1 00 00 call 11ee7c <__divdi3> 112cf7: 83 c4 10 add $0x10,%esp 112cfa: 89 c3 mov %eax,%ebx if ( start_offset ) { 112cfc: 8b 4d c8 mov -0x38(%ebp),%ecx 112cff: 85 c9 test %ecx,%ecx 112d01: 0f 85 b1 00 00 00 jne 112db8 112d07: 8b 55 14 mov 0x14(%ebp),%edx 112d0a: 89 55 c8 mov %edx,-0x38(%ebp) 112d0d: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 112d14: 8b 55 d0 mov -0x30(%ebp),%edx 112d17: 39 55 cc cmp %edx,-0x34(%ebp) 112d1a: 72 39 jb 112d55 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 112d1c: 50 push %eax 112d1d: 6a 00 push $0x0 112d1f: 53 push %ebx 112d20: ff 75 08 pushl 0x8(%ebp) 112d23: e8 14 f4 ff ff call 11213c assert( block_ptr ); 112d28: 83 c4 10 add $0x10,%esp 112d2b: 85 c0 test %eax,%eax 112d2d: 0f 84 70 01 00 00 je 112ea3 <== NEVER TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 112d33: 8b 30 mov (%eax),%esi 112d35: 8b 7d c8 mov -0x38(%ebp),%edi 112d38: 8b 4d d0 mov -0x30(%ebp),%ecx 112d3b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 112d3d: 89 7d c8 mov %edi,-0x38(%ebp) block++; 112d40: 43 inc %ebx my_length -= to_copy; 112d41: 8b 4d d0 mov -0x30(%ebp),%ecx 112d44: 29 4d cc sub %ecx,-0x34(%ebp) copied += to_copy; 112d47: 01 4d c4 add %ecx,-0x3c(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 112d4a: 8b 7d cc mov -0x34(%ebp),%edi 112d4d: 39 3d 98 6e 12 00 cmp %edi,0x126e98 112d53: 76 c7 jbe 112d1c * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 112d55: 8b 7d cc mov -0x34(%ebp),%edi 112d58: 85 ff test %edi,%edi 112d5a: 74 27 je 112d83 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 112d5c: 56 push %esi 112d5d: 6a 00 push $0x0 112d5f: 53 push %ebx 112d60: ff 75 08 pushl 0x8(%ebp) 112d63: e8 d4 f3 ff ff call 11213c assert( block_ptr ); 112d68: 83 c4 10 add $0x10,%esp 112d6b: 85 c0 test %eax,%eax 112d6d: 0f 84 62 01 00 00 je 112ed5 <== NEVER TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 112d73: 8b 30 mov (%eax),%esi 112d75: 8b 7d c8 mov -0x38(%ebp),%edi 112d78: 8b 4d cc mov -0x34(%ebp),%ecx 112d7b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 112d7d: 8b 45 cc mov -0x34(%ebp),%eax 112d80: 01 45 c4 add %eax,-0x3c(%ebp) } IMFS_update_atime( the_jnode ); 112d83: 83 ec 08 sub $0x8,%esp 112d86: 6a 00 push $0x0 112d88: 8d 45 e0 lea -0x20(%ebp),%eax 112d8b: 50 push %eax 112d8c: e8 cf 58 ff ff call 108660 112d91: 8b 45 e0 mov -0x20(%ebp),%eax 112d94: 8b 55 08 mov 0x8(%ebp),%edx 112d97: 89 42 40 mov %eax,0x40(%edx) return copied; 112d9a: 8b 45 c4 mov -0x3c(%ebp),%eax 112d9d: 83 c4 10 add $0x10,%esp } 112da0: 8d 65 f4 lea -0xc(%ebp),%esp 112da3: 5b pop %ebx 112da4: 5e pop %esi 112da5: 5f pop %edi 112da6: c9 leave 112da7: c3 ret * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 112da8: 0f 8d ba 00 00 00 jge 112e68 <== ALWAYS TAKEN 112dae: 89 45 cc mov %eax,-0x34(%ebp) 112db1: e9 18 ff ff ff jmp 112cce 112db6: 66 90 xchg %ax,%ax block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 112db8: 52 push %edx 112db9: 6a 00 push $0x0 112dbb: 53 push %ebx 112dbc: ff 75 08 pushl 0x8(%ebp) 112dbf: e8 78 f3 ff ff call 11213c assert( block_ptr ); 112dc4: 83 c4 10 add $0x10,%esp 112dc7: 85 c0 test %eax,%eax 112dc9: 0f 84 51 01 00 00 je 112f20 <== NEVER TAKEN */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 112dcf: 8b 4d d0 mov -0x30(%ebp),%ecx 112dd2: 2b 4d c8 sub -0x38(%ebp),%ecx 112dd5: 8b 55 cc mov -0x34(%ebp),%edx 112dd8: 39 ca cmp %ecx,%edx 112dda: 0f 87 9c 00 00 00 ja 112e7c 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 ); 112de0: 8b 75 c8 mov -0x38(%ebp),%esi 112de3: 03 30 add (%eax),%esi dest += to_copy; 112de5: 8b 7d 14 mov 0x14(%ebp),%edi 112de8: 89 d1 mov %edx,%ecx 112dea: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 112dec: 89 7d c8 mov %edi,-0x38(%ebp) block++; 112def: 43 inc %ebx my_length -= to_copy; 112df0: 29 55 cc sub %edx,-0x34(%ebp) 112df3: a1 98 6e 12 00 mov 0x126e98,%eax 112df8: 89 45 d0 mov %eax,-0x30(%ebp) 112dfb: 89 55 c4 mov %edx,-0x3c(%ebp) 112dfe: e9 11 ff ff ff jmp 112d14 112e03: 90 nop * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 112e04: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 112e07: 8b 5b 58 mov 0x58(%ebx),%ebx <== NOT EXECUTED 112e0a: 89 5d cc mov %ebx,-0x34(%ebp) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 112e0d: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 112e10: 8b 51 50 mov 0x50(%ecx),%edx <== NOT EXECUTED 112e13: 8b 49 54 mov 0x54(%ecx),%ecx <== NOT EXECUTED 112e16: 89 55 b0 mov %edx,-0x50(%ebp) <== NOT EXECUTED 112e19: 89 4d b4 mov %ecx,-0x4c(%ebp) <== NOT EXECUTED 112e1c: 29 f2 sub %esi,%edx <== NOT EXECUTED 112e1e: 19 f9 sbb %edi,%ecx <== NOT EXECUTED 112e20: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 112e23: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 112e26: 31 db xor %ebx,%ebx <== NOT EXECUTED 112e28: 39 cb cmp %ecx,%ebx <== NOT EXECUTED 112e2a: 7e 58 jle 112e84 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 112e2c: 8b 55 b0 mov -0x50(%ebp),%edx <== NOT EXECUTED 112e2f: 29 f2 sub %esi,%edx <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 112e31: 03 75 cc add -0x34(%ebp),%esi <== NOT EXECUTED 112e34: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 112e37: 89 d1 mov %edx,%ecx <== NOT EXECUTED 112e39: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED IMFS_update_atime( the_jnode ); 112e3b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112e3e: 6a 00 push $0x0 <== NOT EXECUTED 112e40: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 112e43: 50 push %eax <== NOT EXECUTED 112e44: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 112e47: e8 14 58 ff ff call 108660 <== NOT EXECUTED 112e4c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 112e4f: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 112e52: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED return my_length; 112e55: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 112e58: 89 d0 mov %edx,%eax <== NOT EXECUTED 112e5a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 112e5d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 112e60: 5b pop %ebx <== NOT EXECUTED 112e61: 5e pop %esi <== NOT EXECUTED 112e62: 5f pop %edi <== NOT EXECUTED 112e63: c9 leave <== NOT EXECUTED 112e64: c3 ret <== NOT EXECUTED 112e65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 112e68: 8b 4d cc mov -0x34(%ebp),%ecx 112e6b: 39 4d d0 cmp %ecx,-0x30(%ebp) 112e6e: 0f 87 52 fe ff ff ja 112cc6 112e74: e9 35 ff ff ff jmp 112dae 112e79: 8d 76 00 lea 0x0(%esi),%esi */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 112e7c: 89 ca mov %ecx,%edx 112e7e: e9 5d ff ff ff jmp 112de0 112e83: 90 nop if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 112e84: 7c 04 jl 112e8a <== NOT EXECUTED 112e86: 39 d0 cmp %edx,%eax <== NOT EXECUTED 112e88: 77 a2 ja 112e2c <== NOT EXECUTED 112e8a: 89 c2 mov %eax,%edx <== NOT EXECUTED 112e8c: eb a3 jmp 112e31 <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 112e8e: e8 ad 0f 00 00 call 113e40 <__errno> <== NOT EXECUTED 112e93: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 112e99: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 112e9e: e9 fd fe ff ff jmp 112da0 <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 112ea3: 68 96 1f 12 00 push $0x121f96 <== NOT EXECUTED 112ea8: 68 9e 20 12 00 push $0x12209e <== NOT EXECUTED 112ead: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED 112eb2: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112eb7: e8 e8 53 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 112ebc: 68 a7 1f 12 00 push $0x121fa7 <== NOT EXECUTED 112ec1: 68 9e 20 12 00 push $0x12209e <== NOT EXECUTED 112ec6: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED 112ecb: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112ed0: e8 cf 53 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 112ed5: 68 96 1f 12 00 push $0x121f96 <== NOT EXECUTED 112eda: 68 9e 20 12 00 push $0x12209e <== NOT EXECUTED 112edf: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED 112ee4: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112ee9: e8 b6 53 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 112eee: 68 20 20 12 00 push $0x122020 <== NOT EXECUTED 112ef3: 68 9e 20 12 00 push $0x12209e <== NOT EXECUTED 112ef8: 68 51 02 00 00 push $0x251 <== NOT EXECUTED 112efd: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112f02: e8 9d 53 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 112f07: 68 80 1f 12 00 push $0x121f80 <== NOT EXECUTED 112f0c: 68 9e 20 12 00 push $0x12209e <== NOT EXECUTED 112f11: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED 112f16: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112f1b: e8 84 53 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 112f20: 68 96 1f 12 00 push $0x121f96 <== NOT EXECUTED 112f25: 68 9e 20 12 00 push $0x12209e <== NOT EXECUTED 112f2a: 68 96 02 00 00 push $0x296 <== NOT EXECUTED 112f2f: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112f34: e8 6b 53 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 001123e4 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 1123e4: 55 push %ebp 1123e5: 89 e5 mov %esp,%ebp 1123e7: 57 push %edi 1123e8: 56 push %esi 1123e9: 53 push %ebx 1123ea: 83 ec 1c sub $0x1c,%esp /* * Perform internal consistency checks */ assert( the_jnode ); 1123ed: 8b 55 08 mov 0x8(%ebp),%edx 1123f0: 85 d2 test %edx,%edx 1123f2: 0f 84 61 01 00 00 je 112559 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1123f8: 8b 45 08 mov 0x8(%ebp),%eax 1123fb: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 1123ff: 0f 85 6d 01 00 00 jne 112572 <== NEVER TAKEN /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 112405: 8b 3d 98 6e 12 00 mov 0x126e98,%edi 11240b: c1 ef 02 shr $0x2,%edi * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 11240e: 8b 55 08 mov 0x8(%ebp),%edx 112411: 8b 42 58 mov 0x58(%edx),%eax 112414: 85 c0 test %eax,%eax 112416: 74 12 je 11242a if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 112418: 83 ec 08 sub $0x8,%esp 11241b: 57 push %edi 11241c: 89 d0 mov %edx,%eax 11241e: 83 c0 58 add $0x58,%eax 112421: 50 push %eax 112422: e8 f5 fe ff ff call 11231c 112427: 83 c4 10 add $0x10,%esp } if ( info->doubly_indirect ) { 11242a: 8b 4d 08 mov 0x8(%ebp),%ecx 11242d: 8b 51 5c mov 0x5c(%ecx),%edx 112430: 85 d2 test %edx,%edx 112432: 74 57 je 11248b <== ALWAYS TAKEN for ( i=0 ; i<== NOT EXECUTED 112440: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 112442: 31 db xor %ebx,%ebx <== NOT EXECUTED 112444: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 112447: eb 06 jmp 11244f <== NOT EXECUTED 112449: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 11244c: 8b 56 5c mov 0x5c(%esi),%edx <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 11244f: c1 e1 02 shl $0x2,%ecx <== NOT EXECUTED 112452: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1) <== NOT EXECUTED 112456: 74 14 je 11246c <== NOT EXECUTED memfile_free_blocks_in_table( 112458: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11245b: 57 push %edi <== NOT EXECUTED 11245c: 01 ca add %ecx,%edx <== NOT EXECUTED 11245e: 52 push %edx <== NOT EXECUTED 11245f: e8 b8 fe ff ff call 11231c <== NOT EXECUTED 112464: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112467: a1 98 6e 12 00 mov 0x126e98,%eax <== 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 ); 112478: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11247b: 57 push %edi <== NOT EXECUTED 11247c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 11247f: 83 c0 5c add $0x5c,%eax <== NOT EXECUTED 112482: 50 push %eax <== NOT EXECUTED 112483: e8 94 fe ff ff call 11231c <== NOT EXECUTED 112488: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } if ( info->triply_indirect ) { 11248b: 8b 45 08 mov 0x8(%ebp),%eax 11248e: 8b 50 60 mov 0x60(%eax),%edx 112491: 85 d2 test %edx,%edx 112493: 0f 84 b6 00 00 00 je 11254f <== ALWAYS TAKEN for ( i=0 ; i<== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 1124a9: 8b 32 mov (%edx),%esi <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 1124ab: 85 f6 test %esi,%esi <== NOT EXECUTED 1124ad: 0f 84 89 00 00 00 je 11253c <== NOT EXECUTED 1124b3: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED 1124ba: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 1124c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; for ( j=0 ; j<== NOT EXECUTED 1124cb: 31 d2 xor %edx,%edx <== NOT EXECUTED 1124cd: 31 db xor %ebx,%ebx <== NOT EXECUTED 1124cf: 90 nop <== NOT EXECUTED if ( p[j] ) { 1124d0: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED 1124d3: 8b 0c 16 mov (%esi,%edx,1),%ecx <== NOT EXECUTED 1124d6: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1124d8: 74 15 je 1124ef <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 1124da: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1124dd: 57 push %edi <== NOT EXECUTED 1124de: 8d 14 16 lea (%esi,%edx,1),%edx <== NOT EXECUTED 1124e1: 52 push %edx <== NOT EXECUTED 1124e2: e8 35 fe ff ff call 11231c <== NOT EXECUTED 1124e7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1124ea: a1 98 6e 12 00 mov 0x126e98,%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( 1124fb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1124fe: 57 push %edi <== NOT EXECUTED 1124ff: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 112502: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 112505: 03 41 60 add 0x60(%ecx),%eax <== NOT EXECUTED 112508: 50 push %eax <== NOT EXECUTED 112509: e8 0e fe ff ff call 11231c <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i<== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ 112523: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 112526: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED 112529: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 11252c: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 11252f: 8b 51 60 mov 0x60(%ecx),%edx <== NOT EXECUTED 112532: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 112535: 8b 34 0a mov (%edx,%ecx,1),%esi <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 112538: 85 f6 test %esi,%esi <== NOT EXECUTED 11253a: 75 88 jne 1124c4 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 11253c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11253f: 57 push %edi <== NOT EXECUTED 112540: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 112543: 83 c0 60 add $0x60,%eax <== NOT EXECUTED 112546: 50 push %eax <== NOT EXECUTED 112547: e8 d0 fd ff ff call 11231c <== NOT EXECUTED 11254c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 11254f: 31 c0 xor %eax,%eax 112551: 8d 65 f4 lea -0xc(%ebp),%esp 112554: 5b pop %ebx 112555: 5e pop %esi 112556: 5f pop %edi 112557: c9 leave 112558: c3 ret /* * Perform internal consistency checks */ assert( the_jnode ); 112559: 68 80 1f 12 00 push $0x121f80 <== NOT EXECUTED 11255e: 68 b0 20 12 00 push $0x1220b0 <== NOT EXECUTED 112563: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED 112568: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 11256d: e8 32 5d ff ff call 1082a4 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 112572: 68 fc 1f 12 00 push $0x121ffc <== NOT EXECUTED 112577: 68 b0 20 12 00 push $0x1220b0 <== NOT EXECUTED 11257c: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED 112581: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112586: e8 19 5d ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 00112398 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 112398: 55 push %ebp <== NOT EXECUTED 112399: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11239b: 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 ); 11239e: 6a 00 push $0x0 <== NOT EXECUTED 1123a0: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 1123a3: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1123a6: e8 91 fd ff ff call 11213c <== NOT EXECUTED assert( block_ptr ); 1123ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1123ae: 85 c0 test %eax,%eax <== NOT EXECUTED 1123b0: 74 18 je 1123ca <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 1123b2: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 1123b4: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 1123ba: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1123bd: 52 push %edx <== NOT EXECUTED 1123be: e8 39 fd ff ff call 1120fc <== NOT EXECUTED } return 1; } 1123c3: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 1123c8: c9 leave <== NOT EXECUTED 1123c9: c3 ret <== NOT EXECUTED { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 1123ca: 68 96 1f 12 00 push $0x121f96 <== NOT EXECUTED 1123cf: 68 e1 20 12 00 push $0x1220e1 <== NOT EXECUTED 1123d4: 68 96 01 00 00 push $0x196 <== NOT EXECUTED 1123d9: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 1123de: e8 c1 5e ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 0011292c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 11292c: 55 push %ebp 11292d: 89 e5 mov %esp,%ebp 11292f: 57 push %edi 112930: 56 push %esi 112931: 53 push %ebx 112932: 83 ec 3c sub $0x3c,%esp 112935: 8b 5d 0c mov 0xc(%ebp),%ebx 112938: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 11293b: 8b 4d 08 mov 0x8(%ebp),%ecx 11293e: 85 c9 test %ecx,%ecx 112940: 0f 84 d8 01 00 00 je 112b1e <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 112946: 8b 45 08 mov 0x8(%ebp),%eax 112949: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 11294d: 0f 85 b2 01 00 00 jne 112b05 <== NEVER TAKEN /* * Error check arguments */ assert( source ); 112953: 8b 55 14 mov 0x14(%ebp),%edx 112956: 85 d2 test %edx,%edx 112958: 0f 84 d9 01 00 00 je 112b37 <== NEVER TAKEN /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 11295e: 8b 45 18 mov 0x18(%ebp),%eax 112961: 85 c0 test %eax,%eax 112963: 0f 84 6c 01 00 00 je 112ad5 <== NEVER TAKEN * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 112969: 8b 45 18 mov 0x18(%ebp),%eax 11296c: 01 d8 add %ebx,%eax 11296e: 31 d2 xor %edx,%edx 112970: 8b 4d 08 mov 0x8(%ebp),%ecx 112973: 3b 51 54 cmp 0x54(%ecx),%edx 112976: 7c 10 jl 112988 <== NEVER TAKEN 112978: 0f 8f 26 01 00 00 jg 112aa4 <== NEVER TAKEN 11297e: 3b 41 50 cmp 0x50(%ecx),%eax 112981: 0f 87 1d 01 00 00 ja 112aa4 <== ALWAYS TAKEN 112987: 90 nop /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 112988: a1 98 6e 12 00 mov 0x126e98,%eax 11298d: 89 45 d4 mov %eax,-0x2c(%ebp) 112990: 99 cltd 112991: 89 45 c8 mov %eax,-0x38(%ebp) 112994: 89 55 cc mov %edx,-0x34(%ebp) 112997: 52 push %edx 112998: 50 push %eax 112999: 56 push %esi 11299a: 53 push %ebx 11299b: e8 2c c6 00 00 call 11efcc <__moddi3> 1129a0: 83 c4 10 add $0x10,%esp 1129a3: 89 c7 mov %eax,%edi block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 1129a5: ff 75 cc pushl -0x34(%ebp) 1129a8: ff 75 c8 pushl -0x38(%ebp) 1129ab: 56 push %esi 1129ac: 53 push %ebx 1129ad: e8 ca c4 00 00 call 11ee7c <__divdi3> 1129b2: 83 c4 10 add $0x10,%esp 1129b5: 89 c3 mov %eax,%ebx if ( start_offset ) { 1129b7: 85 ff test %edi,%edi 1129b9: 0f 85 a1 00 00 00 jne 112a60 1129bf: 8b 75 14 mov 0x14(%ebp),%esi 1129c2: 8b 55 18 mov 0x18(%ebp),%edx 1129c5: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1129cc: 3b 55 d4 cmp -0x2c(%ebp),%edx 1129cf: 72 3b jb 112a0c 1129d1: 8d 76 00 lea 0x0(%esi),%esi block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1129d4: 51 push %ecx 1129d5: 6a 00 push $0x0 1129d7: 53 push %ebx 1129d8: ff 75 08 pushl 0x8(%ebp) 1129db: 89 55 c4 mov %edx,-0x3c(%ebp) 1129de: e8 59 f7 ff ff call 11213c assert( block_ptr ); 1129e3: 83 c4 10 add $0x10,%esp 1129e6: 85 c0 test %eax,%eax 1129e8: 8b 55 c4 mov -0x3c(%ebp),%edx 1129eb: 0f 84 fb 00 00 00 je 112aec <== NEVER TAKEN if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 1129f1: 8b 00 mov (%eax),%eax src += to_copy; 1129f3: 89 c7 mov %eax,%edi 1129f5: 8b 4d d4 mov -0x2c(%ebp),%ecx 1129f8: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 1129fa: 43 inc %ebx my_length -= to_copy; 1129fb: 2b 55 d4 sub -0x2c(%ebp),%edx * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 1129fe: 8b 4d d4 mov -0x2c(%ebp),%ecx 112a01: 01 4d c8 add %ecx,-0x38(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 112a04: 39 15 98 6e 12 00 cmp %edx,0x126e98 112a0a: 76 c8 jbe 1129d4 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 112a0c: 85 d2 test %edx,%edx 112a0e: 74 28 je 112a38 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 112a10: 50 push %eax 112a11: 6a 00 push $0x0 112a13: 53 push %ebx 112a14: ff 75 08 pushl 0x8(%ebp) 112a17: 89 55 c4 mov %edx,-0x3c(%ebp) 112a1a: e8 1d f7 ff ff call 11213c assert( block_ptr ); 112a1f: 83 c4 10 add $0x10,%esp 112a22: 85 c0 test %eax,%eax 112a24: 8b 55 c4 mov -0x3c(%ebp),%edx 112a27: 0f 84 23 01 00 00 je 112b50 <== NEVER TAKEN if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 112a2d: 8b 00 mov (%eax),%eax 112a2f: 89 c7 mov %eax,%edi 112a31: 89 d1 mov %edx,%ecx 112a33: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 112a35: 01 55 c8 add %edx,-0x38(%ebp) } IMFS_mtime_ctime_update( the_jnode ); 112a38: 83 ec 08 sub $0x8,%esp 112a3b: 6a 00 push $0x0 112a3d: 8d 45 e0 lea -0x20(%ebp),%eax 112a40: 50 push %eax 112a41: e8 1a 5c ff ff call 108660 112a46: 8b 45 e0 mov -0x20(%ebp),%eax 112a49: 8b 55 08 mov 0x8(%ebp),%edx 112a4c: 89 42 44 mov %eax,0x44(%edx) 112a4f: 89 42 48 mov %eax,0x48(%edx) return copied; 112a52: 83 c4 10 add $0x10,%esp } 112a55: 8b 45 c8 mov -0x38(%ebp),%eax 112a58: 8d 65 f4 lea -0xc(%ebp),%esp 112a5b: 5b pop %ebx 112a5c: 5e pop %esi 112a5d: 5f pop %edi 112a5e: c9 leave 112a5f: c3 ret block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 112a60: 56 push %esi 112a61: 6a 00 push $0x0 112a63: 50 push %eax 112a64: ff 75 08 pushl 0x8(%ebp) 112a67: e8 d0 f6 ff ff call 11213c assert( block_ptr ); 112a6c: 83 c4 10 add $0x10,%esp 112a6f: 85 c0 test %eax,%eax 112a71: 0f 84 f2 00 00 00 je 112b69 <== NEVER TAKEN */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 112a77: 8b 55 d4 mov -0x2c(%ebp),%edx 112a7a: 29 fa sub %edi,%edx 112a7c: 89 55 c8 mov %edx,-0x38(%ebp) 112a7f: 8b 4d 18 mov 0x18(%ebp),%ecx 112a82: 39 ca cmp %ecx,%edx 112a84: 77 4a ja 112ad0 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 ); 112a86: 03 38 add (%eax),%edi src += to_copy; 112a88: 8b 75 14 mov 0x14(%ebp),%esi 112a8b: 8b 4d c8 mov -0x38(%ebp),%ecx 112a8e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 112a90: 43 inc %ebx my_length -= to_copy; 112a91: 8b 55 18 mov 0x18(%ebp),%edx 112a94: 2b 55 c8 sub -0x38(%ebp),%edx copied += to_copy; 112a97: a1 98 6e 12 00 mov 0x126e98,%eax 112a9c: 89 45 d4 mov %eax,-0x2c(%ebp) 112a9f: e9 28 ff ff ff jmp 1129cc * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 112aa4: 57 push %edi 112aa5: 52 push %edx 112aa6: 50 push %eax 112aa7: ff 75 08 pushl 0x8(%ebp) 112aaa: e8 2d fc ff ff call 1126dc if ( status ) 112aaf: 83 c4 10 add $0x10,%esp 112ab2: 85 c0 test %eax,%eax 112ab4: 0f 84 ce fe ff ff je 112988 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 112aba: e8 81 13 00 00 call 113e40 <__errno> <== NOT EXECUTED 112abf: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 112ac5: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) <== NOT EXECUTED 112acc: eb 87 jmp 112a55 <== NOT EXECUTED 112ace: 66 90 xchg %ax,%ax <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 112ad0: 89 4d c8 mov %ecx,-0x38(%ebp) 112ad3: eb b1 jmp 112a86 * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 112ad5: e8 66 13 00 00 call 113e40 <__errno> <== NOT EXECUTED 112ada: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 112ae0: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) <== NOT EXECUTED 112ae7: e9 69 ff ff ff jmp 112a55 <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 112aec: 68 96 1f 12 00 push $0x121f96 <== NOT EXECUTED 112af1: 68 8b 20 12 00 push $0x12208b <== NOT EXECUTED 112af6: 68 30 03 00 00 push $0x330 <== NOT EXECUTED 112afb: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112b00: e8 9f 57 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 112b05: 68 fc 1f 12 00 push $0x121ffc <== NOT EXECUTED 112b0a: 68 8b 20 12 00 push $0x12208b <== NOT EXECUTED 112b0f: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED 112b14: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112b19: e8 86 57 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 112b1e: 68 80 1f 12 00 push $0x121f80 <== NOT EXECUTED 112b23: 68 8b 20 12 00 push $0x12208b <== NOT EXECUTED 112b28: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED 112b2d: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112b32: e8 6d 57 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 112b37: 68 a0 1f 12 00 push $0x121fa0 <== NOT EXECUTED 112b3c: 68 8b 20 12 00 push $0x12208b <== NOT EXECUTED 112b41: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED 112b46: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112b4b: e8 54 57 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 112b50: 68 96 1f 12 00 push $0x121f96 <== NOT EXECUTED 112b55: 68 8b 20 12 00 push $0x12208b <== NOT EXECUTED 112b5a: 68 46 03 00 00 push $0x346 <== NOT EXECUTED 112b5f: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112b64: e8 3b 57 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 112b69: 68 96 1f 12 00 push $0x121f96 <== NOT EXECUTED 112b6e: 68 8b 20 12 00 push $0x12208b <== NOT EXECUTED 112b73: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED 112b78: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112b7d: e8 22 57 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 00107dec : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 107dec: 55 push %ebp 107ded: 89 e5 mov %esp,%ebp 107def: 57 push %edi 107df0: 56 push %esi 107df1: 53 push %ebx 107df2: 83 ec 5c sub $0x5c,%esp 107df5: 8b 55 08 mov 0x8(%ebp),%edx 107df8: 8b 5d 0c mov 0xc(%ebp),%ebx 107dfb: 8b 75 10 mov 0x10(%ebp),%esi 107dfe: 8b 45 14 mov 0x14(%ebp),%eax 107e01: 89 45 a4 mov %eax,-0x5c(%ebp) IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 107e04: 31 c0 xor %eax,%eax 107e06: b9 ff ff ff ff mov $0xffffffff,%ecx 107e0b: 89 d7 mov %edx,%edi 107e0d: f2 ae repnz scas %es:(%edi),%al 107e0f: f7 d1 not %ecx 107e11: 49 dec %ecx 107e12: 8d 45 e4 lea -0x1c(%ebp),%eax 107e15: 50 push %eax 107e16: 8d 7d af lea -0x51(%ebp),%edi 107e19: 57 push %edi 107e1a: 51 push %ecx 107e1b: 52 push %edx 107e1c: e8 53 8a 00 00 call 110874 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 107e21: 89 d8 mov %ebx,%eax 107e23: 25 00 f0 00 00 and $0xf000,%eax 107e28: 83 c4 10 add $0x10,%esp 107e2b: 3d 00 40 00 00 cmp $0x4000,%eax 107e30: 74 5e je 107e90 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 107e32: 3d 00 80 00 00 cmp $0x8000,%eax 107e37: 74 4f je 107e88 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 107e39: 3d 00 60 00 00 cmp $0x6000,%eax 107e3e: 74 38 je 107e78 107e40: 3d 00 20 00 00 cmp $0x2000,%eax 107e45: 74 31 je 107e78 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 107e47: 3d 00 10 00 00 cmp $0x1000,%eax 107e4c: 75 4a jne 107e98 <== NEVER TAKEN 107e4e: ba 07 00 00 00 mov $0x7,%edx * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107e53: 83 ec 0c sub $0xc,%esp 107e56: 8d 45 d0 lea -0x30(%ebp),%eax 107e59: 50 push %eax 107e5a: 53 push %ebx 107e5b: 57 push %edi 107e5c: 52 push %edx 107e5d: ff 75 18 pushl 0x18(%ebp) 107e60: e8 07 7d 00 00 call 10fb6c new_name, mode, &info ); if ( !new_node ) 107e65: 83 c4 20 add $0x20,%esp 107e68: 85 c0 test %eax,%eax 107e6a: 74 3e je 107eaa <== NEVER TAKEN 107e6c: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 107e6e: 8d 65 f4 lea -0xc(%ebp),%esp 107e71: 5b pop %ebx 107e72: 5e pop %esi 107e73: 5f pop %edi 107e74: c9 leave 107e75: c3 ret 107e76: 66 90 xchg %ax,%ax type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 107e78: 89 75 d0 mov %esi,-0x30(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107e7b: 8b 45 a4 mov -0x5c(%ebp),%eax 107e7e: 89 45 d4 mov %eax,-0x2c(%ebp) 107e81: ba 02 00 00 00 mov $0x2,%edx */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 107e86: eb cb jmp 107e53 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 107e88: ba 05 00 00 00 mov $0x5,%edx 107e8d: eb c4 jmp 107e53 107e8f: 90 nop rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 107e90: ba 01 00 00 00 mov $0x1,%edx 107e95: eb bc jmp 107e53 107e97: 90 nop 107e98: e8 a3 bf 00 00 call 113e40 <__errno> <== NOT EXECUTED 107e9d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107ea3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107ea8: eb c4 jmp 107e6e <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107eaa: e8 91 bf 00 00 call 113e40 <__errno> <== NOT EXECUTED 107eaf: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107eb5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107eba: eb b2 jmp 107e6e <== NOT EXECUTED =============================================================================== 00107ebc : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107ebc: 55 push %ebp 107ebd: 89 e5 mov %esp,%ebp 107ebf: 83 ec 08 sub $0x8,%esp 107ec2: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 107ec5: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107ec8: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107ecc: 75 0a jne 107ed8 <== NEVER TAKEN /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 107ece: 89 50 5c mov %edx,0x5c(%eax) 107ed1: 31 c0 xor %eax,%eax return 0; } 107ed3: c9 leave 107ed4: c3 ret 107ed5: 8d 76 00 lea 0x0(%esi),%esi /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 107ed8: e8 63 bf 00 00 call 113e40 <__errno> <== NOT EXECUTED 107edd: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107ee3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 107ee8: c9 leave <== NOT EXECUTED 107ee9: c3 ret <== NOT EXECUTED =============================================================================== 00109bbc : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 109bbc: 55 push %ebp 109bbd: 89 e5 mov %esp,%ebp 109bbf: 53 push %ebx 109bc0: 83 ec 04 sub $0x4,%esp 109bc3: 8b 5d 08 mov 0x8(%ebp),%ebx assert( the_jnode ); 109bc6: 85 db test %ebx,%ebx 109bc8: 0f 84 7f 01 00 00 je 109d4d <== NEVER TAKEN fprintf(stdout, "%s", the_jnode->name ); 109bce: 83 ec 08 sub $0x8,%esp 109bd1: a1 e0 be 12 00 mov 0x12bee0,%eax 109bd6: ff 70 08 pushl 0x8(%eax) 109bd9: 8d 43 0c lea 0xc(%ebx),%eax 109bdc: 50 push %eax 109bdd: e8 56 de 00 00 call 117a38 switch( the_jnode->type ) { 109be2: 8b 43 4c mov 0x4c(%ebx),%eax 109be5: 83 c4 10 add $0x10,%esp 109be8: 83 f8 07 cmp $0x7,%eax 109beb: 76 2b jbe 109c18 <== ALWAYS TAKEN fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 109bed: 52 push %edx <== NOT EXECUTED 109bee: 50 push %eax <== NOT EXECUTED 109bef: 68 ee 6b 12 00 push $0x126bee <== NOT EXECUTED 109bf4: a1 e0 be 12 00 mov 0x12bee0,%eax <== NOT EXECUTED 109bf9: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109bfc: e8 0f dd 00 00 call 117910 <== NOT EXECUTED assert(0); 109c01: 68 1f 45 12 00 push $0x12451f <== NOT EXECUTED 109c06: 68 58 6d 12 00 push $0x126d58 <== NOT EXECUTED 109c0b: 6a 6c push $0x6c <== NOT EXECUTED 109c0d: 68 38 6c 12 00 push $0x126c38 <== NOT EXECUTED 109c12: e8 85 09 00 00 call 10a59c <__assert_func> <== NOT EXECUTED 109c17: 90 nop <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 109c18: ff 24 85 24 6d 12 00 jmp *0x126d24(,%eax,4) 109c1f: 90 nop fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 109c20: a1 e0 be 12 00 mov 0x12bee0,%eax <== NOT EXECUTED 109c25: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109c28: 6a 12 push $0x12 <== NOT EXECUTED 109c2a: 6a 01 push $0x1 <== NOT EXECUTED 109c2c: 68 db 6b 12 00 push $0x126bdb <== NOT EXECUTED 109c31: e8 3a ea 00 00 call 118670 <== NOT EXECUTED assert(0); 109c36: 68 1f 45 12 00 push $0x12451f <== NOT EXECUTED 109c3b: 68 58 6d 12 00 push $0x126d58 <== NOT EXECUTED 109c40: 6a 67 push $0x67 <== NOT EXECUTED 109c42: 68 38 6c 12 00 push $0x126c38 <== NOT EXECUTED 109c47: e8 50 09 00 00 call 10a59c <__assert_func> <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 109c4c: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 109c4f: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 109c52: 68 ac 6b 12 00 push $0x126bac <== NOT EXECUTED 109c57: a1 e0 be 12 00 mov 0x12bee0,%eax <== NOT EXECUTED 109c5c: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109c5f: e8 ac dc 00 00 call 117910 <== NOT EXECUTED (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 109c64: 83 c4 10 add $0x10,%esp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c67: c7 45 08 d5 6f 12 00 movl $0x126fd5,0x8(%ebp) <== NOT EXECUTED } 109c6e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109c71: c9 leave <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c72: e9 59 f6 00 00 jmp 1192d0 <== NOT EXECUTED 109c77: 90 nop <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 109c78: 51 push %ecx 109c79: ff 73 50 pushl 0x50(%ebx) 109c7c: 68 bb 6b 12 00 push $0x126bbb 109c81: a1 e0 be 12 00 mov 0x12bee0,%eax 109c86: ff 70 08 pushl 0x8(%eax) 109c89: e8 82 dc 00 00 call 117910 (uint32_t)the_jnode->info.file.size ); #endif break; 109c8e: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c91: c7 45 08 d5 6f 12 00 movl $0x126fd5,0x8(%ebp) } 109c98: 8b 5d fc mov -0x4(%ebp),%ebx 109c9b: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c9c: e9 2f f6 00 00 jmp 1192d0 109ca1: 8d 76 00 lea 0x0(%esi),%esi fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 109ca4: a1 e0 be 12 00 mov 0x12bee0,%eax <== NOT EXECUTED 109ca9: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109cac: 6a 13 push $0x13 <== NOT EXECUTED 109cae: 6a 01 push $0x1 <== NOT EXECUTED 109cb0: 68 c7 6b 12 00 push $0x126bc7 <== NOT EXECUTED 109cb5: e8 b6 e9 00 00 call 118670 <== NOT EXECUTED assert(0); 109cba: 68 1f 45 12 00 push $0x12451f <== NOT EXECUTED 109cbf: 68 58 6d 12 00 push $0x126d58 <== NOT EXECUTED 109cc4: 6a 62 push $0x62 <== NOT EXECUTED 109cc6: 68 38 6c 12 00 push $0x126c38 <== NOT EXECUTED 109ccb: e8 cc 08 00 00 call 10a59c <__assert_func> <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 109cd0: a1 e0 be 12 00 mov 0x12bee0,%eax <== NOT EXECUTED 109cd5: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109cd8: 6a 13 push $0x13 <== NOT EXECUTED 109cda: 6a 01 push $0x1 <== NOT EXECUTED 109cdc: 68 c7 6b 12 00 push $0x126bc7 <== NOT EXECUTED 109ce1: e8 8a e9 00 00 call 118670 <== NOT EXECUTED assert(0); 109ce6: 68 1f 45 12 00 push $0x12451f <== NOT EXECUTED 109ceb: 68 58 6d 12 00 push $0x126d58 <== NOT EXECUTED 109cf0: 6a 5d push $0x5d <== NOT EXECUTED 109cf2: 68 38 6c 12 00 push $0x126c38 <== NOT EXECUTED 109cf7: e8 a0 08 00 00 call 10a59c <__assert_func> <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 109cfc: ff 73 54 pushl 0x54(%ebx) 109cff: ff 73 50 pushl 0x50(%ebx) 109d02: 68 99 6b 12 00 push $0x126b99 109d07: a1 e0 be 12 00 mov 0x12bee0,%eax 109d0c: ff 70 08 pushl 0x8(%eax) 109d0f: e8 fc db 00 00 call 117910 the_jnode->info.device.major, the_jnode->info.device.minor ); break; 109d14: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d17: c7 45 08 d5 6f 12 00 movl $0x126fd5,0x8(%ebp) } 109d1e: 8b 5d fc mov -0x4(%ebp),%ebx 109d21: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d22: e9 a9 f5 00 00 jmp 1192d0 109d27: 90 nop assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 109d28: 83 ec 08 sub $0x8,%esp 109d2b: a1 e0 be 12 00 mov 0x12bee0,%eax 109d30: ff 70 08 pushl 0x8(%eax) 109d33: 6a 2f push $0x2f 109d35: e8 12 dc 00 00 call 11794c break; 109d3a: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d3d: c7 45 08 d5 6f 12 00 movl $0x126fd5,0x8(%ebp) } 109d44: 8b 5d fc mov -0x4(%ebp),%ebx 109d47: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d48: e9 83 f5 00 00 jmp 1192d0 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 109d4d: 68 8f 6b 12 00 push $0x126b8f <== NOT EXECUTED 109d52: 68 58 6d 12 00 push $0x126d58 <== NOT EXECUTED 109d57: 6a 38 push $0x38 <== NOT EXECUTED 109d59: 68 38 6c 12 00 push $0x126c38 <== NOT EXECUTED 109d5e: e8 39 08 00 00 call 10a59c <__assert_func> <== NOT EXECUTED =============================================================================== 00107efc : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 107efc: 55 push %ebp 107efd: 89 e5 mov %esp,%ebp 107eff: 57 push %edi 107f00: 56 push %esi 107f01: 53 push %ebx 107f02: 83 ec 0c sub $0xc,%esp 107f05: 8b 7d 0c mov 0xc(%ebp),%edi 107f08: 8b 75 10 mov 0x10(%ebp),%esi IMFS_jnode_t *node; int i; node = loc->node_access; 107f0b: 8b 45 08 mov 0x8(%ebp),%eax 107f0e: 8b 18 mov (%eax),%ebx if ( node->type != IMFS_SYM_LINK ) 107f10: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 107f14: 75 36 jne 107f4c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107f16: 85 f6 test %esi,%esi 107f18: 74 2e je 107f48 <== NEVER TAKEN 107f1a: 8b 43 50 mov 0x50(%ebx),%eax 107f1d: 8a 10 mov (%eax),%dl 107f1f: 84 d2 test %dl,%dl 107f21: 74 25 je 107f48 <== NEVER TAKEN int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 107f23: 31 c9 xor %ecx,%ecx 107f25: 31 c0 xor %eax,%eax 107f27: eb 0d jmp 107f36 107f29: 8d 76 00 lea 0x0(%esi),%esi for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107f2c: 8b 53 50 mov 0x50(%ebx),%edx 107f2f: 8a 14 02 mov (%edx,%eax,1),%dl 107f32: 84 d2 test %dl,%dl 107f34: 74 0a je 107f40 buf[i] = node->info.sym_link.name[i]; 107f36: 88 14 0f mov %dl,(%edi,%ecx,1) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107f39: 40 inc %eax 107f3a: 89 c1 mov %eax,%ecx 107f3c: 39 c6 cmp %eax,%esi 107f3e: 77 ec ja 107f2c buf[i] = node->info.sym_link.name[i]; return i; } 107f40: 83 c4 0c add $0xc,%esp 107f43: 5b pop %ebx 107f44: 5e pop %esi 107f45: 5f pop %edi 107f46: c9 leave 107f47: c3 ret node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107f48: 31 c0 xor %eax,%eax 107f4a: eb f4 jmp 107f40 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 107f4c: e8 ef be 00 00 call 113e40 <__errno> <== NOT EXECUTED 107f51: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107f57: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107f5c: eb e2 jmp 107f40 <== NOT EXECUTED =============================================================================== 00107f60 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 107f60: 55 push %ebp 107f61: 89 e5 mov %esp,%ebp 107f63: 53 push %ebx 107f64: 83 ec 18 sub $0x18,%esp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 107f67: 8b 45 0c mov 0xc(%ebp),%eax 107f6a: 8b 18 mov (%eax),%ebx strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 107f6c: 6a 20 push $0x20 107f6e: ff 75 14 pushl 0x14(%ebp) 107f71: 8d 43 0c lea 0xc(%ebx),%eax 107f74: 50 push %eax 107f75: e8 12 cb 00 00 call 114a8c if ( the_jnode->Parent != NULL ) 107f7a: 83 c4 10 add $0x10,%esp 107f7d: 8b 4b 08 mov 0x8(%ebx),%ecx 107f80: 85 c9 test %ecx,%ecx 107f82: 74 0c je 107f90 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 107f84: 83 ec 0c sub $0xc,%esp 107f87: 53 push %ebx 107f88: e8 1f 46 00 00 call 10c5ac <_Chain_Extract> 107f8d: 83 c4 10 add $0x10,%esp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 107f90: 8b 45 10 mov 0x10(%ebp),%eax 107f93: 8b 00 mov (%eax),%eax the_jnode->Parent = new_parent; 107f95: 89 43 08 mov %eax,0x8(%ebx) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 107f98: 83 ec 08 sub $0x8,%esp 107f9b: 53 push %ebx 107f9c: 83 c0 50 add $0x50,%eax 107f9f: 50 push %eax 107fa0: e8 e3 45 00 00 call 10c588 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 107fa5: 58 pop %eax 107fa6: 5a pop %edx 107fa7: 6a 00 push $0x0 107fa9: 8d 45 f0 lea -0x10(%ebp),%eax 107fac: 50 push %eax 107fad: e8 ae 06 00 00 call 108660 107fb2: 8b 45 f0 mov -0x10(%ebp),%eax 107fb5: 89 43 48 mov %eax,0x48(%ebx) return 0; } 107fb8: 31 c0 xor %eax,%eax 107fba: 8b 5d fc mov -0x4(%ebp),%ebx 107fbd: c9 leave 107fbe: c3 ret =============================================================================== 00110950 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 110950: 55 push %ebp 110951: 89 e5 mov %esp,%ebp 110953: 56 push %esi 110954: 53 push %ebx 110955: 83 ec 10 sub $0x10,%esp 110958: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 11095b: 8b 1e mov (%esi),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 11095d: 8b 43 08 mov 0x8(%ebx),%eax 110960: 85 c0 test %eax,%eax 110962: 74 13 je 110977 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 110964: 83 ec 0c sub $0xc,%esp 110967: 53 push %ebx 110968: e8 3f bc ff ff call 10c5ac <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 11096d: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 110974: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 110977: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 11097b: 83 ec 08 sub $0x8,%esp 11097e: 6a 00 push $0x0 110980: 8d 45 f0 lea -0x10(%ebp),%eax 110983: 50 push %eax 110984: e8 d7 7c ff ff call 108660 110989: 8b 45 f0 mov -0x10(%ebp),%eax 11098c: 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) ) { 11098f: 89 1c 24 mov %ebx,(%esp) 110992: e8 ad 02 00 00 call 110c44 110997: 83 c4 10 add $0x10,%esp 11099a: 85 c0 test %eax,%eax 11099c: 75 25 jne 1109c3 <== NEVER TAKEN 11099e: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 1109a3: 75 1e jne 1109c3 <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 1109a5: a1 24 50 12 00 mov 0x125024,%eax 1109aa: 8b 50 04 mov 0x4(%eax),%edx 1109ad: 3b 16 cmp (%esi),%edx 1109af: 74 33 je 1109e4 <== NEVER TAKEN /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 1109b1: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 1109b5: 74 15 je 1109cc if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 1109b7: 83 ec 0c sub $0xc,%esp 1109ba: 53 push %ebx 1109bb: e8 24 7c ff ff call 1085e4 1109c0: 83 c4 10 add $0x10,%esp } return 0; } 1109c3: 31 c0 xor %eax,%eax 1109c5: 8d 65 f8 lea -0x8(%ebp),%esp 1109c8: 5b pop %ebx 1109c9: 5e pop %esi 1109ca: c9 leave 1109cb: c3 ret /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 1109cc: 8b 43 50 mov 0x50(%ebx),%eax 1109cf: 85 c0 test %eax,%eax 1109d1: 74 e4 je 1109b7 <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); 1109d3: 83 ec 0c sub $0xc,%esp 1109d6: 50 push %eax 1109d7: e8 08 7c ff ff call 1085e4 1109dc: 83 c4 10 add $0x10,%esp 1109df: eb d6 jmp 1109b7 1109e1: 8d 76 00 lea 0x0(%esi),%esi /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 1109e4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 1109eb: eb c4 jmp 1109b1 <== NOT EXECUTED =============================================================================== 001109f0 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 1109f0: 55 push %ebp 1109f1: 89 e5 mov %esp,%ebp 1109f3: 56 push %esi 1109f4: 53 push %ebx 1109f5: 8b 4d 08 mov 0x8(%ebp),%ecx 1109f8: 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; 1109fb: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 1109fd: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 110a01: 76 15 jbe 110a18 <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 110a03: e8 38 34 00 00 call 113e40 <__errno> <== NOT EXECUTED 110a08: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 110a0e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } 110a13: 5b pop %ebx <== NOT EXECUTED 110a14: 5e pop %esi <== NOT EXECUTED 110a15: c9 leave <== NOT EXECUTED 110a16: c3 ret <== NOT EXECUTED 110a17: 90 nop <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 110a18: 8b 5a 4c mov 0x4c(%edx),%ebx 110a1b: ff 24 9d b8 1e 12 00 jmp *0x121eb8(,%ebx,4) 110a22: 66 90 xchg %ax,%ax case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 110a24: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED 110a2b: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) <== NOT EXECUTED * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 110a32: 8b 49 10 mov 0x10(%ecx),%ecx 110a35: 8b 49 34 mov 0x34(%ecx),%ecx 110a38: 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 = 110a3a: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 110a40: 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; 110a43: 8b 4a 30 mov 0x30(%edx),%ecx 110a46: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 110a49: 8b 4a 34 mov 0x34(%edx),%ecx 110a4c: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 110a50: 8b 4a 38 mov 0x38(%edx),%ecx 110a53: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 110a56: 8b 4a 3c mov 0x3c(%edx),%ecx 110a59: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 110a5d: 66 8b 4a 3e mov 0x3e(%edx),%cx 110a61: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 110a65: 8b 4a 40 mov 0x40(%edx),%ecx 110a68: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 110a6b: 8b 4a 44 mov 0x44(%edx),%ecx 110a6e: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 110a71: 8b 52 48 mov 0x48(%edx),%edx 110a74: 89 50 38 mov %edx,0x38(%eax) buf->st_blksize = imfs_rq_memfile_bytes_per_block; 110a77: 8b 15 50 31 12 00 mov 0x123150,%edx 110a7d: 89 50 40 mov %edx,0x40(%eax) 110a80: 31 c0 xor %eax,%eax return 0; } 110a82: 5b pop %ebx 110a83: 5e pop %esi 110a84: c9 leave 110a85: c3 ret 110a86: 66 90 xchg %ax,%ax switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 110a88: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 110a8b: 8b 72 50 mov 0x50(%edx),%esi 110a8e: 89 70 18 mov %esi,0x18(%eax) 110a91: 89 58 1c mov %ebx,0x1c(%eax) break; 110a94: eb 9c jmp 110a32 110a96: 66 90 xchg %ax,%ax case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 110a98: 8b 5a 50 mov 0x50(%edx),%ebx 110a9b: 8b 72 54 mov 0x54(%edx),%esi 110a9e: 89 58 20 mov %ebx,0x20(%eax) 110aa1: 89 70 24 mov %esi,0x24(%eax) break; 110aa4: eb 8c jmp 110a32 =============================================================================== 00107fc0 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 107fc0: 55 push %ebp 107fc1: 89 e5 mov %esp,%ebp 107fc3: 57 push %edi 107fc4: 53 push %ebx 107fc5: 83 ec 40 sub $0x40,%esp 107fc8: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 107fcb: 31 c0 xor %eax,%eax 107fcd: b9 ff ff ff ff mov $0xffffffff,%ecx 107fd2: 89 d7 mov %edx,%edi 107fd4: f2 ae repnz scas %es:(%edi),%al 107fd6: f7 d1 not %ecx 107fd8: 49 dec %ecx 107fd9: 8d 45 f4 lea -0xc(%ebp),%eax 107fdc: 50 push %eax 107fdd: 8d 5d bf lea -0x41(%ebp),%ebx 107fe0: 53 push %ebx 107fe1: 51 push %ecx 107fe2: 52 push %edx 107fe3: e8 8c 88 00 00 call 110874 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 107fe8: 58 pop %eax 107fe9: ff 75 0c pushl 0xc(%ebp) 107fec: e8 bf c9 00 00 call 1149b0 107ff1: 89 45 e0 mov %eax,-0x20(%ebp) if (info.sym_link.name == NULL) { 107ff4: 83 c4 10 add $0x10,%esp 107ff7: 85 c0 test %eax,%eax 107ff9: 74 27 je 108022 <== NEVER TAKEN * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107ffb: 83 ec 0c sub $0xc,%esp 107ffe: 8d 45 e0 lea -0x20(%ebp),%eax 108001: 50 push %eax 108002: 68 ff a1 00 00 push $0xa1ff 108007: 53 push %ebx 108008: 6a 04 push $0x4 10800a: ff 75 08 pushl 0x8(%ebp) 10800d: e8 5a 7b 00 00 call 10fb6c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 108012: 83 c4 20 add $0x20,%esp 108015: 85 c0 test %eax,%eax 108017: 74 1b je 108034 <== NEVER TAKEN 108019: 31 c0 xor %eax,%eax free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 10801b: 8d 65 f8 lea -0x8(%ebp),%esp 10801e: 5b pop %ebx 10801f: 5f pop %edi 108020: c9 leave 108021: c3 ret /* * Duplicate link name */ info.sym_link.name = strdup(link_name); if (info.sym_link.name == NULL) { rtems_set_errno_and_return_minus_one(ENOMEM); 108022: e8 19 be 00 00 call 113e40 <__errno> <== NOT EXECUTED 108027: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10802d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108032: eb e7 jmp 10801b <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 108034: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108037: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 10803a: e8 a5 05 00 00 call 1085e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 10803f: e8 fc bd 00 00 call 113e40 <__errno> <== NOT EXECUTED 108044: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10804a: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10804f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108052: eb c7 jmp 10801b <== NOT EXECUTED =============================================================================== 00108054 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 108054: 55 push %ebp 108055: 89 e5 mov %esp,%ebp 108057: 57 push %edi 108058: 56 push %esi 108059: 53 push %ebx 10805a: 83 ec 3c sub $0x3c,%esp 10805d: 8b 5d 0c mov 0xc(%ebp),%ebx IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 108060: 8b 13 mov (%ebx),%edx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 108062: 83 7a 4c 03 cmpl $0x3,0x4c(%edx) 108066: 74 18 je 108080 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 108068: 83 ec 08 sub $0x8,%esp 10806b: 8b 43 08 mov 0x8(%ebx),%eax 10806e: 53 push %ebx 10806f: ff 75 08 pushl 0x8(%ebp) 108072: ff 50 34 call *0x34(%eax) return result; 108075: 83 c4 10 add $0x10,%esp } 108078: 8d 65 f4 lea -0xc(%ebp),%esp 10807b: 5b pop %ebx 10807c: 5e pop %esi 10807d: 5f pop %edi 10807e: c9 leave 10807f: c3 ret * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 108080: 8b 42 50 mov 0x50(%edx),%eax 108083: 85 c0 test %eax,%eax 108085: 74 79 je 108100 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 108087: 8d 7d cc lea -0x34(%ebp),%edi 10808a: b9 05 00 00 00 mov $0x5,%ecx 10808f: 89 de mov %ebx,%esi 108091: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 108093: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 108096: 83 ec 0c sub $0xc,%esp 108099: 8d 75 cc lea -0x34(%ebp),%esi 10809c: 56 push %esi 10809d: 89 55 c4 mov %edx,-0x3c(%ebp) 1080a0: e8 d3 7b 00 00 call 10fc78 /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 1080a5: 8b 55 c4 mov -0x3c(%ebp),%edx 1080a8: 8b 42 50 mov 0x50(%edx),%eax 1080ab: 8b 48 34 mov 0x34(%eax),%ecx 1080ae: 83 c4 10 add $0x10,%esp 1080b1: 66 83 f9 01 cmp $0x1,%cx 1080b5: 74 27 je 1080de if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 1080b7: 49 dec %ecx 1080b8: 66 89 48 34 mov %cx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 1080bc: 83 ec 08 sub $0x8,%esp 1080bf: 6a 00 push $0x0 1080c1: 8d 45 e0 lea -0x20(%ebp),%eax 1080c4: 50 push %eax 1080c5: 89 55 c4 mov %edx,-0x3c(%ebp) 1080c8: e8 93 05 00 00 call 108660 1080cd: 8b 55 c4 mov -0x3c(%ebp),%edx 1080d0: 8b 42 50 mov 0x50(%edx),%eax 1080d3: 8b 55 e0 mov -0x20(%ebp),%edx 1080d6: 89 50 48 mov %edx,0x48(%eax) 1080d9: 83 c4 10 add $0x10,%esp 1080dc: eb 8a jmp 108068 * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 1080de: 83 ec 08 sub $0x8,%esp 1080e1: 56 push %esi 1080e2: ff 75 08 pushl 0x8(%ebp) 1080e5: 8b 45 d4 mov -0x2c(%ebp),%eax 1080e8: ff 50 34 call *0x34(%eax) if ( result != 0 ) 1080eb: 83 c4 10 add $0x10,%esp 1080ee: 85 c0 test %eax,%eax 1080f0: 0f 84 72 ff ff ff je 108068 1080f6: b8 ff ff ff ff mov $0xffffffff,%eax 1080fb: e9 78 ff ff ff jmp 108078 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 108100: e8 3b bd 00 00 call 113e40 <__errno> <== NOT EXECUTED 108105: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10810b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108110: e9 63 ff ff ff jmp 108078 <== NOT EXECUTED =============================================================================== 00108118 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 108118: 55 push %ebp 108119: 89 e5 mov %esp,%ebp 10811b: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 10811e: 8b 45 08 mov 0x8(%ebp),%eax 108121: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 108124: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 108128: 75 12 jne 10813c <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 10812a: 8b 50 5c mov 0x5c(%eax),%edx 10812d: 85 d2 test %edx,%edx 10812f: 74 1d je 10814e <== NEVER TAKEN /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 108131: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) 108138: 31 c0 xor %eax,%eax return 0; } 10813a: c9 leave 10813b: c3 ret /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10813c: e8 ff bc 00 00 call 113e40 <__errno> <== NOT EXECUTED 108141: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 108147: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 10814c: c9 leave <== NOT EXECUTED 10814d: c3 ret <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 10814e: e8 ed bc 00 00 call 113e40 <__errno> <== NOT EXECUTED 108153: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108159: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 10815e: c9 leave <== NOT EXECUTED 10815f: c3 ret <== NOT EXECUTED =============================================================================== 00108810 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 108810: 55 push %ebp 108811: 89 e5 mov %esp,%ebp 108813: 57 push %edi 108814: 56 push %esi 108815: 53 push %ebx 108816: 83 ec 0c sub $0xc,%esp 108819: 8b 5d 08 mov 0x8(%ebp),%ebx 10881c: 8b 75 0c mov 0xc(%ebp),%esi #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 10881f: a1 e8 55 12 00 mov 0x1255e8,%eax 108824: 85 c0 test %eax,%eax 108826: 74 02 je 10882a (*rtems_malloc_statistics_helpers->initialize)(); 108828: ff 10 call *(%eax) } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 10882a: e8 79 ff ff ff call 1087a8 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 10882f: a1 ec 55 12 00 mov 0x1255ec,%eax 108834: 85 c0 test %eax,%eax 108836: 74 13 je 10884b <== ALWAYS TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 108838: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10883b: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10883e: 53 push %ebx <== NOT EXECUTED 10883f: ff 10 call *(%eax) <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 108841: 8d 34 33 lea (%ebx,%esi,1),%esi <== NOT EXECUTED 108844: 29 c6 sub %eax,%esi <== NOT EXECUTED 108846: 89 c3 mov %eax,%ebx <== NOT EXECUTED 108848: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 10884b: 80 3d e5 55 12 00 00 cmpb $0x0,0x1255e5 108852: 75 1f jne 108873 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 108854: 80 3d 48 32 12 00 00 cmpb $0x0,0x123248 10885b: 75 3f jne 10889c void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 10885d: 6a 04 push $0x4 10885f: 56 push %esi 108860: 53 push %ebx 108861: ff 35 58 31 12 00 pushl 0x123158 108867: e8 6c 42 00 00 call 10cad8 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 10886c: 83 c4 10 add $0x10,%esp 10886f: 85 c0 test %eax,%eax 108871: 74 3c je 1088af <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 108873: 8b 1d 00 72 12 00 mov 0x127200,%ebx 108879: 83 ec 0c sub $0xc,%esp 10887c: ff 35 58 31 12 00 pushl 0x123158 108882: e8 c5 4d 00 00 call 10d64c <_Protected_heap_Get_size> 108887: 8d 1c 18 lea (%eax,%ebx,1),%ebx 10888a: 89 1d 00 72 12 00 mov %ebx,0x127200 108890: 83 c4 10 add $0x10,%esp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 108893: 8d 65 f4 lea -0xc(%ebp),%esp 108896: 5b pop %ebx 108897: 5e pop %esi 108898: 5f pop %edi 108899: c9 leave 10889a: c3 ret 10889b: 90 nop if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 10889c: 31 c0 xor %eax,%eax 10889e: 89 df mov %ebx,%edi 1088a0: 89 f1 mov %esi,%ecx 1088a2: f3 aa rep stos %al,%es:(%edi) * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 1088a4: 80 3d e5 55 12 00 00 cmpb $0x0,0x1255e5 1088ab: 74 b0 je 10885d <== ALWAYS TAKEN 1088ad: eb c4 jmp 108873 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 1088af: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1088b2: 6a 1a push $0x1a <== NOT EXECUTED 1088b4: e8 3b 3a 00 00 call 10c2f4 <== NOT EXECUTED =============================================================================== 0010cda8 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 10cda8: 55 push %ebp <== NOT EXECUTED 10cda9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cdab: 57 push %edi <== NOT EXECUTED 10cdac: 56 push %esi <== NOT EXECUTED 10cdad: 53 push %ebx <== NOT EXECUTED 10cdae: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 10cdb1: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 10cdb4: 85 db test %ebx,%ebx <== NOT EXECUTED 10cdb6: 0f 84 c5 00 00 00 je 10ce81 <== NOT EXECUTED return; if ( !print_handler ) 10cdbc: a1 34 00 17 00 mov 0x170034,%eax <== NOT EXECUTED 10cdc1: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 10cdc4: 85 c0 test %eax,%eax <== NOT EXECUTED 10cdc6: 0f 84 b5 00 00 00 je 10ce81 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 10cdcc: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 10cdcf: 0f 84 d7 00 00 00 je 10ceac <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 10cdd5: 8d b3 c0 00 00 00 lea 0xc0(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 10cddb: 8b 93 d4 00 00 00 mov 0xd4(%ebx),%edx <== NOT EXECUTED 10cde1: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 10cde4: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 10cde7: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 10cdea: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 10cded: 8b 3e mov (%esi),%edi <== NOT EXECUTED 10cdef: 83 ef 10 sub $0x10,%edi <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 10cdf2: 57 push %edi <== NOT EXECUTED 10cdf3: 50 push %eax <== NOT EXECUTED 10cdf4: e8 77 ff ff ff call 10cd70 <== NOT EXECUTED if ( high_water_mark ) 10cdf9: 59 pop %ecx <== NOT EXECUTED 10cdfa: 5a pop %edx <== NOT EXECUTED 10cdfb: 85 c0 test %eax,%eax <== NOT EXECUTED 10cdfd: 0f 84 c9 00 00 00 je 10cecc <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 10ce03: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10ce06: 01 fa add %edi,%edx <== NOT EXECUTED 10ce08: 29 c2 sub %eax,%edx <== NOT EXECUTED 10ce0a: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED else used = 0; if ( the_thread ) { 10ce0d: 85 db test %ebx,%ebx <== NOT EXECUTED 10ce0f: 0f 84 c7 00 00 00 je 10cedc <== NOT EXECUTED (*print_handler)( 10ce15: 52 push %edx <== NOT EXECUTED 10ce16: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 10ce19: 50 push %eax <== NOT EXECUTED 10ce1a: 6a 05 push $0x5 <== NOT EXECUTED 10ce1c: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10ce1f: e8 f4 5d 00 00 call 112c18 <== NOT EXECUTED 10ce24: 50 push %eax <== NOT EXECUTED 10ce25: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10ce28: 68 0c f5 15 00 push $0x15f50c <== NOT EXECUTED 10ce2d: ff 35 30 00 17 00 pushl 0x170030 <== NOT EXECUTED 10ce33: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 10ce36: 83 c4 20 add $0x20,%esp <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 10ce39: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 10ce3c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10ce3f: 57 push %edi <== NOT EXECUTED 10ce40: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 10ce43: 8b 16 mov (%esi),%edx <== NOT EXECUTED 10ce45: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 10ce49: 52 push %edx <== NOT EXECUTED 10ce4a: 50 push %eax <== NOT EXECUTED 10ce4b: 68 27 f5 15 00 push $0x15f527 <== NOT EXECUTED 10ce50: ff 35 30 00 17 00 pushl 0x170030 <== NOT EXECUTED 10ce56: ff 15 34 00 17 00 call *0x170034 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 10ce5c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10ce5f: 8b 1d 2c 00 17 00 mov 0x17002c,%ebx <== NOT EXECUTED 10ce65: 85 db test %ebx,%ebx <== NOT EXECUTED 10ce67: 74 23 je 10ce8c <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 10ce69: 51 push %ecx <== NOT EXECUTED 10ce6a: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10ce6d: 68 52 f5 15 00 push $0x15f552 <== NOT EXECUTED 10ce72: ff 35 30 00 17 00 pushl 0x170030 <== NOT EXECUTED 10ce78: ff 15 34 00 17 00 call *0x170034 <== NOT EXECUTED 10ce7e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 10ce81: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10ce84: 5b pop %ebx <== NOT EXECUTED 10ce85: 5e pop %esi <== NOT EXECUTED 10ce86: 5f pop %edi <== NOT EXECUTED 10ce87: c9 leave <== NOT EXECUTED 10ce88: c3 ret <== NOT EXECUTED 10ce89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 10ce8c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10ce8f: 68 45 f5 15 00 push $0x15f545 <== NOT EXECUTED 10ce94: ff 35 30 00 17 00 pushl 0x170030 <== NOT EXECUTED 10ce9a: ff 15 34 00 17 00 call *0x170034 <== NOT EXECUTED 10cea0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 10cea3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10cea6: 5b pop %ebx <== NOT EXECUTED 10cea7: 5e pop %esi <== NOT EXECUTED 10cea8: 5f pop %edi <== NOT EXECUTED 10cea9: c9 leave <== NOT EXECUTED 10ceaa: c3 ret <== NOT EXECUTED 10ceab: 90 nop <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 10ceac: 8b 0d 34 2d 17 00 mov 0x172d34,%ecx <== NOT EXECUTED 10ceb2: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10ceb4: 74 cb je 10ce81 <== NOT EXECUTED 10ceb6: be 30 2d 17 00 mov $0x172d30,%esi <== NOT EXECUTED 10cebb: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED 10cec2: 31 db xor %ebx,%ebx <== NOT EXECUTED 10cec4: e9 1b ff ff ff jmp 10cde4 <== NOT EXECUTED 10cec9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 10cecc: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 10ced3: 85 db test %ebx,%ebx <== NOT EXECUTED 10ced5: 0f 85 3a ff ff ff jne 10ce15 <== NOT EXECUTED 10cedb: 90 nop <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 10cedc: 50 push %eax <== NOT EXECUTED 10cedd: 6a ff push $0xffffffff <== NOT EXECUTED 10cedf: 68 19 f5 15 00 push $0x15f519 <== NOT EXECUTED 10cee4: ff 35 30 00 17 00 pushl 0x170030 <== NOT EXECUTED 10ceea: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 10ceed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cef0: e9 44 ff ff ff jmp 10ce39 <== NOT EXECUTED =============================================================================== 0010d100 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 10d100: 55 push %ebp 10d101: 89 e5 mov %esp,%ebp 10d103: 57 push %edi static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if (Stack_check_Initialized) 10d104: 8b 3d 2c 00 17 00 mov 0x17002c,%edi 10d10a: 85 ff test %edi,%edi 10d10c: 75 4d jne 10d15b 10d10e: 31 c0 xor %eax,%eax /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 10d110: 89 c2 mov %eax,%edx 10d112: 83 e2 03 and $0x3,%edx 10d115: 8b 14 95 90 f6 15 00 mov 0x15f690(,%edx,4),%edx 10d11c: 89 14 85 20 2d 17 00 mov %edx,0x172d20(,%eax,4) /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 10d123: 40 inc %eax 10d124: 83 f8 04 cmp $0x4,%eax 10d127: 75 e7 jne 10d110 /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 10d129: 8b 15 c8 2e 17 00 mov 0x172ec8,%edx 10d12f: 85 d2 test %edx,%edx 10d131: 74 1e je 10d151 <== NEVER TAKEN 10d133: 8b 0d 88 2e 17 00 mov 0x172e88,%ecx 10d139: 85 c9 test %ecx,%ecx 10d13b: 74 14 je 10d151 <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 10d13d: 89 15 34 2d 17 00 mov %edx,0x172d34 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 10d143: 29 d1 sub %edx,%ecx 10d145: 89 0d 30 2d 17 00 mov %ecx,0x172d30 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 10d14b: b0 a5 mov $0xa5,%al 10d14d: 89 d7 mov %edx,%edi 10d14f: f3 aa rep stos %al,%es:(%edi) } #endif Stack_check_Initialized = 1; 10d151: c7 05 2c 00 17 00 01 movl $0x1,0x17002c 10d158: 00 00 00 } 10d15b: 5f pop %edi 10d15c: c9 leave 10d15d: c3 ret =============================================================================== 0010cd70 : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 10cd70: 55 push %ebp <== NOT EXECUTED 10cd71: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cd73: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 10cd76: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 10cd79: 8d 41 10 lea 0x10(%ecx),%eax <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 10cd7c: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED 10cd7f: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 10cd82: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10cd84: 73 1d jae 10cda3 <== NOT EXECUTED if (*base != U32_PATTERN) 10cd86: 81 79 10 a5 a5 a5 a5 cmpl $0xa5a5a5a5,0x10(%ecx) <== NOT EXECUTED 10cd8d: 74 0d je 10cd9c <== NOT EXECUTED 10cd8f: eb 14 jmp 10cda5 <== NOT EXECUTED 10cd91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10cd94: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED 10cd9a: 75 09 jne 10cda5 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 10cd9c: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 10cd9f: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10cda1: 77 f1 ja 10cd94 <== NOT EXECUTED 10cda3: 31 c0 xor %eax,%eax <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 10cda5: c9 leave <== NOT EXECUTED 10cda6: c3 ret <== NOT EXECUTED =============================================================================== 0010cf74 : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 10cf74: 55 push %ebp <== NOT EXECUTED 10cf75: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cf77: 56 push %esi <== NOT EXECUTED 10cf78: 53 push %ebx <== NOT EXECUTED 10cf79: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 10cf7c: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10cf7f: 8a 55 0c mov 0xc(%ebp),%dl <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 10cf82: 8b b3 c4 00 00 00 mov 0xc4(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 10cf88: 68 6f f5 15 00 push $0x15f56f <== NOT EXECUTED 10cf8d: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 10cf90: e8 17 2b 00 00 call 10faac <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 10cf95: 58 pop %eax <== NOT EXECUTED 10cf96: 5a pop %edx <== NOT EXECUTED 10cf97: 53 push %ebx <== NOT EXECUTED 10cf98: 68 7f f5 15 00 push $0x15f57f <== NOT EXECUTED 10cf9d: e8 0a 2b 00 00 call 10faac <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 10cfa2: 5a pop %edx <== NOT EXECUTED 10cfa3: 59 pop %ecx <== NOT EXECUTED 10cfa4: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10cfa7: 68 9c f5 15 00 push $0x15f59c <== NOT EXECUTED 10cfac: e8 fb 2a 00 00 call 10faac <== NOT EXECUTED printk( 10cfb1: 59 pop %ecx <== NOT EXECUTED 10cfb2: 58 pop %eax <== NOT EXECUTED 10cfb3: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 10cfb6: 68 ae f5 15 00 push $0x15f5ae <== NOT EXECUTED 10cfbb: e8 ec 2a 00 00 call 10faac <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 10cfc0: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10cfc3: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 10cfc6: 50 push %eax <== NOT EXECUTED 10cfc7: 6a 20 push $0x20 <== NOT EXECUTED 10cfc9: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10cfcc: e8 47 5c 00 00 call 112c18 <== NOT EXECUTED 10cfd1: 59 pop %ecx <== NOT EXECUTED 10cfd2: 5a pop %edx <== NOT EXECUTED 10cfd3: 50 push %eax <== NOT EXECUTED 10cfd4: 68 c2 f5 15 00 push $0x15f5c2 <== NOT EXECUTED 10cfd9: e8 ce 2a 00 00 call 10faac <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 10cfde: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx <== NOT EXECUTED 10cfe4: 8b 83 c0 00 00 00 mov 0xc0(%ebx),%eax <== NOT EXECUTED 10cfea: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 10cfed: 53 push %ebx <== NOT EXECUTED 10cfee: 51 push %ecx <== NOT EXECUTED 10cfef: 50 push %eax <== NOT EXECUTED 10cff0: 68 24 f6 15 00 push $0x15f624 <== NOT EXECUTED 10cff5: e8 b2 2a 00 00 call 10faac <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 10cffa: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10cffd: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 10d000: 84 d2 test %dl,%dl <== NOT EXECUTED 10d002: 74 10 je 10d014 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 10d004: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d007: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 10d00c: e8 2b 66 00 00 call 11363c <== NOT EXECUTED 10d011: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 10d014: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 10d017: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 10d01a: 56 push %esi <== NOT EXECUTED 10d01b: 50 push %eax <== NOT EXECUTED 10d01c: 6a 10 push $0x10 <== NOT EXECUTED 10d01e: 68 58 f6 15 00 push $0x15f658 <== NOT EXECUTED 10d023: e8 84 2a 00 00 call 10faac <== NOT EXECUTED 10d028: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d02b: eb d7 jmp 10d004 <== NOT EXECUTED =============================================================================== 00145cfc : return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 145cfc: 55 push %ebp <== NOT EXECUTED 145cfd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 145cff: 57 push %edi <== NOT EXECUTED 145d00: 56 push %esi <== NOT EXECUTED 145d01: 53 push %ebx <== NOT EXECUTED 145d02: 83 ec 5c sub $0x5c,%esp <== NOT EXECUTED 145d05: 89 45 b8 mov %eax,-0x48(%ebp) <== NOT EXECUTED 145d08: 89 55 a4 mov %edx,-0x5c(%ebp) <== NOT EXECUTED 145d0b: 89 4d ac mov %ecx,-0x54(%ebp) <== NOT EXECUTED 145d0e: 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; 145d11: c6 01 00 movb $0x0,(%ecx) <== NOT EXECUTED /* * Load the bitmap. */ rc = rtems_rfs_bitmap_load_map (control, &map); 145d14: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED 145d17: e8 00 fc ff ff call 14591c <== NOT EXECUTED if (rc > 0) 145d1c: 85 c0 test %eax,%eax <== NOT EXECUTED 145d1e: 7e 08 jle 145d28 <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); return 0; } 145d20: 83 c4 5c add $0x5c,%esp <== NOT EXECUTED 145d23: 5b pop %ebx <== NOT EXECUTED 145d24: 5e pop %esi <== NOT EXECUTED 145d25: 5f pop %edi <== NOT EXECUTED 145d26: c9 leave <== NOT EXECUTED 145d27: c3 ret <== NOT EXECUTED return rc; /* * Calculate the bit we are testing plus the end point we search over. */ test_bit = *bit; 145d28: 8b 45 a4 mov -0x5c(%ebp),%eax <== NOT EXECUTED 145d2b: 8b 10 mov (%eax),%edx <== NOT EXECUTED end_bit = test_bit + (window * direction); 145d2d: 89 de mov %ebx,%esi <== NOT EXECUTED 145d2f: c1 e6 0b shl $0xb,%esi <== NOT EXECUTED if (end_bit < 0) 145d32: 01 d6 add %edx,%esi <== NOT EXECUTED 145d34: 0f 88 cf 01 00 00 js 145f09 <== NOT EXECUTED end_bit = 0; else if (end_bit >= control->size) 145d3a: 8b 4d b8 mov -0x48(%ebp),%ecx <== NOT EXECUTED 145d3d: 8b 41 0c mov 0xc(%ecx),%eax <== NOT EXECUTED 145d40: 39 c6 cmp %eax,%esi <== NOT EXECUTED 145d42: 0f 83 94 01 00 00 jae 145edc <== NOT EXECUTED end_bit = control->size - 1; map_index = rtems_rfs_bitmap_map_index (test_bit); 145d48: 89 d7 mov %edx,%edi <== NOT EXECUTED 145d4a: c1 ff 05 sar $0x5,%edi <== NOT EXECUTED 145d4d: 89 7d c8 mov %edi,-0x38(%ebp) <== NOT EXECUTED map_offset = rtems_rfs_bitmap_map_offset (test_bit); 145d50: 89 d7 mov %edx,%edi <== NOT EXECUTED 145d52: 83 e7 1f and $0x1f,%edi <== NOT EXECUTED search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); 145d55: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 145d58: 83 e1 1f and $0x1f,%ecx <== NOT EXECUTED search_bits = &control->search_bits[search_index]; 145d5b: 89 d0 mov %edx,%eax <== NOT EXECUTED 145d5d: c1 f8 0a sar $0xa,%eax <== NOT EXECUTED 145d60: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED 145d63: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED 145d66: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED 145d69: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 145d6c: 01 45 b4 add %eax,-0x4c(%ebp) <== NOT EXECUTED map_bits = &map[map_index]; 145d6f: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 145d72: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED 145d75: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 145d78: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 145d7b: 01 45 cc add %eax,-0x34(%ebp) <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 145d7e: 8d 04 9d 00 00 00 00 lea 0x0(,%ebx,4),%eax <== NOT EXECUTED 145d85: 89 45 b0 mov %eax,-0x50(%ebp) <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 145d88: 89 d8 mov %ebx,%eax <== NOT EXECUTED 145d8a: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 145d8d: 89 45 a8 mov %eax,-0x58(%ebp) <== NOT EXECUTED 145d90: 89 f8 mov %edi,%eax <== NOT EXECUTED /* * If any bit is clear find that bit and then search the map element. If * all bits are set there are no map bits so move to the next search * element. */ if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) 145d92: 8b 7d b4 mov -0x4c(%ebp),%edi <== NOT EXECUTED 145d95: 8b 3f mov (%edi),%edi <== NOT EXECUTED 145d97: 89 7d bc mov %edi,-0x44(%ebp) <== NOT EXECUTED 145d9a: 85 ff test %edi,%edi <== NOT EXECUTED 145d9c: 0f 84 a6 00 00 00 je 145e48 <== NOT EXECUTED 145da2: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 145da5: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 145da8: 01 d9 add %ebx,%ecx <== NOT EXECUTED 145daa: c1 e1 05 shl $0x5,%ecx <== NOT EXECUTED 145dad: 83 c1 1f add $0x1f,%ecx <== NOT EXECUTED 145db0: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED * all bits are set there are no map bits so move to the next search * element. */ if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) { while ((search_offset >= 0) 145db3: 83 7d d0 1f cmpl $0x1f,-0x30(%ebp) <== NOT EXECUTED 145db7: 0f 87 b6 00 00 00 ja 145e73 <== 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); 145dbd: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 145dc2: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 145dc5: d3 e7 shl %cl,%edi <== NOT EXECUTED 145dc7: 89 7d c0 mov %edi,-0x40(%ebp) <== NOT EXECUTED if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) { while ((search_offset >= 0) && (search_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*search_bits, search_offset)) 145dca: 8b 4d bc mov -0x44(%ebp),%ecx <== NOT EXECUTED 145dcd: 85 cf test %ecx,%edi <== NOT EXECUTED 145dcf: 74 4b je 145e1c <== 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)) 145dd1: 8b 7d cc mov -0x34(%ebp),%edi <== NOT EXECUTED 145dd4: 8b 3f mov (%edi),%edi <== NOT EXECUTED 145dd6: 89 7d d4 mov %edi,-0x2c(%ebp) <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 145dd9: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 145dde: 88 c1 mov %al,%cl <== NOT EXECUTED 145de0: d3 e7 shl %cl,%edi <== NOT EXECUTED * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) 145de2: 85 7d d4 test %edi,-0x2c(%ebp) <== NOT EXECUTED 145de5: 0f 85 b9 00 00 00 jne 145ea4 <== NOT EXECUTED *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); return 0; } if (test_bit == end_bit) 145deb: 39 d6 cmp %edx,%esi <== NOT EXECUTED 145ded: 74 2d je 145e1c <== NOT EXECUTED 145def: 8d 0c 18 lea (%eax,%ebx,1),%ecx <== NOT EXECUTED 145df2: 8d 04 1a lea (%edx,%ebx,1),%eax <== NOT EXECUTED 145df5: eb 1f jmp 145e16 <== NOT EXECUTED 145df7: 90 nop <== NOT EXECUTED 145df8: 89 c2 mov %eax,%edx <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 145dfa: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 145dff: d3 e7 shl %cl,%edi <== NOT EXECUTED * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) 145e01: 85 7d d4 test %edi,-0x2c(%ebp) <== NOT EXECUTED 145e04: 0f 85 9a 00 00 00 jne 145ea4 <== NOT EXECUTED *search_bits = rtems_rfs_bitmap_set (*search_bits, 1 << search_offset); control->free--; *bit = test_bit; *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); 145e0a: 01 d9 add %ebx,%ecx <== NOT EXECUTED 145e0c: 01 d8 add %ebx,%eax <== NOT EXECUTED return 0; } if (test_bit == end_bit) 145e0e: 89 c2 mov %eax,%edx <== NOT EXECUTED 145e10: 29 da sub %ebx,%edx <== NOT EXECUTED 145e12: 39 d6 cmp %edx,%esi <== NOT EXECUTED 145e14: 74 06 je 145e1c <== 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) 145e16: 83 f9 1f cmp $0x1f,%ecx <== NOT EXECUTED 145e19: 76 dd jbe 145df8 <== NOT EXECUTED 145e1b: 90 nop <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 145e1c: 8b 4d b0 mov -0x50(%ebp),%ecx <== NOT EXECUTED 145e1f: 01 4d cc add %ecx,-0x34(%ebp) <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 145e22: 01 5d c8 add %ebx,-0x38(%ebp) <== NOT EXECUTED } } map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 145e25: 83 fb 00 cmp $0x0,%ebx <== NOT EXECUTED 145e28: 7e 66 jle 145e90 <== NOT EXECUTED search_bits += direction; search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 145e2a: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 145e2d: 83 ea 1f sub $0x1f,%edx <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 145e30: 39 d6 cmp %edx,%esi <== NOT EXECUTED 145e32: 0f 8e df 00 00 00 jle 145f17 <== NOT EXECUTED 145e38: 31 c0 xor %eax,%eax <== NOT EXECUTED 145e3a: 01 5d d0 add %ebx,-0x30(%ebp) <== NOT EXECUTED 145e3d: 8b 7d a8 mov -0x58(%ebp),%edi <== NOT EXECUTED 145e40: 01 7d c4 add %edi,-0x3c(%ebp) <== NOT EXECUTED 145e43: e9 6b ff ff ff jmp 145db3 <== 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); 145e48: 83 e2 e0 and $0xffffffe0,%edx <== NOT EXECUTED if (direction > 0) 145e4b: 85 db test %ebx,%ebx <== NOT EXECUTED 145e4d: 0f 8e a1 00 00 00 jle 145ef4 <== NOT EXECUTED { bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset; 145e53: bf 20 00 00 00 mov $0x20,%edi <== NOT EXECUTED 145e58: 29 cf sub %ecx,%edi <== NOT EXECUTED test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); 145e5a: 89 f8 mov %edi,%eax <== NOT EXECUTED 145e5c: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 145e5f: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 145e62: 31 c0 xor %eax,%eax <== NOT EXECUTED * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; map_offset = rtems_rfs_bitmap_element_bits () - 1; } map_bits += direction * bits_skipped; 145e64: 0f af fb imul %ebx,%edi <== NOT EXECUTED 145e67: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 145e6a: 8d 0c b9 lea (%ecx,%edi,4),%ecx <== NOT EXECUTED 145e6d: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED map_index += direction * bits_skipped; 145e70: 01 7d c8 add %edi,-0x38(%ebp) <== NOT EXECUTED } search_bits += direction; 145e73: 8b 7d b0 mov -0x50(%ebp),%edi <== NOT EXECUTED 145e76: 01 7d b4 add %edi,-0x4c(%ebp) <== NOT EXECUTED search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 145e79: 83 fb 00 cmp $0x0,%ebx <== NOT EXECUTED 145e7c: 7e 66 jle 145ee4 <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 145e7e: 39 d6 cmp %edx,%esi <== NOT EXECUTED 145e80: 0f 8c 8a 00 00 00 jl 145f10 <== NOT EXECUTED 145e86: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 145e88: e9 05 ff ff ff jmp 145d92 <== NOT EXECUTED 145e8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 145e90: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 145e93: 74 08 je 145e9d <== NOT EXECUTED 145e95: 39 d6 cmp %edx,%esi <== NOT EXECUTED 145e97: 0f 8d 87 00 00 00 jge 145f24 <== NOT EXECUTED 145e9d: b8 1f 00 00 00 mov $0x1f,%eax <== NOT EXECUTED 145ea2: eb 96 jmp 145e3a <== 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); 145ea4: f7 d7 not %edi <== NOT EXECUTED 145ea6: 23 7d d4 and -0x2c(%ebp),%edi <== NOT EXECUTED while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) { *map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset); 145ea9: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 145eac: 89 38 mov %edi,(%eax) <== NOT EXECUTED if (rtems_rfs_bitmap_match(*map_bits, 145eae: 85 ff test %edi,%edi <== NOT EXECUTED 145eb0: 75 0a jne 145ebc <== NOT EXECUTED RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 145eb2: 8b 45 c0 mov -0x40(%ebp),%eax <== NOT EXECUTED 145eb5: f7 d0 not %eax <== NOT EXECUTED 145eb7: 8b 4d b4 mov -0x4c(%ebp),%ecx <== NOT EXECUTED 145eba: 21 01 and %eax,(%ecx) <== NOT EXECUTED 1 << search_offset); control->free--; 145ebc: 8b 7d b8 mov -0x48(%ebp),%edi <== NOT EXECUTED 145ebf: ff 4f 10 decl 0x10(%edi) <== NOT EXECUTED *bit = test_bit; 145ec2: 8b 45 a4 mov -0x5c(%ebp),%eax <== NOT EXECUTED 145ec5: 89 10 mov %edx,(%eax) <== NOT EXECUTED *found = true; 145ec7: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED 145eca: c6 02 01 movb $0x1,(%edx) <== NOT EXECUTED rtems_rfs_buffer_mark_dirty (control->buffer); 145ecd: 8b 07 mov (%edi),%eax <== NOT EXECUTED 145ecf: c6 00 01 movb $0x1,(%eax) <== NOT EXECUTED 145ed2: 31 c0 xor %eax,%eax <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); return 0; } 145ed4: 83 c4 5c add $0x5c,%esp <== NOT EXECUTED 145ed7: 5b pop %ebx <== NOT EXECUTED 145ed8: 5e pop %esi <== NOT EXECUTED 145ed9: 5f pop %edi <== NOT EXECUTED 145eda: c9 leave <== NOT EXECUTED 145edb: c3 ret <== NOT EXECUTED end_bit = test_bit + (window * direction); if (end_bit < 0) end_bit = 0; else if (end_bit >= control->size) end_bit = control->size - 1; 145edc: 8d 70 ff lea -0x1(%eax),%esi <== NOT EXECUTED 145edf: e9 64 fe ff ff jmp 145d48 <== NOT EXECUTED search_bits += direction; search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 145ee4: 74 2a je 145f10 <== NOT EXECUTED 145ee6: 39 d6 cmp %edx,%esi <== NOT EXECUTED 145ee8: 7f 26 jg 145f10 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 145eea: b9 1f 00 00 00 mov $0x1f,%ecx <== NOT EXECUTED 145eef: e9 9e fe ff ff jmp 145d92 <== NOT EXECUTED test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); map_offset = 0; } else { bits_skipped = search_offset + 1; 145ef4: 8d 79 01 lea 0x1(%ecx),%edi <== NOT EXECUTED /* * Need to remove 1 for the rounding up. The above rounds down and * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; 145ef7: c1 e1 05 shl $0x5,%ecx <== NOT EXECUTED 145efa: f7 d1 not %ecx <== NOT EXECUTED 145efc: 8d 14 11 lea (%ecx,%edx,1),%edx <== NOT EXECUTED 145eff: b8 1f 00 00 00 mov $0x1f,%eax <== NOT EXECUTED 145f04: e9 5b ff ff ff jmp 145e64 <== NOT EXECUTED * Calculate the bit we are testing plus the end point we search over. */ test_bit = *bit; end_bit = test_bit + (window * direction); if (end_bit < 0) 145f09: 31 f6 xor %esi,%esi <== NOT EXECUTED 145f0b: e9 38 fe ff ff jmp 145d48 <== NOT EXECUTED search_bits += direction; search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 145f10: 31 c0 xor %eax,%eax <== NOT EXECUTED 145f12: e9 09 fe ff ff jmp 145d20 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 145f17: 8b 4d b0 mov -0x50(%ebp),%ecx <== NOT EXECUTED 145f1a: 01 4d b4 add %ecx,-0x4c(%ebp) <== NOT EXECUTED 145f1d: 31 c0 xor %eax,%eax <== NOT EXECUTED 145f1f: e9 5a ff ff ff jmp 145e7e <== NOT EXECUTED 145f24: 8b 45 b0 mov -0x50(%ebp),%eax <== NOT EXECUTED 145f27: 01 45 b4 add %eax,-0x4c(%ebp) <== NOT EXECUTED 145f2a: b8 1f 00 00 00 mov $0x1f,%eax <== NOT EXECUTED 145f2f: eb b5 jmp 145ee6 <== NOT EXECUTED =============================================================================== 0010c43c <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10c43c: 55 push %ebp 10c43d: 89 e5 mov %esp,%ebp 10c43f: 53 push %ebx 10c440: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c443: 8b 1d b8 75 12 00 mov 0x1275b8,%ebx 10c449: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c44f: 74 10 je 10c461 <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10c451: 8d 76 00 lea 0x0(%esi),%esi * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 10c454: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10c457: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c459: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c45f: 75 f3 jne 10c454 <_API_extensions_Run_postdriver+0x18><== NEVER TAKEN #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10c461: 58 pop %eax 10c462: 5b pop %ebx 10c463: c9 leave 10c464: c3 ret =============================================================================== 0010c468 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10c468: 55 push %ebp 10c469: 89 e5 mov %esp,%ebp 10c46b: 53 push %ebx 10c46c: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c46f: 8b 1d b8 75 12 00 mov 0x1275b8,%ebx 10c475: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c47b: 74 1c je 10c499 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10c47d: 8d 76 00 lea 0x0(%esi),%esi * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 10c480: 83 ec 0c sub $0xc,%esp 10c483: ff 35 18 74 12 00 pushl 0x127418 10c489: ff 53 0c call *0xc(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10c48c: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c48e: 83 c4 10 add $0x10,%esp 10c491: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c497: 75 e7 jne 10c480 <_API_extensions_Run_postswitch+0x18><== NEVER TAKEN #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10c499: 8b 5d fc mov -0x4(%ebp),%ebx 10c49c: c9 leave 10c49d: c3 ret =============================================================================== 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 =============================================================================== 0011a144 <_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 ) { 11a144: 55 push %ebp 11a145: 89 e5 mov %esp,%ebp 11a147: 57 push %edi 11a148: 56 push %esi 11a149: 53 push %ebx 11a14a: 83 ec 1c sub $0x1c,%esp 11a14d: 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 ) { 11a150: 8b 45 10 mov 0x10(%ebp),%eax 11a153: 39 43 4c cmp %eax,0x4c(%ebx) 11a156: 72 60 jb 11a1b8 <_CORE_message_queue_Broadcast+0x74><== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 11a158: 8b 43 48 mov 0x48(%ebx),%eax 11a15b: 85 c0 test %eax,%eax 11a15d: 75 45 jne 11a1a4 <_CORE_message_queue_Broadcast+0x60> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 11a15f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11a166: eb 18 jmp 11a180 <_CORE_message_queue_Broadcast+0x3c> waitp = &the_thread->Wait; number_broadcasted += 1; 11a168: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11a16b: 8b 42 2c mov 0x2c(%edx),%eax 11a16e: 89 c7 mov %eax,%edi 11a170: 8b 75 0c mov 0xc(%ebp),%esi 11a173: 8b 4d 10 mov 0x10(%ebp),%ecx 11a176: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 11a178: 8b 42 28 mov 0x28(%edx),%eax 11a17b: 8b 55 10 mov 0x10(%ebp),%edx 11a17e: 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))) { 11a180: 83 ec 0c sub $0xc,%esp 11a183: 53 push %ebx 11a184: e8 b3 23 00 00 call 11c53c <_Thread_queue_Dequeue> 11a189: 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 = 11a18b: 83 c4 10 add $0x10,%esp 11a18e: 85 c0 test %eax,%eax 11a190: 75 d6 jne 11a168 <_CORE_message_queue_Broadcast+0x24> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 11a192: 8b 55 e4 mov -0x1c(%ebp),%edx 11a195: 8b 45 1c mov 0x1c(%ebp),%eax 11a198: 89 10 mov %edx,(%eax) 11a19a: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a19c: 8d 65 f4 lea -0xc(%ebp),%esp 11a19f: 5b pop %ebx 11a1a0: 5e pop %esi 11a1a1: 5f pop %edi 11a1a2: c9 leave 11a1a3: c3 ret * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 11a1a4: 8b 55 1c mov 0x1c(%ebp),%edx 11a1a7: c7 02 00 00 00 00 movl $0x0,(%edx) 11a1ad: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a1af: 8d 65 f4 lea -0xc(%ebp),%esp 11a1b2: 5b pop %ebx 11a1b3: 5e pop %esi 11a1b4: 5f pop %edi 11a1b5: c9 leave 11a1b6: c3 ret 11a1b7: 90 nop { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11a1b8: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a1bd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11a1c0: 5b pop %ebx <== NOT EXECUTED 11a1c1: 5e pop %esi <== NOT EXECUTED 11a1c2: 5f pop %edi <== NOT EXECUTED 11a1c3: c9 leave <== NOT EXECUTED 11a1c4: c3 ret <== NOT EXECUTED =============================================================================== 001152b4 <_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 ) { 1152b4: 55 push %ebp 1152b5: 89 e5 mov %esp,%ebp 1152b7: 57 push %edi 1152b8: 56 push %esi 1152b9: 53 push %ebx 1152ba: 83 ec 0c sub $0xc,%esp 1152bd: 8b 5d 08 mov 0x8(%ebp),%ebx 1152c0: 8b 75 10 mov 0x10(%ebp),%esi 1152c3: 8b 45 14 mov 0x14(%ebp),%eax size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 1152c6: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1152c9: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1152d0: 89 43 4c mov %eax,0x4c(%ebx) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 1152d3: a8 03 test $0x3,%al 1152d5: 75 19 jne 1152f0 <_CORE_message_queue_Initialize+0x3c> 1152d7: 89 c2 mov %eax,%edx /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 1152d9: 8d 7a 10 lea 0x10(%edx),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 1152dc: 89 f8 mov %edi,%eax 1152de: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 1152e1: 39 d0 cmp %edx,%eax 1152e3: 73 23 jae 115308 <_CORE_message_queue_Initialize+0x54><== ALWAYS TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 1152e5: 31 c0 xor %eax,%eax } 1152e7: 8d 65 f4 lea -0xc(%ebp),%esp 1152ea: 5b pop %ebx 1152eb: 5e pop %esi 1152ec: 5f pop %edi 1152ed: c9 leave 1152ee: c3 ret 1152ef: 90 nop * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 1152f0: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 1152f3: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 1152f6: 39 d0 cmp %edx,%eax 1152f8: 77 eb ja 1152e5 <_CORE_message_queue_Initialize+0x31><== 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)); 1152fa: 8d 7a 10 lea 0x10(%edx),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 1152fd: 89 f8 mov %edi,%eax 1152ff: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 115302: 39 d0 cmp %edx,%eax 115304: 72 df jb 1152e5 <_CORE_message_queue_Initialize+0x31><== NEVER TAKEN 115306: 66 90 xchg %ax,%ax return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 115308: 83 ec 0c sub $0xc,%esp 11530b: 50 push %eax 11530c: e8 a7 28 00 00 call 117bb8 <_Workspace_Allocate> 115311: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 115314: 83 c4 10 add $0x10,%esp 115317: 85 c0 test %eax,%eax 115319: 74 ca je 1152e5 <_CORE_message_queue_Initialize+0x31> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 11531b: 57 push %edi 11531c: 56 push %esi 11531d: 50 push %eax 11531e: 8d 43 60 lea 0x60(%ebx),%eax 115321: 50 push %eax 115322: e8 95 53 00 00 call 11a6bc <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 115327: 8d 43 54 lea 0x54(%ebx),%eax 11532a: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 11532d: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 115334: 8d 43 50 lea 0x50(%ebx),%eax 115337: 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( 11533a: 6a 06 push $0x6 11533c: 68 80 00 00 00 push $0x80 115341: 8b 45 0c mov 0xc(%ebp),%eax 115344: 83 38 01 cmpl $0x1,(%eax) 115347: 0f 94 c0 sete %al 11534a: 0f b6 c0 movzbl %al,%eax 11534d: 50 push %eax 11534e: 53 push %ebx 11534f: e8 94 1e 00 00 call 1171e8 <_Thread_queue_Initialize> 115354: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 115356: 83 c4 20 add $0x20,%esp } 115359: 8d 65 f4 lea -0xc(%ebp),%esp 11535c: 5b pop %ebx 11535d: 5e pop %esi 11535e: 5f pop %edi 11535f: c9 leave 115360: c3 ret =============================================================================== 0010c5e8 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10c5e8: 55 push %ebp 10c5e9: 89 e5 mov %esp,%ebp 10c5eb: 57 push %edi 10c5ec: 56 push %esi 10c5ed: 53 push %ebx 10c5ee: 83 ec 0c sub $0xc,%esp 10c5f1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c5f4: 8b 75 0c mov 0xc(%ebp),%esi CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10c5f7: 8b 45 10 mov 0x10(%ebp),%eax 10c5fa: 39 43 4c cmp %eax,0x4c(%ebx) 10c5fd: 72 79 jb 10c678 <_CORE_message_queue_Submit+0x90> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10c5ff: 8b 53 48 mov 0x48(%ebx),%edx 10c602: 85 d2 test %edx,%edx 10c604: 74 3e je 10c644 <_CORE_message_queue_Submit+0x5c> RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 10c606: 83 ec 0c sub $0xc,%esp 10c609: 8d 43 60 lea 0x60(%ebx),%eax 10c60c: 50 push %eax 10c60d: e8 b2 ff ff ff call 10c5c4 <_Chain_Get> 10c612: 89 c2 mov %eax,%edx * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ the_message = _CORE_message_queue_Allocate_message_buffer( the_message_queue ); if ( the_message ) { 10c614: 83 c4 10 add $0x10,%esp 10c617: 85 c0 test %eax,%eax 10c619: 74 6d je 10c688 <_CORE_message_queue_Submit+0xa0> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c61b: 8d 40 0c lea 0xc(%eax),%eax 10c61e: 89 c7 mov %eax,%edi 10c620: 8b 4d 10 mov 0x10(%ebp),%ecx 10c623: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10c625: 8b 4d 10 mov 0x10(%ebp),%ecx 10c628: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c62b: 50 push %eax 10c62c: ff 75 1c pushl 0x1c(%ebp) 10c62f: 52 push %edx 10c630: 53 push %ebx 10c631: e8 62 51 00 00 call 111798 <_CORE_message_queue_Insert_message> 10c636: 31 c0 xor %eax,%eax the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c638: 83 c4 10 add $0x10,%esp _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c63b: 8d 65 f4 lea -0xc(%ebp),%esp 10c63e: 5b pop %ebx 10c63f: 5e pop %esi 10c640: 5f pop %edi 10c641: c9 leave 10c642: c3 ret 10c643: 90 nop /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10c644: 83 ec 0c sub $0xc,%esp 10c647: 53 push %ebx 10c648: e8 1f 19 00 00 call 10df6c <_Thread_queue_Dequeue> 10c64d: 89 c2 mov %eax,%edx if ( the_thread ) { 10c64f: 83 c4 10 add $0x10,%esp 10c652: 85 c0 test %eax,%eax 10c654: 74 b0 je 10c606 <_CORE_message_queue_Submit+0x1e> 10c656: 8b 40 2c mov 0x2c(%eax),%eax 10c659: 89 c7 mov %eax,%edi 10c65b: 8b 4d 10 mov 0x10(%ebp),%ecx 10c65e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 10c660: 8b 42 28 mov 0x28(%edx),%eax 10c663: 8b 4d 10 mov 0x10(%ebp),%ecx 10c666: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c668: 8b 45 1c mov 0x1c(%ebp),%eax 10c66b: 89 42 24 mov %eax,0x24(%edx) 10c66e: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c670: 8d 65 f4 lea -0xc(%ebp),%esp 10c673: 5b pop %ebx 10c674: 5e pop %esi 10c675: 5f pop %edi 10c676: c9 leave 10c677: c3 ret ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10c678: b8 01 00 00 00 mov $0x1,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c67d: 8d 65 f4 lea -0xc(%ebp),%esp 10c680: 5b pop %ebx 10c681: 5e pop %esi 10c682: 5f pop %edi 10c683: c9 leave 10c684: c3 ret 10c685: 8d 76 00 lea 0x0(%esi),%esi * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ the_message = _CORE_message_queue_Allocate_message_buffer( the_message_queue ); if ( the_message ) { 10c688: b8 02 00 00 00 mov $0x2,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c68d: 8d 65 f4 lea -0xc(%ebp),%esp 10c690: 5b pop %ebx 10c691: 5e pop %esi 10c692: 5f pop %edi 10c693: c9 leave 10c694: c3 ret =============================================================================== 0010c6a4 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c6a4: 55 push %ebp 10c6a5: 89 e5 mov %esp,%ebp 10c6a7: 57 push %edi 10c6a8: 56 push %esi 10c6a9: 53 push %ebx 10c6aa: 83 ec 0c sub $0xc,%esp 10c6ad: 8b 45 08 mov 0x8(%ebp),%eax 10c6b0: 8b 5d 0c mov 0xc(%ebp),%ebx 10c6b3: 8b 55 10 mov 0x10(%ebp),%edx /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 10c6b6: 8d 78 40 lea 0x40(%eax),%edi 10c6b9: b9 04 00 00 00 mov $0x4,%ecx 10c6be: 89 de mov %ebx,%esi 10c6c0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c6c2: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c6c5: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c6cc: 85 d2 test %edx,%edx 10c6ce: 75 30 jne 10c700 <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c6d0: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c6d7: 8b 15 18 74 12 00 mov 0x127418,%edx 10c6dd: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c6e0: 8b 4a 08 mov 0x8(%edx),%ecx 10c6e3: 89 48 60 mov %ecx,0x60(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10c6e6: 8b 48 48 mov 0x48(%eax),%ecx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c6e9: 83 f9 02 cmp $0x2,%ecx 10c6ec: 74 05 je 10c6f3 <_CORE_mutex_Initialize+0x4f> 10c6ee: 83 f9 03 cmp $0x3,%ecx 10c6f1: 75 22 jne 10c715 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c6f3: 8b 4a 14 mov 0x14(%edx),%ecx 10c6f6: 3b 48 4c cmp 0x4c(%eax),%ecx 10c6f9: 72 41 jb 10c73c <_CORE_mutex_Initialize+0x98> _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 10c6fb: ff 42 1c incl 0x1c(%edx) 10c6fe: eb 15 jmp 10c715 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c700: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c707: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c70e: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c715: 6a 05 push $0x5 10c717: 68 00 04 00 00 push $0x400 10c71c: 31 d2 xor %edx,%edx 10c71e: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c722: 0f 95 c2 setne %dl 10c725: 52 push %edx 10c726: 50 push %eax 10c727: e8 bc 1b 00 00 call 10e2e8 <_Thread_queue_Initialize> 10c72c: 31 c0 xor %eax,%eax THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10c72e: 83 c4 10 add $0x10,%esp } 10c731: 8d 65 f4 lea -0xc(%ebp),%esp 10c734: 5b pop %ebx 10c735: 5e pop %esi 10c736: 5f pop %edi 10c737: c9 leave 10c738: c3 ret 10c739: 8d 76 00 lea 0x0(%esi),%esi the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c73c: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c741: 8d 65 f4 lea -0xc(%ebp),%esp 10c744: 5b pop %ebx 10c745: 5e pop %esi 10c746: 5f pop %edi 10c747: c9 leave 10c748: c3 ret =============================================================================== 0010c79c <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c79c: 55 push %ebp 10c79d: 89 e5 mov %esp,%ebp 10c79f: 53 push %ebx 10c7a0: 83 ec 14 sub $0x14,%esp 10c7a3: 8b 5d 08 mov 0x8(%ebp),%ebx 10c7a6: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c7a9: a1 58 73 12 00 mov 0x127358,%eax 10c7ae: 85 c0 test %eax,%eax 10c7b0: 74 04 je 10c7b6 <_CORE_mutex_Seize+0x1a> 10c7b2: 84 d2 test %dl,%dl 10c7b4: 75 36 jne 10c7ec <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c7b6: 83 ec 08 sub $0x8,%esp 10c7b9: 8d 45 18 lea 0x18(%ebp),%eax 10c7bc: 50 push %eax 10c7bd: 53 push %ebx 10c7be: 88 55 f4 mov %dl,-0xc(%ebp) 10c7c1: e8 16 50 00 00 call 1117dc <_CORE_mutex_Seize_interrupt_trylock> 10c7c6: 83 c4 10 add $0x10,%esp 10c7c9: 85 c0 test %eax,%eax 10c7cb: 8a 55 f4 mov -0xc(%ebp),%dl 10c7ce: 74 14 je 10c7e4 <_CORE_mutex_Seize+0x48> 10c7d0: 84 d2 test %dl,%dl 10c7d2: 75 30 jne 10c804 <_CORE_mutex_Seize+0x68> 10c7d4: ff 75 18 pushl 0x18(%ebp) 10c7d7: 9d popf 10c7d8: a1 18 74 12 00 mov 0x127418,%eax 10c7dd: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c7e4: 8b 5d fc mov -0x4(%ebp),%ebx 10c7e7: c9 leave 10c7e8: c3 ret 10c7e9: 8d 76 00 lea 0x0(%esi),%esi bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c7ec: 83 3d 20 75 12 00 01 cmpl $0x1,0x127520 10c7f3: 76 c1 jbe 10c7b6 <_CORE_mutex_Seize+0x1a> 10c7f5: 53 push %ebx 10c7f6: 6a 13 push $0x13 10c7f8: 6a 00 push $0x0 10c7fa: 6a 00 push $0x0 10c7fc: e8 fb 05 00 00 call 10cdfc <_Internal_error_Occurred> 10c801: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c804: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c80b: a1 18 74 12 00 mov 0x127418,%eax 10c810: 89 58 44 mov %ebx,0x44(%eax) 10c813: 8b 55 0c mov 0xc(%ebp),%edx 10c816: 89 50 20 mov %edx,0x20(%eax) 10c819: a1 58 73 12 00 mov 0x127358,%eax 10c81e: 40 inc %eax 10c81f: a3 58 73 12 00 mov %eax,0x127358 10c824: ff 75 18 pushl 0x18(%ebp) 10c827: 9d popf 10c828: 83 ec 08 sub $0x8,%esp 10c82b: ff 75 14 pushl 0x14(%ebp) 10c82e: 53 push %ebx 10c82f: e8 18 ff ff ff call 10c74c <_CORE_mutex_Seize_interrupt_blocking> 10c834: 83 c4 10 add $0x10,%esp } 10c837: 8b 5d fc mov -0x4(%ebp),%ebx 10c83a: c9 leave 10c83b: c3 ret =============================================================================== 001117dc <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 1117dc: 55 push %ebp 1117dd: 89 e5 mov %esp,%ebp 1117df: 56 push %esi 1117e0: 53 push %ebx 1117e1: 8b 45 08 mov 0x8(%ebp),%eax 1117e4: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 1117e7: 8b 15 18 74 12 00 mov 0x127418,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 1117ed: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 1117f4: 8b 58 50 mov 0x50(%eax),%ebx 1117f7: 85 db test %ebx,%ebx 1117f9: 74 31 je 11182c <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 1117fb: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 111802: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 111805: 8b 5a 08 mov 0x8(%edx),%ebx 111808: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 11180b: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 111812: 8b 58 48 mov 0x48(%eax),%ebx if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 111815: 83 fb 02 cmp $0x2,%ebx 111818: 74 26 je 111840 <_CORE_mutex_Seize_interrupt_trylock+0x64> 11181a: 83 fb 03 cmp $0x3,%ebx 11181d: 74 35 je 111854 <_CORE_mutex_Seize_interrupt_trylock+0x78> */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); 11181f: ff 31 pushl (%ecx) 111821: 9d popf 111822: 31 c0 xor %eax,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 111824: 8d 65 f8 lea -0x8(%ebp),%esp 111827: 5b pop %ebx 111828: 5e pop %esi 111829: c9 leave 11182a: c3 ret 11182b: 90 nop /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 11182c: 3b 50 5c cmp 0x5c(%eax),%edx 11182f: 74 17 je 111848 <_CORE_mutex_Seize_interrupt_trylock+0x6c> the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 111831: b8 01 00 00 00 mov $0x1,%eax 111836: 8d 65 f8 lea -0x8(%ebp),%esp 111839: 5b pop %ebx 11183a: 5e pop %esi 11183b: c9 leave 11183c: c3 ret 11183d: 8d 76 00 lea 0x0(%esi),%esi _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 111840: ff 42 1c incl 0x1c(%edx) 111843: eb da jmp 11181f <_CORE_mutex_Seize_interrupt_trylock+0x43> 111845: 8d 76 00 lea 0x0(%esi),%esi * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 111848: 8b 58 40 mov 0x40(%eax),%ebx 11184b: 85 db test %ebx,%ebx 11184d: 75 3d jne 11188c <_CORE_mutex_Seize_interrupt_trylock+0xb0> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 11184f: ff 40 54 incl 0x54(%eax) 111852: eb cb jmp 11181f <_CORE_mutex_Seize_interrupt_trylock+0x43> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 111854: 8b 5a 1c mov 0x1c(%edx),%ebx 111857: 8d 73 01 lea 0x1(%ebx),%esi 11185a: 89 72 1c mov %esi,0x1c(%edx) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 11185d: 8b 72 14 mov 0x14(%edx),%esi if ( current == ceiling ) { 111860: 39 70 4c cmp %esi,0x4c(%eax) 111863: 74 ba je 11181f <_CORE_mutex_Seize_interrupt_trylock+0x43> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 111865: 72 39 jb 1118a0 <_CORE_mutex_Seize_interrupt_trylock+0xc4> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 111867: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 11186e: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 111875: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 11187c: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 11187f: ff 31 pushl (%ecx) 111881: 9d popf 111882: 31 c0 xor %eax,%eax 111884: 8d 65 f8 lea -0x8(%ebp),%esp 111887: 5b pop %ebx 111888: 5e pop %esi 111889: c9 leave 11188a: c3 ret 11188b: 90 nop * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 11188c: 4b dec %ebx 11188d: 75 a2 jne 111831 <_CORE_mutex_Seize_interrupt_trylock+0x55><== ALWAYS TAKEN case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 11188f: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) <== NOT EXECUTED _ISR_Enable( *level_p ); 111896: ff 31 pushl (%ecx) <== NOT EXECUTED 111898: 9d popf <== NOT EXECUTED 111899: 31 c0 xor %eax,%eax <== NOT EXECUTED 11189b: eb 99 jmp 111836 <_CORE_mutex_Seize_interrupt_trylock+0x5a><== NOT EXECUTED 11189d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1118a0: 8b 15 58 73 12 00 mov 0x127358,%edx 1118a6: 42 inc %edx 1118a7: 89 15 58 73 12 00 mov %edx,0x127358 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 1118ad: ff 31 pushl (%ecx) 1118af: 9d popf _Thread_Change_priority( 1118b0: 52 push %edx 1118b1: 6a 00 push $0x0 1118b3: ff 70 4c pushl 0x4c(%eax) 1118b6: ff 70 5c pushl 0x5c(%eax) 1118b9: e8 e6 bd ff ff call 10d6a4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 1118be: e8 c9 c2 ff ff call 10db8c <_Thread_Enable_dispatch> 1118c3: 31 c0 xor %eax,%eax 1118c5: 83 c4 10 add $0x10,%esp 1118c8: e9 69 ff ff ff jmp 111836 <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c83c <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c83c: 55 push %ebp 10c83d: 89 e5 mov %esp,%ebp 10c83f: 53 push %ebx 10c840: 83 ec 04 sub $0x4,%esp 10c843: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 10c846: 8b 43 5c mov 0x5c(%ebx),%eax * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 10c849: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c84d: 74 15 je 10c864 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c84f: 3b 05 18 74 12 00 cmp 0x127418,%eax 10c855: 74 0d je 10c864 <_CORE_mutex_Surrender+0x28> 10c857: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c85c: 8b 5d fc mov -0x4(%ebp),%ebx 10c85f: c9 leave 10c860: c3 ret 10c861: 8d 76 00 lea 0x0(%esi),%esi return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10c864: 8b 53 54 mov 0x54(%ebx),%edx 10c867: 85 d2 test %edx,%edx 10c869: 74 65 je 10c8d0 <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c86b: 4a dec %edx 10c86c: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c86f: 85 d2 test %edx,%edx 10c871: 75 5d jne 10c8d0 <_CORE_mutex_Surrender+0x94> 10c873: 8b 53 48 mov 0x48(%ebx),%edx /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c876: 83 fa 02 cmp $0x2,%edx 10c879: 0f 84 99 00 00 00 je 10c918 <_CORE_mutex_Surrender+0xdc> 10c87f: 83 fa 03 cmp $0x3,%edx 10c882: 0f 84 90 00 00 00 je 10c918 <_CORE_mutex_Surrender+0xdc> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 10c888: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c88f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c896: 83 fa 02 cmp $0x2,%edx 10c899: 74 5d je 10c8f8 <_CORE_mutex_Surrender+0xbc> 10c89b: 83 fa 03 cmp $0x3,%edx 10c89e: 74 58 je 10c8f8 <_CORE_mutex_Surrender+0xbc> /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 10c8a0: 83 ec 0c sub $0xc,%esp 10c8a3: 53 push %ebx 10c8a4: e8 c3 16 00 00 call 10df6c <_Thread_queue_Dequeue> 10c8a9: 83 c4 10 add $0x10,%esp 10c8ac: 85 c0 test %eax,%eax 10c8ae: 74 7c je 10c92c <_CORE_mutex_Surrender+0xf0> } else #endif { the_mutex->holder = the_thread; 10c8b0: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c8b3: 8b 50 08 mov 0x8(%eax),%edx 10c8b6: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c8b9: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c8c0: 8b 53 48 mov 0x48(%ebx),%edx 10c8c3: 83 fa 02 cmp $0x2,%edx 10c8c6: 74 58 je 10c920 <_CORE_mutex_Surrender+0xe4> 10c8c8: 83 fa 03 cmp $0x3,%edx 10c8cb: 74 0b je 10c8d8 <_CORE_mutex_Surrender+0x9c> 10c8cd: 8d 76 00 lea 0x0(%esi),%esi } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c8d0: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c8d2: 8b 5d fc mov -0x4(%ebp),%ebx 10c8d5: c9 leave 10c8d6: c3 ret 10c8d7: 90 nop case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10c8d8: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c8db: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10c8de: 3b 50 14 cmp 0x14(%eax),%edx 10c8e1: 73 ed jae 10c8d0 <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 10c8e3: 51 push %ecx 10c8e4: 6a 00 push $0x0 10c8e6: 52 push %edx 10c8e7: 50 push %eax 10c8e8: e8 b7 0d 00 00 call 10d6a4 <_Thread_Change_priority> 10c8ed: 31 c0 xor %eax,%eax 10c8ef: 83 c4 10 add $0x10,%esp 10c8f2: e9 65 ff ff ff jmp 10c85c <_CORE_mutex_Surrender+0x20> 10c8f7: 90 nop _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 10c8f8: 8b 50 1c mov 0x1c(%eax),%edx 10c8fb: 85 d2 test %edx,%edx 10c8fd: 75 a1 jne 10c8a0 <_CORE_mutex_Surrender+0x64> holder->real_priority != holder->current_priority ) { 10c8ff: 8b 50 18 mov 0x18(%eax),%edx 10c902: 3b 50 14 cmp 0x14(%eax),%edx 10c905: 74 99 je 10c8a0 <_CORE_mutex_Surrender+0x64> _Thread_Change_priority( holder, holder->real_priority, true ); 10c907: 51 push %ecx 10c908: 6a 01 push $0x1 10c90a: 52 push %edx 10c90b: 50 push %eax 10c90c: e8 93 0d 00 00 call 10d6a4 <_Thread_Change_priority> 10c911: 83 c4 10 add $0x10,%esp 10c914: eb 8a jmp 10c8a0 <_CORE_mutex_Surrender+0x64> 10c916: 66 90 xchg %ax,%ax the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 10c918: ff 48 1c decl 0x1c(%eax) 10c91b: e9 68 ff ff ff jmp 10c888 <_CORE_mutex_Surrender+0x4c> case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10c920: ff 40 1c incl 0x1c(%eax) 10c923: 31 c0 xor %eax,%eax break; 10c925: e9 32 ff ff ff jmp 10c85c <_CORE_mutex_Surrender+0x20> 10c92a: 66 90 xchg %ax,%ax } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c92c: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10c933: 31 c0 xor %eax,%eax 10c935: e9 22 ff ff ff jmp 10c85c <_CORE_mutex_Surrender+0x20> =============================================================================== 0010c988 <_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 ) { 10c988: 55 push %ebp 10c989: 89 e5 mov %esp,%ebp 10c98b: 53 push %ebx 10c98c: 83 ec 10 sub $0x10,%esp 10c98f: 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)) ) { 10c992: 53 push %ebx 10c993: e8 d4 15 00 00 call 10df6c <_Thread_queue_Dequeue> 10c998: 83 c4 10 add $0x10,%esp 10c99b: 85 c0 test %eax,%eax 10c99d: 74 09 je 10c9a8 <_CORE_semaphore_Surrender+0x20> 10c99f: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c9a1: 8b 5d fc mov -0x4(%ebp),%ebx 10c9a4: c9 leave 10c9a5: c3 ret 10c9a6: 66 90 xchg %ax,%ax if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10c9a8: 9c pushf 10c9a9: fa cli 10c9aa: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c9ab: 8b 43 48 mov 0x48(%ebx),%eax 10c9ae: 3b 43 40 cmp 0x40(%ebx),%eax 10c9b1: 72 0d jb 10c9c0 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN 10c9b3: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10c9b8: 52 push %edx 10c9b9: 9d popf } return status; } 10c9ba: 8b 5d fc mov -0x4(%ebp),%ebx 10c9bd: c9 leave 10c9be: c3 ret 10c9bf: 90 nop #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c9c0: 40 inc %eax 10c9c1: 89 43 48 mov %eax,0x48(%ebx) 10c9c4: 31 c0 xor %eax,%eax 10c9c6: eb f0 jmp 10c9b8 <_CORE_semaphore_Surrender+0x30> =============================================================================== 00111670 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 111670: 55 push %ebp 111671: 89 e5 mov %esp,%ebp 111673: 57 push %edi 111674: 56 push %esi 111675: 53 push %ebx 111676: 8b 7d 08 mov 0x8(%ebp),%edi 111679: 8b 4d 10 mov 0x10(%ebp),%ecx 11167c: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 11167f: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 111681: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 111688: 85 c9 test %ecx,%ecx 11168a: 74 17 je 1116a3 <_Chain_Initialize+0x33><== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 11168c: 8b 45 0c mov 0xc(%ebp),%eax 11168f: eb 05 jmp 111696 <_Chain_Initialize+0x26> 111691: 8d 76 00 lea 0x0(%esi),%esi while ( count-- ) { 111694: 89 d8 mov %ebx,%eax current->next = next; 111696: 89 02 mov %eax,(%edx) next->previous = current; 111698: 89 50 04 mov %edx,0x4(%eax) 11169b: 8d 1c 30 lea (%eax,%esi,1),%ebx current = next; next = (Chain_Node *) 11169e: 89 c2 mov %eax,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 1116a0: 49 dec %ecx 1116a1: 75 f1 jne 111694 <_Chain_Initialize+0x24> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 1116a3: 8d 47 04 lea 0x4(%edi),%eax 1116a6: 89 02 mov %eax,(%edx) the_chain->last = current; 1116a8: 89 57 08 mov %edx,0x8(%edi) } 1116ab: 5b pop %ebx 1116ac: 5e pop %esi 1116ad: 5f pop %edi 1116ae: c9 leave 1116af: 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 =============================================================================== 0010b6bc <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b6bc: 55 push %ebp 10b6bd: 89 e5 mov %esp,%ebp 10b6bf: 57 push %edi 10b6c0: 56 push %esi 10b6c1: 53 push %ebx 10b6c2: 83 ec 2c sub $0x2c,%esp 10b6c5: 8b 45 08 mov 0x8(%ebp),%eax 10b6c8: 8b 4d 0c mov 0xc(%ebp),%ecx 10b6cb: 8b 55 10 mov 0x10(%ebp),%edx 10b6ce: 89 55 dc mov %edx,-0x24(%ebp) 10b6d1: 8b 7d 14 mov 0x14(%ebp),%edi rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10b6d4: 8b 1d 18 74 12 00 mov 0x127418,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b6da: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b6e1: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi _ISR_Disable( level ); 10b6e7: 9c pushf 10b6e8: fa cli 10b6e9: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b6ec: 8b 16 mov (%esi),%edx 10b6ee: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b6f1: 21 c2 and %eax,%edx 10b6f3: 89 55 e4 mov %edx,-0x1c(%ebp) 10b6f6: 74 0d je 10b705 <_Event_Seize+0x49> 10b6f8: 39 d0 cmp %edx,%eax 10b6fa: 0f 84 84 00 00 00 je 10b784 <_Event_Seize+0xc8> 10b700: f6 c1 02 test $0x2,%cl 10b703: 75 7f jne 10b784 <_Event_Seize+0xc8> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b705: f6 c1 01 test $0x1,%cl 10b708: 75 62 jne 10b76c <_Event_Seize+0xb0> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 10b70a: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b70d: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b710: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b713: c7 05 60 76 12 00 01 movl $0x1,0x127660 10b71a: 00 00 00 _ISR_Enable( level ); 10b71d: ff 75 e0 pushl -0x20(%ebp) 10b720: 9d popf if ( ticks ) { 10b721: 8b 45 dc mov -0x24(%ebp),%eax 10b724: 85 c0 test %eax,%eax 10b726: 0f 85 80 00 00 00 jne 10b7ac <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b72c: 83 ec 08 sub $0x8,%esp 10b72f: 68 00 01 00 00 push $0x100 10b734: 53 push %ebx 10b735: e8 02 2d 00 00 call 10e43c <_Thread_Set_state> _ISR_Disable( level ); 10b73a: 9c pushf 10b73b: fa cli 10b73c: 5a pop %edx sync_state = _Event_Sync_state; 10b73d: a1 60 76 12 00 mov 0x127660,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b742: c7 05 60 76 12 00 00 movl $0x0,0x127660 10b749: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b74c: 83 c4 10 add $0x10,%esp 10b74f: 83 f8 01 cmp $0x1,%eax 10b752: 74 4c je 10b7a0 <_Event_Seize+0xe4> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10b754: 89 55 10 mov %edx,0x10(%ebp) 10b757: 89 5d 0c mov %ebx,0xc(%ebp) 10b75a: 89 45 08 mov %eax,0x8(%ebp) } 10b75d: 8d 65 f4 lea -0xc(%ebp),%esp 10b760: 5b pop %ebx 10b761: 5e pop %esi 10b762: 5f pop %edi 10b763: c9 leave * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10b764: e9 ef 1e 00 00 jmp 10d658 <_Thread_blocking_operation_Cancel> 10b769: 8d 76 00 lea 0x0(%esi),%esi *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b76c: ff 75 e0 pushl -0x20(%ebp) 10b76f: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b770: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b777: 8b 55 e4 mov -0x1c(%ebp),%edx 10b77a: 89 17 mov %edx,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b77c: 8d 65 f4 lea -0xc(%ebp),%esp 10b77f: 5b pop %ebx 10b780: 5e pop %esi 10b781: 5f pop %edi 10b782: c9 leave 10b783: c3 ret pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10b784: 8b 45 e4 mov -0x1c(%ebp),%eax 10b787: f7 d0 not %eax 10b789: 23 45 d4 and -0x2c(%ebp),%eax 10b78c: 89 06 mov %eax,(%esi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10b78e: ff 75 e0 pushl -0x20(%ebp) 10b791: 9d popf *event_out = seized_events; 10b792: 8b 45 e4 mov -0x1c(%ebp),%eax 10b795: 89 07 mov %eax,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b797: 8d 65 f4 lea -0xc(%ebp),%esp 10b79a: 5b pop %ebx 10b79b: 5e pop %esi 10b79c: 5f pop %edi 10b79d: c9 leave 10b79e: c3 ret 10b79f: 90 nop _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 10b7a0: 52 push %edx 10b7a1: 9d popf * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b7a2: 8d 65 f4 lea -0xc(%ebp),%esp 10b7a5: 5b pop %ebx 10b7a6: 5e pop %esi 10b7a7: 5f pop %edi 10b7a8: c9 leave 10b7a9: c3 ret 10b7aa: 66 90 xchg %ax,%ax _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b7ac: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b7af: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b7b6: c7 43 64 4c b9 10 00 movl $0x10b94c,0x64(%ebx) the_watchdog->id = id; 10b7bd: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b7c0: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b7c7: 8b 45 dc mov -0x24(%ebp),%eax 10b7ca: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b7cd: 83 ec 08 sub $0x8,%esp 10b7d0: 8d 43 48 lea 0x48(%ebx),%eax 10b7d3: 50 push %eax 10b7d4: 68 38 74 12 00 push $0x127438 10b7d9: e8 ae 32 00 00 call 10ea8c <_Watchdog_Insert> 10b7de: 83 c4 10 add $0x10,%esp 10b7e1: e9 46 ff ff ff jmp 10b72c <_Event_Seize+0x70> =============================================================================== 0010b83c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b83c: 55 push %ebp 10b83d: 89 e5 mov %esp,%ebp 10b83f: 57 push %edi 10b840: 56 push %esi 10b841: 53 push %ebx 10b842: 83 ec 1c sub $0x1c,%esp 10b845: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b848: 8b 8b f0 00 00 00 mov 0xf0(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b84e: 8b 73 30 mov 0x30(%ebx),%esi _ISR_Disable( level ); 10b851: 9c pushf 10b852: fa cli 10b853: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10b856: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b858: 8b 43 24 mov 0x24(%ebx),%eax seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10b85b: 89 c7 mov %eax,%edi 10b85d: 21 d7 and %edx,%edi 10b85f: 89 7d e0 mov %edi,-0x20(%ebp) 10b862: 0f 84 ac 00 00 00 je 10b914 <_Event_Surrender+0xd8> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b868: 8b 3d f4 73 12 00 mov 0x1273f4,%edi 10b86e: 85 ff test %edi,%edi 10b870: 74 08 je 10b87a <_Event_Surrender+0x3e> 10b872: 3b 1d 18 74 12 00 cmp 0x127418,%ebx 10b878: 74 5a je 10b8d4 <_Event_Surrender+0x98> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b87a: f6 43 11 01 testb $0x1,0x11(%ebx) 10b87e: 0f 84 90 00 00 00 je 10b914 <_Event_Surrender+0xd8> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b884: 3b 45 e0 cmp -0x20(%ebp),%eax 10b887: 74 09 je 10b892 <_Event_Surrender+0x56> 10b889: 83 e6 02 and $0x2,%esi 10b88c: 0f 84 82 00 00 00 je 10b914 <_Event_Surrender+0xd8> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10b892: 8b 45 e0 mov -0x20(%ebp),%eax 10b895: f7 d0 not %eax 10b897: 21 d0 and %edx,%eax 10b899: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b89b: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b8a2: 8b 43 28 mov 0x28(%ebx),%eax 10b8a5: 8b 7d e0 mov -0x20(%ebp),%edi 10b8a8: 89 38 mov %edi,(%eax) _ISR_Flash( level ); 10b8aa: ff 75 e4 pushl -0x1c(%ebp) 10b8ad: 9d popf 10b8ae: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b8af: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b8b3: 74 6b je 10b920 <_Event_Surrender+0xe4> _ISR_Enable( level ); 10b8b5: ff 75 e4 pushl -0x1c(%ebp) 10b8b8: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b8b9: 83 ec 08 sub $0x8,%esp 10b8bc: 68 f8 ff 03 10 push $0x1003fff8 10b8c1: 53 push %ebx 10b8c2: e8 1d 1f 00 00 call 10d7e4 <_Thread_Clear_state> 10b8c7: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b8ca: 8d 65 f4 lea -0xc(%ebp),%esp 10b8cd: 5b pop %ebx 10b8ce: 5e pop %esi 10b8cf: 5f pop %edi 10b8d0: c9 leave 10b8d1: c3 ret 10b8d2: 66 90 xchg %ax,%ax * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10b8d4: 8b 3d 60 76 12 00 mov 0x127660,%edi /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b8da: 83 ff 02 cmp $0x2,%edi 10b8dd: 74 09 je 10b8e8 <_Event_Surrender+0xac> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b8df: 8b 3d 60 76 12 00 mov 0x127660,%edi /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b8e5: 4f dec %edi 10b8e6: 75 92 jne 10b87a <_Event_Surrender+0x3e> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b8e8: 3b 45 e0 cmp -0x20(%ebp),%eax 10b8eb: 74 05 je 10b8f2 <_Event_Surrender+0xb6> 10b8ed: 83 e6 02 and $0x2,%esi 10b8f0: 74 22 je 10b914 <_Event_Surrender+0xd8> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10b8f2: 8b 45 e0 mov -0x20(%ebp),%eax 10b8f5: f7 d0 not %eax 10b8f7: 21 d0 and %edx,%eax 10b8f9: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b8fb: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b902: 8b 43 28 mov 0x28(%ebx),%eax 10b905: 8b 55 e0 mov -0x20(%ebp),%edx 10b908: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b90a: c7 05 60 76 12 00 03 movl $0x3,0x127660 10b911: 00 00 00 _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b914: ff 75 e4 pushl -0x1c(%ebp) 10b917: 9d popf } 10b918: 8d 65 f4 lea -0xc(%ebp),%esp 10b91b: 5b pop %ebx 10b91c: 5e pop %esi 10b91d: 5f pop %edi 10b91e: c9 leave 10b91f: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b920: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10b927: ff 75 e4 pushl -0x1c(%ebp) 10b92a: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b92b: 83 ec 0c sub $0xc,%esp 10b92e: 8d 43 48 lea 0x48(%ebx),%eax 10b931: 50 push %eax 10b932: e8 7d 32 00 00 call 10ebb4 <_Watchdog_Remove> 10b937: 58 pop %eax 10b938: 5a pop %edx 10b939: 68 f8 ff 03 10 push $0x1003fff8 10b93e: 53 push %ebx 10b93f: e8 a0 1e 00 00 call 10d7e4 <_Thread_Clear_state> 10b944: 83 c4 10 add $0x10,%esp 10b947: eb cf jmp 10b918 <_Event_Surrender+0xdc> =============================================================================== 0010b94c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b94c: 55 push %ebp 10b94d: 89 e5 mov %esp,%ebp 10b94f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b952: 8d 45 f4 lea -0xc(%ebp),%eax 10b955: 50 push %eax 10b956: ff 75 08 pushl 0x8(%ebp) 10b959: e8 52 22 00 00 call 10dbb0 <_Thread_Get> switch ( location ) { 10b95e: 83 c4 10 add $0x10,%esp 10b961: 8b 55 f4 mov -0xc(%ebp),%edx 10b964: 85 d2 test %edx,%edx 10b966: 75 37 jne 10b99f <_Event_Timeout+0x53> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 10b968: 9c pushf 10b969: fa cli 10b96a: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b96b: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b972: 3b 05 18 74 12 00 cmp 0x127418,%eax 10b978: 74 2a je 10b9a4 <_Event_Timeout+0x58> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10b97a: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b981: 52 push %edx 10b982: 9d popf 10b983: 83 ec 08 sub $0x8,%esp 10b986: 68 f8 ff 03 10 push $0x1003fff8 10b98b: 50 push %eax 10b98c: e8 53 1e 00 00 call 10d7e4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b991: a1 58 73 12 00 mov 0x127358,%eax 10b996: 48 dec %eax 10b997: a3 58 73 12 00 mov %eax,0x127358 10b99c: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b99f: c9 leave 10b9a0: c3 ret 10b9a1: 8d 76 00 lea 0x0(%esi),%esi } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10b9a4: 8b 0d 60 76 12 00 mov 0x127660,%ecx 10b9aa: 49 dec %ecx 10b9ab: 75 cd jne 10b97a <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b9ad: c7 05 60 76 12 00 02 movl $0x2,0x127660 10b9b4: 00 00 00 10b9b7: eb c1 jmp 10b97a <_Event_Timeout+0x2e> =============================================================================== 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 =============================================================================== 00111928 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 111928: 55 push %ebp 111929: 89 e5 mov %esp,%ebp 11192b: 57 push %edi 11192c: 56 push %esi 11192d: 53 push %ebx 11192e: 83 ec 2c sub $0x2c,%esp 111931: 8b 7d 0c mov 0xc(%ebp),%edi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 111934: 8b 45 08 mov 0x8(%ebp),%eax 111937: 8b 48 08 mov 0x8(%eax),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 11193a: 8b 50 10 mov 0x10(%eax),%edx 11193d: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 111940: 89 f8 mov %edi,%eax 111942: 83 c0 04 add $0x4,%eax 111945: 89 45 e0 mov %eax,-0x20(%ebp) 111948: 0f 82 5a 01 00 00 jb 111aa8 <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 11194e: 8b 75 14 mov 0x14(%ebp),%esi 111951: 85 f6 test %esi,%esi 111953: 0f 85 48 01 00 00 jne 111aa1 <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 111959: 39 4d 08 cmp %ecx,0x8(%ebp) 11195c: 0f 84 50 01 00 00 je 111ab2 <_Heap_Allocate_aligned_with_boundary+0x18a> 111962: 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; 111969: 8b 55 d4 mov -0x2c(%ebp),%edx 11196c: 83 c2 07 add $0x7,%edx 11196f: 89 55 c8 mov %edx,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 111972: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 111979: 29 7d d8 sub %edi,-0x28(%ebp) 11197c: eb 19 jmp 111997 <_Heap_Allocate_aligned_with_boundary+0x6f> 11197e: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 111980: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 111983: 85 db test %ebx,%ebx 111985: 0f 85 e9 00 00 00 jne 111a74 <_Heap_Allocate_aligned_with_boundary+0x14c><== ALWAYS TAKEN break; } block = block->next; 11198b: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 11198e: 39 4d 08 cmp %ecx,0x8(%ebp) 111991: 0f 84 25 01 00 00 je 111abc <_Heap_Allocate_aligned_with_boundary+0x194> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 111997: 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 ) { 11199a: 8b 59 04 mov 0x4(%ecx),%ebx 11199d: 39 5d e0 cmp %ebx,-0x20(%ebp) 1119a0: 73 e9 jae 11198b <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 1119a2: 8b 55 10 mov 0x10(%ebp),%edx 1119a5: 85 d2 test %edx,%edx 1119a7: 74 d7 je 111980 <_Heap_Allocate_aligned_with_boundary+0x58> uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 1119a9: 8b 45 08 mov 0x8(%ebp),%eax 1119ac: 8b 40 14 mov 0x14(%eax),%eax 1119af: 89 45 d0 mov %eax,-0x30(%ebp) uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 1119b2: 83 e3 fe and $0xfffffffe,%ebx 1119b5: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 1119b8: 8d 51 08 lea 0x8(%ecx),%edx 1119bb: 89 55 cc mov %edx,-0x34(%ebp) uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 1119be: 8b 75 c8 mov -0x38(%ebp),%esi 1119c1: 29 c6 sub %eax,%esi 1119c3: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 1119c5: 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); 1119c8: 89 d8 mov %ebx,%eax 1119ca: 31 d2 xor %edx,%edx 1119cc: f7 75 10 divl 0x10(%ebp) 1119cf: 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 ) { 1119d1: 39 de cmp %ebx,%esi 1119d3: 73 0b jae 1119e0 <_Heap_Allocate_aligned_with_boundary+0xb8> 1119d5: 89 f0 mov %esi,%eax 1119d7: 31 d2 xor %edx,%edx 1119d9: f7 75 10 divl 0x10(%ebp) 1119dc: 89 f3 mov %esi,%ebx 1119de: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 1119e0: 8b 45 14 mov 0x14(%ebp),%eax 1119e3: 85 c0 test %eax,%eax 1119e5: 74 59 je 111a40 <_Heap_Allocate_aligned_with_boundary+0x118> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 1119e7: 8d 34 3b lea (%ebx,%edi,1),%esi 1119ea: 89 f0 mov %esi,%eax 1119ec: 31 d2 xor %edx,%edx 1119ee: f7 75 14 divl 0x14(%ebp) 1119f1: 89 f0 mov %esi,%eax 1119f3: 29 d0 sub %edx,%eax 1119f5: 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 ) { 1119f7: 39 c3 cmp %eax,%ebx 1119f9: 73 45 jae 111a40 <_Heap_Allocate_aligned_with_boundary+0x118> 1119fb: 39 c6 cmp %eax,%esi 1119fd: 76 41 jbe 111a40 <_Heap_Allocate_aligned_with_boundary+0x118> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 1119ff: 8b 45 cc mov -0x34(%ebp),%eax 111a02: 01 f8 add %edi,%eax 111a04: 89 45 dc mov %eax,-0x24(%ebp) uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 111a07: 39 d0 cmp %edx,%eax 111a09: 77 80 ja 11198b <_Heap_Allocate_aligned_with_boundary+0x63> 111a0b: 89 ce mov %ecx,%esi 111a0d: eb 0e jmp 111a1d <_Heap_Allocate_aligned_with_boundary+0xf5> 111a0f: 90 nop /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 111a10: 39 c1 cmp %eax,%ecx 111a12: 76 2a jbe 111a3e <_Heap_Allocate_aligned_with_boundary+0x116> if ( boundary_line < boundary_floor ) { 111a14: 39 55 dc cmp %edx,-0x24(%ebp) 111a17: 0f 87 a3 00 00 00 ja 111ac0 <_Heap_Allocate_aligned_with_boundary+0x198><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 111a1d: 89 d3 mov %edx,%ebx 111a1f: 29 fb sub %edi,%ebx 111a21: 89 d8 mov %ebx,%eax 111a23: 31 d2 xor %edx,%edx 111a25: f7 75 10 divl 0x10(%ebp) 111a28: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 111a2a: 8d 0c 3b lea (%ebx,%edi,1),%ecx 111a2d: 89 c8 mov %ecx,%eax 111a2f: 31 d2 xor %edx,%edx 111a31: f7 75 14 divl 0x14(%ebp) 111a34: 89 c8 mov %ecx,%eax 111a36: 29 d0 sub %edx,%eax 111a38: 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 ) { 111a3a: 39 c3 cmp %eax,%ebx 111a3c: 72 d2 jb 111a10 <_Heap_Allocate_aligned_with_boundary+0xe8> 111a3e: 89 f1 mov %esi,%ecx boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 111a40: 39 5d cc cmp %ebx,-0x34(%ebp) 111a43: 0f 87 42 ff ff ff ja 11198b <_Heap_Allocate_aligned_with_boundary+0x63> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 111a49: be f8 ff ff ff mov $0xfffffff8,%esi 111a4e: 29 ce sub %ecx,%esi 111a50: 01 de add %ebx,%esi 111a52: 89 d8 mov %ebx,%eax 111a54: 31 d2 xor %edx,%edx 111a56: f7 75 d4 divl -0x2c(%ebp) 111a59: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 111a5b: 39 75 d0 cmp %esi,-0x30(%ebp) 111a5e: 0f 86 1f ff ff ff jbe 111983 <_Heap_Allocate_aligned_with_boundary+0x5b> 111a64: 85 f6 test %esi,%esi 111a66: 0f 85 1f ff ff ff jne 11198b <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 111a6c: 85 db test %ebx,%ebx 111a6e: 0f 84 17 ff ff ff je 11198b <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 111a74: 8b 55 e4 mov -0x1c(%ebp),%edx 111a77: 8b 45 08 mov 0x8(%ebp),%eax 111a7a: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 111a7d: 57 push %edi 111a7e: 53 push %ebx 111a7f: 51 push %ecx 111a80: 50 push %eax 111a81: e8 86 b2 ff ff call 10cd0c <_Heap_Block_allocate> 111a86: 89 d8 mov %ebx,%eax 111a88: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 111a8b: 8b 4d e4 mov -0x1c(%ebp),%ecx 111a8e: 8b 55 08 mov 0x8(%ebp),%edx 111a91: 39 4a 44 cmp %ecx,0x44(%edx) 111a94: 73 14 jae 111aaa <_Heap_Allocate_aligned_with_boundary+0x182> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 111a96: 89 4a 44 mov %ecx,0x44(%edx) } return (void *) alloc_begin; } 111a99: 8d 65 f4 lea -0xc(%ebp),%esp 111a9c: 5b pop %ebx 111a9d: 5e pop %esi 111a9e: 5f pop %edi 111a9f: c9 leave 111aa0: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 111aa1: 3b 7d 14 cmp 0x14(%ebp),%edi 111aa4: 76 21 jbe 111ac7 <_Heap_Allocate_aligned_with_boundary+0x19f> 111aa6: 66 90 xchg %ax,%ax ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 111aa8: 31 c0 xor %eax,%eax } return (void *) alloc_begin; } 111aaa: 8d 65 f4 lea -0xc(%ebp),%esp 111aad: 5b pop %ebx 111aae: 5e pop %esi 111aaf: 5f pop %edi 111ab0: c9 leave 111ab1: c3 ret if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 111ab2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 111ab9: 8d 76 00 lea 0x0(%esi),%esi 111abc: 31 c0 xor %eax,%eax 111abe: eb cb jmp 111a8b <_Heap_Allocate_aligned_with_boundary+0x163> 111ac0: 89 f1 mov %esi,%ecx <== NOT EXECUTED 111ac2: e9 c4 fe ff ff jmp 11198b <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 111ac7: 8b 5d 10 mov 0x10(%ebp),%ebx 111aca: 85 db test %ebx,%ebx 111acc: 0f 85 87 fe ff ff jne 111959 <_Heap_Allocate_aligned_with_boundary+0x31> 111ad2: 89 55 10 mov %edx,0x10(%ebp) 111ad5: e9 7f fe ff ff jmp 111959 <_Heap_Allocate_aligned_with_boundary+0x31> =============================================================================== 0010cd0c <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10cd0c: 55 push %ebp 10cd0d: 89 e5 mov %esp,%ebp 10cd0f: 57 push %edi 10cd10: 56 push %esi 10cd11: 53 push %ebx 10cd12: 83 ec 10 sub $0x10,%esp 10cd15: 8b 75 08 mov 0x8(%ebp),%esi 10cd18: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10cd1b: 89 5d ec mov %ebx,-0x14(%ebp) 10cd1e: 8b 7d 10 mov 0x10(%ebp),%edi 10cd21: 83 ef 08 sub $0x8,%edi Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 10cd24: 89 f8 mov %edi,%eax 10cd26: 29 d8 sub %ebx,%eax Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10cd28: 8b 53 04 mov 0x4(%ebx),%edx 10cd2b: 83 e2 fe and $0xfffffffe,%edx 10cd2e: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10cd33: 0f 85 8b 00 00 00 jne 10cdc4 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10cd39: 8b 4b 0c mov 0xc(%ebx),%ecx return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10cd3c: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10cd3f: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10cd42: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10cd45: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10cd48: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10cd4b: 8b 53 04 mov 0x4(%ebx),%edx 10cd4e: 83 e2 fe and $0xfffffffe,%edx 10cd51: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10cd54: 8b 56 10 mov 0x10(%esi),%edx 10cd57: 89 55 e4 mov %edx,-0x1c(%ebp) 10cd5a: 39 d0 cmp %edx,%eax 10cd5c: 72 72 jb 10cdd0 <_Heap_Block_allocate+0xc4> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10cd5e: 8b 43 04 mov 0x4(%ebx),%eax 10cd61: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 10cd64: 8b 45 10 mov 0x10(%ebp),%eax 10cd67: 31 d2 xor %edx,%edx 10cd69: f7 75 e4 divl -0x1c(%ebp) 10cd6c: 29 d7 sub %edx,%edi _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 10cd6e: 89 f8 mov %edi,%eax 10cd70: 29 d8 sub %ebx,%eax _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 10cd72: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10cd75: f6 43 04 01 testb $0x1,0x4(%ebx) 10cd79: 75 69 jne 10cde4 <_Heap_Block_allocate+0xd8> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10cd7b: 2b 1b sub (%ebx),%ebx Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 10cd7d: 8b 53 04 mov 0x4(%ebx),%edx 10cd80: 83 e2 fe and $0xfffffffe,%edx 10cd83: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10cd85: 89 c2 mov %eax,%edx 10cd87: 83 ca 01 or $0x1,%edx 10cd8a: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10cd8d: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10cd8f: 8b 45 f0 mov -0x10(%ebp),%eax 10cd92: 83 e0 fe and $0xfffffffe,%eax 10cd95: 03 45 ec add -0x14(%ebp),%eax 10cd98: 29 f8 sub %edi,%eax 10cd9a: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10cd9d: ff 75 14 pushl 0x14(%ebp) 10cda0: 51 push %ecx 10cda1: 57 push %edi 10cda2: 56 push %esi 10cda3: e8 80 fe ff ff call 10cc28 <_Heap_Block_split> 10cda8: 89 fb mov %edi,%ebx 10cdaa: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10cdad: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10cdb0: 39 46 34 cmp %eax,0x34(%esi) 10cdb3: 76 03 jbe 10cdb8 <_Heap_Block_allocate+0xac> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10cdb5: 89 46 34 mov %eax,0x34(%esi) } return block; } 10cdb8: 89 d8 mov %ebx,%eax 10cdba: 8d 65 f4 lea -0xc(%ebp),%esp 10cdbd: 5b pop %ebx 10cdbe: 5e pop %esi 10cdbf: 5f pop %edi 10cdc0: c9 leave 10cdc1: c3 ret 10cdc2: 66 90 xchg %ax,%ax /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 10cdc4: 89 f1 mov %esi,%ecx } if ( alloc_area_offset < heap->page_size ) { 10cdc6: 8b 56 10 mov 0x10(%esi),%edx 10cdc9: 89 55 e4 mov %edx,-0x1c(%ebp) 10cdcc: 39 d0 cmp %edx,%eax 10cdce: 73 8e jae 10cd5e <_Heap_Block_allocate+0x52> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10cdd0: 03 45 14 add 0x14(%ebp),%eax 10cdd3: 50 push %eax 10cdd4: 51 push %ecx 10cdd5: 53 push %ebx 10cdd6: 56 push %esi 10cdd7: e8 4c fe ff ff call 10cc28 <_Heap_Block_split> 10cddc: 83 c4 10 add $0x10,%esp 10cddf: eb cc jmp 10cdad <_Heap_Block_allocate+0xa1> 10cde1: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10cde4: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10cde7: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10cdea: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10cded: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10cdf0: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10cdf3: ff 46 38 incl 0x38(%esi) 10cdf6: 89 d9 mov %ebx,%ecx 10cdf8: eb 8b jmp 10cd85 <_Heap_Block_allocate+0x79> =============================================================================== 0010cc28 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10cc28: 55 push %ebp 10cc29: 89 e5 mov %esp,%ebp 10cc2b: 57 push %edi 10cc2c: 56 push %esi 10cc2d: 53 push %ebx 10cc2e: 83 ec 14 sub $0x14,%esp 10cc31: 8b 4d 08 mov 0x8(%ebp),%ecx 10cc34: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10cc37: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10cc3a: 8b 41 14 mov 0x14(%ecx),%eax 10cc3d: 89 45 e8 mov %eax,-0x18(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10cc40: 8b 43 04 mov 0x4(%ebx),%eax 10cc43: 89 45 e4 mov %eax,-0x1c(%ebp) 10cc46: 89 c6 mov %eax,%esi 10cc48: 83 e6 fe and $0xfffffffe,%esi uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; 10cc4b: 8b 55 e8 mov -0x18(%ebp),%edx 10cc4e: 83 ea 08 sub $0x8,%edx 10cc51: 8b 45 14 mov 0x14(%ebp),%eax 10cc54: 39 d0 cmp %edx,%eax 10cc56: 73 02 jae 10cc5a <_Heap_Block_split+0x32> 10cc58: 89 d0 mov %edx,%eax 10cc5a: 83 c0 08 add $0x8,%eax 10cc5d: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10cc60: 31 d2 xor %edx,%edx 10cc62: f7 f7 div %edi if ( remainder != 0 ) { 10cc64: 85 d2 test %edx,%edx 10cc66: 75 70 jne 10ccd8 <_Heap_Block_split+0xb0> 10cc68: 8b 7d f0 mov -0x10(%ebp),%edi 10cc6b: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10cc6e: 8d 04 33 lea (%ebx,%esi,1),%eax 10cc71: 89 45 e0 mov %eax,-0x20(%ebp) Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 10cc74: 8d 56 04 lea 0x4(%esi),%edx 10cc77: 2b 55 f0 sub -0x10(%ebp),%edx 10cc7a: 8b 7d e8 mov -0x18(%ebp),%edi 10cc7d: 83 c7 04 add $0x4,%edi 10cc80: 39 fa cmp %edi,%edx 10cc82: 72 60 jb 10cce4 <_Heap_Block_split+0xbc> 10cc84: 8b 55 ec mov -0x14(%ebp),%edx 10cc87: 01 da add %ebx,%edx Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10cc89: 2b 75 ec sub -0x14(%ebp),%esi uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 10cc8c: 8b 7d e4 mov -0x1c(%ebp),%edi 10cc8f: 83 e7 01 and $0x1,%edi 10cc92: 0b 7d ec or -0x14(%ebp),%edi 10cc95: 89 7b 04 mov %edi,0x4(%ebx) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10cc98: 01 71 30 add %esi,0x30(%ecx) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10cc9b: 8b 58 04 mov 0x4(%eax),%ebx 10cc9e: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10cca1: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10cca6: 75 4c jne 10ccf4 <_Heap_Block_split+0xcc> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10cca8: 8b 48 08 mov 0x8(%eax),%ecx Heap_Block *prev = old_block->prev; 10ccab: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10ccae: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10ccb1: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10ccb4: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10ccb7: 89 50 08 mov %edx,0x8(%eax) } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; 10ccba: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10ccbc: 8d 04 16 lea (%esi,%edx,1),%eax next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10ccbf: 89 f1 mov %esi,%ecx 10ccc1: 83 c9 01 or $0x1,%ecx 10ccc4: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10ccc7: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10ccc9: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10cccd: 83 c4 14 add $0x14,%esp 10ccd0: 5b pop %ebx 10ccd1: 5e pop %esi 10ccd2: 5f pop %edi 10ccd3: c9 leave 10ccd4: c3 ret 10ccd5: 8d 76 00 lea 0x0(%esi),%esi ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; 10ccd8: 03 7d f0 add -0x10(%ebp),%edi 10ccdb: 29 d7 sub %edx,%edi 10ccdd: 89 7d ec mov %edi,-0x14(%ebp) 10cce0: eb 8c jmp 10cc6e <_Heap_Block_split+0x46> 10cce2: 66 90 xchg %ax,%ax free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10cce4: 8b 45 e0 mov -0x20(%ebp),%eax 10cce7: 83 48 04 01 orl $0x1,0x4(%eax) } } 10cceb: 83 c4 14 add $0x14,%esp 10ccee: 5b pop %ebx 10ccef: 5e pop %esi 10ccf0: 5f pop %edi 10ccf1: c9 leave 10ccf2: c3 ret 10ccf3: 90 nop RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10ccf4: 8b 7d 10 mov 0x10(%ebp),%edi 10ccf7: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10ccfa: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10ccfd: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10cd00: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10cd03: 89 53 0c mov %edx,0xc(%ebx) if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10cd06: ff 41 38 incl 0x38(%ecx) 10cd09: eb b4 jmp 10ccbf <_Heap_Block_split+0x97> =============================================================================== 00115290 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 115290: 55 push %ebp 115291: 89 e5 mov %esp,%ebp 115293: 56 push %esi 115294: 53 push %ebx 115295: 8b 4d 08 mov 0x8(%ebp),%ecx 115298: 8b 45 0c mov 0xc(%ebp),%eax Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 11529b: 8b 51 1c mov 0x1c(%ecx),%edx uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 11529e: 8b 59 24 mov 0x24(%ecx),%ebx uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 1152a1: 3b 41 18 cmp 0x18(%ecx),%eax 1152a4: 73 3a jae 1152e0 <_Heap_Extend+0x50> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 1152a6: 39 d0 cmp %edx,%eax 1152a8: 74 0e je 1152b8 <_Heap_Extend+0x28> 1152aa: b8 02 00 00 00 mov $0x2,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1152af: 8d 65 f8 lea -0x8(%ebp),%esp 1152b2: 5b pop %ebx 1152b3: 5e pop %esi 1152b4: c9 leave 1152b5: c3 ret 1152b6: 66 90 xchg %ax,%ax { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 1152b8: 03 45 10 add 0x10(%ebp),%eax * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 1152bb: 89 41 1c mov %eax,0x1c(%ecx) extend_size = new_heap_area_end 1152be: 29 d8 sub %ebx,%eax 1152c0: 8d 70 f8 lea -0x8(%eax),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 1152c3: 89 f0 mov %esi,%eax 1152c5: 31 d2 xor %edx,%edx 1152c7: f7 71 10 divl 0x10(%ecx) 1152ca: 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; 1152cc: 8b 45 14 mov 0x14(%ebp),%eax 1152cf: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 1152d1: 39 71 14 cmp %esi,0x14(%ecx) 1152d4: 76 1a jbe 1152f0 <_Heap_Extend+0x60> <== ALWAYS TAKEN 1152d6: 31 c0 xor %eax,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1152d8: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1152db: 5b pop %ebx <== NOT EXECUTED 1152dc: 5e pop %esi <== NOT EXECUTED 1152dd: c9 leave <== NOT EXECUTED 1152de: c3 ret <== NOT EXECUTED 1152df: 90 nop <== NOT EXECUTED * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 1152e0: 39 d0 cmp %edx,%eax 1152e2: 73 c2 jae 1152a6 <_Heap_Extend+0x16> 1152e4: b8 01 00 00 00 mov $0x1,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1152e9: 8d 65 f8 lea -0x8(%ebp),%esp 1152ec: 5b pop %ebx 1152ed: 5e pop %esi 1152ee: c9 leave 1152ef: c3 ret RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 1152f0: 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; 1152f3: 8b 43 04 mov 0x4(%ebx),%eax 1152f6: 83 e0 01 and $0x1,%eax 1152f9: 09 f0 or %esi,%eax 1152fb: 89 43 04 mov %eax,0x4(%ebx) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 1152fe: 8b 41 20 mov 0x20(%ecx),%eax 115301: 29 d0 sub %edx,%eax 115303: 83 c8 01 or $0x1,%eax 115306: 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; 115309: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 11530c: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 11530f: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 115312: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 115315: 83 ec 08 sub $0x8,%esp 115318: 83 c3 08 add $0x8,%ebx 11531b: 53 push %ebx 11531c: 51 push %ecx 11531d: e8 ce a7 ff ff call 10faf0 <_Heap_Free> 115322: 31 c0 xor %eax,%eax 115324: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 115327: 8d 65 f8 lea -0x8(%ebp),%esp 11532a: 5b pop %ebx 11532b: 5e pop %esi 11532c: c9 leave 11532d: c3 ret =============================================================================== 00111adc <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 111adc: 55 push %ebp 111add: 89 e5 mov %esp,%ebp 111adf: 57 push %edi 111ae0: 56 push %esi 111ae1: 53 push %ebx 111ae2: 83 ec 18 sub $0x18,%esp 111ae5: 8b 5d 08 mov 0x8(%ebp),%ebx 111ae8: 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 ) 111aeb: 8d 48 f8 lea -0x8(%eax),%ecx 111aee: 31 d2 xor %edx,%edx 111af0: f7 73 10 divl 0x10(%ebx) 111af3: 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; 111af5: 8b 43 20 mov 0x20(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 111af8: 39 c1 cmp %eax,%ecx 111afa: 72 07 jb 111b03 <_Heap_Free+0x27> && (uintptr_t) block <= (uintptr_t) heap->last_block; 111afc: 8b 73 24 mov 0x24(%ebx),%esi RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 111aff: 39 f1 cmp %esi,%ecx 111b01: 76 0d jbe 111b10 <_Heap_Free+0x34> /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 111b03: 31 c0 xor %eax,%eax } 111b05: 83 c4 18 add $0x18,%esp 111b08: 5b pop %ebx 111b09: 5e pop %esi 111b0a: 5f pop %edi 111b0b: c9 leave 111b0c: c3 ret 111b0d: 8d 76 00 lea 0x0(%esi),%esi - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 111b10: 8b 51 04 mov 0x4(%ecx),%edx 111b13: 89 55 f0 mov %edx,-0x10(%ebp) 111b16: 83 e2 fe and $0xfffffffe,%edx 111b19: 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); 111b1c: 01 ca add %ecx,%edx 111b1e: 89 55 dc mov %edx,-0x24(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 111b21: 39 d0 cmp %edx,%eax 111b23: 77 de ja 111b03 <_Heap_Free+0x27> <== NEVER TAKEN 111b25: 39 d6 cmp %edx,%esi 111b27: 72 da jb 111b03 <_Heap_Free+0x27> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 111b29: 8b 7a 04 mov 0x4(%edx),%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 111b2c: f7 c7 01 00 00 00 test $0x1,%edi 111b32: 74 cf je 111b03 <_Heap_Free+0x27> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 111b34: 83 e7 fe and $0xfffffffe,%edi 111b37: 89 7d e8 mov %edi,-0x18(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 111b3a: 39 d6 cmp %edx,%esi 111b3c: 0f 84 e2 00 00 00 je 111c24 <_Heap_Free+0x148> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 111b42: 8b 55 dc mov -0x24(%ebp),%edx 111b45: 8b 7d e8 mov -0x18(%ebp),%edi 111b48: 8b 7c 3a 04 mov 0x4(%edx,%edi,1),%edi 111b4c: 89 7d e0 mov %edi,-0x20(%ebp) 111b4f: 8a 55 e0 mov -0x20(%ebp),%dl 111b52: 83 e2 01 and $0x1,%edx 111b55: 88 55 e7 mov %dl,-0x19(%ebp) 111b58: 80 75 e7 01 xorb $0x1,-0x19(%ebp) next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 111b5c: f6 45 f0 01 testb $0x1,-0x10(%ebp) 111b60: 75 46 jne 111ba8 <_Heap_Free+0xcc> uintptr_t const prev_size = block->prev_size; 111b62: 8b 39 mov (%ecx),%edi 111b64: 89 7d f0 mov %edi,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 111b67: 29 f9 sub %edi,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 111b69: 39 c8 cmp %ecx,%eax 111b6b: 77 96 ja 111b03 <_Heap_Free+0x27> <== NEVER TAKEN 111b6d: 39 ce cmp %ecx,%esi 111b6f: 72 92 jb 111b03 <_Heap_Free+0x27> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 111b71: f6 41 04 01 testb $0x1,0x4(%ecx) 111b75: 74 8c je 111b03 <_Heap_Free+0x27> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 111b77: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 111b7b: 0f 84 af 00 00 00 je 111c30 <_Heap_Free+0x154> uintptr_t const size = block_size + prev_size + next_block_size; 111b81: 8b 45 ec mov -0x14(%ebp),%eax 111b84: 03 45 e8 add -0x18(%ebp),%eax 111b87: 01 f8 add %edi,%eax return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 111b89: 8b 55 dc mov -0x24(%ebp),%edx 111b8c: 8b 72 08 mov 0x8(%edx),%esi Heap_Block *prev = block->prev; 111b8f: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 111b92: 89 72 08 mov %esi,0x8(%edx) next->prev = prev; 111b95: 89 56 0c mov %edx,0xc(%esi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 111b98: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111b9b: 89 c2 mov %eax,%edx 111b9d: 83 ca 01 or $0x1,%edx 111ba0: 89 51 04 mov %edx,0x4(%ecx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 111ba3: 89 04 01 mov %eax,(%ecx,%eax,1) 111ba6: eb 2c jmp 111bd4 <_Heap_Free+0xf8> uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 111ba8: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 111bac: 74 3e je 111bec <_Heap_Free+0x110> uintptr_t const size = block_size + next_block_size; 111bae: 8b 7d e8 mov -0x18(%ebp),%edi 111bb1: 03 7d ec add -0x14(%ebp),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 111bb4: 8b 75 dc mov -0x24(%ebp),%esi 111bb7: 8b 46 08 mov 0x8(%esi),%eax Heap_Block *prev = old_block->prev; 111bba: 8b 56 0c mov 0xc(%esi),%edx new_block->next = next; 111bbd: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 111bc0: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 111bc3: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 111bc6: 89 4a 08 mov %ecx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111bc9: 89 f8 mov %edi,%eax 111bcb: 83 c8 01 or $0x1,%eax 111bce: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 111bd1: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 111bd4: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 111bd7: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 111bda: 8b 55 ec mov -0x14(%ebp),%edx 111bdd: 01 53 30 add %edx,0x30(%ebx) 111be0: b0 01 mov $0x1,%al return( true ); } 111be2: 83 c4 18 add $0x18,%esp 111be5: 5b pop %ebx 111be6: 5e pop %esi 111be7: 5f pop %edi 111be8: c9 leave 111be9: c3 ret 111bea: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 111bec: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 111bef: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 111bf2: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 111bf5: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 111bf8: 89 48 0c mov %ecx,0xc(%eax) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 111bfb: 8b 45 ec mov -0x14(%ebp),%eax 111bfe: 83 c8 01 or $0x1,%eax 111c01: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 111c04: 8b 7d dc mov -0x24(%ebp),%edi 111c07: 83 67 04 fe andl $0xfffffffe,0x4(%edi) next_block->prev_size = block_size; 111c0b: 8b 45 ec mov -0x14(%ebp),%eax 111c0e: 89 07 mov %eax,(%edi) /* Statistics */ ++stats->free_blocks; 111c10: 8b 43 38 mov 0x38(%ebx),%eax 111c13: 40 inc %eax 111c14: 89 43 38 mov %eax,0x38(%ebx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 111c17: 3b 43 3c cmp 0x3c(%ebx),%eax 111c1a: 76 b8 jbe 111bd4 <_Heap_Free+0xf8> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 111c1c: 89 43 3c mov %eax,0x3c(%ebx) 111c1f: eb b3 jmp 111bd4 <_Heap_Free+0xf8> 111c21: 8d 76 00 lea 0x0(%esi),%esi _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 111c24: c6 45 e7 00 movb $0x0,-0x19(%ebp) 111c28: e9 2f ff ff ff jmp 111b5c <_Heap_Free+0x80> 111c2d: 8d 76 00 lea 0x0(%esi),%esi prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 111c30: 8b 45 ec mov -0x14(%ebp),%eax 111c33: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111c36: 89 c6 mov %eax,%esi 111c38: 83 ce 01 or $0x1,%esi 111c3b: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 111c3e: 8b 55 dc mov -0x24(%ebp),%edx 111c41: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 111c45: 89 02 mov %eax,(%edx) 111c47: eb 8b jmp 111bd4 <_Heap_Free+0xf8> =============================================================================== 001312a8 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 1312a8: 55 push %ebp 1312a9: 89 e5 mov %esp,%ebp 1312ab: 57 push %edi 1312ac: 56 push %esi 1312ad: 53 push %ebx 1312ae: 8b 7d 08 mov 0x8(%ebp),%edi 1312b1: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 1312b4: c7 06 00 00 00 00 movl $0x0,(%esi) info->largest = 0; 1312ba: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) info->total = 0; 1312c1: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 1312c8: 8b 57 08 mov 0x8(%edi),%edx for(the_block = _Heap_Free_list_first(the_heap); 1312cb: 39 d7 cmp %edx,%edi 1312cd: 74 2a je 1312f9 <_Heap_Get_free_information+0x51><== NEVER TAKEN 1312cf: bb 01 00 00 00 mov $0x1,%ebx 1312d4: 31 c9 xor %ecx,%ecx 1312d6: eb 02 jmp 1312da <_Heap_Get_free_information+0x32> 1312d8: 89 c3 mov %eax,%ebx - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 1312da: 8b 42 04 mov 0x4(%edx),%eax 1312dd: 83 e0 fe and $0xfffffffe,%eax /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; 1312e0: 01 c1 add %eax,%ecx if ( info->largest < the_size ) 1312e2: 39 46 04 cmp %eax,0x4(%esi) 1312e5: 73 03 jae 1312ea <_Heap_Get_free_information+0x42> info->largest = the_size; 1312e7: 89 46 04 mov %eax,0x4(%esi) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 1312ea: 8b 52 08 mov 0x8(%edx),%edx 1312ed: 8d 43 01 lea 0x1(%ebx),%eax info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 1312f0: 39 d7 cmp %edx,%edi 1312f2: 75 e4 jne 1312d8 <_Heap_Get_free_information+0x30> 1312f4: 89 1e mov %ebx,(%esi) 1312f6: 89 4e 08 mov %ecx,0x8(%esi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 1312f9: 5b pop %ebx 1312fa: 5e pop %esi 1312fb: 5f pop %edi 1312fc: c9 leave 1312fd: c3 ret =============================================================================== 00143d74 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 143d74: 55 push %ebp 143d75: 89 e5 mov %esp,%ebp 143d77: 57 push %edi 143d78: 56 push %esi 143d79: 53 push %ebx 143d7a: 83 ec 04 sub $0x4,%esp 143d7d: 8b 45 08 mov 0x8(%ebp),%eax 143d80: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block = the_heap->first_block; 143d83: 8b 58 20 mov 0x20(%eax),%ebx Heap_Block *const end = the_heap->last_block; 143d86: 8b 78 24 mov 0x24(%eax),%edi _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 143d89: c7 06 00 00 00 00 movl $0x0,(%esi) the_info->Free.total = 0; 143d8f: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) the_info->Free.largest = 0; 143d96: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) the_info->Used.number = 0; 143d9d: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) the_info->Used.total = 0; 143da4: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) the_info->Used.largest = 0; 143dab: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) while ( the_block != end ) { 143db2: 39 fb cmp %edi,%ebx 143db4: 74 45 je 143dfb <_Heap_Get_information+0x87><== NEVER TAKEN 143db6: 8b 4b 04 mov 0x4(%ebx),%ecx uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 143db9: 8d 46 0c lea 0xc(%esi),%eax 143dbc: 89 45 f0 mov %eax,-0x10(%ebp) 143dbf: eb 16 jmp 143dd7 <_Heap_Get_information+0x63> 143dc1: 8d 76 00 lea 0x0(%esi),%esi while ( the_block != end ) { uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 143dc4: 89 f0 mov %esi,%eax info = &the_info->Used; else info = &the_info->Free; info->number++; 143dc6: ff 00 incl (%eax) info->total += the_size; 143dc8: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 143dcb: 39 50 04 cmp %edx,0x4(%eax) 143dce: 73 03 jae 143dd3 <_Heap_Get_information+0x5f> info->largest = the_size; 143dd0: 89 50 04 mov %edx,0x4(%eax) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 143dd3: 39 df cmp %ebx,%edi 143dd5: 74 15 je 143dec <_Heap_Get_information+0x78> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 143dd7: 89 ca mov %ecx,%edx 143dd9: 83 e2 fe and $0xfffffffe,%edx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 143ddc: 01 d3 add %edx,%ebx block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 143dde: 8b 4b 04 mov 0x4(%ebx),%ecx uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 143de1: f6 c1 01 test $0x1,%cl 143de4: 74 de je 143dc4 <_Heap_Get_information+0x50> 143de6: 8b 45 f0 mov -0x10(%ebp),%eax 143de9: eb db jmp 143dc6 <_Heap_Get_information+0x52> 143deb: 90 nop the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 143dec: 8b 46 14 mov 0x14(%esi),%eax 143def: 83 c0 08 add $0x8,%eax /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 143df2: 89 46 14 mov %eax,0x14(%esi) } 143df5: 58 pop %eax 143df6: 5b pop %ebx 143df7: 5e pop %esi 143df8: 5f pop %edi 143df9: c9 leave 143dfa: c3 ret the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 143dfb: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED 143e00: eb f0 jmp 143df2 <_Heap_Get_information+0x7e><== NOT EXECUTED =============================================================================== 0011f944 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11f944: 55 push %ebp 11f945: 89 e5 mov %esp,%ebp 11f947: 57 push %edi 11f948: 56 push %esi 11f949: 53 push %ebx 11f94a: 83 ec 2c sub $0x2c,%esp 11f94d: 8b 5d 08 mov 0x8(%ebp),%ebx 11f950: 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 ) 11f953: 8d 4e f8 lea -0x8(%esi),%ecx 11f956: 89 f0 mov %esi,%eax 11f958: 31 d2 xor %edx,%edx 11f95a: f7 73 10 divl 0x10(%ebx) 11f95d: 29 d1 sub %edx,%ecx uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; 11f95f: 8b 45 14 mov 0x14(%ebp),%eax 11f962: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11f968: 8b 55 18 mov 0x18(%ebp),%edx 11f96b: c7 02 00 00 00 00 movl $0x0,(%edx) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11f971: 39 4b 20 cmp %ecx,0x20(%ebx) 11f974: 76 0e jbe 11f984 <_Heap_Resize_block+0x40> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes; 11f976: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f97b: 8d 65 f4 lea -0xc(%ebp),%esp 11f97e: 5b pop %ebx 11f97f: 5e pop %esi 11f980: 5f pop %edi 11f981: c9 leave 11f982: c3 ret 11f983: 90 nop 11f984: 39 4b 24 cmp %ecx,0x24(%ebx) 11f987: 72 ed jb 11f976 <_Heap_Resize_block+0x32> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11f989: 8b 41 04 mov 0x4(%ecx),%eax 11f98c: 83 e0 fe and $0xfffffffe,%eax { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; 11f98f: 8d 3c 01 lea (%ecx,%eax,1),%edi 11f992: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11f995: 89 fa mov %edi,%edx 11f997: 29 f2 sub %esi,%edx 11f999: 83 c2 04 add $0x4,%edx 11f99c: 89 55 dc mov %edx,-0x24(%ebp) 11f99f: 8b 57 04 mov 0x4(%edi),%edx 11f9a2: 83 e2 fe and $0xfffffffe,%edx 11f9a5: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11f9a8: 8b 54 17 04 mov 0x4(%edi,%edx,1),%edx 11f9ac: 83 e2 01 and $0x1,%edx 11f9af: 89 55 e0 mov %edx,-0x20(%ebp) bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 11f9b2: 8b 55 dc mov -0x24(%ebp),%edx 11f9b5: 8b 7d 14 mov 0x14(%ebp),%edi 11f9b8: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11f9ba: 8a 55 e0 mov -0x20(%ebp),%dl 11f9bd: 80 f2 01 xor $0x1,%dl 11f9c0: 88 55 e0 mov %dl,-0x20(%ebp) 11f9c3: 75 17 jne 11f9dc <_Heap_Resize_block+0x98> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11f9c5: 8b 55 dc mov -0x24(%ebp),%edx 11f9c8: 39 55 10 cmp %edx,0x10(%ebp) 11f9cb: 76 20 jbe 11f9ed <_Heap_Resize_block+0xa9> 11f9cd: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f9d2: 8d 65 f4 lea -0xc(%ebp),%esp 11f9d5: 5b pop %ebx 11f9d6: 5e pop %esi 11f9d7: 5f pop %edi 11f9d8: c9 leave 11f9d9: c3 ret 11f9da: 66 90 xchg %ax,%ax _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 11f9dc: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11f9df: 8b 7d d0 mov -0x30(%ebp),%edi 11f9e2: 01 7d dc add %edi,-0x24(%ebp) } if ( new_alloc_size > alloc_size ) { 11f9e5: 8b 55 dc mov -0x24(%ebp),%edx 11f9e8: 39 55 10 cmp %edx,0x10(%ebp) 11f9eb: 77 e0 ja 11f9cd <_Heap_Resize_block+0x89> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11f9ed: 80 7d e0 00 cmpb $0x0,-0x20(%ebp) 11f9f1: 74 31 je 11fa24 <_Heap_Resize_block+0xe0> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11f9f3: 8b 79 04 mov 0x4(%ecx),%edi 11f9f6: 83 e7 01 and $0x1,%edi 11f9f9: 09 c7 or %eax,%edi 11f9fb: 89 79 04 mov %edi,0x4(%ecx) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 11f9fe: 8b 7d d4 mov -0x2c(%ebp),%edi 11fa01: 8b 7f 08 mov 0x8(%edi),%edi 11fa04: 89 7d e4 mov %edi,-0x1c(%ebp) Heap_Block *prev = block->prev; 11fa07: 8b 55 d4 mov -0x2c(%ebp),%edx 11fa0a: 8b 7a 0c mov 0xc(%edx),%edi prev->next = next; 11fa0d: 8b 55 e4 mov -0x1c(%ebp),%edx 11fa10: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11fa13: 89 7a 0c mov %edi,0xc(%edx) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 11fa16: 83 4c 08 04 01 orl $0x1,0x4(%eax,%ecx,1) /* Statistics */ --stats->free_blocks; 11fa1b: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11fa1e: 8b 7d d0 mov -0x30(%ebp),%edi 11fa21: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11fa24: ff 75 10 pushl 0x10(%ebp) 11fa27: 56 push %esi 11fa28: 51 push %ecx 11fa29: 53 push %ebx 11fa2a: e8 dd d2 fe ff call 10cd0c <_Heap_Block_allocate> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11fa2f: 8b 50 04 mov 0x4(%eax),%edx 11fa32: 83 e2 fe and $0xfffffffe,%edx 11fa35: 29 f0 sub %esi,%eax 11fa37: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11fa3b: 8b 55 18 mov 0x18(%ebp),%edx 11fa3e: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11fa40: ff 43 54 incl 0x54(%ebx) 11fa43: 31 c0 xor %eax,%eax 11fa45: 83 c4 10 add $0x10,%esp new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11fa48: 8d 65 f4 lea -0xc(%ebp),%esp 11fa4b: 5b pop %ebx 11fa4c: 5e pop %esi 11fa4d: 5f pop %edi 11fa4e: c9 leave 11fa4f: c3 ret =============================================================================== 0011fa50 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11fa50: 55 push %ebp 11fa51: 89 e5 mov %esp,%ebp 11fa53: 56 push %esi 11fa54: 53 push %ebx 11fa55: 8b 5d 08 mov 0x8(%ebp),%ebx 11fa58: 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 ) 11fa5b: 8d 4e f8 lea -0x8(%esi),%ecx 11fa5e: 89 f0 mov %esi,%eax 11fa60: 31 d2 xor %edx,%edx 11fa62: f7 73 10 divl 0x10(%ebx) 11fa65: 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; 11fa67: 8b 43 20 mov 0x20(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11fa6a: 39 c1 cmp %eax,%ecx 11fa6c: 72 07 jb 11fa75 <_Heap_Size_of_alloc_area+0x25> && (uintptr_t) block <= (uintptr_t) heap->last_block; 11fa6e: 8b 53 24 mov 0x24(%ebx),%edx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11fa71: 39 d1 cmp %edx,%ecx 11fa73: 76 07 jbe 11fa7c <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 11fa75: 31 c0 xor %eax,%eax } 11fa77: 5b pop %ebx 11fa78: 5e pop %esi 11fa79: c9 leave 11fa7a: c3 ret 11fa7b: 90 nop RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11fa7c: 8b 59 04 mov 0x4(%ecx),%ebx 11fa7f: 83 e3 fe and $0xfffffffe,%ebx 11fa82: 01 d9 add %ebx,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11fa84: 39 c8 cmp %ecx,%eax 11fa86: 77 ed ja 11fa75 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11fa88: 39 ca cmp %ecx,%edx 11fa8a: 72 e9 jb 11fa75 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11fa8c: f6 41 04 01 testb $0x1,0x4(%ecx) 11fa90: 74 e3 je 11fa75 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11fa92: 29 f1 sub %esi,%ecx 11fa94: 8d 51 04 lea 0x4(%ecx),%edx 11fa97: 8b 45 10 mov 0x10(%ebp),%eax 11fa9a: 89 10 mov %edx,(%eax) 11fa9c: b0 01 mov $0x1,%al return true; } 11fa9e: 5b pop %ebx 11fa9f: 5e pop %esi 11faa0: c9 leave 11faa1: c3 ret =============================================================================== 0010d84c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d84c: 55 push %ebp 10d84d: 89 e5 mov %esp,%ebp 10d84f: 57 push %edi 10d850: 56 push %esi 10d851: 53 push %ebx 10d852: 83 ec 3c sub $0x3c,%esp 10d855: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d858: 8b 43 10 mov 0x10(%ebx),%eax 10d85b: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d85e: 8b 53 14 mov 0x14(%ebx),%edx 10d861: 89 55 dc mov %edx,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d864: 8b 43 24 mov 0x24(%ebx),%eax 10d867: 89 45 d8 mov %eax,-0x28(%ebp) Heap_Block *block = heap->first_block; 10d86a: 8b 73 20 mov 0x20(%ebx),%esi Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d86d: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d871: 75 1d jne 10d890 <_Heap_Walk+0x44> 10d873: c7 45 e4 44 d8 10 00 movl $0x10d844,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d87a: 83 3d a0 a9 12 00 03 cmpl $0x3,0x12a9a0 10d881: 74 1d je 10d8a0 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d883: b0 01 mov $0x1,%al block = next_block; } return true; } 10d885: 8d 65 f4 lea -0xc(%ebp),%esp 10d888: 5b pop %ebx 10d889: 5e pop %esi 10d88a: 5f pop %edi 10d88b: c9 leave 10d88c: c3 ret 10d88d: 8d 76 00 lea 0x0(%esi),%esi uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d890: c7 45 e4 14 dc 10 00 movl $0x10dc14,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d897: 83 3d a0 a9 12 00 03 cmpl $0x3,0x12a9a0 10d89e: 75 e3 jne 10d883 <_Heap_Walk+0x37> <== NEVER TAKEN Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 10d8a0: 52 push %edx 10d8a1: ff 73 0c pushl 0xc(%ebx) 10d8a4: ff 73 08 pushl 0x8(%ebx) 10d8a7: ff 75 d8 pushl -0x28(%ebp) 10d8aa: 56 push %esi 10d8ab: ff 73 1c pushl 0x1c(%ebx) 10d8ae: ff 73 18 pushl 0x18(%ebx) 10d8b1: ff 75 dc pushl -0x24(%ebp) 10d8b4: ff 75 e0 pushl -0x20(%ebp) 10d8b7: 68 f0 2a 12 00 push $0x122af0 10d8bc: 6a 00 push $0x0 10d8be: ff 75 0c pushl 0xc(%ebp) 10d8c1: 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 ) { 10d8c4: 83 c4 30 add $0x30,%esp 10d8c7: 8b 45 e0 mov -0x20(%ebp),%eax 10d8ca: 85 c0 test %eax,%eax 10d8cc: 0f 84 b2 00 00 00 je 10d984 <_Heap_Walk+0x138> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d8d2: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d8d6: 0f 85 b0 00 00 00 jne 10d98c <_Heap_Walk+0x140> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d8dc: 8b 45 dc mov -0x24(%ebp),%eax 10d8df: 31 d2 xor %edx,%edx 10d8e1: f7 75 e0 divl -0x20(%ebp) 10d8e4: 85 d2 test %edx,%edx 10d8e6: 0f 85 ac 00 00 00 jne 10d998 <_Heap_Walk+0x14c> ); return false; } if ( 10d8ec: 8d 46 08 lea 0x8(%esi),%eax 10d8ef: 31 d2 xor %edx,%edx 10d8f1: f7 75 e0 divl -0x20(%ebp) 10d8f4: 85 d2 test %edx,%edx 10d8f6: 0f 85 a8 00 00 00 jne 10d9a4 <_Heap_Walk+0x158> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10d8fc: 8b 56 04 mov 0x4(%esi),%edx 10d8ff: 89 55 cc mov %edx,-0x34(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d902: 83 e2 01 and $0x1,%edx 10d905: 0f 84 a1 00 00 00 je 10d9ac <_Heap_Walk+0x160> ); return false; } if ( first_block->prev_size != page_size ) { 10d90b: 8b 06 mov (%esi),%eax 10d90d: 39 45 e0 cmp %eax,-0x20(%ebp) 10d910: 75 4e jne 10d960 <_Heap_Walk+0x114> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d912: 8b 55 d8 mov -0x28(%ebp),%edx 10d915: 8b 42 04 mov 0x4(%edx),%eax 10d918: 83 e0 fe and $0xfffffffe,%eax 10d91b: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10d920: 0f 84 bd 02 00 00 je 10dbe3 <_Heap_Walk+0x397> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d926: 8b 43 10 mov 0x10(%ebx),%eax 10d929: 89 45 d4 mov %eax,-0x2c(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d92c: 8b 4b 08 mov 0x8(%ebx),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10d92f: 39 cb cmp %ecx,%ebx 10d931: 0f 84 09 01 00 00 je 10da40 <_Heap_Walk+0x1f4> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d937: 8b 7b 20 mov 0x20(%ebx),%edi RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10d93a: 39 cf cmp %ecx,%edi 10d93c: 76 76 jbe 10d9b4 <_Heap_Walk+0x168> <== ALWAYS TAKEN 10d93e: 66 90 xchg %ax,%ax if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d940: 51 push %ecx 10d941: 68 38 2c 12 00 push $0x122c38 10d946: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10d948: 6a 01 push $0x1 10d94a: ff 75 0c pushl 0xc(%ebp) 10d94d: ff 55 e4 call *-0x1c(%ebp) 10d950: 31 c0 xor %eax,%eax 10d952: 83 c4 10 add $0x10,%esp block = next_block; } return true; } 10d955: 8d 65 f4 lea -0xc(%ebp),%esp 10d958: 5b pop %ebx 10d959: 5e pop %esi 10d95a: 5f pop %edi 10d95b: c9 leave 10d95c: c3 ret 10d95d: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( first_block->prev_size != page_size ) { (*printer)( 10d960: 83 ec 0c sub $0xc,%esp 10d963: ff 75 e0 pushl -0x20(%ebp) 10d966: 50 push %eax 10d967: 68 0c 2c 12 00 push $0x122c0c return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d96c: 6a 01 push $0x1 10d96e: ff 75 0c pushl 0xc(%ebp) 10d971: ff 55 e4 call *-0x1c(%ebp) 10d974: 31 c0 xor %eax,%eax 10d976: 83 c4 20 add $0x20,%esp block = next_block; } return true; } 10d979: 8d 65 f4 lea -0xc(%ebp),%esp 10d97c: 5b pop %ebx 10d97d: 5e pop %esi 10d97e: 5f pop %edi 10d97f: c9 leave 10d980: c3 ret 10d981: 8d 76 00 lea 0x0(%esi),%esi first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 10d984: 57 push %edi 10d985: 68 67 2e 12 00 push $0x122e67 10d98a: eb bc jmp 10d948 <_Heap_Walk+0xfc> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d98c: ff 75 e0 pushl -0x20(%ebp) 10d98f: 68 7a 2e 12 00 push $0x122e7a 10d994: eb b2 jmp 10d948 <_Heap_Walk+0xfc> 10d996: 66 90 xchg %ax,%ax return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d998: ff 75 dc pushl -0x24(%ebp) 10d99b: 68 84 2b 12 00 push $0x122b84 10d9a0: eb a6 jmp 10d948 <_Heap_Walk+0xfc> 10d9a2: 66 90 xchg %ax,%ax } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d9a4: 56 push %esi 10d9a5: 68 a8 2b 12 00 push $0x122ba8 10d9aa: eb 9c jmp 10d948 <_Heap_Walk+0xfc> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d9ac: 56 push %esi 10d9ad: 68 dc 2b 12 00 push $0x122bdc 10d9b2: eb 94 jmp 10d948 <_Heap_Walk+0xfc> && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d9b4: 8b 53 24 mov 0x24(%ebx),%edx 10d9b7: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10d9ba: 39 d1 cmp %edx,%ecx 10d9bc: 77 82 ja 10d940 <_Heap_Walk+0xf4> <== NEVER TAKEN ); return false; } if ( 10d9be: 8d 41 08 lea 0x8(%ecx),%eax 10d9c1: 31 d2 xor %edx,%edx 10d9c3: f7 75 d4 divl -0x2c(%ebp) 10d9c6: 85 d2 test %edx,%edx 10d9c8: 0f 85 20 02 00 00 jne 10dbee <_Heap_Walk+0x3a2> <== NEVER TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d9ce: 8b 41 04 mov 0x4(%ecx),%eax 10d9d1: 83 e0 fe and $0xfffffffe,%eax 10d9d4: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d9d9: 0f 85 29 02 00 00 jne 10dc08 <_Heap_Walk+0x3bc> <== NEVER TAKEN ); return false; } if ( free_block->prev != prev_block ) { 10d9df: 8b 41 0c mov 0xc(%ecx),%eax 10d9e2: 39 d8 cmp %ebx,%eax 10d9e4: 0f 85 0f 02 00 00 jne 10dbf9 <_Heap_Walk+0x3ad> <== NEVER TAKEN 10d9ea: 89 75 c8 mov %esi,-0x38(%ebp) 10d9ed: 89 c6 mov %eax,%esi 10d9ef: 89 5d c4 mov %ebx,-0x3c(%ebp) 10d9f2: eb 3d jmp 10da31 <_Heap_Walk+0x1e5> 10d9f4: 39 cf cmp %ecx,%edi 10d9f6: 0f 87 44 ff ff ff ja 10d940 <_Heap_Walk+0xf4> 10d9fc: 3b 4d d0 cmp -0x30(%ebp),%ecx 10d9ff: 0f 87 3b ff ff ff ja 10d940 <_Heap_Walk+0xf4> <== NEVER TAKEN ); return false; } if ( 10da05: 8d 41 08 lea 0x8(%ecx),%eax 10da08: 31 d2 xor %edx,%edx 10da0a: f7 75 d4 divl -0x2c(%ebp) 10da0d: 85 d2 test %edx,%edx 10da0f: 0f 85 d9 01 00 00 jne 10dbee <_Heap_Walk+0x3a2> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10da15: 8b 41 04 mov 0x4(%ecx),%eax 10da18: 83 e0 fe and $0xfffffffe,%eax 10da1b: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10da20: 0f 85 e2 01 00 00 jne 10dc08 <_Heap_Walk+0x3bc> ); return false; } if ( free_block->prev != prev_block ) { 10da26: 8b 41 0c mov 0xc(%ecx),%eax 10da29: 39 d8 cmp %ebx,%eax 10da2b: 0f 85 c8 01 00 00 jne 10dbf9 <_Heap_Walk+0x3ad> (*printer)( 10da31: 89 cb mov %ecx,%ebx return false; } prev_block = free_block; free_block = free_block->next; 10da33: 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 ) { 10da36: 39 ce cmp %ecx,%esi 10da38: 75 ba jne 10d9f4 <_Heap_Walk+0x1a8> 10da3a: 8b 75 c8 mov -0x38(%ebp),%esi 10da3d: 8b 5d c4 mov -0x3c(%ebp),%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10da40: 39 75 d8 cmp %esi,-0x28(%ebp) 10da43: 0f 84 3a fe ff ff je 10d883 <_Heap_Walk+0x37> <== NEVER TAKEN 10da49: 8b 45 cc mov -0x34(%ebp),%eax - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10da4c: 89 c1 mov %eax,%ecx 10da4e: 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); 10da51: 8d 3c 31 lea (%ecx,%esi,1),%edi uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 10da54: a8 01 test $0x1,%al 10da56: 74 30 je 10da88 <_Heap_Walk+0x23c> (*printer)( 10da58: 83 ec 0c sub $0xc,%esp 10da5b: 51 push %ecx 10da5c: 56 push %esi 10da5d: 68 c9 2e 12 00 push $0x122ec9 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10da62: 6a 00 push $0x0 10da64: ff 75 0c pushl 0xc(%ebp) 10da67: 89 4d c0 mov %ecx,-0x40(%ebp) 10da6a: ff 55 e4 call *-0x1c(%ebp) 10da6d: 83 c4 20 add $0x20,%esp 10da70: 8b 4d c0 mov -0x40(%ebp),%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10da73: 39 7b 20 cmp %edi,0x20(%ebx) 10da76: 76 20 jbe 10da98 <_Heap_Walk+0x24c> <== ALWAYS TAKEN block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10da78: 83 ec 0c sub $0xc,%esp 10da7b: 57 push %edi 10da7c: 56 push %esi 10da7d: 68 e4 2c 12 00 push $0x122ce4 10da82: e9 e5 fe ff ff jmp 10d96c <_Heap_Walk+0x120> 10da87: 90 nop "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10da88: 83 ec 08 sub $0x8,%esp 10da8b: ff 36 pushl (%esi) 10da8d: 51 push %ecx 10da8e: 56 push %esi 10da8f: 68 bc 2c 12 00 push $0x122cbc 10da94: eb cc jmp 10da62 <_Heap_Walk+0x216> 10da96: 66 90 xchg %ax,%ax 10da98: 39 7b 24 cmp %edi,0x24(%ebx) 10da9b: 72 db jb 10da78 <_Heap_Walk+0x22c> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10da9d: 89 c8 mov %ecx,%eax 10da9f: 31 d2 xor %edx,%edx 10daa1: f7 75 e0 divl -0x20(%ebp) 10daa4: 85 d2 test %edx,%edx 10daa6: 0f 85 02 01 00 00 jne 10dbae <_Heap_Walk+0x362> ); return false; } if ( block_size < min_block_size ) { 10daac: 39 4d dc cmp %ecx,-0x24(%ebp) 10daaf: 0f 87 0b 01 00 00 ja 10dbc0 <_Heap_Walk+0x374> ); return false; } if ( next_block_begin <= block_begin ) { 10dab5: 39 fe cmp %edi,%esi 10dab7: 0f 83 17 01 00 00 jae 10dbd4 <_Heap_Walk+0x388> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10dabd: f6 47 04 01 testb $0x1,0x4(%edi) 10dac1: 0f 85 91 00 00 00 jne 10db58 <_Heap_Walk+0x30c> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10dac7: 8b 4b 08 mov 0x8(%ebx),%ecx block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10daca: 8b 46 04 mov 0x4(%esi),%eax 10dacd: 89 45 cc mov %eax,-0x34(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10dad0: 83 e0 fe and $0xfffffffe,%eax 10dad3: 89 45 d4 mov %eax,-0x2c(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10dad6: 01 f0 add %esi,%eax 10dad8: 89 45 d0 mov %eax,-0x30(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10dadb: 8b 56 08 mov 0x8(%esi),%edx return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10dade: 39 53 0c cmp %edx,0xc(%ebx) 10dae1: 0f 84 99 00 00 00 je 10db80 <_Heap_Walk+0x334> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10dae7: 39 da cmp %ebx,%edx 10dae9: 0f 84 a9 00 00 00 je 10db98 <_Heap_Walk+0x34c> 10daef: c7 45 c8 35 2a 12 00 movl $0x122a35,-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)( 10daf6: 8b 46 0c mov 0xc(%esi),%eax 10daf9: 39 c1 cmp %eax,%ecx 10dafb: 74 7b je 10db78 <_Heap_Walk+0x32c> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10dafd: 39 d8 cmp %ebx,%eax 10daff: 0f 84 9f 00 00 00 je 10dba4 <_Heap_Walk+0x358> 10db05: b9 35 2a 12 00 mov $0x122a35,%ecx Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10db0a: ff 75 c8 pushl -0x38(%ebp) 10db0d: 52 push %edx 10db0e: 51 push %ecx 10db0f: 50 push %eax 10db10: 56 push %esi 10db11: 68 a4 2d 12 00 push $0x122da4 10db16: 6a 00 push $0x0 10db18: ff 75 0c pushl 0xc(%ebp) 10db1b: 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 ) { 10db1e: 8b 55 d0 mov -0x30(%ebp),%edx 10db21: 8b 02 mov (%edx),%eax 10db23: 83 c4 20 add $0x20,%esp 10db26: 39 45 d4 cmp %eax,-0x2c(%ebp) 10db29: 74 11 je 10db3c <_Heap_Walk+0x2f0> (*printer)( 10db2b: 51 push %ecx 10db2c: 52 push %edx 10db2d: 50 push %eax 10db2e: ff 75 d4 pushl -0x2c(%ebp) 10db31: 56 push %esi 10db32: 68 d0 2d 12 00 push $0x122dd0 10db37: e9 30 fe ff ff jmp 10d96c <_Heap_Walk+0x120> ); return false; } if ( !prev_used ) { 10db3c: f6 45 cc 01 testb $0x1,-0x34(%ebp) 10db40: 74 4a je 10db8c <_Heap_Walk+0x340> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10db42: 8b 43 08 mov 0x8(%ebx),%eax ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 10db45: 39 d8 cmp %ebx,%eax 10db47: 75 0a jne 10db53 <_Heap_Walk+0x307> <== ALWAYS TAKEN 10db49: eb 21 jmp 10db6c <_Heap_Walk+0x320> <== NOT EXECUTED 10db4b: 90 nop <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 10db4c: 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 ) { 10db4f: 39 d8 cmp %ebx,%eax 10db51: 74 19 je 10db6c <_Heap_Walk+0x320> if ( free_block == block ) { 10db53: 39 f0 cmp %esi,%eax 10db55: 75 f5 jne 10db4c <_Heap_Walk+0x300> 10db57: 90 nop if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10db58: 39 7d d8 cmp %edi,-0x28(%ebp) 10db5b: 0f 84 22 fd ff ff je 10d883 <_Heap_Walk+0x37> const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10db61: 8b 47 04 mov 0x4(%edi),%eax 10db64: 89 fe mov %edi,%esi 10db66: e9 e1 fe ff ff jmp 10da4c <_Heap_Walk+0x200> 10db6b: 90 nop return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10db6c: 56 push %esi 10db6d: 68 3c 2e 12 00 push $0x122e3c 10db72: e9 d1 fd ff ff jmp 10d948 <_Heap_Walk+0xfc> 10db77: 90 nop Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10db78: b9 f4 2e 12 00 mov $0x122ef4,%ecx 10db7d: eb 8b jmp 10db0a <_Heap_Walk+0x2be> 10db7f: 90 nop } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10db80: c7 45 c8 e0 2e 12 00 movl $0x122ee0,-0x38(%ebp) 10db87: e9 6a ff ff ff jmp 10daf6 <_Heap_Walk+0x2aa> return false; } if ( !prev_used ) { (*printer)( 10db8c: 56 push %esi 10db8d: 68 0c 2e 12 00 push $0x122e0c 10db92: e9 b1 fd ff ff jmp 10d948 <_Heap_Walk+0xfc> 10db97: 90 nop " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10db98: c7 45 c8 ea 2e 12 00 movl $0x122eea,-0x38(%ebp) 10db9f: e9 52 ff ff ff jmp 10daf6 <_Heap_Walk+0x2aa> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10dba4: b9 ff 2e 12 00 mov $0x122eff,%ecx 10dba9: e9 5c ff ff ff jmp 10db0a <_Heap_Walk+0x2be> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 10dbae: 83 ec 0c sub $0xc,%esp 10dbb1: 51 push %ecx 10dbb2: 56 push %esi 10dbb3: 68 14 2d 12 00 push $0x122d14 10dbb8: e9 af fd ff ff jmp 10d96c <_Heap_Walk+0x120> 10dbbd: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( block_size < min_block_size ) { (*printer)( 10dbc0: 83 ec 08 sub $0x8,%esp 10dbc3: ff 75 dc pushl -0x24(%ebp) 10dbc6: 51 push %ecx 10dbc7: 56 push %esi 10dbc8: 68 44 2d 12 00 push $0x122d44 10dbcd: e9 9a fd ff ff jmp 10d96c <_Heap_Walk+0x120> 10dbd2: 66 90 xchg %ax,%ax return false; } if ( next_block_begin <= block_begin ) { (*printer)( 10dbd4: 83 ec 0c sub $0xc,%esp 10dbd7: 57 push %edi 10dbd8: 56 push %esi 10dbd9: 68 70 2d 12 00 push $0x122d70 10dbde: e9 89 fd ff ff jmp 10d96c <_Heap_Walk+0x120> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10dbe3: 53 push %ebx 10dbe4: 68 98 2e 12 00 push $0x122e98 10dbe9: e9 5a fd ff ff jmp 10d948 <_Heap_Walk+0xfc> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10dbee: 51 push %ecx 10dbef: 68 58 2c 12 00 push $0x122c58 10dbf4: e9 4f fd ff ff jmp 10d948 <_Heap_Walk+0xfc> return false; } if ( free_block->prev != prev_block ) { (*printer)( 10dbf9: 83 ec 0c sub $0xc,%esp 10dbfc: 50 push %eax 10dbfd: 51 push %ecx 10dbfe: 68 88 2c 12 00 push $0x122c88 10dc03: e9 64 fd ff ff jmp 10d96c <_Heap_Walk+0x120> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10dc08: 51 push %ecx 10dc09: 68 ad 2e 12 00 push $0x122ead 10dc0e: e9 35 fd ff ff jmp 10d948 <_Heap_Walk+0xfc> =============================================================================== 0010c308 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10c308: 55 push %ebp 10c309: 89 e5 mov %esp,%ebp 10c30b: 53 push %ebx 10c30c: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10c30f: 8b 15 c0 76 12 00 mov 0x1276c0,%edx 10c315: 85 d2 test %edx,%edx 10c317: 74 1a je 10c333 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10c319: 31 db xor %ebx,%ebx 10c31b: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10c31c: 50 push %eax 10c31d: 6a 00 push $0x0 10c31f: 6a 00 push $0x0 10c321: 53 push %ebx 10c322: e8 01 53 00 00 call 111628 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10c327: 43 inc %ebx 10c328: 83 c4 10 add $0x10,%esp 10c32b: 39 1d c0 76 12 00 cmp %ebx,0x1276c0 10c331: 77 e9 ja 10c31c <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10c333: 8b 5d fc mov -0x4(%ebp),%ebx 10c336: c9 leave 10c337: c3 ret =============================================================================== 0010c338 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10c338: 55 push %ebp 10c339: 89 e5 mov %esp,%ebp 10c33b: 57 push %edi 10c33c: 56 push %esi 10c33d: 53 push %ebx 10c33e: 83 ec 1c sub $0x1c,%esp uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 10c341: 8b 1d 54 32 12 00 mov 0x123254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10c347: a1 50 32 12 00 mov 0x123250,%eax 10c34c: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10c34f: 8b 35 4c 32 12 00 mov 0x12324c,%esi /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 10c355: 39 f0 cmp %esi,%eax 10c357: 72 17 jb 10c370 <_IO_Manager_initialization+0x38> * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 10c359: 89 1d c4 76 12 00 mov %ebx,0x1276c4 _IO_Number_of_drivers = number_of_drivers; 10c35f: 8b 45 e4 mov -0x1c(%ebp),%eax 10c362: a3 c0 76 12 00 mov %eax,0x1276c0 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10c367: 8d 65 f4 lea -0xc(%ebp),%esp 10c36a: 5b pop %ebx 10c36b: 5e pop %esi 10c36c: 5f pop %edi 10c36d: c9 leave 10c36e: c3 ret 10c36f: 90 nop /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 10c370: 8d 0c 76 lea (%esi,%esi,2),%ecx 10c373: c1 e1 03 shl $0x3,%ecx 10c376: 83 ec 0c sub $0xc,%esp 10c379: 51 push %ecx 10c37a: 89 4d dc mov %ecx,-0x24(%ebp) 10c37d: e8 0a 29 00 00 call 10ec8c <_Workspace_Allocate_or_fatal_error> 10c382: 89 c2 mov %eax,%edx 10c384: a3 c4 76 12 00 mov %eax,0x1276c4 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10c389: 89 35 c0 76 12 00 mov %esi,0x1276c0 memset( 10c38f: 31 c0 xor %eax,%eax 10c391: 8b 4d dc mov -0x24(%ebp),%ecx 10c394: 89 d7 mov %edx,%edi 10c396: f3 aa rep stos %al,%es:(%edi) _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10c398: 83 c4 10 add $0x10,%esp 10c39b: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c39e: 85 c9 test %ecx,%ecx 10c3a0: 74 c5 je 10c367 <_IO_Manager_initialization+0x2f><== NEVER TAKEN 10c3a2: a1 c4 76 12 00 mov 0x1276c4,%eax 10c3a7: 89 45 e0 mov %eax,-0x20(%ebp) 10c3aa: 31 c0 xor %eax,%eax 10c3ac: 31 d2 xor %edx,%edx 10c3ae: 66 90 xchg %ax,%ax _IO_Driver_address_table[index] = driver_table[index]; 10c3b0: 8b 7d e0 mov -0x20(%ebp),%edi 10c3b3: 01 c7 add %eax,%edi 10c3b5: 8d 34 03 lea (%ebx,%eax,1),%esi 10c3b8: b9 06 00 00 00 mov $0x6,%ecx 10c3bd: f3 a5 rep movsl %ds:(%esi),%es:(%edi) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10c3bf: 42 inc %edx 10c3c0: 83 c0 18 add $0x18,%eax 10c3c3: 39 55 e4 cmp %edx,-0x1c(%ebp) 10c3c6: 77 e8 ja 10c3b0 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10c3c8: 8d 65 f4 lea -0xc(%ebp),%esp 10c3cb: 5b pop %ebx 10c3cc: 5e pop %esi 10c3cd: 5f pop %edi 10c3ce: c9 leave 10c3cf: c3 ret =============================================================================== 0010cdfc <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10cdfc: 55 push %ebp 10cdfd: 89 e5 mov %esp,%ebp 10cdff: 53 push %ebx 10ce00: 83 ec 08 sub $0x8,%esp 10ce03: 8b 45 08 mov 0x8(%ebp),%eax 10ce06: 8b 55 0c mov 0xc(%ebp),%edx 10ce09: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10ce0c: a3 00 74 12 00 mov %eax,0x127400 _Internal_errors_What_happened.is_internal = is_internal; 10ce11: 88 15 04 74 12 00 mov %dl,0x127404 _Internal_errors_What_happened.the_error = the_error; 10ce17: 89 1d 08 74 12 00 mov %ebx,0x127408 _User_extensions_Fatal( the_source, is_internal, the_error ); 10ce1d: 53 push %ebx 10ce1e: 0f b6 d2 movzbl %dl,%edx 10ce21: 52 push %edx 10ce22: 50 push %eax 10ce23: e8 0c 1b 00 00 call 10e934 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10ce28: c7 05 20 75 12 00 05 movl $0x5,0x127520 <== NOT EXECUTED 10ce2f: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10ce32: fa cli <== NOT EXECUTED 10ce33: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10ce35: f4 hlt <== NOT EXECUTED 10ce36: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ce39: eb fe jmp 10ce39 <_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 =============================================================================== 00111c4c <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 111c4c: 55 push %ebp 111c4d: 89 e5 mov %esp,%ebp case OBJECTS_NO_API: default: break; } return 0; } 111c4f: 8b 45 08 mov 0x8(%ebp),%eax 111c52: 48 dec %eax 111c53: 83 f8 03 cmp $0x3,%eax 111c56: 77 0c ja 111c64 <_Objects_API_maximum_class+0x18> 111c58: 8b 04 85 70 1f 12 00 mov 0x121f70(,%eax,4),%eax 111c5f: c9 leave 111c60: c3 ret 111c61: 8d 76 00 lea 0x0(%esi),%esi 111c64: 31 c0 xor %eax,%eax 111c66: c9 leave 111c67: c3 ret =============================================================================== 0010ce94 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10ce94: 55 push %ebp 10ce95: 89 e5 mov %esp,%ebp 10ce97: 56 push %esi 10ce98: 53 push %ebx 10ce99: 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 ) 10ce9c: 8b 43 18 mov 0x18(%ebx),%eax 10ce9f: 85 c0 test %eax,%eax 10cea1: 75 0d jne 10ceb0 <_Objects_Allocate+0x1c><== ALWAYS TAKEN 10cea3: 31 c9 xor %ecx,%ecx <== NOT EXECUTED information->inactive--; } } return the_object; } 10cea5: 89 c8 mov %ecx,%eax 10cea7: 8d 65 f8 lea -0x8(%ebp),%esp 10ceaa: 5b pop %ebx 10ceab: 5e pop %esi 10ceac: c9 leave 10cead: c3 ret 10ceae: 66 90 xchg %ax,%ax /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10ceb0: 8d 73 20 lea 0x20(%ebx),%esi 10ceb3: 83 ec 0c sub $0xc,%esp 10ceb6: 56 push %esi 10ceb7: e8 08 f7 ff ff call 10c5c4 <_Chain_Get> 10cebc: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10cebe: 83 c4 10 add $0x10,%esp 10cec1: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10cec5: 74 de je 10cea5 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10cec7: 85 c0 test %eax,%eax 10cec9: 74 29 je 10cef4 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10cecb: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10cecf: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10ced3: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10ced5: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10ced9: 31 d2 xor %edx,%edx 10cedb: f7 f6 div %esi 10cedd: c1 e0 02 shl $0x2,%eax 10cee0: 03 43 30 add 0x30(%ebx),%eax 10cee3: ff 08 decl (%eax) information->inactive--; 10cee5: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10cee9: 89 c8 mov %ecx,%eax 10ceeb: 8d 65 f8 lea -0x8(%ebp),%esp 10ceee: 5b pop %ebx 10ceef: 5e pop %esi 10cef0: c9 leave 10cef1: c3 ret 10cef2: 66 90 xchg %ax,%ax * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 10cef4: 83 ec 0c sub $0xc,%esp 10cef7: 53 push %ebx 10cef8: e8 3b 00 00 00 call 10cf38 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10cefd: 89 34 24 mov %esi,(%esp) 10cf00: e8 bf f6 ff ff call 10c5c4 <_Chain_Get> 10cf05: 89 c1 mov %eax,%ecx } if ( the_object ) { 10cf07: 83 c4 10 add $0x10,%esp 10cf0a: 85 c0 test %eax,%eax 10cf0c: 74 97 je 10cea5 <_Objects_Allocate+0x11> 10cf0e: eb bb jmp 10cecb <_Objects_Allocate+0x37> =============================================================================== 0010cf38 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10cf38: 55 push %ebp 10cf39: 89 e5 mov %esp,%ebp 10cf3b: 57 push %edi 10cf3c: 56 push %esi 10cf3d: 53 push %ebx 10cf3e: 83 ec 4c sub $0x4c,%esp 10cf41: 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 ); 10cf44: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10cf48: 89 45 d0 mov %eax,-0x30(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10cf4b: 8b 4b 34 mov 0x34(%ebx),%ecx 10cf4e: 85 c9 test %ecx,%ecx 10cf50: 0f 84 72 02 00 00 je 10d1c8 <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10cf56: 8b 7b 10 mov 0x10(%ebx),%edi 10cf59: 66 89 7d d4 mov %di,-0x2c(%ebp) 10cf5d: 8b 7b 14 mov 0x14(%ebx),%edi 10cf60: 31 d2 xor %edx,%edx 10cf62: 8b 45 d4 mov -0x2c(%ebp),%eax 10cf65: 66 f7 f7 div %di 10cf68: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10cf6b: 85 f6 test %esi,%esi 10cf6d: 0f 84 6c 02 00 00 je 10d1df <_Objects_Extend_information+0x2a7><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) 10cf73: 8b 01 mov (%ecx),%eax 10cf75: 85 c0 test %eax,%eax 10cf77: 0f 84 72 02 00 00 je 10d1ef <_Objects_Extend_information+0x2b7><== NEVER TAKEN 10cf7d: 0f b7 ff movzwl %di,%edi 10cf80: 8b 55 d0 mov -0x30(%ebp),%edx 10cf83: 89 55 cc mov %edx,-0x34(%ebp) 10cf86: 31 d2 xor %edx,%edx 10cf88: 8b 45 cc mov -0x34(%ebp),%eax 10cf8b: eb 09 jmp 10cf96 <_Objects_Extend_information+0x5e> 10cf8d: 8d 76 00 lea 0x0(%esi),%esi 10cf90: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10cf94: 74 07 je 10cf9d <_Objects_Extend_information+0x65> break; else index_base += information->allocation_size; 10cf96: 01 f8 add %edi,%eax if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cf98: 42 inc %edx 10cf99: 39 d6 cmp %edx,%esi 10cf9b: 77 f3 ja 10cf90 <_Objects_Extend_information+0x58> 10cf9d: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10cfa0: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10cfa4: 01 f8 add %edi,%eax 10cfa6: 89 45 d4 mov %eax,-0x2c(%ebp) /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 10cfa9: 3d ff ff 00 00 cmp $0xffff,%eax 10cfae: 0f 87 b1 01 00 00 ja 10d165 <_Objects_Extend_information+0x22d><== NEVER TAKEN /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 10cfb4: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10cfb8: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10cfbc: 0f 85 ae 01 00 00 jne 10d170 <_Objects_Extend_information+0x238> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10cfc2: 83 ec 0c sub $0xc,%esp 10cfc5: 57 push %edi 10cfc6: 89 55 b4 mov %edx,-0x4c(%ebp) 10cfc9: e8 be 1c 00 00 call 10ec8c <_Workspace_Allocate_or_fatal_error> 10cfce: 89 45 c4 mov %eax,-0x3c(%ebp) 10cfd1: 83 c4 10 add $0x10,%esp 10cfd4: 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 ) { 10cfd7: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10cfdb: 39 45 cc cmp %eax,-0x34(%ebp) 10cfde: 0f 82 fe 00 00 00 jb 10d0e2 <_Objects_Extend_information+0x1aa> */ /* * Up the block count and maximum */ block_count++; 10cfe4: 8d 7e 01 lea 0x1(%esi),%edi * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10cfe7: 83 ec 0c sub $0xc,%esp 10cfea: 8d 04 7f lea (%edi,%edi,2),%eax 10cfed: 03 45 d4 add -0x2c(%ebp),%eax 10cff0: 03 45 d0 add -0x30(%ebp),%eax 10cff3: c1 e0 02 shl $0x2,%eax 10cff6: 50 push %eax 10cff7: 89 55 b4 mov %edx,-0x4c(%ebp) 10cffa: e8 b9 1c 00 00 call 10ecb8 <_Workspace_Allocate> 10cfff: 89 45 c8 mov %eax,-0x38(%ebp) if ( !object_blocks ) { 10d002: 83 c4 10 add $0x10,%esp 10d005: 85 c0 test %eax,%eax 10d007: 8b 55 b4 mov -0x4c(%ebp),%edx 10d00a: 0f 84 ef 01 00 00 je 10d1ff <_Objects_Extend_information+0x2c7> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10d010: 8b 45 c8 mov -0x38(%ebp),%eax 10d013: 8d 04 b8 lea (%eax,%edi,4),%eax 10d016: 89 45 b8 mov %eax,-0x48(%ebp) 10d019: 8b 4d c8 mov -0x38(%ebp),%ecx 10d01c: 8d 3c f9 lea (%ecx,%edi,8),%edi 10d01f: 89 7d bc mov %edi,-0x44(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10d022: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10d026: 39 45 d0 cmp %eax,-0x30(%ebp) 10d029: 0f 82 60 01 00 00 jb 10d18f <_Objects_Extend_information+0x257> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10d02f: 8b 45 d0 mov -0x30(%ebp),%eax 10d032: 85 c0 test %eax,%eax 10d034: 74 16 je 10d04c <_Objects_Extend_information+0x114><== NEVER TAKEN information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10d036: 31 c0 xor %eax,%eax 10d038: 8b 4d bc mov -0x44(%ebp),%ecx 10d03b: 8b 7d d0 mov -0x30(%ebp),%edi 10d03e: 66 90 xchg %ax,%ax /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10d040: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10d047: 40 inc %eax 10d048: 39 c7 cmp %eax,%edi 10d04a: 77 f4 ja 10d040 <_Objects_Extend_information+0x108><== NEVER TAKEN 10d04c: c1 e6 02 shl $0x2,%esi 10d04f: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10d052: 8b 45 c8 mov -0x38(%ebp),%eax 10d055: 8b 7d c0 mov -0x40(%ebp),%edi 10d058: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) inactive_per_block[block_count] = 0; 10d05f: 8b 4d b8 mov -0x48(%ebp),%ecx 10d062: c7 04 39 00 00 00 00 movl $0x0,(%ecx,%edi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10d069: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10d06d: 03 75 cc add -0x34(%ebp),%esi * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10d070: 39 75 cc cmp %esi,-0x34(%ebp) 10d073: 73 19 jae 10d08e <_Objects_Extend_information+0x156><== NEVER TAKEN 10d075: 8b 7d cc mov -0x34(%ebp),%edi 10d078: 8b 45 bc mov -0x44(%ebp),%eax 10d07b: 8d 0c b8 lea (%eax,%edi,4),%ecx 10d07e: 89 f8 mov %edi,%eax index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10d080: 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++ ) { 10d086: 40 inc %eax 10d087: 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 ; 10d08a: 39 c6 cmp %eax,%esi 10d08c: 77 f2 ja 10d080 <_Objects_Extend_information+0x148> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10d08e: 9c pushf 10d08f: fa cli 10d090: 5f pop %edi old_tables = information->object_blocks; 10d091: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10d094: 8b 45 c8 mov -0x38(%ebp),%eax 10d097: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10d09a: 8b 45 b8 mov -0x48(%ebp),%eax 10d09d: 89 43 30 mov %eax,0x30(%ebx) information->local_table = local_table; 10d0a0: 8b 45 bc mov -0x44(%ebp),%eax 10d0a3: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10d0a6: 8b 45 d4 mov -0x2c(%ebp),%eax 10d0a9: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10d0ad: 8b 33 mov (%ebx),%esi 10d0af: c1 e6 18 shl $0x18,%esi 10d0b2: 81 ce 00 00 01 00 or $0x10000,%esi 10d0b8: 0f b7 43 04 movzwl 0x4(%ebx),%eax 10d0bc: c1 e0 1b shl $0x1b,%eax 10d0bf: 09 c6 or %eax,%esi 10d0c1: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10d0c5: 09 c6 or %eax,%esi 10d0c7: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10d0ca: 57 push %edi 10d0cb: 9d popf if ( old_tables ) 10d0cc: 85 c9 test %ecx,%ecx 10d0ce: 74 12 je 10d0e2 <_Objects_Extend_information+0x1aa> _Workspace_Free( old_tables ); 10d0d0: 83 ec 0c sub $0xc,%esp 10d0d3: 51 push %ecx 10d0d4: 89 55 b4 mov %edx,-0x4c(%ebp) 10d0d7: e8 f8 1b 00 00 call 10ecd4 <_Workspace_Free> 10d0dc: 83 c4 10 add $0x10,%esp 10d0df: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10d0e2: c1 e2 02 shl $0x2,%edx 10d0e5: 89 55 d0 mov %edx,-0x30(%ebp) 10d0e8: 8b 43 34 mov 0x34(%ebx),%eax 10d0eb: 8b 4d c4 mov -0x3c(%ebp),%ecx 10d0ee: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10d0f1: ff 73 18 pushl 0x18(%ebx) 10d0f4: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10d0f8: 52 push %edx 10d0f9: 8b 7d d0 mov -0x30(%ebp),%edi 10d0fc: ff 34 38 pushl (%eax,%edi,1) 10d0ff: 8d 7d dc lea -0x24(%ebp),%edi 10d102: 57 push %edi 10d103: e8 68 45 00 00 call 111670 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10d108: 8d 43 20 lea 0x20(%ebx),%eax 10d10b: 89 45 d4 mov %eax,-0x2c(%ebp) 10d10e: 8b 75 cc mov -0x34(%ebp),%esi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10d111: 83 c4 10 add $0x10,%esp 10d114: eb 2b jmp 10d141 <_Objects_Extend_information+0x209> 10d116: 66 90 xchg %ax,%ax the_object->id = _Objects_Build_id( 10d118: 8b 13 mov (%ebx),%edx 10d11a: c1 e2 18 shl $0x18,%edx 10d11d: 81 ca 00 00 01 00 or $0x10000,%edx 10d123: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10d127: c1 e1 1b shl $0x1b,%ecx 10d12a: 09 ca or %ecx,%edx 10d12c: 09 f2 or %esi,%edx 10d12e: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10d131: 83 ec 08 sub $0x8,%esp 10d134: 50 push %eax 10d135: ff 75 d4 pushl -0x2c(%ebp) 10d138: e8 4b f4 ff ff call 10c588 <_Chain_Append> index++; 10d13d: 46 inc %esi 10d13e: 83 c4 10 add $0x10,%esp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10d141: 83 ec 0c sub $0xc,%esp 10d144: 57 push %edi 10d145: e8 7a f4 ff ff call 10c5c4 <_Chain_Get> 10d14a: 83 c4 10 add $0x10,%esp 10d14d: 85 c0 test %eax,%eax 10d14f: 75 c7 jne 10d118 <_Objects_Extend_information+0x1e0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10d151: 8b 43 30 mov 0x30(%ebx),%eax 10d154: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10d158: 8b 4d d0 mov -0x30(%ebp),%ecx 10d15b: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10d15e: 8b 43 14 mov 0x14(%ebx),%eax 10d161: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10d165: 8d 65 f4 lea -0xc(%ebp),%esp 10d168: 5b pop %ebx 10d169: 5e pop %esi 10d16a: 5f pop %edi 10d16b: c9 leave 10d16c: c3 ret 10d16d: 8d 76 00 lea 0x0(%esi),%esi * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 10d170: 83 ec 0c sub $0xc,%esp 10d173: 57 push %edi 10d174: 89 55 b4 mov %edx,-0x4c(%ebp) 10d177: e8 3c 1b 00 00 call 10ecb8 <_Workspace_Allocate> 10d17c: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !new_object_block ) 10d17f: 83 c4 10 add $0x10,%esp 10d182: 85 c0 test %eax,%eax 10d184: 8b 55 b4 mov -0x4c(%ebp),%edx 10d187: 0f 85 4a fe ff ff jne 10cfd7 <_Objects_Extend_information+0x9f> 10d18d: eb d6 jmp 10d165 <_Objects_Extend_information+0x22d> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 10d18f: c1 e6 02 shl $0x2,%esi 10d192: 89 75 c0 mov %esi,-0x40(%ebp) 10d195: 8b 73 34 mov 0x34(%ebx),%esi 10d198: 8b 7d c8 mov -0x38(%ebp),%edi 10d19b: 8b 4d c0 mov -0x40(%ebp),%ecx 10d19e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10d1a0: 8b 73 30 mov 0x30(%ebx),%esi 10d1a3: 8b 7d b8 mov -0x48(%ebp),%edi 10d1a6: 8b 4d c0 mov -0x40(%ebp),%ecx 10d1a9: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10d1ab: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10d1af: 03 45 d0 add -0x30(%ebp),%eax 10d1b2: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx 10d1b9: 8b 73 1c mov 0x1c(%ebx),%esi 10d1bc: 8b 7d bc mov -0x44(%ebp),%edi 10d1bf: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10d1c1: e9 8c fe ff ff jmp 10d052 <_Objects_Extend_information+0x11a> 10d1c6: 66 90 xchg %ax,%ax minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10d1c8: 8b 53 10 mov 0x10(%ebx),%edx 10d1cb: 66 89 55 d4 mov %dx,-0x2c(%ebp) 10d1cf: 0f b7 7b 14 movzwl 0x14(%ebx),%edi 10d1d3: 89 45 cc mov %eax,-0x34(%ebp) 10d1d6: 31 d2 xor %edx,%edx 10d1d8: 31 f6 xor %esi,%esi 10d1da: e9 c1 fd ff ff jmp 10cfa0 <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10d1df: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10d1e2: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10d1e5: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 10d1e8: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d1ea: e9 b1 fd ff ff jmp 10cfa0 <_Objects_Extend_information+0x68><== NOT EXECUTED if ( information->object_blocks[ block ] == NULL ) 10d1ef: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10d1f2: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10d1f5: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 10d1f8: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d1fa: e9 a1 fd ff ff jmp 10cfa0 <_Objects_Extend_information+0x68><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 10d1ff: 83 ec 0c sub $0xc,%esp 10d202: ff 75 c4 pushl -0x3c(%ebp) 10d205: e8 ca 1a 00 00 call 10ecd4 <_Workspace_Free> return; 10d20a: 83 c4 10 add $0x10,%esp 10d20d: e9 53 ff ff ff jmp 10d165 <_Objects_Extend_information+0x22d> =============================================================================== 0010d2a4 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10d2a4: 55 push %ebp 10d2a5: 89 e5 mov %esp,%ebp 10d2a7: 56 push %esi 10d2a8: 53 push %ebx 10d2a9: 8b 75 08 mov 0x8(%ebp),%esi 10d2ac: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10d2af: 85 db test %ebx,%ebx 10d2b1: 75 09 jne 10d2bc <_Objects_Get_information+0x18> * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10d2b3: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10d2b5: 8d 65 f8 lea -0x8(%ebp),%esp 10d2b8: 5b pop %ebx 10d2b9: 5e pop %esi 10d2ba: c9 leave 10d2bb: c3 ret /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10d2bc: 83 ec 0c sub $0xc,%esp 10d2bf: 56 push %esi 10d2c0: e8 87 49 00 00 call 111c4c <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10d2c5: 83 c4 10 add $0x10,%esp 10d2c8: 85 c0 test %eax,%eax 10d2ca: 74 e7 je 10d2b3 <_Objects_Get_information+0xf> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10d2cc: 39 c3 cmp %eax,%ebx 10d2ce: 77 e3 ja 10d2b3 <_Objects_Get_information+0xf> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10d2d0: 8b 04 b5 2c 73 12 00 mov 0x12732c(,%esi,4),%eax 10d2d7: 85 c0 test %eax,%eax 10d2d9: 74 d8 je 10d2b3 <_Objects_Get_information+0xf><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10d2db: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10d2de: 85 c0 test %eax,%eax 10d2e0: 74 d3 je 10d2b5 <_Objects_Get_information+0x11><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10d2e2: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10d2e7: 75 cc jne 10d2b5 <_Objects_Get_information+0x11> 10d2e9: eb c8 jmp 10d2b3 <_Objects_Get_information+0xf> =============================================================================== 0010d2ec <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10d2ec: 55 push %ebp 10d2ed: 89 e5 mov %esp,%ebp 10d2ef: 56 push %esi 10d2f0: 53 push %ebx 10d2f1: 8b 55 08 mov 0x8(%ebp),%edx 10d2f4: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10d2f7: b8 01 00 00 00 mov $0x1,%eax 10d2fc: 2b 42 08 sub 0x8(%edx),%eax 10d2ff: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10d302: 9c pushf 10d303: fa cli 10d304: 5e pop %esi if ( information->maximum >= index ) { 10d305: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10d309: 39 c8 cmp %ecx,%eax 10d30b: 77 1b ja 10d328 <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10d30d: 8b 52 1c mov 0x1c(%edx),%edx 10d310: 8b 04 82 mov (%edx,%eax,4),%eax 10d313: 85 c0 test %eax,%eax 10d315: 74 21 je 10d338 <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10d317: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10d31d: 8b 55 14 mov 0x14(%ebp),%edx 10d320: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10d322: 5b pop %ebx 10d323: 5e pop %esi 10d324: c9 leave 10d325: c3 ret 10d326: 66 90 xchg %ax,%ax } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10d328: 56 push %esi 10d329: 9d popf *location = OBJECTS_ERROR; 10d32a: c7 03 01 00 00 00 movl $0x1,(%ebx) 10d330: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10d332: 5b pop %ebx 10d333: 5e pop %esi 10d334: c9 leave 10d335: c3 ret 10d336: 66 90 xchg %ax,%ax if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 10d338: 56 push %esi 10d339: 9d popf *location = OBJECTS_ERROR; 10d33a: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10d340: eb e0 jmp 10d322 <_Objects_Get_isr_disable+0x36> =============================================================================== 00119524 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 119524: 55 push %ebp 119525: 89 e5 mov %esp,%ebp 119527: 57 push %edi 119528: 56 push %esi 119529: 53 push %ebx 11952a: 83 ec 2c sub $0x2c,%esp 11952d: 8b 7d 08 mov 0x8(%ebp),%edi 119530: 8b 75 0c mov 0xc(%ebp),%esi 119533: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 119536: 85 f6 test %esi,%esi 119538: 75 0e jne 119548 <_Objects_Get_name_as_string+0x24> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 11953a: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 11953c: 89 d8 mov %ebx,%eax 11953e: 8d 65 f4 lea -0xc(%ebp),%esp 119541: 5b pop %ebx 119542: 5e pop %esi 119543: 5f pop %edi 119544: c9 leave 119545: c3 ret 119546: 66 90 xchg %ax,%ax Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 119548: 85 db test %ebx,%ebx 11954a: 74 f0 je 11953c <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 11954c: 85 ff test %edi,%edi 11954e: 75 08 jne 119558 <_Objects_Get_name_as_string+0x34> 119550: a1 38 4d 13 00 mov 0x134d38,%eax 119555: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 119558: 83 ec 0c sub $0xc,%esp 11955b: 57 push %edi 11955c: e8 bf 89 ff ff call 111f20 <_Objects_Get_information_id> if ( !information ) 119561: 83 c4 10 add $0x10,%esp 119564: 85 c0 test %eax,%eax 119566: 74 d2 je 11953a <_Objects_Get_name_as_string+0x16><== NEVER TAKEN return NULL; the_object = _Objects_Get( information, tmpId, &location ); 119568: 51 push %ecx 119569: 8d 55 e4 lea -0x1c(%ebp),%edx 11956c: 52 push %edx 11956d: 57 push %edi 11956e: 50 push %eax 11956f: e8 6c 8a ff ff call 111fe0 <_Objects_Get> switch ( location ) { 119574: 83 c4 10 add $0x10,%esp 119577: 8b 55 e4 mov -0x1c(%ebp),%edx 11957a: 85 d2 test %edx,%edx 11957c: 75 bc jne 11953a <_Objects_Get_name_as_string+0x16><== NEVER TAKEN if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 11957e: 8b 50 0c mov 0xc(%eax),%edx lname[ 0 ] = (u32_name >> 24) & 0xff; 119581: 89 d1 mov %edx,%ecx 119583: c1 e9 18 shr $0x18,%ecx 119586: 88 c8 mov %cl,%al 119588: 88 4d df mov %cl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 11958b: 89 d1 mov %edx,%ecx 11958d: c1 e9 10 shr $0x10,%ecx 119590: 88 4d e0 mov %cl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 119593: 89 d1 mov %edx,%ecx 119595: c1 e9 08 shr $0x8,%ecx 119598: 88 4d e1 mov %cl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 11959b: 88 55 e2 mov %dl,-0x1e(%ebp) lname[ 4 ] = '\0'; 11959e: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 1195a2: 4e dec %esi 1195a3: 89 75 d4 mov %esi,-0x2c(%ebp) 1195a6: 74 3c je 1195e4 <_Objects_Get_name_as_string+0xc0><== NEVER TAKEN 1195a8: 84 c0 test %al,%al 1195aa: 74 38 je 1195e4 <_Objects_Get_name_as_string+0xc0> 1195ac: 89 d9 mov %ebx,%ecx 1195ae: 31 d2 xor %edx,%edx 1195b0: eb 0a jmp 1195bc <_Objects_Get_name_as_string+0x98> 1195b2: 66 90 xchg %ax,%ax 1195b4: 8a 44 15 df mov -0x21(%ebp,%edx,1),%al 1195b8: 84 c0 test %al,%al 1195ba: 74 1b je 1195d7 <_Objects_Get_name_as_string+0xb3> *d = (isprint((unsigned char)*s)) ? *s : '*'; 1195bc: 0f b6 f0 movzbl %al,%esi 1195bf: 8b 3d d8 22 13 00 mov 0x1322d8,%edi 1195c5: f6 44 37 01 97 testb $0x97,0x1(%edi,%esi,1) 1195ca: 75 02 jne 1195ce <_Objects_Get_name_as_string+0xaa> 1195cc: b0 2a mov $0x2a,%al 1195ce: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 1195d0: 42 inc %edx 1195d1: 41 inc %ecx 1195d2: 3b 55 d4 cmp -0x2c(%ebp),%edx 1195d5: 72 dd jb 1195b4 <_Objects_Get_name_as_string+0x90> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 1195d7: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 1195da: e8 b1 92 ff ff call 112890 <_Thread_Enable_dispatch> return name; 1195df: e9 58 ff ff ff jmp 11953c <_Objects_Get_name_as_string+0x18> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 1195e4: 89 d9 mov %ebx,%ecx 1195e6: eb ef jmp 1195d7 <_Objects_Get_name_as_string+0xb3> =============================================================================== 0011c2ec <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 11c2ec: 55 push %ebp 11c2ed: 89 e5 mov %esp,%ebp 11c2ef: 57 push %edi 11c2f0: 56 push %esi 11c2f1: 53 push %ebx 11c2f2: 83 ec 0c sub $0xc,%esp 11c2f5: 8b 5d 08 mov 0x8(%ebp),%ebx 11c2f8: 8b 75 0c mov 0xc(%ebp),%esi 11c2fb: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 11c2fe: 85 db test %ebx,%ebx 11c300: 75 0a jne 11c30c <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 11c302: 31 c0 xor %eax,%eax } 11c304: 8d 65 f4 lea -0xc(%ebp),%esp 11c307: 5b pop %ebx 11c308: 5e pop %esi 11c309: 5f pop %edi 11c30a: c9 leave 11c30b: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 11c30c: 85 ff test %edi,%edi 11c30e: 74 f2 je 11c302 <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 11c310: 8b 45 14 mov 0x14(%ebp),%eax 11c313: 85 c0 test %eax,%eax 11c315: 74 eb je 11c302 <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 11c317: 66 85 f6 test %si,%si 11c31a: 75 04 jne 11c320 <_Objects_Get_next+0x34> next_id = information->minimum_id; 11c31c: 8b 73 08 mov 0x8(%ebx),%esi 11c31f: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 11c320: 66 39 73 10 cmp %si,0x10(%ebx) 11c324: 72 22 jb 11c348 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 11c326: 51 push %ecx 11c327: 57 push %edi 11c328: 56 push %esi 11c329: 53 push %ebx 11c32a: e8 b1 5c ff ff call 111fe0 <_Objects_Get> next_id++; 11c32f: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 11c330: 83 c4 10 add $0x10,%esp 11c333: 8b 17 mov (%edi),%edx 11c335: 85 d2 test %edx,%edx 11c337: 75 e7 jne 11c320 <_Objects_Get_next+0x34> *next_id_p = next_id; 11c339: 8b 55 14 mov 0x14(%ebp),%edx 11c33c: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 11c33e: 8d 65 f4 lea -0xc(%ebp),%esp 11c341: 5b pop %ebx 11c342: 5e pop %esi 11c343: 5f pop %edi 11c344: c9 leave 11c345: c3 ret 11c346: 66 90 xchg %ax,%ax do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 11c348: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 11c34e: 8b 45 14 mov 0x14(%ebp),%eax 11c351: c7 00 ff ff ff ff movl $0xffffffff,(%eax) 11c357: 31 c0 xor %eax,%eax return 0; 11c359: eb a9 jmp 11c304 <_Objects_Get_next+0x18> =============================================================================== 0011b844 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b844: 55 push %ebp 11b845: 89 e5 mov %esp,%ebp 11b847: 53 push %ebx 11b848: 8b 55 08 mov 0x8(%ebp),%edx 11b84b: 8b 5d 10 mov 0x10(%ebp),%ebx /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 11b84e: b8 01 00 00 00 mov $0x1,%eax 11b853: 2b 42 08 sub 0x8(%edx),%eax 11b856: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b859: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b85d: 39 c8 cmp %ecx,%eax 11b85f: 77 13 ja 11b874 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b861: 8b 52 1c mov 0x1c(%edx),%edx 11b864: 8b 04 82 mov (%edx,%eax,4),%eax 11b867: 85 c0 test %eax,%eax 11b869: 74 09 je 11b874 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b86b: c7 03 00 00 00 00 movl $0x0,(%ebx) * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 11b871: 5b pop %ebx 11b872: c9 leave 11b873: c3 ret /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 11b874: c7 03 01 00 00 00 movl $0x1,(%ebx) 11b87a: 31 c0 xor %eax,%eax return NULL; } 11b87c: 5b pop %ebx 11b87d: c9 leave 11b87e: c3 ret =============================================================================== 00112048 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 112048: 55 push %ebp 112049: 89 e5 mov %esp,%ebp 11204b: 83 ec 18 sub $0x18,%esp 11204e: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 112051: 85 d2 test %edx,%edx 112053: 75 08 jne 11205d <_Objects_Id_to_name+0x15> 112055: a1 38 4d 13 00 mov 0x134d38,%eax 11205a: 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); 11205d: 89 d0 mov %edx,%eax 11205f: c1 e8 18 shr $0x18,%eax 112062: 83 e0 07 and $0x7,%eax */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 112065: 8d 48 ff lea -0x1(%eax),%ecx 112068: 83 f9 03 cmp $0x3,%ecx 11206b: 77 3b ja 1120a8 <_Objects_Id_to_name+0x60> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 11206d: 8b 04 85 4c 4c 13 00 mov 0x134c4c(,%eax,4),%eax 112074: 85 c0 test %eax,%eax 112076: 74 30 je 1120a8 <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 112078: 89 d1 mov %edx,%ecx 11207a: c1 e9 1b shr $0x1b,%ecx 11207d: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 112080: 85 c0 test %eax,%eax 112082: 74 24 je 1120a8 <_Objects_Id_to_name+0x60><== NEVER TAKEN #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 112084: 51 push %ecx 112085: 8d 4d f4 lea -0xc(%ebp),%ecx 112088: 51 push %ecx 112089: 52 push %edx 11208a: 50 push %eax 11208b: e8 50 ff ff ff call 111fe0 <_Objects_Get> if ( !the_object ) 112090: 83 c4 10 add $0x10,%esp 112093: 85 c0 test %eax,%eax 112095: 74 11 je 1120a8 <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; *name = the_object->name; 112097: 8b 50 0c mov 0xc(%eax),%edx 11209a: 8b 45 0c mov 0xc(%ebp),%eax 11209d: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 11209f: e8 ec 07 00 00 call 112890 <_Thread_Enable_dispatch> 1120a4: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 1120a6: c9 leave 1120a7: c3 ret if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 1120a8: b8 03 00 00 00 mov $0x3,%eax } 1120ad: c9 leave 1120ae: c3 ret =============================================================================== 0010d3ac <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10d3ac: 55 push %ebp 10d3ad: 89 e5 mov %esp,%ebp 10d3af: 57 push %edi 10d3b0: 56 push %esi 10d3b1: 53 push %ebx 10d3b2: 83 ec 0c sub $0xc,%esp 10d3b5: 8b 45 08 mov 0x8(%ebp),%eax 10d3b8: 8b 55 0c mov 0xc(%ebp),%edx 10d3bb: 8b 5d 10 mov 0x10(%ebp),%ebx 10d3be: 8b 75 20 mov 0x20(%ebp),%esi 10d3c1: 0f b7 7d 18 movzwl 0x18(%ebp),%edi uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 10d3c5: 89 10 mov %edx,(%eax) information->the_class = the_class; 10d3c7: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10d3cb: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10d3ce: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10d3d5: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10d3dc: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10d3e3: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 10d3e9: 66 c7 40 10 00 00 movw $0x0,0x10(%eax) /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 10d3ef: 8b 3c 95 2c 73 12 00 mov 0x12732c(,%edx,4),%edi 10d3f6: 89 04 9f mov %eax,(%edi,%ebx,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10d3f9: 8b 7d 14 mov 0x14(%ebp),%edi 10d3fc: c1 ef 1f shr $0x1f,%edi _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 10d3ff: 89 f9 mov %edi,%ecx 10d401: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10d404: 8b 4d 14 mov 0x14(%ebp),%ecx 10d407: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10d40d: 85 ff test %edi,%edi 10d40f: 74 04 je 10d415 <_Objects_Initialize_information+0x69> 10d411: 85 c9 test %ecx,%ecx 10d413: 74 6a je 10d47f <_Objects_Initialize_information+0xd3> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10d415: 66 89 48 14 mov %cx,0x14(%eax) /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 10d419: c7 40 1c a4 6f 12 00 movl $0x126fa4,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10d420: c1 e2 18 shl $0x18,%edx 10d423: 81 ca 00 00 01 00 or $0x10000,%edx 10d429: c1 e3 1b shl $0x1b,%ebx 10d42c: 09 da or %ebx,%edx 10d42e: 31 db xor %ebx,%ebx 10d430: 85 c9 test %ecx,%ecx 10d432: 0f 95 c3 setne %bl 10d435: 09 da or %ebx,%edx 10d437: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10d43a: f7 c6 03 00 00 00 test $0x3,%esi 10d440: 75 26 jne 10d468 <_Objects_Initialize_information+0xbc><== NEVER TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10d442: 66 89 70 38 mov %si,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10d446: 8d 50 24 lea 0x24(%eax),%edx 10d449: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10d44c: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10d453: 8d 50 20 lea 0x20(%eax),%edx 10d456: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10d459: 85 c9 test %ecx,%ecx 10d45b: 75 13 jne 10d470 <_Objects_Initialize_information+0xc4> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10d45d: 8d 65 f4 lea -0xc(%ebp),%esp 10d460: 5b pop %ebx 10d461: 5e pop %esi 10d462: 5f pop %edi 10d463: c9 leave 10d464: c3 ret 10d465: 8d 76 00 lea 0x0(%esi),%esi * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10d468: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10d46b: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED 10d46e: eb d2 jmp 10d442 <_Objects_Initialize_information+0x96><== NOT EXECUTED /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10d470: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10d473: 8d 65 f4 lea -0xc(%ebp),%esp 10d476: 5b pop %ebx 10d477: 5e pop %esi 10d478: 5f pop %edi 10d479: c9 leave /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10d47a: e9 b9 fa ff ff jmp 10cf38 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10d47f: 50 push %eax 10d480: 6a 14 push $0x14 10d482: 6a 01 push $0x1 10d484: 6a 00 push $0x0 10d486: e8 71 f9 ff ff call 10cdfc <_Internal_error_Occurred> =============================================================================== 0010d49c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10d49c: 55 push %ebp 10d49d: 89 e5 mov %esp,%ebp 10d49f: 57 push %edi 10d4a0: 56 push %esi 10d4a1: 53 push %ebx 10d4a2: 8b 45 08 mov 0x8(%ebp),%eax 10d4a5: 8b 4d 0c mov 0xc(%ebp),%ecx 10d4a8: 8b 55 10 mov 0x10(%ebp),%edx 10d4ab: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10d4ae: 85 ff test %edi,%edi 10d4b0: 74 56 je 10d508 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10d4b2: 85 c9 test %ecx,%ecx 10d4b4: 74 08 je 10d4be <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d4b6: 8b 70 10 mov 0x10(%eax),%esi 10d4b9: 66 85 f6 test %si,%si 10d4bc: 75 0a jne 10d4c8 <_Objects_Name_to_id_u32+0x2c> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10d4be: b8 01 00 00 00 mov $0x1,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10d4c3: 5b pop %ebx 10d4c4: 5e pop %esi 10d4c5: 5f pop %edi 10d4c6: c9 leave 10d4c7: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d4c8: 85 d2 test %edx,%edx 10d4ca: 75 20 jne 10d4ec <_Objects_Name_to_id_u32+0x50> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10d4cc: 0f b7 f6 movzwl %si,%esi 10d4cf: 8b 58 1c mov 0x1c(%eax),%ebx 10d4d2: b8 01 00 00 00 mov $0x1,%eax 10d4d7: 90 nop the_object = information->local_table[ index ]; 10d4d8: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10d4db: 85 d2 test %edx,%edx 10d4dd: 74 05 je 10d4e4 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10d4df: 39 4a 0c cmp %ecx,0xc(%edx) 10d4e2: 74 18 je 10d4fc <_Objects_Name_to_id_u32+0x60> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10d4e4: 40 inc %eax 10d4e5: 39 c6 cmp %eax,%esi 10d4e7: 73 ef jae 10d4d8 <_Objects_Name_to_id_u32+0x3c> 10d4e9: eb d3 jmp 10d4be <_Objects_Name_to_id_u32+0x22> 10d4eb: 90 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d4ec: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10d4f2: 74 d8 je 10d4cc <_Objects_Name_to_id_u32+0x30> 10d4f4: 4a dec %edx 10d4f5: 75 c7 jne 10d4be <_Objects_Name_to_id_u32+0x22> 10d4f7: eb d3 jmp 10d4cc <_Objects_Name_to_id_u32+0x30> 10d4f9: 8d 76 00 lea 0x0(%esi),%esi the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 10d4fc: 8b 42 08 mov 0x8(%edx),%eax 10d4ff: 89 07 mov %eax,(%edi) 10d501: 31 c0 xor %eax,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10d503: 5b pop %ebx 10d504: 5e pop %esi 10d505: 5f pop %edi 10d506: c9 leave 10d507: c3 ret Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10d508: b8 02 00 00 00 mov $0x2,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10d50d: 5b pop %ebx 10d50e: 5e pop %esi 10d50f: 5f pop %edi 10d510: c9 leave 10d511: c3 ret =============================================================================== 0010f2d4 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10f2d4: 55 push %ebp 10f2d5: 89 e5 mov %esp,%ebp 10f2d7: 53 push %ebx 10f2d8: 83 ec 0c sub $0xc,%esp 10f2db: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10f2de: 8b 45 08 mov 0x8(%ebp),%eax 10f2e1: 0f b7 40 38 movzwl 0x38(%eax),%eax 10f2e5: 50 push %eax 10f2e6: 53 push %ebx 10f2e7: e8 2c 7b 00 00 call 116e18 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10f2ec: 0f be 0b movsbl (%ebx),%ecx 10f2ef: c1 e1 18 shl $0x18,%ecx 10f2f2: 83 c4 10 add $0x10,%esp 10f2f5: 83 f8 01 cmp $0x1,%eax 10f2f8: 76 32 jbe 10f32c <_Objects_Set_name+0x58> 10f2fa: 0f be 53 01 movsbl 0x1(%ebx),%edx 10f2fe: c1 e2 10 shl $0x10,%edx 10f301: 09 ca or %ecx,%edx 10f303: 83 f8 02 cmp $0x2,%eax 10f306: 74 2c je 10f334 <_Objects_Set_name+0x60> 10f308: 0f be 4b 02 movsbl 0x2(%ebx),%ecx 10f30c: c1 e1 08 shl $0x8,%ecx 10f30f: 09 d1 or %edx,%ecx 10f311: 83 f8 03 cmp $0x3,%eax 10f314: 74 37 je 10f34d <_Objects_Set_name+0x79> 10f316: 0f be 43 03 movsbl 0x3(%ebx),%eax 10f31a: 09 c1 or %eax,%ecx 10f31c: 8b 55 0c mov 0xc(%ebp),%edx 10f31f: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10f322: b0 01 mov $0x1,%al 10f324: 8b 5d fc mov -0x4(%ebp),%ebx 10f327: c9 leave 10f328: c3 ret 10f329: 8d 76 00 lea 0x0(%esi),%esi d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10f32c: 89 ca mov %ecx,%edx 10f32e: 81 ca 00 00 20 00 or $0x200000,%edx 10f334: 89 d1 mov %edx,%ecx 10f336: 80 cd 20 or $0x20,%ch 10f339: b8 20 00 00 00 mov $0x20,%eax 10f33e: 09 c1 or %eax,%ecx 10f340: 8b 55 0c mov 0xc(%ebp),%edx 10f343: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10f346: b0 01 mov $0x1,%al 10f348: 8b 5d fc mov -0x4(%ebp),%ebx 10f34b: c9 leave 10f34c: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10f34d: b0 20 mov $0x20,%al 10f34f: eb c9 jmp 10f31a <_Objects_Set_name+0x46> =============================================================================== 0010d514 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10d514: 55 push %ebp 10d515: 89 e5 mov %esp,%ebp 10d517: 57 push %edi 10d518: 56 push %esi 10d519: 53 push %ebx 10d51a: 83 ec 1c sub $0x1c,%esp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 10d51d: 8b 45 08 mov 0x8(%ebp),%eax 10d520: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10d524: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10d528: 0f b7 40 10 movzwl 0x10(%eax),%eax 10d52c: 29 d8 sub %ebx,%eax 10d52e: 31 d2 xor %edx,%edx 10d530: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10d532: 85 c0 test %eax,%eax 10d534: 74 21 je 10d557 <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10d536: 8b 55 08 mov 0x8(%ebp),%edx 10d539: 8b 7a 30 mov 0x30(%edx),%edi 10d53c: 3b 0f cmp (%edi),%ecx 10d53e: 74 1f je 10d55f <_Objects_Shrink_information+0x4b><== NEVER TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 10d540: 31 d2 xor %edx,%edx 10d542: eb 0e jmp 10d552 <_Objects_Shrink_information+0x3e> } index_base += information->allocation_size; 10d544: 01 cb add %ecx,%ebx 10d546: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10d54d: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10d550: 74 12 je 10d564 <_Objects_Shrink_information+0x50> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10d552: 42 inc %edx 10d553: 39 d0 cmp %edx,%eax 10d555: 77 ed ja 10d544 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10d557: 8d 65 f4 lea -0xc(%ebp),%esp 10d55a: 5b pop %ebx 10d55b: 5e pop %esi 10d55c: 5f pop %edi 10d55d: c9 leave 10d55e: c3 ret index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10d55f: 31 f6 xor %esi,%esi 10d561: 8d 76 00 lea 0x0(%esi),%esi information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10d564: 8b 55 08 mov 0x8(%ebp),%edx 10d567: 8b 42 20 mov 0x20(%edx),%eax 10d56a: 89 75 e4 mov %esi,-0x1c(%ebp) 10d56d: eb 07 jmp 10d576 <_Objects_Shrink_information+0x62> 10d56f: 90 nop if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10d570: 85 ff test %edi,%edi 10d572: 74 2c je 10d5a0 <_Objects_Shrink_information+0x8c> 10d574: 89 f8 mov %edi,%eax * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 10d576: 0f b7 50 08 movzwl 0x8(%eax),%edx /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10d57a: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10d57c: 39 da cmp %ebx,%edx 10d57e: 72 f0 jb 10d570 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10d580: 8b 75 08 mov 0x8(%ebp),%esi 10d583: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10d587: 8d 0c 0b lea (%ebx,%ecx,1),%ecx 10d58a: 39 ca cmp %ecx,%edx 10d58c: 73 e2 jae 10d570 <_Objects_Shrink_information+0x5c> _Chain_Extract( &extract_me->Node ); 10d58e: 83 ec 0c sub $0xc,%esp 10d591: 50 push %eax 10d592: e8 15 f0 ff ff call 10c5ac <_Chain_Extract> 10d597: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10d59a: 85 ff test %edi,%edi 10d59c: 75 d6 jne 10d574 <_Objects_Shrink_information+0x60> 10d59e: 66 90 xchg %ax,%ax 10d5a0: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10d5a3: 83 ec 0c sub $0xc,%esp 10d5a6: 8b 55 08 mov 0x8(%ebp),%edx 10d5a9: 8b 42 34 mov 0x34(%edx),%eax 10d5ac: ff 34 30 pushl (%eax,%esi,1) 10d5af: e8 20 17 00 00 call 10ecd4 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10d5b4: 8b 55 08 mov 0x8(%ebp),%edx 10d5b7: 8b 42 34 mov 0x34(%edx),%eax 10d5ba: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10d5c1: 8b 42 30 mov 0x30(%edx),%eax 10d5c4: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10d5cb: 8b 42 14 mov 0x14(%edx),%eax 10d5ce: 66 29 42 2c sub %ax,0x2c(%edx) return; 10d5d2: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10d5d5: 8d 65 f4 lea -0xc(%ebp),%esp 10d5d8: 5b pop %ebx 10d5d9: 5e pop %esi 10d5da: 5f pop %edi 10d5db: c9 leave 10d5dc: 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 =============================================================================== 0013147c <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 13147c: 55 push %ebp 13147d: 89 e5 mov %esp,%ebp 13147f: 56 push %esi 131480: 53 push %ebx 131481: 8b 5d 08 mov 0x8(%ebp),%ebx 131484: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 131487: 85 db test %ebx,%ebx 131489: 74 35 je 1314c0 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 13148b: 85 f6 test %esi,%esi 13148d: 74 31 je 1314c0 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 13148f: 83 ec 0c sub $0xc,%esp 131492: ff 35 70 2f 17 00 pushl 0x172f70 131498: e8 fb 24 fe ff call 113998 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 13149d: 5a pop %edx 13149e: 59 pop %ecx 13149f: 56 push %esi 1314a0: 53 push %ebx 1314a1: e8 ce 28 01 00 call 143d74 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 1314a6: 58 pop %eax 1314a7: ff 35 70 2f 17 00 pushl 0x172f70 1314ad: e8 2e 25 fe ff call 1139e0 <_API_Mutex_Unlock> 1314b2: b0 01 mov $0x1,%al return true; 1314b4: 83 c4 10 add $0x10,%esp } 1314b7: 8d 65 f8 lea -0x8(%ebp),%esp 1314ba: 5b pop %ebx 1314bb: 5e pop %esi 1314bc: c9 leave 1314bd: c3 ret 1314be: 66 90 xchg %ax,%ax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; 1314c0: 31 c0 xor %eax,%eax } 1314c2: 8d 65 f8 lea -0x8(%ebp),%esp 1314c5: 5b pop %ebx 1314c6: 5e pop %esi 1314c7: c9 leave 1314c8: c3 ret =============================================================================== 00110e48 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110e48: 55 push %ebp 110e49: 89 e5 mov %esp,%ebp 110e4b: 56 push %esi 110e4c: 53 push %ebx 110e4d: 83 ec 10 sub $0x10,%esp 110e50: 8b 5d 08 mov 0x8(%ebp),%ebx 110e53: 8b 75 0c mov 0xc(%ebp),%esi 110e56: 8a 45 10 mov 0x10(%ebp),%al * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { 110e59: 8b 15 58 dc 12 00 mov 0x12dc58,%edx 110e5f: 85 d2 test %edx,%edx 110e61: 74 19 je 110e7c <_Protected_heap_Walk+0x34> _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 110e63: 0f b6 c0 movzbl %al,%eax 110e66: 89 45 10 mov %eax,0x10(%ebp) 110e69: 89 75 0c mov %esi,0xc(%ebp) 110e6c: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110e6f: 8d 65 f8 lea -0x8(%ebp),%esp 110e72: 5b pop %ebx 110e73: 5e pop %esi 110e74: c9 leave if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 110e75: e9 1e f2 ff ff jmp 110098 <_Heap_Walk> 110e7a: 66 90 xchg %ax,%ax * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); 110e7c: 83 ec 0c sub $0xc,%esp 110e7f: ff 35 10 dd 12 00 pushl 0x12dd10 110e85: 88 45 f4 mov %al,-0xc(%ebp) 110e88: e8 7b e4 ff ff call 10f308 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110e8d: 83 c4 0c add $0xc,%esp 110e90: 8a 45 f4 mov -0xc(%ebp),%al 110e93: 0f b6 c0 movzbl %al,%eax 110e96: 50 push %eax 110e97: 56 push %esi 110e98: 53 push %ebx 110e99: e8 fa f1 ff ff call 110098 <_Heap_Walk> _RTEMS_Unlock_allocator(); 110e9e: 5a pop %edx 110e9f: ff 35 10 dd 12 00 pushl 0x12dd10 110ea5: 88 45 f4 mov %al,-0xc(%ebp) 110ea8: e8 a3 e4 ff ff call 10f350 <_API_Mutex_Unlock> 110ead: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110eb0: 8a 45 f4 mov -0xc(%ebp),%al 110eb3: 8d 65 f8 lea -0x8(%ebp),%esp 110eb6: 5b pop %ebx 110eb7: 5e pop %esi 110eb8: c9 leave 110eb9: c3 ret =============================================================================== 001113b0 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 1113b0: 55 push %ebp 1113b1: 89 e5 mov %esp,%ebp 1113b3: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 1113b6: a1 60 32 12 00 mov 0x123260,%eax 1113bb: 85 c0 test %eax,%eax 1113bd: 74 05 je 1113c4 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 1113bf: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 1113c0: ff e0 jmp *%eax 1113c2: 66 90 xchg %ax,%ax } 1113c4: c9 leave 1113c5: c3 ret =============================================================================== 0010c0b0 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10c0b0: 55 push %ebp 10c0b1: 89 e5 mov %esp,%ebp 10c0b3: 57 push %edi 10c0b4: 56 push %esi 10c0b5: 53 push %ebx 10c0b6: 83 ec 1c sub $0x1c,%esp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 10c0b9: 8b 1d 0c 32 12 00 mov 0x12320c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10c0bf: 8b 3d 08 32 12 00 mov 0x123208,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10c0c5: 85 db test %ebx,%ebx 10c0c7: 74 46 je 10c10f <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10c0c9: 85 ff test %edi,%edi 10c0cb: 74 42 je 10c10f <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10c0cd: 31 f6 xor %esi,%esi 10c0cf: 90 nop return_value = rtems_task_create( 10c0d0: 83 ec 08 sub $0x8,%esp 10c0d3: 8d 45 e4 lea -0x1c(%ebp),%eax 10c0d6: 50 push %eax 10c0d7: ff 73 0c pushl 0xc(%ebx) 10c0da: ff 73 14 pushl 0x14(%ebx) 10c0dd: ff 73 04 pushl 0x4(%ebx) 10c0e0: ff 73 08 pushl 0x8(%ebx) 10c0e3: ff 33 pushl (%ebx) 10c0e5: e8 96 fd ff ff call 10be80 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10c0ea: 83 c4 20 add $0x20,%esp 10c0ed: 85 c0 test %eax,%eax 10c0ef: 75 26 jne 10c117 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10c0f1: 51 push %ecx 10c0f2: ff 73 18 pushl 0x18(%ebx) 10c0f5: ff 73 10 pushl 0x10(%ebx) 10c0f8: ff 75 e4 pushl -0x1c(%ebp) 10c0fb: e8 24 00 00 00 call 10c124 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10c100: 83 c4 10 add $0x10,%esp 10c103: 85 c0 test %eax,%eax 10c105: 75 10 jne 10c117 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10c107: 46 inc %esi 10c108: 83 c3 1c add $0x1c,%ebx 10c10b: 39 f7 cmp %esi,%edi 10c10d: 77 c1 ja 10c0d0 <_RTEMS_tasks_Initialize_user_tasks_body+0x20><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 10c10f: 8d 65 f4 lea -0xc(%ebp),%esp 10c112: 5b pop %ebx 10c113: 5e pop %esi 10c114: 5f pop %edi 10c115: c9 leave 10c116: c3 ret id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 10c117: 52 push %edx 10c118: 50 push %eax 10c119: 6a 01 push $0x1 10c11b: 6a 01 push $0x1 10c11d: e8 da 0c 00 00 call 10cdfc <_Internal_error_Occurred> =============================================================================== 0011140c <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 11140c: 55 push %ebp 11140d: 89 e5 mov %esp,%ebp 11140f: 57 push %edi 111410: 56 push %esi 111411: 53 push %ebx 111412: 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 ]; 111415: 8b 45 08 mov 0x8(%ebp),%eax 111418: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 11141e: 85 db test %ebx,%ebx 111420: 74 45 je 111467 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 111422: 9c pushf 111423: fa cli 111424: 58 pop %eax signal_set = asr->signals_posted; 111425: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 111428: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 11142f: 50 push %eax 111430: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 111431: 85 f6 test %esi,%esi 111433: 74 32 je 111467 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN return; asr->nest_level += 1; 111435: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 111438: 50 push %eax 111439: 8d 7d e4 lea -0x1c(%ebp),%edi 11143c: 57 push %edi 11143d: 68 ff ff 00 00 push $0xffff 111442: ff 73 10 pushl 0x10(%ebx) 111445: e8 2a 25 00 00 call 113974 (*asr->handler)( signal_set ); 11144a: 89 34 24 mov %esi,(%esp) 11144d: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 111450: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 111453: 83 c4 0c add $0xc,%esp 111456: 57 push %edi 111457: 68 ff ff 00 00 push $0xffff 11145c: ff 75 e4 pushl -0x1c(%ebp) 11145f: e8 10 25 00 00 call 113974 111464: 83 c4 10 add $0x10,%esp } 111467: 8d 65 f4 lea -0xc(%ebp),%esp 11146a: 5b pop %ebx 11146b: 5e pop %esi 11146c: 5f pop %edi 11146d: c9 leave 11146e: c3 ret =============================================================================== 00111368 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 111368: 55 push %ebp 111369: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 11136b: 8b 45 08 mov 0x8(%ebp),%eax 11136e: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 111374: 85 c0 test %eax,%eax 111376: 74 13 je 11138b <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 111378: 8b 50 04 mov 0x4(%eax),%edx 11137b: 8b 0a mov (%edx),%ecx 11137d: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 111380: 8b 48 08 mov 0x8(%eax),%ecx 111383: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 111385: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 111387: 85 c0 test %eax,%eax 111389: 75 ed jne 111378 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 11138b: 8b 45 0c mov 0xc(%ebp),%eax 11138e: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 111394: 85 c0 test %eax,%eax 111396: 74 13 je 1113ab <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 111398: 8b 50 04 mov 0x4(%eax),%edx 11139b: 8b 0a mov (%edx),%ecx 11139d: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 1113a0: 8b 48 0c mov 0xc(%eax),%ecx 1113a3: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 1113a5: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 1113a7: 85 c0 test %eax,%eax 1113a9: 75 ed jne 111398 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 1113ab: c9 leave 1113ac: c3 ret =============================================================================== 0014379c <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 14379c: 55 push %ebp 14379d: 89 e5 mov %esp,%ebp 14379f: 57 push %edi 1437a0: 56 push %esi 1437a1: 53 push %ebx 1437a2: 83 ec 28 sub $0x28,%esp 1437a5: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 1437a8: 8b 73 40 mov 0x40(%ebx),%esi * If using nanosecond statistics, we need to obtain the uptime. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; _TOD_Get_uptime( &uptime ); 1437ab: 8d 7d e0 lea -0x20(%ebp),%edi 1437ae: 57 push %edi 1437af: e8 e8 d6 fe ff call 130e9c <_TOD_Get_uptime> /* * Set the starting point and the CPU time used for the statistics. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ the_period->time_period_initiated = uptime; 1437b4: 8b 45 e0 mov -0x20(%ebp),%eax 1437b7: 8b 55 e4 mov -0x1c(%ebp),%edx 1437ba: 89 43 4c mov %eax,0x4c(%ebx) 1437bd: 89 53 50 mov %edx,0x50(%ebx) #else the_period->time_period_initiated = _Watchdog_Ticks_since_boot; #endif the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used; 1437c0: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 1437c6: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 1437cc: 89 43 44 mov %eax,0x44(%ebx) 1437cf: 89 53 48 mov %edx,0x48(%ebx) * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 1437d2: 83 c4 10 add $0x10,%esp 1437d5: 3b 35 78 2f 17 00 cmp 0x172f78,%esi 1437db: 74 0b je 1437e8 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 1437dd: 8d 65 f4 lea -0xc(%ebp),%esp 1437e0: 5b pop %ebx 1437e1: 5e pop %esi 1437e2: 5f pop %edi 1437e3: c9 leave 1437e4: c3 ret 1437e5: 8d 76 00 lea 0x0(%esi),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 1437e8: 51 push %ecx 1437e9: 8d 75 d8 lea -0x28(%ebp),%esi 1437ec: 56 push %esi 1437ed: 57 push %edi 1437ee: 68 80 2f 17 00 push $0x172f80 1437f3: e8 80 28 fd ff call 116078 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 1437f8: 58 pop %eax 1437f9: 5a pop %edx 1437fa: 56 push %esi 1437fb: 83 c3 44 add $0x44,%ebx 1437fe: 53 push %ebx 1437ff: e8 38 28 fd ff call 11603c <_Timespec_Add_to> 143804: 83 c4 10 add $0x10,%esp } #endif } 143807: 8d 65 f4 lea -0xc(%ebp),%esp 14380a: 5b pop %ebx 14380b: 5e pop %esi 14380c: 5f pop %edi 14380d: c9 leave 14380e: 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 =============================================================================== 00143b48 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 143b48: 55 push %ebp 143b49: 89 e5 mov %esp,%ebp 143b4b: 83 ec 2c sub $0x2c,%esp 143b4e: 8d 45 f4 lea -0xc(%ebp),%eax 143b51: 50 push %eax 143b52: ff 75 08 pushl 0x8(%ebp) 143b55: 68 c0 33 17 00 push $0x1733c0 143b5a: e8 c5 0f fd ff call 114b24 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 143b5f: 83 c4 10 add $0x10,%esp 143b62: 8b 55 f4 mov -0xc(%ebp),%edx 143b65: 85 d2 test %edx,%edx 143b67: 75 29 jne 143b92 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 143b69: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 143b6c: f6 42 11 40 testb $0x40,0x11(%edx) 143b70: 74 08 je 143b7a <_Rate_monotonic_Timeout+0x32> the_thread->Wait.id == the_period->Object.id ) { 143b72: 8b 4a 20 mov 0x20(%edx),%ecx 143b75: 3b 48 08 cmp 0x8(%eax),%ecx 143b78: 74 4e je 143bc8 <_Rate_monotonic_Timeout+0x80> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 143b7a: 83 78 38 01 cmpl $0x1,0x38(%eax) 143b7e: 74 14 je 143b94 <_Rate_monotonic_Timeout+0x4c> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 143b80: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 143b87: a1 b8 2e 17 00 mov 0x172eb8,%eax 143b8c: 48 dec %eax 143b8d: a3 b8 2e 17 00 mov %eax,0x172eb8 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 143b92: c9 leave 143b93: c3 ret _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 143b94: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 143b9b: 83 ec 0c sub $0xc,%esp 143b9e: 50 push %eax 143b9f: 89 45 e4 mov %eax,-0x1c(%ebp) 143ba2: e8 f5 fb ff ff call 14379c <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 143ba7: 8b 45 e4 mov -0x1c(%ebp),%eax 143baa: 8b 50 3c mov 0x3c(%eax),%edx 143bad: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 143bb0: 5a pop %edx 143bb1: 59 pop %ecx 143bb2: 83 c0 10 add $0x10,%eax 143bb5: 50 push %eax 143bb6: 68 98 2f 17 00 push $0x172f98 143bbb: e8 88 27 fd ff call 116348 <_Watchdog_Insert> 143bc0: 83 c4 10 add $0x10,%esp 143bc3: eb c2 jmp 143b87 <_Rate_monotonic_Timeout+0x3f> 143bc5: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 143bc8: 83 ec 08 sub $0x8,%esp 143bcb: 68 f8 ff 03 10 push $0x1003fff8 143bd0: 52 push %edx 143bd1: 89 45 e4 mov %eax,-0x1c(%ebp) 143bd4: e8 9b 14 fd ff call 115074 <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 143bd9: 8b 45 e4 mov -0x1c(%ebp),%eax 143bdc: 89 04 24 mov %eax,(%esp) 143bdf: eb c1 jmp 143ba2 <_Rate_monotonic_Timeout+0x5a> =============================================================================== 001438a8 <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 1438a8: 55 push %ebp 1438a9: 89 e5 mov %esp,%ebp 1438ab: 57 push %edi 1438ac: 56 push %esi 1438ad: 53 push %ebx 1438ae: 83 ec 1c sub $0x1c,%esp 1438b1: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 1438b4: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 1438b7: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 1438bb: 0f 84 bf 00 00 00 je 143980 <_Rate_monotonic_Update_statistics+0xd8> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 1438c1: 52 push %edx 1438c2: 8d 7d e0 lea -0x20(%ebp),%edi 1438c5: 57 push %edi 1438c6: 8d 75 d8 lea -0x28(%ebp),%esi 1438c9: 56 push %esi 1438ca: 53 push %ebx 1438cb: e8 40 ff ff ff call 143810 <_Rate_monotonic_Get_status> if (!valid_status) 1438d0: 83 c4 10 add $0x10,%esp 1438d3: 84 c0 test %al,%al 1438d5: 75 09 jne 1438e0 <_Rate_monotonic_Update_statistics+0x38> stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 1438d7: 8d 65 f4 lea -0xc(%ebp),%esp 1438da: 5b pop %ebx 1438db: 5e pop %esi 1438dc: 5f pop %edi 1438dd: c9 leave 1438de: c3 ret 1438df: 90 nop /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 1438e0: 83 ec 08 sub $0x8,%esp 1438e3: 57 push %edi 1438e4: 8d 43 6c lea 0x6c(%ebx),%eax 1438e7: 50 push %eax 1438e8: e8 4f 27 fd ff call 11603c <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 1438ed: 59 pop %ecx 1438ee: 58 pop %eax 1438ef: 8d 43 5c lea 0x5c(%ebx),%eax 1438f2: 50 push %eax 1438f3: 57 push %edi 1438f4: e8 53 06 00 00 call 143f4c <_Timespec_Less_than> 1438f9: 83 c4 10 add $0x10,%esp 1438fc: 84 c0 test %al,%al 1438fe: 74 0c je 14390c <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 143900: 8b 45 e0 mov -0x20(%ebp),%eax 143903: 8b 55 e4 mov -0x1c(%ebp),%edx 143906: 89 43 5c mov %eax,0x5c(%ebx) 143909: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 14390c: 83 ec 08 sub $0x8,%esp 14390f: 8d 43 64 lea 0x64(%ebx),%eax 143912: 50 push %eax 143913: 57 push %edi 143914: e8 0f 06 00 00 call 143f28 <_Timespec_Greater_than> 143919: 83 c4 10 add $0x10,%esp 14391c: 84 c0 test %al,%al 14391e: 74 0c je 14392c <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 143920: 8b 45 e0 mov -0x20(%ebp),%eax 143923: 8b 55 e4 mov -0x1c(%ebp),%edx 143926: 89 43 64 mov %eax,0x64(%ebx) 143929: 89 53 68 mov %edx,0x68(%ebx) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 14392c: 83 ec 08 sub $0x8,%esp 14392f: 56 push %esi 143930: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 143936: 50 push %eax 143937: e8 00 27 fd ff call 11603c <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 14393c: 58 pop %eax 14393d: 5a pop %edx 14393e: 8d 43 74 lea 0x74(%ebx),%eax 143941: 50 push %eax 143942: 56 push %esi 143943: e8 04 06 00 00 call 143f4c <_Timespec_Less_than> 143948: 83 c4 10 add $0x10,%esp 14394b: 84 c0 test %al,%al 14394d: 75 39 jne 143988 <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 14394f: 83 ec 08 sub $0x8,%esp 143952: 8d 43 7c lea 0x7c(%ebx),%eax 143955: 50 push %eax 143956: 56 push %esi 143957: e8 cc 05 00 00 call 143f28 <_Timespec_Greater_than> 14395c: 83 c4 10 add $0x10,%esp 14395f: 84 c0 test %al,%al 143961: 0f 84 70 ff ff ff je 1438d7 <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 143967: 8b 45 d8 mov -0x28(%ebp),%eax 14396a: 8b 55 dc mov -0x24(%ebp),%edx 14396d: 89 43 7c mov %eax,0x7c(%ebx) 143970: 89 93 80 00 00 00 mov %edx,0x80(%ebx) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 143976: 8d 65 f4 lea -0xc(%ebp),%esp 143979: 5b pop %ebx 14397a: 5e pop %esi 14397b: 5f pop %edi 14397c: c9 leave 14397d: c3 ret 14397e: 66 90 xchg %ax,%ax */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 143980: ff 43 58 incl 0x58(%ebx) 143983: e9 39 ff ff ff jmp 1438c1 <_Rate_monotonic_Update_statistics+0x19> */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; 143988: 8b 45 d8 mov -0x28(%ebp),%eax 14398b: 8b 55 dc mov -0x24(%ebp),%edx 14398e: 89 43 74 mov %eax,0x74(%ebx) 143991: 89 53 78 mov %edx,0x78(%ebx) 143994: eb b9 jmp 14394f <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 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 =============================================================================== 0010dfe8 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10dfe8: 55 push %ebp 10dfe9: 89 e5 mov %esp,%ebp 10dfeb: 53 push %ebx 10dfec: 83 ec 04 sub $0x4,%esp 10dfef: 8b 5d 08 mov 0x8(%ebp),%ebx 10dff2: a1 38 b9 12 00 mov 0x12b938,%eax 10dff7: 40 inc %eax 10dff8: a3 38 b9 12 00 mov %eax,0x12b938 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10dffd: a1 cc b9 12 00 mov 0x12b9cc,%eax if ( time->tv_sec < seconds ) 10e002: 8b 13 mov (%ebx),%edx 10e004: 39 d0 cmp %edx,%eax 10e006: 7f 34 jg 10e03c <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10e008: 51 push %ecx 10e009: 29 c2 sub %eax,%edx 10e00b: 52 push %edx 10e00c: 6a 00 push $0x0 10e00e: 68 0c ba 12 00 push $0x12ba0c 10e013: e8 4c 24 00 00 call 110464 <_Watchdog_Adjust> 10e018: 83 c4 10 add $0x10,%esp _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10e01b: 8b 03 mov (%ebx),%eax 10e01d: a3 cc b9 12 00 mov %eax,0x12b9cc 10e022: 8b 43 04 mov 0x4(%ebx),%eax 10e025: a3 d0 b9 12 00 mov %eax,0x12b9d0 _TOD_Is_set = true; 10e02a: c6 05 4c b9 12 00 01 movb $0x1,0x12b94c _TOD_Activate(); _Thread_Enable_dispatch(); } 10e031: 8b 5d fc mov -0x4(%ebp),%ebx 10e034: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10e035: e9 7e 12 00 00 jmp 10f2b8 <_Thread_Enable_dispatch> 10e03a: 66 90 xchg %ax,%ax 10e03c: 51 push %ecx 10e03d: 29 d0 sub %edx,%eax 10e03f: 50 push %eax 10e040: 6a 01 push $0x1 10e042: 68 0c ba 12 00 push $0x12ba0c 10e047: e8 18 24 00 00 call 110464 <_Watchdog_Adjust> 10e04c: 83 c4 10 add $0x10,%esp 10e04f: eb ca jmp 10e01b <_TOD_Set+0x33> =============================================================================== 0010ca54 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10ca54: 55 push %ebp 10ca55: 89 e5 mov %esp,%ebp 10ca57: 53 push %ebx 10ca58: 83 ec 1c sub $0x1c,%esp Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 10ca5b: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10ca62: a1 2c 32 12 00 mov 0x12322c,%eax 10ca67: 8d 04 80 lea (%eax,%eax,4),%eax 10ca6a: 8d 04 80 lea (%eax,%eax,4),%eax 10ca6d: 8d 04 80 lea (%eax,%eax,4),%eax 10ca70: c1 e0 03 shl $0x3,%eax 10ca73: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10ca76: a1 c4 74 12 00 mov 0x1274c4,%eax 10ca7b: 40 inc %eax 10ca7c: a3 c4 74 12 00 mov %eax,0x1274c4 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10ca81: 8d 5d f0 lea -0x10(%ebp),%ebx 10ca84: 53 push %ebx 10ca85: 68 d8 73 12 00 push $0x1273d8 10ca8a: e8 f1 1c 00 00 call 10e780 <_Timespec_Add_to> /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 10ca8f: 58 pop %eax 10ca90: 5a pop %edx 10ca91: 53 push %ebx 10ca92: 68 ec 73 12 00 push $0x1273ec 10ca97: e8 e4 1c 00 00 call 10e780 <_Timespec_Add_to> 10ca9c: 89 c3 mov %eax,%ebx while ( seconds ) { 10ca9e: 83 c4 10 add $0x10,%esp 10caa1: 85 c0 test %eax,%eax 10caa3: 74 16 je 10cabb <_TOD_Tickle_ticks+0x67> 10caa5: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10caa8: 83 ec 0c sub $0xc,%esp 10caab: 68 2c 74 12 00 push $0x12742c 10cab0: e8 6b 21 00 00 call 10ec20 <_Watchdog_Tickle> 10cab5: 83 c4 10 add $0x10,%esp 10cab8: 4b dec %ebx 10cab9: 75 ed jne 10caa8 <_TOD_Tickle_ticks+0x54><== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 10cabb: 8b 5d fc mov -0x4(%ebp),%ebx 10cabe: c9 leave 10cabf: c3 ret =============================================================================== 0010c804 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c804: 55 push %ebp 10c805: 89 e5 mov %esp,%ebp 10c807: 56 push %esi 10c808: 53 push %ebx 10c809: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c80c: 8b 72 08 mov 0x8(%edx),%esi 10c80f: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c810: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c812: 89 c3 mov %eax,%ebx 10c814: 83 e3 03 and $0x3,%ebx 10c817: 74 67 je 10c880 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c819: 8b 4a 04 mov 0x4(%edx),%ecx 10c81c: 0f b7 8c 09 00 43 12 movzwl 0x124300(%ecx,%ecx,1),%ecx 10c823: 00 10c824: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c827: 0f b7 8c 1b 34 43 12 movzwl 0x124334(%ebx,%ebx,1),%ecx 10c82e: 00 10c82f: 2d c4 07 00 00 sub $0x7c4,%eax 10c834: c1 e8 02 shr $0x2,%eax 10c837: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c83a: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c83d: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c840: 8d 04 98 lea (%eax,%ebx,4),%eax 10c843: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c845: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c847: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c84a: 8d 04 81 lea (%ecx,%eax,4),%eax 10c84d: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c850: c1 e0 02 shl $0x2,%eax 10c853: 29 c8 sub %ecx,%eax 10c855: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c858: 8b 5a 14 mov 0x14(%edx),%ebx * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10c85b: 8b 4a 0c mov 0xc(%edx),%ecx 10c85e: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c861: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c864: c1 e1 02 shl $0x2,%ecx 10c867: 03 4a 10 add 0x10(%edx),%ecx 10c86a: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c86d: 8d 14 92 lea (%edx,%edx,4),%edx 10c870: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx 10c877: 8d 04 02 lea (%edx,%eax,1),%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10c87a: 5b pop %ebx 10c87b: 5e pop %esi 10c87c: c9 leave 10c87d: c3 ret 10c87e: 66 90 xchg %ax,%ax time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 10c880: 8b 4a 04 mov 0x4(%edx),%ecx 10c883: 0f b7 8c 09 1a 43 12 movzwl 0x12431a(%ecx,%ecx,1),%ecx 10c88a: 00 10c88b: 8d 34 31 lea (%ecx,%esi,1),%esi 10c88e: eb 97 jmp 10c827 <_TOD_To_seconds+0x23> =============================================================================== 0010c890 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c890: 55 push %ebp 10c891: 89 e5 mov %esp,%ebp 10c893: 53 push %ebx 10c894: 8b 4d 08 mov 0x8(%ebp),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 10c897: 8b 1d ac 73 12 00 mov 0x1273ac,%ebx if ((!the_tod) || 10c89d: 85 c9 test %ecx,%ecx 10c89f: 74 53 je 10c8f4 <_TOD_Validate+0x64> <== NEVER TAKEN 10c8a1: b8 40 42 0f 00 mov $0xf4240,%eax 10c8a6: 31 d2 xor %edx,%edx 10c8a8: f7 f3 div %ebx (the_tod->ticks >= ticks_per_second) || 10c8aa: 3b 41 18 cmp 0x18(%ecx),%eax 10c8ad: 76 45 jbe 10c8f4 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c8af: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c8b3: 77 3f ja 10c8f4 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c8b5: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c8b9: 77 39 ja 10c8f4 <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c8bb: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c8bf: 77 33 ja 10c8f4 <_TOD_Validate+0x64> (the_tod->month == 0) || 10c8c1: 8b 41 04 mov 0x4(%ecx),%eax uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c8c4: 85 c0 test %eax,%eax 10c8c6: 74 2c je 10c8f4 <_TOD_Validate+0x64> <== NEVER TAKEN 10c8c8: 83 f8 0c cmp $0xc,%eax 10c8cb: 77 27 ja 10c8f4 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c8cd: 8b 11 mov (%ecx),%edx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c8cf: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c8d5: 76 1d jbe 10c8f4 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c8d7: 8b 49 08 mov 0x8(%ecx),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c8da: 85 c9 test %ecx,%ecx 10c8dc: 74 16 je 10c8f4 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c8de: 83 e2 03 and $0x3,%edx 10c8e1: 75 16 jne 10c8f9 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c8e3: 8b 04 85 74 43 12 00 mov 0x124374(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c8ea: 39 c8 cmp %ecx,%eax 10c8ec: 0f 93 c0 setae %al 10c8ef: eb 05 jmp 10c8f6 <_TOD_Validate+0x66> 10c8f1: 8d 76 00 lea 0x0(%esi),%esi 10c8f4: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c8f6: 5b pop %ebx 10c8f7: c9 leave 10c8f8: c3 ret return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10c8f9: 8b 04 85 40 43 12 00 mov 0x124340(,%eax,4),%eax 10c900: eb e8 jmp 10c8ea <_TOD_Validate+0x5a> =============================================================================== 0010d6a4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d6a4: 55 push %ebp 10d6a5: 89 e5 mov %esp,%ebp 10d6a7: 57 push %edi 10d6a8: 56 push %esi 10d6a9: 53 push %ebx 10d6aa: 83 ec 28 sub $0x28,%esp 10d6ad: 8b 5d 08 mov 0x8(%ebp),%ebx 10d6b0: 8b 75 0c mov 0xc(%ebp),%esi 10d6b3: 8a 45 10 mov 0x10(%ebp),%al 10d6b6: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d6b9: 8b 7b 10 mov 0x10(%ebx),%edi /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 10d6bc: 53 push %ebx 10d6bd: e8 56 0e 00 00 call 10e518 <_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 ) 10d6c2: 83 c4 10 add $0x10,%esp 10d6c5: 39 73 14 cmp %esi,0x14(%ebx) 10d6c8: 74 0d je 10d6d7 <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d6ca: 83 ec 08 sub $0x8,%esp 10d6cd: 56 push %esi 10d6ce: 53 push %ebx 10d6cf: e8 fc 0c 00 00 call 10e3d0 <_Thread_Set_priority> 10d6d4: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d6d7: 9c pushf 10d6d8: fa cli 10d6d9: 5a pop %edx /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 10d6da: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d6dd: 83 f8 04 cmp $0x4,%eax 10d6e0: 74 26 je 10d708 <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d6e2: 83 e7 04 and $0x4,%edi 10d6e5: 74 15 je 10d6fc <_Thread_Change_priority+0x58><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d6e7: 52 push %edx 10d6e8: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d6e9: a9 e0 be 03 00 test $0x3bee0,%eax 10d6ee: 0f 85 bc 00 00 00 jne 10d7b0 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d6f4: 8d 65 f4 lea -0xc(%ebp),%esp 10d6f7: 5b pop %ebx 10d6f8: 5e pop %esi 10d6f9: 5f pop %edi 10d6fa: c9 leave 10d6fb: c3 ret */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10d6fc: 89 c1 mov %eax,%ecx 10d6fe: 83 e1 fb and $0xfffffffb,%ecx 10d701: 89 4b 10 mov %ecx,0x10(%ebx) 10d704: eb e1 jmp 10d6e7 <_Thread_Change_priority+0x43> 10d706: 66 90 xchg %ax,%ax } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10d708: 83 e7 04 and $0x4,%edi 10d70b: 75 45 jne 10d752 <_Thread_Change_priority+0xae><== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10d70d: 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; 10d714: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d71a: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d721: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d724: 66 a1 0c 74 12 00 mov 0x12740c,%ax 10d72a: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d730: 66 a3 0c 74 12 00 mov %ax,0x12740c _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10d736: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d73a: 0f 84 88 00 00 00 je 10d7c8 <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d740: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d746: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d749: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d74b: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d74d: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d74f: 89 59 04 mov %ebx,0x4(%ecx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10d752: 52 push %edx 10d753: 9d popf 10d754: 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 ); 10d755: 66 8b 1d 0c 74 12 00 mov 0x12740c,%bx 10d75c: 31 c0 xor %eax,%eax 10d75e: 89 c1 mov %eax,%ecx 10d760: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d764: 0f b7 c9 movzwl %cx,%ecx 10d767: 66 8b 9c 09 a0 74 12 mov 0x1274a0(%ecx,%ecx,1),%bx 10d76e: 00 10d76f: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d773: c1 e1 04 shl $0x4,%ecx 10d776: 0f b7 c0 movzwl %ax,%eax 10d779: 8d 04 01 lea (%ecx,%eax,1),%eax 10d77c: 8d 0c 40 lea (%eax,%eax,2),%ecx 10d77f: a1 20 73 12 00 mov 0x127320,%eax 10d784: 8b 04 88 mov (%eax,%ecx,4),%eax 10d787: a3 e8 73 12 00 mov %eax,0x1273e8 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d78c: 8b 0d 18 74 12 00 mov 0x127418,%ecx * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10d792: 39 c8 cmp %ecx,%eax 10d794: 74 0d je 10d7a3 <_Thread_Change_priority+0xff> _Thread_Executing->is_preemptible ) 10d796: 80 79 75 00 cmpb $0x0,0x75(%ecx) 10d79a: 74 07 je 10d7a3 <_Thread_Change_priority+0xff> _Context_Switch_necessary = true; 10d79c: c6 05 28 74 12 00 01 movb $0x1,0x127428 _ISR_Enable( level ); 10d7a3: 52 push %edx 10d7a4: 9d popf } 10d7a5: 8d 65 f4 lea -0xc(%ebp),%esp 10d7a8: 5b pop %ebx 10d7a9: 5e pop %esi 10d7aa: 5f pop %edi 10d7ab: c9 leave 10d7ac: c3 ret 10d7ad: 8d 76 00 lea 0x0(%esi),%esi /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10d7b0: 89 5d 0c mov %ebx,0xc(%ebp) 10d7b3: 8b 43 44 mov 0x44(%ebx),%eax 10d7b6: 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 ); } 10d7b9: 8d 65 f4 lea -0xc(%ebp),%esp 10d7bc: 5b pop %ebx 10d7bd: 5e pop %esi 10d7be: 5f pop %edi 10d7bf: 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 ); 10d7c0: e9 73 0b 00 00 jmp 10e338 <_Thread_queue_Requeue> 10d7c5: 8d 76 00 lea 0x0(%esi),%esi _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 10d7c8: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10d7ce: 8d 48 04 lea 0x4(%eax),%ecx 10d7d1: 89 0b mov %ecx,(%ebx) old_last_node = the_chain->last; 10d7d3: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d7d6: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d7d9: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d7db: 89 4b 04 mov %ecx,0x4(%ebx) 10d7de: e9 6f ff ff ff jmp 10d752 <_Thread_Change_priority+0xae> =============================================================================== 0010d7e4 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d7e4: 55 push %ebp 10d7e5: 89 e5 mov %esp,%ebp 10d7e7: 53 push %ebx 10d7e8: 8b 45 08 mov 0x8(%ebp),%eax 10d7eb: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d7ee: 9c pushf 10d7ef: fa cli 10d7f0: 5b pop %ebx current_state = the_thread->current_state; 10d7f1: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d7f4: 85 ca test %ecx,%edx 10d7f6: 74 70 je 10d868 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d7f8: f7 d2 not %edx 10d7fa: 21 ca and %ecx,%edx current_state = 10d7fc: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10d7ff: 85 d2 test %edx,%edx 10d801: 75 65 jne 10d868 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d803: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d809: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d810: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d813: 66 8b 15 0c 74 12 00 mov 0x12740c,%dx 10d81a: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d820: 66 89 15 0c 74 12 00 mov %dx,0x12740c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d827: 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); 10d82d: 8d 4a 04 lea 0x4(%edx),%ecx 10d830: 89 08 mov %ecx,(%eax) old_last_node = the_chain->last; 10d832: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d835: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d838: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d83a: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d83d: 53 push %ebx 10d83e: 9d popf 10d83f: 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 ) { 10d840: 8b 50 14 mov 0x14(%eax),%edx 10d843: 8b 0d e8 73 12 00 mov 0x1273e8,%ecx 10d849: 3b 51 14 cmp 0x14(%ecx),%edx 10d84c: 73 1a jae 10d868 <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d84e: a3 e8 73 12 00 mov %eax,0x1273e8 if ( _Thread_Executing->is_preemptible || 10d853: a1 18 74 12 00 mov 0x127418,%eax 10d858: 80 78 75 00 cmpb $0x0,0x75(%eax) 10d85c: 74 12 je 10d870 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d85e: c6 05 28 74 12 00 01 movb $0x1,0x127428 10d865: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d868: 53 push %ebx 10d869: 9d popf } 10d86a: 5b pop %ebx 10d86b: c9 leave 10d86c: c3 ret 10d86d: 8d 76 00 lea 0x0(%esi),%esi * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 10d870: 85 d2 test %edx,%edx 10d872: 74 ea je 10d85e <_Thread_Clear_state+0x7a><== NEVER TAKEN 10d874: eb f2 jmp 10d868 <_Thread_Clear_state+0x84> =============================================================================== 0010d878 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d878: 55 push %ebp 10d879: 89 e5 mov %esp,%ebp 10d87b: 56 push %esi 10d87c: 53 push %ebx 10d87d: 8b 75 08 mov 0x8(%ebp),%esi 10d880: 8b 5d 0c mov 0xc(%ebp),%ebx 10d883: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d887: 8b 46 1c mov 0x1c(%esi),%eax 10d88a: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d891: a1 58 73 12 00 mov 0x127358,%eax 10d896: 48 dec %eax 10d897: a3 58 73 12 00 mov %eax,0x127358 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d89c: 83 ec 0c sub $0xc,%esp 10d89f: 53 push %ebx 10d8a0: e8 27 11 00 00 call 10e9cc <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d8a5: a1 58 73 12 00 mov 0x127358,%eax 10d8aa: 40 inc %eax 10d8ab: a3 58 73 12 00 mov %eax,0x127358 /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 10d8b0: 59 pop %ecx 10d8b1: 58 pop %eax 10d8b2: 53 push %ebx 10d8b3: 56 push %esi 10d8b4: e8 57 f6 ff ff call 10cf10 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 10d8b9: 58 pop %eax 10d8ba: 5a pop %edx 10d8bb: 6a 01 push $0x1 10d8bd: 53 push %ebx 10d8be: e8 79 0b 00 00 call 10e43c <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d8c3: 89 1c 24 mov %ebx,(%esp) 10d8c6: e8 c5 09 00 00 call 10e290 <_Thread_queue_Extract_with_proxy> 10d8cb: 83 c4 10 add $0x10,%esp 10d8ce: 84 c0 test %al,%al 10d8d0: 75 06 jne 10d8d8 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d8d2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d8d6: 74 68 je 10d940 <_Thread_Close+0xc8> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 10d8d8: 3b 1d e0 73 12 00 cmp 0x1273e0,%ebx 10d8de: 74 74 je 10d954 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d8e0: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10d8e7: 00 00 00 if ( the_thread->Start.fp_context ) 10d8ea: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax 10d8f0: 85 c0 test %eax,%eax 10d8f2: 74 0c je 10d900 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d8f4: 83 ec 0c sub $0xc,%esp 10d8f7: 50 push %eax 10d8f8: e8 d7 13 00 00 call 10ecd4 <_Workspace_Free> 10d8fd: 83 c4 10 add $0x10,%esp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 10d900: 83 ec 0c sub $0xc,%esp 10d903: 53 push %ebx 10d904: e8 e7 0c 00 00 call 10e5f0 <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d909: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10d910: 00 00 00 if ( the_thread->extensions ) 10d913: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10d919: 83 c4 10 add $0x10,%esp 10d91c: 85 c0 test %eax,%eax 10d91e: 74 0c je 10d92c <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d920: 83 ec 0c sub $0xc,%esp 10d923: 50 push %eax 10d924: e8 ab 13 00 00 call 10ecd4 <_Workspace_Free> 10d929: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d92c: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d933: 00 00 00 } 10d936: 8d 65 f8 lea -0x8(%ebp),%esp 10d939: 5b pop %ebx 10d93a: 5e pop %esi 10d93b: c9 leave 10d93c: c3 ret 10d93d: 8d 76 00 lea 0x0(%esi),%esi */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 10d940: 83 ec 0c sub $0xc,%esp 10d943: 8d 43 48 lea 0x48(%ebx),%eax 10d946: 50 push %eax 10d947: e8 68 12 00 00 call 10ebb4 <_Watchdog_Remove> 10d94c: 83 c4 10 add $0x10,%esp 10d94f: eb 87 jmp 10d8d8 <_Thread_Close+0x60> 10d951: 8d 76 00 lea 0x0(%esi),%esi */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10d954: c7 05 e0 73 12 00 00 movl $0x0,0x1273e0 10d95b: 00 00 00 10d95e: eb 80 jmp 10d8e0 <_Thread_Close+0x68> =============================================================================== 0010d9f4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d9f4: 55 push %ebp 10d9f5: 89 e5 mov %esp,%ebp 10d9f7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d9fa: 8d 45 f4 lea -0xc(%ebp),%eax 10d9fd: 50 push %eax 10d9fe: ff 75 08 pushl 0x8(%ebp) 10da01: e8 aa 01 00 00 call 10dbb0 <_Thread_Get> switch ( location ) { 10da06: 83 c4 10 add $0x10,%esp 10da09: 8b 55 f4 mov -0xc(%ebp),%edx 10da0c: 85 d2 test %edx,%edx 10da0e: 75 1c jne 10da2c <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10da10: 83 ec 08 sub $0x8,%esp 10da13: 68 18 00 00 10 push $0x10000018 10da18: 50 push %eax 10da19: e8 c6 fd ff ff call 10d7e4 <_Thread_Clear_state> 10da1e: a1 58 73 12 00 mov 0x127358,%eax 10da23: 48 dec %eax 10da24: a3 58 73 12 00 mov %eax,0x127358 10da29: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10da2c: c9 leave 10da2d: c3 ret =============================================================================== 0010da30 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10da30: 55 push %ebp 10da31: 89 e5 mov %esp,%ebp 10da33: 57 push %edi 10da34: 56 push %esi 10da35: 53 push %ebx 10da36: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10da39: 8b 1d 18 74 12 00 mov 0x127418,%ebx _ISR_Disable( level ); 10da3f: 9c pushf 10da40: fa cli 10da41: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10da42: 8a 15 28 74 12 00 mov 0x127428,%dl 10da48: 84 d2 test %dl,%dl 10da4a: 0f 84 10 01 00 00 je 10db60 <_Thread_Dispatch+0x130> 10da50: 8d 7d d8 lea -0x28(%ebp),%edi 10da53: e9 d1 00 00 00 jmp 10db29 <_Thread_Dispatch+0xf9> executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 10da58: 50 push %eax 10da59: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10da5a: 83 ec 0c sub $0xc,%esp 10da5d: 8d 45 e0 lea -0x20(%ebp),%eax 10da60: 50 push %eax 10da61: e8 6a 3e 00 00 call 1118d0 <_TOD_Get_uptime> _Timestamp_Subtract( 10da66: 83 c4 0c add $0xc,%esp 10da69: 57 push %edi 10da6a: 8d 45 e0 lea -0x20(%ebp),%eax 10da6d: 50 push %eax 10da6e: 68 20 74 12 00 push $0x127420 10da73: e8 44 0d 00 00 call 10e7bc <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10da78: 5a pop %edx 10da79: 59 pop %ecx 10da7a: 57 push %edi 10da7b: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10da81: 50 push %eax 10da82: e8 f9 0c 00 00 call 10e780 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10da87: 8b 45 e0 mov -0x20(%ebp),%eax 10da8a: 8b 55 e4 mov -0x1c(%ebp),%edx 10da8d: a3 20 74 12 00 mov %eax,0x127420 10da92: 89 15 24 74 12 00 mov %edx,0x127424 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10da98: a1 e4 73 12 00 mov 0x1273e4,%eax 10da9d: 83 c4 10 add $0x10,%esp 10daa0: 85 c0 test %eax,%eax 10daa2: 74 10 je 10dab4 <_Thread_Dispatch+0x84> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10daa4: 8b 10 mov (%eax),%edx 10daa6: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10daac: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10dab2: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10dab4: 83 ec 08 sub $0x8,%esp 10dab7: 56 push %esi 10dab8: 53 push %ebx 10dab9: e8 8e 0f 00 00 call 10ea4c <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10dabe: 59 pop %ecx 10dabf: 58 pop %eax 10dac0: 81 c6 d0 00 00 00 add $0xd0,%esi 10dac6: 56 push %esi 10dac7: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10dacd: 50 push %eax 10dace: e8 6d 12 00 00 call 10ed40 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10dad3: 83 c4 10 add $0x10,%esp 10dad6: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 10dadc: 85 d2 test %edx,%edx 10dade: 74 36 je 10db16 <_Thread_Dispatch+0xe6> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 10dae0: a1 e0 73 12 00 mov 0x1273e0,%eax 10dae5: 39 c3 cmp %eax,%ebx 10dae7: 74 2d je 10db16 <_Thread_Dispatch+0xe6> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10dae9: 85 c0 test %eax,%eax 10daeb: 74 11 je 10dafe <_Thread_Dispatch+0xce> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10daed: 83 ec 0c sub $0xc,%esp 10daf0: 05 e8 00 00 00 add $0xe8,%eax 10daf5: 50 push %eax 10daf6: e8 79 12 00 00 call 10ed74 <_CPU_Context_save_fp> 10dafb: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10dafe: 83 ec 0c sub $0xc,%esp 10db01: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10db07: 50 push %eax 10db08: e8 71 12 00 00 call 10ed7e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10db0d: 89 1d e0 73 12 00 mov %ebx,0x1273e0 10db13: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10db16: 8b 1d 18 74 12 00 mov 0x127418,%ebx _ISR_Disable( level ); 10db1c: 9c pushf 10db1d: fa cli 10db1e: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10db1f: 8a 15 28 74 12 00 mov 0x127428,%dl 10db25: 84 d2 test %dl,%dl 10db27: 74 37 je 10db60 <_Thread_Dispatch+0x130> heir = _Thread_Heir; 10db29: 8b 35 e8 73 12 00 mov 0x1273e8,%esi _Thread_Dispatch_disable_level = 1; 10db2f: c7 05 58 73 12 00 01 movl $0x1,0x127358 10db36: 00 00 00 _Context_Switch_necessary = false; 10db39: c6 05 28 74 12 00 00 movb $0x0,0x127428 _Thread_Executing = heir; 10db40: 89 35 18 74 12 00 mov %esi,0x127418 #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 ) 10db46: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10db4a: 0f 85 08 ff ff ff jne 10da58 <_Thread_Dispatch+0x28> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10db50: 8b 15 24 73 12 00 mov 0x127324,%edx 10db56: 89 56 78 mov %edx,0x78(%esi) 10db59: e9 fa fe ff ff jmp 10da58 <_Thread_Dispatch+0x28> 10db5e: 66 90 xchg %ax,%ax executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10db60: c7 05 58 73 12 00 00 movl $0x0,0x127358 10db67: 00 00 00 _ISR_Enable( level ); 10db6a: 50 push %eax 10db6b: 9d popf if ( _Thread_Do_post_task_switch_extension || 10db6c: a1 fc 73 12 00 mov 0x1273fc,%eax 10db71: 85 c0 test %eax,%eax 10db73: 75 06 jne 10db7b <_Thread_Dispatch+0x14b><== NEVER TAKEN executing->do_post_task_switch_extension ) { 10db75: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10db79: 74 09 je 10db84 <_Thread_Dispatch+0x154> executing->do_post_task_switch_extension = false; 10db7b: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10db7f: e8 e4 e8 ff ff call 10c468 <_API_extensions_Run_postswitch> } } 10db84: 8d 65 f4 lea -0xc(%ebp),%esp 10db87: 5b pop %ebx 10db88: 5e pop %esi 10db89: 5f pop %edi 10db8a: c9 leave 10db8b: c3 ret =============================================================================== 00113c30 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 113c30: 55 push %ebp 113c31: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 113c33: a1 18 74 12 00 mov 0x127418,%eax if ( !_States_Is_ready( executing->current_state ) || 113c38: 8b 50 10 mov 0x10(%eax),%edx 113c3b: 85 d2 test %edx,%edx 113c3d: 75 0e jne 113c4d <_Thread_Evaluate_mode+0x1d><== NEVER TAKEN 113c3f: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 113c45: 74 11 je 113c58 <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 113c47: 80 78 75 00 cmpb $0x0,0x75(%eax) 113c4b: 74 0b je 113c58 <_Thread_Evaluate_mode+0x28><== NEVER TAKEN _Context_Switch_necessary = true; 113c4d: c6 05 28 74 12 00 01 movb $0x1,0x127428 113c54: b0 01 mov $0x1,%al return true; } return false; } 113c56: c9 leave 113c57: c3 ret executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = true; return true; 113c58: 31 c0 xor %eax,%eax } return false; } 113c5a: c9 leave 113c5b: c3 ret =============================================================================== 0010dbb0 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10dbb0: 55 push %ebp 10dbb1: 89 e5 mov %esp,%ebp 10dbb3: 53 push %ebx 10dbb4: 83 ec 04 sub $0x4,%esp 10dbb7: 8b 45 08 mov 0x8(%ebp),%eax 10dbba: 8b 4d 0c mov 0xc(%ebp),%ecx uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 10dbbd: 85 c0 test %eax,%eax 10dbbf: 74 4b je 10dc0c <_Thread_Get+0x5c> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10dbc1: 89 c2 mov %eax,%edx 10dbc3: c1 ea 18 shr $0x18,%edx 10dbc6: 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 ) 10dbc9: 8d 5a ff lea -0x1(%edx),%ebx 10dbcc: 83 fb 03 cmp $0x3,%ebx 10dbcf: 77 2b ja 10dbfc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10dbd1: 89 c3 mov %eax,%ebx 10dbd3: c1 eb 1b shr $0x1b,%ebx 10dbd6: 4b dec %ebx 10dbd7: 75 23 jne 10dbfc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10dbd9: 8b 14 95 2c 73 12 00 mov 0x12732c(,%edx,4),%edx if ( !api_information ) { 10dbe0: 85 d2 test %edx,%edx 10dbe2: 74 18 je 10dbfc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10dbe4: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10dbe7: 85 d2 test %edx,%edx 10dbe9: 74 11 je 10dbfc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10dbeb: 53 push %ebx 10dbec: 51 push %ecx 10dbed: 50 push %eax 10dbee: 52 push %edx 10dbef: e8 50 f7 ff ff call 10d344 <_Objects_Get> 10dbf4: 83 c4 10 add $0x10,%esp done: return tp; } 10dbf7: 8b 5d fc mov -0x4(%ebp),%ebx 10dbfa: c9 leave 10dbfb: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10dbfc: c7 01 01 00 00 00 movl $0x1,(%ecx) 10dc02: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10dc04: 8b 5d fc mov -0x4(%ebp),%ebx 10dc07: c9 leave 10dc08: c3 ret 10dc09: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10dc0c: a1 58 73 12 00 mov 0x127358,%eax 10dc11: 40 inc %eax 10dc12: a3 58 73 12 00 mov %eax,0x127358 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10dc17: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10dc1d: a1 18 74 12 00 mov 0x127418,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10dc22: 8b 5d fc mov -0x4(%ebp),%ebx 10dc25: c9 leave 10dc26: c3 ret =============================================================================== 00113c5c <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 113c5c: 55 push %ebp 113c5d: 89 e5 mov %esp,%ebp 113c5f: 53 push %ebx 113c60: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 113c63: 8b 1d 18 74 12 00 mov 0x127418,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 113c69: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 113c6f: 85 c0 test %eax,%eax 113c71: 74 79 je 113cec <_Thread_Handler+0x90> 113c73: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 113c74: a0 b4 6f 12 00 mov 0x126fb4,%al 113c79: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 113c7c: c6 05 b4 6f 12 00 01 movb $0x1,0x126fb4 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 113c83: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 113c89: 85 d2 test %edx,%edx 113c8b: 74 24 je 113cb1 <_Thread_Handler+0x55> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 113c8d: a1 e0 73 12 00 mov 0x1273e0,%eax 113c92: 39 c3 cmp %eax,%ebx 113c94: 74 1b je 113cb1 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 113c96: 85 c0 test %eax,%eax 113c98: 74 11 je 113cab <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 113c9a: 83 ec 0c sub $0xc,%esp 113c9d: 05 e8 00 00 00 add $0xe8,%eax 113ca2: 50 push %eax 113ca3: e8 cc b0 ff ff call 10ed74 <_CPU_Context_save_fp> 113ca8: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 113cab: 89 1d e0 73 12 00 mov %ebx,0x1273e0 /* * 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 ); 113cb1: 83 ec 0c sub $0xc,%esp 113cb4: 53 push %ebx 113cb5: e8 02 ac ff ff call 10e8bc <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 113cba: e8 cd 9e ff ff call 10db8c <_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) */ { 113cbf: 83 c4 10 add $0x10,%esp 113cc2: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 113cc6: 74 28 je 113cf0 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 113cc8: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 113cce: 85 c0 test %eax,%eax 113cd0: 74 2d je 113cff <_Thread_Handler+0xa3> <== ALWAYS TAKEN * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 113cd2: 83 ec 0c sub $0xc,%esp 113cd5: 53 push %ebx 113cd6: e8 1d ac ff ff call 10e8f8 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 113cdb: 83 c4 0c add $0xc,%esp 113cde: 6a 06 push $0x6 113ce0: 6a 01 push $0x1 113ce2: 6a 00 push $0x0 113ce4: e8 13 91 ff ff call 10cdfc <_Internal_error_Occurred> 113ce9: 8d 76 00 lea 0x0(%esi),%esi * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; _ISR_Set_level(level); 113cec: fb sti 113ced: eb 85 jmp 113c74 <_Thread_Handler+0x18> 113cef: 90 nop * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 113cf0: e8 bb bf 00 00 call 11fcb0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 113cf5: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 113cfb: 85 c0 test %eax,%eax 113cfd: 75 d3 jne 113cd2 <_Thread_Handler+0x76> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 113cff: 83 ec 0c sub $0xc,%esp 113d02: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 113d08: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 113d0e: 89 43 28 mov %eax,0x28(%ebx) 113d11: 83 c4 10 add $0x10,%esp 113d14: eb bc jmp 113cd2 <_Thread_Handler+0x76> =============================================================================== 0010de90 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 10de90: 55 push %ebp 10de91: 89 e5 mov %esp,%ebp 10de93: 53 push %ebx 10de94: 83 ec 04 sub $0x4,%esp uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 10de97: a1 30 32 12 00 mov 0x123230,%eax maximum_extensions = Configuration.maximum_extensions; 10de9c: 8b 15 28 32 12 00 mov 0x123228,%edx #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 10dea2: 8b 1d 44 32 12 00 mov 0x123244,%ebx 10dea8: 85 db test %ebx,%ebx 10deaa: 0f 94 c3 sete %bl 10dead: 8b 0d 40 32 12 00 mov 0x123240,%ecx 10deb3: 85 c9 test %ecx,%ecx 10deb5: 0f 94 c1 sete %cl 10deb8: 38 cb cmp %cl,%bl 10deba: 0f 85 9d 00 00 00 jne 10df5d <_Thread_Handler_initialization+0xcd><== NEVER TAKEN INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 10dec0: c6 05 28 74 12 00 00 movb $0x0,0x127428 _Thread_Executing = NULL; 10dec7: c7 05 18 74 12 00 00 movl $0x0,0x127418 10dece: 00 00 00 _Thread_Heir = NULL; 10ded1: c7 05 e8 73 12 00 00 movl $0x0,0x1273e8 10ded8: 00 00 00 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 10dedb: c7 05 e0 73 12 00 00 movl $0x0,0x1273e0 10dee2: 00 00 00 #endif _Thread_Do_post_task_switch_extension = 0; 10dee5: c7 05 fc 73 12 00 00 movl $0x0,0x1273fc 10deec: 00 00 00 _Thread_Maximum_extensions = maximum_extensions; 10deef: 89 15 f8 73 12 00 mov %edx,0x1273f8 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 10def5: a3 24 73 12 00 mov %eax,0x127324 _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 10defa: 83 ec 0c sub $0xc,%esp 10defd: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 10df04: 8d 44 40 03 lea 0x3(%eax,%eax,2),%eax 10df08: c1 e0 02 shl $0x2,%eax 10df0b: 50 push %eax 10df0c: e8 7b 0d 00 00 call 10ec8c <_Workspace_Allocate_or_fatal_error> 10df11: a3 20 73 12 00 mov %eax,0x127320 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 10df16: 0f b6 1d 14 32 12 00 movzbl 0x123214,%ebx 10df1d: 31 d2 xor %edx,%edx 10df1f: 83 c4 10 add $0x10,%esp 10df22: 66 90 xchg %ax,%ax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10df24: 8d 48 04 lea 0x4(%eax),%ecx 10df27: 89 08 mov %ecx,(%eax) the_chain->permanent_null = NULL; 10df29: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10df30: 89 40 08 mov %eax,0x8(%eax) 10df33: 42 inc %edx 10df34: 83 c0 0c add $0xc,%eax 10df37: 39 da cmp %ebx,%edx 10df39: 76 e9 jbe 10df24 <_Thread_Handler_initialization+0x94> /* * Initialize this class of objects. */ _Objects_Initialize_information( 10df3b: 50 push %eax 10df3c: 6a 08 push $0x8 10df3e: 6a 00 push $0x0 10df40: 68 04 01 00 00 push $0x104 10df45: 6a 01 push $0x1 10df47: 6a 01 push $0x1 10df49: 6a 01 push $0x1 10df4b: 68 e0 74 12 00 push $0x1274e0 10df50: e8 57 f4 ff ff call 10d3ac <_Objects_Initialize_information> 10df55: 83 c4 20 add $0x20,%esp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10df58: 8b 5d fc mov -0x4(%ebp),%ebx 10df5b: c9 leave 10df5c: c3 ret * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 10df5d: 52 push %edx 10df5e: 6a 0f push $0xf 10df60: 6a 01 push $0x1 10df62: 6a 00 push $0x0 10df64: e8 93 ee ff ff call 10cdfc <_Internal_error_Occurred> =============================================================================== 0010dc28 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10dc28: 55 push %ebp 10dc29: 89 e5 mov %esp,%ebp 10dc2b: 57 push %edi 10dc2c: 56 push %esi 10dc2d: 53 push %ebx 10dc2e: 83 ec 24 sub $0x24,%esp 10dc31: 8b 5d 0c mov 0xc(%ebp),%ebx 10dc34: 8b 75 14 mov 0x14(%ebp),%esi 10dc37: 0f b6 7d 18 movzbl 0x18(%ebp),%edi 10dc3b: 8a 45 20 mov 0x20(%ebp),%al 10dc3e: 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; 10dc41: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10dc48: 00 00 00 10dc4b: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10dc52: 00 00 00 10dc55: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10dc5c: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10dc5f: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10dc66: 00 00 00 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10dc69: 56 push %esi 10dc6a: 53 push %ebx 10dc6b: e8 1c 09 00 00 call 10e58c <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10dc70: 83 c4 10 add $0x10,%esp 10dc73: 85 c0 test %eax,%eax 10dc75: 0f 84 8d 01 00 00 je 10de08 <_Thread_Initialize+0x1e0> 10dc7b: 39 c6 cmp %eax,%esi 10dc7d: 0f 87 85 01 00 00 ja 10de08 <_Thread_Initialize+0x1e0><== NEVER TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10dc83: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx 10dc89: 89 93 c4 00 00 00 mov %edx,0xc4(%ebx) the_stack->size = size; 10dc8f: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10dc95: 89 f8 mov %edi,%eax 10dc97: 84 c0 test %al,%al 10dc99: 0f 85 81 01 00 00 jne 10de20 <_Thread_Initialize+0x1f8> 10dc9f: 31 c0 xor %eax,%eax 10dca1: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10dca8: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10dcae: 89 83 c8 00 00 00 mov %eax,0xc8(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10dcb4: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10dcbb: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10dcc2: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10dcc9: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10dcd0: a1 f8 73 12 00 mov 0x1273f8,%eax 10dcd5: 85 c0 test %eax,%eax 10dcd7: 0f 85 5f 01 00 00 jne 10de3c <_Thread_Initialize+0x214> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10dcdd: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10dce4: 00 00 00 10dce7: 31 ff xor %edi,%edi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10dce9: 8a 45 e7 mov -0x19(%ebp),%al 10dcec: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10dcf2: 8b 45 24 mov 0x24(%ebp),%eax 10dcf5: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10dcfb: 8b 45 28 mov 0x28(%ebp),%eax 10dcfe: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10dd04: 8b 45 2c mov 0x2c(%ebp),%eax 10dd07: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10dd0d: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10dd14: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10dd1b: 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; 10dd22: 8b 45 1c mov 0x1c(%ebp),%eax 10dd25: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10dd28: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10dd2e: 83 ec 08 sub $0x8,%esp 10dd31: 50 push %eax 10dd32: 53 push %ebx 10dd33: e8 98 06 00 00 call 10e3d0 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10dd38: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10dd3f: 00 00 00 10dd42: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10dd49: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10dd4c: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10dd50: 8b 45 08 mov 0x8(%ebp),%eax 10dd53: 8b 40 1c mov 0x1c(%eax),%eax 10dd56: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10dd59: 8b 45 30 mov 0x30(%ebp),%eax 10dd5c: 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 ); 10dd5f: 89 1c 24 mov %ebx,(%esp) 10dd62: e8 1d 0c 00 00 call 10e984 <_User_extensions_Thread_create> if ( extension_status ) 10dd67: 83 c4 10 add $0x10,%esp 10dd6a: 84 c0 test %al,%al 10dd6c: 0f 85 a2 00 00 00 jne 10de14 <_Thread_Initialize+0x1ec> return true; failed: if ( the_thread->libc_reent ) 10dd72: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10dd78: 85 c0 test %eax,%eax 10dd7a: 74 0c je 10dd88 <_Thread_Initialize+0x160> _Workspace_Free( the_thread->libc_reent ); 10dd7c: 83 ec 0c sub $0xc,%esp 10dd7f: 50 push %eax 10dd80: e8 4f 0f 00 00 call 10ecd4 <_Workspace_Free> 10dd85: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10dd88: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10dd8e: 85 c0 test %eax,%eax 10dd90: 74 0c je 10dd9e <_Thread_Initialize+0x176> _Workspace_Free( the_thread->API_Extensions[i] ); 10dd92: 83 ec 0c sub $0xc,%esp 10dd95: 50 push %eax 10dd96: e8 39 0f 00 00 call 10ecd4 <_Workspace_Free> 10dd9b: 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] ) 10dd9e: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10dda4: 85 c0 test %eax,%eax 10dda6: 74 0c je 10ddb4 <_Thread_Initialize+0x18c><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10dda8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ddab: 50 push %eax <== NOT EXECUTED 10ddac: e8 23 0f 00 00 call 10ecd4 <_Workspace_Free> <== NOT EXECUTED 10ddb1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 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] ) 10ddb4: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10ddba: 85 c0 test %eax,%eax 10ddbc: 74 0c je 10ddca <_Thread_Initialize+0x1a2><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10ddbe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ddc1: 50 push %eax <== NOT EXECUTED 10ddc2: e8 0d 0f 00 00 call 10ecd4 <_Workspace_Free> <== NOT EXECUTED 10ddc7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10ddca: 85 ff test %edi,%edi 10ddcc: 74 0c je 10ddda <_Thread_Initialize+0x1b2> (void) _Workspace_Free( extensions_area ); 10ddce: 83 ec 0c sub $0xc,%esp 10ddd1: 57 push %edi 10ddd2: e8 fd 0e 00 00 call 10ecd4 <_Workspace_Free> 10ddd7: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10ddda: 8b 45 e0 mov -0x20(%ebp),%eax 10dddd: 85 c0 test %eax,%eax 10dddf: 74 0e je 10ddef <_Thread_Initialize+0x1c7> (void) _Workspace_Free( fp_area ); 10dde1: 83 ec 0c sub $0xc,%esp 10dde4: ff 75 e0 pushl -0x20(%ebp) 10dde7: e8 e8 0e 00 00 call 10ecd4 <_Workspace_Free> 10ddec: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10ddef: 83 ec 0c sub $0xc,%esp 10ddf2: 53 push %ebx 10ddf3: e8 f8 07 00 00 call 10e5f0 <_Thread_Stack_Free> 10ddf8: 31 c0 xor %eax,%eax return false; 10ddfa: 83 c4 10 add $0x10,%esp } 10ddfd: 8d 65 f4 lea -0xc(%ebp),%esp 10de00: 5b pop %ebx 10de01: 5e pop %esi 10de02: 5f pop %edi 10de03: c9 leave 10de04: c3 ret 10de05: 8d 76 00 lea 0x0(%esi),%esi if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 10de08: 31 c0 xor %eax,%eax } 10de0a: 8d 65 f4 lea -0xc(%ebp),%esp 10de0d: 5b pop %ebx 10de0e: 5e pop %esi 10de0f: 5f pop %edi 10de10: c9 leave 10de11: c3 ret 10de12: 66 90 xchg %ax,%ax * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) 10de14: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10de16: 8d 65 f4 lea -0xc(%ebp),%esp 10de19: 5b pop %ebx 10de1a: 5e pop %esi 10de1b: 5f pop %edi 10de1c: c9 leave 10de1d: c3 ret 10de1e: 66 90 xchg %ax,%ax /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10de20: 83 ec 0c sub $0xc,%esp 10de23: 6a 6c push $0x6c 10de25: e8 8e 0e 00 00 call 10ecb8 <_Workspace_Allocate> 10de2a: 89 45 e0 mov %eax,-0x20(%ebp) if ( !fp_area ) 10de2d: 83 c4 10 add $0x10,%esp 10de30: 85 c0 test %eax,%eax 10de32: 74 55 je 10de89 <_Thread_Initialize+0x261> 10de34: 8b 45 e0 mov -0x20(%ebp),%eax 10de37: e9 6c fe ff ff jmp 10dca8 <_Thread_Initialize+0x80> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10de3c: 83 ec 0c sub $0xc,%esp 10de3f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10de46: 50 push %eax 10de47: e8 6c 0e 00 00 call 10ecb8 <_Workspace_Allocate> 10de4c: 89 c7 mov %eax,%edi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10de4e: 83 c4 10 add $0x10,%esp 10de51: 85 c0 test %eax,%eax 10de53: 0f 84 19 ff ff ff je 10dd72 <_Thread_Initialize+0x14a> goto failed; } the_thread->extensions = (void **) extensions_area; 10de59: 89 c1 mov %eax,%ecx 10de5b: 89 83 fc 00 00 00 mov %eax,0xfc(%ebx) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10de61: 8b 35 f8 73 12 00 mov 0x1273f8,%esi 10de67: 31 d2 xor %edx,%edx 10de69: 31 c0 xor %eax,%eax 10de6b: eb 09 jmp 10de76 <_Thread_Initialize+0x24e> 10de6d: 8d 76 00 lea 0x0(%esi),%esi 10de70: 8b 8b fc 00 00 00 mov 0xfc(%ebx),%ecx the_thread->extensions[i] = NULL; 10de76: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10de7d: 40 inc %eax 10de7e: 89 c2 mov %eax,%edx 10de80: 39 c6 cmp %eax,%esi 10de82: 73 ec jae 10de70 <_Thread_Initialize+0x248> 10de84: e9 60 fe ff ff jmp 10dce9 <_Thread_Initialize+0xc1> * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) 10de89: 31 ff xor %edi,%edi 10de8b: e9 e2 fe ff ff jmp 10dd72 <_Thread_Initialize+0x14a> =============================================================================== 00112bf8 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 112bf8: 55 push %ebp 112bf9: 89 e5 mov %esp,%ebp 112bfb: 53 push %ebx 112bfc: 83 ec 10 sub $0x10,%esp 112bff: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 112c02: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; 112c09: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 112c0f: 88 43 75 mov %al,0x75(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 112c12: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 112c18: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 112c1b: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 112c21: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 112c27: 8b 45 0c mov 0xc(%ebp),%eax 112c2a: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 112c30: 8b 45 10 mov 0x10(%ebp),%eax 112c33: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 112c39: 53 push %ebx 112c3a: e8 79 c1 ff ff call 10edb8 <_Thread_queue_Extract_with_proxy> 112c3f: 83 c4 10 add $0x10,%esp 112c42: 84 c0 test %al,%al 112c44: 75 06 jne 112c4c <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 112c46: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 112c4a: 74 28 je 112c74 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 112c4c: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 112c52: 39 43 14 cmp %eax,0x14(%ebx) 112c55: 74 15 je 112c6c <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 112c57: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 112c5a: 89 45 0c mov %eax,0xc(%ebp) 112c5d: 89 5d 08 mov %ebx,0x8(%ebp) } } 112c60: 8b 5d fc mov -0x4(%ebp),%ebx 112c63: c9 leave (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 112c64: e9 1b c3 ff ff jmp 10ef84 <_Thread_Set_priority> 112c69: 8d 76 00 lea 0x0(%esi),%esi } } 112c6c: 8b 5d fc mov -0x4(%ebp),%ebx 112c6f: c9 leave 112c70: c3 ret 112c71: 8d 76 00 lea 0x0(%esi),%esi the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 112c74: 83 ec 0c sub $0xc,%esp 112c77: 8d 43 48 lea 0x48(%ebx),%eax 112c7a: 50 push %eax 112c7b: e8 28 cb ff ff call 10f7a8 <_Watchdog_Remove> 112c80: 83 c4 10 add $0x10,%esp 112c83: eb c7 jmp 112c4c <_Thread_Reset+0x54> =============================================================================== 00111f80 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 111f80: 55 push %ebp 111f81: 89 e5 mov %esp,%ebp 111f83: 56 push %esi 111f84: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 111f85: a1 18 74 12 00 mov 0x127418,%eax ready = executing->ready; 111f8a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 111f90: 9c pushf 111f91: fa cli 111f92: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 111f93: 8b 1a mov (%edx),%ebx 111f95: 3b 5a 08 cmp 0x8(%edx),%ebx 111f98: 74 2c je 111fc6 <_Thread_Reset_timeslice+0x46> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 111f9a: 8b 30 mov (%eax),%esi previous = the_node->previous; 111f9c: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 111f9f: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 111fa2: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 111fa4: 8d 5a 04 lea 0x4(%edx),%ebx 111fa7: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 111fa9: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 111fac: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 111faf: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 111fb1: 89 58 04 mov %ebx,0x4(%eax) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 111fb4: 51 push %ecx 111fb5: 9d popf 111fb6: fa cli if ( _Thread_Is_heir( executing ) ) 111fb7: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 111fbd: 74 0d je 111fcc <_Thread_Reset_timeslice+0x4c><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 111fbf: c6 05 28 74 12 00 01 movb $0x1,0x127428 _ISR_Enable( level ); 111fc6: 51 push %ecx 111fc7: 9d popf } 111fc8: 5b pop %ebx 111fc9: 5e pop %esi 111fca: c9 leave 111fcb: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 111fcc: 8b 02 mov (%edx),%eax 111fce: a3 e8 73 12 00 mov %eax,0x1273e8 111fd3: eb ea jmp 111fbf <_Thread_Reset_timeslice+0x3f> =============================================================================== 00111754 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 111754: 55 push %ebp 111755: 89 e5 mov %esp,%ebp 111757: 53 push %ebx 111758: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 11175b: 9c pushf 11175c: fa cli 11175d: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 11175e: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 111761: f6 c2 02 test $0x2,%dl 111764: 74 6e je 1117d4 <_Thread_Resume+0x80> <== NEVER TAKEN 111766: 83 e2 fd and $0xfffffffd,%edx current_state = 111769: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 11176c: 85 d2 test %edx,%edx 11176e: 75 64 jne 1117d4 <_Thread_Resume+0x80> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 111770: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 111776: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 11177d: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 111780: 66 8b 15 4c ba 12 00 mov 0x12ba4c,%dx 111787: 0b 90 94 00 00 00 or 0x94(%eax),%edx 11178d: 66 89 15 4c ba 12 00 mov %dx,0x12ba4c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 111794: 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); 11179a: 8d 5a 04 lea 0x4(%edx),%ebx 11179d: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 11179f: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 1117a2: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 1117a5: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 1117a7: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 1117aa: 51 push %ecx 1117ab: 9d popf 1117ac: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 1117ad: 8b 50 14 mov 0x14(%eax),%edx 1117b0: 8b 1d 28 ba 12 00 mov 0x12ba28,%ebx 1117b6: 3b 53 14 cmp 0x14(%ebx),%edx 1117b9: 73 19 jae 1117d4 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 1117bb: a3 28 ba 12 00 mov %eax,0x12ba28 if ( _Thread_Executing->is_preemptible || 1117c0: a1 58 ba 12 00 mov 0x12ba58,%eax 1117c5: 80 78 75 00 cmpb $0x0,0x75(%eax) 1117c9: 74 11 je 1117dc <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 1117cb: c6 05 68 ba 12 00 01 movb $0x1,0x12ba68 1117d2: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 1117d4: 51 push %ecx 1117d5: 9d popf } 1117d6: 5b pop %ebx 1117d7: c9 leave 1117d8: c3 ret 1117d9: 8d 76 00 lea 0x0(%esi),%esi _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 1117dc: 85 d2 test %edx,%edx 1117de: 74 eb je 1117cb <_Thread_Resume+0x77> <== NEVER TAKEN 1117e0: eb f2 jmp 1117d4 <_Thread_Resume+0x80> =============================================================================== 0010e43c <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10e43c: 55 push %ebp 10e43d: 89 e5 mov %esp,%ebp 10e43f: 56 push %esi 10e440: 53 push %ebx 10e441: 8b 45 08 mov 0x8(%ebp),%eax 10e444: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10e447: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e44d: 9c pushf 10e44e: fa cli 10e44f: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10e450: 8b 58 10 mov 0x10(%eax),%ebx 10e453: 85 db test %ebx,%ebx 10e455: 75 2d jne 10e484 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10e457: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10e45a: 8b 1a mov (%edx),%ebx 10e45c: 3b 5a 08 cmp 0x8(%edx),%ebx 10e45f: 74 3b je 10e49c <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e461: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10e463: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10e466: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10e469: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10e46b: 51 push %ecx 10e46c: 9d popf 10e46d: fa cli if ( _Thread_Is_heir( the_thread ) ) 10e46e: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 10e474: 74 62 je 10e4d8 <_Thread_Set_state+0x9c> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10e476: 3b 05 18 74 12 00 cmp 0x127418,%eax 10e47c: 74 12 je 10e490 <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10e47e: 51 push %ecx 10e47f: 9d popf } 10e480: 5b pop %ebx 10e481: 5e pop %esi 10e482: c9 leave 10e483: c3 ret Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 10e484: 09 f3 or %esi,%ebx 10e486: 89 58 10 mov %ebx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10e489: 51 push %ecx 10e48a: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10e48b: 5b pop %ebx 10e48c: 5e pop %esi 10e48d: c9 leave 10e48e: c3 ret 10e48f: 90 nop if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10e490: c6 05 28 74 12 00 01 movb $0x1,0x127428 10e497: eb e5 jmp 10e47e <_Thread_Set_state+0x42> 10e499: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e49c: 8d 5a 04 lea 0x4(%edx),%ebx 10e49f: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10e4a1: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10e4a8: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10e4ab: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10e4b1: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10e4b8: 66 21 1a and %bx,(%edx) the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10e4bb: 66 83 3a 00 cmpw $0x0,(%edx) 10e4bf: 75 aa jne 10e46b <_Thread_Set_state+0x2f> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10e4c1: 66 8b 15 0c 74 12 00 mov 0x12740c,%dx 10e4c8: 23 90 98 00 00 00 and 0x98(%eax),%edx 10e4ce: 66 89 15 0c 74 12 00 mov %dx,0x12740c 10e4d5: eb 94 jmp 10e46b <_Thread_Set_state+0x2f> 10e4d7: 90 nop RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10e4d8: 66 8b 35 0c 74 12 00 mov 0x12740c,%si 10e4df: 31 d2 xor %edx,%edx 10e4e1: 89 d3 mov %edx,%ebx 10e4e3: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10e4e7: 0f b7 db movzwl %bx,%ebx 10e4ea: 66 8b b4 1b a0 74 12 mov 0x1274a0(%ebx,%ebx,1),%si 10e4f1: 00 10e4f2: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10e4f6: c1 e3 04 shl $0x4,%ebx 10e4f9: 0f b7 d2 movzwl %dx,%edx 10e4fc: 8d 14 13 lea (%ebx,%edx,1),%edx 10e4ff: 8d 1c 52 lea (%edx,%edx,2),%ebx 10e502: 8b 15 20 73 12 00 mov 0x127320,%edx 10e508: 8b 14 9a mov (%edx,%ebx,4),%edx 10e50b: 89 15 e8 73 12 00 mov %edx,0x1273e8 10e511: e9 60 ff ff ff jmp 10e476 <_Thread_Set_state+0x3a> =============================================================================== 0010e58c <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10e58c: 55 push %ebp 10e58d: 89 e5 mov %esp,%ebp 10e58f: 53 push %ebx 10e590: 83 ec 04 sub $0x4,%esp 10e593: a1 10 32 12 00 mov 0x123210,%eax 10e598: 8b 5d 0c mov 0xc(%ebp),%ebx 10e59b: 39 c3 cmp %eax,%ebx 10e59d: 73 02 jae 10e5a1 <_Thread_Stack_Allocate+0x15> 10e59f: 89 c3 mov %eax,%ebx * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( Configuration.stack_allocate_hook ) { 10e5a1: a1 40 32 12 00 mov 0x123240,%eax 10e5a6: 85 c0 test %eax,%eax 10e5a8: 74 32 je 10e5dc <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10e5aa: 83 ec 0c sub $0xc,%esp 10e5ad: 53 push %ebx 10e5ae: ff d0 call *%eax 10e5b0: 83 c4 10 add $0x10,%esp the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10e5b3: 85 c0 test %eax,%eax 10e5b5: 74 11 je 10e5c8 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e5b7: 8b 55 08 mov 0x8(%ebp),%edx 10e5ba: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10e5c0: 89 d8 mov %ebx,%eax 10e5c2: 8b 5d fc mov -0x4(%ebp),%ebx 10e5c5: c9 leave 10e5c6: c3 ret 10e5c7: 90 nop the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10e5c8: 31 db xor %ebx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e5ca: 8b 55 08 mov 0x8(%ebp),%edx 10e5cd: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10e5d3: 89 d8 mov %ebx,%eax 10e5d5: 8b 5d fc mov -0x4(%ebp),%ebx 10e5d8: c9 leave 10e5d9: c3 ret 10e5da: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e5dc: 83 c3 10 add $0x10,%ebx * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 10e5df: 83 ec 0c sub $0xc,%esp 10e5e2: 53 push %ebx 10e5e3: e8 d0 06 00 00 call 10ecb8 <_Workspace_Allocate> 10e5e8: 83 c4 10 add $0x10,%esp 10e5eb: eb c6 jmp 10e5b3 <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e5f0 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e5f0: 55 push %ebp 10e5f1: 89 e5 mov %esp,%ebp 10e5f3: 83 ec 08 sub $0x8,%esp 10e5f6: 8b 55 08 mov 0x8(%ebp),%edx * 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 ) 10e5f9: a1 44 32 12 00 mov 0x123244,%eax 10e5fe: 85 c0 test %eax,%eax 10e600: 74 0e je 10e610 <_Thread_Stack_Free+0x20> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e602: 8b 92 c4 00 00 00 mov 0xc4(%edx),%edx 10e608: 89 55 08 mov %edx,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e60b: 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 ); 10e60c: ff e0 jmp *%eax 10e60e: 66 90 xchg %ax,%ax else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e610: 8b 82 c4 00 00 00 mov 0xc4(%edx),%eax 10e616: 89 45 08 mov %eax,0x8(%ebp) } 10e619: 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 ); 10e61a: e9 b5 06 00 00 jmp 10ecd4 <_Workspace_Free> =============================================================================== 00111fd8 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 111fd8: 55 push %ebp 111fd9: 89 e5 mov %esp,%ebp 111fdb: 56 push %esi 111fdc: 53 push %ebx 111fdd: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 111fe0: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 111fe6: 9c pushf 111fe7: fa cli 111fe8: 59 pop %ecx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 111fe9: 8b 58 10 mov 0x10(%eax),%ebx 111fec: 85 db test %ebx,%ebx 111fee: 75 34 jne 112024 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 111ff0: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 111ff7: 8b 1a mov (%edx),%ebx 111ff9: 3b 5a 08 cmp 0x8(%edx),%ebx 111ffc: 74 3e je 11203c <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 111ffe: 8b 18 mov (%eax),%ebx previous = the_node->previous; 112000: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 112003: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 112006: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 112008: 51 push %ecx 112009: 9d popf 11200a: fa cli if ( _Thread_Is_heir( the_thread ) ) 11200b: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 112011: 74 65 je 112078 <_Thread_Suspend+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 112013: 3b 05 18 74 12 00 cmp 0x127418,%eax 112019: 74 15 je 112030 <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 11201b: 51 push %ecx 11201c: 9d popf } 11201d: 5b pop %ebx 11201e: 5e pop %esi 11201f: c9 leave 112020: c3 ret 112021: 8d 76 00 lea 0x0(%esi),%esi _ISR_Disable( level ); #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 112024: 83 cb 02 or $0x2,%ebx 112027: 89 58 10 mov %ebx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 11202a: 51 push %ecx 11202b: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 11202c: 5b pop %ebx 11202d: 5e pop %esi 11202e: c9 leave 11202f: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 112030: c6 05 28 74 12 00 01 movb $0x1,0x127428 112037: eb e2 jmp 11201b <_Thread_Suspend+0x43> 112039: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11203c: 8d 5a 04 lea 0x4(%edx),%ebx 11203f: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 112041: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 112048: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 11204b: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 112051: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 112058: 66 21 1a and %bx,(%edx) the_thread->current_state = STATES_SUSPENDED; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 11205b: 66 83 3a 00 cmpw $0x0,(%edx) 11205f: 75 a7 jne 112008 <_Thread_Suspend+0x30> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 112061: 66 8b 15 0c 74 12 00 mov 0x12740c,%dx 112068: 23 90 98 00 00 00 and 0x98(%eax),%edx 11206e: 66 89 15 0c 74 12 00 mov %dx,0x12740c 112075: eb 91 jmp 112008 <_Thread_Suspend+0x30> 112077: 90 nop RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 112078: 66 8b 35 0c 74 12 00 mov 0x12740c,%si 11207f: 31 d2 xor %edx,%edx 112081: 89 d3 mov %edx,%ebx 112083: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 112087: 0f b7 db movzwl %bx,%ebx 11208a: 66 8b b4 1b a0 74 12 mov 0x1274a0(%ebx,%ebx,1),%si 112091: 00 112092: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 112096: c1 e3 04 shl $0x4,%ebx 112099: 0f b7 d2 movzwl %dx,%edx 11209c: 8d 14 13 lea (%ebx,%edx,1),%edx 11209f: 8d 1c 52 lea (%edx,%edx,2),%ebx 1120a2: 8b 15 20 73 12 00 mov 0x127320,%edx 1120a8: 8b 14 9a mov (%edx,%ebx,4),%edx 1120ab: 89 15 e8 73 12 00 mov %edx,0x1273e8 1120b1: e9 5d ff ff ff jmp 112013 <_Thread_Suspend+0x3b> =============================================================================== 0010e71c <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e71c: 55 push %ebp 10e71d: 89 e5 mov %esp,%ebp 10e71f: 56 push %esi 10e720: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e721: a1 18 74 12 00 mov 0x127418,%eax ready = executing->ready; 10e726: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e72c: 9c pushf 10e72d: fa cli 10e72e: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10e72f: 8b 1a mov (%edx),%ebx 10e731: 3b 5a 08 cmp 0x8(%edx),%ebx 10e734: 74 3e je 10e774 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e736: 8b 30 mov (%eax),%esi previous = the_node->previous; 10e738: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10e73b: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10e73e: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10e740: 8d 5a 04 lea 0x4(%edx),%ebx 10e743: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10e745: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10e748: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e74b: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10e74d: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e750: 51 push %ecx 10e751: 9d popf 10e752: fa cli if ( _Thread_Is_heir( executing ) ) 10e753: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 10e759: 74 0d je 10e768 <_Thread_Yield_processor+0x4c><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 10e75b: c6 05 28 74 12 00 01 movb $0x1,0x127428 _ISR_Enable( level ); 10e762: 51 push %ecx 10e763: 9d popf } 10e764: 5b pop %ebx 10e765: 5e pop %esi 10e766: c9 leave 10e767: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e768: 8b 02 mov (%edx),%eax 10e76a: a3 e8 73 12 00 mov %eax,0x1273e8 10e76f: eb ea jmp 10e75b <_Thread_Yield_processor+0x3f> 10e771: 8d 76 00 lea 0x0(%esi),%esi _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e774: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 10e77a: 75 df jne 10e75b <_Thread_Yield_processor+0x3f><== NEVER TAKEN 10e77c: eb e4 jmp 10e762 <_Thread_Yield_processor+0x46> =============================================================================== 0010dfb8 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10dfb8: 55 push %ebp 10dfb9: 89 e5 mov %esp,%ebp 10dfbb: 57 push %edi 10dfbc: 56 push %esi 10dfbd: 53 push %ebx 10dfbe: 83 ec 1c sub $0x1c,%esp 10dfc1: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10dfc4: 9c pushf 10dfc5: fa cli 10dfc6: 58 pop %eax 10dfc7: 89 f2 mov %esi,%edx 10dfc9: 31 c9 xor %ecx,%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dfcb: 8d 5a 04 lea 0x4(%edx),%ebx 10dfce: 39 1a cmp %ebx,(%edx) 10dfd0: 75 1a jne 10dfec <_Thread_queue_Dequeue_priority+0x34> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10dfd2: 41 inc %ecx 10dfd3: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10dfd6: 83 f9 04 cmp $0x4,%ecx 10dfd9: 75 f0 jne 10dfcb <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10dfdb: 50 push %eax 10dfdc: 9d popf 10dfdd: 31 db xor %ebx,%ebx #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10dfdf: 89 d8 mov %ebx,%eax 10dfe1: 8d 65 f4 lea -0xc(%ebp),%esp 10dfe4: 5b pop %ebx 10dfe5: 5e pop %esi 10dfe6: 5f pop %edi 10dfe7: c9 leave 10dfe8: c3 ret 10dfe9: 8d 76 00 lea 0x0(%esi),%esi _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 10dfec: 8d 14 49 lea (%ecx,%ecx,2),%edx 10dfef: 8b 1c 96 mov (%esi,%edx,4),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10dff2: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10dff9: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10dffc: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10dffe: 8b 73 04 mov 0x4(%ebx),%esi 10e001: 8d 7b 3c lea 0x3c(%ebx),%edi 10e004: 39 fa cmp %edi,%edx 10e006: 74 76 je 10e07e <_Thread_queue_Dequeue_priority+0xc6> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10e008: 8b 7b 40 mov 0x40(%ebx),%edi 10e00b: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10e00e: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10e010: 89 16 mov %edx,(%esi) next_node->previous = new_first_node; 10e012: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10e015: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10e017: 89 72 04 mov %esi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10e01a: 8b 4b 38 mov 0x38(%ebx),%ecx 10e01d: 3b 4b 40 cmp 0x40(%ebx),%ecx 10e020: 74 14 je 10e036 <_Thread_queue_Dequeue_priority+0x7e> /* > two threads on 2-n */ new_second_node->previous = 10e022: 8d 4a 38 lea 0x38(%edx),%ecx 10e025: 89 4f 04 mov %ecx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10e028: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10e02b: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e02e: 89 4a 40 mov %ecx,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10e031: 83 c2 3c add $0x3c,%edx 10e034: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10e036: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10e03a: 74 18 je 10e054 <_Thread_queue_Dequeue_priority+0x9c> _ISR_Enable( level ); 10e03c: 50 push %eax 10e03d: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10e03e: 83 ec 08 sub $0x8,%esp 10e041: 68 f8 ff 03 10 push $0x1003fff8 10e046: 53 push %ebx 10e047: e8 98 f7 ff ff call 10d7e4 <_Thread_Clear_state> 10e04c: 83 c4 10 add $0x10,%esp 10e04f: eb 8e jmp 10dfdf <_Thread_queue_Dequeue_priority+0x27> 10e051: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10e054: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10e05b: 50 push %eax 10e05c: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10e05d: 83 ec 0c sub $0xc,%esp 10e060: 8d 43 48 lea 0x48(%ebx),%eax 10e063: 50 push %eax 10e064: e8 4b 0b 00 00 call 10ebb4 <_Watchdog_Remove> 10e069: 58 pop %eax 10e06a: 5a pop %edx 10e06b: 68 f8 ff 03 10 push $0x1003fff8 10e070: 53 push %ebx 10e071: e8 6e f7 ff ff call 10d7e4 <_Thread_Clear_state> 10e076: 83 c4 10 add $0x10,%esp 10e079: e9 61 ff ff ff jmp 10dfdf <_Thread_queue_Dequeue_priority+0x27> new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10e07e: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 10e080: 89 71 04 mov %esi,0x4(%ecx) 10e083: eb b1 jmp 10e036 <_Thread_queue_Dequeue_priority+0x7e> =============================================================================== 00111d70 <_Thread_queue_Enqueue_fifo>: Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 111d70: 55 push %ebp 111d71: 89 e5 mov %esp,%ebp 111d73: 56 push %esi 111d74: 53 push %ebx 111d75: 8b 55 08 mov 0x8(%ebp),%edx 111d78: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 111d7b: 9c pushf 111d7c: fa cli 111d7d: 59 pop %ecx sync_state = the_thread_queue->sync_state; 111d7e: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 111d81: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 111d88: 83 f8 01 cmp $0x1,%eax 111d8b: 74 0b je 111d98 <_Thread_queue_Enqueue_fifo+0x28> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 111d8d: 8b 55 10 mov 0x10(%ebp),%edx 111d90: 89 0a mov %ecx,(%edx) return sync_state; } 111d92: 5b pop %ebx 111d93: 5e pop %esi 111d94: c9 leave 111d95: c3 ret 111d96: 66 90 xchg %ax,%ax Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 111d98: 8d 72 04 lea 0x4(%edx),%esi 111d9b: 89 33 mov %esi,(%ebx) old_last_node = the_chain->last; 111d9d: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 111da0: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 111da3: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 111da5: 89 73 04 mov %esi,0x4(%ebx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 111da8: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 111dab: 51 push %ecx 111dac: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 111dad: 5b pop %ebx 111dae: 5e pop %esi 111daf: c9 leave 111db0: c3 ret =============================================================================== 0010e120 <_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 ) { 10e120: 55 push %ebp 10e121: 89 e5 mov %esp,%ebp 10e123: 57 push %edi 10e124: 56 push %esi 10e125: 53 push %ebx 10e126: 83 ec 08 sub $0x8,%esp 10e129: 8b 7d 0c mov 0xc(%ebp),%edi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e12c: 8d 47 3c lea 0x3c(%edi),%eax 10e12f: 89 47 38 mov %eax,0x38(%edi) the_chain->permanent_null = NULL; 10e132: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) the_chain->last = _Chain_Head(the_chain); 10e139: 8d 47 38 lea 0x38(%edi),%eax 10e13c: 89 47 40 mov %eax,0x40(%edi) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10e13f: 8b 57 14 mov 0x14(%edi),%edx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10e142: 89 d0 mov %edx,%eax 10e144: c1 e8 06 shr $0x6,%eax 10e147: 8d 04 40 lea (%eax,%eax,2),%eax 10e14a: 8b 4d 08 mov 0x8(%ebp),%ecx 10e14d: 8d 34 81 lea (%ecx,%eax,4),%esi block_state = the_thread_queue->state; 10e150: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10e153: f6 c2 20 test $0x20,%dl 10e156: 75 60 jne 10e1b8 <_Thread_queue_Enqueue_priority+0x98> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e158: 8d 46 04 lea 0x4(%esi),%eax 10e15b: 89 75 f0 mov %esi,-0x10(%ebp) 10e15e: 89 7d ec mov %edi,-0x14(%ebp) 10e161: 89 c7 mov %eax,%edi goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10e163: 9c pushf 10e164: fa cli 10e165: 5e pop %esi search_thread = (Thread_Control *) header->first; 10e166: 8b 4d f0 mov -0x10(%ebp),%ecx 10e169: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e16b: 39 f8 cmp %edi,%eax 10e16d: 75 17 jne 10e186 <_Thread_queue_Enqueue_priority+0x66> 10e16f: e9 09 01 00 00 jmp 10e27d <_Thread_queue_Enqueue_priority+0x15d> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10e174: 56 push %esi 10e175: 9d popf 10e176: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10e177: 85 58 10 test %ebx,0x10(%eax) 10e17a: 0f 84 a8 00 00 00 je 10e228 <_Thread_queue_Enqueue_priority+0x108><== NEVER TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10e180: 8b 00 mov (%eax),%eax restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e182: 39 f8 cmp %edi,%eax 10e184: 74 07 je 10e18d <_Thread_queue_Enqueue_priority+0x6d> search_priority = search_thread->current_priority; 10e186: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10e189: 39 ca cmp %ecx,%edx 10e18b: 77 e7 ja 10e174 <_Thread_queue_Enqueue_priority+0x54> 10e18d: 89 4d f0 mov %ecx,-0x10(%ebp) 10e190: 8b 7d ec mov -0x14(%ebp),%edi restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e193: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10e195: 8b 4d 08 mov 0x8(%ebp),%ecx 10e198: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10e19c: 0f 84 8e 00 00 00 je 10e230 <_Thread_queue_Enqueue_priority+0x110> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 10e1a2: 8b 45 10 mov 0x10(%ebp),%eax 10e1a5: 89 18 mov %ebx,(%eax) return the_thread_queue->sync_state; 10e1a7: 8b 55 08 mov 0x8(%ebp),%edx 10e1aa: 8b 42 30 mov 0x30(%edx),%eax } 10e1ad: 83 c4 08 add $0x8,%esp 10e1b0: 5b pop %ebx 10e1b1: 5e pop %esi 10e1b2: 5f pop %edi 10e1b3: c9 leave 10e1b4: c3 ret 10e1b5: 8d 76 00 lea 0x0(%esi),%esi 10e1b8: 89 7d f0 mov %edi,-0x10(%ebp) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10e1bb: 0f b6 0d 14 32 12 00 movzbl 0x123214,%ecx 10e1c2: 41 inc %ecx _ISR_Disable( level ); 10e1c3: 9c pushf 10e1c4: fa cli 10e1c5: 5f pop %edi search_thread = (Thread_Control *) header->last; 10e1c6: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10e1c9: 39 f0 cmp %esi,%eax 10e1cb: 75 12 jne 10e1df <_Thread_queue_Enqueue_priority+0xbf> 10e1cd: eb 17 jmp 10e1e6 <_Thread_queue_Enqueue_priority+0xc6> 10e1cf: 90 nop break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10e1d0: 57 push %edi 10e1d1: 9d popf 10e1d2: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10e1d3: 85 58 10 test %ebx,0x10(%eax) 10e1d6: 74 4c je 10e224 <_Thread_queue_Enqueue_priority+0x104> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 10e1d8: 8b 40 04 mov 0x4(%eax),%eax restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10e1db: 39 f0 cmp %esi,%eax 10e1dd: 74 07 je 10e1e6 <_Thread_queue_Enqueue_priority+0xc6> search_priority = search_thread->current_priority; 10e1df: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10e1e2: 39 ca cmp %ecx,%edx 10e1e4: 72 ea jb 10e1d0 <_Thread_queue_Enqueue_priority+0xb0> 10e1e6: 89 fe mov %edi,%esi 10e1e8: 89 4d ec mov %ecx,-0x14(%ebp) 10e1eb: 8b 7d f0 mov -0x10(%ebp),%edi restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10e1ee: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10e1f0: 8b 4d 08 mov 0x8(%ebp),%ecx 10e1f3: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10e1f7: 75 a9 jne 10e1a2 <_Thread_queue_Enqueue_priority+0x82> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10e1f9: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10e200: 3b 55 ec cmp -0x14(%ebp),%edx 10e203: 74 56 je 10e25b <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10e205: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10e207: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10e209: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10e20c: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10e20e: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10e211: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10e214: 56 push %esi 10e215: 9d popf 10e216: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10e21b: 83 c4 08 add $0x8,%esp 10e21e: 5b pop %ebx 10e21f: 5e pop %esi 10e220: 5f pop %edi 10e221: c9 leave 10e222: c3 ret 10e223: 90 nop if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10e224: 57 push %edi 10e225: 9d popf goto restart_reverse_search; 10e226: eb 93 jmp 10e1bb <_Thread_queue_Enqueue_priority+0x9b> if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10e228: 56 push %esi <== NOT EXECUTED 10e229: 9d popf <== NOT EXECUTED goto restart_forward_search; 10e22a: e9 34 ff ff ff jmp 10e163 <_Thread_queue_Enqueue_priority+0x43><== NOT EXECUTED 10e22f: 90 nop <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10e230: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10e237: 3b 55 f0 cmp -0x10(%ebp),%edx 10e23a: 74 1f je 10e25b <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10e23c: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10e23f: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10e241: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10e244: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10e246: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10e249: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10e24c: 56 push %esi 10e24d: 9d popf 10e24e: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10e253: 83 c4 08 add $0x8,%esp 10e256: 5b pop %ebx 10e257: 5e pop %esi 10e258: 5f pop %edi 10e259: c9 leave 10e25a: c3 ret 10e25b: 83 c0 3c add $0x3c,%eax _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10e25e: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10e261: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10e263: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10e266: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10e268: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10e26b: 8b 45 08 mov 0x8(%ebp),%eax 10e26e: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10e271: 53 push %ebx 10e272: 9d popf 10e273: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10e278: e9 30 ff ff ff jmp 10e1ad <_Thread_queue_Enqueue_priority+0x8d> 10e27d: 8b 7d ec mov -0x14(%ebp),%edi restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e280: 89 f3 mov %esi,%ebx 10e282: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) 10e289: e9 07 ff ff ff jmp 10e195 <_Thread_queue_Enqueue_priority+0x75> =============================================================================== 00111db4 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 111db4: 55 push %ebp 111db5: 89 e5 mov %esp,%ebp 111db7: 83 ec 08 sub $0x8,%esp 111dba: 8b 45 08 mov 0x8(%ebp),%eax 111dbd: 8b 55 0c mov 0xc(%ebp),%edx /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 111dc0: 83 78 34 01 cmpl $0x1,0x34(%eax) 111dc4: 74 0e je 111dd4 <_Thread_queue_Extract+0x20> _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 111dc6: 89 55 0c mov %edx,0xc(%ebp) 111dc9: 89 45 08 mov %eax,0x8(%ebp) } 111dcc: c9 leave * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 111dcd: e9 46 1f 00 00 jmp 113d18 <_Thread_queue_Extract_fifo> 111dd2: 66 90 xchg %ax,%ax /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 111dd4: 51 push %ecx 111dd5: 6a 00 push $0x0 111dd7: 52 push %edx 111dd8: 50 push %eax 111dd9: e8 06 00 00 00 call 111de4 <_Thread_queue_Extract_priority_helper> 111dde: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 111de1: c9 leave 111de2: c3 ret =============================================================================== 00113d18 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 113d18: 55 push %ebp 113d19: 89 e5 mov %esp,%ebp 113d1b: 53 push %ebx 113d1c: 83 ec 04 sub $0x4,%esp 113d1f: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 113d22: 9c pushf 113d23: fa cli 113d24: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 113d25: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 113d2c: 74 2e je 113d5c <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 113d2e: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 113d30: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 113d33: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 113d36: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 113d38: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 113d3f: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 113d43: 74 1f je 113d64 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 113d45: 50 push %eax 113d46: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 113d47: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 113d4e: 89 5d 08 mov %ebx,0x8(%ebp) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 113d51: 8b 5d fc mov -0x4(%ebp),%ebx 113d54: c9 leave 113d55: e9 8a 9a ff ff jmp 10d7e4 <_Thread_Clear_state> 113d5a: 66 90 xchg %ax,%ax ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 113d5c: 50 push %eax 113d5d: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 113d5e: 8b 5d fc mov -0x4(%ebp),%ebx 113d61: c9 leave 113d62: c3 ret 113d63: 90 nop 113d64: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 113d6b: 50 push %eax 113d6c: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 113d6d: 83 ec 0c sub $0xc,%esp 113d70: 8d 43 48 lea 0x48(%ebx),%eax 113d73: 50 push %eax 113d74: e8 3b ae ff ff call 10ebb4 <_Watchdog_Remove> 113d79: 83 c4 10 add $0x10,%esp 113d7c: eb c9 jmp 113d47 <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 00111de4 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 111de4: 55 push %ebp 111de5: 89 e5 mov %esp,%ebp 111de7: 57 push %edi 111de8: 56 push %esi 111de9: 53 push %ebx 111dea: 83 ec 1c sub $0x1c,%esp 111ded: 8b 5d 0c mov 0xc(%ebp),%ebx 111df0: 8a 45 10 mov 0x10(%ebp),%al 111df3: 88 45 e3 mov %al,-0x1d(%ebp) Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 111df6: 9c pushf 111df7: fa cli 111df8: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 111dfb: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 111e02: 74 60 je 111e64 <_Thread_queue_Extract_priority_helper+0x80> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 111e04: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 111e06: 8b 4b 04 mov 0x4(%ebx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 111e09: 8b 43 38 mov 0x38(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 111e0c: 8d 73 3c lea 0x3c(%ebx),%esi 111e0f: 39 f0 cmp %esi,%eax 111e11: 74 5d je 111e70 <_Thread_queue_Extract_priority_helper+0x8c> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 111e13: 8b 7b 40 mov 0x40(%ebx),%edi new_second_node = new_first_node->next; 111e16: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 111e18: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 111e1a: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 111e1d: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 111e1f: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 111e22: 8b 53 38 mov 0x38(%ebx),%edx 111e25: 3b 53 40 cmp 0x40(%ebx),%edx 111e28: 74 11 je 111e3b <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ new_second_node->previous = 111e2a: 8d 50 38 lea 0x38(%eax),%edx 111e2d: 89 56 04 mov %edx,0x4(%esi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 111e30: 89 70 38 mov %esi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 111e33: 89 78 40 mov %edi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 111e36: 83 c0 3c add $0x3c,%eax 111e39: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 111e3b: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 111e3f: 75 23 jne 111e64 <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111e41: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111e45: 74 31 je 111e78 <_Thread_queue_Extract_priority_helper+0x94> _ISR_Enable( level ); 111e47: ff 75 e4 pushl -0x1c(%ebp) 111e4a: 9d popf 111e4b: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 111e52: 89 5d 08 mov %ebx,0x8(%ebp) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111e55: 8d 65 f4 lea -0xc(%ebp),%esp 111e58: 5b pop %ebx 111e59: 5e pop %esi 111e5a: 5f pop %edi 111e5b: c9 leave 111e5c: e9 83 b9 ff ff jmp 10d7e4 <_Thread_Clear_state> 111e61: 8d 76 00 lea 0x0(%esi),%esi /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 111e64: ff 75 e4 pushl -0x1c(%ebp) 111e67: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111e68: 8d 65 f4 lea -0xc(%ebp),%esp 111e6b: 5b pop %ebx 111e6c: 5e pop %esi 111e6d: 5f pop %edi 111e6e: c9 leave 111e6f: c3 ret new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 111e70: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 111e72: 89 4a 04 mov %ecx,0x4(%edx) 111e75: eb c4 jmp 111e3b <_Thread_queue_Extract_priority_helper+0x57> 111e77: 90 nop 111e78: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 111e7f: ff 75 e4 pushl -0x1c(%ebp) 111e82: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 111e83: 83 ec 0c sub $0xc,%esp 111e86: 8d 43 48 lea 0x48(%ebx),%eax 111e89: 50 push %eax 111e8a: e8 25 cd ff ff call 10ebb4 <_Watchdog_Remove> 111e8f: 83 c4 10 add $0x10,%esp 111e92: eb b7 jmp 111e4b <_Thread_queue_Extract_priority_helper+0x67> =============================================================================== 0010e290 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10e290: 55 push %ebp 10e291: 89 e5 mov %esp,%ebp 10e293: 83 ec 08 sub $0x8,%esp 10e296: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; 10e299: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10e2a0: 75 06 jne 10e2a8 <_Thread_queue_Extract_with_proxy+0x18> 10e2a2: 31 c0 xor %eax,%eax _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; } 10e2a4: c9 leave 10e2a5: c3 ret 10e2a6: 66 90 xchg %ax,%ax if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10e2a8: 83 ec 08 sub $0x8,%esp 10e2ab: 50 push %eax 10e2ac: ff 70 44 pushl 0x44(%eax) 10e2af: e8 00 3b 00 00 call 111db4 <_Thread_queue_Extract> 10e2b4: b0 01 mov $0x1,%al return true; 10e2b6: 83 c4 10 add $0x10,%esp } return false; } 10e2b9: c9 leave 10e2ba: c3 ret =============================================================================== 00120588 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 120588: 55 push %ebp 120589: 89 e5 mov %esp,%ebp 12058b: 83 ec 08 sub $0x8,%esp 12058e: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 120591: 83 78 34 01 cmpl $0x1,0x34(%eax) 120595: 74 0d je 1205a4 <_Thread_queue_First+0x1c> 120597: ba 9c 21 12 00 mov $0x12219c,%edx first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 12059c: 89 45 08 mov %eax,0x8(%ebp) } 12059f: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 1205a0: ff e2 jmp *%edx 1205a2: 66 90 xchg %ax,%ax Thread_queue_Control *the_thread_queue ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 1205a4: ba b0 05 12 00 mov $0x1205b0,%edx first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 1205a9: 89 45 08 mov %eax,0x8(%ebp) } 1205ac: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 1205ad: ff e2 jmp *%edx =============================================================================== 0012219c <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 12219c: 55 push %ebp 12219d: 89 e5 mov %esp,%ebp 12219f: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1221a2: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1221a4: 83 c2 04 add $0x4,%edx 1221a7: 39 d0 cmp %edx,%eax 1221a9: 74 05 je 1221b0 <_Thread_queue_First_fifo+0x14> if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 1221ab: c9 leave 1221ac: c3 ret 1221ad: 8d 76 00 lea 0x0(%esi),%esi 1221b0: 31 c0 xor %eax,%eax 1221b2: c9 leave 1221b3: c3 ret =============================================================================== 0010e2bc <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10e2bc: 55 push %ebp 10e2bd: 89 e5 mov %esp,%ebp 10e2bf: 56 push %esi 10e2c0: 53 push %ebx 10e2c1: 8b 5d 08 mov 0x8(%ebp),%ebx 10e2c4: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10e2c7: eb 06 jmp 10e2cf <_Thread_queue_Flush+0x13> 10e2c9: 8d 76 00 lea 0x0(%esi),%esi #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; 10e2cc: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10e2cf: 83 ec 0c sub $0xc,%esp 10e2d2: 53 push %ebx 10e2d3: e8 94 fc ff ff call 10df6c <_Thread_queue_Dequeue> 10e2d8: 83 c4 10 add $0x10,%esp 10e2db: 85 c0 test %eax,%eax 10e2dd: 75 ed jne 10e2cc <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10e2df: 8d 65 f8 lea -0x8(%ebp),%esp 10e2e2: 5b pop %ebx 10e2e3: 5e pop %esi 10e2e4: c9 leave 10e2e5: c3 ret =============================================================================== 00111e94 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 111e94: 55 push %ebp 111e95: 89 e5 mov %esp,%ebp 111e97: 83 ec 08 sub $0x8,%esp 111e9a: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 111e9d: 8b 50 44 mov 0x44(%eax),%edx * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 111ea0: 8b 4a 30 mov 0x30(%edx),%ecx 111ea3: 85 c9 test %ecx,%ecx 111ea5: 74 08 je 111eaf <_Thread_queue_Process_timeout+0x1b> 111ea7: 3b 05 18 74 12 00 cmp 0x127418,%eax 111ead: 74 19 je 111ec8 <_Thread_queue_Process_timeout+0x34> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 111eaf: 8b 52 3c mov 0x3c(%edx),%edx 111eb2: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 111eb5: 83 ec 08 sub $0x8,%esp 111eb8: 50 push %eax 111eb9: ff 70 44 pushl 0x44(%eax) 111ebc: e8 f3 fe ff ff call 111db4 <_Thread_queue_Extract> 111ec1: 83 c4 10 add $0x10,%esp } } 111ec4: c9 leave 111ec5: c3 ret 111ec6: 66 90 xchg %ax,%ax * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 111ec8: 83 f9 03 cmp $0x3,%ecx 111ecb: 74 f7 je 111ec4 <_Thread_queue_Process_timeout+0x30> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 111ecd: 8b 4a 3c mov 0x3c(%edx),%ecx 111ed0: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 111ed3: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 111eda: c9 leave 111edb: c3 ret =============================================================================== 0010e338 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10e338: 55 push %ebp 10e339: 89 e5 mov %esp,%ebp 10e33b: 57 push %edi 10e33c: 56 push %esi 10e33d: 53 push %ebx 10e33e: 83 ec 1c sub $0x1c,%esp 10e341: 8b 75 08 mov 0x8(%ebp),%esi 10e344: 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 ) 10e347: 85 f6 test %esi,%esi 10e349: 74 06 je 10e351 <_Thread_queue_Requeue+0x19><== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10e34b: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10e34f: 74 0b je 10e35c <_Thread_queue_Requeue+0x24><== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 10e351: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e354: 5b pop %ebx <== NOT EXECUTED 10e355: 5e pop %esi <== NOT EXECUTED 10e356: 5f pop %edi <== NOT EXECUTED 10e357: c9 leave <== NOT EXECUTED 10e358: c3 ret <== NOT EXECUTED 10e359: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10e35c: 9c pushf 10e35d: fa cli 10e35e: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10e35f: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10e366: 75 0c jne 10e374 <_Thread_queue_Requeue+0x3c><== ALWAYS TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 10e368: 53 push %ebx 10e369: 9d popf } } 10e36a: 8d 65 f4 lea -0xc(%ebp),%esp 10e36d: 5b pop %ebx 10e36e: 5e pop %esi 10e36f: 5f pop %edi 10e370: c9 leave 10e371: c3 ret 10e372: 66 90 xchg %ax,%ax 10e374: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10e37b: 50 push %eax 10e37c: 6a 01 push $0x1 10e37e: 57 push %edi 10e37f: 56 push %esi 10e380: e8 5f 3a 00 00 call 111de4 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10e385: 83 c4 0c add $0xc,%esp 10e388: 8d 45 e4 lea -0x1c(%ebp),%eax 10e38b: 50 push %eax 10e38c: 57 push %edi 10e38d: 56 push %esi 10e38e: e8 8d fd ff ff call 10e120 <_Thread_queue_Enqueue_priority> 10e393: 83 c4 10 add $0x10,%esp 10e396: eb d0 jmp 10e368 <_Thread_queue_Requeue+0x30> =============================================================================== 0010e398 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10e398: 55 push %ebp 10e399: 89 e5 mov %esp,%ebp 10e39b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e39e: 8d 45 f4 lea -0xc(%ebp),%eax 10e3a1: 50 push %eax 10e3a2: ff 75 08 pushl 0x8(%ebp) 10e3a5: e8 06 f8 ff ff call 10dbb0 <_Thread_Get> switch ( location ) { 10e3aa: 83 c4 10 add $0x10,%esp 10e3ad: 8b 55 f4 mov -0xc(%ebp),%edx 10e3b0: 85 d2 test %edx,%edx 10e3b2: 75 17 jne 10e3cb <_Thread_queue_Timeout+0x33><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10e3b4: 83 ec 0c sub $0xc,%esp 10e3b7: 50 push %eax 10e3b8: e8 d7 3a 00 00 call 111e94 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e3bd: a1 58 73 12 00 mov 0x127358,%eax 10e3c2: 48 dec %eax 10e3c3: a3 58 73 12 00 mov %eax,0x127358 10e3c8: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e3cb: c9 leave 10e3cc: 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 =============================================================================== 00119828 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 119828: 55 push %ebp 119829: 89 e5 mov %esp,%ebp 11982b: 57 push %edi 11982c: 56 push %esi 11982d: 53 push %ebx 11982e: 83 ec 4c sub $0x4c,%esp 119831: 8b 5d 08 mov 0x8(%ebp),%ebx 119834: 8d 45 e0 lea -0x20(%ebp),%eax 119837: 89 45 b4 mov %eax,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11983a: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 11983d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 119844: 8d 4d dc lea -0x24(%ebp),%ecx 119847: 89 4d e4 mov %ecx,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11984a: 8d 7d d0 lea -0x30(%ebp),%edi 11984d: 8d 45 d4 lea -0x2c(%ebp),%eax 119850: 89 45 b0 mov %eax,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 119853: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 119856: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 11985d: 89 7d d8 mov %edi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 119860: 8d 73 30 lea 0x30(%ebx),%esi /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 119863: 8d 4b 68 lea 0x68(%ebx),%ecx 119866: 89 4d c4 mov %ecx,-0x3c(%ebp) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 119869: 8d 43 08 lea 0x8(%ebx),%eax 11986c: 89 45 bc mov %eax,-0x44(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 11986f: 8d 53 40 lea 0x40(%ebx),%edx 119872: 89 55 c0 mov %edx,-0x40(%ebp) 119875: 8d 76 00 lea 0x0(%esi),%esi { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 119878: 8d 4d dc lea -0x24(%ebp),%ecx 11987b: 89 4b 78 mov %ecx,0x78(%ebx) 11987e: 66 90 xchg %ax,%ax static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 119880: a1 e4 28 14 00 mov 0x1428e4,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 119885: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 119888: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11988b: 51 push %ecx 11988c: 57 push %edi 11988d: 29 d0 sub %edx,%eax 11988f: 50 push %eax 119890: 56 push %esi 119891: e8 c2 3a 00 00 call 11d358 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 119896: a1 0c 28 14 00 mov 0x14280c,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 11989b: 8b 53 74 mov 0x74(%ebx),%edx /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 11989e: 83 c4 10 add $0x10,%esp 1198a1: 39 d0 cmp %edx,%eax 1198a3: 77 63 ja 119908 <_Timer_server_Body+0xe0> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 1198a5: 72 7d jb 119924 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 1198a7: 89 43 74 mov %eax,0x74(%ebx) 1198aa: 66 90 xchg %ax,%ax } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 1198ac: 8b 43 78 mov 0x78(%ebx),%eax 1198af: 83 ec 0c sub $0xc,%esp 1198b2: 50 push %eax 1198b3: e8 28 08 00 00 call 11a0e0 <_Chain_Get> if ( timer == NULL ) { 1198b8: 83 c4 10 add $0x10,%esp 1198bb: 85 c0 test %eax,%eax 1198bd: 74 35 je 1198f4 <_Timer_server_Body+0xcc><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1198bf: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 1198c2: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 1198c5: 74 19 je 1198e0 <_Timer_server_Body+0xb8><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 1198c7: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 1198ca: 75 e0 jne 1198ac <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1198cc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1198cf: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1198d2: 50 push %eax <== NOT EXECUTED 1198d3: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 1198d6: e8 15 3b 00 00 call 11d3f0 <_Watchdog_Insert> <== NOT EXECUTED 1198db: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1198de: eb cc jmp 1198ac <_Timer_server_Body+0x84><== NOT EXECUTED Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 1198e0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1198e3: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1198e6: 50 push %eax <== NOT EXECUTED 1198e7: 56 push %esi <== NOT EXECUTED 1198e8: e8 03 3b 00 00 call 11d3f0 <_Watchdog_Insert> <== NOT EXECUTED 1198ed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1198f0: eb ba jmp 1198ac <_Timer_server_Body+0x84><== NOT EXECUTED 1198f2: 66 90 xchg %ax,%ax <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 1198f4: 9c pushf 1198f5: fa cli 1198f6: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 1198f7: 8b 55 b4 mov -0x4c(%ebp),%edx 1198fa: 3b 55 dc cmp -0x24(%ebp),%edx 1198fd: 74 41 je 119940 <_Timer_server_Body+0x118><== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 1198ff: 50 push %eax <== NOT EXECUTED 119900: 9d popf <== NOT EXECUTED 119901: e9 7a ff ff ff jmp 119880 <_Timer_server_Body+0x58><== NOT EXECUTED 119906: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 119908: 51 push %ecx 119909: 57 push %edi 11990a: 89 c1 mov %eax,%ecx 11990c: 29 d1 sub %edx,%ecx 11990e: 51 push %ecx 11990f: ff 75 c4 pushl -0x3c(%ebp) 119912: 89 45 b8 mov %eax,-0x48(%ebp) 119915: e8 3e 3a 00 00 call 11d358 <_Watchdog_Adjust_to_chain> 11991a: 83 c4 10 add $0x10,%esp 11991d: 8b 45 b8 mov -0x48(%ebp),%eax 119920: eb 85 jmp 1198a7 <_Timer_server_Body+0x7f> 119922: 66 90 xchg %ax,%ax /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 119924: 51 push %ecx 119925: 29 c2 sub %eax,%edx 119927: 52 push %edx 119928: 6a 01 push $0x1 11992a: ff 75 c4 pushl -0x3c(%ebp) 11992d: 89 45 b8 mov %eax,-0x48(%ebp) 119930: e8 ab 39 00 00 call 11d2e0 <_Watchdog_Adjust> 119935: 83 c4 10 add $0x10,%esp 119938: 8b 45 b8 mov -0x48(%ebp),%eax 11993b: e9 67 ff ff ff jmp 1198a7 <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 119940: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 119947: 50 push %eax 119948: 9d popf _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 119949: 8b 4d b0 mov -0x50(%ebp),%ecx 11994c: 3b 4d d0 cmp -0x30(%ebp),%ecx 11994f: 75 23 jne 119974 <_Timer_server_Body+0x14c> 119951: eb 33 jmp 119986 <_Timer_server_Body+0x15e> 119953: 90 nop { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 119954: 8b 10 mov (%eax),%edx the_chain->first = new_first; 119956: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 119959: 89 7a 04 mov %edi,0x4(%edx) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 11995c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 119963: 51 push %ecx 119964: 9d popf /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 119965: 83 ec 08 sub $0x8,%esp 119968: ff 70 24 pushl 0x24(%eax) 11996b: ff 70 20 pushl 0x20(%eax) 11996e: ff 50 1c call *0x1c(%eax) } 119971: 83 c4 10 add $0x10,%esp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 119974: 9c pushf 119975: fa cli 119976: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119977: 8b 45 d0 mov -0x30(%ebp),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 11997a: 39 45 b0 cmp %eax,-0x50(%ebp) 11997d: 75 d5 jne 119954 <_Timer_server_Body+0x12c> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 11997f: 51 push %ecx 119980: 9d popf 119981: e9 f2 fe ff ff jmp 119878 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 119986: c6 43 7c 00 movb $0x0,0x7c(%ebx) 11998a: a1 78 27 14 00 mov 0x142778,%eax 11998f: 40 inc %eax 119990: a3 78 27 14 00 mov %eax,0x142778 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 119995: 83 ec 08 sub $0x8,%esp 119998: 6a 08 push $0x8 11999a: ff 33 pushl (%ebx) 11999c: e8 87 31 00 00 call 11cb28 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 1199a1: 89 d8 mov %ebx,%eax 1199a3: e8 e0 fd ff ff call 119788 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 1199a8: 89 d8 mov %ebx,%eax 1199aa: e8 29 fe ff ff call 1197d8 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 1199af: e8 7c 27 00 00 call 11c130 <_Thread_Enable_dispatch> ts->active = true; 1199b4: c6 43 7c 01 movb $0x1,0x7c(%ebx) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 1199b8: 58 pop %eax 1199b9: ff 75 bc pushl -0x44(%ebp) 1199bc: e8 57 3b 00 00 call 11d518 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1199c1: 59 pop %ecx 1199c2: ff 75 c0 pushl -0x40(%ebp) 1199c5: e8 4e 3b 00 00 call 11d518 <_Watchdog_Remove> 1199ca: 83 c4 10 add $0x10,%esp 1199cd: e9 a6 fe ff ff jmp 119878 <_Timer_server_Body+0x50> =============================================================================== 001199d4 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1199d4: 55 push %ebp 1199d5: 89 e5 mov %esp,%ebp 1199d7: 57 push %edi 1199d8: 56 push %esi 1199d9: 53 push %ebx 1199da: 83 ec 2c sub $0x2c,%esp 1199dd: 8b 5d 08 mov 0x8(%ebp),%ebx 1199e0: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 1199e3: 8b 53 78 mov 0x78(%ebx),%edx 1199e6: 85 d2 test %edx,%edx 1199e8: 74 16 je 119a00 <_Timer_server_Schedule_operation_method+0x2c><== ALWAYS TAKEN * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 1199ea: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 1199ed: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1199f0: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1199f3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1199f6: 5b pop %ebx <== NOT EXECUTED 1199f7: 5e pop %esi <== NOT EXECUTED 1199f8: 5f pop %edi <== NOT EXECUTED 1199f9: 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 ); 1199fa: e9 a5 06 00 00 jmp 11a0a4 <_Chain_Append> <== NOT EXECUTED 1199ff: 90 nop <== NOT EXECUTED 119a00: 8b 15 78 27 14 00 mov 0x142778,%edx 119a06: 42 inc %edx 119a07: 89 15 78 27 14 00 mov %edx,0x142778 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 119a0d: 8b 50 38 mov 0x38(%eax),%edx 119a10: 83 fa 01 cmp $0x1,%edx 119a13: 74 77 je 119a8c <_Timer_server_Schedule_operation_method+0xb8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 119a15: 83 fa 03 cmp $0x3,%edx 119a18: 74 0e je 119a28 <_Timer_server_Schedule_operation_method+0x54> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 119a1a: 8d 65 f4 lea -0xc(%ebp),%esp 119a1d: 5b pop %ebx 119a1e: 5e pop %esi 119a1f: 5f pop %edi 119a20: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 119a21: e9 0a 27 00 00 jmp 11c130 <_Thread_Enable_dispatch> 119a26: 66 90 xchg %ax,%ax } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 119a28: 9c pushf 119a29: fa cli 119a2a: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 119a2d: 8b 0d 0c 28 14 00 mov 0x14280c,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 119a33: 8b 73 74 mov 0x74(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119a36: 8b 53 68 mov 0x68(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 119a39: 8d 7b 6c lea 0x6c(%ebx),%edi 119a3c: 39 fa cmp %edi,%edx 119a3e: 74 22 je 119a62 <_Timer_server_Schedule_operation_method+0x8e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 119a40: 8b 7a 10 mov 0x10(%edx),%edi 119a43: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 119a46: 39 f1 cmp %esi,%ecx 119a48: 0f 86 9e 00 00 00 jbe 119aec <_Timer_server_Schedule_operation_method+0x118> /* * We advanced in time. */ delta = snapshot - last_snapshot; 119a4e: 89 cf mov %ecx,%edi 119a50: 29 f7 sub %esi,%edi 119a52: 89 fe mov %edi,%esi if (delta_interval > delta) { 119a54: 39 7d d4 cmp %edi,-0x2c(%ebp) 119a57: 0f 87 9b 00 00 00 ja 119af8 <_Timer_server_Schedule_operation_method+0x124><== ALWAYS TAKEN 119a5d: 31 ff xor %edi,%edi <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 119a5f: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 119a62: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 119a65: ff 75 e4 pushl -0x1c(%ebp) 119a68: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 119a69: 83 ec 08 sub $0x8,%esp 119a6c: 83 c0 10 add $0x10,%eax 119a6f: 50 push %eax 119a70: 8d 43 68 lea 0x68(%ebx),%eax 119a73: 50 push %eax 119a74: e8 77 39 00 00 call 11d3f0 <_Watchdog_Insert> if ( !ts->active ) { 119a79: 8a 43 7c mov 0x7c(%ebx),%al 119a7c: 83 c4 10 add $0x10,%esp 119a7f: 84 c0 test %al,%al 119a81: 75 97 jne 119a1a <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 119a83: 89 d8 mov %ebx,%eax 119a85: e8 4e fd ff ff call 1197d8 <_Timer_server_Reset_tod_system_watchdog> 119a8a: eb 8e jmp 119a1a <_Timer_server_Schedule_operation_method+0x46> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 119a8c: 9c pushf 119a8d: fa cli 119a8e: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119a91: 8b 0d e4 28 14 00 mov 0x1428e4,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 119a97: 8b 73 3c mov 0x3c(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119a9a: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 119a9d: 8d 7b 34 lea 0x34(%ebx),%edi 119aa0: 39 fa cmp %edi,%edx 119aa2: 74 12 je 119ab6 <_Timer_server_Schedule_operation_method+0xe2> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119aa4: 89 cf mov %ecx,%edi 119aa6: 29 f7 sub %esi,%edi 119aa8: 89 fe mov %edi,%esi delta_interval = first_watchdog->delta_interval; 119aaa: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 119aad: 39 fe cmp %edi,%esi 119aaf: 72 37 jb 119ae8 <_Timer_server_Schedule_operation_method+0x114> 119ab1: 31 ff xor %edi,%edi delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 119ab3: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119ab6: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 119ab9: ff 75 e4 pushl -0x1c(%ebp) 119abc: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 119abd: 83 ec 08 sub $0x8,%esp 119ac0: 83 c0 10 add $0x10,%eax 119ac3: 50 push %eax 119ac4: 8d 43 30 lea 0x30(%ebx),%eax 119ac7: 50 push %eax 119ac8: e8 23 39 00 00 call 11d3f0 <_Watchdog_Insert> if ( !ts->active ) { 119acd: 8a 43 7c mov 0x7c(%ebx),%al 119ad0: 83 c4 10 add $0x10,%esp 119ad3: 84 c0 test %al,%al 119ad5: 0f 85 3f ff ff ff jne 119a1a <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 119adb: 89 d8 mov %ebx,%eax 119add: e8 a6 fc ff ff call 119788 <_Timer_server_Reset_interval_system_watchdog> 119ae2: e9 33 ff ff ff jmp 119a1a <_Timer_server_Schedule_operation_method+0x46> 119ae7: 90 nop */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 119ae8: 29 f7 sub %esi,%edi 119aea: eb c7 jmp 119ab3 <_Timer_server_Schedule_operation_method+0xdf> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 119aec: 8b 7d d4 mov -0x2c(%ebp),%edi 119aef: 01 f7 add %esi,%edi delta_interval += delta; 119af1: 29 cf sub %ecx,%edi 119af3: e9 67 ff ff ff jmp 119a5f <_Timer_server_Schedule_operation_method+0x8b> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 119af8: 8b 7d d4 mov -0x2c(%ebp),%edi 119afb: 29 f7 sub %esi,%edi 119afd: e9 5d ff ff ff jmp 119a5f <_Timer_server_Schedule_operation_method+0x8b> =============================================================================== 00129c08 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 129c08: 55 push %ebp 129c09: 89 e5 mov %esp,%ebp 129c0b: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 129c0e: 85 c0 test %eax,%eax 129c10: 74 1a je 129c2c <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 129c12: 8b 10 mov (%eax),%edx 129c14: 85 d2 test %edx,%edx 129c16: 78 14 js 129c2c <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 129c18: 8b 40 04 mov 0x4(%eax),%eax 129c1b: 85 c0 test %eax,%eax 129c1d: 78 0d js 129c2c <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 129c1f: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 129c24: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 129c27: c9 leave 129c28: c3 ret 129c29: 8d 76 00 lea 0x0(%esi),%esi #include #include #include bool _Timespec_Is_valid( 129c2c: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 129c2e: c9 leave 129c2f: c3 ret =============================================================================== 0010e934 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e934: 55 push %ebp 10e935: 89 e5 mov %esp,%ebp 10e937: 57 push %edi 10e938: 56 push %esi 10e939: 53 push %ebx 10e93a: 83 ec 1c sub $0x1c,%esp 10e93d: 8b 75 08 mov 0x8(%ebp),%esi 10e940: 8b 7d 10 mov 0x10(%ebp),%edi 10e943: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e946: 8b 1d b4 75 12 00 mov 0x1275b4,%ebx 10e94c: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e952: 74 25 je 10e979 <_User_extensions_Fatal+0x45><== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e954: 0f b6 c0 movzbl %al,%eax 10e957: 89 45 e4 mov %eax,-0x1c(%ebp) 10e95a: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 10e95c: 8b 43 30 mov 0x30(%ebx),%eax 10e95f: 85 c0 test %eax,%eax 10e961: 74 0b je 10e96e <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e963: 52 push %edx 10e964: 57 push %edi 10e965: ff 75 e4 pushl -0x1c(%ebp) 10e968: 56 push %esi 10e969: ff d0 call *%eax 10e96b: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e96e: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e971: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e977: 75 e3 jne 10e95c <_User_extensions_Fatal+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e979: 8d 65 f4 lea -0xc(%ebp),%esp 10e97c: 5b pop %ebx 10e97d: 5e pop %esi 10e97e: 5f pop %edi 10e97f: c9 leave 10e980: c3 ret =============================================================================== 0010e7f8 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e7f8: 55 push %ebp 10e7f9: 89 e5 mov %esp,%ebp 10e7fb: 57 push %edi 10e7fc: 56 push %esi 10e7fd: 53 push %ebx 10e7fe: 83 ec 1c sub $0x1c,%esp User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 10e801: a1 58 32 12 00 mov 0x123258,%eax 10e806: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e809: 8b 35 5c 32 12 00 mov 0x12325c,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e80f: c7 05 ac 75 12 00 b0 movl $0x1275b0,0x1275ac 10e816: 75 12 00 the_chain->permanent_null = NULL; 10e819: c7 05 b0 75 12 00 00 movl $0x0,0x1275b0 10e820: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e823: c7 05 b4 75 12 00 ac movl $0x1275ac,0x1275b4 10e82a: 75 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e82d: c7 05 5c 73 12 00 60 movl $0x127360,0x12735c 10e834: 73 12 00 the_chain->permanent_null = NULL; 10e837: c7 05 60 73 12 00 00 movl $0x0,0x127360 10e83e: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e841: c7 05 64 73 12 00 5c movl $0x12735c,0x127364 10e848: 73 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e84b: 85 f6 test %esi,%esi 10e84d: 74 64 je 10e8b3 <_User_extensions_Handler_initialization+0xbb> extension = (User_extensions_Control *) 10e84f: 89 c2 mov %eax,%edx 10e851: 8d 04 40 lea (%eax,%eax,2),%eax 10e854: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e857: c1 e1 02 shl $0x2,%ecx 10e85a: 83 ec 0c sub $0xc,%esp 10e85d: 51 push %ecx 10e85e: 89 4d d8 mov %ecx,-0x28(%ebp) 10e861: e8 26 04 00 00 call 10ec8c <_Workspace_Allocate_or_fatal_error> 10e866: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e868: 31 c0 xor %eax,%eax 10e86a: 8b 4d d8 mov -0x28(%ebp),%ecx 10e86d: 89 df mov %ebx,%edi 10e86f: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e871: 83 c4 10 add $0x10,%esp 10e874: 8b 45 dc mov -0x24(%ebp),%eax 10e877: 85 c0 test %eax,%eax 10e879: 74 38 je 10e8b3 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e87b: 89 75 e4 mov %esi,-0x1c(%ebp) 10e87e: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e885: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10e888: 8d 7b 14 lea 0x14(%ebx),%edi 10e88b: 8b 75 e4 mov -0x1c(%ebp),%esi 10e88e: b9 08 00 00 00 mov $0x8,%ecx 10e893: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e895: 83 ec 0c sub $0xc,%esp 10e898: 53 push %ebx 10e899: e8 1a 38 00 00 call 1120b8 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e89e: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e8a1: ff 45 e0 incl -0x20(%ebp) 10e8a4: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e8a8: 83 c4 10 add $0x10,%esp 10e8ab: 8b 45 e0 mov -0x20(%ebp),%eax 10e8ae: 39 45 dc cmp %eax,-0x24(%ebp) 10e8b1: 77 d5 ja 10e888 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e8b3: 8d 65 f4 lea -0xc(%ebp),%esp 10e8b6: 5b pop %ebx 10e8b7: 5e pop %esi 10e8b8: 5f pop %edi 10e8b9: c9 leave 10e8ba: c3 ret =============================================================================== 00113628 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 113628: 55 push %ebp 113629: 89 e5 mov %esp,%ebp 11362b: 53 push %ebx 11362c: 83 ec 10 sub $0x10,%esp 11362f: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 113632: 53 push %ebx 113633: e8 10 dc ff ff call 111248 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 113638: 83 c4 10 add $0x10,%esp 11363b: 8b 43 24 mov 0x24(%ebx),%eax 11363e: 85 c0 test %eax,%eax 113640: 74 12 je 113654 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 113642: 83 c3 08 add $0x8,%ebx 113645: 89 5d 08 mov %ebx,0x8(%ebp) } 113648: 8b 5d fc mov -0x4(%ebp),%ebx 11364b: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 11364c: e9 f7 db ff ff jmp 111248 <_Chain_Extract> 113651: 8d 76 00 lea 0x0(%esi),%esi } 113654: 8b 5d fc mov -0x4(%ebp),%ebx 113657: c9 leave 113658: c3 ret =============================================================================== 0010e8bc <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e8bc: 55 push %ebp 10e8bd: 89 e5 mov %esp,%ebp 10e8bf: 56 push %esi 10e8c0: 53 push %ebx 10e8c1: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e8c4: 8b 1d ac 75 12 00 mov 0x1275ac,%ebx 10e8ca: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e8d0: 74 1c je 10e8ee <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10e8d2: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 10e8d4: 8b 43 28 mov 0x28(%ebx),%eax 10e8d7: 85 c0 test %eax,%eax 10e8d9: 74 09 je 10e8e4 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e8db: 83 ec 0c sub $0xc,%esp 10e8de: 56 push %esi 10e8df: ff d0 call *%eax 10e8e1: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e8e4: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e8e6: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e8ec: 75 e6 jne 10e8d4 <_User_extensions_Thread_begin+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 10e8ee: 8d 65 f8 lea -0x8(%ebp),%esp 10e8f1: 5b pop %ebx 10e8f2: 5e pop %esi 10e8f3: c9 leave 10e8f4: c3 ret =============================================================================== 0010e984 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e984: 55 push %ebp 10e985: 89 e5 mov %esp,%ebp 10e987: 56 push %esi 10e988: 53 push %ebx 10e989: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e98c: 8b 1d ac 75 12 00 mov 0x1275ac,%ebx 10e992: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e998: 74 26 je 10e9c0 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10e99a: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 10e99c: 8b 43 14 mov 0x14(%ebx),%eax 10e99f: 85 c0 test %eax,%eax 10e9a1: 74 13 je 10e9b6 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e9a3: 83 ec 08 sub $0x8,%esp 10e9a6: 56 push %esi 10e9a7: ff 35 18 74 12 00 pushl 0x127418 10e9ad: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e9af: 83 c4 10 add $0x10,%esp 10e9b2: 84 c0 test %al,%al 10e9b4: 74 0c je 10e9c2 <_User_extensions_Thread_create+0x3e> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e9b6: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e9b8: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e9be: 75 dc jne 10e99c <_User_extensions_Thread_create+0x18> 10e9c0: b0 01 mov $0x1,%al return false; } } return true; } 10e9c2: 8d 65 f8 lea -0x8(%ebp),%esp 10e9c5: 5b pop %ebx 10e9c6: 5e pop %esi 10e9c7: c9 leave 10e9c8: c3 ret =============================================================================== 0010e9cc <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e9cc: 55 push %ebp 10e9cd: 89 e5 mov %esp,%ebp 10e9cf: 56 push %esi 10e9d0: 53 push %ebx 10e9d1: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e9d4: 8b 1d b4 75 12 00 mov 0x1275b4,%ebx 10e9da: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e9e0: 74 23 je 10ea05 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10e9e2: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 10e9e4: 8b 43 20 mov 0x20(%ebx),%eax 10e9e7: 85 c0 test %eax,%eax 10e9e9: 74 0f je 10e9fa <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e9eb: 83 ec 08 sub $0x8,%esp 10e9ee: 56 push %esi 10e9ef: ff 35 18 74 12 00 pushl 0x127418 10e9f5: ff d0 call *%eax 10e9f7: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e9fa: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e9fd: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10ea03: 75 df jne 10e9e4 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10ea05: 8d 65 f8 lea -0x8(%ebp),%esp 10ea08: 5b pop %ebx 10ea09: 5e pop %esi 10ea0a: c9 leave 10ea0b: c3 ret =============================================================================== 0010e8f8 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e8f8: 55 push %ebp 10e8f9: 89 e5 mov %esp,%ebp 10e8fb: 56 push %esi 10e8fc: 53 push %ebx 10e8fd: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e900: 8b 1d b4 75 12 00 mov 0x1275b4,%ebx 10e906: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e90c: 74 1d je 10e92b <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10e90e: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 10e910: 8b 43 2c mov 0x2c(%ebx),%eax 10e913: 85 c0 test %eax,%eax 10e915: 74 09 je 10e920 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e917: 83 ec 0c sub $0xc,%esp 10e91a: 56 push %esi 10e91b: ff d0 call *%eax 10e91d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e920: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e923: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e929: 75 e5 jne 10e910 <_User_extensions_Thread_exitted+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10e92b: 8d 65 f8 lea -0x8(%ebp),%esp 10e92e: 5b pop %ebx 10e92f: 5e pop %esi 10e930: c9 leave 10e931: c3 ret =============================================================================== 0010f5c0 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f5c0: 55 push %ebp 10f5c1: 89 e5 mov %esp,%ebp 10f5c3: 56 push %esi 10f5c4: 53 push %ebx 10f5c5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f5c8: 8b 1d 0c 96 12 00 mov 0x12960c,%ebx 10f5ce: 81 fb 10 96 12 00 cmp $0x129610,%ebx 10f5d4: 74 22 je 10f5f8 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f5d6: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 10f5d8: 8b 43 1c mov 0x1c(%ebx),%eax 10f5db: 85 c0 test %eax,%eax 10f5dd: 74 0f je 10f5ee <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f5df: 83 ec 08 sub $0x8,%esp 10f5e2: 56 push %esi 10f5e3: ff 35 78 94 12 00 pushl 0x129478 10f5e9: ff d0 call *%eax 10f5eb: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10f5ee: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f5f0: 81 fb 10 96 12 00 cmp $0x129610,%ebx 10f5f6: 75 e0 jne 10f5d8 <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f5f8: 8d 65 f8 lea -0x8(%ebp),%esp 10f5fb: 5b pop %ebx 10f5fc: 5e pop %esi 10f5fd: c9 leave 10f5fe: c3 ret =============================================================================== 0010ea0c <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10ea0c: 55 push %ebp 10ea0d: 89 e5 mov %esp,%ebp 10ea0f: 56 push %esi 10ea10: 53 push %ebx 10ea11: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10ea14: 8b 1d ac 75 12 00 mov 0x1275ac,%ebx 10ea1a: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10ea20: 74 22 je 10ea44 <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10ea22: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 10ea24: 8b 43 18 mov 0x18(%ebx),%eax 10ea27: 85 c0 test %eax,%eax 10ea29: 74 0f je 10ea3a <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10ea2b: 83 ec 08 sub $0x8,%esp 10ea2e: 56 push %esi 10ea2f: ff 35 18 74 12 00 pushl 0x127418 10ea35: ff d0 call *%eax 10ea37: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10ea3a: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10ea3c: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10ea42: 75 e0 jne 10ea24 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10ea44: 8d 65 f8 lea -0x8(%ebp),%esp 10ea47: 5b pop %ebx 10ea48: 5e pop %esi 10ea49: c9 leave 10ea4a: c3 ret =============================================================================== 0010ea4c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10ea4c: 55 push %ebp 10ea4d: 89 e5 mov %esp,%ebp 10ea4f: 57 push %edi 10ea50: 56 push %esi 10ea51: 53 push %ebx 10ea52: 83 ec 0c sub $0xc,%esp 10ea55: 8b 7d 08 mov 0x8(%ebp),%edi 10ea58: 8b 75 0c mov 0xc(%ebp),%esi Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10ea5b: 8b 1d 5c 73 12 00 mov 0x12735c,%ebx 10ea61: 81 fb 60 73 12 00 cmp $0x127360,%ebx 10ea67: 74 18 je 10ea81 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10ea69: 8d 76 00 lea 0x0(%esi),%esi !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 10ea6c: 83 ec 08 sub $0x8,%esp 10ea6f: 56 push %esi 10ea70: 57 push %edi 10ea71: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 10ea74: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10ea76: 83 c4 10 add $0x10,%esp 10ea79: 81 fb 60 73 12 00 cmp $0x127360,%ebx 10ea7f: 75 eb jne 10ea6c <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10ea81: 8d 65 f4 lea -0xc(%ebp),%esp 10ea84: 5b pop %ebx 10ea85: 5e pop %esi 10ea86: 5f pop %edi 10ea87: c9 leave 10ea88: c3 ret =============================================================================== 00110464 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 110464: 55 push %ebp 110465: 89 e5 mov %esp,%ebp 110467: 57 push %edi 110468: 56 push %esi 110469: 53 push %ebx 11046a: 83 ec 1c sub $0x1c,%esp 11046d: 8b 75 08 mov 0x8(%ebp),%esi 110470: 8b 4d 0c mov 0xc(%ebp),%ecx 110473: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 110476: 9c pushf 110477: fa cli 110478: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110479: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11047b: 8d 7e 04 lea 0x4(%esi),%edi 11047e: 89 7d e4 mov %edi,-0x1c(%ebp) * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 110481: 39 fa cmp %edi,%edx 110483: 74 3d je 1104c2 <_Watchdog_Adjust+0x5e> switch ( direction ) { 110485: 85 c9 test %ecx,%ecx 110487: 75 43 jne 1104cc <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 110489: 85 db test %ebx,%ebx 11048b: 74 35 je 1104c2 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 11048d: 8b 7a 10 mov 0x10(%edx),%edi 110490: 39 fb cmp %edi,%ebx 110492: 73 0f jae 1104a3 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 110494: eb 3e jmp 1104d4 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 110496: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 110498: 29 fb sub %edi,%ebx 11049a: 74 26 je 1104c2 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 11049c: 8b 7a 10 mov 0x10(%edx),%edi 11049f: 39 df cmp %ebx,%edi 1104a1: 77 31 ja 1104d4 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 1104a3: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 1104aa: 50 push %eax 1104ab: 9d popf _Watchdog_Tickle( header ); 1104ac: 83 ec 0c sub $0xc,%esp 1104af: 56 push %esi 1104b0: e8 bb 01 00 00 call 110670 <_Watchdog_Tickle> _ISR_Disable( level ); 1104b5: 9c pushf 1104b6: fa cli 1104b7: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1104b8: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 1104ba: 83 c4 10 add $0x10,%esp 1104bd: 39 55 e4 cmp %edx,-0x1c(%ebp) 1104c0: 75 d6 jne 110498 <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 1104c2: 50 push %eax 1104c3: 9d popf } 1104c4: 8d 65 f4 lea -0xc(%ebp),%esp 1104c7: 5b pop %ebx 1104c8: 5e pop %esi 1104c9: 5f pop %edi 1104ca: c9 leave 1104cb: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 1104cc: 49 dec %ecx 1104cd: 75 f3 jne 1104c2 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 1104cf: 01 5a 10 add %ebx,0x10(%edx) break; 1104d2: eb ee jmp 1104c2 <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 1104d4: 29 df sub %ebx,%edi 1104d6: 89 7a 10 mov %edi,0x10(%edx) break; 1104d9: eb e7 jmp 1104c2 <_Watchdog_Adjust+0x5e> =============================================================================== 0011d358 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 11d358: 55 push %ebp 11d359: 89 e5 mov %esp,%ebp 11d35b: 57 push %edi 11d35c: 56 push %esi 11d35d: 53 push %ebx 11d35e: 83 ec 0c sub $0xc,%esp 11d361: 8b 75 08 mov 0x8(%ebp),%esi 11d364: 8b 55 0c mov 0xc(%ebp),%edx 11d367: 8b 5d 10 mov 0x10(%ebp),%ebx Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 11d36a: 85 d2 test %edx,%edx 11d36c: 74 63 je 11d3d1 <_Watchdog_Adjust_to_chain+0x79> return; } _ISR_Disable( level ); 11d36e: 9c pushf 11d36f: fa cli 11d370: 8f 45 ec popl -0x14(%ebp) 11d373: 8b 06 mov (%esi),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11d375: 8d 4e 04 lea 0x4(%esi),%ecx 11d378: 89 4d f0 mov %ecx,-0x10(%ebp) 11d37b: 8d 7b 04 lea 0x4(%ebx),%edi 11d37e: 89 55 e8 mov %edx,-0x18(%ebp) 11d381: 8d 76 00 lea 0x0(%esi),%esi while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 11d384: 39 45 f0 cmp %eax,-0x10(%ebp) 11d387: 74 44 je 11d3cd <_Watchdog_Adjust_to_chain+0x75> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 11d389: 8b 50 10 mov 0x10(%eax),%edx 11d38c: 3b 55 e8 cmp -0x18(%ebp),%edx 11d38f: 77 57 ja 11d3e8 <_Watchdog_Adjust_to_chain+0x90> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 11d391: 29 55 e8 sub %edx,-0x18(%ebp) first->delta_interval = 0; 11d394: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 11d39b: 90 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11d39c: 8b 08 mov (%eax),%ecx previous = the_node->previous; 11d39e: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11d3a1: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11d3a4: 89 0a mov %ecx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11d3a6: 89 38 mov %edi,(%eax) old_last_node = the_chain->last; 11d3a8: 8b 53 08 mov 0x8(%ebx),%edx the_chain->last = the_node; 11d3ab: 89 43 08 mov %eax,0x8(%ebx) old_last_node->next = the_node; 11d3ae: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11d3b0: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 11d3b3: ff 75 ec pushl -0x14(%ebp) 11d3b6: 9d popf 11d3b7: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11d3b8: 8b 06 mov (%esi),%eax if ( _Chain_Is_empty( header ) ) 11d3ba: 39 45 f0 cmp %eax,-0x10(%ebp) 11d3bd: 74 1d je 11d3dc <_Watchdog_Adjust_to_chain+0x84> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 11d3bf: 8b 50 10 mov 0x10(%eax),%edx 11d3c2: 85 d2 test %edx,%edx 11d3c4: 74 d6 je 11d39c <_Watchdog_Adjust_to_chain+0x44> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11d3c6: 8b 4d e8 mov -0x18(%ebp),%ecx 11d3c9: 85 c9 test %ecx,%ecx 11d3cb: 75 b7 jne 11d384 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 11d3cd: ff 75 ec pushl -0x14(%ebp) 11d3d0: 9d popf } 11d3d1: 83 c4 0c add $0xc,%esp 11d3d4: 5b pop %ebx 11d3d5: 5e pop %esi 11d3d6: 5f pop %edi 11d3d7: c9 leave 11d3d8: c3 ret 11d3d9: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11d3dc: 8b 45 f0 mov -0x10(%ebp),%eax } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11d3df: 8b 4d e8 mov -0x18(%ebp),%ecx 11d3e2: 85 c9 test %ecx,%ecx 11d3e4: 75 9e jne 11d384 <_Watchdog_Adjust_to_chain+0x2c> 11d3e6: eb e5 jmp 11d3cd <_Watchdog_Adjust_to_chain+0x75> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 11d3e8: 2b 55 e8 sub -0x18(%ebp),%edx 11d3eb: 89 50 10 mov %edx,0x10(%eax) break; 11d3ee: eb dd jmp 11d3cd <_Watchdog_Adjust_to_chain+0x75> =============================================================================== 0010ea8c <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10ea8c: 55 push %ebp 10ea8d: 89 e5 mov %esp,%ebp 10ea8f: 57 push %edi 10ea90: 56 push %esi 10ea91: 53 push %ebx 10ea92: 83 ec 04 sub $0x4,%esp 10ea95: 8b 5d 0c mov 0xc(%ebp),%ebx Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 10ea98: 8b 3d f4 73 12 00 mov 0x1273f4,%edi _ISR_Disable( level ); 10ea9e: 9c pushf 10ea9f: fa cli 10eaa0: 8f 45 f0 popl -0x10(%ebp) /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 10eaa3: 8b 43 08 mov 0x8(%ebx),%eax 10eaa6: 85 c0 test %eax,%eax 10eaa8: 75 69 jne 10eb13 <_Watchdog_Insert+0x87> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10eaaa: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10eab1: a1 c0 74 12 00 mov 0x1274c0,%eax 10eab6: 40 inc %eax 10eab7: a3 c0 74 12 00 mov %eax,0x1274c0 restart: delta_interval = the_watchdog->initial; 10eabc: 8b 43 0c mov 0xc(%ebx),%eax * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10eabf: 8b 4d 08 mov 0x8(%ebp),%ecx 10eac2: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10eac4: 85 c0 test %eax,%eax 10eac6: 74 5d je 10eb25 <_Watchdog_Insert+0x99> 10eac8: 8b 32 mov (%edx),%esi 10eaca: 85 f6 test %esi,%esi 10eacc: 74 57 je 10eb25 <_Watchdog_Insert+0x99> break; if ( delta_interval < after->delta_interval ) { 10eace: 8b 4a 10 mov 0x10(%edx),%ecx 10ead1: 39 c8 cmp %ecx,%eax 10ead3: 73 22 jae 10eaf7 <_Watchdog_Insert+0x6b> 10ead5: eb 49 jmp 10eb20 <_Watchdog_Insert+0x94> 10ead7: 90 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10ead8: 8b 35 14 74 12 00 mov 0x127414,%esi 10eade: 39 f7 cmp %esi,%edi 10eae0: 72 66 jb 10eb48 <_Watchdog_Insert+0xbc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10eae2: 29 c8 sub %ecx,%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10eae4: 8b 12 mov (%edx),%edx */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10eae6: 85 c0 test %eax,%eax 10eae8: 74 3b je 10eb25 <_Watchdog_Insert+0x99> 10eaea: 8b 0a mov (%edx),%ecx 10eaec: 85 c9 test %ecx,%ecx 10eaee: 74 35 je 10eb25 <_Watchdog_Insert+0x99> break; if ( delta_interval < after->delta_interval ) { 10eaf0: 8b 4a 10 mov 0x10(%edx),%ecx 10eaf3: 39 c1 cmp %eax,%ecx 10eaf5: 77 29 ja 10eb20 <_Watchdog_Insert+0x94> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 10eaf7: ff 75 f0 pushl -0x10(%ebp) 10eafa: 9d popf 10eafb: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10eafc: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10eb00: 74 d6 je 10ead8 <_Watchdog_Insert+0x4c> _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10eb02: 89 3d 14 74 12 00 mov %edi,0x127414 _Watchdog_Sync_count--; 10eb08: a1 c0 74 12 00 mov 0x1274c0,%eax 10eb0d: 48 dec %eax 10eb0e: a3 c0 74 12 00 mov %eax,0x1274c0 _ISR_Enable( level ); 10eb13: ff 75 f0 pushl -0x10(%ebp) 10eb16: 9d popf } 10eb17: 58 pop %eax 10eb18: 5b pop %ebx 10eb19: 5e pop %esi 10eb1a: 5f pop %edi 10eb1b: c9 leave 10eb1c: c3 ret 10eb1d: 8d 76 00 lea 0x0(%esi),%esi if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 10eb20: 29 c1 sub %eax,%ecx 10eb22: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10eb25: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10eb2c: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10eb2f: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10eb32: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10eb35: 8b 10 mov (%eax),%edx after_node->next = the_node; 10eb37: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10eb39: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10eb3b: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10eb3e: a1 c4 74 12 00 mov 0x1274c4,%eax 10eb43: 89 43 14 mov %eax,0x14(%ebx) 10eb46: eb ba jmp 10eb02 <_Watchdog_Insert+0x76> if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 10eb48: 89 3d 14 74 12 00 mov %edi,0x127414 goto restart; 10eb4e: e9 69 ff ff ff jmp 10eabc <_Watchdog_Insert+0x30> =============================================================================== 0010ebb4 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10ebb4: 55 push %ebp 10ebb5: 89 e5 mov %esp,%ebp 10ebb7: 56 push %esi 10ebb8: 53 push %ebx 10ebb9: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10ebbc: 9c pushf 10ebbd: fa cli 10ebbe: 59 pop %ecx previous_state = the_watchdog->state; 10ebbf: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10ebc2: 83 f8 01 cmp $0x1,%eax 10ebc5: 74 4d je 10ec14 <_Watchdog_Remove+0x60> 10ebc7: 73 0f jae 10ebd8 <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10ebc9: 8b 1d c4 74 12 00 mov 0x1274c4,%ebx 10ebcf: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10ebd2: 51 push %ecx 10ebd3: 9d popf return( previous_state ); } 10ebd4: 5b pop %ebx 10ebd5: 5e pop %esi 10ebd6: c9 leave 10ebd7: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10ebd8: 83 f8 03 cmp $0x3,%eax 10ebdb: 77 ec ja 10ebc9 <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10ebdd: 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 ); 10ebe4: 8b 1a mov (%edx),%ebx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10ebe6: 8b 33 mov (%ebx),%esi 10ebe8: 85 f6 test %esi,%esi 10ebea: 74 06 je 10ebf2 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10ebec: 8b 72 10 mov 0x10(%edx),%esi 10ebef: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10ebf2: 8b 35 c0 74 12 00 mov 0x1274c0,%esi 10ebf8: 85 f6 test %esi,%esi 10ebfa: 74 0c je 10ec08 <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10ebfc: 8b 35 f4 73 12 00 mov 0x1273f4,%esi 10ec02: 89 35 14 74 12 00 mov %esi,0x127414 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10ec08: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10ec0b: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10ec0e: 89 1e mov %ebx,(%esi) 10ec10: eb b7 jmp 10ebc9 <_Watchdog_Remove+0x15> 10ec12: 66 90 xchg %ax,%ax /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 10ec14: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10ec1b: eb ac jmp 10ebc9 <_Watchdog_Remove+0x15> =============================================================================== 00110018 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 110018: 55 push %ebp 110019: 89 e5 mov %esp,%ebp 11001b: 57 push %edi 11001c: 56 push %esi 11001d: 53 push %ebx 11001e: 83 ec 2c sub $0x2c,%esp 110021: 8b 55 08 mov 0x8(%ebp),%edx 110024: 8b 45 0c mov 0xc(%ebp),%eax printk( 110027: 8b 78 24 mov 0x24(%eax),%edi 11002a: 8b 70 20 mov 0x20(%eax),%esi 11002d: 8b 58 1c mov 0x1c(%eax),%ebx 110030: 8b 48 0c mov 0xc(%eax),%ecx 110033: 89 4d d4 mov %ecx,-0x2c(%ebp) 110036: 8b 48 10 mov 0x10(%eax),%ecx 110039: 89 4d e0 mov %ecx,-0x20(%ebp) 11003c: 85 d2 test %edx,%edx 11003e: 74 2c je 11006c <_Watchdog_Report+0x54> 110040: b9 23 36 12 00 mov $0x123623,%ecx 110045: 83 ec 0c sub $0xc,%esp 110048: 57 push %edi 110049: 56 push %esi 11004a: 53 push %ebx 11004b: 50 push %eax 11004c: ff 75 d4 pushl -0x2c(%ebp) 11004f: ff 75 e0 pushl -0x20(%ebp) 110052: 51 push %ecx 110053: 52 push %edx 110054: 68 26 40 12 00 push $0x124026 110059: e8 62 9f ff ff call 109fc0 11005e: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 110061: 8d 65 f4 lea -0xc(%ebp),%esp 110064: 5b pop %ebx 110065: 5e pop %esi 110066: 5f pop %edi 110067: c9 leave 110068: c3 ret 110069: 8d 76 00 lea 0x0(%esi),%esi void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 11006c: b9 75 3e 12 00 mov $0x123e75,%ecx 110071: 89 ca mov %ecx,%edx 110073: eb d0 jmp 110045 <_Watchdog_Report+0x2d> =============================================================================== 0010ffa8 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10ffa8: 55 push %ebp 10ffa9: 89 e5 mov %esp,%ebp 10ffab: 57 push %edi 10ffac: 56 push %esi 10ffad: 53 push %ebx 10ffae: 83 ec 20 sub $0x20,%esp 10ffb1: 8b 7d 08 mov 0x8(%ebp),%edi 10ffb4: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10ffb7: 9c pushf 10ffb8: fa cli 10ffb9: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10ffbc: 56 push %esi 10ffbd: 57 push %edi 10ffbe: 68 f0 3f 12 00 push $0x123ff0 10ffc3: e8 f8 9f ff ff call 109fc0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ffc8: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ffca: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10ffcd: 83 c4 10 add $0x10,%esp 10ffd0: 39 f3 cmp %esi,%ebx 10ffd2: 74 31 je 110005 <_Watchdog_Report_chain+0x5d><== NEVER TAKEN node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10ffd4: 83 ec 08 sub $0x8,%esp 10ffd7: 53 push %ebx 10ffd8: 6a 00 push $0x0 10ffda: e8 39 00 00 00 call 110018 <_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 ) 10ffdf: 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 ; 10ffe1: 83 c4 10 add $0x10,%esp 10ffe4: 39 f3 cmp %esi,%ebx 10ffe6: 75 ec jne 10ffd4 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10ffe8: 83 ec 08 sub $0x8,%esp 10ffeb: 57 push %edi 10ffec: 68 07 40 12 00 push $0x124007 10fff1: e8 ca 9f ff ff call 109fc0 10fff6: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10fff9: ff 75 e4 pushl -0x1c(%ebp) 10fffc: 9d popf } 10fffd: 8d 65 f4 lea -0xc(%ebp),%esp 110000: 5b pop %ebx 110001: 5e pop %esi 110002: 5f pop %edi 110003: c9 leave 110004: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 110005: 83 ec 0c sub $0xc,%esp 110008: 68 16 40 12 00 push $0x124016 11000d: e8 ae 9f ff ff call 109fc0 110012: 83 c4 10 add $0x10,%esp 110015: eb e2 jmp 10fff9 <_Watchdog_Report_chain+0x51> =============================================================================== 0010ec20 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10ec20: 55 push %ebp 10ec21: 89 e5 mov %esp,%ebp 10ec23: 57 push %edi 10ec24: 56 push %esi 10ec25: 53 push %ebx 10ec26: 83 ec 1c sub $0x1c,%esp 10ec29: 8b 7d 08 mov 0x8(%ebp),%edi * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 10ec2c: 9c pushf 10ec2d: fa cli 10ec2e: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ec2f: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ec31: 8d 47 04 lea 0x4(%edi),%eax 10ec34: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10ec37: 39 c3 cmp %eax,%ebx 10ec39: 74 11 je 10ec4c <_Watchdog_Tickle+0x2c> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 10ec3b: 8b 43 10 mov 0x10(%ebx),%eax 10ec3e: 85 c0 test %eax,%eax 10ec40: 74 34 je 10ec76 <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10ec42: 48 dec %eax 10ec43: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10ec46: 85 c0 test %eax,%eax 10ec48: 74 2c je 10ec76 <_Watchdog_Tickle+0x56> 10ec4a: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10ec4c: 56 push %esi 10ec4d: 9d popf } 10ec4e: 8d 65 f4 lea -0xc(%ebp),%esp 10ec51: 5b pop %ebx 10ec52: 5e pop %esi 10ec53: 5f pop %edi 10ec54: c9 leave 10ec55: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10ec56: 83 ec 08 sub $0x8,%esp 10ec59: ff 73 24 pushl 0x24(%ebx) 10ec5c: ff 73 20 pushl 0x20(%ebx) 10ec5f: ff 53 1c call *0x1c(%ebx) 10ec62: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10ec65: 9c pushf 10ec66: fa cli 10ec67: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10ec68: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10ec6a: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10ec6d: 74 dd je 10ec4c <_Watchdog_Tickle+0x2c> 10ec6f: 8b 43 10 mov 0x10(%ebx),%eax 10ec72: 85 c0 test %eax,%eax 10ec74: 75 d6 jne 10ec4c <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10ec76: 83 ec 0c sub $0xc,%esp 10ec79: 53 push %ebx 10ec7a: e8 35 ff ff ff call 10ebb4 <_Watchdog_Remove> _ISR_Enable( level ); 10ec7f: 56 push %esi 10ec80: 9d popf switch( watchdog_state ) { 10ec81: 83 c4 10 add $0x10,%esp 10ec84: 83 f8 02 cmp $0x2,%eax 10ec87: 75 dc jne 10ec65 <_Watchdog_Tickle+0x45> <== NEVER TAKEN 10ec89: eb cb jmp 10ec56 <_Watchdog_Tickle+0x36> =============================================================================== 0010ecec <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10ecec: 55 push %ebp 10eced: 89 e5 mov %esp,%ebp 10ecef: 57 push %edi 10ecf0: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10ecf1: 8b 1d 20 32 12 00 mov 0x123220,%ebx uintptr_t size = Configuration.work_space_size; 10ecf7: 8b 15 24 32 12 00 mov 0x123224,%edx if ( Configuration.do_zero_of_workspace ) 10ecfd: 80 3d 48 32 12 00 00 cmpb $0x0,0x123248 10ed04: 75 1e jne 10ed24 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10ed06: 6a 04 push $0x4 10ed08: 52 push %edx 10ed09: 53 push %ebx 10ed0a: 68 80 73 12 00 push $0x127380 10ed0f: e8 c4 dd ff ff call 10cad8 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10ed14: 83 c4 10 add $0x10,%esp 10ed17: 85 c0 test %eax,%eax 10ed19: 74 13 je 10ed2e <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10ed1b: 8d 65 f8 lea -0x8(%ebp),%esp 10ed1e: 5b pop %ebx 10ed1f: 5f pop %edi 10ed20: c9 leave 10ed21: c3 ret 10ed22: 66 90 xchg %ax,%ax uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); 10ed24: 31 c0 xor %eax,%eax 10ed26: 89 df mov %ebx,%edi 10ed28: 89 d1 mov %edx,%ecx 10ed2a: f3 aa rep stos %al,%es:(%edi) 10ed2c: eb d8 jmp 10ed06 <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10ed2e: 52 push %edx 10ed2f: 6a 03 push $0x3 10ed31: 6a 01 push $0x1 10ed33: 6a 00 push $0x0 10ed35: e8 c2 e0 ff ff call 10cdfc <_Internal_error_Occurred> =============================================================================== 001249d8 <__kill>: #endif int __kill( pid_t pid, int sig ) { 1249d8: 55 push %ebp <== NOT EXECUTED 1249d9: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 1249db: 31 c0 xor %eax,%eax <== NOT EXECUTED 1249dd: c9 leave <== NOT EXECUTED 1249de: c3 ret <== NOT EXECUTED =============================================================================== 0011f5f4 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 11f5f4: 55 push %ebp 11f5f5: 89 e5 mov %esp,%ebp 11f5f7: 83 ec 08 sub $0x8,%esp 11f5fa: e8 be 06 00 00 call 11fcbd <_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(); 11f5ff: e8 88 ff ff ff call 11f58c rtems_shutdown_executive(status); 11f604: 83 ec 0c sub $0xc,%esp 11f607: ff 75 08 pushl 0x8(%ebp) 11f60a: e8 fd 00 00 00 call 11f70c 11f60f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11f612: eb fe jmp 11f612 <_exit+0x1e> <== NOT EXECUTED =============================================================================== 0012bc84 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 12bc84: 55 push %ebp <== NOT EXECUTED 12bc85: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bc87: 57 push %edi <== NOT EXECUTED 12bc88: 56 push %esi <== NOT EXECUTED 12bc89: 53 push %ebx <== NOT EXECUTED 12bc8a: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 12bc8d: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12bc90: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED 12bc93: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 12bc96: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 12bc99: 85 c9 test %ecx,%ecx <== NOT EXECUTED 12bc9b: 74 6c je 12bd09 <_fat_block_read+0x85> <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 12bc9d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 12bca4: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 12bca7: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12bcaa: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 12bcad: 31 db xor %ebx,%ebx <== NOT EXECUTED 12bcaf: eb 31 jmp 12bce2 <_fat_block_read+0x5e> <== NOT EXECUTED 12bcb1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 12bcb4: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 12bcb7: 0f b7 02 movzwl (%edx),%eax <== NOT EXECUTED 12bcba: 29 f0 sub %esi,%eax <== NOT EXECUTED 12bcbc: 3b 45 14 cmp 0x14(%ebp),%eax <== NOT EXECUTED 12bcbf: 76 03 jbe 12bcc4 <_fat_block_read+0x40> <== NOT EXECUTED 12bcc1: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 12bcc4: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED 12bcc7: 01 da add %ebx,%edx <== NOT EXECUTED 12bcc9: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 12bccc: 03 71 20 add 0x20(%ecx),%esi <== NOT EXECUTED 12bccf: 89 d7 mov %edx,%edi <== NOT EXECUTED 12bcd1: 89 c1 mov %eax,%ecx <== NOT EXECUTED 12bcd3: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED count -= c; cmpltd += c; 12bcd5: 8d 1c 18 lea (%eax,%ebx,1),%ebx <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 12bcd8: 29 45 14 sub %eax,0x14(%ebp) <== NOT EXECUTED 12bcdb: 74 22 je 12bcff <_fat_block_read+0x7b> <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; 12bcdd: ff 45 d4 incl -0x2c(%ebp) <== NOT EXECUTED 12bce0: 31 f6 xor %esi,%esi <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 12bce2: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED 12bce5: 52 push %edx <== NOT EXECUTED 12bce6: 6a 01 push $0x1 <== NOT EXECUTED 12bce8: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 12bceb: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 12bcee: e8 09 fa ff ff call 12b6fc <== NOT EXECUTED if (rc != RC_OK) 12bcf3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bcf6: 85 c0 test %eax,%eax <== NOT EXECUTED 12bcf8: 74 ba je 12bcb4 <_fat_block_read+0x30> <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; 12bcfa: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED ofs = 0; } return cmpltd; } 12bcff: 89 d8 mov %ebx,%eax <== NOT EXECUTED 12bd01: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12bd04: 5b pop %ebx <== NOT EXECUTED 12bd05: 5e pop %esi <== NOT EXECUTED 12bd06: 5f pop %edi <== NOT EXECUTED 12bd07: c9 leave <== NOT EXECUTED 12bd08: c3 ret <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 12bd09: 31 db xor %ebx,%ebx <== NOT EXECUTED 12bd0b: eb f2 jmp 12bcff <_fat_block_read+0x7b> <== NOT EXECUTED =============================================================================== 0012b6e4 <_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) { 12b6e4: 55 push %ebp <== NOT EXECUTED 12b6e5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b6e7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 12b6ea: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b6ed: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED 12b6f0: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12b6f3: 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); 12b6f4: e9 93 fe ff ff jmp 12b58c <== NOT EXECUTED =============================================================================== 0012b938 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 12b938: 55 push %ebp <== NOT EXECUTED 12b939: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b93b: 57 push %edi <== NOT EXECUTED 12b93c: 56 push %esi <== NOT EXECUTED 12b93d: 53 push %ebx <== NOT EXECUTED 12b93e: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12b941: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b944: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 12b947: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 12b94a: 85 c0 test %eax,%eax <== NOT EXECUTED 12b94c: 0f 84 8c 00 00 00 je 12b9de <_fat_block_write+0xa6> <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 12b952: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 12b959: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 12b95c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12b95f: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 12b962: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 12b969: eb 45 jmp 12b9b0 <_fat_block_write+0x78> <== NOT EXECUTED 12b96b: 90 nop <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 12b96c: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12b96f: 50 push %eax <== NOT EXECUTED 12b970: 6a 01 push $0x1 <== NOT EXECUTED 12b972: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 12b975: 53 push %ebx <== NOT EXECUTED 12b976: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 12b979: e8 7e fd ff ff call 12b6fc <== NOT EXECUTED 12b97e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b981: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED if (rc != RC_OK) 12b984: 85 c0 test %eax,%eax <== NOT EXECUTED 12b986: 75 44 jne 12b9cc <_fat_block_write+0x94> <== NOT EXECUTED return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 12b988: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12b98b: 03 70 20 add 0x20(%eax),%esi <== NOT EXECUTED 12b98e: 89 f0 mov %esi,%eax <== NOT EXECUTED 12b990: 8b 75 18 mov 0x18(%ebp),%esi <== NOT EXECUTED 12b993: 03 75 d4 add -0x2c(%ebp),%esi <== NOT EXECUTED 12b996: 89 c7 mov %eax,%edi <== NOT EXECUTED 12b998: 89 d1 mov %edx,%ecx <== NOT EXECUTED 12b99a: 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; 12b99c: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 12b9a3: 01 55 d4 add %edx,-0x2c(%ebp) <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 12b9a6: 29 55 14 sub %edx,0x14(%ebp) <== NOT EXECUTED 12b9a9: 74 28 je 12b9d3 <_fat_block_write+0x9b> <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 12b9ab: ff 45 d0 incl -0x30(%ebp) <== NOT EXECUTED 12b9ae: 31 f6 xor %esi,%esi <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); 12b9b0: 0f b7 03 movzwl (%ebx),%eax <== NOT EXECUTED 12b9b3: 89 c2 mov %eax,%edx <== NOT EXECUTED 12b9b5: 29 f2 sub %esi,%edx <== NOT EXECUTED 12b9b7: 3b 55 14 cmp 0x14(%ebp),%edx <== NOT EXECUTED 12b9ba: 76 03 jbe 12b9bf <_fat_block_write+0x87> <== NOT EXECUTED 12b9bc: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED if (c == fs_info->vol.bps) 12b9bf: 39 d0 cmp %edx,%eax <== NOT EXECUTED 12b9c1: 75 a9 jne 12b96c <_fat_block_write+0x34> <== NOT EXECUTED rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 12b9c3: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12b9c6: 50 push %eax <== NOT EXECUTED 12b9c7: 6a 02 push $0x2 <== NOT EXECUTED 12b9c9: eb a7 jmp 12b972 <_fat_block_write+0x3a> <== NOT EXECUTED 12b9cb: 90 nop <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 12b9cc: c7 45 d4 ff ff ff ff movl $0xffffffff,-0x2c(%ebp) <== NOT EXECUTED ofs = 0; } return cmpltd; } 12b9d3: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 12b9d6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b9d9: 5b pop %ebx <== NOT EXECUTED 12b9da: 5e pop %esi <== NOT EXECUTED 12b9db: 5f pop %edi <== NOT EXECUTED 12b9dc: c9 leave <== NOT EXECUTED 12b9dd: c3 ret <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 12b9de: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 12b9e5: eb ec jmp 12b9d3 <_fat_block_write+0x9b> <== NOT EXECUTED =============================================================================== 001435e4 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 1435e4: 55 push %ebp <== NOT EXECUTED 1435e5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1435e7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1435ea: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 1435ed: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED return fcntl( fd, cmd, arg ); 1435f0: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 1435f3: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED 1435f6: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 1435f9: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 1435fc: c9 leave <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 1435fd: e9 4a fe ff ff jmp 14344c <== NOT EXECUTED =============================================================================== 001249a8 <_getpid_r>: #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 1249a8: 55 push %ebp <== NOT EXECUTED 1249a9: 89 e5 mov %esp,%ebp <== NOT EXECUTED return getpid(); } 1249ab: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 1249b0: c9 leave <== NOT EXECUTED 1249b1: c3 ret <== NOT EXECUTED =============================================================================== 001086c4 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 1086c4: 55 push %ebp <== NOT EXECUTED 1086c5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1086c7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 1086ca: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 1086cb: e9 90 ff ff ff jmp 108660 <== NOT EXECUTED =============================================================================== 001249d0 <_kill_r>: #if defined(RTEMS_NEWLIB) #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 1249d0: 55 push %ebp <== NOT EXECUTED 1249d1: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 1249d3: 31 c0 xor %eax,%eax <== NOT EXECUTED 1249d5: c9 leave <== NOT EXECUTED 1249d6: c3 ret <== NOT EXECUTED =============================================================================== 0012ef18 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 12ef18: 55 push %ebp <== NOT EXECUTED 12ef19: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12ef1b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12ef1e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return link( existing, new ); 12ef21: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 12ef24: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 12ef27: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12ef2a: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 12ef2b: e9 30 fe ff ff jmp 12ed60 <== NOT EXECUTED =============================================================================== 0012f134 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 12f134: 55 push %ebp <== NOT EXECUTED 12f135: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12f137: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12f13a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 12f13d: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 12f140: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 12f143: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12f146: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 12f147: e9 18 ff ff ff jmp 12f064 <== NOT EXECUTED =============================================================================== 0011f6d4 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 11f6d4: 55 push %ebp <== NOT EXECUTED 11f6d5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11f6d7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11f6da: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return realloc( ptr, size ); 11f6dd: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 11f6e0: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 11f6e3: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 11f6e6: c9 leave <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 11f6e7: e9 48 00 00 00 jmp 11f734 <== NOT EXECUTED =============================================================================== 0015c77c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 15c77c: 55 push %ebp 15c77d: 89 e5 mov %esp,%ebp 15c77f: 57 push %edi 15c780: 56 push %esi 15c781: 53 push %ebx 15c782: 83 ec 78 sub $0x78,%esp 15c785: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 15c788: 53 push %ebx 15c789: e8 4e 1f fb ff call 10e6dc if ( old_parent_pathlen == 0 ) 15c78e: 83 c4 10 add $0x10,%esp 15c791: 85 c0 test %eax,%eax 15c793: 0f 85 b7 01 00 00 jne 15c950 <_rename_r+0x1d4> <== NEVER TAKEN rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 15c799: 56 push %esi 15c79a: 8d 45 b8 lea -0x48(%ebp),%eax 15c79d: 89 45 94 mov %eax,-0x6c(%ebp) 15c7a0: 50 push %eax 15c7a1: 8d 45 e4 lea -0x1c(%ebp),%eax 15c7a4: 50 push %eax 15c7a5: 53 push %ebx 15c7a6: e8 bd 37 fb ff call 10ff68 15c7ab: 31 d2 xor %edx,%edx 15c7ad: c6 45 93 00 movb $0x0,-0x6d(%ebp) 15c7b1: 83 c4 10 add $0x10,%esp /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 15c7b4: 8d 7d cc lea -0x34(%ebp),%edi 15c7b7: b9 05 00 00 00 mov $0x5,%ecx 15c7bc: 8b 75 94 mov -0x6c(%ebp),%esi 15c7bf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = old + old_parent_pathlen; 15c7c1: 01 d3 add %edx,%ebx 15c7c3: 89 5d e0 mov %ebx,-0x20(%ebp) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 15c7c6: be ff ff ff ff mov $0xffffffff,%esi 15c7cb: 89 f1 mov %esi,%ecx 15c7cd: 89 df mov %ebx,%edi 15c7cf: 31 c0 xor %eax,%eax 15c7d1: f2 ae repnz scas %es:(%edi),%al 15c7d3: f7 d1 not %ecx 15c7d5: 49 dec %ecx 15c7d6: 83 ec 08 sub $0x8,%esp 15c7d9: 51 push %ecx 15c7da: 53 push %ebx 15c7db: e8 ac 1e fb ff call 10e68c 15c7e0: 01 c3 add %eax,%ebx 15c7e2: 89 5d e0 mov %ebx,-0x20(%ebp) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 15c7e5: 89 f1 mov %esi,%ecx 15c7e7: 89 df mov %ebx,%edi 15c7e9: 31 c0 xor %eax,%eax 15c7eb: f2 ae repnz scas %es:(%edi),%al 15c7ed: 89 ce mov %ecx,%esi 15c7ef: f7 d6 not %esi 15c7f1: 4e dec %esi 15c7f2: c7 04 24 00 00 00 00 movl $0x0,(%esp) 15c7f9: 8d 7d cc lea -0x34(%ebp),%edi 15c7fc: 57 push %edi 15c7fd: 6a 00 push $0x0 15c7ff: 56 push %esi 15c800: 53 push %ebx 15c801: e8 1e 1f fb ff call 10e724 0, &old_loc, false ); if ( result != 0 ) { 15c806: 83 c4 20 add $0x20,%esp 15c809: 85 c0 test %eax,%eax 15c80b: 0f 85 23 01 00 00 jne 15c934 <_rename_r+0x1b8> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 15c811: 51 push %ecx 15c812: 8d 5d a4 lea -0x5c(%ebp),%ebx 15c815: 53 push %ebx 15c816: 8d 45 e4 lea -0x1c(%ebp),%eax 15c819: 50 push %eax 15c81a: ff 75 10 pushl 0x10(%ebp) 15c81d: e8 46 37 fb ff call 10ff68 if ( !new_parent_loc.ops->evalformake_h ) { 15c822: 8b 45 b0 mov -0x50(%ebp),%eax 15c825: 8b 40 04 mov 0x4(%eax),%eax 15c828: 83 c4 10 add $0x10,%esp 15c82b: 85 c0 test %eax,%eax 15c82d: 0f 84 b5 01 00 00 je 15c9e8 <_rename_r+0x26c> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 15c833: 52 push %edx 15c834: 8d 55 e0 lea -0x20(%ebp),%edx 15c837: 52 push %edx 15c838: 53 push %ebx 15c839: 8b 55 10 mov 0x10(%ebp),%edx 15c83c: 03 55 e4 add -0x1c(%ebp),%edx 15c83f: 52 push %edx 15c840: ff d0 call *%eax if ( result != 0 ) { 15c842: 83 c4 10 add $0x10,%esp 15c845: 85 c0 test %eax,%eax 15c847: 0f 85 2f 01 00 00 jne 15c97c <_rename_r+0x200> /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 15c84d: 8b 45 c8 mov -0x38(%ebp),%eax 15c850: 3b 45 b4 cmp -0x4c(%ebp),%eax 15c853: 75 77 jne 15c8cc <_rename_r+0x150> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { 15c855: 8b 55 b0 mov -0x50(%ebp),%edx 15c858: 8b 42 40 mov 0x40(%edx),%eax 15c85b: 85 c0 test %eax,%eax 15c85d: 0f 84 75 01 00 00 je 15c9d8 <_rename_r+0x25c> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 15c863: ff 75 e0 pushl -0x20(%ebp) 15c866: 53 push %ebx 15c867: 57 push %edi 15c868: ff 75 94 pushl -0x6c(%ebp) 15c86b: ff d0 call *%eax 15c86d: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &new_parent_loc ); 15c86f: 8b 45 b0 mov -0x50(%ebp),%eax 15c872: 83 c4 10 add $0x10,%esp 15c875: 85 c0 test %eax,%eax 15c877: 74 10 je 15c889 <_rename_r+0x10d> <== NEVER TAKEN 15c879: 8b 40 1c mov 0x1c(%eax),%eax 15c87c: 85 c0 test %eax,%eax 15c87e: 74 09 je 15c889 <_rename_r+0x10d> <== NEVER TAKEN 15c880: 83 ec 0c sub $0xc,%esp 15c883: 53 push %ebx 15c884: ff d0 call *%eax 15c886: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 15c889: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 15c88d: 74 19 je 15c8a8 <_rename_r+0x12c> rtems_filesystem_freenode( &old_parent_loc ); 15c88f: 8b 45 c4 mov -0x3c(%ebp),%eax 15c892: 85 c0 test %eax,%eax 15c894: 74 12 je 15c8a8 <_rename_r+0x12c> <== NEVER TAKEN 15c896: 8b 40 1c mov 0x1c(%eax),%eax 15c899: 85 c0 test %eax,%eax 15c89b: 74 0b je 15c8a8 <_rename_r+0x12c> <== NEVER TAKEN 15c89d: 83 ec 0c sub $0xc,%esp 15c8a0: ff 75 94 pushl -0x6c(%ebp) 15c8a3: ff d0 call *%eax 15c8a5: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 15c8a8: 8b 45 d8 mov -0x28(%ebp),%eax 15c8ab: 85 c0 test %eax,%eax 15c8ad: 74 10 je 15c8bf <_rename_r+0x143> <== NEVER TAKEN 15c8af: 8b 40 1c mov 0x1c(%eax),%eax 15c8b2: 85 c0 test %eax,%eax 15c8b4: 74 09 je 15c8bf <_rename_r+0x143> <== NEVER TAKEN 15c8b6: 83 ec 0c sub $0xc,%esp 15c8b9: 57 push %edi 15c8ba: ff d0 call *%eax 15c8bc: 83 c4 10 add $0x10,%esp return result; } 15c8bf: 89 f0 mov %esi,%eax 15c8c1: 8d 65 f4 lea -0xc(%ebp),%esp 15c8c4: 5b pop %ebx 15c8c5: 5e pop %esi 15c8c6: 5f pop %edi 15c8c7: c9 leave 15c8c8: c3 ret 15c8c9: 8d 76 00 lea 0x0(%esi),%esi * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 15c8cc: 8b 45 b0 mov -0x50(%ebp),%eax 15c8cf: 85 c0 test %eax,%eax 15c8d1: 74 10 je 15c8e3 <_rename_r+0x167> <== NEVER TAKEN 15c8d3: 8b 40 1c mov 0x1c(%eax),%eax 15c8d6: 85 c0 test %eax,%eax 15c8d8: 74 09 je 15c8e3 <_rename_r+0x167> <== NEVER TAKEN 15c8da: 83 ec 0c sub $0xc,%esp 15c8dd: 53 push %ebx 15c8de: ff d0 call *%eax 15c8e0: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 15c8e3: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 15c8e7: 74 19 je 15c902 <_rename_r+0x186> rtems_filesystem_freenode( &old_parent_loc ); 15c8e9: 8b 45 c4 mov -0x3c(%ebp),%eax 15c8ec: 85 c0 test %eax,%eax 15c8ee: 74 12 je 15c902 <_rename_r+0x186> <== NEVER TAKEN 15c8f0: 8b 40 1c mov 0x1c(%eax),%eax 15c8f3: 85 c0 test %eax,%eax 15c8f5: 74 0b je 15c902 <_rename_r+0x186> <== NEVER TAKEN 15c8f7: 83 ec 0c sub $0xc,%esp 15c8fa: ff 75 94 pushl -0x6c(%ebp) 15c8fd: ff d0 call *%eax 15c8ff: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 15c902: 8b 45 d8 mov -0x28(%ebp),%eax 15c905: 85 c0 test %eax,%eax 15c907: 74 10 je 15c919 <_rename_r+0x19d> <== NEVER TAKEN 15c909: 8b 40 1c mov 0x1c(%eax),%eax 15c90c: 85 c0 test %eax,%eax 15c90e: 74 09 je 15c919 <_rename_r+0x19d> <== NEVER TAKEN 15c910: 83 ec 0c sub $0xc,%esp 15c913: 57 push %edi 15c914: ff d0 call *%eax 15c916: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 15c919: e8 6e 9e fe ff call 14678c <__errno> 15c91e: c7 00 12 00 00 00 movl $0x12,(%eax) 15c924: be ff ff ff ff mov $0xffffffff,%esi if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 15c929: 89 f0 mov %esi,%eax 15c92b: 8d 65 f4 lea -0xc(%ebp),%esp 15c92e: 5b pop %ebx 15c92f: 5e pop %esi 15c930: 5f pop %edi 15c931: c9 leave 15c932: c3 ret 15c933: 90 nop name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) 15c934: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 15c938: 0f 85 f5 00 00 00 jne 15ca33 <_rename_r+0x2b7> <== ALWAYS TAKEN result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 15c93e: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED return result; } 15c943: 89 f0 mov %esi,%eax <== NOT EXECUTED 15c945: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 15c948: 5b pop %ebx <== NOT EXECUTED 15c949: 5e pop %esi <== NOT EXECUTED 15c94a: 5f pop %edi <== NOT EXECUTED 15c94b: c9 leave <== NOT EXECUTED 15c94c: c3 ret <== NOT EXECUTED 15c94d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 15c950: 83 ec 0c sub $0xc,%esp 15c953: 6a 00 push $0x0 15c955: 8d 4d b8 lea -0x48(%ebp),%ecx 15c958: 89 4d 94 mov %ecx,-0x6c(%ebp) 15c95b: 51 push %ecx 15c95c: 6a 02 push $0x2 15c95e: 50 push %eax 15c95f: 53 push %ebx 15c960: 89 45 8c mov %eax,-0x74(%ebp) 15c963: e8 90 1e fb ff call 10e7f8 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 15c968: 83 c4 20 add $0x20,%esp 15c96b: 85 c0 test %eax,%eax 15c96d: 8b 55 8c mov -0x74(%ebp),%edx 15c970: 75 cc jne 15c93e <_rename_r+0x1c2> <== NEVER TAKEN 15c972: c6 45 93 01 movb $0x1,-0x6d(%ebp) 15c976: e9 39 fe ff ff jmp 15c7b4 <_rename_r+0x38> 15c97b: 90 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 15c97c: 8b 45 b0 mov -0x50(%ebp),%eax 15c97f: 85 c0 test %eax,%eax 15c981: 74 10 je 15c993 <_rename_r+0x217> <== NEVER TAKEN 15c983: 8b 40 1c mov 0x1c(%eax),%eax 15c986: 85 c0 test %eax,%eax 15c988: 74 09 je 15c993 <_rename_r+0x217> <== NEVER TAKEN 15c98a: 83 ec 0c sub $0xc,%esp 15c98d: 53 push %ebx 15c98e: ff d0 call *%eax 15c990: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 15c993: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 15c997: 74 19 je 15c9b2 <_rename_r+0x236> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 15c999: 8b 45 c4 mov -0x3c(%ebp),%eax 15c99c: 85 c0 test %eax,%eax 15c99e: 74 12 je 15c9b2 <_rename_r+0x236> <== NEVER TAKEN 15c9a0: 8b 40 1c mov 0x1c(%eax),%eax 15c9a3: 85 c0 test %eax,%eax 15c9a5: 74 0b je 15c9b2 <_rename_r+0x236> <== NEVER TAKEN 15c9a7: 83 ec 0c sub $0xc,%esp 15c9aa: ff 75 94 pushl -0x6c(%ebp) 15c9ad: ff d0 call *%eax 15c9af: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 15c9b2: 8b 45 d8 mov -0x28(%ebp),%eax 15c9b5: 85 c0 test %eax,%eax 15c9b7: 74 85 je 15c93e <_rename_r+0x1c2> <== NEVER TAKEN 15c9b9: 8b 40 1c mov 0x1c(%eax),%eax 15c9bc: 85 c0 test %eax,%eax 15c9be: 0f 84 7a ff ff ff je 15c93e <_rename_r+0x1c2> <== NEVER TAKEN 15c9c4: 83 ec 0c sub $0xc,%esp 15c9c7: 57 push %edi 15c9c8: ff d0 call *%eax 15c9ca: 83 ce ff or $0xffffffff,%esi 15c9cd: 83 c4 10 add $0x10,%esp 15c9d0: e9 ea fe ff ff jmp 15c8bf <_rename_r+0x143> 15c9d5: 8d 76 00 lea 0x0(%esi),%esi rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); 15c9d8: 8b 42 1c mov 0x1c(%edx),%eax 15c9db: 85 c0 test %eax,%eax 15c9dd: 74 09 je 15c9e8 <_rename_r+0x26c> <== NEVER TAKEN 15c9df: 83 ec 0c sub $0xc,%esp 15c9e2: 53 push %ebx 15c9e3: ff d0 call *%eax 15c9e5: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 15c9e8: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 15c9ec: 74 19 je 15ca07 <_rename_r+0x28b> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 15c9ee: 8b 45 c4 mov -0x3c(%ebp),%eax 15c9f1: 85 c0 test %eax,%eax 15c9f3: 74 12 je 15ca07 <_rename_r+0x28b> <== NEVER TAKEN 15c9f5: 8b 40 1c mov 0x1c(%eax),%eax 15c9f8: 85 c0 test %eax,%eax 15c9fa: 74 0b je 15ca07 <_rename_r+0x28b> <== NEVER TAKEN 15c9fc: 83 ec 0c sub $0xc,%esp 15c9ff: ff 75 94 pushl -0x6c(%ebp) 15ca02: ff d0 call *%eax 15ca04: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 15ca07: 8b 45 d8 mov -0x28(%ebp),%eax 15ca0a: 85 c0 test %eax,%eax 15ca0c: 74 10 je 15ca1e <_rename_r+0x2a2> <== NEVER TAKEN 15ca0e: 8b 40 1c mov 0x1c(%eax),%eax 15ca11: 85 c0 test %eax,%eax 15ca13: 74 09 je 15ca1e <_rename_r+0x2a2> <== NEVER TAKEN 15ca15: 83 ec 0c sub $0xc,%esp 15ca18: 57 push %edi 15ca19: ff d0 call *%eax 15ca1b: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTSUP ); 15ca1e: e8 69 9d fe ff call 14678c <__errno> 15ca23: c7 00 86 00 00 00 movl $0x86,(%eax) 15ca29: be ff ff ff ff mov $0xffffffff,%esi 15ca2e: e9 8c fe ff ff jmp 15c8bf <_rename_r+0x143> result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 15ca33: 8b 45 c4 mov -0x3c(%ebp),%eax 15ca36: 85 c0 test %eax,%eax 15ca38: 0f 84 00 ff ff ff je 15c93e <_rename_r+0x1c2> <== NEVER TAKEN 15ca3e: 8b 40 1c mov 0x1c(%eax),%eax 15ca41: 85 c0 test %eax,%eax 15ca43: 0f 84 f5 fe ff ff je 15c93e <_rename_r+0x1c2> <== NEVER TAKEN 15ca49: 83 ec 0c sub $0xc,%esp 15ca4c: ff 75 94 pushl -0x6c(%ebp) 15ca4f: ff d0 call *%eax 15ca51: 83 ce ff or $0xffffffff,%esi 15ca54: 83 c4 10 add $0x10,%esp 15ca57: e9 63 fe ff ff jmp 15c8bf <_rename_r+0x143> =============================================================================== 0010ff50 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 10ff50: 55 push %ebp <== NOT EXECUTED 10ff51: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ff53: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10ff56: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 10ff59: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10ff5c: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10ff5f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10ff62: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 10ff63: e9 18 ff ff ff jmp 10fe80 <== NOT EXECUTED =============================================================================== 00113950 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 113950: 55 push %ebp <== NOT EXECUTED 113951: 89 e5 mov %esp,%ebp <== NOT EXECUTED 113953: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 113956: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 113959: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 11395c: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 11395d: e9 fa fd ff ff jmp 11375c <== NOT EXECUTED =============================================================================== 0012ddb8 : int access( const char *path, int amode ) { 12ddb8: 55 push %ebp 12ddb9: 89 e5 mov %esp,%ebp 12ddbb: 53 push %ebx 12ddbc: 83 ec 5c sub $0x5c,%esp 12ddbf: 8b 5d 0c mov 0xc(%ebp),%ebx struct stat statbuf; if ( stat(path, &statbuf) ) 12ddc2: 8d 45 b0 lea -0x50(%ebp),%eax 12ddc5: 50 push %eax 12ddc6: ff 75 08 pushl 0x8(%ebp) 12ddc9: e8 b2 20 fe ff call 10fe80 12ddce: 83 c4 10 add $0x10,%esp 12ddd1: 85 c0 test %eax,%eax 12ddd3: 75 1f jne 12ddf4 return -1; if ( amode & R_OK ) { 12ddd5: f6 c3 04 test $0x4,%bl 12ddd8: 75 12 jne 12ddec if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 12ddda: f6 c3 02 test $0x2,%bl 12dddd: 75 29 jne 12de08 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 12dddf: 83 e3 01 and $0x1,%ebx 12dde2: 75 1c jne 12de00 if ( !( statbuf.st_mode & S_IEXEC ) ) 12dde4: 31 c0 xor %eax,%eax return -1; } return 0; } 12dde6: 8b 5d fc mov -0x4(%ebp),%ebx 12dde9: c9 leave 12ddea: c3 ret 12ddeb: 90 nop if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 12ddec: f6 45 bd 01 testb $0x1,-0x43(%ebp) 12ddf0: 75 e8 jne 12ddda 12ddf2: 66 90 xchg %ax,%ax if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 12ddf4: b8 ff ff ff ff mov $0xffffffff,%eax return -1; } return 0; } 12ddf9: 8b 5d fc mov -0x4(%ebp),%ebx 12ddfc: c9 leave 12ddfd: c3 ret 12ddfe: 66 90 xchg %ax,%ax if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 12de00: f6 45 bc 40 testb $0x40,-0x44(%ebp) 12de04: 75 de jne 12dde4 12de06: eb ec jmp 12ddf4 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 12de08: 80 7d bc 00 cmpb $0x0,-0x44(%ebp) 12de0c: 78 d1 js 12dddf 12de0e: eb e4 jmp 12ddf4 =============================================================================== 001083cc : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 1083cc: 55 push %ebp 1083cd: 89 e5 mov %esp,%ebp 1083cf: 57 push %edi 1083d0: 53 push %ebx 1083d1: 8b 5d 0c mov 0xc(%ebp),%ebx 1083d4: ff 05 14 72 12 00 incl 0x127214 length = nelem * elsize; 1083da: 0f af 5d 08 imul 0x8(%ebp),%ebx cptr = malloc( length ); 1083de: 83 ec 0c sub $0xc,%esp 1083e1: 53 push %ebx 1083e2: e8 d5 04 00 00 call 1088bc 1083e7: 89 c2 mov %eax,%edx if ( cptr ) 1083e9: 83 c4 10 add $0x10,%esp 1083ec: 85 c0 test %eax,%eax 1083ee: 74 08 je 1083f8 <== NEVER TAKEN memset( cptr, '\0', length ); 1083f0: 31 c0 xor %eax,%eax 1083f2: 89 d7 mov %edx,%edi 1083f4: 89 d9 mov %ebx,%ecx 1083f6: f3 aa rep stos %al,%es:(%edi) MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 1083f8: ff 0d 04 72 12 00 decl 0x127204 return cptr; } 1083fe: 89 d0 mov %edx,%eax 108400: 8d 65 f8 lea -0x8(%ebp),%esp 108403: 5b pop %ebx 108404: 5f pop %edi 108405: c9 leave 108406: c3 ret =============================================================================== 0012df60 : #include int chdir( const char *pathname ) { 12df60: 55 push %ebp 12df61: 89 e5 mov %esp,%ebp 12df63: 57 push %edi 12df64: 56 push %esi 12df65: 83 ec 20 sub $0x20,%esp 12df68: 8b 55 08 mov 0x8(%ebp),%edx rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 12df6b: 85 d2 test %edx,%edx 12df6d: 0f 84 9d 00 00 00 je 12e010 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 12df73: 31 c0 xor %eax,%eax 12df75: b9 ff ff ff ff mov $0xffffffff,%ecx 12df7a: 89 d7 mov %edx,%edi 12df7c: f2 ae repnz scas %es:(%edi),%al 12df7e: f7 d1 not %ecx 12df80: 49 dec %ecx 12df81: 83 ec 0c sub $0xc,%esp 12df84: 6a 01 push $0x1 12df86: 8d 75 e4 lea -0x1c(%ebp),%esi 12df89: 56 push %esi 12df8a: 6a 01 push $0x1 12df8c: 51 push %ecx 12df8d: 52 push %edx 12df8e: e8 65 08 fe ff call 10e7f8 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 12df93: 83 c4 20 add $0x20,%esp 12df96: 85 c0 test %eax,%eax 12df98: 75 6a jne 12e004 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 12df9a: 8b 55 f0 mov -0x10(%ebp),%edx 12df9d: 8b 42 10 mov 0x10(%edx),%eax 12dfa0: 85 c0 test %eax,%eax 12dfa2: 74 45 je 12dfe9 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 12dfa4: 83 ec 0c sub $0xc,%esp 12dfa7: 56 push %esi 12dfa8: ff d0 call *%eax 12dfaa: 83 c4 10 add $0x10,%esp 12dfad: 48 dec %eax 12dfae: 75 78 jne 12e028 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 12dfb0: 8b 3d 20 d3 16 00 mov 0x16d320,%edi 12dfb6: 8b 47 10 mov 0x10(%edi),%eax 12dfb9: 85 c0 test %eax,%eax 12dfbb: 74 19 je 12dfd6 <== NEVER TAKEN 12dfbd: 8b 40 1c mov 0x1c(%eax),%eax 12dfc0: 85 c0 test %eax,%eax 12dfc2: 74 12 je 12dfd6 <== NEVER TAKEN 12dfc4: 83 ec 0c sub $0xc,%esp 12dfc7: 83 c7 04 add $0x4,%edi 12dfca: 57 push %edi 12dfcb: ff d0 call *%eax 12dfcd: 8b 3d 20 d3 16 00 mov 0x16d320,%edi 12dfd3: 83 c4 10 add $0x10,%esp rtems_filesystem_current = loc; 12dfd6: 83 c7 04 add $0x4,%edi 12dfd9: b9 05 00 00 00 mov $0x5,%ecx 12dfde: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12dfe0: 31 c0 xor %eax,%eax return 0; } 12dfe2: 8d 65 f8 lea -0x8(%ebp),%esp 12dfe5: 5e pop %esi 12dfe6: 5f pop %edi 12dfe7: c9 leave 12dfe8: c3 ret /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 12dfe9: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12dfec: 85 c0 test %eax,%eax <== NOT EXECUTED 12dfee: 74 09 je 12dff9 <== NOT EXECUTED 12dff0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12dff3: 56 push %esi <== NOT EXECUTED 12dff4: ff d0 call *%eax <== NOT EXECUTED 12dff6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12dff9: e8 8e 87 01 00 call 14678c <__errno> <== NOT EXECUTED 12dffe: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12e004: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 12e009: 8d 65 f8 lea -0x8(%ebp),%esp 12e00c: 5e pop %esi 12e00d: 5f pop %edi 12e00e: c9 leave 12e00f: c3 ret { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 12e010: e8 77 87 01 00 call 14678c <__errno> 12e015: c7 00 0e 00 00 00 movl $0xe,(%eax) 12e01b: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 12e020: 8d 65 f8 lea -0x8(%ebp),%esp 12e023: 5e pop %esi 12e024: 5f pop %edi 12e025: c9 leave 12e026: c3 ret 12e027: 90 nop rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 12e028: 8b 45 f0 mov -0x10(%ebp),%eax 12e02b: 85 c0 test %eax,%eax 12e02d: 74 10 je 12e03f <== NEVER TAKEN 12e02f: 8b 40 1c mov 0x1c(%eax),%eax 12e032: 85 c0 test %eax,%eax 12e034: 74 09 je 12e03f <== NEVER TAKEN 12e036: 83 ec 0c sub $0xc,%esp 12e039: 56 push %esi 12e03a: ff d0 call *%eax 12e03c: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 12e03f: e8 48 87 01 00 call 14678c <__errno> 12e044: c7 00 14 00 00 00 movl $0x14,(%eax) 12e04a: b8 ff ff ff ff mov $0xffffffff,%eax 12e04f: eb 91 jmp 12dfe2 =============================================================================== 0010e348 : int chmod( const char *path, mode_t mode ) { 10e348: 55 push %ebp 10e349: 89 e5 mov %esp,%ebp 10e34b: 57 push %edi 10e34c: 56 push %esi 10e34d: 53 push %ebx 10e34e: 83 ec 38 sub $0x38,%esp 10e351: 8b 55 08 mov 0x8(%ebp),%edx int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 10e354: 31 c0 xor %eax,%eax 10e356: b9 ff ff ff ff mov $0xffffffff,%ecx 10e35b: 89 d7 mov %edx,%edi 10e35d: f2 ae repnz scas %es:(%edi),%al 10e35f: f7 d1 not %ecx 10e361: 49 dec %ecx 10e362: 6a 01 push $0x1 10e364: 8d 5d d4 lea -0x2c(%ebp),%ebx 10e367: 53 push %ebx 10e368: 6a 00 push $0x0 10e36a: 51 push %ecx 10e36b: 52 push %edx 10e36c: e8 87 04 00 00 call 10e7f8 if ( status != 0 ) 10e371: 83 c4 20 add $0x20,%esp 10e374: 85 c0 test %eax,%eax 10e376: 75 60 jne 10e3d8 return -1; if ( !loc.handlers ){ 10e378: 8b 45 dc mov -0x24(%ebp),%eax 10e37b: 85 c0 test %eax,%eax 10e37d: 74 36 je 10e3b5 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 10e37f: 8b 40 1c mov 0x1c(%eax),%eax 10e382: 85 c0 test %eax,%eax 10e384: 74 62 je 10e3e8 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 10e386: 83 ec 08 sub $0x8,%esp 10e389: ff 75 0c pushl 0xc(%ebp) 10e38c: 53 push %ebx 10e38d: ff d0 call *%eax 10e38f: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10e391: 8b 45 e0 mov -0x20(%ebp),%eax 10e394: 83 c4 10 add $0x10,%esp 10e397: 85 c0 test %eax,%eax 10e399: 74 10 je 10e3ab <== NEVER TAKEN 10e39b: 8b 40 1c mov 0x1c(%eax),%eax 10e39e: 85 c0 test %eax,%eax 10e3a0: 74 09 je 10e3ab <== NEVER TAKEN 10e3a2: 83 ec 0c sub $0xc,%esp 10e3a5: 53 push %ebx 10e3a6: ff d0 call *%eax 10e3a8: 83 c4 10 add $0x10,%esp return result; } 10e3ab: 89 f0 mov %esi,%eax 10e3ad: 8d 65 f4 lea -0xc(%ebp),%esp 10e3b0: 5b pop %ebx 10e3b1: 5e pop %esi 10e3b2: 5f pop %edi 10e3b3: c9 leave 10e3b4: c3 ret status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 10e3b5: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10e3b8: 85 c0 test %eax,%eax <== NOT EXECUTED 10e3ba: 74 10 je 10e3cc <== NOT EXECUTED 10e3bc: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10e3bf: 85 c0 test %eax,%eax <== NOT EXECUTED 10e3c1: 74 09 je 10e3cc <== NOT EXECUTED 10e3c3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e3c6: 53 push %ebx <== NOT EXECUTED 10e3c7: ff d0 call *%eax <== NOT EXECUTED 10e3c9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 10e3cc: e8 bb 83 03 00 call 14678c <__errno> <== NOT EXECUTED 10e3d1: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10e3d7: 90 nop <== NOT EXECUTED 10e3d8: be ff ff ff ff mov $0xffffffff,%esi result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 10e3dd: 89 f0 mov %esi,%eax 10e3df: 8d 65 f4 lea -0xc(%ebp),%esp 10e3e2: 5b pop %ebx 10e3e3: 5e pop %esi 10e3e4: 5f pop %edi 10e3e5: c9 leave 10e3e6: c3 ret 10e3e7: 90 nop rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 10e3e8: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10e3eb: 85 c0 test %eax,%eax <== NOT EXECUTED 10e3ed: 74 10 je 10e3ff <== NOT EXECUTED 10e3ef: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10e3f2: 85 c0 test %eax,%eax <== NOT EXECUTED 10e3f4: 74 09 je 10e3ff <== NOT EXECUTED 10e3f6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e3f9: 53 push %ebx <== NOT EXECUTED 10e3fa: ff d0 call *%eax <== NOT EXECUTED 10e3fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10e3ff: e8 88 83 03 00 call 14678c <__errno> <== NOT EXECUTED 10e404: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10e40a: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 10e40f: eb 9a jmp 10e3ab <== NOT EXECUTED =============================================================================== 0012e054 : int chown( const char *path, uid_t owner, gid_t group ) { 12e054: 55 push %ebp 12e055: 89 e5 mov %esp,%ebp 12e057: 57 push %edi 12e058: 56 push %esi 12e059: 53 push %ebx 12e05a: 83 ec 38 sub $0x38,%esp 12e05d: 8b 55 08 mov 0x8(%ebp),%edx 12e060: 8b 75 0c mov 0xc(%ebp),%esi 12e063: 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 ) ) 12e066: 31 c0 xor %eax,%eax 12e068: b9 ff ff ff ff mov $0xffffffff,%ecx 12e06d: 89 d7 mov %edx,%edi 12e06f: f2 ae repnz scas %es:(%edi),%al 12e071: f7 d1 not %ecx 12e073: 49 dec %ecx 12e074: 6a 01 push $0x1 12e076: 8d 7d d4 lea -0x2c(%ebp),%edi 12e079: 57 push %edi 12e07a: 6a 00 push $0x0 12e07c: 51 push %ecx 12e07d: 52 push %edx 12e07e: e8 75 07 fe ff call 10e7f8 12e083: 83 c4 20 add $0x20,%esp 12e086: 85 c0 test %eax,%eax 12e088: 75 5a jne 12e0e4 <== NEVER TAKEN return -1; if ( !loc.ops->chown_h ) { 12e08a: 8b 55 e0 mov -0x20(%ebp),%edx 12e08d: 8b 42 18 mov 0x18(%edx),%eax 12e090: 85 c0 test %eax,%eax 12e092: 74 34 je 12e0c8 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 12e094: 52 push %edx 12e095: 0f b7 db movzwl %bx,%ebx 12e098: 53 push %ebx 12e099: 0f b7 f6 movzwl %si,%esi 12e09c: 56 push %esi 12e09d: 57 push %edi 12e09e: ff d0 call *%eax 12e0a0: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 12e0a2: 8b 45 e0 mov -0x20(%ebp),%eax 12e0a5: 83 c4 10 add $0x10,%esp 12e0a8: 85 c0 test %eax,%eax 12e0aa: 74 10 je 12e0bc <== NEVER TAKEN 12e0ac: 8b 40 1c mov 0x1c(%eax),%eax 12e0af: 85 c0 test %eax,%eax 12e0b1: 74 09 je 12e0bc <== NEVER TAKEN 12e0b3: 83 ec 0c sub $0xc,%esp 12e0b6: 57 push %edi 12e0b7: ff d0 call *%eax 12e0b9: 83 c4 10 add $0x10,%esp return result; } 12e0bc: 89 d8 mov %ebx,%eax 12e0be: 8d 65 f4 lea -0xc(%ebp),%esp 12e0c1: 5b pop %ebx 12e0c2: 5e pop %esi 12e0c3: 5f pop %edi 12e0c4: c9 leave 12e0c5: c3 ret 12e0c6: 66 90 xchg %ax,%ax if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 12e0c8: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12e0cb: 85 c0 test %eax,%eax <== NOT EXECUTED 12e0cd: 74 09 je 12e0d8 <== NOT EXECUTED 12e0cf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12e0d2: 57 push %edi <== NOT EXECUTED 12e0d3: ff d0 call *%eax <== NOT EXECUTED 12e0d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12e0d8: e8 af 86 01 00 call 14678c <__errno> <== NOT EXECUTED 12e0dd: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12e0e3: 90 nop <== NOT EXECUTED 12e0e4: bb ff ff ff ff mov $0xffffffff,%ebx result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 12e0e9: 89 d8 mov %ebx,%eax 12e0eb: 8d 65 f4 lea -0xc(%ebp),%esp 12e0ee: 5b pop %ebx 12e0ef: 5e pop %esi 12e0f0: 5f pop %edi 12e0f1: c9 leave 12e0f2: c3 ret =============================================================================== 0012e0f4 : #include int chroot( const char *pathname ) { 12e0f4: 55 push %ebp 12e0f5: 89 e5 mov %esp,%ebp 12e0f7: 57 push %edi 12e0f8: 56 push %esi 12e0f9: 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) { 12e0fc: 81 3d 20 d3 16 00 a0 cmpl $0x172da0,0x16d320 12e103: 2d 17 00 12e106: 74 6c je 12e174 <== ALWAYS TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 12e108: 83 ec 0c sub $0xc,%esp 12e10b: ff 75 08 pushl 0x8(%ebp) 12e10e: e8 4d fe ff ff call 12df60 if (result) { 12e113: 83 c4 10 add $0x10,%esp 12e116: 85 c0 test %eax,%eax 12e118: 75 7e jne 12e198 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 12e11a: 83 ec 0c sub $0xc,%esp 12e11d: 6a 00 push $0x0 12e11f: 8d 75 e4 lea -0x1c(%ebp),%esi 12e122: 56 push %esi 12e123: 6a 00 push $0x0 12e125: 6a 01 push $0x1 12e127: 68 f8 07 16 00 push $0x1607f8 12e12c: e8 c7 06 fe ff call 10e7f8 12e131: 83 c4 20 add $0x20,%esp 12e134: 85 c0 test %eax,%eax 12e136: 75 60 jne 12e198 <== 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); 12e138: 8b 3d 20 d3 16 00 mov 0x16d320,%edi 12e13e: 8b 47 24 mov 0x24(%edi),%eax 12e141: 85 c0 test %eax,%eax 12e143: 74 19 je 12e15e <== NEVER TAKEN 12e145: 8b 40 1c mov 0x1c(%eax),%eax 12e148: 85 c0 test %eax,%eax 12e14a: 74 12 je 12e15e <== NEVER TAKEN 12e14c: 83 ec 0c sub $0xc,%esp 12e14f: 83 c7 18 add $0x18,%edi 12e152: 57 push %edi 12e153: ff d0 call *%eax 12e155: 8b 3d 20 d3 16 00 mov 0x16d320,%edi 12e15b: 83 c4 10 add $0x10,%esp rtems_filesystem_root = loc; 12e15e: 83 c7 18 add $0x18,%edi 12e161: b9 05 00 00 00 mov $0x5,%ecx 12e166: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12e168: 31 c0 xor %eax,%eax return 0; } 12e16a: 8d 65 f8 lea -0x8(%ebp),%esp 12e16d: 5e pop %esi 12e16e: 5f pop %edi 12e16f: c9 leave 12e170: c3 ret 12e171: 8d 76 00 lea 0x0(%esi),%esi int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 12e174: e8 93 14 00 00 call 12f60c if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 12e179: 81 3d 20 d3 16 00 a0 cmpl $0x172da0,0x16d320 12e180: 2d 17 00 12e183: 75 83 jne 12e108 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 12e185: e8 02 86 01 00 call 14678c <__errno> <== NOT EXECUTED 12e18a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12e190: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12e193: eb d5 jmp 12e16a <== NOT EXECUTED 12e195: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 12e198: e8 ef 85 01 00 call 14678c <__errno> <== NOT EXECUTED 12e19d: 89 c6 mov %eax,%esi <== NOT EXECUTED 12e19f: e8 e8 85 01 00 call 14678c <__errno> <== NOT EXECUTED 12e1a4: 8b 00 mov (%eax),%eax <== NOT EXECUTED 12e1a6: 89 06 mov %eax,(%esi) <== NOT EXECUTED 12e1a8: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12e1ad: eb bb jmp 12e16a <== NOT EXECUTED =============================================================================== 00110aa8 : #include int close( int fd ) { 110aa8: 55 push %ebp 110aa9: 89 e5 mov %esp,%ebp 110aab: 56 push %esi 110aac: 53 push %ebx 110aad: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 110ab0: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 110ab6: 73 58 jae 110b10 iop = rtems_libio_iop(fd); 110ab8: c1 e3 06 shl $0x6,%ebx 110abb: 03 1d e0 71 12 00 add 0x1271e0,%ebx rtems_libio_check_is_open(iop); 110ac1: f6 43 15 01 testb $0x1,0x15(%ebx) 110ac5: 74 49 je 110b10 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 110ac7: 8b 43 3c mov 0x3c(%ebx),%eax 110aca: 8b 40 04 mov 0x4(%eax),%eax 110acd: 85 c0 test %eax,%eax 110acf: 74 3b je 110b0c <== NEVER TAKEN rc = (*iop->handlers->close_h)( iop ); 110ad1: 83 ec 0c sub $0xc,%esp 110ad4: 53 push %ebx 110ad5: ff d0 call *%eax 110ad7: 89 c6 mov %eax,%esi 110ad9: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &iop->pathinfo ); 110adc: 8b 43 24 mov 0x24(%ebx),%eax 110adf: 85 c0 test %eax,%eax 110ae1: 74 13 je 110af6 <== NEVER TAKEN 110ae3: 8b 40 1c mov 0x1c(%eax),%eax 110ae6: 85 c0 test %eax,%eax 110ae8: 74 0c je 110af6 110aea: 83 ec 0c sub $0xc,%esp 110aed: 8d 53 18 lea 0x18(%ebx),%edx 110af0: 52 push %edx 110af1: ff d0 call *%eax 110af3: 83 c4 10 add $0x10,%esp rtems_libio_free( iop ); 110af6: 83 ec 0c sub $0xc,%esp 110af9: 53 push %ebx 110afa: e8 0d 02 00 00 call 110d0c return rc; 110aff: 83 c4 10 add $0x10,%esp } 110b02: 89 f0 mov %esi,%eax 110b04: 8d 65 f8 lea -0x8(%ebp),%esp 110b07: 5b pop %ebx 110b08: 5e pop %esi 110b09: c9 leave 110b0a: c3 ret 110b0b: 90 nop rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 110b0c: 31 f6 xor %esi,%esi 110b0e: eb cc jmp 110adc <== NOT EXECUTED rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 110b10: e8 2b 33 00 00 call 113e40 <__errno> 110b15: c7 00 09 00 00 00 movl $0x9,(%eax) 110b1b: be ff ff ff ff mov $0xffffffff,%esi 110b20: eb e0 jmp 110b02 =============================================================================== 0010873c : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 10873c: 55 push %ebp 10873d: 89 e5 mov %esp,%ebp 10873f: 57 push %edi 108740: 56 push %esi 108741: 53 push %ebx 108742: 83 ec 2c sub $0x2c,%esp 108745: 89 c3 mov %eax,%ebx 108747: 89 d6 mov %edx,%esi 108749: 89 4d d8 mov %ecx,-0x28(%ebp) ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 10874c: 89 c2 mov %eax,%edx dev_t device ) { union __rtems_dev_t temp; temp.device = device; 10874e: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 108751: 8b 3d 04 af 12 00 mov 0x12af04,%edi 108757: 39 f8 cmp %edi,%eax 108759: 0f 83 41 01 00 00 jae 1088a0 10875f: a1 00 af 12 00 mov 0x12af00,%eax 108764: 89 45 e0 mov %eax,-0x20(%ebp) memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; disktab_size = new_size; } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 108767: c1 e2 03 shl $0x3,%edx 10876a: 89 55 dc mov %edx,-0x24(%ebp) 10876d: 8b 45 e0 mov -0x20(%ebp),%eax 108770: 01 d0 add %edx,%eax 108772: 8b 10 mov (%eax),%edx 108774: 85 d2 test %edx,%edx 108776: 0f 84 bc 00 00 00 je 108838 10877c: 8b 78 04 mov 0x4(%eax),%edi 10877f: 39 7d e4 cmp %edi,-0x1c(%ebp) 108782: 0f 83 b4 00 00 00 jae 10883c <== NEVER TAKEN memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; disktab [major].size = new_size; } return disktab [major].minor + minor; 108788: 8b 45 e4 mov -0x1c(%ebp),%eax 10878b: 8d 3c 82 lea (%edx,%eax,4),%edi { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 10878e: 85 ff test %edi,%edi 108790: 0f 84 6a 01 00 00 je 108900 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 108796: 8b 07 mov (%edi),%eax 108798: 85 c0 test %eax,%eax 10879a: 74 10 je 1087ac 10879c: b8 0c 00 00 00 mov $0xc,%eax *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 1087a1: 8d 65 f4 lea -0xc(%ebp),%esp 1087a4: 5b pop %ebx 1087a5: 5e pop %esi 1087a6: 5f pop %edi 1087a7: c9 leave 1087a8: c3 ret 1087a9: 8d 76 00 lea 0x0(%esi),%esi if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 1087ac: 83 ec 0c sub $0xc,%esp 1087af: 6a 34 push $0x34 1087b1: e8 ae 0f 00 00 call 109764 1087b6: 89 c2 mov %eax,%edx if (dd == NULL) { 1087b8: 83 c4 10 add $0x10,%esp 1087bb: 85 c0 test %eax,%eax 1087bd: 0f 84 3d 01 00 00 je 108900 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (name != NULL) { 1087c3: 8b 4d d8 mov -0x28(%ebp),%ecx 1087c6: 85 c9 test %ecx,%ecx 1087c8: 0f 84 6e 01 00 00 je 10893c alloc_name = strdup(name); 1087ce: 83 ec 0c sub $0xc,%esp 1087d1: ff 75 d8 pushl -0x28(%ebp) 1087d4: 89 45 d0 mov %eax,-0x30(%ebp) 1087d7: e8 38 fd 00 00 call 118514 1087dc: 89 45 e4 mov %eax,-0x1c(%ebp) if (alloc_name == NULL) { 1087df: 83 c4 10 add $0x10,%esp 1087e2: 85 c0 test %eax,%eax 1087e4: 8b 55 d0 mov -0x30(%ebp),%edx 1087e7: 0f 84 5b 01 00 00 je 108948 <== NEVER TAKEN return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 1087ed: 56 push %esi 1087ee: 53 push %ebx 1087ef: 68 ff 61 00 00 push $0x61ff 1087f4: 50 push %eax 1087f5: 89 55 d0 mov %edx,-0x30(%ebp) 1087f8: 89 45 cc mov %eax,-0x34(%ebp) 1087fb: e8 40 10 00 00 call 109840 108800: 83 c4 10 add $0x10,%esp 108803: 85 c0 test %eax,%eax 108805: 8b 55 d0 mov -0x30(%ebp),%edx 108808: 8b 4d cc mov -0x34(%ebp),%ecx 10880b: 0f 88 07 01 00 00 js 108918 <== NEVER TAKEN free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 108811: 89 1a mov %ebx,(%edx) 108813: 89 72 04 mov %esi,0x4(%edx) dd->name = alloc_name; 108816: 8b 4d e4 mov -0x1c(%ebp),%ecx 108819: 89 4a 10 mov %ecx,0x10(%edx) dd->uses = 0; 10881c: c7 42 14 00 00 00 00 movl $0x0,0x14(%edx) dd->deleted = false; 108823: c6 42 30 00 movb $0x0,0x30(%edx) *dd_entry = dd; 108827: 89 17 mov %edx,(%edi) *dd_ptr = dd; 108829: 8b 45 08 mov 0x8(%ebp),%eax 10882c: 89 10 mov %edx,(%eax) 10882e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 108830: e9 6c ff ff ff jmp 1087a1 108835: 8d 76 00 lea 0x0(%esi),%esi memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; disktab_size = new_size; } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 108838: 8b 78 04 mov 0x4(%eax),%edi 10883b: 90 nop rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; rtems_device_minor_number new_size = 0; if (old_size == 0) { 10883c: 85 ff test %edi,%edi 10883e: 0f 85 c8 00 00 00 jne 10890c <== NEVER TAKEN 108844: c7 45 e0 08 00 00 00 movl $0x8,-0x20(%ebp) new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; } if (minor >= new_size) { 10884b: 8b 45 e0 mov -0x20(%ebp),%eax 10884e: 39 45 e4 cmp %eax,-0x1c(%ebp) 108851: 72 07 jb 10885a new_size = minor + 1; 108853: 8b 4d e4 mov -0x1c(%ebp),%ecx 108856: 41 inc %ecx 108857: 89 4d e0 mov %ecx,-0x20(%ebp) } table = realloc(table, new_size * sizeof(*table)); 10885a: 83 ec 08 sub $0x8,%esp 10885d: 8b 45 e0 mov -0x20(%ebp),%eax 108860: c1 e0 02 shl $0x2,%eax 108863: 50 push %eax 108864: 52 push %edx 108865: e8 86 1a 00 00 call 10a2f0 10886a: 89 c2 mov %eax,%edx if (table == NULL) { 10886c: 83 c4 10 add $0x10,%esp 10886f: 85 c0 test %eax,%eax 108871: 0f 84 89 00 00 00 je 108900 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 108877: 8b 4d e0 mov -0x20(%ebp),%ecx 10887a: 29 f9 sub %edi,%ecx 10887c: c1 e1 02 shl $0x2,%ecx 10887f: 8d 3c b8 lea (%eax,%edi,4),%edi 108882: 89 7d d4 mov %edi,-0x2c(%ebp) 108885: 31 c0 xor %eax,%eax 108887: f3 aa rep stos %al,%es:(%edi) disktab [major].minor = table; 108889: 8b 45 dc mov -0x24(%ebp),%eax 10888c: 03 05 00 af 12 00 add 0x12af00,%eax 108892: 89 10 mov %edx,(%eax) disktab [major].size = new_size; 108894: 8b 4d e0 mov -0x20(%ebp),%ecx 108897: 89 48 04 mov %ecx,0x4(%eax) 10889a: e9 e9 fe ff ff jmp 108788 10889f: 90 nop rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; 1088a0: 8b 0d 00 af 12 00 mov 0x12af00,%ecx rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 1088a6: 8d 04 3f lea (%edi,%edi,1),%eax 1088a9: 89 45 dc mov %eax,-0x24(%ebp) if (major >= new_size) { 1088ac: 39 c3 cmp %eax,%ebx 1088ae: 72 06 jb 1088b6 <== NEVER TAKEN new_size = major + 1; 1088b0: 8d 43 01 lea 0x1(%ebx),%eax 1088b3: 89 45 dc mov %eax,-0x24(%ebp) } table = realloc(table, new_size * sizeof(*table)); 1088b6: 83 ec 08 sub $0x8,%esp 1088b9: 8b 45 dc mov -0x24(%ebp),%eax 1088bc: c1 e0 03 shl $0x3,%eax 1088bf: 50 push %eax 1088c0: 51 push %ecx 1088c1: 89 55 d0 mov %edx,-0x30(%ebp) 1088c4: e8 27 1a 00 00 call 10a2f0 1088c9: 89 45 e0 mov %eax,-0x20(%ebp) if (table == NULL) { 1088cc: 83 c4 10 add $0x10,%esp 1088cf: 85 c0 test %eax,%eax 1088d1: 8b 55 d0 mov -0x30(%ebp),%edx 1088d4: 74 2a je 108900 <== ALWAYS TAKEN return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 1088d6: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 1088d9: 29 f9 sub %edi,%ecx <== NOT EXECUTED 1088db: c1 e1 03 shl $0x3,%ecx <== NOT EXECUTED 1088de: 8d 3c f8 lea (%eax,%edi,8),%edi <== NOT EXECUTED 1088e1: 89 7d d4 mov %edi,-0x2c(%ebp) <== NOT EXECUTED 1088e4: 31 c0 xor %eax,%eax <== NOT EXECUTED 1088e6: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED disktab = table; 1088e8: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 1088eb: 89 0d 00 af 12 00 mov %ecx,0x12af00 <== NOT EXECUTED disktab_size = new_size; 1088f1: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 1088f4: a3 04 af 12 00 mov %eax,0x12af04 <== NOT EXECUTED 1088f9: e9 69 fe ff ff jmp 108767 <== NOT EXECUTED 1088fe: 66 90 xchg %ax,%ax <== NOT EXECUTED dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; 108900: b8 1a 00 00 00 mov $0x1a,%eax 108905: e9 97 fe ff ff jmp 1087a1 10890a: 66 90 xchg %ax,%ax rtems_device_minor_number new_size = 0; if (old_size == 0) { new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 10890c: 8d 0c 3f lea (%edi,%edi,1),%ecx <== NOT EXECUTED 10890f: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 108912: e9 34 ff ff ff jmp 10884b <== NOT EXECUTED 108917: 90 nop <== NOT EXECUTED } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 108918: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10891b: 51 push %ecx <== NOT EXECUTED 10891c: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 10891f: e8 68 0b 00 00 call 10948c <== NOT EXECUTED free(dd); 108924: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 108927: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED 10892a: e8 5d 0b 00 00 call 10948c <== NOT EXECUTED 10892f: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED return RTEMS_UNSATISFIED; 108934: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108937: e9 65 fe ff ff jmp 1087a1 <== NOT EXECUTED 10893c: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 108943: e9 c9 fe ff ff jmp 108811 if (name != NULL) { alloc_name = strdup(name); if (alloc_name == NULL) { free(dd); 108948: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10894b: 52 push %edx <== NOT EXECUTED 10894c: e8 3b 0b 00 00 call 10948c <== NOT EXECUTED 108951: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED return RTEMS_NO_MEMORY; 108956: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108959: e9 43 fe ff ff jmp 1087a1 <== NOT EXECUTED =============================================================================== 0010eec0 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 10eec0: 55 push %ebp 10eec1: 89 e5 mov %esp,%ebp 10eec3: 83 ec 1c sub $0x1c,%esp 10eec6: 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; 10eec9: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10eecc: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10eecf: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10eed6: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10eedd: 8d 55 ec lea -0x14(%ebp),%edx 10eee0: 52 push %edx 10eee1: ff 70 0c pushl 0xc(%eax) 10eee4: ff 70 08 pushl 0x8(%eax) 10eee7: e8 9c 0a 00 00 call 10f988 np->major, np->minor, (void *) &args ); if ( status ) { 10eeec: 83 c4 10 add $0x10,%esp 10eeef: 85 c0 test %eax,%eax 10eef1: 75 05 jne 10eef8 <== NEVER TAKEN return rtems_deviceio_errno(status); } return 0; } 10eef3: c9 leave 10eef4: c3 ret 10eef5: 8d 76 00 lea 0x0(%esi),%esi np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 10eef8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10eefb: 50 push %eax <== NOT EXECUTED 10eefc: e8 e7 00 00 00 call 10efe8 <== NOT EXECUTED 10ef01: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10ef04: c9 leave <== NOT EXECUTED 10ef05: c3 ret <== NOT EXECUTED =============================================================================== 0010ef18 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10ef18: 55 push %ebp 10ef19: 89 e5 mov %esp,%ebp 10ef1b: 57 push %edi 10ef1c: 56 push %esi 10ef1d: 53 push %ebx 10ef1e: 83 ec 1c sub $0x1c,%esp int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 10ef21: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10ef28: 0f 85 96 00 00 00 jne 10efc4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 10ef2e: 8b 45 14 mov 0x14(%ebp),%eax 10ef31: 8b 00 mov (%eax),%eax 10ef33: 89 45 e4 mov %eax,-0x1c(%ebp) if (!device_name_table) 10ef36: 85 c0 test %eax,%eax 10ef38: 0f 84 98 00 00 00 je 10efd6 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10ef3e: 8b 15 50 f1 11 00 mov 0x11f150,%edx 10ef44: 89 55 e0 mov %edx,-0x20(%ebp) 10ef47: 85 d2 test %edx,%edx 10ef49: 74 38 je 10ef83 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 10ef4b: 31 c0 xor %eax,%eax 10ef4d: 31 db xor %ebx,%ebx for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 10ef4f: 8d 04 80 lea (%eax,%eax,4),%eax 10ef52: 8b 55 e4 mov -0x1c(%ebp),%edx 10ef55: 8d 3c 82 lea (%edx,%eax,4),%edi 10ef58: 8b 37 mov (%edi),%esi 10ef5a: 85 f6 test %esi,%esi 10ef5c: 74 1d je 10ef7b continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10ef5e: 50 push %eax 10ef5f: ff 75 0c pushl 0xc(%ebp) 10ef62: 56 push %esi 10ef63: ff 75 08 pushl 0x8(%ebp) 10ef66: e8 e1 23 00 00 call 11134c 10ef6b: 83 c4 10 add $0x10,%esp 10ef6e: 85 c0 test %eax,%eax 10ef70: 75 09 jne 10ef7b <== NEVER TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10ef72: 8b 45 0c mov 0xc(%ebp),%eax 10ef75: 80 3c 06 00 cmpb $0x0,(%esi,%eax,1) 10ef79: 74 21 je 10ef9c <== ALWAYS TAKEN /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10ef7b: 43 inc %ebx 10ef7c: 89 d8 mov %ebx,%eax 10ef7e: 39 5d e0 cmp %ebx,-0x20(%ebp) 10ef81: 77 cc ja 10ef4f pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10ef83: e8 10 18 00 00 call 110798 <__errno> 10ef88: c7 00 02 00 00 00 movl $0x2,(%eax) 10ef8e: b8 ff ff ff ff mov $0xffffffff,%eax } 10ef93: 8d 65 f4 lea -0xc(%ebp),%esp 10ef96: 5b pop %ebx 10ef97: 5e pop %esi 10ef98: 5f pop %edi 10ef99: c9 leave 10ef9a: c3 ret 10ef9b: 90 nop if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 10ef9c: 8b 55 14 mov 0x14(%ebp),%edx 10ef9f: 89 3a mov %edi,(%edx) pathloc->handlers = &devFS_file_handlers; 10efa1: c7 42 08 80 10 12 00 movl $0x121080,0x8(%edx) pathloc->ops = &devFS_ops; 10efa8: c7 42 0c 20 10 12 00 movl $0x121020,0xc(%edx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10efaf: a1 d8 10 12 00 mov 0x1210d8,%eax 10efb4: 8b 40 28 mov 0x28(%eax),%eax 10efb7: 89 42 10 mov %eax,0x10(%edx) 10efba: 31 c0 xor %eax,%eax return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 10efbc: 8d 65 f4 lea -0xc(%ebp),%esp 10efbf: 5b pop %ebx 10efc0: 5e pop %esi 10efc1: 5f pop %edi 10efc2: c9 leave 10efc3: c3 ret int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 10efc4: e8 cf 17 00 00 call 110798 <__errno> <== NOT EXECUTED 10efc9: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10efcf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10efd4: eb e6 jmp 10efbc <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 10efd6: e8 bd 17 00 00 call 110798 <__errno> <== NOT EXECUTED 10efdb: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10efe1: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10efe4: eb d6 jmp 10efbc <== NOT EXECUTED =============================================================================== 00107bec : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 107bec: 55 push %ebp 107bed: 89 e5 mov %esp,%ebp 107bef: 57 push %edi 107bf0: 53 push %ebx 107bf1: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 107bf4: 83 ec 0c sub $0xc,%esp 107bf7: a1 50 f1 11 00 mov 0x11f150,%eax 107bfc: 8d 04 80 lea (%eax,%eax,4),%eax 107bff: c1 e0 02 shl $0x2,%eax 107c02: 50 push %eax 107c03: e8 34 6e 00 00 call 10ea3c <_Workspace_Allocate> 107c08: 89 c2 mov %eax,%edx sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 107c0a: 83 c4 10 add $0x10,%esp 107c0d: 85 c0 test %eax,%eax 107c0f: 74 2b je 107c3c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 107c11: a1 50 f1 11 00 mov 0x11f150,%eax 107c16: 8d 0c 80 lea (%eax,%eax,4),%ecx 107c19: c1 e1 02 shl $0x2,%ecx 107c1c: 31 c0 xor %eax,%eax 107c1e: 89 d7 mov %edx,%edi 107c20: f3 aa rep stos %al,%es:(%edi) device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 107c22: c7 43 24 80 10 12 00 movl $0x121080,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 107c29: c7 43 28 20 10 12 00 movl $0x121020,0x28(%ebx) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 107c30: 89 53 1c mov %edx,0x1c(%ebx) 107c33: 31 c0 xor %eax,%eax return 0; } 107c35: 8d 65 f8 lea -0x8(%ebp),%esp 107c38: 5b pop %ebx 107c39: 5f pop %edi 107c3a: c9 leave 107c3b: c3 ret sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 107c3c: e8 57 8b 00 00 call 110798 <__errno> <== NOT EXECUTED 107c41: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107c47: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107c4c: eb e7 jmp 107c35 <== NOT EXECUTED =============================================================================== 00107da8 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 107da8: 55 push %ebp 107da9: 89 e5 mov %esp,%ebp 107dab: 83 ec 1c sub $0x1c,%esp 107dae: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 107db1: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 107db4: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 107db7: 8b 55 0c mov 0xc(%ebp),%edx 107dba: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 107dbd: 8b 55 10 mov 0x10(%ebp),%edx 107dc0: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( 107dc3: 8d 55 e8 lea -0x18(%ebp),%edx 107dc6: 52 push %edx 107dc7: ff 70 0c pushl 0xc(%eax) 107dca: ff 70 08 pushl 0x8(%eax) 107dcd: e8 fa 41 00 00 call 10bfcc np->major, np->minor, (void *) &args ); if ( status ) 107dd2: 83 c4 10 add $0x10,%esp 107dd5: 85 c0 test %eax,%eax 107dd7: 75 07 jne 107de0 <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 107dd9: 8b 45 f4 mov -0xc(%ebp),%eax } 107ddc: c9 leave 107ddd: c3 ret 107dde: 66 90 xchg %ax,%ax np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107de0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107de3: 50 push %eax <== NOT EXECUTED 107de4: e8 ff 71 00 00 call 10efe8 <== NOT EXECUTED 107de9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return args.ioctl_return; } 107dec: c9 leave <== NOT EXECUTED 107ded: c3 ret <== NOT EXECUTED =============================================================================== 00107c50 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 107c50: 55 push %ebp 107c51: 89 e5 mov %esp,%ebp 107c53: 57 push %edi 107c54: 56 push %esi 107c55: 53 push %ebx 107c56: 83 ec 1c sub $0x1c,%esp 107c59: 8b 7d 08 mov 0x8(%ebp),%edi 107c5c: 8b 4d 10 mov 0x10(%ebp),%ecx 107c5f: 8b 55 14 mov 0x14(%ebp),%edx * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 107c62: 80 3f 64 cmpb $0x64,(%edi) 107c65: 0f 84 dd 00 00 00 je 107d48 <== ALWAYS TAKEN (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 107c6b: 8b 45 0c mov 0xc(%ebp),%eax 107c6e: 25 00 f0 00 00 and $0xf000,%eax 107c73: 3d 00 60 00 00 cmp $0x6000,%eax 107c78: 74 0b je 107c85 <== NEVER TAKEN 107c7a: 3d 00 20 00 00 cmp $0x2000,%eax 107c7f: 0f 85 e3 00 00 00 jne 107d68 <== NEVER TAKEN ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 107c85: 89 4d d8 mov %ecx,-0x28(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107c88: 89 55 dc mov %edx,-0x24(%ebp) rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 107c8b: 8b 45 18 mov 0x18(%ebp),%eax 107c8e: 8b 30 mov (%eax),%esi if (!device_name_table) 107c90: 85 f6 test %esi,%esi 107c92: 0f 84 f2 00 00 00 je 107d8a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107c98: 8b 15 50 f1 11 00 mov 0x11f150,%edx 107c9e: 85 d2 test %edx,%edx 107ca0: 0f 84 d4 00 00 00 je 107d7a <== NEVER TAKEN rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 107ca6: 31 c0 xor %eax,%eax 107ca8: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) 107caf: 31 db xor %ebx,%ebx 107cb1: 89 7d e4 mov %edi,-0x1c(%ebp) 107cb4: 89 d7 mov %edx,%edi 107cb6: eb 1a jmp 107cd2 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 107cb8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107cbb: 50 push %eax <== NOT EXECUTED 107cbc: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 107cbf: e8 60 95 00 00 call 111224 <== NOT EXECUTED 107cc4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107cc7: 85 c0 test %eax,%eax <== NOT EXECUTED 107cc9: 74 65 je 107d30 <== NOT EXECUTED /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107ccb: 43 inc %ebx <== NOT EXECUTED 107ccc: 89 d8 mov %ebx,%eax <== NOT EXECUTED 107cce: 39 fb cmp %edi,%ebx <== NOT EXECUTED 107cd0: 73 16 jae 107ce8 <== NOT EXECUTED if (device_name_table[i].device_name == NULL) 107cd2: 8d 04 80 lea (%eax,%eax,4),%eax 107cd5: 8b 04 86 mov (%esi,%eax,4),%eax 107cd8: 85 c0 test %eax,%eax 107cda: 75 dc jne 107cb8 <== NEVER TAKEN slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 107cdc: 89 5d e0 mov %ebx,-0x20(%ebp) /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107cdf: 43 inc %ebx 107ce0: 89 d8 mov %ebx,%eax 107ce2: 39 fb cmp %edi,%ebx 107ce4: 72 ec jb 107cd2 107ce6: 66 90 xchg %ax,%ax 107ce8: 8b 7d e4 mov -0x1c(%ebp),%edi else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 107ceb: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp) 107cef: 0f 84 85 00 00 00 je 107d7a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 107cf5: 9c pushf 107cf6: fa cli 107cf7: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 107cf8: 8b 55 e0 mov -0x20(%ebp),%edx 107cfb: 8d 04 92 lea (%edx,%edx,4),%eax 107cfe: 8d 14 86 lea (%esi,%eax,4),%edx 107d01: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 107d03: 31 c0 xor %eax,%eax 107d05: b9 ff ff ff ff mov $0xffffffff,%ecx 107d0a: f2 ae repnz scas %es:(%edi),%al 107d0c: f7 d1 not %ecx 107d0e: 49 dec %ecx 107d0f: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 107d12: 8b 45 d8 mov -0x28(%ebp),%eax 107d15: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 107d18: 8b 45 dc mov -0x24(%ebp),%eax 107d1b: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 107d1e: 8b 45 0c mov 0xc(%ebp),%eax 107d21: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 107d24: 53 push %ebx 107d25: 9d popf 107d26: 31 c0 xor %eax,%eax return 0; } 107d28: 8d 65 f4 lea -0xc(%ebp),%esp 107d2b: 5b pop %ebx 107d2c: 5e pop %esi 107d2d: 5f pop %edi 107d2e: c9 leave 107d2f: c3 ret for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 107d30: e8 63 8a 00 00 call 110798 <__errno> <== NOT EXECUTED 107d35: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED 107d3b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 107d40: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107d43: 5b pop %ebx <== NOT EXECUTED 107d44: 5e pop %esi <== NOT EXECUTED 107d45: 5f pop %edi <== NOT EXECUTED 107d46: c9 leave <== NOT EXECUTED 107d47: c3 ret <== NOT EXECUTED * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 107d48: 80 7f 01 65 cmpb $0x65,0x1(%edi) 107d4c: 0f 85 19 ff ff ff jne 107c6b <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 107d52: 80 7f 02 76 cmpb $0x76,0x2(%edi) 107d56: 0f 85 0f ff ff ff jne 107c6b <== NEVER TAKEN 107d5c: 80 7f 03 00 cmpb $0x0,0x3(%edi) 107d60: 0f 85 05 ff ff ff jne 107c6b 107d66: eb be jmp 107d26 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 107d68: e8 2b 8a 00 00 call 110798 <__errno> <== NOT EXECUTED 107d6d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107d73: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107d78: eb ae jmp 107d28 <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 107d7a: e8 19 8a 00 00 call 110798 <__errno> <== NOT EXECUTED 107d7f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107d85: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d88: eb 9e jmp 107d28 <== NOT EXECUTED rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 107d8a: e8 09 8a 00 00 call 110798 <__errno> <== NOT EXECUTED 107d8f: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107d95: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d98: eb 8e jmp 107d28 <== NOT EXECUTED =============================================================================== 00107df0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 107df0: 55 push %ebp 107df1: 89 e5 mov %esp,%ebp 107df3: 83 ec 1c sub $0x1c,%esp 107df6: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 107df9: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107dfc: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 107dff: 8b 40 14 mov 0x14(%eax),%eax 107e02: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 107e05: 8b 45 14 mov 0x14(%ebp),%eax 107e08: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 107e0b: 8d 45 ec lea -0x14(%ebp),%eax 107e0e: 50 push %eax 107e0f: ff 72 0c pushl 0xc(%edx) 107e12: ff 72 08 pushl 0x8(%edx) 107e15: e8 c6 42 00 00 call 10c0e0 np->major, np->minor, (void *) &args ); if ( status ) 107e1a: 83 c4 10 add $0x10,%esp 107e1d: 85 c0 test %eax,%eax 107e1f: 75 03 jne 107e24 <== NEVER TAKEN return rtems_deviceio_errno(status); return 0; } 107e21: c9 leave 107e22: c3 ret 107e23: 90 nop np->major, np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107e24: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e27: 50 push %eax <== NOT EXECUTED 107e28: e8 bb 71 00 00 call 10efe8 <== NOT EXECUTED 107e2d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 107e30: c9 leave <== NOT EXECUTED 107e31: c3 ret <== NOT EXECUTED =============================================================================== 00107e34 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 107e34: 55 push %ebp <== NOT EXECUTED 107e35: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107e37: 53 push %ebx <== NOT EXECUTED 107e38: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 107e3b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 107e3e: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 107e41: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 107e44: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 107e47: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 107e4a: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 107e4d: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 107e50: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107e53: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 107e56: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 107e59: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 107e5c: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 107e5f: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 107e62: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 107e69: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 107e6c: 50 push %eax <== NOT EXECUTED 107e6d: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED 107e70: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED 107e73: e8 b4 42 00 00 call 10c12c <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 107e78: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107e7b: 85 c0 test %eax,%eax <== NOT EXECUTED 107e7d: 75 09 jne 107e88 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107e7f: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 107e82: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107e85: c9 leave <== NOT EXECUTED 107e86: c3 ret <== NOT EXECUTED 107e87: 90 nop <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107e88: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e8b: 50 push %eax <== NOT EXECUTED 107e8c: e8 57 71 00 00 call 10efe8 <== NOT EXECUTED 107e91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 107e94: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107e97: c9 leave <== NOT EXECUTED 107e98: c3 ret <== NOT EXECUTED =============================================================================== 00107e9c : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 107e9c: 55 push %ebp 107e9d: 89 e5 mov %esp,%ebp 107e9f: 53 push %ebx 107ea0: 83 ec 04 sub $0x4,%esp 107ea3: 8b 55 0c mov 0xc(%ebp),%edx rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 107ea6: 8b 45 08 mov 0x8(%ebp),%eax 107ea9: 8b 00 mov (%eax),%eax if (!the_dev) 107eab: 85 c0 test %eax,%eax 107ead: 74 18 je 107ec7 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 107eaf: 8b 48 0c mov 0xc(%eax),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 107eb2: 8b 58 08 mov 0x8(%eax),%ebx 107eb5: 89 5a 18 mov %ebx,0x18(%edx) 107eb8: 89 4a 1c mov %ecx,0x1c(%edx) buf->st_mode = the_dev->mode; 107ebb: 8b 40 10 mov 0x10(%eax),%eax 107ebe: 89 42 0c mov %eax,0xc(%edx) 107ec1: 31 c0 xor %eax,%eax return 0; } 107ec3: 5a pop %edx 107ec4: 5b pop %ebx 107ec5: c9 leave 107ec6: c3 ret { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 107ec7: e8 cc 88 00 00 call 110798 <__errno> <== NOT EXECUTED 107ecc: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107ed2: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107ed7: eb ea jmp 107ec3 <== NOT EXECUTED =============================================================================== 00107edc : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 107edc: 55 push %ebp 107edd: 89 e5 mov %esp,%ebp 107edf: 53 push %ebx 107ee0: 83 ec 28 sub $0x28,%esp 107ee3: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 107ee6: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107ee9: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 107eec: 8b 48 0c mov 0xc(%eax),%ecx 107eef: 8b 58 10 mov 0x10(%eax),%ebx 107ef2: 89 4d e0 mov %ecx,-0x20(%ebp) 107ef5: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 107ef8: 8b 4d 0c mov 0xc(%ebp),%ecx 107efb: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 107efe: 8b 4d 10 mov 0x10(%ebp),%ecx 107f01: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 107f04: 8b 40 14 mov 0x14(%eax),%eax 107f07: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 107f0a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 107f11: 8d 45 dc lea -0x24(%ebp),%eax 107f14: 50 push %eax 107f15: ff 72 0c pushl 0xc(%edx) 107f18: ff 72 08 pushl 0x8(%edx) 107f1b: e8 58 42 00 00 call 10c178 np->major, np->minor, (void *) &args ); if ( status ) 107f20: 83 c4 10 add $0x10,%esp 107f23: 85 c0 test %eax,%eax 107f25: 75 09 jne 107f30 <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107f27: 8b 45 f4 mov -0xc(%ebp),%eax } 107f2a: 8b 5d fc mov -0x4(%ebp),%ebx 107f2d: c9 leave 107f2e: c3 ret 107f2f: 90 nop np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107f30: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107f33: 50 push %eax <== NOT EXECUTED 107f34: e8 af 70 00 00 call 10efe8 <== NOT EXECUTED 107f39: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 107f3c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107f3f: c9 leave <== NOT EXECUTED 107f40: c3 ret <== NOT EXECUTED =============================================================================== 00113200 : */ int device_close( rtems_libio_t *iop ) { 113200: 55 push %ebp 113201: 89 e5 mov %esp,%ebp 113203: 83 ec 1c sub $0x1c,%esp 113206: 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; 113209: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 11320c: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 11320f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 113216: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 11321d: 8d 55 ec lea -0x14(%ebp),%edx 113220: 52 push %edx 113221: ff 70 54 pushl 0x54(%eax) 113224: ff 70 50 pushl 0x50(%eax) 113227: e8 88 08 00 00 call 113ab4 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 11322c: 83 c4 10 add $0x10,%esp 11322f: 85 c0 test %eax,%eax 113231: 75 05 jne 113238 <== NEVER TAKEN return rtems_deviceio_errno(status); } return 0; } 113233: c9 leave 113234: c3 ret 113235: 8d 76 00 lea 0x0(%esi),%esi the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 113238: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11323b: 50 push %eax <== NOT EXECUTED 11323c: e8 3f 0b 00 00 call 113d80 <== NOT EXECUTED 113241: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 113244: c9 leave <== NOT EXECUTED 113245: c3 ret <== NOT EXECUTED =============================================================================== 001130e8 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 1130e8: 55 push %ebp 1130e9: 89 e5 mov %esp,%ebp 1130eb: 83 ec 1c sub $0x1c,%esp 1130ee: 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; 1130f1: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 1130f4: 8b 55 0c mov 0xc(%ebp),%edx 1130f7: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 1130fa: 8b 55 10 mov 0x10(%ebp),%edx 1130fd: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->file_info; 113100: 8b 40 38 mov 0x38(%eax),%eax status = rtems_io_control( 113103: 8d 55 e8 lea -0x18(%ebp),%edx 113106: 52 push %edx 113107: ff 70 54 pushl 0x54(%eax) 11310a: ff 70 50 pushl 0x50(%eax) 11310d: e8 ee 09 00 00 call 113b00 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 113112: 83 c4 10 add $0x10,%esp 113115: 85 c0 test %eax,%eax 113117: 75 07 jne 113120 <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 113119: 8b 45 f4 mov -0xc(%ebp),%eax } 11311c: c9 leave 11311d: c3 ret 11311e: 66 90 xchg %ax,%ax the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 113120: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113123: 50 push %eax <== NOT EXECUTED 113124: e8 57 0c 00 00 call 113d80 <== NOT EXECUTED 113129: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return args.ioctl_return; } 11312c: c9 leave <== NOT EXECUTED 11312d: c3 ret <== NOT EXECUTED =============================================================================== 00113248 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 113248: 55 push %ebp 113249: 89 e5 mov %esp,%ebp 11324b: 83 ec 1c sub $0x1c,%esp 11324e: 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; 113251: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 113254: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 113257: 8b 40 14 mov 0x14(%eax),%eax 11325a: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 11325d: 8b 45 14 mov 0x14(%ebp),%eax 113260: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 113263: 8d 45 ec lea -0x14(%ebp),%eax 113266: 50 push %eax 113267: ff 72 54 pushl 0x54(%edx) 11326a: ff 72 50 pushl 0x50(%edx) 11326d: e8 da 08 00 00 call 113b4c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 113272: 83 c4 10 add $0x10,%esp 113275: 85 c0 test %eax,%eax 113277: 75 03 jne 11327c <== NEVER TAKEN return rtems_deviceio_errno(status); return 0; } 113279: c9 leave 11327a: c3 ret 11327b: 90 nop the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 11327c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11327f: 50 push %eax <== NOT EXECUTED 113280: e8 fb 0a 00 00 call 113d80 <== NOT EXECUTED 113285: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 113288: c9 leave <== NOT EXECUTED 113289: c3 ret <== NOT EXECUTED =============================================================================== 00113198 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 113198: 55 push %ebp 113199: 89 e5 mov %esp,%ebp 11319b: 53 push %ebx 11319c: 83 ec 28 sub $0x28,%esp 11319f: 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; 1131a2: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 1131a5: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 1131a8: 8b 48 0c mov 0xc(%eax),%ecx 1131ab: 8b 58 10 mov 0x10(%eax),%ebx 1131ae: 89 4d e0 mov %ecx,-0x20(%ebp) 1131b1: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = buffer; 1131b4: 8b 4d 0c mov 0xc(%ebp),%ecx 1131b7: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 1131ba: 8b 4d 10 mov 0x10(%ebp),%ecx 1131bd: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 1131c0: 8b 40 14 mov 0x14(%eax),%eax 1131c3: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 1131c6: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_read( 1131cd: 8d 45 dc lea -0x24(%ebp),%eax 1131d0: 50 push %eax 1131d1: ff 72 54 pushl 0x54(%edx) 1131d4: ff 72 50 pushl 0x50(%edx) 1131d7: e8 bc 09 00 00 call 113b98 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 1131dc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1131df: 85 c0 test %eax,%eax <== NOT EXECUTED 1131e1: 75 09 jne 1131ec <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 1131e3: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 1131e6: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1131e9: c9 leave <== NOT EXECUTED 1131ea: c3 ret <== NOT EXECUTED 1131eb: 90 nop <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 1131ec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1131ef: 50 push %eax <== NOT EXECUTED 1131f0: e8 8b 0b 00 00 call 113d80 <== NOT EXECUTED 1131f5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 1131f8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1131fb: c9 leave <== NOT EXECUTED 1131fc: c3 ret <== NOT EXECUTED =============================================================================== 00113130 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 113130: 55 push %ebp 113131: 89 e5 mov %esp,%ebp 113133: 53 push %ebx 113134: 83 ec 28 sub $0x28,%esp 113137: 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; 11313a: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 11313d: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 113140: 8b 48 0c mov 0xc(%eax),%ecx 113143: 8b 58 10 mov 0x10(%eax),%ebx 113146: 89 4d e0 mov %ecx,-0x20(%ebp) 113149: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 11314c: 8b 4d 0c mov 0xc(%ebp),%ecx 11314f: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 113152: 8b 4d 10 mov 0x10(%ebp),%ecx 113155: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 113158: 8b 40 14 mov 0x14(%eax),%eax 11315b: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 11315e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 113165: 8d 45 dc lea -0x24(%ebp),%eax 113168: 50 push %eax 113169: ff 72 54 pushl 0x54(%edx) 11316c: ff 72 50 pushl 0x50(%edx) 11316f: e8 70 0a 00 00 call 113be4 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 113174: 83 c4 10 add $0x10,%esp 113177: 85 c0 test %eax,%eax 113179: 75 09 jne 113184 <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 11317b: 8b 45 f4 mov -0xc(%ebp),%eax } 11317e: 8b 5d fc mov -0x4(%ebp),%ebx 113181: c9 leave 113182: c3 ret 113183: 90 nop the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 113184: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113187: 50 push %eax <== NOT EXECUTED 113188: e8 f3 0b 00 00 call 113d80 <== NOT EXECUTED 11318d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 113190: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 113193: c9 leave <== NOT EXECUTED 113194: c3 ret <== NOT EXECUTED =============================================================================== 001083fc : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 1083fc: 55 push %ebp 1083fd: 89 e5 mov %esp,%ebp 1083ff: 83 ec 0c sub $0xc,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 108402: 6a 00 push $0x0 108404: 6a 00 push $0x0 108406: ff 35 08 af 12 00 pushl 0x12af08 10840c: e8 73 4a 00 00 call 10ce84 if (sc == RTEMS_SUCCESSFUL) { 108411: 83 c4 10 add $0x10,%esp 108414: 85 c0 test %eax,%eax 108416: 75 0c jne 108424 <== NEVER TAKEN diskdevs_protected = true; 108418: c6 05 0c af 12 00 01 movb $0x1,0x12af0c 10841f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } 108421: c9 leave 108422: c3 ret 108423: 90 nop disk_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc == RTEMS_SUCCESSFUL) { 108424: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } 108429: c9 leave <== NOT EXECUTED 10842a: c3 ret <== NOT EXECUTED =============================================================================== 0010842c : static void disk_unlock(void) { 10842c: 55 push %ebp 10842d: 89 e5 mov %esp,%ebp 10842f: 83 ec 14 sub $0x14,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 108432: c6 05 0c af 12 00 00 movb $0x0,0x12af0c sc = rtems_semaphore_release(diskdevs_mutex); 108439: ff 35 08 af 12 00 pushl 0x12af08 10843f: e8 3c 4b 00 00 call 10cf80 if (sc != RTEMS_SUCCESSFUL) { 108444: 83 c4 10 add $0x10,%esp 108447: 85 c0 test %eax,%eax 108449: 75 02 jne 10844d <== NEVER TAKEN /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); } } 10844b: c9 leave 10844c: c3 ret diskdevs_protected = false; sc = rtems_semaphore_release(diskdevs_mutex); if (sc != RTEMS_SUCCESSFUL) { /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 10844d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108450: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED 108455: e8 f6 4f 00 00 call 10d450 <== NOT EXECUTED =============================================================================== 0010a324 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 10a324: 55 push %ebp 10a325: 89 e5 mov %esp,%ebp 10a327: 53 push %ebx 10a328: 83 ec 04 sub $0x4,%esp 10a32b: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 10a32d: 8b 90 b4 00 00 00 mov 0xb4(%eax),%edx 10a333: 85 d2 test %edx,%edx 10a335: 75 28 jne 10a35f 10a337: eb 3b jmp 10a374 10a339: 8d 76 00 lea 0x0(%esi),%esi rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 10a33c: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 10a343: 00 00 00 rtems_interrupt_enable (level); 10a346: 50 push %eax 10a347: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 10a348: 50 push %eax 10a349: 6a 00 push $0x0 10a34b: 6a 00 push $0x0 10a34d: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10a353: e8 8c 19 00 00 call 10bce4 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 10a358: 83 c4 10 add $0x10,%esp 10a35b: 85 c0 test %eax,%eax 10a35d: 75 1a jne 10a379 <== NEVER TAKEN { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 10a35f: 9c pushf 10a360: fa cli 10a361: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 10a362: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 10a368: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 10a36e: 39 d1 cmp %edx,%ecx 10a370: 75 ca jne 10a33c RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 10a372: 50 push %eax 10a373: 9d popf } } 10a374: 8b 5d fc mov -0x4(%ebp),%ebx 10a377: c9 leave 10a378: c3 ret rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 10a379: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a37c: 50 push %eax <== NOT EXECUTED 10a37d: e8 72 1f 00 00 call 10c2f4 <== NOT EXECUTED =============================================================================== 00108d68 : int dup2( int fildes, int fildes2 ) { 108d68: 55 push %ebp 108d69: 89 e5 mov %esp,%ebp 108d6b: 57 push %edi 108d6c: 56 push %esi 108d6d: 53 push %ebx 108d6e: 83 ec 64 sub $0x64,%esp 108d71: 8b 75 08 mov 0x8(%ebp),%esi 108d74: 8b 7d 0c mov 0xc(%ebp),%edi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 108d77: 8d 5d a0 lea -0x60(%ebp),%ebx 108d7a: 53 push %ebx 108d7b: 56 push %esi 108d7c: e8 73 05 00 00 call 1092f4 if ( status == -1 ) 108d81: 83 c4 10 add $0x10,%esp 108d84: 40 inc %eax 108d85: 75 0d jne 108d94 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 108d87: b8 ff ff ff ff mov $0xffffffff,%eax } 108d8c: 8d 65 f4 lea -0xc(%ebp),%esp 108d8f: 5b pop %ebx 108d90: 5e pop %esi 108d91: 5f pop %edi 108d92: c9 leave 108d93: c3 ret /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 108d94: 83 ec 08 sub $0x8,%esp 108d97: 53 push %ebx 108d98: 57 push %edi 108d99: e8 56 05 00 00 call 1092f4 if ( status == -1 ) 108d9e: 83 c4 10 add $0x10,%esp 108da1: 40 inc %eax 108da2: 74 e3 je 108d87 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 108da4: 50 push %eax <== NOT EXECUTED 108da5: 57 push %edi <== NOT EXECUTED 108da6: 6a 00 push $0x0 <== NOT EXECUTED 108da8: 56 push %esi <== NOT EXECUTED 108da9: e8 f6 01 00 00 call 108fa4 <== NOT EXECUTED 108dae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108db1: eb d9 jmp 108d8c <== NOT EXECUTED =============================================================================== 00109e98 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 109e98: 55 push %ebp <== NOT EXECUTED 109e99: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109e9b: 53 push %ebx <== NOT EXECUTED 109e9c: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 109e9f: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED 109ea3: 74 1b je 109ec0 <== NOT EXECUTED 109ea5: 0f b6 c8 movzbl %al,%ecx <== NOT EXECUTED 109ea8: 8b 1d c4 50 12 00 mov 0x1250c4,%ebx <== NOT EXECUTED 109eae: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) <== NOT EXECUTED 109eb3: 74 0b je 109ec0 <== NOT EXECUTED 109eb5: 3c 09 cmp $0x9,%al <== NOT EXECUTED 109eb7: 74 07 je 109ec0 <== NOT EXECUTED 109eb9: 3c 0a cmp $0xa,%al <== NOT EXECUTED 109ebb: 75 13 jne 109ed0 <== NOT EXECUTED 109ebd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 109ec0: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109ec3: e8 94 fe ff ff call 109d5c <== NOT EXECUTED } } 109ec8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109ecb: c9 leave <== NOT EXECUTED 109ecc: c3 ret <== NOT EXECUTED 109ecd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 109ed0: c6 45 f6 5e movb $0x5e,-0xa(%ebp) <== NOT EXECUTED echobuf[1] = c ^ 0x40; 109ed4: 83 f0 40 xor $0x40,%eax <== NOT EXECUTED 109ed7: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 109eda: 50 push %eax <== NOT EXECUTED 109edb: 52 push %edx <== NOT EXECUTED 109edc: 6a 02 push $0x2 <== NOT EXECUTED 109ede: 8d 45 f6 lea -0xa(%ebp),%eax <== NOT EXECUTED 109ee1: 50 push %eax <== NOT EXECUTED 109ee2: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 109ee5: e8 3e fd ff ff call 109c28 <== NOT EXECUTED tty->column += 2; 109eea: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109eed: 83 42 28 02 addl $0x2,0x28(%edx) <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 109ef1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED tty->column += 2; } else { oproc (c, tty); } } 109ef4: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109ef7: c9 leave <== NOT EXECUTED 109ef8: c3 ret <== NOT EXECUTED =============================================================================== 0012e490 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 12e490: 55 push %ebp <== NOT EXECUTED 12e491: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12e493: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp != NULL) 12e496: a1 24 29 17 00 mov 0x172924,%eax <== NOT EXECUTED 12e49b: 85 c0 test %eax,%eax <== NOT EXECUTED 12e49d: 74 0c je 12e4ab <== NOT EXECUTED fclose(group_fp); 12e49f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12e4a2: 50 push %eax <== NOT EXECUTED 12e4a3: e8 30 84 01 00 call 1468d8 <== NOT EXECUTED 12e4a8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12e4ab: c9 leave <== NOT EXECUTED 12e4ac: c3 ret <== NOT EXECUTED =============================================================================== 0012e4b0 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 12e4b0: 55 push %ebp <== NOT EXECUTED 12e4b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12e4b3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp != NULL) 12e4b6: a1 24 28 17 00 mov 0x172824,%eax <== NOT EXECUTED 12e4bb: 85 c0 test %eax,%eax <== NOT EXECUTED 12e4bd: 74 0c je 12e4cb <== NOT EXECUTED fclose(passwd_fp); 12e4bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12e4c2: 50 push %eax <== NOT EXECUTED 12e4c3: e8 10 84 01 00 call 1468d8 <== NOT EXECUTED 12e4c8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12e4cb: c9 leave <== NOT EXECUTED 12e4cc: c3 ret <== NOT EXECUTED =============================================================================== 00109efc : * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { 109efc: 55 push %ebp <== NOT EXECUTED 109efd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109eff: 57 push %edi <== NOT EXECUTED 109f00: 56 push %esi <== NOT EXECUTED 109f01: 53 push %ebx <== NOT EXECUTED 109f02: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 109f05: 89 c3 mov %eax,%ebx <== NOT EXECUTED 109f07: 89 d7 mov %edx,%edi <== NOT EXECUTED if (tty->ccount == 0) 109f09: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED 109f0c: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109f0e: 0f 84 84 00 00 00 je 109f98 <== NOT EXECUTED return; if (lineFlag) { 109f14: 85 d2 test %edx,%edx <== NOT EXECUTED 109f16: 0f 85 84 00 00 00 jne 109fa0 <== NOT EXECUTED 109f1c: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 109f1f: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 109f22: eb 1d jmp 109f41 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109f24: 80 e6 02 and $0x2,%dh <== NOT EXECUTED 109f27: 0f 85 37 01 00 00 jne 10a064 <== NOT EXECUTED 109f2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 109f30: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109f33: 85 d2 test %edx,%edx <== NOT EXECUTED 109f35: 74 61 je 109f98 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 109f37: 8b 4b 20 mov 0x20(%ebx),%ecx <== NOT EXECUTED 109f3a: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109f3c: 74 5a je 109f98 <== NOT EXECUTED 109f3e: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 109f41: 8b 7b 1c mov 0x1c(%ebx),%edi <== NOT EXECUTED 109f44: 49 dec %ecx <== NOT EXECUTED 109f45: 89 4b 20 mov %ecx,0x20(%ebx) <== NOT EXECUTED 109f48: 8a 04 0f mov (%edi,%ecx,1),%al <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 109f4b: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 109f4e: 74 e0 je 109f30 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 109f50: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED 109f53: 85 f6 test %esi,%esi <== NOT EXECUTED 109f55: 75 09 jne 109f60 <== NOT EXECUTED 109f57: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 109f5a: 0f 84 f0 00 00 00 je 10a050 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 109f60: 3c 09 cmp $0x9,%al <== NOT EXECUTED 109f62: 74 58 je 109fbc <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109f64: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109f67: 8d 70 01 lea 0x1(%eax),%esi <== NOT EXECUTED 109f6a: a1 c4 50 12 00 mov 0x1250c4,%eax <== NOT EXECUTED 109f6f: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 109f73: 75 af jne 109f24 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 109f75: 51 push %ecx <== NOT EXECUTED 109f76: 53 push %ebx <== NOT EXECUTED 109f77: 6a 03 push $0x3 <== NOT EXECUTED 109f79: 68 72 18 12 00 push $0x121872 <== NOT EXECUTED 109f7e: e8 a5 fc ff ff call 109c28 <== NOT EXECUTED if (tty->column) 109f83: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 109f86: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109f89: 85 c0 test %eax,%eax <== NOT EXECUTED 109f8b: 74 a3 je 109f30 <== NOT EXECUTED tty->column--; 109f8d: 48 dec %eax <== NOT EXECUTED 109f8e: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } } } if (!lineFlag) 109f91: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109f94: 85 d2 test %edx,%edx <== NOT EXECUTED 109f96: 75 9f jne 109f37 <== NOT EXECUTED break; } } 109f98: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109f9b: 5b pop %ebx <== NOT EXECUTED 109f9c: 5e pop %esi <== NOT EXECUTED 109f9d: 5f pop %edi <== NOT EXECUTED 109f9e: c9 leave <== NOT EXECUTED 109f9f: c3 ret <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 109fa0: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 109fa3: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 109fa6: 0f 84 94 00 00 00 je 10a040 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 109fac: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 109faf: 0f 84 eb 00 00 00 je 10a0a0 <== NOT EXECUTED 109fb5: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 109fb8: eb 87 jmp 109f41 <== NOT EXECUTED 109fba: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 109fbc: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109fbf: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109fc1: 74 46 je 10a009 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 109fc3: a1 c4 50 12 00 mov 0x1250c4,%eax <== NOT EXECUTED 109fc8: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED 109fcb: 31 c0 xor %eax,%eax <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 109fcd: 81 e2 00 02 00 00 and $0x200,%edx <== NOT EXECUTED 109fd3: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 109fd6: 89 5d d8 mov %ebx,-0x28(%ebp) <== NOT EXECUTED 109fd9: 8b 5d dc mov -0x24(%ebp),%ebx <== NOT EXECUTED 109fdc: eb 10 jmp 109fee <== NOT EXECUTED 109fde: 66 90 xchg %ax,%ax <== NOT EXECUTED 109fe0: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109fe3: 85 d2 test %edx,%edx <== NOT EXECUTED 109fe5: 74 03 je 109fea <== NOT EXECUTED col += 2; 109fe7: 83 c6 02 add $0x2,%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109fea: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 109fec: 74 18 je 10a006 <== NOT EXECUTED c = tty->cbuf[i++]; 109fee: 8a 14 07 mov (%edi,%eax,1),%dl <== NOT EXECUTED 109ff1: 40 inc %eax <== NOT EXECUTED if (c == '\t') { 109ff2: 80 fa 09 cmp $0x9,%dl <== NOT EXECUTED 109ff5: 74 41 je 10a038 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 109ff7: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 109ffa: f6 44 13 01 20 testb $0x20,0x1(%ebx,%edx,1) <== NOT EXECUTED 109fff: 75 df jne 109fe0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 10a001: 46 inc %esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 10a002: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 10a004: 75 e8 jne 109fee <== NOT EXECUTED 10a006: 8b 5d d8 mov -0x28(%ebp),%ebx <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 10a009: 3b 73 28 cmp 0x28(%ebx),%esi <== NOT EXECUTED 10a00c: 0f 8d 1e ff ff ff jge 109f30 <== NOT EXECUTED 10a012: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 10a014: 50 push %eax <== NOT EXECUTED 10a015: 53 push %ebx <== NOT EXECUTED 10a016: 6a 01 push $0x1 <== NOT EXECUTED 10a018: 68 74 18 12 00 push $0x121874 <== NOT EXECUTED 10a01d: e8 06 fc ff ff call 109c28 <== NOT EXECUTED tty->column--; 10a022: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10a025: 48 dec %eax <== NOT EXECUTED 10a026: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 10a029: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a02c: 39 c6 cmp %eax,%esi <== NOT EXECUTED 10a02e: 7c e4 jl 10a014 <== NOT EXECUTED 10a030: e9 fb fe ff ff jmp 109f30 <== NOT EXECUTED 10a035: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 10a038: 83 ce 07 or $0x7,%esi <== NOT EXECUTED 10a03b: 46 inc %esi <== NOT EXECUTED 10a03c: eb ac jmp 109fea <== NOT EXECUTED 10a03e: 66 90 xchg %ax,%ax <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 10a040: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED } } if (!lineFlag) break; } } 10a047: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a04a: 5b pop %ebx <== NOT EXECUTED 10a04b: 5e pop %esi <== NOT EXECUTED 10a04c: 5f pop %edi <== NOT EXECUTED 10a04d: c9 leave <== NOT EXECUTED 10a04e: c3 ret <== NOT EXECUTED 10a04f: 90 nop <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 10a050: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 10a054: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 10a056: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a059: 5b pop %ebx <== NOT EXECUTED 10a05a: 5e pop %esi <== NOT EXECUTED 10a05b: 5f pop %edi <== NOT EXECUTED 10a05c: c9 leave <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 10a05d: e9 36 fe ff ff jmp 109e98 <== NOT EXECUTED 10a062: 66 90 xchg %ax,%ax <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 10a064: 57 push %edi <== NOT EXECUTED 10a065: 53 push %ebx <== NOT EXECUTED 10a066: 6a 03 push $0x3 <== NOT EXECUTED 10a068: 68 72 18 12 00 push $0x121872 <== NOT EXECUTED 10a06d: e8 b6 fb ff ff call 109c28 <== NOT EXECUTED if (tty->column) 10a072: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10a075: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a078: 85 c0 test %eax,%eax <== NOT EXECUTED 10a07a: 74 04 je 10a080 <== NOT EXECUTED tty->column--; 10a07c: 48 dec %eax <== NOT EXECUTED 10a07d: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 10a080: a1 c4 50 12 00 mov 0x1250c4,%eax <== NOT EXECUTED 10a085: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 10a089: 0f 84 e6 fe ff ff je 109f75 <== NOT EXECUTED 10a08f: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 10a093: 0f 85 dc fe ff ff jne 109f75 <== NOT EXECUTED 10a099: e9 92 fe ff ff jmp 109f30 <== NOT EXECUTED 10a09e: 66 90 xchg %ax,%ax <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 10a0a0: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 10a0a7: 0f b6 40 44 movzbl 0x44(%eax),%eax <== NOT EXECUTED 10a0ab: 89 da mov %ebx,%edx <== NOT EXECUTED 10a0ad: e8 e6 fd ff ff call 109e98 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 10a0b2: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 10a0b6: 0f 84 dc fe ff ff je 109f98 <== NOT EXECUTED echo ('\n', tty); 10a0bc: 89 da mov %ebx,%edx <== NOT EXECUTED 10a0be: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 10a0c3: eb 91 jmp 10a056 <== NOT EXECUTED =============================================================================== 0012b6fc : #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) { 12b6fc: 55 push %ebp <== NOT EXECUTED 12b6fd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b6ff: 57 push %edi <== NOT EXECUTED 12b700: 56 push %esi <== NOT EXECUTED 12b701: 53 push %ebx <== NOT EXECUTED 12b702: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 12b705: 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) 12b708: 80 bb 81 00 00 00 00 cmpb $0x0,0x81(%ebx) <== NOT EXECUTED 12b70f: 0f 84 bf 00 00 00 je 12b7d4 <== NOT EXECUTED 12b715: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 12b718: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED 12b71c: 39 c2 cmp %eax,%edx <== NOT EXECUTED 12b71e: 0f 86 f9 00 00 00 jbe 12b81d <== NOT EXECUTED 12b724: 31 d2 xor %edx,%edx <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 12b726: 39 45 0c cmp %eax,0xc(%ebp) <== NOT EXECUTED 12b729: 0f 84 8d 00 00 00 je 12b7bc <== NOT EXECUTED { if (fs_info->c.modified) 12b72f: 80 bb 80 00 00 00 00 cmpb $0x0,0x80(%ebx) <== NOT EXECUTED 12b736: 0f 84 ec 00 00 00 je 12b828 <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 12b73c: 84 d2 test %dl,%dl <== NOT EXECUTED 12b73e: 74 0a je 12b74a <== NOT EXECUTED 12b740: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 12b744: 0f 84 b2 01 00 00 je 12b8fc <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 12b74a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b74d: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 12b753: 88 55 d0 mov %dl,-0x30(%ebp) <== NOT EXECUTED 12b756: e8 a1 fc fd ff call 10b3fc <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; 12b75b: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED fs_info->c.modified = 0; 12b762: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12b769: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b76c: 85 c0 test %eax,%eax <== NOT EXECUTED 12b76e: 8a 55 d0 mov -0x30(%ebp),%dl <== NOT EXECUTED 12b771: 0f 85 d1 00 00 00 jne 12b848 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 12b777: 84 d2 test %dl,%dl <== NOT EXECUTED 12b779: 74 0a je 12b785 <== NOT EXECUTED 12b77b: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 12b77f: 0f 84 fb 00 00 00 je 12b880 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 12b785: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED 12b789: 0f 84 89 01 00 00 je 12b918 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 12b78f: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED 12b795: 50 push %eax <== NOT EXECUTED 12b796: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 12b799: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12b79c: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 12b79f: e8 84 0c fe ff call 10c428 <== NOT EXECUTED 12b7a4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12b7a7: 85 c0 test %eax,%eax <== NOT EXECUTED 12b7a9: 0f 85 99 00 00 00 jne 12b848 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 12b7af: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12b7b2: 89 43 7c mov %eax,0x7c(%ebx) <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 12b7b5: c6 83 81 00 00 00 01 movb $0x1,0x81(%ebx) <== NOT EXECUTED } *buf = fs_info->c.buf; 12b7bc: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx <== NOT EXECUTED 12b7c2: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 12b7c5: 89 10 mov %edx,(%eax) <== NOT EXECUTED 12b7c7: 31 c0 xor %eax,%eax <== NOT EXECUTED return RC_OK; } 12b7c9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b7cc: 5b pop %ebx <== NOT EXECUTED 12b7cd: 5e pop %esi <== NOT EXECUTED 12b7ce: 5f pop %edi <== NOT EXECUTED 12b7cf: c9 leave <== NOT EXECUTED 12b7d0: c3 ret <== NOT EXECUTED 12b7d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) 12b7d4: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED 12b7d8: 0f 84 82 00 00 00 je 12b860 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 12b7de: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED 12b7e4: 50 push %eax <== NOT EXECUTED 12b7e5: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 12b7e8: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12b7eb: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 12b7ee: e8 35 0c fe ff call 10c428 <== NOT EXECUTED 12b7f3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12b7f6: 85 c0 test %eax,%eax <== NOT EXECUTED 12b7f8: 75 4e jne 12b848 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 12b7fa: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12b7fd: 89 43 7c mov %eax,0x7c(%ebx) <== NOT EXECUTED fs_info->c.modified = 0; 12b800: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 12b807: c6 83 81 00 00 00 01 movb $0x1,0x81(%ebx) <== NOT EXECUTED 12b80e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 12b811: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED 12b815: 39 c2 cmp %eax,%edx <== NOT EXECUTED 12b817: 0f 87 07 ff ff ff ja 12b724 <== NOT EXECUTED 12b81d: 39 43 1c cmp %eax,0x1c(%ebx) <== NOT EXECUTED 12b820: 0f 97 c2 seta %dl <== NOT EXECUTED 12b823: e9 fe fe ff ff jmp 12b726 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 12b828: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b82b: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 12b831: e8 42 fc fd ff call 10b478 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; 12b836: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12b83d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b840: 85 c0 test %eax,%eax <== NOT EXECUTED 12b842: 0f 84 3d ff ff ff je 12b785 <== NOT EXECUTED if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 12b848: e8 3f af 01 00 call 14678c <__errno> <== NOT EXECUTED 12b84d: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12b853: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b858: e9 6c ff ff ff jmp 12b7c9 <== NOT EXECUTED 12b85d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 12b860: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED 12b866: 50 push %eax <== NOT EXECUTED 12b867: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 12b86a: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12b86d: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 12b870: e8 7f 0c fe ff call 10c4f4 <== NOT EXECUTED 12b875: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b878: e9 79 ff ff ff jmp 12b7f6 <== NOT EXECUTED 12b87d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 12b880: 80 7b 09 01 cmpb $0x1,0x9(%ebx) <== NOT EXECUTED 12b884: 0f 86 fb fe ff ff jbe 12b785 <== NOT EXECUTED 12b88a: c6 45 d7 01 movb $0x1,-0x29(%ebp) <== NOT EXECUTED 12b88e: eb 34 jmp 12b8c4 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 12b890: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12b893: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED 12b896: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 12b899: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi <== NOT EXECUTED 12b89f: 89 c7 mov %eax,%edi <== NOT EXECUTED 12b8a1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 12b8a3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b8a6: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12b8a9: e8 4e fb fd ff call 10b3fc <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 12b8ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b8b1: 85 c0 test %eax,%eax <== NOT EXECUTED 12b8b3: 75 31 jne 12b8e6 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 12b8b5: fe 45 d7 incb -0x29(%ebp) <== NOT EXECUTED 12b8b8: 8a 45 d7 mov -0x29(%ebp),%al <== NOT EXECUTED 12b8bb: 38 43 09 cmp %al,0x9(%ebx) <== NOT EXECUTED 12b8be: 0f 86 c1 fe ff ff jbe 12b785 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 12b8c4: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12b8c7: 50 push %eax <== NOT EXECUTED 12b8c8: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 12b8cc: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED 12b8d0: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 12b8d3: 50 push %eax <== NOT EXECUTED 12b8d4: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12b8d7: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 12b8da: e8 49 0b fe ff call 10c428 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 12b8df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b8e2: 85 c0 test %eax,%eax <== NOT EXECUTED 12b8e4: 74 aa je 12b890 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 12b8e6: e8 a1 ae 01 00 call 14678c <__errno> <== NOT EXECUTED 12b8eb: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 12b8f1: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b8f6: e9 ce fe ff ff jmp 12b7c9 <== NOT EXECUTED 12b8fb: 90 nop <== NOT EXECUTED if (fs_info->c.blk_num != blk) { if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 12b8fc: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 12b8ff: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED 12b905: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED 12b908: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi <== NOT EXECUTED 12b90e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED 12b910: e9 35 fe ff ff jmp 12b74a <== NOT EXECUTED 12b915: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 12b918: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED 12b91e: 50 push %eax <== NOT EXECUTED 12b91f: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 12b922: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12b925: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 12b928: e8 c7 0b fe ff call 10c4f4 <== NOT EXECUTED 12b92d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b930: e9 72 fe ff ff jmp 12b7a7 <== NOT EXECUTED =============================================================================== 0012b58c : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 12b58c: 55 push %ebp <== NOT EXECUTED 12b58d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b58f: 57 push %edi <== NOT EXECUTED 12b590: 56 push %esi <== NOT EXECUTED 12b591: 53 push %ebx <== NOT EXECUTED 12b592: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 12b595: 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) 12b598: 80 bb 81 00 00 00 00 cmpb $0x0,0x81(%ebx) <== NOT EXECUTED 12b59f: 0f 84 f7 00 00 00 je 12b69c <== NOT EXECUTED return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 12b5a5: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED 12b5a8: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED 12b5ac: 39 d0 cmp %edx,%eax <== NOT EXECUTED 12b5ae: 0f 83 f4 00 00 00 jae 12b6a8 <== NOT EXECUTED 12b5b4: 31 d2 xor %edx,%edx <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 12b5b6: 80 bb 80 00 00 00 00 cmpb $0x0,0x80(%ebx) <== NOT EXECUTED 12b5bd: 0f 84 bd 00 00 00 je 12b680 <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 12b5c3: 84 d2 test %dl,%dl <== NOT EXECUTED 12b5c5: 74 0a je 12b5d1 <== NOT EXECUTED 12b5c7: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 12b5cb: 0f 84 e3 00 00 00 je 12b6b4 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 12b5d1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b5d4: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 12b5da: 88 55 d0 mov %dl,-0x30(%ebp) <== NOT EXECUTED 12b5dd: e8 1a fe fd ff call 10b3fc <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12b5e2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b5e5: 85 c0 test %eax,%eax <== NOT EXECUTED 12b5e7: 8a 55 d0 mov -0x30(%ebp),%dl <== NOT EXECUTED 12b5ea: 0f 85 df 00 00 00 jne 12b6cf <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 12b5f0: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) 12b5f7: 84 d2 test %dl,%dl <== NOT EXECUTED 12b5f9: 0f 84 96 00 00 00 je 12b695 <== NOT EXECUTED 12b5ff: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 12b603: 0f 85 8c 00 00 00 jne 12b695 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 12b609: 80 7b 09 01 cmpb $0x1,0x9(%ebx) <== NOT EXECUTED 12b60d: 0f 86 82 00 00 00 jbe 12b695 <== NOT EXECUTED 12b613: c6 45 d7 01 movb $0x1,-0x29(%ebp) <== NOT EXECUTED 12b617: eb 33 jmp 12b64c <== NOT EXECUTED 12b619: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 12b61c: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12b61f: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED 12b622: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 12b625: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi <== NOT EXECUTED 12b62b: 89 c7 mov %eax,%edi <== NOT EXECUTED 12b62d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 12b62f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b632: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12b635: e8 c2 fd fd ff call 10b3fc <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 12b63a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b63d: 85 c0 test %eax,%eax <== NOT EXECUTED 12b63f: 75 2d jne 12b66e <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 12b641: fe 45 d7 incb -0x29(%ebp) <== NOT EXECUTED 12b644: 8a 45 d7 mov -0x29(%ebp),%al <== NOT EXECUTED 12b647: 38 43 09 cmp %al,0x9(%ebx) <== NOT EXECUTED 12b64a: 76 49 jbe 12b695 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 12b64c: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12b64f: 50 push %eax <== NOT EXECUTED 12b650: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 12b654: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED 12b658: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 12b65b: 50 push %eax <== NOT EXECUTED 12b65c: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12b65f: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 12b662: e8 c1 0d fe ff call 10c428 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 12b667: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b66a: 85 c0 test %eax,%eax <== NOT EXECUTED 12b66c: 74 ae je 12b61c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 12b66e: e8 19 b1 01 00 call 14678c <__errno> <== NOT EXECUTED 12b673: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 12b679: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b67e: eb 1e jmp 12b69e <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 12b680: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b683: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 12b689: e8 ea fd fd ff call 10b478 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12b68e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b691: 85 c0 test %eax,%eax <== NOT EXECUTED 12b693: 75 3a jne 12b6cf <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 12b695: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED 12b69c: 31 c0 xor %eax,%eax <== NOT EXECUTED return RC_OK; } 12b69e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b6a1: 5b pop %ebx <== NOT EXECUTED 12b6a2: 5e pop %esi <== NOT EXECUTED 12b6a3: 5f pop %edi <== NOT EXECUTED 12b6a4: c9 leave <== NOT EXECUTED 12b6a5: c3 ret <== NOT EXECUTED 12b6a6: 66 90 xchg %ax,%ax <== NOT EXECUTED *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 12b6a8: 3b 43 1c cmp 0x1c(%ebx),%eax <== NOT EXECUTED 12b6ab: 0f 92 c2 setb %dl <== NOT EXECUTED 12b6ae: e9 03 ff ff ff jmp 12b5b6 <== NOT EXECUTED 12b6b3: 90 nop <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 12b6b4: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax <== NOT EXECUTED 12b6ba: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 12b6bd: 8b b3 84 00 00 00 mov 0x84(%ebx),%esi <== NOT EXECUTED 12b6c3: 8b 76 20 mov 0x20(%esi),%esi <== NOT EXECUTED 12b6c6: 89 c7 mov %eax,%edi <== NOT EXECUTED 12b6c8: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED 12b6ca: e9 02 ff ff ff jmp 12b5d1 <== NOT EXECUTED } else { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 12b6cf: e8 b8 b0 01 00 call 14678c <__errno> <== NOT EXECUTED 12b6d4: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12b6da: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b6df: eb bd jmp 12b69e <== NOT EXECUTED =============================================================================== 0012c400 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 12c400: 55 push %ebp <== NOT EXECUTED 12c401: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c403: 56 push %esi <== NOT EXECUTED 12c404: 53 push %ebx <== NOT EXECUTED 12c405: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 12c408: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 12c40b: 8b 46 34 mov 0x34(%esi),%eax <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12c40e: 85 d2 test %edx,%edx <== NOT EXECUTED 12c410: 75 06 jne 12c418 <== NOT EXECUTED 12c412: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED 12c416: 75 30 jne 12c448 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12c418: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED 12c41b: 0f b6 48 05 movzbl 0x5(%eax),%ecx <== NOT EXECUTED 12c41f: d3 e2 shl %cl,%edx <== NOT EXECUTED 12c421: 03 50 30 add 0x30(%eax),%edx <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 12c424: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c427: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 12c42a: 0f b6 58 04 movzbl 0x4(%eax),%ebx <== NOT EXECUTED 12c42e: 0f b6 48 02 movzbl 0x2(%eax),%ecx <== NOT EXECUTED 12c432: d3 e3 shl %cl,%ebx <== NOT EXECUTED 12c434: 53 push %ebx <== NOT EXECUTED 12c435: 6a 00 push $0x0 <== NOT EXECUTED 12c437: 52 push %edx <== NOT EXECUTED 12c438: 56 push %esi <== NOT EXECUTED 12c439: e8 46 f8 ff ff call 12bc84 <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 12c43e: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 12c441: 5b pop %ebx <== NOT EXECUTED 12c442: 5e pop %esi <== NOT EXECUTED 12c443: c9 leave <== NOT EXECUTED 12c444: c3 ret <== NOT EXECUTED 12c445: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 12c448: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED 12c44b: eb d7 jmp 12c424 <== NOT EXECUTED =============================================================================== 0012bb78 : fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 12bb78: 55 push %ebp <== NOT EXECUTED 12bb79: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bb7b: 56 push %esi <== NOT EXECUTED 12bb7c: 53 push %ebx <== NOT EXECUTED 12bb7d: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 12bb80: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 12bb83: 8b 46 34 mov 0x34(%esi),%eax <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12bb86: 85 d2 test %edx,%edx <== NOT EXECUTED 12bb88: 75 06 jne 12bb90 <== NOT EXECUTED 12bb8a: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED 12bb8e: 75 30 jne 12bbc0 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12bb90: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED 12bb93: 0f b6 48 05 movzbl 0x5(%eax),%ecx <== NOT EXECUTED 12bb97: d3 e2 shl %cl,%edx <== NOT EXECUTED 12bb99: 03 50 30 add 0x30(%eax),%edx <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, 12bb9c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bb9f: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 12bba2: 0f b6 58 04 movzbl 0x4(%eax),%ebx <== NOT EXECUTED 12bba6: 0f b6 48 02 movzbl 0x2(%eax),%ecx <== NOT EXECUTED 12bbaa: d3 e3 shl %cl,%ebx <== NOT EXECUTED 12bbac: 53 push %ebx <== NOT EXECUTED 12bbad: 6a 00 push $0x0 <== NOT EXECUTED 12bbaf: 52 push %edx <== NOT EXECUTED 12bbb0: 56 push %esi <== NOT EXECUTED 12bbb1: e8 82 fd ff ff call 12b938 <_fat_block_write> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 12bbb6: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 12bbb9: 5b pop %ebx <== NOT EXECUTED 12bbba: 5e pop %esi <== NOT EXECUTED 12bbbb: c9 leave <== NOT EXECUTED 12bbbc: c3 ret <== NOT EXECUTED 12bbbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 12bbc0: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED 12bbc3: eb d7 jmp 12bb9c <== NOT EXECUTED =============================================================================== 0012b9e8 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 12b9e8: 55 push %ebp <== NOT EXECUTED 12b9e9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b9eb: 57 push %edi <== NOT EXECUTED 12b9ec: 56 push %esi <== NOT EXECUTED 12b9ed: 53 push %ebx <== NOT EXECUTED 12b9ee: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 12b9f1: 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; 12b9f4: 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); 12b9f7: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12b9fa: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 12b9fd: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 12ba00: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 12ba03: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12ba06: 50 push %eax <== NOT EXECUTED 12ba07: 6a 04 push $0x4 <== NOT EXECUTED 12ba09: 68 e8 01 00 00 push $0x1e8 <== NOT EXECUTED 12ba0e: 0f b7 46 3c movzwl 0x3c(%esi),%eax <== NOT EXECUTED 12ba12: 50 push %eax <== NOT EXECUTED 12ba13: 53 push %ebx <== NOT EXECUTED 12ba14: e8 1f ff ff ff call 12b938 <_fat_block_write> <== NOT EXECUTED 12ba19: 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, 12ba1b: 83 c4 14 add $0x14,%esp <== NOT EXECUTED 12ba1e: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 12ba21: 50 push %eax <== NOT EXECUTED 12ba22: 6a 04 push $0x4 <== NOT EXECUTED 12ba24: 68 ec 01 00 00 push $0x1ec <== NOT EXECUTED 12ba29: 0f b7 46 3c movzwl 0x3c(%esi),%eax <== NOT EXECUTED 12ba2d: 50 push %eax <== NOT EXECUTED 12ba2e: 53 push %ebx <== NOT EXECUTED 12ba2f: e8 04 ff ff ff call 12b938 <_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) ) 12ba34: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12ba37: 85 ff test %edi,%edi <== NOT EXECUTED 12ba39: 79 0d jns 12ba48 <== NOT EXECUTED 12ba3b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; return RC_OK; } 12ba40: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12ba43: 5b pop %ebx <== NOT EXECUTED 12ba44: 5e pop %esi <== NOT EXECUTED 12ba45: 5f pop %edi <== NOT EXECUTED 12ba46: c9 leave <== NOT EXECUTED 12ba47: c3 ret <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) 12ba48: 85 c0 test %eax,%eax <== NOT EXECUTED 12ba4a: 78 ef js 12ba3b <== NOT EXECUTED 12ba4c: 31 c0 xor %eax,%eax <== NOT EXECUTED 12ba4e: eb f0 jmp 12ba40 <== NOT EXECUTED =============================================================================== 0012b198 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 12b198: 55 push %ebp <== NOT EXECUTED 12b199: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b19b: 57 push %edi <== NOT EXECUTED 12b19c: 56 push %esi <== NOT EXECUTED 12b19d: 53 push %ebx <== NOT EXECUTED 12b19e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b1a1: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 12b1a4: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12b1a7: 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) 12b1aa: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 12b1ad: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 12b1b0: 76 0e jbe 12b1c0 <== NOT EXECUTED { fat_fd->links_num--; 12b1b2: 48 dec %eax <== NOT EXECUTED 12b1b3: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED 12b1b6: 31 c0 xor %eax,%eax <== NOT EXECUTED * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } 12b1b8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b1bb: 5b pop %ebx <== NOT EXECUTED 12b1bc: 5e pop %esi <== NOT EXECUTED 12b1bd: 5f pop %edi <== NOT EXECUTED 12b1be: c9 leave <== NOT EXECUTED 12b1bf: c3 ret <== NOT EXECUTED return rc; } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 12b1c0: f6 43 30 01 testb $0x1,0x30(%ebx) <== NOT EXECUTED 12b1c4: 74 3a je 12b200 <== NOT EXECUTED { rc = fat_file_truncate(mt_entry, fat_fd, 0); 12b1c6: 51 push %ecx <== NOT EXECUTED 12b1c7: 6a 00 push $0x0 <== NOT EXECUTED 12b1c9: 53 push %ebx <== NOT EXECUTED 12b1ca: 56 push %esi <== NOT EXECUTED 12b1cb: e8 a4 f8 ff ff call 12aa74 <== NOT EXECUTED if ( rc != RC_OK ) 12b1d0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b1d3: 85 c0 test %eax,%eax <== NOT EXECUTED 12b1d5: 75 e1 jne 12b1b8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 12b1d7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b1da: 53 push %ebx <== NOT EXECUTED 12b1db: e8 54 88 fe ff call 113a34 <_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) ) 12b1e0: 58 pop %eax <== NOT EXECUTED 12b1e1: 5a pop %edx <== NOT EXECUTED 12b1e2: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 12b1e5: 56 push %esi <== NOT EXECUTED 12b1e6: e8 bd 02 00 00 call 12b4a8 <== NOT EXECUTED 12b1eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b1ee: 84 c0 test %al,%al <== NOT EXECUTED 12b1f0: 75 52 jne 12b244 <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); free(fat_fd); 12b1f2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b1f5: 53 push %ebx <== NOT EXECUTED 12b1f6: e8 6d 36 fe ff call 10e868 <== NOT EXECUTED 12b1fb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b1fe: eb 1a jmp 12b21a <== NOT EXECUTED } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 12b200: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12b203: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 12b206: 56 push %esi <== NOT EXECUTED 12b207: e8 9c 02 00 00 call 12b4a8 <== NOT EXECUTED 12b20c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b20f: 84 c0 test %al,%al <== NOT EXECUTED 12b211: 74 19 je 12b22c <== NOT EXECUTED { fat_fd->links_num = 0; 12b213: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 12b21a: 89 7d 08 mov %edi,0x8(%ebp) <== NOT EXECUTED return rc; } 12b21d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b220: 5b pop %ebx <== NOT EXECUTED 12b221: 5e pop %esi <== NOT EXECUTED 12b222: 5f pop %edi <== NOT EXECUTED 12b223: c9 leave <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 12b224: e9 63 03 00 00 jmp 12b58c <== NOT EXECUTED 12b229: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12b22c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b22f: 53 push %ebx <== NOT EXECUTED 12b230: e8 ff 87 fe ff call 113a34 <_Chain_Extract> <== NOT EXECUTED fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 12b235: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 12b238: e8 2b 36 fe ff call 10e868 <== NOT EXECUTED 12b23d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b240: eb d8 jmp 12b21a <== NOT EXECUTED 12b242: 66 90 xchg %ax,%ax <== NOT EXECUTED return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) fat_free_unique_ino(mt_entry, fat_fd->ino); 12b244: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12b247: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 12b24a: 56 push %esi <== NOT EXECUTED 12b24b: e8 30 02 00 00 call 12b480 <== NOT EXECUTED 12b250: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b253: eb 9d jmp 12b1f2 <== NOT EXECUTED =============================================================================== 0012a874 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 12a874: 55 push %ebp <== NOT EXECUTED 12a875: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12a877: 57 push %edi <== NOT EXECUTED 12a878: 56 push %esi <== NOT EXECUTED 12a879: 53 push %ebx <== NOT EXECUTED 12a87a: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 12a87d: 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; 12a880: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12a883: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 12a886: 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) 12a889: 8b 78 18 mov 0x18(%eax),%edi <== NOT EXECUTED 12a88c: 85 ff test %edi,%edi <== NOT EXECUTED 12a88e: 75 0c jne 12a89c <== NOT EXECUTED 12a890: 31 c0 xor %eax,%eax <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 12a892: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12a895: 5b pop %ebx <== NOT EXECUTED 12a896: 5e pop %esi <== NOT EXECUTED 12a897: 5f pop %edi <== NOT EXECUTED 12a898: c9 leave <== NOT EXECUTED 12a899: c3 ret <== NOT EXECUTED 12a89a: 66 90 xchg %ax,%ax <== NOT EXECUTED { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; 12a89c: 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; 12a8a3: 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); 12a8a6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12a8a9: 53 push %ebx <== NOT EXECUTED 12a8aa: e8 dd 0c 00 00 call 12b58c <== NOT EXECUTED 12a8af: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED if (rc != RC_OK) 12a8b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12a8b5: 85 c0 test %eax,%eax <== NOT EXECUTED 12a8b7: 0f 85 97 00 00 00 jne 12a954 <== NOT EXECUTED 12a8bd: 8d 7d e0 lea -0x20(%ebp),%edi <== NOT EXECUTED return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 12a8c0: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12a8c3: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 12a8c6: 21 c2 and %eax,%edx <== NOT EXECUTED 12a8c8: 3b 53 10 cmp 0x10(%ebx),%edx <== NOT EXECUTED 12a8cb: 0f 83 83 00 00 00 jae 12a954 <== 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; 12a8d1: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 12a8d4: 8b 51 34 mov 0x34(%ecx),%edx <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12a8d7: 85 c0 test %eax,%eax <== NOT EXECUTED 12a8d9: 74 6d je 12a948 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12a8db: 8d 70 fe lea -0x2(%eax),%esi <== NOT EXECUTED 12a8de: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED 12a8e2: d3 e6 shl %cl,%esi <== NOT EXECUTED 12a8e4: 03 72 30 add 0x30(%edx),%esi <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 12a8e7: 80 7b 04 00 cmpb $0x0,0x4(%ebx) <== NOT EXECUTED 12a8eb: 74 76 je 12a963 <== NOT EXECUTED 12a8ed: 31 c0 xor %eax,%eax <== NOT EXECUTED 12a8ef: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED 12a8f2: 89 c6 mov %eax,%esi <== NOT EXECUTED 12a8f4: eb 1d jmp 12a913 <== NOT EXECUTED 12a8f6: 66 90 xchg %ax,%ax <== NOT EXECUTED /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 12a8f8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12a8fb: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 12a8fe: e8 7d 14 fe ff call 10bd80 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 12a903: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12a906: 85 c0 test %eax,%eax <== NOT EXECUTED 12a908: 75 23 jne 12a92d <== 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++ ) 12a90a: 46 inc %esi <== NOT EXECUTED 12a90b: 0f b6 43 04 movzbl 0x4(%ebx),%eax <== NOT EXECUTED 12a90f: 39 f0 cmp %esi,%eax <== NOT EXECUTED 12a911: 76 4d jbe 12a960 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 12a913: 57 push %edi <== NOT EXECUTED 12a914: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 12a917: 8d 04 16 lea (%esi,%edx,1),%eax <== NOT EXECUTED 12a91a: 50 push %eax <== NOT EXECUTED 12a91b: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12a91e: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 12a921: e8 ce 1b fe ff call 10c4f4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12a926: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12a929: 85 c0 test %eax,%eax <== NOT EXECUTED 12a92b: 74 cb je 12a8f8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); 12a92d: e8 5a be 01 00 call 14678c <__errno> <== NOT EXECUTED 12a932: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12a938: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 12a93d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12a940: 5b pop %ebx <== NOT EXECUTED 12a941: 5e pop %esi <== NOT EXECUTED 12a942: 5f pop %edi <== NOT EXECUTED 12a943: c9 leave <== NOT EXECUTED 12a944: c3 ret <== NOT EXECUTED 12a945: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12a948: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED 12a94c: 74 8d je 12a8db <== NOT EXECUTED return fs_info->vol.rdir_loc; 12a94e: 8b 72 1c mov 0x1c(%edx),%esi <== NOT EXECUTED 12a951: eb 94 jmp 12a8e7 <== NOT EXECUTED 12a953: 90 nop <== NOT EXECUTED rc = fat_buf_release(fs_info); if (rc != RC_OK) return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 12a954: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 12a957: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12a95a: 5b pop %ebx <== NOT EXECUTED 12a95b: 5e pop %esi <== NOT EXECUTED 12a95c: 5f pop %edi <== NOT EXECUTED 12a95d: c9 leave <== NOT EXECUTED 12a95e: c3 ret <== NOT EXECUTED 12a95f: 90 nop <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 12a960: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 12a963: 56 push %esi <== NOT EXECUTED 12a964: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 12a967: 51 push %ecx <== NOT EXECUTED 12a968: 50 push %eax <== NOT EXECUTED 12a969: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12a96c: e8 73 81 01 00 call 142ae4 <== NOT EXECUTED if ( rc != RC_OK ) 12a971: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12a974: 85 c0 test %eax,%eax <== NOT EXECUTED 12a976: 0f 84 44 ff ff ff je 12a8c0 <== NOT EXECUTED 12a97c: e9 11 ff ff ff jmp 12a892 <== NOT EXECUTED =============================================================================== 0012ab54 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 12ab54: 55 push %ebp <== NOT EXECUTED 12ab55: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12ab57: 57 push %edi <== NOT EXECUTED 12ab58: 56 push %esi <== NOT EXECUTED 12ab59: 53 push %ebx <== NOT EXECUTED 12ab5a: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 12ab5d: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED 12ab60: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12ab63: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12ab66: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED uint32_t chain = 0; 12ab69: 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; 12ab70: 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; 12ab77: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 12ab7a: 89 39 mov %edi,(%ecx) <== NOT EXECUTED if (new_length <= fat_fd->fat_file_size) 12ab7c: 8b 43 18 mov 0x18(%ebx),%eax <== NOT EXECUTED 12ab7f: 39 c7 cmp %eax,%edi <== NOT EXECUTED 12ab81: 0f 86 d5 00 00 00 jbe 12ac5c <== NOT EXECUTED return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12ab87: 83 7b 20 01 cmpl $0x1,0x20(%ebx) <== NOT EXECUTED 12ab8b: 0f 84 d7 00 00 00 je 12ac68 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 12ab91: 0f b7 56 06 movzwl 0x6(%esi),%edx <== NOT EXECUTED 12ab95: 8d 4a ff lea -0x1(%edx),%ecx <== NOT EXECUTED 12ab98: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - 12ab9b: 21 c1 and %eax,%ecx <== NOT EXECUTED 12ab9d: 29 ca sub %ecx,%edx <== NOT EXECUTED 12ab9f: 23 55 c4 and -0x3c(%ebp),%edx <== NOT EXECUTED (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 12aba2: 89 f9 mov %edi,%ecx <== NOT EXECUTED 12aba4: 29 c1 sub %eax,%ecx <== NOT EXECUTED 12aba6: 89 c8 mov %ecx,%eax <== NOT EXECUTED if (bytes2add > bytes_remain) 12aba8: 39 ca cmp %ecx,%edx <== NOT EXECUTED 12abaa: 0f 83 ac 00 00 00 jae 12ac5c <== 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) 12abb0: 29 d0 sub %edx,%eax <== NOT EXECUTED 12abb2: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 12abb5: 0f 84 a1 00 00 00 je 12ac5c <== NOT EXECUTED return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 12abbb: 48 dec %eax <== NOT EXECUTED 12abbc: 0f b6 4e 08 movzbl 0x8(%esi),%ecx <== NOT EXECUTED 12abc0: d3 e8 shr %cl,%eax <== NOT EXECUTED 12abc2: 8d 48 01 lea 0x1(%eax),%ecx <== NOT EXECUTED rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 12abc5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12abc8: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 12abcb: 50 push %eax <== NOT EXECUTED 12abcc: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 12abcf: 50 push %eax <== NOT EXECUTED 12abd0: 51 push %ecx <== NOT EXECUTED 12abd1: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12abd4: 50 push %eax <== NOT EXECUTED 12abd5: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12abd8: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 12abdb: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 12abde: e8 61 81 01 00 call 142d44 <== NOT EXECUTED &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 12abe3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12abe6: 85 c0 test %eax,%eax <== NOT EXECUTED 12abe8: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 12abeb: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 12abee: 0f 85 9c 00 00 00 jne 12ac90 <== NOT EXECUTED return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 12abf4: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 12abf7: 85 c0 test %eax,%eax <== NOT EXECUTED 12abf9: 75 04 jne 12abff <== NOT EXECUTED 12abfb: 85 d2 test %edx,%edx <== NOT EXECUTED 12abfd: 74 7e je 12ac7d <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 12abff: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 12ac01: 74 1d je 12ac20 <== NOT EXECUTED *a_length = new_length - 12ac03: f7 d0 not %eax <== NOT EXECUTED 12ac05: 01 c8 add %ecx,%eax <== NOT EXECUTED 12ac07: 0f b6 4e 08 movzbl 0x8(%esi),%ecx <== NOT EXECUTED 12ac0b: d3 e0 shl %cl,%eax <== NOT EXECUTED 12ac0d: 89 f9 mov %edi,%ecx <== NOT EXECUTED 12ac0f: 29 c1 sub %eax,%ecx <== NOT EXECUTED 12ac11: 0f b7 46 06 movzwl 0x6(%esi),%eax <== NOT EXECUTED 12ac15: 48 dec %eax <== NOT EXECUTED 12ac16: 23 45 d4 and -0x2c(%ebp),%eax <== NOT EXECUTED 12ac19: 29 c1 sub %eax,%ecx <== NOT EXECUTED 12ac1b: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 12ac1e: 89 08 mov %ecx,(%eax) <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 12ac20: 8b 43 18 mov 0x18(%ebx),%eax <== NOT EXECUTED 12ac23: 85 c0 test %eax,%eax <== NOT EXECUTED 12ac25: 75 6d jne 12ac94 <== NOT EXECUTED { fat_fd->map.disk_cln = fat_fd->cln = chain; 12ac27: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12ac2a: 89 43 1c mov %eax,0x1c(%ebx) <== NOT EXECUTED 12ac2d: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED fat_fd->map.file_cln = 0; 12ac30: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) <== NOT EXECUTED } fat_buf_release(fs_info); } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 12ac37: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED 12ac3a: 85 d2 test %edx,%edx <== NOT EXECUTED 12ac3c: 74 0c je 12ac4a <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 12ac3e: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 12ac41: 89 43 3c mov %eax,0x3c(%ebx) <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) 12ac44: 83 7b 10 01 cmpl $0x1,0x10(%ebx) <== NOT EXECUTED 12ac48: 74 7c je 12acc6 <== NOT EXECUTED return rc; } } } fat_fd->fat_file_size = new_length; 12ac4a: 89 7b 18 mov %edi,0x18(%ebx) <== NOT EXECUTED 12ac4d: 31 d2 xor %edx,%edx <== NOT EXECUTED return RC_OK; } 12ac4f: 89 d0 mov %edx,%eax <== NOT EXECUTED 12ac51: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12ac54: 5b pop %ebx <== NOT EXECUTED 12ac55: 5e pop %esi <== NOT EXECUTED 12ac56: 5f pop %edi <== NOT EXECUTED 12ac57: c9 leave <== NOT EXECUTED 12ac58: c3 ret <== NOT EXECUTED 12ac59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } fat_fd->fat_file_size = new_length; return RC_OK; 12ac5c: 31 d2 xor %edx,%edx <== NOT EXECUTED } 12ac5e: 89 d0 mov %edx,%eax <== NOT EXECUTED 12ac60: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12ac63: 5b pop %ebx <== NOT EXECUTED 12ac64: 5e pop %esi <== NOT EXECUTED 12ac65: 5f pop %edi <== NOT EXECUTED 12ac66: c9 leave <== NOT EXECUTED 12ac67: c3 ret <== NOT EXECUTED *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12ac68: 8b 53 24 mov 0x24(%ebx),%edx <== NOT EXECUTED 12ac6b: 85 d2 test %edx,%edx <== NOT EXECUTED 12ac6d: 0f 85 1e ff ff ff jne 12ab91 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 12ac73: f6 46 0a 03 testb $0x3,0xa(%esi) <== NOT EXECUTED 12ac77: 0f 84 14 ff ff ff je 12ab91 <== NOT EXECUTED if (rc != RC_OK) return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); 12ac7d: e8 0a bb 01 00 call 14678c <__errno> <== NOT EXECUTED 12ac82: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 12ac88: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 12ac8d: eb cf jmp 12ac5e <== NOT EXECUTED 12ac8f: 90 nop <== NOT EXECUTED rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 12ac90: 89 c2 mov %eax,%edx <== NOT EXECUTED 12ac92: eb ca jmp 12ac5e <== NOT EXECUTED fat_fd->map.disk_cln = fat_fd->cln = chain; fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 12ac94: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED 12ac97: 83 fa ff cmp $0xffffffff,%edx <== NOT EXECUTED 12ac9a: 74 64 je 12ad00 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; 12ac9c: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 12ac9f: 51 push %ecx <== NOT EXECUTED 12aca0: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12aca3: 52 push %edx <== NOT EXECUTED 12aca4: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12aca7: e8 10 7c 01 00 call 1428bc <== NOT EXECUTED 12acac: 89 c2 mov %eax,%edx <== NOT EXECUTED if ( rc != RC_OK ) 12acae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12acb1: 85 c0 test %eax,%eax <== NOT EXECUTED 12acb3: 75 2f jne 12ace4 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 12acb5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12acb8: 56 push %esi <== NOT EXECUTED 12acb9: e8 ce 08 00 00 call 12b58c <== NOT EXECUTED 12acbe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12acc1: e9 71 ff ff ff jmp 12ac37 <== NOT EXECUTED if (cls_added != 0) { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(mt_entry, chain); 12acc6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12acc9: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12accc: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12accf: e8 f4 0e 00 00 call 12bbc8 <== NOT EXECUTED 12acd4: 89 c2 mov %eax,%edx <== NOT EXECUTED if ( rc != RC_OK ) 12acd6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12acd9: 85 c0 test %eax,%eax <== NOT EXECUTED 12acdb: 0f 84 69 ff ff ff je 12ac4a <== NOT EXECUTED 12ace1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); 12ace4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12ace7: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12acea: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12aced: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 12acf0: e8 73 7f 01 00 call 142c68 <== NOT EXECUTED return rc; 12acf5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12acf8: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 12acfb: e9 5e ff ff ff jmp 12ac5e <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 12ad00: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ad03: 8d 55 e0 lea -0x20(%ebp),%edx <== NOT EXECUTED 12ad06: 52 push %edx <== NOT EXECUTED 12ad07: 48 dec %eax <== NOT EXECUTED 12ad08: 50 push %eax <== NOT EXECUTED 12ad09: 6a 01 push $0x1 <== NOT EXECUTED 12ad0b: 53 push %ebx <== NOT EXECUTED 12ad0c: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12ad0f: e8 c4 fc ff ff call 12a9d8 <== NOT EXECUTED 12ad14: 89 c2 mov %eax,%edx <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 12ad16: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12ad19: 85 c0 test %eax,%eax <== NOT EXECUTED 12ad1b: 75 c7 jne 12ace4 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); return rc; 12ad1d: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 12ad20: e9 7a ff ff ff jmp 12ac9f <== NOT EXECUTED =============================================================================== 0012a9d8 : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 12a9d8: 55 push %ebp <== NOT EXECUTED 12a9d9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12a9db: 56 push %esi <== NOT EXECUTED 12a9dc: 53 push %ebx <== NOT EXECUTED 12a9dd: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 12a9e0: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12a9e3: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12a9e6: 8b 48 34 mov 0x34(%eax),%ecx <== NOT EXECUTED uint32_t cur_cln = 0; 12a9e9: 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) 12a9f0: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED 12a9f4: 74 1a je 12aa10 <== NOT EXECUTED *ret = cur_cln; break; default: errno = EINVAL; 12a9f6: e8 91 bd 01 00 call 14678c <__errno> <== NOT EXECUTED 12a9fb: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12aa01: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED rc = -1; break; } return rc; } 12aa06: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 12aa09: 5b pop %ebx <== NOT EXECUTED 12aa0a: 5e pop %esi <== NOT EXECUTED 12aa0b: c9 leave <== NOT EXECUTED 12aa0c: c3 ret <== NOT EXECUTED 12aa0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t ); 12aa10: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED ret = va_arg(ap, uint32_t *); 12aa13: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 12aa16: 3b 72 18 cmp 0x18(%edx),%esi <== NOT EXECUTED 12aa19: 73 45 jae 12aa60 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12aa1b: 83 7a 20 01 cmpl $0x1,0x20(%edx) <== NOT EXECUTED 12aa1f: 74 27 je 12aa48 <== NOT EXECUTED return RC_OK; } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 12aa21: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12aa24: 0f b6 49 08 movzbl 0x8(%ecx),%ecx <== NOT EXECUTED 12aa28: d3 ee shr %cl,%esi <== NOT EXECUTED 12aa2a: 89 f1 mov %esi,%ecx <== NOT EXECUTED 12aa2c: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED 12aa2f: 56 push %esi <== NOT EXECUTED 12aa30: e8 a3 fd ff ff call 12a7d8 <== NOT EXECUTED if ( rc != RC_OK ) 12aa35: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12aa38: 85 c0 test %eax,%eax <== NOT EXECUTED 12aa3a: 75 ca jne 12aa06 <== NOT EXECUTED return rc; *ret = cur_cln; 12aa3c: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 12aa3f: 89 13 mov %edx,(%ebx) <== NOT EXECUTED errno = EINVAL; rc = -1; break; } return rc; } 12aa41: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 12aa44: 5b pop %ebx <== NOT EXECUTED 12aa45: 5e pop %esi <== NOT EXECUTED 12aa46: c9 leave <== NOT EXECUTED 12aa47: c3 ret <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12aa48: 83 7a 24 00 cmpl $0x0,0x24(%edx) <== NOT EXECUTED 12aa4c: 75 d3 jne 12aa21 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 12aa4e: f6 41 0a 03 testb $0x3,0xa(%ecx) <== NOT EXECUTED 12aa52: 74 cd je 12aa21 <== NOT EXECUTED { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 12aa54: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 12aa5a: 31 c0 xor %eax,%eax <== NOT EXECUTED return RC_OK; 12aa5c: eb a8 jmp 12aa06 <== NOT EXECUTED 12aa5e: 66 90 xchg %ax,%ax <== NOT EXECUTED pos = va_arg(ap, uint32_t ); ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); 12aa60: e8 27 bd 01 00 call 14678c <__errno> <== NOT EXECUTED 12aa65: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12aa6b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12aa70: eb 94 jmp 12aa06 <== NOT EXECUTED =============================================================================== 0012a7d8 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 12a7d8: 55 push %ebp <== NOT EXECUTED 12a7d9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12a7db: 57 push %edi <== NOT EXECUTED 12a7dc: 56 push %esi <== NOT EXECUTED 12a7dd: 53 push %ebx <== NOT EXECUTED 12a7de: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 12a7e1: 89 c3 mov %eax,%ebx <== NOT EXECUTED 12a7e3: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 12a7e6: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 12a7e9: 8b 7a 34 mov 0x34(%edx),%edi <== NOT EXECUTED 12a7ec: 39 cf cmp %ecx,%edi <== NOT EXECUTED 12a7ee: 74 70 je 12a860 <== NOT EXECUTED { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 12a7f0: 72 3a jb 12a82c <== NOT EXECUTED cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 12a7f2: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 12a7f5: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED 12a7f8: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 12a7fb: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 12a7fe: 85 ff test %edi,%edi <== NOT EXECUTED 12a800: 74 41 je 12a843 <== NOT EXECUTED 12a802: 31 f6 xor %esi,%esi <== NOT EXECUTED 12a804: eb 0a jmp 12a810 <== NOT EXECUTED 12a806: 66 90 xchg %ax,%ax <== NOT EXECUTED 12a808: 46 inc %esi <== NOT EXECUTED 12a809: 39 f7 cmp %esi,%edi <== NOT EXECUTED 12a80b: 76 33 jbe 12a840 <== NOT EXECUTED 12a80d: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 12a810: 51 push %ecx <== NOT EXECUTED 12a811: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED 12a814: 52 push %edx <== NOT EXECUTED 12a815: 50 push %eax <== NOT EXECUTED 12a816: 53 push %ebx <== NOT EXECUTED 12a817: e8 c8 82 01 00 call 142ae4 <== NOT EXECUTED if ( rc != RC_OK ) 12a81c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12a81f: 85 c0 test %eax,%eax <== NOT EXECUTED 12a821: 74 e5 je 12a808 <== NOT EXECUTED return rc; 12a823: 99 cltd <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 12a824: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12a827: 5b pop %ebx <== NOT EXECUTED 12a828: 5e pop %esi <== NOT EXECUTED 12a829: 5f pop %edi <== NOT EXECUTED 12a82a: c9 leave <== NOT EXECUTED 12a82b: c3 ret <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 12a82c: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 12a82f: 8b 41 38 mov 0x38(%ecx),%eax <== NOT EXECUTED 12a832: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 12a835: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 12a838: 29 fa sub %edi,%edx <== NOT EXECUTED 12a83a: 89 d7 mov %edx,%edi <== NOT EXECUTED 12a83c: eb c0 jmp 12a7fe <== NOT EXECUTED 12a83e: 66 90 xchg %ax,%ax <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 12a840: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 12a843: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 12a846: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 12a849: 89 51 34 mov %edx,0x34(%ecx) <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 12a84c: 89 41 38 mov %eax,0x38(%ecx) <== NOT EXECUTED *disk_cln = cur_cln; 12a84f: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 12a852: 89 01 mov %eax,(%ecx) <== NOT EXECUTED 12a854: 31 c0 xor %eax,%eax <== NOT EXECUTED 12a856: 31 d2 xor %edx,%edx <== NOT EXECUTED } return RC_OK; } 12a858: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12a85b: 5b pop %ebx <== NOT EXECUTED 12a85c: 5e pop %esi <== NOT EXECUTED 12a85d: 5f pop %edi <== NOT EXECUTED 12a85e: c9 leave <== NOT EXECUTED 12a85f: c3 ret <== NOT EXECUTED ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 12a860: 8b 42 38 mov 0x38(%edx),%eax <== NOT EXECUTED 12a863: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12a866: 89 02 mov %eax,(%edx) <== NOT EXECUTED 12a868: 31 c0 xor %eax,%eax <== NOT EXECUTED 12a86a: 31 d2 xor %edx,%edx <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 12a86c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12a86f: 5b pop %ebx <== NOT EXECUTED 12a870: 5e pop %esi <== NOT EXECUTED 12a871: 5f pop %edi <== NOT EXECUTED 12a872: c9 leave <== NOT EXECUTED 12a873: c3 ret <== NOT EXECUTED =============================================================================== 0012a984 : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 12a984: 55 push %ebp <== NOT EXECUTED 12a985: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12a987: 57 push %edi <== NOT EXECUTED 12a988: 56 push %esi <== NOT EXECUTED 12a989: 53 push %ebx <== NOT EXECUTED 12a98a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12a98d: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 12a990: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12a993: 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) + 12a996: 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) 12a999: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 12a99c: 74 02 je 12a9a0 <== 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)) ) 12a99e: 85 c0 test %eax,%eax <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 12a9a0: 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 ); 12a9a3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12a9a6: 53 push %ebx <== NOT EXECUTED 12a9a7: e8 88 90 fe ff call 113a34 <_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 ); 12a9ac: 58 pop %eax <== NOT EXECUTED 12a9ad: 5a pop %edx <== NOT EXECUTED 12a9ae: 53 push %ebx <== NOT EXECUTED 12a9af: 89 f8 mov %edi,%eax <== NOT EXECUTED 12a9b1: c1 e8 05 shr $0x5,%eax <== NOT EXECUTED 12a9b4: 83 e0 01 and $0x1,%eax <== NOT EXECUTED 12a9b7: 8d 14 00 lea (%eax,%eax,1),%edx <== NOT EXECUTED 12a9ba: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED 12a9bd: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED 12a9c0: 03 46 68 add 0x68(%esi),%eax <== NOT EXECUTED 12a9c3: 50 push %eax <== NOT EXECUTED 12a9c4: e8 47 90 fe ff call 113a10 <_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; 12a9c9: 80 4b 30 01 orb $0x1,0x30(%ebx) <== NOT EXECUTED 12a9cd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12a9d0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12a9d3: 5b pop %ebx <== NOT EXECUTED 12a9d4: 5e pop %esi <== NOT EXECUTED 12a9d5: 5f pop %edi <== NOT EXECUTED 12a9d6: c9 leave <== NOT EXECUTED 12a9d7: c3 ret <== NOT EXECUTED =============================================================================== 0012b258 : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 12b258: 55 push %ebp <== NOT EXECUTED 12b259: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b25b: 57 push %edi <== NOT EXECUTED 12b25c: 56 push %esi <== NOT EXECUTED 12b25d: 53 push %ebx <== NOT EXECUTED 12b25e: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12b261: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b264: 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) + 12b267: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 12b26a: 8b 02 mov (%edx),%eax <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 12b26c: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 12b26f: 74 1a je 12b28b <== 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)) ) 12b271: 85 c0 test %eax,%eax <== NOT EXECUTED 12b273: 0f 84 97 01 00 00 je 12b410 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12b279: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 12b27c: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 12b280: d3 e0 shl %cl,%eax <== NOT EXECUTED 12b282: 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) << 12b285: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 12b289: d3 e0 shl %cl,%eax <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 12b28b: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12b28e: 8b 51 04 mov 0x4(%ecx),%edx <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 12b291: 89 d6 mov %edx,%esi <== NOT EXECUTED 12b293: c1 ee 09 shr $0x9,%esi <== NOT EXECUTED 12b296: 01 f0 add %esi,%eax <== NOT EXECUTED 12b298: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED 12b29b: c1 ea 05 shr $0x5,%edx <== NOT EXECUTED 12b29e: 83 e2 0f and $0xf,%edx <== NOT EXECUTED 12b2a1: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; 12b2a4: 89 d0 mov %edx,%eax <== NOT EXECUTED 12b2a6: 83 e0 01 and $0x1,%eax <== NOT EXECUTED 12b2a9: 8d 0c 00 lea (%eax,%eax,1),%ecx <== NOT EXECUTED 12b2ac: 8d 04 01 lea (%ecx,%eax,1),%eax <== NOT EXECUTED 12b2af: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED 12b2b2: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 12b2b5: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 12b2b8: 01 c1 add %eax,%ecx <== NOT EXECUTED 12b2ba: 8b 01 mov (%ecx),%eax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 12b2bc: 83 c1 04 add $0x4,%ecx <== NOT EXECUTED 12b2bf: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 12b2c2: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 12b2c4: 75 35 jne 12b2fb <== NOT EXECUTED 12b2c6: eb 50 jmp 12b318 <== 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)) ) 12b2c8: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12b2cc: 74 39 je 12b307 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12b2ce: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 12b2d1: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 12b2d5: d3 e6 shl %cl,%esi <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 12b2d7: 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) 12b2da: 89 f9 mov %edi,%ecx <== NOT EXECUTED 12b2dc: c1 e9 09 shr $0x9,%ecx <== NOT EXECUTED 12b2df: 01 ce add %ecx,%esi <== NOT EXECUTED 12b2e1: c1 e6 04 shl $0x4,%esi <== NOT EXECUTED 12b2e4: c1 ef 05 shr $0x5,%edi <== NOT EXECUTED 12b2e7: 83 e7 0f and $0xf,%edi <== NOT EXECUTED 12b2ea: 01 fe add %edi,%esi <== NOT EXECUTED 12b2ec: 39 f2 cmp %esi,%edx <== NOT EXECUTED 12b2ee: 0f 84 30 01 00 00 je 12b424 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 12b2f4: 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) ; ) 12b2f6: 39 45 e4 cmp %eax,-0x1c(%ebp) <== NOT EXECUTED 12b2f9: 74 1d je 12b318 <== 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) + 12b2fb: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 12b2fe: 83 fe 01 cmp $0x1,%esi <== NOT EXECUTED 12b301: 74 d4 je 12b2d7 <== 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)) ) 12b303: 85 f6 test %esi,%esi <== NOT EXECUTED 12b305: 74 c1 je 12b2c8 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12b307: 83 ee 02 sub $0x2,%esi <== NOT EXECUTED 12b30a: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 12b30e: d3 e6 shl %cl,%esi <== NOT EXECUTED 12b310: 03 73 30 add 0x30(%ebx),%esi <== NOT EXECUTED 12b313: eb bc jmp 12b2d1 <== NOT EXECUTED 12b315: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; 12b318: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 12b31b: 03 4b 68 add 0x68(%ebx),%ecx <== NOT EXECUTED 12b31e: 8b 01 mov (%ecx),%eax <== NOT EXECUTED 12b320: 83 c1 04 add $0x4,%ecx <== NOT EXECUTED 12b323: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 12b326: 39 c8 cmp %ecx,%eax <== NOT EXECUTED 12b328: 75 3d jne 12b367 <== NOT EXECUTED 12b32a: 66 90 xchg %ax,%ax <== NOT EXECUTED 12b32c: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED 12b333: eb 5f jmp 12b394 <== NOT EXECUTED 12b335: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b338: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12b33c: 74 35 je 12b373 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12b33e: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 12b341: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 12b345: d3 e6 shl %cl,%esi <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 12b347: 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) 12b34a: 89 f9 mov %edi,%ecx <== NOT EXECUTED 12b34c: c1 e9 09 shr $0x9,%ecx <== NOT EXECUTED 12b34f: 01 ce add %ecx,%esi <== NOT EXECUTED 12b351: c1 e6 04 shl $0x4,%esi <== NOT EXECUTED 12b354: c1 ef 05 shr $0x5,%edi <== NOT EXECUTED 12b357: 83 e7 0f and $0xf,%edi <== NOT EXECUTED 12b35a: 01 fe add %edi,%esi <== NOT EXECUTED 12b35c: 39 f2 cmp %esi,%edx <== NOT EXECUTED 12b35e: 74 24 je 12b384 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 12b360: 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) ; ) 12b362: 39 45 e4 cmp %eax,-0x1c(%ebp) <== NOT EXECUTED 12b365: 74 c5 je 12b32c <== 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) + 12b367: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 12b36a: 83 fe 01 cmp $0x1,%esi <== NOT EXECUTED 12b36d: 74 d8 je 12b347 <== 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)) ) 12b36f: 85 f6 test %esi,%esi <== NOT EXECUTED 12b371: 74 c5 je 12b338 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12b373: 83 ee 02 sub $0x2,%esi <== NOT EXECUTED 12b376: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 12b37a: d3 e6 shl %cl,%esi <== NOT EXECUTED 12b37c: 03 73 30 add 0x30(%ebx),%esi <== NOT EXECUTED 12b37f: eb c0 jmp 12b341 <== NOT EXECUTED 12b381: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 12b384: 85 d2 test %edx,%edx <== NOT EXECUTED 12b386: 74 05 je 12b38d <== NOT EXECUTED 12b388: 3b 50 0c cmp 0xc(%eax),%edx <== NOT EXECUTED 12b38b: 75 d3 jne 12b360 <== 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) ; ) 12b38d: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 12b394: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b397: 6a 44 push $0x44 <== NOT EXECUTED 12b399: 89 55 d8 mov %edx,-0x28(%ebp) <== NOT EXECUTED 12b39c: e8 67 3a fe ff call 10ee08 <== NOT EXECUTED 12b3a1: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 12b3a4: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 12b3a7: 89 01 mov %eax,(%ecx) <== NOT EXECUTED if ( lfat_fd == NULL ) 12b3a9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b3ac: 85 c0 test %eax,%eax <== NOT EXECUTED 12b3ae: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED 12b3b1: 0f 84 b9 00 00 00 je 12b470 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 12b3b7: b9 44 00 00 00 mov $0x44,%ecx <== NOT EXECUTED 12b3bc: 31 c0 xor %eax,%eax <== NOT EXECUTED 12b3be: 8b 7d e4 mov -0x1c(%ebp),%edi <== NOT EXECUTED 12b3c1: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED lfat_fd->links_num = 1; 12b3c3: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12b3c6: c7 40 08 01 00 00 00 movl $0x1,0x8(%eax) <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; 12b3cd: 80 60 30 fe andb $0xfe,0x30(%eax) <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 12b3d1: c7 40 3c ff ff ff ff movl $0xffffffff,0x3c(%eax) <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 12b3d8: 89 c7 mov %eax,%edi <== NOT EXECUTED 12b3da: 83 c7 20 add $0x20,%edi <== NOT EXECUTED 12b3dd: b1 04 mov $0x4,%cl <== NOT EXECUTED 12b3df: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 12b3e2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED if ( rc != RC_OK ) 12b3e4: 8b 75 dc mov -0x24(%ebp),%esi <== NOT EXECUTED 12b3e7: 85 f6 test %esi,%esi <== NOT EXECUTED 12b3e9: 74 4d je 12b438 <== NOT EXECUTED lfat_fd->ino = key; 12b3eb: 89 50 0c mov %edx,0xc(%eax) <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 12b3ee: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12b3f1: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12b3f4: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12b3f7: 03 43 64 add 0x64(%ebx),%eax <== NOT EXECUTED 12b3fa: 50 push %eax <== NOT EXECUTED 12b3fb: e8 10 86 fe ff call 113a10 <_Chain_Append> <== NOT EXECUTED 12b400: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 12b402: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12b405: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b408: 5b pop %ebx <== NOT EXECUTED 12b409: 5e pop %esi <== NOT EXECUTED 12b40a: 5f pop %edi <== NOT EXECUTED 12b40b: c9 leave <== NOT EXECUTED 12b40c: c3 ret <== NOT EXECUTED 12b40d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b410: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12b414: 0f 84 5f fe ff ff je 12b279 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12b41a: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 12b41d: e9 63 fe ff ff jmp 12b285 <== NOT EXECUTED 12b422: 66 90 xchg %ax,%ax <== NOT EXECUTED /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; 12b424: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 12b427: 89 02 mov %eax,(%edx) <== NOT EXECUTED lfat_fd->links_num++; 12b429: ff 40 08 incl 0x8(%eax) <== NOT EXECUTED 12b42c: 31 c0 xor %eax,%eax <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 12b42e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b431: 5b pop %ebx <== NOT EXECUTED 12b432: 5e pop %esi <== NOT EXECUTED 12b433: 5f pop %edi <== NOT EXECUTED 12b434: c9 leave <== NOT EXECUTED 12b435: c3 ret <== NOT EXECUTED 12b436: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 12b438: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b43b: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12b43e: e8 79 00 00 00 call 12b4bc <== NOT EXECUTED 12b443: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 12b446: 89 42 0c mov %eax,0xc(%edx) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 12b449: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b44c: 85 c0 test %eax,%eax <== NOT EXECUTED 12b44e: 75 9e jne 12b3ee <== NOT EXECUTED { free((*fat_fd)); 12b450: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b453: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 12b456: ff 31 pushl (%ecx) <== NOT EXECUTED 12b458: e8 0b 34 fe ff call 10e868 <== 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 ); 12b45d: e8 2a b3 01 00 call 14678c <__errno> <== NOT EXECUTED 12b462: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 12b468: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12b46b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b46e: eb 95 jmp 12b405 <== NOT EXECUTED /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); 12b470: e8 17 b3 01 00 call 14678c <__errno> <== NOT EXECUTED 12b475: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 12b47b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12b47e: eb 85 jmp 12b405 <== NOT EXECUTED =============================================================================== 0012af94 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 12af94: 55 push %ebp <== NOT EXECUTED 12af95: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12af97: 57 push %edi <== NOT EXECUTED 12af98: 56 push %esi <== NOT EXECUTED 12af99: 53 push %ebx <== NOT EXECUTED 12af9a: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 12af9d: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 12afa0: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12afa3: 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) 12afa6: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 12afa9: 85 c9 test %ecx,%ecx <== NOT EXECUTED 12afab: 0f 84 33 01 00 00 je 12b0e4 <== NOT EXECUTED /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 12afb1: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 12afb4: 8b 42 18 mov 0x18(%edx),%eax <== NOT EXECUTED 12afb7: 39 f8 cmp %edi,%eax <== NOT EXECUTED 12afb9: 0f 86 25 01 00 00 jbe 12b0e4 <== NOT EXECUTED return FAT_EOF; if ((count > fat_fd->fat_file_size) || 12afbf: 39 45 14 cmp %eax,0x14(%ebp) <== NOT EXECUTED 12afc2: 0f 86 28 01 00 00 jbe 12b0f0 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 12afc8: 29 f8 sub %edi,%eax <== NOT EXECUTED 12afca: 89 45 14 mov %eax,0x14(%ebp) <== NOT EXECUTED { int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 12afcd: 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)) && 12afd4: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12afd7: 83 79 20 01 cmpl $0x1,0x20(%ecx) <== NOT EXECUTED 12afdb: 0f 84 23 01 00 00 je 12b104 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 12afe1: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 12afe5: 89 fe mov %edi,%esi <== NOT EXECUTED 12afe7: d3 ee shr %cl,%esi <== NOT EXECUTED 12afe9: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); 12afec: 66 8b 73 06 mov 0x6(%ebx),%si <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 12aff0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12aff3: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12aff6: 50 push %eax <== NOT EXECUTED 12aff7: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 12affa: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 12affd: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b000: e8 d3 f7 ff ff call 12a7d8 <== NOT EXECUTED if (rc != RC_OK) 12b005: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b008: 85 c0 test %eax,%eax <== NOT EXECUTED 12b00a: 0f 85 d6 00 00 00 jne 12b0e6 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 12b010: 0f b7 f6 movzwl %si,%esi <== NOT EXECUTED 12b013: 4e dec %esi <== NOT EXECUTED 12b014: 21 fe and %edi,%esi <== NOT EXECUTED 12b016: 89 75 c8 mov %esi,-0x38(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12b019: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED 12b01c: 85 f6 test %esi,%esi <== NOT EXECUTED 12b01e: 0f 84 58 01 00 00 je 12b17c <== NOT EXECUTED cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 12b024: 8a 53 02 mov 0x2(%ebx),%dl <== NOT EXECUTED 12b027: 88 55 cf mov %dl,-0x31(%ebp) <== NOT EXECUTED 12b02a: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 12b02c: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 12b02f: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 12b032: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 12b039: 89 df mov %ebx,%edi <== NOT EXECUTED 12b03b: eb 74 jmp 12b0b1 <== NOT EXECUTED 12b03d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b040: f6 46 0a 03 testb $0x3,0xa(%esi) <== NOT EXECUTED 12b044: 0f 84 87 00 00 00 je 12b0d1 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12b04a: 8b 46 1c mov 0x1c(%esi),%eax <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 12b04d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b050: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED 12b053: 03 4d d0 add -0x30(%ebp),%ecx <== NOT EXECUTED 12b056: 51 push %ecx <== NOT EXECUTED 12b057: 53 push %ebx <== NOT EXECUTED 12b058: 0f b7 d2 movzwl %dx,%edx <== NOT EXECUTED 12b05b: 4a dec %edx <== NOT EXECUTED 12b05c: 23 55 d4 and -0x2c(%ebp),%edx <== NOT EXECUTED 12b05f: 52 push %edx <== NOT EXECUTED 12b060: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 12b063: 8a 4d cf mov -0x31(%ebp),%cl <== NOT EXECUTED 12b066: d3 ea shr %cl,%edx <== NOT EXECUTED 12b068: 01 d0 add %edx,%eax <== NOT EXECUTED 12b06a: 50 push %eax <== NOT EXECUTED 12b06b: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12b06e: e8 11 0c 00 00 call 12bc84 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 12b073: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12b076: 85 c0 test %eax,%eax <== NOT EXECUTED 12b078: 0f 88 ce 00 00 00 js 12b14c <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; 12b07e: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 12b081: 50 push %eax <== NOT EXECUTED 12b082: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12b085: 50 push %eax <== NOT EXECUTED 12b086: 56 push %esi <== NOT EXECUTED 12b087: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12b08a: e8 55 7a 01 00 call 142ae4 <== NOT EXECUTED if ( rc != RC_OK ) 12b08f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b092: 85 c0 test %eax,%eax <== NOT EXECUTED 12b094: 75 50 jne 12b0e6 <== NOT EXECUTED ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; cmpltd += c; 12b096: 01 5d d0 add %ebx,-0x30(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12b099: 29 5d 14 sub %ebx,0x14(%ebp) <== NOT EXECUTED 12b09c: 0f 84 b2 00 00 00 je 12b154 <== NOT EXECUTED 12b0a2: 8a 57 02 mov 0x2(%edi),%dl <== NOT EXECUTED 12b0a5: 88 55 cf mov %dl,-0x31(%ebp) <== NOT EXECUTED 12b0a8: 8b 17 mov (%edi),%edx <== NOT EXECUTED 12b0aa: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 12b0b1: 0f b7 5f 06 movzwl 0x6(%edi),%ebx <== NOT EXECUTED 12b0b5: 2b 5d d4 sub -0x2c(%ebp),%ebx <== NOT EXECUTED 12b0b8: 3b 5d 14 cmp 0x14(%ebp),%ebx <== NOT EXECUTED 12b0bb: 76 03 jbe 12b0c0 <== NOT EXECUTED 12b0bd: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 12b0c0: 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; 12b0c3: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 12b0c6: 8b 71 34 mov 0x34(%ecx),%esi <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b0c9: 85 c0 test %eax,%eax <== NOT EXECUTED 12b0cb: 0f 84 6f ff ff ff je 12b040 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12b0d1: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 12b0d4: 0f b6 4e 05 movzbl 0x5(%esi),%ecx <== NOT EXECUTED 12b0d8: d3 e0 shl %cl,%eax <== NOT EXECUTED 12b0da: 03 46 30 add 0x30(%esi),%eax <== NOT EXECUTED 12b0dd: e9 6b ff ff ff jmp 12b04d <== NOT EXECUTED 12b0e2: 66 90 xchg %ax,%ax <== NOT EXECUTED /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 12b0e4: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12b0e6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b0e9: 5b pop %ebx <== NOT EXECUTED 12b0ea: 5e pop %esi <== NOT EXECUTED 12b0eb: 5f pop %edi <== NOT EXECUTED 12b0ec: c9 leave <== NOT EXECUTED 12b0ed: c3 ret <== NOT EXECUTED 12b0ee: 66 90 xchg %ax,%ax <== NOT EXECUTED * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 12b0f0: 89 c2 mov %eax,%edx <== NOT EXECUTED 12b0f2: 2b 55 14 sub 0x14(%ebp),%edx <== NOT EXECUTED 12b0f5: 39 d7 cmp %edx,%edi <== NOT EXECUTED 12b0f7: 0f 86 d0 fe ff ff jbe 12afcd <== NOT EXECUTED 12b0fd: e9 c6 fe ff ff jmp 12afc8 <== NOT EXECUTED 12b102: 66 90 xchg %ax,%ax <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12b104: 8b 51 24 mov 0x24(%ecx),%edx <== NOT EXECUTED 12b107: 85 d2 test %edx,%edx <== NOT EXECUTED 12b109: 0f 85 d2 fe ff ff jne 12afe1 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 12b10f: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12b113: 0f 84 c8 fe ff ff je 12afe1 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 12b119: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b11c: 85 c0 test %eax,%eax <== NOT EXECUTED 12b11e: 75 69 jne 12b189 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12b120: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 12b123: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b126: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED 12b129: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 12b12c: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 12b12f: 4a dec %edx <== NOT EXECUTED 12b130: 21 fa and %edi,%edx <== NOT EXECUTED 12b132: 52 push %edx <== NOT EXECUTED 12b133: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 12b137: d3 ef shr %cl,%edi <== NOT EXECUTED 12b139: 01 f8 add %edi,%eax <== NOT EXECUTED 12b13b: 50 push %eax <== NOT EXECUTED 12b13c: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12b13f: e8 40 0b 00 00 call 12bc84 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 12b144: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12b147: 85 c0 test %eax,%eax <== NOT EXECUTED 12b149: 79 9b jns 12b0e6 <== NOT EXECUTED 12b14b: 90 nop <== NOT EXECUTED /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 12b14c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b151: eb 93 jmp 12b0e6 <== NOT EXECUTED 12b153: 90 nop <== NOT EXECUTED 12b154: 89 fb mov %edi,%ebx <== NOT EXECUTED 12b156: 89 f7 mov %esi,%edi <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12b158: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 12b15b: 8b 75 c8 mov -0x38(%ebp),%esi <== NOT EXECUTED 12b15e: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 12b161: 8d 54 0e ff lea -0x1(%esi,%ecx,1),%edx <== NOT EXECUTED 12b165: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 12b169: d3 ea shr %cl,%edx <== NOT EXECUTED 12b16b: 03 55 c4 add -0x3c(%ebp),%edx <== NOT EXECUTED 12b16e: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12b171: 89 51 34 mov %edx,0x34(%ecx) <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 12b174: 89 79 38 mov %edi,0x38(%ecx) <== NOT EXECUTED return cmpltd; 12b177: e9 6a ff ff ff jmp 12b0e6 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12b17c: 31 c0 xor %eax,%eax <== NOT EXECUTED 12b17e: 31 ff xor %edi,%edi <== NOT EXECUTED 12b180: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 12b187: eb d2 jmp 12b15b <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12b189: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 12b18c: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 12b190: d3 e0 shl %cl,%eax <== NOT EXECUTED 12b192: 03 43 30 add 0x30(%ebx),%eax <== NOT EXECUTED 12b195: eb 8c jmp 12b123 <== NOT EXECUTED =============================================================================== 0012a734 : * RETURNS: * RC_OK */ int fat_file_reopen(fat_file_fd_t *fat_fd) { 12a734: 55 push %ebp <== NOT EXECUTED 12a735: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12a737: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED fat_fd->links_num++; 12a73a: ff 40 08 incl 0x8(%eax) <== NOT EXECUTED return RC_OK; } 12a73d: 31 c0 xor %eax,%eax <== NOT EXECUTED 12a73f: c9 leave <== NOT EXECUTED 12a740: c3 ret <== NOT EXECUTED =============================================================================== 0012a744 : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 12a744: 55 push %ebp <== NOT EXECUTED 12a745: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12a747: 57 push %edi <== NOT EXECUTED 12a748: 56 push %esi <== NOT EXECUTED 12a749: 53 push %ebx <== NOT EXECUTED 12a74a: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 12a74d: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12a750: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12a753: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 12a756: 8b 7e 1c mov 0x1c(%esi),%edi <== NOT EXECUTED uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12a759: 83 7e 20 01 cmpl $0x1,0x20(%esi) <== NOT EXECUTED 12a75d: 74 61 je 12a7c0 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 12a75f: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi) <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 12a766: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 12a769: 21 f8 and %edi,%eax <== NOT EXECUTED 12a76b: 3b 43 10 cmp 0x10(%ebx),%eax <== NOT EXECUTED 12a76e: 73 3b jae 12a7ab <== 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; 12a770: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 12a773: eb 19 jmp 12a78e <== NOT EXECUTED 12a775: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 12a778: 0f b7 43 06 movzwl 0x6(%ebx),%eax <== NOT EXECUTED 12a77c: 01 46 18 add %eax,0x18(%esi) <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 12a77f: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12a782: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 12a785: 21 c2 and %eax,%edx <== NOT EXECUTED 12a787: 3b 53 10 cmp 0x10(%ebx),%edx <== NOT EXECUTED 12a78a: 73 24 jae 12a7b0 <== NOT EXECUTED 12a78c: 89 c7 mov %eax,%edi <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 12a78e: 50 push %eax <== NOT EXECUTED 12a78f: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12a792: 50 push %eax <== NOT EXECUTED 12a793: 57 push %edi <== NOT EXECUTED 12a794: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12a797: e8 48 83 01 00 call 142ae4 <== NOT EXECUTED if ( rc != RC_OK ) 12a79c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12a79f: 85 c0 test %eax,%eax <== NOT EXECUTED 12a7a1: 74 d5 je 12a778 <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 12a7a3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12a7a6: 5b pop %ebx <== NOT EXECUTED 12a7a7: 5e pop %esi <== NOT EXECUTED 12a7a8: 5f pop %edi <== NOT EXECUTED 12a7a9: c9 leave <== NOT EXECUTED 12a7aa: c3 ret <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 12a7ab: 31 ff xor %edi,%edi <== NOT EXECUTED 12a7ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 12a7b0: 89 7e 3c mov %edi,0x3c(%esi) <== NOT EXECUTED 12a7b3: 31 c0 xor %eax,%eax <== NOT EXECUTED return rc; } 12a7b5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12a7b8: 5b pop %ebx <== NOT EXECUTED 12a7b9: 5e pop %esi <== NOT EXECUTED 12a7ba: 5f pop %edi <== NOT EXECUTED 12a7bb: c9 leave <== NOT EXECUTED 12a7bc: c3 ret <== NOT EXECUTED 12a7bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12a7c0: 8b 56 24 mov 0x24(%esi),%edx <== NOT EXECUTED 12a7c3: 85 d2 test %edx,%edx <== NOT EXECUTED 12a7c5: 75 98 jne 12a75f <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 12a7c7: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12a7cb: 74 92 je 12a75f <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; 12a7cd: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 12a7d0: 89 46 18 mov %eax,0x18(%esi) <== NOT EXECUTED 12a7d3: 31 c0 xor %eax,%eax <== NOT EXECUTED return rc; 12a7d5: eb cc jmp 12a7a3 <== NOT EXECUTED =============================================================================== 0012aa74 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 12aa74: 55 push %ebp <== NOT EXECUTED 12aa75: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12aa77: 57 push %edi <== NOT EXECUTED 12aa78: 56 push %esi <== NOT EXECUTED 12aa79: 53 push %ebx <== NOT EXECUTED 12aa7a: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 12aa7d: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 12aa80: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 12aa83: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12aa86: 8b 5e 34 mov 0x34(%esi),%ebx <== NOT EXECUTED uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) 12aa89: 8b 47 18 mov 0x18(%edi),%eax <== NOT EXECUTED 12aa8c: 39 d0 cmp %edx,%eax <== NOT EXECUTED 12aa8e: 0f 86 9c 00 00 00 jbe 12ab30 <== 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; 12aa94: 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; 12aa9b: 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); 12aaa2: 85 c0 test %eax,%eax <== NOT EXECUTED 12aaa4: 0f 84 90 00 00 00 je 12ab3a <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 12aaaa: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 12aaae: 0f b7 5b 06 movzwl 0x6(%ebx),%ebx <== NOT EXECUTED 12aab2: 8d 5c 1a ff lea -0x1(%edx,%ebx,1),%ebx <== NOT EXECUTED 12aab6: d3 eb shr %cl,%ebx <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 12aab8: 89 da mov %ebx,%edx <== NOT EXECUTED 12aaba: d3 e2 shl %cl,%edx <== NOT EXECUTED 12aabc: 39 d0 cmp %edx,%eax <== NOT EXECUTED 12aabe: 76 70 jbe 12ab30 <== NOT EXECUTED return RC_OK; if (cl_start != 0) 12aac0: 85 db test %ebx,%ebx <== NOT EXECUTED 12aac2: 74 1a je 12aade <== NOT EXECUTED { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 12aac4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12aac7: 8d 4b ff lea -0x1(%ebx),%ecx <== NOT EXECUTED 12aaca: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 12aacd: 50 push %eax <== NOT EXECUTED 12aace: 89 fa mov %edi,%edx <== NOT EXECUTED 12aad0: 89 f0 mov %esi,%eax <== NOT EXECUTED 12aad2: e8 01 fd ff ff call 12a7d8 <== NOT EXECUTED if (rc != RC_OK) 12aad7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12aada: 85 c0 test %eax,%eax <== NOT EXECUTED 12aadc: 75 54 jne 12ab32 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 12aade: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12aae1: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12aae4: 50 push %eax <== NOT EXECUTED 12aae5: 89 d9 mov %ebx,%ecx <== NOT EXECUTED 12aae7: 89 fa mov %edi,%edx <== NOT EXECUTED 12aae9: 89 f0 mov %esi,%eax <== NOT EXECUTED 12aaeb: e8 e8 fc ff ff call 12a7d8 <== NOT EXECUTED if (rc != RC_OK) 12aaf0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12aaf3: 85 c0 test %eax,%eax <== NOT EXECUTED 12aaf5: 75 3b jne 12ab32 <== NOT EXECUTED return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 12aaf7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12aafa: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12aafd: 56 push %esi <== NOT EXECUTED 12aafe: e8 65 81 01 00 call 142c68 <== NOT EXECUTED if (rc != RC_OK) 12ab03: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ab06: 85 c0 test %eax,%eax <== NOT EXECUTED 12ab08: 75 28 jne 12ab32 <== NOT EXECUTED return rc; if (cl_start != 0) 12ab0a: 85 db test %ebx,%ebx <== NOT EXECUTED 12ab0c: 74 24 je 12ab32 <== NOT EXECUTED { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 12ab0e: 50 push %eax <== NOT EXECUTED 12ab0f: 6a ff push $0xffffffff <== NOT EXECUTED 12ab11: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 12ab14: 56 push %esi <== NOT EXECUTED 12ab15: e8 a2 7d 01 00 call 1428bc <== NOT EXECUTED if ( rc != RC_OK ) 12ab1a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ab1d: 85 c0 test %eax,%eax <== NOT EXECUTED 12ab1f: 75 11 jne 12ab32 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; 12ab21: 4b dec %ebx <== NOT EXECUTED 12ab22: 89 5f 34 mov %ebx,0x34(%edi) <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 12ab25: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 12ab28: 89 57 38 mov %edx,0x38(%edi) <== NOT EXECUTED fat_fd->map.last_cln = new_last_cln; 12ab2b: 89 57 3c mov %edx,0x3c(%edi) <== NOT EXECUTED 12ab2e: eb 02 jmp 12ab32 <== NOT EXECUTED 12ab30: 31 c0 xor %eax,%eax <== NOT EXECUTED } return RC_OK; } 12ab32: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12ab35: 5b pop %ebx <== NOT EXECUTED 12ab36: 5e pop %esi <== NOT EXECUTED 12ab37: 5f pop %edi <== NOT EXECUTED 12ab38: c9 leave <== NOT EXECUTED 12ab39: c3 ret <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 12ab3a: 68 cb 43 16 00 push $0x1643cb <== NOT EXECUTED 12ab3f: 68 33 44 16 00 push $0x164433 <== NOT EXECUTED 12ab44: 68 6d 02 00 00 push $0x26d <== NOT EXECUTED 12ab49: 68 e4 43 16 00 push $0x1643e4 <== NOT EXECUTED 12ab4e: e8 91 36 fe ff call 10e1e4 <__assert_func> <== NOT EXECUTED =============================================================================== 0012ad28 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 12ad28: 55 push %ebp <== NOT EXECUTED 12ad29: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12ad2b: 57 push %edi <== NOT EXECUTED 12ad2c: 56 push %esi <== NOT EXECUTED 12ad2d: 53 push %ebx <== NOT EXECUTED 12ad2e: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 12ad31: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 12ad34: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 12ad37: 8b 5e 34 mov 0x34(%esi),%ebx <== NOT EXECUTED uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 12ad3a: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 12ad3d: 85 c9 test %ecx,%ecx <== NOT EXECUTED 12ad3f: 0f 84 eb 01 00 00 je 12af30 <== 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; 12ad45: 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; 12ad4c: 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 ) 12ad53: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12ad56: 39 78 18 cmp %edi,0x18(%eax) <== NOT EXECUTED 12ad59: 0f 82 dd 01 00 00 jb 12af3c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 12ad5f: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 12ad62: 8b 42 14 mov 0x14(%edx),%eax <== NOT EXECUTED 12ad65: 39 45 14 cmp %eax,0x14(%ebp) <== NOT EXECUTED 12ad68: 0f 87 ce 01 00 00 ja 12af3c <== NOT EXECUTED 12ad6e: 2b 45 14 sub 0x14(%ebp),%eax <== NOT EXECUTED 12ad71: 39 c7 cmp %eax,%edi <== NOT EXECUTED 12ad73: 0f 87 c3 01 00 00 ja 12af3c <== NOT EXECUTED (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 12ad79: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 12ad7c: 01 fa add %edi,%edx <== NOT EXECUTED 12ad7e: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 12ad81: 50 push %eax <== NOT EXECUTED 12ad82: 52 push %edx <== NOT EXECUTED 12ad83: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 12ad86: 56 push %esi <== NOT EXECUTED 12ad87: 89 55 bc mov %edx,-0x44(%ebp) <== NOT EXECUTED 12ad8a: e8 c5 fd ff ff call 12ab54 <== NOT EXECUTED if (rc != RC_OK) 12ad8f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ad92: 85 c0 test %eax,%eax <== NOT EXECUTED 12ad94: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED 12ad97: 0f 85 8b 01 00 00 jne 12af28 <== NOT EXECUTED /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 12ad9d: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12ada0: 39 c2 cmp %eax,%edx <== NOT EXECUTED 12ada2: 74 05 je 12ada9 <== NOT EXECUTED count = c - start; 12ada4: 29 f8 sub %edi,%eax <== NOT EXECUTED 12ada6: 89 45 14 mov %eax,0x14(%ebp) <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12ada9: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12adac: 83 79 20 01 cmpl $0x1,0x20(%ecx) <== NOT EXECUTED 12adb0: 0f 84 12 01 00 00 je 12aec8 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 12adb6: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 12adba: 89 f8 mov %edi,%eax <== NOT EXECUTED 12adbc: d3 e8 shr %cl,%eax <== NOT EXECUTED 12adbe: 89 45 c0 mov %eax,-0x40(%ebp) <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); 12adc1: 66 8b 53 06 mov 0x6(%ebx),%dx <== NOT EXECUTED 12adc5: 66 89 55 d4 mov %dx,-0x2c(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 12adc9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12adcc: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 12adcf: 51 push %ecx <== NOT EXECUTED 12add0: 89 c1 mov %eax,%ecx <== NOT EXECUTED 12add2: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 12add5: 89 f0 mov %esi,%eax <== NOT EXECUTED 12add7: e8 fc f9 ff ff call 12a7d8 <== NOT EXECUTED if (rc != RC_OK) 12addc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12addf: 85 c0 test %eax,%eax <== NOT EXECUTED 12ade1: 0f 85 41 01 00 00 jne 12af28 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 12ade7: 0f b7 55 d4 movzwl -0x2c(%ebp),%edx <== NOT EXECUTED 12adeb: 4a dec %edx <== NOT EXECUTED 12adec: 21 fa and %edi,%edx <== NOT EXECUTED 12adee: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12adf1: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 12adf4: 85 c9 test %ecx,%ecx <== NOT EXECUTED 12adf6: 0f 84 7a 01 00 00 je 12af76 <== NOT EXECUTED cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 12adfc: 8a 43 02 mov 0x2(%ebx),%al <== NOT EXECUTED 12adff: 88 45 cb mov %al,-0x35(%ebp) <== NOT EXECUTED 12ae02: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 12ae04: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 12ae07: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 12ae0a: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 12ae11: 89 5d cc mov %ebx,-0x34(%ebp) <== NOT EXECUTED 12ae14: 89 f7 mov %esi,%edi <== NOT EXECUTED 12ae16: eb 7d jmp 12ae95 <== NOT EXECUTED 12ae18: f6 46 0a 03 testb $0x3,0xa(%esi) <== NOT EXECUTED 12ae1c: 0f 84 93 00 00 00 je 12aeb5 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12ae22: 8b 5e 1c mov 0x1c(%esi),%ebx <== NOT EXECUTED return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 12ae25: 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); 12ae28: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ae2b: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED 12ae2e: 03 4d d0 add -0x30(%ebp),%ecx <== NOT EXECUTED 12ae31: 51 push %ecx <== NOT EXECUTED 12ae32: 50 push %eax <== NOT EXECUTED 12ae33: 0f b7 d2 movzwl %dx,%edx <== NOT EXECUTED 12ae36: 4a dec %edx <== NOT EXECUTED 12ae37: 23 55 d4 and -0x2c(%ebp),%edx <== NOT EXECUTED 12ae3a: 52 push %edx <== NOT EXECUTED 12ae3b: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 12ae3e: 8a 4d cb mov -0x35(%ebp),%cl <== NOT EXECUTED 12ae41: d3 e8 shr %cl,%eax <== NOT EXECUTED 12ae43: 01 c3 add %eax,%ebx <== NOT EXECUTED 12ae45: 53 push %ebx <== NOT EXECUTED 12ae46: 57 push %edi <== NOT EXECUTED 12ae47: e8 ec 0a 00 00 call 12b938 <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 12ae4c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12ae4f: 85 c0 test %eax,%eax <== NOT EXECUTED 12ae51: 0f 88 c9 00 00 00 js 12af20 <== NOT EXECUTED return -1; count -= c; 12ae57: 8b 5d e0 mov -0x20(%ebp),%ebx <== NOT EXECUTED cmpltd += c; save_cln = cur_cln; 12ae5a: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 12ae5d: 50 push %eax <== NOT EXECUTED 12ae5e: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12ae61: 50 push %eax <== NOT EXECUTED 12ae62: 56 push %esi <== NOT EXECUTED 12ae63: 57 push %edi <== NOT EXECUTED 12ae64: e8 7b 7c 01 00 call 142ae4 <== NOT EXECUTED if ( rc != RC_OK ) 12ae69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ae6c: 85 c0 test %eax,%eax <== NOT EXECUTED 12ae6e: 0f 85 b4 00 00 00 jne 12af28 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; cmpltd += c; 12ae74: 01 5d d0 add %ebx,-0x30(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12ae77: 29 5d 14 sub %ebx,0x14(%ebp) <== NOT EXECUTED 12ae7a: 0f 84 d0 00 00 00 je 12af50 <== NOT EXECUTED 12ae80: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 12ae83: 8a 52 02 mov 0x2(%edx),%dl <== NOT EXECUTED 12ae86: 88 55 cb mov %dl,-0x35(%ebp) <== NOT EXECUTED 12ae89: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 12ae8c: 8b 11 mov (%ecx),%edx <== NOT EXECUTED 12ae8e: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 12ae95: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 12ae98: 0f b7 41 06 movzwl 0x6(%ecx),%eax <== NOT EXECUTED 12ae9c: 2b 45 d4 sub -0x2c(%ebp),%eax <== NOT EXECUTED 12ae9f: 3b 45 14 cmp 0x14(%ebp),%eax <== NOT EXECUTED 12aea2: 76 03 jbe 12aea7 <== NOT EXECUTED 12aea4: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 12aea7: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 12aeaa: 8b 77 34 mov 0x34(%edi),%esi <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12aead: 85 db test %ebx,%ebx <== NOT EXECUTED 12aeaf: 0f 84 63 ff ff ff je 12ae18 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12aeb5: 83 eb 02 sub $0x2,%ebx <== NOT EXECUTED 12aeb8: 0f b6 4e 05 movzbl 0x5(%esi),%ecx <== NOT EXECUTED 12aebc: d3 e3 shl %cl,%ebx <== NOT EXECUTED 12aebe: 03 5e 30 add 0x30(%esi),%ebx <== NOT EXECUTED 12aec1: e9 5f ff ff ff jmp 12ae25 <== NOT EXECUTED 12aec6: 66 90 xchg %ax,%ax <== NOT EXECUTED * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12aec8: 8b 51 24 mov 0x24(%ecx),%edx <== NOT EXECUTED 12aecb: 85 d2 test %edx,%edx <== NOT EXECUTED 12aecd: 0f 85 e3 fe ff ff jne 12adb6 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 12aed3: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12aed7: 0f 84 d9 fe ff ff je 12adb6 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 12aedd: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 12aee0: 8b 56 34 mov 0x34(%esi),%edx <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12aee3: 85 c0 test %eax,%eax <== NOT EXECUTED 12aee5: 0f 85 96 00 00 00 jne 12af81 <== NOT EXECUTED 12aeeb: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED 12aeef: 0f 84 8c 00 00 00 je 12af81 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12aef5: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 12aef8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12aefb: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED 12aefe: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 12af01: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 12af04: 4a dec %edx <== NOT EXECUTED 12af05: 21 fa and %edi,%edx <== NOT EXECUTED 12af07: 52 push %edx <== NOT EXECUTED 12af08: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 12af0c: d3 ef shr %cl,%edi <== NOT EXECUTED 12af0e: 01 f8 add %edi,%eax <== NOT EXECUTED 12af10: 50 push %eax <== NOT EXECUTED 12af11: 56 push %esi <== NOT EXECUTED 12af12: e8 21 0a 00 00 call 12b938 <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 12af17: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12af1a: 85 c0 test %eax,%eax <== NOT EXECUTED 12af1c: 79 0a jns 12af28 <== NOT EXECUTED 12af1e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 12af20: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12af25: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 12af28: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12af2b: 5b pop %ebx <== NOT EXECUTED 12af2c: 5e pop %esi <== NOT EXECUTED 12af2d: 5f pop %edi <== NOT EXECUTED 12af2e: c9 leave <== NOT EXECUTED 12af2f: c3 ret <== NOT EXECUTED uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 12af30: 31 c0 xor %eax,%eax <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 12af32: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12af35: 5b pop %ebx <== NOT EXECUTED 12af36: 5e pop %esi <== NOT EXECUTED 12af37: 5f pop %edi <== NOT EXECUTED 12af38: c9 leave <== NOT EXECUTED 12af39: c3 ret <== NOT EXECUTED 12af3a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( start > fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 12af3c: e8 4b b8 01 00 call 14678c <__errno> <== NOT EXECUTED 12af41: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12af47: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12af4c: eb da jmp 12af28 <== NOT EXECUTED 12af4e: 66 90 xchg %ax,%ax <== NOT EXECUTED 12af50: 89 f2 mov %esi,%edx <== NOT EXECUTED 12af52: 8b 5d cc mov -0x34(%ebp),%ebx <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12af55: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 12af58: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 12af5b: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED 12af5e: 8d 74 39 ff lea -0x1(%ecx,%edi,1),%esi <== NOT EXECUTED 12af62: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 12af66: d3 ee shr %cl,%esi <== NOT EXECUTED 12af68: 03 75 c0 add -0x40(%ebp),%esi <== NOT EXECUTED 12af6b: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 12af6e: 89 77 34 mov %esi,0x34(%edi) <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 12af71: 89 57 38 mov %edx,0x38(%edi) <== NOT EXECUTED return cmpltd; 12af74: eb b2 jmp 12af28 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12af76: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 12af7d: 31 d2 xor %edx,%edx <== NOT EXECUTED 12af7f: eb d7 jmp 12af58 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12af81: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 12af84: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED 12af88: d3 e0 shl %cl,%eax <== NOT EXECUTED 12af8a: 03 42 30 add 0x30(%edx),%eax <== NOT EXECUTED 12af8d: e9 66 ff ff ff jmp 12aef8 <== NOT EXECUTED =============================================================================== 00142c68 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 142c68: 55 push %ebp <== NOT EXECUTED 142c69: 89 e5 mov %esp,%ebp <== NOT EXECUTED 142c6b: 57 push %edi <== NOT EXECUTED 142c6c: 56 push %esi <== NOT EXECUTED 142c6d: 53 push %ebx <== NOT EXECUTED 142c6e: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 142c71: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 142c74: 8b 77 34 mov 0x34(%edi),%esi <== NOT EXECUTED uint32_t cur_cln = chain; uint32_t next_cln = 0; 142c77: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 142c7e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 142c81: 23 46 0c and 0xc(%esi),%eax <== NOT EXECUTED 142c84: 39 46 10 cmp %eax,0x10(%esi) <== NOT EXECUTED 142c87: 0f 86 a9 00 00 00 jbe 142d36 <== NOT EXECUTED 142c8d: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED 142c90: 31 d2 xor %edx,%edx <== NOT EXECUTED 142c92: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 142c99: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED 142c9c: 89 d6 mov %edx,%esi <== NOT EXECUTED 142c9e: eb 25 jmp 142cc5 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 142ca0: 50 push %eax <== NOT EXECUTED 142ca1: 6a 00 push $0x0 <== NOT EXECUTED 142ca3: 53 push %ebx <== NOT EXECUTED 142ca4: 57 push %edi <== NOT EXECUTED 142ca5: e8 12 fc ff ff call 1428bc <== NOT EXECUTED if ( rc != RC_OK ) 142caa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 142cad: 85 c0 test %eax,%eax <== NOT EXECUTED 142caf: 74 03 je 142cb4 <== NOT EXECUTED 142cb1: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; 142cb4: 46 inc %esi <== NOT EXECUTED cur_cln = next_cln; 142cb5: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 142cb8: 89 d8 mov %ebx,%eax <== NOT EXECUTED 142cba: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 142cbd: 23 42 0c and 0xc(%edx),%eax <== NOT EXECUTED 142cc0: 3b 42 10 cmp 0x10(%edx),%eax <== NOT EXECUTED 142cc3: 73 3f jae 142d04 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 142cc5: 52 push %edx <== NOT EXECUTED 142cc6: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 142cc9: 50 push %eax <== NOT EXECUTED 142cca: 53 push %ebx <== NOT EXECUTED 142ccb: 57 push %edi <== NOT EXECUTED 142ccc: e8 13 fe ff ff call 142ae4 <== NOT EXECUTED if ( rc != RC_OK ) 142cd1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 142cd4: 85 c0 test %eax,%eax <== NOT EXECUTED 142cd6: 74 c8 je 142ca0 <== NOT EXECUTED 142cd8: 89 f2 mov %esi,%edx <== NOT EXECUTED 142cda: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED 142cdd: 89 c7 mov %eax,%edi <== NOT EXECUTED { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 142cdf: 8b 46 40 mov 0x40(%esi),%eax <== NOT EXECUTED 142ce2: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 142ce5: 74 06 je 142ced <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 142ce7: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED 142cea: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED fat_buf_release(fs_info); 142ced: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 142cf0: 56 push %esi <== NOT EXECUTED 142cf1: e8 96 88 fe ff call 12b58c <== NOT EXECUTED return rc; 142cf6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED fat_buf_release(fs_info); if (rc1 != RC_OK) return rc1; return RC_OK; } 142cf9: 89 f8 mov %edi,%eax <== NOT EXECUTED 142cfb: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 142cfe: 5b pop %ebx <== NOT EXECUTED 142cff: 5e pop %esi <== NOT EXECUTED 142d00: 5f pop %edi <== NOT EXECUTED 142d01: c9 leave <== NOT EXECUTED 142d02: c3 ret <== NOT EXECUTED 142d03: 90 nop <== NOT EXECUTED 142d04: 89 f2 mov %esi,%edx <== NOT EXECUTED 142d06: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 142d09: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 142d0c: 89 46 44 mov %eax,0x44(%esi) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 142d0f: 8b 46 40 mov 0x40(%esi),%eax <== NOT EXECUTED 142d12: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 142d15: 74 06 je 142d1d <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 142d17: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED 142d1a: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED fat_buf_release(fs_info); 142d1d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 142d20: 56 push %esi <== NOT EXECUTED 142d21: e8 66 88 fe ff call 12b58c <== NOT EXECUTED 142d26: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED 142d29: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (rc1 != RC_OK) return rc1; return RC_OK; } 142d2c: 89 f8 mov %edi,%eax <== NOT EXECUTED 142d2e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 142d31: 5b pop %ebx <== NOT EXECUTED 142d32: 5e pop %esi <== NOT EXECUTED 142d33: 5f pop %edi <== NOT EXECUTED 142d34: c9 leave <== NOT EXECUTED 142d35: c3 ret <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 142d36: 31 d2 xor %edx,%edx <== NOT EXECUTED 142d38: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 142d3f: eb c8 jmp 142d09 <== NOT EXECUTED =============================================================================== 0012b480 : void fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 12b480: 55 push %ebp <== NOT EXECUTED 12b481: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b483: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 12b486: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b489: 8b 50 34 mov 0x34(%eax),%edx <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 12b48c: 2b 4a 78 sub 0x78(%edx),%ecx <== NOT EXECUTED 12b48f: 89 c8 mov %ecx,%eax <== NOT EXECUTED 12b491: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED 12b494: 03 42 6c add 0x6c(%edx),%eax <== NOT EXECUTED 12b497: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED 12b49a: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 12b49f: d3 e2 shl %cl,%edx <== NOT EXECUTED 12b4a1: f7 d2 not %edx <== NOT EXECUTED 12b4a3: 20 10 and %dl,(%eax) <== NOT EXECUTED } 12b4a5: c9 leave <== NOT EXECUTED 12b4a6: c3 ret <== NOT EXECUTED =============================================================================== 00142ae4 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 142ae4: 55 push %ebp <== NOT EXECUTED 142ae5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 142ae7: 57 push %edi <== NOT EXECUTED 142ae8: 56 push %esi <== NOT EXECUTED 142ae9: 53 push %ebx <== NOT EXECUTED 142aea: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 142aed: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 142af0: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 142af3: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED rtems_bdbuf_buffer *block0 = NULL; 142af6: 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)) ) 142afd: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 142b00: 76 67 jbe 142b69 <== NOT EXECUTED 142b02: 8b 43 34 mov 0x34(%ebx),%eax <== NOT EXECUTED 142b05: 40 inc %eax <== NOT EXECUTED 142b06: 39 c2 cmp %eax,%edx <== NOT EXECUTED 142b08: 77 5f ja 142b69 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 142b0a: 0f b6 43 0a movzbl 0xa(%ebx),%eax <== NOT EXECUTED 142b0e: a8 01 test $0x1,%al <== NOT EXECUTED 142b10: 75 72 jne 142b84 <== NOT EXECUTED 142b12: a8 02 test $0x2,%al <== NOT EXECUTED 142b14: 74 76 je 142b8c <== NOT EXECUTED 142b16: 8d 04 12 lea (%edx,%edx,1),%eax <== NOT EXECUTED 142b19: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 142b1c: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 142b20: 89 c6 mov %eax,%esi <== NOT EXECUTED 142b22: d3 ee shr %cl,%esi <== NOT EXECUTED 142b24: 03 73 4c add 0x4c(%ebx),%esi <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 142b27: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 142b29: 66 89 45 d0 mov %ax,-0x30(%ebp) <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 142b2d: 8d 7d e4 lea -0x1c(%ebp),%edi <== NOT EXECUTED 142b30: 57 push %edi <== NOT EXECUTED 142b31: 6a 01 push $0x1 <== NOT EXECUTED 142b33: 56 push %esi <== NOT EXECUTED 142b34: 53 push %ebx <== NOT EXECUTED 142b35: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 142b38: e8 bf 8b fe ff call 12b6fc <== NOT EXECUTED if (rc != RC_OK) 142b3d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 142b40: 85 c0 test %eax,%eax <== NOT EXECUTED 142b42: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 142b45: 75 32 jne 142b79 <== 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); 142b47: 0f b7 45 d0 movzwl -0x30(%ebp),%eax <== NOT EXECUTED 142b4b: 48 dec %eax <== NOT EXECUTED 142b4c: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 142b4f: 21 c8 and %ecx,%eax <== NOT EXECUTED 142b51: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 142b54: 8a 4b 0a mov 0xa(%ebx),%cl <== NOT EXECUTED 142b57: 80 f9 02 cmp $0x2,%cl <== NOT EXECUTED 142b5a: 74 48 je 142ba4 <== NOT EXECUTED 142b5c: 80 f9 04 cmp $0x4,%cl <== NOT EXECUTED 142b5f: 0f 84 a3 00 00 00 je 142c08 <== NOT EXECUTED 142b65: fe c9 dec %cl <== NOT EXECUTED 142b67: 74 57 je 142bc0 <== NOT EXECUTED *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); 142b69: e8 1e 3c 00 00 call 14678c <__errno> <== NOT EXECUTED 142b6e: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 142b74: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED break; } return RC_OK; } 142b79: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 142b7c: 5b pop %ebx <== NOT EXECUTED 142b7d: 5e pop %esi <== NOT EXECUTED 142b7e: 5f pop %edi <== NOT EXECUTED 142b7f: c9 leave <== NOT EXECUTED 142b80: c3 ret <== NOT EXECUTED 142b81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 142b84: 89 d0 mov %edx,%eax <== NOT EXECUTED 142b86: d1 e8 shr %eax <== NOT EXECUTED 142b88: 01 d0 add %edx,%eax <== NOT EXECUTED 142b8a: eb 8d jmp 142b19 <== NOT EXECUTED 142b8c: 8d 0c 95 00 00 00 00 lea 0x0(,%edx,4),%ecx <== NOT EXECUTED 142b93: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 142b96: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 142b9a: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED 142b9d: d3 ee shr %cl,%esi <== NOT EXECUTED 142b9f: 03 73 4c add 0x4c(%ebx),%esi <== NOT EXECUTED 142ba2: eb 83 jmp 142b27 <== NOT EXECUTED *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); 142ba4: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 142ba7: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 142baa: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 142bad: 0f b7 04 0a movzwl (%edx,%ecx,1),%eax <== NOT EXECUTED 142bb1: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED 142bb4: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 142bb6: 31 c0 xor %eax,%eax <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 142bb8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 142bbb: 5b pop %ebx <== NOT EXECUTED 142bbc: 5e pop %esi <== NOT EXECUTED 142bbd: 5f pop %edi <== NOT EXECUTED 142bbe: c9 leave <== NOT EXECUTED 142bbf: c3 ret <== NOT EXECUTED case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 142bc0: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 142bc3: 8b 49 20 mov 0x20(%ecx),%ecx <== NOT EXECUTED 142bc6: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED 142bc9: 0f b6 04 01 movzbl (%ecx,%eax,1),%eax <== NOT EXECUTED 142bcd: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 142bd0: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 142bd3: 89 01 mov %eax,(%ecx) <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 142bd5: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 142bd8: 49 dec %ecx <== NOT EXECUTED 142bd9: 3b 4d c4 cmp -0x3c(%ebp),%ecx <== NOT EXECUTED 142bdc: 74 5a je 142c38 <== NOT EXECUTED *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 142bde: 8b 5d d0 mov -0x30(%ebp),%ebx <== NOT EXECUTED 142be1: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 142be4: 0f b6 44 0b 01 movzbl 0x1(%ebx,%ecx,1),%eax <== NOT EXECUTED 142be9: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 142bec: 0b 45 d4 or -0x2c(%ebp),%eax <== NOT EXECUTED 142bef: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 142bf2: 89 01 mov %eax,(%ecx) <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) 142bf4: 83 e2 01 and $0x1,%edx <== NOT EXECUTED 142bf7: 74 2b je 142c24 <== NOT EXECUTED *ret_val = (*ret_val) >> FAT12_SHIFT; 142bf9: c1 e8 04 shr $0x4,%eax <== NOT EXECUTED 142bfc: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED 142bff: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 142c01: 31 c0 xor %eax,%eax <== NOT EXECUTED 142c03: e9 71 ff ff ff jmp 142b79 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); 142c08: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 142c0b: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 142c0e: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 142c11: 8b 04 0a mov (%edx,%ecx,1),%eax <== NOT EXECUTED 142c14: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED 142c17: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 142c19: 31 c0 xor %eax,%eax <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 142c1b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 142c1e: 5b pop %ebx <== NOT EXECUTED 142c1f: 5e pop %esi <== NOT EXECUTED 142c20: 5f pop %edi <== NOT EXECUTED 142c21: c9 leave <== NOT EXECUTED 142c22: c3 ret <== NOT EXECUTED 142c23: 90 nop <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; 142c24: 25 ff 0f 00 00 and $0xfff,%eax <== NOT EXECUTED 142c29: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 142c2c: 89 02 mov %eax,(%edx) <== NOT EXECUTED 142c2e: 31 c0 xor %eax,%eax <== NOT EXECUTED 142c30: e9 44 ff ff ff jmp 142b79 <== NOT EXECUTED 142c35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 142c38: 57 push %edi <== NOT EXECUTED 142c39: 6a 01 push $0x1 <== NOT EXECUTED 142c3b: 46 inc %esi <== NOT EXECUTED 142c3c: 56 push %esi <== NOT EXECUTED 142c3d: 53 push %ebx <== NOT EXECUTED 142c3e: e8 b9 8a fe ff call 12b6fc <== NOT EXECUTED &block0); if (rc != RC_OK) 142c43: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 142c46: 85 c0 test %eax,%eax <== NOT EXECUTED 142c48: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 142c4b: 0f 85 28 ff ff ff jne 142b79 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 142c51: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 142c54: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED 142c57: 0f b6 00 movzbl (%eax),%eax <== NOT EXECUTED 142c5a: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 142c5d: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED 142c60: 0b 03 or (%ebx),%eax <== NOT EXECUTED 142c62: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 142c64: eb 8e jmp 142bf4 <== NOT EXECUTED =============================================================================== 0012b4bc : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 12b4bc: 55 push %ebp <== NOT EXECUTED 12b4bd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b4bf: 57 push %edi <== NOT EXECUTED 12b4c0: 56 push %esi <== NOT EXECUTED 12b4c1: 53 push %ebx <== NOT EXECUTED 12b4c2: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 12b4c5: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b4c8: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED 12b4cb: 8b 43 74 mov 0x74(%ebx),%eax <== NOT EXECUTED 12b4ce: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 12b4d1: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12b4d4: 85 c0 test %eax,%eax <== NOT EXECUTED 12b4d6: 74 5d je 12b535 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 12b4d8: 8b 53 70 mov 0x70(%ebx),%edx <== NOT EXECUTED 12b4db: 89 d0 mov %edx,%eax <== NOT EXECUTED 12b4dd: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED 12b4e0: 03 43 6c add 0x6c(%ebx),%eax <== NOT EXECUTED 12b4e3: 8a 08 mov (%eax),%cl <== NOT EXECUTED 12b4e5: 88 4d e3 mov %cl,-0x1d(%ebp) <== NOT EXECUTED 12b4e8: 89 d1 mov %edx,%ecx <== NOT EXECUTED 12b4ea: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED 12b4ed: 0f be 75 e3 movsbl -0x1d(%ebp),%esi <== NOT EXECUTED 12b4f1: d3 fe sar %cl,%esi <== NOT EXECUTED 12b4f3: 83 e6 01 and $0x1,%esi <== NOT EXECUTED 12b4f6: 74 50 je 12b548 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); 12b4f8: 31 ff xor %edi,%edi <== NOT EXECUTED 12b4fa: eb 20 jmp 12b51c <== 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)) 12b4fc: 8b 53 70 mov 0x70(%ebx),%edx <== NOT EXECUTED 12b4ff: 89 d0 mov %edx,%eax <== NOT EXECUTED 12b501: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED 12b504: 03 43 6c add 0x6c(%ebx),%eax <== NOT EXECUTED 12b507: 8a 08 mov (%eax),%cl <== NOT EXECUTED 12b509: 88 4d e3 mov %cl,-0x1d(%ebp) <== NOT EXECUTED 12b50c: 89 d1 mov %edx,%ecx <== NOT EXECUTED 12b50e: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED 12b511: 0f be 75 e3 movsbl -0x1d(%ebp),%esi <== NOT EXECUTED 12b515: d3 fe sar %cl,%esi <== NOT EXECUTED 12b517: 83 e6 01 and $0x1,%esi <== NOT EXECUTED 12b51a: 74 2c je 12b548 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 12b51c: 42 inc %edx <== NOT EXECUTED 12b51d: 89 53 70 mov %edx,0x70(%ebx) <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 12b520: 39 55 e4 cmp %edx,-0x1c(%ebp) <== NOT EXECUTED 12b523: 77 07 ja 12b52c <== NOT EXECUTED fs_info->index = 0; 12b525: 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++) 12b52c: 47 inc %edi <== NOT EXECUTED 12b52d: 3b 7d e4 cmp -0x1c(%ebp),%edi <== NOT EXECUTED 12b530: 72 ca jb 12b4fc <== NOT EXECUTED 12b532: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 12b535: d1 e0 shl %eax <== NOT EXECUTED 12b537: ba ff ff ff 0f mov $0xfffffff,%edx <== NOT EXECUTED 12b53c: 2b 53 78 sub 0x78(%ebx),%edx <== NOT EXECUTED 12b53f: 39 d0 cmp %edx,%eax <== NOT EXECUTED 12b541: 72 1f jb 12b562 <== 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)) 12b543: 31 c0 xor %eax,%eax <== NOT EXECUTED 12b545: eb 13 jmp 12b55a <== NOT EXECUTED 12b547: 90 nop <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 12b548: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 12b54d: d3 e2 shl %cl,%edx <== NOT EXECUTED 12b54f: 0a 55 e3 or -0x1d(%ebp),%dl <== NOT EXECUTED 12b552: 88 10 mov %dl,(%eax) <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 12b554: 8b 43 70 mov 0x70(%ebx),%eax <== NOT EXECUTED 12b557: 03 43 78 add 0x78(%ebx),%eax <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 12b55a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b55d: 5b pop %ebx <== NOT EXECUTED 12b55e: 5e pop %esi <== NOT EXECUTED 12b55f: 5f pop %edi <== NOT EXECUTED 12b560: c9 leave <== NOT EXECUTED 12b561: c3 ret <== NOT EXECUTED fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; 12b562: 89 43 74 mov %eax,0x74(%ebx) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 12b565: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12b568: 50 push %eax <== NOT EXECUTED 12b569: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 12b56c: e8 2b 46 fe ff call 10fb9c <== NOT EXECUTED 12b571: 89 43 6c mov %eax,0x6c(%ebx) <== NOT EXECUTED if (fs_info->uino != NULL) 12b574: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b577: 85 c0 test %eax,%eax <== NOT EXECUTED 12b579: 74 c8 je 12b543 <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 12b57b: 8b 43 74 mov 0x74(%ebx),%eax <== NOT EXECUTED 12b57e: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 12b581: 89 43 70 mov %eax,0x70(%ebx) <== NOT EXECUTED 12b584: e9 48 ff ff ff jmp 12b4d1 <== NOT EXECUTED =============================================================================== 0012bbc8 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 12bbc8: 55 push %ebp <== NOT EXECUTED 12bbc9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bbcb: 57 push %edi <== NOT EXECUTED 12bbcc: 56 push %esi <== NOT EXECUTED 12bbcd: 53 push %ebx <== NOT EXECUTED 12bbce: 83 ec 34 sub $0x34,%esp <== NOT EXECUTED 12bbd1: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 12bbd4: 8b 5e 34 mov 0x34(%esi),%ebx <== NOT EXECUTED uint32_t cur_cln = start_cln; 12bbd7: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12bbda: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 12bbdd: 6a 01 push $0x1 <== NOT EXECUTED 12bbdf: 0f b7 43 06 movzwl 0x6(%ebx),%eax <== NOT EXECUTED 12bbe3: 50 push %eax <== NOT EXECUTED 12bbe4: e8 23 27 fe ff call 10e30c <== NOT EXECUTED 12bbe9: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( buf == NULL ) 12bbeb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bbee: 85 c0 test %eax,%eax <== NOT EXECUTED 12bbf0: 74 7f je 12bc71 <== NOT EXECUTED 12bbf2: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 12bbf4: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12bbf7: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 12bbfa: 21 c2 and %eax,%edx <== NOT EXECUTED 12bbfc: 3b 53 10 cmp 0x10(%ebx),%edx <== NOT EXECUTED 12bbff: 73 3f jae 12bc40 <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); 12bc01: 52 push %edx <== NOT EXECUTED 12bc02: 57 push %edi <== NOT EXECUTED 12bc03: 50 push %eax <== NOT EXECUTED 12bc04: 56 push %esi <== NOT EXECUTED 12bc05: e8 6e ff ff ff call 12bb78 <== NOT EXECUTED if ( ret == -1 ) 12bc0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bc0d: 40 inc %eax <== NOT EXECUTED 12bc0e: 74 48 je 12bc58 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 12bc10: 50 push %eax <== NOT EXECUTED 12bc11: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12bc14: 50 push %eax <== NOT EXECUTED 12bc15: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12bc18: 56 push %esi <== NOT EXECUTED 12bc19: e8 c6 6e 01 00 call 142ae4 <== NOT EXECUTED if ( rc != RC_OK ) 12bc1e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bc21: 85 c0 test %eax,%eax <== NOT EXECUTED 12bc23: 74 cf je 12bbf4 <== NOT EXECUTED { free(buf); 12bc25: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bc28: 57 push %edi <== NOT EXECUTED 12bc29: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 12bc2c: e8 37 2c fe ff call 10e868 <== NOT EXECUTED return rc; 12bc31: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bc34: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED } } free(buf); return rc; } 12bc37: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12bc3a: 5b pop %ebx <== NOT EXECUTED 12bc3b: 5e pop %esi <== NOT EXECUTED 12bc3c: 5f pop %edi <== NOT EXECUTED 12bc3d: c9 leave <== NOT EXECUTED 12bc3e: c3 ret <== NOT EXECUTED 12bc3f: 90 nop <== NOT EXECUTED free(buf); return rc; } } free(buf); 12bc40: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bc43: 57 push %edi <== NOT EXECUTED 12bc44: e8 1f 2c fe ff call 10e868 <== NOT EXECUTED 12bc49: 31 c0 xor %eax,%eax <== NOT EXECUTED return rc; 12bc4b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12bc4e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12bc51: 5b pop %ebx <== NOT EXECUTED 12bc52: 5e pop %esi <== NOT EXECUTED 12bc53: 5f pop %edi <== NOT EXECUTED 12bc54: c9 leave <== NOT EXECUTED 12bc55: c3 ret <== NOT EXECUTED 12bc56: 66 90 xchg %ax,%ax <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) { free(buf); 12bc58: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bc5b: 57 push %edi <== NOT EXECUTED 12bc5c: e8 07 2c fe ff call 10e868 <== NOT EXECUTED 12bc61: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 12bc66: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } free(buf); return rc; } 12bc69: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12bc6c: 5b pop %ebx <== NOT EXECUTED 12bc6d: 5e pop %esi <== NOT EXECUTED 12bc6e: 5f pop %edi <== NOT EXECUTED 12bc6f: c9 leave <== NOT EXECUTED 12bc70: c3 ret <== NOT EXECUTED uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); 12bc71: e8 16 ab 01 00 call 14678c <__errno> <== NOT EXECUTED 12bc76: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12bc7c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12bc7f: eb b6 jmp 12bc37 <== NOT EXECUTED =============================================================================== 0012bd10 : * 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) { 12bd10: 55 push %ebp <== NOT EXECUTED 12bd11: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bd13: 57 push %edi <== NOT EXECUTED 12bd14: 56 push %esi <== NOT EXECUTED 12bd15: 53 push %ebx <== NOT EXECUTED 12bd16: 81 ec e4 00 00 00 sub $0xe4,%esp <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12bd1c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12bd1f: 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; 12bd22: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED rc = stat(mt_entry->dev, &stat_buf); 12bd29: 8d 45 90 lea -0x70(%ebp),%eax <== NOT EXECUTED 12bd2c: 50 push %eax <== NOT EXECUTED 12bd2d: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12bd30: ff 72 70 pushl 0x70(%edx) <== NOT EXECUTED 12bd33: e8 48 41 fe ff call 10fe80 <== NOT EXECUTED 12bd38: 89 c6 mov %eax,%esi <== NOT EXECUTED if (rc == -1) 12bd3a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bd3d: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 12bd40: 0f 84 52 03 00 00 je 12c098 <== NOT EXECUTED return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 12bd46: 8b 45 9c mov -0x64(%ebp),%eax <== NOT EXECUTED 12bd49: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED 12bd4e: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED 12bd53: 0f 85 5b 05 00 00 jne 12c2b4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 12bd59: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12bd5c: ff 75 ac pushl -0x54(%ebp) <== NOT EXECUTED 12bd5f: ff 75 a8 pushl -0x58(%ebp) <== NOT EXECUTED 12bd62: e8 1d 17 fe ff call 10d484 <== NOT EXECUTED 12bd67: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED if (vol->dd == NULL) 12bd6a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bd6d: 85 c0 test %eax,%eax <== NOT EXECUTED 12bd6f: 0f 84 b2 05 00 00 je 12c327 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 12bd75: 8b 45 a8 mov -0x58(%ebp),%eax <== NOT EXECUTED 12bd78: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED 12bd7b: 89 43 54 mov %eax,0x54(%ebx) <== NOT EXECUTED 12bd7e: 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); 12bd81: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 12bd84: 51 push %ecx <== NOT EXECUTED 12bd85: 6a 00 push $0x0 <== NOT EXECUTED 12bd87: 52 push %edx <== NOT EXECUTED 12bd88: 50 push %eax <== NOT EXECUTED 12bd89: e8 66 07 fe ff call 10c4f4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12bd8e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bd91: 85 c0 test %eax,%eax <== NOT EXECUTED 12bd93: 0f 85 37 05 00 00 jne 12c2d0 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 12bd99: 8d 95 36 ff ff ff lea -0xca(%ebp),%edx <== NOT EXECUTED 12bd9f: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12bda2: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED 12bda5: b9 5a 00 00 00 mov $0x5a,%ecx <== NOT EXECUTED 12bdaa: 89 d7 mov %edx,%edi <== NOT EXECUTED 12bdac: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED sc = rtems_bdbuf_release( block); 12bdae: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bdb1: 50 push %eax <== NOT EXECUTED 12bdb2: e8 c1 f6 fd ff call 10b478 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12bdb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bdba: 85 c0 test %eax,%eax <== NOT EXECUTED 12bdbc: 0f 85 0e 05 00 00 jne 12c2d0 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 12bdc2: 0f b6 85 42 ff ff ff movzbl -0xbe(%ebp),%eax <== NOT EXECUTED 12bdc9: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12bdcc: 0f b6 95 41 ff ff ff movzbl -0xbf(%ebp),%edx <== NOT EXECUTED 12bdd3: 09 c2 or %eax,%edx <== NOT EXECUTED 12bdd5: 66 89 13 mov %dx,(%ebx) <== NOT EXECUTED if ( (vol->bps != 512) && 12bdd8: 66 81 fa 00 02 cmp $0x200,%dx <== NOT EXECUTED 12bddd: 0f 84 a1 04 00 00 je 12c284 <== NOT EXECUTED 12bde3: 66 81 fa 00 04 cmp $0x400,%dx <== NOT EXECUTED 12bde8: 74 12 je 12bdfc <== NOT EXECUTED 12bdea: 66 81 fa 00 08 cmp $0x800,%dx <== NOT EXECUTED 12bdef: 74 0b je 12bdfc <== NOT EXECUTED 12bdf1: 66 81 fa 00 10 cmp $0x1000,%dx <== NOT EXECUTED 12bdf6: 0f 85 f7 04 00 00 jne 12c2f3 <== 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; 12bdfc: 66 c1 ea 09 shr $0x9,%dx <== NOT EXECUTED 12be00: 0f b7 d2 movzwl %dx,%edx <== NOT EXECUTED 12be03: b0 01 mov $0x1,%al <== NOT EXECUTED 12be05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED i >>= 1, vol->sec_mul++); 12be08: d1 fa sar %edx <== NOT EXECUTED 12be0a: 88 c1 mov %al,%cl <== NOT EXECUTED 12be0c: 40 inc %eax <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 12be0d: f6 c2 01 test $0x1,%dl <== NOT EXECUTED 12be10: 74 f6 je 12be08 <== NOT EXECUTED 12be12: 88 4b 03 mov %cl,0x3(%ebx) <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 12be15: c6 43 02 00 movb $0x0,0x2(%ebx) <== NOT EXECUTED 12be19: 0f b7 3b movzwl (%ebx),%edi <== NOT EXECUTED 12be1c: 89 f8 mov %edi,%eax <== NOT EXECUTED 12be1e: f7 c7 01 00 00 00 test $0x1,%edi <== NOT EXECUTED 12be24: 75 14 jne 12be3a <== NOT EXECUTED 12be26: b2 01 mov $0x1,%dl <== NOT EXECUTED 12be28: eb 04 jmp 12be2e <== NOT EXECUTED 12be2a: 66 90 xchg %ax,%ax <== NOT EXECUTED 12be2c: 88 ca mov %cl,%dl <== NOT EXECUTED i >>= 1, vol->sec_log2++); 12be2e: d1 f8 sar %eax <== NOT EXECUTED 12be30: 8d 4a 01 lea 0x1(%edx),%ecx <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 12be33: a8 01 test $0x1,%al <== NOT EXECUTED 12be35: 74 f5 je 12be2c <== NOT EXECUTED 12be37: 88 53 02 mov %dl,0x2(%ebx) <== NOT EXECUTED if ( (ret1 < 0) || (ret2 < 0) ) return -1; return RC_OK; } 12be3a: 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); 12be40: 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) 12be43: 84 c0 test %al,%al <== NOT EXECUTED 12be45: 0f 84 a8 04 00 00 je 12c2f3 <== 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; 12be4b: c6 43 05 00 movb $0x0,0x5(%ebx) <== NOT EXECUTED 12be4f: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 12be52: a8 01 test $0x1,%al <== NOT EXECUTED 12be54: 0f 85 6f 04 00 00 jne 12c2c9 <== NOT EXECUTED 12be5a: b1 01 mov $0x1,%cl <== NOT EXECUTED 12be5c: eb 04 jmp 12be62 <== NOT EXECUTED 12be5e: 66 90 xchg %ax,%ax <== NOT EXECUTED 12be60: 88 d1 mov %dl,%cl <== NOT EXECUTED i >>= 1, vol->spc_log2++); 12be62: d1 f8 sar %eax <== NOT EXECUTED 12be64: 8d 51 01 lea 0x1(%ecx),%edx <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 12be67: a8 01 test $0x1,%al <== NOT EXECUTED 12be69: 74 f5 je 12be60 <== NOT EXECUTED 12be6b: 88 4b 05 mov %cl,0x5(%ebx) <== NOT EXECUTED 12be6e: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED i >>= 1, vol->spc_log2++); /* * "bytes per cluster" value greater than 32K is invalid */ if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT) 12be71: 89 f8 mov %edi,%eax <== NOT EXECUTED 12be73: d3 e0 shl %cl,%eax <== NOT EXECUTED 12be75: 89 c1 mov %eax,%ecx <== NOT EXECUTED 12be77: 66 89 4b 06 mov %cx,0x6(%ebx) <== NOT EXECUTED 12be7b: 66 3d 00 80 cmp $0x8000,%ax <== NOT EXECUTED 12be7f: 0f 87 6e 04 00 00 ja 12c2f3 <== 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; 12be85: c6 43 08 00 movb $0x0,0x8(%ebx) <== NOT EXECUTED 12be89: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 12be8c: a8 01 test $0x1,%al <== NOT EXECUTED 12be8e: 75 12 jne 12bea2 <== NOT EXECUTED 12be90: b2 01 mov $0x1,%dl <== NOT EXECUTED 12be92: eb 02 jmp 12be96 <== NOT EXECUTED 12be94: 88 ca mov %cl,%dl <== NOT EXECUTED i >>= 1, vol->bpc_log2++); 12be96: d1 f8 sar %eax <== NOT EXECUTED 12be98: 8d 4a 01 lea 0x1(%edx),%ecx <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 12be9b: a8 01 test $0x1,%al <== NOT EXECUTED 12be9d: 74 f5 je 12be94 <== NOT EXECUTED 12be9f: 88 53 08 mov %dl,0x8(%ebx) <== NOT EXECUTED if ( (ret1 < 0) || (ret2 < 0) ) return -1; return RC_OK; } 12bea2: 8a 95 46 ff ff ff mov -0xba(%ebp),%dl <== NOT EXECUTED 12bea8: 88 95 27 ff ff ff mov %dl,-0xd9(%ebp) <== NOT EXECUTED } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 12beae: 88 53 09 mov %dl,0x9(%ebx) <== NOT EXECUTED vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 12beb1: 0f b6 85 45 ff ff ff movzbl -0xbb(%ebp),%eax <== NOT EXECUTED 12beb8: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12bebb: 0f b6 b5 44 ff ff ff movzbl -0xbc(%ebp),%esi <== NOT EXECUTED 12bec2: 09 c6 or %eax,%esi <== NOT EXECUTED 12bec4: 66 89 73 14 mov %si,0x14(%ebx) <== NOT EXECUTED vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 12bec8: 0f b6 95 48 ff ff ff movzbl -0xb8(%ebp),%edx <== NOT EXECUTED 12becf: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 12bed2: 0f b6 85 47 ff ff ff movzbl -0xb9(%ebp),%eax <== NOT EXECUTED 12bed9: 09 d0 or %edx,%eax <== NOT EXECUTED 12bedb: 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)) / 12bedf: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 12bee2: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 12bee5: 8d 44 38 ff lea -0x1(%eax,%edi,1),%eax <== NOT EXECUTED 12bee9: 99 cltd <== NOT EXECUTED 12beea: f7 ff idiv %edi <== NOT EXECUTED 12beec: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 12beef: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 12bef3: 89 c2 mov %eax,%edx <== NOT EXECUTED 12bef5: d3 e2 shl %cl,%edx <== NOT EXECUTED 12bef7: 89 53 28 mov %edx,0x28(%ebx) <== NOT EXECUTED if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 12befa: 0f b6 95 4d ff ff ff movzbl -0xb3(%ebp),%edx <== NOT EXECUTED 12bf01: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 12bf04: 0f b6 8d 4c ff ff ff movzbl -0xb4(%ebp),%ecx <== NOT EXECUTED 12bf0b: 66 09 d1 or %dx,%cx <== NOT EXECUTED 12bf0e: 0f 84 3c 03 00 00 je 12c250 <== NOT EXECUTED vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 12bf14: 0f b7 c9 movzwl %cx,%ecx <== NOT EXECUTED 12bf17: 89 4b 18 mov %ecx,0x18(%ebx) <== NOT EXECUTED else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 12bf1a: 0f b7 f6 movzwl %si,%esi <== NOT EXECUTED 12bf1d: 01 f0 add %esi,%eax <== NOT EXECUTED 12bf1f: 0f b6 95 27 ff ff ff movzbl -0xd9(%ebp),%edx <== NOT EXECUTED 12bf26: 0f af ca imul %edx,%ecx <== NOT EXECUTED 12bf29: 8d 0c 08 lea (%eax,%ecx,1),%ecx <== NOT EXECUTED 12bf2c: 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; 12bf2f: 0f b6 53 09 movzbl 0x9(%ebx),%edx <== NOT EXECUTED 12bf33: 0f af 53 18 imul 0x18(%ebx),%edx <== NOT EXECUTED 12bf37: 0f b7 43 14 movzwl 0x14(%ebx),%eax <== NOT EXECUTED 12bf3b: 01 c2 add %eax,%edx <== NOT EXECUTED 12bf3d: 89 53 1c mov %edx,0x1c(%ebx) <== NOT EXECUTED if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 12bf40: 0f b6 95 4a ff ff ff movzbl -0xb6(%ebp),%edx <== NOT EXECUTED 12bf47: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 12bf4a: 0f b6 85 49 ff ff ff movzbl -0xb7(%ebp),%eax <== NOT EXECUTED 12bf51: 66 09 d0 or %dx,%ax <== NOT EXECUTED 12bf54: 0f 84 c2 02 00 00 je 12c21c <== NOT EXECUTED vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 12bf5a: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 12bf5d: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 12bf60: 29 c8 sub %ecx,%eax <== NOT EXECUTED 12bf62: 0f b6 73 04 movzbl 0x4(%ebx),%esi <== NOT EXECUTED 12bf66: 31 d2 xor %edx,%edx <== NOT EXECUTED 12bf68: f7 f6 div %esi <== NOT EXECUTED 12bf6a: 89 43 34 mov %eax,0x34(%ebx) <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 12bf6d: 3d f4 0f 00 00 cmp $0xff4,%eax <== NOT EXECUTED 12bf72: 0f 87 2c 01 00 00 ja 12c0a4 <== NOT EXECUTED { vol->type = FAT_FAT12; 12bf78: c6 43 0a 01 movb $0x1,0xa(%ebx) <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; 12bf7c: c7 43 0c ff 0f 00 00 movl $0xfff,0xc(%ebx) <== NOT EXECUTED vol->eoc_val = FAT_FAT12_EOC; 12bf83: c7 43 10 f8 0f 00 00 movl $0xff8,0x10(%ebx) <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 12bf8a: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) <== NOT EXECUTED vol->mirror = 0; 12bf91: c6 43 48 00 movb $0x0,0x48(%ebx) <== NOT EXECUTED vol->afat = 0; 12bf95: c6 43 50 00 movb $0x0,0x50(%ebx) <== NOT EXECUTED vol->free_cls = 0xFFFFFFFF; 12bf99: c7 43 40 ff ff ff ff movl $0xffffffff,0x40(%ebx) <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; 12bfa0: 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); 12bfa7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bfaa: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12bfad: ff 72 34 pushl 0x34(%edx) <== NOT EXECUTED 12bfb0: e8 d7 f5 ff ff call 12b58c <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 12bfb5: 0f b6 43 50 movzbl 0x50(%ebx),%eax <== NOT EXECUTED 12bfb9: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED 12bfbd: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED 12bfc1: 01 d0 add %edx,%eax <== NOT EXECUTED 12bfc3: 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)); 12bfc6: 5f pop %edi <== NOT EXECUTED 12bfc7: 58 pop %eax <== NOT EXECUTED 12bfc8: 6a 0c push $0xc <== NOT EXECUTED 12bfca: 6a 02 push $0x2 <== NOT EXECUTED 12bfcc: e8 3b 23 fe ff call 10e30c <== NOT EXECUTED 12bfd1: 89 43 64 mov %eax,0x64(%ebx) <== NOT EXECUTED if ( fs_info->vhash == NULL ) 12bfd4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bfd7: 85 c0 test %eax,%eax <== NOT EXECUTED 12bfd9: 0f 84 d5 03 00 00 je 12c3b4 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12bfdf: 8d 50 04 lea 0x4(%eax),%edx <== NOT EXECUTED 12bfe2: 89 10 mov %edx,(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 12bfe4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 12bfeb: 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); 12bfee: 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); 12bff1: 8d 48 10 lea 0x10(%eax),%ecx <== NOT EXECUTED 12bff4: 89 48 0c mov %ecx,0xc(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 12bff7: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 12bffe: 89 52 08 mov %edx,0x8(%edx) <== NOT EXECUTED fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 12c001: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c004: 6a 0c push $0xc <== NOT EXECUTED 12c006: 6a 02 push $0x2 <== NOT EXECUTED 12c008: e8 ff 22 fe ff call 10e30c <== NOT EXECUTED 12c00d: 89 43 68 mov %eax,0x68(%ebx) <== NOT EXECUTED if ( fs_info->rhash == NULL ) 12c010: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c013: 85 c0 test %eax,%eax <== NOT EXECUTED 12c015: 0f 84 ba 03 00 00 je 12c3d5 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12c01b: 8d 50 04 lea 0x4(%eax),%edx <== NOT EXECUTED 12c01e: 89 10 mov %edx,(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 12c020: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 12c027: 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); 12c02a: 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); 12c02d: 8d 48 10 lea 0x10(%eax),%ecx <== NOT EXECUTED 12c030: 89 48 0c mov %ecx,0xc(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 12c033: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 12c03a: 89 52 08 mov %edx,0x8(%edx) <== NOT EXECUTED fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 12c03d: c7 43 74 00 01 00 00 movl $0x100,0x74(%ebx) <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 12c044: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 12c048: 8b 43 2c mov 0x2c(%ebx),%eax <== NOT EXECUTED 12c04b: d3 e0 shl %cl,%eax <== NOT EXECUTED 12c04d: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED 12c050: 89 43 78 mov %eax,0x78(%ebx) <== NOT EXECUTED fs_info->index = 0; 12c053: 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)); 12c05a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c05d: 6a 01 push $0x1 <== NOT EXECUTED 12c05f: 68 00 01 00 00 push $0x100 <== NOT EXECUTED 12c064: e8 a3 22 fe ff call 10e30c <== NOT EXECUTED 12c069: 89 43 6c mov %eax,0x6c(%ebx) <== NOT EXECUTED if ( fs_info->uino == NULL ) 12c06c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c06f: 85 c0 test %eax,%eax <== NOT EXECUTED 12c071: 0f 84 c3 02 00 00 je 12c33a <== NOT EXECUTED rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 12c077: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c07a: 6a 01 push $0x1 <== NOT EXECUTED 12c07c: 0f b7 03 movzwl (%ebx),%eax <== NOT EXECUTED 12c07f: 50 push %eax <== NOT EXECUTED 12c080: e8 87 22 fe ff call 10e30c <== NOT EXECUTED 12c085: 89 83 88 00 00 00 mov %eax,0x88(%ebx) <== NOT EXECUTED if (fs_info->sec_buf == NULL) 12c08b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c08e: 85 c0 test %eax,%eax <== NOT EXECUTED 12c090: 0f 84 fb 02 00 00 je 12c391 <== NOT EXECUTED 12c096: 31 f6 xor %esi,%esi <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 12c098: 89 f0 mov %esi,%eax <== NOT EXECUTED 12c09a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12c09d: 5b pop %ebx <== NOT EXECUTED 12c09e: 5e pop %esi <== NOT EXECUTED 12c09f: 5f pop %edi <== NOT EXECUTED 12c0a0: c9 leave <== NOT EXECUTED 12c0a1: c3 ret <== NOT EXECUTED 12c0a2: 66 90 xchg %ax,%ax <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 12c0a4: 3d f4 ff 00 00 cmp $0xfff4,%eax <== NOT EXECUTED 12c0a9: 0f 86 e1 01 00 00 jbe 12c290 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 12c0af: c6 43 0a 04 movb $0x4,0xa(%ebx) <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 12c0b3: c7 43 0c ff ff ff 0f movl $0xfffffff,0xc(%ebx) <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 12c0ba: c7 43 10 f8 ff ff 0f movl $0xffffff8,0x10(%ebx) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 12c0c1: 0f b6 85 63 ff ff ff movzbl -0x9d(%ebp),%eax <== NOT EXECUTED 12c0c8: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12c0cb: 0f b6 95 64 ff ff ff movzbl -0x9c(%ebp),%edx <== NOT EXECUTED 12c0d2: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 12c0d5: 09 d0 or %edx,%eax <== NOT EXECUTED 12c0d7: 0f b6 95 62 ff ff ff movzbl -0x9e(%ebp),%edx <== NOT EXECUTED 12c0de: 09 d0 or %edx,%eax <== NOT EXECUTED 12c0e0: 0f b6 95 65 ff ff ff movzbl -0x9b(%ebp),%edx <== NOT EXECUTED 12c0e7: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12c0ea: 09 d0 or %edx,%eax <== NOT EXECUTED 12c0ec: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 12c0ef: 8a 85 5e ff ff ff mov -0xa2(%ebp),%al <== NOT EXECUTED 12c0f5: 83 e0 80 and $0xffffff80,%eax <== NOT EXECUTED 12c0f8: 88 43 48 mov %al,0x48(%ebx) <== NOT EXECUTED if (vol->mirror) 12c0fb: 84 c0 test %al,%al <== NOT EXECUTED 12c0fd: 0f 84 a5 01 00 00 je 12c2a8 <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 12c103: 8a 85 5e ff ff ff mov -0xa2(%ebp),%al <== NOT EXECUTED 12c109: 83 e0 0f and $0xf,%eax <== NOT EXECUTED 12c10c: 88 43 50 mov %al,0x50(%ebx) <== NOT EXECUTED else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 12c10f: 0f b6 95 67 ff ff ff movzbl -0x99(%ebp),%edx <== NOT EXECUTED 12c116: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 12c119: 0f b6 85 66 ff ff ff movzbl -0x9a(%ebp),%eax <== NOT EXECUTED 12c120: 09 d0 or %edx,%eax <== NOT EXECUTED 12c122: 66 89 43 3c mov %ax,0x3c(%ebx) <== NOT EXECUTED if( vol->info_sec == 0 ) 12c126: 66 85 c0 test %ax,%ax <== NOT EXECUTED 12c129: 0f 84 c4 01 00 00 je 12c2f3 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, 12c12f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c132: 8d 75 d8 lea -0x28(%ebp),%esi <== NOT EXECUTED 12c135: 56 push %esi <== NOT EXECUTED 12c136: 6a 04 push $0x4 <== NOT EXECUTED 12c138: 6a 00 push $0x0 <== NOT EXECUTED 12c13a: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 12c13d: 50 push %eax <== NOT EXECUTED 12c13e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12c141: e8 3e fb ff ff call 12bc84 <_fat_block_read> <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 12c146: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12c149: 85 c0 test %eax,%eax <== NOT EXECUTED 12c14b: 0f 88 98 02 00 00 js 12c3e9 <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 12c151: 0f b6 45 d9 movzbl -0x27(%ebp),%eax <== NOT EXECUTED 12c155: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12c158: 0f b6 55 da movzbl -0x26(%ebp),%edx <== NOT EXECUTED 12c15c: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 12c15f: 09 d0 or %edx,%eax <== NOT EXECUTED 12c161: 0f b6 55 d8 movzbl -0x28(%ebp),%edx <== NOT EXECUTED 12c165: 09 d0 or %edx,%eax <== NOT EXECUTED 12c167: 0f b6 55 db movzbl -0x25(%ebp),%edx <== NOT EXECUTED 12c16b: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12c16e: 09 d0 or %edx,%eax <== NOT EXECUTED 12c170: 3d 52 52 61 41 cmp $0x41615252,%eax <== NOT EXECUTED 12c175: 0f 85 9b 01 00 00 jne 12c316 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 12c17b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c17e: 56 push %esi <== NOT EXECUTED 12c17f: 6a 0c push $0xc <== NOT EXECUTED 12c181: 68 e4 01 00 00 push $0x1e4 <== NOT EXECUTED 12c186: 0f b7 43 3c movzwl 0x3c(%ebx),%eax <== NOT EXECUTED 12c18a: 50 push %eax <== NOT EXECUTED 12c18b: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12c18e: e8 f1 fa ff ff call 12bc84 <_fat_block_read> <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 12c193: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12c196: 85 c0 test %eax,%eax <== NOT EXECUTED 12c198: 0f 88 d1 01 00 00 js 12c36f <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 12c19e: 0f b6 45 dd movzbl -0x23(%ebp),%eax <== NOT EXECUTED 12c1a2: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12c1a5: 0f b6 55 de movzbl -0x22(%ebp),%edx <== NOT EXECUTED 12c1a9: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 12c1ac: 09 d0 or %edx,%eax <== NOT EXECUTED 12c1ae: 0f b6 55 dc movzbl -0x24(%ebp),%edx <== NOT EXECUTED 12c1b2: 09 d0 or %edx,%eax <== NOT EXECUTED 12c1b4: 0f b6 55 df movzbl -0x21(%ebp),%edx <== NOT EXECUTED 12c1b8: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12c1bb: 09 d0 or %edx,%eax <== NOT EXECUTED 12c1bd: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 12c1c0: 0f b6 45 e1 movzbl -0x1f(%ebp),%eax <== NOT EXECUTED 12c1c4: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12c1c7: 0f b6 55 e2 movzbl -0x1e(%ebp),%edx <== NOT EXECUTED 12c1cb: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 12c1ce: 09 d0 or %edx,%eax <== NOT EXECUTED 12c1d0: 0f b6 55 e0 movzbl -0x20(%ebp),%edx <== NOT EXECUTED 12c1d4: 09 d0 or %edx,%eax <== NOT EXECUTED 12c1d6: 0f b6 55 e3 movzbl -0x1d(%ebp),%edx <== NOT EXECUTED 12c1da: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12c1dd: 09 d0 or %edx,%eax <== NOT EXECUTED 12c1df: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 12c1e2: 51 push %ecx <== NOT EXECUTED 12c1e3: 6a ff push $0xffffffff <== NOT EXECUTED 12c1e5: 6a ff push $0xffffffff <== NOT EXECUTED 12c1e7: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12c1ea: e8 f9 f7 ff ff call 12b9e8 <== NOT EXECUTED 12c1ef: 89 c6 mov %eax,%esi <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 12c1f1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c1f4: 85 c0 test %eax,%eax <== NOT EXECUTED 12c1f6: 0f 84 ab fd ff ff je 12bfa7 <== 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); 12c1fc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c1ff: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12c202: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED 12c205: e8 82 f3 ff ff call 12b58c <== 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); 12c20a: 5a pop %edx <== NOT EXECUTED 12c20b: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c20e: e8 4d 14 fe ff call 10d660 <== NOT EXECUTED return rc; 12c213: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c216: e9 7d fe ff ff jmp 12c098 <== NOT EXECUTED 12c21b: 90 nop <== NOT EXECUTED vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 12c21c: 0f b6 85 57 ff ff ff movzbl -0xa9(%ebp),%eax <== NOT EXECUTED 12c223: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12c226: 0f b6 95 58 ff ff ff movzbl -0xa8(%ebp),%edx <== NOT EXECUTED 12c22d: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 12c230: 09 d0 or %edx,%eax <== NOT EXECUTED 12c232: 0f b6 95 56 ff ff ff movzbl -0xaa(%ebp),%edx <== NOT EXECUTED 12c239: 09 d0 or %edx,%eax <== NOT EXECUTED 12c23b: 0f b6 95 59 ff ff ff movzbl -0xa7(%ebp),%edx <== NOT EXECUTED 12c242: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12c245: 09 d0 or %edx,%eax <== NOT EXECUTED 12c247: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED 12c24a: e9 11 fd ff ff jmp 12bf60 <== NOT EXECUTED 12c24f: 90 nop <== NOT EXECUTED vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 12c250: 0f b6 8d 5b ff ff ff movzbl -0xa5(%ebp),%ecx <== NOT EXECUTED 12c257: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED 12c25a: 0f b6 95 5c ff ff ff movzbl -0xa4(%ebp),%edx <== NOT EXECUTED 12c261: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 12c264: 09 d1 or %edx,%ecx <== NOT EXECUTED 12c266: 0f b6 95 5a ff ff ff movzbl -0xa6(%ebp),%edx <== NOT EXECUTED 12c26d: 09 d1 or %edx,%ecx <== NOT EXECUTED 12c26f: 0f b6 95 5d ff ff ff movzbl -0xa3(%ebp),%edx <== NOT EXECUTED 12c276: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12c279: 09 d1 or %edx,%ecx <== NOT EXECUTED 12c27b: 89 4b 18 mov %ecx,0x18(%ebx) <== NOT EXECUTED 12c27e: e9 97 fc ff ff jmp 12bf1a <== NOT EXECUTED 12c283: 90 nop <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 12c284: c6 43 03 00 movb $0x0,0x3(%ebx) <== NOT EXECUTED 12c288: e9 88 fb ff ff jmp 12be15 <== NOT EXECUTED 12c28d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 12c290: c6 43 0a 02 movb $0x2,0xa(%ebx) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 12c294: c7 43 0c ff ff 00 00 movl $0xffff,0xc(%ebx) <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 12c29b: c7 43 10 f8 ff 00 00 movl $0xfff8,0x10(%ebx) <== NOT EXECUTED 12c2a2: e9 e3 fc ff ff jmp 12bf8a <== NOT EXECUTED 12c2a7: 90 nop <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; else vol->afat = 0; 12c2a8: c6 43 50 00 movb $0x0,0x50(%ebx) <== NOT EXECUTED 12c2ac: e9 5e fe ff ff jmp 12c10f <== NOT EXECUTED 12c2b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (rc == -1) return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) rtems_set_errno_and_return_minus_one(ENOTTY); 12c2b4: e8 d3 a4 01 00 call 14678c <__errno> <== NOT EXECUTED 12c2b9: c7 00 19 00 00 00 movl $0x19,(%eax) <== NOT EXECUTED 12c2bf: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 12c2c4: e9 cf fd ff ff jmp 12c098 <== 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; 12c2c9: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 12c2cb: e9 a1 fb ff ff jmp 12be71 <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { rtems_disk_release(vol->dd); 12c2d0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c2d3: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c2d6: e8 85 13 fe ff call 10d660 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 12c2db: e8 ac a4 01 00 call 14678c <__errno> <== NOT EXECUTED 12c2e0: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12c2e6: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 12c2eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c2ee: e9 a5 fd ff ff jmp 12c098 <== NOT EXECUTED vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); if( vol->info_sec == 0 ) { rtems_disk_release(vol->dd); 12c2f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 12c2f6: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c2f9: e8 62 13 fe ff call 10d660 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 12c2fe: e8 89 a4 01 00 call 14678c <__errno> <== NOT EXECUTED 12c303: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12c309: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 12c30e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c311: e9 82 fd ff ff jmp 12c098 <== 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); 12c316: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c319: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12c31c: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED 12c31f: e8 68 f2 ff ff call 12b58c <== 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); 12c324: 5f pop %edi <== NOT EXECUTED 12c325: eb cf jmp 12c2f6 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); if (vol->dd == NULL) rtems_set_errno_and_return_minus_one(EIO); 12c327: e8 60 a4 01 00 call 14678c <__errno> <== NOT EXECUTED 12c32c: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12c332: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 12c335: e9 5e fd ff ff jmp 12c098 <== 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); 12c33a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c33d: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c340: e8 1b 13 fe ff call 10d660 <== NOT EXECUTED free(fs_info->vhash); 12c345: 59 pop %ecx <== NOT EXECUTED 12c346: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 12c349: e8 1a 25 fe ff call 10e868 <== NOT EXECUTED free(fs_info->rhash); 12c34e: 5a pop %edx <== NOT EXECUTED 12c34f: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED if (fs_info->sec_buf == NULL) { rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); free(fs_info->uino); 12c352: e8 11 25 fe ff call 10e868 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 12c357: e8 30 a4 01 00 call 14678c <__errno> <== NOT EXECUTED 12c35c: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 12c362: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 12c367: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c36a: e9 29 fd ff ff jmp 12c098 <== 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); 12c36f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c372: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12c375: ff 72 34 pushl 0x34(%edx) <== NOT EXECUTED 12c378: e8 0f f2 ff ff call 12b58c <== 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); 12c37d: 5e pop %esi <== NOT EXECUTED 12c37e: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c381: e8 da 12 fe ff call 10d660 <== NOT EXECUTED 12c386: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED return -1; 12c389: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c38c: e9 07 fd ff ff jmp 12c098 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); if (fs_info->sec_buf == NULL) { rtems_disk_release(vol->dd); 12c391: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c394: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c397: e8 c4 12 fe ff call 10d660 <== NOT EXECUTED free(fs_info->vhash); 12c39c: 58 pop %eax <== NOT EXECUTED 12c39d: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 12c3a0: e8 c3 24 fe ff call 10e868 <== NOT EXECUTED free(fs_info->rhash); 12c3a5: 5f pop %edi <== NOT EXECUTED 12c3a6: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 12c3a9: e8 ba 24 fe ff call 10e868 <== NOT EXECUTED free(fs_info->uino); 12c3ae: 5e pop %esi <== NOT EXECUTED 12c3af: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 12c3b2: eb 9e jmp 12c352 <== 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); 12c3b4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c3b7: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c3ba: e8 a1 12 fe ff call 10d660 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 12c3bf: e8 c8 a3 01 00 call 14678c <__errno> <== NOT EXECUTED 12c3c4: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 12c3ca: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 12c3cd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c3d0: e9 c3 fc ff ff jmp 12c098 <== 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); 12c3d5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c3d8: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c3db: e8 80 12 fe ff call 10d660 <== NOT EXECUTED free(fs_info->vhash); 12c3e0: 5e pop %esi <== NOT EXECUTED 12c3e1: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 12c3e4: e9 69 ff ff ff jmp 12c352 <== NOT EXECUTED { ret = _fat_block_read(mt_entry, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) { rtems_disk_release(vol->dd); 12c3e9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c3ec: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c3ef: e8 6c 12 fe ff call 10d660 <== NOT EXECUTED 12c3f4: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED return -1; 12c3f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c3fa: e9 99 fc ff ff jmp 12c098 <== NOT EXECUTED =============================================================================== 0012b4a8 : inline bool fat_ino_is_unique( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 12b4a8: 55 push %ebp <== NOT EXECUTED 12b4a9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b4ab: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b4ae: 8b 50 34 mov 0x34(%eax),%edx <== NOT EXECUTED 12b4b1: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12b4b4: 39 42 78 cmp %eax,0x78(%edx) <== NOT EXECUTED 12b4b7: 0f 96 c0 setbe %al <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return (ino >= fs_info->uino_base); } 12b4ba: c9 leave <== NOT EXECUTED 12b4bb: c3 ret <== NOT EXECUTED =============================================================================== 00142d44 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 142d44: 55 push %ebp <== NOT EXECUTED 142d45: 89 e5 mov %esp,%ebp <== NOT EXECUTED 142d47: 57 push %edi <== NOT EXECUTED 142d48: 56 push %esi <== NOT EXECUTED 142d49: 53 push %ebx <== NOT EXECUTED 142d4a: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 142d4d: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 142d50: 8b 47 34 mov 0x34(%edi),%eax <== NOT EXECUTED 142d53: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED uint32_t cl4find = 2; uint32_t next_cln = 0; 142d56: 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; 142d5d: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED uint32_t i = 2; *cls_added = 0; 142d60: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 142d63: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED if (count == 0) 142d69: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 142d6c: 85 d2 test %edx,%edx <== NOT EXECUTED 142d6e: 0f 84 e8 00 00 00 je 142e5c <== NOT EXECUTED return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 142d74: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 142d77: 8b 5a 44 mov 0x44(%edx),%ebx <== NOT EXECUTED 142d7a: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 142d7d: 0f 84 e5 00 00 00 je 142e68 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 142d83: 83 c0 02 add $0x2,%eax <== NOT EXECUTED 142d86: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 142d89: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 142d8c: 0f 86 e0 00 00 00 jbe 142e72 <== NOT EXECUTED 142d92: be 02 00 00 00 mov $0x2,%esi <== NOT EXECUTED 142d97: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 142d9e: eb 43 jmp 142de3 <== NOT EXECUTED * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; 142da0: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 142da3: 89 18 mov %ebx,(%eax) <== NOT EXECUTED rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 142da5: 51 push %ecx <== NOT EXECUTED 142da6: 6a ff push $0xffffffff <== NOT EXECUTED 142da8: 53 push %ebx <== NOT EXECUTED 142da9: 57 push %edi <== NOT EXECUTED 142daa: e8 0d fb ff ff call 1428bc <== NOT EXECUTED if ( rc != RC_OK ) 142daf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 142db2: 85 c0 test %eax,%eax <== NOT EXECUTED 142db4: 0f 85 40 01 00 00 jne 142efa <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 142dba: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 142dbd: 8b 02 mov (%edx),%eax <== NOT EXECUTED 142dbf: 40 inc %eax <== NOT EXECUTED 142dc0: 89 02 mov %eax,(%edx) <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 142dc2: 39 45 10 cmp %eax,0x10(%ebp) <== NOT EXECUTED 142dc5: 0f 84 0f 01 00 00 je 142eda <== NOT EXECUTED fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return rc; 142dcb: 89 5d d0 mov %ebx,-0x30(%ebp) <== NOT EXECUTED } } i++; 142dce: 46 inc %esi <== NOT EXECUTED cl4find++; 142dcf: 43 inc %ebx <== NOT EXECUTED if (cl4find >= data_cls_val) 142dd0: 39 5d d4 cmp %ebx,-0x2c(%ebp) <== NOT EXECUTED 142dd3: 77 05 ja 142dda <== NOT EXECUTED 142dd5: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 142dda: 39 75 d4 cmp %esi,-0x2c(%ebp) <== NOT EXECUTED 142ddd: 0f 86 99 00 00 00 jbe 142e7c <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 142de3: 50 push %eax <== NOT EXECUTED 142de4: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 142de7: 50 push %eax <== NOT EXECUTED 142de8: 53 push %ebx <== NOT EXECUTED 142de9: 57 push %edi <== NOT EXECUTED 142dea: e8 f5 fc ff ff call 142ae4 <== NOT EXECUTED if ( rc != RC_OK ) 142def: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 142df2: 85 c0 test %eax,%eax <== NOT EXECUTED 142df4: 0f 85 c2 00 00 00 jne 142ebc <== NOT EXECUTED if (*cls_added != 0) fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 142dfa: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 142dfd: 85 d2 test %edx,%edx <== NOT EXECUTED 142dff: 75 cd jne 142dce <== 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) 142e01: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 142e04: 8b 02 mov (%edx),%eax <== NOT EXECUTED 142e06: 85 c0 test %eax,%eax <== NOT EXECUTED 142e08: 74 96 je 142da0 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 142e0a: 52 push %edx <== NOT EXECUTED 142e0b: 6a ff push $0xffffffff <== NOT EXECUTED 142e0d: 53 push %ebx <== NOT EXECUTED 142e0e: 57 push %edi <== NOT EXECUTED 142e0f: e8 a8 fa ff ff call 1428bc <== NOT EXECUTED if ( rc != RC_OK ) 142e14: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 142e17: 85 c0 test %eax,%eax <== NOT EXECUTED 142e19: 0f 85 e2 00 00 00 jne 142f01 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 142e1f: 50 push %eax <== NOT EXECUTED 142e20: 53 push %ebx <== NOT EXECUTED 142e21: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 142e24: 57 push %edi <== NOT EXECUTED 142e25: e8 92 fa ff ff call 1428bc <== NOT EXECUTED if ( rc != RC_OK ) 142e2a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 142e2d: 85 c0 test %eax,%eax <== NOT EXECUTED 142e2f: 74 89 je 142dba <== NOT EXECUTED 142e31: 89 c6 mov %eax,%esi <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 142e33: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 142e36: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 142e39: ff 30 pushl (%eax) <== NOT EXECUTED 142e3b: 57 push %edi <== NOT EXECUTED 142e3c: e8 27 fe ff ff call 142c68 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 142e41: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 142e44: 6a 00 push $0x0 <== NOT EXECUTED 142e46: 53 push %ebx <== NOT EXECUTED 142e47: 57 push %edi <== NOT EXECUTED 142e48: e8 6f fa ff ff call 1428bc <== NOT EXECUTED fat_buf_release(fs_info); 142e4d: 59 pop %ecx <== NOT EXECUTED 142e4e: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 142e51: e8 36 87 fe ff call 12b58c <== NOT EXECUTED return rc; 142e56: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 142e59: eb 03 jmp 142e5e <== NOT EXECUTED 142e5b: 90 nop <== NOT EXECUTED uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; if (count == 0) 142e5c: 31 f6 xor %esi,%esi <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 142e5e: 89 f0 mov %esi,%eax <== NOT EXECUTED 142e60: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 142e63: 5b pop %ebx <== NOT EXECUTED 142e64: 5e pop %esi <== NOT EXECUTED 142e65: 5f pop %edi <== NOT EXECUTED 142e66: c9 leave <== NOT EXECUTED 142e67: c3 ret <== NOT EXECUTED *cls_added = 0; if (count == 0) return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 142e68: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED 142e6d: e9 11 ff ff ff jmp 142d83 <== 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) 142e72: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 142e79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 142e7c: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 142e7f: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 142e82: 89 42 44 mov %eax,0x44(%edx) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 142e85: 8b 42 40 mov 0x40(%edx),%eax <== NOT EXECUTED 142e88: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 142e8b: 74 0b je 142e98 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 142e8d: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 142e90: 2b 02 sub (%edx),%eax <== NOT EXECUTED 142e92: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 142e95: 89 42 40 mov %eax,0x40(%edx) <== NOT EXECUTED *last_cl = save_cln; 142e98: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 142e9b: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED 142e9e: 89 10 mov %edx,(%eax) <== NOT EXECUTED fat_buf_release(fs_info); 142ea0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 142ea3: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 142ea6: e8 e1 86 fe ff call 12b58c <== NOT EXECUTED 142eab: 31 f6 xor %esi,%esi <== NOT EXECUTED return RC_OK; 142ead: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 142eb0: 89 f0 mov %esi,%eax <== NOT EXECUTED 142eb2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 142eb5: 5b pop %ebx <== NOT EXECUTED 142eb6: 5e pop %esi <== NOT EXECUTED 142eb7: 5f pop %edi <== NOT EXECUTED 142eb8: c9 leave <== NOT EXECUTED 142eb9: c3 ret <== NOT EXECUTED 142eba: 66 90 xchg %ax,%ax <== NOT EXECUTED 142ebc: 89 c6 mov %eax,%esi <== NOT EXECUTED while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); if ( rc != RC_OK ) { if (*cls_added != 0) 142ebe: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 142ec1: 8b 0a mov (%edx),%ecx <== NOT EXECUTED 142ec3: 85 c9 test %ecx,%ecx <== NOT EXECUTED 142ec5: 74 97 je 142e5e <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 142ec7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 142eca: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 142ecd: ff 30 pushl (%eax) <== NOT EXECUTED 142ecf: 57 push %edi <== NOT EXECUTED 142ed0: e8 93 fd ff ff call 142c68 <== NOT EXECUTED 142ed5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 142ed8: eb 84 jmp 142e5e <== NOT EXECUTED (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; 142eda: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 142edd: 89 58 44 mov %ebx,0x44(%eax) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 142ee0: 8b 40 40 mov 0x40(%eax),%eax <== NOT EXECUTED 142ee3: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 142ee6: 74 0b je 142ef3 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 142ee8: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 142eeb: 2b 02 sub (%edx),%eax <== NOT EXECUTED 142eed: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 142ef0: 89 42 40 mov %eax,0x40(%edx) <== NOT EXECUTED *last_cl = save_cln; 142ef3: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED 142ef6: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 142ef8: eb a6 jmp 142ea0 <== NOT EXECUTED 142efa: 89 c6 mov %eax,%esi <== NOT EXECUTED 142efc: e9 5d ff ff ff jmp 142e5e <== NOT EXECUTED 142f01: 89 c6 mov %eax,%esi <== NOT EXECUTED /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 142f03: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 142f06: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 142f09: ff 32 pushl (%edx) <== NOT EXECUTED 142f0b: 57 push %edi <== NOT EXECUTED 142f0c: e8 57 fd ff ff call 142c68 <== NOT EXECUTED return rc; 142f11: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 142f14: e9 45 ff ff ff jmp 142e5e <== NOT EXECUTED =============================================================================== 001428bc : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 1428bc: 55 push %ebp <== NOT EXECUTED 1428bd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1428bf: 57 push %edi <== NOT EXECUTED 1428c0: 56 push %esi <== NOT EXECUTED 1428c1: 53 push %ebx <== NOT EXECUTED 1428c2: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 1428c5: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 1428c8: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1428cb: 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; 1428ce: 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)) ) 1428d5: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 1428d8: 76 6b jbe 142945 <== NOT EXECUTED 1428da: 8b 43 34 mov 0x34(%ebx),%eax <== NOT EXECUTED 1428dd: 40 inc %eax <== NOT EXECUTED 1428de: 39 c2 cmp %eax,%edx <== NOT EXECUTED 1428e0: 77 63 ja 142945 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 1428e2: 0f b6 43 0a movzbl 0xa(%ebx),%eax <== NOT EXECUTED 1428e6: a8 01 test $0x1,%al <== NOT EXECUTED 1428e8: 75 76 jne 142960 <== NOT EXECUTED 1428ea: a8 02 test $0x2,%al <== NOT EXECUTED 1428ec: 74 7a je 142968 <== NOT EXECUTED 1428ee: 8d 04 12 lea (%edx,%edx,1),%eax <== NOT EXECUTED 1428f1: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 1428f4: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 1428f8: 89 c6 mov %eax,%esi <== NOT EXECUTED 1428fa: d3 ee shr %cl,%esi <== NOT EXECUTED 1428fc: 03 73 4c add 0x4c(%ebx),%esi <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 1428ff: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 142901: 66 89 45 d2 mov %ax,-0x2e(%ebp) <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 142905: 8d 7d e4 lea -0x1c(%ebp),%edi <== NOT EXECUTED 142908: 57 push %edi <== NOT EXECUTED 142909: 6a 01 push $0x1 <== NOT EXECUTED 14290b: 56 push %esi <== NOT EXECUTED 14290c: 53 push %ebx <== NOT EXECUTED 14290d: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 142910: e8 e7 8d fe ff call 12b6fc <== NOT EXECUTED if (rc != RC_OK) 142915: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 142918: 85 c0 test %eax,%eax <== NOT EXECUTED 14291a: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 14291d: 75 36 jne 142955 <== 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); 14291f: 0f b7 4d d2 movzwl -0x2e(%ebp),%ecx <== NOT EXECUTED 142923: 49 dec %ecx <== NOT EXECUTED 142924: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED 142927: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 14292a: 21 4d c4 and %ecx,-0x3c(%ebp) <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 14292d: 8a 4b 0a mov 0xa(%ebx),%cl <== NOT EXECUTED 142930: 88 4d d4 mov %cl,-0x2c(%ebp) <== NOT EXECUTED 142933: 80 f9 02 cmp $0x2,%cl <== NOT EXECUTED 142936: 74 4c je 142984 <== NOT EXECUTED 142938: 80 f9 04 cmp $0x4,%cl <== NOT EXECUTED 14293b: 0f 84 cb 00 00 00 je 142a0c <== NOT EXECUTED 142941: fe c9 dec %cl <== NOT EXECUTED 142943: 74 5f je 1429a4 <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 142945: e8 42 3e 00 00 call 14678c <__errno> <== NOT EXECUTED 14294a: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 142950: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED break; } return RC_OK; } 142955: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 142958: 5b pop %ebx <== NOT EXECUTED 142959: 5e pop %esi <== NOT EXECUTED 14295a: 5f pop %edi <== NOT EXECUTED 14295b: c9 leave <== NOT EXECUTED 14295c: c3 ret <== NOT EXECUTED 14295d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 142960: 89 d0 mov %edx,%eax <== NOT EXECUTED 142962: d1 e8 shr %eax <== NOT EXECUTED 142964: 01 d0 add %edx,%eax <== NOT EXECUTED 142966: eb 89 jmp 1428f1 <== NOT EXECUTED 142968: 8d 0c 95 00 00 00 00 lea 0x0(,%edx,4),%ecx <== NOT EXECUTED 14296f: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 142972: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 142976: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED 142979: d3 ee shr %cl,%esi <== NOT EXECUTED 14297b: 03 73 4c add 0x4c(%ebx),%esi <== NOT EXECUTED 14297e: e9 7c ff ff ff jmp 1428ff <== NOT EXECUTED 142983: 90 nop <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 142984: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 142987: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 14298a: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 14298d: 8b 75 c4 mov -0x3c(%ebp),%esi <== NOT EXECUTED 142990: 66 89 0c 32 mov %cx,(%edx,%esi,1) <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 142994: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED break; } return RC_OK; } 14299b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 14299e: 5b pop %ebx <== NOT EXECUTED 14299f: 5e pop %esi <== NOT EXECUTED 1429a0: 5f pop %edi <== NOT EXECUTED 1429a1: c9 leave <== NOT EXECUTED 1429a2: c3 ret <== NOT EXECUTED 1429a3: 90 nop <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 1429a4: 83 e2 01 and $0x1,%edx <== NOT EXECUTED 1429a7: 0f 84 8b 00 00 00 je 142a38 <== NOT EXECUTED { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 1429ad: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 1429b0: c1 e2 04 shl $0x4,%edx <== NOT EXECUTED 1429b3: 66 89 55 d4 mov %dx,-0x2c(%ebp) <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 1429b7: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1429ba: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 1429bd: 03 55 c4 add -0x3c(%ebp),%edx <== NOT EXECUTED { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = 1429c0: 80 22 0f andb $0xf,(%edx) <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 1429c3: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1429c6: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 1429c9: 03 55 c4 add -0x3c(%ebp),%edx <== NOT EXECUTED { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 1429cc: 8a 4d d4 mov -0x2c(%ebp),%cl <== NOT EXECUTED 1429cf: 08 0a or %cl,(%edx) <== NOT EXECUTED 1429d1: 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) ) 1429d8: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 1429db: 4a dec %edx <== NOT EXECUTED 1429dc: 3b 55 c4 cmp -0x3c(%ebp),%edx <== NOT EXECUTED 1429df: 0f 84 9f 00 00 00 je 142a84 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 1429e5: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 1429e8: 41 inc %ecx <== NOT EXECUTED 1429e9: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1429ec: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 1429ef: c6 04 0a 00 movb $0x0,(%edx,%ecx,1) <== NOT EXECUTED { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 1429f3: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1429f6: 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)) = 1429f9: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 1429fc: 66 c1 ea 08 shr $0x8,%dx <== NOT EXECUTED 142a00: 08 11 or %dl,(%ecx) <== NOT EXECUTED break; } return RC_OK; } 142a02: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 142a05: 5b pop %ebx <== NOT EXECUTED 142a06: 5e pop %esi <== NOT EXECUTED 142a07: 5f pop %edi <== NOT EXECUTED 142a08: c9 leave <== NOT EXECUTED 142a09: c3 ret <== NOT EXECUTED 142a0a: 66 90 xchg %ax,%ax <== NOT EXECUTED case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 142a0c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 142a0f: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 142a12: 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)) = 142a15: 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)) = 142a1b: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 142a1e: 81 e2 ff ff ff 0f and $0xfffffff,%edx <== NOT EXECUTED 142a24: 09 11 or %edx,(%ecx) <== NOT EXECUTED 142a26: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED break; } return RC_OK; } 142a2d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 142a30: 5b pop %ebx <== NOT EXECUTED 142a31: 5e pop %esi <== NOT EXECUTED 142a32: 5f pop %edi <== NOT EXECUTED 142a33: c9 leave <== NOT EXECUTED 142a34: c3 ret <== NOT EXECUTED 142a35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 142a38: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 142a3b: 81 e2 ff 0f 00 00 and $0xfff,%edx <== NOT EXECUTED 142a41: 66 89 55 d4 mov %dx,-0x2c(%ebp) <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 142a45: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 142a48: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 142a4b: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 142a4e: c6 04 0a 00 movb $0x0,(%edx,%ecx,1) <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 142a52: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 142a55: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 142a58: 01 ca add %ecx,%edx <== NOT EXECUTED else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 142a5a: 8a 4d d4 mov -0x2c(%ebp),%cl <== NOT EXECUTED 142a5d: 08 0a or %cl,(%edx) <== NOT EXECUTED 142a5f: 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) ) 142a66: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 142a69: 4a dec %edx <== NOT EXECUTED 142a6a: 3b 55 c4 cmp -0x3c(%ebp),%edx <== NOT EXECUTED 142a6d: 74 51 je 142ac0 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 142a6f: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 142a72: 41 inc %ecx <== NOT EXECUTED 142a73: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 142a76: 8b 5a 20 mov 0x20(%edx),%ebx <== NOT EXECUTED 142a79: 8d 14 19 lea (%ecx,%ebx,1),%edx <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 142a7c: 80 22 f0 andb $0xf0,(%edx) <== NOT EXECUTED 142a7f: e9 6f ff ff ff jmp 1429f3 <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 142a84: 57 push %edi <== NOT EXECUTED 142a85: 6a 01 push $0x1 <== NOT EXECUTED 142a87: 46 inc %esi <== NOT EXECUTED 142a88: 56 push %esi <== NOT EXECUTED 142a89: 53 push %ebx <== NOT EXECUTED 142a8a: e8 6d 8c fe ff call 12b6fc <== NOT EXECUTED &block0); if (rc != RC_OK) 142a8f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 142a92: 85 c0 test %eax,%eax <== NOT EXECUTED 142a94: 0f 85 bb fe ff ff jne 142955 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 142a9a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 142a9d: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 142aa0: c6 02 00 movb $0x0,(%edx) <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 142aa3: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 142aa6: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 142aa9: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 142aac: 66 c1 e9 08 shr $0x8,%cx <== NOT EXECUTED 142ab0: 08 0a or %cl,(%edx) <== NOT EXECUTED 142ab2: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED 142ab9: e9 97 fe ff ff jmp 142955 <== NOT EXECUTED 142abe: 66 90 xchg %ax,%ax <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 142ac0: 57 push %edi <== NOT EXECUTED 142ac1: 6a 01 push $0x1 <== NOT EXECUTED 142ac3: 46 inc %esi <== NOT EXECUTED 142ac4: 56 push %esi <== NOT EXECUTED 142ac5: 53 push %ebx <== NOT EXECUTED 142ac6: e8 31 8c fe ff call 12b6fc <== NOT EXECUTED &block0); if (rc != RC_OK) 142acb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 142ace: 85 c0 test %eax,%eax <== NOT EXECUTED 142ad0: 0f 85 7f fe ff ff jne 142955 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 142ad6: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 142ad9: 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)) = 142adc: 80 22 f0 andb $0xf0,(%edx) <== NOT EXECUTED 142adf: eb c2 jmp 142aa3 <== NOT EXECUTED =============================================================================== 0012ba50 : * 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) { 12ba50: 55 push %ebp <== NOT EXECUTED 12ba51: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12ba53: 57 push %edi <== NOT EXECUTED 12ba54: 56 push %esi <== NOT EXECUTED 12ba55: 53 push %ebx <== NOT EXECUTED 12ba56: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 12ba59: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12ba5c: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) 12ba5f: f6 46 0a 04 testb $0x4,0xa(%esi) <== NOT EXECUTED 12ba63: 0f 85 df 00 00 00 jne 12bb48 <== NOT EXECUTED 12ba69: 31 ff xor %edi,%edi <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; } fat_buf_release(fs_info); 12ba6b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ba6e: 56 push %esi <== NOT EXECUTED 12ba6f: e8 18 fb ff ff call 12b58c <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 12ba74: 5a pop %edx <== NOT EXECUTED 12ba75: 59 pop %ecx <== NOT EXECUTED 12ba76: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED 12ba79: ff 76 54 pushl 0x54(%esi) <== NOT EXECUTED 12ba7c: e8 d7 ef fd ff call 10aa58 <== NOT EXECUTED 12ba81: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ba84: 85 c0 test %eax,%eax <== NOT EXECUTED 12ba86: 0f 85 e0 00 00 00 jne 12bb6c <== NOT EXECUTED 12ba8c: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 12ba93: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED 12ba96: 03 5e 64 add 0x64(%esi),%ebx <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 12ba99: eb 0d jmp 12baa8 <== NOT EXECUTED 12ba9b: 90 nop <== NOT EXECUTED free(node); 12ba9c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ba9f: 50 push %eax <== NOT EXECUTED 12baa0: e8 c3 2d fe ff call 10e868 <== NOT EXECUTED 12baa5: 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 ); 12baa8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12baab: 53 push %ebx <== NOT EXECUTED 12baac: e8 9b 7f fe ff call 113a4c <_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 ) 12bab1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bab4: 85 c0 test %eax,%eax <== NOT EXECUTED 12bab6: 75 e4 jne 12ba9c <== NOT EXECUTED 12bab8: 83 45 e4 0c addl $0xc,-0x1c(%ebp) <== NOT EXECUTED fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 12babc: 83 7d e4 18 cmpl $0x18,-0x1c(%ebp) <== NOT EXECUTED 12bac0: 75 d1 jne 12ba93 <== NOT EXECUTED 12bac2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 12bac9: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED 12bacc: 03 5e 68 add 0x68(%esi),%ebx <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 12bacf: eb 0f jmp 12bae0 <== NOT EXECUTED 12bad1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED free(node); 12bad4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bad7: 50 push %eax <== NOT EXECUTED 12bad8: e8 8b 2d fe ff call 10e868 <== NOT EXECUTED 12badd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bae0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bae3: 53 push %ebx <== NOT EXECUTED 12bae4: e8 63 7f fe ff call 113a4c <_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 ) 12bae9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12baec: 85 c0 test %eax,%eax <== NOT EXECUTED 12baee: 75 e4 jne 12bad4 <== NOT EXECUTED 12baf0: 83 45 e4 0c addl $0xc,-0x1c(%ebp) <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 12baf4: 83 7d e4 18 cmpl $0x18,-0x1c(%ebp) <== NOT EXECUTED 12baf8: 75 cf jne 12bac9 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 12bafa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bafd: ff 76 64 pushl 0x64(%esi) <== NOT EXECUTED 12bb00: e8 63 2d fe ff call 10e868 <== NOT EXECUTED free(fs_info->rhash); 12bb05: 58 pop %eax <== NOT EXECUTED 12bb06: ff 76 68 pushl 0x68(%esi) <== NOT EXECUTED 12bb09: e8 5a 2d fe ff call 10e868 <== NOT EXECUTED free(fs_info->uino); 12bb0e: 5b pop %ebx <== NOT EXECUTED 12bb0f: ff 76 6c pushl 0x6c(%esi) <== NOT EXECUTED 12bb12: e8 51 2d fe ff call 10e868 <== NOT EXECUTED free(fs_info->sec_buf); 12bb17: 59 pop %ecx <== NOT EXECUTED 12bb18: ff b6 88 00 00 00 pushl 0x88(%esi) <== NOT EXECUTED 12bb1e: e8 45 2d fe ff call 10e868 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 12bb23: 5a pop %edx <== NOT EXECUTED 12bb24: ff 76 5c pushl 0x5c(%esi) <== NOT EXECUTED 12bb27: e8 34 1b fe ff call 10d660 <== NOT EXECUTED if (rc) 12bb2c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bb2f: 85 ff test %edi,%edi <== NOT EXECUTED 12bb31: 74 0b je 12bb3e <== NOT EXECUTED errno = EIO; 12bb33: e8 54 ac 01 00 call 14678c <__errno> <== NOT EXECUTED 12bb38: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED return rc; } 12bb3e: 89 f8 mov %edi,%eax <== NOT EXECUTED 12bb40: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12bb43: 5b pop %ebx <== NOT EXECUTED 12bb44: 5e pop %esi <== NOT EXECUTED 12bb45: 5f pop %edi <== NOT EXECUTED 12bb46: c9 leave <== NOT EXECUTED 12bb47: c3 ret <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 12bb48: 53 push %ebx <== NOT EXECUTED 12bb49: ff 76 44 pushl 0x44(%esi) <== NOT EXECUTED 12bb4c: ff 76 40 pushl 0x40(%esi) <== NOT EXECUTED 12bb4f: 50 push %eax <== NOT EXECUTED 12bb50: e8 93 fe ff ff call 12b9e8 <== NOT EXECUTED 12bb55: 89 c7 mov %eax,%edi <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 12bb57: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bb5a: 85 c0 test %eax,%eax <== NOT EXECUTED 12bb5c: 0f 84 09 ff ff ff je 12ba6b <== NOT EXECUTED 12bb62: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED 12bb67: e9 ff fe ff ff jmp 12ba6b <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 12bb6c: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED 12bb71: e9 16 ff ff ff jmp 12ba8c <== NOT EXECUTED =============================================================================== 00143334 : #include int fchdir( int fd ) { 143334: 55 push %ebp <== NOT EXECUTED 143335: 89 e5 mov %esp,%ebp <== NOT EXECUTED 143337: 57 push %edi <== NOT EXECUTED 143338: 56 push %esi <== NOT EXECUTED 143339: 53 push %ebx <== NOT EXECUTED 14333a: 83 ec 4c sub $0x4c,%esp <== NOT EXECUTED 14333d: 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 ); 143340: 3b 1d 4c b1 16 00 cmp 0x16b14c,%ebx <== NOT EXECUTED 143346: 0f 83 c0 00 00 00 jae 14340c <== NOT EXECUTED iop = rtems_libio_iop( fd ); 14334c: c1 e3 06 shl $0x6,%ebx <== NOT EXECUTED 14334f: 03 1d 3c 2d 17 00 add 0x172d3c,%ebx <== NOT EXECUTED rtems_libio_check_is_open(iop); 143355: f6 43 15 01 testb $0x1,0x15(%ebx) <== NOT EXECUTED 143359: 0f 84 ad 00 00 00 je 14340c <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 14335f: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 143362: 85 c0 test %eax,%eax <== NOT EXECUTED 143364: 0f 84 d0 00 00 00 je 14343a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 14336a: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED 14336d: 85 c0 test %eax,%eax <== NOT EXECUTED 14336f: 0f 84 c5 00 00 00 je 14343a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 143375: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 143378: 83 c3 18 add $0x18,%ebx <== NOT EXECUTED 14337b: 53 push %ebx <== NOT EXECUTED 14337c: ff d0 call *%eax <== NOT EXECUTED 14337e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 143381: 48 dec %eax <== NOT EXECUTED 143382: 75 74 jne 1433f8 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 143384: a1 20 d3 16 00 mov 0x16d320,%eax <== NOT EXECUTED 143389: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED 14338c: 89 55 b4 mov %edx,-0x4c(%ebp) <== NOT EXECUTED 14338f: 8d 70 04 lea 0x4(%eax),%esi <== NOT EXECUTED 143392: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 143397: 89 d7 mov %edx,%edi <== NOT EXECUTED 143399: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 14339b: 8d 78 04 lea 0x4(%eax),%edi <== NOT EXECUTED 14339e: b1 05 mov $0x5,%cl <== NOT EXECUTED 1433a0: 89 de mov %ebx,%esi <== NOT EXECUTED 1433a2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 1433a4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1433a7: 6a 00 push $0x0 <== NOT EXECUTED 1433a9: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 1433ac: 56 push %esi <== NOT EXECUTED 1433ad: 6a 00 push $0x0 <== NOT EXECUTED 1433af: 6a 01 push $0x1 <== NOT EXECUTED 1433b1: 68 f8 07 16 00 push $0x1607f8 <== NOT EXECUTED 1433b6: e8 3d b4 fc ff call 10e7f8 <== NOT EXECUTED 1433bb: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1433be: 85 c0 test %eax,%eax <== NOT EXECUTED 1433c0: 75 5e jne 143420 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 1433c2: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 1433c5: 85 c0 test %eax,%eax <== NOT EXECUTED 1433c7: 74 13 je 1433dc <== NOT EXECUTED 1433c9: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1433cc: 85 c0 test %eax,%eax <== NOT EXECUTED 1433ce: 74 0c je 1433dc <== NOT EXECUTED 1433d0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1433d3: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED 1433d6: 52 push %edx <== NOT EXECUTED 1433d7: ff d0 call *%eax <== NOT EXECUTED 1433d9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_current = loc; 1433dc: 8b 3d 20 d3 16 00 mov 0x16d320,%edi <== NOT EXECUTED 1433e2: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 1433e5: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 1433ea: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 1433ec: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; } 1433ee: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1433f1: 5b pop %ebx <== NOT EXECUTED 1433f2: 5e pop %esi <== NOT EXECUTED 1433f3: 5f pop %edi <== NOT EXECUTED 1433f4: c9 leave <== NOT EXECUTED 1433f5: c3 ret <== NOT EXECUTED 1433f6: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 1433f8: e8 8f 33 00 00 call 14678c <__errno> <== NOT EXECUTED 1433fd: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 143403: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 143408: eb e4 jmp 1433ee <== NOT EXECUTED 14340a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 14340c: e8 7b 33 00 00 call 14678c <__errno> <== NOT EXECUTED 143411: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 143417: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 14341c: eb d0 jmp 1433ee <== NOT EXECUTED 14341e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 143420: 8b 3d 20 d3 16 00 mov 0x16d320,%edi <== NOT EXECUTED 143426: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 143429: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 14342e: 8b 75 b4 mov -0x4c(%ebp),%esi <== NOT EXECUTED 143431: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 143433: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 143438: eb b4 jmp 1433ee <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 14343a: e8 4d 33 00 00 call 14678c <__errno> <== NOT EXECUTED 14343f: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 143445: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 14344a: eb a2 jmp 1433ee <== NOT EXECUTED =============================================================================== 0012e1b0 : int fchmod( int fd, mode_t mode ) { 12e1b0: 55 push %ebp <== NOT EXECUTED 12e1b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12e1b3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12e1b6: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12e1b9: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 12e1bc: 3b 05 4c b1 16 00 cmp 0x16b14c,%eax <== NOT EXECUTED 12e1c2: 73 2c jae 12e1f0 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 12e1c4: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 12e1c7: 03 05 3c 2d 17 00 add 0x172d3c,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 12e1cd: f6 40 15 01 testb $0x1,0x15(%eax) <== NOT EXECUTED 12e1d1: 74 1d je 12e1f0 <== NOT EXECUTED /* * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) 12e1d3: 8b 48 3c mov 0x3c(%eax),%ecx <== NOT EXECUTED 12e1d6: 8b 49 1c mov 0x1c(%ecx),%ecx <== NOT EXECUTED 12e1d9: 85 c9 test %ecx,%ecx <== NOT EXECUTED 12e1db: 74 25 je 12e202 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 12e1dd: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED 12e1e0: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 12e1e3: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 12e1e6: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 12e1e9: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED } 12e1ec: 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 ); 12e1ed: ff e0 jmp *%eax <== NOT EXECUTED 12e1ef: 90 nop <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 12e1f0: e8 97 85 01 00 call 14678c <__errno> <== NOT EXECUTED 12e1f5: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED */ if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 12e1fb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12e200: c9 leave <== NOT EXECUTED 12e201: c3 ret <== NOT EXECUTED /* * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 12e202: e8 85 85 01 00 call 14678c <__errno> <== NOT EXECUTED 12e207: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12e20d: eb ec jmp 12e1fb <== NOT EXECUTED =============================================================================== 0012e210 : int fchown( int fd, uid_t owner, gid_t group ) { 12e210: 55 push %ebp <== NOT EXECUTED 12e211: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12e213: 53 push %ebx <== NOT EXECUTED 12e214: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12e217: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12e21a: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12e21d: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 12e220: 3b 05 4c b1 16 00 cmp 0x16b14c,%eax <== NOT EXECUTED 12e226: 73 38 jae 12e260 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 12e228: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 12e22b: 03 05 3c 2d 17 00 add 0x172d3c,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 12e231: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 12e234: f6 c6 01 test $0x1,%dh <== NOT EXECUTED 12e237: 74 27 je 12e260 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12e239: 83 e2 04 and $0x4,%edx <== NOT EXECUTED 12e23c: 74 36 je 12e274 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 12e23e: 8b 50 24 mov 0x24(%eax),%edx <== NOT EXECUTED 12e241: 8b 52 18 mov 0x18(%edx),%edx <== NOT EXECUTED 12e244: 85 d2 test %edx,%edx <== NOT EXECUTED 12e246: 74 39 je 12e281 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 12e248: 0f b7 db movzwl %bx,%ebx <== NOT EXECUTED 12e24b: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 12e24e: 0f b7 c9 movzwl %cx,%ecx <== NOT EXECUTED 12e251: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 12e254: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 12e257: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12e25a: 59 pop %ecx <== NOT EXECUTED 12e25b: 5b pop %ebx <== NOT EXECUTED 12e25c: 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 ); 12e25d: ff e2 jmp *%edx <== NOT EXECUTED 12e25f: 90 nop <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 12e260: e8 27 85 01 00 call 14678c <__errno> <== NOT EXECUTED 12e265: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 12e26b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12e270: 5a pop %edx <== NOT EXECUTED 12e271: 5b pop %ebx <== NOT EXECUTED 12e272: c9 leave <== NOT EXECUTED 12e273: c3 ret <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12e274: e8 13 85 01 00 call 14678c <__errno> <== NOT EXECUTED 12e279: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12e27f: eb ea jmp 12e26b <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 12e281: e8 06 85 01 00 call 14678c <__errno> <== NOT EXECUTED 12e286: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12e28c: eb dd jmp 12e26b <== NOT EXECUTED =============================================================================== 0014344c : int fcntl( int fd, int cmd, ... ) { 14344c: 55 push %ebp 14344d: 89 e5 mov %esp,%ebp 14344f: 57 push %edi 143450: 56 push %esi 143451: 53 push %ebx 143452: 83 ec 1c sub $0x1c,%esp 143455: 8b 5d 08 mov 0x8(%ebp),%ebx 143458: 8b 55 0c mov 0xc(%ebp),%edx #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, ...)); 14345b: 8d 7d 10 lea 0x10(%ebp),%edi int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 14345e: 8b 35 4c b1 16 00 mov 0x16b14c,%esi 143464: 39 f3 cmp %esi,%ebx 143466: 0f 83 3c 01 00 00 jae 1435a8 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 14346c: a1 3c 2d 17 00 mov 0x172d3c,%eax 143471: c1 e3 06 shl $0x6,%ebx 143474: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 143477: 8b 4b 14 mov 0x14(%ebx),%ecx 14347a: f6 c5 01 test $0x1,%ch 14347d: 0f 84 25 01 00 00 je 1435a8 <== NEVER TAKEN /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 143483: 83 fa 09 cmp $0x9,%edx 143486: 76 14 jbe 14349c errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 143488: e8 ff 32 00 00 call 14678c <__errno> 14348d: c7 00 16 00 00 00 movl $0x16,(%eax) 143493: be ff ff ff ff mov $0xffffffff,%esi 143498: eb 1a jmp 1434b4 14349a: 66 90 xchg %ax,%ax /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 14349c: ff 24 95 24 85 16 00 jmp *0x168524(,%edx,4) 1434a3: 90 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 1434a4: e8 e3 32 00 00 call 14678c <__errno> 1434a9: c7 00 86 00 00 00 movl $0x86,(%eax) 1434af: be ff ff ff ff mov $0xffffffff,%esi va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 1434b4: 89 f0 mov %esi,%eax 1434b6: 8d 65 f4 lea -0xc(%ebp),%esp 1434b9: 5b pop %ebx 1434ba: 5e pop %esi 1434bb: 5f pop %edi 1434bc: c9 leave 1434bd: c3 ret 1434be: 66 90 xchg %ax,%ax case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 1434c0: 83 ec 0c sub $0xc,%esp 1434c3: ff 37 pushl (%edi) 1434c5: 89 55 e0 mov %edx,-0x20(%ebp) 1434c8: e8 b7 b7 fc ff call 10ec84 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 1434cd: 25 01 02 00 00 and $0x201,%eax 1434d2: 8b 4b 14 mov 0x14(%ebx),%ecx 1434d5: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx 1434db: 09 c8 or %ecx,%eax 1434dd: 89 43 14 mov %eax,0x14(%ebx) 1434e0: 31 f6 xor %esi,%esi 1434e2: 83 c4 10 add $0x10,%esp 1434e5: 8b 55 e0 mov -0x20(%ebp),%edx * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 1434e8: 8b 43 3c mov 0x3c(%ebx),%eax 1434eb: 8b 40 30 mov 0x30(%eax),%eax 1434ee: 85 c0 test %eax,%eax 1434f0: 74 c2 je 1434b4 <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 1434f2: 83 ec 08 sub $0x8,%esp 1434f5: 53 push %ebx 1434f6: 52 push %edx 1434f7: ff d0 call *%eax 1434f9: 89 c3 mov %eax,%ebx if (err) { 1434fb: 83 c4 10 add $0x10,%esp 1434fe: 85 c0 test %eax,%eax 143500: 74 b2 je 1434b4 <== ALWAYS TAKEN errno = err; 143502: e8 85 32 00 00 call 14678c <__errno> <== NOT EXECUTED 143507: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 143509: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 14350e: 89 f0 mov %esi,%eax <== NOT EXECUTED 143510: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 143513: 5b pop %ebx <== NOT EXECUTED 143514: 5e pop %esi <== NOT EXECUTED 143515: 5f pop %edi <== NOT EXECUTED 143516: c9 leave <== NOT EXECUTED 143517: c3 ret <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 143518: 83 ec 0c sub $0xc,%esp 14351b: 51 push %ecx 14351c: 89 55 e0 mov %edx,-0x20(%ebp) 14351f: e8 74 b5 fc ff call 10ea98 143524: 89 c6 mov %eax,%esi 143526: 83 c4 10 add $0x10,%esp 143529: 8b 55 e0 mov -0x20(%ebp),%edx /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 14352c: 85 f6 test %esi,%esi 14352e: 79 b8 jns 1434e8 <== ALWAYS TAKEN 143530: eb 82 jmp 1434b4 <== NOT EXECUTED 143532: 66 90 xchg %ax,%ax <== NOT EXECUTED * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 143534: 8b 07 mov (%edi),%eax 143536: 85 c0 test %eax,%eax 143538: 74 52 je 14358c <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 14353a: 80 cd 08 or $0x8,%ch 14353d: 89 4b 14 mov %ecx,0x14(%ebx) 143540: 31 f6 xor %esi,%esi 143542: eb a4 jmp 1434e8 diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 143544: 89 ce mov %ecx,%esi 143546: c1 ee 0b shr $0xb,%esi 143549: 83 e6 01 and $0x1,%esi 14354c: eb 9a jmp 1434e8 14354e: 66 90 xchg %ax,%ax * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 143550: 8b 3f mov (%edi),%edi if ( fd2 ) 143552: 85 ff test %edi,%edi 143554: 74 6a je 1435c0 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); 143556: 39 fe cmp %edi,%esi <== NOT EXECUTED 143558: 77 42 ja 14359c <== NOT EXECUTED 14355a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 143561: 31 ff xor %edi,%edi <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 143563: 8b 73 3c mov 0x3c(%ebx),%esi 143566: 89 77 3c mov %esi,0x3c(%edi) diop->file_info = iop->file_info; 143569: 8b 73 38 mov 0x38(%ebx),%esi 14356c: 89 77 38 mov %esi,0x38(%edi) diop->flags = iop->flags; 14356f: 89 4f 14 mov %ecx,0x14(%edi) diop->pathinfo = iop->pathinfo; 143572: 83 c7 18 add $0x18,%edi 143575: 8d 73 18 lea 0x18(%ebx),%esi 143578: b9 05 00 00 00 mov $0x5,%ecx 14357d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 14357f: 8b 75 e4 mov -0x1c(%ebp),%esi 143582: 29 c6 sub %eax,%esi 143584: c1 fe 06 sar $0x6,%esi 143587: eb a3 jmp 14352c 143589: 8d 76 00 lea 0x0(%esi),%esi */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 14358c: 80 e5 f7 and $0xf7,%ch <== NOT EXECUTED 14358f: 89 4b 14 mov %ecx,0x14(%ebx) <== NOT EXECUTED 143592: 31 f6 xor %esi,%esi <== NOT EXECUTED 143594: e9 4f ff ff ff jmp 1434e8 <== NOT EXECUTED 143599: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 14359c: c1 e7 06 shl $0x6,%edi <== NOT EXECUTED 14359f: 8d 3c 38 lea (%eax,%edi,1),%edi <== NOT EXECUTED 1435a2: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 1435a5: eb bc jmp 143563 <== NOT EXECUTED 1435a7: 90 nop <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 1435a8: e8 df 31 00 00 call 14678c <__errno> <== NOT EXECUTED 1435ad: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 1435b3: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 1435b8: e9 f7 fe ff ff jmp 1434b4 <== NOT EXECUTED 1435bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 1435c0: 89 55 e0 mov %edx,-0x20(%ebp) 1435c3: e8 30 b6 fc ff call 10ebf8 1435c8: 89 c7 mov %eax,%edi if ( diop == 0 ) { 1435ca: 85 c0 test %eax,%eax 1435cc: 8b 55 e0 mov -0x20(%ebp),%edx 1435cf: 0f 84 34 ff ff ff je 143509 <== NEVER TAKEN 1435d5: 89 45 e4 mov %eax,-0x1c(%ebp) 1435d8: a1 3c 2d 17 00 mov 0x172d3c,%eax 1435dd: 8b 4b 14 mov 0x14(%ebx),%ecx 1435e0: eb 81 jmp 143563 =============================================================================== 0010915c : #include int fdatasync( int fd ) { 10915c: 55 push %ebp 10915d: 89 e5 mov %esp,%ebp 10915f: 83 ec 08 sub $0x8,%esp 109162: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 109165: 3b 05 4c 51 12 00 cmp 0x12514c,%eax 10916b: 73 27 jae 109194 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 10916d: c1 e0 06 shl $0x6,%eax 109170: 03 05 e0 91 12 00 add 0x1291e0,%eax rtems_libio_check_is_open(iop); 109176: 8b 50 14 mov 0x14(%eax),%edx 109179: f6 c6 01 test $0x1,%dh 10917c: 74 16 je 109194 <== NEVER TAKEN rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); 10917e: 83 e2 04 and $0x4,%edx 109181: 74 11 je 109194 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 109183: 8b 50 3c mov 0x3c(%eax),%edx 109186: 8b 52 2c mov 0x2c(%edx),%edx 109189: 85 d2 test %edx,%edx 10918b: 74 19 je 1091a6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 10918d: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 109190: c9 leave <== NOT EXECUTED */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 109191: ff e2 jmp *%edx <== NOT EXECUTED 109193: 90 nop <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); 109194: e8 fb be 00 00 call 115094 <__errno> 109199: c7 00 09 00 00 00 movl $0x9,(%eax) if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 10919f: b8 ff ff ff ff mov $0xffffffff,%eax 1091a4: c9 leave 1091a5: c3 ret /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1091a6: e8 e9 be 00 00 call 115094 <__errno> 1091ab: c7 00 86 00 00 00 movl $0x86,(%eax) 1091b1: eb ec jmp 10919f =============================================================================== 0010f6b8 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 10f6b8: 55 push %ebp 10f6b9: 89 e5 mov %esp,%ebp 10f6bb: 57 push %edi 10f6bc: 56 push %esi 10f6bd: 53 push %ebx 10f6be: 83 ec 30 sub $0x30,%esp 10f6c1: 8b 75 08 mov 0x8(%ebp),%esi ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 10f6c4: 6a 00 push $0x0 10f6c6: 6a 00 push $0x0 10f6c8: ff 35 a8 6f 12 00 pushl 0x126fa8 10f6ce: e8 11 c6 ff ff call 10bce4 10f6d3: 83 c4 10 add $0x10,%esp 10f6d6: 85 c0 test %eax,%eax 10f6d8: 74 12 je 10f6ec <== NEVER TAKEN 10f6da: bf fc ff ff ff mov $0xfffffffc,%edi return 0; out_error: pipe_release(pipep, iop); return err; } 10f6df: 89 f8 mov %edi,%eax 10f6e1: 8d 65 f4 lea -0xc(%ebp),%esp 10f6e4: 5b pop %ebx 10f6e5: 5e pop %esi 10f6e6: 5f pop %edi 10f6e7: c9 leave 10f6e8: c3 ret 10f6e9: 8d 76 00 lea 0x0(%esi),%esi if (rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 10f6ec: 8b 1e mov (%esi),%ebx <== NOT EXECUTED if (pipe == NULL) { 10f6ee: 85 db test %ebx,%ebx <== NOT EXECUTED 10f6f0: 74 7a je 10f76c <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 10f6f2: 52 push %edx <== NOT EXECUTED 10f6f3: 6a 00 push $0x0 <== NOT EXECUTED 10f6f5: 6a 00 push $0x0 <== NOT EXECUTED 10f6f7: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f6fa: e8 e5 c5 ff ff call 10bce4 <== NOT EXECUTED 10f6ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f702: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10f705: 19 ff sbb %edi,%edi <== NOT EXECUTED 10f707: f7 d7 not %edi <== NOT EXECUTED 10f709: 83 e7 fc and $0xfffffffc,%edi <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 10f70c: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10f70e: 85 c0 test %eax,%eax <== NOT EXECUTED 10f710: 0f 84 72 02 00 00 je 10f988 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 10f716: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f719: ff 35 a8 6f 12 00 pushl 0x126fa8 <== NOT EXECUTED 10f71f: e8 bc c6 ff ff call 10bde0 <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 10f724: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f727: 85 ff test %edi,%edi <== NOT EXECUTED 10f729: 75 b4 jne 10f6df <== NOT EXECUTED return err; pipe = *pipep; 10f72b: 8b 1e mov (%esi),%ebx <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 10f72d: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10f730: 8b 42 14 mov 0x14(%edx),%eax <== NOT EXECUTED 10f733: 83 e0 06 and $0x6,%eax <== NOT EXECUTED 10f736: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10f739: 0f 84 d1 01 00 00 je 10f910 <== NOT EXECUTED 10f73f: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10f742: 0f 84 88 01 00 00 je 10f8d0 <== NOT EXECUTED 10f748: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10f74b: 0f 84 f7 00 00 00 je 10f848 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 10f751: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f754: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f757: e8 84 c6 ff ff call 10bde0 <== NOT EXECUTED 10f75c: 31 ff xor %edi,%edi <== NOT EXECUTED return 0; 10f75e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_error: pipe_release(pipep, iop); return err; } 10f761: 89 f8 mov %edi,%eax <== NOT EXECUTED 10f763: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f766: 5b pop %ebx <== NOT EXECUTED 10f767: 5e pop %esi <== NOT EXECUTED 10f768: 5f pop %edi <== NOT EXECUTED 10f769: c9 leave <== NOT EXECUTED 10f76a: c3 ret <== NOT EXECUTED 10f76b: 90 nop <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 10f76c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f76f: 6a 34 push $0x34 <== NOT EXECUTED 10f771: e8 46 91 ff ff call 1088bc <== NOT EXECUTED 10f776: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10f778: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED if (pipe == NULL) 10f77b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f77e: 85 c0 test %eax,%eax <== NOT EXECUTED 10f780: 0f 84 06 03 00 00 je 10fa8c <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 10f786: b9 34 00 00 00 mov $0x34,%ecx <== NOT EXECUTED 10f78b: 31 c0 xor %eax,%eax <== NOT EXECUTED 10f78d: 89 df mov %ebx,%edi <== NOT EXECUTED 10f78f: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED pipe->Size = PIPE_BUF; 10f791: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 10f798: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f79b: 68 00 02 00 00 push $0x200 <== NOT EXECUTED 10f7a0: e8 17 91 ff ff call 1088bc <== NOT EXECUTED 10f7a5: 89 03 mov %eax,(%ebx) <== NOT EXECUTED if (! pipe->Buffer) 10f7a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f7aa: 85 c0 test %eax,%eax <== NOT EXECUTED 10f7ac: 0f 84 cc 02 00 00 je 10fa7e <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 10f7b2: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED 10f7b5: 50 push %eax <== NOT EXECUTED 10f7b6: 6a 00 push $0x0 <== NOT EXECUTED 10f7b8: 6a 00 push $0x0 <== NOT EXECUTED 10f7ba: 0f be 05 48 50 12 00 movsbl 0x125048,%eax <== NOT EXECUTED 10f7c1: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED 10f7c6: 50 push %eax <== NOT EXECUTED 10f7c7: e8 48 19 00 00 call 111114 <== NOT EXECUTED 10f7cc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f7cf: 85 c0 test %eax,%eax <== NOT EXECUTED 10f7d1: 0f 85 97 02 00 00 jne 10fa6e <== 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( 10f7d7: 8d 43 30 lea 0x30(%ebx),%eax <== NOT EXECUTED 10f7da: 50 push %eax <== NOT EXECUTED 10f7db: 6a 00 push $0x0 <== NOT EXECUTED 10f7dd: 6a 00 push $0x0 <== NOT EXECUTED 10f7df: 0f be 05 48 50 12 00 movsbl 0x125048,%eax <== NOT EXECUTED 10f7e6: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED 10f7eb: 50 push %eax <== NOT EXECUTED 10f7ec: e8 23 19 00 00 call 111114 <== NOT EXECUTED 10f7f1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f7f4: 85 c0 test %eax,%eax <== NOT EXECUTED 10f7f6: 0f 85 61 02 00 00 jne 10fa5d <== 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( 10f7fc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f7ff: 8d 43 28 lea 0x28(%ebx),%eax <== NOT EXECUTED 10f802: 50 push %eax <== NOT EXECUTED 10f803: 6a 00 push $0x0 <== NOT EXECUTED 10f805: 6a 10 push $0x10 <== NOT EXECUTED 10f807: 6a 01 push $0x1 <== NOT EXECUTED 10f809: 0f be 05 48 50 12 00 movsbl 0x125048,%eax <== NOT EXECUTED 10f810: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED 10f815: 50 push %eax <== NOT EXECUTED 10f816: e8 51 c2 ff ff call 10ba6c <== NOT EXECUTED 10f81b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10f81e: 85 c0 test %eax,%eax <== NOT EXECUTED 10f820: 0f 85 26 02 00 00 jne 10fa4c <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 10f826: a0 48 50 12 00 mov 0x125048,%al <== NOT EXECUTED 10f82b: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f82e: 88 15 48 50 12 00 mov %dl,0x125048 <== NOT EXECUTED 10f834: 3c 7a cmp $0x7a,%al <== NOT EXECUTED 10f836: 0f 85 b6 fe ff ff jne 10f6f2 <== NOT EXECUTED c = 'a'; 10f83c: c6 05 48 50 12 00 61 movb $0x61,0x125048 <== NOT EXECUTED 10f843: e9 aa fe ff ff jmp 10f6f2 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 10f848: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10f84b: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10f84e: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f851: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10f854: 85 c0 test %eax,%eax <== NOT EXECUTED 10f856: 0f 84 90 01 00 00 je 10f9ec <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 10f85c: 8b 7b 14 mov 0x14(%ebx),%edi <== NOT EXECUTED 10f85f: 85 ff test %edi,%edi <== NOT EXECUTED 10f861: 0f 85 ea fe ff ff jne 10f751 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 10f867: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10f86a: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10f86e: 0f 85 dd fe ff ff jne 10f751 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 10f874: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED 10f877: eb 20 jmp 10f899 <== NOT EXECUTED 10f879: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 10f87c: 50 push %eax <== NOT EXECUTED 10f87d: 6a 00 push $0x0 <== NOT EXECUTED 10f87f: 6a 00 push $0x0 <== NOT EXECUTED 10f881: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f884: e8 5b c4 ff ff call 10bce4 <== NOT EXECUTED 10f889: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f88c: 85 c0 test %eax,%eax <== NOT EXECUTED 10f88e: 75 27 jne 10f8b7 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 10f890: 39 7b 24 cmp %edi,0x24(%ebx) <== NOT EXECUTED 10f893: 0f 85 b8 fe ff ff jne 10f751 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 10f899: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f89c: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f89f: e8 3c c5 ff ff call 10bde0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10f8a4: 5a pop %edx <== NOT EXECUTED 10f8a5: 59 pop %ecx <== NOT EXECUTED 10f8a6: 6a 00 push $0x0 <== NOT EXECUTED 10f8a8: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f8ab: e8 18 1a 00 00 call 1112c8 <== NOT EXECUTED 10f8b0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f8b3: 85 c0 test %eax,%eax <== NOT EXECUTED 10f8b5: 74 c5 je 10f87c <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 10f8b7: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED out_error: pipe_release(pipep, iop); 10f8bc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f8bf: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10f8c2: 56 push %esi <== NOT EXECUTED 10f8c3: e8 dc fc ff ff call 10f5a4 <== NOT EXECUTED return err; 10f8c8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f8cb: e9 0f fe ff ff jmp 10f6df <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 10f8d0: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10f8d3: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10f8d6: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f8d9: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10f8dc: 85 c0 test %eax,%eax <== NOT EXECUTED 10f8de: 0f 84 38 01 00 00 je 10fa1c <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 10f8e4: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10f8e7: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10f8ea: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f8ed: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10f8f0: 85 c0 test %eax,%eax <== NOT EXECUTED 10f8f2: 0f 85 59 fe ff ff jne 10f751 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10f8f8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f8fb: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f8fe: 50 push %eax <== NOT EXECUTED 10f8ff: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f902: e8 5d 19 00 00 call 111264 <== NOT EXECUTED 10f907: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f90a: e9 42 fe ff ff jmp 10f751 <== NOT EXECUTED 10f90f: 90 nop <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 10f910: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10f913: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10f916: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f919: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10f91c: 85 c0 test %eax,%eax <== NOT EXECUTED 10f91e: 0f 84 e0 00 00 00 je 10fa04 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 10f924: 8b 7b 10 mov 0x10(%ebx),%edi <== NOT EXECUTED 10f927: 85 ff test %edi,%edi <== NOT EXECUTED 10f929: 0f 85 22 fe ff ff jne 10f751 <== NOT EXECUTED 10f92f: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10f932: f6 42 14 01 testb $0x1,0x14(%edx) <== NOT EXECUTED 10f936: 0f 85 f8 00 00 00 jne 10fa34 <== NOT EXECUTED err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 10f93c: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED 10f93f: eb 24 jmp 10f965 <== NOT EXECUTED 10f941: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 10f944: 50 push %eax <== NOT EXECUTED 10f945: 6a 00 push $0x0 <== NOT EXECUTED 10f947: 6a 00 push $0x0 <== NOT EXECUTED 10f949: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f94c: e8 93 c3 ff ff call 10bce4 <== NOT EXECUTED 10f951: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f954: 85 c0 test %eax,%eax <== NOT EXECUTED 10f956: 0f 85 5b ff ff ff jne 10f8b7 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 10f95c: 39 7b 20 cmp %edi,0x20(%ebx) <== NOT EXECUTED 10f95f: 0f 85 ec fd ff ff jne 10f751 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 10f965: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f968: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f96b: e8 70 c4 ff ff call 10bde0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10f970: 5a pop %edx <== NOT EXECUTED 10f971: 59 pop %ecx <== NOT EXECUTED 10f972: 6a 00 push $0x0 <== NOT EXECUTED 10f974: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f977: e8 4c 19 00 00 call 1112c8 <== NOT EXECUTED 10f97c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f97f: 85 c0 test %eax,%eax <== NOT EXECUTED 10f981: 74 c1 je 10f944 <== NOT EXECUTED 10f983: e9 2f ff ff ff jmp 10f8b7 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 10f988: 85 ff test %edi,%edi <== NOT EXECUTED 10f98a: 75 18 jne 10f9a4 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; 10f98c: 89 1e mov %ebx,(%esi) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 10f98e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f991: ff 35 a8 6f 12 00 pushl 0x126fa8 <== NOT EXECUTED 10f997: e8 44 c4 ff ff call 10bde0 <== NOT EXECUTED 10f99c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f99f: e9 87 fd ff ff jmp 10f72b <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 10f9a4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f9a7: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f9aa: e8 4d 18 00 00 call 1111fc <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 10f9af: 59 pop %ecx <== NOT EXECUTED 10f9b0: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f9b3: e8 44 18 00 00 call 1111fc <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 10f9b8: 5a pop %edx <== NOT EXECUTED 10f9b9: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f9bc: e8 7f c2 ff ff call 10bc40 <== NOT EXECUTED free(pipe->Buffer); 10f9c1: 58 pop %eax <== NOT EXECUTED 10f9c2: ff 33 pushl (%ebx) <== NOT EXECUTED 10f9c4: e8 1b 8c ff ff call 1085e4 <== NOT EXECUTED free(pipe); 10f9c9: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10f9cc: e8 13 8c ff ff call 1085e4 <== NOT EXECUTED 10f9d1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 10f9d4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f9d7: ff 35 a8 6f 12 00 pushl 0x126fa8 <== NOT EXECUTED 10f9dd: e8 fe c3 ff ff call 10bde0 <== NOT EXECUTED 10f9e2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f9e5: e9 f5 fc ff ff jmp 10f6df <== NOT EXECUTED 10f9ea: 66 90 xchg %ax,%ax <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 10f9ec: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f9ef: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f9f2: 50 push %eax <== NOT EXECUTED 10f9f3: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f9f6: e8 69 18 00 00 call 111264 <== NOT EXECUTED 10f9fb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f9fe: e9 59 fe ff ff jmp 10f85c <== NOT EXECUTED 10fa03: 90 nop <== NOT EXECUTED case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 10fa04: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10fa07: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10fa0a: 50 push %eax <== NOT EXECUTED 10fa0b: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10fa0e: e8 51 18 00 00 call 111264 <== NOT EXECUTED 10fa13: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa16: e9 09 ff ff ff jmp 10f924 <== NOT EXECUTED 10fa1b: 90 nop <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 10fa1c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10fa1f: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10fa22: 50 push %eax <== NOT EXECUTED 10fa23: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fa26: e8 39 18 00 00 call 111264 <== NOT EXECUTED 10fa2b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa2e: e9 b1 fe ff ff jmp 10f8e4 <== NOT EXECUTED 10fa33: 90 nop <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 10fa34: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fa37: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fa3a: e8 a1 c3 ff ff call 10bde0 <== NOT EXECUTED 10fa3f: bf fa ff ff ff mov $0xfffffffa,%edi <== NOT EXECUTED err = -ENXIO; goto out_error; 10fa44: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa47: e9 70 fe ff ff jmp 10f8bc <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 10fa4c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fa4f: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10fa52: ff 70 30 pushl 0x30(%eax) <== NOT EXECUTED 10fa55: e8 a2 17 00 00 call 1111fc <== NOT EXECUTED 10fa5a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 10fa5d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fa60: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10fa63: ff 72 2c pushl 0x2c(%edx) <== NOT EXECUTED 10fa66: e8 91 17 00 00 call 1111fc <== NOT EXECUTED 10fa6b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 10fa6e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fa71: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10fa74: ff 30 pushl (%eax) <== NOT EXECUTED 10fa76: e8 69 8b ff ff call 1085e4 <== NOT EXECUTED 10fa7b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_buf: free(pipe); 10fa7e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fa81: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10fa84: e8 5b 8b ff ff call 1085e4 <== NOT EXECUTED 10fa89: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa8c: bf f4 ff ff ff mov $0xfffffff4,%edi <== NOT EXECUTED 10fa91: e9 3e ff ff ff jmp 10f9d4 <== NOT EXECUTED =============================================================================== 00110e28 : const char *type; rtems_filesystem_fsmount_me_t mount_h; } find_arg; static bool find_handler(const rtems_filesystem_table_t *entry, void *arg) { 110e28: 55 push %ebp 110e29: 89 e5 mov %esp,%ebp 110e2b: 56 push %esi 110e2c: 53 push %ebx 110e2d: 8b 75 08 mov 0x8(%ebp),%esi 110e30: 8b 5d 0c mov 0xc(%ebp),%ebx find_arg *fa = arg; if ( strcmp( entry->type, fa->type ) != 0 ) { 110e33: 83 ec 08 sub $0x8,%esp 110e36: ff 33 pushl (%ebx) 110e38: ff 36 pushl (%esi) 110e3a: e8 c9 3a 00 00 call 114908 110e3f: 83 c4 10 add $0x10,%esp 110e42: 85 c0 test %eax,%eax 110e44: 75 12 jne 110e58 return false; } else { fa->mount_h = entry->mount_h; 110e46: 8b 46 04 mov 0x4(%esi),%eax 110e49: 89 43 04 mov %eax,0x4(%ebx) 110e4c: b0 01 mov $0x1,%al return true; } } 110e4e: 8d 65 f8 lea -0x8(%ebp),%esp 110e51: 5b pop %ebx 110e52: 5e pop %esi 110e53: c9 leave 110e54: c3 ret 110e55: 8d 76 00 lea 0x0(%esi),%esi static bool find_handler(const rtems_filesystem_table_t *entry, void *arg) { find_arg *fa = arg; if ( strcmp( entry->type, fa->type ) != 0 ) { 110e58: 31 c0 xor %eax,%eax } else { fa->mount_h = entry->mount_h; return true; } } 110e5a: 8d 65 f8 lea -0x8(%ebp),%esp 110e5d: 5b pop %ebx 110e5e: 5e pop %esi 110e5f: c9 leave 110e60: c3 ret =============================================================================== 001091b4 : long fpathconf( int fd, int name ) { 1091b4: 55 push %ebp 1091b5: 89 e5 mov %esp,%ebp 1091b7: 83 ec 08 sub $0x8,%esp 1091ba: 8b 45 08 mov 0x8(%ebp),%eax 1091bd: 8b 55 0c mov 0xc(%ebp),%edx long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 1091c0: 3b 05 4c 51 12 00 cmp 0x12514c,%eax 1091c6: 0f 83 98 00 00 00 jae 109264 iop = rtems_libio_iop(fd); 1091cc: c1 e0 06 shl $0x6,%eax 1091cf: 03 05 e0 91 12 00 add 0x1291e0,%eax rtems_libio_check_is_open(iop); 1091d5: f6 40 15 01 testb $0x1,0x15(%eax) 1091d9: 0f 84 85 00 00 00 je 109264 <== NEVER TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 1091df: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 1091e2: 83 fa 0b cmp $0xb,%edx 1091e5: 76 15 jbe 1091fc break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 1091e7: e8 a8 be 00 00 call 115094 <__errno> 1091ec: c7 00 16 00 00 00 movl $0x16,(%eax) 1091f2: b8 ff ff ff ff mov $0xffffffff,%eax break; } return return_value; } 1091f7: c9 leave 1091f8: c3 ret 1091f9: 8d 76 00 lea 0x0(%esi),%esi * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 1091fc: ff 24 95 d8 34 12 00 jmp *0x1234d8(,%edx,4) 109203: 90 nop break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 109204: 8b 40 5c mov 0x5c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109207: c9 leave 109208: c3 ret 109209: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 10920c: 8b 40 50 mov 0x50(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10920f: c9 leave 109210: c3 ret 109211: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 109214: 8b 40 64 mov 0x64(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109217: c9 leave 109218: c3 ret 109219: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 10921c: 8b 40 58 mov 0x58(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10921f: c9 leave 109220: c3 ret 109221: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 109224: 8b 40 54 mov 0x54(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109227: c9 leave 109228: c3 ret 109229: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 10922c: 8b 40 4c mov 0x4c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10922f: c9 leave 109230: c3 ret 109231: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 109234: 8b 40 48 mov 0x48(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109237: c9 leave 109238: c3 ret 109239: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 10923c: 8b 40 44 mov 0x44(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10923f: c9 leave 109240: c3 ret 109241: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 109244: 8b 40 40 mov 0x40(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109247: c9 leave 109248: c3 ret 109249: 8d 76 00 lea 0x0(%esi),%esi switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 10924c: 8b 40 3c mov 0x3c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10924f: c9 leave 109250: c3 ret 109251: 8d 76 00 lea 0x0(%esi),%esi the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 109254: 8b 40 38 mov 0x38(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109257: c9 leave 109258: c3 ret 109259: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 10925c: 8b 40 60 mov 0x60(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10925f: c9 leave 109260: c3 ret 109261: 8d 76 00 lea 0x0(%esi),%esi rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 109264: e8 2b be 00 00 call 115094 <__errno> 109269: c7 00 09 00 00 00 movl $0x9,(%eax) 10926f: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109274: c9 leave 109275: c3 ret =============================================================================== 001085e4 : void free( void *ptr ) { MSBUMP(free_calls, 1); 1085e4: 55 push %ebp 1085e5: 89 e5 mov %esp,%ebp 1085e7: 53 push %ebx 1085e8: 83 ec 04 sub $0x4,%esp 1085eb: 8b 5d 08 mov 0x8(%ebp),%ebx 1085ee: ff 05 0c 72 12 00 incl 0x12720c if ( !ptr ) 1085f4: 85 db test %ebx,%ebx 1085f6: 74 4b je 108643 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1085f8: 83 3d 20 75 12 00 03 cmpl $0x3,0x127520 1085ff: 74 47 je 108648 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 108601: a1 e8 55 12 00 mov 0x1255e8,%eax 108606: 85 c0 test %eax,%eax 108608: 74 0a je 108614 (*rtems_malloc_statistics_helpers->at_free)(ptr); 10860a: 83 ec 0c sub $0xc,%esp 10860d: 53 push %ebx 10860e: ff 50 08 call *0x8(%eax) 108611: 83 c4 10 add $0x10,%esp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 108614: 83 ec 08 sub $0x8,%esp 108617: 53 push %ebx 108618: ff 35 58 31 12 00 pushl 0x123158 10861e: e8 f5 4f 00 00 call 10d618 <_Protected_heap_Free> 108623: 83 c4 10 add $0x10,%esp 108626: 84 c0 test %al,%al 108628: 75 19 jne 108643 <== ALWAYS TAKEN printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 10862a: a1 58 31 12 00 mov 0x123158,%eax <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 10862f: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED 108632: ff 70 18 pushl 0x18(%eax) <== NOT EXECUTED 108635: 53 push %ebx <== NOT EXECUTED 108636: 68 f0 17 12 00 push $0x1217f0 <== NOT EXECUTED 10863b: e8 f0 0d 00 00 call 109430 <== NOT EXECUTED 108640: 83 c4 10 add $0x10,%esp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 108643: 8b 5d fc mov -0x4(%ebp),%ebx 108646: c9 leave 108647: c3 ret /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 108648: e8 3f 01 00 00 call 10878c 10864d: 84 c0 test %al,%al 10864f: 75 b0 jne 108601 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 108651: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 108654: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108657: c9 leave <== NOT EXECUTED * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 108658: e9 6f 01 00 00 jmp 1087cc <== NOT EXECUTED =============================================================================== 0012f518 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 12f518: 55 push %ebp <== NOT EXECUTED 12f519: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12f51b: 53 push %ebx <== NOT EXECUTED 12f51c: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12f51f: 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 12f522: 81 fb a0 2d 17 00 cmp $0x172da0,%ebx <== NOT EXECUTED 12f528: 74 42 je 12f56c <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 12f52a: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 12f52d: 85 c0 test %eax,%eax <== NOT EXECUTED 12f52f: 74 13 je 12f544 <== NOT EXECUTED 12f531: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12f534: 85 c0 test %eax,%eax <== NOT EXECUTED 12f536: 74 0c je 12f544 <== NOT EXECUTED 12f538: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12f53b: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED 12f53e: 52 push %edx <== NOT EXECUTED 12f53f: ff d0 call *%eax <== NOT EXECUTED 12f541: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 12f544: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 12f547: 85 c0 test %eax,%eax <== NOT EXECUTED 12f549: 74 13 je 12f55e <== NOT EXECUTED 12f54b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12f54e: 85 c0 test %eax,%eax <== NOT EXECUTED 12f550: 74 0c je 12f55e <== NOT EXECUTED 12f552: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12f555: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED 12f558: 52 push %edx <== NOT EXECUTED 12f559: ff d0 call *%eax <== NOT EXECUTED 12f55b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(env); 12f55e: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 12f561: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 12f564: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 12f565: e9 fe f2 fd ff jmp 10e868 <== NOT EXECUTED 12f56a: 66 90 xchg %ax,%ax <== NOT EXECUTED } } 12f56c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 12f56f: c9 leave <== NOT EXECUTED 12f570: c3 ret <== NOT EXECUTED =============================================================================== 0011f394 : int fstat( int fd, struct stat *sbuf ) { 11f394: 55 push %ebp 11f395: 89 e5 mov %esp,%ebp 11f397: 57 push %edi 11f398: 53 push %ebx 11f399: 8b 55 08 mov 0x8(%ebp),%edx 11f39c: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11f39f: 85 db test %ebx,%ebx 11f3a1: 74 66 je 11f409 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11f3a3: 3b 15 4c 31 12 00 cmp 0x12314c,%edx 11f3a9: 73 3d jae 11f3e8 11f3ab: c1 e2 06 shl $0x6,%edx 11f3ae: 03 15 e0 71 12 00 add 0x1271e0,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11f3b4: f6 42 15 01 testb $0x1,0x15(%edx) 11f3b8: 74 2e je 11f3e8 <== NEVER TAKEN if ( !iop->handlers ) 11f3ba: 8b 42 3c mov 0x3c(%edx),%eax 11f3bd: 85 c0 test %eax,%eax 11f3bf: 74 27 je 11f3e8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 11f3c1: 8b 40 18 mov 0x18(%eax),%eax 11f3c4: 85 c0 test %eax,%eax 11f3c6: 74 34 je 11f3fc <== NEVER TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11f3c8: b9 48 00 00 00 mov $0x48,%ecx 11f3cd: 31 c0 xor %eax,%eax 11f3cf: 89 df mov %ebx,%edi 11f3d1: f3 aa rep stos %al,%es:(%edi) return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 11f3d3: 8b 42 3c mov 0x3c(%edx),%eax 11f3d6: 89 5d 0c mov %ebx,0xc(%ebp) 11f3d9: 83 c2 18 add $0x18,%edx 11f3dc: 89 55 08 mov %edx,0x8(%ebp) 11f3df: 8b 40 18 mov 0x18(%eax),%eax } 11f3e2: 5b pop %ebx 11f3e3: 5f pop %edi 11f3e4: 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 ); 11f3e5: ff e0 jmp *%eax 11f3e7: 90 nop iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 11f3e8: e8 53 4a ff ff call 113e40 <__errno> 11f3ed: c7 00 09 00 00 00 movl $0x9,(%eax) * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 11f3f3: b8 ff ff ff ff mov $0xffffffff,%eax 11f3f8: 5b pop %ebx 11f3f9: 5f pop %edi 11f3fa: c9 leave 11f3fb: c3 ret if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 11f3fc: e8 3f 4a ff ff call 113e40 <__errno> <== NOT EXECUTED 11f401: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11f407: eb ea jmp 11f3f3 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 11f409: e8 32 4a ff ff call 113e40 <__errno> 11f40e: c7 00 0e 00 00 00 movl $0xe,(%eax) 11f414: eb dd jmp 11f3f3 =============================================================================== 0012e32c : #include int fsync( int fd ) { 12e32c: 55 push %ebp 12e32d: 89 e5 mov %esp,%ebp 12e32f: 83 ec 08 sub $0x8,%esp 12e332: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 12e335: 3b 05 4c b1 16 00 cmp 0x16b14c,%eax 12e33b: 73 23 jae 12e360 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 12e33d: c1 e0 06 shl $0x6,%eax 12e340: 03 05 3c 2d 17 00 add 0x172d3c,%eax rtems_libio_check_is_open(iop); 12e346: f6 40 15 01 testb $0x1,0x15(%eax) 12e34a: 74 14 je 12e360 <== NEVER TAKEN /* * Now process the fsync(). */ if ( !iop->handlers ) 12e34c: 8b 50 3c mov 0x3c(%eax),%edx 12e34f: 85 d2 test %edx,%edx 12e351: 74 0d je 12e360 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 12e353: 8b 52 28 mov 0x28(%edx),%edx 12e356: 85 d2 test %edx,%edx 12e358: 74 18 je 12e372 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 12e35a: 89 45 08 mov %eax,0x8(%ebp) } 12e35d: 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 ); 12e35e: ff e2 jmp *%edx /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 12e360: e8 27 84 01 00 call 14678c <__errno> <== NOT EXECUTED 12e365: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 12e36b: b8 ff ff ff ff mov $0xffffffff,%eax 12e370: c9 leave 12e371: c3 ret if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 12e372: e8 15 84 01 00 call 14678c <__errno> 12e377: c7 00 86 00 00 00 movl $0x86,(%eax) 12e37d: eb ec jmp 12e36b =============================================================================== 00110b38 : int ftruncate( int fd, off_t length ) { 110b38: 55 push %ebp 110b39: 89 e5 mov %esp,%ebp 110b3b: 57 push %edi 110b3c: 56 push %esi 110b3d: 53 push %ebx 110b3e: 83 ec 3c sub $0x3c,%esp 110b41: 8b 5d 08 mov 0x8(%ebp),%ebx 110b44: 8b 45 0c mov 0xc(%ebp),%eax 110b47: 8b 55 10 mov 0x10(%ebp),%edx 110b4a: 89 45 c0 mov %eax,-0x40(%ebp) 110b4d: 89 55 c4 mov %edx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 110b50: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 110b56: 73 60 jae 110bb8 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 110b58: c1 e3 06 shl $0x6,%ebx 110b5b: 03 1d e0 71 12 00 add 0x1271e0,%ebx rtems_libio_check_is_open(iop); 110b61: 8b 43 14 mov 0x14(%ebx),%eax 110b64: f6 c4 01 test $0x1,%ah 110b67: 74 4f je 110bb8 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 110b69: a8 04 test $0x4,%al 110b6b: 74 5f je 110bcc <== NEVER TAKEN /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 110b6d: 8d 45 d4 lea -0x2c(%ebp),%eax 110b70: 8d 73 18 lea 0x18(%ebx),%esi 110b73: b9 05 00 00 00 mov $0x5,%ecx 110b78: 89 c7 mov %eax,%edi 110b7a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 110b7c: 8b 55 e0 mov -0x20(%ebp),%edx 110b7f: 8b 52 10 mov 0x10(%edx),%edx 110b82: 85 d2 test %edx,%edx 110b84: 74 5a je 110be0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 110b86: 83 ec 0c sub $0xc,%esp 110b89: 50 push %eax 110b8a: ff d2 call *%edx 110b8c: 83 c4 10 add $0x10,%esp 110b8f: 48 dec %eax 110b90: 74 60 je 110bf2 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 110b92: f6 43 14 04 testb $0x4,0x14(%ebx) 110b96: 74 34 je 110bcc <== NEVER TAKEN if ( !iop->handlers->ftruncate_h ) 110b98: 8b 43 3c mov 0x3c(%ebx),%eax 110b9b: 8b 40 20 mov 0x20(%eax),%eax 110b9e: 85 c0 test %eax,%eax 110ba0: 74 3e je 110be0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 110ba2: 52 push %edx 110ba3: ff 75 c4 pushl -0x3c(%ebp) 110ba6: ff 75 c0 pushl -0x40(%ebp) 110ba9: 53 push %ebx 110baa: ff d0 call *%eax 110bac: 83 c4 10 add $0x10,%esp } 110baf: 8d 65 f4 lea -0xc(%ebp),%esp 110bb2: 5b pop %ebx 110bb3: 5e pop %esi 110bb4: 5f pop %edi 110bb5: c9 leave 110bb6: c3 ret 110bb7: 90 nop rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 110bb8: e8 83 32 00 00 call 113e40 <__errno> <== NOT EXECUTED 110bbd: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 110bc3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110bc8: eb e5 jmp 110baf <== NOT EXECUTED 110bca: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 110bcc: e8 6f 32 00 00 call 113e40 <__errno> <== NOT EXECUTED 110bd1: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 110bd7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110bdc: eb d1 jmp 110baf <== NOT EXECUTED 110bde: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 110be0: e8 5b 32 00 00 call 113e40 <__errno> <== NOT EXECUTED 110be5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 110beb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110bf0: eb bd jmp 110baf <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 110bf2: e8 49 32 00 00 call 113e40 <__errno> 110bf7: c7 00 15 00 00 00 movl $0x15,(%eax) 110bfd: b8 ff ff ff ff mov $0xffffffff,%eax 110c02: eb ab jmp 110baf =============================================================================== 0010821c : } } static rtems_disk_device * get_disk_entry(dev_t dev, bool lookup_only) { 10821c: 55 push %ebp 10821d: 89 e5 mov %esp,%ebp 10821f: 53 push %ebx rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major < disktab_size && disktab != NULL) { 108220: 39 05 04 af 12 00 cmp %eax,0x12af04 108226: 77 08 ja 108230 <== ALWAYS TAKEN if (minor < dtab->size && dtab->minor != NULL) { rtems_disk_device *dd = dtab->minor [minor]; if (dd != NULL && !lookup_only) { if (!dd->deleted) { ++dd->uses; 108228: 31 c0 xor %eax,%eax return dd; } } return NULL; } 10822a: 5b pop %ebx 10822b: c9 leave 10822c: c3 ret 10822d: 8d 76 00 lea 0x0(%esi),%esi rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major < disktab_size && disktab != NULL) { 108230: 8b 1d 00 af 12 00 mov 0x12af00,%ebx 108236: 85 db test %ebx,%ebx 108238: 74 ee je 108228 <== NEVER TAKEN rtems_disk_device_table *dtab = disktab + major; 10823a: 8d 04 c3 lea (%ebx,%eax,8),%eax if (minor < dtab->size && dtab->minor != NULL) { 10823d: 39 50 04 cmp %edx,0x4(%eax) 108240: 76 e6 jbe 108228 <== NEVER TAKEN 108242: 8b 00 mov (%eax),%eax 108244: 85 c0 test %eax,%eax 108246: 74 e0 je 108228 <== NEVER TAKEN rtems_disk_device *dd = dtab->minor [minor]; 108248: 8b 04 90 mov (%eax,%edx,4),%eax if (dd != NULL && !lookup_only) { 10824b: 85 c0 test %eax,%eax 10824d: 74 db je 10822a 10824f: 84 c9 test %cl,%cl 108251: 75 d7 jne 10822a if (!dd->deleted) { 108253: 80 78 30 00 cmpb $0x0,0x30(%eax) 108257: 75 cf jne 108228 ++dd->uses; 108259: ff 40 14 incl 0x14(%eax) 10825c: eb cc jmp 10822a =============================================================================== 0015c67c : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 15c67c: 55 push %ebp 15c67d: 89 e5 mov %esp,%ebp 15c67f: 57 push %edi 15c680: 56 push %esi 15c681: 53 push %ebx 15c682: 83 ec 2c sub $0x2c,%esp 15c685: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 15c688: 3b 1d 4c b1 16 00 cmp 0x16b14c,%ebx 15c68e: 72 48 jb 15c6d8 <== ALWAYS TAKEN 15c690: 31 db xor %ebx,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 15c692: 8d 45 d4 lea -0x2c(%ebp),%eax 15c695: 8d 73 18 lea 0x18(%ebx),%esi 15c698: b9 05 00 00 00 mov $0x5,%ecx 15c69d: 89 c7 mov %eax,%edi 15c69f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 15c6a1: 8b 55 e0 mov -0x20(%ebp),%edx 15c6a4: 8b 52 10 mov 0x10(%edx),%edx 15c6a7: 85 d2 test %edx,%edx 15c6a9: 74 4d je 15c6f8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 15c6ab: 83 ec 0c sub $0xc,%esp 15c6ae: 50 push %eax 15c6af: ff d2 call *%edx 15c6b1: 83 c4 10 add $0x10,%esp 15c6b4: 48 dec %eax 15c6b5: 75 2d jne 15c6e4 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 15c6b7: 8b 43 3c mov 0x3c(%ebx),%eax 15c6ba: 8b 40 08 mov 0x8(%eax),%eax 15c6bd: 85 c0 test %eax,%eax 15c6bf: 74 37 je 15c6f8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 15c6c1: 52 push %edx 15c6c2: ff 75 10 pushl 0x10(%ebp) 15c6c5: ff 75 0c pushl 0xc(%ebp) 15c6c8: 53 push %ebx 15c6c9: ff d0 call *%eax 15c6cb: 83 c4 10 add $0x10,%esp } 15c6ce: 8d 65 f4 lea -0xc(%ebp),%esp 15c6d1: 5b pop %ebx 15c6d2: 5e pop %esi 15c6d3: 5f pop %edi 15c6d4: c9 leave 15c6d5: c3 ret 15c6d6: 66 90 xchg %ax,%ax /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 15c6d8: c1 e3 06 shl $0x6,%ebx 15c6db: 03 1d 3c 2d 17 00 add 0x172d3c,%ebx 15c6e1: eb af jmp 15c692 15c6e3: 90 nop loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 15c6e4: e8 a3 a0 fe ff call 14678c <__errno> 15c6e9: c7 00 14 00 00 00 movl $0x14,(%eax) 15c6ef: b8 ff ff ff ff mov $0xffffffff,%eax 15c6f4: eb d8 jmp 15c6ce 15c6f6: 66 90 xchg %ax,%ax * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 15c6f8: e8 8f a0 fe ff call 14678c <__errno> <== NOT EXECUTED 15c6fd: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 15c703: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 15c708: eb c4 jmp 15c6ce <== NOT EXECUTED =============================================================================== 0012e46c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 12e46c: 55 push %ebp <== NOT EXECUTED 12e46d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12e46f: a1 20 d3 16 00 mov 0x16d320,%eax <== NOT EXECUTED 12e474: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED return _POSIX_types_Gid; } 12e477: c9 leave <== NOT EXECUTED 12e478: c3 ret <== NOT EXECUTED =============================================================================== 0012ea04 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 12ea04: 55 push %ebp 12ea05: 89 e5 mov %esp,%ebp 12ea07: 57 push %edi 12ea08: 56 push %esi 12ea09: 53 push %ebx 12ea0a: 83 ec 1c sub $0x1c,%esp 12ea0d: 89 c3 mov %eax,%ebx 12ea0f: 89 55 e4 mov %edx,-0x1c(%ebp) 12ea12: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 12ea14: e8 af fe ff ff call 12e8c8 if ((fp = fopen("/etc/group", "r")) == NULL) { 12ea19: 83 ec 08 sub $0x8,%esp 12ea1c: 68 c9 09 16 00 push $0x1609c9 12ea21: 68 bc cd 15 00 push $0x15cdbc 12ea26: e8 c5 86 01 00 call 1470f0 12ea2b: 89 c7 mov %eax,%edi 12ea2d: 83 c4 10 add $0x10,%esp 12ea30: 85 c0 test %eax,%eax 12ea32: 75 22 jne 12ea56 <== ALWAYS TAKEN 12ea34: e9 8b 00 00 00 jmp 12eac4 <== NOT EXECUTED 12ea39: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 12ea3c: 83 ec 08 sub $0x8,%esp 12ea3f: 53 push %ebx 12ea40: ff 36 pushl (%esi) 12ea42: e8 b5 d5 01 00 call 14bffc 12ea47: 83 c4 10 add $0x10,%esp 12ea4a: 85 c0 test %eax,%eax 12ea4c: 0f 94 c0 sete %al 12ea4f: 0f b6 c0 movzbl %al,%eax } else { match = (grp->gr_gid == gid); } if (match) { 12ea52: 85 c0 test %eax,%eax 12ea54: 75 2e jne 12ea84 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 12ea56: 83 ec 0c sub $0xc,%esp 12ea59: ff 75 0c pushl 0xc(%ebp) 12ea5c: 8b 4d 08 mov 0x8(%ebp),%ecx 12ea5f: 89 f2 mov %esi,%edx 12ea61: 89 f8 mov %edi,%eax 12ea63: e8 d4 fb ff ff call 12e63c 12ea68: 83 c4 10 add $0x10,%esp 12ea6b: 85 c0 test %eax,%eax 12ea6d: 74 31 je 12eaa0 <== NEVER TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 12ea6f: 85 db test %ebx,%ebx 12ea71: 75 c9 jne 12ea3c <== ALWAYS TAKEN match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 12ea73: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 12ea77: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 12ea7a: 0f 94 c0 sete %al <== NOT EXECUTED 12ea7d: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED } if (match) { 12ea80: 85 c0 test %eax,%eax <== NOT EXECUTED 12ea82: 74 d2 je 12ea56 <== NOT EXECUTED fclose(fp); 12ea84: 83 ec 0c sub $0xc,%esp 12ea87: 57 push %edi 12ea88: e8 4b 7e 01 00 call 1468d8 *result = grp; 12ea8d: 8b 45 10 mov 0x10(%ebp),%eax 12ea90: 89 30 mov %esi,(%eax) 12ea92: 31 c0 xor %eax,%eax return 0; 12ea94: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 12ea97: 8d 65 f4 lea -0xc(%ebp),%esp 12ea9a: 5b pop %ebx 12ea9b: 5e pop %esi 12ea9c: 5f pop %edi 12ea9d: c9 leave 12ea9e: c3 ret 12ea9f: 90 nop errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 12eaa0: e8 e7 7c 01 00 call 14678c <__errno> <== NOT EXECUTED 12eaa5: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 12eaab: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12eaae: 57 push %edi <== NOT EXECUTED 12eaaf: e8 24 7e 01 00 call 1468d8 <== NOT EXECUTED 12eab4: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 12eab9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 12eabc: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12eabf: 5b pop %ebx <== NOT EXECUTED 12eac0: 5e pop %esi <== NOT EXECUTED 12eac1: 5f pop %edi <== NOT EXECUTED 12eac2: c9 leave <== NOT EXECUTED 12eac3: c3 ret <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 12eac4: e8 c3 7c 01 00 call 14678c <__errno> <== NOT EXECUTED 12eac9: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12eacf: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 12ead2: eb c3 jmp 12ea97 <== NOT EXECUTED =============================================================================== 0012e754 : return NULL; return p; } struct group *getgrent(void) { 12e754: 55 push %ebp <== NOT EXECUTED 12e755: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12e757: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp == NULL) 12e75a: a1 24 29 17 00 mov 0x172924,%eax <== NOT EXECUTED 12e75f: 85 c0 test %eax,%eax <== NOT EXECUTED 12e761: 75 05 jne 12e768 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 12e763: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &grent; } 12e765: c9 leave <== NOT EXECUTED 12e766: c3 ret <== NOT EXECUTED 12e767: 90 nop <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 12e768: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12e76b: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12e770: b9 40 29 17 00 mov $0x172940,%ecx <== NOT EXECUTED 12e775: ba 08 2a 17 00 mov $0x172a08,%edx <== NOT EXECUTED 12e77a: e8 bd fe ff ff call 12e63c <== NOT EXECUTED 12e77f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12e782: 85 c0 test %eax,%eax <== NOT EXECUTED 12e784: 74 dd je 12e763 <== NOT EXECUTED 12e786: b8 08 2a 17 00 mov $0x172a08,%eax <== NOT EXECUTED return NULL; return &grent; } 12e78b: c9 leave <== NOT EXECUTED 12e78c: c3 ret <== NOT EXECUTED =============================================================================== 0012eb00 : } struct group *getgrgid( gid_t gid ) { 12eb00: 55 push %ebp <== NOT EXECUTED 12eb01: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12eb03: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 12eb06: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 12eb09: 50 push %eax <== NOT EXECUTED 12eb0a: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12eb0f: 68 40 29 17 00 push $0x172940 <== NOT EXECUTED 12eb14: 68 08 2a 17 00 push $0x172a08 <== NOT EXECUTED 12eb19: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 12eb1d: 50 push %eax <== NOT EXECUTED 12eb1e: e8 b1 ff ff ff call 12ead4 <== NOT EXECUTED 12eb23: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12eb26: 85 c0 test %eax,%eax <== NOT EXECUTED 12eb28: 75 06 jne 12eb30 <== NOT EXECUTED return NULL; return p; 12eb2a: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 12eb2d: c9 leave <== NOT EXECUTED 12eb2e: c3 ret <== NOT EXECUTED 12eb2f: 90 nop <== NOT EXECUTED gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 12eb30: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 12eb32: c9 leave <== NOT EXECUTED 12eb33: c3 ret <== NOT EXECUTED =============================================================================== 0012ead4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 12ead4: 55 push %ebp <== NOT EXECUTED 12ead5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12ead7: 53 push %ebx <== NOT EXECUTED 12ead8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12eadb: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12eade: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 12eae1: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 12eae5: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 12eae8: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 12eaeb: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 12eaee: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 12eaf1: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 12eaf4: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12eaf6: 5b pop %ebx <== NOT EXECUTED 12eaf7: 5b pop %ebx <== NOT EXECUTED 12eaf8: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 12eaf9: e9 06 ff ff ff jmp 12ea04 <== NOT EXECUTED =============================================================================== 0012eb60 : } struct group *getgrnam( const char *name ) { 12eb60: 55 push %ebp 12eb61: 89 e5 mov %esp,%ebp 12eb63: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 12eb66: 8d 45 f4 lea -0xc(%ebp),%eax 12eb69: 50 push %eax 12eb6a: 68 c8 00 00 00 push $0xc8 12eb6f: 68 40 29 17 00 push $0x172940 12eb74: 68 08 2a 17 00 push $0x172a08 12eb79: ff 75 08 pushl 0x8(%ebp) 12eb7c: e8 b3 ff ff ff call 12eb34 12eb81: 83 c4 20 add $0x20,%esp 12eb84: 85 c0 test %eax,%eax 12eb86: 75 08 jne 12eb90 <== NEVER TAKEN return NULL; return p; 12eb88: 8b 45 f4 mov -0xc(%ebp),%eax } 12eb8b: c9 leave 12eb8c: c3 ret 12eb8d: 8d 76 00 lea 0x0(%esi),%esi const char *name ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 12eb90: 31 c0 xor %eax,%eax return NULL; return p; } 12eb92: c9 leave <== NOT EXECUTED 12eb93: c3 ret <== NOT EXECUTED =============================================================================== 0012499c : * * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83 */ pid_t getpid( void ) { 12499c: 55 push %ebp <== NOT EXECUTED 12499d: 89 e5 mov %esp,%ebp <== NOT EXECUTED return _Objects_Local_node; } 12499f: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 1249a4: c9 leave <== NOT EXECUTED 1249a5: c3 ret <== NOT EXECUTED =============================================================================== 0012ebd0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 12ebd0: 55 push %ebp 12ebd1: 89 e5 mov %esp,%ebp 12ebd3: 57 push %edi 12ebd4: 56 push %esi 12ebd5: 53 push %ebx 12ebd6: 83 ec 1c sub $0x1c,%esp 12ebd9: 89 c3 mov %eax,%ebx 12ebdb: 89 55 e4 mov %edx,-0x1c(%ebp) 12ebde: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 12ebe0: e8 e3 fc ff ff call 12e8c8 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 12ebe5: 83 ec 08 sub $0x8,%esp 12ebe8: 68 c9 09 16 00 push $0x1609c9 12ebed: 68 b0 cd 15 00 push $0x15cdb0 12ebf2: e8 f9 84 01 00 call 1470f0 12ebf7: 89 c7 mov %eax,%edi 12ebf9: 83 c4 10 add $0x10,%esp 12ebfc: 85 c0 test %eax,%eax 12ebfe: 75 22 jne 12ec22 <== ALWAYS TAKEN 12ec00: e9 8b 00 00 00 jmp 12ec90 <== NOT EXECUTED 12ec05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 12ec08: 83 ec 08 sub $0x8,%esp 12ec0b: 53 push %ebx 12ec0c: ff 36 pushl (%esi) 12ec0e: e8 e9 d3 01 00 call 14bffc 12ec13: 83 c4 10 add $0x10,%esp 12ec16: 85 c0 test %eax,%eax 12ec18: 0f 94 c0 sete %al 12ec1b: 0f b6 c0 movzbl %al,%eax } else { match = (pwd->pw_uid == uid); } if (match) { 12ec1e: 85 c0 test %eax,%eax 12ec20: 75 2e jne 12ec50 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 12ec22: 83 ec 0c sub $0xc,%esp 12ec25: ff 75 0c pushl 0xc(%ebp) 12ec28: 8b 4d 08 mov 0x8(%ebp),%ecx 12ec2b: 89 f2 mov %esi,%edx 12ec2d: 89 f8 mov %edi,%eax 12ec2f: e8 5c fb ff ff call 12e790 12ec34: 83 c4 10 add $0x10,%esp 12ec37: 85 c0 test %eax,%eax 12ec39: 74 31 je 12ec6c <== NEVER TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 12ec3b: 85 db test %ebx,%ebx 12ec3d: 75 c9 jne 12ec08 <== ALWAYS TAKEN match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 12ec3f: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 12ec43: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 12ec46: 0f 94 c0 sete %al <== NOT EXECUTED 12ec49: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED } if (match) { 12ec4c: 85 c0 test %eax,%eax <== NOT EXECUTED 12ec4e: 74 d2 je 12ec22 <== NOT EXECUTED fclose(fp); 12ec50: 83 ec 0c sub $0xc,%esp 12ec53: 57 push %edi 12ec54: e8 7f 7c 01 00 call 1468d8 *result = pwd; 12ec59: 8b 45 10 mov 0x10(%ebp),%eax 12ec5c: 89 30 mov %esi,(%eax) 12ec5e: 31 c0 xor %eax,%eax return 0; 12ec60: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 12ec63: 8d 65 f4 lea -0xc(%ebp),%esp 12ec66: 5b pop %ebx 12ec67: 5e pop %esi 12ec68: 5f pop %edi 12ec69: c9 leave 12ec6a: c3 ret 12ec6b: 90 nop errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 12ec6c: e8 1b 7b 01 00 call 14678c <__errno> <== NOT EXECUTED 12ec71: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 12ec77: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ec7a: 57 push %edi <== NOT EXECUTED 12ec7b: e8 58 7c 01 00 call 1468d8 <== NOT EXECUTED 12ec80: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 12ec85: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 12ec88: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12ec8b: 5b pop %ebx <== NOT EXECUTED 12ec8c: 5e pop %esi <== NOT EXECUTED 12ec8d: 5f pop %edi <== NOT EXECUTED 12ec8e: c9 leave <== NOT EXECUTED 12ec8f: c3 ret <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 12ec90: e8 f7 7a 01 00 call 14678c <__errno> <== NOT EXECUTED 12ec95: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12ec9b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 12ec9e: eb c3 jmp 12ec63 <== NOT EXECUTED =============================================================================== 0012e88c : return NULL; return p; } struct passwd *getpwent(void) { 12e88c: 55 push %ebp <== NOT EXECUTED 12e88d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12e88f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp == NULL) 12e892: a1 24 28 17 00 mov 0x172824,%eax <== NOT EXECUTED 12e897: 85 c0 test %eax,%eax <== NOT EXECUTED 12e899: 75 05 jne 12e8a0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 12e89b: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &pwent; } 12e89d: c9 leave <== NOT EXECUTED 12e89e: c3 ret <== NOT EXECUTED 12e89f: 90 nop <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 12e8a0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12e8a3: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12e8a8: b9 40 28 17 00 mov $0x172840,%ecx <== NOT EXECUTED 12e8ad: ba 08 29 17 00 mov $0x172908,%edx <== NOT EXECUTED 12e8b2: e8 d9 fe ff ff call 12e790 <== NOT EXECUTED 12e8b7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12e8ba: 85 c0 test %eax,%eax <== NOT EXECUTED 12e8bc: 74 dd je 12e89b <== NOT EXECUTED 12e8be: b8 08 29 17 00 mov $0x172908,%eax <== NOT EXECUTED return NULL; return &pwent; } 12e8c3: c9 leave <== NOT EXECUTED 12e8c4: c3 ret <== NOT EXECUTED =============================================================================== 0012ed2c : } struct passwd *getpwnam( const char *name ) { 12ed2c: 55 push %ebp 12ed2d: 89 e5 mov %esp,%ebp 12ed2f: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 12ed32: 8d 45 f4 lea -0xc(%ebp),%eax 12ed35: 50 push %eax 12ed36: 68 c8 00 00 00 push $0xc8 12ed3b: 68 40 28 17 00 push $0x172840 12ed40: 68 08 29 17 00 push $0x172908 12ed45: ff 75 08 pushl 0x8(%ebp) 12ed48: e8 b3 ff ff ff call 12ed00 12ed4d: 83 c4 20 add $0x20,%esp 12ed50: 85 c0 test %eax,%eax 12ed52: 75 08 jne 12ed5c <== NEVER TAKEN return NULL; return p; 12ed54: 8b 45 f4 mov -0xc(%ebp),%eax } 12ed57: c9 leave 12ed58: c3 ret 12ed59: 8d 76 00 lea 0x0(%esi),%esi const char *name ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 12ed5c: 31 c0 xor %eax,%eax return NULL; return p; } 12ed5e: c9 leave <== NOT EXECUTED 12ed5f: c3 ret <== NOT EXECUTED =============================================================================== 0012eccc : } struct passwd *getpwuid( uid_t uid ) { 12eccc: 55 push %ebp <== NOT EXECUTED 12eccd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12eccf: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 12ecd2: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 12ecd5: 50 push %eax <== NOT EXECUTED 12ecd6: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12ecdb: 68 40 28 17 00 push $0x172840 <== NOT EXECUTED 12ece0: 68 08 29 17 00 push $0x172908 <== NOT EXECUTED 12ece5: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 12ece9: 50 push %eax <== NOT EXECUTED 12ecea: e8 b1 ff ff ff call 12eca0 <== NOT EXECUTED 12ecef: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12ecf2: 85 c0 test %eax,%eax <== NOT EXECUTED 12ecf4: 75 06 jne 12ecfc <== NOT EXECUTED return NULL; return p; 12ecf6: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 12ecf9: c9 leave <== NOT EXECUTED 12ecfa: c3 ret <== NOT EXECUTED 12ecfb: 90 nop <== NOT EXECUTED uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 12ecfc: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 12ecfe: c9 leave <== NOT EXECUTED 12ecff: c3 ret <== NOT EXECUTED =============================================================================== 0012eca0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 12eca0: 55 push %ebp <== NOT EXECUTED 12eca1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12eca3: 53 push %ebx <== NOT EXECUTED 12eca4: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12eca7: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12ecaa: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 12ecad: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 12ecb1: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 12ecb4: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 12ecb7: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 12ecba: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 12ecbd: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 12ecc0: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12ecc2: 5b pop %ebx <== NOT EXECUTED 12ecc3: 5b pop %ebx <== NOT EXECUTED 12ecc4: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 12ecc5: e9 06 ff ff ff jmp 12ebd0 <== NOT EXECUTED =============================================================================== 00108660 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 108660: 55 push %ebp 108661: 89 e5 mov %esp,%ebp 108663: 56 push %esi 108664: 53 push %ebx 108665: 83 ec 20 sub $0x20,%esp 108668: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 10866b: 85 db test %ebx,%ebx 10866d: 74 42 je 1086b1 <== NEVER TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10866f: 9c pushf 108670: fa cli 108671: 5e pop %esi _TOD_Get( &now ); 108672: 83 ec 0c sub $0xc,%esp 108675: 8d 45 f0 lea -0x10(%ebp),%eax 108678: 50 push %eax 108679: e8 4a 43 00 00 call 10c9c8 <_TOD_Get> _ISR_Enable(level); 10867e: 56 push %esi 10867f: 9d popf useconds = (suseconds_t)now.tv_nsec; 108680: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 108683: 8b 45 f0 mov -0x10(%ebp),%eax 108686: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 108688: be d3 4d 62 10 mov $0x10624dd3,%esi 10868d: 89 c8 mov %ecx,%eax 10868f: f7 ee imul %esi 108691: 89 45 e0 mov %eax,-0x20(%ebp) 108694: 89 55 e4 mov %edx,-0x1c(%ebp) 108697: 8b 75 e4 mov -0x1c(%ebp),%esi 10869a: c1 fe 06 sar $0x6,%esi 10869d: 89 c8 mov %ecx,%eax 10869f: 99 cltd 1086a0: 29 d6 sub %edx,%esi 1086a2: 89 73 04 mov %esi,0x4(%ebx) 1086a5: 31 c0 xor %eax,%eax * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 1086a7: 83 c4 10 add $0x10,%esp } 1086aa: 8d 65 f8 lea -0x8(%ebp),%esp 1086ad: 5b pop %ebx 1086ae: 5e pop %esi 1086af: c9 leave 1086b0: c3 ret void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 1086b1: e8 8a b7 00 00 call 113e40 <__errno> <== NOT EXECUTED 1086b6: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 1086bc: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 1086c1: eb e7 jmp 1086aa <== NOT EXECUTED =============================================================================== 0010e96c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 10e96c: 55 push %ebp <== NOT EXECUTED 10e96d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e96f: a1 20 d3 16 00 mov 0x16d320,%eax <== NOT EXECUTED 10e974: 66 8b 40 32 mov 0x32(%eax),%ax <== NOT EXECUTED return _POSIX_types_Uid; } 10e978: c9 leave <== NOT EXECUTED 10e979: c3 ret <== NOT EXECUTED =============================================================================== 0011328c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 11328c: 55 push %ebp 11328d: 89 e5 mov %esp,%ebp 11328f: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 113292: 8b 50 38 mov 0x38(%eax),%edx 113295: 83 7a 4c 01 cmpl $0x1,0x4c(%edx) 113299: 74 09 je 1132a4 <== ALWAYS TAKEN 11329b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 1132a0: c9 leave <== NOT EXECUTED 1132a1: c3 ret <== NOT EXECUTED 1132a2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 1132a4: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 1132ab: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 1132b2: 31 c0 xor %eax,%eax return 0; } 1132b4: c9 leave 1132b5: c3 ret =============================================================================== 001134c4 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 1134c4: 55 push %ebp 1134c5: 89 e5 mov %esp,%ebp 1134c7: 57 push %edi 1134c8: 56 push %esi 1134c9: 53 push %ebx 1134ca: 81 ec 4c 01 00 00 sub $0x14c,%esp int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; 1134d0: 8b 55 08 mov 0x8(%ebp),%edx 1134d3: 8b 42 38 mov 0x38(%edx),%eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1134d6: 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; 1134d9: 83 c0 54 add $0x54,%eax 1134dc: 89 85 cc fe ff ff mov %eax,-0x134(%ebp) the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 1134e2: 39 c3 cmp %eax,%ebx 1134e4: 0f 84 2a 01 00 00 je 113614 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 1134ea: 8b 45 08 mov 0x8(%ebp),%eax 1134ed: 8b 40 0c mov 0xc(%eax),%eax 1134f0: 89 85 d0 fe ff ff mov %eax,-0x130(%ebp) /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 1134f6: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx 1134fb: 8b 45 10 mov 0x10(%ebp),%eax 1134fe: f7 e2 mul %edx 113500: c1 ea 08 shr $0x8,%edx 113503: 89 d0 mov %edx,%eax 113505: c1 e0 04 shl $0x4,%eax 113508: c1 e2 08 shl $0x8,%edx 11350b: 8d 14 10 lea (%eax,%edx,1),%edx 11350e: 03 95 d0 fe ff ff add -0x130(%ebp),%edx 113514: 89 95 d4 fe ff ff mov %edx,-0x12c(%ebp) /* The directory was not empty so try to move to the desired entry in chain*/ for ( 11351a: 85 d2 test %edx,%edx 11351c: 0f 8e f2 00 00 00 jle 113614 <== NEVER TAKEN 113522: 31 d2 xor %edx,%edx 113524: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 11352b: 00 00 00 tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 11352e: 8d 85 d8 fe ff ff lea -0x128(%ebp),%eax 113534: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp) 11353a: eb 20 jmp 11355c ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 11353c: 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( 11353e: 81 c2 10 01 00 00 add $0x110,%edx /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 113544: 3b 95 d4 fe ff ff cmp -0x12c(%ebp),%edx 11354a: 0f 8d b4 00 00 00 jge 113604 <== NEVER TAKEN current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 113550: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 113556: 0f 84 a8 00 00 00 je 113604 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 11355c: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp) 113562: 7f d8 jg 11353c /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 113564: 89 95 dc fe ff ff mov %edx,-0x124(%ebp) 11356a: 89 d0 mov %edx,%eax 11356c: c1 f8 1f sar $0x1f,%eax 11356f: 89 85 e0 fe ff ff mov %eax,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 113575: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp) 11357c: 10 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 11357e: 8b 43 38 mov 0x38(%ebx),%eax 113581: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 113587: 8d 73 0c lea 0xc(%ebx),%esi 11358a: 31 c0 xor %eax,%eax 11358c: b9 ff ff ff ff mov $0xffffffff,%ecx 113591: 89 f7 mov %esi,%edi 113593: f2 ae repnz scas %es:(%edi),%al 113595: f7 d1 not %ecx 113597: 49 dec %ecx 113598: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 11359f: 83 ec 08 sub $0x8,%esp 1135a2: 56 push %esi 1135a3: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax 1135a9: 50 push %eax 1135aa: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp) 1135b0: e8 ab 13 00 00 call 114960 memcpy( 1135b5: 8b 45 0c mov 0xc(%ebp),%eax 1135b8: 03 85 c8 fe ff ff add -0x138(%ebp),%eax 1135be: b9 44 00 00 00 mov $0x44,%ecx 1135c3: 89 c7 mov %eax,%edi 1135c5: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 1135cb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 1135cd: 8b 45 08 mov 0x8(%ebp),%eax 1135d0: 81 40 0c 10 01 00 00 addl $0x110,0xc(%eax) 1135d7: 83 50 10 00 adcl $0x0,0x10(%eax) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 1135db: 81 85 c8 fe ff ff 10 addl $0x110,-0x138(%ebp) 1135e2: 01 00 00 1135e5: 83 c4 10 add $0x10,%esp 1135e8: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx } the_node = the_node->next; 1135ee: 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( 1135f0: 81 c2 10 01 00 00 add $0x110,%edx /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 1135f6: 3b 95 d4 fe ff ff cmp -0x12c(%ebp),%edx 1135fc: 0f 8c 4e ff ff ff jl 113550 <== NEVER TAKEN 113602: 66 90 xchg %ax,%ax the_node = the_node->next; } /* Success */ return bytes_transferred; } 113604: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 11360a: 8d 65 f4 lea -0xc(%ebp),%esp 11360d: 5b pop %ebx 11360e: 5e pop %esi 11360f: 5f pop %edi 113610: c9 leave 113611: c3 ret 113612: 66 90 xchg %ax,%ax /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 113614: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 11361b: 00 00 00 the_node = the_node->next; } /* Success */ return bytes_transferred; } 11361e: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 113624: 8d 65 f4 lea -0xc(%ebp),%esp 113627: 5b pop %ebx 113628: 5e pop %esi 113629: 5f pop %edi 11362a: c9 leave 11362b: c3 ret =============================================================================== 001133e8 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 1133e8: 55 push %ebp 1133e9: 89 e5 mov %esp,%ebp 1133eb: 56 push %esi 1133ec: 53 push %ebx 1133ed: 83 ec 10 sub $0x10,%esp 1133f0: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 1133f3: 8b 1e mov (%esi),%ebx 1133f5: 8d 43 54 lea 0x54(%ebx),%eax 1133f8: 39 43 50 cmp %eax,0x50(%ebx) 1133fb: 0f 85 8f 00 00 00 jne 113490 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 113401: 8b 46 10 mov 0x10(%esi),%eax 113404: 3b 58 1c cmp 0x1c(%eax),%ebx 113407: 0f 84 97 00 00 00 je 1134a4 <== NEVER TAKEN /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 11340d: 8b 43 5c mov 0x5c(%ebx),%eax 113410: 85 c0 test %eax,%eax 113412: 0f 85 8c 00 00 00 jne 1134a4 <== NEVER TAKEN /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 113418: 8b 4b 08 mov 0x8(%ebx),%ecx 11341b: 85 c9 test %ecx,%ecx 11341d: 74 13 je 113432 11341f: 83 ec 0c sub $0xc,%esp 113422: 53 push %ebx 113423: e8 84 91 ff ff call 10c5ac <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 113428: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 11342f: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 113432: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 113436: 83 ec 08 sub $0x8,%esp 113439: 6a 00 push $0x0 11343b: 8d 45 f0 lea -0x10(%ebp),%eax 11343e: 50 push %eax 11343f: e8 1c 52 ff ff call 108660 113444: 8b 45 f0 mov -0x10(%ebp),%eax 113447: 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) ) { 11344a: 89 1c 24 mov %ebx,(%esp) 11344d: e8 f2 d7 ff ff call 110c44 113452: 83 c4 10 add $0x10,%esp 113455: 85 c0 test %eax,%eax 113457: 75 2b jne 113484 113459: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 11345e: 75 24 jne 113484 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 113460: a1 24 50 12 00 mov 0x125024,%eax 113465: 8b 50 04 mov 0x4(%eax),%edx 113468: 3b 16 cmp (%esi),%edx 11346a: 74 4c je 1134b8 <== NEVER TAKEN /* * Free memory associated with a memory file. */ free( the_jnode ); 11346c: 83 ec 0c sub $0xc,%esp 11346f: 53 push %ebx 113470: e8 6f 51 ff ff call 1085e4 113475: 31 c0 xor %eax,%eax 113477: 83 c4 10 add $0x10,%esp } return 0; } 11347a: 8d 65 f8 lea -0x8(%ebp),%esp 11347d: 5b pop %ebx 11347e: 5e pop %esi 11347f: c9 leave 113480: c3 ret 113481: 8d 76 00 lea 0x0(%esi),%esi /* * Free memory associated with a memory file. */ free( the_jnode ); 113484: 31 c0 xor %eax,%eax } return 0; } 113486: 8d 65 f8 lea -0x8(%ebp),%esp 113489: 5b pop %ebx 11348a: 5e pop %esi 11348b: c9 leave 11348c: c3 ret 11348d: 8d 76 00 lea 0x0(%esi),%esi /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 113490: e8 ab 09 00 00 call 113e40 <__errno> 113495: c7 00 5a 00 00 00 movl $0x5a,(%eax) 11349b: b8 ff ff ff ff mov $0xffffffff,%eax 1134a0: eb e4 jmp 113486 1134a2: 66 90 xchg %ax,%ax /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 1134a4: e8 97 09 00 00 call 113e40 <__errno> 1134a9: c7 00 10 00 00 00 movl $0x10,(%eax) 1134af: b8 ff ff ff ff mov $0xffffffff,%eax 1134b4: eb d0 jmp 113486 1134b6: 66 90 xchg %ax,%ax /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 1134b8: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 1134bf: eb ab jmp 11346c <== NOT EXECUTED =============================================================================== 0012e8c8 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 12e8c8: 55 push %ebp 12e8c9: 89 e5 mov %esp,%ebp 12e8cb: 53 push %ebx 12e8cc: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 12e8cf: 80 3d 20 28 17 00 00 cmpb $0x0,0x172820 12e8d6: 74 08 je 12e8e0 fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 12e8d8: 8b 5d fc mov -0x4(%ebp),%ebx 12e8db: c9 leave 12e8dc: c3 ret 12e8dd: 8d 76 00 lea 0x0(%esi),%esi FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 12e8e0: c6 05 20 28 17 00 01 movb $0x1,0x172820 mkdir("/etc", 0777); 12e8e7: 83 ec 08 sub $0x8,%esp 12e8ea: 68 ff 01 00 00 push $0x1ff 12e8ef: 68 9a cd 15 00 push $0x15cd9a 12e8f4: e8 77 06 fe ff call 10ef70 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 12e8f9: 59 pop %ecx 12e8fa: 5b pop %ebx 12e8fb: 68 c9 09 16 00 push $0x1609c9 12e900: 68 b0 cd 15 00 push $0x15cdb0 12e905: e8 e6 87 01 00 call 1470f0 12e90a: 83 c4 10 add $0x10,%esp 12e90d: 85 c0 test %eax,%eax 12e90f: 74 77 je 12e988 <== ALWAYS TAKEN fclose(fp); 12e911: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12e914: 50 push %eax <== NOT EXECUTED 12e915: e8 be 7f 01 00 call 1468d8 <== NOT EXECUTED 12e91a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 12e91d: 83 ec 08 sub $0x8,%esp 12e920: 68 c9 09 16 00 push $0x1609c9 12e925: 68 bc cd 15 00 push $0x15cdbc 12e92a: e8 c1 87 01 00 call 1470f0 12e92f: 83 c4 10 add $0x10,%esp 12e932: 85 c0 test %eax,%eax 12e934: 74 12 je 12e948 <== ALWAYS TAKEN fclose(fp); 12e936: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12e939: 50 push %eax <== NOT EXECUTED 12e93a: e8 99 7f 01 00 call 1468d8 <== NOT EXECUTED 12e93f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 12e942: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 12e945: c9 leave <== NOT EXECUTED 12e946: c3 ret <== NOT EXECUTED 12e947: 90 nop <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 12e948: 83 ec 08 sub $0x8,%esp 12e94b: 68 50 05 16 00 push $0x160550 12e950: 68 bc cd 15 00 push $0x15cdbc 12e955: e8 96 87 01 00 call 1470f0 12e95a: 89 c3 mov %eax,%ebx 12e95c: 83 c4 10 add $0x10,%esp 12e95f: 85 c0 test %eax,%eax 12e961: 0f 84 71 ff ff ff je 12e8d8 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 12e967: 50 push %eax 12e968: 6a 2a push $0x2a 12e96a: 6a 01 push $0x1 12e96c: 68 ec 47 16 00 push $0x1647ec 12e971: e8 f6 99 01 00 call 14836c "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 12e976: 89 1c 24 mov %ebx,(%esp) 12e979: e8 5a 7f 01 00 call 1468d8 12e97e: 83 c4 10 add $0x10,%esp 12e981: e9 52 ff ff ff jmp 12e8d8 12e986: 66 90 xchg %ax,%ax * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 12e988: 83 ec 08 sub $0x8,%esp 12e98b: 68 50 05 16 00 push $0x160550 12e990: 68 b0 cd 15 00 push $0x15cdb0 12e995: e8 56 87 01 00 call 1470f0 12e99a: 89 c3 mov %eax,%ebx 12e99c: 83 c4 10 add $0x10,%esp 12e99f: 85 c0 test %eax,%eax 12e9a1: 0f 84 76 ff ff ff je 12e91d <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 12e9a7: 50 push %eax 12e9a8: 6a 66 push $0x66 12e9aa: 6a 01 push $0x1 12e9ac: 68 84 47 16 00 push $0x164784 12e9b1: e8 b6 99 01 00 call 14836c "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 12e9b6: 89 1c 24 mov %ebx,(%esp) 12e9b9: e8 1a 7f 01 00 call 1468d8 12e9be: 83 c4 10 add $0x10,%esp 12e9c1: e9 57 ff ff ff jmp 12e91d =============================================================================== 0010b868 : int ioctl( int fd, ioctl_command_t command, ... ) { 10b868: 55 push %ebp 10b869: 89 e5 mov %esp,%ebp 10b86b: 83 ec 08 sub $0x8,%esp 10b86e: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 10b871: 3b 05 4c 71 12 00 cmp 0x12714c,%eax 10b877: 73 2f jae 10b8a8 iop = rtems_libio_iop( fd ); 10b879: c1 e0 06 shl $0x6,%eax 10b87c: 03 05 00 b3 12 00 add 0x12b300,%eax rtems_libio_check_is_open(iop); 10b882: f6 40 15 01 testb $0x1,0x15(%eax) 10b886: 74 20 je 10b8a8 <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 10b888: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Now process the ioctl(). */ if ( !iop->handlers ) 10b88b: 8b 50 3c mov 0x3c(%eax),%edx 10b88e: 85 d2 test %edx,%edx 10b890: 74 16 je 10b8a8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 10b892: 8b 52 10 mov 0x10(%edx),%edx 10b895: 85 d2 test %edx,%edx 10b897: 74 21 je 10b8ba <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 10b899: 83 ec 04 sub $0x4,%esp 10b89c: 51 push %ecx 10b89d: ff 75 0c pushl 0xc(%ebp) 10b8a0: 50 push %eax 10b8a1: ff d2 call *%edx return rc; 10b8a3: 83 c4 10 add $0x10,%esp } 10b8a6: c9 leave 10b8a7: c3 ret /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 10b8a8: e8 a7 c3 00 00 call 117c54 <__errno> 10b8ad: c7 00 09 00 00 00 movl $0x9,(%eax) 10b8b3: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 10b8b8: c9 leave 10b8b9: c3 ret if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10b8ba: e8 95 c3 00 00 call 117c54 <__errno> <== NOT EXECUTED 10b8bf: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10b8c5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 10b8ca: c9 leave <== NOT EXECUTED 10b8cb: c3 ret <== NOT EXECUTED =============================================================================== 0010a0c8 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 10a0c8: 55 push %ebp <== NOT EXECUTED 10a0c9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a0cb: 56 push %esi <== NOT EXECUTED 10a0cc: 53 push %ebx <== NOT EXECUTED 10a0cd: 89 d6 mov %edx,%esi <== NOT EXECUTED 10a0cf: 88 c3 mov %al,%bl <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 10a0d1: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED 10a0d4: a8 20 test $0x20,%al <== NOT EXECUTED 10a0d6: 74 03 je 10a0db <== NOT EXECUTED c &= 0x7f; 10a0d8: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 10a0db: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 10a0de: 74 18 je 10a0f8 <== NOT EXECUTED c = tolower (c); 10a0e0: 0f b6 db movzbl %bl,%ebx <== NOT EXECUTED 10a0e3: 8b 15 c4 50 12 00 mov 0x1250c4,%edx <== NOT EXECUTED 10a0e9: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx <== NOT EXECUTED 10a0ee: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 10a0f1: 4a dec %edx <== NOT EXECUTED 10a0f2: 0f 84 98 00 00 00 je 10a190 <== NOT EXECUTED if (c == '\r') { 10a0f8: 80 fb 0d cmp $0xd,%bl <== NOT EXECUTED 10a0fb: 74 33 je 10a130 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 10a0fd: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED 10a100: 0f 84 82 00 00 00 je 10a188 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 10a106: 84 db test %bl,%bl <== NOT EXECUTED 10a108: 75 3a jne 10a144 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 10a10a: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a10d: 8b 15 14 50 12 00 mov 0x125014,%edx <== NOT EXECUTED 10a113: 4a dec %edx <== NOT EXECUTED 10a114: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10a116: 7d 1c jge 10a134 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 10a118: f6 46 3c 08 testb $0x8,0x3c(%esi) <== NOT EXECUTED 10a11c: 75 7a jne 10a198 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 10a11e: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 10a121: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 10a124: 40 inc %eax <== NOT EXECUTED 10a125: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 10a128: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 10a12a: 5b pop %ebx <== NOT EXECUTED 10a12b: 5e pop %esi <== NOT EXECUTED 10a12c: c9 leave <== NOT EXECUTED 10a12d: c3 ret <== NOT EXECUTED 10a12e: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 10a130: 84 c0 test %al,%al <== NOT EXECUTED 10a132: 79 08 jns 10a13c <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 10a134: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 10a136: 5b pop %ebx <== NOT EXECUTED 10a137: 5e pop %esi <== NOT EXECUTED 10a138: c9 leave <== NOT EXECUTED 10a139: c3 ret <== NOT EXECUTED 10a13a: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 10a13c: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 10a13f: 74 03 je 10a144 <== NOT EXECUTED 10a141: b3 0a mov $0xa,%bl <== NOT EXECUTED 10a143: 90 nop <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 10a144: 8b 46 3c mov 0x3c(%esi),%eax <== NOT EXECUTED 10a147: a8 02 test $0x2,%al <== NOT EXECUTED 10a149: 74 bf je 10a10a <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 10a14b: 38 5e 43 cmp %bl,0x43(%esi) <== NOT EXECUTED 10a14e: 0f 84 a0 00 00 00 je 10a1f4 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 10a154: 38 5e 44 cmp %bl,0x44(%esi) <== NOT EXECUTED 10a157: 74 5f je 10a1b8 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 10a159: 38 5e 45 cmp %bl,0x45(%esi) <== NOT EXECUTED 10a15c: 74 20 je 10a17e <== NOT EXECUTED return 1; } else if (c == '\n') { 10a15e: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED 10a161: 74 69 je 10a1cc <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 10a163: 38 5e 4c cmp %bl,0x4c(%esi) <== NOT EXECUTED 10a166: 74 05 je 10a16d <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 10a168: 38 5e 51 cmp %bl,0x51(%esi) <== NOT EXECUTED 10a16b: 75 9d jne 10a10a <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 10a16d: a8 08 test $0x8,%al <== NOT EXECUTED 10a16f: 75 3b jne 10a1ac <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 10a171: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a174: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 10a177: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 10a17a: 40 inc %eax <== NOT EXECUTED 10a17b: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 10a17e: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 10a183: eb a5 jmp 10a12a <== NOT EXECUTED 10a185: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 10a188: a8 40 test $0x40,%al <== NOT EXECUTED 10a18a: 74 b8 je 10a144 <== NOT EXECUTED 10a18c: b3 0d mov $0xd,%bl <== NOT EXECUTED 10a18e: eb b4 jmp 10a144 <== NOT EXECUTED iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 10a190: 83 c3 20 add $0x20,%ebx <== NOT EXECUTED 10a193: e9 60 ff ff ff jmp 10a0f8 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 10a198: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 10a19b: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a19d: e8 f6 fc ff ff call 109e98 <== NOT EXECUTED 10a1a2: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a1a5: e9 74 ff ff ff jmp 10a11e <== NOT EXECUTED 10a1aa: 66 90 xchg %ax,%ax <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 10a1ac: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 10a1af: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a1b1: e8 e2 fc ff ff call 109e98 <== NOT EXECUTED 10a1b6: eb b9 jmp 10a171 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 10a1b8: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 10a1bd: 89 f0 mov %esi,%eax <== NOT EXECUTED 10a1bf: e8 38 fd ff ff call 109efc <== NOT EXECUTED 10a1c4: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10a1c6: e9 5f ff ff ff jmp 10a12a <== NOT EXECUTED 10a1cb: 90 nop <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 10a1cc: a8 48 test $0x48,%al <== NOT EXECUTED 10a1ce: 74 0c je 10a1dc <== NOT EXECUTED echo (c, tty); 10a1d0: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a1d2: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 10a1d7: e8 bc fc ff ff call 109e98 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 10a1dc: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a1df: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 10a1e2: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED 10a1e6: 40 inc %eax <== NOT EXECUTED 10a1e7: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 10a1ea: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 10a1ef: e9 36 ff ff ff jmp 10a12a <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 10a1f4: 31 d2 xor %edx,%edx <== NOT EXECUTED 10a1f6: 89 f0 mov %esi,%eax <== NOT EXECUTED 10a1f8: e8 ff fc ff ff call 109efc <== NOT EXECUTED 10a1fd: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10a1ff: e9 26 ff ff ff jmp 10a12a <== NOT EXECUTED =============================================================================== 001249c8 : * These are directly supported (and completely correct) in the posix api. */ #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { 1249c8: 55 push %ebp <== NOT EXECUTED 1249c9: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 1249cb: 31 c0 xor %eax,%eax <== NOT EXECUTED 1249cd: c9 leave <== NOT EXECUTED 1249ce: c3 ret <== NOT EXECUTED =============================================================================== 0011f58c : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 11f58c: 55 push %ebp 11f58d: 89 e5 mov %esp,%ebp 11f58f: 53 push %ebx 11f590: 83 ec 04 sub $0x4,%esp /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 11f593: 83 3d 20 75 12 00 03 cmpl $0x3,0x127520 11f59a: 74 08 je 11f5a4 */ fclose (stdin); fclose (stdout); fclose (stderr); } 11f59c: 8b 5d fc mov -0x4(%ebp),%ebx 11f59f: c9 leave 11f5a0: c3 ret 11f5a1: 8d 76 00 lea 0x0(%esi),%esi /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 11f5a4: 8b 1d 00 25 12 00 mov 0x122500,%ebx 11f5aa: 39 1d e0 50 12 00 cmp %ebx,0x1250e0 11f5b0: 74 12 je 11f5c4 _wrapup_reent(_global_impure_ptr); 11f5b2: 83 ec 0c sub $0xc,%esp 11f5b5: 53 push %ebx 11f5b6: e8 f5 04 00 00 call 11fab0 <_wrapup_reent> /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = _global_impure_ptr; 11f5bb: 89 1d e0 50 12 00 mov %ebx,0x1250e0 11f5c1: 83 c4 10 add $0x10,%esp * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 11f5c4: 83 ec 0c sub $0xc,%esp 11f5c7: ff 73 04 pushl 0x4(%ebx) 11f5ca: e8 bd 49 ff ff call 113f8c fclose (stdout); 11f5cf: 5a pop %edx 11f5d0: a1 e0 50 12 00 mov 0x1250e0,%eax 11f5d5: ff 70 08 pushl 0x8(%eax) 11f5d8: e8 af 49 ff ff call 113f8c fclose (stderr); 11f5dd: 58 pop %eax 11f5de: a1 e0 50 12 00 mov 0x1250e0,%eax 11f5e3: ff 70 0c pushl 0xc(%eax) 11f5e6: e8 a1 49 ff ff call 113f8c 11f5eb: 83 c4 10 add $0x10,%esp } 11f5ee: 8b 5d fc mov -0x4(%ebp),%ebx 11f5f1: c9 leave 11f5f2: c3 ret =============================================================================== 0012ed60 : int link( const char *existing, const char *new ) { 12ed60: 55 push %ebp 12ed61: 89 e5 mov %esp,%ebp 12ed63: 57 push %edi 12ed64: 56 push %esi 12ed65: 53 push %ebx 12ed66: 83 ec 48 sub $0x48,%esp 12ed69: 8b 55 08 mov 0x8(%ebp),%edx 12ed6c: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 12ed6f: 31 c0 xor %eax,%eax 12ed71: b9 ff ff ff ff mov $0xffffffff,%ecx 12ed76: 89 d7 mov %edx,%edi 12ed78: f2 ae repnz scas %es:(%edi),%al 12ed7a: f7 d1 not %ecx 12ed7c: 49 dec %ecx 12ed7d: 6a 01 push $0x1 12ed7f: 8d 75 cc lea -0x34(%ebp),%esi 12ed82: 56 push %esi 12ed83: 6a 00 push $0x0 12ed85: 51 push %ecx 12ed86: 52 push %edx 12ed87: e8 6c fa fd ff call 10e7f8 0, &existing_loc, true ); if ( result != 0 ) 12ed8c: 83 c4 20 add $0x20,%esp 12ed8f: 85 c0 test %eax,%eax 12ed91: 74 11 je 12eda4 rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 12ed93: bb ff ff ff ff mov $0xffffffff,%ebx rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 12ed98: 89 d8 mov %ebx,%eax 12ed9a: 8d 65 f4 lea -0xc(%ebp),%esp 12ed9d: 5b pop %ebx 12ed9e: 5e pop %esi 12ed9f: 5f pop %edi 12eda0: c9 leave 12eda1: c3 ret 12eda2: 66 90 xchg %ax,%ax /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 12eda4: 57 push %edi 12eda5: 8d 7d b8 lea -0x48(%ebp),%edi 12eda8: 57 push %edi 12eda9: 8d 45 e4 lea -0x1c(%ebp),%eax 12edac: 50 push %eax 12edad: 53 push %ebx 12edae: e8 b5 11 fe ff call 10ff68 if ( !parent_loc.ops->evalformake_h ) { 12edb3: 8b 45 c4 mov -0x3c(%ebp),%eax 12edb6: 8b 40 04 mov 0x4(%eax),%eax 12edb9: 83 c4 10 add $0x10,%esp 12edbc: 85 c0 test %eax,%eax 12edbe: 0f 84 e8 00 00 00 je 12eeac <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 12edc4: 51 push %ecx 12edc5: 8d 55 e0 lea -0x20(%ebp),%edx 12edc8: 52 push %edx 12edc9: 57 push %edi 12edca: 03 5d e4 add -0x1c(%ebp),%ebx 12edcd: 53 push %ebx 12edce: ff d0 call *%eax 12edd0: 89 c3 mov %eax,%ebx if ( result != 0 ) { 12edd2: 83 c4 10 add $0x10,%esp 12edd5: 85 c0 test %eax,%eax 12edd7: 0f 85 a7 00 00 00 jne 12ee84 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 12eddd: 8b 45 c8 mov -0x38(%ebp),%eax 12ede0: 3b 45 dc cmp -0x24(%ebp),%eax 12ede3: 75 5b jne 12ee40 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 12ede5: 8b 55 c4 mov -0x3c(%ebp),%edx 12ede8: 8b 42 08 mov 0x8(%edx),%eax 12edeb: 85 c0 test %eax,%eax 12eded: 0f 84 e0 00 00 00 je 12eed3 <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 12edf3: 52 push %edx 12edf4: ff 75 e0 pushl -0x20(%ebp) 12edf7: 57 push %edi 12edf8: 56 push %esi 12edf9: ff d0 call *%eax 12edfb: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &existing_loc ); 12edfd: 8b 45 d8 mov -0x28(%ebp),%eax 12ee00: 83 c4 10 add $0x10,%esp 12ee03: 85 c0 test %eax,%eax 12ee05: 74 10 je 12ee17 <== NEVER TAKEN 12ee07: 8b 40 1c mov 0x1c(%eax),%eax 12ee0a: 85 c0 test %eax,%eax 12ee0c: 74 09 je 12ee17 <== NEVER TAKEN 12ee0e: 83 ec 0c sub $0xc,%esp 12ee11: 56 push %esi 12ee12: ff d0 call *%eax 12ee14: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 12ee17: 8b 45 c4 mov -0x3c(%ebp),%eax 12ee1a: 85 c0 test %eax,%eax 12ee1c: 0f 84 76 ff ff ff je 12ed98 <== NEVER TAKEN 12ee22: 8b 40 1c mov 0x1c(%eax),%eax 12ee25: 85 c0 test %eax,%eax 12ee27: 0f 84 6b ff ff ff je 12ed98 <== NEVER TAKEN 12ee2d: 83 ec 0c sub $0xc,%esp 12ee30: 57 push %edi 12ee31: ff d0 call *%eax 12ee33: 83 c4 10 add $0x10,%esp return result; } 12ee36: 89 d8 mov %ebx,%eax 12ee38: 8d 65 f4 lea -0xc(%ebp),%esp 12ee3b: 5b pop %ebx 12ee3c: 5e pop %esi 12ee3d: 5f pop %edi 12ee3e: c9 leave 12ee3f: c3 ret * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 12ee40: 8b 45 d8 mov -0x28(%ebp),%eax 12ee43: 85 c0 test %eax,%eax 12ee45: 74 10 je 12ee57 <== NEVER TAKEN 12ee47: 8b 40 1c mov 0x1c(%eax),%eax 12ee4a: 85 c0 test %eax,%eax 12ee4c: 74 09 je 12ee57 <== NEVER TAKEN 12ee4e: 83 ec 0c sub $0xc,%esp 12ee51: 56 push %esi 12ee52: ff d0 call *%eax 12ee54: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 12ee57: 8b 45 c4 mov -0x3c(%ebp),%eax 12ee5a: 85 c0 test %eax,%eax 12ee5c: 74 10 je 12ee6e <== NEVER TAKEN 12ee5e: 8b 40 1c mov 0x1c(%eax),%eax 12ee61: 85 c0 test %eax,%eax 12ee63: 74 09 je 12ee6e <== NEVER TAKEN 12ee65: 83 ec 0c sub $0xc,%esp 12ee68: 57 push %edi 12ee69: ff d0 call *%eax 12ee6b: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 12ee6e: e8 19 79 01 00 call 14678c <__errno> 12ee73: c7 00 12 00 00 00 movl $0x12,(%eax) 12ee79: bb ff ff ff ff mov $0xffffffff,%ebx 12ee7e: e9 15 ff ff ff jmp 12ed98 12ee83: 90 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 12ee84: 8b 45 d8 mov -0x28(%ebp),%eax 12ee87: 85 c0 test %eax,%eax 12ee89: 74 10 je 12ee9b <== NEVER TAKEN 12ee8b: 8b 40 1c mov 0x1c(%eax),%eax 12ee8e: 85 c0 test %eax,%eax 12ee90: 74 09 je 12ee9b <== NEVER TAKEN 12ee92: 83 ec 0c sub $0xc,%esp 12ee95: 56 push %esi 12ee96: ff d0 call *%eax 12ee98: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( result ); 12ee9b: e8 ec 78 01 00 call 14678c <__errno> 12eea0: 89 18 mov %ebx,(%eax) 12eea2: bb ff ff ff ff mov $0xffffffff,%ebx 12eea7: e9 ec fe ff ff jmp 12ed98 */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 12eeac: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 12eeaf: 85 c0 test %eax,%eax <== NOT EXECUTED 12eeb1: 74 10 je 12eec3 <== NOT EXECUTED 12eeb3: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12eeb6: 85 c0 test %eax,%eax <== NOT EXECUTED 12eeb8: 74 09 je 12eec3 <== NOT EXECUTED 12eeba: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12eebd: 56 push %esi <== NOT EXECUTED 12eebe: ff d0 call *%eax <== NOT EXECUTED 12eec0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12eec3: e8 c4 78 01 00 call 14678c <__errno> <== NOT EXECUTED 12eec8: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12eece: e9 c0 fe ff ff jmp 12ed93 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 12eed3: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 12eed6: 85 c0 test %eax,%eax <== NOT EXECUTED 12eed8: 74 13 je 12eeed <== NOT EXECUTED 12eeda: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12eedd: 85 c0 test %eax,%eax <== NOT EXECUTED 12eedf: 74 0c je 12eeed <== NOT EXECUTED 12eee1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12eee4: 56 push %esi <== NOT EXECUTED 12eee5: ff d0 call *%eax <== NOT EXECUTED 12eee7: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 12eeea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 12eeed: 85 d2 test %edx,%edx <== NOT EXECUTED 12eeef: 74 10 je 12ef01 <== NOT EXECUTED 12eef1: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12eef4: 85 c0 test %eax,%eax <== NOT EXECUTED 12eef6: 74 09 je 12ef01 <== NOT EXECUTED 12eef8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12eefb: 57 push %edi <== NOT EXECUTED 12eefc: ff d0 call *%eax <== NOT EXECUTED 12eefe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12ef01: e8 86 78 01 00 call 14678c <__errno> <== NOT EXECUTED 12ef06: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12ef0c: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 12ef11: e9 82 fe ff ff jmp 12ed98 <== NOT EXECUTED =============================================================================== 0011f444 : off_t lseek( int fd, off_t offset, int whence ) { 11f444: 55 push %ebp 11f445: 89 e5 mov %esp,%ebp 11f447: 57 push %edi 11f448: 56 push %esi 11f449: 53 push %ebx 11f44a: 83 ec 2c sub $0x2c,%esp 11f44d: 8b 5d 08 mov 0x8(%ebp),%ebx 11f450: 8b 75 0c mov 0xc(%ebp),%esi 11f453: 8b 7d 10 mov 0x10(%ebp),%edi 11f456: 8b 45 14 mov 0x14(%ebp),%eax rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11f459: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 11f45f: 0f 83 b7 00 00 00 jae 11f51c <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11f465: c1 e3 06 shl $0x6,%ebx 11f468: 03 1d e0 71 12 00 add 0x1271e0,%ebx rtems_libio_check_is_open(iop); 11f46e: f6 43 15 01 testb $0x1,0x15(%ebx) 11f472: 0f 84 a4 00 00 00 je 11f51c <== NEVER TAKEN /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 11f478: 8b 53 3c mov 0x3c(%ebx),%edx 11f47b: 89 55 d4 mov %edx,-0x2c(%ebp) 11f47e: 8b 52 14 mov 0x14(%edx),%edx 11f481: 85 d2 test %edx,%edx 11f483: 0f 84 aa 00 00 00 je 11f533 <== NEVER TAKEN /* * Now process the lseek(). */ old_offset = iop->offset; 11f489: 8b 53 0c mov 0xc(%ebx),%edx 11f48c: 8b 4b 10 mov 0x10(%ebx),%ecx 11f48f: 89 55 e0 mov %edx,-0x20(%ebp) 11f492: 89 4d e4 mov %ecx,-0x1c(%ebp) switch ( whence ) { 11f495: 83 f8 01 cmp $0x1,%eax 11f498: 74 6e je 11f508 11f49a: 83 f8 02 cmp $0x2,%eax 11f49d: 74 35 je 11f4d4 11f49f: 85 c0 test %eax,%eax 11f4a1: 75 45 jne 11f4e8 case SEEK_SET: iop->offset = offset; 11f4a3: 89 73 0c mov %esi,0xc(%ebx) 11f4a6: 89 7b 10 mov %edi,0x10(%ebx) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 11f4a9: 50 push %eax 11f4aa: 57 push %edi 11f4ab: 56 push %esi 11f4ac: 53 push %ebx 11f4ad: 8b 4d d4 mov -0x2c(%ebp),%ecx 11f4b0: ff 51 14 call *0x14(%ecx) if ( status == (off_t) -1 ) 11f4b3: 83 c4 10 add $0x10,%esp 11f4b6: 89 c1 mov %eax,%ecx 11f4b8: 21 d1 and %edx,%ecx 11f4ba: 41 inc %ecx 11f4bb: 75 0c jne 11f4c9 iop->offset = old_offset; 11f4bd: 8b 75 e0 mov -0x20(%ebp),%esi 11f4c0: 8b 7d e4 mov -0x1c(%ebp),%edi 11f4c3: 89 73 0c mov %esi,0xc(%ebx) 11f4c6: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11f4c9: 8d 65 f4 lea -0xc(%ebp),%esp 11f4cc: 5b pop %ebx 11f4cd: 5e pop %esi 11f4ce: 5f pop %edi 11f4cf: c9 leave 11f4d0: c3 ret 11f4d1: 8d 76 00 lea 0x0(%esi),%esi case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 11f4d4: 89 f2 mov %esi,%edx 11f4d6: 89 f9 mov %edi,%ecx 11f4d8: 03 53 04 add 0x4(%ebx),%edx 11f4db: 13 4b 08 adc 0x8(%ebx),%ecx 11f4de: 89 53 0c mov %edx,0xc(%ebx) 11f4e1: 89 4b 10 mov %ecx,0x10(%ebx) break; 11f4e4: eb c3 jmp 11f4a9 11f4e6: 66 90 xchg %ax,%ax default: rtems_set_errno_and_return_minus_one( EINVAL ); 11f4e8: e8 53 49 ff ff call 113e40 <__errno> 11f4ed: c7 00 16 00 00 00 movl $0x16,(%eax) 11f4f3: b8 ff ff ff ff mov $0xffffffff,%eax 11f4f8: ba ff ff ff ff mov $0xffffffff,%edx /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11f4fd: 8d 65 f4 lea -0xc(%ebp),%esp 11f500: 5b pop %ebx 11f501: 5e pop %esi 11f502: 5f pop %edi 11f503: c9 leave 11f504: c3 ret 11f505: 8d 76 00 lea 0x0(%esi),%esi case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 11f508: 8b 55 e0 mov -0x20(%ebp),%edx 11f50b: 8b 4d e4 mov -0x1c(%ebp),%ecx 11f50e: 01 f2 add %esi,%edx 11f510: 11 f9 adc %edi,%ecx 11f512: 89 53 0c mov %edx,0xc(%ebx) 11f515: 89 4b 10 mov %ecx,0x10(%ebx) break; 11f518: eb 8f jmp 11f4a9 11f51a: 66 90 xchg %ax,%ax off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 11f51c: e8 1f 49 ff ff call 113e40 <__errno> <== NOT EXECUTED 11f521: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11f527: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11f52c: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 11f531: eb 96 jmp 11f4c9 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 11f533: e8 08 49 ff ff call 113e40 <__errno> <== NOT EXECUTED 11f538: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11f53e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11f543: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 11f548: e9 7c ff ff ff jmp 11f4c9 <== NOT EXECUTED =============================================================================== 0012f064 : int _STAT_NAME( const char *path, struct stat *buf ) { 12f064: 55 push %ebp <== NOT EXECUTED 12f065: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12f067: 57 push %edi <== NOT EXECUTED 12f068: 56 push %esi <== NOT EXECUTED 12f069: 53 push %ebx <== NOT EXECUTED 12f06a: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 12f06d: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12f070: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 12f073: 85 f6 test %esi,%esi <== NOT EXECUTED 12f075: 0f 84 9d 00 00 00 je 12f118 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 12f07b: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 12f080: 89 d7 mov %edx,%edi <== NOT EXECUTED 12f082: 31 c0 xor %eax,%eax <== NOT EXECUTED 12f084: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 12f086: f7 d1 not %ecx <== NOT EXECUTED 12f088: 49 dec %ecx <== NOT EXECUTED 12f089: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12f08c: 6a 00 push $0x0 <== NOT EXECUTED 12f08e: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 12f091: 53 push %ebx <== NOT EXECUTED 12f092: 6a 00 push $0x0 <== NOT EXECUTED 12f094: 51 push %ecx <== NOT EXECUTED 12f095: 52 push %edx <== NOT EXECUTED 12f096: e8 5d f7 fd ff call 10e7f8 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 12f09b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12f09e: 85 c0 test %eax,%eax <== NOT EXECUTED 12f0a0: 75 66 jne 12f108 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 12f0a2: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 12f0a5: 8b 42 18 mov 0x18(%edx),%eax <== NOT EXECUTED 12f0a8: 85 c0 test %eax,%eax <== NOT EXECUTED 12f0aa: 74 39 je 12f0e5 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 12f0ac: b9 48 00 00 00 mov $0x48,%ecx <== NOT EXECUTED 12f0b1: 89 f7 mov %esi,%edi <== NOT EXECUTED 12f0b3: 31 c0 xor %eax,%eax <== NOT EXECUTED 12f0b5: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 12f0b7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12f0ba: 56 push %esi <== NOT EXECUTED 12f0bb: 53 push %ebx <== NOT EXECUTED 12f0bc: ff 52 18 call *0x18(%edx) <== NOT EXECUTED 12f0bf: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 12f0c1: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12f0c4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12f0c7: 85 c0 test %eax,%eax <== NOT EXECUTED 12f0c9: 74 10 je 12f0db <== NOT EXECUTED 12f0cb: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12f0ce: 85 c0 test %eax,%eax <== NOT EXECUTED 12f0d0: 74 09 je 12f0db <== NOT EXECUTED 12f0d2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12f0d5: 53 push %ebx <== NOT EXECUTED 12f0d6: ff d0 call *%eax <== NOT EXECUTED 12f0d8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return status; } 12f0db: 89 f0 mov %esi,%eax <== NOT EXECUTED 12f0dd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12f0e0: 5b pop %ebx <== NOT EXECUTED 12f0e1: 5e pop %esi <== NOT EXECUTED 12f0e2: 5f pop %edi <== NOT EXECUTED 12f0e3: c9 leave <== NOT EXECUTED 12f0e4: c3 ret <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 12f0e5: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12f0e8: 85 c0 test %eax,%eax <== NOT EXECUTED 12f0ea: 74 10 je 12f0fc <== NOT EXECUTED 12f0ec: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12f0ef: 85 c0 test %eax,%eax <== NOT EXECUTED 12f0f1: 74 09 je 12f0fc <== NOT EXECUTED 12f0f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12f0f6: 53 push %ebx <== NOT EXECUTED 12f0f7: ff d0 call *%eax <== NOT EXECUTED 12f0f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12f0fc: e8 8b 76 01 00 call 14678c <__errno> <== NOT EXECUTED 12f101: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12f107: 90 nop <== NOT EXECUTED 12f108: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 12f10d: 89 f0 mov %esi,%eax <== NOT EXECUTED 12f10f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12f112: 5b pop %ebx <== NOT EXECUTED 12f113: 5e pop %esi <== NOT EXECUTED 12f114: 5f pop %edi <== NOT EXECUTED 12f115: c9 leave <== NOT EXECUTED 12f116: c3 ret <== NOT EXECUTED 12f117: 90 nop <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 12f118: e8 6f 76 01 00 call 14678c <__errno> <== NOT EXECUTED 12f11d: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 12f123: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 12f128: 89 f0 mov %esi,%eax <== NOT EXECUTED 12f12a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12f12d: 5b pop %ebx <== NOT EXECUTED 12f12e: 5e pop %esi <== NOT EXECUTED 12f12f: 5f pop %edi <== NOT EXECUTED 12f130: c9 leave <== NOT EXECUTED 12f131: c3 ret <== NOT EXECUTED =============================================================================== 001088bc : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 1088bc: 55 push %ebp 1088bd: 89 e5 mov %esp,%ebp 1088bf: 57 push %edi 1088c0: 56 push %esi 1088c1: 53 push %ebx 1088c2: 83 ec 0c sub $0xc,%esp 1088c5: 8b 75 08 mov 0x8(%ebp),%esi 1088c8: ff 05 04 72 12 00 incl 0x127204 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 1088ce: e8 11 ff ff ff call 1087e4 /* * Validate the parameters */ if ( !size ) 1088d3: 85 f6 test %esi,%esi 1088d5: 74 65 je 10893c <== NEVER TAKEN return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 1088d7: 83 3d 20 75 12 00 03 cmpl $0x3,0x127520 1088de: 74 50 je 108930 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 1088e0: 6a 00 push $0x0 1088e2: 6a 00 push $0x0 1088e4: 56 push %esi 1088e5: ff 35 58 31 12 00 pushl 0x123158 1088eb: e8 f0 4c 00 00 call 10d5e0 <_Protected_heap_Allocate_aligned_with_boundary> 1088f0: 89 c3 mov %eax,%ebx * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 1088f2: 83 c4 10 add $0x10,%esp 1088f5: 85 c0 test %eax,%eax 1088f7: 74 5b je 108954 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 1088f9: 89 c7 mov %eax,%edi } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 1088fb: a1 f0 55 12 00 mov 0x1255f0,%eax 108900: 85 c0 test %eax,%eax 108902: 74 0a je 10890e <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 108904: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108907: 56 push %esi <== NOT EXECUTED 108908: 57 push %edi <== NOT EXECUTED 108909: ff d0 call *%eax <== NOT EXECUTED 10890b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 10890e: a1 e8 55 12 00 mov 0x1255e8,%eax 108913: 85 c0 test %eax,%eax 108915: 74 31 je 108948 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 108917: 83 ec 0c sub $0xc,%esp 10891a: 57 push %edi 10891b: ff 50 04 call *0x4(%eax) 10891e: 89 fb mov %edi,%ebx 108920: 83 c4 10 add $0x10,%esp if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 108923: 89 d8 mov %ebx,%eax 108925: 8d 65 f4 lea -0xc(%ebp),%esp 108928: 5b pop %ebx 108929: 5e pop %esi 10892a: 5f pop %edi 10892b: c9 leave 10892c: c3 ret 10892d: 8d 76 00 lea 0x0(%esi),%esi return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 108930: e8 57 fe ff ff call 10878c 108935: 84 c0 test %al,%al 108937: 75 a7 jne 1088e0 <== ALWAYS TAKEN 108939: 8d 76 00 lea 0x0(%esi),%esi /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 10893c: 31 db xor %ebx,%ebx if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 10893e: 89 d8 mov %ebx,%eax <== NOT EXECUTED 108940: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108943: 5b pop %ebx <== NOT EXECUTED 108944: 5e pop %esi <== NOT EXECUTED 108945: 5f pop %edi <== NOT EXECUTED 108946: c9 leave <== NOT EXECUTED 108947: c3 ret <== NOT EXECUTED (*rtems_malloc_dirty_helper)( return_this, size ); /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 108948: 89 fb mov %edi,%ebx if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 10894a: 89 d8 mov %ebx,%eax 10894c: 8d 65 f4 lea -0xc(%ebp),%esp 10894f: 5b pop %ebx 108950: 5e pop %esi 108951: 5f pop %edi 108952: c9 leave 108953: c3 ret */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 108954: a1 ec 55 12 00 mov 0x1255ec,%eax 108959: 85 c0 test %eax,%eax 10895b: 74 10 je 10896d <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 10895d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108960: 56 push %esi <== NOT EXECUTED 108961: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 108964: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( !return_this ) { 108966: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108969: 85 c0 test %eax,%eax <== NOT EXECUTED 10896b: 75 8e jne 1088fb <== NOT EXECUTED errno = ENOMEM; 10896d: e8 ce b4 00 00 call 113e40 <__errno> 108972: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 108978: eb a9 jmp 108923 =============================================================================== 001087cc : } void malloc_deferred_free( void *pointer ) { 1087cc: 55 push %ebp <== NOT EXECUTED 1087cd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1087cf: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 1087d2: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1087d5: 68 ec 71 12 00 push $0x1271ec <== NOT EXECUTED 1087da: e8 a9 3d 00 00 call 10c588 <_Chain_Append> <== NOT EXECUTED 1087df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 1087e2: c9 leave <== NOT EXECUTED 1087e3: c3 ret <== NOT EXECUTED =============================================================================== 001087e4 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 1087e4: 55 push %ebp 1087e5: 89 e5 mov %esp,%ebp 1087e7: 83 ec 08 sub $0x8,%esp rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 1087ea: eb 0c jmp 1087f8 free(to_be_freed); 1087ec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1087ef: 50 push %eax <== NOT EXECUTED 1087f0: e8 ef fd ff ff call 1085e4 <== NOT EXECUTED 1087f5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 1087f8: 83 ec 0c sub $0xc,%esp 1087fb: 68 ec 71 12 00 push $0x1271ec 108800: e8 bf 3d 00 00 call 10c5c4 <_Chain_Get> rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 108805: 83 c4 10 add $0x10,%esp 108808: 85 c0 test %eax,%eax 10880a: 75 e0 jne 1087ec <== NEVER TAKEN free(to_be_freed); } 10880c: c9 leave 10880d: c3 ret =============================================================================== 0010878c : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 10878c: 55 push %ebp 10878d: 89 e5 mov %esp,%ebp if ( _Thread_Dispatch_disable_level > 0 ) 10878f: a1 58 73 12 00 mov 0x127358,%eax 108794: 85 c0 test %eax,%eax 108796: 75 0c jne 1087a4 <== NEVER TAKEN return false; if ( _ISR_Nest_level > 0 ) 108798: a1 f4 73 12 00 mov 0x1273f4,%eax #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 10879d: 85 c0 test %eax,%eax 10879f: 0f 94 c0 sete %al if ( _ISR_Nest_level > 0 ) return false; return true; } 1087a2: c9 leave 1087a3: c3 ret rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { if ( _Thread_Dispatch_disable_level > 0 ) 1087a4: 31 c0 xor %eax,%eax if ( _ISR_Nest_level > 0 ) return false; return true; } 1087a6: c9 leave <== NOT EXECUTED 1087a7: c3 ret <== NOT EXECUTED =============================================================================== 00112118 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 112118: 55 push %ebp 112119: 89 e5 mov %esp,%ebp 11211b: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 11211e: ff 35 98 6e 12 00 pushl 0x126e98 112124: 6a 01 push $0x1 112126: e8 a1 62 ff ff call 1083cc if ( memory ) 11212b: 83 c4 10 add $0x10,%esp 11212e: 85 c0 test %eax,%eax 112130: 74 06 je 112138 <== NEVER TAKEN memfile_blocks_allocated++; 112132: ff 05 ac 6f 12 00 incl 0x126fac return memory; } 112138: c9 leave 112139: c3 ret =============================================================================== 0011258c : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 11258c: 55 push %ebp 11258d: 89 e5 mov %esp,%ebp 11258f: 53 push %ebx 112590: 83 ec 10 sub $0x10,%esp 112593: 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) ) { 112596: 53 push %ebx 112597: e8 a8 e6 ff ff call 110c44 11259c: 83 c4 10 add $0x10,%esp 11259f: 85 c0 test %eax,%eax 1125a1: 75 2f jne 1125d2 1125a3: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 1125a8: 75 28 jne 1125d2 <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 1125aa: a1 24 50 12 00 mov 0x125024,%eax 1125af: 39 58 04 cmp %ebx,0x4(%eax) 1125b2: 74 28 je 1125dc <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 1125b4: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 1125b8: 74 0c je 1125c6 <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); 1125ba: 83 ec 0c sub $0xc,%esp 1125bd: 53 push %ebx 1125be: e8 21 fe ff ff call 1123e4 1125c3: 83 c4 10 add $0x10,%esp free( the_jnode ); 1125c6: 83 ec 0c sub $0xc,%esp 1125c9: 53 push %ebx 1125ca: e8 15 60 ff ff call 1085e4 1125cf: 83 c4 10 add $0x10,%esp } return 0; } 1125d2: 31 c0 xor %eax,%eax 1125d4: 8b 5d fc mov -0x4(%ebp),%ebx 1125d7: c9 leave 1125d8: c3 ret 1125d9: 8d 76 00 lea 0x0(%esi),%esi /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) rtems_filesystem_current.node_access = NULL; 1125dc: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 1125e3: eb cf jmp 1125b4 <== NOT EXECUTED =============================================================================== 0011231c : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 11231c: 55 push %ebp 11231d: 89 e5 mov %esp,%ebp 11231f: 57 push %edi 112320: 56 push %esi 112321: 53 push %ebx 112322: 83 ec 0c sub $0xc,%esp 112325: 8b 7d 0c mov 0xc(%ebp),%edi /* * Perform internal consistency checks */ assert( block_table ); 112328: 8b 45 08 mov 0x8(%ebp),%eax 11232b: 85 c0 test %eax,%eax 11232d: 74 4e je 11237d <== NEVER TAKEN /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 11232f: 8b 45 08 mov 0x8(%ebp),%eax 112332: 8b 30 mov (%eax),%esi for ( i=0 ; i<== NEVER TAKEN 112338: 31 db xor %ebx,%ebx 11233a: 66 90 xchg %ax,%ax if ( b[i] ) { 11233c: 8b 04 9e mov (%esi,%ebx,4),%eax 11233f: 85 c0 test %eax,%eax 112341: 74 13 je 112356 memfile_free_block( b[i] ); 112343: 83 ec 0c sub $0xc,%esp 112346: 50 push %eax 112347: e8 b0 fd ff ff call 1120fc b[i] = 0; 11234c: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4) 112353: 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 11235b: 8b 45 08 mov 0x8(%ebp),%eax 11235e: 8b 30 mov (%eax),%esi /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 112360: 83 ec 0c sub $0xc,%esp 112363: 56 push %esi 112364: e8 93 fd ff ff call 1120fc *block_table = 0; 112369: 8b 45 08 mov 0x8(%ebp),%eax 11236c: c7 00 00 00 00 00 movl $0x0,(%eax) 112372: 83 c4 10 add $0x10,%esp } 112375: 8d 65 f4 lea -0xc(%ebp),%esp 112378: 5b pop %ebx 112379: 5e pop %esi 11237a: 5f pop %edi 11237b: c9 leave 11237c: c3 ret /* * Perform internal consistency checks */ assert( block_table ); 11237d: 68 8a 1f 12 00 push $0x121f8a <== NOT EXECUTED 112382: 68 c4 20 12 00 push $0x1220c4 <== NOT EXECUTED 112387: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED 11238c: 68 ac 1f 12 00 push $0x121fac <== NOT EXECUTED 112391: e8 0e 5f ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 00112840 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 112840: 55 push %ebp 112841: 89 e5 mov %esp,%ebp 112843: 53 push %ebx 112844: 83 ec 14 sub $0x14,%esp 112847: 8b 4d 08 mov 0x8(%ebp),%ecx 11284a: 8b 45 0c mov 0xc(%ebp),%eax 11284d: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 112850: 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 ) 112853: 39 53 54 cmp %edx,0x54(%ebx) 112856: 7f 19 jg 112871 <== NEVER TAKEN 112858: 7d 12 jge 11286c <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 11285a: 51 push %ecx <== NOT EXECUTED 11285b: 52 push %edx <== NOT EXECUTED 11285c: 50 push %eax <== NOT EXECUTED 11285d: 53 push %ebx <== NOT EXECUTED 11285e: e8 79 fe ff ff call 1126dc <== NOT EXECUTED 112863: 83 c4 10 add $0x10,%esp <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 112866: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 112869: c9 leave <== NOT EXECUTED 11286a: c3 ret <== NOT EXECUTED 11286b: 90 nop <== NOT EXECUTED * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 11286c: 39 43 50 cmp %eax,0x50(%ebx) 11286f: 72 e9 jb 11285a <== NEVER TAKEN * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 112871: 89 43 50 mov %eax,0x50(%ebx) 112874: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 112877: 89 41 04 mov %eax,0x4(%ecx) 11287a: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 11287d: 83 ec 08 sub $0x8,%esp 112880: 6a 00 push $0x0 112882: 8d 45 f0 lea -0x10(%ebp),%eax 112885: 50 push %eax 112886: e8 d5 5d ff ff call 108660 11288b: 8b 45 f0 mov -0x10(%ebp),%eax 11288e: 89 43 40 mov %eax,0x40(%ebx) 112891: 31 c0 xor %eax,%eax return 0; 112893: 83 c4 10 add $0x10,%esp } 112896: 8b 5d fc mov -0x4(%ebp),%ebx 112899: c9 leave 11289a: c3 ret =============================================================================== 0011289c : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 11289c: 55 push %ebp 11289d: 89 e5 mov %esp,%ebp 11289f: 57 push %edi 1128a0: 56 push %esi 1128a1: 53 push %ebx 1128a2: 83 ec 0c sub $0xc,%esp 1128a5: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 1128a8: 8b 73 38 mov 0x38(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 1128ab: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 1128af: 74 2f je 1128e0 <== NEVER TAKEN if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 1128b1: 57 push %edi 1128b2: ff 73 10 pushl 0x10(%ebx) 1128b5: ff 73 0c pushl 0xc(%ebx) 1128b8: 56 push %esi 1128b9: e8 1e fe ff ff call 1126dc 1128be: 83 c4 10 add $0x10,%esp 1128c1: 85 c0 test %eax,%eax 1128c3: 75 4d jne 112912 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 1128c5: 8b 46 50 mov 0x50(%esi),%eax 1128c8: 8b 56 54 mov 0x54(%esi),%edx 1128cb: 89 43 04 mov %eax,0x4(%ebx) 1128ce: 89 53 08 mov %edx,0x8(%ebx) 1128d1: 8b 43 0c mov 0xc(%ebx),%eax 1128d4: 8b 53 10 mov 0x10(%ebx),%edx } return iop->offset; } 1128d7: 8d 65 f4 lea -0xc(%ebp),%esp 1128da: 5b pop %ebx 1128db: 5e pop %esi 1128dc: 5f pop %edi 1128dd: c9 leave 1128de: c3 ret 1128df: 90 nop IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 1128e0: 8b 7b 0c mov 0xc(%ebx),%edi <== NOT EXECUTED 1128e3: 8b 4b 10 mov 0x10(%ebx),%ecx <== NOT EXECUTED 1128e6: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED 1128e9: 8b 56 54 mov 0x54(%esi),%edx <== NOT EXECUTED 1128ec: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 1128ee: 7f 14 jg 112904 <== NOT EXECUTED 1128f0: 7d 0e jge 112900 <== NOT EXECUTED 1128f2: 89 f8 mov %edi,%eax <== NOT EXECUTED 1128f4: 89 ca mov %ecx,%edx <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 1128f6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1128f9: 5b pop %ebx <== NOT EXECUTED 1128fa: 5e pop %esi <== NOT EXECUTED 1128fb: 5f pop %edi <== NOT EXECUTED 1128fc: c9 leave <== NOT EXECUTED 1128fd: c3 ret <== NOT EXECUTED 1128fe: 66 90 xchg %ax,%ax <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 112900: 39 c7 cmp %eax,%edi <== NOT EXECUTED 112902: 76 ee jbe 1128f2 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 112904: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED 112907: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 11290a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11290d: 5b pop %ebx <== NOT EXECUTED 11290e: 5e pop %esi <== NOT EXECUTED 11290f: 5f pop %edi <== NOT EXECUTED 112910: c9 leave <== NOT EXECUTED 112911: c3 ret <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 112912: e8 29 15 00 00 call 113e40 <__errno> <== NOT EXECUTED 112917: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 11291d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 112922: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 112927: eb ae jmp 1128d7 <== NOT EXECUTED =============================================================================== 00112bb8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 112bb8: 55 push %ebp 112bb9: 89 e5 mov %esp,%ebp 112bbb: 56 push %esi 112bbc: 53 push %ebx 112bbd: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 112bc0: 8b 73 38 mov 0x38(%ebx),%esi /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 112bc3: 8b 43 14 mov 0x14(%ebx),%eax 112bc6: a9 04 02 00 00 test $0x204,%eax 112bcb: 74 06 je 112bd3 && (the_jnode->type == IMFS_LINEAR_FILE)) { 112bcd: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 112bd1: 74 2d je 112c00 <== NEVER TAKEN the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 112bd3: 8b 56 50 mov 0x50(%esi),%edx 112bd6: 8b 4e 54 mov 0x54(%esi),%ecx && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 112bd9: f6 c4 02 test $0x2,%ah 112bdc: 75 12 jne 112bf0 iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 112bde: 89 53 04 mov %edx,0x4(%ebx) 112be1: 89 4b 08 mov %ecx,0x8(%ebx) 112be4: 31 c0 xor %eax,%eax return 0; } 112be6: 8d 65 f8 lea -0x8(%ebp),%esp 112be9: 5b pop %ebx 112bea: 5e pop %esi 112beb: c9 leave 112bec: c3 ret 112bed: 8d 76 00 lea 0x0(%esi),%esi if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; 112bf0: 89 53 0c mov %edx,0xc(%ebx) 112bf3: 89 4b 10 mov %ecx,0x10(%ebx) 112bf6: 8b 56 50 mov 0x50(%esi),%edx 112bf9: 8b 4e 54 mov 0x54(%esi),%ecx 112bfc: eb e0 jmp 112bde 112bfe: 66 90 xchg %ax,%ax /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 112c00: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 112c03: 8b 56 58 mov 0x58(%esi),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 112c06: c7 46 4c 05 00 00 00 movl $0x5,0x4c(%esi) <== NOT EXECUTED the_jnode->info.file.size = 0; 112c0d: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) <== NOT EXECUTED 112c14: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 112c1b: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 112c22: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 112c29: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) <== NOT EXECUTED if ((count != 0) 112c30: 85 c0 test %eax,%eax <== NOT EXECUTED 112c32: 75 09 jne 112c3d <== NOT EXECUTED 112c34: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 112c37: 31 d2 xor %edx,%edx <== NOT EXECUTED 112c39: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 112c3b: eb 9c jmp 112bd9 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 112c3d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112c40: 50 push %eax <== NOT EXECUTED 112c41: 52 push %edx <== NOT EXECUTED 112c42: 6a 00 push $0x0 <== NOT EXECUTED 112c44: 6a 00 push $0x0 <== NOT EXECUTED 112c46: 56 push %esi <== NOT EXECUTED 112c47: e8 e0 fc ff ff call 11292c <== 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) 112c4c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 112c4f: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 112c52: 74 92 je 112be6 <== NOT EXECUTED 112c54: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 112c57: e9 77 ff ff ff jmp 112bd3 <== NOT EXECUTED =============================================================================== 001125e8 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 1125e8: 55 push %ebp 1125e9: 89 e5 mov %esp,%ebp 1125eb: 53 push %ebx 1125ec: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 1125ef: 8b 45 0c mov 0xc(%ebp),%eax 1125f2: 8b 18 mov (%eax),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 1125f4: 8b 4b 08 mov 0x8(%ebx),%ecx 1125f7: 85 c9 test %ecx,%ecx 1125f9: 74 13 je 11260e <== NEVER TAKEN 1125fb: 83 ec 0c sub $0xc,%esp 1125fe: 53 push %ebx 1125ff: e8 a8 9f ff ff call 10c5ac <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 112604: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 11260b: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 11260e: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 112612: 83 ec 08 sub $0x8,%esp 112615: 6a 00 push $0x0 112617: 8d 45 f0 lea -0x10(%ebp),%eax 11261a: 50 push %eax 11261b: e8 40 60 ff ff call 108660 112620: 8b 45 f0 mov -0x10(%ebp),%eax 112623: 89 43 48 mov %eax,0x48(%ebx) return memfile_check_rmnod( the_jnode ); 112626: 89 1c 24 mov %ebx,(%esp) 112629: e8 5e ff ff ff call 11258c } 11262e: 8b 5d fc mov -0x4(%ebp),%ebx 112631: c9 leave 112632: c3 ret =============================================================================== 00108998 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 108998: 55 push %ebp 108999: 89 e5 mov %esp,%ebp 10899b: 57 push %edi 10899c: 56 push %esi 10899d: 53 push %ebx 10899e: 83 ec 2c sub $0x2c,%esp 1089a1: 8b 75 10 mov 0x10(%ebp),%esi 1089a4: 8b 7d 14 mov 0x14(%ebp),%edi int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 1089a7: 8b 45 0c mov 0xc(%ebp),%eax 1089aa: 25 00 f0 00 00 and $0xf000,%eax 1089af: 3d 00 40 00 00 cmp $0x4000,%eax 1089b4: 74 32 je 1089e8 1089b6: 76 20 jbe 1089d8 1089b8: 3d 00 60 00 00 cmp $0x6000,%eax 1089bd: 74 29 je 1089e8 1089bf: 3d 00 80 00 00 cmp $0x8000,%eax 1089c4: 74 22 je 1089e8 <== ALWAYS TAKEN case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 1089c6: e8 75 b4 00 00 call 113e40 <__errno> <== NOT EXECUTED 1089cb: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1089d1: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 1089d6: eb 78 jmp 108a50 <== NOT EXECUTED int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 1089d8: 3d 00 10 00 00 cmp $0x1000,%eax 1089dd: 74 09 je 1089e8 1089df: 3d 00 20 00 00 cmp $0x2000,%eax 1089e4: 75 e0 jne 1089c6 <== NEVER TAKEN 1089e6: 66 90 xchg %ax,%ax break; default: rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1089e8: 51 push %ecx 1089e9: 8d 5d cc lea -0x34(%ebp),%ebx 1089ec: 53 push %ebx 1089ed: 8d 45 e4 lea -0x1c(%ebp),%eax 1089f0: 50 push %eax 1089f1: ff 75 08 pushl 0x8(%ebp) 1089f4: e8 4f 0a 00 00 call 109448 if ( !temp_loc.ops->evalformake_h ) { 1089f9: 8b 45 d8 mov -0x28(%ebp),%eax 1089fc: 8b 40 04 mov 0x4(%eax),%eax 1089ff: 83 c4 10 add $0x10,%esp 108a02: 85 c0 test %eax,%eax 108a04: 74 66 je 108a6c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 108a06: 52 push %edx 108a07: 8d 55 e0 lea -0x20(%ebp),%edx 108a0a: 52 push %edx 108a0b: 53 push %ebx 108a0c: 8b 55 08 mov 0x8(%ebp),%edx 108a0f: 03 55 e4 add -0x1c(%ebp),%edx 108a12: 52 push %edx 108a13: ff d0 call *%eax &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 108a15: 83 c4 10 add $0x10,%esp 108a18: 85 c0 test %eax,%eax 108a1a: 75 5b jne 108a77 return -1; if ( !temp_loc.ops->mknod_h ) { 108a1c: 8b 55 d8 mov -0x28(%ebp),%edx 108a1f: 8b 42 14 mov 0x14(%edx),%eax 108a22: 85 c0 test %eax,%eax 108a24: 74 34 je 108a5a <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 108a26: 83 ec 0c sub $0xc,%esp 108a29: 53 push %ebx 108a2a: 57 push %edi 108a2b: 56 push %esi 108a2c: ff 75 0c pushl 0xc(%ebp) 108a2f: ff 75 e0 pushl -0x20(%ebp) 108a32: ff d0 call *%eax 108a34: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &temp_loc ); 108a36: 8b 45 d8 mov -0x28(%ebp),%eax 108a39: 83 c4 20 add $0x20,%esp 108a3c: 85 c0 test %eax,%eax 108a3e: 74 10 je 108a50 <== NEVER TAKEN 108a40: 8b 40 1c mov 0x1c(%eax),%eax 108a43: 85 c0 test %eax,%eax 108a45: 74 09 je 108a50 108a47: 83 ec 0c sub $0xc,%esp 108a4a: 53 push %ebx 108a4b: ff d0 call *%eax 108a4d: 83 c4 10 add $0x10,%esp return result; } 108a50: 89 f0 mov %esi,%eax 108a52: 8d 65 f4 lea -0xc(%ebp),%esp 108a55: 5b pop %ebx 108a56: 5e pop %esi 108a57: 5f pop %edi 108a58: c9 leave 108a59: c3 ret ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 108a5a: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 108a5d: 85 c0 test %eax,%eax <== NOT EXECUTED 108a5f: 74 0b je 108a6c <== NOT EXECUTED 108a61: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108a64: 53 push %ebx <== NOT EXECUTED 108a65: ff d0 call *%eax <== NOT EXECUTED 108a67: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108a6a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 108a6c: e8 cf b3 00 00 call 113e40 <__errno> <== NOT EXECUTED 108a71: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108a77: be ff ff ff ff mov $0xffffffff,%esi result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 108a7c: 89 f0 mov %esi,%eax 108a7e: 8d 65 f4 lea -0xc(%ebp),%esp 108a81: 5b pop %ebx 108a82: 5e pop %esi 108a83: 5f pop %edi 108a84: c9 leave 108a85: c3 ret =============================================================================== 00108b0c : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 108b0c: 55 push %ebp 108b0d: 89 e5 mov %esp,%ebp 108b0f: 57 push %edi 108b10: 56 push %esi 108b11: 53 push %ebx 108b12: 83 ec 4c sub $0x4c,%esp /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 108b15: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 108b19: 0f 87 61 02 00 00 ja 108d80 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 108b1f: 83 ec 0c sub $0xc,%esp 108b22: ff 75 10 pushl 0x10(%ebp) 108b25: e8 92 84 00 00 call 110fbc 108b2a: 89 45 c0 mov %eax,-0x40(%ebp) if ( !mount_h ) 108b2d: 83 c4 10 add $0x10,%esp 108b30: 85 c0 test %eax,%eax 108b32: 0f 84 48 02 00 00 je 108d80 { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; 108b38: 8b 5d 0c mov 0xc(%ebp),%ebx 108b3b: 85 db test %ebx,%ebx const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 108b3d: 0f 95 45 bf setne -0x41(%ebp) 108b41: 0f 84 25 02 00 00 je 108d6c * 4) The mount point exists with the proper permissions to allow mounting * 5) The selected mount point already has a file system mounted to it * */ int mount( 108b47: 31 c0 xor %eax,%eax 108b49: b9 ff ff ff ff mov $0xffffffff,%ecx 108b4e: 8b 7d 0c mov 0xc(%ebp),%edi 108b51: f2 ae repnz scas %es:(%edi),%al 108b53: f7 d1 not %ecx 108b55: 49 dec %ecx 108b56: 89 4d b8 mov %ecx,-0x48(%ebp) 108b59: 8b 45 0c mov 0xc(%ebp),%eax 108b5c: 89 45 b4 mov %eax,-0x4c(%ebp) const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 108b5f: ba ff ff ff ff mov $0xffffffff,%edx 108b64: 31 c0 xor %eax,%eax 108b66: 89 d1 mov %edx,%ecx 108b68: 8b 7d 10 mov 0x10(%ebp),%edi 108b6b: f2 ae repnz scas %es:(%edi),%al 108b6d: f7 d1 not %ecx 108b6f: 89 4d c4 mov %ecx,-0x3c(%ebp) size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 108b72: 8b 4d 08 mov 0x8(%ebp),%ecx 108b75: 85 c9 test %ecx,%ecx 108b77: 0f 84 e7 01 00 00 je 108d64 108b7d: 89 d1 mov %edx,%ecx 108b7f: 8b 7d 08 mov 0x8(%ebp),%edi 108b82: f2 ae repnz scas %es:(%edi),%al 108b84: 89 ce mov %ecx,%esi 108b86: f7 d6 not %esi size_t target_length = strlen( target ); size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 108b88: 83 ec 08 sub $0x8,%esp 108b8b: 8b 4d b8 mov -0x48(%ebp),%ecx 108b8e: 8b 55 c4 mov -0x3c(%ebp),%edx 108b91: 8d 44 11 75 lea 0x75(%ecx,%edx,1),%eax 108b95: 01 f0 add %esi,%eax 108b97: 50 push %eax 108b98: 6a 01 push $0x1 108b9a: e8 2d f8 ff ff call 1083cc 108b9f: 89 c3 mov %eax,%ebx if ( mt_entry != NULL ) { 108ba1: 83 c4 10 add $0x10,%esp 108ba4: 85 c0 test %eax,%eax 108ba6: 0f 84 a0 01 00 00 je 108d4c <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); 108bac: 8d 78 74 lea 0x74(%eax),%edi strcpy( str, filesystemtype ); 108baf: 83 ec 08 sub $0x8,%esp 108bb2: ff 75 10 pushl 0x10(%ebp) 108bb5: 57 push %edi 108bb6: e8 a5 bd 00 00 call 114960 mt_entry->type = str; 108bbb: 89 7b 6c mov %edi,0x6c(%ebx) str += filesystemtype_size; 108bbe: 03 7d c4 add -0x3c(%ebp),%edi if ( source_or_null != NULL ) { 108bc1: 83 c4 10 add $0x10,%esp 108bc4: 8b 45 08 mov 0x8(%ebp),%eax 108bc7: 85 c0 test %eax,%eax 108bc9: 74 14 je 108bdf strcpy( str, source_or_null ); 108bcb: 83 ec 08 sub $0x8,%esp 108bce: ff 75 08 pushl 0x8(%ebp) 108bd1: 57 push %edi 108bd2: e8 89 bd 00 00 call 114960 mt_entry->dev = str; 108bd7: 89 7b 70 mov %edi,0x70(%ebx) str += source_size; 108bda: 01 f7 add %esi,%edi 108bdc: 83 c4 10 add $0x10,%esp } strcpy( str, target ); 108bdf: 83 ec 08 sub $0x8,%esp 108be2: ff 75 b4 pushl -0x4c(%ebp) 108be5: 57 push %edi 108be6: e8 75 bd 00 00 call 114960 mt_entry->target = str; 108beb: 89 7b 68 mov %edi,0x68(%ebx) &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 108bee: 89 5b 2c mov %ebx,0x2c(%ebx) mt_entry->options = options; 108bf1: 8b 45 14 mov 0x14(%ebp),%eax 108bf4: 89 43 30 mov %eax,0x30(%ebx) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 108bf7: 8d 7b 38 lea 0x38(%ebx),%edi 108bfa: be 40 18 12 00 mov $0x121840,%esi 108bff: b9 0c 00 00 00 mov $0xc,%ecx 108c04: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 108c06: 83 c4 10 add $0x10,%esp 108c09: 80 7d bf 00 cmpb $0x0,-0x41(%ebp) 108c0d: 75 7d jne 108c8c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 108c0f: 81 3d 04 50 12 00 08 cmpl $0x125008,0x125004 108c16: 50 12 00 108c19: 0f 85 a9 01 00 00 jne 108dc8 <== NEVER TAKEN 108c1f: 31 f6 xor %esi,%esi * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 108c21: 83 ec 08 sub $0x8,%esp 108c24: ff 75 18 pushl 0x18(%ebp) 108c27: 53 push %ebx 108c28: ff 55 c0 call *-0x40(%ebp) 108c2b: 83 c4 10 add $0x10,%esp 108c2e: 85 c0 test %eax,%eax 108c30: 0f 85 62 01 00 00 jne 108d98 <== NEVER TAKEN rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 108c36: 56 push %esi 108c37: 6a 00 push $0x0 108c39: 6a 00 push $0x0 108c3b: ff 35 e8 71 12 00 pushl 0x1271e8 108c41: e8 9e 30 00 00 call 10bce4 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 108c46: 5a pop %edx 108c47: 59 pop %ecx 108c48: 53 push %ebx 108c49: 68 04 50 12 00 push $0x125004 108c4e: e8 35 39 00 00 call 10c588 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 108c53: 58 pop %eax 108c54: ff 35 e8 71 12 00 pushl 0x1271e8 108c5a: e8 81 31 00 00 call 10bde0 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 108c5f: 83 c4 10 add $0x10,%esp 108c62: 80 7d bf 00 cmpb $0x0,-0x41(%ebp) 108c66: 74 0c je 108c74 rtems_filesystem_root = mt_entry->mt_fs_root; 108c68: 31 c0 xor %eax,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108c6a: 8d 65 f4 lea -0xc(%ebp),%esp 108c6d: 5b pop %ebx 108c6e: 5e pop %esi 108c6f: 5f pop %edi 108c70: c9 leave 108c71: c3 ret 108c72: 66 90 xchg %ax,%ax rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; 108c74: 8b 3d 24 50 12 00 mov 0x125024,%edi 108c7a: 83 c7 18 add $0x18,%edi 108c7d: 8d 73 1c lea 0x1c(%ebx),%esi 108c80: b9 05 00 00 00 mov $0x5,%ecx 108c85: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 108c87: eb df jmp 108c68 108c89: 8d 76 00 lea 0x0(%esi),%esi * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 108c8c: 83 ec 0c sub $0xc,%esp 108c8f: 6a 01 push $0x1 108c91: 8d 75 d4 lea -0x2c(%ebp),%esi 108c94: 56 push %esi 108c95: 6a 07 push $0x7 108c97: ff 75 b8 pushl -0x48(%ebp) 108c9a: ff 75 0c pushl 0xc(%ebp) 108c9d: e8 d2 f8 ff ff call 108574 108ca2: 83 c4 20 add $0x20,%esp 108ca5: 40 inc %eax 108ca6: 0f 84 27 01 00 00 je 108dd3 <== NEVER TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 108cac: 8b 45 e0 mov -0x20(%ebp),%eax 108caf: 8b 40 10 mov 0x10(%eax),%eax 108cb2: 85 c0 test %eax,%eax 108cb4: 0f 84 52 01 00 00 je 108e0c <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 108cba: 83 ec 0c sub $0xc,%esp 108cbd: 56 push %esi 108cbe: ff d0 call *%eax 108cc0: 83 c4 10 add $0x10,%esp 108cc3: 48 dec %eax 108cc4: 0f 85 22 01 00 00 jne 108dec /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 108cca: 83 ec 08 sub $0x8,%esp 108ccd: ff 75 d4 pushl -0x2c(%ebp) 108cd0: 68 88 8a 10 00 push $0x108a88 108cd5: e8 c2 fd ff ff call 108a9c 108cda: 83 c4 10 add $0x10,%esp 108cdd: 84 c0 test %al,%al 108cdf: 0f 85 17 01 00 00 jne 108dfc * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 108ce5: 8b 45 d4 mov -0x2c(%ebp),%eax 108ce8: 89 43 08 mov %eax,0x8(%ebx) mt_entry->mt_point_node.handlers = loc.handlers; 108ceb: 8b 45 dc mov -0x24(%ebp),%eax 108cee: 89 43 10 mov %eax,0x10(%ebx) mt_entry->mt_point_node.ops = loc.ops; 108cf1: 8b 45 e0 mov -0x20(%ebp),%eax 108cf4: 89 43 14 mov %eax,0x14(%ebx) mt_entry->mt_point_node.mt_entry = loc.mt_entry; 108cf7: 8b 55 e4 mov -0x1c(%ebp),%edx 108cfa: 89 53 18 mov %edx,0x18(%ebx) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 108cfd: 8b 40 20 mov 0x20(%eax),%eax 108d00: 85 c0 test %eax,%eax 108d02: 0f 84 04 01 00 00 je 108e0c <== NEVER TAKEN errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( mt_entry ) ) { 108d08: 83 ec 0c sub $0xc,%esp 108d0b: 53 push %ebx 108d0c: ff d0 call *%eax 108d0e: 83 c4 10 add $0x10,%esp 108d11: 85 c0 test %eax,%eax 108d13: 0f 84 08 ff ff ff je 108c21 <== ALWAYS TAKEN return 0; cleanup_and_bail: free( mt_entry ); 108d19: 83 ec 0c sub $0xc,%esp 108d1c: 53 push %ebx 108d1d: e8 c2 f8 ff ff call 1085e4 108d22: 83 c4 10 add $0x10,%esp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 108d25: 8b 46 0c mov 0xc(%esi),%eax 108d28: 85 c0 test %eax,%eax 108d2a: 0f 84 8f 00 00 00 je 108dbf <== NEVER TAKEN 108d30: 8b 40 1c mov 0x1c(%eax),%eax 108d33: 85 c0 test %eax,%eax 108d35: 0f 84 84 00 00 00 je 108dbf <== NEVER TAKEN 108d3b: 83 ec 0c sub $0xc,%esp 108d3e: 56 push %esi 108d3f: ff d0 call *%eax 108d41: 83 c8 ff or $0xffffffff,%eax 108d44: 83 c4 10 add $0x10,%esp 108d47: e9 1e ff ff ff jmp 108c6a target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 108d4c: e8 ef b0 00 00 call 113e40 <__errno> <== NOT EXECUTED 108d51: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 108d57: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108d5c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108d5f: 5b pop %ebx <== NOT EXECUTED 108d60: 5e pop %esi <== NOT EXECUTED 108d61: 5f pop %edi <== NOT EXECUTED 108d62: c9 leave <== NOT EXECUTED 108d63: c3 ret <== NOT EXECUTED ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 108d64: 31 f6 xor %esi,%esi 108d66: e9 1d fe ff ff jmp 108b88 108d6b: 90 nop const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 108d6c: c7 45 b8 01 00 00 00 movl $0x1,-0x48(%ebp) 108d73: c7 45 b4 e7 17 12 00 movl $0x1217e7,-0x4c(%ebp) 108d7a: e9 e0 fd ff ff jmp 108b5f 108d7f: 90 nop /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 108d80: e8 bb b0 00 00 call 113e40 <__errno> 108d85: c7 00 16 00 00 00 movl $0x16,(%eax) 108d8b: b8 ff ff ff ff mov $0xffffffff,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108d90: 8d 65 f4 lea -0xc(%ebp),%esp 108d93: 5b pop %ebx 108d94: 5e pop %esi 108d95: 5f pop %edi 108d96: c9 leave 108d97: c3 ret if ( (*mount_h)( mt_entry, data ) ) { /* * Try to undo the mount operation */ if ( loc.ops->unmount_h ) { 108d98: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 108d9b: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 108d9e: 85 c0 test %eax,%eax <== NOT EXECUTED 108da0: 74 09 je 108dab <== NOT EXECUTED loc.ops->unmount_h( mt_entry ); 108da2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108da5: 53 push %ebx <== NOT EXECUTED 108da6: ff d0 call *%eax <== NOT EXECUTED 108da8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 108dab: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108dae: 53 push %ebx <== NOT EXECUTED 108daf: e8 30 f8 ff ff call 1085e4 <== NOT EXECUTED if ( loc_to_free ) 108db4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108db7: 85 f6 test %esi,%esi <== NOT EXECUTED 108db9: 0f 85 66 ff ff ff jne 108d25 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 108dbf: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 108dc2: e9 a3 fe ff ff jmp 108c6a <== NOT EXECUTED 108dc7: 90 nop <== NOT EXECUTED } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 108dc8: e8 73 b0 00 00 call 113e40 <__errno> <== NOT EXECUTED 108dcd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 108dd3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108dd6: 53 push %ebx <== NOT EXECUTED 108dd7: e8 08 f8 ff ff call 1085e4 <== NOT EXECUTED 108ddc: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108de1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108de4: e9 81 fe ff ff jmp 108c6a <== NOT EXECUTED 108de9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 108dec: e8 4f b0 00 00 call 113e40 <__errno> 108df1: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 108df7: e9 1d ff ff ff jmp 108d19 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { errno = EBUSY; 108dfc: e8 3f b0 00 00 call 113e40 <__errno> 108e01: c7 00 10 00 00 00 movl $0x10,(%eax) goto cleanup_and_bail; 108e07: e9 0d ff ff ff jmp 108d19 * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 108e0c: e8 2f b0 00 00 call 113e40 <__errno> <== NOT EXECUTED 108e11: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 108e17: e9 fd fe ff ff jmp 108d19 <== NOT EXECUTED =============================================================================== 00139d90 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 139d90: 55 push %ebp <== NOT EXECUTED 139d91: 89 e5 mov %esp,%ebp <== NOT EXECUTED 139d93: 57 push %edi <== NOT EXECUTED 139d94: 56 push %esi <== NOT EXECUTED 139d95: 53 push %ebx <== NOT EXECUTED 139d96: 81 ec cc 00 00 00 sub $0xcc,%esp <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 139d9c: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 139d9f: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED 139da2: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED 139da5: 89 85 40 ff ff ff mov %eax,-0xc0(%ebp) <== NOT EXECUTED fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 139dab: 8b 0a mov (%edx),%ecx <== NOT EXECUTED 139dad: 89 8d 44 ff ff ff mov %ecx,-0xbc(%ebp) <== NOT EXECUTED fat_file_fd_t *fat_fd = NULL; 139db3: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED time_t time_ret = 0; uint16_t time_val = 0; 139dba: 66 c7 45 e6 00 00 movw $0x0,-0x1a(%ebp) <== NOT EXECUTED uint16_t date = 0; 139dc0: 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; 139dc6: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED dir_pos->sname.ofs = 0; 139dcd: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 139dd4: c7 45 d8 ff ff ff ff movl $0xffffffff,-0x28(%ebp) <== NOT EXECUTED dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 139ddb: 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); 139de2: 8d 5d b0 lea -0x50(%ebp),%ebx <== NOT EXECUTED 139de5: 31 c0 xor %eax,%eax <== NOT EXECUTED 139de7: b9 20 00 00 00 mov $0x20,%ecx <== NOT EXECUTED 139dec: 89 df mov %ebx,%edi <== NOT EXECUTED 139dee: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 139df0: 8d 95 50 ff ff ff lea -0xb0(%ebp),%edx <== NOT EXECUTED 139df6: 89 95 34 ff ff ff mov %edx,-0xcc(%ebp) <== NOT EXECUTED 139dfc: b1 40 mov $0x40,%cl <== NOT EXECUTED 139dfe: 89 d7 mov %edx,%edi <== NOT EXECUTED 139e00: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED name_type = msdos_long_to_short (name, name_len, 139e02: 6a 0b push $0xb <== NOT EXECUTED 139e04: 53 push %ebx <== NOT EXECUTED 139e05: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 139e08: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 139e0b: e8 74 1f 00 00 call 13bd84 <== NOT EXECUTED 139e10: 89 c6 mov %eax,%esi <== NOT EXECUTED MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 139e12: c6 45 bc 00 movb $0x0,-0x44(%ebp) <== NOT EXECUTED /* set up last write date and time */ time_ret = time(NULL); 139e16: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED 139e1d: e8 0e 76 01 00 call 151430