=============================================================================== 0010dfb8 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10dfb8: 55 push %ebp 10dfb9: 89 e5 mov %esp,%ebp 10dfbb: 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; 10dfbe: 8b 50 10 mov 0x10(%eax),%edx 10dfc1: 8b 52 34 mov 0x34(%edx),%edx switch( node->type ) { 10dfc4: 8b 08 mov (%eax),%ecx 10dfc6: 8b 49 4c mov 0x4c(%ecx),%ecx 10dfc9: 49 dec %ecx 10dfca: 83 f9 06 cmp $0x6,%ecx 10dfcd: 77 2d ja 10dffc <== NEVER TAKEN 10dfcf: ff 24 8d bc f3 11 00 jmp *0x11f3bc(,%ecx,4) case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10dfd6: 8b 52 0c mov 0xc(%edx),%edx 10dfd9: eb 15 jmp 10dff0 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10dfdb: c7 40 08 ec f4 11 00 movl $0x11f4ec,0x8(%eax) break; 10dfe2: eb 18 jmp 10dffc case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 10dfe4: c7 40 08 5c f5 11 00 movl $0x11f55c,0x8(%eax) break; 10dfeb: eb 0f jmp 10dffc case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; 10dfed: 8b 52 08 mov 0x8(%edx),%edx 10dff0: 89 50 08 mov %edx,0x8(%eax) break; 10dff3: eb 07 jmp 10dffc case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 10dff5: c7 40 08 34 f4 11 00 movl $0x11f434,0x8(%eax) break; } return 0; } 10dffc: 31 c0 xor %eax,%eax 10dffe: c9 leave 10dfff: c3 ret =============================================================================== 0010de1c : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 10de1c: 55 push %ebp 10de1d: 89 e5 mov %esp,%ebp 10de1f: 53 push %ebx 10de20: 83 ec 1c sub $0x1c,%esp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 10de23: 6a 64 push $0x64 10de25: 6a 01 push $0x1 10de27: e8 90 96 ff ff call 1074bc 10de2c: 89 c3 mov %eax,%ebx if ( !node ) 10de2e: 83 c4 10 add $0x10,%esp 10de31: 85 c0 test %eax,%eax 10de33: 74 49 je 10de7e <== NEVER TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 10de35: 66 c7 40 34 01 00 movw $0x1,0x34(%eax) node->type = type; 10de3b: 8b 45 08 mov 0x8(%ebp),%eax 10de3e: 89 43 4c mov %eax,0x4c(%ebx) strncpy( node->name, name, IMFS_NAME_MAX ); 10de41: 51 push %ecx 10de42: 6a 20 push $0x20 10de44: ff 75 0c pushl 0xc(%ebp) 10de47: 8d 43 0c lea 0xc(%ebx),%eax 10de4a: 50 push %eax 10de4b: e8 28 48 00 00 call 112678 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 10de50: 8b 45 10 mov 0x10(%ebp),%eax 10de53: 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; 10de56: 66 c7 43 3c 00 00 movw $0x0,0x3c(%ebx) node->st_gid = 0; 10de5c: 66 c7 43 3e 00 00 movw $0x0,0x3e(%ebx) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 10de62: 58 pop %eax 10de63: 5a pop %edx 10de64: 6a 00 push $0x0 10de66: 8d 45 f0 lea -0x10(%ebp),%eax 10de69: 50 push %eax 10de6a: e8 a5 98 ff ff call 107714 node->stat_atime = (time_t) tv.tv_sec; 10de6f: 8b 45 f0 mov -0x10(%ebp),%eax 10de72: 89 43 40 mov %eax,0x40(%ebx) node->stat_mtime = (time_t) tv.tv_sec; 10de75: 89 43 44 mov %eax,0x44(%ebx) node->stat_ctime = (time_t) tv.tv_sec; 10de78: 89 43 48 mov %eax,0x48(%ebx) return node; 10de7b: 83 c4 10 add $0x10,%esp } 10de7e: 89 d8 mov %ebx,%eax 10de80: 8b 5d fc mov -0x4(%ebp),%ebx 10de83: c9 leave 10de84: c3 ret =============================================================================== 0010deb8 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10deb8: 55 push %ebp 10deb9: 89 e5 mov %esp,%ebp 10debb: 57 push %edi 10debc: 56 push %esi 10debd: 53 push %ebx 10debe: 83 ec 1c sub $0x1c,%esp 10dec1: 8b 75 08 mov 0x8(%ebp),%esi 10dec4: 8b 7d 0c mov 0xc(%ebp),%edi 10dec7: 8b 5d 18 mov 0x18(%ebp),%ebx IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 10deca: 31 c0 xor %eax,%eax 10decc: 85 f6 test %esi,%esi 10dece: 0f 84 dc 00 00 00 je 10dfb0 <== NEVER TAKEN return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10ded4: 50 push %eax 10ded5: a1 34 34 12 00 mov 0x123434,%eax 10deda: 8b 40 2c mov 0x2c(%eax),%eax 10dedd: f7 d0 not %eax 10dedf: 23 45 14 and 0x14(%ebp),%eax 10dee2: 50 push %eax 10dee3: ff 75 10 pushl 0x10(%ebp) 10dee6: 57 push %edi 10dee7: e8 30 ff ff ff call 10de1c if ( !node ) 10deec: 83 c4 10 add $0x10,%esp 10deef: 85 c0 test %eax,%eax 10def1: 0f 84 b9 00 00 00 je 10dfb0 <== NEVER TAKEN return NULL; /* * Set the type specific information */ switch (type) { 10def7: 4f dec %edi 10def8: 83 ff 06 cmp $0x6,%edi 10defb: 77 73 ja 10df70 <== NEVER TAKEN 10defd: ff 24 bd 8c f3 11 00 jmp *0x11f38c(,%edi,4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10df04: 8d 50 54 lea 0x54(%eax),%edx 10df07: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10df0a: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10df11: 8d 50 50 lea 0x50(%eax),%edx 10df14: 89 50 58 mov %edx,0x58(%eax) 10df17: eb 6d jmp 10df86 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; 10df19: 8b 13 mov (%ebx),%edx 10df1b: 89 50 50 mov %edx,0x50(%eax) break; 10df1e: eb 66 jmp 10df86 case IMFS_DEVICE: node->info.device.major = info->device.major; 10df20: 8b 13 mov (%ebx),%edx 10df22: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 10df25: 8b 53 04 mov 0x4(%ebx),%edx 10df28: 89 50 54 mov %edx,0x54(%eax) break; 10df2b: eb 59 jmp 10df86 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 10df2d: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED 10df34: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED node->info.linearfile.direct = 0; 10df3b: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 10df42: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10df49: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10df50: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10df57: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10df5e: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 10df65: eb 1f jmp 10df86 case IMFS_FIFO: node->info.fifo.pipe = NULL; 10df67: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) break; 10df6e: eb 16 jmp 10df86 default: assert(0); 10df70: 68 44 e7 11 00 push $0x11e744 <== NOT EXECUTED 10df75: 68 a8 f3 11 00 push $0x11f3a8 <== NOT EXECUTED 10df7a: 6a 5c push $0x5c <== NOT EXECUTED 10df7c: 68 3c f3 11 00 push $0x11f33c <== NOT EXECUTED 10df81: e8 1a 94 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 10df86: 8b 16 mov (%esi),%edx fs_info = parent_loc->mt_entry->fs_info; 10df88: 8b 4e 10 mov 0x10(%esi),%ecx 10df8b: 8b 59 34 mov 0x34(%ecx),%ebx node->Parent = parent; 10df8e: 89 50 08 mov %edx,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10df91: 8b 4b 04 mov 0x4(%ebx),%ecx 10df94: 41 inc %ecx 10df95: 89 4b 04 mov %ecx,0x4(%ebx) 10df98: 89 48 38 mov %ecx,0x38(%eax) 10df9b: 53 push %ebx 10df9c: 53 push %ebx 10df9d: 50 push %eax 10df9e: 83 c2 50 add $0x50,%edx 10dfa1: 52 push %edx 10dfa2: 89 45 e4 mov %eax,-0x1c(%ebp) 10dfa5: e8 4e ce ff ff call 10adf8 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 10dfaa: 83 c4 10 add $0x10,%esp 10dfad: 8b 45 e4 mov -0x1c(%ebp),%eax } 10dfb0: 8d 65 f4 lea -0xc(%ebp),%esp 10dfb3: 5b pop %ebx 10dfb4: 5e pop %esi 10dfb5: 5f pop %edi 10dfb6: c9 leave 10dfb7: c3 ret =============================================================================== 0010de85 : IMFS_jnode_t *IMFS_create_root_node(void) { 10de85: 55 push %ebp 10de86: 89 e5 mov %esp,%ebp 10de88: 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) ); 10de8b: 68 ed 41 00 00 push $0x41ed 10de90: 68 f5 ef 11 00 push $0x11eff5 10de95: 6a 01 push $0x1 10de97: e8 80 ff ff ff call 10de1c if ( !node ) 10de9c: 83 c4 10 add $0x10,%esp 10de9f: 85 c0 test %eax,%eax 10dea1: 74 13 je 10deb6 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10dea3: 8d 50 54 lea 0x54(%eax),%edx 10dea6: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10dea9: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10deb0: 8d 50 50 lea 0x50(%eax),%edx 10deb3: 89 50 58 mov %edx,0x58(%eax) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 10deb6: c9 leave 10deb7: c3 ret =============================================================================== 00108e8b : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 108e8b: 55 push %ebp 108e8c: 89 e5 mov %esp,%ebp 108e8e: 57 push %edi 108e8f: 56 push %esi 108e90: 53 push %ebx 108e91: 83 ec 1c sub $0x1c,%esp 108e94: 8b 45 08 mov 0x8(%ebp),%eax 108e97: 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 ); 108e9a: 85 c0 test %eax,%eax 108e9c: 75 11 jne 108eaf <== ALWAYS TAKEN 108e9e: 68 9a 3f 12 00 push $0x123f9a <== NOT EXECUTED 108ea3: 68 84 40 12 00 push $0x124084 <== NOT EXECUTED 108ea8: 68 84 00 00 00 push $0x84 <== NOT EXECUTED 108ead: eb 13 jmp 108ec2 <== NOT EXECUTED assert( level >= 0 ); 108eaf: 85 f6 test %esi,%esi 108eb1: 79 19 jns 108ecc <== ALWAYS TAKEN 108eb3: 68 a8 3f 12 00 push $0x123fa8 <== NOT EXECUTED 108eb8: 68 84 40 12 00 push $0x124084 <== NOT EXECUTED 108ebd: 68 86 00 00 00 push $0x86 <== NOT EXECUTED 108ec2: 68 ea 3e 12 00 push $0x123eea <== NOT EXECUTED 108ec7: e8 24 07 00 00 call 1095f0 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 108ecc: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 108ed0: 74 11 je 108ee3 <== ALWAYS TAKEN 108ed2: 68 b3 3f 12 00 push $0x123fb3 <== NOT EXECUTED 108ed7: 68 84 40 12 00 push $0x124084 <== NOT EXECUTED 108edc: 68 88 00 00 00 push $0x88 <== NOT EXECUTED 108ee1: eb df jmp 108ec2 <== NOT EXECUTED the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108ee3: 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; 108ee6: 83 c0 54 add $0x54,%eax 108ee9: 89 45 e4 mov %eax,-0x1c(%ebp) for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 108eec: 8d 46 01 lea 0x1(%esi),%eax 108eef: 89 45 e0 mov %eax,-0x20(%ebp) assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108ef2: eb 40 jmp 108f34 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 108ef4: 31 ff xor %edi,%edi for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 108ef6: 51 push %ecx 108ef7: 51 push %ecx 108ef8: a1 20 90 12 00 mov 0x129020,%eax 108efd: ff 70 08 pushl 0x8(%eax) 108f00: 68 d9 3f 12 00 push $0x123fd9 108f05: e8 96 c2 00 00 call 1151a0 !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++ ) 108f0a: 47 inc %edi 108f0b: 83 c4 10 add $0x10,%esp 108f0e: 39 f7 cmp %esi,%edi 108f10: 7e e4 jle 108ef6 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 108f12: 83 ec 0c sub $0xc,%esp 108f15: 53 push %ebx 108f16: e8 53 fe ff ff call 108d6e if ( the_jnode->type == IMFS_DIRECTORY ) 108f1b: 83 c4 10 add $0x10,%esp 108f1e: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 108f22: 75 0e jne 108f32 IMFS_dump_directory( the_jnode, level + 1 ); 108f24: 52 push %edx 108f25: 52 push %edx 108f26: ff 75 e0 pushl -0x20(%ebp) 108f29: 53 push %ebx 108f2a: e8 5c ff ff ff call 108e8b 108f2f: 83 c4 10 add $0x10,%esp the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 108f32: 8b 1b mov (%ebx),%ebx assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108f34: 3b 5d e4 cmp -0x1c(%ebp),%ebx 108f37: 75 bb jne 108ef4 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 108f39: 8d 65 f4 lea -0xc(%ebp),%esp 108f3c: 5b pop %ebx 108f3d: 5e pop %esi 108f3e: 5f pop %edi 108f3f: c9 leave 108f40: c3 ret =============================================================================== 0010e120 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 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 5c sub $0x5c,%esp 10e129: 8b 5d 14 mov 0x14(%ebp),%ebx char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 10e12c: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10e133: 74 19 je 10e14e <== ALWAYS TAKEN assert( 0 ); 10e135: 68 44 e7 11 00 push $0x11e744 <== NOT EXECUTED 10e13a: 68 d8 f3 11 00 push $0x11f3d8 <== NOT EXECUTED 10e13f: 68 f6 01 00 00 push $0x1f6 <== NOT EXECUTED 10e144: 68 e7 f3 11 00 push $0x11f3e7 <== NOT EXECUTED 10e149: e8 52 92 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10e14e: 8b 3b mov (%ebx),%edi 10e150: be 01 00 00 00 mov $0x1,%esi 10e155: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp) /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10e15c: e9 20 01 00 00 jmp 10e281 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10e161: 8d 45 e4 lea -0x1c(%ebp),%eax 10e164: 50 push %eax 10e165: 8d 4d af lea -0x51(%ebp),%ecx 10e168: 51 push %ecx 10e169: ff 75 0c pushl 0xc(%ebp) 10e16c: 8b 45 08 mov 0x8(%ebp),%eax 10e16f: 03 45 a4 add -0x5c(%ebp),%eax 10e172: 50 push %eax 10e173: e8 40 07 00 00 call 10e8b8 10e178: 89 c6 mov %eax,%esi pathnamelen -= len; 10e17a: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 10e17d: 83 c4 10 add $0x10,%esp 10e180: 83 3b 00 cmpl $0x0,(%ebx) 10e183: 0f 84 d4 00 00 00 je 10e25d <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10e189: 85 c0 test %eax,%eax 10e18b: 74 21 je 10e1ae if ( node->type == IMFS_DIRECTORY ) 10e18d: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10e191: 75 1b jne 10e1ae if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10e193: 57 push %edi 10e194: 57 push %edi 10e195: 6a 01 push $0x1 10e197: 53 push %ebx 10e198: 89 55 a0 mov %edx,-0x60(%ebp) 10e19b: e8 60 fe ff ff call 10e000 10e1a0: 83 c4 10 add $0x10,%esp 10e1a3: 85 c0 test %eax,%eax 10e1a5: 8b 55 a0 mov -0x60(%ebp),%edx 10e1a8: 0f 84 44 01 00 00 je 10e2f2 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10e1ae: 29 55 0c sub %edx,0xc(%ebp) i += len; 10e1b1: 01 55 a4 add %edx,-0x5c(%ebp) if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10e1b4: 8b 3b mov (%ebx),%edi switch( type ) { 10e1b6: 83 fe 03 cmp $0x3,%esi 10e1b9: 74 34 je 10e1ef 10e1bb: 83 fe 04 cmp $0x4,%esi 10e1be: 0f 84 b0 00 00 00 je 10e274 10e1c4: 83 fe 02 cmp $0x2,%esi 10e1c7: 0f 85 b4 00 00 00 jne 10e281 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10e1cd: a1 34 34 12 00 mov 0x123434,%eax 10e1d2: 3b 78 18 cmp 0x18(%eax),%edi 10e1d5: 74 8a je 10e161 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10e1d7: 8b 73 10 mov 0x10(%ebx),%esi /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10e1da: 3b 7e 1c cmp 0x1c(%esi),%edi 10e1dd: 75 0b jne 10e1ea */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 10e1df: 8d 7d d0 lea -0x30(%ebp),%edi 10e1e2: 83 c6 08 add $0x8,%esi 10e1e5: e9 b7 00 00 00 jmp 10e2a1 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10e1ea: 8b 7f 08 mov 0x8(%edi),%edi 10e1ed: eb 6a jmp 10e259 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10e1ef: 8b 47 4c mov 0x4c(%edi),%eax 10e1f2: 83 f8 03 cmp $0x3,%eax 10e1f5: 75 15 jne 10e20c IMFS_evaluate_hard_link( pathloc, 0 ); 10e1f7: 51 push %ecx 10e1f8: 51 push %ecx 10e1f9: 6a 00 push $0x0 10e1fb: 53 push %ebx 10e1fc: e8 36 fe ff ff call 10e037 node = pathloc->node_access; 10e201: 8b 3b mov (%ebx),%edi if ( !node ) 10e203: 83 c4 10 add $0x10,%esp 10e206: 85 ff test %edi,%edi 10e208: 75 21 jne 10e22b <== ALWAYS TAKEN 10e20a: eb 25 jmp 10e231 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 10e20c: 83 f8 04 cmp $0x4,%eax 10e20f: 75 1a jne 10e22b result = IMFS_evaluate_sym_link( pathloc, 0 ); 10e211: 52 push %edx 10e212: 52 push %edx 10e213: 6a 00 push $0x0 10e215: 53 push %ebx 10e216: e8 72 fe ff ff call 10e08d 10e21b: 89 c6 mov %eax,%esi node = pathloc->node_access; 10e21d: 8b 3b mov (%ebx),%edi if ( result == -1 ) 10e21f: 83 c4 10 add $0x10,%esp 10e222: 83 f8 ff cmp $0xffffffff,%eax 10e225: 0f 84 d5 00 00 00 je 10e300 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10e22b: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10e22f: 74 10 je 10e241 rtems_set_errno_and_return_minus_one( ENOTDIR ); 10e231: e8 26 37 00 00 call 11195c <__errno> 10e236: c7 00 14 00 00 00 movl $0x14,(%eax) 10e23c: e9 bc 00 00 00 jmp 10e2fd /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 10e241: 8b 77 5c mov 0x5c(%edi),%esi 10e244: 85 f6 test %esi,%esi 10e246: 75 53 jne 10e29b /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10e248: 50 push %eax 10e249: 50 push %eax 10e24a: 8d 45 af lea -0x51(%ebp),%eax 10e24d: 50 push %eax 10e24e: 57 push %edi 10e24f: e8 d8 05 00 00 call 10e82c 10e254: 89 c7 mov %eax,%edi if ( !node ) 10e256: 83 c4 10 add $0x10,%esp 10e259: 85 ff test %edi,%edi 10e25b: 75 10 jne 10e26d rtems_set_errno_and_return_minus_one( ENOENT ); 10e25d: e8 fa 36 00 00 call 11195c <__errno> 10e262: c7 00 02 00 00 00 movl $0x2,(%eax) 10e268: e9 90 00 00 00 jmp 10e2fd /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10e26d: 89 3b mov %edi,(%ebx) 10e26f: e9 ed fe ff ff jmp 10e161 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10e274: e8 e3 36 00 00 call 11195c <__errno> 10e279: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10e27f: eb 7c jmp 10e2fd /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10e281: 83 fe 04 cmp $0x4,%esi 10e284: 74 08 je 10e28e <== NEVER TAKEN 10e286: 85 f6 test %esi,%esi 10e288: 0f 85 d3 fe ff ff jne 10e161 * 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 ) { 10e28e: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10e292: 75 41 jne 10e2d5 if ( node->info.directory.mt_fs != NULL ) { 10e294: 8b 77 5c mov 0x5c(%edi),%esi 10e297: 85 f6 test %esi,%esi 10e299: 74 3a je 10e2d5 newloc = node->info.directory.mt_fs->mt_fs_root; 10e29b: 8d 7d d0 lea -0x30(%ebp),%edi 10e29e: 83 c6 1c add $0x1c,%esi 10e2a1: b9 05 00 00 00 mov $0x5,%ecx 10e2a6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10e2a8: 8d 75 d0 lea -0x30(%ebp),%esi 10e2ab: b1 05 mov $0x5,%cl 10e2ad: 89 df mov %ebx,%edi 10e2af: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10e2b1: 8b 45 e4 mov -0x1c(%ebp),%eax 10e2b4: 8b 53 0c mov 0xc(%ebx),%edx 10e2b7: 53 push %ebx 10e2b8: ff 75 10 pushl 0x10(%ebp) 10e2bb: 8b 4d 0c mov 0xc(%ebp),%ecx 10e2be: 01 c1 add %eax,%ecx 10e2c0: 51 push %ecx 10e2c1: 8b 4d a4 mov -0x5c(%ebp),%ecx 10e2c4: 29 c1 sub %eax,%ecx 10e2c6: 8b 45 08 mov 0x8(%ebp),%eax 10e2c9: 01 c8 add %ecx,%eax 10e2cb: 50 push %eax 10e2cc: ff 12 call *(%edx) 10e2ce: 89 c6 mov %eax,%esi 10e2d0: 83 c4 10 add $0x10,%esp 10e2d3: eb 2b jmp 10e300 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10e2d5: 83 ec 0c sub $0xc,%esp 10e2d8: 53 push %ebx 10e2d9: e8 da fc ff ff call 10dfb8 10e2de: 89 c6 mov %eax,%esi 10e2e0: 59 pop %ecx 10e2e1: 5f pop %edi /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 10e2e2: ff 75 10 pushl 0x10(%ebp) 10e2e5: 53 push %ebx 10e2e6: e8 15 fd ff ff call 10e000 10e2eb: 83 c4 10 add $0x10,%esp 10e2ee: 85 c0 test %eax,%eax 10e2f0: 75 0e jne 10e300 rtems_set_errno_and_return_minus_one( EACCES ); 10e2f2: e8 65 36 00 00 call 11195c <__errno> 10e2f7: c7 00 0d 00 00 00 movl $0xd,(%eax) 10e2fd: 83 ce ff or $0xffffffff,%esi return result; } 10e300: 89 f0 mov %esi,%eax 10e302: 8d 65 f4 lea -0xc(%ebp),%esp 10e305: 5b pop %ebx 10e306: 5e pop %esi 10e307: 5f pop %edi 10e308: c9 leave 10e309: c3 ret =============================================================================== 0010e38d : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 10e38d: 55 push %ebp 10e38e: 89 e5 mov %esp,%ebp 10e390: 57 push %edi 10e391: 56 push %esi 10e392: 53 push %ebx 10e393: 83 ec 5c sub $0x5c,%esp 10e396: 8b 55 0c mov 0xc(%ebp),%edx /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10e399: 8b 1a mov (%edx),%ebx /* * Get the path length. */ pathlen = strlen( path ); 10e39b: 31 c0 xor %eax,%eax 10e39d: 83 c9 ff or $0xffffffff,%ecx 10e3a0: 8b 7d 08 mov 0x8(%ebp),%edi 10e3a3: f2 ae repnz scas %es:(%edi),%al 10e3a5: f7 d1 not %ecx 10e3a7: 49 dec %ecx 10e3a8: 89 4d a0 mov %ecx,-0x60(%ebp) 10e3ab: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 10e3b2: 8d 7d af lea -0x51(%ebp),%edi 10e3b5: 89 d6 mov %edx,%esi 10e3b7: 8d 45 e4 lea -0x1c(%ebp),%eax 10e3ba: 50 push %eax 10e3bb: 57 push %edi 10e3bc: ff 75 a0 pushl -0x60(%ebp) 10e3bf: 8b 45 08 mov 0x8(%ebp),%eax 10e3c2: 03 45 a4 add -0x5c(%ebp),%eax 10e3c5: 50 push %eax 10e3c6: e8 ed 04 00 00 call 10e8b8 10e3cb: 89 c2 mov %eax,%edx pathlen -= len; 10e3cd: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e3d0: 29 4d a0 sub %ecx,-0x60(%ebp) i += len; if ( !pathloc->node_access ) 10e3d3: 83 c4 10 add $0x10,%esp 10e3d6: 83 3e 00 cmpl $0x0,(%esi) 10e3d9: 0f 84 79 01 00 00 je 10e558 <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10e3df: 85 c0 test %eax,%eax 10e3e1: 74 36 je 10e419 if ( node->type == IMFS_DIRECTORY ) 10e3e3: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10e3e7: 75 30 jne 10e419 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10e3e9: 53 push %ebx 10e3ea: 53 push %ebx 10e3eb: 6a 01 push $0x1 10e3ed: 56 push %esi 10e3ee: 89 45 9c mov %eax,-0x64(%ebp) 10e3f1: 89 4d 98 mov %ecx,-0x68(%ebp) 10e3f4: e8 07 fc ff ff call 10e000 10e3f9: 83 c4 10 add $0x10,%esp 10e3fc: 85 c0 test %eax,%eax 10e3fe: 8b 55 9c mov -0x64(%ebp),%edx 10e401: 8b 4d 98 mov -0x68(%ebp),%ecx 10e404: 75 13 jne 10e419 rtems_set_errno_and_return_minus_one( EACCES ); 10e406: e8 51 35 00 00 call 11195c <__errno> 10e40b: c7 00 0d 00 00 00 movl $0xd,(%eax) 10e411: 83 cb ff or $0xffffffff,%ebx 10e414: e9 99 01 00 00 jmp 10e5b2 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 10e419: 01 4d a4 add %ecx,-0x5c(%ebp) if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10e41c: 8b 1e mov (%esi),%ebx switch( type ) { 10e41e: 83 fa 02 cmp $0x2,%edx 10e421: 74 1f je 10e442 10e423: 77 0a ja 10e42f 10e425: 85 d2 test %edx,%edx 10e427: 0f 84 d9 00 00 00 je 10e506 10e42d: eb 88 jmp 10e3b7 10e42f: 83 fa 03 cmp $0x3,%edx 10e432: 74 40 je 10e474 10e434: 83 fa 04 cmp $0x4,%edx 10e437: 0f 85 7a ff ff ff jne 10e3b7 <== NEVER TAKEN 10e43d: e9 d4 00 00 00 jmp 10e516 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10e442: a1 34 34 12 00 mov 0x123434,%eax 10e447: 3b 58 18 cmp 0x18(%eax),%ebx 10e44a: 0f 84 67 ff ff ff je 10e3b7 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 10e450: 8b 46 10 mov 0x10(%esi),%eax 10e453: 3b 58 1c cmp 0x1c(%eax),%ebx 10e456: 75 0c jne 10e464 10e458: 89 f2 mov %esi,%edx 10e45a: 89 c6 mov %eax,%esi if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 10e45c: 8d 7d d0 lea -0x30(%ebp),%edi 10e45f: 83 c6 08 add $0x8,%esi 10e462: eb 5a jmp 10e4be *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 10e464: 8b 5b 08 mov 0x8(%ebx),%ebx 10e467: 85 db test %ebx,%ebx 10e469: 0f 85 90 00 00 00 jne 10e4ff 10e46f: e9 e4 00 00 00 jmp 10e558 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 10e474: 8b 43 4c mov 0x4c(%ebx),%eax 10e477: 83 f8 03 cmp $0x3,%eax 10e47a: 74 05 je 10e481 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 10e47c: 83 f8 04 cmp $0x4,%eax 10e47f: 75 16 jne 10e497 result = IMFS_evaluate_link( pathloc, 0 ); 10e481: 50 push %eax 10e482: 50 push %eax 10e483: 6a 00 push $0x0 10e485: 56 push %esi 10e486: e8 7f fe ff ff call 10e30a if ( result == -1 ) 10e48b: 83 c4 10 add $0x10,%esp 10e48e: 83 f8 ff cmp $0xffffffff,%eax 10e491: 0f 84 19 01 00 00 je 10e5b0 <== NEVER TAKEN return -1; } node = pathloc->node_access; 10e497: 8b 06 mov (%esi),%eax if ( !node ) 10e499: 85 c0 test %eax,%eax 10e49b: 0f 84 e9 00 00 00 je 10e58a <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10e4a1: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10e4a5: 0f 85 df 00 00 00 jne 10e58a /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 10e4ab: 8b 50 5c mov 0x5c(%eax),%edx 10e4ae: 85 d2 test %edx,%edx 10e4b0: 74 3b je 10e4ed 10e4b2: 89 f0 mov %esi,%eax 10e4b4: 89 d6 mov %edx,%esi 10e4b6: 89 c2 mov %eax,%edx newloc = node->info.directory.mt_fs->mt_fs_root; 10e4b8: 8d 7d d0 lea -0x30(%ebp),%edi 10e4bb: 83 c6 1c add $0x1c,%esi 10e4be: b9 05 00 00 00 mov $0x5,%ecx 10e4c3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10e4c5: 8d 75 d0 lea -0x30(%ebp),%esi 10e4c8: b1 05 mov $0x5,%cl 10e4ca: 89 d7 mov %edx,%edi 10e4cc: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10e4ce: 56 push %esi 10e4cf: 8b 42 0c mov 0xc(%edx),%eax 10e4d2: ff 75 10 pushl 0x10(%ebp) 10e4d5: 52 push %edx 10e4d6: 8b 55 a4 mov -0x5c(%ebp),%edx 10e4d9: 2b 55 e4 sub -0x1c(%ebp),%edx 10e4dc: 03 55 08 add 0x8(%ebp),%edx 10e4df: 52 push %edx 10e4e0: ff 50 04 call *0x4(%eax) 10e4e3: 89 c3 mov %eax,%ebx 10e4e5: 83 c4 10 add $0x10,%esp 10e4e8: e9 c5 00 00 00 jmp 10e5b2 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10e4ed: 53 push %ebx 10e4ee: 53 push %ebx 10e4ef: 57 push %edi 10e4f0: 50 push %eax 10e4f1: e8 36 03 00 00 call 10e82c 10e4f6: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 10e4f8: 83 c4 10 add $0x10,%esp 10e4fb: 85 c0 test %eax,%eax 10e4fd: 74 27 je 10e526 done = true; else pathloc->node_access = node; 10e4ff: 89 1e mov %ebx,(%esi) 10e501: e9 b1 fe ff ff jmp 10e3b7 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 10e506: e8 51 34 00 00 call 11195c <__errno> 10e50b: c7 00 11 00 00 00 movl $0x11,(%eax) 10e511: e9 fb fe ff ff jmp 10e411 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10e516: e8 41 34 00 00 call 11195c <__errno> 10e51b: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10e521: e9 eb fe ff ff jmp 10e411 10e526: 89 f2 mov %esi,%edx case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 10e528: 8b 45 a4 mov -0x5c(%ebp),%eax 10e52b: 2b 45 e4 sub -0x1c(%ebp),%eax 10e52e: 03 45 08 add 0x8(%ebp),%eax 10e531: 8b 4d 10 mov 0x10(%ebp),%ecx 10e534: 89 01 mov %eax,(%ecx) 10e536: 8b 5d 08 mov 0x8(%ebp),%ebx 10e539: 03 5d a4 add -0x5c(%ebp),%ebx /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 10e53c: eb 2a jmp 10e568 if ( !IMFS_is_separator( path[ i ] ) ) 10e53e: 83 ec 0c sub $0xc,%esp 10e541: 0f be c0 movsbl %al,%eax 10e544: 50 push %eax 10e545: 89 55 9c mov %edx,-0x64(%ebp) 10e548: e8 97 9e ff ff call 1083e4 10e54d: 43 inc %ebx 10e54e: 83 c4 10 add $0x10,%esp 10e551: 85 c0 test %eax,%eax 10e553: 8b 55 9c mov -0x64(%ebp),%edx 10e556: 75 10 jne 10e568 rtems_set_errno_and_return_minus_one( ENOENT ); 10e558: e8 ff 33 00 00 call 11195c <__errno> 10e55d: c7 00 02 00 00 00 movl $0x2,(%eax) 10e563: e9 a9 fe ff ff jmp 10e411 /* * 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++) { 10e568: 8a 03 mov (%ebx),%al 10e56a: 84 c0 test %al,%al 10e56c: 75 d0 jne 10e53e /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 10e56e: 83 ec 0c sub $0xc,%esp 10e571: 52 push %edx 10e572: 89 55 9c mov %edx,-0x64(%ebp) 10e575: e8 3e fa ff ff call 10dfb8 10e57a: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; 10e57c: 8b 55 9c mov -0x64(%ebp),%edx 10e57f: 8b 02 mov (%edx),%eax 10e581: 83 c4 10 add $0x10,%esp 10e584: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10e588: 74 10 je 10e59a <== ALWAYS TAKEN if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10e58a: e8 cd 33 00 00 call 11195c <__errno> 10e58f: c7 00 14 00 00 00 movl $0x14,(%eax) 10e595: e9 77 fe ff ff jmp 10e411 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 10e59a: 51 push %ecx 10e59b: 51 push %ecx 10e59c: 6a 03 push $0x3 10e59e: 52 push %edx 10e59f: e8 5c fa ff ff call 10e000 10e5a4: 83 c4 10 add $0x10,%esp 10e5a7: 85 c0 test %eax,%eax 10e5a9: 75 07 jne 10e5b2 10e5ab: e9 56 fe ff ff jmp 10e406 10e5b0: 89 c3 mov %eax,%ebx <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10e5b2: 89 d8 mov %ebx,%eax 10e5b4: 8d 65 f4 lea -0xc(%ebp),%esp 10e5b7: 5b pop %ebx 10e5b8: 5e pop %esi 10e5b9: 5f pop %edi 10e5ba: c9 leave 10e5bb: c3 ret =============================================================================== 0010e037 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10e037: 55 push %ebp 10e038: 89 e5 mov %esp,%ebp 10e03a: 53 push %ebx 10e03b: 83 ec 04 sub $0x4,%esp 10e03e: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10e041: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10e043: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10e047: 74 0d je 10e056 <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 10e049: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e04c: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10e051: e8 46 cb ff ff call 10ab9c <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10e056: 8b 40 50 mov 0x50(%eax),%eax 10e059: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10e05b: 83 ec 0c sub $0xc,%esp 10e05e: 53 push %ebx 10e05f: e8 54 ff ff ff call 10dfb8 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10e064: 58 pop %eax 10e065: 5a pop %edx 10e066: ff 75 0c pushl 0xc(%ebp) 10e069: 53 push %ebx 10e06a: e8 91 ff ff ff call 10e000 10e06f: 89 c2 mov %eax,%edx 10e071: 83 c4 10 add $0x10,%esp 10e074: 31 c0 xor %eax,%eax 10e076: 85 d2 test %edx,%edx 10e078: 75 0e jne 10e088 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 10e07a: e8 dd 38 00 00 call 11195c <__errno> <== NOT EXECUTED 10e07f: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10e085: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return result; } 10e088: 8b 5d fc mov -0x4(%ebp),%ebx 10e08b: c9 leave 10e08c: c3 ret =============================================================================== 0010e000 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10e000: 55 push %ebp 10e001: 89 e5 mov %esp,%ebp 10e003: 83 ec 08 sub $0x8,%esp 10e006: 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 ) ) 10e009: a9 f8 ff ff ff test $0xfffffff8,%eax 10e00e: 74 10 je 10e020 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 10e010: e8 47 39 00 00 call 11195c <__errno> <== NOT EXECUTED 10e015: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10e01b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10e01e: eb 15 jmp 10e035 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10e020: c1 e0 06 shl $0x6,%eax 10e023: 8b 55 08 mov 0x8(%ebp),%edx 10e026: 8b 12 mov (%edx),%edx 10e028: 8b 52 30 mov 0x30(%edx),%edx 10e02b: 21 c2 and %eax,%edx 10e02d: 39 c2 cmp %eax,%edx 10e02f: 0f 94 c0 sete %al 10e032: 0f b6 c0 movzbl %al,%eax return 1; return 0; } 10e035: c9 leave 10e036: c3 ret =============================================================================== 0010e08d : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10e08d: 55 push %ebp 10e08e: 89 e5 mov %esp,%ebp 10e090: 57 push %edi 10e091: 56 push %esi 10e092: 53 push %ebx 10e093: 83 ec 1c sub $0x1c,%esp 10e096: 8b 5d 08 mov 0x8(%ebp),%ebx 10e099: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode = node->node_access; 10e09c: 8b 3b mov (%ebx),%edi /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10e09e: 83 7f 4c 04 cmpl $0x4,0x4c(%edi) 10e0a2: 74 0a je 10e0ae <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 10e0a4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e0a7: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10e0ac: eb 0f jmp 10e0bd <== NOT EXECUTED if ( !jnode->Parent ) 10e0ae: 8b 47 08 mov 0x8(%edi),%eax 10e0b1: 85 c0 test %eax,%eax 10e0b3: 75 0d jne 10e0c2 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xBAD00000 ); 10e0b5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e0b8: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 10e0bd: e8 da ca ff ff call 10ab9c <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 10e0c2: 89 03 mov %eax,(%ebx) rtems_filesystem_get_sym_start_loc( 10e0c4: 52 push %edx 10e0c5: 53 push %ebx 10e0c6: 8d 45 e4 lea -0x1c(%ebp),%eax 10e0c9: 50 push %eax 10e0ca: ff 77 50 pushl 0x50(%edi) 10e0cd: e8 66 0f 00 00 call 10f038 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10e0d2: 8b 57 50 mov 0x50(%edi),%edx 10e0d5: 03 55 e4 add -0x1c(%ebp),%edx 10e0d8: 31 c0 xor %eax,%eax 10e0da: 83 c9 ff or $0xffffffff,%ecx 10e0dd: 89 d7 mov %edx,%edi 10e0df: f2 ae repnz scas %es:(%edi),%al 10e0e1: f7 d1 not %ecx 10e0e3: 49 dec %ecx 10e0e4: 53 push %ebx 10e0e5: 56 push %esi 10e0e6: 51 push %ecx 10e0e7: 52 push %edx 10e0e8: e8 33 00 00 00 call 10e120 10e0ed: 89 c7 mov %eax,%edi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10e0ef: 83 c4 14 add $0x14,%esp 10e0f2: 53 push %ebx 10e0f3: e8 c0 fe ff ff call 10dfb8 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10e0f8: 59 pop %ecx 10e0f9: 58 pop %eax 10e0fa: 56 push %esi 10e0fb: 53 push %ebx 10e0fc: e8 ff fe ff ff call 10e000 10e101: 83 c4 10 add $0x10,%esp 10e104: 85 c0 test %eax,%eax 10e106: 75 0e jne 10e116 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 10e108: e8 4f 38 00 00 call 11195c <__errno> <== NOT EXECUTED 10e10d: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10e113: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED return result; } 10e116: 89 f8 mov %edi,%eax 10e118: 8d 65 f4 lea -0xc(%ebp),%esp 10e11b: 5b pop %ebx 10e11c: 5e pop %esi 10e11d: 5f pop %edi 10e11e: c9 leave 10e11f: c3 ret =============================================================================== 0010e705 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 10e705: 55 push %ebp <== NOT EXECUTED 10e706: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e708: 57 push %edi <== NOT EXECUTED 10e709: 56 push %esi <== NOT EXECUTED 10e70a: 53 push %ebx <== NOT EXECUTED 10e70b: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 10e70e: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10e711: 8b 77 38 mov 0x38(%edi),%esi <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 10e714: 57 push %edi <== NOT EXECUTED 10e715: 8d 46 50 lea 0x50(%esi),%eax <== NOT EXECUTED 10e718: 50 push %eax <== NOT EXECUTED 10e719: e8 ce f2 ff ff call 10d9ec <== NOT EXECUTED 10e71e: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (! err) { 10e720: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e723: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10e726: 75 2c jne 10e754 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 10e728: 81 67 14 ff fe ff ff andl $0xfffffeff,0x14(%edi) <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 10e72f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e732: 56 push %esi <== NOT EXECUTED 10e733: e8 f6 04 00 00 call 10ec2e <== NOT EXECUTED 10e738: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e73b: 85 c0 test %eax,%eax <== NOT EXECUTED 10e73d: 75 23 jne 10e762 <== NOT EXECUTED 10e73f: 66 83 7e 34 00 cmpw $0x0,0x34(%esi) <== NOT EXECUTED 10e744: 75 1c jne 10e762 <== NOT EXECUTED free(jnode); 10e746: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e749: 56 push %esi <== NOT EXECUTED 10e74a: e8 4d 8f ff ff call 10769c <== NOT EXECUTED 10e74f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e752: eb 0e jmp 10e762 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10e754: 7d 0c jge 10e762 <== NOT EXECUTED 10e756: e8 01 32 00 00 call 11195c <__errno> <== NOT EXECUTED 10e75b: f7 db neg %ebx <== NOT EXECUTED 10e75d: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e75f: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e762: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e764: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e767: 5b pop %ebx <== NOT EXECUTED 10e768: 5e pop %esi <== NOT EXECUTED 10e769: 5f pop %edi <== NOT EXECUTED 10e76a: c9 leave <== NOT EXECUTED 10e76b: c3 ret <== NOT EXECUTED =============================================================================== 0010e5f8 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 10e5f8: 55 push %ebp <== NOT EXECUTED 10e5f9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e5fb: 53 push %ebx <== NOT EXECUTED 10e5fc: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 10e5ff: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10e602: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 10e605: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED int err; if (command == FIONBIO) { 10e608: 81 f9 7e 66 04 80 cmp $0x8004667e,%ecx <== NOT EXECUTED 10e60e: 75 1c jne 10e62c <== NOT EXECUTED if (buffer == NULL) 10e610: bb f2 ff ff ff mov $0xfffffff2,%ebx <== NOT EXECUTED 10e615: 85 d2 test %edx,%edx <== NOT EXECUTED 10e617: 74 2a je 10e643 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 10e619: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 10e61c: 74 06 je 10e624 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 10e61e: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED 10e622: eb 04 jmp 10e628 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 10e624: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED 10e628: 31 db xor %ebx,%ebx <== NOT EXECUTED 10e62a: eb 23 jmp 10e64f <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 10e62c: 50 push %eax <== NOT EXECUTED 10e62d: 52 push %edx <== NOT EXECUTED 10e62e: 51 push %ecx <== NOT EXECUTED 10e62f: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10e632: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10e635: e8 2d f0 ff ff call 10d667 <== NOT EXECUTED 10e63a: 89 c3 mov %eax,%ebx <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10e63c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e63f: 85 c0 test %eax,%eax <== NOT EXECUTED 10e641: 79 0c jns 10e64f <== NOT EXECUTED 10e643: e8 14 33 00 00 call 11195c <__errno> <== NOT EXECUTED 10e648: f7 db neg %ebx <== NOT EXECUTED 10e64a: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e64c: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e64f: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e651: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e654: c9 leave <== NOT EXECUTED 10e655: c3 ret <== NOT EXECUTED =============================================================================== 0010e5bc : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 10e5bc: 55 push %ebp <== NOT EXECUTED 10e5bd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e5bf: 53 push %ebx <== NOT EXECUTED 10e5c0: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10e5c3: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 10e5c6: 50 push %eax <== NOT EXECUTED 10e5c7: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 10e5ca: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10e5cd: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10e5d0: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10e5d3: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10e5d6: e8 35 f0 ff ff call 10d610 <== NOT EXECUTED 10e5db: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10e5dd: 99 cltd <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10e5de: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10e5e1: 85 d2 test %edx,%edx <== NOT EXECUTED 10e5e3: 79 0e jns 10e5f3 <== NOT EXECUTED 10e5e5: e8 72 33 00 00 call 11195c <__errno> <== NOT EXECUTED 10e5ea: f7 db neg %ebx <== NOT EXECUTED 10e5ec: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e5ee: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10e5f1: 89 c2 mov %eax,%edx <== NOT EXECUTED } 10e5f3: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e5f6: c9 leave <== NOT EXECUTED 10e5f7: c3 ret <== NOT EXECUTED =============================================================================== 0010e76c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10e76c: 55 push %ebp 10e76d: 89 e5 mov %esp,%ebp 10e76f: 53 push %ebx 10e770: 83 ec 0c sub $0xc,%esp 10e773: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 10e776: 50 push %eax 10e777: 8b 40 38 mov 0x38(%eax),%eax 10e77a: 83 c0 50 add $0x50,%eax 10e77d: 50 push %eax 10e77e: e8 39 f3 ff ff call 10dabc 10e783: 89 c3 mov %eax,%ebx IMFS_FIFO_RETURN(err); 10e785: 83 c4 10 add $0x10,%esp 10e788: 85 c0 test %eax,%eax 10e78a: 79 0c jns 10e798 <== NEVER TAKEN 10e78c: e8 cb 31 00 00 call 11195c <__errno> 10e791: f7 db neg %ebx 10e793: 89 18 mov %ebx,(%eax) 10e795: 83 cb ff or $0xffffffff,%ebx } 10e798: 89 d8 mov %ebx,%eax 10e79a: 8b 5d fc mov -0x4(%ebp),%ebx 10e79d: c9 leave 10e79e: c3 ret =============================================================================== 0010e6af : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10e6af: 55 push %ebp <== NOT EXECUTED 10e6b0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e6b2: 56 push %esi <== NOT EXECUTED 10e6b3: 53 push %ebx <== NOT EXECUTED 10e6b4: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10e6b7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10e6ba: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 10e6bd: 50 push %eax <== NOT EXECUTED 10e6be: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10e6c1: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10e6c4: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10e6c7: e8 83 f1 ff ff call 10d84f <== NOT EXECUTED 10e6cc: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) 10e6ce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e6d1: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10e6d4: 7e 18 jle 10e6ee <== NOT EXECUTED IMFS_update_atime(jnode); 10e6d6: 52 push %edx <== NOT EXECUTED 10e6d7: 52 push %edx <== NOT EXECUTED 10e6d8: 6a 00 push $0x0 <== NOT EXECUTED 10e6da: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10e6dd: 50 push %eax <== NOT EXECUTED 10e6de: e8 31 90 ff ff call 107714 <== NOT EXECUTED 10e6e3: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10e6e6: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED 10e6e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e6ec: eb 0e jmp 10e6fc <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10e6ee: 74 0c je 10e6fc <== NOT EXECUTED 10e6f0: e8 67 32 00 00 call 11195c <__errno> <== NOT EXECUTED 10e6f5: f7 db neg %ebx <== NOT EXECUTED 10e6f7: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e6f9: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e6fc: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e6fe: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10e701: 5b pop %ebx <== NOT EXECUTED 10e702: 5e pop %esi <== NOT EXECUTED 10e703: c9 leave <== NOT EXECUTED 10e704: c3 ret <== NOT EXECUTED =============================================================================== 0010e656 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10e656: 55 push %ebp <== NOT EXECUTED 10e657: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e659: 56 push %esi <== NOT EXECUTED 10e65a: 53 push %ebx <== NOT EXECUTED 10e65b: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10e65e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10e661: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 10e664: 50 push %eax <== NOT EXECUTED 10e665: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10e668: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10e66b: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10e66e: e8 4a f0 ff ff call 10d6bd <== NOT EXECUTED 10e673: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) { 10e675: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e678: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10e67b: 7e 1b jle 10e698 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 10e67d: 50 push %eax <== NOT EXECUTED 10e67e: 50 push %eax <== NOT EXECUTED 10e67f: 6a 00 push $0x0 <== NOT EXECUTED 10e681: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10e684: 50 push %eax <== NOT EXECUTED 10e685: e8 8a 90 ff ff call 107714 <== NOT EXECUTED 10e68a: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10e68d: 89 46 44 mov %eax,0x44(%esi) <== NOT EXECUTED 10e690: 89 46 48 mov %eax,0x48(%esi) <== NOT EXECUTED 10e693: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e696: eb 0e jmp 10e6a6 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10e698: 74 0c je 10e6a6 <== NOT EXECUTED 10e69a: e8 bd 32 00 00 call 11195c <__errno> <== NOT EXECUTED 10e69f: f7 db neg %ebx <== NOT EXECUTED 10e6a1: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e6a3: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e6a6: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e6a8: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10e6ab: 5b pop %ebx <== NOT EXECUTED 10e6ac: 5e pop %esi <== NOT EXECUTED 10e6ad: c9 leave <== NOT EXECUTED 10e6ae: c3 ret <== NOT EXECUTED =============================================================================== 0010e82c : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 10e82c: 55 push %ebp 10e82d: 89 e5 mov %esp,%ebp 10e82f: 57 push %edi 10e830: 56 push %esi 10e831: 53 push %ebx 10e832: 83 ec 0c sub $0xc,%esp 10e835: 8b 5d 08 mov 0x8(%ebp),%ebx 10e838: 8b 7d 0c mov 0xc(%ebp),%edi /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 10e83b: 85 db test %ebx,%ebx 10e83d: 75 16 jne 10e855 <== ALWAYS TAKEN 10e83f: 68 6c f4 11 00 push $0x11f46c <== NOT EXECUTED 10e844: 68 d0 f4 11 00 push $0x11f4d0 <== NOT EXECUTED 10e849: 6a 2a push $0x2a <== NOT EXECUTED 10e84b: 68 76 f4 11 00 push $0x11f476 <== NOT EXECUTED 10e850: e8 4b 8b ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( !name ) 10e855: 85 ff test %edi,%edi 10e857: 74 52 je 10e8ab <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 10e859: 56 push %esi 10e85a: 56 push %esi 10e85b: 68 c8 f4 11 00 push $0x11f4c8 10e860: 57 push %edi 10e861: e8 12 3c 00 00 call 112478 10e866: 83 c4 10 add $0x10,%esp 10e869: 85 c0 test %eax,%eax 10e86b: 74 40 je 10e8ad <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 10e86d: 51 push %ecx 10e86e: 51 push %ecx 10e86f: 68 ca f4 11 00 push $0x11f4ca 10e874: 57 push %edi 10e875: e8 fe 3b 00 00 call 112478 10e87a: 83 c4 10 add $0x10,%esp 10e87d: 85 c0 test %eax,%eax 10e87f: 75 05 jne 10e886 <== ALWAYS TAKEN return directory->Parent; 10e881: 8b 5b 08 mov 0x8(%ebx),%ebx <== NOT EXECUTED 10e884: eb 27 jmp 10e8ad <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10e886: 8b 73 50 mov 0x50(%ebx),%esi 10e889: 83 c3 54 add $0x54,%ebx 10e88c: eb 19 jmp 10e8a7 !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 ) ) 10e88e: 8d 46 0c lea 0xc(%esi),%eax 10e891: 52 push %edx 10e892: 52 push %edx 10e893: 50 push %eax 10e894: 57 push %edi 10e895: e8 de 3b 00 00 call 112478 10e89a: 83 c4 10 add $0x10,%esp 10e89d: 85 c0 test %eax,%eax 10e89f: 75 04 jne 10e8a5 10e8a1: 89 f3 mov %esi,%ebx 10e8a3: eb 08 jmp 10e8ad the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 10e8a5: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10e8a7: 39 de cmp %ebx,%esi 10e8a9: 75 e3 jne 10e88e 10e8ab: 31 db xor %ebx,%ebx if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10e8ad: 89 d8 mov %ebx,%eax 10e8af: 8d 65 f4 lea -0xc(%ebp),%esp 10e8b2: 5b pop %ebx 10e8b3: 5e pop %esi 10e8b4: 5f pop %edi 10e8b5: c9 leave 10e8b6: c3 ret =============================================================================== 0010e7a8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 10e7a8: 55 push %ebp 10e7a9: 89 e5 mov %esp,%ebp 10e7ab: 57 push %edi 10e7ac: 56 push %esi 10e7ad: 53 push %ebx 10e7ae: 83 ec 2c sub $0x2c,%esp 10e7b1: 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; 10e7b4: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 10e7b7: 8d 7d d4 lea -0x2c(%ebp),%edi 10e7ba: 8d 70 1c lea 0x1c(%eax),%esi 10e7bd: b9 05 00 00 00 mov $0x5,%ecx 10e7c2: 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; 10e7c4: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 10e7cb: 8d 75 d4 lea -0x2c(%ebp),%esi */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 10e7ce: 8b 7b 08 mov 0x8(%ebx),%edi loc.node_access = (void *)jnode; 10e7d1: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 10e7d4: 83 ec 0c sub $0xc,%esp 10e7d7: 56 push %esi 10e7d8: e8 db f7 ff ff call 10dfb8 if ( jnode->type != IMFS_DIRECTORY ) { 10e7dd: 83 c4 10 add $0x10,%esp 10e7e0: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10e7e4: 75 08 jne 10e7ee */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e7e6: 8d 43 54 lea 0x54(%ebx),%eax 10e7e9: 39 43 50 cmp %eax,0x50(%ebx) 10e7ec: 75 13 jne 10e801 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 10e7ee: 50 push %eax 10e7ef: 50 push %eax 10e7f0: 56 push %esi 10e7f1: 6a 00 push $0x0 10e7f3: e8 98 89 ff ff call 107190 if (result != 0) 10e7f8: 83 c4 10 add $0x10,%esp 10e7fb: 85 c0 test %eax,%eax 10e7fd: 75 1d jne 10e81c <== NEVER TAKEN 10e7ff: 89 fb mov %edi,%ebx return -1; jnode = next; } if ( jnode != NULL ) { 10e801: 85 db test %ebx,%ebx 10e803: 74 1c je 10e821 if ( jnode->type == IMFS_DIRECTORY ) { 10e805: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10e809: 75 c3 jne 10e7ce <== NEVER TAKEN 10e80b: 8d 43 54 lea 0x54(%ebx),%eax 10e80e: 39 43 50 cmp %eax,0x50(%ebx) 10e811: 74 bb je 10e7ce if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 10e813: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 10e816: 85 db test %ebx,%ebx 10e818: 75 b4 jne 10e7ce <== ALWAYS TAKEN 10e81a: eb 05 jmp 10e821 <== NOT EXECUTED 10e81c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10e81f: eb 02 jmp 10e823 <== NOT EXECUTED 10e821: 31 c0 xor %eax,%eax return 0; } 10e823: 8d 65 f4 lea -0xc(%ebp),%esp 10e826: 5b pop %ebx 10e827: 5e pop %esi 10e828: 5f pop %edi 10e829: c9 leave 10e82a: c3 ret =============================================================================== 0010e8b8 : const char *path, int pathlen, char *token, int *token_len ) { 10e8b8: 55 push %ebp 10e8b9: 89 e5 mov %esp,%ebp 10e8bb: 57 push %edi 10e8bc: 56 push %esi 10e8bd: 53 push %ebx 10e8be: 83 ec 1c sub $0x1c,%esp 10e8c1: 8b 7d 08 mov 0x8(%ebp),%edi 10e8c4: 8b 75 10 mov 0x10(%ebp),%esi register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 10e8c7: 8a 17 mov (%edi),%dl 10e8c9: 31 db xor %ebx,%ebx while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10e8cb: eb 16 jmp 10e8e3 token[i] = c; 10e8cd: 88 14 1e mov %dl,(%esi,%ebx,1) if ( i == IMFS_NAME_MAX ) 10e8d0: 83 fb 20 cmp $0x20,%ebx 10e8d3: 75 0a jne 10e8df 10e8d5: bf 04 00 00 00 mov $0x4,%edi 10e8da: e9 8c 00 00 00 jmp 10e96b return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 10e8df: 43 inc %ebx 10e8e0: 8a 14 1f mov (%edi,%ebx,1),%dl /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10e8e3: 83 ec 0c sub $0xc,%esp 10e8e6: 0f be c2 movsbl %dl,%eax 10e8e9: 50 push %eax 10e8ea: 88 55 e4 mov %dl,-0x1c(%ebp) 10e8ed: e8 f2 9a ff ff call 1083e4 10e8f2: 83 c4 10 add $0x10,%esp 10e8f5: 85 c0 test %eax,%eax 10e8f7: 8a 55 e4 mov -0x1c(%ebp),%dl 10e8fa: 75 05 jne 10e901 10e8fc: 3b 5d 0c cmp 0xc(%ebp),%ebx 10e8ff: 7c cc jl 10e8cd /* * Copy a seperator into token. */ if ( i == 0 ) { 10e901: 85 db test %ebx,%ebx 10e903: 75 19 jne 10e91e token[i] = c; 10e905: 88 16 mov %dl,(%esi) if ( (token[i] != '\0') && pathlen ) { 10e907: 84 d2 test %dl,%dl 10e909: 74 0f je 10e91a 10e90b: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10e90f: 74 09 je 10e91a 10e911: bf 01 00 00 00 mov $0x1,%edi 10e916: b3 01 mov $0x1,%bl 10e918: eb 14 jmp 10e92e 10e91a: 31 ff xor %edi,%edi 10e91c: eb 10 jmp 10e92e i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10e91e: bf 03 00 00 00 mov $0x3,%edi 10e923: 80 7c 1e ff 00 cmpb $0x0,-0x1(%esi,%ebx,1) 10e928: 74 04 je 10e92e <== NEVER TAKEN token[i] = '\0'; 10e92a: c6 04 1e 00 movb $0x0,(%esi,%ebx,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 10e92e: 8b 45 14 mov 0x14(%ebp),%eax 10e931: 89 18 mov %ebx,(%eax) /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 10e933: 83 ff 03 cmp $0x3,%edi 10e936: 75 33 jne 10e96b if ( strcmp( token, "..") == 0 ) 10e938: 52 push %edx 10e939: 52 push %edx 10e93a: 68 e7 f4 11 00 push $0x11f4e7 10e93f: 56 push %esi 10e940: e8 33 3b 00 00 call 112478 10e945: 83 c4 10 add $0x10,%esp 10e948: 85 c0 test %eax,%eax 10e94a: 75 06 jne 10e952 10e94c: 66 bf 02 00 mov $0x2,%di 10e950: eb 19 jmp 10e96b type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 10e952: 50 push %eax 10e953: 50 push %eax 10e954: 68 e8 f4 11 00 push $0x11f4e8 10e959: 56 push %esi 10e95a: e8 19 3b 00 00 call 112478 10e95f: 83 c4 10 add $0x10,%esp 10e962: 85 c0 test %eax,%eax 10e964: 75 05 jne 10e96b 10e966: bf 01 00 00 00 mov $0x1,%edi type = IMFS_CURRENT_DIR; } return type; } 10e96b: 89 f8 mov %edi,%eax 10e96d: 8d 65 f4 lea -0xc(%ebp),%esp 10e970: 5b pop %ebx 10e971: 5e pop %esi 10e972: 5f pop %edi 10e973: c9 leave 10e974: c3 ret =============================================================================== 00106e10 : rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 106e10: 55 push %ebp 106e11: 89 e5 mov %esp,%ebp 106e13: 57 push %edi 106e14: 56 push %esi 106e15: 53 push %ebx 106e16: 83 ec 0c sub $0xc,%esp 106e19: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 106e1c: 8b 0d 28 16 12 00 mov 0x121628,%ecx 106e22: 31 d2 xor %edx,%edx 106e24: b8 10 00 00 00 mov $0x10,%eax int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 106e29: 39 c8 cmp %ecx,%eax 106e2b: 74 0d je 106e3a 106e2d: d1 e0 shl %eax 106e2f: 42 inc %edx 106e30: 83 fa 06 cmp $0x6,%edx 106e33: 75 f4 jne 106e29 <== ALWAYS TAKEN 106e35: b8 80 00 00 00 mov $0x80,%eax <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 106e3a: a3 ec 51 12 00 mov %eax,0x1251ec /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 106e3f: e8 41 70 00 00 call 10de85 106e44: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 106e47: 8b 45 14 mov 0x14(%ebp),%eax 106e4a: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 106e4d: 8b 45 0c mov 0xc(%ebp),%eax 106e50: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 106e53: 8d 7b 38 lea 0x38(%ebx),%edi 106e56: be 0c f3 11 00 mov $0x11f30c,%esi 106e5b: b9 0c 00 00 00 mov $0xc,%ecx 106e60: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 106e62: 50 push %eax 106e63: 50 push %eax 106e64: 6a 10 push $0x10 106e66: 6a 01 push $0x1 106e68: e8 4f 06 00 00 call 1074bc if ( !fs_info ) { 106e6d: 83 c4 10 add $0x10,%esp 106e70: 85 c0 test %eax,%eax 106e72: 75 1e jne 106e92 <== ALWAYS TAKEN free(temp_mt_entry->mt_fs_root.node_access); 106e74: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106e77: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED 106e7a: e8 1d 08 00 00 call 10769c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 106e7f: e8 d8 aa 00 00 call 11195c <__errno> <== NOT EXECUTED 106e84: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106e8a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106e8d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106e90: eb 36 jmp 106ec8 <== NOT EXECUTED } temp_mt_entry->fs_info = fs_info; 106e92: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 106e95: 8b 15 f0 51 12 00 mov 0x1251f0,%edx 106e9b: 89 10 mov %edx,(%eax) 106e9d: 42 inc %edx 106e9e: 89 15 f0 51 12 00 mov %edx,0x1251f0 fs_info->ino_count = 1; 106ea4: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 106eab: 8b 55 10 mov 0x10(%ebp),%edx 106eae: 89 50 08 mov %edx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 106eb1: 8b 55 14 mov 0x14(%ebp),%edx 106eb4: 89 50 0c mov %edx,0xc(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 106eb7: 8b 43 1c mov 0x1c(%ebx),%eax 106eba: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 106ec1: e8 54 67 00 00 call 10d61a 106ec6: 31 c0 xor %eax,%eax return 0; } 106ec8: 8d 65 f4 lea -0xc(%ebp),%esp 106ecb: 5b pop %ebx 106ecc: 5e pop %esi 106ecd: 5f pop %edi 106ece: c9 leave 106ecf: c3 ret =============================================================================== 00106ed0 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 106ed0: 55 push %ebp 106ed1: 89 e5 mov %esp,%ebp 106ed3: 57 push %edi 106ed4: 53 push %ebx 106ed5: 83 ec 50 sub $0x50,%esp 106ed8: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 106edb: 8b 45 08 mov 0x8(%ebp),%eax 106ede: 8b 00 mov (%eax),%eax 106ee0: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 106ee3: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 106ee8: 76 0d jbe 106ef7 rtems_set_errno_and_return_minus_one( EMLINK ); 106eea: e8 6d aa 00 00 call 11195c <__errno> 106eef: c7 00 1f 00 00 00 movl $0x1f,(%eax) 106ef5: eb 43 jmp 106f3a /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 106ef7: 31 c0 xor %eax,%eax 106ef9: 83 c9 ff or $0xffffffff,%ecx 106efc: 89 d7 mov %edx,%edi 106efe: f2 ae repnz scas %es:(%edi),%al 106f00: f7 d1 not %ecx 106f02: 49 dec %ecx 106f03: 8d 45 f4 lea -0xc(%ebp),%eax 106f06: 50 push %eax 106f07: 8d 5d b7 lea -0x49(%ebp),%ebx 106f0a: 53 push %ebx 106f0b: 51 push %ecx 106f0c: 52 push %edx 106f0d: e8 a6 79 00 00 call 10e8b8 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 106f12: 8d 45 d8 lea -0x28(%ebp),%eax 106f15: 89 04 24 mov %eax,(%esp) 106f18: 68 ff a1 00 00 push $0xa1ff 106f1d: 53 push %ebx 106f1e: 6a 03 push $0x3 106f20: ff 75 0c pushl 0xc(%ebp) 106f23: e8 90 6f 00 00 call 10deb8 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 106f28: 83 c4 20 add $0x20,%esp 106f2b: 85 c0 test %eax,%eax 106f2d: 75 10 jne 106f3f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106f2f: e8 28 aa 00 00 call 11195c <__errno> <== NOT EXECUTED 106f34: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106f3a: 83 c8 ff or $0xffffffff,%eax 106f3d: eb 22 jmp 106f61 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 106f3f: 8b 45 d8 mov -0x28(%ebp),%eax 106f42: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 106f46: 50 push %eax 106f47: 50 push %eax 106f48: 6a 00 push $0x0 106f4a: 8d 45 ec lea -0x14(%ebp),%eax 106f4d: 50 push %eax 106f4e: e8 c1 07 00 00 call 107714 106f53: 8b 55 ec mov -0x14(%ebp),%edx 106f56: 8b 45 d8 mov -0x28(%ebp),%eax 106f59: 89 50 48 mov %edx,0x48(%eax) 106f5c: 31 c0 xor %eax,%eax return 0; 106f5e: 83 c4 10 add $0x10,%esp } 106f61: 8d 65 f8 lea -0x8(%ebp),%esp 106f64: 5b pop %ebx 106f65: 5f pop %edi 106f66: c9 leave 106f67: c3 ret =============================================================================== 001104f4 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 1104f4: 55 push %ebp 1104f5: 89 e5 mov %esp,%ebp 1104f7: 53 push %ebx 1104f8: 83 ec 04 sub $0x4,%esp 1104fb: 8b 45 08 mov 0x8(%ebp),%eax block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 1104fe: 85 c0 test %eax,%eax 110500: 75 11 jne 110513 <== ALWAYS TAKEN 110502: 68 7c f6 11 00 push $0x11f67c <== NOT EXECUTED 110507: 68 24 f8 11 00 push $0x11f824 <== NOT EXECUTED 11050c: 68 69 01 00 00 push $0x169 <== NOT EXECUTED 110511: eb 15 jmp 110528 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 110513: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 110517: 74 19 je 110532 <== ALWAYS TAKEN 110519: 68 d0 f6 11 00 push $0x11f6d0 <== NOT EXECUTED 11051e: 68 24 f8 11 00 push $0x11f824 <== NOT EXECUTED 110523: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED 110528: 68 86 f6 11 00 push $0x11f686 <== NOT EXECUTED 11052d: e8 6e 6e ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 110532: 52 push %edx 110533: 6a 01 push $0x1 110535: ff 75 0c pushl 0xc(%ebp) 110538: 50 push %eax 110539: e8 90 fb ff ff call 1100ce 11053e: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 110540: 83 c4 10 add $0x10,%esp 110543: 31 c0 xor %eax,%eax 110545: 83 3b 00 cmpl $0x0,(%ebx) 110548: 75 14 jne 11055e #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 11054a: e8 5d fb ff ff call 1100ac 11054f: 89 c2 mov %eax,%edx if ( !memory ) 110551: b8 01 00 00 00 mov $0x1,%eax 110556: 85 d2 test %edx,%edx 110558: 74 04 je 11055e <== NEVER TAKEN return 1; *block_entry_ptr = memory; 11055a: 89 13 mov %edx,(%ebx) 11055c: 30 c0 xor %al,%al return 0; } 11055e: 8b 5d fc mov -0x4(%ebp),%ebx 110561: c9 leave 110562: c3 ret =============================================================================== 00110563 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 110563: 55 push %ebp 110564: 89 e5 mov %esp,%ebp 110566: 57 push %edi 110567: 56 push %esi 110568: 53 push %ebx 110569: 83 ec 2c sub $0x2c,%esp 11056c: 8b 5d 08 mov 0x8(%ebp),%ebx 11056f: 8b 75 0c mov 0xc(%ebp),%esi 110572: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 110575: 85 db test %ebx,%ebx 110577: 75 11 jne 11058a <== ALWAYS TAKEN 110579: 68 7c f6 11 00 push $0x11f67c <== NOT EXECUTED 11057e: 68 3c f8 11 00 push $0x11f83c <== NOT EXECUTED 110583: 68 31 01 00 00 push $0x131 <== NOT EXECUTED 110588: eb 15 jmp 11059f <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 11058a: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 11058e: 74 19 je 1105a9 <== ALWAYS TAKEN 110590: 68 d0 f6 11 00 push $0x11f6d0 <== NOT EXECUTED 110595: 68 3c f8 11 00 push $0x11f83c <== NOT EXECUTED 11059a: 68 35 01 00 00 push $0x135 <== NOT EXECUTED 11059f: 68 86 f6 11 00 push $0x11f686 <== NOT EXECUTED 1105a4: e8 f7 6d ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 1105a9: a1 ec 51 12 00 mov 0x1251ec,%eax 1105ae: 89 c1 mov %eax,%ecx 1105b0: c1 e9 02 shr $0x2,%ecx 1105b3: 8d 51 01 lea 0x1(%ecx),%edx 1105b6: 0f af d1 imul %ecx,%edx 1105b9: 42 inc %edx 1105ba: 0f af d1 imul %ecx,%edx 1105bd: 4a dec %edx 1105be: 0f af d0 imul %eax,%edx 1105c1: 83 ff 00 cmp $0x0,%edi 1105c4: 7c 16 jl 1105dc <== NEVER TAKEN 1105c6: 7f 04 jg 1105cc <== NEVER TAKEN 1105c8: 39 d6 cmp %edx,%esi 1105ca: 72 10 jb 1105dc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 1105cc: e8 8b 13 00 00 call 11195c <__errno> <== NOT EXECUTED 1105d1: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1105d7: e9 92 00 00 00 jmp 11066e <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 1105dc: 8b 53 50 mov 0x50(%ebx),%edx 1105df: 8b 4b 54 mov 0x54(%ebx),%ecx 1105e2: 89 55 e0 mov %edx,-0x20(%ebp) 1105e5: 89 4d e4 mov %ecx,-0x1c(%ebp) 1105e8: 39 cf cmp %ecx,%edi 1105ea: 7f 0e jg 1105fa <== NEVER TAKEN 1105ec: 0f 8c 8d 00 00 00 jl 11067f <== NEVER TAKEN 1105f2: 39 d6 cmp %edx,%esi 1105f4: 0f 86 85 00 00 00 jbe 11067f /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 1105fa: 89 45 d8 mov %eax,-0x28(%ebp) 1105fd: 89 c1 mov %eax,%ecx 1105ff: c1 f9 1f sar $0x1f,%ecx 110602: 89 4d dc mov %ecx,-0x24(%ebp) 110605: ff 75 dc pushl -0x24(%ebp) 110608: ff 75 d8 pushl -0x28(%ebp) 11060b: 57 push %edi 11060c: 56 push %esi 11060d: e8 ea c3 00 00 call 11c9fc <__divdi3> 110612: 83 c4 10 add $0x10,%esp 110615: 89 45 d4 mov %eax,-0x2c(%ebp) old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 110618: ff 75 dc pushl -0x24(%ebp) 11061b: ff 75 d8 pushl -0x28(%ebp) 11061e: ff 75 e4 pushl -0x1c(%ebp) 110621: ff 75 e0 pushl -0x20(%ebp) 110624: e8 d3 c3 00 00 call 11c9fc <__divdi3> 110629: 83 c4 10 add $0x10,%esp 11062c: 89 45 e0 mov %eax,-0x20(%ebp) 11062f: 89 c2 mov %eax,%edx /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 110631: eb 41 jmp 110674 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 110633: 50 push %eax 110634: 50 push %eax 110635: 52 push %edx 110636: 53 push %ebx 110637: 89 55 d0 mov %edx,-0x30(%ebp) 11063a: e8 b5 fe ff ff call 1104f4 11063f: 83 c4 10 add $0x10,%esp 110642: 85 c0 test %eax,%eax 110644: 8b 55 d0 mov -0x30(%ebp),%edx 110647: 74 2a je 110673 <== ALWAYS TAKEN 110649: eb 13 jmp 11065e <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 11064b: 51 push %ecx <== NOT EXECUTED 11064c: 51 push %ecx <== NOT EXECUTED 11064d: 52 push %edx <== NOT EXECUTED 11064e: 53 push %ebx <== NOT EXECUTED 11064f: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 110652: e8 5c fc ff ff call 1102b3 <== 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-- ) { 110657: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 11065a: 4a dec %edx <== NOT EXECUTED 11065b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11065e: 3b 55 e0 cmp -0x20(%ebp),%edx <== NOT EXECUTED 110661: 73 e8 jae 11064b <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 110663: e8 f4 12 00 00 call 11195c <__errno> <== NOT EXECUTED 110668: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 11066e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 110671: eb 0e jmp 110681 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 110673: 42 inc %edx 110674: 3b 55 d4 cmp -0x2c(%ebp),%edx 110677: 76 ba jbe 110633 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 110679: 89 73 50 mov %esi,0x50(%ebx) 11067c: 89 7b 54 mov %edi,0x54(%ebx) 11067f: 31 c0 xor %eax,%eax return 0; } 110681: 8d 65 f4 lea -0xc(%ebp),%esp 110684: 5b pop %ebx 110685: 5e pop %esi 110686: 5f pop %edi 110687: c9 leave 110688: c3 ret =============================================================================== 001100ce : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 1100ce: 55 push %ebp 1100cf: 89 e5 mov %esp,%ebp 1100d1: 57 push %edi 1100d2: 56 push %esi 1100d3: 53 push %ebx 1100d4: 83 ec 1c sub $0x1c,%esp 1100d7: 8b 5d 08 mov 0x8(%ebp),%ebx 1100da: 8b 7d 0c mov 0xc(%ebp),%edi 1100dd: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 1100e0: 85 db test %ebx,%ebx 1100e2: 75 11 jne 1100f5 <== ALWAYS TAKEN 1100e4: 68 7c f6 11 00 push $0x11f67c <== NOT EXECUTED 1100e9: 68 8c f7 11 00 push $0x11f78c <== NOT EXECUTED 1100ee: 68 88 03 00 00 push $0x388 <== NOT EXECUTED 1100f3: eb 15 jmp 11010a <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 1100f5: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 1100f9: 74 19 je 110114 <== ALWAYS TAKEN 1100fb: 68 d0 f6 11 00 push $0x11f6d0 <== NOT EXECUTED 110100: 68 8c f7 11 00 push $0x11f78c <== NOT EXECUTED 110105: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED 11010a: 68 86 f6 11 00 push $0x11f686 <== NOT EXECUTED 11010f: e8 8c 72 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 110114: 8b 0d ec 51 12 00 mov 0x1251ec,%ecx 11011a: c1 e9 02 shr $0x2,%ecx 11011d: 8d 41 ff lea -0x1(%ecx),%eax 110120: 39 c7 cmp %eax,%edi 110122: 77 32 ja 110156 <== NEVER TAKEN #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 110124: 8b 53 58 mov 0x58(%ebx),%edx if ( malloc_it ) { 110127: 85 f6 test %esi,%esi 110129: 74 23 je 11014e if ( !p ) { 11012b: 85 d2 test %edx,%edx 11012d: 75 10 jne 11013f p = memfile_alloc_block(); 11012f: e8 78 ff ff ff call 1100ac if ( !p ) 110134: 85 c0 test %eax,%eax 110136: 0f 84 03 01 00 00 je 11023f <== NEVER TAKEN return 0; info->indirect = p; 11013c: 89 43 58 mov %eax,0x58(%ebx) } return &info->indirect[ my_block ]; 11013f: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax 110146: 03 43 58 add 0x58(%ebx),%eax 110149: e9 f3 00 00 00 jmp 110241 } if ( !p ) return 0; return &info->indirect[ my_block ]; 11014e: 8d 04 ba lea (%edx,%edi,4),%eax 110151: e9 e5 00 00 00 jmp 11023b /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 110156: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 110159: 0f af c1 imul %ecx,%eax <== NOT EXECUTED 11015c: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 11015f: 39 d7 cmp %edx,%edi <== NOT EXECUTED 110161: 77 58 ja 1101bb <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 110163: 29 cf sub %ecx,%edi <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 110165: 89 f8 mov %edi,%eax <== NOT EXECUTED 110167: 31 d2 xor %edx,%edx <== NOT EXECUTED 110169: f7 f1 div %ecx <== NOT EXECUTED 11016b: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 11016e: 89 c7 mov %eax,%edi <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 110170: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 110173: 85 f6 test %esi,%esi <== NOT EXECUTED 110175: 74 37 je 1101ae <== NOT EXECUTED if ( !p ) { 110177: 85 c0 test %eax,%eax <== NOT EXECUTED 110179: 75 10 jne 11018b <== NOT EXECUTED p = memfile_alloc_block(); 11017b: e8 2c ff ff ff call 1100ac <== NOT EXECUTED if ( !p ) 110180: 85 c0 test %eax,%eax <== NOT EXECUTED 110182: 0f 84 b7 00 00 00 je 11023f <== NOT EXECUTED return 0; info->doubly_indirect = p; 110188: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 11018b: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED 11018e: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 110190: 85 c0 test %eax,%eax <== NOT EXECUTED 110192: 75 0f jne 1101a3 <== NOT EXECUTED p1 = memfile_alloc_block(); 110194: e8 13 ff ff ff call 1100ac <== NOT EXECUTED if ( !p1 ) 110199: 85 c0 test %eax,%eax <== NOT EXECUTED 11019b: 0f 84 9e 00 00 00 je 11023f <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 1101a1: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 1101a3: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 1101a6: 8d 04 88 lea (%eax,%ecx,4),%eax <== NOT EXECUTED 1101a9: e9 93 00 00 00 jmp 110241 <== NOT EXECUTED } if ( !p ) 1101ae: 85 c0 test %eax,%eax <== NOT EXECUTED 1101b0: 0f 84 89 00 00 00 je 11023f <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 1101b6: 8b 14 b8 mov (%eax,%edi,4),%edx <== NOT EXECUTED 1101b9: eb 7a jmp 110235 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 1101bb: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 1101be: 0f af d1 imul %ecx,%edx <== NOT EXECUTED 1101c1: 4a dec %edx <== NOT EXECUTED 1101c2: 39 d7 cmp %edx,%edi <== NOT EXECUTED 1101c4: 77 79 ja 11023f <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 1101c6: 29 c7 sub %eax,%edi <== NOT EXECUTED 1101c8: 89 f8 mov %edi,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 1101ca: 31 d2 xor %edx,%edx <== NOT EXECUTED 1101cc: f7 f1 div %ecx <== NOT EXECUTED 1101ce: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 1101d1: 31 d2 xor %edx,%edx <== NOT EXECUTED 1101d3: f7 f1 div %ecx <== NOT EXECUTED 1101d5: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 1101d8: 89 c7 mov %eax,%edi <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 1101da: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 1101dd: 85 f6 test %esi,%esi <== NOT EXECUTED 1101df: 74 43 je 110224 <== NOT EXECUTED if ( !p ) { 1101e1: 85 c0 test %eax,%eax <== NOT EXECUTED 1101e3: 75 0c jne 1101f1 <== NOT EXECUTED p = memfile_alloc_block(); 1101e5: e8 c2 fe ff ff call 1100ac <== NOT EXECUTED if ( !p ) 1101ea: 85 c0 test %eax,%eax <== NOT EXECUTED 1101ec: 74 51 je 11023f <== NOT EXECUTED return 0; info->triply_indirect = p; 1101ee: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 1101f1: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED 1101f4: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 1101f6: 85 c0 test %eax,%eax <== NOT EXECUTED 1101f8: 75 0b jne 110205 <== NOT EXECUTED p1 = memfile_alloc_block(); 1101fa: e8 ad fe ff ff call 1100ac <== NOT EXECUTED if ( !p1 ) 1101ff: 85 c0 test %eax,%eax <== NOT EXECUTED 110201: 74 3c je 11023f <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 110203: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 110205: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 110208: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 11020b: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p2 ) { 11020d: 85 c0 test %eax,%eax <== NOT EXECUTED 11020f: 75 0b jne 11021c <== NOT EXECUTED p2 = memfile_alloc_block(); 110211: e8 96 fe ff ff call 1100ac <== NOT EXECUTED if ( !p2 ) 110216: 85 c0 test %eax,%eax <== NOT EXECUTED 110218: 74 25 je 11023f <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 11021a: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 11021c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 11021f: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED 110222: eb 1d jmp 110241 <== NOT EXECUTED } if ( !p ) 110224: 85 c0 test %eax,%eax <== NOT EXECUTED 110226: 74 17 je 11023f <== 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 ]; 110228: 8b 04 b8 mov (%eax,%edi,4),%eax <== NOT EXECUTED if ( !p1 ) 11022b: 85 c0 test %eax,%eax <== NOT EXECUTED 11022d: 74 10 je 11023f <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 11022f: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 110232: 8b 14 88 mov (%eax,%ecx,4),%edx <== NOT EXECUTED if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 110235: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 110238: 8d 04 8a lea (%edx,%ecx,4),%eax <== NOT EXECUTED p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; p2 = (block_p *)p1[ doubly ]; if ( !p2 ) 11023b: 85 d2 test %edx,%edx 11023d: 75 02 jne 110241 <== ALWAYS TAKEN return 0; return (block_p *)&p2[ singly ]; 11023f: 31 c0 xor %eax,%eax /* * This means the requested block number is out of range. */ return 0; } 110241: 8d 65 f4 lea -0xc(%ebp),%esp 110244: 5b pop %ebx 110245: 5e pop %esi 110246: 5f pop %edi 110247: c9 leave 110248: c3 ret =============================================================================== 001109fa : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 1109fa: 55 push %ebp 1109fb: 89 e5 mov %esp,%ebp 1109fd: 57 push %edi 1109fe: 56 push %esi 1109ff: 53 push %ebx 110a00: 83 ec 3c sub $0x3c,%esp 110a03: 8b 75 0c mov 0xc(%ebp),%esi 110a06: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 110a09: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 110a0d: 75 11 jne 110a20 <== ALWAYS TAKEN 110a0f: 68 7c f6 11 00 push $0x11f67c <== NOT EXECUTED 110a14: 68 c0 f7 11 00 push $0x11f7c0 <== NOT EXECUTED 110a19: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED 110a1e: eb 1d jmp 110a3d <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 110a20: 8b 55 08 mov 0x8(%ebp),%edx 110a23: 8b 42 4c mov 0x4c(%edx),%eax 110a26: 8d 48 fb lea -0x5(%eax),%ecx 110a29: 83 f9 01 cmp $0x1,%ecx 110a2c: 76 19 jbe 110a47 <== ALWAYS TAKEN 110a2e: 68 3a f7 11 00 push $0x11f73a <== NOT EXECUTED 110a33: 68 c0 f7 11 00 push $0x11f7c0 <== NOT EXECUTED 110a38: 68 51 02 00 00 push $0x251 <== NOT EXECUTED 110a3d: 68 86 f6 11 00 push $0x11f686 <== NOT EXECUTED 110a42: e8 59 69 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 110a47: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 110a4b: 75 11 jne 110a5e <== ALWAYS TAKEN 110a4d: 68 85 f7 11 00 push $0x11f785 <== NOT EXECUTED 110a52: 68 c0 f7 11 00 push $0x11f7c0 <== NOT EXECUTED 110a57: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED 110a5c: eb df jmp 110a3d <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 110a5e: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 110a62: 75 13 jne 110a77 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 110a64: e8 f3 0e 00 00 call 11195c <__errno> <== NOT EXECUTED 110a69: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 110a6f: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 110a72: e9 d0 01 00 00 jmp 110c47 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 110a77: 83 f8 06 cmp $0x6,%eax 110a7a: 75 64 jne 110ae0 <== ALWAYS TAKEN unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 110a7c: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 110a7f: 8b 49 58 mov 0x58(%ecx),%ecx <== NOT EXECUTED 110a82: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 110a85: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 110a88: 8b 48 50 mov 0x50(%eax),%ecx <== NOT EXECUTED 110a8b: 8b 58 54 mov 0x54(%eax),%ebx <== NOT EXECUTED 110a8e: 89 c8 mov %ecx,%eax <== NOT EXECUTED 110a90: 89 da mov %ebx,%edx <== NOT EXECUTED 110a92: 29 f0 sub %esi,%eax <== NOT EXECUTED 110a94: 19 fa sbb %edi,%edx <== NOT EXECUTED 110a96: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 110a99: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 110a9c: 31 c0 xor %eax,%eax <== NOT EXECUTED 110a9e: 39 d0 cmp %edx,%eax <== NOT EXECUTED 110aa0: 7f 0f jg 110ab1 <== NOT EXECUTED 110aa2: 7c 08 jl 110aac <== NOT EXECUTED 110aa4: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 110aa7: 39 55 18 cmp %edx,0x18(%ebp) <== NOT EXECUTED 110aaa: 77 05 ja 110ab1 <== NOT EXECUTED 110aac: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED 110aaf: eb 04 jmp 110ab5 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 110ab1: 89 ca mov %ecx,%edx <== NOT EXECUTED 110ab3: 29 f2 sub %esi,%edx <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 110ab5: 03 75 c8 add -0x38(%ebp),%esi <== NOT EXECUTED 110ab8: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 110abb: 89 d1 mov %edx,%ecx <== NOT EXECUTED 110abd: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED IMFS_update_atime( the_jnode ); 110abf: 51 push %ecx <== NOT EXECUTED 110ac0: 51 push %ecx <== NOT EXECUTED 110ac1: 6a 00 push $0x0 <== NOT EXECUTED 110ac3: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 110ac6: 50 push %eax <== NOT EXECUTED 110ac7: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 110aca: e8 45 6c ff ff call 107714 <== NOT EXECUTED 110acf: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 110ad2: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 110ad5: 89 41 40 mov %eax,0x40(%ecx) <== NOT EXECUTED return my_length; 110ad8: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 110adb: e9 64 01 00 00 jmp 110c44 <== 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; 110ae0: 89 f0 mov %esi,%eax if ( last_byte > the_jnode->info.file.size ) 110ae2: 8b 55 08 mov 0x8(%ebp),%edx 110ae5: 8b 5a 50 mov 0x50(%edx),%ebx 110ae8: 8b 4d 18 mov 0x18(%ebp),%ecx 110aeb: 01 f1 add %esi,%ecx 110aed: 89 4d d0 mov %ecx,-0x30(%ebp) 110af0: 31 c9 xor %ecx,%ecx 110af2: 3b 4a 54 cmp 0x54(%edx),%ecx 110af5: 7f 0f jg 110b06 <== NEVER TAKEN 110af7: 7c 05 jl 110afe <== NEVER TAKEN 110af9: 39 5d d0 cmp %ebx,-0x30(%ebp) 110afc: 77 08 ja 110b06 <== ALWAYS TAKEN 110afe: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED 110b01: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 110b04: eb 05 jmp 110b0b <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 110b06: 29 c3 sub %eax,%ebx 110b08: 89 5d d0 mov %ebx,-0x30(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 110b0b: 8b 15 ec 51 12 00 mov 0x1251ec,%edx 110b11: 89 55 c4 mov %edx,-0x3c(%ebp) 110b14: 89 d0 mov %edx,%eax 110b16: 99 cltd 110b17: 89 d3 mov %edx,%ebx 110b19: 52 push %edx 110b1a: 50 push %eax 110b1b: 57 push %edi 110b1c: 56 push %esi 110b1d: 89 45 c0 mov %eax,-0x40(%ebp) 110b20: e8 27 c0 00 00 call 11cb4c <__moddi3> 110b25: 83 c4 10 add $0x10,%esp 110b28: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 110b2b: 8b 4d c0 mov -0x40(%ebp),%ecx 110b2e: 53 push %ebx 110b2f: 51 push %ecx 110b30: 57 push %edi 110b31: 56 push %esi 110b32: e8 c5 be 00 00 call 11c9fc <__divdi3> 110b37: 83 c4 10 add $0x10,%esp 110b3a: 89 c3 mov %eax,%ebx if ( start_offset ) { 110b3c: 83 7d c8 00 cmpl $0x0,-0x38(%ebp) 110b40: 75 0f jne 110b51 110b42: 8b 55 14 mov 0x14(%ebp),%edx 110b45: 89 55 c8 mov %edx,-0x38(%ebp) 110b48: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 110b4f: eb 4c jmp 110b9d 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 ); 110b51: 50 push %eax 110b52: 6a 00 push $0x0 110b54: 53 push %ebx 110b55: ff 75 08 pushl 0x8(%ebp) 110b58: e8 71 f5 ff ff call 1100ce assert( block_ptr ); 110b5d: 83 c4 10 add $0x10,%esp 110b60: 85 c0 test %eax,%eax 110b62: 75 14 jne 110b78 <== ALWAYS TAKEN 110b64: 68 00 f7 11 00 push $0x11f700 <== NOT EXECUTED 110b69: 68 c0 f7 11 00 push $0x11f7c0 <== NOT EXECUTED 110b6e: 68 96 02 00 00 push $0x296 <== NOT EXECUTED 110b73: e9 c5 fe ff ff jmp 110a3d <== 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; 110b78: 8b 4d c4 mov -0x3c(%ebp),%ecx 110b7b: 2b 4d c8 sub -0x38(%ebp),%ecx 110b7e: 8b 55 d0 mov -0x30(%ebp),%edx 110b81: 39 ca cmp %ecx,%edx 110b83: 76 02 jbe 110b87 110b85: 89 ca mov %ecx,%edx to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 110b87: 8b 75 c8 mov -0x38(%ebp),%esi 110b8a: 03 30 add (%eax),%esi dest += to_copy; 110b8c: 8b 7d 14 mov 0x14(%ebp),%edi 110b8f: 89 d1 mov %edx,%ecx 110b91: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 110b93: 89 7d c8 mov %edi,-0x38(%ebp) block++; 110b96: 43 inc %ebx my_length -= to_copy; 110b97: 29 55 d0 sub %edx,-0x30(%ebp) 110b9a: 89 55 cc mov %edx,-0x34(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 110b9d: 8b 15 ec 51 12 00 mov 0x1251ec,%edx while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 110ba3: eb 40 jmp 110be5 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 110ba5: 57 push %edi 110ba6: 6a 00 push $0x0 110ba8: 53 push %ebx 110ba9: ff 75 08 pushl 0x8(%ebp) 110bac: 89 55 c0 mov %edx,-0x40(%ebp) 110baf: e8 1a f5 ff ff call 1100ce assert( block_ptr ); 110bb4: 83 c4 10 add $0x10,%esp 110bb7: 85 c0 test %eax,%eax 110bb9: 8b 55 c0 mov -0x40(%ebp),%edx 110bbc: 75 14 jne 110bd2 <== ALWAYS TAKEN 110bbe: 68 00 f7 11 00 push $0x11f700 <== NOT EXECUTED 110bc3: 68 c0 f7 11 00 push $0x11f7c0 <== NOT EXECUTED 110bc8: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED 110bcd: e9 6b fe ff ff jmp 110a3d <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 110bd2: 8b 30 mov (%eax),%esi 110bd4: 8b 7d c8 mov -0x38(%ebp),%edi 110bd7: 89 d1 mov %edx,%ecx 110bd9: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 110bdb: 89 7d c8 mov %edi,-0x38(%ebp) block++; 110bde: 43 inc %ebx my_length -= to_copy; 110bdf: 29 55 d0 sub %edx,-0x30(%ebp) copied += to_copy; 110be2: 01 55 cc add %edx,-0x34(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 110be5: 8b 45 d0 mov -0x30(%ebp),%eax 110be8: 3b 05 ec 51 12 00 cmp 0x1251ec,%eax 110bee: 73 b5 jae 110ba5 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 110bf0: 85 c0 test %eax,%eax 110bf2: 74 37 je 110c2b block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 110bf4: 56 push %esi 110bf5: 6a 00 push $0x0 110bf7: 53 push %ebx 110bf8: ff 75 08 pushl 0x8(%ebp) 110bfb: e8 ce f4 ff ff call 1100ce assert( block_ptr ); 110c00: 83 c4 10 add $0x10,%esp 110c03: 85 c0 test %eax,%eax 110c05: 75 14 jne 110c1b <== ALWAYS TAKEN 110c07: 68 00 f7 11 00 push $0x11f700 <== NOT EXECUTED 110c0c: 68 c0 f7 11 00 push $0x11f7c0 <== NOT EXECUTED 110c11: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED 110c16: e9 22 fe ff ff jmp 110a3d <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 110c1b: 8b 30 mov (%eax),%esi 110c1d: 8b 7d c8 mov -0x38(%ebp),%edi 110c20: 8b 4d d0 mov -0x30(%ebp),%ecx 110c23: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 110c25: 8b 55 d0 mov -0x30(%ebp),%edx 110c28: 01 55 cc add %edx,-0x34(%ebp) } IMFS_update_atime( the_jnode ); 110c2b: 53 push %ebx 110c2c: 53 push %ebx 110c2d: 6a 00 push $0x0 110c2f: 8d 45 e0 lea -0x20(%ebp),%eax 110c32: 50 push %eax 110c33: e8 dc 6a ff ff call 107714 110c38: 8b 45 e0 mov -0x20(%ebp),%eax 110c3b: 8b 4d 08 mov 0x8(%ebp),%ecx 110c3e: 89 41 40 mov %eax,0x40(%ecx) return copied; 110c41: 8b 55 cc mov -0x34(%ebp),%edx 110c44: 83 c4 10 add $0x10,%esp } 110c47: 89 d0 mov %edx,%eax 110c49: 8d 65 f4 lea -0xc(%ebp),%esp 110c4c: 5b pop %ebx 110c4d: 5e pop %esi 110c4e: 5f pop %edi 110c4f: c9 leave 110c50: c3 ret =============================================================================== 001102fe : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 1102fe: 55 push %ebp 1102ff: 89 e5 mov %esp,%ebp 110301: 57 push %edi 110302: 56 push %esi 110303: 53 push %ebx 110304: 83 ec 1c sub $0x1c,%esp 110307: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Perform internal consistency checks */ assert( the_jnode ); 11030a: 85 db test %ebx,%ebx 11030c: 75 11 jne 11031f <== ALWAYS TAKEN 11030e: 68 7c f6 11 00 push $0x11f67c <== NOT EXECUTED 110313: 68 d4 f7 11 00 push $0x11f7d4 <== NOT EXECUTED 110318: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED 11031d: eb 15 jmp 110334 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 11031f: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 110323: 74 19 je 11033e <== ALWAYS TAKEN 110325: 68 d0 f6 11 00 push $0x11f6d0 <== NOT EXECUTED 11032a: 68 d4 f7 11 00 push $0x11f7d4 <== NOT EXECUTED 11032f: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED 110334: 68 86 f6 11 00 push $0x11f686 <== NOT EXECUTED 110339: e8 62 70 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 11033e: 8b 35 ec 51 12 00 mov 0x1251ec,%esi 110344: c1 ee 02 shr $0x2,%esi * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 110347: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 11034b: 74 0f je 11035c if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 11034d: 57 push %edi 11034e: 57 push %edi 11034f: 56 push %esi 110350: 8d 43 58 lea 0x58(%ebx),%eax 110353: 50 push %eax 110354: e8 f0 fe ff ff call 110249 110359: 83 c4 10 add $0x10,%esp * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 11035c: 31 ff xor %edi,%edi 11035e: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 110362: 75 21 jne 110385 <== NEVER TAKEN 110364: eb 3a jmp 1103a0 } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 110366: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 110369: 8d 14 bd 00 00 00 00 lea 0x0(,%edi,4),%edx <== NOT EXECUTED 110370: 83 3c b8 00 cmpl $0x0,(%eax,%edi,4) <== NOT EXECUTED 110374: 74 0e je 110384 <== NOT EXECUTED memfile_free_blocks_in_table( 110376: 51 push %ecx <== NOT EXECUTED 110377: 51 push %ecx <== NOT EXECUTED 110378: 56 push %esi <== NOT EXECUTED 110379: 01 d0 add %edx,%eax <== NOT EXECUTED 11037b: 50 push %eax <== NOT EXECUTED 11037c: e8 c8 fe ff ff call 110249 <== NOT EXECUTED 110381: 83 c4 10 add $0x10,%esp <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i<== NOT EXECUTED if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); 110391: 57 push %edi <== NOT EXECUTED 110392: 57 push %edi <== NOT EXECUTED 110393: 56 push %esi <== NOT EXECUTED 110394: 8d 43 5c lea 0x5c(%ebx),%eax <== NOT EXECUTED 110397: 50 push %eax <== NOT EXECUTED 110398: e8 ac fe ff ff call 110249 <== NOT EXECUTED 11039d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 1103a0: 31 ff xor %edi,%edi 1103a2: 83 7b 60 00 cmpl $0x0,0x60(%ebx) 1103a6: 75 5b jne 110403 <== NEVER TAKEN 1103a8: eb 74 jmp 11041e 1103aa: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax <== NOT EXECUTED 1103b1: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 1103b4: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 1103b7: 8b 04 b8 mov (%eax,%edi,4),%eax <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 1103ba: 85 c0 test %eax,%eax <== NOT EXECUTED 1103bc: 74 51 je 11040f <== NOT EXECUTED 1103be: 31 d2 xor %edx,%edx <== NOT EXECUTED 1103c0: eb 21 jmp 1103e3 <== NOT EXECUTED break; for ( j=0 ; j<== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 1103c7: 51 push %ecx <== NOT EXECUTED 1103c8: 51 push %ecx <== NOT EXECUTED 1103c9: 56 push %esi <== NOT EXECUTED 1103ca: 50 push %eax <== NOT EXECUTED 1103cb: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 1103ce: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 1103d1: e8 73 fe ff ff call 110249 <== NOT EXECUTED 1103d6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1103d9: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 1103dc: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j<== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 1103f0: 52 push %edx <== NOT EXECUTED 1103f1: 52 push %edx <== NOT EXECUTED 1103f2: 56 push %esi <== NOT EXECUTED 1103f3: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 1103f6: 03 43 60 add 0x60(%ebx),%eax <== NOT EXECUTED 1103f9: 50 push %eax <== NOT EXECUTED 1103fa: e8 4a fe ff ff call 110249 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i<== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 11040f: 50 push %eax <== NOT EXECUTED 110410: 50 push %eax <== NOT EXECUTED 110411: 56 push %esi <== NOT EXECUTED 110412: 83 c3 60 add $0x60,%ebx <== NOT EXECUTED 110415: 53 push %ebx <== NOT EXECUTED 110416: e8 2e fe ff ff call 110249 <== NOT EXECUTED 11041b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 11041e: 31 c0 xor %eax,%eax 110420: 8d 65 f4 lea -0xc(%ebp),%esp 110423: 5b pop %ebx 110424: 5e pop %esi 110425: 5f pop %edi 110426: c9 leave 110427: c3 ret =============================================================================== 001102b3 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 1102b3: 55 push %ebp <== NOT EXECUTED 1102b4: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1102b6: 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 ); 1102b9: 6a 00 push $0x0 <== NOT EXECUTED 1102bb: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 1102be: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1102c1: e8 08 fe ff ff call 1100ce <== NOT EXECUTED assert( block_ptr ); 1102c6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1102c9: 85 c0 test %eax,%eax <== NOT EXECUTED 1102cb: 75 19 jne 1102e6 <== NOT EXECUTED 1102cd: 68 00 f7 11 00 push $0x11f700 <== NOT EXECUTED 1102d2: 68 08 f8 11 00 push $0x11f808 <== NOT EXECUTED 1102d7: 68 96 01 00 00 push $0x196 <== NOT EXECUTED 1102dc: 68 86 f6 11 00 push $0x11f686 <== NOT EXECUTED 1102e1: e8 ba 70 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 1102e6: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 1102e8: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 1102ee: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1102f1: 52 push %edx <== NOT EXECUTED 1102f2: e8 9c fd ff ff call 110093 <== NOT EXECUTED } return 1; } 1102f7: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 1102fc: c9 leave <== NOT EXECUTED 1102fd: c3 ret <== NOT EXECUTED =============================================================================== 00110746 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 110746: 55 push %ebp 110747: 89 e5 mov %esp,%ebp 110749: 57 push %edi 11074a: 56 push %esi 11074b: 53 push %ebx 11074c: 83 ec 3c sub $0x3c,%esp 11074f: 8b 75 0c mov 0xc(%ebp),%esi 110752: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 110755: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 110759: 75 11 jne 11076c <== ALWAYS TAKEN 11075b: 68 7c f6 11 00 push $0x11f67c <== NOT EXECUTED 110760: 68 ac f7 11 00 push $0x11f7ac <== NOT EXECUTED 110765: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED 11076a: eb 18 jmp 110784 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 11076c: 8b 45 08 mov 0x8(%ebp),%eax 11076f: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 110773: 74 19 je 11078e <== ALWAYS TAKEN 110775: 68 d0 f6 11 00 push $0x11f6d0 <== NOT EXECUTED 11077a: 68 ac f7 11 00 push $0x11f7ac <== NOT EXECUTED 11077f: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED 110784: 68 86 f6 11 00 push $0x11f686 <== NOT EXECUTED 110789: e8 12 6c ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 11078e: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 110792: 75 11 jne 1107a5 <== ALWAYS TAKEN 110794: 68 0a f7 11 00 push $0x11f70a <== NOT EXECUTED 110799: 68 ac f7 11 00 push $0x11f7ac <== NOT EXECUTED 11079e: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED 1107a3: eb df jmp 110784 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 1107a5: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 1107a9: 75 0d jne 1107b8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 1107ab: e8 ac 11 00 00 call 11195c <__errno> <== NOT EXECUTED 1107b0: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1107b6: eb 33 jmp 1107eb <== NOT EXECUTED * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 1107b8: 8b 45 18 mov 0x18(%ebp),%eax 1107bb: 01 f0 add %esi,%eax 1107bd: 31 d2 xor %edx,%edx 1107bf: 8b 4d 08 mov 0x8(%ebp),%ecx 1107c2: 3b 51 54 cmp 0x54(%ecx),%edx 1107c5: 7c 2c jl 1107f3 <== NEVER TAKEN 1107c7: 7f 05 jg 1107ce <== NEVER TAKEN 1107c9: 3b 41 50 cmp 0x50(%ecx),%eax 1107cc: 76 25 jbe 1107f3 <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 1107ce: 51 push %ecx 1107cf: 52 push %edx 1107d0: 50 push %eax 1107d1: ff 75 08 pushl 0x8(%ebp) 1107d4: e8 8a fd ff ff call 110563 if ( status ) 1107d9: 83 c4 10 add $0x10,%esp 1107dc: 85 c0 test %eax,%eax 1107de: 74 13 je 1107f3 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 1107e0: e8 77 11 00 00 call 11195c <__errno> <== NOT EXECUTED 1107e5: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 1107eb: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 1107ee: e9 3b 01 00 00 jmp 11092e <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 1107f3: a1 ec 51 12 00 mov 0x1251ec,%eax 1107f8: 89 45 c8 mov %eax,-0x38(%ebp) 1107fb: 99 cltd 1107fc: 89 d3 mov %edx,%ebx 1107fe: 52 push %edx 1107ff: 50 push %eax 110800: 57 push %edi 110801: 56 push %esi 110802: 89 45 c4 mov %eax,-0x3c(%ebp) 110805: e8 42 c3 00 00 call 11cb4c <__moddi3> 11080a: 83 c4 10 add $0x10,%esp 11080d: 89 45 cc mov %eax,-0x34(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 110810: 8b 4d c4 mov -0x3c(%ebp),%ecx 110813: 53 push %ebx 110814: 51 push %ecx 110815: 57 push %edi 110816: 56 push %esi 110817: e8 e0 c1 00 00 call 11c9fc <__divdi3> 11081c: 83 c4 10 add $0x10,%esp 11081f: 89 45 d0 mov %eax,-0x30(%ebp) if ( start_offset ) { 110822: 83 7d cc 00 cmpl $0x0,-0x34(%ebp) 110826: 75 0d jne 110835 110828: 8b 75 14 mov 0x14(%ebp),%esi 11082b: 8b 55 18 mov 0x18(%ebp),%edx 11082e: 89 55 d4 mov %edx,-0x2c(%ebp) 110831: 31 db xor %ebx,%ebx 110833: eb 52 jmp 110887 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 ); 110835: 50 push %eax 110836: 6a 00 push $0x0 110838: ff 75 d0 pushl -0x30(%ebp) 11083b: ff 75 08 pushl 0x8(%ebp) 11083e: e8 8b f8 ff ff call 1100ce assert( block_ptr ); 110843: 83 c4 10 add $0x10,%esp 110846: 85 c0 test %eax,%eax 110848: 75 14 jne 11085e <== ALWAYS TAKEN 11084a: 68 00 f7 11 00 push $0x11f700 <== NOT EXECUTED 11084f: 68 ac f7 11 00 push $0x11f7ac <== NOT EXECUTED 110854: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED 110859: e9 26 ff ff ff jmp 110784 <== 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; 11085e: 8b 55 c8 mov -0x38(%ebp),%edx 110861: 2b 55 cc sub -0x34(%ebp),%edx 110864: 3b 55 18 cmp 0x18(%ebp),%edx 110867: 76 03 jbe 11086c <== NEVER TAKEN 110869: 8b 55 18 mov 0x18(%ebp),%edx if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 11086c: 8b 00 mov (%eax),%eax 11086e: 03 45 cc add -0x34(%ebp),%eax src += to_copy; 110871: 89 c7 mov %eax,%edi 110873: 8b 75 14 mov 0x14(%ebp),%esi 110876: 89 d1 mov %edx,%ecx 110878: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 11087a: ff 45 d0 incl -0x30(%ebp) my_length -= to_copy; 11087d: 8b 4d 18 mov 0x18(%ebp),%ecx 110880: 29 d1 sub %edx,%ecx 110882: 89 4d d4 mov %ecx,-0x2c(%ebp) copied += to_copy; 110885: 89 d3 mov %edx,%ebx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 110887: 8b 15 ec 51 12 00 mov 0x1251ec,%edx while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 11088d: eb 3f jmp 1108ce block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 11088f: 57 push %edi 110890: 6a 00 push $0x0 110892: ff 75 d0 pushl -0x30(%ebp) 110895: ff 75 08 pushl 0x8(%ebp) 110898: 89 55 c4 mov %edx,-0x3c(%ebp) 11089b: e8 2e f8 ff ff call 1100ce assert( block_ptr ); 1108a0: 83 c4 10 add $0x10,%esp 1108a3: 85 c0 test %eax,%eax 1108a5: 8b 55 c4 mov -0x3c(%ebp),%edx 1108a8: 75 14 jne 1108be <== ALWAYS TAKEN 1108aa: 68 00 f7 11 00 push $0x11f700 <== NOT EXECUTED 1108af: 68 ac f7 11 00 push $0x11f7ac <== NOT EXECUTED 1108b4: 68 30 03 00 00 push $0x330 <== NOT EXECUTED 1108b9: e9 c6 fe ff ff jmp 110784 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 1108be: 8b 00 mov (%eax),%eax src += to_copy; 1108c0: 89 c7 mov %eax,%edi 1108c2: 89 d1 mov %edx,%ecx 1108c4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 1108c6: ff 45 d0 incl -0x30(%ebp) my_length -= to_copy; 1108c9: 29 55 d4 sub %edx,-0x2c(%ebp) * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 1108cc: 01 d3 add %edx,%ebx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1108ce: 8b 45 d4 mov -0x2c(%ebp),%eax 1108d1: 3b 05 ec 51 12 00 cmp 0x1251ec,%eax 1108d7: 73 b6 jae 11088f */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 1108d9: 85 c0 test %eax,%eax 1108db: 74 35 je 110912 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1108dd: 51 push %ecx 1108de: 6a 00 push $0x0 1108e0: ff 75 d0 pushl -0x30(%ebp) 1108e3: ff 75 08 pushl 0x8(%ebp) 1108e6: e8 e3 f7 ff ff call 1100ce assert( block_ptr ); 1108eb: 83 c4 10 add $0x10,%esp 1108ee: 85 c0 test %eax,%eax 1108f0: 75 14 jne 110906 <== ALWAYS TAKEN 1108f2: 68 00 f7 11 00 push $0x11f700 <== NOT EXECUTED 1108f7: 68 ac f7 11 00 push $0x11f7ac <== NOT EXECUTED 1108fc: 68 46 03 00 00 push $0x346 <== NOT EXECUTED 110901: e9 7e fe ff ff jmp 110784 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 110906: 8b 00 mov (%eax),%eax 110908: 89 c7 mov %eax,%edi 11090a: 8b 4d d4 mov -0x2c(%ebp),%ecx 11090d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 11090f: 03 5d d4 add -0x2c(%ebp),%ebx } IMFS_mtime_ctime_update( the_jnode ); 110912: 52 push %edx 110913: 52 push %edx 110914: 6a 00 push $0x0 110916: 8d 45 e0 lea -0x20(%ebp),%eax 110919: 50 push %eax 11091a: e8 f5 6d ff ff call 107714 11091f: 8b 45 e0 mov -0x20(%ebp),%eax 110922: 8b 55 08 mov 0x8(%ebp),%edx 110925: 89 42 44 mov %eax,0x44(%edx) 110928: 89 42 48 mov %eax,0x48(%edx) return copied; 11092b: 83 c4 10 add $0x10,%esp } 11092e: 89 d8 mov %ebx,%eax 110930: 8d 65 f4 lea -0xc(%ebp),%esp 110933: 5b pop %ebx 110934: 5e pop %esi 110935: 5f pop %edi 110936: c9 leave 110937: c3 ret =============================================================================== 00106f68 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 106f68: 55 push %ebp 106f69: 89 e5 mov %esp,%ebp 106f6b: 57 push %edi 106f6c: 56 push %esi 106f6d: 53 push %ebx 106f6e: 83 ec 4c sub $0x4c,%esp 106f71: 8b 55 08 mov 0x8(%ebp),%edx 106f74: 8b 5d 10 mov 0x10(%ebp),%ebx 106f77: 8b 75 14 mov 0x14(%ebp),%esi IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 106f7a: 31 c0 xor %eax,%eax 106f7c: 83 c9 ff or $0xffffffff,%ecx 106f7f: 89 d7 mov %edx,%edi 106f81: f2 ae repnz scas %es:(%edi),%al 106f83: f7 d1 not %ecx 106f85: 49 dec %ecx 106f86: 8d 45 e4 lea -0x1c(%ebp),%eax 106f89: 50 push %eax 106f8a: 8d 45 af lea -0x51(%ebp),%eax 106f8d: 50 push %eax 106f8e: 51 push %ecx 106f8f: 52 push %edx 106f90: e8 23 79 00 00 call 10e8b8 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 106f95: 8b 45 0c mov 0xc(%ebp),%eax 106f98: 25 00 f0 00 00 and $0xf000,%eax 106f9d: 83 c4 10 add $0x10,%esp 106fa0: 3d 00 40 00 00 cmp $0x4000,%eax 106fa5: 74 40 je 106fe7 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 106fa7: ba 05 00 00 00 mov $0x5,%edx 106fac: 3d 00 80 00 00 cmp $0x8000,%eax 106fb1: 74 39 je 106fec type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 106fb3: 3d 00 20 00 00 cmp $0x2000,%eax 106fb8: 74 07 je 106fc1 106fba: 3d 00 60 00 00 cmp $0x6000,%eax 106fbf: 75 0d jne 106fce type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 106fc1: 89 5d d0 mov %ebx,-0x30(%ebp) 106fc4: 89 75 d4 mov %esi,-0x2c(%ebp) 106fc7: ba 02 00 00 00 mov $0x2,%edx 106fcc: eb 1e jmp 106fec } else if (S_ISFIFO(mode)) 106fce: ba 07 00 00 00 mov $0x7,%edx 106fd3: 3d 00 10 00 00 cmp $0x1000,%eax 106fd8: 74 12 je 106fec <== ALWAYS TAKEN type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 106fda: e8 7d a9 00 00 call 11195c <__errno> <== NOT EXECUTED 106fdf: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 106fe5: eb 32 jmp 107019 <== NOT EXECUTED 106fe7: ba 01 00 00 00 mov $0x1,%edx * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 106fec: 83 ec 0c sub $0xc,%esp 106fef: 8d 45 d0 lea -0x30(%ebp),%eax 106ff2: 50 push %eax 106ff3: ff 75 0c pushl 0xc(%ebp) 106ff6: 8d 45 af lea -0x51(%ebp),%eax 106ff9: 50 push %eax 106ffa: 52 push %edx 106ffb: ff 75 18 pushl 0x18(%ebp) 106ffe: e8 b5 6e 00 00 call 10deb8 107003: 89 c2 mov %eax,%edx new_name, mode, &info ); if ( !new_node ) 107005: 83 c4 20 add $0x20,%esp 107008: 31 c0 xor %eax,%eax 10700a: 85 d2 test %edx,%edx 10700c: 75 0e jne 10701c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 10700e: e8 49 a9 00 00 call 11195c <__errno> <== NOT EXECUTED 107013: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107019: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return 0; } 10701c: 8d 65 f4 lea -0xc(%ebp),%esp 10701f: 5b pop %ebx 107020: 5e pop %esi 107021: 5f pop %edi 107022: c9 leave 107023: c3 ret =============================================================================== 00107024 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107024: 55 push %ebp 107025: 89 e5 mov %esp,%ebp 107027: 83 ec 08 sub $0x8,%esp 10702a: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 10702d: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107030: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107034: 74 10 je 107046 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 107036: e8 21 a9 00 00 call 11195c <__errno> <== NOT EXECUTED 10703b: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107041: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107044: eb 05 jmp 10704b <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 107046: 89 50 5c mov %edx,0x5c(%eax) 107049: 31 c0 xor %eax,%eax return 0; } 10704b: c9 leave 10704c: c3 ret =============================================================================== 00108d6e : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 108d6e: 55 push %ebp 108d6f: 89 e5 mov %esp,%ebp 108d71: 53 push %ebx 108d72: 83 ec 04 sub $0x4,%esp 108d75: 8b 5d 08 mov 0x8(%ebp),%ebx assert( the_jnode ); 108d78: 85 db test %ebx,%ebx 108d7a: 75 11 jne 108d8d <== ALWAYS TAKEN 108d7c: 68 e0 3e 12 00 push $0x123ee0 <== NOT EXECUTED 108d81: 68 98 40 12 00 push $0x124098 <== NOT EXECUTED 108d86: 6a 38 push $0x38 <== NOT EXECUTED 108d88: e9 98 00 00 00 jmp 108e25 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 108d8d: 50 push %eax 108d8e: 50 push %eax 108d8f: a1 20 90 12 00 mov 0x129020,%eax 108d94: ff 70 08 pushl 0x8(%eax) 108d97: 8d 43 0c lea 0xc(%ebx),%eax 108d9a: 50 push %eax 108d9b: e8 00 c4 00 00 call 1151a0 switch( the_jnode->type ) { 108da0: 8b 43 4c mov 0x4c(%ebx),%eax 108da3: 83 c4 10 add $0x10,%esp 108da6: 8d 50 ff lea -0x1(%eax),%edx 108da9: 83 fa 06 cmp $0x6,%edx 108dac: 0f 87 b7 00 00 00 ja 108e69 <== NEVER TAKEN 108db2: a1 20 90 12 00 mov 0x129020,%eax 108db7: ff 24 95 68 40 12 00 jmp *0x124068(,%edx,4) case IMFS_DIRECTORY: fprintf(stdout, "/" ); 108dbe: 53 push %ebx 108dbf: 53 push %ebx 108dc0: ff 70 08 pushl 0x8(%eax) 108dc3: 6a 2f push $0x2f 108dc5: e8 ea c2 00 00 call 1150b4 108dca: eb 2b jmp 108df7 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 108dcc: ff 73 54 pushl 0x54(%ebx) 108dcf: ff 73 50 pushl 0x50(%ebx) 108dd2: 68 37 3f 12 00 push $0x123f37 108dd7: eb 16 jmp 108def the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 108dd9: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 108ddc: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 108ddf: 68 4a 3f 12 00 push $0x123f4a <== NOT EXECUTED 108de4: eb 09 jmp 108def <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 108de6: 51 push %ecx 108de7: ff 73 50 pushl 0x50(%ebx) 108dea: 68 59 3f 12 00 push $0x123f59 108def: ff 70 08 pushl 0x8(%eax) 108df2: e8 81 c2 00 00 call 115078 (uint32_t)the_jnode->info.file.size ); #endif break; 108df7: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 108dfa: c7 45 08 ad 42 12 00 movl $0x1242ad,0x8(%ebp) } 108e01: 8b 5d fc mov -0x4(%ebp),%ebx 108e04: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 108e05: e9 d6 db 00 00 jmp 1169e0 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 108e0a: 52 push %edx <== NOT EXECUTED 108e0b: 52 push %edx <== NOT EXECUTED 108e0c: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108e0f: 68 65 3f 12 00 push $0x123f65 <== NOT EXECUTED 108e14: e8 87 c3 00 00 call 1151a0 <== NOT EXECUTED assert(0); 108e19: 68 30 37 12 00 push $0x123730 <== NOT EXECUTED 108e1e: 68 98 40 12 00 push $0x124098 <== NOT EXECUTED 108e23: 6a 5d push $0x5d <== NOT EXECUTED 108e25: 68 ea 3e 12 00 push $0x123eea <== NOT EXECUTED 108e2a: e8 c1 07 00 00 call 1095f0 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 108e2f: 53 push %ebx <== NOT EXECUTED 108e30: 53 push %ebx <== NOT EXECUTED 108e31: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108e34: 68 65 3f 12 00 push $0x123f65 <== NOT EXECUTED 108e39: e8 62 c3 00 00 call 1151a0 <== NOT EXECUTED assert(0); 108e3e: 68 30 37 12 00 push $0x123730 <== NOT EXECUTED 108e43: 68 98 40 12 00 push $0x124098 <== NOT EXECUTED 108e48: 6a 62 push $0x62 <== NOT EXECUTED 108e4a: eb d9 jmp 108e25 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 108e4c: 51 push %ecx <== NOT EXECUTED 108e4d: 51 push %ecx <== NOT EXECUTED 108e4e: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108e51: 68 79 3f 12 00 push $0x123f79 <== NOT EXECUTED 108e56: e8 45 c3 00 00 call 1151a0 <== NOT EXECUTED assert(0); 108e5b: 68 30 37 12 00 push $0x123730 <== NOT EXECUTED 108e60: 68 98 40 12 00 push $0x124098 <== NOT EXECUTED 108e65: 6a 67 push $0x67 <== NOT EXECUTED 108e67: eb bc jmp 108e25 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 108e69: 52 push %edx <== NOT EXECUTED 108e6a: 50 push %eax <== NOT EXECUTED 108e6b: 68 8c 3f 12 00 push $0x123f8c <== NOT EXECUTED 108e70: a1 20 90 12 00 mov 0x129020,%eax <== NOT EXECUTED 108e75: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108e78: e8 fb c1 00 00 call 115078 <== NOT EXECUTED assert(0); 108e7d: 68 30 37 12 00 push $0x123730 <== NOT EXECUTED 108e82: 68 98 40 12 00 push $0x124098 <== NOT EXECUTED 108e87: 6a 6c push $0x6c <== NOT EXECUTED 108e89: eb 9a jmp 108e25 <== NOT EXECUTED =============================================================================== 00107060 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 107060: 55 push %ebp 107061: 89 e5 mov %esp,%ebp 107063: 56 push %esi 107064: 53 push %ebx 107065: 8b 75 0c mov 0xc(%ebp),%esi 107068: 8b 5d 10 mov 0x10(%ebp),%ebx IMFS_jnode_t *node; int i; node = loc->node_access; 10706b: 8b 45 08 mov 0x8(%ebp),%eax 10706e: 8b 10 mov (%eax),%edx if ( node->type != IMFS_SYM_LINK ) 107070: 31 c0 xor %eax,%eax 107072: 83 7a 4c 04 cmpl $0x4,0x4c(%edx) 107076: 74 14 je 10708c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 107078: e8 df a8 00 00 call 11195c <__errno> <== NOT EXECUTED 10707d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107083: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107086: eb 12 jmp 10709a <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 107088: 88 0c 06 mov %cl,(%esi,%eax,1) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 10708b: 40 inc %eax 10708c: 39 d8 cmp %ebx,%eax 10708e: 73 0a jae 10709a 107090: 8b 4a 50 mov 0x50(%edx),%ecx 107093: 8a 0c 01 mov (%ecx,%eax,1),%cl 107096: 84 c9 test %cl,%cl 107098: 75 ee jne 107088 buf[i] = node->info.sym_link.name[i]; return i; } 10709a: 5b pop %ebx 10709b: 5e pop %esi 10709c: c9 leave 10709d: c3 ret =============================================================================== 001070a0 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 1070a0: 55 push %ebp 1070a1: 89 e5 mov %esp,%ebp 1070a3: 53 push %ebx 1070a4: 83 ec 18 sub $0x18,%esp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 1070a7: 8b 45 0c mov 0xc(%ebp),%eax 1070aa: 8b 18 mov (%eax),%ebx strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 1070ac: 6a 20 push $0x20 1070ae: ff 75 14 pushl 0x14(%ebp) 1070b1: 8d 43 0c lea 0xc(%ebx),%eax 1070b4: 50 push %eax 1070b5: e8 be b5 00 00 call 112678 if ( the_jnode->Parent != NULL ) 1070ba: 83 c4 10 add $0x10,%esp 1070bd: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 1070c1: 74 0c je 1070cf <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 1070c3: 83 ec 0c sub $0xc,%esp 1070c6: 53 push %ebx 1070c7: e8 50 3d 00 00 call 10ae1c <_Chain_Extract> 1070cc: 83 c4 10 add $0x10,%esp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 1070cf: 8b 45 10 mov 0x10(%ebp),%eax 1070d2: 8b 00 mov (%eax),%eax the_jnode->Parent = new_parent; 1070d4: 89 43 08 mov %eax,0x8(%ebx) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 1070d7: 51 push %ecx 1070d8: 51 push %ecx 1070d9: 53 push %ebx 1070da: 83 c0 50 add $0x50,%eax 1070dd: 50 push %eax 1070de: e8 15 3d 00 00 call 10adf8 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 1070e3: 58 pop %eax 1070e4: 5a pop %edx 1070e5: 6a 00 push $0x0 1070e7: 8d 45 f0 lea -0x10(%ebp),%eax 1070ea: 50 push %eax 1070eb: e8 24 06 00 00 call 107714 1070f0: 8b 45 f0 mov -0x10(%ebp),%eax 1070f3: 89 43 48 mov %eax,0x48(%ebx) return 0; } 1070f6: 31 c0 xor %eax,%eax 1070f8: 8b 5d fc mov -0x4(%ebp),%ebx 1070fb: c9 leave 1070fc: c3 ret =============================================================================== 0010e978 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 10e978: 55 push %ebp 10e979: 89 e5 mov %esp,%ebp 10e97b: 56 push %esi 10e97c: 53 push %ebx 10e97d: 83 ec 10 sub $0x10,%esp 10e980: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 10e983: 8b 1e mov (%esi),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 10e985: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10e989: 74 13 je 10e99e <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10e98b: 83 ec 0c sub $0xc,%esp 10e98e: 53 push %ebx 10e98f: e8 88 c4 ff ff call 10ae1c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 10e994: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10e99b: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 10e99e: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 10e9a2: 50 push %eax 10e9a3: 50 push %eax 10e9a4: 6a 00 push $0x0 10e9a6: 8d 45 f0 lea -0x10(%ebp),%eax 10e9a9: 50 push %eax 10e9aa: e8 65 8d ff ff call 107714 10e9af: 8b 45 f0 mov -0x10(%ebp),%eax 10e9b2: 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) ) { 10e9b5: 89 1c 24 mov %ebx,(%esp) 10e9b8: e8 71 02 00 00 call 10ec2e 10e9bd: 83 c4 10 add $0x10,%esp 10e9c0: 85 c0 test %eax,%eax 10e9c2: 75 3f jne 10ea03 <== NEVER TAKEN 10e9c4: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 10e9c9: 75 38 jne 10ea03 <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 10e9cb: a1 34 34 12 00 mov 0x123434,%eax 10e9d0: 8b 50 04 mov 0x4(%eax),%edx 10e9d3: 3b 16 cmp (%esi),%edx 10e9d5: 75 07 jne 10e9de <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 10e9d7: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 10e9de: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 10e9e2: 75 13 jne 10e9f7 if ( the_jnode->info.sym_link.name ) 10e9e4: 8b 43 50 mov 0x50(%ebx),%eax 10e9e7: 85 c0 test %eax,%eax 10e9e9: 74 0c je 10e9f7 <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); 10e9eb: 83 ec 0c sub $0xc,%esp 10e9ee: 50 push %eax 10e9ef: e8 a8 8c ff ff call 10769c 10e9f4: 83 c4 10 add $0x10,%esp } free( the_jnode ); 10e9f7: 83 ec 0c sub $0xc,%esp 10e9fa: 53 push %ebx 10e9fb: e8 9c 8c ff ff call 10769c 10ea00: 83 c4 10 add $0x10,%esp } return 0; } 10ea03: 31 c0 xor %eax,%eax 10ea05: 8d 65 f8 lea -0x8(%ebp),%esp 10ea08: 5b pop %ebx 10ea09: 5e pop %esi 10ea0a: c9 leave 10ea0b: c3 ret =============================================================================== 0010ea0c : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 10ea0c: 55 push %ebp 10ea0d: 89 e5 mov %esp,%ebp 10ea0f: 56 push %esi 10ea10: 53 push %ebx 10ea11: 8b 4d 08 mov 0x8(%ebp),%ecx 10ea14: 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; 10ea17: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 10ea19: 8b 5a 4c mov 0x4c(%edx),%ebx 10ea1c: 83 eb 02 sub $0x2,%ebx 10ea1f: 83 fb 05 cmp $0x5,%ebx 10ea22: 77 33 ja 10ea57 <== NEVER TAKEN 10ea24: ff 24 9d cc f5 11 00 jmp *0x11f5cc(,%ebx,4) case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 10ea2b: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 10ea2e: 8b 72 50 mov 0x50(%edx),%esi 10ea31: 89 70 18 mov %esi,0x18(%eax) 10ea34: 89 58 1c mov %ebx,0x1c(%eax) break; 10ea37: eb 2e jmp 10ea67 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 10ea39: 8b 5a 50 mov 0x50(%edx),%ebx 10ea3c: 8b 72 54 mov 0x54(%edx),%esi 10ea3f: 89 58 20 mov %ebx,0x20(%eax) 10ea42: 89 70 24 mov %esi,0x24(%eax) break; 10ea45: eb 20 jmp 10ea67 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 10ea47: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED 10ea4e: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) <== NOT EXECUTED break; 10ea55: eb 10 jmp 10ea67 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ea57: e8 00 2f 00 00 call 11195c <__errno> <== NOT EXECUTED 10ea5c: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10ea62: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10ea65: eb 47 jmp 10eaae <== 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 ); 10ea67: 8b 49 10 mov 0x10(%ecx),%ecx 10ea6a: 8b 49 34 mov 0x34(%ecx),%ecx 10ea6d: 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 = 10ea6f: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 10ea75: 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; 10ea78: 8b 4a 30 mov 0x30(%edx),%ecx 10ea7b: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 10ea7e: 8b 4a 34 mov 0x34(%edx),%ecx 10ea81: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 10ea85: 8b 4a 38 mov 0x38(%edx),%ecx 10ea88: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 10ea8b: 8b 4a 3c mov 0x3c(%edx),%ecx 10ea8e: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 10ea92: 66 8b 4a 3e mov 0x3e(%edx),%cx 10ea96: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 10ea9a: 8b 4a 40 mov 0x40(%edx),%ecx 10ea9d: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 10eaa0: 8b 4a 44 mov 0x44(%edx),%ecx 10eaa3: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 10eaa6: 8b 52 48 mov 0x48(%edx),%edx 10eaa9: 89 50 38 mov %edx,0x38(%eax) 10eaac: 31 c0 xor %eax,%eax return 0; } 10eaae: 5b pop %ebx 10eaaf: 5e pop %esi 10eab0: c9 leave 10eab1: c3 ret =============================================================================== 00107100 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 107100: 55 push %ebp 107101: 89 e5 mov %esp,%ebp 107103: 57 push %edi 107104: 53 push %ebx 107105: 83 ec 40 sub $0x40,%esp 107108: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 10710b: 31 c0 xor %eax,%eax 10710d: 83 c9 ff or $0xffffffff,%ecx 107110: 89 d7 mov %edx,%edi 107112: f2 ae repnz scas %es:(%edi),%al 107114: f7 d1 not %ecx 107116: 49 dec %ecx 107117: 8d 45 f4 lea -0xc(%ebp),%eax 10711a: 50 push %eax 10711b: 8d 5d bf lea -0x41(%ebp),%ebx 10711e: 53 push %ebx 10711f: 51 push %ecx 107120: 52 push %edx 107121: e8 92 77 00 00 call 10e8b8 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 107126: 58 pop %eax 107127: ff 75 0c pushl 0xc(%ebp) 10712a: e8 f1 b3 00 00 call 112520 10712f: 89 45 e0 mov %eax,-0x20(%ebp) if (info.sym_link.name == NULL) { 107132: 83 c4 10 add $0x10,%esp 107135: 85 c0 test %eax,%eax 107137: 75 10 jne 107149 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 107139: e8 1e a8 00 00 call 11195c <__errno> <== NOT EXECUTED 10713e: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107144: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107147: eb 3e jmp 107187 <== NOT EXECUTED * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107149: 83 ec 0c sub $0xc,%esp 10714c: 8d 45 e0 lea -0x20(%ebp),%eax 10714f: 50 push %eax 107150: 68 ff a1 00 00 push $0xa1ff 107155: 53 push %ebx 107156: 6a 04 push $0x4 107158: ff 75 08 pushl 0x8(%ebp) 10715b: e8 58 6d 00 00 call 10deb8 107160: 89 c2 mov %eax,%edx new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 107162: 83 c4 20 add $0x20,%esp 107165: 31 c0 xor %eax,%eax 107167: 85 d2 test %edx,%edx 107169: 75 1c jne 107187 <== ALWAYS TAKEN free(info.sym_link.name); 10716b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10716e: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 107171: e8 26 05 00 00 call 10769c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 107176: e8 e1 a7 00 00 call 11195c <__errno> <== NOT EXECUTED 10717b: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107181: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107184: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 107187: 8d 65 f8 lea -0x8(%ebp),%esp 10718a: 5b pop %ebx 10718b: 5f pop %edi 10718c: c9 leave 10718d: c3 ret =============================================================================== 00107190 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 107190: 55 push %ebp 107191: 89 e5 mov %esp,%ebp 107193: 57 push %edi 107194: 56 push %esi 107195: 53 push %ebx 107196: 83 ec 2c sub $0x2c,%esp IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 107199: 8b 45 0c mov 0xc(%ebp),%eax 10719c: 8b 18 mov (%eax),%ebx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 10719e: 83 7b 4c 03 cmpl $0x3,0x4c(%ebx) 1071a2: 75 7a jne 10721e if ( !node->info.hard_link.link_node ) 1071a4: 8b 43 50 mov 0x50(%ebx),%eax 1071a7: 85 c0 test %eax,%eax 1071a9: 75 10 jne 1071bb <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 1071ab: e8 ac a7 00 00 call 11195c <__errno> <== NOT EXECUTED 1071b0: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1071b6: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1071b9: eb 75 jmp 107230 <== NOT EXECUTED the_link = *loc; 1071bb: 8d 7d cc lea -0x34(%ebp),%edi 1071be: b9 05 00 00 00 mov $0x5,%ecx 1071c3: 8b 75 0c mov 0xc(%ebp),%esi 1071c6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 1071c8: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 1071cb: 83 ec 0c sub $0xc,%esp 1071ce: 8d 75 cc lea -0x34(%ebp),%esi 1071d1: 56 push %esi 1071d2: e8 e1 6d 00 00 call 10dfb8 /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 1071d7: 8b 43 50 mov 0x50(%ebx),%eax 1071da: 8b 50 34 mov 0x34(%eax),%edx 1071dd: 83 c4 10 add $0x10,%esp 1071e0: 66 83 fa 01 cmp $0x1,%dx 1071e4: 75 1a jne 107200 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 1071e6: 51 push %ecx 1071e7: 51 push %ecx 1071e8: 56 push %esi 1071e9: ff 75 08 pushl 0x8(%ebp) 1071ec: 8b 45 d4 mov -0x2c(%ebp),%eax 1071ef: ff 50 34 call *0x34(%eax) 1071f2: 89 c2 mov %eax,%edx if ( result != 0 ) 1071f4: 83 c4 10 add $0x10,%esp 1071f7: 83 c8 ff or $0xffffffff,%eax 1071fa: 85 d2 test %edx,%edx 1071fc: 74 20 je 10721e 1071fe: eb 30 jmp 107230 return -1; } else { node->info.hard_link.link_node->st_nlink --; 107200: 4a dec %edx 107201: 66 89 50 34 mov %dx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 107205: 52 push %edx 107206: 52 push %edx 107207: 6a 00 push $0x0 107209: 8d 45 e0 lea -0x20(%ebp),%eax 10720c: 50 push %eax 10720d: e8 02 05 00 00 call 107714 107212: 8b 43 50 mov 0x50(%ebx),%eax 107215: 8b 55 e0 mov -0x20(%ebp),%edx 107218: 89 50 48 mov %edx,0x48(%eax) 10721b: 83 c4 10 add $0x10,%esp /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 10721e: 50 push %eax 10721f: 50 push %eax 107220: 8b 55 0c mov 0xc(%ebp),%edx 107223: 8b 42 08 mov 0x8(%edx),%eax 107226: 52 push %edx 107227: ff 75 08 pushl 0x8(%ebp) 10722a: ff 50 34 call *0x34(%eax) return result; 10722d: 83 c4 10 add $0x10,%esp } 107230: 8d 65 f4 lea -0xc(%ebp),%esp 107233: 5b pop %ebx 107234: 5e pop %esi 107235: 5f pop %edi 107236: c9 leave 107237: c3 ret =============================================================================== 00107238 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107238: 55 push %ebp 107239: 89 e5 mov %esp,%ebp 10723b: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 10723e: 8b 45 08 mov 0x8(%ebp),%eax 107241: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107244: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107248: 74 0d je 107257 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 10724a: e8 0d a7 00 00 call 11195c <__errno> <== NOT EXECUTED 10724f: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107255: eb 11 jmp 107268 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 107257: 83 78 5c 00 cmpl $0x0,0x5c(%eax) 10725b: 75 10 jne 10726d <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 10725d: e8 fa a6 00 00 call 11195c <__errno> <== NOT EXECUTED 107262: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107268: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10726b: eb 09 jmp 107276 <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 10726d: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) 107274: 31 c0 xor %eax,%eax return 0; } 107276: c9 leave 107277: c3 ret =============================================================================== 00107894 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 107894: 55 push %ebp 107895: 89 e5 mov %esp,%ebp 107897: 57 push %edi 107898: 56 push %esi 107899: 53 push %ebx 10789a: 83 ec 0c sub $0xc,%esp 10789d: 8b 5d 08 mov 0x8(%ebp),%ebx 1078a0: 8b 75 0c mov 0xc(%ebp),%esi #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 1078a3: a1 b0 39 12 00 mov 0x1239b0,%eax 1078a8: 85 c0 test %eax,%eax 1078aa: 74 02 je 1078ae <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->initialize)(); 1078ac: ff 10 call *(%eax) <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1078ae: e8 7c ff ff ff call 10782f /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1078b3: a1 b4 39 12 00 mov 0x1239b4,%eax 1078b8: 85 c0 test %eax,%eax 1078ba: 74 12 je 1078ce <== ALWAYS TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1078bc: 52 push %edx <== NOT EXECUTED 1078bd: 52 push %edx <== NOT EXECUTED 1078be: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1078c1: 53 push %ebx <== NOT EXECUTED 1078c2: ff 10 call *(%eax) <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1078c4: 8d 34 33 lea (%ebx,%esi,1),%esi <== NOT EXECUTED 1078c7: 29 c6 sub %eax,%esi <== NOT EXECUTED 1078c9: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1078cb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 1078ce: 80 3d ad 39 12 00 00 cmpb $0x0,0x1239ad 1078d5: 75 11 jne 1078e8 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1078d7: 80 3d 00 17 12 00 00 cmpb $0x0,0x121700 1078de: 74 08 je 1078e8 ) { memset( heap_begin, 0, heap_size ); 1078e0: 31 c0 xor %eax,%eax 1078e2: 89 df mov %ebx,%edi 1078e4: 89 f1 mov %esi,%ecx 1078e6: f3 aa rep stos %al,%es:(%edi) * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 1078e8: 80 3d ad 39 12 00 00 cmpb $0x0,0x1239ad 1078ef: 75 20 jne 107911 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1078f1: 6a 04 push $0x4 1078f3: 56 push %esi 1078f4: 53 push %ebx 1078f5: ff 35 30 16 12 00 pushl 0x121630 1078fb: e8 e0 39 00 00 call 10b2e0 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 107900: 83 c4 10 add $0x10,%esp 107903: 85 c0 test %eax,%eax 107905: 75 0a jne 107911 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 107907: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10790a: 6a 1a push $0x1a <== NOT EXECUTED 10790c: e8 8b 32 00 00 call 10ab9c <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 107911: 8b 1d 18 55 12 00 mov 0x125518,%ebx 107917: 83 ec 0c sub $0xc,%esp 10791a: ff 35 30 16 12 00 pushl 0x121630 107920: e8 27 44 00 00 call 10bd4c <_Protected_heap_Get_size> 107925: 8d 1c 18 lea (%eax,%ebx,1),%ebx 107928: 89 1d 18 55 12 00 mov %ebx,0x125518 10792e: 83 c4 10 add $0x10,%esp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 107931: 8d 65 f4 lea -0xc(%ebp),%esp 107934: 5b pop %ebx 107935: 5e pop %esi 107936: 5f pop %edi 107937: c9 leave 107938: c3 ret =============================================================================== 00106e0e : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 106e0e: 55 push %ebp <== NOT EXECUTED 106e0f: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106e11: 57 push %edi <== NOT EXECUTED 106e12: 56 push %esi <== NOT EXECUTED 106e13: 53 push %ebx <== NOT EXECUTED 106e14: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 106e17: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 106e1a: 85 db test %ebx,%ebx <== NOT EXECUTED 106e1c: 0f 84 fa 00 00 00 je 106f1c <== NOT EXECUTED return; if ( !print_handler ) 106e22: a1 34 4d 12 00 mov 0x124d34,%eax <== NOT EXECUTED 106e27: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 106e2a: 85 c0 test %eax,%eax <== NOT EXECUTED 106e2c: 0f 84 ea 00 00 00 je 106f1c <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 106e32: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 106e35: 75 1d jne 106e54 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 106e37: 83 3d 5c 50 12 00 00 cmpl $0x0,0x12505c <== NOT EXECUTED 106e3e: 0f 84 d8 00 00 00 je 106f1c <== NOT EXECUTED 106e44: be 58 50 12 00 mov $0x125058,%esi <== NOT EXECUTED 106e49: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED 106e50: 31 db xor %ebx,%ebx <== NOT EXECUTED 106e52: eb 0f jmp 106e63 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 106e54: 8d b3 c0 00 00 00 lea 0xc0(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 106e5a: 8b 8b d4 00 00 00 mov 0xd4(%ebx),%ecx <== NOT EXECUTED 106e60: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 106e63: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 106e66: 83 c2 10 add $0x10,%edx <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 106e69: 8b 06 mov (%esi),%eax <== NOT EXECUTED 106e6b: 83 e8 10 sub $0x10,%eax <== NOT EXECUTED 106e6e: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 106e71: 50 push %eax <== NOT EXECUTED 106e72: 52 push %edx <== NOT EXECUTED 106e73: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 106e76: e8 6c ff ff ff call 106de7 <== NOT EXECUTED if ( high_water_mark ) 106e7b: 59 pop %ecx <== NOT EXECUTED 106e7c: 5f pop %edi <== NOT EXECUTED 106e7d: 31 ff xor %edi,%edi <== NOT EXECUTED 106e7f: 85 c0 test %eax,%eax <== NOT EXECUTED 106e81: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 106e84: 74 08 je 106e8e <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 106e86: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 106e89: 8d 3c 0a lea (%edx,%ecx,1),%edi <== NOT EXECUTED 106e8c: 29 c7 sub %eax,%edi <== NOT EXECUTED else used = 0; if ( the_thread ) { 106e8e: 85 db test %ebx,%ebx <== NOT EXECUTED 106e90: 74 26 je 106eb8 <== NOT EXECUTED (*print_handler)( 106e92: 52 push %edx <== NOT EXECUTED 106e93: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 106e96: 50 push %eax <== NOT EXECUTED 106e97: 6a 05 push $0x5 <== NOT EXECUTED 106e99: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 106e9c: e8 e7 38 00 00 call 10a788 <== NOT EXECUTED 106ea1: 50 push %eax <== NOT EXECUTED 106ea2: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 106ea5: 68 12 f3 11 00 push $0x11f312 <== NOT EXECUTED 106eaa: ff 35 30 4d 12 00 pushl 0x124d30 <== NOT EXECUTED 106eb0: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 106eb3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 106eb6: eb 14 jmp 106ecc <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 106eb8: 50 push %eax <== NOT EXECUTED 106eb9: 6a ff push $0xffffffff <== NOT EXECUTED 106ebb: 68 1f f3 11 00 push $0x11f31f <== NOT EXECUTED 106ec0: ff 35 30 4d 12 00 pushl 0x124d30 <== NOT EXECUTED 106ec6: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 106ec9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } (*print_handler)( 106ecc: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 106ecf: 53 push %ebx <== NOT EXECUTED 106ed0: 53 push %ebx <== NOT EXECUTED 106ed1: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 106ed4: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 106ed7: 8b 16 mov (%esi),%edx <== NOT EXECUTED 106ed9: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 106edd: 52 push %edx <== NOT EXECUTED 106ede: 50 push %eax <== NOT EXECUTED 106edf: 68 2d f3 11 00 push $0x11f32d <== NOT EXECUTED 106ee4: ff 35 30 4d 12 00 pushl 0x124d30 <== NOT EXECUTED 106eea: ff 15 34 4d 12 00 call *0x124d34 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 106ef0: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 106ef3: 83 3d 2c 4d 12 00 00 cmpl $0x0,0x124d2c <== NOT EXECUTED 106efa: a1 34 4d 12 00 mov 0x124d34,%eax <== NOT EXECUTED 106eff: 75 09 jne 106f0a <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 106f01: 51 push %ecx <== NOT EXECUTED 106f02: 51 push %ecx <== NOT EXECUTED 106f03: 68 4b f3 11 00 push $0x11f34b <== NOT EXECUTED 106f08: eb 07 jmp 106f11 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 106f0a: 52 push %edx <== NOT EXECUTED 106f0b: 57 push %edi <== NOT EXECUTED 106f0c: 68 58 f3 11 00 push $0x11f358 <== NOT EXECUTED 106f11: ff 35 30 4d 12 00 pushl 0x124d30 <== NOT EXECUTED 106f17: ff d0 call *%eax <== NOT EXECUTED 106f19: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 106f1c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 106f1f: 5b pop %ebx <== NOT EXECUTED 106f20: 5e pop %esi <== NOT EXECUTED 106f21: 5f pop %edi <== NOT EXECUTED 106f22: c9 leave <== NOT EXECUTED 106f23: c3 ret <== NOT EXECUTED =============================================================================== 00107121 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 107121: 55 push %ebp 107122: 89 e5 mov %esp,%ebp 107124: 57 push %edi static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if (Stack_check_Initialized) 107125: 83 3d 2c 4d 12 00 00 cmpl $0x0,0x124d2c 10712c: 75 4d jne 10717b 10712e: 31 c0 xor %eax,%eax /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 107130: 89 c2 mov %eax,%edx 107132: 83 e2 03 and $0x3,%edx 107135: 8b 14 95 90 f4 11 00 mov 0x11f490(,%edx,4),%edx 10713c: 89 14 85 48 50 12 00 mov %edx,0x125048(,%eax,4) /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 107143: 40 inc %eax 107144: 83 f8 04 cmp $0x4,%eax 107147: 75 e7 jne 107130 /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 107149: 8b 15 c0 51 12 00 mov 0x1251c0,%edx 10714f: 85 d2 test %edx,%edx 107151: 74 1e je 107171 <== NEVER TAKEN 107153: 8b 0d 80 51 12 00 mov 0x125180,%ecx 107159: 85 c9 test %ecx,%ecx 10715b: 74 14 je 107171 <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 10715d: 89 15 5c 50 12 00 mov %edx,0x12505c Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 107163: 29 d1 sub %edx,%ecx 107165: 89 0d 58 50 12 00 mov %ecx,0x125058 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 10716b: b0 a5 mov $0xa5,%al 10716d: 89 d7 mov %edx,%edi 10716f: f3 aa rep stos %al,%es:(%edi) } #endif Stack_check_Initialized = 1; 107171: c7 05 2c 4d 12 00 01 movl $0x1,0x124d2c 107178: 00 00 00 } 10717b: 5f pop %edi 10717c: c9 leave 10717d: c3 ret =============================================================================== 00106de7 : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 106de7: 55 push %ebp <== NOT EXECUTED 106de8: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106dea: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 106ded: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 106df0: 83 c0 10 add $0x10,%eax <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 106df3: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED 106df6: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 106df9: eb 0b jmp 106e06 <== NOT EXECUTED if (*base != U32_PATTERN) 106dfb: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED 106e01: 75 09 jne 106e0c <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 106e03: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 106e06: 39 d0 cmp %edx,%eax <== NOT EXECUTED 106e08: 72 f1 jb 106dfb <== NOT EXECUTED 106e0a: 31 c0 xor %eax,%eax <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 106e0c: c9 leave <== NOT EXECUTED 106e0d: c3 ret <== NOT EXECUTED =============================================================================== 00106f9c : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 106f9c: 55 push %ebp <== NOT EXECUTED 106f9d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106f9f: 56 push %esi <== NOT EXECUTED 106fa0: 53 push %ebx <== NOT EXECUTED 106fa1: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 106fa4: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 106fa7: 8a 55 0c mov 0xc(%ebp),%dl <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 106faa: 8b b3 c4 00 00 00 mov 0xc4(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 106fb0: 68 bf f3 11 00 push $0x11f3bf <== NOT EXECUTED 106fb5: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 106fb8: e8 6f 17 00 00 call 10872c <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 106fbd: 5a pop %edx <== NOT EXECUTED 106fbe: 59 pop %ecx <== NOT EXECUTED 106fbf: 53 push %ebx <== NOT EXECUTED 106fc0: 68 cf f3 11 00 push $0x11f3cf <== NOT EXECUTED 106fc5: e8 62 17 00 00 call 10872c <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 106fca: 59 pop %ecx <== NOT EXECUTED 106fcb: 58 pop %eax <== NOT EXECUTED 106fcc: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 106fcf: 68 ec f3 11 00 push $0x11f3ec <== NOT EXECUTED 106fd4: e8 53 17 00 00 call 10872c <== NOT EXECUTED printk( 106fd9: 58 pop %eax <== NOT EXECUTED 106fda: 5a pop %edx <== NOT EXECUTED 106fdb: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 106fde: 68 fe f3 11 00 push $0x11f3fe <== NOT EXECUTED 106fe3: e8 44 17 00 00 call 10872c <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 106fe8: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 106feb: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 106fee: 50 push %eax <== NOT EXECUTED 106fef: 6a 20 push $0x20 <== NOT EXECUTED 106ff1: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 106ff4: e8 8f 37 00 00 call 10a788 <== NOT EXECUTED 106ff9: 5a pop %edx <== NOT EXECUTED 106ffa: 59 pop %ecx <== NOT EXECUTED 106ffb: 50 push %eax <== NOT EXECUTED 106ffc: 68 12 f4 11 00 push $0x11f412 <== NOT EXECUTED 107001: e8 26 17 00 00 call 10872c <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 107006: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx <== NOT EXECUTED 10700c: 8b 83 c0 00 00 00 mov 0xc0(%ebx),%eax <== NOT EXECUTED 107012: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 107015: 53 push %ebx <== NOT EXECUTED 107016: 51 push %ecx <== NOT EXECUTED 107017: 50 push %eax <== NOT EXECUTED 107018: 68 28 f4 11 00 push $0x11f428 <== NOT EXECUTED 10701d: e8 0a 17 00 00 call 10872c <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 107022: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107025: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 107028: 84 d2 test %dl,%dl <== NOT EXECUTED 10702a: 75 17 jne 107043 <== NOT EXECUTED * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 10702c: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 10702f: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 107032: 56 push %esi <== NOT EXECUTED 107033: 50 push %eax <== NOT EXECUTED 107034: 6a 10 push $0x10 <== NOT EXECUTED 107036: 68 59 f4 11 00 push $0x11f459 <== NOT EXECUTED 10703b: e8 ec 16 00 00 call 10872c <== NOT EXECUTED 107040: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 107043: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107046: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 10704b: e8 e4 3e 00 00 call 10af34 <== NOT EXECUTED =============================================================================== 00117a60 <_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 ) { 117a60: 55 push %ebp 117a61: 89 e5 mov %esp,%ebp 117a63: 57 push %edi 117a64: 56 push %esi 117a65: 53 push %ebx 117a66: 83 ec 1c sub $0x1c,%esp 117a69: 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 ) { 117a6c: b8 01 00 00 00 mov $0x1,%eax 117a71: 8b 55 10 mov 0x10(%ebp),%edx 117a74: 3b 53 4c cmp 0x4c(%ebx),%edx 117a77: 77 4c ja 117ac5 <_CORE_message_queue_Broadcast+0x65><== NEVER TAKEN * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 117a79: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 117a80: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 117a84: 74 23 je 117aa9 <_CORE_message_queue_Broadcast+0x49> *count = 0; 117a86: 8b 45 1c mov 0x1c(%ebp),%eax 117a89: c7 00 00 00 00 00 movl $0x0,(%eax) 117a8f: eb 32 jmp 117ac3 <_CORE_message_queue_Broadcast+0x63> */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 117a91: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 117a94: 8b 42 2c mov 0x2c(%edx),%eax 117a97: 89 c7 mov %eax,%edi 117a99: 8b 75 0c mov 0xc(%ebp),%esi 117a9c: 8b 4d 10 mov 0x10(%ebp),%ecx 117a9f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 117aa1: 8b 42 28 mov 0x28(%edx),%eax 117aa4: 8b 55 10 mov 0x10(%ebp),%edx 117aa7: 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))) { 117aa9: 83 ec 0c sub $0xc,%esp 117aac: 53 push %ebx 117aad: e8 ae 20 00 00 call 119b60 <_Thread_queue_Dequeue> 117ab2: 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 = 117ab4: 83 c4 10 add $0x10,%esp 117ab7: 85 c0 test %eax,%eax 117ab9: 75 d6 jne 117a91 <_CORE_message_queue_Broadcast+0x31> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 117abb: 8b 55 e4 mov -0x1c(%ebp),%edx 117abe: 8b 45 1c mov 0x1c(%ebp),%eax 117ac1: 89 10 mov %edx,(%eax) 117ac3: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 117ac5: 8d 65 f4 lea -0xc(%ebp),%esp 117ac8: 5b pop %ebx 117ac9: 5e pop %esi 117aca: 5f pop %edi 117acb: c9 leave 117acc: c3 ret =============================================================================== 001128d0 <_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 ) { 1128d0: 55 push %ebp 1128d1: 89 e5 mov %esp,%ebp 1128d3: 57 push %edi 1128d4: 56 push %esi 1128d5: 53 push %ebx 1128d6: 83 ec 0c sub $0xc,%esp 1128d9: 8b 5d 08 mov 0x8(%ebp),%ebx 1128dc: 8b 75 10 mov 0x10(%ebp),%esi 1128df: 8b 55 14 mov 0x14(%ebp),%edx size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 1128e2: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1128e5: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1128ec: 89 53 4c mov %edx,0x4c(%ebx) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 1128ef: 89 d0 mov %edx,%eax 1128f1: f6 c2 03 test $0x3,%dl 1128f4: 74 0a je 112900 <_CORE_message_queue_Initialize+0x30> allocated_message_size += sizeof(uint32_t); 1128f6: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 1128f9: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 1128fc: 39 d0 cmp %edx,%eax 1128fe: 72 5f jb 11295f <_CORE_message_queue_Initialize+0x8f><== 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)); 112900: 8d 78 10 lea 0x10(%eax),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 112903: 89 fa mov %edi,%edx 112905: 0f af d6 imul %esi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 112908: 39 c2 cmp %eax,%edx 11290a: 72 53 jb 11295f <_CORE_message_queue_Initialize+0x8f><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 11290c: 83 ec 0c sub $0xc,%esp 11290f: 52 push %edx 112910: e8 5f 25 00 00 call 114e74 <_Workspace_Allocate> 112915: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 112918: 83 c4 10 add $0x10,%esp 11291b: 85 c0 test %eax,%eax 11291d: 74 40 je 11295f <_CORE_message_queue_Initialize+0x8f> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 11291f: 57 push %edi 112920: 56 push %esi 112921: 50 push %eax 112922: 8d 43 60 lea 0x60(%ebx),%eax 112925: 50 push %eax 112926: e8 21 4a 00 00 call 11734c <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11292b: 8d 43 54 lea 0x54(%ebx),%eax 11292e: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 112931: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 112938: 8d 43 50 lea 0x50(%ebx),%eax 11293b: 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( 11293e: 6a 06 push $0x6 112940: 68 80 00 00 00 push $0x80 112945: 8b 45 0c mov 0xc(%ebp),%eax 112948: 83 38 01 cmpl $0x1,(%eax) 11294b: 0f 94 c0 sete %al 11294e: 0f b6 c0 movzbl %al,%eax 112951: 50 push %eax 112952: 53 push %ebx 112953: e8 28 1c 00 00 call 114580 <_Thread_queue_Initialize> 112958: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 11295a: 83 c4 20 add $0x20,%esp 11295d: eb 02 jmp 112961 <_CORE_message_queue_Initialize+0x91> 11295f: 31 c0 xor %eax,%eax } 112961: 8d 65 f4 lea -0xc(%ebp),%esp 112964: 5b pop %ebx 112965: 5e pop %esi 112966: 5f pop %edi 112967: c9 leave 112968: c3 ret =============================================================================== 0011296c <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 11296c: 55 push %ebp 11296d: 89 e5 mov %esp,%ebp 11296f: 57 push %edi 112970: 56 push %esi 112971: 53 push %ebx 112972: 83 ec 2c sub $0x2c,%esp 112975: 8b 45 08 mov 0x8(%ebp),%eax 112978: 8b 55 0c mov 0xc(%ebp),%edx 11297b: 89 55 dc mov %edx,-0x24(%ebp) 11297e: 8b 55 10 mov 0x10(%ebp),%edx 112981: 89 55 e0 mov %edx,-0x20(%ebp) 112984: 8b 7d 14 mov 0x14(%ebp),%edi 112987: 8b 55 1c mov 0x1c(%ebp),%edx 11298a: 89 55 d4 mov %edx,-0x2c(%ebp) 11298d: 8a 55 18 mov 0x18(%ebp),%dl 112990: 88 55 db mov %dl,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 112993: 8b 0d 14 dc 12 00 mov 0x12dc14,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 112999: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 1129a0: 9c pushf 1129a1: fa cli 1129a2: 8f 45 e4 popl -0x1c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1129a5: 8b 50 50 mov 0x50(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1129a8: 8d 58 54 lea 0x54(%eax),%ebx 1129ab: 39 da cmp %ebx,%edx 1129ad: 74 47 je 1129f6 <_CORE_message_queue_Seize+0x8a> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 1129af: 8b 32 mov (%edx),%esi the_chain->first = new_first; 1129b1: 89 70 50 mov %esi,0x50(%eax) new_first->previous = _Chain_Head(the_chain); 1129b4: 8d 58 50 lea 0x50(%eax),%ebx 1129b7: 89 5e 04 mov %ebx,0x4(%esi) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 1129ba: 85 d2 test %edx,%edx 1129bc: 74 38 je 1129f6 <_CORE_message_queue_Seize+0x8a><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 1129be: ff 48 48 decl 0x48(%eax) _ISR_Enable( level ); 1129c1: ff 75 e4 pushl -0x1c(%ebp) 1129c4: 9d popf *size_p = the_message->Contents.size; 1129c5: 8b 4a 08 mov 0x8(%edx),%ecx 1129c8: 89 0f mov %ecx,(%edi) _Thread_Executing->Wait.count = 1129ca: 8b 0d 14 dc 12 00 mov 0x12dc14,%ecx 1129d0: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1129d7: 8d 72 0c lea 0xc(%edx),%esi 1129da: 8b 0f mov (%edi),%ecx 1129dc: 8b 7d e0 mov -0x20(%ebp),%edi 1129df: f3 a4 rep movsb %ds:(%esi),%es:(%edi) RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 1129e1: 89 55 0c mov %edx,0xc(%ebp) 1129e4: 83 c0 60 add $0x60,%eax 1129e7: 89 45 08 mov %eax,0x8(%ebp) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 1129ea: 83 c4 2c add $0x2c,%esp 1129ed: 5b pop %ebx 1129ee: 5e pop %esi 1129ef: 5f pop %edi 1129f0: c9 leave 1129f1: e9 5a fe ff ff jmp 112850 <_Chain_Append> return; } #endif } if ( !wait ) { 1129f6: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 1129fa: 75 13 jne 112a0f <_CORE_message_queue_Seize+0xa3> _ISR_Enable( level ); 1129fc: ff 75 e4 pushl -0x1c(%ebp) 1129ff: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 112a00: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 112a07: 83 c4 2c add $0x2c,%esp 112a0a: 5b pop %ebx 112a0b: 5e pop %esi 112a0c: 5f pop %edi 112a0d: c9 leave 112a0e: c3 ret RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 112a0f: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 112a16: 89 41 44 mov %eax,0x44(%ecx) executing->Wait.id = id; 112a19: 8b 55 dc mov -0x24(%ebp),%edx 112a1c: 89 51 20 mov %edx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 112a1f: 8b 55 e0 mov -0x20(%ebp),%edx 112a22: 89 51 2c mov %edx,0x2c(%ecx) executing->Wait.return_argument = size_p; 112a25: 89 79 28 mov %edi,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 112a28: ff 75 e4 pushl -0x1c(%ebp) 112a2b: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 112a2c: c7 45 10 24 46 11 00 movl $0x114624,0x10(%ebp) 112a33: 8b 55 d4 mov -0x2c(%ebp),%edx 112a36: 89 55 0c mov %edx,0xc(%ebp) 112a39: 89 45 08 mov %eax,0x8(%ebp) } 112a3c: 83 c4 2c add $0x2c,%esp 112a3f: 5b pop %ebx 112a40: 5e pop %esi 112a41: 5f pop %edi 112a42: c9 leave executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 112a43: e9 20 19 00 00 jmp 114368 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010afe5 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10afe5: 55 push %ebp 10afe6: 89 e5 mov %esp,%ebp 10afe8: 53 push %ebx 10afe9: 83 ec 14 sub $0x14,%esp 10afec: 8b 5d 08 mov 0x8(%ebp),%ebx 10afef: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10aff2: a1 50 56 12 00 mov 0x125650,%eax 10aff7: 85 c0 test %eax,%eax 10aff9: 74 19 je 10b014 <_CORE_mutex_Seize+0x2f> 10affb: 84 d2 test %dl,%dl 10affd: 74 15 je 10b014 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN 10afff: 83 3d e8 57 12 00 01 cmpl $0x1,0x1257e8 10b006: 76 0c jbe 10b014 <_CORE_mutex_Seize+0x2f> 10b008: 53 push %ebx 10b009: 6a 13 push $0x13 10b00b: 6a 00 push $0x0 10b00d: 6a 00 push $0x0 10b00f: e8 bc 05 00 00 call 10b5d0 <_Internal_error_Occurred> 10b014: 51 push %ecx 10b015: 51 push %ecx 10b016: 8d 45 18 lea 0x18(%ebp),%eax 10b019: 50 push %eax 10b01a: 53 push %ebx 10b01b: 88 55 f4 mov %dl,-0xc(%ebp) 10b01e: e8 d9 47 00 00 call 10f7fc <_CORE_mutex_Seize_interrupt_trylock> 10b023: 83 c4 10 add $0x10,%esp 10b026: 85 c0 test %eax,%eax 10b028: 8a 55 f4 mov -0xc(%ebp),%dl 10b02b: 74 48 je 10b075 <_CORE_mutex_Seize+0x90> 10b02d: 84 d2 test %dl,%dl 10b02f: 75 12 jne 10b043 <_CORE_mutex_Seize+0x5e> 10b031: ff 75 18 pushl 0x18(%ebp) 10b034: 9d popf 10b035: a1 0c 57 12 00 mov 0x12570c,%eax 10b03a: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10b041: eb 32 jmp 10b075 <_CORE_mutex_Seize+0x90> RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b043: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10b04a: a1 0c 57 12 00 mov 0x12570c,%eax 10b04f: 89 58 44 mov %ebx,0x44(%eax) 10b052: 8b 55 0c mov 0xc(%ebp),%edx 10b055: 89 50 20 mov %edx,0x20(%eax) 10b058: a1 50 56 12 00 mov 0x125650,%eax 10b05d: 40 inc %eax 10b05e: a3 50 56 12 00 mov %eax,0x125650 10b063: ff 75 18 pushl 0x18(%ebp) 10b066: 9d popf 10b067: 50 push %eax 10b068: 50 push %eax 10b069: ff 75 14 pushl 0x14(%ebp) 10b06c: 53 push %ebx 10b06d: e8 26 ff ff ff call 10af98 <_CORE_mutex_Seize_interrupt_blocking> 10b072: 83 c4 10 add $0x10,%esp } 10b075: 8b 5d fc mov -0x4(%ebp),%ebx 10b078: c9 leave 10b079: c3 ret =============================================================================== 0010f7fc <_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 ) { 10f7fc: 55 push %ebp 10f7fd: 89 e5 mov %esp,%ebp 10f7ff: 53 push %ebx 10f800: 83 ec 04 sub $0x4,%esp 10f803: 8b 45 08 mov 0x8(%ebp),%eax 10f806: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10f809: 8b 15 0c 57 12 00 mov 0x12570c,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 10f80f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 10f816: 83 78 50 00 cmpl $0x0,0x50(%eax) 10f81a: 0f 84 87 00 00 00 je 10f8a7 <_CORE_mutex_Seize_interrupt_trylock+0xab> the_mutex->lock = CORE_MUTEX_LOCKED; 10f820: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 10f827: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 10f82a: 8b 5a 08 mov 0x8(%edx),%ebx 10f82d: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 10f830: 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; 10f837: 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 ) || 10f83a: 83 fb 02 cmp $0x2,%ebx 10f83d: 74 05 je 10f844 <_CORE_mutex_Seize_interrupt_trylock+0x48> 10f83f: 83 fb 03 cmp $0x3,%ebx 10f842: 75 08 jne 10f84c <_CORE_mutex_Seize_interrupt_trylock+0x50> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 10f844: ff 42 1c incl 0x1c(%edx) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 10f847: 83 fb 03 cmp $0x3,%ebx 10f84a: 74 05 je 10f851 <_CORE_mutex_Seize_interrupt_trylock+0x55> _ISR_Enable( *level_p ); 10f84c: ff 31 pushl (%ecx) 10f84e: 9d popf 10f84f: eb 7b jmp 10f8cc <_CORE_mutex_Seize_interrupt_trylock+0xd0> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 10f851: 8b 5a 14 mov 0x14(%edx),%ebx if ( current == ceiling ) { 10f854: 3b 58 4c cmp 0x4c(%eax),%ebx 10f857: 75 05 jne 10f85e <_CORE_mutex_Seize_interrupt_trylock+0x62> _ISR_Enable( *level_p ); 10f859: ff 31 pushl (%ecx) 10f85b: 9d popf 10f85c: eb 6e jmp 10f8cc <_CORE_mutex_Seize_interrupt_trylock+0xd0> return 0; } if ( current > ceiling ) { 10f85e: 76 2a jbe 10f88a <_CORE_mutex_Seize_interrupt_trylock+0x8e> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10f860: 8b 15 50 56 12 00 mov 0x125650,%edx 10f866: 42 inc %edx 10f867: 89 15 50 56 12 00 mov %edx,0x125650 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 10f86d: ff 31 pushl (%ecx) 10f86f: 9d popf _Thread_Change_priority( 10f870: 52 push %edx 10f871: 6a 00 push $0x0 10f873: ff 70 4c pushl 0x4c(%eax) 10f876: ff 70 5c pushl 0x5c(%eax) 10f879: e8 26 c5 ff ff call 10bda4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 10f87e: e8 be c9 ff ff call 10c241 <_Thread_Enable_dispatch> 10f883: 31 c0 xor %eax,%eax 10f885: 83 c4 10 add $0x10,%esp 10f888: eb 4b jmp 10f8d5 <_CORE_mutex_Seize_interrupt_trylock+0xd9> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 10f88a: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 10f891: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 10f898: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 10f89f: ff 4a 1c decl 0x1c(%edx) _ISR_Enable( *level_p ); 10f8a2: ff 31 pushl (%ecx) 10f8a4: 9d popf 10f8a5: eb 25 jmp 10f8cc <_CORE_mutex_Seize_interrupt_trylock+0xd0> /* * 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 ) ) { 10f8a7: 8b 58 5c mov 0x5c(%eax),%ebx 10f8aa: 39 d3 cmp %edx,%ebx 10f8ac: 75 22 jne 10f8d0 <_CORE_mutex_Seize_interrupt_trylock+0xd4> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 10f8ae: 8b 50 40 mov 0x40(%eax),%edx 10f8b1: 85 d2 test %edx,%edx 10f8b3: 74 05 je 10f8ba <_CORE_mutex_Seize_interrupt_trylock+0xbe> 10f8b5: 4a dec %edx 10f8b6: 75 18 jne 10f8d0 <_CORE_mutex_Seize_interrupt_trylock+0xd4><== ALWAYS TAKEN 10f8b8: eb 08 jmp 10f8c2 <_CORE_mutex_Seize_interrupt_trylock+0xc6><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 10f8ba: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 10f8bd: ff 31 pushl (%ecx) 10f8bf: 9d popf 10f8c0: eb 0a jmp 10f8cc <_CORE_mutex_Seize_interrupt_trylock+0xd0> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 10f8c2: c7 43 34 02 00 00 00 movl $0x2,0x34(%ebx) <== NOT EXECUTED _ISR_Enable( *level_p ); 10f8c9: ff 31 pushl (%ecx) <== NOT EXECUTED 10f8cb: 9d popf <== NOT EXECUTED 10f8cc: 31 c0 xor %eax,%eax 10f8ce: eb 05 jmp 10f8d5 <_CORE_mutex_Seize_interrupt_trylock+0xd9> 10f8d0: b8 01 00 00 00 mov $0x1,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 10f8d5: 8b 5d fc mov -0x4(%ebp),%ebx 10f8d8: c9 leave 10f8d9: c3 ret =============================================================================== 0010b1a8 <_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 ) { 10b1a8: 55 push %ebp 10b1a9: 89 e5 mov %esp,%ebp 10b1ab: 53 push %ebx 10b1ac: 83 ec 10 sub $0x10,%esp 10b1af: 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)) ) { 10b1b2: 53 push %ebx 10b1b3: e8 10 14 00 00 call 10c5c8 <_Thread_queue_Dequeue> 10b1b8: 89 c2 mov %eax,%edx 10b1ba: 83 c4 10 add $0x10,%esp 10b1bd: 31 c0 xor %eax,%eax 10b1bf: 85 d2 test %edx,%edx 10b1c1: 75 15 jne 10b1d8 <_CORE_semaphore_Surrender+0x30> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10b1c3: 9c pushf 10b1c4: fa cli 10b1c5: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10b1c6: 8b 53 48 mov 0x48(%ebx),%edx 10b1c9: b0 04 mov $0x4,%al 10b1cb: 3b 53 40 cmp 0x40(%ebx),%edx 10b1ce: 73 06 jae 10b1d6 <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN the_semaphore->count += 1; 10b1d0: 42 inc %edx 10b1d1: 89 53 48 mov %edx,0x48(%ebx) 10b1d4: 30 c0 xor %al,%al else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10b1d6: 51 push %ecx 10b1d7: 9d popf } return status; } 10b1d8: 8b 5d fc mov -0x4(%ebp),%ebx 10b1db: c9 leave 10b1dc: c3 ret =============================================================================== 0010a070 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10a070: 55 push %ebp 10a071: 89 e5 mov %esp,%ebp 10a073: 57 push %edi 10a074: 56 push %esi 10a075: 53 push %ebx 10a076: 83 ec 1c sub $0x1c,%esp 10a079: 8b 45 08 mov 0x8(%ebp),%eax 10a07c: 8b 75 0c mov 0xc(%ebp),%esi 10a07f: 8b 55 10 mov 0x10(%ebp),%edx 10a082: 89 55 dc mov %edx,-0x24(%ebp) 10a085: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10a088: 8b 1d 0c 57 12 00 mov 0x12570c,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10a08e: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10a095: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi _ISR_Disable( level ); 10a09b: 9c pushf 10a09c: fa cli 10a09d: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10a0a0: 8b 17 mov (%edi),%edx 10a0a2: 89 55 e0 mov %edx,-0x20(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10a0a5: 21 c2 and %eax,%edx 10a0a7: 74 1b je 10a0c4 <_Event_Seize+0x54> 10a0a9: 39 c2 cmp %eax,%edx 10a0ab: 74 08 je 10a0b5 <_Event_Seize+0x45> 10a0ad: f7 c6 02 00 00 00 test $0x2,%esi 10a0b3: 74 0f je 10a0c4 <_Event_Seize+0x54> <== NEVER TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10a0b5: 89 d0 mov %edx,%eax 10a0b7: f7 d0 not %eax 10a0b9: 23 45 e0 and -0x20(%ebp),%eax 10a0bc: 89 07 mov %eax,(%edi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10a0be: ff 75 e4 pushl -0x1c(%ebp) 10a0c1: 9d popf 10a0c2: eb 13 jmp 10a0d7 <_Event_Seize+0x67> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10a0c4: f7 c6 01 00 00 00 test $0x1,%esi 10a0ca: 74 12 je 10a0de <_Event_Seize+0x6e> _ISR_Enable( level ); 10a0cc: ff 75 e4 pushl -0x1c(%ebp) 10a0cf: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10a0d0: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10a0d7: 89 11 mov %edx,(%ecx) return; 10a0d9: e9 91 00 00 00 jmp 10a16f <_Event_Seize+0xff> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 10a0de: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10a0e1: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10a0e4: 89 4b 28 mov %ecx,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10a0e7: c7 05 e4 58 12 00 01 movl $0x1,0x1258e4 10a0ee: 00 00 00 _ISR_Enable( level ); 10a0f1: ff 75 e4 pushl -0x1c(%ebp) 10a0f4: 9d popf if ( ticks ) { 10a0f5: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 10a0f9: 74 34 je 10a12f <_Event_Seize+0xbf> _Watchdog_Initialize( 10a0fb: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a0fe: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10a105: c7 43 64 ac a2 10 00 movl $0x10a2ac,0x64(%ebx) the_watchdog->id = id; 10a10c: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10a10f: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a116: 8b 45 dc mov -0x24(%ebp),%eax 10a119: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a11c: 52 push %edx 10a11d: 52 push %edx 10a11e: 8d 43 48 lea 0x48(%ebx),%eax 10a121: 50 push %eax 10a122: 68 2c 57 12 00 push $0x12572c 10a127: e8 98 2e 00 00 call 10cfc4 <_Watchdog_Insert> 10a12c: 83 c4 10 add $0x10,%esp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10a12f: 50 push %eax 10a130: 50 push %eax 10a131: 68 00 01 00 00 push $0x100 10a136: 53 push %ebx 10a137: e8 e8 28 00 00 call 10ca24 <_Thread_Set_state> _ISR_Disable( level ); 10a13c: 9c pushf 10a13d: fa cli 10a13e: 5a pop %edx sync_state = _Event_Sync_state; 10a13f: a1 e4 58 12 00 mov 0x1258e4,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10a144: c7 05 e4 58 12 00 00 movl $0x0,0x1258e4 10a14b: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10a14e: 83 c4 10 add $0x10,%esp 10a151: 83 f8 01 cmp $0x1,%eax 10a154: 75 04 jne 10a15a <_Event_Seize+0xea> _ISR_Enable( level ); 10a156: 52 push %edx 10a157: 9d popf 10a158: eb 15 jmp 10a16f <_Event_Seize+0xff> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10a15a: 89 55 10 mov %edx,0x10(%ebp) 10a15d: 89 5d 0c mov %ebx,0xc(%ebp) 10a160: 89 45 08 mov %eax,0x8(%ebp) } 10a163: 8d 65 f4 lea -0xc(%ebp),%esp 10a166: 5b pop %ebx 10a167: 5e pop %esi 10a168: 5f pop %edi 10a169: 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 ); 10a16a: e9 e9 1b 00 00 jmp 10bd58 <_Thread_blocking_operation_Cancel> } 10a16f: 8d 65 f4 lea -0xc(%ebp),%esp 10a172: 5b pop %ebx 10a173: 5e pop %esi 10a174: 5f pop %edi 10a175: c9 leave 10a176: c3 ret =============================================================================== 0010a1c4 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10a1c4: 55 push %ebp 10a1c5: 89 e5 mov %esp,%ebp 10a1c7: 57 push %edi 10a1c8: 56 push %esi 10a1c9: 53 push %ebx 10a1ca: 83 ec 2c sub $0x2c,%esp 10a1cd: 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 ]; 10a1d0: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 10a1d6: 8b 43 30 mov 0x30(%ebx),%eax 10a1d9: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 10a1dc: 9c pushf 10a1dd: fa cli 10a1de: 58 pop %eax pending_events = api->pending_events; 10a1df: 8b 17 mov (%edi),%edx 10a1e1: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 10a1e4: 8b 73 24 mov 0x24(%ebx),%esi seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10a1e7: 21 f2 and %esi,%edx 10a1e9: 75 07 jne 10a1f2 <_Event_Surrender+0x2e> _ISR_Enable( level ); 10a1eb: 50 push %eax 10a1ec: 9d popf return; 10a1ed: e9 b0 00 00 00 jmp 10a2a2 <_Event_Surrender+0xde> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10a1f2: 8b 0d e8 56 12 00 mov 0x1256e8,%ecx 10a1f8: 85 c9 test %ecx,%ecx 10a1fa: 74 49 je 10a245 <_Event_Surrender+0x81> 10a1fc: 3b 1d 0c 57 12 00 cmp 0x12570c,%ebx 10a202: 75 41 jne 10a245 <_Event_Surrender+0x81> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10a204: 8b 0d e4 58 12 00 mov 0x1258e4,%ecx /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10a20a: 83 f9 02 cmp $0x2,%ecx 10a20d: 74 09 je 10a218 <_Event_Surrender+0x54> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10a20f: 8b 0d e4 58 12 00 mov 0x1258e4,%ecx /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10a215: 49 dec %ecx 10a216: 75 2d jne 10a245 <_Event_Surrender+0x81> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10a218: 39 f2 cmp %esi,%edx 10a21a: 74 06 je 10a222 <_Event_Surrender+0x5e> 10a21c: f6 45 e0 02 testb $0x2,-0x20(%ebp) 10a220: 74 1f je 10a241 <_Event_Surrender+0x7d> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10a222: 89 d6 mov %edx,%esi 10a224: f7 d6 not %esi 10a226: 23 75 d4 and -0x2c(%ebp),%esi 10a229: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 10a22b: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a232: 8b 4b 28 mov 0x28(%ebx),%ecx 10a235: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10a237: c7 05 e4 58 12 00 03 movl $0x3,0x1258e4 10a23e: 00 00 00 } _ISR_Enable( level ); 10a241: 50 push %eax 10a242: 9d popf return; 10a243: eb 5d jmp 10a2a2 <_Event_Surrender+0xde> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10a245: f6 43 11 01 testb $0x1,0x11(%ebx) 10a249: 74 55 je 10a2a0 <_Event_Surrender+0xdc> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10a24b: 39 f2 cmp %esi,%edx 10a24d: 74 06 je 10a255 <_Event_Surrender+0x91> 10a24f: f6 45 e0 02 testb $0x2,-0x20(%ebp) 10a253: 74 4b je 10a2a0 <_Event_Surrender+0xdc> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10a255: 89 d6 mov %edx,%esi 10a257: f7 d6 not %esi 10a259: 23 75 d4 and -0x2c(%ebp),%esi 10a25c: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 10a25e: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a265: 8b 4b 28 mov 0x28(%ebx),%ecx 10a268: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 10a26a: 50 push %eax 10a26b: 9d popf 10a26c: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10a26d: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10a271: 74 06 je 10a279 <_Event_Surrender+0xb5> _ISR_Enable( level ); 10a273: 50 push %eax 10a274: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10a275: 51 push %ecx 10a276: 51 push %ecx 10a277: eb 17 jmp 10a290 <_Event_Surrender+0xcc> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10a279: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10a280: 50 push %eax 10a281: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10a282: 83 ec 0c sub $0xc,%esp 10a285: 8d 43 48 lea 0x48(%ebx),%eax 10a288: 50 push %eax 10a289: e8 4e 2e 00 00 call 10d0dc <_Watchdog_Remove> 10a28e: 58 pop %eax 10a28f: 5a pop %edx 10a290: 68 f8 ff 03 10 push $0x1003fff8 10a295: 53 push %ebx 10a296: e8 29 1c 00 00 call 10bec4 <_Thread_Clear_state> 10a29b: 83 c4 10 add $0x10,%esp 10a29e: eb 02 jmp 10a2a2 <_Event_Surrender+0xde> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10a2a0: 50 push %eax 10a2a1: 9d popf } 10a2a2: 8d 65 f4 lea -0xc(%ebp),%esp 10a2a5: 5b pop %ebx 10a2a6: 5e pop %esi 10a2a7: 5f pop %edi 10a2a8: c9 leave 10a2a9: c3 ret =============================================================================== 0010a2ac <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10a2ac: 55 push %ebp 10a2ad: 89 e5 mov %esp,%ebp 10a2af: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10a2b2: 8d 45 f4 lea -0xc(%ebp),%eax 10a2b5: 50 push %eax 10a2b6: ff 75 08 pushl 0x8(%ebp) 10a2b9: e8 a6 1f 00 00 call 10c264 <_Thread_Get> switch ( location ) { 10a2be: 83 c4 10 add $0x10,%esp 10a2c1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a2c5: 75 49 jne 10a310 <_Event_Timeout+0x64> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 10a2c7: 9c pushf 10a2c8: fa cli 10a2c9: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10a2ca: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10a2d1: 3b 05 0c 57 12 00 cmp 0x12570c,%eax 10a2d7: 75 13 jne 10a2ec <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10a2d9: 8b 0d e4 58 12 00 mov 0x1258e4,%ecx 10a2df: 49 dec %ecx 10a2e0: 75 0a jne 10a2ec <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10a2e2: c7 05 e4 58 12 00 02 movl $0x2,0x1258e4 10a2e9: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10a2ec: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10a2f3: 52 push %edx 10a2f4: 9d popf 10a2f5: 52 push %edx 10a2f6: 52 push %edx 10a2f7: 68 f8 ff 03 10 push $0x1003fff8 10a2fc: 50 push %eax 10a2fd: e8 c2 1b 00 00 call 10bec4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10a302: a1 50 56 12 00 mov 0x125650,%eax 10a307: 48 dec %eax 10a308: a3 50 56 12 00 mov %eax,0x125650 10a30d: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10a310: c9 leave 10a311: c3 ret =============================================================================== 0010f938 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 10f938: 55 push %ebp 10f939: 89 e5 mov %esp,%ebp 10f93b: 57 push %edi 10f93c: 56 push %esi 10f93d: 53 push %ebx 10f93e: 83 ec 2c sub $0x2c,%esp 10f941: 8b 75 08 mov 0x8(%ebp),%esi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10f944: 8b 4e 08 mov 0x8(%esi),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 10f947: 8b 46 10 mov 0x10(%esi),%eax 10f94a: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 10f94d: 8b 45 0c mov 0xc(%ebp),%eax 10f950: 83 c0 04 add $0x4,%eax 10f953: 89 45 cc mov %eax,-0x34(%ebp) 10f956: 0f 82 2f 01 00 00 jb 10fa8b <_Heap_Allocate_aligned_with_boundary+0x153> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 10f95c: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10f960: 74 18 je 10f97a <_Heap_Allocate_aligned_with_boundary+0x42> if ( boundary < alloc_size ) { 10f962: 8b 45 0c mov 0xc(%ebp),%eax 10f965: 39 45 14 cmp %eax,0x14(%ebp) 10f968: 0f 82 1d 01 00 00 jb 10fa8b <_Heap_Allocate_aligned_with_boundary+0x153> return NULL; } if ( alignment == 0 ) { 10f96e: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10f972: 75 06 jne 10f97a <_Heap_Allocate_aligned_with_boundary+0x42> 10f974: 8b 45 e0 mov -0x20(%ebp),%eax 10f977: 89 45 10 mov %eax,0x10(%ebp) 10f97a: 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; 10f981: 8b 45 e0 mov -0x20(%ebp),%eax 10f984: 83 c0 07 add $0x7,%eax 10f987: 89 45 c8 mov %eax,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10f98a: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 10f991: 8b 45 0c mov 0xc(%ebp),%eax 10f994: 29 45 d8 sub %eax,-0x28(%ebp) 10f997: 89 f7 mov %esi,%edi 10f999: e9 ba 00 00 00 jmp 10fa58 <_Heap_Allocate_aligned_with_boundary+0x120> while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 10f99e: 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 ) { 10f9a1: 8b 59 04 mov 0x4(%ecx),%ebx 10f9a4: 3b 5d cc cmp -0x34(%ebp),%ebx 10f9a7: 0f 86 a8 00 00 00 jbe 10fa55 <_Heap_Allocate_aligned_with_boundary+0x11d> if ( alignment == 0 ) { 10f9ad: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10f9b1: 8d 41 08 lea 0x8(%ecx),%eax 10f9b4: 89 45 dc mov %eax,-0x24(%ebp) 10f9b7: 75 07 jne 10f9c0 <_Heap_Allocate_aligned_with_boundary+0x88> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10f9b9: 89 c3 mov %eax,%ebx 10f9bb: e9 91 00 00 00 jmp 10fa51 <_Heap_Allocate_aligned_with_boundary+0x119> uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 10f9c0: 8b 47 14 mov 0x14(%edi),%eax 10f9c3: 89 45 d4 mov %eax,-0x2c(%ebp) uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 10f9c6: 83 e3 fe and $0xfffffffe,%ebx 10f9c9: 8d 1c 19 lea (%ecx,%ebx,1),%ebx uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 10f9cc: 8b 75 c8 mov -0x38(%ebp),%esi 10f9cf: 29 c6 sub %eax,%esi 10f9d1: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10f9d3: 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); 10f9d6: 89 d8 mov %ebx,%eax 10f9d8: 31 d2 xor %edx,%edx 10f9da: f7 75 10 divl 0x10(%ebp) 10f9dd: 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 ) { 10f9df: 39 f3 cmp %esi,%ebx 10f9e1: 76 0b jbe 10f9ee <_Heap_Allocate_aligned_with_boundary+0xb6> 10f9e3: 89 f0 mov %esi,%eax 10f9e5: 31 d2 xor %edx,%edx 10f9e7: f7 75 10 divl 0x10(%ebp) 10f9ea: 89 f3 mov %esi,%ebx 10f9ec: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 10f9ee: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10f9f2: 74 3f je 10fa33 <_Heap_Allocate_aligned_with_boundary+0xfb> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 10f9f4: 8b 45 0c mov 0xc(%ebp),%eax 10f9f7: 8d 34 03 lea (%ebx,%eax,1),%esi /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 10f9fa: 8b 45 dc mov -0x24(%ebp),%eax 10f9fd: 03 45 0c add 0xc(%ebp),%eax 10fa00: 89 45 d0 mov %eax,-0x30(%ebp) 10fa03: eb 19 jmp 10fa1e <_Heap_Allocate_aligned_with_boundary+0xe6> uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 10fa05: 3b 55 d0 cmp -0x30(%ebp),%edx 10fa08: 72 4b jb 10fa55 <_Heap_Allocate_aligned_with_boundary+0x11d> return 0; } alloc_begin = boundary_line - alloc_size; 10fa0a: 89 d3 mov %edx,%ebx 10fa0c: 2b 5d 0c sub 0xc(%ebp),%ebx 10fa0f: 89 d8 mov %ebx,%eax 10fa11: 31 d2 xor %edx,%edx 10fa13: f7 75 10 divl 0x10(%ebp) 10fa16: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 10fa18: 8b 45 0c mov 0xc(%ebp),%eax 10fa1b: 8d 34 03 lea (%ebx,%eax,1),%esi 10fa1e: 89 f0 mov %esi,%eax 10fa20: 31 d2 xor %edx,%edx 10fa22: f7 75 14 divl 0x14(%ebp) 10fa25: 89 f0 mov %esi,%eax 10fa27: 29 d0 sub %edx,%eax 10fa29: 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 ) { 10fa2b: 39 f0 cmp %esi,%eax 10fa2d: 73 04 jae 10fa33 <_Heap_Allocate_aligned_with_boundary+0xfb> 10fa2f: 39 c3 cmp %eax,%ebx 10fa31: 72 d2 jb 10fa05 <_Heap_Allocate_aligned_with_boundary+0xcd> boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 10fa33: 3b 5d dc cmp -0x24(%ebp),%ebx 10fa36: 72 1d jb 10fa55 <_Heap_Allocate_aligned_with_boundary+0x11d> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 10fa38: be f8 ff ff ff mov $0xfffffff8,%esi 10fa3d: 29 ce sub %ecx,%esi 10fa3f: 01 de add %ebx,%esi 10fa41: 89 d8 mov %ebx,%eax 10fa43: 31 d2 xor %edx,%edx 10fa45: f7 75 e0 divl -0x20(%ebp) if ( free_size >= min_block_size || free_size == 0 ) { 10fa48: 29 d6 sub %edx,%esi 10fa4a: 74 05 je 10fa51 <_Heap_Allocate_aligned_with_boundary+0x119> 10fa4c: 3b 75 d4 cmp -0x2c(%ebp),%esi 10fa4f: 72 04 jb 10fa55 <_Heap_Allocate_aligned_with_boundary+0x11d> boundary ); } } if ( alloc_begin != 0 ) { 10fa51: 85 db test %ebx,%ebx 10fa53: 75 11 jne 10fa66 <_Heap_Allocate_aligned_with_boundary+0x12e><== ALWAYS TAKEN break; } block = block->next; 10fa55: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 10fa58: 39 f9 cmp %edi,%ecx 10fa5a: 0f 85 3e ff ff ff jne 10f99e <_Heap_Allocate_aligned_with_boundary+0x66> 10fa60: 89 fe mov %edi,%esi 10fa62: 31 db xor %ebx,%ebx 10fa64: eb 16 jmp 10fa7c <_Heap_Allocate_aligned_with_boundary+0x144> 10fa66: 89 fe mov %edi,%esi block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 10fa68: 8b 45 e4 mov -0x1c(%ebp),%eax 10fa6b: 01 47 4c add %eax,0x4c(%edi) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 10fa6e: ff 75 0c pushl 0xc(%ebp) 10fa71: 53 push %ebx 10fa72: 51 push %ecx 10fa73: 57 push %edi 10fa74: e8 7b ba ff ff call 10b4f4 <_Heap_Block_allocate> 10fa79: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 10fa7c: 8b 45 e4 mov -0x1c(%ebp),%eax 10fa7f: 39 46 44 cmp %eax,0x44(%esi) 10fa82: 73 03 jae 10fa87 <_Heap_Allocate_aligned_with_boundary+0x14f> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 10fa84: 89 46 44 mov %eax,0x44(%esi) } return (void *) alloc_begin; 10fa87: 89 d8 mov %ebx,%eax 10fa89: eb 02 jmp 10fa8d <_Heap_Allocate_aligned_with_boundary+0x155> 10fa8b: 31 c0 xor %eax,%eax } 10fa8d: 8d 65 f4 lea -0xc(%ebp),%esp 10fa90: 5b pop %ebx 10fa91: 5e pop %esi 10fa92: 5f pop %edi 10fa93: c9 leave 10fa94: c3 ret =============================================================================== 00112d80 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 112d80: 55 push %ebp 112d81: 89 e5 mov %esp,%ebp 112d83: 56 push %esi 112d84: 53 push %ebx 112d85: 8b 4d 08 mov 0x8(%ebp),%ecx 112d88: 8b 55 0c mov 0xc(%ebp),%edx Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 112d8b: 8b 71 1c mov 0x1c(%ecx),%esi uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 112d8e: 8b 59 24 mov 0x24(%ecx),%ebx * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 112d91: 39 f2 cmp %esi,%edx 112d93: 73 0a jae 112d9f <_Heap_Extend+0x1f> uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 112d95: b8 01 00 00 00 mov $0x1,%eax 112d9a: 3b 51 18 cmp 0x18(%ecx),%edx 112d9d: 73 5f jae 112dfe <_Heap_Extend+0x7e> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 112d9f: b8 02 00 00 00 mov $0x2,%eax 112da4: 39 f2 cmp %esi,%edx 112da6: 75 56 jne 112dfe <_Heap_Extend+0x7e> { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 112da8: 03 55 10 add 0x10(%ebp),%edx * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 112dab: 89 51 1c mov %edx,0x1c(%ecx) extend_size = new_heap_area_end 112dae: 29 da sub %ebx,%edx 112db0: 8d 72 f8 lea -0x8(%edx),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 112db3: 89 f0 mov %esi,%eax 112db5: 31 d2 xor %edx,%edx 112db7: f7 71 10 divl 0x10(%ecx) 112dba: 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; 112dbc: 8b 45 14 mov 0x14(%ebp),%eax 112dbf: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 112dc1: 31 c0 xor %eax,%eax 112dc3: 3b 71 14 cmp 0x14(%ecx),%esi 112dc6: 72 36 jb 112dfe <_Heap_Extend+0x7e> <== NEVER TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 112dc8: 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; 112dcb: 8b 43 04 mov 0x4(%ebx),%eax 112dce: 83 e0 01 and $0x1,%eax 112dd1: 09 f0 or %esi,%eax 112dd3: 89 43 04 mov %eax,0x4(%ebx) Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 112dd6: 8b 41 20 mov 0x20(%ecx),%eax 112dd9: 29 d0 sub %edx,%eax 112ddb: 83 c8 01 or $0x1,%eax 112dde: 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; 112de1: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 112de4: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 112de7: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 112dea: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 112ded: 50 push %eax 112dee: 50 push %eax 112def: 83 c3 08 add $0x8,%ebx 112df2: 53 push %ebx 112df3: 51 push %ecx 112df4: e8 eb b0 ff ff call 10dee4 <_Heap_Free> 112df9: 31 c0 xor %eax,%eax 112dfb: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 112dfe: 8d 65 f8 lea -0x8(%ebp),%esp 112e01: 5b pop %ebx 112e02: 5e pop %esi 112e03: c9 leave 112e04: c3 ret =============================================================================== 0010fa98 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 10fa98: 55 push %ebp 10fa99: 89 e5 mov %esp,%ebp 10fa9b: 57 push %edi 10fa9c: 56 push %esi 10fa9d: 53 push %ebx 10fa9e: 83 ec 14 sub $0x14,%esp 10faa1: 8b 4d 08 mov 0x8(%ebp),%ecx 10faa4: 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 ) 10faa7: 8d 58 f8 lea -0x8(%eax),%ebx 10faaa: 31 d2 xor %edx,%edx 10faac: f7 71 10 divl 0x10(%ecx) 10faaf: 29 d3 sub %edx,%ebx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10fab1: 8b 41 20 mov 0x20(%ecx),%eax 10fab4: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10fab7: 31 c0 xor %eax,%eax 10fab9: 3b 5d f0 cmp -0x10(%ebp),%ebx 10fabc: 72 08 jb 10fac6 <_Heap_Free+0x2e> 10fabe: 31 c0 xor %eax,%eax 10fac0: 39 59 24 cmp %ebx,0x24(%ecx) 10fac3: 0f 93 c0 setae %al Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 10fac6: 85 c0 test %eax,%eax 10fac8: 0f 84 2d 01 00 00 je 10fbfb <_Heap_Free+0x163> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10face: 8b 7b 04 mov 0x4(%ebx),%edi 10fad1: 89 fa mov %edi,%edx 10fad3: 83 e2 fe and $0xfffffffe,%edx 10fad6: 89 55 e0 mov %edx,-0x20(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10fad9: 8d 04 13 lea (%ebx,%edx,1),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10fadc: 31 f6 xor %esi,%esi 10fade: 3b 45 f0 cmp -0x10(%ebp),%eax 10fae1: 72 0e jb 10faf1 <_Heap_Free+0x59> <== NEVER TAKEN 10fae3: 39 41 24 cmp %eax,0x24(%ecx) 10fae6: 0f 93 c2 setae %dl 10fae9: 89 d6 mov %edx,%esi 10faeb: 81 e6 ff 00 00 00 and $0xff,%esi } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10faf1: 85 f6 test %esi,%esi 10faf3: 0f 84 02 01 00 00 je 10fbfb <_Heap_Free+0x163> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10faf9: 8b 70 04 mov 0x4(%eax),%esi _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10fafc: f7 c6 01 00 00 00 test $0x1,%esi 10fb02: 0f 84 f3 00 00 00 je 10fbfb <_Heap_Free+0x163> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10fb08: 83 e6 fe and $0xfffffffe,%esi 10fb0b: 89 75 e8 mov %esi,-0x18(%ebp) return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 10fb0e: 8b 51 24 mov 0x24(%ecx),%edx 10fb11: 89 55 e4 mov %edx,-0x1c(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 10fb14: 31 f6 xor %esi,%esi 10fb16: 39 d0 cmp %edx,%eax 10fb18: 74 0d je 10fb27 <_Heap_Free+0x8f> 10fb1a: 8b 55 e8 mov -0x18(%ebp),%edx 10fb1d: 8b 74 10 04 mov 0x4(%eax,%edx,1),%esi 10fb21: 83 e6 01 and $0x1,%esi 10fb24: 83 f6 01 xor $0x1,%esi && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 10fb27: 83 e7 01 and $0x1,%edi 10fb2a: 75 64 jne 10fb90 <_Heap_Free+0xf8> uintptr_t const prev_size = block->prev_size; 10fb2c: 8b 13 mov (%ebx),%edx 10fb2e: 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); 10fb31: 29 d3 sub %edx,%ebx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10fb33: 31 ff xor %edi,%edi 10fb35: 3b 5d f0 cmp -0x10(%ebp),%ebx 10fb38: 72 0e jb 10fb48 <_Heap_Free+0xb0> <== NEVER TAKEN 10fb3a: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10fb3d: 0f 93 c2 setae %dl 10fb40: 89 d7 mov %edx,%edi 10fb42: 81 e7 ff 00 00 00 and $0xff,%edi Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 10fb48: 85 ff test %edi,%edi 10fb4a: 0f 84 ab 00 00 00 je 10fbfb <_Heap_Free+0x163> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 10fb50: f6 43 04 01 testb $0x1,0x4(%ebx) 10fb54: 0f 84 a1 00 00 00 je 10fbfb <_Heap_Free+0x163> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 10fb5a: 89 f2 mov %esi,%edx 10fb5c: 84 d2 test %dl,%dl 10fb5e: 74 1a je 10fb7a <_Heap_Free+0xe2> uintptr_t const size = block_size + prev_size + next_block_size; 10fb60: 8b 75 e0 mov -0x20(%ebp),%esi 10fb63: 03 75 e8 add -0x18(%ebp),%esi 10fb66: 03 75 ec add -0x14(%ebp),%esi return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10fb69: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = block->prev; 10fb6c: 8b 40 0c mov 0xc(%eax),%eax prev->next = next; 10fb6f: 89 78 08 mov %edi,0x8(%eax) next->prev = prev; 10fb72: 89 47 0c mov %eax,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 10fb75: ff 49 38 decl 0x38(%ecx) 10fb78: eb 34 jmp 10fbae <_Heap_Free+0x116> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 10fb7a: 8b 75 e0 mov -0x20(%ebp),%esi 10fb7d: 03 75 ec add -0x14(%ebp),%esi prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10fb80: 89 f7 mov %esi,%edi 10fb82: 83 cf 01 or $0x1,%edi 10fb85: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10fb88: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = size; 10fb8c: 89 30 mov %esi,(%eax) 10fb8e: eb 5b jmp 10fbeb <_Heap_Free+0x153> } } else if ( next_is_free ) { /* coalesce next */ 10fb90: 89 f2 mov %esi,%edx 10fb92: 84 d2 test %dl,%dl 10fb94: 74 25 je 10fbbb <_Heap_Free+0x123> uintptr_t const size = block_size + next_block_size; 10fb96: 8b 75 e8 mov -0x18(%ebp),%esi 10fb99: 03 75 e0 add -0x20(%ebp),%esi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10fb9c: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = old_block->prev; 10fb9f: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10fba2: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 10fba5: 89 43 0c mov %eax,0xc(%ebx) next->prev = new_block; 10fba8: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 10fbab: 89 58 08 mov %ebx,0x8(%eax) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10fbae: 89 f0 mov %esi,%eax 10fbb0: 83 c8 01 or $0x1,%eax 10fbb3: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 10fbb6: 89 34 33 mov %esi,(%ebx,%esi,1) 10fbb9: eb 30 jmp 10fbeb <_Heap_Free+0x153> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10fbbb: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 10fbbe: 89 73 08 mov %esi,0x8(%ebx) new_block->prev = block_before; 10fbc1: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10fbc4: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10fbc7: 89 5e 0c mov %ebx,0xc(%esi) } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10fbca: 8b 75 e0 mov -0x20(%ebp),%esi 10fbcd: 83 ce 01 or $0x1,%esi 10fbd0: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10fbd3: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = block_size; 10fbd7: 8b 55 e0 mov -0x20(%ebp),%edx 10fbda: 89 10 mov %edx,(%eax) /* Statistics */ ++stats->free_blocks; 10fbdc: 8b 41 38 mov 0x38(%ecx),%eax 10fbdf: 40 inc %eax 10fbe0: 89 41 38 mov %eax,0x38(%ecx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 10fbe3: 39 41 3c cmp %eax,0x3c(%ecx) 10fbe6: 73 03 jae 10fbeb <_Heap_Free+0x153> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 10fbe8: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 10fbeb: ff 49 40 decl 0x40(%ecx) ++stats->frees; 10fbee: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 10fbf1: 8b 45 e0 mov -0x20(%ebp),%eax 10fbf4: 01 41 30 add %eax,0x30(%ecx) 10fbf7: b0 01 mov $0x1,%al return( true ); 10fbf9: eb 02 jmp 10fbfd <_Heap_Free+0x165> 10fbfb: 31 c0 xor %eax,%eax } 10fbfd: 83 c4 14 add $0x14,%esp 10fc00: 5b pop %ebx 10fc01: 5e pop %esi 10fc02: 5f pop %edi 10fc03: c9 leave 10fc04: c3 ret =============================================================================== 0011d534 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11d534: 55 push %ebp 11d535: 89 e5 mov %esp,%ebp 11d537: 56 push %esi 11d538: 53 push %ebx 11d539: 8b 5d 08 mov 0x8(%ebp),%ebx 11d53c: 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 ) 11d53f: 8d 4e f8 lea -0x8(%esi),%ecx 11d542: 89 f0 mov %esi,%eax 11d544: 31 d2 xor %edx,%edx 11d546: f7 73 10 divl 0x10(%ebx) 11d549: 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; 11d54b: 8b 53 20 mov 0x20(%ebx),%edx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11d54e: 31 c0 xor %eax,%eax 11d550: 39 d1 cmp %edx,%ecx 11d552: 72 08 jb 11d55c <_Heap_Size_of_alloc_area+0x28> 11d554: 31 c0 xor %eax,%eax 11d556: 39 4b 24 cmp %ecx,0x24(%ebx) 11d559: 0f 93 c0 setae %al uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 11d55c: 85 c0 test %eax,%eax 11d55e: 74 2e je 11d58e <_Heap_Size_of_alloc_area+0x5a> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11d560: 8b 41 04 mov 0x4(%ecx),%eax 11d563: 83 e0 fe and $0xfffffffe,%eax 11d566: 01 c1 add %eax,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11d568: 31 c0 xor %eax,%eax 11d56a: 39 d1 cmp %edx,%ecx 11d56c: 72 08 jb 11d576 <_Heap_Size_of_alloc_area+0x42><== NEVER TAKEN 11d56e: 31 c0 xor %eax,%eax 11d570: 39 4b 24 cmp %ecx,0x24(%ebx) 11d573: 0f 93 c0 setae %al } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11d576: 85 c0 test %eax,%eax 11d578: 74 14 je 11d58e <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN 11d57a: f6 41 04 01 testb $0x1,0x4(%ecx) 11d57e: 74 0e je 11d58e <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11d580: 29 f1 sub %esi,%ecx 11d582: 8d 51 04 lea 0x4(%ecx),%edx 11d585: 8b 45 10 mov 0x10(%ebp),%eax 11d588: 89 10 mov %edx,(%eax) 11d58a: b0 01 mov $0x1,%al return true; 11d58c: eb 02 jmp 11d590 <_Heap_Size_of_alloc_area+0x5c> 11d58e: 31 c0 xor %eax,%eax } 11d590: 5b pop %ebx 11d591: 5e pop %esi 11d592: c9 leave 11d593: c3 ret =============================================================================== 0010bfe1 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10bfe1: 55 push %ebp 10bfe2: 89 e5 mov %esp,%ebp 10bfe4: 57 push %edi 10bfe5: 56 push %esi 10bfe6: 53 push %ebx 10bfe7: 83 ec 4c sub $0x4c,%esp 10bfea: 8b 7d 08 mov 0x8(%ebp),%edi 10bfed: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t const page_size = heap->page_size; 10bff0: 8b 4f 10 mov 0x10(%edi),%ecx uintptr_t const min_block_size = heap->min_block_size; 10bff3: 8b 47 14 mov 0x14(%edi),%eax 10bff6: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10bff9: 8b 57 24 mov 0x24(%edi),%edx 10bffc: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *block = heap->first_block; 10bfff: 8b 5f 20 mov 0x20(%edi),%ebx Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10c002: c7 45 e4 f3 c2 10 00 movl $0x10c2f3,-0x1c(%ebp) 10c009: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10c00d: 75 07 jne 10c016 <_Heap_Walk+0x35> 10c00f: c7 45 e4 dc bf 10 00 movl $0x10bfdc,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10c016: 83 3d 50 7c 12 00 03 cmpl $0x3,0x127c50 10c01d: 0f 85 c6 02 00 00 jne 10c2e9 <_Heap_Walk+0x308> Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 10c023: 50 push %eax 10c024: ff 77 0c pushl 0xc(%edi) 10c027: ff 77 08 pushl 0x8(%edi) 10c02a: ff 75 d0 pushl -0x30(%ebp) 10c02d: 53 push %ebx 10c02e: ff 77 1c pushl 0x1c(%edi) 10c031: ff 77 18 pushl 0x18(%edi) 10c034: ff 75 dc pushl -0x24(%ebp) 10c037: 51 push %ecx 10c038: 68 60 00 12 00 push $0x120060 10c03d: 6a 00 push $0x0 10c03f: 56 push %esi 10c040: 89 4d bc mov %ecx,-0x44(%ebp) 10c043: 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 ) { 10c046: 83 c4 30 add $0x30,%esp 10c049: 8b 4d bc mov -0x44(%ebp),%ecx 10c04c: 85 c9 test %ecx,%ecx 10c04e: 75 0b jne 10c05b <_Heap_Walk+0x7a> (*printer)( source, true, "page size is zero\n" ); 10c050: 53 push %ebx 10c051: 68 f1 00 12 00 push $0x1200f1 10c056: e9 5b 02 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10c05b: f6 c1 03 test $0x3,%cl 10c05e: 74 0b je 10c06b <_Heap_Walk+0x8a> (*printer)( 10c060: 51 push %ecx 10c061: 68 04 01 12 00 push $0x120104 10c066: e9 4b 02 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10c06b: 8b 45 dc mov -0x24(%ebp),%eax 10c06e: 31 d2 xor %edx,%edx 10c070: f7 f1 div %ecx 10c072: 85 d2 test %edx,%edx 10c074: 74 0d je 10c083 <_Heap_Walk+0xa2> (*printer)( 10c076: ff 75 dc pushl -0x24(%ebp) 10c079: 68 22 01 12 00 push $0x120122 10c07e: e9 33 02 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> ); return false; } if ( 10c083: 8d 43 08 lea 0x8(%ebx),%eax 10c086: 31 d2 xor %edx,%edx 10c088: f7 f1 div %ecx 10c08a: 85 d2 test %edx,%edx 10c08c: 74 0b je 10c099 <_Heap_Walk+0xb8> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10c08e: 53 push %ebx 10c08f: 68 46 01 12 00 push $0x120146 10c094: e9 1d 02 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10c099: f6 43 04 01 testb $0x1,0x4(%ebx) 10c09d: 75 0b jne 10c0aa <_Heap_Walk+0xc9> (*printer)( 10c09f: 51 push %ecx 10c0a0: 68 77 01 12 00 push $0x120177 10c0a5: e9 0c 02 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> ); return false; } if ( first_block->prev_size != page_size ) { 10c0aa: 8b 03 mov (%ebx),%eax 10c0ac: 89 45 d4 mov %eax,-0x2c(%ebp) 10c0af: 39 c8 cmp %ecx,%eax 10c0b1: 74 0f je 10c0c2 <_Heap_Walk+0xe1> (*printer)( 10c0b3: 83 ec 0c sub $0xc,%esp 10c0b6: 51 push %ecx 10c0b7: 50 push %eax 10c0b8: 68 a5 01 12 00 push $0x1201a5 10c0bd: e9 3d 01 00 00 jmp 10c1ff <_Heap_Walk+0x21e> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10c0c2: 8b 55 d0 mov -0x30(%ebp),%edx 10c0c5: 8b 42 04 mov 0x4(%edx),%eax 10c0c8: 83 e0 fe and $0xfffffffe,%eax 10c0cb: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10c0d0: 75 0b jne 10c0dd <_Heap_Walk+0xfc> (*printer)( 10c0d2: 52 push %edx 10c0d3: 68 d0 01 12 00 push $0x1201d0 10c0d8: e9 d9 01 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10c0dd: 8b 4f 10 mov 0x10(%edi),%ecx 10c0e0: 89 4d d8 mov %ecx,-0x28(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c0e3: 8b 4f 08 mov 0x8(%edi),%ecx 10c0e6: 89 7d e0 mov %edi,-0x20(%ebp) 10c0e9: eb 6a jmp 10c155 <_Heap_Walk+0x174> RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10c0eb: 31 c0 xor %eax,%eax 10c0ed: 39 4f 20 cmp %ecx,0x20(%edi) 10c0f0: 77 08 ja 10c0fa <_Heap_Walk+0x119> 10c0f2: 31 c0 xor %eax,%eax 10c0f4: 39 4f 24 cmp %ecx,0x24(%edi) 10c0f7: 0f 93 c0 setae %al const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 10c0fa: 85 c0 test %eax,%eax 10c0fc: 75 0b jne 10c109 <_Heap_Walk+0x128> (*printer)( 10c0fe: 51 push %ecx 10c0ff: 68 e5 01 12 00 push $0x1201e5 10c104: e9 ad 01 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> ); return false; } if ( 10c109: 8d 41 08 lea 0x8(%ecx),%eax 10c10c: 31 d2 xor %edx,%edx 10c10e: f7 75 d8 divl -0x28(%ebp) 10c111: 85 d2 test %edx,%edx 10c113: 74 0b je 10c120 <_Heap_Walk+0x13f> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10c115: 51 push %ecx 10c116: 68 05 02 12 00 push $0x120205 10c11b: e9 96 01 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10c120: 8b 41 04 mov 0x4(%ecx),%eax 10c123: 83 e0 fe and $0xfffffffe,%eax 10c126: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10c12b: 74 0b je 10c138 <_Heap_Walk+0x157> (*printer)( 10c12d: 51 push %ecx 10c12e: 68 35 02 12 00 push $0x120235 10c133: e9 7e 01 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> ); return false; } if ( free_block->prev != prev_block ) { 10c138: 8b 41 0c mov 0xc(%ecx),%eax 10c13b: 3b 45 e0 cmp -0x20(%ebp),%eax 10c13e: 74 0f je 10c14f <_Heap_Walk+0x16e> (*printer)( 10c140: 83 ec 0c sub $0xc,%esp 10c143: 50 push %eax 10c144: 51 push %ecx 10c145: 68 51 02 12 00 push $0x120251 10c14a: e9 b0 00 00 00 jmp 10c1ff <_Heap_Walk+0x21e> return false; } prev_block = free_block; free_block = free_block->next; 10c14f: 89 4d e0 mov %ecx,-0x20(%ebp) 10c152: 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 ) { 10c155: 39 f9 cmp %edi,%ecx 10c157: 75 92 jne 10c0eb <_Heap_Walk+0x10a> 10c159: 89 75 e0 mov %esi,-0x20(%ebp) 10c15c: e9 7f 01 00 00 jmp 10c2e0 <_Heap_Walk+0x2ff> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c161: 8b 43 04 mov 0x4(%ebx),%eax 10c164: 89 c1 mov %eax,%ecx 10c166: 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); 10c169: 8d 34 0b lea (%ebx,%ecx,1),%esi uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 10c16c: a8 01 test $0x1,%al 10c16e: 74 0c je 10c17c <_Heap_Walk+0x19b> (*printer)( 10c170: 83 ec 0c sub $0xc,%esp 10c173: 51 push %ecx 10c174: 53 push %ebx 10c175: 68 83 02 12 00 push $0x120283 10c17a: eb 0b jmp 10c187 <_Heap_Walk+0x1a6> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10c17c: 50 push %eax 10c17d: 50 push %eax 10c17e: ff 33 pushl (%ebx) 10c180: 51 push %ecx 10c181: 53 push %ebx 10c182: 68 9a 02 12 00 push $0x12029a 10c187: 6a 00 push $0x0 10c189: ff 75 e0 pushl -0x20(%ebp) 10c18c: 89 4d bc mov %ecx,-0x44(%ebp) 10c18f: ff 55 e4 call *-0x1c(%ebp) 10c192: 83 c4 20 add $0x20,%esp 10c195: 8b 4d bc mov -0x44(%ebp),%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10c198: 31 c0 xor %eax,%eax 10c19a: 39 77 20 cmp %esi,0x20(%edi) 10c19d: 77 08 ja 10c1a7 <_Heap_Walk+0x1c6> <== NEVER TAKEN 10c19f: 31 c0 xor %eax,%eax 10c1a1: 39 77 24 cmp %esi,0x24(%edi) 10c1a4: 0f 93 c0 setae %al block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10c1a7: 85 c0 test %eax,%eax 10c1a9: 75 11 jne 10c1bc <_Heap_Walk+0x1db> 10c1ab: 89 f1 mov %esi,%ecx 10c1ad: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c1b0: 83 ec 0c sub $0xc,%esp 10c1b3: 51 push %ecx 10c1b4: 53 push %ebx 10c1b5: 68 bf 02 12 00 push $0x1202bf 10c1ba: eb 43 jmp 10c1ff <_Heap_Walk+0x21e> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10c1bc: 89 c8 mov %ecx,%eax 10c1be: 31 d2 xor %edx,%edx 10c1c0: f7 75 d4 divl -0x2c(%ebp) 10c1c3: 85 d2 test %edx,%edx 10c1c5: 74 0f je 10c1d6 <_Heap_Walk+0x1f5> 10c1c7: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c1ca: 83 ec 0c sub $0xc,%esp 10c1cd: 51 push %ecx 10c1ce: 53 push %ebx 10c1cf: 68 ec 02 12 00 push $0x1202ec 10c1d4: eb 29 jmp 10c1ff <_Heap_Walk+0x21e> ); return false; } if ( block_size < min_block_size ) { 10c1d6: 3b 4d dc cmp -0x24(%ebp),%ecx 10c1d9: 73 11 jae 10c1ec <_Heap_Walk+0x20b> 10c1db: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c1de: 57 push %edi 10c1df: 57 push %edi 10c1e0: ff 75 dc pushl -0x24(%ebp) 10c1e3: 51 push %ecx 10c1e4: 53 push %ebx 10c1e5: 68 1a 03 12 00 push $0x12031a 10c1ea: eb 13 jmp 10c1ff <_Heap_Walk+0x21e> ); return false; } if ( next_block_begin <= block_begin ) { 10c1ec: 39 de cmp %ebx,%esi 10c1ee: 77 1f ja 10c20f <_Heap_Walk+0x22e> 10c1f0: 89 f1 mov %esi,%ecx 10c1f2: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c1f5: 83 ec 0c sub $0xc,%esp 10c1f8: 51 push %ecx 10c1f9: 53 push %ebx 10c1fa: 68 45 03 12 00 push $0x120345 10c1ff: 6a 01 push $0x1 10c201: 56 push %esi 10c202: ff 55 e4 call *-0x1c(%ebp) 10c205: 31 c0 xor %eax,%eax "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 10c207: 83 c4 20 add $0x20,%esp 10c20a: e9 dc 00 00 00 jmp 10c2eb <_Heap_Walk+0x30a> } if ( !_Heap_Is_prev_used( next_block ) ) { 10c20f: f6 46 04 01 testb $0x1,0x4(%esi) 10c213: 0f 85 c5 00 00 00 jne 10c2de <_Heap_Walk+0x2fd> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c219: 8b 47 08 mov 0x8(%edi),%eax 10c21c: 89 45 c0 mov %eax,-0x40(%ebp) block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10c21f: 8b 53 04 mov 0x4(%ebx),%edx 10c222: 89 55 c4 mov %edx,-0x3c(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c225: 83 e2 fe and $0xfffffffe,%edx 10c228: 89 55 cc mov %edx,-0x34(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c22b: 01 da add %ebx,%edx 10c22d: 89 55 c8 mov %edx,-0x38(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10c230: 8b 4b 08 mov 0x8(%ebx),%ecx 10c233: 89 4d b4 mov %ecx,-0x4c(%ebp) return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10c236: ba 79 03 12 00 mov $0x120379,%edx 10c23b: 3b 4f 0c cmp 0xc(%edi),%ecx 10c23e: 74 0e je 10c24e <_Heap_Walk+0x26d> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10c240: ba 83 03 12 00 mov $0x120383,%edx 10c245: 39 f9 cmp %edi,%ecx 10c247: 74 05 je 10c24e <_Heap_Walk+0x26d> 10c249: ba ad ff 11 00 mov $0x11ffad,%edx Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10c24e: 8b 43 0c mov 0xc(%ebx),%eax 10c251: 89 45 d8 mov %eax,-0x28(%ebp) 10c254: b8 8d 03 12 00 mov $0x12038d,%eax 10c259: 8b 4d c0 mov -0x40(%ebp),%ecx 10c25c: 39 4d d8 cmp %ecx,-0x28(%ebp) 10c25f: 74 0f je 10c270 <_Heap_Walk+0x28f> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10c261: b8 98 03 12 00 mov $0x120398,%eax 10c266: 39 7d d8 cmp %edi,-0x28(%ebp) 10c269: 74 05 je 10c270 <_Heap_Walk+0x28f> 10c26b: b8 ad ff 11 00 mov $0x11ffad,%eax Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10c270: 52 push %edx 10c271: ff 75 b4 pushl -0x4c(%ebp) 10c274: 50 push %eax 10c275: ff 75 d8 pushl -0x28(%ebp) 10c278: 53 push %ebx 10c279: 68 a2 03 12 00 push $0x1203a2 10c27e: 6a 00 push $0x0 10c280: ff 75 e0 pushl -0x20(%ebp) 10c283: 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 ) { 10c286: 8b 55 c8 mov -0x38(%ebp),%edx 10c289: 8b 02 mov (%edx),%eax 10c28b: 83 c4 20 add $0x20,%esp 10c28e: 39 45 cc cmp %eax,-0x34(%ebp) 10c291: 74 14 je 10c2a7 <_Heap_Walk+0x2c6> 10c293: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c296: 51 push %ecx 10c297: 52 push %edx 10c298: 50 push %eax 10c299: ff 75 cc pushl -0x34(%ebp) 10c29c: 53 push %ebx 10c29d: 68 ce 03 12 00 push $0x1203ce 10c2a2: e9 58 ff ff ff jmp 10c1ff <_Heap_Walk+0x21e> ); return false; } if ( !prev_used ) { 10c2a7: f6 45 c4 01 testb $0x1,-0x3c(%ebp) 10c2ab: 75 16 jne 10c2c3 <_Heap_Walk+0x2e2> 10c2ad: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c2b0: 53 push %ebx 10c2b1: 68 07 04 12 00 push $0x120407 10c2b6: 6a 01 push $0x1 10c2b8: 56 push %esi 10c2b9: ff 55 e4 call *-0x1c(%ebp) 10c2bc: 31 c0 xor %eax,%eax 10c2be: 83 c4 10 add $0x10,%esp 10c2c1: eb 28 jmp 10c2eb <_Heap_Walk+0x30a> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c2c3: 8b 47 08 mov 0x8(%edi),%eax 10c2c6: eb 07 jmp 10c2cf <_Heap_Walk+0x2ee> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 10c2c8: 39 d8 cmp %ebx,%eax 10c2ca: 74 12 je 10c2de <_Heap_Walk+0x2fd> return true; } free_block = free_block->next; 10c2cc: 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 ) { 10c2cf: 39 f8 cmp %edi,%eax 10c2d1: 75 f5 jne 10c2c8 <_Heap_Walk+0x2e7> 10c2d3: 8b 75 e0 mov -0x20(%ebp),%esi return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10c2d6: 53 push %ebx 10c2d7: 68 36 04 12 00 push $0x120436 10c2dc: eb d8 jmp 10c2b6 <_Heap_Walk+0x2d5> ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 10c2de: 89 f3 mov %esi,%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10c2e0: 3b 5d d0 cmp -0x30(%ebp),%ebx 10c2e3: 0f 85 78 fe ff ff jne 10c161 <_Heap_Walk+0x180> 10c2e9: b0 01 mov $0x1,%al block = next_block; } return true; } 10c2eb: 8d 65 f4 lea -0xc(%ebp),%esp 10c2ee: 5b pop %ebx 10c2ef: 5e pop %esi 10c2f0: 5f pop %edi 10c2f1: c9 leave 10c2f2: c3 ret =============================================================================== 0010b5d0 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10b5d0: 55 push %ebp 10b5d1: 89 e5 mov %esp,%ebp 10b5d3: 53 push %ebx 10b5d4: 83 ec 08 sub $0x8,%esp 10b5d7: 8b 45 08 mov 0x8(%ebp),%eax 10b5da: 8b 55 0c mov 0xc(%ebp),%edx 10b5dd: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10b5e0: a3 f4 56 12 00 mov %eax,0x1256f4 _Internal_errors_What_happened.is_internal = is_internal; 10b5e5: 88 15 f8 56 12 00 mov %dl,0x1256f8 _Internal_errors_What_happened.the_error = the_error; 10b5eb: 89 1d fc 56 12 00 mov %ebx,0x1256fc _User_extensions_Fatal( the_source, is_internal, the_error ); 10b5f1: 53 push %ebx 10b5f2: 0f b6 d2 movzbl %dl,%edx 10b5f5: 52 push %edx 10b5f6: 50 push %eax 10b5f7: e8 ab 18 00 00 call 10cea7 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10b5fc: c7 05 e8 57 12 00 05 movl $0x5,0x1257e8 <== NOT EXECUTED 10b603: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10b606: fa cli <== NOT EXECUTED 10b607: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b609: f4 hlt <== NOT EXECUTED 10b60a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b60d: eb fe jmp 10b60d <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 0010b668 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10b668: 55 push %ebp 10b669: 89 e5 mov %esp,%ebp 10b66b: 56 push %esi 10b66c: 53 push %ebx 10b66d: 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 ) 10b670: 31 c9 xor %ecx,%ecx 10b672: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10b676: 74 53 je 10b6cb <_Objects_Allocate+0x63><== NEVER TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b678: 8d 73 20 lea 0x20(%ebx),%esi 10b67b: 83 ec 0c sub $0xc,%esp 10b67e: 56 push %esi 10b67f: e8 b0 f7 ff ff call 10ae34 <_Chain_Get> 10b684: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10b686: 83 c4 10 add $0x10,%esp 10b689: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b68d: 74 3c je 10b6cb <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10b68f: 85 c0 test %eax,%eax 10b691: 75 1a jne 10b6ad <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10b693: 83 ec 0c sub $0xc,%esp 10b696: 53 push %ebx 10b697: e8 60 00 00 00 call 10b6fc <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b69c: 89 34 24 mov %esi,(%esp) 10b69f: e8 90 f7 ff ff call 10ae34 <_Chain_Get> 10b6a4: 89 c1 mov %eax,%ecx } if ( the_object ) { 10b6a6: 83 c4 10 add $0x10,%esp 10b6a9: 85 c0 test %eax,%eax 10b6ab: 74 1e je 10b6cb <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10b6ad: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10b6b1: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b6b5: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10b6b7: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b6bb: 31 d2 xor %edx,%edx 10b6bd: f7 f6 div %esi 10b6bf: c1 e0 02 shl $0x2,%eax 10b6c2: 03 43 30 add 0x30(%ebx),%eax 10b6c5: ff 08 decl (%eax) information->inactive--; 10b6c7: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10b6cb: 89 c8 mov %ecx,%eax 10b6cd: 8d 65 f8 lea -0x8(%ebp),%esp 10b6d0: 5b pop %ebx 10b6d1: 5e pop %esi 10b6d2: c9 leave 10b6d3: c3 ret =============================================================================== 0010b6fc <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10b6fc: 55 push %ebp 10b6fd: 89 e5 mov %esp,%ebp 10b6ff: 57 push %edi 10b700: 56 push %esi 10b701: 53 push %ebx 10b702: 83 ec 4c sub $0x4c,%esp 10b705: 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 ); 10b708: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10b70c: 89 45 c8 mov %eax,-0x38(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10b70f: 8b 4b 34 mov 0x34(%ebx),%ecx 10b712: 85 c9 test %ecx,%ecx 10b714: 75 0e jne 10b724 <_Objects_Extend_information+0x28> 10b716: 89 45 d4 mov %eax,-0x2c(%ebp) 10b719: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b720: 31 d2 xor %edx,%edx 10b722: eb 31 jmp 10b755 <_Objects_Extend_information+0x59> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10b724: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b728: 8b 43 10 mov 0x10(%ebx),%eax 10b72b: 31 d2 xor %edx,%edx 10b72d: 66 f7 f6 div %si 10b730: 0f b7 d0 movzwl %ax,%edx 10b733: 8b 7d c8 mov -0x38(%ebp),%edi 10b736: 89 7d d4 mov %edi,-0x2c(%ebp) 10b739: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b740: 31 c0 xor %eax,%eax for ( ; block < block_count; block++ ) { 10b742: eb 0a jmp 10b74e <_Objects_Extend_information+0x52> if ( information->object_blocks[ block ] == NULL ) 10b744: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4) 10b748: 74 08 je 10b752 <_Objects_Extend_information+0x56> 10b74a: 01 75 d4 add %esi,-0x2c(%ebp) if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10b74d: 40 inc %eax 10b74e: 39 d0 cmp %edx,%eax 10b750: 72 f2 jb 10b744 <_Objects_Extend_information+0x48> 10b752: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10b755: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10b759: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b75d: 8d 0c 08 lea (%eax,%ecx,1),%ecx 10b760: 89 4d b8 mov %ecx,-0x48(%ebp) /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 10b763: 81 f9 ff ff 00 00 cmp $0xffff,%ecx 10b769: 0f 87 db 01 00 00 ja 10b94a <_Objects_Extend_information+0x24e><== NEVER TAKEN /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 10b76f: 0f af 43 18 imul 0x18(%ebx),%eax if ( information->auto_extend ) { 10b773: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b777: 74 1e je 10b797 <_Objects_Extend_information+0x9b> new_object_block = _Workspace_Allocate( block_size ); 10b779: 83 ec 0c sub $0xc,%esp 10b77c: 50 push %eax 10b77d: 89 55 b4 mov %edx,-0x4c(%ebp) 10b780: e8 53 1a 00 00 call 10d1d8 <_Workspace_Allocate> 10b785: 89 45 bc mov %eax,-0x44(%ebp) if ( !new_object_block ) 10b788: 83 c4 10 add $0x10,%esp 10b78b: 85 c0 test %eax,%eax 10b78d: 8b 55 b4 mov -0x4c(%ebp),%edx 10b790: 75 1a jne 10b7ac <_Objects_Extend_information+0xb0> 10b792: e9 b3 01 00 00 jmp 10b94a <_Objects_Extend_information+0x24e> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10b797: 83 ec 0c sub $0xc,%esp 10b79a: 50 push %eax 10b79b: 89 55 b4 mov %edx,-0x4c(%ebp) 10b79e: e8 09 1a 00 00 call 10d1ac <_Workspace_Allocate_or_fatal_error> 10b7a3: 89 45 bc mov %eax,-0x44(%ebp) 10b7a6: 83 c4 10 add $0x10,%esp 10b7a9: 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 ) { 10b7ac: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b7b0: 39 45 d4 cmp %eax,-0x2c(%ebp) 10b7b3: 0f 82 14 01 00 00 jb 10b8cd <_Objects_Extend_information+0x1d1> */ /* * Up the block count and maximum */ block_count++; 10b7b9: 8d 72 01 lea 0x1(%edx),%esi * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10b7bc: 83 ec 0c sub $0xc,%esp 10b7bf: 8b 4d b8 mov -0x48(%ebp),%ecx 10b7c2: 03 4d c8 add -0x38(%ebp),%ecx 10b7c5: 8d 04 76 lea (%esi,%esi,2),%eax 10b7c8: 8d 04 01 lea (%ecx,%eax,1),%eax 10b7cb: c1 e0 02 shl $0x2,%eax 10b7ce: 50 push %eax 10b7cf: 89 55 b4 mov %edx,-0x4c(%ebp) 10b7d2: e8 01 1a 00 00 call 10d1d8 <_Workspace_Allocate> if ( !object_blocks ) { 10b7d7: 83 c4 10 add $0x10,%esp 10b7da: 85 c0 test %eax,%eax 10b7dc: 8b 55 b4 mov -0x4c(%ebp),%edx 10b7df: 75 13 jne 10b7f4 <_Objects_Extend_information+0xf8> _Workspace_Free( new_object_block ); 10b7e1: 83 ec 0c sub $0xc,%esp 10b7e4: ff 75 bc pushl -0x44(%ebp) 10b7e7: e8 05 1a 00 00 call 10d1f1 <_Workspace_Free> return; 10b7ec: 83 c4 10 add $0x10,%esp 10b7ef: e9 56 01 00 00 jmp 10b94a <_Objects_Extend_information+0x24e> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10b7f4: 8d 0c b0 lea (%eax,%esi,4),%ecx 10b7f7: 89 4d c0 mov %ecx,-0x40(%ebp) 10b7fa: 8d 34 f0 lea (%eax,%esi,8),%esi 10b7fd: 89 75 c4 mov %esi,-0x3c(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10b800: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b804: 31 c9 xor %ecx,%ecx 10b806: 3b 75 c8 cmp -0x38(%ebp),%esi 10b809: 76 3e jbe 10b849 <_Objects_Extend_information+0x14d> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 10b80b: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi 10b812: 89 75 d0 mov %esi,-0x30(%ebp) 10b815: 8b 73 34 mov 0x34(%ebx),%esi 10b818: 89 c7 mov %eax,%edi 10b81a: 8b 4d d0 mov -0x30(%ebp),%ecx 10b81d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10b81f: 8b 73 30 mov 0x30(%ebx),%esi 10b822: 8b 7d c0 mov -0x40(%ebp),%edi 10b825: 8b 4d d0 mov -0x30(%ebp),%ecx 10b828: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b82a: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b82e: 03 4d c8 add -0x38(%ebp),%ecx 10b831: c1 e1 02 shl $0x2,%ecx 10b834: 8b 73 1c mov 0x1c(%ebx),%esi 10b837: 8b 7d c4 mov -0x3c(%ebp),%edi 10b83a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10b83c: eb 10 jmp 10b84e <_Objects_Extend_information+0x152> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10b83e: 8b 7d c4 mov -0x3c(%ebp),%edi 10b841: c7 04 8f 00 00 00 00 movl $0x0,(%edi,%ecx,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10b848: 41 inc %ecx 10b849: 3b 4d c8 cmp -0x38(%ebp),%ecx 10b84c: 72 f0 jb 10b83e <_Objects_Extend_information+0x142> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10b84e: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) inactive_per_block[block_count] = 0; 10b855: 8b 4d c0 mov -0x40(%ebp),%ecx 10b858: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b85f: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b863: 8b 75 d4 mov -0x2c(%ebp),%esi 10b866: 01 d6 add %edx,%esi 10b868: 8b 7d d4 mov -0x2c(%ebp),%edi 10b86b: 8b 55 c4 mov -0x3c(%ebp),%edx 10b86e: 8d 0c ba lea (%edx,%edi,4),%ecx 10b871: 89 fa mov %edi,%edx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b873: eb 0a jmp 10b87f <_Objects_Extend_information+0x183> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10b875: 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++ ) { 10b87b: 42 inc %edx 10b87c: 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 ; 10b87f: 39 f2 cmp %esi,%edx 10b881: 72 f2 jb 10b875 <_Objects_Extend_information+0x179> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10b883: 9c pushf 10b884: fa cli 10b885: 5e pop %esi old_tables = information->object_blocks; 10b886: 8b 53 34 mov 0x34(%ebx),%edx information->object_blocks = object_blocks; 10b889: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10b88c: 8b 4d c0 mov -0x40(%ebp),%ecx 10b88f: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10b892: 8b 7d c4 mov -0x3c(%ebp),%edi 10b895: 89 7b 1c mov %edi,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10b898: 8b 45 b8 mov -0x48(%ebp),%eax 10b89b: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10b89f: 8b 03 mov (%ebx),%eax 10b8a1: c1 e0 18 shl $0x18,%eax 10b8a4: 0d 00 00 01 00 or $0x10000,%eax 10b8a9: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b8ad: c1 e1 1b shl $0x1b,%ecx 10b8b0: 09 c8 or %ecx,%eax 10b8b2: 0f b7 4d b8 movzwl -0x48(%ebp),%ecx 10b8b6: 09 c8 or %ecx,%eax 10b8b8: 89 43 0c mov %eax,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10b8bb: 56 push %esi 10b8bc: 9d popf if ( old_tables ) 10b8bd: 85 d2 test %edx,%edx 10b8bf: 74 0c je 10b8cd <_Objects_Extend_information+0x1d1> _Workspace_Free( old_tables ); 10b8c1: 83 ec 0c sub $0xc,%esp 10b8c4: 52 push %edx 10b8c5: e8 27 19 00 00 call 10d1f1 <_Workspace_Free> 10b8ca: 83 c4 10 add $0x10,%esp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10b8cd: 8b 55 cc mov -0x34(%ebp),%edx 10b8d0: c1 e2 02 shl $0x2,%edx 10b8d3: 89 55 d0 mov %edx,-0x30(%ebp) 10b8d6: 8b 43 34 mov 0x34(%ebx),%eax 10b8d9: 8b 75 bc mov -0x44(%ebp),%esi 10b8dc: 8b 4d cc mov -0x34(%ebp),%ecx 10b8df: 89 34 88 mov %esi,(%eax,%ecx,4) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10b8e2: ff 73 18 pushl 0x18(%ebx) 10b8e5: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b8e9: 52 push %edx 10b8ea: ff 34 88 pushl (%eax,%ecx,4) 10b8ed: 8d 45 dc lea -0x24(%ebp),%eax 10b8f0: 50 push %eax 10b8f1: 89 45 b4 mov %eax,-0x4c(%ebp) 10b8f4: e8 9f 3d 00 00 call 10f698 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b8f9: 8d 7b 20 lea 0x20(%ebx),%edi 10b8fc: 8b 75 d4 mov -0x2c(%ebp),%esi 10b8ff: eb 23 jmp 10b924 <_Objects_Extend_information+0x228> */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 10b901: 8b 13 mov (%ebx),%edx 10b903: c1 e2 18 shl $0x18,%edx 10b906: 81 ca 00 00 01 00 or $0x10000,%edx 10b90c: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b910: c1 e1 1b shl $0x1b,%ecx 10b913: 09 ca or %ecx,%edx 10b915: 09 f2 or %esi,%edx 10b917: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b91a: 52 push %edx 10b91b: 52 push %edx 10b91c: 50 push %eax 10b91d: 57 push %edi 10b91e: e8 d5 f4 ff ff call 10adf8 <_Chain_Append> index++; 10b923: 46 inc %esi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10b924: 8d 45 dc lea -0x24(%ebp),%eax 10b927: 89 04 24 mov %eax,(%esp) 10b92a: e8 05 f5 ff ff call 10ae34 <_Chain_Get> 10b92f: 83 c4 10 add $0x10,%esp 10b932: 85 c0 test %eax,%eax 10b934: 75 cb jne 10b901 <_Objects_Extend_information+0x205> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10b936: 8b 43 30 mov 0x30(%ebx),%eax 10b939: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b93d: 8b 4d d0 mov -0x30(%ebp),%ecx 10b940: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10b943: 8b 43 14 mov 0x14(%ebx),%eax 10b946: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10b94a: 8d 65 f4 lea -0xc(%ebp),%esp 10b94d: 5b pop %ebx 10b94e: 5e pop %esi 10b94f: 5f pop %edi 10b950: c9 leave 10b951: c3 ret =============================================================================== 0010b9e4 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10b9e4: 55 push %ebp 10b9e5: 89 e5 mov %esp,%ebp 10b9e7: 56 push %esi 10b9e8: 53 push %ebx 10b9e9: 8b 75 08 mov 0x8(%ebp),%esi 10b9ec: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10b9ef: 85 db test %ebx,%ebx 10b9f1: 74 2d je 10ba20 <_Objects_Get_information+0x3c> /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10b9f3: 83 ec 0c sub $0xc,%esp 10b9f6: 56 push %esi 10b9f7: e8 0c 42 00 00 call 10fc08 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10b9fc: 83 c4 10 add $0x10,%esp 10b9ff: 85 c0 test %eax,%eax 10ba01: 74 1d je 10ba20 <_Objects_Get_information+0x3c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10ba03: 39 c3 cmp %eax,%ebx 10ba05: 77 19 ja 10ba20 <_Objects_Get_information+0x3c> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10ba07: 8b 04 b5 24 56 12 00 mov 0x125624(,%esi,4),%eax 10ba0e: 85 c0 test %eax,%eax 10ba10: 74 0e je 10ba20 <_Objects_Get_information+0x3c><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10ba12: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10ba15: 85 c0 test %eax,%eax 10ba17: 74 09 je 10ba22 <_Objects_Get_information+0x3e><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10ba19: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10ba1e: 75 02 jne 10ba22 <_Objects_Get_information+0x3e> 10ba20: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10ba22: 8d 65 f8 lea -0x8(%ebp),%esp 10ba25: 5b pop %ebx 10ba26: 5e pop %esi 10ba27: c9 leave 10ba28: c3 ret =============================================================================== 00118f40 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 118f40: 55 push %ebp 118f41: 89 e5 mov %esp,%ebp 118f43: 53 push %ebx 118f44: 8b 55 08 mov 0x8(%ebp),%edx 118f47: 8b 4d 10 mov 0x10(%ebp),%ecx /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 118f4a: b8 01 00 00 00 mov $0x1,%eax 118f4f: 2b 42 08 sub 0x8(%edx),%eax 118f52: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 118f55: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 118f59: 39 c3 cmp %eax,%ebx 118f5b: 72 12 jb 118f6f <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 118f5d: 8b 52 1c mov 0x1c(%edx),%edx 118f60: 8b 04 82 mov (%edx,%eax,4),%eax 118f63: 85 c0 test %eax,%eax 118f65: 74 08 je 118f6f <_Objects_Get_no_protection+0x2f><== NEVER TAKEN *location = OBJECTS_LOCAL; 118f67: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 118f6d: eb 08 jmp 118f77 <_Objects_Get_no_protection+0x37> /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 118f6f: c7 01 01 00 00 00 movl $0x1,(%ecx) 118f75: 31 c0 xor %eax,%eax return NULL; } 118f77: 5b pop %ebx 118f78: c9 leave 118f79: c3 ret =============================================================================== 0010cbd0 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10cbd0: 55 push %ebp 10cbd1: 89 e5 mov %esp,%ebp 10cbd3: 83 ec 18 sub $0x18,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10cbd6: 8b 45 08 mov 0x8(%ebp),%eax 10cbd9: 85 c0 test %eax,%eax 10cbdb: 75 08 jne 10cbe5 <_Objects_Id_to_name+0x15> 10cbdd: a1 98 72 12 00 mov 0x127298,%eax 10cbe2: 8b 40 08 mov 0x8(%eax),%eax */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10cbe5: 89 c2 mov %eax,%edx 10cbe7: c1 ea 18 shr $0x18,%edx 10cbea: 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 ) 10cbed: 8d 4a ff lea -0x1(%edx),%ecx 10cbf0: 83 f9 03 cmp $0x3,%ecx 10cbf3: 77 32 ja 10cc27 <_Objects_Id_to_name+0x57> 10cbf5: eb 37 jmp 10cc2e <_Objects_Id_to_name+0x5e> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10cbf7: 89 c1 mov %eax,%ecx 10cbf9: c1 e9 1b shr $0x1b,%ecx 10cbfc: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10cbff: 85 d2 test %edx,%edx 10cc01: 74 24 je 10cc27 <_Objects_Id_to_name+0x57><== 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 ); 10cc03: 51 push %ecx 10cc04: 8d 4d f4 lea -0xc(%ebp),%ecx 10cc07: 51 push %ecx 10cc08: 50 push %eax 10cc09: 52 push %edx 10cc0a: e8 69 ff ff ff call 10cb78 <_Objects_Get> if ( !the_object ) 10cc0f: 83 c4 10 add $0x10,%esp 10cc12: 85 c0 test %eax,%eax 10cc14: 74 11 je 10cc27 <_Objects_Id_to_name+0x57> return OBJECTS_INVALID_ID; *name = the_object->name; 10cc16: 8b 50 0c mov 0xc(%eax),%edx 10cc19: 8b 45 0c mov 0xc(%ebp),%eax 10cc1c: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10cc1e: e8 86 07 00 00 call 10d3a9 <_Thread_Enable_dispatch> 10cc23: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10cc25: eb 05 jmp 10cc2c <_Objects_Id_to_name+0x5c> 10cc27: b8 03 00 00 00 mov $0x3,%eax } 10cc2c: c9 leave 10cc2d: c3 ret the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10cc2e: 8b 14 95 b0 71 12 00 mov 0x1271b0(,%edx,4),%edx 10cc35: 85 d2 test %edx,%edx 10cc37: 75 be jne 10cbf7 <_Objects_Id_to_name+0x27> 10cc39: eb ec jmp 10cc27 <_Objects_Id_to_name+0x57> =============================================================================== 0010bad4 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10bad4: 55 push %ebp 10bad5: 89 e5 mov %esp,%ebp 10bad7: 57 push %edi 10bad8: 56 push %esi 10bad9: 53 push %ebx 10bada: 83 ec 1c sub $0x1c,%esp 10badd: 8b 45 08 mov 0x8(%ebp),%eax 10bae0: 8b 55 0c mov 0xc(%ebp),%edx 10bae3: 8b 75 10 mov 0x10(%ebp),%esi 10bae6: 8b 5d 14 mov 0x14(%ebp),%ebx 10bae9: 8b 4d 20 mov 0x20(%ebp),%ecx 10baec: 89 4d e4 mov %ecx,-0x1c(%ebp) 10baef: 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; 10baf3: 89 10 mov %edx,(%eax) information->the_class = the_class; 10baf5: 66 89 70 04 mov %si,0x4(%eax) information->size = size; 10baf9: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10bafc: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10bb03: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10bb0a: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10bb11: 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; 10bb17: 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; 10bb1d: 8b 3c 95 24 56 12 00 mov 0x125624(,%edx,4),%edi 10bb24: 89 04 b7 mov %eax,(%edi,%esi,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10bb27: 89 df mov %ebx,%edi 10bb29: 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 = 10bb2c: 89 f9 mov %edi,%ecx 10bb2e: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10bb31: 89 d9 mov %ebx,%ecx 10bb33: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10bb39: 85 ff test %edi,%edi 10bb3b: 74 10 je 10bb4d <_Objects_Initialize_information+0x79> 10bb3d: 85 c9 test %ecx,%ecx 10bb3f: 75 0c jne 10bb4d <_Objects_Initialize_information+0x79> _Internal_error_Occurred( 10bb41: 50 push %eax 10bb42: 6a 14 push $0x14 10bb44: 6a 01 push $0x1 10bb46: 6a 00 push $0x0 10bb48: e8 83 fa ff ff call 10b5d0 <_Internal_error_Occurred> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10bb4d: 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; 10bb51: c7 40 1c f8 52 12 00 movl $0x1252f8,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10bb58: c1 e2 18 shl $0x18,%edx 10bb5b: 81 ca 00 00 01 00 or $0x10000,%edx 10bb61: c1 e6 1b shl $0x1b,%esi 10bb64: 09 f2 or %esi,%edx 10bb66: 85 c9 test %ecx,%ecx 10bb68: 0f 95 c3 setne %bl 10bb6b: 89 de mov %ebx,%esi 10bb6d: 81 e6 ff 00 00 00 and $0xff,%esi 10bb73: 09 f2 or %esi,%edx 10bb75: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10bb78: 8b 55 e4 mov -0x1c(%ebp),%edx 10bb7b: f6 c2 03 test $0x3,%dl 10bb7e: 74 06 je 10bb86 <_Objects_Initialize_information+0xb2><== ALWAYS TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10bb80: 83 c2 04 add $0x4,%edx <== NOT EXECUTED 10bb83: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10bb86: 66 89 50 38 mov %dx,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10bb8a: 8d 50 24 lea 0x24(%eax),%edx 10bb8d: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10bb90: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10bb97: 8d 50 20 lea 0x20(%eax),%edx 10bb9a: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10bb9d: 85 c9 test %ecx,%ecx 10bb9f: 74 0f je 10bbb0 <_Objects_Initialize_information+0xdc> /* * 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 ); 10bba1: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10bba4: 8d 65 f4 lea -0xc(%ebp),%esp 10bba7: 5b pop %ebx 10bba8: 5e pop %esi 10bba9: 5f pop %edi 10bbaa: 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 ); 10bbab: e9 4c fb ff ff jmp 10b6fc <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10bbb0: 8d 65 f4 lea -0xc(%ebp),%esp 10bbb3: 5b pop %ebx 10bbb4: 5e pop %esi 10bbb5: 5f pop %edi 10bbb6: c9 leave 10bbb7: c3 ret =============================================================================== 0010f45a <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10f45a: 55 push %ebp 10f45b: 89 e5 mov %esp,%ebp 10f45d: 57 push %edi 10f45e: 56 push %esi 10f45f: 53 push %ebx 10f460: 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 ]; 10f463: 8b 45 08 mov 0x8(%ebp),%eax 10f466: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 10f46c: 85 db test %ebx,%ebx 10f46e: 74 45 je 10f4b5 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10f470: 9c pushf 10f471: fa cli 10f472: 58 pop %eax signal_set = asr->signals_posted; 10f473: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10f476: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10f47d: 50 push %eax 10f47e: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10f47f: 85 ff test %edi,%edi 10f481: 74 32 je 10f4b5 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN return; asr->nest_level += 1; 10f483: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10f486: 50 push %eax 10f487: 8d 75 e4 lea -0x1c(%ebp),%esi 10f48a: 56 push %esi 10f48b: 68 ff ff 00 00 push $0xffff 10f490: ff 73 10 pushl 0x10(%ebx) 10f493: e8 d4 20 00 00 call 11156c (*asr->handler)( signal_set ); 10f498: 89 3c 24 mov %edi,(%esp) 10f49b: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10f49e: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10f4a1: 83 c4 0c add $0xc,%esp 10f4a4: 56 push %esi 10f4a5: 68 ff ff 00 00 push $0xffff 10f4aa: ff 75 e4 pushl -0x1c(%ebp) 10f4ad: e8 ba 20 00 00 call 11156c 10f4b2: 83 c4 10 add $0x10,%esp } 10f4b5: 8d 65 f4 lea -0xc(%ebp),%esp 10f4b8: 5b pop %ebx 10f4b9: 5e pop %esi 10f4ba: 5f pop %edi 10f4bb: c9 leave 10f4bc: c3 ret =============================================================================== 0010b7e0 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10b7e0: 55 push %ebp 10b7e1: 89 e5 mov %esp,%ebp 10b7e3: 53 push %ebx 10b7e4: 83 ec 18 sub $0x18,%esp 10b7e7: 8d 45 f4 lea -0xc(%ebp),%eax 10b7ea: 50 push %eax 10b7eb: ff 75 08 pushl 0x8(%ebp) 10b7ee: 68 9c 71 12 00 push $0x12719c 10b7f3: e8 a0 19 00 00 call 10d198 <_Objects_Get> 10b7f8: 89 c3 mov %eax,%ebx /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10b7fa: 83 c4 10 add $0x10,%esp 10b7fd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b801: 75 64 jne 10b867 <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10b803: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10b806: f6 40 11 40 testb $0x40,0x11(%eax) 10b80a: 74 18 je 10b824 <_Rate_monotonic_Timeout+0x44> the_thread->Wait.id == the_period->Object.id ) { 10b80c: 8b 50 20 mov 0x20(%eax),%edx 10b80f: 3b 53 08 cmp 0x8(%ebx),%edx 10b812: 75 10 jne 10b824 <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b814: 52 push %edx 10b815: 52 push %edx 10b816: 68 f8 ff 03 10 push $0x1003fff8 10b81b: 50 push %eax 10b81c: e8 bf 1d 00 00 call 10d5e0 <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10b821: 59 pop %ecx 10b822: eb 10 jmp 10b834 <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10b824: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 10b828: 75 2b jne 10b855 <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10b82a: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 10b831: 83 ec 0c sub $0xc,%esp 10b834: 53 push %ebx 10b835: e8 56 fa ff ff call 10b290 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b83a: 8b 43 3c mov 0x3c(%ebx),%eax 10b83d: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b840: 58 pop %eax 10b841: 5a pop %edx 10b842: 83 c3 10 add $0x10,%ebx 10b845: 53 push %ebx 10b846: 68 70 73 12 00 push $0x127370 10b84b: e8 54 30 00 00 call 10e8a4 <_Watchdog_Insert> 10b850: 83 c4 10 add $0x10,%esp 10b853: eb 07 jmp 10b85c <_Rate_monotonic_Timeout+0x7c> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 10b855: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b85c: a1 94 72 12 00 mov 0x127294,%eax 10b861: 48 dec %eax 10b862: a3 94 72 12 00 mov %eax,0x127294 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b867: 8b 5d fc mov -0x4(%ebp),%ebx 10b86a: c9 leave 10b86b: c3 ret =============================================================================== 0010b108 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10b108: 55 push %ebp 10b109: 89 e5 mov %esp,%ebp 10b10b: 53 push %ebx 10b10c: 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(); 10b10f: 8b 1d 04 42 12 00 mov 0x124204,%ebx if ((!the_tod) || 10b115: 85 c9 test %ecx,%ecx 10b117: 74 59 je 10b172 <_TOD_Validate+0x6a> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || 10b119: b8 40 42 0f 00 mov $0xf4240,%eax 10b11e: 31 d2 xor %edx,%edx 10b120: f7 f3 div %ebx 10b122: 39 41 18 cmp %eax,0x18(%ecx) 10b125: 73 4b jae 10b172 <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10b127: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10b12b: 77 45 ja 10b172 <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10b12d: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10b131: 77 3f ja 10b172 <_TOD_Validate+0x6a> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10b133: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10b137: 77 39 ja 10b172 <_TOD_Validate+0x6a> (the_tod->month == 0) || 10b139: 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) || 10b13c: 85 c0 test %eax,%eax 10b13e: 74 32 je 10b172 <_TOD_Validate+0x6a> <== NEVER TAKEN 10b140: 83 f8 0c cmp $0xc,%eax 10b143: 77 2d ja 10b172 <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10b145: 8b 19 mov (%ecx),%ebx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10b147: 81 fb c3 07 00 00 cmp $0x7c3,%ebx 10b14d: 76 23 jbe 10b172 <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10b14f: 8b 51 08 mov 0x8(%ecx),%edx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10b152: 85 d2 test %edx,%edx 10b154: 74 1c je 10b172 <_TOD_Validate+0x6a> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10b156: 80 e3 03 and $0x3,%bl 10b159: 75 09 jne 10b164 <_TOD_Validate+0x5c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10b15b: 8b 04 85 28 19 12 00 mov 0x121928(,%eax,4),%eax 10b162: eb 07 jmp 10b16b <_TOD_Validate+0x63> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10b164: 8b 04 85 f4 18 12 00 mov 0x1218f4(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10b16b: 39 c2 cmp %eax,%edx 10b16d: 0f 96 c0 setbe %al 10b170: eb 02 jmp 10b174 <_TOD_Validate+0x6c> 10b172: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10b174: 5b pop %ebx 10b175: c9 leave 10b176: c3 ret =============================================================================== 0010bda4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10bda4: 55 push %ebp 10bda5: 89 e5 mov %esp,%ebp 10bda7: 57 push %edi 10bda8: 56 push %esi 10bda9: 53 push %ebx 10bdaa: 83 ec 28 sub $0x28,%esp 10bdad: 8b 5d 08 mov 0x8(%ebp),%ebx 10bdb0: 8b 7d 0c mov 0xc(%ebp),%edi 10bdb3: 8a 45 10 mov 0x10(%ebp),%al 10bdb6: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10bdb9: 8b 73 10 mov 0x10(%ebx),%esi /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 10bdbc: 53 push %ebx 10bdbd: e8 32 0d 00 00 call 10caf4 <_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 ) 10bdc2: 83 c4 10 add $0x10,%esp 10bdc5: 39 7b 14 cmp %edi,0x14(%ebx) 10bdc8: 74 0c je 10bdd6 <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10bdca: 50 push %eax 10bdcb: 50 push %eax 10bdcc: 57 push %edi 10bdcd: 53 push %ebx 10bdce: e8 e9 0b 00 00 call 10c9bc <_Thread_Set_priority> 10bdd3: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10bdd6: 9c pushf 10bdd7: fa cli 10bdd8: 59 pop %ecx /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 10bdd9: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10bddc: 83 f8 04 cmp $0x4,%eax 10bddf: 74 2f je 10be10 <_Thread_Change_priority+0x6c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10bde1: 83 e6 04 and $0x4,%esi 10bde4: 75 08 jne 10bdee <_Thread_Change_priority+0x4a><== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10bde6: 89 c2 mov %eax,%edx 10bde8: 83 e2 fb and $0xfffffffb,%edx 10bdeb: 89 53 10 mov %edx,0x10(%ebx) _ISR_Enable( level ); 10bdee: 51 push %ecx 10bdef: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10bdf0: a9 e0 be 03 00 test $0x3bee0,%eax 10bdf5: 0f 84 c0 00 00 00 je 10bebb <_Thread_Change_priority+0x117> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10bdfb: 89 5d 0c mov %ebx,0xc(%ebp) 10bdfe: 8b 43 44 mov 0x44(%ebx),%eax 10be01: 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 ); } 10be04: 8d 65 f4 lea -0xc(%ebp),%esp 10be07: 5b pop %ebx 10be08: 5e pop %esi 10be09: 5f pop %edi 10be0a: 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 ); 10be0b: e9 24 0b 00 00 jmp 10c934 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10be10: 83 e6 04 and $0x4,%esi 10be13: 75 53 jne 10be68 <_Thread_Change_priority+0xc4><== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10be15: 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; 10be1c: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10be22: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx 10be29: 66 09 10 or %dx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10be2c: 66 a1 00 57 12 00 mov 0x125700,%ax 10be32: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10be38: 66 a3 00 57 12 00 mov %ax,0x125700 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10be3e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10be42: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10be48: 74 0e je 10be58 <_Thread_Change_priority+0xb4> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10be4a: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10be4d: 8b 10 mov (%eax),%edx after_node->next = the_node; 10be4f: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10be51: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10be53: 89 5a 04 mov %ebx,0x4(%edx) 10be56: eb 10 jmp 10be68 <_Thread_Change_priority+0xc4> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10be58: 8d 50 04 lea 0x4(%eax),%edx 10be5b: 89 13 mov %edx,(%ebx) old_last_node = the_chain->last; 10be5d: 8b 50 08 mov 0x8(%eax),%edx the_chain->last = the_node; 10be60: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10be63: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 10be65: 89 53 04 mov %edx,0x4(%ebx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10be68: 51 push %ecx 10be69: 9d popf 10be6a: 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 ); 10be6b: 66 8b 1d 00 57 12 00 mov 0x125700,%bx 10be72: 31 c0 xor %eax,%eax 10be74: 89 c2 mov %eax,%edx 10be76: 66 0f bc d3 bsf %bx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10be7a: 0f b7 d2 movzwl %dx,%edx 10be7d: 66 8b 9c 12 78 57 12 mov 0x125778(%edx,%edx,1),%bx 10be84: 00 10be85: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10be89: c1 e2 04 shl $0x4,%edx 10be8c: 0f b7 c0 movzwl %ax,%eax 10be8f: 01 c2 add %eax,%edx 10be91: 6b d2 0c imul $0xc,%edx,%edx 10be94: 8b 1d 18 56 12 00 mov 0x125618,%ebx 10be9a: 8b 14 1a mov (%edx,%ebx,1),%edx 10be9d: 89 15 dc 56 12 00 mov %edx,0x1256dc * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10bea3: a1 0c 57 12 00 mov 0x12570c,%eax * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10bea8: 39 d0 cmp %edx,%eax 10beaa: 74 0d je 10beb9 <_Thread_Change_priority+0x115> _Thread_Executing->is_preemptible ) 10beac: 80 78 75 00 cmpb $0x0,0x75(%eax) 10beb0: 74 07 je 10beb9 <_Thread_Change_priority+0x115> _Context_Switch_necessary = true; 10beb2: c6 05 1c 57 12 00 01 movb $0x1,0x12571c _ISR_Enable( level ); 10beb9: 51 push %ecx 10beba: 9d popf } 10bebb: 8d 65 f4 lea -0xc(%ebp),%esp 10bebe: 5b pop %ebx 10bebf: 5e pop %esi 10bec0: 5f pop %edi 10bec1: c9 leave 10bec2: c3 ret =============================================================================== 0010bec4 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10bec4: 55 push %ebp 10bec5: 89 e5 mov %esp,%ebp 10bec7: 53 push %ebx 10bec8: 8b 45 08 mov 0x8(%ebp),%eax 10becb: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10bece: 9c pushf 10becf: fa cli 10bed0: 59 pop %ecx current_state = the_thread->current_state; 10bed1: 8b 58 10 mov 0x10(%eax),%ebx if ( current_state & state ) { 10bed4: 85 da test %ebx,%edx 10bed6: 74 71 je 10bf49 <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10bed8: f7 d2 not %edx 10beda: 21 da and %ebx,%edx current_state = 10bedc: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10bedf: 85 d2 test %edx,%edx 10bee1: 75 66 jne 10bf49 <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10bee3: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10bee9: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10bef0: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10bef3: 66 8b 15 00 57 12 00 mov 0x125700,%dx 10befa: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10bf00: 66 89 15 00 57 12 00 mov %dx,0x125700 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10bf07: 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); 10bf0d: 8d 5a 04 lea 0x4(%edx),%ebx 10bf10: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10bf12: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10bf15: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10bf18: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10bf1a: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10bf1d: 51 push %ecx 10bf1e: 9d popf 10bf1f: 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 ) { 10bf20: 8b 50 14 mov 0x14(%eax),%edx 10bf23: 8b 1d dc 56 12 00 mov 0x1256dc,%ebx 10bf29: 3b 53 14 cmp 0x14(%ebx),%edx 10bf2c: 73 1b jae 10bf49 <_Thread_Clear_state+0x85> _Thread_Heir = the_thread; 10bf2e: a3 dc 56 12 00 mov %eax,0x1256dc if ( _Thread_Executing->is_preemptible || 10bf33: a1 0c 57 12 00 mov 0x12570c,%eax 10bf38: 80 78 75 00 cmpb $0x0,0x75(%eax) 10bf3c: 75 04 jne 10bf42 <_Thread_Clear_state+0x7e> 10bf3e: 85 d2 test %edx,%edx 10bf40: 75 07 jne 10bf49 <_Thread_Clear_state+0x85><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10bf42: c6 05 1c 57 12 00 01 movb $0x1,0x12571c } } } _ISR_Enable( level ); 10bf49: 51 push %ecx 10bf4a: 9d popf } 10bf4b: 5b pop %ebx 10bf4c: c9 leave 10bf4d: c3 ret =============================================================================== 0010c0c4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c0c4: 55 push %ebp 10c0c5: 89 e5 mov %esp,%ebp 10c0c7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c0ca: 8d 45 f4 lea -0xc(%ebp),%eax 10c0cd: 50 push %eax 10c0ce: ff 75 08 pushl 0x8(%ebp) 10c0d1: e8 8e 01 00 00 call 10c264 <_Thread_Get> switch ( location ) { 10c0d6: 83 c4 10 add $0x10,%esp 10c0d9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c0dd: 75 1b jne 10c0fa <_Thread_Delay_ended+0x36><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10c0df: 52 push %edx 10c0e0: 52 push %edx 10c0e1: 68 18 00 00 10 push $0x10000018 10c0e6: 50 push %eax 10c0e7: e8 d8 fd ff ff call 10bec4 <_Thread_Clear_state> 10c0ec: a1 50 56 12 00 mov 0x125650,%eax 10c0f1: 48 dec %eax 10c0f2: a3 50 56 12 00 mov %eax,0x125650 10c0f7: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10c0fa: c9 leave 10c0fb: c3 ret =============================================================================== 0010c0fc <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10c0fc: 55 push %ebp 10c0fd: 89 e5 mov %esp,%ebp 10c0ff: 57 push %edi 10c100: 56 push %esi 10c101: 53 push %ebx 10c102: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10c105: 8b 1d 0c 57 12 00 mov 0x12570c,%ebx _ISR_Disable( level ); 10c10b: 9c pushf 10c10c: fa cli 10c10d: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10c10e: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10c111: e9 f1 00 00 00 jmp 10c207 <_Thread_Dispatch+0x10b> heir = _Thread_Heir; 10c116: 8b 35 dc 56 12 00 mov 0x1256dc,%esi _Thread_Dispatch_disable_level = 1; 10c11c: c7 05 50 56 12 00 01 movl $0x1,0x125650 10c123: 00 00 00 _Context_Switch_necessary = false; 10c126: c6 05 1c 57 12 00 00 movb $0x0,0x12571c _Thread_Executing = heir; 10c12d: 89 35 0c 57 12 00 mov %esi,0x12570c #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 ) 10c133: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10c137: 75 09 jne 10c142 <_Thread_Dispatch+0x46> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c139: 8b 15 1c 56 12 00 mov 0x12561c,%edx 10c13f: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10c142: 50 push %eax 10c143: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10c144: 83 ec 0c sub $0xc,%esp 10c147: 8d 45 e0 lea -0x20(%ebp),%eax 10c14a: 50 push %eax 10c14b: e8 8c 37 00 00 call 10f8dc <_TOD_Get_uptime> _Timestamp_Subtract( 10c150: 83 c4 0c add $0xc,%esp 10c153: 57 push %edi 10c154: 8d 45 e0 lea -0x20(%ebp),%eax 10c157: 50 push %eax 10c158: 68 14 57 12 00 push $0x125714 10c15d: e8 fe 0b 00 00 call 10cd60 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10c162: 58 pop %eax 10c163: 5a pop %edx 10c164: 57 push %edi 10c165: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c16b: 50 push %eax 10c16c: e8 bf 0b 00 00 call 10cd30 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10c171: 8b 45 e0 mov -0x20(%ebp),%eax 10c174: 8b 55 e4 mov -0x1c(%ebp),%edx 10c177: a3 14 57 12 00 mov %eax,0x125714 10c17c: 89 15 18 57 12 00 mov %edx,0x125718 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10c182: a1 d8 56 12 00 mov 0x1256d8,%eax 10c187: 83 c4 10 add $0x10,%esp 10c18a: 85 c0 test %eax,%eax 10c18c: 74 10 je 10c19e <_Thread_Dispatch+0xa2> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10c18e: 8b 10 mov (%eax),%edx 10c190: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10c196: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10c19c: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10c19e: 51 push %ecx 10c19f: 51 push %ecx 10c1a0: 56 push %esi 10c1a1: 53 push %ebx 10c1a2: e8 e9 0d 00 00 call 10cf90 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10c1a7: 58 pop %eax 10c1a8: 5a pop %edx 10c1a9: 81 c6 d0 00 00 00 add $0xd0,%esi 10c1af: 56 push %esi 10c1b0: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10c1b6: 50 push %eax 10c1b7: e8 94 10 00 00 call 10d250 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10c1bc: 83 c4 10 add $0x10,%esp 10c1bf: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10c1c6: 74 36 je 10c1fe <_Thread_Dispatch+0x102> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 10c1c8: a1 d4 56 12 00 mov 0x1256d4,%eax 10c1cd: 39 c3 cmp %eax,%ebx 10c1cf: 74 2d je 10c1fe <_Thread_Dispatch+0x102> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10c1d1: 85 c0 test %eax,%eax 10c1d3: 74 11 je 10c1e6 <_Thread_Dispatch+0xea> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10c1d5: 83 ec 0c sub $0xc,%esp 10c1d8: 05 e8 00 00 00 add $0xe8,%eax 10c1dd: 50 push %eax 10c1de: e8 a1 10 00 00 call 10d284 <_CPU_Context_save_fp> 10c1e3: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10c1e6: 83 ec 0c sub $0xc,%esp 10c1e9: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10c1ef: 50 push %eax 10c1f0: e8 99 10 00 00 call 10d28e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10c1f5: 89 1d d4 56 12 00 mov %ebx,0x1256d4 10c1fb: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10c1fe: 8b 1d 0c 57 12 00 mov 0x12570c,%ebx _ISR_Disable( level ); 10c204: 9c pushf 10c205: fa cli 10c206: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10c207: 8a 15 1c 57 12 00 mov 0x12571c,%dl 10c20d: 84 d2 test %dl,%dl 10c20f: 0f 85 01 ff ff ff jne 10c116 <_Thread_Dispatch+0x1a> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10c215: c7 05 50 56 12 00 00 movl $0x0,0x125650 10c21c: 00 00 00 _ISR_Enable( level ); 10c21f: 50 push %eax 10c220: 9d popf if ( _Thread_Do_post_task_switch_extension || 10c221: 83 3d f0 56 12 00 00 cmpl $0x0,0x1256f0 10c228: 75 06 jne 10c230 <_Thread_Dispatch+0x134><== NEVER TAKEN executing->do_post_task_switch_extension ) { 10c22a: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10c22e: 74 09 je 10c239 <_Thread_Dispatch+0x13d> executing->do_post_task_switch_extension = false; 10c230: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10c234: e8 aa ea ff ff call 10ace3 <_API_extensions_Run_postswitch> } } 10c239: 8d 65 f4 lea -0xc(%ebp),%esp 10c23c: 5b pop %ebx 10c23d: 5e pop %esi 10c23e: 5f pop %edi 10c23f: c9 leave 10c240: c3 ret =============================================================================== 00111774 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 111774: 55 push %ebp 111775: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 111777: a1 0c 57 12 00 mov 0x12570c,%eax if ( !_States_Is_ready( executing->current_state ) || 11177c: 83 78 10 00 cmpl $0x0,0x10(%eax) 111780: 75 0e jne 111790 <_Thread_Evaluate_mode+0x1c><== NEVER TAKEN 111782: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 111788: 74 11 je 11179b <_Thread_Evaluate_mode+0x27> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 11178a: 80 78 75 00 cmpb $0x0,0x75(%eax) 11178e: 74 0b je 11179b <_Thread_Evaluate_mode+0x27><== NEVER TAKEN _Context_Switch_necessary = true; 111790: c6 05 1c 57 12 00 01 movb $0x1,0x12571c 111797: b0 01 mov $0x1,%al return true; 111799: eb 02 jmp 11179d <_Thread_Evaluate_mode+0x29> 11179b: 31 c0 xor %eax,%eax } return false; } 11179d: c9 leave 11179e: c3 ret =============================================================================== 001117a0 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 1117a0: 55 push %ebp 1117a1: 89 e5 mov %esp,%ebp 1117a3: 53 push %ebx 1117a4: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 1117a7: 8b 1d 0c 57 12 00 mov 0x12570c,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 1117ad: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 1117b3: 85 c0 test %eax,%eax 1117b5: 74 03 je 1117ba <_Thread_Handler+0x1a> 1117b7: fa cli 1117b8: eb 01 jmp 1117bb <_Thread_Handler+0x1b> 1117ba: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 1117bb: a0 08 53 12 00 mov 0x125308,%al 1117c0: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 1117c3: c6 05 08 53 12 00 01 movb $0x1,0x125308 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 1117ca: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 1117d1: 74 24 je 1117f7 <_Thread_Handler+0x57> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 1117d3: a1 d4 56 12 00 mov 0x1256d4,%eax 1117d8: 39 c3 cmp %eax,%ebx 1117da: 74 1b je 1117f7 <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 1117dc: 85 c0 test %eax,%eax 1117de: 74 11 je 1117f1 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 1117e0: 83 ec 0c sub $0xc,%esp 1117e3: 05 e8 00 00 00 add $0xe8,%eax 1117e8: 50 push %eax 1117e9: e8 96 ba ff ff call 10d284 <_CPU_Context_save_fp> 1117ee: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 1117f1: 89 1d d4 56 12 00 mov %ebx,0x1256d4 /* * 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 ); 1117f7: 83 ec 0c sub $0xc,%esp 1117fa: 53 push %ebx 1117fb: e8 44 b6 ff ff call 10ce44 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 111800: e8 3c aa ff ff call 10c241 <_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) */ { 111805: 83 c4 10 add $0x10,%esp 111808: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 11180c: 75 05 jne 111813 <_Thread_Handler+0x73> INIT_NAME (); 11180e: e8 8d bf 00 00 call 11d7a0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 111813: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 11181a: 75 15 jne 111831 <_Thread_Handler+0x91> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 11181c: 83 ec 0c sub $0xc,%esp 11181f: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 111825: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 11182b: 89 43 28 mov %eax,0x28(%ebx) 11182e: 83 c4 10 add $0x10,%esp * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 111831: 83 ec 0c sub $0xc,%esp 111834: 53 push %ebx 111835: e8 3b b6 ff ff call 10ce75 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 11183a: 83 c4 0c add $0xc,%esp 11183d: 6a 06 push $0x6 11183f: 6a 01 push $0x1 111841: 6a 00 push $0x0 111843: e8 88 9d ff ff call 10b5d0 <_Internal_error_Occurred> =============================================================================== 0010c2d8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10c2d8: 55 push %ebp 10c2d9: 89 e5 mov %esp,%ebp 10c2db: 57 push %edi 10c2dc: 56 push %esi 10c2dd: 53 push %ebx 10c2de: 83 ec 24 sub $0x24,%esp 10c2e1: 8b 5d 0c mov 0xc(%ebp),%ebx 10c2e4: 8b 75 14 mov 0x14(%ebp),%esi 10c2e7: 8a 55 18 mov 0x18(%ebp),%dl 10c2ea: 8a 45 20 mov 0x20(%ebp),%al 10c2ed: 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; 10c2f0: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10c2f7: 00 00 00 10c2fa: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10c301: 00 00 00 10c304: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10c30b: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10c30e: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10c315: 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 ); 10c318: 56 push %esi 10c319: 53 push %ebx 10c31a: 88 55 e0 mov %dl,-0x20(%ebp) 10c31d: e8 46 08 00 00 call 10cb68 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10c322: 83 c4 10 add $0x10,%esp 10c325: 39 f0 cmp %esi,%eax 10c327: 8a 55 e0 mov -0x20(%ebp),%dl 10c32a: 72 04 jb 10c330 <_Thread_Initialize+0x58> 10c32c: 85 c0 test %eax,%eax 10c32e: 75 07 jne 10c337 <_Thread_Initialize+0x5f><== ALWAYS TAKEN 10c330: 31 c0 xor %eax,%eax 10c332: e9 b9 01 00 00 jmp 10c4f0 <_Thread_Initialize+0x218> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10c337: 8b 8b cc 00 00 00 mov 0xcc(%ebx),%ecx 10c33d: 89 8b c4 00 00 00 mov %ecx,0xc4(%ebx) the_stack->size = size; 10c343: 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 ) { 10c349: 31 ff xor %edi,%edi 10c34b: 84 d2 test %dl,%dl 10c34d: 74 19 je 10c368 <_Thread_Initialize+0x90> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10c34f: 83 ec 0c sub $0xc,%esp 10c352: 6a 6c push $0x6c 10c354: e8 7f 0e 00 00 call 10d1d8 <_Workspace_Allocate> 10c359: 89 c7 mov %eax,%edi if ( !fp_area ) 10c35b: 83 c4 10 add $0x10,%esp 10c35e: 31 f6 xor %esi,%esi 10c360: 85 c0 test %eax,%eax 10c362: 0f 84 02 01 00 00 je 10c46a <_Thread_Initialize+0x192> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10c368: 89 bb e8 00 00 00 mov %edi,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10c36e: 89 bb c8 00 00 00 mov %edi,0xc8(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c374: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10c37b: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10c382: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10c389: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10c390: a1 ec 56 12 00 mov 0x1256ec,%eax 10c395: 31 f6 xor %esi,%esi 10c397: 85 c0 test %eax,%eax 10c399: 74 1d je 10c3b8 <_Thread_Initialize+0xe0> extensions_area = _Workspace_Allocate( 10c39b: 83 ec 0c sub $0xc,%esp 10c39e: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10c3a5: 50 push %eax 10c3a6: e8 2d 0e 00 00 call 10d1d8 <_Workspace_Allocate> 10c3ab: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10c3ad: 83 c4 10 add $0x10,%esp 10c3b0: 85 c0 test %eax,%eax 10c3b2: 0f 84 b2 00 00 00 je 10c46a <_Thread_Initialize+0x192> goto failed; } the_thread->extensions = (void **) extensions_area; 10c3b8: 89 b3 fc 00 00 00 mov %esi,0xfc(%ebx) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 10c3be: 85 f6 test %esi,%esi 10c3c0: 74 1c je 10c3de <_Thread_Initialize+0x106> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10c3c2: 8b 0d ec 56 12 00 mov 0x1256ec,%ecx 10c3c8: 31 c0 xor %eax,%eax 10c3ca: eb 0e jmp 10c3da <_Thread_Initialize+0x102> the_thread->extensions[i] = NULL; 10c3cc: 8b 93 fc 00 00 00 mov 0xfc(%ebx),%edx 10c3d2: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10c3d9: 40 inc %eax 10c3da: 39 c8 cmp %ecx,%eax 10c3dc: 76 ee jbe 10c3cc <_Thread_Initialize+0xf4> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10c3de: 8a 45 e7 mov -0x19(%ebp),%al 10c3e1: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10c3e7: 8b 45 24 mov 0x24(%ebp),%eax 10c3ea: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10c3f0: 8b 45 28 mov 0x28(%ebp),%eax 10c3f3: 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; 10c3f9: 8b 45 2c mov 0x2c(%ebp),%eax 10c3fc: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10c402: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10c409: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10c410: 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; 10c417: 8b 45 1c mov 0x1c(%ebp),%eax 10c41a: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10c41d: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10c423: 52 push %edx 10c424: 52 push %edx 10c425: 50 push %eax 10c426: 53 push %ebx 10c427: e8 90 05 00 00 call 10c9bc <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10c42c: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10c433: 00 00 00 10c436: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10c43d: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c440: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c444: 8b 45 08 mov 0x8(%ebp),%eax 10c447: 8b 40 1c mov 0x1c(%eax),%eax 10c44a: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c44d: 8b 45 30 mov 0x30(%ebp),%eax 10c450: 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 ); 10c453: 89 1c 24 mov %ebx,(%esp) 10c456: e8 89 0a 00 00 call 10cee4 <_User_extensions_Thread_create> 10c45b: 88 c2 mov %al,%dl if ( extension_status ) 10c45d: 83 c4 10 add $0x10,%esp 10c460: b0 01 mov $0x1,%al 10c462: 84 d2 test %dl,%dl 10c464: 0f 85 86 00 00 00 jne 10c4f0 <_Thread_Initialize+0x218> return true; failed: if ( the_thread->libc_reent ) 10c46a: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10c470: 85 c0 test %eax,%eax 10c472: 74 0c je 10c480 <_Thread_Initialize+0x1a8> _Workspace_Free( the_thread->libc_reent ); 10c474: 83 ec 0c sub $0xc,%esp 10c477: 50 push %eax 10c478: e8 74 0d 00 00 call 10d1f1 <_Workspace_Free> 10c47d: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10c480: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10c486: 85 c0 test %eax,%eax 10c488: 74 0c je 10c496 <_Thread_Initialize+0x1be> _Workspace_Free( the_thread->API_Extensions[i] ); 10c48a: 83 ec 0c sub $0xc,%esp 10c48d: 50 push %eax 10c48e: e8 5e 0d 00 00 call 10d1f1 <_Workspace_Free> 10c493: 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] ) 10c496: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10c49c: 85 c0 test %eax,%eax 10c49e: 74 0c je 10c4ac <_Thread_Initialize+0x1d4><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10c4a0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c4a3: 50 push %eax <== NOT EXECUTED 10c4a4: e8 48 0d 00 00 call 10d1f1 <_Workspace_Free> <== NOT EXECUTED 10c4a9: 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] ) 10c4ac: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10c4b2: 85 c0 test %eax,%eax 10c4b4: 74 0c je 10c4c2 <_Thread_Initialize+0x1ea><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10c4b6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c4b9: 50 push %eax <== NOT EXECUTED 10c4ba: e8 32 0d 00 00 call 10d1f1 <_Workspace_Free> <== NOT EXECUTED 10c4bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10c4c2: 85 f6 test %esi,%esi 10c4c4: 74 0c je 10c4d2 <_Thread_Initialize+0x1fa> (void) _Workspace_Free( extensions_area ); 10c4c6: 83 ec 0c sub $0xc,%esp 10c4c9: 56 push %esi 10c4ca: e8 22 0d 00 00 call 10d1f1 <_Workspace_Free> 10c4cf: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10c4d2: 85 ff test %edi,%edi 10c4d4: 74 0c je 10c4e2 <_Thread_Initialize+0x20a> (void) _Workspace_Free( fp_area ); 10c4d6: 83 ec 0c sub $0xc,%esp 10c4d9: 57 push %edi 10c4da: e8 12 0d 00 00 call 10d1f1 <_Workspace_Free> 10c4df: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10c4e2: 83 ec 0c sub $0xc,%esp 10c4e5: 53 push %ebx 10c4e6: e8 cd 06 00 00 call 10cbb8 <_Thread_Stack_Free> 10c4eb: 31 c0 xor %eax,%eax return false; 10c4ed: 83 c4 10 add $0x10,%esp } 10c4f0: 8d 65 f4 lea -0xc(%ebp),%esp 10c4f3: 5b pop %ebx 10c4f4: 5e pop %esi 10c4f5: 5f pop %edi 10c4f6: c9 leave 10c4f7: c3 ret =============================================================================== 0010ff28 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 10ff28: 55 push %ebp 10ff29: 89 e5 mov %esp,%ebp 10ff2b: 56 push %esi 10ff2c: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10ff2d: a1 0c 57 12 00 mov 0x12570c,%eax ready = executing->ready; 10ff32: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10ff38: 9c pushf 10ff39: fa cli 10ff3a: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 10ff3b: 8b 1a mov (%edx),%ebx 10ff3d: 3b 5a 08 cmp 0x8(%edx),%ebx 10ff40: 75 04 jne 10ff46 <_Thread_Reset_timeslice+0x1e> _ISR_Enable( level ); 10ff42: 51 push %ecx 10ff43: 9d popf return; 10ff44: eb 35 jmp 10ff7b <_Thread_Reset_timeslice+0x53> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10ff46: 8b 30 mov (%eax),%esi previous = the_node->previous; 10ff48: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10ff4b: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10ff4e: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10ff50: 8d 5a 04 lea 0x4(%edx),%ebx 10ff53: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10ff55: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10ff58: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10ff5b: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10ff5d: 89 58 04 mov %ebx,0x4(%eax) } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10ff60: 51 push %ecx 10ff61: 9d popf 10ff62: fa cli if ( _Thread_Is_heir( executing ) ) 10ff63: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 10ff69: 75 07 jne 10ff72 <_Thread_Reset_timeslice+0x4a><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10ff6b: 8b 02 mov (%edx),%eax 10ff6d: a3 dc 56 12 00 mov %eax,0x1256dc _Context_Switch_necessary = true; 10ff72: c6 05 1c 57 12 00 01 movb $0x1,0x12571c _ISR_Enable( level ); 10ff79: 51 push %ecx 10ff7a: 9d popf } 10ff7b: 5b pop %ebx 10ff7c: 5e pop %esi 10ff7d: c9 leave 10ff7e: c3 ret =============================================================================== 0010f7cc <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f7cc: 55 push %ebp 10f7cd: 89 e5 mov %esp,%ebp 10f7cf: 53 push %ebx 10f7d0: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f7d3: 9c pushf 10f7d4: fa cli 10f7d5: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 10f7d6: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f7d9: f6 c2 02 test $0x2,%dl 10f7dc: 74 70 je 10f84e <_Thread_Resume+0x82> <== NEVER TAKEN 10f7de: 83 e2 fd and $0xfffffffd,%edx current_state = 10f7e1: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10f7e4: 85 d2 test %edx,%edx 10f7e6: 75 66 jne 10f84e <_Thread_Resume+0x82> <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10f7e8: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f7ee: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10f7f5: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10f7f8: 66 8b 15 f0 88 12 00 mov 0x1288f0,%dx 10f7ff: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10f805: 66 89 15 f0 88 12 00 mov %dx,0x1288f0 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10f80c: 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); 10f812: 8d 5a 04 lea 0x4(%edx),%ebx 10f815: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10f817: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f81a: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f81d: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f81f: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10f822: 51 push %ecx 10f823: 9d popf 10f824: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10f825: 8b 50 14 mov 0x14(%eax),%edx 10f828: 8b 1d cc 88 12 00 mov 0x1288cc,%ebx 10f82e: 3b 53 14 cmp 0x14(%ebx),%edx 10f831: 73 1b jae 10f84e <_Thread_Resume+0x82> _Thread_Heir = the_thread; 10f833: a3 cc 88 12 00 mov %eax,0x1288cc if ( _Thread_Executing->is_preemptible || 10f838: a1 fc 88 12 00 mov 0x1288fc,%eax 10f83d: 80 78 75 00 cmpb $0x0,0x75(%eax) 10f841: 75 04 jne 10f847 <_Thread_Resume+0x7b> 10f843: 85 d2 test %edx,%edx 10f845: 75 07 jne 10f84e <_Thread_Resume+0x82> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10f847: c6 05 0c 89 12 00 01 movb $0x1,0x12890c } } } _ISR_Enable( level ); 10f84e: 51 push %ecx 10f84f: 9d popf } 10f850: 5b pop %ebx 10f851: c9 leave 10f852: c3 ret =============================================================================== 0010ccd0 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10ccd0: 55 push %ebp 10ccd1: 89 e5 mov %esp,%ebp 10ccd3: 56 push %esi 10ccd4: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10ccd5: a1 0c 57 12 00 mov 0x12570c,%eax ready = executing->ready; 10ccda: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10cce0: 9c pushf 10cce1: fa cli 10cce2: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10cce3: 8b 1a mov (%edx),%ebx 10cce5: 3b 5a 08 cmp 0x8(%edx),%ebx 10cce8: 74 2e je 10cd18 <_Thread_Yield_processor+0x48> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10ccea: 8b 30 mov (%eax),%esi previous = the_node->previous; 10ccec: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10ccef: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10ccf2: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10ccf4: 8d 5a 04 lea 0x4(%edx),%ebx 10ccf7: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10ccf9: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10ccfc: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10ccff: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10cd01: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10cd04: 51 push %ecx 10cd05: 9d popf 10cd06: fa cli if ( _Thread_Is_heir( executing ) ) 10cd07: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 10cd0d: 75 11 jne 10cd20 <_Thread_Yield_processor+0x50><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10cd0f: 8b 02 mov (%edx),%eax 10cd11: a3 dc 56 12 00 mov %eax,0x1256dc 10cd16: eb 08 jmp 10cd20 <_Thread_Yield_processor+0x50> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10cd18: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 10cd1e: 74 07 je 10cd27 <_Thread_Yield_processor+0x57><== ALWAYS TAKEN _Context_Switch_necessary = true; 10cd20: c6 05 1c 57 12 00 01 movb $0x1,0x12571c _ISR_Enable( level ); 10cd27: 51 push %ecx 10cd28: 9d popf } 10cd29: 5b pop %ebx 10cd2a: 5e pop %esi 10cd2b: c9 leave 10cd2c: c3 ret =============================================================================== 0010c758 <_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 ) { 10c758: 55 push %ebp 10c759: 89 e5 mov %esp,%ebp 10c75b: 57 push %edi 10c75c: 56 push %esi 10c75d: 53 push %ebx 10c75e: 83 ec 10 sub $0x10,%esp 10c761: 8b 4d 08 mov 0x8(%ebp),%ecx 10c764: 8b 45 0c mov 0xc(%ebp),%eax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c767: 8d 50 3c lea 0x3c(%eax),%edx 10c76a: 89 50 38 mov %edx,0x38(%eax) the_chain->permanent_null = NULL; 10c76d: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) the_chain->last = _Chain_Head(the_chain); 10c774: 8d 50 38 lea 0x38(%eax),%edx 10c777: 89 50 40 mov %edx,0x40(%eax) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10c77a: 8b 58 14 mov 0x14(%eax),%ebx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10c77d: 89 de mov %ebx,%esi 10c77f: c1 ee 06 shr $0x6,%esi 10c782: 6b f6 0c imul $0xc,%esi,%esi 10c785: 8d 34 31 lea (%ecx,%esi,1),%esi block_state = the_thread_queue->state; 10c788: 8b 79 38 mov 0x38(%ecx),%edi if ( _Thread_queue_Is_reverse_search( priority ) ) 10c78b: f6 c3 20 test $0x20,%bl 10c78e: 75 70 jne 10c800 <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c790: 8d 56 04 lea 0x4(%esi),%edx 10c793: 89 55 e8 mov %edx,-0x18(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10c796: 9c pushf 10c797: fa cli 10c798: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->first; 10c79b: 8b 16 mov (%esi),%edx 10c79d: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) 10c7a4: 89 75 e4 mov %esi,-0x1c(%ebp) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c7a7: eb 1f jmp 10c7c8 <_Thread_queue_Enqueue_priority+0x70> search_priority = search_thread->current_priority; 10c7a9: 8b 72 14 mov 0x14(%edx),%esi 10c7ac: 89 75 ec mov %esi,-0x14(%ebp) if ( priority <= search_priority ) 10c7af: 39 f3 cmp %esi,%ebx 10c7b1: 76 1a jbe 10c7cd <_Thread_queue_Enqueue_priority+0x75> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10c7b3: ff 75 f0 pushl -0x10(%ebp) 10c7b6: 9d popf 10c7b7: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c7b8: 85 7a 10 test %edi,0x10(%edx) 10c7bb: 75 09 jne 10c7c6 <_Thread_queue_Enqueue_priority+0x6e><== ALWAYS TAKEN 10c7bd: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED _ISR_Enable( level ); 10c7c0: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10c7c3: 9d popf <== NOT EXECUTED goto restart_forward_search; 10c7c4: eb d0 jmp 10c796 <_Thread_queue_Enqueue_priority+0x3e><== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10c7c6: 8b 12 mov (%edx),%edx restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c7c8: 3b 55 e8 cmp -0x18(%ebp),%edx 10c7cb: 75 dc jne 10c7a9 <_Thread_queue_Enqueue_priority+0x51> 10c7cd: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10c7d0: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c7d4: 0f 85 a9 00 00 00 jne 10c883 <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c7da: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c7e1: 3b 5d ec cmp -0x14(%ebp),%ebx 10c7e4: 0f 84 82 00 00 00 je 10c86c <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10c7ea: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c7ed: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c7ef: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c7f2: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c7f4: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c7f7: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c7fa: ff 75 f0 pushl -0x10(%ebp) 10c7fd: 9d popf 10c7fe: eb 65 jmp 10c865 <_Thread_queue_Enqueue_priority+0x10d> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10c800: 0f b6 15 d4 16 12 00 movzbl 0x1216d4,%edx 10c807: 42 inc %edx 10c808: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 10c80b: 9c pushf 10c80c: fa cli 10c80d: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->last; 10c810: 8b 56 08 mov 0x8(%esi),%edx 10c813: 89 75 e8 mov %esi,-0x18(%ebp) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c816: eb 20 jmp 10c838 <_Thread_queue_Enqueue_priority+0xe0> search_priority = search_thread->current_priority; 10c818: 8b 72 14 mov 0x14(%edx),%esi 10c81b: 89 75 ec mov %esi,-0x14(%ebp) if ( priority >= search_priority ) 10c81e: 39 f3 cmp %esi,%ebx 10c820: 73 1b jae 10c83d <_Thread_queue_Enqueue_priority+0xe5> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10c822: ff 75 f0 pushl -0x10(%ebp) 10c825: 9d popf 10c826: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c827: 85 7a 10 test %edi,0x10(%edx) 10c82a: 75 09 jne 10c835 <_Thread_queue_Enqueue_priority+0xdd> 10c82c: 8b 75 e8 mov -0x18(%ebp),%esi _ISR_Enable( level ); 10c82f: ff 75 f0 pushl -0x10(%ebp) 10c832: 9d popf goto restart_reverse_search; 10c833: eb cb jmp 10c800 <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *) 10c835: 8b 52 04 mov 0x4(%edx),%edx restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c838: 3b 55 e8 cmp -0x18(%ebp),%edx 10c83b: 75 db jne 10c818 <_Thread_queue_Enqueue_priority+0xc0> 10c83d: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10c840: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c844: 75 3d jne 10c883 <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c846: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c84d: 3b 5d ec cmp -0x14(%ebp),%ebx 10c850: 74 1a je 10c86c <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10c852: 8b 1a mov (%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10c854: 89 18 mov %ebx,(%eax) the_node->previous = search_node; 10c856: 89 50 04 mov %edx,0x4(%eax) search_node->next = the_node; 10c859: 89 02 mov %eax,(%edx) next_node->previous = the_node; 10c85b: 89 43 04 mov %eax,0x4(%ebx) the_thread->Wait.queue = the_thread_queue; 10c85e: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c861: ff 75 f0 pushl -0x10(%ebp) 10c864: 9d popf 10c865: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c86a: eb 1f jmp 10c88b <_Thread_queue_Enqueue_priority+0x133> 10c86c: 83 c2 3c add $0x3c,%edx equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10c86f: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c872: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c874: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c877: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c879: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c87c: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c87f: 56 push %esi 10c880: 9d popf 10c881: eb e2 jmp 10c865 <_Thread_queue_Enqueue_priority+0x10d> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 10c883: 8b 45 10 mov 0x10(%ebp),%eax 10c886: 89 30 mov %esi,(%eax) return the_thread_queue->sync_state; 10c888: 8b 41 30 mov 0x30(%ecx),%eax } 10c88b: 83 c4 10 add $0x10,%esp 10c88e: 5b pop %ebx 10c88f: 5e pop %esi 10c890: 5f pop %edi 10c891: c9 leave 10c892: c3 ret =============================================================================== 0010c934 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10c934: 55 push %ebp 10c935: 89 e5 mov %esp,%ebp 10c937: 57 push %edi 10c938: 56 push %esi 10c939: 53 push %ebx 10c93a: 83 ec 1c sub $0x1c,%esp 10c93d: 8b 75 08 mov 0x8(%ebp),%esi 10c940: 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 ) 10c943: 85 f6 test %esi,%esi 10c945: 74 36 je 10c97d <_Thread_queue_Requeue+0x49><== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10c947: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c94b: 75 30 jne 10c97d <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10c94d: 9c pushf 10c94e: fa cli 10c94f: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10c950: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10c957: 74 22 je 10c97b <_Thread_queue_Requeue+0x47><== NEVER TAKEN 10c959: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10c960: 50 push %eax 10c961: 6a 01 push $0x1 10c963: 57 push %edi 10c964: 56 push %esi 10c965: e8 1a 34 00 00 call 10fd84 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10c96a: 83 c4 0c add $0xc,%esp 10c96d: 8d 45 e4 lea -0x1c(%ebp),%eax 10c970: 50 push %eax 10c971: 57 push %edi 10c972: 56 push %esi 10c973: e8 e0 fd ff ff call 10c758 <_Thread_queue_Enqueue_priority> 10c978: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c97b: 53 push %ebx 10c97c: 9d popf } } 10c97d: 8d 65 f4 lea -0xc(%ebp),%esp 10c980: 5b pop %ebx 10c981: 5e pop %esi 10c982: 5f pop %edi 10c983: c9 leave 10c984: c3 ret =============================================================================== 0010c988 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c988: 55 push %ebp 10c989: 89 e5 mov %esp,%ebp 10c98b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c98e: 8d 45 f4 lea -0xc(%ebp),%eax 10c991: 50 push %eax 10c992: ff 75 08 pushl 0x8(%ebp) 10c995: e8 ca f8 ff ff call 10c264 <_Thread_Get> switch ( location ) { 10c99a: 83 c4 10 add $0x10,%esp 10c99d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c9a1: 75 17 jne 10c9ba <_Thread_queue_Timeout+0x32><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10c9a3: 83 ec 0c sub $0xc,%esp 10c9a6: 50 push %eax 10c9a7: e8 90 34 00 00 call 10fe3c <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c9ac: a1 50 56 12 00 mov 0x125650,%eax 10c9b1: 48 dec %eax 10c9b2: a3 50 56 12 00 mov %eax,0x125650 10c9b7: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c9ba: c9 leave 10c9bb: c3 ret =============================================================================== 00117248 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 117248: 55 push %ebp 117249: 89 e5 mov %esp,%ebp 11724b: 57 push %edi 11724c: 56 push %esi 11724d: 53 push %ebx 11724e: 83 ec 4c sub $0x4c,%esp 117251: 8b 5d 08 mov 0x8(%ebp),%ebx 117254: 8d 45 dc lea -0x24(%ebp),%eax 117257: 8d 55 e0 lea -0x20(%ebp),%edx 11725a: 89 55 b4 mov %edx,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11725d: 89 55 dc mov %edx,-0x24(%ebp) the_chain->permanent_null = NULL; 117260: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 117267: 89 45 e4 mov %eax,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11726a: 8d 75 d0 lea -0x30(%ebp),%esi 11726d: 8d 55 d4 lea -0x2c(%ebp),%edx 117270: 89 55 b0 mov %edx,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 117273: 89 55 d0 mov %edx,-0x30(%ebp) the_chain->permanent_null = NULL; 117276: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 11727d: 89 75 d8 mov %esi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 117280: 8d 53 30 lea 0x30(%ebx),%edx 117283: 89 55 c0 mov %edx,-0x40(%ebp) /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 117286: 8d 7b 68 lea 0x68(%ebx),%edi static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 117289: 8d 4b 08 lea 0x8(%ebx),%ecx 11728c: 89 4d b8 mov %ecx,-0x48(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 11728f: 8d 53 40 lea 0x40(%ebx),%edx 117292: 89 55 bc mov %edx,-0x44(%ebp) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 117295: 8d 4d dc lea -0x24(%ebp),%ecx 117298: 89 4b 78 mov %ecx,0x78(%ebx) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 11729b: a1 b0 e6 13 00 mov 0x13e6b0,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 1172a0: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 1172a3: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1172a6: 51 push %ecx 1172a7: 8d 4d d0 lea -0x30(%ebp),%ecx 1172aa: 51 push %ecx 1172ab: 29 d0 sub %edx,%eax 1172ad: 50 push %eax 1172ae: ff 75 c0 pushl -0x40(%ebp) 1172b1: e8 6e 35 00 00 call 11a824 <_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(); 1172b6: a1 f4 e5 13 00 mov 0x13e5f4,%eax 1172bb: 89 45 c4 mov %eax,-0x3c(%ebp) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 1172be: 8b 43 74 mov 0x74(%ebx),%eax /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 1172c1: 83 c4 10 add $0x10,%esp 1172c4: 39 45 c4 cmp %eax,-0x3c(%ebp) 1172c7: 76 13 jbe 1172dc <_Timer_server_Body+0x94> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1172c9: 52 push %edx 1172ca: 8d 55 d0 lea -0x30(%ebp),%edx 1172cd: 52 push %edx 1172ce: 8b 4d c4 mov -0x3c(%ebp),%ecx 1172d1: 29 c1 sub %eax,%ecx 1172d3: 51 push %ecx 1172d4: 57 push %edi 1172d5: e8 4a 35 00 00 call 11a824 <_Watchdog_Adjust_to_chain> 1172da: eb 0f jmp 1172eb <_Timer_server_Body+0xa3> } else if ( snapshot < last_snapshot ) { 1172dc: 73 10 jae 1172ee <_Timer_server_Body+0xa6> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 1172de: 51 push %ecx 1172df: 2b 45 c4 sub -0x3c(%ebp),%eax 1172e2: 50 push %eax 1172e3: 6a 01 push $0x1 1172e5: 57 push %edi 1172e6: e8 cd 34 00 00 call 11a7b8 <_Watchdog_Adjust> 1172eb: 83 c4 10 add $0x10,%esp } watchdogs->last_snapshot = snapshot; 1172ee: 8b 45 c4 mov -0x3c(%ebp),%eax 1172f1: 89 43 74 mov %eax,0x74(%ebx) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 1172f4: 8b 43 78 mov 0x78(%ebx),%eax 1172f7: 83 ec 0c sub $0xc,%esp 1172fa: 50 push %eax 1172fb: e8 04 07 00 00 call 117a04 <_Chain_Get> if ( timer == NULL ) { 117300: 83 c4 10 add $0x10,%esp 117303: 85 c0 test %eax,%eax 117305: 74 29 je 117330 <_Timer_server_Body+0xe8><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 117307: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 11730a: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 11730d: 75 0b jne 11731a <_Timer_server_Body+0xd2><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11730f: 52 push %edx <== NOT EXECUTED 117310: 52 push %edx <== NOT EXECUTED 117311: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 117314: 50 push %eax <== NOT EXECUTED 117315: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED 117318: eb 0c jmp 117326 <_Timer_server_Body+0xde><== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 11731a: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 11731d: 75 d5 jne 1172f4 <_Timer_server_Body+0xac><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 11731f: 51 push %ecx <== NOT EXECUTED 117320: 51 push %ecx <== NOT EXECUTED 117321: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 117324: 50 push %eax <== NOT EXECUTED 117325: 57 push %edi <== NOT EXECUTED 117326: e8 81 35 00 00 call 11a8ac <_Watchdog_Insert> <== NOT EXECUTED 11732b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11732e: eb c4 jmp 1172f4 <_Timer_server_Body+0xac><== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 117330: 9c pushf 117331: fa cli 117332: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 117333: 8b 55 b4 mov -0x4c(%ebp),%edx 117336: 39 55 dc cmp %edx,-0x24(%ebp) 117339: 75 13 jne 11734e <_Timer_server_Body+0x106><== NEVER TAKEN ts->insert_chain = NULL; 11733b: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 117342: 50 push %eax 117343: 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 ) ) { 117344: 8b 4d b0 mov -0x50(%ebp),%ecx 117347: 39 4d d0 cmp %ecx,-0x30(%ebp) 11734a: 75 09 jne 117355 <_Timer_server_Body+0x10d> 11734c: eb 3e jmp 11738c <_Timer_server_Body+0x144> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 11734e: 50 push %eax <== NOT EXECUTED 11734f: 9d popf <== NOT EXECUTED 117350: e9 46 ff ff ff jmp 11729b <_Timer_server_Body+0x53><== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 117355: 9c pushf 117356: fa cli 117357: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 117358: 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)) 11735b: 3b 45 b0 cmp -0x50(%ebp),%eax 11735e: 74 25 je 117385 <_Timer_server_Body+0x13d> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 117360: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 117362: 89 4d d0 mov %ecx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 117365: 89 71 04 mov %esi,0x4(%ecx) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 117368: 85 c0 test %eax,%eax 11736a: 74 19 je 117385 <_Timer_server_Body+0x13d><== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 11736c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 117373: 52 push %edx 117374: 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 ); 117375: 52 push %edx 117376: 52 push %edx 117377: ff 70 24 pushl 0x24(%eax) 11737a: ff 70 20 pushl 0x20(%eax) 11737d: ff 50 1c call *0x1c(%eax) } 117380: 83 c4 10 add $0x10,%esp 117383: eb d0 jmp 117355 <_Timer_server_Body+0x10d> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 117385: 52 push %edx 117386: 9d popf 117387: e9 09 ff ff ff jmp 117295 <_Timer_server_Body+0x4d> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 11738c: c6 43 7c 00 movb $0x0,0x7c(%ebx) 117390: a1 64 e5 13 00 mov 0x13e564,%eax 117395: 40 inc %eax 117396: a3 64 e5 13 00 mov %eax,0x13e564 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 11739b: 50 push %eax 11739c: 50 push %eax 11739d: 6a 08 push $0x8 11739f: ff 33 pushl (%ebx) 1173a1: e8 22 2d 00 00 call 11a0c8 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 1173a6: 89 d8 mov %ebx,%eax 1173a8: e8 0f fe ff ff call 1171bc <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 1173ad: 89 d8 mov %ebx,%eax 1173af: e8 4e fe ff ff call 117202 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 1173b4: e8 f4 23 00 00 call 1197ad <_Thread_Enable_dispatch> ts->active = true; 1173b9: 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 ); 1173bd: 59 pop %ecx 1173be: ff 75 b8 pushl -0x48(%ebp) 1173c1: e8 fe 35 00 00 call 11a9c4 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1173c6: 5a pop %edx 1173c7: ff 75 bc pushl -0x44(%ebp) 1173ca: e8 f5 35 00 00 call 11a9c4 <_Watchdog_Remove> 1173cf: 83 c4 10 add $0x10,%esp 1173d2: e9 be fe ff ff jmp 117295 <_Timer_server_Body+0x4d> =============================================================================== 001173d7 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1173d7: 55 push %ebp 1173d8: 89 e5 mov %esp,%ebp 1173da: 57 push %edi 1173db: 56 push %esi 1173dc: 53 push %ebx 1173dd: 83 ec 2c sub $0x2c,%esp 1173e0: 8b 5d 08 mov 0x8(%ebp),%ebx 1173e3: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 1173e6: 8b 53 78 mov 0x78(%ebx),%edx 1173e9: 85 d2 test %edx,%edx 1173eb: 0f 85 e6 00 00 00 jne 1174d7 <_Timer_server_Schedule_operation_method+0x100><== NEVER TAKEN 1173f1: 8b 15 64 e5 13 00 mov 0x13e564,%edx 1173f7: 42 inc %edx 1173f8: 89 15 64 e5 13 00 mov %edx,0x13e564 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1173fe: 8b 50 38 mov 0x38(%eax),%edx 117401: 83 fa 01 cmp $0x1,%edx 117404: 75 5a jne 117460 <_Timer_server_Schedule_operation_method+0x89> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 117406: 9c pushf 117407: fa cli 117408: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 11740b: 8b 0d b0 e6 13 00 mov 0x13e6b0,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 117411: 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)); 117414: 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; 117417: 8d 7b 34 lea 0x34(%ebx),%edi 11741a: 39 fa cmp %edi,%edx 11741c: 74 19 je 117437 <_Timer_server_Schedule_operation_method+0x60> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 11741e: 89 cf mov %ecx,%edi 117420: 29 f7 sub %esi,%edi 117422: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 117425: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 117428: 31 f6 xor %esi,%esi 11742a: 3b 7d e4 cmp -0x1c(%ebp),%edi 11742d: 76 05 jbe 117434 <_Timer_server_Schedule_operation_method+0x5d> delta_interval -= delta; 11742f: 89 fe mov %edi,%esi 117431: 2b 75 e4 sub -0x1c(%ebp),%esi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 117434: 89 72 10 mov %esi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 117437: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 11743a: ff 75 e0 pushl -0x20(%ebp) 11743d: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11743e: 57 push %edi 11743f: 57 push %edi 117440: 83 c0 10 add $0x10,%eax 117443: 50 push %eax 117444: 8d 43 30 lea 0x30(%ebx),%eax 117447: 50 push %eax 117448: e8 5f 34 00 00 call 11a8ac <_Watchdog_Insert> if ( !ts->active ) { 11744d: 8a 43 7c mov 0x7c(%ebx),%al 117450: 83 c4 10 add $0x10,%esp 117453: 84 c0 test %al,%al 117455: 75 74 jne 1174cb <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_interval_system_watchdog( ts ); 117457: 89 d8 mov %ebx,%eax 117459: e8 5e fd ff ff call 1171bc <_Timer_server_Reset_interval_system_watchdog> 11745e: eb 6b jmp 1174cb <_Timer_server_Schedule_operation_method+0xf4> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 117460: 83 fa 03 cmp $0x3,%edx 117463: 75 66 jne 1174cb <_Timer_server_Schedule_operation_method+0xf4> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 117465: 9c pushf 117466: fa cli 117467: 8f 45 e0 popl -0x20(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 11746a: 8b 0d f4 e5 13 00 mov 0x13e5f4,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 117470: 8b 53 74 mov 0x74(%ebx),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 117473: 8b 73 68 mov 0x68(%ebx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 117476: 8d 7b 6c lea 0x6c(%ebx),%edi 117479: 39 fe cmp %edi,%esi 11747b: 74 27 je 1174a4 <_Timer_server_Schedule_operation_method+0xcd> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 11747d: 8b 7e 10 mov 0x10(%esi),%edi 117480: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 117483: 39 d1 cmp %edx,%ecx 117485: 76 15 jbe 11749c <_Timer_server_Schedule_operation_method+0xc5> /* * We advanced in time. */ delta = snapshot - last_snapshot; 117487: 89 cf mov %ecx,%edi 117489: 29 d7 sub %edx,%edi 11748b: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { 11748e: 31 d2 xor %edx,%edx 117490: 39 7d d4 cmp %edi,-0x2c(%ebp) 117493: 76 0c jbe 1174a1 <_Timer_server_Schedule_operation_method+0xca><== NEVER TAKEN delta_interval -= delta; 117495: 8b 55 d4 mov -0x2c(%ebp),%edx 117498: 29 fa sub %edi,%edx 11749a: eb 05 jmp 1174a1 <_Timer_server_Schedule_operation_method+0xca> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 11749c: 03 55 d4 add -0x2c(%ebp),%edx delta_interval += delta; 11749f: 29 ca sub %ecx,%edx } first_watchdog->delta_interval = delta_interval; 1174a1: 89 56 10 mov %edx,0x10(%esi) } ts->TOD_watchdogs.last_snapshot = snapshot; 1174a4: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 1174a7: ff 75 e0 pushl -0x20(%ebp) 1174aa: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1174ab: 56 push %esi 1174ac: 56 push %esi 1174ad: 83 c0 10 add $0x10,%eax 1174b0: 50 push %eax 1174b1: 8d 43 68 lea 0x68(%ebx),%eax 1174b4: 50 push %eax 1174b5: e8 f2 33 00 00 call 11a8ac <_Watchdog_Insert> if ( !ts->active ) { 1174ba: 8a 43 7c mov 0x7c(%ebx),%al 1174bd: 83 c4 10 add $0x10,%esp 1174c0: 84 c0 test %al,%al 1174c2: 75 07 jne 1174cb <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_tod_system_watchdog( ts ); 1174c4: 89 d8 mov %ebx,%eax 1174c6: e8 37 fd ff ff call 117202 <_Timer_server_Reset_tod_system_watchdog> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 1174cb: 8d 65 f4 lea -0xc(%ebp),%esp 1174ce: 5b pop %ebx 1174cf: 5e pop %esi 1174d0: 5f pop %edi 1174d1: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1174d2: e9 d6 22 00 00 jmp 1197ad <_Thread_Enable_dispatch> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 1174d7: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 1174da: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1174dd: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1174e0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1174e3: 5b pop %ebx <== NOT EXECUTED 1174e4: 5e pop %esi <== NOT EXECUTED 1174e5: 5f pop %edi <== NOT EXECUTED 1174e6: 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 ); 1174e7: e9 dc 04 00 00 jmp 1179c8 <_Chain_Append> <== NOT EXECUTED =============================================================================== 0010ce75 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10ce75: 55 push %ebp 10ce76: 89 e5 mov %esp,%ebp 10ce78: 56 push %esi 10ce79: 53 push %ebx 10ce7a: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10ce7d: 8b 1d 68 58 12 00 mov 0x125868,%ebx 10ce83: eb 13 jmp 10ce98 <_User_extensions_Thread_exitted+0x23> !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 10ce85: 8b 43 2c mov 0x2c(%ebx),%eax 10ce88: 85 c0 test %eax,%eax 10ce8a: 74 09 je 10ce95 <_User_extensions_Thread_exitted+0x20> (*the_extension->Callouts.thread_exitted)( executing ); 10ce8c: 83 ec 0c sub $0xc,%esp 10ce8f: 56 push %esi 10ce90: ff d0 call *%eax 10ce92: 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 ) { 10ce95: 8b 5b 04 mov 0x4(%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10ce98: 81 fb 60 58 12 00 cmp $0x125860,%ebx 10ce9e: 75 e5 jne 10ce85 <_User_extensions_Thread_exitted+0x10> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10cea0: 8d 65 f8 lea -0x8(%ebp),%esp 10cea3: 5b pop %ebx 10cea4: 5e pop %esi 10cea5: c9 leave 10cea6: c3 ret =============================================================================== 0010e7a8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e7a8: 55 push %ebp 10e7a9: 89 e5 mov %esp,%ebp 10e7ab: 57 push %edi 10e7ac: 56 push %esi 10e7ad: 53 push %ebx 10e7ae: 83 ec 1c sub $0x1c,%esp 10e7b1: 8b 75 08 mov 0x8(%ebp),%esi 10e7b4: 8b 7d 0c mov 0xc(%ebp),%edi 10e7b7: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e7ba: 9c pushf 10e7bb: fa cli 10e7bc: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e7bd: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e7bf: 8d 4e 04 lea 0x4(%esi),%ecx * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10e7c2: 39 ca cmp %ecx,%edx 10e7c4: 74 44 je 10e80a <_Watchdog_Adjust+0x62> switch ( direction ) { 10e7c6: 85 ff test %edi,%edi 10e7c8: 74 3c je 10e806 <_Watchdog_Adjust+0x5e> 10e7ca: 4f dec %edi 10e7cb: 75 3d jne 10e80a <_Watchdog_Adjust+0x62> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e7cd: 01 5a 10 add %ebx,0x10(%edx) break; 10e7d0: eb 38 jmp 10e80a <_Watchdog_Adjust+0x62> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e7d2: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e7d4: 8b 7a 10 mov 0x10(%edx),%edi 10e7d7: 39 fb cmp %edi,%ebx 10e7d9: 73 07 jae 10e7e2 <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e7db: 29 df sub %ebx,%edi 10e7dd: 89 7a 10 mov %edi,0x10(%edx) break; 10e7e0: eb 28 jmp 10e80a <_Watchdog_Adjust+0x62> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e7e2: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e7e9: 50 push %eax 10e7ea: 9d popf _Watchdog_Tickle( header ); 10e7eb: 83 ec 0c sub $0xc,%esp 10e7ee: 56 push %esi 10e7ef: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e7f2: e8 9d 01 00 00 call 10e994 <_Watchdog_Tickle> _ISR_Disable( level ); 10e7f7: 9c pushf 10e7f8: fa cli 10e7f9: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e7fa: 83 c4 10 add $0x10,%esp 10e7fd: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e800: 39 0e cmp %ecx,(%esi) 10e802: 74 06 je 10e80a <_Watchdog_Adjust+0x62> while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 10e804: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e806: 85 db test %ebx,%ebx 10e808: 75 c8 jne 10e7d2 <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10e80a: 50 push %eax 10e80b: 9d popf } 10e80c: 8d 65 f4 lea -0xc(%ebp),%esp 10e80f: 5b pop %ebx 10e810: 5e pop %esi 10e811: 5f pop %edi 10e812: c9 leave 10e813: c3 ret =============================================================================== 0010d0dc <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10d0dc: 55 push %ebp 10d0dd: 89 e5 mov %esp,%ebp 10d0df: 56 push %esi 10d0e0: 53 push %ebx 10d0e1: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10d0e4: 9c pushf 10d0e5: fa cli 10d0e6: 5e pop %esi previous_state = the_watchdog->state; 10d0e7: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10d0ea: 83 f8 01 cmp $0x1,%eax 10d0ed: 74 09 je 10d0f8 <_Watchdog_Remove+0x1c> 10d0ef: 72 44 jb 10d135 <_Watchdog_Remove+0x59> 10d0f1: 83 f8 03 cmp $0x3,%eax 10d0f4: 77 3f ja 10d135 <_Watchdog_Remove+0x59> <== NEVER TAKEN 10d0f6: eb 09 jmp 10d101 <_Watchdog_Remove+0x25> /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 10d0f8: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10d0ff: eb 34 jmp 10d135 <_Watchdog_Remove+0x59> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10d101: 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 ); 10d108: 8b 0a mov (%edx),%ecx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10d10a: 83 39 00 cmpl $0x0,(%ecx) 10d10d: 74 06 je 10d115 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10d10f: 8b 5a 10 mov 0x10(%edx),%ebx 10d112: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10d115: 8b 0d 98 57 12 00 mov 0x125798,%ecx 10d11b: 85 c9 test %ecx,%ecx 10d11d: 74 0c je 10d12b <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10d11f: 8b 0d e8 56 12 00 mov 0x1256e8,%ecx 10d125: 89 0d 08 57 12 00 mov %ecx,0x125708 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10d12b: 8b 1a mov (%edx),%ebx previous = the_node->previous; 10d12d: 8b 4a 04 mov 0x4(%edx),%ecx next->previous = previous; 10d130: 89 4b 04 mov %ecx,0x4(%ebx) previous->next = next; 10d133: 89 19 mov %ebx,(%ecx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10d135: 8b 0d 9c 57 12 00 mov 0x12579c,%ecx 10d13b: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10d13e: 56 push %esi 10d13f: 9d popf return( previous_state ); } 10d140: 5b pop %ebx 10d141: 5e pop %esi 10d142: c9 leave 10d143: c3 ret =============================================================================== 0010e324 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10e324: 55 push %ebp 10e325: 89 e5 mov %esp,%ebp 10e327: 57 push %edi 10e328: 56 push %esi 10e329: 53 push %ebx 10e32a: 83 ec 20 sub $0x20,%esp 10e32d: 8b 7d 08 mov 0x8(%ebp),%edi 10e330: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10e333: 9c pushf 10e334: fa cli 10e335: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10e338: 56 push %esi 10e339: 57 push %edi 10e33a: 68 88 14 12 00 push $0x121488 10e33f: e8 54 ab ff ff call 108e98 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e344: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e346: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10e349: 83 c4 10 add $0x10,%esp 10e34c: 39 f3 cmp %esi,%ebx 10e34e: 74 1d je 10e36d <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10e350: 52 push %edx 10e351: 52 push %edx 10e352: 53 push %ebx 10e353: 6a 00 push $0x0 10e355: e8 32 00 00 00 call 10e38c <_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 ) 10e35a: 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 ; 10e35c: 83 c4 10 add $0x10,%esp 10e35f: 39 f3 cmp %esi,%ebx 10e361: 75 ed jne 10e350 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10e363: 50 push %eax 10e364: 50 push %eax 10e365: 57 push %edi 10e366: 68 9f 14 12 00 push $0x12149f 10e36b: eb 08 jmp 10e375 <_Watchdog_Report_chain+0x51> } else { printk( "Chain is empty\n" ); 10e36d: 83 ec 0c sub $0xc,%esp 10e370: 68 ae 14 12 00 push $0x1214ae 10e375: e8 1e ab ff ff call 108e98 10e37a: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10e37d: ff 75 e4 pushl -0x1c(%ebp) 10e380: 9d popf } 10e381: 8d 65 f4 lea -0xc(%ebp),%esp 10e384: 5b pop %ebx 10e385: 5e pop %esi 10e386: 5f pop %edi 10e387: c9 leave 10e388: c3 ret =============================================================================== 0010d144 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10d144: 55 push %ebp 10d145: 89 e5 mov %esp,%ebp 10d147: 57 push %edi 10d148: 56 push %esi 10d149: 53 push %ebx 10d14a: 83 ec 1c sub $0x1c,%esp 10d14d: 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 ); 10d150: 9c pushf 10d151: fa cli 10d152: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10d153: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d155: 8d 47 04 lea 0x4(%edi),%eax 10d158: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10d15b: 39 c3 cmp %eax,%ebx 10d15d: 74 40 je 10d19f <_Watchdog_Tickle+0x5b> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 10d15f: 8b 43 10 mov 0x10(%ebx),%eax 10d162: 85 c0 test %eax,%eax 10d164: 74 08 je 10d16e <_Watchdog_Tickle+0x2a> the_watchdog->delta_interval--; 10d166: 48 dec %eax 10d167: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10d16a: 85 c0 test %eax,%eax 10d16c: 75 31 jne 10d19f <_Watchdog_Tickle+0x5b> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10d16e: 83 ec 0c sub $0xc,%esp 10d171: 53 push %ebx 10d172: e8 65 ff ff ff call 10d0dc <_Watchdog_Remove> _ISR_Enable( level ); 10d177: 56 push %esi 10d178: 9d popf switch( watchdog_state ) { 10d179: 83 c4 10 add $0x10,%esp 10d17c: 83 f8 02 cmp $0x2,%eax 10d17f: 75 0e jne 10d18f <_Watchdog_Tickle+0x4b> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10d181: 50 push %eax 10d182: 50 push %eax 10d183: ff 73 24 pushl 0x24(%ebx) 10d186: ff 73 20 pushl 0x20(%ebx) 10d189: ff 53 1c call *0x1c(%ebx) 10d18c: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10d18f: 9c pushf 10d190: fa cli 10d191: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10d192: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10d194: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10d197: 74 06 je 10d19f <_Watchdog_Tickle+0x5b> 10d199: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10d19d: eb cd jmp 10d16c <_Watchdog_Tickle+0x28> leave: _ISR_Enable(level); 10d19f: 56 push %esi 10d1a0: 9d popf } 10d1a1: 8d 65 f4 lea -0xc(%ebp),%esp 10d1a4: 5b pop %ebx 10d1a5: 5e pop %esi 10d1a6: 5f pop %edi 10d1a7: c9 leave 10d1a8: c3 ret =============================================================================== 00121c6e <__kill>: #endif int __kill( pid_t pid, int sig ) { 121c6e: 55 push %ebp <== NOT EXECUTED 121c6f: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 121c71: 31 c0 xor %eax,%eax <== NOT EXECUTED 121c73: c9 leave <== NOT EXECUTED 121c74: c3 ret <== NOT EXECUTED =============================================================================== 0011d12c <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 11d12c: 55 push %ebp 11d12d: 89 e5 mov %esp,%ebp 11d12f: 83 ec 08 sub $0x8,%esp 11d132: e8 76 06 00 00 call 11d7ad <_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(); 11d137: e8 8c ff ff ff call 11d0c8 rtems_shutdown_executive(status); 11d13c: 83 ec 0c sub $0xc,%esp 11d13f: ff 75 08 pushl 0x8(%ebp) 11d142: e8 e9 00 00 00 call 11d230 11d147: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11d14a: eb fe jmp 11d14a <_exit+0x1e> <== NOT EXECUTED =============================================================================== 0010803a <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 10803a: 55 push %ebp <== NOT EXECUTED 10803b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10803d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108040: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 108043: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED return fcntl( fd, cmd, arg ); 108046: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 108049: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED 10804c: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10804f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 108052: c9 leave <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 108053: e9 98 fe ff ff jmp 107ef0 <== NOT EXECUTED =============================================================================== 00121c42 <_getpid_r>: #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 121c42: 55 push %ebp <== NOT EXECUTED 121c43: 89 e5 mov %esp,%ebp <== NOT EXECUTED return getpid(); } 121c45: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 121c4a: c9 leave <== NOT EXECUTED 121c4b: c3 ret <== NOT EXECUTED =============================================================================== 00107763 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 107763: 55 push %ebp <== NOT EXECUTED 107764: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107766: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 107769: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10776a: e9 a5 ff ff ff jmp 107714 <== NOT EXECUTED =============================================================================== 00121c67 <_kill_r>: #if defined(RTEMS_NEWLIB) #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 121c67: 55 push %ebp <== NOT EXECUTED 121c68: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 121c6a: 31 c0 xor %eax,%eax <== NOT EXECUTED 121c6c: c9 leave <== NOT EXECUTED 121c6d: c3 ret <== NOT EXECUTED =============================================================================== 001088bf <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 1088bf: 55 push %ebp <== NOT EXECUTED 1088c0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1088c2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1088c5: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return link( existing, new ); 1088c8: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 1088cb: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 1088ce: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 1088d1: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 1088d2: e9 61 fe ff ff jmp 108738 <== NOT EXECUTED =============================================================================== 0011d1f8 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 11d1f8: 55 push %ebp <== NOT EXECUTED 11d1f9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11d1fb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11d1fe: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return realloc( ptr, size ); 11d201: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 11d204: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 11d207: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 11d20a: c9 leave <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 11d20b: e9 48 00 00 00 jmp 11d258 <== NOT EXECUTED =============================================================================== 0010ad48 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 10ad48: 55 push %ebp 10ad49: 89 e5 mov %esp,%ebp 10ad4b: 57 push %edi 10ad4c: 56 push %esi 10ad4d: 53 push %ebx 10ad4e: 83 ec 78 sub $0x78,%esp /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 10ad51: ff 75 0c pushl 0xc(%ebp) 10ad54: e8 93 eb ff ff call 1098ec 10ad59: 89 45 94 mov %eax,-0x6c(%ebp) if ( old_parent_pathlen == 0 ) 10ad5c: 83 c4 10 add $0x10,%esp 10ad5f: 85 c0 test %eax,%eax 10ad61: 8d 45 b8 lea -0x48(%ebp),%eax 10ad64: 75 15 jne 10ad7b <_rename_r+0x33> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 10ad66: 52 push %edx 10ad67: 50 push %eax 10ad68: 8d 45 e4 lea -0x1c(%ebp),%eax 10ad6b: 50 push %eax 10ad6c: ff 75 0c pushl 0xc(%ebp) 10ad6f: e8 0c 05 00 00 call 10b280 10ad74: 31 db xor %ebx,%ebx 10ad76: 83 c4 10 add $0x10,%esp 10ad79: eb 20 jmp 10ad9b <_rename_r+0x53> else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 10ad7b: 83 ec 0c sub $0xc,%esp 10ad7e: 6a 00 push $0x0 10ad80: 50 push %eax 10ad81: 6a 02 push $0x2 10ad83: ff 75 94 pushl -0x6c(%ebp) 10ad86: ff 75 0c pushl 0xc(%ebp) 10ad89: e8 5b ec ff ff call 1099e9 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 10ad8e: 83 c4 20 add $0x20,%esp 10ad91: 85 c0 test %eax,%eax 10ad93: 0f 85 3d 02 00 00 jne 10afd6 <_rename_r+0x28e> <== NEVER TAKEN 10ad99: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 10ad9b: 8d 7d cc lea -0x34(%ebp),%edi 10ad9e: 8d 75 b8 lea -0x48(%ebp),%esi 10ada1: b9 05 00 00 00 mov $0x5,%ecx 10ada6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = old + old_parent_pathlen; 10ada8: 8b 75 0c mov 0xc(%ebp),%esi 10adab: 03 75 94 add -0x6c(%ebp),%esi 10adae: 89 75 e0 mov %esi,-0x20(%ebp) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10adb1: 83 c9 ff or $0xffffffff,%ecx 10adb4: 89 f7 mov %esi,%edi 10adb6: 31 c0 xor %eax,%eax 10adb8: f2 ae repnz scas %es:(%edi),%al 10adba: f7 d1 not %ecx 10adbc: 49 dec %ecx 10adbd: 57 push %edi 10adbe: 57 push %edi 10adbf: 51 push %ecx 10adc0: 56 push %esi 10adc1: e8 ea ea ff ff call 1098b0 10adc6: 01 c6 add %eax,%esi 10adc8: 89 75 e0 mov %esi,-0x20(%ebp) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10adcb: 83 c9 ff or $0xffffffff,%ecx 10adce: 89 f7 mov %esi,%edi 10add0: 31 c0 xor %eax,%eax 10add2: f2 ae repnz scas %es:(%edi),%al 10add4: f7 d1 not %ecx 10add6: 49 dec %ecx 10add7: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10adde: 8d 7d cc lea -0x34(%ebp),%edi 10ade1: 57 push %edi 10ade2: 6a 00 push $0x0 10ade4: 51 push %ecx 10ade5: 56 push %esi 10ade6: e8 44 eb ff ff call 10992f 0, &old_loc, false ); if ( result != 0 ) { 10adeb: 83 c4 20 add $0x20,%esp 10adee: 85 c0 test %eax,%eax 10adf0: 74 29 je 10ae1b <_rename_r+0xd3> if ( free_old_parentloc ) 10adf2: 84 db test %bl,%bl 10adf4: 0f 84 dc 01 00 00 je 10afd6 <_rename_r+0x28e> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10adfa: 8b 45 c4 mov -0x3c(%ebp),%eax 10adfd: 85 c0 test %eax,%eax 10adff: 0f 84 d1 01 00 00 je 10afd6 <_rename_r+0x28e> <== NEVER TAKEN 10ae05: 8b 40 1c mov 0x1c(%eax),%eax 10ae08: 85 c0 test %eax,%eax 10ae0a: 0f 84 c6 01 00 00 je 10afd6 <_rename_r+0x28e> <== NEVER TAKEN 10ae10: 83 ec 0c sub $0xc,%esp 10ae13: 8d 55 b8 lea -0x48(%ebp),%edx 10ae16: e9 89 00 00 00 jmp 10aea4 <_rename_r+0x15c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 10ae1b: 51 push %ecx 10ae1c: 8d 75 a4 lea -0x5c(%ebp),%esi 10ae1f: 56 push %esi 10ae20: 8d 45 e4 lea -0x1c(%ebp),%eax 10ae23: 50 push %eax 10ae24: ff 75 10 pushl 0x10(%ebp) 10ae27: e8 54 04 00 00 call 10b280 if ( !new_parent_loc.ops->evalformake_h ) { 10ae2c: 8b 45 b0 mov -0x50(%ebp),%eax 10ae2f: 8b 40 04 mov 0x4(%eax),%eax 10ae32: 83 c4 10 add $0x10,%esp 10ae35: 85 c0 test %eax,%eax 10ae37: 0f 84 f3 00 00 00 je 10af30 <_rename_r+0x1e8> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 10ae3d: 52 push %edx 10ae3e: 8d 55 e0 lea -0x20(%ebp),%edx 10ae41: 52 push %edx 10ae42: 56 push %esi 10ae43: 8b 55 10 mov 0x10(%ebp),%edx 10ae46: 03 55 e4 add -0x1c(%ebp),%edx 10ae49: 52 push %edx 10ae4a: ff d0 call *%eax if ( result != 0 ) { 10ae4c: 83 c4 10 add $0x10,%esp 10ae4f: 85 c0 test %eax,%eax 10ae51: 74 5f je 10aeb2 <_rename_r+0x16a> rtems_filesystem_freenode( &new_parent_loc ); 10ae53: 8b 45 b0 mov -0x50(%ebp),%eax 10ae56: 85 c0 test %eax,%eax 10ae58: 74 10 je 10ae6a <_rename_r+0x122> <== NEVER TAKEN 10ae5a: 8b 40 1c mov 0x1c(%eax),%eax 10ae5d: 85 c0 test %eax,%eax 10ae5f: 74 09 je 10ae6a <_rename_r+0x122> <== NEVER TAKEN 10ae61: 83 ec 0c sub $0xc,%esp 10ae64: 56 push %esi 10ae65: ff d0 call *%eax 10ae67: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10ae6a: 84 db test %bl,%bl 10ae6c: 74 1a je 10ae88 <_rename_r+0x140> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10ae6e: 8b 45 c4 mov -0x3c(%ebp),%eax 10ae71: 85 c0 test %eax,%eax 10ae73: 74 13 je 10ae88 <_rename_r+0x140> <== NEVER TAKEN 10ae75: 8b 40 1c mov 0x1c(%eax),%eax 10ae78: 85 c0 test %eax,%eax 10ae7a: 74 0c je 10ae88 <_rename_r+0x140> <== NEVER TAKEN 10ae7c: 83 ec 0c sub $0xc,%esp 10ae7f: 8d 55 b8 lea -0x48(%ebp),%edx 10ae82: 52 push %edx 10ae83: ff d0 call *%eax 10ae85: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10ae88: 8b 45 d8 mov -0x28(%ebp),%eax 10ae8b: 85 c0 test %eax,%eax 10ae8d: 0f 84 43 01 00 00 je 10afd6 <_rename_r+0x28e> <== NEVER TAKEN 10ae93: 8b 40 1c mov 0x1c(%eax),%eax 10ae96: 85 c0 test %eax,%eax 10ae98: 0f 84 38 01 00 00 je 10afd6 <_rename_r+0x28e> <== NEVER TAKEN 10ae9e: 83 ec 0c sub $0xc,%esp 10aea1: 8d 55 cc lea -0x34(%ebp),%edx 10aea4: 52 push %edx 10aea5: ff d0 call *%eax 10aea7: 83 cf ff or $0xffffffff,%edi 10aeaa: 83 c4 10 add $0x10,%esp 10aead: e9 27 01 00 00 jmp 10afd9 <_rename_r+0x291> /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 10aeb2: 8b 45 c8 mov -0x38(%ebp),%eax 10aeb5: 3b 45 b4 cmp -0x4c(%ebp),%eax 10aeb8: 8b 45 b0 mov -0x50(%ebp),%eax 10aebb: 74 5c je 10af19 <_rename_r+0x1d1> rtems_filesystem_freenode( &new_parent_loc ); 10aebd: 85 c0 test %eax,%eax 10aebf: 74 10 je 10aed1 <_rename_r+0x189> <== NEVER TAKEN 10aec1: 8b 40 1c mov 0x1c(%eax),%eax 10aec4: 85 c0 test %eax,%eax 10aec6: 74 09 je 10aed1 <_rename_r+0x189> <== NEVER TAKEN 10aec8: 83 ec 0c sub $0xc,%esp 10aecb: 56 push %esi 10aecc: ff d0 call *%eax 10aece: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10aed1: 84 db test %bl,%bl 10aed3: 74 1a je 10aeef <_rename_r+0x1a7> rtems_filesystem_freenode( &old_parent_loc ); 10aed5: 8b 45 c4 mov -0x3c(%ebp),%eax 10aed8: 85 c0 test %eax,%eax 10aeda: 74 13 je 10aeef <_rename_r+0x1a7> <== NEVER TAKEN 10aedc: 8b 40 1c mov 0x1c(%eax),%eax 10aedf: 85 c0 test %eax,%eax 10aee1: 74 0c je 10aeef <_rename_r+0x1a7> <== NEVER TAKEN 10aee3: 83 ec 0c sub $0xc,%esp 10aee6: 8d 55 b8 lea -0x48(%ebp),%edx 10aee9: 52 push %edx 10aeea: ff d0 call *%eax 10aeec: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10aeef: 8b 45 d8 mov -0x28(%ebp),%eax 10aef2: 85 c0 test %eax,%eax 10aef4: 74 13 je 10af09 <_rename_r+0x1c1> <== NEVER TAKEN 10aef6: 8b 40 1c mov 0x1c(%eax),%eax 10aef9: 85 c0 test %eax,%eax 10aefb: 74 0c je 10af09 <_rename_r+0x1c1> <== NEVER TAKEN 10aefd: 83 ec 0c sub $0xc,%esp 10af00: 8d 55 cc lea -0x34(%ebp),%edx 10af03: 52 push %edx 10af04: ff d0 call *%eax 10af06: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 10af09: e8 6a 98 00 00 call 114778 <__errno> 10af0e: c7 00 12 00 00 00 movl $0x12,(%eax) 10af14: e9 bd 00 00 00 jmp 10afd6 <_rename_r+0x28e> } if ( !new_parent_loc.ops->rename_h ) { 10af19: 8b 50 40 mov 0x40(%eax),%edx 10af1c: 85 d2 test %edx,%edx 10af1e: 75 55 jne 10af75 <_rename_r+0x22d> rtems_filesystem_freenode( &new_parent_loc ); 10af20: 8b 40 1c mov 0x1c(%eax),%eax 10af23: 85 c0 test %eax,%eax 10af25: 74 09 je 10af30 <_rename_r+0x1e8> <== NEVER TAKEN 10af27: 83 ec 0c sub $0xc,%esp 10af2a: 56 push %esi 10af2b: ff d0 call *%eax 10af2d: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10af30: 84 db test %bl,%bl 10af32: 74 1a je 10af4e <_rename_r+0x206> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10af34: 8b 45 c4 mov -0x3c(%ebp),%eax 10af37: 85 c0 test %eax,%eax 10af39: 74 13 je 10af4e <_rename_r+0x206> <== NEVER TAKEN 10af3b: 8b 40 1c mov 0x1c(%eax),%eax 10af3e: 85 c0 test %eax,%eax 10af40: 74 0c je 10af4e <_rename_r+0x206> <== NEVER TAKEN 10af42: 83 ec 0c sub $0xc,%esp 10af45: 8d 55 b8 lea -0x48(%ebp),%edx 10af48: 52 push %edx 10af49: ff d0 call *%eax 10af4b: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10af4e: 8b 45 d8 mov -0x28(%ebp),%eax 10af51: 85 c0 test %eax,%eax 10af53: 74 13 je 10af68 <_rename_r+0x220> <== NEVER TAKEN 10af55: 8b 40 1c mov 0x1c(%eax),%eax 10af58: 85 c0 test %eax,%eax 10af5a: 74 0c je 10af68 <_rename_r+0x220> <== NEVER TAKEN 10af5c: 83 ec 0c sub $0xc,%esp 10af5f: 8d 55 cc lea -0x34(%ebp),%edx 10af62: 52 push %edx 10af63: ff d0 call *%eax 10af65: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTSUP ); 10af68: e8 0b 98 00 00 call 114778 <__errno> 10af6d: c7 00 86 00 00 00 movl $0x86,(%eax) 10af73: eb 61 jmp 10afd6 <_rename_r+0x28e> } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 10af75: ff 75 e0 pushl -0x20(%ebp) 10af78: 56 push %esi 10af79: 57 push %edi 10af7a: 8d 45 b8 lea -0x48(%ebp),%eax 10af7d: 50 push %eax 10af7e: ff d2 call *%edx 10af80: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &new_parent_loc ); 10af82: 8b 45 b0 mov -0x50(%ebp),%eax 10af85: 83 c4 10 add $0x10,%esp 10af88: 85 c0 test %eax,%eax 10af8a: 74 10 je 10af9c <_rename_r+0x254> <== NEVER TAKEN 10af8c: 8b 40 1c mov 0x1c(%eax),%eax 10af8f: 85 c0 test %eax,%eax 10af91: 74 09 je 10af9c <_rename_r+0x254> <== NEVER TAKEN 10af93: 83 ec 0c sub $0xc,%esp 10af96: 56 push %esi 10af97: ff d0 call *%eax 10af99: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10af9c: 84 db test %bl,%bl 10af9e: 74 1a je 10afba <_rename_r+0x272> rtems_filesystem_freenode( &old_parent_loc ); 10afa0: 8b 45 c4 mov -0x3c(%ebp),%eax 10afa3: 85 c0 test %eax,%eax 10afa5: 74 13 je 10afba <_rename_r+0x272> <== NEVER TAKEN 10afa7: 8b 40 1c mov 0x1c(%eax),%eax 10afaa: 85 c0 test %eax,%eax 10afac: 74 0c je 10afba <_rename_r+0x272> <== NEVER TAKEN 10afae: 83 ec 0c sub $0xc,%esp 10afb1: 8d 55 b8 lea -0x48(%ebp),%edx 10afb4: 52 push %edx 10afb5: ff d0 call *%eax 10afb7: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10afba: 8b 45 d8 mov -0x28(%ebp),%eax 10afbd: 85 c0 test %eax,%eax 10afbf: 74 18 je 10afd9 <_rename_r+0x291> <== NEVER TAKEN 10afc1: 8b 40 1c mov 0x1c(%eax),%eax 10afc4: 85 c0 test %eax,%eax 10afc6: 74 11 je 10afd9 <_rename_r+0x291> <== NEVER TAKEN 10afc8: 83 ec 0c sub $0xc,%esp 10afcb: 8d 55 cc lea -0x34(%ebp),%edx 10afce: 52 push %edx 10afcf: ff d0 call *%eax 10afd1: e9 d4 fe ff ff jmp 10aeaa <_rename_r+0x162> 10afd6: 83 cf ff or $0xffffffff,%edi return result; } 10afd9: 89 f8 mov %edi,%eax 10afdb: 8d 65 f4 lea -0xc(%ebp),%esp 10afde: 5b pop %ebx 10afdf: 5e pop %esi 10afe0: 5f pop %edi 10afe1: c9 leave 10afe2: c3 ret =============================================================================== 00109356 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 109356: 55 push %ebp <== NOT EXECUTED 109357: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109359: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10935c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 10935f: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 109362: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 109365: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 109368: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 109369: e9 3a ff ff ff jmp 1092a8 <== NOT EXECUTED =============================================================================== 00111547 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 111547: 55 push %ebp <== NOT EXECUTED 111548: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11154a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 11154d: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 111550: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 111553: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 111554: e9 27 fe ff ff jmp 111380 <== NOT EXECUTED =============================================================================== 001074bc : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 1074bc: 55 push %ebp 1074bd: 89 e5 mov %esp,%ebp 1074bf: 57 push %edi 1074c0: 53 push %ebx 1074c1: 8b 5d 0c mov 0xc(%ebp),%ebx 1074c4: ff 05 2c 55 12 00 incl 0x12552c length = nelem * elsize; 1074ca: 0f af 5d 08 imul 0x8(%ebp),%ebx cptr = malloc( length ); 1074ce: 83 ec 0c sub $0xc,%esp 1074d1: 53 push %ebx 1074d2: e8 65 04 00 00 call 10793c 1074d7: 89 c2 mov %eax,%edx if ( cptr ) 1074d9: 83 c4 10 add $0x10,%esp 1074dc: 85 c0 test %eax,%eax 1074de: 74 08 je 1074e8 <== NEVER TAKEN memset( cptr, '\0', length ); 1074e0: 31 c0 xor %eax,%eax 1074e2: 89 d7 mov %edx,%edi 1074e4: 89 d9 mov %ebx,%ecx 1074e6: f3 aa rep stos %al,%es:(%edi) MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 1074e8: ff 0d 1c 55 12 00 decl 0x12551c return cptr; } 1074ee: 89 d0 mov %edx,%eax 1074f0: 8d 65 f8 lea -0x8(%ebp),%esp 1074f3: 5b pop %ebx 1074f4: 5f pop %edi 1074f5: c9 leave 1074f6: c3 ret =============================================================================== 0010f50c : #include int chdir( const char *pathname ) { 10f50c: 55 push %ebp 10f50d: 89 e5 mov %esp,%ebp 10f50f: 57 push %edi 10f510: 56 push %esi 10f511: 83 ec 20 sub $0x20,%esp 10f514: 8b 55 08 mov 0x8(%ebp),%edx rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 10f517: 85 d2 test %edx,%edx 10f519: 75 0d jne 10f528 rtems_set_errno_and_return_minus_one( EFAULT ); 10f51b: e8 f8 2b 00 00 call 112118 <__errno> 10f520: c7 00 0e 00 00 00 movl $0xe,(%eax) 10f526: eb 53 jmp 10f57b /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 10f528: 31 c0 xor %eax,%eax 10f52a: 83 c9 ff or $0xffffffff,%ecx 10f52d: 89 d7 mov %edx,%edi 10f52f: f2 ae repnz scas %es:(%edi),%al 10f531: f7 d1 not %ecx 10f533: 49 dec %ecx 10f534: 83 ec 0c sub $0xc,%esp 10f537: 6a 01 push $0x1 10f539: 8d 75 e4 lea -0x1c(%ebp),%esi 10f53c: 56 push %esi 10f53d: 6a 01 push $0x1 10f53f: 51 push %ecx 10f540: 52 push %edx 10f541: e8 27 84 ff ff call 10796d 10f546: 89 c2 mov %eax,%edx pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 10f548: 83 c4 20 add $0x20,%esp 10f54b: 83 c8 ff or $0xffffffff,%eax 10f54e: 85 d2 test %edx,%edx 10f550: 0f 85 8f 00 00 00 jne 10f5e5 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 10f556: 8b 55 f0 mov -0x10(%ebp),%edx 10f559: 8b 42 10 mov 0x10(%edx),%eax 10f55c: 85 c0 test %eax,%eax 10f55e: 75 20 jne 10f580 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10f560: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10f563: 85 c0 test %eax,%eax <== NOT EXECUTED 10f565: 74 09 je 10f570 <== NOT EXECUTED 10f567: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f56a: 56 push %esi <== NOT EXECUTED 10f56b: ff d0 call *%eax <== NOT EXECUTED 10f56d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10f570: e8 a3 2b 00 00 call 112118 <__errno> <== NOT EXECUTED 10f575: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10f57b: 83 c8 ff or $0xffffffff,%eax 10f57e: eb 65 jmp 10f5e5 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 10f580: 83 ec 0c sub $0xc,%esp 10f583: 56 push %esi 10f584: ff d0 call *%eax 10f586: 83 c4 10 add $0x10,%esp 10f589: 48 dec %eax 10f58a: 74 24 je 10f5b0 rtems_filesystem_freenode( &loc ); 10f58c: 8b 45 f0 mov -0x10(%ebp),%eax 10f58f: 85 c0 test %eax,%eax 10f591: 74 10 je 10f5a3 <== NEVER TAKEN 10f593: 8b 40 1c mov 0x1c(%eax),%eax 10f596: 85 c0 test %eax,%eax 10f598: 74 09 je 10f5a3 <== NEVER TAKEN 10f59a: 83 ec 0c sub $0xc,%esp 10f59d: 56 push %esi 10f59e: ff d0 call *%eax 10f5a0: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 10f5a3: e8 70 2b 00 00 call 112118 <__errno> 10f5a8: c7 00 14 00 00 00 movl $0x14,(%eax) 10f5ae: eb cb jmp 10f57b } rtems_filesystem_freenode( &rtems_filesystem_current ); 10f5b0: 8b 15 40 2f 12 00 mov 0x122f40,%edx 10f5b6: 8b 42 10 mov 0x10(%edx),%eax 10f5b9: 85 c0 test %eax,%eax 10f5bb: 74 13 je 10f5d0 <== NEVER TAKEN 10f5bd: 8b 40 1c mov 0x1c(%eax),%eax 10f5c0: 85 c0 test %eax,%eax 10f5c2: 74 0c je 10f5d0 <== NEVER TAKEN 10f5c4: 83 ec 0c sub $0xc,%esp 10f5c7: 83 c2 04 add $0x4,%edx 10f5ca: 52 push %edx 10f5cb: ff d0 call *%eax 10f5cd: 83 c4 10 add $0x10,%esp rtems_filesystem_current = loc; 10f5d0: 8b 3d 40 2f 12 00 mov 0x122f40,%edi 10f5d6: 83 c7 04 add $0x4,%edi 10f5d9: 8d 75 e4 lea -0x1c(%ebp),%esi 10f5dc: b9 05 00 00 00 mov $0x5,%ecx 10f5e1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10f5e3: 31 c0 xor %eax,%eax return 0; } 10f5e5: 8d 65 f8 lea -0x8(%ebp),%esp 10f5e8: 5e pop %esi 10f5e9: 5f pop %edi 10f5ea: c9 leave 10f5eb: c3 ret =============================================================================== 00108df4 : int chmod( const char *path, mode_t mode ) { 108df4: 55 push %ebp 108df5: 89 e5 mov %esp,%ebp 108df7: 57 push %edi 108df8: 56 push %esi 108df9: 53 push %ebx 108dfa: 83 ec 38 sub $0x38,%esp 108dfd: 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 ); 108e00: 31 c0 xor %eax,%eax 108e02: 83 c9 ff or $0xffffffff,%ecx 108e05: 89 d7 mov %edx,%edi 108e07: f2 ae repnz scas %es:(%edi),%al 108e09: f7 d1 not %ecx 108e0b: 49 dec %ecx 108e0c: 6a 01 push $0x1 108e0e: 8d 5d d4 lea -0x2c(%ebp),%ebx 108e11: 53 push %ebx 108e12: 6a 00 push $0x0 108e14: 51 push %ecx 108e15: 52 push %edx 108e16: e8 66 02 00 00 call 109081 if ( status != 0 ) 108e1b: 83 c4 20 add $0x20,%esp 108e1e: 83 ce ff or $0xffffffff,%esi 108e21: 85 c0 test %eax,%eax 108e23: 75 7d jne 108ea2 return -1; if ( !loc.handlers ){ 108e25: 8b 45 dc mov -0x24(%ebp),%eax 108e28: 85 c0 test %eax,%eax 108e2a: 75 24 jne 108e50 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 108e2c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 108e2f: 85 c0 test %eax,%eax <== NOT EXECUTED 108e31: 74 10 je 108e43 <== NOT EXECUTED 108e33: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 108e36: 85 c0 test %eax,%eax <== NOT EXECUTED 108e38: 74 09 je 108e43 <== NOT EXECUTED 108e3a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e3d: 53 push %ebx <== NOT EXECUTED 108e3e: ff d0 call *%eax <== NOT EXECUTED 108e40: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 108e43: e8 e4 af 00 00 call 113e2c <__errno> <== NOT EXECUTED 108e48: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 108e4e: eb 29 jmp 108e79 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 108e50: 8b 40 1c mov 0x1c(%eax),%eax 108e53: 85 c0 test %eax,%eax 108e55: 75 27 jne 108e7e <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 108e57: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 108e5a: 85 c0 test %eax,%eax <== NOT EXECUTED 108e5c: 74 10 je 108e6e <== NOT EXECUTED 108e5e: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 108e61: 85 c0 test %eax,%eax <== NOT EXECUTED 108e63: 74 09 je 108e6e <== NOT EXECUTED 108e65: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e68: 53 push %ebx <== NOT EXECUTED 108e69: ff d0 call *%eax <== NOT EXECUTED 108e6b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 108e6e: e8 b9 af 00 00 call 113e2c <__errno> <== NOT EXECUTED 108e73: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108e79: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 108e7c: eb 24 jmp 108ea2 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 108e7e: 52 push %edx 108e7f: 52 push %edx 108e80: ff 75 0c pushl 0xc(%ebp) 108e83: 53 push %ebx 108e84: ff d0 call *%eax 108e86: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 108e88: 8b 45 e0 mov -0x20(%ebp),%eax 108e8b: 83 c4 10 add $0x10,%esp 108e8e: 85 c0 test %eax,%eax 108e90: 74 10 je 108ea2 <== NEVER TAKEN 108e92: 8b 40 1c mov 0x1c(%eax),%eax 108e95: 85 c0 test %eax,%eax 108e97: 74 09 je 108ea2 <== NEVER TAKEN 108e99: 83 ec 0c sub $0xc,%esp 108e9c: 53 push %ebx 108e9d: ff d0 call *%eax 108e9f: 83 c4 10 add $0x10,%esp return result; } 108ea2: 89 f0 mov %esi,%eax 108ea4: 8d 65 f4 lea -0xc(%ebp),%esp 108ea7: 5b pop %ebx 108ea8: 5e pop %esi 108ea9: 5f pop %edi 108eaa: c9 leave 108eab: c3 ret =============================================================================== 00108eac : int chown( const char *path, uid_t owner, gid_t group ) { 108eac: 55 push %ebp 108ead: 89 e5 mov %esp,%ebp 108eaf: 57 push %edi 108eb0: 56 push %esi 108eb1: 53 push %ebx 108eb2: 83 ec 48 sub $0x48,%esp 108eb5: 8b 55 08 mov 0x8(%ebp),%edx 108eb8: 8b 75 0c mov 0xc(%ebp),%esi 108ebb: 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 ) ) 108ebe: 31 c0 xor %eax,%eax 108ec0: 83 c9 ff or $0xffffffff,%ecx 108ec3: 89 d7 mov %edx,%edi 108ec5: f2 ae repnz scas %es:(%edi),%al 108ec7: f7 d1 not %ecx 108ec9: 49 dec %ecx 108eca: 6a 01 push $0x1 108ecc: 8d 7d d4 lea -0x2c(%ebp),%edi 108ecf: 57 push %edi 108ed0: 6a 00 push $0x0 108ed2: 51 push %ecx 108ed3: 52 push %edx 108ed4: e8 a8 01 00 00 call 109081 108ed9: 83 c4 20 add $0x20,%esp 108edc: 83 ca ff or $0xffffffff,%edx 108edf: 85 c0 test %eax,%eax 108ee1: 75 58 jne 108f3b return -1; if ( !loc.ops->chown_h ) { 108ee3: 8b 55 e0 mov -0x20(%ebp),%edx 108ee6: 8b 42 18 mov 0x18(%edx),%eax 108ee9: 85 c0 test %eax,%eax 108eeb: 75 20 jne 108f0d <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 108eed: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 108ef0: 85 c0 test %eax,%eax <== NOT EXECUTED 108ef2: 74 09 je 108efd <== NOT EXECUTED 108ef4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108ef7: 57 push %edi <== NOT EXECUTED 108ef8: ff d0 call *%eax <== NOT EXECUTED 108efa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 108efd: e8 2a af 00 00 call 113e2c <__errno> <== NOT EXECUTED 108f02: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108f08: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 108f0b: eb 2e jmp 108f3b <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); 108f0d: 52 push %edx 108f0e: 0f b7 db movzwl %bx,%ebx 108f11: 53 push %ebx 108f12: 0f b7 f6 movzwl %si,%esi 108f15: 56 push %esi 108f16: 57 push %edi 108f17: ff d0 call *%eax 108f19: 89 c2 mov %eax,%edx rtems_filesystem_freenode( &loc ); 108f1b: 8b 45 e0 mov -0x20(%ebp),%eax 108f1e: 83 c4 10 add $0x10,%esp 108f21: 85 c0 test %eax,%eax 108f23: 74 16 je 108f3b <== NEVER TAKEN 108f25: 8b 40 1c mov 0x1c(%eax),%eax 108f28: 85 c0 test %eax,%eax 108f2a: 74 0f je 108f3b <== NEVER TAKEN 108f2c: 83 ec 0c sub $0xc,%esp 108f2f: 57 push %edi 108f30: 89 55 c4 mov %edx,-0x3c(%ebp) 108f33: ff d0 call *%eax 108f35: 83 c4 10 add $0x10,%esp 108f38: 8b 55 c4 mov -0x3c(%ebp),%edx return result; } 108f3b: 89 d0 mov %edx,%eax 108f3d: 8d 65 f4 lea -0xc(%ebp),%esp 108f40: 5b pop %ebx 108f41: 5e pop %esi 108f42: 5f pop %edi 108f43: c9 leave 108f44: c3 ret =============================================================================== 001076f8 : #include int chroot( const char *pathname ) { 1076f8: 55 push %ebp 1076f9: 89 e5 mov %esp,%ebp 1076fb: 57 push %edi 1076fc: 56 push %esi 1076fd: 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) { 107700: 81 3d 40 2f 12 00 70 cmpl $0x125070,0x122f40 107707: 50 12 00 10770a: 75 1e jne 10772a <== NEVER TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ 10770c: e8 af 12 00 00 call 1089c0 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 107711: 81 3d 40 2f 12 00 70 cmpl $0x125070,0x122f40 107718: 50 12 00 10771b: 75 0d jne 10772a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10771d: e8 f6 a9 00 00 call 112118 <__errno> <== NOT EXECUTED 107722: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 107728: eb 22 jmp 10774c <== NOT EXECUTED } result = chdir(pathname); 10772a: 83 ec 0c sub $0xc,%esp 10772d: ff 75 08 pushl 0x8(%ebp) 107730: e8 d7 7d 00 00 call 10f50c if (result) { 107735: 83 c4 10 add $0x10,%esp 107738: 85 c0 test %eax,%eax 10773a: 74 15 je 107751 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( errno ); 10773c: e8 d7 a9 00 00 call 112118 <__errno> <== NOT EXECUTED 107741: 89 c6 mov %eax,%esi <== NOT EXECUTED 107743: e8 d0 a9 00 00 call 112118 <__errno> <== NOT EXECUTED 107748: 8b 00 mov (%eax),%eax <== NOT EXECUTED 10774a: 89 06 mov %eax,(%esi) <== NOT EXECUTED 10774c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10774f: eb 53 jmp 1077a4 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 107751: 83 ec 0c sub $0xc,%esp 107754: 6a 00 push $0x0 107756: 8d 45 e4 lea -0x1c(%ebp),%eax 107759: 50 push %eax 10775a: 6a 00 push $0x0 10775c: 6a 01 push $0x1 10775e: 68 f8 fc 11 00 push $0x11fcf8 107763: e8 05 02 00 00 call 10796d 107768: 83 c4 20 add $0x20,%esp 10776b: 85 c0 test %eax,%eax 10776d: 75 cd jne 10773c <== 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); 10776f: 8b 15 40 2f 12 00 mov 0x122f40,%edx 107775: 8b 42 24 mov 0x24(%edx),%eax 107778: 85 c0 test %eax,%eax 10777a: 74 13 je 10778f <== NEVER TAKEN 10777c: 8b 40 1c mov 0x1c(%eax),%eax 10777f: 85 c0 test %eax,%eax 107781: 74 0c je 10778f <== NEVER TAKEN 107783: 83 ec 0c sub $0xc,%esp 107786: 83 c2 18 add $0x18,%edx 107789: 52 push %edx 10778a: ff d0 call *%eax 10778c: 83 c4 10 add $0x10,%esp rtems_filesystem_root = loc; 10778f: 8b 3d 40 2f 12 00 mov 0x122f40,%edi 107795: 83 c7 18 add $0x18,%edi 107798: 8d 75 e4 lea -0x1c(%ebp),%esi 10779b: b9 05 00 00 00 mov $0x5,%ecx 1077a0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1077a2: 31 c0 xor %eax,%eax return 0; } 1077a4: 8d 65 f8 lea -0x8(%ebp),%esp 1077a7: 5e pop %esi 1077a8: 5f pop %edi 1077a9: c9 leave 1077aa: c3 ret =============================================================================== 0010eab4 : #include int close( int fd ) { 10eab4: 55 push %ebp 10eab5: 89 e5 mov %esp,%ebp 10eab7: 56 push %esi 10eab8: 53 push %ebx 10eab9: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 10eabc: 3b 1d 24 16 12 00 cmp 0x121624,%ebx 10eac2: 73 0f jae 10ead3 iop = rtems_libio_iop(fd); 10eac4: c1 e3 06 shl $0x6,%ebx 10eac7: 03 1d 00 55 12 00 add 0x125500,%ebx rtems_libio_check_is_open(iop); 10eacd: f6 43 15 01 testb $0x1,0x15(%ebx) 10ead1: 75 10 jne 10eae3 10ead3: e8 84 2e 00 00 call 11195c <__errno> 10ead8: c7 00 09 00 00 00 movl $0x9,(%eax) 10eade: 83 c8 ff or $0xffffffff,%eax 10eae1: eb 3f jmp 10eb22 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 10eae3: 8b 43 3c mov 0x3c(%ebx),%eax 10eae6: 8b 40 04 mov 0x4(%eax),%eax 10eae9: 31 f6 xor %esi,%esi 10eaeb: 85 c0 test %eax,%eax 10eaed: 74 0b je 10eafa <== NEVER TAKEN rc = (*iop->handlers->close_h)( iop ); 10eaef: 83 ec 0c sub $0xc,%esp 10eaf2: 53 push %ebx 10eaf3: ff d0 call *%eax 10eaf5: 89 c6 mov %eax,%esi 10eaf7: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &iop->pathinfo ); 10eafa: 8b 43 24 mov 0x24(%ebx),%eax 10eafd: 85 c0 test %eax,%eax 10eaff: 74 13 je 10eb14 <== NEVER TAKEN 10eb01: 8b 40 1c mov 0x1c(%eax),%eax 10eb04: 85 c0 test %eax,%eax 10eb06: 74 0c je 10eb14 10eb08: 83 ec 0c sub $0xc,%esp 10eb0b: 8d 53 18 lea 0x18(%ebx),%edx 10eb0e: 52 push %edx 10eb0f: ff d0 call *%eax 10eb11: 83 c4 10 add $0x10,%esp rtems_libio_free( iop ); 10eb14: 83 ec 0c sub $0xc,%esp 10eb17: 53 push %ebx 10eb18: e8 c9 01 00 00 call 10ece6 return rc; 10eb1d: 89 f0 mov %esi,%eax 10eb1f: 83 c4 10 add $0x10,%esp } 10eb22: 8d 65 f8 lea -0x8(%ebp),%esp 10eb25: 5b pop %ebx 10eb26: 5e pop %esi 10eb27: c9 leave 10eb28: c3 ret =============================================================================== 0010d340 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 10d340: 55 push %ebp 10d341: 89 e5 mov %esp,%ebp 10d343: 83 ec 1c sub $0x1c,%esp 10d346: 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; 10d349: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10d34c: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10d34f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10d356: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10d35d: 8d 55 ec lea -0x14(%ebp),%edx 10d360: 52 push %edx 10d361: ff 70 0c pushl 0xc(%eax) 10d364: ff 70 08 pushl 0x8(%eax) 10d367: e8 fc 0a 00 00 call 10de68 10d36c: 89 c2 mov %eax,%edx np->major, np->minor, (void *) &args ); if ( status ) { 10d36e: 83 c4 10 add $0x10,%esp 10d371: 31 c0 xor %eax,%eax 10d373: 85 d2 test %edx,%edx 10d375: 74 0c je 10d383 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 10d377: 83 ec 0c sub $0xc,%esp 10d37a: 52 push %edx <== NOT EXECUTED 10d37b: e8 c0 00 00 00 call 10d440 <== NOT EXECUTED 10d380: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10d383: c9 leave 10d384: c3 ret =============================================================================== 0010d397 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10d397: 55 push %ebp 10d398: 89 e5 mov %esp,%ebp 10d39a: 57 push %edi 10d39b: 56 push %esi 10d39c: 53 push %ebx 10d39d: 83 ec 1c sub $0x1c,%esp 10d3a0: 8b 4d 0c mov 0xc(%ebp),%ecx 10d3a3: 8b 5d 14 mov 0x14(%ebp),%ebx int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 10d3a6: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10d3ad: 74 0d je 10d3bc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 10d3af: e8 90 17 00 00 call 10eb44 <__errno> <== NOT EXECUTED 10d3b4: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10d3ba: eb 77 jmp 10d433 <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 10d3bc: 8b 33 mov (%ebx),%esi if (!device_name_table) 10d3be: 85 f6 test %esi,%esi 10d3c0: 74 04 je 10d3c6 <== NEVER TAKEN 10d3c2: 31 ff xor %edi,%edi 10d3c4: eb 5a jmp 10d420 rtems_set_errno_and_return_minus_one( EFAULT ); 10d3c6: e8 79 17 00 00 call 10eb44 <__errno> <== NOT EXECUTED 10d3cb: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10d3d1: eb 60 jmp 10d433 <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 10d3d3: 8b 16 mov (%esi),%edx 10d3d5: 85 d2 test %edx,%edx 10d3d7: 74 43 je 10d41c continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10d3d9: 50 push %eax 10d3da: 51 push %ecx 10d3db: 52 push %edx 10d3dc: ff 75 08 pushl 0x8(%ebp) 10d3df: 89 55 e4 mov %edx,-0x1c(%ebp) 10d3e2: 89 4d e0 mov %ecx,-0x20(%ebp) 10d3e5: e8 62 23 00 00 call 10f74c 10d3ea: 83 c4 10 add $0x10,%esp 10d3ed: 85 c0 test %eax,%eax 10d3ef: 8b 55 e4 mov -0x1c(%ebp),%edx 10d3f2: 8b 4d e0 mov -0x20(%ebp),%ecx 10d3f5: 75 25 jne 10d41c <== NEVER TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10d3f7: 80 3c 0a 00 cmpb $0x0,(%edx,%ecx,1) 10d3fb: 75 1f jne 10d41c <== NEVER TAKEN continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 10d3fd: 89 33 mov %esi,(%ebx) pathloc->handlers = &devFS_file_handlers; 10d3ff: c7 43 08 68 ef 11 00 movl $0x11ef68,0x8(%ebx) pathloc->ops = &devFS_ops; 10d406: c7 43 0c 20 ef 11 00 movl $0x11ef20,0xc(%ebx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10d40d: a1 c0 ef 11 00 mov 0x11efc0,%eax 10d412: 8b 40 28 mov 0x28(%eax),%eax 10d415: 89 43 10 mov %eax,0x10(%ebx) 10d418: 31 c0 xor %eax,%eax return 0; 10d41a: eb 1a jmp 10d436 /* 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++) { 10d41c: 47 inc %edi 10d41d: 83 c6 14 add $0x14,%esi 10d420: 3b 3d 48 d1 11 00 cmp 0x11d148,%edi 10d426: 72 ab jb 10d3d3 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10d428: e8 17 17 00 00 call 10eb44 <__errno> 10d42d: c7 00 02 00 00 00 movl $0x2,(%eax) 10d433: 83 c8 ff or $0xffffffff,%eax } 10d436: 8d 65 f4 lea -0xc(%ebp),%esp 10d439: 5b pop %ebx 10d43a: 5e pop %esi 10d43b: 5f pop %edi 10d43c: c9 leave 10d43d: c3 ret =============================================================================== 00106d70 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 106d70: 55 push %ebp 106d71: 89 e5 mov %esp,%ebp 106d73: 57 push %edi 106d74: 53 push %ebx 106d75: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 106d78: 83 ec 0c sub $0xc,%esp 106d7b: 6b 05 48 d1 11 00 14 imul $0x14,0x11d148,%eax 106d82: 50 push %eax 106d83: e8 78 61 00 00 call 10cf00 <_Workspace_Allocate> 106d88: 89 c2 mov %eax,%edx sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 106d8a: 83 c4 10 add $0x10,%esp 106d8d: 85 c0 test %eax,%eax 106d8f: 75 10 jne 106da1 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106d91: e8 ae 7d 00 00 call 10eb44 <__errno> <== NOT EXECUTED 106d96: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106d9c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106d9f: eb 20 jmp 106dc1 <== NOT EXECUTED memset( 106da1: 6b 0d 48 d1 11 00 14 imul $0x14,0x11d148,%ecx 106da8: 31 c0 xor %eax,%eax 106daa: 89 d7 mov %edx,%edi 106dac: f3 aa rep stos %al,%es:(%edi) device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 106dae: c7 43 24 68 ef 11 00 movl $0x11ef68,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 106db5: c7 43 28 20 ef 11 00 movl $0x11ef20,0x28(%ebx) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 106dbc: 89 53 1c mov %edx,0x1c(%ebx) 106dbf: 31 c0 xor %eax,%eax return 0; } 106dc1: 8d 65 f8 lea -0x8(%ebp),%esp 106dc4: 5b pop %ebx 106dc5: 5f pop %edi 106dc6: c9 leave 106dc7: c3 ret =============================================================================== 00106ed4 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 106ed4: 55 push %ebp 106ed5: 89 e5 mov %esp,%ebp 106ed7: 83 ec 1c sub $0x1c,%esp 106eda: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 106edd: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 106ee0: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 106ee3: 8b 55 0c mov 0xc(%ebp),%edx 106ee6: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 106ee9: 8b 55 10 mov 0x10(%ebp),%edx 106eec: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( 106eef: 8d 55 e8 lea -0x18(%ebp),%edx 106ef2: 52 push %edx 106ef3: ff 70 0c pushl 0xc(%eax) 106ef6: ff 70 08 pushl 0x8(%eax) 106ef9: e8 8e 39 00 00 call 10a88c np->major, np->minor, (void *) &args ); if ( status ) 106efe: 83 c4 10 add $0x10,%esp 106f01: 85 c0 test %eax,%eax 106f03: 74 0e je 106f13 return rtems_deviceio_errno(status); 106f05: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106f08: 50 push %eax <== NOT EXECUTED 106f09: e8 32 65 00 00 call 10d440 <== NOT EXECUTED 106f0e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106f11: eb 03 jmp 106f16 <== NOT EXECUTED return args.ioctl_return; 106f13: 8b 45 f4 mov -0xc(%ebp),%eax } 106f16: c9 leave 106f17: c3 ret =============================================================================== 00106dc8 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 106dc8: 55 push %ebp 106dc9: 89 e5 mov %esp,%ebp 106dcb: 57 push %edi 106dcc: 56 push %esi 106dcd: 53 push %ebx 106dce: 83 ec 1c sub $0x1c,%esp 106dd1: 8b 7d 08 mov 0x8(%ebp),%edi 106dd4: 8b 4d 10 mov 0x10(%ebp),%ecx 106dd7: 8b 55 14 mov 0x14(%ebp),%edx * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 106dda: 80 3f 64 cmpb $0x64,(%edi) 106ddd: 75 18 jne 106df7 <== NEVER TAKEN 106ddf: 80 7f 01 65 cmpb $0x65,0x1(%edi) 106de3: 75 12 jne 106df7 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 106de5: 80 7f 02 76 cmpb $0x76,0x2(%edi) 106de9: 75 0c jne 106df7 <== NEVER TAKEN 106deb: 31 c0 xor %eax,%eax 106ded: 80 7f 03 00 cmpb $0x0,0x3(%edi) 106df1: 0f 84 c9 00 00 00 je 106ec0 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 106df7: 8b 45 0c mov 0xc(%ebp),%eax 106dfa: 25 00 f0 00 00 and $0xf000,%eax 106dff: 3d 00 20 00 00 cmp $0x2000,%eax 106e04: 74 14 je 106e1a <== ALWAYS TAKEN 106e06: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED 106e0b: 74 0d je 106e1a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 106e0d: e8 32 7d 00 00 call 10eb44 <__errno> <== NOT EXECUTED 106e12: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 106e18: eb 23 jmp 106e3d <== NOT EXECUTED ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 106e1a: 89 4d e0 mov %ecx,-0x20(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 106e1d: 89 55 e4 mov %edx,-0x1c(%ebp) else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 106e20: 8b 45 18 mov 0x18(%ebp),%eax 106e23: 8b 08 mov (%eax),%ecx if (!device_name_table) 106e25: 85 c9 test %ecx,%ecx 106e27: 74 09 je 106e32 <== NEVER TAKEN 106e29: 89 ca mov %ecx,%edx 106e2b: 83 ce ff or $0xffffffff,%esi 106e2e: 31 db xor %ebx,%ebx 106e30: eb 46 jmp 106e78 rtems_set_errno_and_return_minus_one( EFAULT ); 106e32: e8 0d 7d 00 00 call 10eb44 <__errno> <== NOT EXECUTED 106e37: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 106e3d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106e40: eb 7e jmp 106ec0 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 106e42: 8b 02 mov (%edx),%eax 106e44: 85 c0 test %eax,%eax 106e46: 74 2a je 106e72 <== ALWAYS TAKEN slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 106e48: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 106e4b: 50 push %eax <== NOT EXECUTED 106e4c: 57 push %edi <== NOT EXECUTED 106e4d: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 106e50: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED 106e53: e8 cc 87 00 00 call 10f624 <== NOT EXECUTED 106e58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106e5b: 85 c0 test %eax,%eax <== NOT EXECUTED 106e5d: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 106e60: 8b 4d d8 mov -0x28(%ebp),%ecx <== NOT EXECUTED 106e63: 75 0f jne 106e74 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); 106e65: e8 da 7c 00 00 call 10eb44 <__errno> <== NOT EXECUTED 106e6a: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED 106e70: eb cb jmp 106e3d <== NOT EXECUTED 106e72: 89 de mov %ebx,%esi /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 106e74: 43 inc %ebx 106e75: 83 c2 14 add $0x14,%edx 106e78: 3b 1d 48 d1 11 00 cmp 0x11d148,%ebx 106e7e: 72 c2 jb 106e42 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 106e80: 83 fe ff cmp $0xffffffff,%esi 106e83: 75 0d jne 106e92 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106e85: e8 ba 7c 00 00 call 10eb44 <__errno> <== NOT EXECUTED 106e8a: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106e90: eb ab jmp 106e3d <== NOT EXECUTED _ISR_Disable(level); 106e92: 9c pushf 106e93: fa cli 106e94: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 106e95: 6b d6 14 imul $0x14,%esi,%edx 106e98: 8d 14 11 lea (%ecx,%edx,1),%edx 106e9b: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 106e9d: 31 c0 xor %eax,%eax 106e9f: 83 c9 ff or $0xffffffff,%ecx 106ea2: f2 ae repnz scas %es:(%edi),%al 106ea4: f7 d1 not %ecx 106ea6: 49 dec %ecx 106ea7: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 106eaa: 8b 45 e0 mov -0x20(%ebp),%eax 106ead: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 106eb0: 8b 45 e4 mov -0x1c(%ebp),%eax 106eb3: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 106eb6: 8b 45 0c mov 0xc(%ebp),%eax 106eb9: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 106ebc: 53 push %ebx 106ebd: 9d popf 106ebe: 31 c0 xor %eax,%eax return 0; } 106ec0: 8d 65 f4 lea -0xc(%ebp),%esp 106ec3: 5b pop %ebx 106ec4: 5e pop %esi 106ec5: 5f pop %edi 106ec6: c9 leave 106ec7: c3 ret =============================================================================== 00106f18 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 106f18: 55 push %ebp 106f19: 89 e5 mov %esp,%ebp 106f1b: 83 ec 1c sub $0x1c,%esp 106f1e: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 106f21: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 106f24: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 106f27: 8b 40 14 mov 0x14(%eax),%eax 106f2a: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 106f2d: 8b 45 14 mov 0x14(%ebp),%eax 106f30: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 106f33: 8d 45 ec lea -0x14(%ebp),%eax 106f36: 50 push %eax 106f37: ff 72 0c pushl 0xc(%edx) 106f3a: ff 72 08 pushl 0x8(%edx) 106f3d: e8 22 3a 00 00 call 10a964 106f42: 89 c2 mov %eax,%edx np->major, np->minor, (void *) &args ); if ( status ) 106f44: 83 c4 10 add $0x10,%esp 106f47: 31 c0 xor %eax,%eax 106f49: 85 d2 test %edx,%edx 106f4b: 74 0c je 106f59 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 106f4d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106f50: 52 push %edx <== NOT EXECUTED 106f51: e8 ea 64 00 00 call 10d440 <== NOT EXECUTED 106f56: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 106f59: c9 leave 106f5a: c3 ret =============================================================================== 00106f5c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 106f5c: 55 push %ebp <== NOT EXECUTED 106f5d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106f5f: 53 push %ebx <== NOT EXECUTED 106f60: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 106f63: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 106f66: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 106f69: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 106f6c: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 106f6f: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 106f72: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 106f75: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 106f78: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 106f7b: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 106f7e: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 106f81: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 106f84: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 106f87: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 106f8a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 106f91: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 106f94: 50 push %eax <== NOT EXECUTED 106f95: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED 106f98: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED 106f9b: e8 f4 39 00 00 call 10a994 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 106fa0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106fa3: 85 c0 test %eax,%eax <== NOT EXECUTED 106fa5: 74 0e je 106fb5 <== NOT EXECUTED return rtems_deviceio_errno(status); 106fa7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106faa: 50 push %eax <== NOT EXECUTED 106fab: e8 90 64 00 00 call 10d440 <== NOT EXECUTED 106fb0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106fb3: eb 03 jmp 106fb8 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 106fb5: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 106fb8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 106fbb: c9 leave <== NOT EXECUTED 106fbc: c3 ret <== NOT EXECUTED =============================================================================== 00106fc0 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 106fc0: 55 push %ebp 106fc1: 89 e5 mov %esp,%ebp 106fc3: 53 push %ebx 106fc4: 83 ec 04 sub $0x4,%esp 106fc7: 8b 55 0c mov 0xc(%ebp),%edx rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 106fca: 8b 45 08 mov 0x8(%ebp),%eax 106fcd: 8b 00 mov (%eax),%eax if (!the_dev) 106fcf: 85 c0 test %eax,%eax 106fd1: 75 10 jne 106fe3 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 106fd3: e8 6c 7b 00 00 call 10eb44 <__errno> <== NOT EXECUTED 106fd8: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 106fde: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106fe1: eb 14 jmp 106ff7 <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 106fe3: 8b 48 0c mov 0xc(%eax),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 106fe6: 8b 58 08 mov 0x8(%eax),%ebx 106fe9: 89 5a 18 mov %ebx,0x18(%edx) 106fec: 89 4a 1c mov %ecx,0x1c(%edx) buf->st_mode = the_dev->mode; 106fef: 8b 40 10 mov 0x10(%eax),%eax 106ff2: 89 42 0c mov %eax,0xc(%edx) 106ff5: 31 c0 xor %eax,%eax return 0; } 106ff7: 5a pop %edx 106ff8: 5b pop %ebx 106ff9: c9 leave 106ffa: c3 ret =============================================================================== 00106ffc : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 106ffc: 55 push %ebp 106ffd: 89 e5 mov %esp,%ebp 106fff: 53 push %ebx 107000: 83 ec 28 sub $0x28,%esp 107003: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 107006: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107009: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 10700c: 8b 48 0c mov 0xc(%eax),%ecx 10700f: 8b 58 10 mov 0x10(%eax),%ebx 107012: 89 4d e0 mov %ecx,-0x20(%ebp) 107015: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 107018: 8b 4d 0c mov 0xc(%ebp),%ecx 10701b: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 10701e: 8b 4d 10 mov 0x10(%ebp),%ecx 107021: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 107024: 8b 40 14 mov 0x14(%eax),%eax 107027: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 10702a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 107031: 8d 45 dc lea -0x24(%ebp),%eax 107034: 50 push %eax 107035: ff 72 0c pushl 0xc(%edx) 107038: ff 72 08 pushl 0x8(%edx) 10703b: e8 84 39 00 00 call 10a9c4 np->major, np->minor, (void *) &args ); if ( status ) 107040: 83 c4 10 add $0x10,%esp 107043: 85 c0 test %eax,%eax 107045: 74 0e je 107055 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 107047: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10704a: 50 push %eax <== NOT EXECUTED 10704b: e8 f0 63 00 00 call 10d440 <== NOT EXECUTED 107050: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107053: eb 03 jmp 107058 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 107055: 8b 45 f4 mov -0xc(%ebp),%eax } 107058: 8b 5d fc mov -0x4(%ebp),%ebx 10705b: c9 leave 10705c: c3 ret =============================================================================== 00110ed4 : */ int device_close( rtems_libio_t *iop ) { 110ed4: 55 push %ebp 110ed5: 89 e5 mov %esp,%ebp 110ed7: 83 ec 1c sub $0x1c,%esp 110eda: 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; 110edd: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 110ee0: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 110ee3: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 110eea: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 110ef1: 8d 55 ec lea -0x14(%ebp),%edx 110ef4: 52 push %edx 110ef5: ff 70 54 pushl 0x54(%eax) 110ef8: ff 70 50 pushl 0x50(%eax) 110efb: e8 84 07 00 00 call 111684 110f00: 89 c2 mov %eax,%edx the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 110f02: 83 c4 10 add $0x10,%esp 110f05: 31 c0 xor %eax,%eax 110f07: 85 d2 test %edx,%edx 110f09: 74 0c je 110f17 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 110f0b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110f0e: 52 push %edx <== NOT EXECUTED 110f0f: e8 98 09 00 00 call 1118ac <== NOT EXECUTED 110f14: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 110f17: c9 leave 110f18: c3 ret =============================================================================== 00110dce : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 110dce: 55 push %ebp 110dcf: 89 e5 mov %esp,%ebp 110dd1: 83 ec 1c sub $0x1c,%esp 110dd4: 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; 110dd7: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 110dda: 8b 55 0c mov 0xc(%ebp),%edx 110ddd: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 110de0: 8b 55 10 mov 0x10(%ebp),%edx 110de3: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->file_info; 110de6: 8b 40 38 mov 0x38(%eax),%eax status = rtems_io_control( 110de9: 8d 55 e8 lea -0x18(%ebp),%edx 110dec: 52 push %edx 110ded: ff 70 54 pushl 0x54(%eax) 110df0: ff 70 50 pushl 0x50(%eax) 110df3: e8 bc 08 00 00 call 1116b4 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 110df8: 83 c4 10 add $0x10,%esp 110dfb: 85 c0 test %eax,%eax 110dfd: 74 0e je 110e0d <== ALWAYS TAKEN return rtems_deviceio_errno(status); 110dff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110e02: 50 push %eax <== NOT EXECUTED 110e03: e8 a4 0a 00 00 call 1118ac <== NOT EXECUTED 110e08: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110e0b: eb 03 jmp 110e10 <== NOT EXECUTED return args.ioctl_return; 110e0d: 8b 45 f4 mov -0xc(%ebp),%eax } 110e10: c9 leave 110e11: c3 ret =============================================================================== 00110f19 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 110f19: 55 push %ebp 110f1a: 89 e5 mov %esp,%ebp 110f1c: 83 ec 1c sub $0x1c,%esp 110f1f: 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; 110f22: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 110f25: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 110f28: 8b 40 14 mov 0x14(%eax),%eax 110f2b: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 110f2e: 8b 45 14 mov 0x14(%ebp),%eax 110f31: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 110f34: 8d 45 ec lea -0x14(%ebp),%eax 110f37: 50 push %eax 110f38: ff 72 54 pushl 0x54(%edx) 110f3b: ff 72 50 pushl 0x50(%edx) 110f3e: e8 a1 07 00 00 call 1116e4 110f43: 89 c2 mov %eax,%edx the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 110f45: 83 c4 10 add $0x10,%esp 110f48: 31 c0 xor %eax,%eax 110f4a: 85 d2 test %edx,%edx 110f4c: 74 0c je 110f5a <== ALWAYS TAKEN return rtems_deviceio_errno(status); 110f4e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110f51: 52 push %edx <== NOT EXECUTED 110f52: e8 55 09 00 00 call 1118ac <== NOT EXECUTED 110f57: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 110f5a: c9 leave 110f5b: c3 ret =============================================================================== 00110e73 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 110e73: 55 push %ebp <== NOT EXECUTED 110e74: 89 e5 mov %esp,%ebp <== NOT EXECUTED 110e76: 53 push %ebx <== NOT EXECUTED 110e77: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 110e7a: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 110e7d: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 110e80: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 110e83: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 110e86: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 110e89: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 110e8c: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 110e8f: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 110e92: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 110e95: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 110e98: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 110e9b: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 110e9e: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 110ea1: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 110ea8: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 110eab: 50 push %eax <== NOT EXECUTED 110eac: ff 72 54 pushl 0x54(%edx) <== NOT EXECUTED 110eaf: ff 72 50 pushl 0x50(%edx) <== NOT EXECUTED 110eb2: e8 5d 08 00 00 call 111714 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 110eb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110eba: 85 c0 test %eax,%eax <== NOT EXECUTED 110ebc: 74 0e je 110ecc <== NOT EXECUTED return rtems_deviceio_errno(status); 110ebe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110ec1: 50 push %eax <== NOT EXECUTED 110ec2: e8 e5 09 00 00 call 1118ac <== NOT EXECUTED 110ec7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110eca: eb 03 jmp 110ecf <== NOT EXECUTED return (ssize_t) args.bytes_moved; 110ecc: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 110ecf: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 110ed2: c9 leave <== NOT EXECUTED 110ed3: c3 ret <== NOT EXECUTED =============================================================================== 00110e12 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 110e12: 55 push %ebp 110e13: 89 e5 mov %esp,%ebp 110e15: 53 push %ebx 110e16: 83 ec 28 sub $0x28,%esp 110e19: 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; 110e1c: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 110e1f: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 110e22: 8b 48 0c mov 0xc(%eax),%ecx 110e25: 8b 58 10 mov 0x10(%eax),%ebx 110e28: 89 4d e0 mov %ecx,-0x20(%ebp) 110e2b: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 110e2e: 8b 4d 0c mov 0xc(%ebp),%ecx 110e31: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 110e34: 8b 4d 10 mov 0x10(%ebp),%ecx 110e37: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 110e3a: 8b 40 14 mov 0x14(%eax),%eax 110e3d: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 110e40: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 110e47: 8d 45 dc lea -0x24(%ebp),%eax 110e4a: 50 push %eax 110e4b: ff 72 54 pushl 0x54(%edx) 110e4e: ff 72 50 pushl 0x50(%edx) 110e51: e8 ee 08 00 00 call 111744 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 110e56: 83 c4 10 add $0x10,%esp 110e59: 85 c0 test %eax,%eax 110e5b: 74 0e je 110e6b <== ALWAYS TAKEN return rtems_deviceio_errno(status); 110e5d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110e60: 50 push %eax <== NOT EXECUTED 110e61: e8 46 0a 00 00 call 1118ac <== NOT EXECUTED 110e66: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110e69: eb 03 jmp 110e6e <== NOT EXECUTED return (ssize_t) args.bytes_moved; 110e6b: 8b 45 f4 mov -0xc(%ebp),%eax } 110e6e: 8b 5d fc mov -0x4(%ebp),%ebx 110e71: c9 leave 110e72: c3 ret =============================================================================== 0010903a : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 10903a: 55 push %ebp 10903b: 89 e5 mov %esp,%ebp 10903d: 53 push %ebx 10903e: 83 ec 04 sub $0x4,%esp 109041: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 109043: 83 b8 b4 00 00 00 00 cmpl $0x0,0xb4(%eax) 10904a: 74 46 je 109092 rtems_interrupt_disable (level); 10904c: 9c pushf 10904d: fa cli 10904e: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 10904f: eb 2f jmp 109080 tty->rawOutBufState = rob_wait; 109051: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 109058: 00 00 00 rtems_interrupt_enable (level); 10905b: 50 push %eax 10905c: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 10905d: 50 push %eax 10905e: 6a 00 push $0x0 109060: 6a 00 push $0x0 109062: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109068: e8 77 15 00 00 call 10a5e4 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 10906d: 83 c4 10 add $0x10,%esp 109070: 85 c0 test %eax,%eax 109072: 74 09 je 10907d <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 109074: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109077: 50 push %eax <== NOT EXECUTED 109078: e8 1f 1b 00 00 call 10ab9c <== NOT EXECUTED rtems_interrupt_disable (level); 10907d: 9c pushf 10907e: fa cli 10907f: 58 pop %eax rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 109080: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 109086: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 10908c: 39 d1 cmp %edx,%ecx 10908e: 75 c1 jne 109051 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 109090: 50 push %eax 109091: 9d popf } } 109092: 8b 5d fc mov -0x4(%ebp),%ebx 109095: c9 leave 109096: c3 ret =============================================================================== 00107cf0 : int dup2( int fildes, int fildes2 ) { 107cf0: 55 push %ebp 107cf1: 89 e5 mov %esp,%ebp 107cf3: 57 push %edi 107cf4: 56 push %esi 107cf5: 53 push %ebx 107cf6: 83 ec 64 sub $0x64,%esp 107cf9: 8b 5d 08 mov 0x8(%ebp),%ebx 107cfc: 8b 75 0c mov 0xc(%ebp),%esi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 107cff: 8d 7d a0 lea -0x60(%ebp),%edi 107d02: 57 push %edi 107d03: 53 push %ebx 107d04: e8 bf 04 00 00 call 1081c8 if ( status == -1 ) 107d09: 83 c4 10 add $0x10,%esp 107d0c: 40 inc %eax 107d0d: 74 1e je 107d2d <== NEVER TAKEN /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 107d0f: 52 push %edx 107d10: 52 push %edx 107d11: 57 push %edi 107d12: 56 push %esi 107d13: e8 b0 04 00 00 call 1081c8 if ( status == -1 ) 107d18: 83 c4 10 add $0x10,%esp 107d1b: 40 inc %eax 107d1c: 74 0f je 107d2d <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 107d1e: 50 push %eax 107d1f: 56 push %esi <== NOT EXECUTED 107d20: 6a 00 push $0x0 <== NOT EXECUTED 107d22: 53 push %ebx <== NOT EXECUTED 107d23: e8 c8 01 00 00 call 107ef0 <== NOT EXECUTED 107d28: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107d2b: eb 03 jmp 107d30 <== NOT EXECUTED 107d2d: 83 c8 ff or $0xffffffff,%eax } 107d30: 8d 65 f4 lea -0xc(%ebp),%esp 107d33: 5b pop %ebx 107d34: 5e pop %esi 107d35: 5f pop %edi 107d36: c9 leave 107d37: c3 ret =============================================================================== 00108c57 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 108c57: 55 push %ebp <== NOT EXECUTED 108c58: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108c5a: 53 push %ebx <== NOT EXECUTED 108c5b: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 108c5e: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED 108c62: 74 3e je 108ca2 <== NOT EXECUTED 108c64: 0f b6 c8 movzbl %al,%ecx <== NOT EXECUTED 108c67: 8b 1d bc 34 12 00 mov 0x1234bc,%ebx <== NOT EXECUTED 108c6d: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) <== NOT EXECUTED 108c72: 74 2e je 108ca2 <== NOT EXECUTED 108c74: 3c 09 cmp $0x9,%al <== NOT EXECUTED 108c76: 74 2a je 108ca2 <== NOT EXECUTED 108c78: 3c 0a cmp $0xa,%al <== NOT EXECUTED 108c7a: 74 26 je 108ca2 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; 108c7c: c6 45 f6 5e movb $0x5e,-0xa(%ebp) <== NOT EXECUTED echobuf[1] = c ^ 0x40; 108c80: 83 f0 40 xor $0x40,%eax <== NOT EXECUTED 108c83: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 108c86: 50 push %eax <== NOT EXECUTED 108c87: 52 push %edx <== NOT EXECUTED 108c88: 6a 02 push $0x2 <== NOT EXECUTED 108c8a: 8d 45 f6 lea -0xa(%ebp),%eax <== NOT EXECUTED 108c8d: 50 push %eax <== NOT EXECUTED 108c8e: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 108c91: e8 83 fd ff ff call 108a19 <== NOT EXECUTED tty->column += 2; 108c96: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 108c99: 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')) { 108c9d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108ca0: eb 08 jmp 108caa <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 108ca2: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108ca5: e8 8f fe ff ff call 108b39 <== NOT EXECUTED } } 108caa: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108cad: c9 leave <== NOT EXECUTED 108cae: c3 ret <== NOT EXECUTED =============================================================================== 00107834 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 107834: 55 push %ebp <== NOT EXECUTED 107835: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107837: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp != NULL) 10783a: a1 00 5e 12 00 mov 0x125e00,%eax <== NOT EXECUTED 10783f: 85 c0 test %eax,%eax <== NOT EXECUTED 107841: 74 0c je 10784f <== NOT EXECUTED fclose(group_fp); 107843: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107846: 50 push %eax <== NOT EXECUTED 107847: e8 3c ab 00 00 call 112388 <== NOT EXECUTED 10784c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10784f: c9 leave <== NOT EXECUTED 107850: c3 ret <== NOT EXECUTED =============================================================================== 00107851 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 107851: 55 push %ebp <== NOT EXECUTED 107852: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107854: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp != NULL) 107857: a1 18 5d 12 00 mov 0x125d18,%eax <== NOT EXECUTED 10785c: 85 c0 test %eax,%eax <== NOT EXECUTED 10785e: 74 0c je 10786c <== NOT EXECUTED fclose(passwd_fp); 107860: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107863: 50 push %eax <== NOT EXECUTED 107864: e8 1f ab 00 00 call 112388 <== NOT EXECUTED 107869: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10786c: c9 leave <== NOT EXECUTED 10786d: c3 ret <== NOT EXECUTED =============================================================================== 00108caf : * 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) { 108caf: 55 push %ebp <== NOT EXECUTED 108cb0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108cb2: 57 push %edi <== NOT EXECUTED 108cb3: 56 push %esi <== NOT EXECUTED 108cb4: 53 push %ebx <== NOT EXECUTED 108cb5: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 108cb8: 89 c3 mov %eax,%ebx <== NOT EXECUTED 108cba: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED if (tty->ccount == 0) 108cbd: 83 78 20 00 cmpl $0x0,0x20(%eax) <== NOT EXECUTED 108cc1: 0f 84 59 01 00 00 je 108e20 <== NOT EXECUTED return; if (lineFlag) { 108cc7: 85 d2 test %edx,%edx <== NOT EXECUTED 108cc9: 0f 84 46 01 00 00 je 108e15 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 108ccf: 8b 40 3c mov 0x3c(%eax),%eax <== NOT EXECUTED 108cd2: a8 08 test $0x8,%al <== NOT EXECUTED 108cd4: 75 0c jne 108ce2 <== NOT EXECUTED tty->ccount = 0; 108cd6: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED return; 108cdd: e9 3e 01 00 00 jmp 108e20 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 108ce2: a8 10 test $0x10,%al <== NOT EXECUTED 108ce4: 0f 85 2b 01 00 00 jne 108e15 <== NOT EXECUTED tty->ccount = 0; 108cea: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 108cf1: 0f b6 43 44 movzbl 0x44(%ebx),%eax <== NOT EXECUTED 108cf5: 89 da mov %ebx,%edx <== NOT EXECUTED 108cf7: e8 5b ff ff ff call 108c57 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 108cfc: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 108d00: 0f 84 1a 01 00 00 je 108e20 <== NOT EXECUTED echo ('\n', tty); 108d06: 89 da mov %ebx,%edx <== NOT EXECUTED 108d08: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 108d0d: eb 30 jmp 108d3f <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 108d0f: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108d12: 8d 48 ff lea -0x1(%eax),%ecx <== NOT EXECUTED 108d15: 89 4b 20 mov %ecx,0x20(%ebx) <== NOT EXECUTED 108d18: 8a 54 02 ff mov -0x1(%edx,%eax,1),%dl <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 108d1c: 8b 7b 3c mov 0x3c(%ebx),%edi <== NOT EXECUTED 108d1f: f7 c7 08 00 00 00 test $0x8,%edi <== NOT EXECUTED 108d25: 0f 84 e4 00 00 00 je 108e0f <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 108d2b: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 108d2f: 75 1a jne 108d4b <== NOT EXECUTED 108d31: f7 c7 10 00 00 00 test $0x10,%edi <== NOT EXECUTED 108d37: 75 12 jne 108d4b <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 108d39: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 108d3d: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 108d3f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108d42: 5b pop %ebx <== NOT EXECUTED 108d43: 5e pop %esi <== NOT EXECUTED 108d44: 5f pop %edi <== NOT EXECUTED 108d45: 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); 108d46: e9 0c ff ff ff jmp 108c57 <== NOT EXECUTED } else if (c == '\t') { 108d4b: 80 fa 09 cmp $0x9,%dl <== NOT EXECUTED 108d4e: 8b 0d bc 34 12 00 mov 0x1234bc,%ecx <== NOT EXECUTED 108d54: 75 5d jne 108db3 <== NOT EXECUTED int col = tty->read_start_column; 108d56: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED * Erase a character or line * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) 108d59: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 108d5e: 81 e7 00 02 00 00 and $0x200,%edi <== NOT EXECUTED 108d64: 89 7d e0 mov %edi,-0x20(%ebp) <== NOT EXECUTED 108d67: 89 c7 mov %eax,%edi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 108d69: eb 27 jmp 108d92 <== NOT EXECUTED c = tty->cbuf[i++]; 108d6b: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 108d6e: 8a 44 10 ff mov -0x1(%eax,%edx,1),%al <== NOT EXECUTED if (c == '\t') { 108d72: 3c 09 cmp $0x9,%al <== NOT EXECUTED 108d74: 75 05 jne 108d7b <== NOT EXECUTED col = (col | 7) + 1; 108d76: 83 ce 07 or $0x7,%esi <== NOT EXECUTED 108d79: eb 15 jmp 108d90 <== NOT EXECUTED } else if (iscntrl (c)) { 108d7b: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108d7e: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) <== NOT EXECUTED 108d83: 74 0b je 108d90 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 108d85: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 108d89: 74 06 je 108d91 <== NOT EXECUTED col += 2; 108d8b: 83 c6 02 add $0x2,%esi <== NOT EXECUTED 108d8e: eb 01 jmp 108d91 <== NOT EXECUTED } else { col++; 108d90: 46 inc %esi <== NOT EXECUTED 108d91: 42 inc %edx <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 108d92: 39 fa cmp %edi,%edx <== NOT EXECUTED 108d94: 75 d5 jne 108d6b <== NOT EXECUTED 108d96: eb 14 jmp 108dac <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 108d98: 57 push %edi <== NOT EXECUTED 108d99: 53 push %ebx <== NOT EXECUTED 108d9a: 6a 01 push $0x1 <== NOT EXECUTED 108d9c: 68 f4 ef 11 00 push $0x11eff4 <== NOT EXECUTED 108da1: e8 73 fc ff ff call 108a19 <== NOT EXECUTED tty->column--; 108da6: ff 4b 28 decl 0x28(%ebx) <== NOT EXECUTED 108da9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 108dac: 39 73 28 cmp %esi,0x28(%ebx) <== NOT EXECUTED 108daf: 7f e7 jg 108d98 <== NOT EXECUTED 108db1: eb 5c jmp 108e0f <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 108db3: 0f b6 f2 movzbl %dl,%esi <== NOT EXECUTED 108db6: f6 44 31 01 20 testb $0x20,0x1(%ecx,%esi,1) <== NOT EXECUTED 108dbb: 74 24 je 108de1 <== NOT EXECUTED 108dbd: 81 e7 00 02 00 00 and $0x200,%edi <== NOT EXECUTED 108dc3: 74 1c je 108de1 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 108dc5: 51 push %ecx <== NOT EXECUTED 108dc6: 53 push %ebx <== NOT EXECUTED 108dc7: 6a 03 push $0x3 <== NOT EXECUTED 108dc9: 68 f2 ef 11 00 push $0x11eff2 <== NOT EXECUTED 108dce: e8 46 fc ff ff call 108a19 <== NOT EXECUTED if (tty->column) 108dd3: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108dd6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108dd9: 85 c0 test %eax,%eax <== NOT EXECUTED 108ddb: 74 04 je 108de1 <== NOT EXECUTED tty->column--; 108ddd: 48 dec %eax <== NOT EXECUTED 108dde: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 108de1: a1 bc 34 12 00 mov 0x1234bc,%eax <== NOT EXECUTED 108de6: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1) <== NOT EXECUTED 108deb: 74 06 je 108df3 <== NOT EXECUTED 108ded: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 108df1: 74 1c je 108e0f <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 108df3: 52 push %edx <== NOT EXECUTED 108df4: 53 push %ebx <== NOT EXECUTED 108df5: 6a 03 push $0x3 <== NOT EXECUTED 108df7: 68 f2 ef 11 00 push $0x11eff2 <== NOT EXECUTED 108dfc: e8 18 fc ff ff call 108a19 <== NOT EXECUTED if (tty->column) 108e01: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108e04: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108e07: 85 c0 test %eax,%eax <== NOT EXECUTED 108e09: 74 04 je 108e0f <== NOT EXECUTED tty->column--; 108e0b: 48 dec %eax <== NOT EXECUTED 108e0c: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } } } if (!lineFlag) 108e0f: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 108e13: 74 0b je 108e20 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 108e15: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108e18: 85 c0 test %eax,%eax <== NOT EXECUTED 108e1a: 0f 85 ef fe ff ff jne 108d0f <== NOT EXECUTED } } if (!lineFlag) break; } } 108e20: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108e23: 5b pop %ebx <== NOT EXECUTED 108e24: 5e pop %esi <== NOT EXECUTED 108e25: 5f pop %edi <== NOT EXECUTED 108e26: c9 leave <== NOT EXECUTED 108e27: c3 ret <== NOT EXECUTED =============================================================================== 00107ef0 : int fcntl( int fd, int cmd, ... ) { 107ef0: 55 push %ebp 107ef1: 89 e5 mov %esp,%ebp 107ef3: 57 push %edi 107ef4: 56 push %esi 107ef5: 53 push %ebx 107ef6: 83 ec 0c sub $0xc,%esp 107ef9: 8b 5d 08 mov 0x8(%ebp),%ebx #include #include /* sigh. for the mode bits for open/creat */ extern int open _PARAMS ((const char *, int, ...)); extern int creat _PARAMS ((const char *, mode_t)); extern int fcntl _PARAMS ((int, int, ...)); 107efc: 8d 55 10 lea 0x10(%ebp),%edx int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 107eff: 8b 0d 44 21 12 00 mov 0x122144,%ecx 107f05: 39 cb cmp %ecx,%ebx 107f07: 73 16 jae 107f1f <== NEVER TAKEN iop = rtems_libio_iop( fd ); 107f09: a1 20 60 12 00 mov 0x126020,%eax 107f0e: c1 e3 06 shl $0x6,%ebx 107f11: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 107f14: 8b 73 14 mov 0x14(%ebx),%esi 107f17: f7 c6 00 01 00 00 test $0x100,%esi 107f1d: 75 10 jne 107f2f <== ALWAYS TAKEN 107f1f: e8 e4 a8 00 00 call 112808 <__errno> <== NOT EXECUTED 107f24: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 107f2a: e9 fe 00 00 00 jmp 10802d <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 107f2f: 83 7d 0c 09 cmpl $0x9,0xc(%ebp) 107f33: 0f 87 c1 00 00 00 ja 107ffa 107f39: 8b 7d 0c mov 0xc(%ebp),%edi 107f3c: ff 24 bd 18 09 12 00 jmp *0x120918(,%edi,4) case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 107f43: 8b 32 mov (%edx),%esi if ( fd2 ) 107f45: 85 f6 test %esi,%esi 107f47: 74 10 je 107f59 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); 107f49: 31 d2 xor %edx,%edx <== NOT EXECUTED 107f4b: 39 ce cmp %ecx,%esi <== NOT EXECUTED 107f4d: 73 1c jae 107f6b <== NOT EXECUTED 107f4f: 89 f2 mov %esi,%edx <== NOT EXECUTED 107f51: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED 107f54: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 107f57: eb 12 jmp 107f6b <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 107f59: e8 b5 05 00 00 call 108513 107f5e: 89 c2 mov %eax,%edx if ( diop == 0 ) { 107f60: 83 ce ff or $0xffffffff,%esi 107f63: 85 c0 test %eax,%eax 107f65: 0f 84 c5 00 00 00 je 108030 <== NEVER TAKEN ret = -1; break; } } diop->handlers = iop->handlers; 107f6b: 8b 43 3c mov 0x3c(%ebx),%eax 107f6e: 89 42 3c mov %eax,0x3c(%edx) diop->file_info = iop->file_info; 107f71: 8b 43 38 mov 0x38(%ebx),%eax 107f74: 89 42 38 mov %eax,0x38(%edx) diop->flags = iop->flags; 107f77: 8b 43 14 mov 0x14(%ebx),%eax 107f7a: 89 42 14 mov %eax,0x14(%edx) diop->pathinfo = iop->pathinfo; 107f7d: 8d 7a 18 lea 0x18(%edx),%edi 107f80: 8d 73 18 lea 0x18(%ebx),%esi 107f83: b9 05 00 00 00 mov $0x5,%ecx 107f88: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 107f8a: 89 d6 mov %edx,%esi 107f8c: 2b 35 20 60 12 00 sub 0x126020,%esi 107f92: c1 fe 06 sar $0x6,%esi 107f95: eb 70 jmp 108007 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 107f97: c1 ee 0b shr $0xb,%esi 107f9a: 83 e6 01 and $0x1,%esi 107f9d: eb 6c jmp 10800b * 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 ) ) 107f9f: 83 3a 00 cmpl $0x0,(%edx) 107fa2: 74 08 je 107fac <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 107fa4: 81 ce 00 08 00 00 or $0x800,%esi 107faa: eb 06 jmp 107fb2 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 107fac: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi <== NOT EXECUTED 107fb2: 89 73 14 mov %esi,0x14(%ebx) 107fb5: 31 f6 xor %esi,%esi 107fb7: eb 52 jmp 10800b break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 107fb9: 83 ec 0c sub $0xc,%esp 107fbc: 56 push %esi 107fbd: e8 06 04 00 00 call 1083c8 107fc2: 89 c6 mov %eax,%esi 107fc4: 83 c4 10 add $0x10,%esp 107fc7: eb 3e jmp 108007 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 107fc9: 83 ec 0c sub $0xc,%esp 107fcc: ff 32 pushl (%edx) 107fce: e8 cb 05 00 00 call 10859e /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 107fd3: 25 01 02 00 00 and $0x201,%eax 107fd8: 8b 53 14 mov 0x14(%ebx),%edx 107fdb: 81 e2 fe fd ff ff and $0xfffffdfe,%edx 107fe1: 09 d0 or %edx,%eax 107fe3: 89 43 14 mov %eax,0x14(%ebx) 107fe6: 31 f6 xor %esi,%esi 107fe8: 83 c4 10 add $0x10,%esp 107feb: eb 1e jmp 10800b errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 107fed: e8 16 a8 00 00 call 112808 <__errno> 107ff2: c7 00 86 00 00 00 movl $0x86,(%eax) 107ff8: eb 33 jmp 10802d ret = -1; break; default: errno = EINVAL; 107ffa: e8 09 a8 00 00 call 112808 <__errno> 107fff: c7 00 16 00 00 00 movl $0x16,(%eax) 108005: eb 26 jmp 10802d /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 108007: 85 f6 test %esi,%esi 108009: 78 25 js 108030 <== NEVER TAKEN if (iop->handlers->fcntl_h) { 10800b: 8b 43 3c mov 0x3c(%ebx),%eax 10800e: 8b 40 30 mov 0x30(%eax),%eax 108011: 85 c0 test %eax,%eax 108013: 74 1b je 108030 <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 108015: 52 push %edx 108016: 52 push %edx 108017: 53 push %ebx 108018: ff 75 0c pushl 0xc(%ebp) 10801b: ff d0 call *%eax 10801d: 89 c3 mov %eax,%ebx if (err) { 10801f: 83 c4 10 add $0x10,%esp 108022: 85 c0 test %eax,%eax 108024: 74 0a je 108030 <== ALWAYS TAKEN errno = err; 108026: e8 dd a7 00 00 call 112808 <__errno> <== NOT EXECUTED 10802b: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10802d: 83 ce ff or $0xffffffff,%esi va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 108030: 89 f0 mov %esi,%eax 108032: 8d 65 f4 lea -0xc(%ebp),%esp 108035: 5b pop %ebx 108036: 5e pop %esi 108037: 5f pop %edi 108038: c9 leave 108039: c3 ret =============================================================================== 00108058 : #include int fdatasync( int fd ) { 108058: 55 push %ebp 108059: 89 e5 mov %esp,%ebp 10805b: 83 ec 08 sub $0x8,%esp 10805e: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108061: 3b 05 44 21 12 00 cmp 0x122144,%eax 108067: 73 11 jae 10807a iop = rtems_libio_iop( fd ); 108069: c1 e0 06 shl $0x6,%eax 10806c: 03 05 20 60 12 00 add 0x126020,%eax rtems_libio_check_is_open(iop); 108072: 8b 50 14 mov 0x14(%eax),%edx 108075: f6 c6 01 test $0x1,%dh 108078: 75 0d jne 108087 <== ALWAYS TAKEN 10807a: e8 89 a7 00 00 call 112808 <__errno> 10807f: c7 00 09 00 00 00 movl $0x9,(%eax) 108085: eb 2f jmp 1080b6 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108087: 80 e2 04 and $0x4,%dl 10808a: 75 0d jne 108099 10808c: e8 77 a7 00 00 call 112808 <__errno> 108091: c7 00 16 00 00 00 movl $0x16,(%eax) 108097: eb 1d jmp 1080b6 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 108099: 8b 50 3c mov 0x3c(%eax),%edx 10809c: 8b 52 2c mov 0x2c(%edx),%edx 10809f: 85 d2 test %edx,%edx 1080a1: 75 0d jne 1080b0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1080a3: e8 60 a7 00 00 call 112808 <__errno> 1080a8: c7 00 86 00 00 00 movl $0x86,(%eax) 1080ae: eb 06 jmp 1080b6 return (*iop->handlers->fdatasync_h)( iop ); 1080b0: 89 45 08 mov %eax,0x8(%ebp) } 1080b3: c9 leave */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 1080b4: ff e2 jmp *%edx } 1080b6: 83 c8 ff or $0xffffffff,%eax 1080b9: c9 leave 1080ba: c3 ret =============================================================================== 0010dabc : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 10dabc: 55 push %ebp 10dabd: 89 e5 mov %esp,%ebp 10dabf: 57 push %edi 10dac0: 56 push %esi 10dac1: 53 push %ebx 10dac2: 83 ec 30 sub $0x30,%esp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 10dac5: 6a 00 push $0x0 10dac7: 6a 00 push $0x0 10dac9: ff 35 fc 52 12 00 pushl 0x1252fc 10dacf: e8 10 cb ff ff call 10a5e4 10dad4: 89 c2 mov %eax,%edx 10dad6: 83 c4 10 add $0x10,%esp 10dad9: be fc ff ff ff mov $0xfffffffc,%esi 10dade: 85 c0 test %eax,%eax 10dae0: 0f 85 f8 02 00 00 jne 10ddde RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 10dae6: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10dae9: 8b 18 mov (%eax),%ebx <== NOT EXECUTED if (pipe == NULL) { 10daeb: 85 db test %ebx,%ebx <== NOT EXECUTED 10daed: 0f 85 0a 01 00 00 jne 10dbfd <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 10daf3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10daf6: 6a 34 push $0x34 <== NOT EXECUTED 10daf8: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 10dafb: e8 3c 9e ff ff call 10793c <== NOT EXECUTED 10db00: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10db02: 89 c6 mov %eax,%esi <== NOT EXECUTED if (pipe == NULL) 10db04: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10db07: 85 c0 test %eax,%eax <== NOT EXECUTED 10db09: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10db0c: 0f 84 e4 00 00 00 je 10dbf6 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 10db12: b9 0d 00 00 00 mov $0xd,%ecx <== NOT EXECUTED 10db17: 89 c7 mov %eax,%edi <== NOT EXECUTED 10db19: 89 d0 mov %edx,%eax <== NOT EXECUTED 10db1b: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED pipe->Size = PIPE_BUF; 10db1d: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 10db24: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10db27: 68 00 02 00 00 push $0x200 <== NOT EXECUTED 10db2c: e8 0b 9e ff ff call 10793c <== NOT EXECUTED 10db31: 89 03 mov %eax,(%ebx) <== NOT EXECUTED if (! pipe->Buffer) 10db33: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10db36: 85 c0 test %eax,%eax <== NOT EXECUTED 10db38: 0f 84 ac 00 00 00 je 10dbea <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 10db3e: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED 10db41: 50 push %eax <== NOT EXECUTED 10db42: 6a 00 push $0x0 <== NOT EXECUTED 10db44: 6a 00 push $0x0 <== NOT EXECUTED 10db46: 0f be 05 58 34 12 00 movsbl 0x123458,%eax <== NOT EXECUTED 10db4d: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED 10db52: 50 push %eax <== NOT EXECUTED 10db53: e8 28 15 00 00 call 10f080 <== NOT EXECUTED 10db58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10db5b: 85 c0 test %eax,%eax <== NOT EXECUTED 10db5d: 75 7e jne 10dbdd <== 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( 10db5f: 8d 43 30 lea 0x30(%ebx),%eax <== NOT EXECUTED 10db62: 50 push %eax <== NOT EXECUTED 10db63: 6a 00 push $0x0 <== NOT EXECUTED 10db65: 6a 00 push $0x0 <== NOT EXECUTED 10db67: 0f be 05 58 34 12 00 movsbl 0x123458,%eax <== NOT EXECUTED 10db6e: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED 10db73: 50 push %eax <== NOT EXECUTED 10db74: e8 07 15 00 00 call 10f080 <== NOT EXECUTED 10db79: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10db7c: 85 c0 test %eax,%eax <== NOT EXECUTED 10db7e: 75 4f jne 10dbcf <== 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( 10db80: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10db83: 8d 43 28 lea 0x28(%ebx),%eax <== NOT EXECUTED 10db86: 50 push %eax <== NOT EXECUTED 10db87: 6a 00 push $0x0 <== NOT EXECUTED 10db89: 6a 10 push $0x10 <== NOT EXECUTED 10db8b: 6a 01 push $0x1 <== NOT EXECUTED 10db8d: 0f be 05 58 34 12 00 movsbl 0x123458,%eax <== NOT EXECUTED 10db94: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED 10db99: 50 push %eax <== NOT EXECUTED 10db9a: e8 19 c8 ff ff call 10a3b8 <== NOT EXECUTED 10db9f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10dba2: 85 c0 test %eax,%eax <== NOT EXECUTED 10dba4: 75 1b jne 10dbc1 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 10dba6: a0 58 34 12 00 mov 0x123458,%al <== NOT EXECUTED 10dbab: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10dbae: 88 15 58 34 12 00 mov %dl,0x123458 <== NOT EXECUTED 10dbb4: 3c 7a cmp $0x7a,%al <== NOT EXECUTED 10dbb6: 75 45 jne 10dbfd <== NOT EXECUTED c = 'a'; 10dbb8: c6 05 58 34 12 00 61 movb $0x61,0x123458 <== NOT EXECUTED 10dbbf: eb 3c jmp 10dbfd <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 10dbc1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dbc4: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10dbc7: e8 6c 15 00 00 call 10f138 <== NOT EXECUTED 10dbcc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 10dbcf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dbd2: ff 76 2c pushl 0x2c(%esi) <== NOT EXECUTED 10dbd5: e8 5e 15 00 00 call 10f138 <== NOT EXECUTED 10dbda: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 10dbdd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dbe0: ff 36 pushl (%esi) <== NOT EXECUTED 10dbe2: e8 b5 9a ff ff call 10769c <== NOT EXECUTED 10dbe7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_buf: free(pipe); 10dbea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dbed: 56 push %esi <== NOT EXECUTED 10dbee: e8 a9 9a ff ff call 10769c <== NOT EXECUTED 10dbf3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dbf6: be f4 ff ff ff mov $0xfffffff4,%esi <== NOT EXECUTED 10dbfb: eb 34 jmp 10dc31 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 10dbfd: 50 push %eax <== NOT EXECUTED 10dbfe: 6a 00 push $0x0 <== NOT EXECUTED 10dc00: 6a 00 push $0x0 <== NOT EXECUTED 10dc02: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dc05: e8 da c9 ff ff call 10a5e4 <== NOT EXECUTED 10dc0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dc0d: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10dc10: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10dc12: f7 d6 not %esi <== NOT EXECUTED 10dc14: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 10dc17: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10dc1a: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 10dc1d: 75 12 jne 10dc31 <== NOT EXECUTED if (err) 10dc1f: 85 f6 test %esi,%esi <== NOT EXECUTED 10dc21: 74 09 je 10dc2c <== NOT EXECUTED pipe_free(pipe); 10dc23: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10dc25: e8 87 fd ff ff call 10d9b1 <== NOT EXECUTED 10dc2a: eb 05 jmp 10dc31 <== NOT EXECUTED else *pipep = pipe; 10dc2c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10dc2f: 89 18 mov %ebx,(%eax) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 10dc31: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dc34: ff 35 fc 52 12 00 pushl 0x1252fc <== NOT EXECUTED 10dc3a: e8 91 ca ff ff call 10a6d0 <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 10dc3f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dc42: 85 f6 test %esi,%esi <== NOT EXECUTED 10dc44: 0f 85 94 01 00 00 jne 10ddde <== NOT EXECUTED return err; pipe = *pipep; 10dc4a: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10dc4d: 8b 1a mov (%edx),%ebx <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 10dc4f: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10dc52: 8b 42 14 mov 0x14(%edx),%eax <== NOT EXECUTED 10dc55: 83 e0 06 and $0x6,%eax <== NOT EXECUTED 10dc58: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10dc5b: 0f 84 91 00 00 00 je 10dcf2 <== NOT EXECUTED 10dc61: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10dc64: 0f 84 10 01 00 00 je 10dd7a <== NOT EXECUTED 10dc6a: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10dc6d: 0f 85 49 01 00 00 jne 10ddbc <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; 10dc73: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10dc76: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10dc79: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10dc7c: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10dc7f: 85 c0 test %eax,%eax <== NOT EXECUTED 10dc81: 75 11 jne 10dc94 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10dc83: 57 push %edi <== NOT EXECUTED 10dc84: 57 push %edi <== NOT EXECUTED 10dc85: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10dc88: 50 push %eax <== NOT EXECUTED 10dc89: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10dc8c: e8 2f 15 00 00 call 10f1c0 <== NOT EXECUTED 10dc91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (pipe->Writers == 0) { 10dc94: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10dc98: 0f 85 1e 01 00 00 jne 10ddbc <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 10dc9e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10dca1: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10dca5: 0f 85 11 01 00 00 jne 10ddbc <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 10dcab: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 10dcae: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dcb1: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dcb4: e8 17 ca ff ff call 10a6d0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10dcb9: 5a pop %edx <== NOT EXECUTED 10dcba: 59 pop %ecx <== NOT EXECUTED 10dcbb: 6a 00 push $0x0 <== NOT EXECUTED 10dcbd: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10dcc0: e8 53 15 00 00 call 10f218 <== NOT EXECUTED 10dcc5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dcc8: 85 c0 test %eax,%eax <== NOT EXECUTED 10dcca: 0f 85 f9 00 00 00 jne 10ddc9 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 10dcd0: 50 push %eax <== NOT EXECUTED 10dcd1: 6a 00 push $0x0 <== NOT EXECUTED 10dcd3: 6a 00 push $0x0 <== NOT EXECUTED 10dcd5: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dcd8: e8 07 c9 ff ff call 10a5e4 <== NOT EXECUTED 10dcdd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dce0: 85 c0 test %eax,%eax <== NOT EXECUTED 10dce2: 0f 85 e1 00 00 00 jne 10ddc9 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 10dce8: 3b 7b 24 cmp 0x24(%ebx),%edi <== NOT EXECUTED 10dceb: 74 c1 je 10dcae <== NOT EXECUTED 10dced: e9 ca 00 00 00 jmp 10ddbc <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 10dcf2: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10dcf5: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10dcf8: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10dcfb: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10dcfe: 85 c0 test %eax,%eax <== NOT EXECUTED 10dd00: 75 11 jne 10dd13 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10dd02: 57 push %edi <== NOT EXECUTED 10dd03: 57 push %edi <== NOT EXECUTED 10dd04: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10dd07: 50 push %eax <== NOT EXECUTED 10dd08: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10dd0b: e8 b0 14 00 00 call 10f1c0 <== NOT EXECUTED 10dd10: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 10dd13: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10dd17: 0f 85 9f 00 00 00 jne 10ddbc <== NOT EXECUTED 10dd1d: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10dd20: f6 42 14 01 testb $0x1,0x14(%edx) <== NOT EXECUTED 10dd24: 74 18 je 10dd3e <== NOT EXECUTED PIPE_UNLOCK(pipe); 10dd26: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd29: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dd2c: e8 9f c9 ff ff call 10a6d0 <== NOT EXECUTED 10dd31: be fa ff ff ff mov $0xfffffffa,%esi <== NOT EXECUTED err = -ENXIO; goto out_error; 10dd36: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dd39: e9 90 00 00 00 jmp 10ddce <== NOT EXECUTED } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 10dd3e: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 10dd41: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd44: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dd47: e8 84 c9 ff ff call 10a6d0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10dd4c: 5a pop %edx <== NOT EXECUTED 10dd4d: 59 pop %ecx <== NOT EXECUTED 10dd4e: 6a 00 push $0x0 <== NOT EXECUTED 10dd50: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10dd53: e8 c0 14 00 00 call 10f218 <== NOT EXECUTED 10dd58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dd5b: 85 c0 test %eax,%eax <== NOT EXECUTED 10dd5d: 75 6a jne 10ddc9 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 10dd5f: 50 push %eax <== NOT EXECUTED 10dd60: 6a 00 push $0x0 <== NOT EXECUTED 10dd62: 6a 00 push $0x0 <== NOT EXECUTED 10dd64: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dd67: e8 78 c8 ff ff call 10a5e4 <== NOT EXECUTED 10dd6c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dd6f: 85 c0 test %eax,%eax <== NOT EXECUTED 10dd71: 75 56 jne 10ddc9 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 10dd73: 3b 7b 20 cmp 0x20(%ebx),%edi <== NOT EXECUTED 10dd76: 74 c9 je 10dd41 <== NOT EXECUTED 10dd78: eb 42 jmp 10ddbc <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 10dd7a: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10dd7d: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10dd80: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10dd83: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10dd86: 85 c0 test %eax,%eax <== NOT EXECUTED 10dd88: 75 11 jne 10dd9b <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10dd8a: 57 push %edi <== NOT EXECUTED 10dd8b: 57 push %edi <== NOT EXECUTED 10dd8c: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10dd8f: 50 push %eax <== NOT EXECUTED 10dd90: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10dd93: e8 28 14 00 00 call 10f1c0 <== NOT EXECUTED 10dd98: 83 c4 10 add $0x10,%esp <== NOT EXECUTED pipe->writerCounter ++; 10dd9b: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10dd9e: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10dda1: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10dda4: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10dda7: 85 c0 test %eax,%eax <== NOT EXECUTED 10dda9: 75 11 jne 10ddbc <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10ddab: 51 push %ecx <== NOT EXECUTED 10ddac: 51 push %ecx <== NOT EXECUTED 10ddad: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10ddb0: 50 push %eax <== NOT EXECUTED 10ddb1: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10ddb4: e8 07 14 00 00 call 10f1c0 <== NOT EXECUTED 10ddb9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 10ddbc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ddbf: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10ddc2: e8 09 c9 ff ff call 10a6d0 <== NOT EXECUTED 10ddc7: eb 12 jmp 10dddb <== NOT EXECUTED return 0; 10ddc9: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED out_error: pipe_release(pipep, iop); 10ddce: 52 push %edx <== NOT EXECUTED 10ddcf: 52 push %edx <== NOT EXECUTED 10ddd0: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10ddd3: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10ddd6: e8 11 fc ff ff call 10d9ec <== NOT EXECUTED return err; 10dddb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10ddde: 89 f0 mov %esi,%eax 10dde0: 8d 65 f4 lea -0xc(%ebp),%esp 10dde3: 5b pop %ebx 10dde4: 5e pop %esi 10dde5: 5f pop %edi 10dde6: c9 leave 10dde7: c3 ret =============================================================================== 001080bc : long fpathconf( int fd, int name ) { 1080bc: 55 push %ebp 1080bd: 89 e5 mov %esp,%ebp 1080bf: 83 ec 08 sub $0x8,%esp 1080c2: 8b 45 08 mov 0x8(%ebp),%eax 1080c5: 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); 1080c8: 3b 05 44 21 12 00 cmp 0x122144,%eax 1080ce: 73 11 jae 1080e1 iop = rtems_libio_iop(fd); 1080d0: c1 e0 06 shl $0x6,%eax 1080d3: 03 05 20 60 12 00 add 0x126020,%eax rtems_libio_check_is_open(iop); 1080d9: 8b 48 14 mov 0x14(%eax),%ecx 1080dc: f6 c5 01 test $0x1,%ch 1080df: 75 0d jne 1080ee <== ALWAYS TAKEN 1080e1: e8 22 a7 00 00 call 112808 <__errno> 1080e6: c7 00 09 00 00 00 movl $0x9,(%eax) 1080ec: eb 5b jmp 108149 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 1080ee: 80 e1 02 and $0x2,%cl 1080f1: 74 4b je 10813e <== NEVER TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 1080f3: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 1080f6: 83 fa 0b cmp $0xb,%edx 1080f9: 77 43 ja 10813e 1080fb: ff 24 95 40 09 12 00 jmp *0x120940(,%edx,4) case _PC_LINK_MAX: return_value = the_limits->link_max; 108102: 8b 40 38 mov 0x38(%eax),%eax break; 108105: eb 45 jmp 10814c case _PC_MAX_CANON: return_value = the_limits->max_canon; 108107: 8b 40 3c mov 0x3c(%eax),%eax break; 10810a: eb 40 jmp 10814c case _PC_MAX_INPUT: return_value = the_limits->max_input; 10810c: 8b 40 40 mov 0x40(%eax),%eax break; 10810f: eb 3b jmp 10814c case _PC_NAME_MAX: return_value = the_limits->name_max; 108111: 8b 40 44 mov 0x44(%eax),%eax break; 108114: eb 36 jmp 10814c case _PC_PATH_MAX: return_value = the_limits->path_max; 108116: 8b 40 48 mov 0x48(%eax),%eax break; 108119: eb 31 jmp 10814c case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 10811b: 8b 40 4c mov 0x4c(%eax),%eax break; 10811e: eb 2c jmp 10814c case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 108120: 8b 40 54 mov 0x54(%eax),%eax break; 108123: eb 27 jmp 10814c case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 108125: 8b 40 58 mov 0x58(%eax),%eax break; 108128: eb 22 jmp 10814c case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 10812a: 8b 40 64 mov 0x64(%eax),%eax break; 10812d: eb 1d jmp 10814c case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 10812f: 8b 40 50 mov 0x50(%eax),%eax break; 108132: eb 18 jmp 10814c case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 108134: 8b 40 5c mov 0x5c(%eax),%eax break; 108137: eb 13 jmp 10814c case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 108139: 8b 40 60 mov 0x60(%eax),%eax break; 10813c: eb 0e jmp 10814c default: rtems_set_errno_and_return_minus_one( EINVAL ); 10813e: e8 c5 a6 00 00 call 112808 <__errno> 108143: c7 00 16 00 00 00 movl $0x16,(%eax) 108149: 83 c8 ff or $0xffffffff,%eax break; } return return_value; } 10814c: c9 leave 10814d: c3 ret =============================================================================== 0010769c : void free( void *ptr ) { MSBUMP(free_calls, 1); 10769c: 55 push %ebp 10769d: 89 e5 mov %esp,%ebp 10769f: 53 push %ebx 1076a0: 83 ec 04 sub $0x4,%esp 1076a3: 8b 5d 08 mov 0x8(%ebp),%ebx 1076a6: ff 05 24 55 12 00 incl 0x125524 if ( !ptr ) 1076ac: 85 db test %ebx,%ebx 1076ae: 74 5f je 10770f /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1076b0: 83 3d e8 57 12 00 03 cmpl $0x3,0x1257e8 1076b7: 75 15 jne 1076ce <== NEVER TAKEN 1076b9: e8 56 01 00 00 call 107814 1076be: 84 c0 test %al,%al 1076c0: 75 0c jne 1076ce <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1076c2: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1076c5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1076c8: c9 leave <== NOT EXECUTED * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1076c9: e9 84 01 00 00 jmp 107852 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1076ce: a1 b0 39 12 00 mov 0x1239b0,%eax 1076d3: 85 c0 test %eax,%eax 1076d5: 74 0a je 1076e1 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 1076d7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1076da: 53 push %ebx <== NOT EXECUTED 1076db: ff 50 08 call *0x8(%eax) <== NOT EXECUTED 1076de: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 1076e1: 50 push %eax 1076e2: 50 push %eax 1076e3: 53 push %ebx 1076e4: ff 35 30 16 12 00 pushl 0x121630 1076ea: e8 29 46 00 00 call 10bd18 <_Protected_heap_Free> 1076ef: 83 c4 10 add $0x10,%esp 1076f2: 84 c0 test %al,%al 1076f4: 75 19 jne 10770f <== ALWAYS TAKEN printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 1076f6: a1 30 16 12 00 mov 0x121630,%eax <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 1076fb: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED 1076fe: ff 70 18 pushl 0x18(%eax) <== NOT EXECUTED 107701: 53 push %ebx <== NOT EXECUTED 107702: 68 87 ef 11 00 push $0x11ef87 <== NOT EXECUTED 107707: e8 68 0c 00 00 call 108374 <== NOT EXECUTED 10770c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 10770f: 8b 5d fc mov -0x4(%ebp),%ebx 107712: c9 leave 107713: c3 ret =============================================================================== 001088d4 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 1088d4: 55 push %ebp <== NOT EXECUTED 1088d5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1088d7: 53 push %ebx <== NOT EXECUTED 1088d8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 1088db: 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 1088de: 81 fb 70 50 12 00 cmp $0x125070,%ebx <== NOT EXECUTED 1088e4: 74 40 je 108926 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 1088e6: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 1088e9: 85 c0 test %eax,%eax <== NOT EXECUTED 1088eb: 74 13 je 108900 <== NOT EXECUTED 1088ed: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1088f0: 85 c0 test %eax,%eax <== NOT EXECUTED 1088f2: 74 0c je 108900 <== NOT EXECUTED 1088f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1088f7: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED 1088fa: 52 push %edx <== NOT EXECUTED 1088fb: ff d0 call *%eax <== NOT EXECUTED 1088fd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 108900: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 108903: 85 c0 test %eax,%eax <== NOT EXECUTED 108905: 74 13 je 10891a <== NOT EXECUTED 108907: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10890a: 85 c0 test %eax,%eax <== NOT EXECUTED 10890c: 74 0c je 10891a <== NOT EXECUTED 10890e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108911: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED 108914: 52 push %edx <== NOT EXECUTED 108915: ff d0 call *%eax <== NOT EXECUTED 108917: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(env); 10891a: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 10891d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108920: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 108921: e9 b2 f0 ff ff jmp 1079d8 <== NOT EXECUTED } } 108926: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108929: c9 leave <== NOT EXECUTED 10892a: c3 ret <== NOT EXECUTED =============================================================================== 0011cf14 : int fstat( int fd, struct stat *sbuf ) { 11cf14: 55 push %ebp 11cf15: 89 e5 mov %esp,%ebp 11cf17: 57 push %edi 11cf18: 53 push %ebx 11cf19: 8b 55 08 mov 0x8(%ebp),%edx 11cf1c: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11cf1f: 85 db test %ebx,%ebx 11cf21: 75 0d jne 11cf30 rtems_set_errno_and_return_minus_one( EFAULT ); 11cf23: e8 34 4a ff ff call 11195c <__errno> 11cf28: c7 00 0e 00 00 00 movl $0xe,(%eax) 11cf2e: eb 5d jmp 11cf8d /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11cf30: 3b 15 24 16 12 00 cmp 0x121624,%edx 11cf36: 73 16 jae 11cf4e 11cf38: c1 e2 06 shl $0x6,%edx 11cf3b: 03 15 00 55 12 00 add 0x125500,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11cf41: f6 42 15 01 testb $0x1,0x15(%edx) 11cf45: 74 07 je 11cf4e <== NEVER TAKEN if ( !iop->handlers ) 11cf47: 8b 42 3c mov 0x3c(%edx),%eax 11cf4a: 85 c0 test %eax,%eax 11cf4c: 75 0d jne 11cf5b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 11cf4e: e8 09 4a ff ff call 11195c <__errno> 11cf53: c7 00 09 00 00 00 movl $0x9,(%eax) 11cf59: eb 32 jmp 11cf8d if ( !iop->handlers->fstat_h ) 11cf5b: 83 78 18 00 cmpl $0x0,0x18(%eax) 11cf5f: 75 0d jne 11cf6e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11cf61: e8 f6 49 ff ff call 11195c <__errno> <== NOT EXECUTED 11cf66: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11cf6c: eb 1f jmp 11cf8d <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11cf6e: b9 12 00 00 00 mov $0x12,%ecx 11cf73: 31 c0 xor %eax,%eax 11cf75: 89 df mov %ebx,%edi 11cf77: f3 ab rep stos %eax,%es:(%edi) return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 11cf79: 8b 42 3c mov 0x3c(%edx),%eax 11cf7c: 89 5d 0c mov %ebx,0xc(%ebp) 11cf7f: 83 c2 18 add $0x18,%edx 11cf82: 89 55 08 mov %edx,0x8(%ebp) 11cf85: 8b 40 18 mov 0x18(%eax),%eax } 11cf88: 5b pop %ebx 11cf89: 5f pop %edi 11cf8a: 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 ); 11cf8b: ff e0 jmp *%eax } 11cf8d: 83 c8 ff or $0xffffffff,%eax 11cf90: 5b pop %ebx 11cf91: 5f pop %edi 11cf92: c9 leave 11cf93: c3 ret =============================================================================== 00108260 : #include int fsync( int fd ) { 108260: 55 push %ebp 108261: 89 e5 mov %esp,%ebp 108263: 83 ec 08 sub $0x8,%esp 108266: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108269: 3b 05 44 21 12 00 cmp 0x122144,%eax 10826f: 73 2a jae 10829b <== NEVER TAKEN iop = rtems_libio_iop( fd ); 108271: c1 e0 06 shl $0x6,%eax 108274: 03 05 20 60 12 00 add 0x126020,%eax rtems_libio_check_is_open(iop); 10827a: 8b 50 14 mov 0x14(%eax),%edx 10827d: f6 c6 01 test $0x1,%dh 108280: 74 19 je 10829b <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108282: 80 e2 04 and $0x4,%dl 108285: 75 0d jne 108294 108287: e8 7c a5 00 00 call 112808 <__errno> 10828c: c7 00 16 00 00 00 movl $0x16,(%eax) 108292: eb 2e jmp 1082c2 /* * Now process the fsync(). */ if ( !iop->handlers ) 108294: 8b 50 3c mov 0x3c(%eax),%edx 108297: 85 d2 test %edx,%edx 108299: 75 0d jne 1082a8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 10829b: e8 68 a5 00 00 call 112808 <__errno> <== NOT EXECUTED 1082a0: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 1082a6: eb 1a jmp 1082c2 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 1082a8: 8b 52 28 mov 0x28(%edx),%edx 1082ab: 85 d2 test %edx,%edx 1082ad: 75 0d jne 1082bc rtems_set_errno_and_return_minus_one( ENOTSUP ); 1082af: e8 54 a5 00 00 call 112808 <__errno> 1082b4: c7 00 86 00 00 00 movl $0x86,(%eax) 1082ba: eb 06 jmp 1082c2 return (*iop->handlers->fsync_h)( iop ); 1082bc: 89 45 08 mov %eax,0x8(%ebp) } 1082bf: 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 ); 1082c0: ff e2 jmp *%edx } 1082c2: 83 c8 ff or $0xffffffff,%eax 1082c5: c9 leave 1082c6: c3 ret =============================================================================== 0010eb3c : int ftruncate( int fd, off_t length ) { 10eb3c: 55 push %ebp 10eb3d: 89 e5 mov %esp,%ebp 10eb3f: 57 push %edi 10eb40: 56 push %esi 10eb41: 53 push %ebx 10eb42: 83 ec 3c sub $0x3c,%esp 10eb45: 8b 5d 08 mov 0x8(%ebp),%ebx 10eb48: 8b 45 0c mov 0xc(%ebp),%eax 10eb4b: 8b 55 10 mov 0x10(%ebp),%edx 10eb4e: 89 45 c0 mov %eax,-0x40(%ebp) 10eb51: 89 55 c4 mov %edx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 10eb54: 3b 1d 24 16 12 00 cmp 0x121624,%ebx 10eb5a: 73 0f jae 10eb6b <== NEVER TAKEN iop = rtems_libio_iop( fd ); 10eb5c: c1 e3 06 shl $0x6,%ebx 10eb5f: 03 1d 00 55 12 00 add 0x125500,%ebx rtems_libio_check_is_open(iop); 10eb65: f6 43 15 01 testb $0x1,0x15(%ebx) 10eb69: 75 0d jne 10eb78 <== ALWAYS TAKEN 10eb6b: e8 ec 2d 00 00 call 11195c <__errno> <== NOT EXECUTED 10eb70: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10eb76: eb 5b jmp 10ebd3 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 10eb78: 8d 7d d4 lea -0x2c(%ebp),%edi 10eb7b: 8d 73 18 lea 0x18(%ebx),%esi 10eb7e: b9 05 00 00 00 mov $0x5,%ecx 10eb83: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 10eb85: 8b 45 e0 mov -0x20(%ebp),%eax 10eb88: 8b 40 10 mov 0x10(%eax),%eax 10eb8b: 85 c0 test %eax,%eax 10eb8d: 74 39 je 10ebc8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 10eb8f: 83 ec 0c sub $0xc,%esp 10eb92: 8d 55 d4 lea -0x2c(%ebp),%edx 10eb95: 52 push %edx 10eb96: ff d0 call *%eax 10eb98: 83 c4 10 add $0x10,%esp 10eb9b: 48 dec %eax 10eb9c: 75 0d jne 10ebab rtems_set_errno_and_return_minus_one( EISDIR ); 10eb9e: e8 b9 2d 00 00 call 11195c <__errno> 10eba3: c7 00 15 00 00 00 movl $0x15,(%eax) 10eba9: eb 28 jmp 10ebd3 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10ebab: f6 43 14 04 testb $0x4,0x14(%ebx) 10ebaf: 75 0d jne 10ebbe <== ALWAYS TAKEN 10ebb1: e8 a6 2d 00 00 call 11195c <__errno> <== NOT EXECUTED 10ebb6: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10ebbc: eb 15 jmp 10ebd3 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 10ebbe: 8b 43 3c mov 0x3c(%ebx),%eax 10ebc1: 8b 40 20 mov 0x20(%eax),%eax 10ebc4: 85 c0 test %eax,%eax 10ebc6: 75 10 jne 10ebd8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ebc8: e8 8f 2d 00 00 call 11195c <__errno> <== NOT EXECUTED 10ebcd: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10ebd3: 83 c8 ff or $0xffffffff,%eax 10ebd6: eb 0d jmp 10ebe5 return (*iop->handlers->ftruncate_h)( iop, length ); 10ebd8: 52 push %edx 10ebd9: ff 75 c4 pushl -0x3c(%ebp) 10ebdc: ff 75 c0 pushl -0x40(%ebp) 10ebdf: 53 push %ebx 10ebe0: ff d0 call *%eax 10ebe2: 83 c4 10 add $0x10,%esp } 10ebe5: 8d 65 f4 lea -0xc(%ebp),%esp 10ebe8: 5b pop %ebx 10ebe9: 5e pop %esi 10ebea: 5f pop %edi 10ebeb: c9 leave 10ebec: c3 ret =============================================================================== 0011e974 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 11e974: 55 push %ebp 11e975: 89 e5 mov %esp,%ebp 11e977: 57 push %edi 11e978: 56 push %esi 11e979: 53 push %ebx 11e97a: 83 ec 2c sub $0x2c,%esp 11e97d: 8b 45 08 mov 0x8(%ebp),%eax /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 11e980: 31 db xor %ebx,%ebx 11e982: 3b 05 44 41 12 00 cmp 0x124144,%eax 11e988: 73 0b jae 11e995 <== NEVER TAKEN 11e98a: 89 c3 mov %eax,%ebx 11e98c: c1 e3 06 shl $0x6,%ebx 11e98f: 03 1d 80 81 12 00 add 0x128180,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 11e995: 8d 7d d4 lea -0x2c(%ebp),%edi 11e998: 8d 73 18 lea 0x18(%ebx),%esi 11e99b: b9 05 00 00 00 mov $0x5,%ecx 11e9a0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 11e9a2: 8b 45 e0 mov -0x20(%ebp),%eax 11e9a5: 8b 40 10 mov 0x10(%eax),%eax 11e9a8: 85 c0 test %eax,%eax 11e9aa: 74 29 je 11e9d5 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 11e9ac: 83 ec 0c sub $0xc,%esp 11e9af: 8d 55 d4 lea -0x2c(%ebp),%edx 11e9b2: 52 push %edx 11e9b3: ff d0 call *%eax 11e9b5: 83 c4 10 add $0x10,%esp 11e9b8: 48 dec %eax 11e9b9: 74 10 je 11e9cb rtems_set_errno_and_return_minus_one( ENOTDIR ); 11e9bb: e8 d8 40 ff ff call 112a98 <__errno> 11e9c0: c7 00 14 00 00 00 movl $0x14,(%eax) 11e9c6: 83 c8 ff or $0xffffffff,%eax 11e9c9: eb 24 jmp 11e9ef /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 11e9cb: 8b 43 3c mov 0x3c(%ebx),%eax 11e9ce: 8b 40 08 mov 0x8(%eax),%eax 11e9d1: 85 c0 test %eax,%eax 11e9d3: 75 0d jne 11e9e2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11e9d5: e8 be 40 ff ff call 112a98 <__errno> 11e9da: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11e9e0: eb e4 jmp 11e9c6 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 11e9e2: 52 push %edx 11e9e3: ff 75 10 pushl 0x10(%ebp) 11e9e6: ff 75 0c pushl 0xc(%ebp) 11e9e9: 53 push %ebx 11e9ea: ff d0 call *%eax 11e9ec: 83 c4 10 add $0x10,%esp } 11e9ef: 8d 65 f4 lea -0xc(%ebp),%esp 11e9f2: 5b pop %ebx 11e9f3: 5e pop %esi 11e9f4: 5f pop %edi 11e9f5: c9 leave 11e9f6: c3 ret =============================================================================== 00107d1e : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 107d1e: 55 push %ebp 107d1f: 89 e5 mov %esp,%ebp 107d21: 57 push %edi 107d22: 56 push %esi 107d23: 53 push %ebx 107d24: 83 ec 1c sub $0x1c,%esp 107d27: 89 c7 mov %eax,%edi 107d29: 89 55 e4 mov %edx,-0x1c(%ebp) 107d2c: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 107d2e: e8 df fe ff ff call 107c12 if ((fp = fopen("/etc/group", "r")) == NULL) { 107d33: 53 push %ebx 107d34: 53 push %ebx 107d35: 68 b3 f0 11 00 push $0x11f0b3 107d3a: 68 db 03 12 00 push $0x1203db 107d3f: e8 a8 ac 00 00 call 1129ec 107d44: 89 c3 mov %eax,%ebx 107d46: 83 c4 10 add $0x10,%esp 107d49: 85 c0 test %eax,%eax 107d4b: 75 10 jne 107d5d <== ALWAYS TAKEN errno = EINVAL; 107d4d: e8 ea a4 00 00 call 11223c <__errno> <== NOT EXECUTED 107d52: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107d58: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 107d5b: eb 6b jmp 107dc8 <== NOT EXECUTED } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 107d5d: 83 ec 0c sub $0xc,%esp 107d60: ff 75 0c pushl 0xc(%ebp) 107d63: 8b 4d 08 mov 0x8(%ebp),%ecx 107d66: 89 f2 mov %esi,%edx 107d68: 89 d8 mov %ebx,%eax 107d6a: e8 39 fc ff ff call 1079a8 107d6f: 83 c4 10 add $0x10,%esp 107d72: 85 c0 test %eax,%eax 107d74: 75 19 jne 107d8f <== ALWAYS TAKEN errno = EINVAL; 107d76: e8 c1 a4 00 00 call 11223c <__errno> <== NOT EXECUTED 107d7b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 107d81: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d84: 53 push %ebx <== NOT EXECUTED 107d85: e8 fe a5 00 00 call 112388 <== NOT EXECUTED 107d8a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d8d: eb 36 jmp 107dc5 <== NOT EXECUTED return -1; } if (name) { 107d8f: 85 ff test %edi,%edi 107d91: 74 11 je 107da4 <== NEVER TAKEN match = (strcmp(grp->gr_name, name) == 0); 107d93: 51 push %ecx 107d94: 51 push %ecx 107d95: 57 push %edi 107d96: ff 36 pushl (%esi) 107d98: e8 13 c0 00 00 call 113db0 107d9d: 83 c4 10 add $0x10,%esp 107da0: 85 c0 test %eax,%eax 107da2: eb 07 jmp 107dab } else { match = (grp->gr_gid == gid); 107da4: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 107da8: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 107dab: 0f 94 c0 sete %al 107dae: 0f b6 c0 movzbl %al,%eax } if (match) { 107db1: 85 c0 test %eax,%eax 107db3: 74 a8 je 107d5d fclose(fp); 107db5: 83 ec 0c sub $0xc,%esp 107db8: 53 push %ebx 107db9: e8 ca a5 00 00 call 112388 *result = grp; 107dbe: 8b 45 10 mov 0x10(%ebp),%eax 107dc1: 89 30 mov %esi,(%eax) 107dc3: 31 c0 xor %eax,%eax return 0; 107dc5: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 107dc8: 8d 65 f4 lea -0xc(%ebp),%esp 107dcb: 5b pop %ebx 107dcc: 5e pop %esi 107dcd: 5f pop %edi 107dce: c9 leave 107dcf: c3 ret =============================================================================== 00107aa7 : return NULL; return p; } struct group *getgrent(void) { 107aa7: 55 push %ebp <== NOT EXECUTED 107aa8: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107aaa: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp == NULL) 107aad: a1 00 5e 12 00 mov 0x125e00,%eax <== NOT EXECUTED 107ab2: 85 c0 test %eax,%eax <== NOT EXECUTED 107ab4: 74 25 je 107adb <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 107ab6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107ab9: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 107abe: b9 04 5e 12 00 mov $0x125e04,%ecx <== NOT EXECUTED 107ac3: ba cc 5e 12 00 mov $0x125ecc,%edx <== NOT EXECUTED 107ac8: e8 db fe ff ff call 1079a8 <== NOT EXECUTED 107acd: 89 c2 mov %eax,%edx <== NOT EXECUTED 107acf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107ad2: b8 cc 5e 12 00 mov $0x125ecc,%eax <== NOT EXECUTED 107ad7: 85 d2 test %edx,%edx <== NOT EXECUTED 107ad9: 75 02 jne 107add <== NOT EXECUTED 107adb: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &grent; } 107add: c9 leave <== NOT EXECUTED 107ade: c3 ret <== NOT EXECUTED =============================================================================== 00107dfa : } struct group *getgrgid( gid_t gid ) { 107dfa: 55 push %ebp <== NOT EXECUTED 107dfb: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107dfd: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 107e00: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 107e03: 50 push %eax <== NOT EXECUTED 107e04: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 107e09: 68 04 5e 12 00 push $0x125e04 <== NOT EXECUTED 107e0e: 68 cc 5e 12 00 push $0x125ecc <== NOT EXECUTED 107e13: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 107e17: 50 push %eax <== NOT EXECUTED 107e18: e8 b3 ff ff ff call 107dd0 <== NOT EXECUTED 107e1d: 89 c2 mov %eax,%edx <== NOT EXECUTED 107e1f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107e22: 31 c0 xor %eax,%eax <== NOT EXECUTED 107e24: 85 d2 test %edx,%edx <== NOT EXECUTED 107e26: 75 03 jne 107e2b <== NOT EXECUTED return NULL; return p; 107e28: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 107e2b: c9 leave <== NOT EXECUTED 107e2c: c3 ret <== NOT EXECUTED =============================================================================== 00107dd0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 107dd0: 55 push %ebp <== NOT EXECUTED 107dd1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107dd3: 53 push %ebx <== NOT EXECUTED 107dd4: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 107dd7: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107dda: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 107ddd: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 107de1: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 107de4: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 107de7: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 107dea: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 107ded: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 107df0: 31 c0 xor %eax,%eax <== NOT EXECUTED } 107df2: 5b pop %ebx <== NOT EXECUTED 107df3: 5b pop %ebx <== NOT EXECUTED 107df4: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 107df5: e9 24 ff ff ff jmp 107d1e <== NOT EXECUTED =============================================================================== 00107e56 : } struct group *getgrnam( const char *name ) { 107e56: 55 push %ebp 107e57: 89 e5 mov %esp,%ebp 107e59: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 107e5c: 8d 45 f4 lea -0xc(%ebp),%eax 107e5f: 50 push %eax 107e60: 68 c8 00 00 00 push $0xc8 107e65: 68 04 5e 12 00 push $0x125e04 107e6a: 68 cc 5e 12 00 push $0x125ecc 107e6f: ff 75 08 pushl 0x8(%ebp) 107e72: e8 b6 ff ff ff call 107e2d 107e77: 89 c2 mov %eax,%edx 107e79: 83 c4 20 add $0x20,%esp 107e7c: 31 c0 xor %eax,%eax 107e7e: 85 d2 test %edx,%edx 107e80: 75 03 jne 107e85 <== NEVER TAKEN return NULL; return p; 107e82: 8b 45 f4 mov -0xc(%ebp),%eax } 107e85: c9 leave 107e86: c3 ret =============================================================================== 00121c38 : * * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83 */ pid_t getpid( void ) { 121c38: 55 push %ebp <== NOT EXECUTED 121c39: 89 e5 mov %esp,%ebp <== NOT EXECUTED return _Objects_Local_node; } 121c3b: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 121c40: c9 leave <== NOT EXECUTED 121c41: c3 ret <== NOT EXECUTED =============================================================================== 00107ec2 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 107ec2: 55 push %ebp 107ec3: 89 e5 mov %esp,%ebp 107ec5: 57 push %edi 107ec6: 56 push %esi 107ec7: 53 push %ebx 107ec8: 83 ec 1c sub $0x1c,%esp 107ecb: 89 c7 mov %eax,%edi 107ecd: 89 55 e4 mov %edx,-0x1c(%ebp) 107ed0: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 107ed2: e8 3b fd ff ff call 107c12 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 107ed7: 51 push %ecx 107ed8: 51 push %ecx 107ed9: 68 b3 f0 11 00 push $0x11f0b3 107ede: 68 68 03 12 00 push $0x120368 107ee3: e8 04 ab 00 00 call 1129ec 107ee8: 89 c3 mov %eax,%ebx 107eea: 83 c4 10 add $0x10,%esp 107eed: 85 c0 test %eax,%eax 107eef: 75 10 jne 107f01 <== ALWAYS TAKEN errno = EINVAL; 107ef1: e8 46 a3 00 00 call 11223c <__errno> <== NOT EXECUTED 107ef6: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107efc: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 107eff: eb 6b jmp 107f6c <== NOT EXECUTED } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 107f01: 83 ec 0c sub $0xc,%esp 107f04: ff 75 0c pushl 0xc(%ebp) 107f07: 8b 4d 08 mov 0x8(%ebp),%ecx 107f0a: 89 f2 mov %esi,%edx 107f0c: 89 d8 mov %ebx,%eax 107f0e: e8 cc fb ff ff call 107adf 107f13: 83 c4 10 add $0x10,%esp 107f16: 85 c0 test %eax,%eax 107f18: 75 19 jne 107f33 <== ALWAYS TAKEN errno = EINVAL; 107f1a: e8 1d a3 00 00 call 11223c <__errno> <== NOT EXECUTED 107f1f: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 107f25: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107f28: 53 push %ebx <== NOT EXECUTED 107f29: e8 5a a4 00 00 call 112388 <== NOT EXECUTED 107f2e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107f31: eb 36 jmp 107f69 <== NOT EXECUTED return -1; } if (name) { 107f33: 85 ff test %edi,%edi 107f35: 74 11 je 107f48 <== NEVER TAKEN match = (strcmp(pwd->pw_name, name) == 0); 107f37: 52 push %edx 107f38: 52 push %edx 107f39: 57 push %edi 107f3a: ff 36 pushl (%esi) 107f3c: e8 6f be 00 00 call 113db0 107f41: 83 c4 10 add $0x10,%esp 107f44: 85 c0 test %eax,%eax 107f46: eb 07 jmp 107f4f } else { match = (pwd->pw_uid == uid); 107f48: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 107f4c: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 107f4f: 0f 94 c0 sete %al 107f52: 0f b6 c0 movzbl %al,%eax } if (match) { 107f55: 85 c0 test %eax,%eax 107f57: 74 a8 je 107f01 fclose(fp); 107f59: 83 ec 0c sub $0xc,%esp 107f5c: 53 push %ebx 107f5d: e8 26 a4 00 00 call 112388 *result = pwd; 107f62: 8b 45 10 mov 0x10(%ebp),%eax 107f65: 89 30 mov %esi,(%eax) 107f67: 31 c0 xor %eax,%eax return 0; 107f69: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 107f6c: 8d 65 f4 lea -0xc(%ebp),%esp 107f6f: 5b pop %ebx 107f70: 5e pop %esi 107f71: 5f pop %edi 107f72: c9 leave 107f73: c3 ret =============================================================================== 00107bda : return NULL; return p; } struct passwd *getpwent(void) { 107bda: 55 push %ebp <== NOT EXECUTED 107bdb: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107bdd: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp == NULL) 107be0: a1 18 5d 12 00 mov 0x125d18,%eax <== NOT EXECUTED 107be5: 85 c0 test %eax,%eax <== NOT EXECUTED 107be7: 74 25 je 107c0e <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 107be9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107bec: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 107bf1: b9 1c 5d 12 00 mov $0x125d1c,%ecx <== NOT EXECUTED 107bf6: ba e4 5d 12 00 mov $0x125de4,%edx <== NOT EXECUTED 107bfb: e8 df fe ff ff call 107adf <== NOT EXECUTED 107c00: 89 c2 mov %eax,%edx <== NOT EXECUTED 107c02: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107c05: b8 e4 5d 12 00 mov $0x125de4,%eax <== NOT EXECUTED 107c0a: 85 d2 test %edx,%edx <== NOT EXECUTED 107c0c: 75 02 jne 107c10 <== NOT EXECUTED 107c0e: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &pwent; } 107c10: c9 leave <== NOT EXECUTED 107c11: c3 ret <== NOT EXECUTED =============================================================================== 00107ffa : } struct passwd *getpwnam( const char *name ) { 107ffa: 55 push %ebp 107ffb: 89 e5 mov %esp,%ebp 107ffd: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 108000: 8d 45 f4 lea -0xc(%ebp),%eax 108003: 50 push %eax 108004: 68 c8 00 00 00 push $0xc8 108009: 68 1c 5d 12 00 push $0x125d1c 10800e: 68 e4 5d 12 00 push $0x125de4 108013: ff 75 08 pushl 0x8(%ebp) 108016: e8 b6 ff ff ff call 107fd1 10801b: 89 c2 mov %eax,%edx 10801d: 83 c4 20 add $0x20,%esp 108020: 31 c0 xor %eax,%eax 108022: 85 d2 test %edx,%edx 108024: 75 03 jne 108029 <== NEVER TAKEN return NULL; return p; 108026: 8b 45 f4 mov -0xc(%ebp),%eax } 108029: c9 leave 10802a: c3 ret =============================================================================== 00107f9e : } struct passwd *getpwuid( uid_t uid ) { 107f9e: 55 push %ebp <== NOT EXECUTED 107f9f: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107fa1: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 107fa4: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 107fa7: 50 push %eax <== NOT EXECUTED 107fa8: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 107fad: 68 1c 5d 12 00 push $0x125d1c <== NOT EXECUTED 107fb2: 68 e4 5d 12 00 push $0x125de4 <== NOT EXECUTED 107fb7: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 107fbb: 50 push %eax <== NOT EXECUTED 107fbc: e8 b3 ff ff ff call 107f74 <== NOT EXECUTED 107fc1: 89 c2 mov %eax,%edx <== NOT EXECUTED 107fc3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107fc6: 31 c0 xor %eax,%eax <== NOT EXECUTED 107fc8: 85 d2 test %edx,%edx <== NOT EXECUTED 107fca: 75 03 jne 107fcf <== NOT EXECUTED return NULL; return p; 107fcc: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 107fcf: c9 leave <== NOT EXECUTED 107fd0: c3 ret <== NOT EXECUTED =============================================================================== 00107f74 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 107f74: 55 push %ebp <== NOT EXECUTED 107f75: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107f77: 53 push %ebx <== NOT EXECUTED 107f78: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 107f7b: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107f7e: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 107f81: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 107f85: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 107f88: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 107f8b: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 107f8e: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 107f91: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 107f94: 31 c0 xor %eax,%eax <== NOT EXECUTED } 107f96: 5b pop %ebx <== NOT EXECUTED 107f97: 5b pop %ebx <== NOT EXECUTED 107f98: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 107f99: e9 24 ff ff ff jmp 107ec2 <== NOT EXECUTED =============================================================================== 00107714 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 107714: 55 push %ebp 107715: 89 e5 mov %esp,%ebp 107717: 56 push %esi 107718: 53 push %ebx 107719: 83 ec 10 sub $0x10,%esp 10771c: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 10771f: 85 db test %ebx,%ebx 107721: 75 10 jne 107733 <== ALWAYS TAKEN errno = EFAULT; 107723: e8 34 a2 00 00 call 11195c <__errno> <== NOT EXECUTED 107728: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10772e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 107731: eb 29 jmp 10775c <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 107733: 9c pushf 107734: fa cli 107735: 5e pop %esi _TOD_Get( &now ); 107736: 83 ec 0c sub $0xc,%esp 107739: 8d 45 f0 lea -0x10(%ebp),%eax 10773c: 50 push %eax 10773d: e8 9e 3a 00 00 call 10b1e0 <_TOD_Get> _ISR_Enable(level); 107742: 56 push %esi 107743: 9d popf useconds = (suseconds_t)now.tv_nsec; 107744: 8b 45 f4 mov -0xc(%ebp),%eax useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 107747: 8b 55 f0 mov -0x10(%ebp),%edx 10774a: 89 13 mov %edx,(%ebx) time->tv_usec = useconds; 10774c: b9 e8 03 00 00 mov $0x3e8,%ecx 107751: 99 cltd 107752: f7 f9 idiv %ecx 107754: 89 43 04 mov %eax,0x4(%ebx) 107757: 31 c0 xor %eax,%eax * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 107759: 83 c4 10 add $0x10,%esp } 10775c: 8d 65 f8 lea -0x8(%ebp),%esp 10775f: 5b pop %ebx 107760: 5e pop %esi 107761: c9 leave 107762: c3 ret =============================================================================== 00110f5c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 110f5c: 55 push %ebp 110f5d: 89 e5 mov %esp,%ebp 110f5f: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 110f62: 8b 4a 38 mov 0x38(%edx),%ecx 110f65: 83 c8 ff or $0xffffffff,%eax 110f68: 83 79 4c 01 cmpl $0x1,0x4c(%ecx) 110f6c: 75 10 jne 110f7e <== NEVER TAKEN if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 110f6e: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) 110f75: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 110f7c: 31 c0 xor %eax,%eax return 0; } 110f7e: c9 leave 110f7f: c3 ret =============================================================================== 00111080 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 111080: 55 push %ebp 111081: 89 e5 mov %esp,%ebp 111083: 56 push %esi 111084: 53 push %ebx 111085: 83 ec 10 sub $0x10,%esp 111088: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 11108b: 8b 1e mov (%esi),%ebx 11108d: 8d 43 54 lea 0x54(%ebx),%eax 111090: 39 43 50 cmp %eax,0x50(%ebx) 111093: 74 0d je 1110a2 /* * 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 ); 111095: e8 c2 08 00 00 call 11195c <__errno> 11109a: c7 00 5a 00 00 00 movl $0x5a,(%eax) 1110a0: eb 19 jmp 1110bb /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 1110a2: 8b 46 10 mov 0x10(%esi),%eax 1110a5: 39 58 1c cmp %ebx,0x1c(%eax) 1110a8: 74 06 je 1110b0 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 1110aa: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 1110ae: 74 10 je 1110c0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); 1110b0: e8 a7 08 00 00 call 11195c <__errno> 1110b5: c7 00 10 00 00 00 movl $0x10,(%eax) 1110bb: 83 c8 ff or $0xffffffff,%eax 1110be: eb 6b jmp 11112b /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 1110c0: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 1110c4: 74 13 je 1110d9 1110c6: 83 ec 0c sub $0xc,%esp 1110c9: 53 push %ebx 1110ca: e8 4d 9d ff ff call 10ae1c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 1110cf: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 1110d6: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 1110d9: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 1110dd: 50 push %eax 1110de: 50 push %eax 1110df: 6a 00 push $0x0 1110e1: 8d 45 f0 lea -0x10(%ebp),%eax 1110e4: 50 push %eax 1110e5: e8 2a 66 ff ff call 107714 1110ea: 8b 45 f0 mov -0x10(%ebp),%eax 1110ed: 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) ) { 1110f0: 89 1c 24 mov %ebx,(%esp) 1110f3: e8 36 db ff ff call 10ec2e 1110f8: 83 c4 10 add $0x10,%esp 1110fb: 85 c0 test %eax,%eax 1110fd: 75 2a jne 111129 1110ff: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 111104: 75 23 jne 111129 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 111106: a1 34 34 12 00 mov 0x123434,%eax 11110b: 8b 50 04 mov 0x4(%eax),%edx 11110e: 3b 16 cmp (%esi),%edx 111110: 75 07 jne 111119 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 111112: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 111119: 83 ec 0c sub $0xc,%esp 11111c: 53 push %ebx 11111d: e8 7a 65 ff ff call 10769c 111122: 31 c0 xor %eax,%eax 111124: 83 c4 10 add $0x10,%esp 111127: eb 02 jmp 11112b 111129: 31 c0 xor %eax,%eax } return 0; } 11112b: 8d 65 f8 lea -0x8(%ebp),%esp 11112e: 5b pop %ebx 11112f: 5e pop %esi 111130: c9 leave 111131: c3 ret =============================================================================== 00107c12 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 107c12: 55 push %ebp 107c13: 89 e5 mov %esp,%ebp 107c15: 53 push %ebx 107c16: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 107c19: 80 3d 14 5d 12 00 00 cmpb $0x0,0x125d14 107c20: 0f 85 b8 00 00 00 jne 107cde return; etc_passwd_initted = 1; 107c26: c6 05 14 5d 12 00 01 movb $0x1,0x125d14 mkdir("/etc", 0777); 107c2d: 50 push %eax 107c2e: 50 push %eax 107c2f: 68 ff 01 00 00 push $0x1ff 107c34: 68 63 03 12 00 push $0x120363 107c39: e8 ba 06 00 00 call 1082f8 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 107c3e: 59 pop %ecx 107c3f: 5b pop %ebx 107c40: 68 b3 f0 11 00 push $0x11f0b3 107c45: 68 68 03 12 00 push $0x120368 107c4a: e8 9d ad 00 00 call 1129ec 107c4f: 83 c4 10 add $0x10,%esp 107c52: 85 c0 test %eax,%eax 107c54: 74 06 je 107c5c <== ALWAYS TAKEN fclose(fp); 107c56: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107c59: 50 push %eax <== NOT EXECUTED 107c5a: eb 2a jmp 107c86 <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 107c5c: 52 push %edx 107c5d: 52 push %edx 107c5e: 68 bc ef 11 00 push $0x11efbc 107c63: 68 68 03 12 00 push $0x120368 107c68: e8 7f ad 00 00 call 1129ec 107c6d: 89 c3 mov %eax,%ebx 107c6f: 83 c4 10 add $0x10,%esp 107c72: 85 c0 test %eax,%eax 107c74: 74 18 je 107c8e <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 107c76: 50 push %eax 107c77: 50 push %eax 107c78: 53 push %ebx 107c79: 68 74 03 12 00 push $0x120374 107c7e: e8 35 ae 00 00 call 112ab8 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 107c83: 89 1c 24 mov %ebx,(%esp) 107c86: e8 fd a6 00 00 call 112388 107c8b: 83 c4 10 add $0x10,%esp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 107c8e: 51 push %ecx 107c8f: 51 push %ecx 107c90: 68 b3 f0 11 00 push $0x11f0b3 107c95: 68 db 03 12 00 push $0x1203db 107c9a: e8 4d ad 00 00 call 1129ec 107c9f: 83 c4 10 add $0x10,%esp 107ca2: 85 c0 test %eax,%eax 107ca4: 74 06 je 107cac <== ALWAYS TAKEN fclose(fp); 107ca6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107ca9: 50 push %eax <== NOT EXECUTED 107caa: eb 2a jmp 107cd6 <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 107cac: 52 push %edx 107cad: 52 push %edx 107cae: 68 bc ef 11 00 push $0x11efbc 107cb3: 68 db 03 12 00 push $0x1203db 107cb8: e8 2f ad 00 00 call 1129ec 107cbd: 89 c3 mov %eax,%ebx 107cbf: 83 c4 10 add $0x10,%esp 107cc2: 85 c0 test %eax,%eax 107cc4: 74 18 je 107cde <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 107cc6: 50 push %eax 107cc7: 50 push %eax 107cc8: 53 push %ebx 107cc9: 68 e6 03 12 00 push $0x1203e6 107cce: e8 e5 ad 00 00 call 112ab8 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 107cd3: 89 1c 24 mov %ebx,(%esp) 107cd6: e8 ad a6 00 00 call 112388 107cdb: 83 c4 10 add $0x10,%esp } } 107cde: 8b 5d fc mov -0x4(%ebp),%ebx 107ce1: c9 leave 107ce2: c3 ret =============================================================================== 0010a3d8 : int ioctl( int fd, ioctl_command_t command, ... ) { 10a3d8: 55 push %ebp 10a3d9: 89 e5 mov %esp,%ebp 10a3db: 83 ec 08 sub $0x8,%esp 10a3de: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 10a3e1: 3b 05 44 41 12 00 cmp 0x124144,%eax 10a3e7: 73 19 jae 10a402 iop = rtems_libio_iop( fd ); 10a3e9: c1 e0 06 shl $0x6,%eax 10a3ec: 03 05 f0 80 12 00 add 0x1280f0,%eax rtems_libio_check_is_open(iop); 10a3f2: f6 40 15 01 testb $0x1,0x15(%eax) 10a3f6: 74 0a je 10a402 <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 10a3f8: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Now process the ioctl(). */ if ( !iop->handlers ) 10a3fb: 8b 50 3c mov 0x3c(%eax),%edx 10a3fe: 85 d2 test %edx,%edx 10a400: 75 0d jne 10a40f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 10a402: e8 f5 ac 00 00 call 1150fc <__errno> 10a407: c7 00 09 00 00 00 movl $0x9,(%eax) 10a40d: eb 12 jmp 10a421 if ( !iop->handlers->ioctl_h ) 10a40f: 8b 52 10 mov 0x10(%edx),%edx 10a412: 85 d2 test %edx,%edx 10a414: 75 10 jne 10a426 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a416: e8 e1 ac 00 00 call 1150fc <__errno> <== NOT EXECUTED 10a41b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10a421: 83 c8 ff or $0xffffffff,%eax 10a424: eb 0d jmp 10a433 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 10a426: 83 ec 04 sub $0x4,%esp 10a429: 51 push %ecx 10a42a: ff 75 0c pushl 0xc(%ebp) 10a42d: 50 push %eax 10a42e: ff d2 call *%edx return rc; 10a430: 83 c4 10 add $0x10,%esp } 10a433: c9 leave 10a434: c3 ret =============================================================================== 00108e28 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 108e28: 55 push %ebp <== NOT EXECUTED 108e29: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108e2b: 53 push %ebx <== NOT EXECUTED 108e2c: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 108e2f: 89 d3 mov %edx,%ebx <== NOT EXECUTED 108e31: 88 c1 mov %al,%cl <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 108e33: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED 108e36: a8 20 test $0x20,%al <== NOT EXECUTED 108e38: 74 03 je 108e3d <== NOT EXECUTED c &= 0x7f; 108e3a: 83 e1 7f and $0x7f,%ecx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 108e3d: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 108e40: 74 17 je 108e59 <== NOT EXECUTED c = tolower (c); 108e42: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED 108e45: 8b 15 bc 34 12 00 mov 0x1234bc,%edx <== NOT EXECUTED 108e4b: 0f be 54 0a 01 movsbl 0x1(%edx,%ecx,1),%edx <== NOT EXECUTED 108e50: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 108e53: 4a dec %edx <== NOT EXECUTED 108e54: 75 03 jne 108e59 <== NOT EXECUTED 108e56: 83 c1 20 add $0x20,%ecx <== NOT EXECUTED if (c == '\r') { 108e59: 80 f9 0d cmp $0xd,%cl <== NOT EXECUTED 108e5c: 75 11 jne 108e6f <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 108e5e: 84 c0 test %al,%al <== NOT EXECUTED 108e60: 0f 88 d3 00 00 00 js 108f39 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 108e66: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 108e69: 74 19 je 108e84 <== NOT EXECUTED 108e6b: b1 0a mov $0xa,%cl <== NOT EXECUTED 108e6d: eb 15 jmp 108e84 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 108e6f: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED 108e72: 75 08 jne 108e7c <== NOT EXECUTED 108e74: a8 40 test $0x40,%al <== NOT EXECUTED 108e76: 74 0c je 108e84 <== NOT EXECUTED 108e78: b1 0d mov $0xd,%cl <== NOT EXECUTED 108e7a: eb 08 jmp 108e84 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 108e7c: 84 c9 test %cl,%cl <== NOT EXECUTED 108e7e: 0f 84 87 00 00 00 je 108f0b <== NOT EXECUTED 108e84: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED 108e87: f6 c2 02 test $0x2,%dl <== NOT EXECUTED 108e8a: 74 7f je 108f0b <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 108e8c: 3a 4b 43 cmp 0x43(%ebx),%cl <== NOT EXECUTED 108e8f: 75 04 jne 108e95 <== NOT EXECUTED erase (tty, 0); 108e91: 31 d2 xor %edx,%edx <== NOT EXECUTED 108e93: eb 0a jmp 108e9f <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { 108e95: 3a 4b 44 cmp 0x44(%ebx),%cl <== NOT EXECUTED 108e98: 75 11 jne 108eab <== NOT EXECUTED erase (tty, 1); 108e9a: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 108e9f: 89 d8 mov %ebx,%eax <== NOT EXECUTED 108ea1: e8 09 fe ff ff call 108caf <== NOT EXECUTED 108ea6: e9 8e 00 00 00 jmp 108f39 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 108eab: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 108eb0: 3a 4b 45 cmp 0x45(%ebx),%cl <== NOT EXECUTED 108eb3: 0f 84 82 00 00 00 je 108f3b <== NOT EXECUTED return 1; } else if (c == '\n') { 108eb9: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED 108ebc: 75 1a jne 108ed8 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 108ebe: 80 e2 48 and $0x48,%dl <== NOT EXECUTED 108ec1: 74 09 je 108ecc <== NOT EXECUTED echo (c, tty); 108ec3: 89 da mov %ebx,%edx <== NOT EXECUTED 108ec5: b0 0a mov $0xa,%al <== NOT EXECUTED 108ec7: e8 8b fd ff ff call 108c57 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108ecc: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108ecf: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108ed2: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED 108ed6: eb 28 jmp 108f00 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 108ed8: 3a 4b 4c cmp 0x4c(%ebx),%cl <== NOT EXECUTED 108edb: 74 05 je 108ee2 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 108edd: 3a 4b 51 cmp 0x51(%ebx),%cl <== NOT EXECUTED 108ee0: 75 29 jne 108f0b <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 108ee2: 80 e2 08 and $0x8,%dl <== NOT EXECUTED 108ee5: 74 10 je 108ef7 <== NOT EXECUTED echo (c, tty); 108ee7: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 108eea: 89 da mov %ebx,%edx <== NOT EXECUTED 108eec: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED 108eef: e8 63 fd ff ff call 108c57 <== NOT EXECUTED 108ef4: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108ef7: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108efa: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108efd: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED 108f00: 40 inc %eax <== NOT EXECUTED 108f01: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED 108f04: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 108f09: eb 30 jmp 108f3b <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 108f0b: a1 24 34 12 00 mov 0x123424,%eax <== NOT EXECUTED 108f10: 48 dec %eax <== NOT EXECUTED 108f11: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 108f14: 7d 23 jge 108f39 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 108f16: f6 43 3c 08 testb $0x8,0x3c(%ebx) <== NOT EXECUTED 108f1a: 74 10 je 108f2c <== NOT EXECUTED echo (c, tty); 108f1c: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 108f1f: 89 da mov %ebx,%edx <== NOT EXECUTED 108f21: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED 108f24: e8 2e fd ff ff call 108c57 <== NOT EXECUTED 108f29: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108f2c: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108f2f: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108f32: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED 108f35: 40 inc %eax <== NOT EXECUTED 108f36: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED 108f39: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 108f3b: 83 c4 14 add $0x14,%esp <== NOT EXECUTED 108f3e: 5b pop %ebx <== NOT EXECUTED 108f3f: c9 leave <== NOT EXECUTED 108f40: c3 ret <== NOT EXECUTED =============================================================================== 00121c60 : * These are directly supported (and completely correct) in the posix api. */ #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { 121c60: 55 push %ebp <== NOT EXECUTED 121c61: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 121c63: 31 c0 xor %eax,%eax <== NOT EXECUTED 121c65: c9 leave <== NOT EXECUTED 121c66: c3 ret <== NOT EXECUTED =============================================================================== 00108738 : int link( const char *existing, const char *new ) { 108738: 55 push %ebp 108739: 89 e5 mov %esp,%ebp 10873b: 57 push %edi 10873c: 56 push %esi 10873d: 53 push %ebx 10873e: 83 ec 48 sub $0x48,%esp 108741: 8b 55 08 mov 0x8(%ebp),%edx 108744: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 108747: 31 c0 xor %eax,%eax 108749: 83 c9 ff or $0xffffffff,%ecx 10874c: 89 d7 mov %edx,%edi 10874e: f2 ae repnz scas %es:(%edi),%al 108750: f7 d1 not %ecx 108752: 49 dec %ecx 108753: 6a 01 push $0x1 108755: 8d 75 cc lea -0x34(%ebp),%esi 108758: 56 push %esi 108759: 6a 00 push $0x0 10875b: 51 push %ecx 10875c: 52 push %edx 10875d: e8 e7 fb ff ff call 108349 0, &existing_loc, true ); if ( result != 0 ) 108762: 83 c4 20 add $0x20,%esp 108765: 83 cf ff or $0xffffffff,%edi 108768: 85 c0 test %eax,%eax 10876a: 0f 85 45 01 00 00 jne 1088b5 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 108770: 57 push %edi 108771: 8d 7d b8 lea -0x48(%ebp),%edi 108774: 57 push %edi 108775: 8d 45 e4 lea -0x1c(%ebp),%eax 108778: 50 push %eax 108779: 53 push %ebx 10877a: e8 99 0d 00 00 call 109518 if ( !parent_loc.ops->evalformake_h ) { 10877f: 8b 45 c4 mov -0x3c(%ebp),%eax 108782: 8b 40 04 mov 0x4(%eax),%eax 108785: 83 c4 10 add $0x10,%esp 108788: 85 c0 test %eax,%eax 10878a: 75 1f jne 1087ab <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); 10878c: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 10878f: 85 c0 test %eax,%eax <== NOT EXECUTED 108791: 0f 84 d0 00 00 00 je 108867 <== NOT EXECUTED 108797: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10879a: 85 c0 test %eax,%eax <== NOT EXECUTED 10879c: 0f 84 c5 00 00 00 je 108867 <== NOT EXECUTED 1087a2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1087a5: 56 push %esi <== NOT EXECUTED 1087a6: e9 b7 00 00 00 jmp 108862 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 1087ab: 51 push %ecx 1087ac: 8d 55 e0 lea -0x20(%ebp),%edx 1087af: 52 push %edx 1087b0: 57 push %edi 1087b1: 03 5d e4 add -0x1c(%ebp),%ebx 1087b4: 53 push %ebx 1087b5: ff d0 call *%eax 1087b7: 89 c3 mov %eax,%ebx if ( result != 0 ) { 1087b9: 83 c4 10 add $0x10,%esp 1087bc: 85 c0 test %eax,%eax 1087be: 74 26 je 1087e6 rtems_filesystem_freenode( &existing_loc ); 1087c0: 8b 45 d8 mov -0x28(%ebp),%eax 1087c3: 85 c0 test %eax,%eax 1087c5: 74 10 je 1087d7 <== NEVER TAKEN 1087c7: 8b 40 1c mov 0x1c(%eax),%eax 1087ca: 85 c0 test %eax,%eax 1087cc: 74 09 je 1087d7 <== NEVER TAKEN 1087ce: 83 ec 0c sub $0xc,%esp 1087d1: 56 push %esi 1087d2: ff d0 call *%eax 1087d4: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( result ); 1087d7: e8 bc a2 00 00 call 112a98 <__errno> 1087dc: 89 18 mov %ebx,(%eax) 1087de: 83 cf ff or $0xffffffff,%edi 1087e1: e9 cf 00 00 00 jmp 1088b5 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 1087e6: 8b 45 c8 mov -0x38(%ebp),%eax 1087e9: 3b 45 dc cmp -0x24(%ebp),%eax 1087ec: 74 3e je 10882c rtems_filesystem_freenode( &existing_loc ); 1087ee: 8b 45 d8 mov -0x28(%ebp),%eax 1087f1: 85 c0 test %eax,%eax 1087f3: 74 10 je 108805 <== NEVER TAKEN 1087f5: 8b 40 1c mov 0x1c(%eax),%eax 1087f8: 85 c0 test %eax,%eax 1087fa: 74 09 je 108805 <== NEVER TAKEN 1087fc: 83 ec 0c sub $0xc,%esp 1087ff: 56 push %esi 108800: ff d0 call *%eax 108802: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 108805: 8b 45 c4 mov -0x3c(%ebp),%eax 108808: 85 c0 test %eax,%eax 10880a: 74 13 je 10881f <== NEVER TAKEN 10880c: 8b 40 1c mov 0x1c(%eax),%eax 10880f: 85 c0 test %eax,%eax 108811: 74 0c je 10881f <== NEVER TAKEN 108813: 83 ec 0c sub $0xc,%esp 108816: 8d 55 b8 lea -0x48(%ebp),%edx 108819: 52 push %edx 10881a: ff d0 call *%eax 10881c: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 10881f: e8 74 a2 00 00 call 112a98 <__errno> 108824: c7 00 12 00 00 00 movl $0x12,(%eax) 10882a: eb b2 jmp 1087de } if ( !parent_loc.ops->link_h ) { 10882c: 8b 45 c4 mov -0x3c(%ebp),%eax 10882f: 8b 40 08 mov 0x8(%eax),%eax 108832: 85 c0 test %eax,%eax 108834: 75 41 jne 108877 <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); 108836: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 108839: 85 c0 test %eax,%eax <== NOT EXECUTED 10883b: 74 10 je 10884d <== NOT EXECUTED 10883d: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 108840: 85 c0 test %eax,%eax <== NOT EXECUTED 108842: 74 09 je 10884d <== NOT EXECUTED 108844: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108847: 56 push %esi <== NOT EXECUTED 108848: ff d0 call *%eax <== NOT EXECUTED 10884a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 10884d: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED 108850: 85 c0 test %eax,%eax <== NOT EXECUTED 108852: 74 13 je 108867 <== NOT EXECUTED 108854: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 108857: 85 c0 test %eax,%eax <== NOT EXECUTED 108859: 74 0c je 108867 <== NOT EXECUTED 10885b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10885e: 8d 55 b8 lea -0x48(%ebp),%edx <== NOT EXECUTED 108861: 52 push %edx <== NOT EXECUTED 108862: ff d0 call *%eax <== NOT EXECUTED 108864: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 108867: e8 2c a2 00 00 call 112a98 <__errno> <== NOT EXECUTED 10886c: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108872: e9 67 ff ff ff jmp 1087de <== NOT EXECUTED } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 108877: 52 push %edx 108878: ff 75 e0 pushl -0x20(%ebp) 10887b: 57 push %edi 10887c: 56 push %esi 10887d: ff d0 call *%eax 10887f: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &existing_loc ); 108881: 8b 45 d8 mov -0x28(%ebp),%eax 108884: 83 c4 10 add $0x10,%esp 108887: 85 c0 test %eax,%eax 108889: 74 10 je 10889b <== NEVER TAKEN 10888b: 8b 40 1c mov 0x1c(%eax),%eax 10888e: 85 c0 test %eax,%eax 108890: 74 09 je 10889b <== NEVER TAKEN 108892: 83 ec 0c sub $0xc,%esp 108895: 56 push %esi 108896: ff d0 call *%eax 108898: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 10889b: 8b 45 c4 mov -0x3c(%ebp),%eax 10889e: 85 c0 test %eax,%eax 1088a0: 74 13 je 1088b5 <== NEVER TAKEN 1088a2: 8b 40 1c mov 0x1c(%eax),%eax 1088a5: 85 c0 test %eax,%eax 1088a7: 74 0c je 1088b5 <== NEVER TAKEN 1088a9: 83 ec 0c sub $0xc,%esp 1088ac: 8d 55 b8 lea -0x48(%ebp),%edx 1088af: 52 push %edx 1088b0: ff d0 call *%eax 1088b2: 83 c4 10 add $0x10,%esp return result; } 1088b5: 89 f8 mov %edi,%eax 1088b7: 8d 65 f4 lea -0xc(%ebp),%esp 1088ba: 5b pop %ebx 1088bb: 5e pop %esi 1088bc: 5f pop %edi 1088bd: c9 leave 1088be: c3 ret =============================================================================== 0011cfc0 : off_t lseek( int fd, off_t offset, int whence ) { 11cfc0: 55 push %ebp 11cfc1: 89 e5 mov %esp,%ebp 11cfc3: 57 push %edi 11cfc4: 56 push %esi 11cfc5: 53 push %ebx 11cfc6: 83 ec 1c sub $0x1c,%esp 11cfc9: 8b 5d 08 mov 0x8(%ebp),%ebx 11cfcc: 8b 45 0c mov 0xc(%ebp),%eax 11cfcf: 8b 55 10 mov 0x10(%ebp),%edx 11cfd2: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11cfd5: 3b 1d 24 16 12 00 cmp 0x121624,%ebx 11cfdb: 73 0f jae 11cfec <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11cfdd: c1 e3 06 shl $0x6,%ebx 11cfe0: 03 1d 00 55 12 00 add 0x125500,%ebx rtems_libio_check_is_open(iop); 11cfe6: f6 43 15 01 testb $0x1,0x15(%ebx) 11cfea: 75 0d jne 11cff9 <== ALWAYS TAKEN 11cfec: e8 6b 49 ff ff call 11195c <__errno> <== NOT EXECUTED 11cff1: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11cff7: eb 61 jmp 11d05a <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 11cff9: 8b 73 3c mov 0x3c(%ebx),%esi 11cffc: 83 7e 14 00 cmpl $0x0,0x14(%esi) 11d000: 75 0d jne 11d00f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11d002: e8 55 49 ff ff call 11195c <__errno> <== NOT EXECUTED 11d007: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11d00d: eb 4b jmp 11d05a <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; 11d00f: 8b 73 0c mov 0xc(%ebx),%esi 11d012: 8b 7b 10 mov 0x10(%ebx),%edi 11d015: 89 75 e0 mov %esi,-0x20(%ebp) 11d018: 89 7d e4 mov %edi,-0x1c(%ebp) switch ( whence ) { 11d01b: 83 f9 01 cmp $0x1,%ecx 11d01e: 74 11 je 11d031 11d020: 83 f9 02 cmp $0x2,%ecx 11d023: 74 18 je 11d03d 11d025: 85 c9 test %ecx,%ecx 11d027: 75 26 jne 11d04f case SEEK_SET: iop->offset = offset; 11d029: 89 43 0c mov %eax,0xc(%ebx) 11d02c: 89 53 10 mov %edx,0x10(%ebx) break; 11d02f: eb 30 jmp 11d061 case SEEK_CUR: iop->offset += offset; 11d031: 8b 75 e0 mov -0x20(%ebp),%esi 11d034: 8b 7d e4 mov -0x1c(%ebp),%edi 11d037: 01 c6 add %eax,%esi 11d039: 11 d7 adc %edx,%edi 11d03b: eb 0a jmp 11d047 break; case SEEK_END: iop->offset = iop->size + offset; 11d03d: 89 c6 mov %eax,%esi 11d03f: 89 d7 mov %edx,%edi 11d041: 03 73 04 add 0x4(%ebx),%esi 11d044: 13 7b 08 adc 0x8(%ebx),%edi 11d047: 89 73 0c mov %esi,0xc(%ebx) 11d04a: 89 7b 10 mov %edi,0x10(%ebx) break; 11d04d: eb 12 jmp 11d061 default: rtems_set_errno_and_return_minus_one( EINVAL ); 11d04f: e8 08 49 ff ff call 11195c <__errno> 11d054: c7 00 16 00 00 00 movl $0x16,(%eax) 11d05a: 83 c8 ff or $0xffffffff,%eax 11d05d: 89 c2 mov %eax,%edx 11d05f: eb 23 jmp 11d084 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 11d061: 8b 73 3c mov 0x3c(%ebx),%esi 11d064: 51 push %ecx 11d065: 52 push %edx 11d066: 50 push %eax 11d067: 53 push %ebx 11d068: ff 56 14 call *0x14(%esi) if ( status == (off_t) -1 ) 11d06b: 83 c4 10 add $0x10,%esp 11d06e: 83 fa ff cmp $0xffffffff,%edx 11d071: 75 11 jne 11d084 11d073: 83 f8 ff cmp $0xffffffff,%eax 11d076: 75 0c jne 11d084 <== NEVER TAKEN iop->offset = old_offset; 11d078: 8b 75 e0 mov -0x20(%ebp),%esi 11d07b: 8b 7d e4 mov -0x1c(%ebp),%edi 11d07e: 89 73 0c mov %esi,0xc(%ebx) 11d081: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11d084: 8d 65 f4 lea -0xc(%ebp),%esp 11d087: 5b pop %ebx 11d088: 5e pop %esi 11d089: 5f pop %edi 11d08a: c9 leave 11d08b: c3 ret =============================================================================== 0010793c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 10793c: 55 push %ebp 10793d: 89 e5 mov %esp,%ebp 10793f: 57 push %edi 107940: 56 push %esi 107941: 53 push %ebx 107942: 83 ec 0c sub $0xc,%esp 107945: 8b 75 08 mov 0x8(%ebp),%esi 107948: ff 05 1c 55 12 00 incl 0x12551c /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 10794e: e8 17 ff ff ff call 10786a /* * Validate the parameters */ if ( !size ) 107953: 85 f6 test %esi,%esi 107955: 74 7c je 1079d3 <== NEVER TAKEN return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 107957: 83 3d e8 57 12 00 03 cmpl $0x3,0x1257e8 10795e: 75 09 jne 107969 107960: e8 af fe ff ff call 107814 107965: 84 c0 test %al,%al 107967: 74 6a je 1079d3 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 107969: 6a 00 push $0x0 10796b: 6a 00 push $0x0 10796d: 56 push %esi 10796e: ff 35 30 16 12 00 pushl 0x121630 107974: e8 67 43 00 00 call 10bce0 <_Protected_heap_Allocate_aligned_with_boundary> 107979: 89 c3 mov %eax,%ebx * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 10797b: 83 c4 10 add $0x10,%esp if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 10797e: 89 c7 mov %eax,%edi * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 107980: 85 c0 test %eax,%eax 107982: 75 26 jne 1079aa if (rtems_malloc_sbrk_helpers) 107984: a1 b4 39 12 00 mov 0x1239b4,%eax 107989: 85 c0 test %eax,%eax 10798b: 74 10 je 10799d <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 10798d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107990: 56 push %esi <== NOT EXECUTED 107991: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 107994: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( !return_this ) { 107996: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107999: 85 c0 test %eax,%eax <== NOT EXECUTED 10799b: 75 0d jne 1079aa <== NOT EXECUTED errno = ENOMEM; 10799d: e8 ba 9f 00 00 call 11195c <__errno> 1079a2: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 1079a8: eb 2b jmp 1079d5 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 1079aa: a1 b8 39 12 00 mov 0x1239b8,%eax 1079af: 85 c0 test %eax,%eax 1079b1: 74 09 je 1079bc <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 1079b3: 52 push %edx <== NOT EXECUTED 1079b4: 52 push %edx <== NOT EXECUTED 1079b5: 56 push %esi <== NOT EXECUTED 1079b6: 57 push %edi <== NOT EXECUTED 1079b7: ff d0 call *%eax <== NOT EXECUTED 1079b9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1079bc: a1 b0 39 12 00 mov 0x1239b0,%eax 1079c1: 89 fb mov %edi,%ebx 1079c3: 85 c0 test %eax,%eax 1079c5: 74 0e je 1079d5 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1079c7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1079ca: 57 push %edi <== NOT EXECUTED 1079cb: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 1079ce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1079d1: eb 02 jmp 1079d5 <== NOT EXECUTED 1079d3: 31 db xor %ebx,%ebx <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1079d5: 89 d8 mov %ebx,%eax 1079d7: 8d 65 f4 lea -0xc(%ebp),%esp 1079da: 5b pop %ebx 1079db: 5e pop %esi 1079dc: 5f pop %edi 1079dd: c9 leave 1079de: c3 ret =============================================================================== 00107852 : } void malloc_deferred_free( void *pointer ) { 107852: 55 push %ebp <== NOT EXECUTED 107853: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107855: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 107858: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10785b: 68 0c 55 12 00 push $0x12550c <== NOT EXECUTED 107860: e8 93 35 00 00 call 10adf8 <_Chain_Append> <== NOT EXECUTED 107865: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 107868: c9 leave <== NOT EXECUTED 107869: c3 ret <== NOT EXECUTED =============================================================================== 0010786a : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 10786a: 55 push %ebp 10786b: 89 e5 mov %esp,%ebp 10786d: 83 ec 08 sub $0x8,%esp rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 107870: eb 0c jmp 10787e free(to_be_freed); 107872: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107875: 50 push %eax <== NOT EXECUTED 107876: e8 21 fe ff ff call 10769c <== NOT EXECUTED 10787b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10787e: 83 ec 0c sub $0xc,%esp 107881: 68 0c 55 12 00 push $0x12550c 107886: e8 a9 35 00 00 call 10ae34 <_Chain_Get> rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 10788b: 83 c4 10 add $0x10,%esp 10788e: 85 c0 test %eax,%eax 107890: 75 e0 jne 107872 <== NEVER TAKEN free(to_be_freed); } 107892: c9 leave 107893: c3 ret =============================================================================== 00107814 : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 107814: 55 push %ebp 107815: 89 e5 mov %esp,%ebp if ( _Thread_Dispatch_disable_level > 0 ) 107817: 8b 15 50 56 12 00 mov 0x125650,%edx 10781d: 31 c0 xor %eax,%eax 10781f: 85 d2 test %edx,%edx 107821: 75 0a jne 10782d <== NEVER TAKEN return false; if ( _ISR_Nest_level > 0 ) 107823: a1 e8 56 12 00 mov 0x1256e8,%eax #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 107828: 85 c0 test %eax,%eax 10782a: 0f 94 c0 sete %al if ( _ISR_Nest_level > 0 ) return false; return true; } 10782d: c9 leave 10782e: c3 ret =============================================================================== 001100ac : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 1100ac: 55 push %ebp 1100ad: 89 e5 mov %esp,%ebp 1100af: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 1100b2: ff 35 ec 51 12 00 pushl 0x1251ec 1100b8: 6a 01 push $0x1 1100ba: e8 fd 73 ff ff call 1074bc if ( memory ) 1100bf: 83 c4 10 add $0x10,%esp 1100c2: 85 c0 test %eax,%eax 1100c4: 74 06 je 1100cc <== NEVER TAKEN memfile_blocks_allocated++; 1100c6: ff 05 00 53 12 00 incl 0x125300 return memory; } 1100cc: c9 leave 1100cd: c3 ret =============================================================================== 00110428 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 110428: 55 push %ebp 110429: 89 e5 mov %esp,%ebp 11042b: 53 push %ebx 11042c: 83 ec 10 sub $0x10,%esp 11042f: 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) ) { 110432: 53 push %ebx 110433: e8 f6 e7 ff ff call 10ec2e 110438: 83 c4 10 add $0x10,%esp 11043b: 85 c0 test %eax,%eax 11043d: 75 36 jne 110475 11043f: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 110444: 75 2f jne 110475 <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 110446: a1 34 34 12 00 mov 0x123434,%eax 11044b: 39 58 04 cmp %ebx,0x4(%eax) 11044e: 75 07 jne 110457 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 110450: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 110457: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 11045b: 74 0c je 110469 <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); 11045d: 83 ec 0c sub $0xc,%esp 110460: 53 push %ebx 110461: e8 98 fe ff ff call 1102fe 110466: 83 c4 10 add $0x10,%esp free( the_jnode ); 110469: 83 ec 0c sub $0xc,%esp 11046c: 53 push %ebx 11046d: e8 2a 72 ff ff call 10769c 110472: 83 c4 10 add $0x10,%esp } return 0; } 110475: 31 c0 xor %eax,%eax 110477: 8b 5d fc mov -0x4(%ebp),%ebx 11047a: c9 leave 11047b: c3 ret =============================================================================== 00110249 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 110249: 55 push %ebp 11024a: 89 e5 mov %esp,%ebp 11024c: 57 push %edi 11024d: 56 push %esi 11024e: 53 push %ebx 11024f: 83 ec 0c sub $0xc,%esp 110252: 8b 75 08 mov 0x8(%ebp),%esi /* * Perform internal consistency checks */ assert( block_table ); 110255: 85 f6 test %esi,%esi 110257: 75 19 jne 110272 <== ALWAYS TAKEN 110259: 68 f4 f6 11 00 push $0x11f6f4 11025e: 68 e8 f7 11 00 push $0x11f7e8 110263: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED 110268: 68 86 f6 11 00 push $0x11f686 <== NOT EXECUTED 11026d: e8 2e 71 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 110272: 8b 3e mov (%esi),%edi 110274: 31 db xor %ebx,%ebx for ( i=0 ; i if ( b[i] ) { 110278: 8b 04 9f mov (%edi,%ebx,4),%eax 11027b: 85 c0 test %eax,%eax 11027d: 74 13 je 110292 memfile_free_block( b[i] ); 11027f: 83 ec 0c sub $0xc,%esp 110282: 50 push %eax 110283: e8 0b fe ff ff call 110093 b[i] = 0; 110288: c7 04 9f 00 00 00 00 movl $0x0,(%edi,%ebx,4) 11028f: 83 c4 10 add $0x10,%esp * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 110298: 83 ec 0c sub $0xc,%esp 11029b: ff 36 pushl (%esi) 11029d: e8 f1 fd ff ff call 110093 *block_table = 0; 1102a2: c7 06 00 00 00 00 movl $0x0,(%esi) 1102a8: 83 c4 10 add $0x10,%esp } 1102ab: 8d 65 f4 lea -0xc(%ebp),%esp 1102ae: 5b pop %ebx 1102af: 5e pop %esi 1102b0: 5f pop %edi 1102b1: c9 leave 1102b2: c3 ret =============================================================================== 00110689 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 110689: 55 push %ebp 11068a: 89 e5 mov %esp,%ebp 11068c: 53 push %ebx 11068d: 83 ec 14 sub $0x14,%esp 110690: 8b 4d 08 mov 0x8(%ebp),%ecx 110693: 8b 45 0c mov 0xc(%ebp),%eax 110696: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 110699: 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 ) 11069c: 3b 53 54 cmp 0x54(%ebx),%edx 11069f: 7c 12 jl 1106b3 <== NEVER TAKEN 1106a1: 7f 05 jg 1106a8 <== NEVER TAKEN 1106a3: 3b 43 50 cmp 0x50(%ebx),%eax 1106a6: 76 0b jbe 1106b3 <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 1106a8: 51 push %ecx <== NOT EXECUTED 1106a9: 52 push %edx <== NOT EXECUTED 1106aa: 50 push %eax <== NOT EXECUTED 1106ab: 53 push %ebx <== NOT EXECUTED 1106ac: e8 b2 fe ff ff call 110563 <== NOT EXECUTED 1106b1: eb 21 jmp 1106d4 <== NOT EXECUTED * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 1106b3: 89 43 50 mov %eax,0x50(%ebx) 1106b6: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 1106b9: 89 41 04 mov %eax,0x4(%ecx) 1106bc: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 1106bf: 52 push %edx 1106c0: 52 push %edx 1106c1: 6a 00 push $0x0 1106c3: 8d 45 f0 lea -0x10(%ebp),%eax 1106c6: 50 push %eax 1106c7: e8 48 70 ff ff call 107714 1106cc: 8b 45 f0 mov -0x10(%ebp),%eax 1106cf: 89 43 40 mov %eax,0x40(%ebx) 1106d2: 31 c0 xor %eax,%eax return 0; 1106d4: 83 c4 10 add $0x10,%esp } 1106d7: 8b 5d fc mov -0x4(%ebp),%ebx 1106da: c9 leave 1106db: c3 ret =============================================================================== 001106dc : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 1106dc: 55 push %ebp 1106dd: 89 e5 mov %esp,%ebp 1106df: 56 push %esi 1106e0: 53 push %ebx 1106e1: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 1106e4: 8b 73 38 mov 0x38(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 1106e7: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 1106eb: 75 1a jne 110707 <== ALWAYS TAKEN if (iop->offset > the_jnode->info.linearfile.size) 1106ed: 8b 56 50 mov 0x50(%esi),%edx <== NOT EXECUTED 1106f0: 8b 46 54 mov 0x54(%esi),%eax <== NOT EXECUTED 1106f3: 39 43 10 cmp %eax,0x10(%ebx) <== NOT EXECUTED 1106f6: 7c 41 jl 110739 <== NOT EXECUTED 1106f8: 7f 05 jg 1106ff <== NOT EXECUTED 1106fa: 39 53 0c cmp %edx,0xc(%ebx) <== NOT EXECUTED 1106fd: 76 3a jbe 110739 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 1106ff: 89 53 0c mov %edx,0xc(%ebx) <== NOT EXECUTED 110702: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED 110705: eb 32 jmp 110739 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 110707: 50 push %eax 110708: ff 73 10 pushl 0x10(%ebx) 11070b: ff 73 0c pushl 0xc(%ebx) 11070e: 56 push %esi 11070f: e8 4f fe ff ff call 110563 110714: 83 c4 10 add $0x10,%esp 110717: 85 c0 test %eax,%eax 110719: 74 12 je 11072d <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 11071b: e8 3c 12 00 00 call 11195c <__errno> <== NOT EXECUTED 110720: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 110726: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 110729: 89 c2 mov %eax,%edx <== NOT EXECUTED 11072b: eb 12 jmp 11073f <== NOT EXECUTED iop->size = the_jnode->info.file.size; 11072d: 8b 46 50 mov 0x50(%esi),%eax 110730: 8b 56 54 mov 0x54(%esi),%edx 110733: 89 43 04 mov %eax,0x4(%ebx) 110736: 89 53 08 mov %edx,0x8(%ebx) } return iop->offset; 110739: 8b 43 0c mov 0xc(%ebx),%eax 11073c: 8b 53 10 mov 0x10(%ebx),%edx } 11073f: 8d 65 f8 lea -0x8(%ebp),%esp 110742: 5b pop %ebx 110743: 5e pop %esi 110744: c9 leave 110745: c3 ret =============================================================================== 0011096b : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 11096b: 55 push %ebp 11096c: 89 e5 mov %esp,%ebp 11096e: 56 push %esi 11096f: 53 push %ebx 110970: 8b 75 08 mov 0x8(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 110973: 8b 5e 38 mov 0x38(%esi),%ebx /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 110976: f7 46 14 04 02 00 00 testl $0x204,0x14(%esi) 11097d: 74 54 je 1109d3 && (the_jnode->type == IMFS_LINEAR_FILE)) { 11097f: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 110983: 75 4e jne 1109d3 <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; 110985: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 110988: 8b 53 58 mov 0x58(%ebx),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 11098b: c7 43 4c 05 00 00 00 movl $0x5,0x4c(%ebx) <== NOT EXECUTED the_jnode->info.file.size = 0; 110992: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) <== NOT EXECUTED 110999: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 1109a0: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 1109a7: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 1109ae: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) <== NOT EXECUTED if ((count != 0) 1109b5: 85 c0 test %eax,%eax <== NOT EXECUTED 1109b7: 74 1a je 1109d3 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 1109b9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1109bc: 50 push %eax <== NOT EXECUTED 1109bd: 52 push %edx <== NOT EXECUTED 1109be: 6a 00 push $0x0 <== NOT EXECUTED 1109c0: 6a 00 push $0x0 <== NOT EXECUTED 1109c2: 53 push %ebx <== NOT EXECUTED 1109c3: e8 7e fd ff ff call 110746 <== NOT EXECUTED 1109c8: 89 c2 mov %eax,%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 1109ca: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1109cd: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1109d0: 42 inc %edx <== NOT EXECUTED 1109d1: 74 20 je 1109f3 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 1109d3: f6 46 15 02 testb $0x2,0x15(%esi) 1109d7: 74 0c je 1109e5 iop->offset = the_jnode->info.file.size; 1109d9: 8b 43 50 mov 0x50(%ebx),%eax 1109dc: 8b 53 54 mov 0x54(%ebx),%edx 1109df: 89 46 0c mov %eax,0xc(%esi) 1109e2: 89 56 10 mov %edx,0x10(%esi) iop->size = the_jnode->info.file.size; 1109e5: 8b 43 50 mov 0x50(%ebx),%eax 1109e8: 8b 53 54 mov 0x54(%ebx),%edx 1109eb: 89 46 04 mov %eax,0x4(%esi) 1109ee: 89 56 08 mov %edx,0x8(%esi) 1109f1: 31 c0 xor %eax,%eax return 0; } 1109f3: 8d 65 f8 lea -0x8(%ebp),%esp 1109f6: 5b pop %ebx 1109f7: 5e pop %esi 1109f8: c9 leave 1109f9: c3 ret =============================================================================== 0011047c : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 11047c: 55 push %ebp 11047d: 89 e5 mov %esp,%ebp 11047f: 53 push %ebx 110480: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 110483: 8b 45 0c mov 0xc(%ebp),%eax 110486: 8b 18 mov (%eax),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 110488: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 11048c: 74 13 je 1104a1 <== NEVER TAKEN 11048e: 83 ec 0c sub $0xc,%esp 110491: 53 push %ebx 110492: e8 85 a9 ff ff call 10ae1c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 110497: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 11049e: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 1104a1: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 1104a5: 50 push %eax 1104a6: 50 push %eax 1104a7: 6a 00 push $0x0 1104a9: 8d 45 f0 lea -0x10(%ebp),%eax 1104ac: 50 push %eax 1104ad: e8 62 72 ff ff call 107714 1104b2: 8b 45 f0 mov -0x10(%ebp),%eax 1104b5: 89 43 48 mov %eax,0x48(%ebx) return memfile_check_rmnod( the_jnode ); 1104b8: 89 1c 24 mov %ebx,(%esp) 1104bb: e8 68 ff ff ff call 110428 } 1104c0: 8b 5d fc mov -0x4(%ebp),%ebx 1104c3: c9 leave 1104c4: c3 ret =============================================================================== 001079fc : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1079fc: 55 push %ebp 1079fd: 89 e5 mov %esp,%ebp 1079ff: 57 push %edi 107a00: 56 push %esi 107a01: 53 push %ebx 107a02: 83 ec 3c sub $0x3c,%esp 107a05: 8b 5d 08 mov 0x8(%ebp),%ebx 107a08: 8b 7d 0c mov 0xc(%ebp),%edi 107a0b: 8b 45 10 mov 0x10(%ebp),%eax 107a0e: 8b 55 14 mov 0x14(%ebp),%edx 107a11: 89 45 c0 mov %eax,-0x40(%ebp) 107a14: 89 55 c4 mov %edx,-0x3c(%ebp) rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 107a17: 66 f7 c7 00 f0 test $0xf000,%di 107a1c: 75 0d jne 107a2b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 107a1e: e8 39 9f 00 00 call 11195c <__errno> <== NOT EXECUTED 107a23: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107a29: eb 27 jmp 107a52 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 107a2b: 51 push %ecx 107a2c: 8d 75 cc lea -0x34(%ebp),%esi 107a2f: 56 push %esi 107a30: 8d 45 e4 lea -0x1c(%ebp),%eax 107a33: 50 push %eax 107a34: 53 push %ebx 107a35: e8 52 09 00 00 call 10838c if ( !temp_loc.ops->evalformake_h ) { 107a3a: 8b 45 d8 mov -0x28(%ebp),%eax 107a3d: 8b 40 04 mov 0x4(%eax),%eax 107a40: 83 c4 10 add $0x10,%esp 107a43: 85 c0 test %eax,%eax 107a45: 75 10 jne 107a57 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 107a47: e8 10 9f 00 00 call 11195c <__errno> <== NOT EXECUTED 107a4c: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 107a52: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 107a55: eb 5e jmp 107ab5 <== NOT EXECUTED } result = (*temp_loc.ops->evalformake_h)( 107a57: 52 push %edx 107a58: 8d 55 e0 lea -0x20(%ebp),%edx 107a5b: 52 push %edx 107a5c: 56 push %esi 107a5d: 03 5d e4 add -0x1c(%ebp),%ebx 107a60: 53 push %ebx 107a61: ff d0 call *%eax &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 107a63: 83 c4 10 add $0x10,%esp 107a66: 83 cb ff or $0xffffffff,%ebx 107a69: 85 c0 test %eax,%eax 107a6b: 75 48 jne 107ab5 return -1; if ( !temp_loc.ops->mknod_h ) { 107a6d: 8b 55 d8 mov -0x28(%ebp),%edx 107a70: 8b 42 14 mov 0x14(%edx),%eax 107a73: 85 c0 test %eax,%eax 107a75: 75 12 jne 107a89 <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); 107a77: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 107a7a: 85 c0 test %eax,%eax <== NOT EXECUTED 107a7c: 74 c9 je 107a47 <== NOT EXECUTED 107a7e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107a81: 56 push %esi <== NOT EXECUTED 107a82: ff d0 call *%eax <== NOT EXECUTED 107a84: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107a87: eb be jmp 107a47 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 107a89: 83 ec 0c sub $0xc,%esp 107a8c: 56 push %esi 107a8d: ff 75 c4 pushl -0x3c(%ebp) 107a90: ff 75 c0 pushl -0x40(%ebp) 107a93: 57 push %edi 107a94: ff 75 e0 pushl -0x20(%ebp) 107a97: ff d0 call *%eax 107a99: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &temp_loc ); 107a9b: 8b 45 d8 mov -0x28(%ebp),%eax 107a9e: 83 c4 20 add $0x20,%esp 107aa1: 85 c0 test %eax,%eax 107aa3: 74 10 je 107ab5 <== NEVER TAKEN 107aa5: 8b 40 1c mov 0x1c(%eax),%eax 107aa8: 85 c0 test %eax,%eax 107aaa: 74 09 je 107ab5 107aac: 83 ec 0c sub $0xc,%esp 107aaf: 56 push %esi 107ab0: ff d0 call *%eax 107ab2: 83 c4 10 add $0x10,%esp return result; } 107ab5: 89 d8 mov %ebx,%eax 107ab7: 8d 65 f4 lea -0xc(%ebp),%esp 107aba: 5b pop %ebx 107abb: 5e pop %esi 107abc: 5f pop %edi 107abd: c9 leave 107abe: c3 ret =============================================================================== 00107b2a : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 107b2a: 55 push %ebp 107b2b: 89 e5 mov %esp,%ebp 107b2d: 57 push %edi 107b2e: 56 push %esi 107b2f: 53 push %ebx 107b30: 83 ec 4c sub $0x4c,%esp 107b33: 8b 75 08 mov 0x8(%ebp),%esi /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 107b36: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 107b3a: 77 15 ja 107b51 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 107b3c: 83 ec 0c sub $0xc,%esp 107b3f: ff 75 10 pushl 0x10(%ebp) 107b42: e8 04 74 00 00 call 10ef4b 107b47: 89 45 b0 mov %eax,-0x50(%ebp) if ( !mount_h ) 107b4a: 83 c4 10 add $0x10,%esp 107b4d: 85 c0 test %eax,%eax 107b4f: 75 10 jne 107b61 rtems_set_errno_and_return_minus_one( EINVAL ); 107b51: e8 06 9e 00 00 call 11195c <__errno> 107b56: c7 00 16 00 00 00 movl $0x16,(%eax) 107b5c: e9 45 02 00 00 jmp 107da6 { 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; 107b61: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 107b65: 0f 95 45 bb setne -0x45(%ebp) const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 107b69: c7 45 bc 80 ef 11 00 movl $0x11ef80,-0x44(%ebp) 107b70: 80 7d bb 00 cmpb $0x0,-0x45(%ebp) 107b74: 74 06 je 107b7c 107b76: 8b 45 0c mov 0xc(%ebp),%eax 107b79: 89 45 bc mov %eax,-0x44(%ebp) size_t filesystemtype_size = strlen( filesystemtype ) + 1; 107b7c: 83 ca ff or $0xffffffff,%edx 107b7f: 31 c0 xor %eax,%eax 107b81: 89 d1 mov %edx,%ecx 107b83: 8b 7d 10 mov 0x10(%ebp),%edi 107b86: f2 ae repnz scas %es:(%edi),%al 107b88: f7 d1 not %ecx 107b8a: 89 4d c0 mov %ecx,-0x40(%ebp) size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 107b8d: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 107b94: 85 f6 test %esi,%esi 107b96: 74 0b je 107ba3 107b98: 89 d1 mov %edx,%ecx 107b9a: 89 f7 mov %esi,%edi 107b9c: f2 ae repnz scas %es:(%edi),%al 107b9e: f7 d1 not %ecx 107ba0: 89 4d c4 mov %ecx,-0x3c(%ebp) size_t target_length = strlen( target ); 107ba3: 31 c0 xor %eax,%eax 107ba5: 83 c9 ff or $0xffffffff,%ecx 107ba8: 8b 7d bc mov -0x44(%ebp),%edi 107bab: f2 ae repnz scas %es:(%edi),%al 107bad: f7 d1 not %ecx 107baf: 49 dec %ecx 107bb0: 89 4d b4 mov %ecx,-0x4c(%ebp) size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 107bb3: 53 push %ebx 107bb4: 53 push %ebx 107bb5: 8b 55 c0 mov -0x40(%ebp),%edx 107bb8: 8d 44 11 75 lea 0x75(%ecx,%edx,1),%eax 107bbc: 03 45 c4 add -0x3c(%ebp),%eax 107bbf: 50 push %eax 107bc0: 6a 01 push $0x1 107bc2: e8 f5 f8 ff ff call 1074bc 107bc7: 89 c3 mov %eax,%ebx if ( mt_entry != NULL ) { 107bc9: 83 c4 10 add $0x10,%esp 107bcc: 85 c0 test %eax,%eax 107bce: 74 62 je 107c32 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); 107bd0: 8d 78 74 lea 0x74(%eax),%edi strcpy( str, filesystemtype ); 107bd3: 52 push %edx 107bd4: 52 push %edx 107bd5: ff 75 10 pushl 0x10(%ebp) 107bd8: 57 push %edi 107bd9: e8 f2 a8 00 00 call 1124d0 mt_entry->type = str; 107bde: 89 7b 6c mov %edi,0x6c(%ebx) str += filesystemtype_size; 107be1: 03 7d c0 add -0x40(%ebp),%edi if ( source_or_null != NULL ) { 107be4: 83 c4 10 add $0x10,%esp 107be7: 85 f6 test %esi,%esi 107be9: 74 12 je 107bfd strcpy( str, source_or_null ); 107beb: 50 push %eax 107bec: 50 push %eax 107bed: 56 push %esi 107bee: 57 push %edi 107bef: e8 dc a8 00 00 call 1124d0 mt_entry->dev = str; 107bf4: 89 7b 70 mov %edi,0x70(%ebx) str += source_size; 107bf7: 03 7d c4 add -0x3c(%ebp),%edi 107bfa: 83 c4 10 add $0x10,%esp } strcpy( str, target ); 107bfd: 51 push %ecx 107bfe: 51 push %ecx 107bff: ff 75 bc pushl -0x44(%ebp) 107c02: 57 push %edi 107c03: e8 c8 a8 00 00 call 1124d0 mt_entry->target = str; 107c08: 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; 107c0b: 89 5b 2c mov %ebx,0x2c(%ebx) mt_entry->options = options; 107c0e: 8b 4d 14 mov 0x14(%ebp),%ecx 107c11: 89 4b 30 mov %ecx,0x30(%ebx) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 107c14: 8d 7b 38 lea 0x38(%ebx),%edi 107c17: be c0 ef 11 00 mov $0x11efc0,%esi 107c1c: b9 0c 00 00 00 mov $0xc,%ecx 107c21: 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 ) { 107c23: 83 c4 10 add $0x10,%esp 107c26: 80 7d bb 00 cmpb $0x0,-0x45(%ebp) 107c2a: 0f 84 bf 00 00 00 je 107cef 107c30: eb 10 jmp 107c42 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107c32: e8 25 9d 00 00 call 11195c <__errno> <== NOT EXECUTED 107c37: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107c3d: e9 64 01 00 00 jmp 107da6 <== NOT EXECUTED * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 107c42: 83 ec 0c sub $0xc,%esp 107c45: 6a 01 push $0x1 107c47: 8d 75 d4 lea -0x2c(%ebp),%esi 107c4a: 56 push %esi 107c4b: 6a 07 push $0x7 107c4d: ff 75 b4 pushl -0x4c(%ebp) 107c50: ff 75 0c pushl 0xc(%ebp) 107c53: e8 d9 f9 ff ff call 107631 107c58: 83 c4 20 add $0x20,%esp 107c5b: 40 inc %eax 107c5c: 0f 84 16 01 00 00 je 107d78 <== NEVER TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 107c62: 8b 45 e0 mov -0x20(%ebp),%eax 107c65: 8b 40 10 mov 0x10(%eax),%eax 107c68: 85 c0 test %eax,%eax 107c6a: 74 61 je 107ccd <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 107c6c: 83 ec 0c sub $0xc,%esp 107c6f: 56 push %esi 107c70: ff d0 call *%eax 107c72: 83 c4 10 add $0x10,%esp 107c75: 48 dec %eax 107c76: 74 10 je 107c88 errno = ENOTDIR; 107c78: e8 df 9c 00 00 call 11195c <__errno> 107c7d: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 107c83: e9 f2 00 00 00 jmp 107d7a /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 107c88: 52 push %edx 107c89: 52 push %edx 107c8a: ff 75 d4 pushl -0x2c(%ebp) 107c8d: 68 c0 7a 10 00 push $0x107ac0 107c92: e8 3a fe ff ff call 107ad1 107c97: 83 c4 10 add $0x10,%esp 107c9a: 84 c0 test %al,%al 107c9c: 74 10 je 107cae errno = EBUSY; 107c9e: e8 b9 9c 00 00 call 11195c <__errno> 107ca3: c7 00 10 00 00 00 movl $0x10,(%eax) goto cleanup_and_bail; 107ca9: e9 cc 00 00 00 jmp 107d7a * 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; 107cae: 8b 45 d4 mov -0x2c(%ebp),%eax 107cb1: 89 43 08 mov %eax,0x8(%ebx) mt_entry->mt_point_node.handlers = loc.handlers; 107cb4: 8b 45 dc mov -0x24(%ebp),%eax 107cb7: 89 43 10 mov %eax,0x10(%ebx) mt_entry->mt_point_node.ops = loc.ops; 107cba: 8b 45 e0 mov -0x20(%ebp),%eax 107cbd: 89 43 14 mov %eax,0x14(%ebx) mt_entry->mt_point_node.mt_entry = loc.mt_entry; 107cc0: 8b 55 e4 mov -0x1c(%ebp),%edx 107cc3: 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 ){ 107cc6: 8b 40 20 mov 0x20(%eax),%eax 107cc9: 85 c0 test %eax,%eax 107ccb: 75 10 jne 107cdd <== ALWAYS TAKEN errno = ENOTSUP; 107ccd: e8 8a 9c 00 00 call 11195c <__errno> <== NOT EXECUTED 107cd2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 107cd8: e9 9d 00 00 00 jmp 107d7a <== NOT EXECUTED } if ( loc.ops->mount_h( mt_entry ) ) { 107cdd: 83 ec 0c sub $0xc,%esp 107ce0: 53 push %ebx 107ce1: ff d0 call *%eax 107ce3: 83 c4 10 add $0x10,%esp 107ce6: 85 c0 test %eax,%eax 107ce8: 74 20 je 107d0a <== ALWAYS TAKEN 107cea: e9 8b 00 00 00 jmp 107d7a <== NOT EXECUTED 107cef: 31 f6 xor %esi,%esi 107cf1: 81 3d 14 34 12 00 18 cmpl $0x123418,0x123414 107cf8: 34 12 00 107cfb: 74 0d je 107d0a <== ALWAYS TAKEN } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 107cfd: e8 5a 9c 00 00 call 11195c <__errno> <== NOT EXECUTED 107d02: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 107d08: eb 70 jmp 107d7a <== NOT EXECUTED * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 107d0a: 50 push %eax 107d0b: 50 push %eax 107d0c: ff 75 18 pushl 0x18(%ebp) 107d0f: 53 push %ebx 107d10: ff 55 b0 call *-0x50(%ebp) 107d13: 83 c4 10 add $0x10,%esp 107d16: 85 c0 test %eax,%eax 107d18: 74 15 je 107d2f <== ALWAYS TAKEN /* * Try to undo the mount operation */ if ( loc.ops->unmount_h ) { 107d1a: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 107d1d: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 107d20: 85 c0 test %eax,%eax <== NOT EXECUTED 107d22: 74 56 je 107d7a <== NOT EXECUTED loc.ops->unmount_h( mt_entry ); 107d24: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d27: 53 push %ebx <== NOT EXECUTED 107d28: ff d0 call *%eax <== NOT EXECUTED 107d2a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107d2d: eb 4b jmp 107d7a <== NOT EXECUTED rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 107d2f: 57 push %edi 107d30: 6a 00 push $0x0 107d32: 6a 00 push $0x0 107d34: ff 35 08 55 12 00 pushl 0x125508 107d3a: e8 a5 28 00 00 call 10a5e4 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 107d3f: 59 pop %ecx 107d40: 5e pop %esi 107d41: 53 push %ebx 107d42: 68 14 34 12 00 push $0x123414 107d47: e8 ac 30 00 00 call 10adf8 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 107d4c: 5a pop %edx 107d4d: ff 35 08 55 12 00 pushl 0x125508 107d53: e8 78 29 00 00 call 10a6d0 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 107d58: 83 c4 10 add $0x10,%esp 107d5b: 31 c0 xor %eax,%eax 107d5d: 80 7d bb 00 cmpb $0x0,-0x45(%ebp) 107d61: 75 46 jne 107da9 rtems_filesystem_root = mt_entry->mt_fs_root; 107d63: 8b 3d 34 34 12 00 mov 0x123434,%edi 107d69: 83 c7 18 add $0x18,%edi 107d6c: 8d 73 1c lea 0x1c(%ebx),%esi 107d6f: b9 05 00 00 00 mov $0x5,%ecx 107d74: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 107d76: eb 31 jmp 107da9 107d78: 31 f6 xor %esi,%esi return 0; cleanup_and_bail: free( mt_entry ); 107d7a: 83 ec 0c sub $0xc,%esp 107d7d: 53 push %ebx 107d7e: e8 19 f9 ff ff call 10769c if ( loc_to_free ) 107d83: 83 c4 10 add $0x10,%esp 107d86: 85 f6 test %esi,%esi 107d88: 74 1c je 107da6 <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); 107d8a: 8b 46 0c mov 0xc(%esi),%eax 107d8d: 85 c0 test %eax,%eax 107d8f: 74 15 je 107da6 <== NEVER TAKEN 107d91: 8b 40 1c mov 0x1c(%eax),%eax 107d94: 85 c0 test %eax,%eax 107d96: 74 0e je 107da6 <== NEVER TAKEN 107d98: 83 ec 0c sub $0xc,%esp 107d9b: 56 push %esi 107d9c: ff d0 call *%eax 107d9e: 83 c8 ff or $0xffffffff,%eax 107da1: 83 c4 10 add $0x10,%esp 107da4: eb 03 jmp 107da9 107da6: 83 c8 ff or $0xffffffff,%eax return -1; } 107da9: 8d 65 f4 lea -0xc(%ebp),%esp 107dac: 5b pop %ebx 107dad: 5e pop %esi 107dae: 5f pop %edi 107daf: c9 leave 107db0: c3 ret =============================================================================== 00107dbc : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 107dbc: 55 push %ebp 107dbd: 89 e5 mov %esp,%ebp 107dbf: 57 push %edi 107dc0: 56 push %esi 107dc1: 53 push %ebx 107dc2: 83 ec 0c sub $0xc,%esp 107dc5: 8b 7d 08 mov 0x8(%ebp),%edi 107dc8: 8b 75 0c mov 0xc(%ebp),%esi /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 107dcb: 39 f7 cmp %esi,%edi 107dcd: 75 08 jne 107dd7 ptr = _REENT; 107dcf: 8b 1d c0 34 12 00 mov 0x1234c0,%ebx 107dd5: eb 06 jmp 107ddd } else { ptr = deleted_task->libc_reent; 107dd7: 8b 9e ec 00 00 00 mov 0xec(%esi),%ebx } if (ptr && ptr != _global_impure_ptr) { 107ddd: 85 db test %ebx,%ebx 107ddf: 74 20 je 107e01 <== NEVER TAKEN 107de1: 3b 1d 00 fc 11 00 cmp 0x11fc00,%ebx 107de7: 74 18 je 107e01 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 107de9: 50 push %eax 107dea: 50 push %eax 107deb: 68 21 7e 10 00 push $0x107e21 107df0: 53 push %ebx 107df1: e8 16 a3 00 00 call 11210c <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 107df6: 89 1c 24 mov %ebx,(%esp) 107df9: e8 f3 53 00 00 call 10d1f1 <_Workspace_Free> 107dfe: 83 c4 10 add $0x10,%esp #endif } deleted_task->libc_reent = NULL; 107e01: c7 86 ec 00 00 00 00 movl $0x0,0xec(%esi) 107e08: 00 00 00 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 107e0b: 39 f7 cmp %esi,%edi 107e0d: 75 0a jne 107e19 _REENT = 0; 107e0f: c7 05 c0 34 12 00 00 movl $0x0,0x1234c0 107e16: 00 00 00 } } 107e19: 8d 65 f4 lea -0xc(%ebp),%esp 107e1c: 5b pop %ebx 107e1d: 5e pop %esi 107e1e: 5f pop %edi 107e1f: c9 leave 107e20: c3 ret =============================================================================== 00107e21 : */ int newlib_free_buffers( FILE *fp ) { 107e21: 55 push %ebp 107e22: 89 e5 mov %esp,%ebp 107e24: 53 push %ebx 107e25: 83 ec 10 sub $0x10,%esp 107e28: 8b 5d 08 mov 0x8(%ebp),%ebx switch ( fileno(fp) ) { 107e2b: 53 push %ebx 107e2c: e8 e3 9e 00 00 call 111d14 107e31: 83 c4 10 add $0x10,%esp 107e34: 83 f8 02 cmp $0x2,%eax 107e37: 77 26 ja 107e5f <== NEVER TAKEN case 0: case 1: case 2: if (fp->_flags & __SMBF) { 107e39: 80 7b 0c 00 cmpb $0x0,0xc(%ebx) 107e3d: 79 2c jns 107e6b <== ALWAYS TAKEN free( fp->_bf._base ); 107e3f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e42: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 107e45: e8 52 f8 ff ff call 10769c <== NOT EXECUTED fp->_flags &= ~__SMBF; 107e4a: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 107e50: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 107e56: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED 107e5d: eb 09 jmp 107e68 <== NOT EXECUTED } break; default: fclose(fp); 107e5f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e62: 53 push %ebx <== NOT EXECUTED 107e63: e8 40 9c 00 00 call 111aa8 <== NOT EXECUTED 107e68: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 107e6b: 31 c0 xor %eax,%eax 107e6d: 8b 5d fc mov -0x4(%ebp),%ebx 107e70: c9 leave 107e71: c3 ret =============================================================================== 001078d0 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 1078d0: 55 push %ebp 1078d1: 89 e5 mov %esp,%ebp 1078d3: 53 push %ebx 1078d4: 83 ec 04 sub $0x4,%esp 1078d7: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_driver status; if ( !initialized ) { 1078da: 80 3d c4 76 12 00 00 cmpb $0x0,0x1276c4 1078e1: 75 2b jne 10790e initialized = 1; 1078e3: c6 05 c4 76 12 00 01 movb $0x1,0x1276c4 status = rtems_io_register_name( 1078ea: 50 push %eax 1078eb: 6a 00 push $0x0 1078ed: 53 push %ebx 1078ee: 68 a0 06 12 00 push $0x1206a0 1078f3: e8 a5 05 00 00 call 107e9d "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 1078f8: 83 c4 10 add $0x10,%esp 1078fb: 85 c0 test %eax,%eax 1078fd: 74 09 je 107908 <== ALWAYS TAKEN rtems_fatal_error_occurred(status); 1078ff: 83 ec 0c sub $0xc,%esp 107902: 50 push %eax <== NOT EXECUTED 107903: e8 d4 3f 00 00 call 10b8dc <== NOT EXECUTED NULL_major = major; 107908: 89 1d f8 79 12 00 mov %ebx,0x1279f8 } return RTEMS_SUCCESSFUL; } 10790e: 31 c0 xor %eax,%eax 107910: 8b 5d fc mov -0x4(%ebp),%ebx 107913: c9 leave 107914: c3 ret =============================================================================== 001078b5 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 1078b5: 55 push %ebp 1078b6: 89 e5 mov %esp,%ebp 1078b8: 8b 45 10 mov 0x10(%ebp),%eax rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 1078bb: 85 c0 test %eax,%eax 1078bd: 74 06 je 1078c5 <== ALWAYS TAKEN rw_args->bytes_moved = rw_args->count; 1078bf: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED 1078c2: 89 50 18 mov %edx,0x18(%eax) <== NOT EXECUTED return NULL_SUCCESSFUL; } 1078c5: 31 c0 xor %eax,%eax 1078c7: c9 leave 1078c8: c3 ret =============================================================================== 0010814c : int open( const char *pathname, int flags, ... ) { 10814c: 55 push %ebp 10814d: 89 e5 mov %esp,%ebp 10814f: 57 push %edi 108150: 56 push %esi 108151: 53 push %ebx 108152: 83 ec 3c sub $0x3c,%esp /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 108155: 8b 45 0c mov 0xc(%ebp),%eax 108158: 40 inc %eax if ( ( status & _FREAD ) == _FREAD ) 108159: 89 c6 mov %eax,%esi 10815b: 83 e6 01 and $0x1,%esi 10815e: f7 de neg %esi 108160: 83 e6 04 and $0x4,%esi eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 108163: a8 02 test $0x2,%al 108165: 74 03 je 10816a eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 108167: 83 ce 02 or $0x2,%esi va_start(ap, flags); mode = va_arg( ap, int ); 10816a: 8b 45 10 mov 0x10(%ebp),%eax 10816d: 89 45 c4 mov %eax,-0x3c(%ebp) * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 108170: e8 c6 6b 00 00 call 10ed3b 108175: 89 c3 mov %eax,%ebx if ( iop == 0 ) { 108177: bf 17 00 00 00 mov $0x17,%edi 10817c: 85 c0 test %eax,%eax 10817e: 0f 84 a8 01 00 00 je 10832c /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 108184: 83 c9 ff or $0xffffffff,%ecx 108187: 8b 7d 08 mov 0x8(%ebp),%edi 10818a: 31 c0 xor %eax,%eax 10818c: f2 ae repnz scas %es:(%edi),%al 10818e: f7 d1 not %ecx 108190: 49 dec %ecx 108191: 83 ec 0c sub $0xc,%esp 108194: 6a 01 push $0x1 108196: 8d 45 d4 lea -0x2c(%ebp),%eax 108199: 50 push %eax 10819a: 56 push %esi 10819b: 51 push %ecx 10819c: ff 75 08 pushl 0x8(%ebp) 10819f: e8 8d f4 ff ff call 107631 1081a4: 89 c6 mov %eax,%esi pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 1081a6: 83 c4 20 add $0x20,%esp 1081a9: 83 f8 ff cmp $0xffffffff,%eax 1081ac: 75 7a jne 108228 if ( errno != ENOENT ) { 1081ae: e8 a9 97 00 00 call 11195c <__errno> 1081b3: 83 38 02 cmpl $0x2,(%eax) 1081b6: 75 2f jne 1081e7 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 1081b8: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 1081bf: 75 0c jne 1081cd 1081c1: 31 f6 xor %esi,%esi 1081c3: bf 02 00 00 00 mov $0x2,%edi 1081c8: e9 34 01 00 00 jmp 108301 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 1081cd: 6a 00 push $0x0 1081cf: 6a 00 push $0x0 1081d1: 8b 45 c4 mov -0x3c(%ebp),%eax 1081d4: 80 cc 80 or $0x80,%ah 1081d7: 50 push %eax 1081d8: ff 75 08 pushl 0x8(%ebp) 1081db: e8 1c f8 ff ff call 1079fc if ( rc ) { 1081e0: 83 c4 10 add $0x10,%esp 1081e3: 85 c0 test %eax,%eax 1081e5: 74 0e je 1081f5 <== ALWAYS TAKEN rc = errno; 1081e7: e8 70 97 00 00 call 11195c <__errno> 1081ec: 8b 38 mov (%eax),%edi 1081ee: 31 f6 xor %esi,%esi goto done; 1081f0: e9 08 01 00 00 jmp 1082fd } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 1081f5: 89 f1 mov %esi,%ecx 1081f7: 8b 7d 08 mov 0x8(%ebp),%edi 1081fa: 31 c0 xor %eax,%eax 1081fc: f2 ae repnz scas %es:(%edi),%al 1081fe: f7 d1 not %ecx 108200: 49 dec %ecx 108201: 83 ec 0c sub $0xc,%esp 108204: 6a 01 push $0x1 108206: 8d 45 d4 lea -0x2c(%ebp),%eax 108209: 50 push %eax 10820a: 6a 00 push $0x0 10820c: 51 push %ecx 10820d: ff 75 08 pushl 0x8(%ebp) 108210: e8 1c f4 ff ff call 107631 if ( status != 0 ) { /* The file did not exist */ 108215: 83 c4 20 add $0x20,%esp 108218: 85 c0 test %eax,%eax 10821a: 74 28 je 108244 <== ALWAYS TAKEN 10821c: 31 f6 xor %esi,%esi 10821e: bf 0d 00 00 00 mov $0xd,%edi <== NOT EXECUTED 108223: e9 d9 00 00 00 jmp 108301 <== NOT EXECUTED rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 108228: 8b 45 0c mov 0xc(%ebp),%eax 10822b: 25 00 0a 00 00 and $0xa00,%eax 108230: 3d 00 0a 00 00 cmp $0xa00,%eax 108235: 75 0d jne 108244 108237: 8d 75 d4 lea -0x2c(%ebp),%esi 10823a: bf 11 00 00 00 mov $0x11,%edi 10823f: e9 bd 00 00 00 jmp 108301 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 108244: 8b 45 dc mov -0x24(%ebp),%eax 108247: 89 43 3c mov %eax,0x3c(%ebx) iop->file_info = loc.node_access; 10824a: 8b 45 d4 mov -0x2c(%ebp),%eax 10824d: 89 43 38 mov %eax,0x38(%ebx) iop->flags |= rtems_libio_fcntl_flags( flags ); 108250: 8b 73 14 mov 0x14(%ebx),%esi 108253: 83 ec 0c sub $0xc,%esp 108256: ff 75 0c pushl 0xc(%ebp) 108259: e8 68 6b 00 00 call 10edc6 10825e: 09 f0 or %esi,%eax 108260: 89 43 14 mov %eax,0x14(%ebx) iop->pathinfo = loc; 108263: 8d 7b 18 lea 0x18(%ebx),%edi 108266: 8d 75 d4 lea -0x2c(%ebp),%esi 108269: b9 05 00 00 00 mov $0x5,%ecx 10826e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !iop->handlers || !iop->handlers->open_h ) { 108270: 8b 43 3c mov 0x3c(%ebx),%eax 108273: 83 c4 10 add $0x10,%esp 108276: 85 c0 test %eax,%eax 108278: 0f 84 cd 00 00 00 je 10834b <== NEVER TAKEN 10827e: 8b 00 mov (%eax),%eax 108280: 85 c0 test %eax,%eax 108282: 0f 84 c3 00 00 00 je 10834b <== NEVER TAKEN rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 108288: ff 75 c4 pushl -0x3c(%ebp) 10828b: ff 75 0c pushl 0xc(%ebp) 10828e: ff 75 08 pushl 0x8(%ebp) 108291: 53 push %ebx 108292: ff d0 call *%eax if ( rc ) { 108294: 83 c4 10 add $0x10,%esp 108297: 85 c0 test %eax,%eax 108299: 74 0c je 1082a7 rc = errno; 10829b: e8 bc 96 00 00 call 11195c <__errno> 1082a0: 8b 38 mov (%eax),%edi 1082a2: 8d 75 d4 lea -0x2c(%ebp),%esi goto done; 1082a5: eb 56 jmp 1082fd /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 1082a7: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 1082ae: 0f 84 84 00 00 00 je 108338 rc = ftruncate( iop - rtems_libio_iops, 0 ); 1082b4: 50 push %eax 1082b5: 6a 00 push $0x0 1082b7: 6a 00 push $0x0 1082b9: 89 d8 mov %ebx,%eax 1082bb: 2b 05 00 55 12 00 sub 0x125500,%eax 1082c1: c1 f8 06 sar $0x6,%eax 1082c4: 50 push %eax 1082c5: e8 72 68 00 00 call 10eb3c 1082ca: 89 c7 mov %eax,%edi if ( rc ) { 1082cc: 83 c4 10 add $0x10,%esp 1082cf: 85 c0 test %eax,%eax 1082d1: 74 65 je 108338 <== ALWAYS TAKEN if(errno) rc = errno; 1082d3: e8 84 96 00 00 call 11195c <__errno> <== NOT EXECUTED 1082d8: 83 38 00 cmpl $0x0,(%eax) <== NOT EXECUTED 1082db: 74 07 je 1082e4 <== NOT EXECUTED 1082dd: e8 7a 96 00 00 call 11195c <__errno> <== NOT EXECUTED 1082e2: 8b 38 mov (%eax),%edi <== NOT EXECUTED close( iop - rtems_libio_iops ); 1082e4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1082e7: 2b 1d 00 55 12 00 sub 0x125500,%ebx <== NOT EXECUTED 1082ed: c1 fb 06 sar $0x6,%ebx <== NOT EXECUTED 1082f0: 53 push %ebx <== NOT EXECUTED 1082f1: e8 be 67 00 00 call 10eab4 <== NOT EXECUTED 1082f6: 31 f6 xor %esi,%esi <== NOT EXECUTED 1082f8: 31 db xor %ebx,%ebx <== NOT EXECUTED 1082fa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 1082fd: 85 ff test %edi,%edi 1082ff: 74 37 je 108338 <== NEVER TAKEN if ( iop ) 108301: 85 db test %ebx,%ebx 108303: 74 0c je 108311 <== NEVER TAKEN rtems_libio_free( iop ); 108305: 83 ec 0c sub $0xc,%esp 108308: 53 push %ebx 108309: e8 d8 69 00 00 call 10ece6 10830e: 83 c4 10 add $0x10,%esp if ( loc_to_free ) 108311: 85 f6 test %esi,%esi 108313: 74 17 je 10832c rtems_filesystem_freenode( loc_to_free ); 108315: 8b 46 0c mov 0xc(%esi),%eax 108318: 85 c0 test %eax,%eax 10831a: 74 10 je 10832c <== NEVER TAKEN 10831c: 8b 40 1c mov 0x1c(%eax),%eax 10831f: 85 c0 test %eax,%eax 108321: 74 09 je 10832c <== NEVER TAKEN 108323: 83 ec 0c sub $0xc,%esp 108326: 56 push %esi 108327: ff d0 call *%eax 108329: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( rc ); 10832c: e8 2b 96 00 00 call 11195c <__errno> 108331: 89 38 mov %edi,(%eax) 108333: 83 c8 ff or $0xffffffff,%eax 108336: eb 0b jmp 108343 } return iop - rtems_libio_iops; 108338: 89 d8 mov %ebx,%eax 10833a: 2b 05 00 55 12 00 sub 0x125500,%eax 108340: c1 f8 06 sar $0x6,%eax } 108343: 8d 65 f4 lea -0xc(%ebp),%esp 108346: 5b pop %ebx 108347: 5e pop %esi 108348: 5f pop %edi 108349: c9 leave 10834a: c3 ret if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 10834b: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 10834e: bf 86 00 00 00 mov $0x86,%edi <== NOT EXECUTED 108353: eb ac jmp 108301 <== NOT EXECUTED =============================================================================== 001080ec : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 1080ec: 55 push %ebp 1080ed: 89 e5 mov %esp,%ebp 1080ef: 83 ec 0c sub $0xc,%esp int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 1080f2: 6a 00 push $0x0 1080f4: 6a 00 push $0x0 1080f6: 68 aa d9 11 00 push $0x11d9aa 1080fb: e8 4c 00 00 00 call 10814c 108100: 83 c4 10 add $0x10,%esp 108103: 40 inc %eax 108104: 74 41 je 108147 /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 108106: 52 push %edx 108107: 6a 00 push $0x0 108109: 6a 01 push $0x1 10810b: 68 aa d9 11 00 push $0x11d9aa 108110: e8 37 00 00 00 call 10814c 108115: 83 c4 10 add $0x10,%esp 108118: 40 inc %eax 108119: 75 0a jne 108125 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 10811b: 83 ec 0c sub $0xc,%esp 10811e: 68 31 44 54 55 push $0x55544431 <== NOT EXECUTED 108123: eb 1d jmp 108142 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 108125: 50 push %eax 108126: 6a 00 push $0x0 108128: 6a 01 push $0x1 10812a: 68 aa d9 11 00 push $0x11d9aa 10812f: e8 18 00 00 00 call 10814c 108134: 83 c4 10 add $0x10,%esp 108137: 40 inc %eax 108138: 75 0d jne 108147 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 10813a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10813d: 68 32 44 54 55 push $0x55544432 <== NOT EXECUTED 108142: e8 55 2a 00 00 call 10ab9c <== NOT EXECUTED } 108147: c9 leave 108148: c3 ret =============================================================================== 00108b39 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 108b39: 55 push %ebp 108b3a: 89 e5 mov %esp,%ebp 108b3c: 56 push %esi 108b3d: 53 push %ebx 108b3e: 83 ec 10 sub $0x10,%esp 108b41: 89 d3 mov %edx,%ebx 108b43: 88 45 f4 mov %al,-0xc(%ebp) int i; if (tty->termios.c_oflag & OPOST) { 108b46: 8b 52 34 mov 0x34(%edx),%edx 108b49: f6 c2 01 test $0x1,%dl 108b4c: 0f 84 ee 00 00 00 je 108c40 <== NEVER TAKEN switch (c) { 108b52: 3c 09 cmp $0x9,%al 108b54: 74 76 je 108bcc 108b56: 77 0d ja 108b65 <== ALWAYS TAKEN 108b58: 3c 08 cmp $0x8,%al <== NOT EXECUTED 108b5a: 0f 85 ab 00 00 00 jne 108c0b <== NOT EXECUTED 108b60: e9 99 00 00 00 jmp 108bfe <== NOT EXECUTED 108b65: 3c 0a cmp $0xa,%al 108b67: 74 0a je 108b73 108b69: 3c 0d cmp $0xd,%al 108b6b: 0f 85 9a 00 00 00 jne 108c0b <== ALWAYS TAKEN 108b71: eb 33 jmp 108ba6 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 108b73: 80 e2 20 and $0x20,%dl 108b76: 74 07 je 108b7f <== ALWAYS TAKEN tty->column = 0; 108b78: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 108b7f: f6 43 34 04 testb $0x4,0x34(%ebx) 108b83: 0f 84 b7 00 00 00 je 108c40 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); 108b89: 56 push %esi 108b8a: 53 push %ebx 108b8b: 6a 01 push $0x1 108b8d: 68 f0 ef 11 00 push $0x11eff0 108b92: e8 82 fe ff ff call 108a19 tty->column = 0; 108b97: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) 108b9e: 83 c4 10 add $0x10,%esp 108ba1: e9 9a 00 00 00 jmp 108c40 } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 108ba6: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 108ba9: 74 0a je 108bb5 <== NOT EXECUTED 108bab: 83 7b 28 00 cmpl $0x0,0x28(%ebx) <== NOT EXECUTED 108baf: 0f 84 9b 00 00 00 je 108c50 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 108bb5: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 108bb8: 74 09 je 108bc3 <== NOT EXECUTED c = '\n'; 108bba: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 108bbe: 80 e2 20 and $0x20,%dl <== NOT EXECUTED 108bc1: 74 7d je 108c40 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 108bc3: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED break; 108bca: eb 74 jmp 108c40 <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 108bcc: 8b 4b 28 mov 0x28(%ebx),%ecx 108bcf: 89 ce mov %ecx,%esi 108bd1: 83 e6 07 and $0x7,%esi 108bd4: b8 08 00 00 00 mov $0x8,%eax 108bd9: 29 f0 sub %esi,%eax if ((tty->termios.c_oflag & TABDLY) == XTABS) { 108bdb: 81 e2 00 18 00 00 and $0x1800,%edx 108be1: 81 fa 00 18 00 00 cmp $0x1800,%edx 108be7: 8d 14 08 lea (%eax,%ecx,1),%edx 108bea: 75 0d jne 108bf9 <== NEVER TAKEN tty->column += i; 108bec: 89 53 28 mov %edx,0x28(%ebx) rtems_termios_puts ( " ", i, tty); 108bef: 51 push %ecx 108bf0: 53 push %ebx 108bf1: 50 push %eax 108bf2: 68 24 ec 11 00 push $0x11ec24 108bf7: eb 4f jmp 108c48 return; } tty->column += i; 108bf9: 89 53 28 mov %edx,0x28(%ebx) <== NOT EXECUTED break; 108bfc: eb 42 jmp 108c40 <== NOT EXECUTED case '\b': if (tty->column > 0) 108bfe: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108c01: 85 c0 test %eax,%eax <== NOT EXECUTED 108c03: 7e 3b jle 108c40 <== NOT EXECUTED tty->column--; 108c05: 48 dec %eax <== NOT EXECUTED 108c06: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED 108c09: eb 35 jmp 108c40 <== NOT EXECUTED break; default: if (tty->termios.c_oflag & OLCUC) 108c0b: 80 e2 02 and $0x2,%dl 108c0e: 74 1c je 108c2c <== ALWAYS TAKEN c = toupper(c); 108c10: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108c13: 8b 15 bc 34 12 00 mov 0x1234bc,%edx <== NOT EXECUTED 108c19: 0f be 54 02 01 movsbl 0x1(%edx,%eax,1),%edx <== NOT EXECUTED 108c1e: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 108c21: 83 fa 02 cmp $0x2,%edx <== NOT EXECUTED 108c24: 75 03 jne 108c29 <== NOT EXECUTED 108c26: 83 e8 20 sub $0x20,%eax <== NOT EXECUTED 108c29: 88 45 f4 mov %al,-0xc(%ebp) <== NOT EXECUTED if (!iscntrl(c)) 108c2c: 0f b6 45 f4 movzbl -0xc(%ebp),%eax 108c30: 8b 15 bc 34 12 00 mov 0x1234bc,%edx 108c36: f6 44 02 01 20 testb $0x20,0x1(%edx,%eax,1) 108c3b: 75 03 jne 108c40 <== NEVER TAKEN tty->column++; 108c3d: ff 43 28 incl 0x28(%ebx) break; } } rtems_termios_puts (&c, 1, tty); 108c40: 52 push %edx 108c41: 53 push %ebx 108c42: 6a 01 push $0x1 108c44: 8d 45 f4 lea -0xc(%ebp),%eax 108c47: 50 push %eax 108c48: e8 cc fd ff ff call 108a19 108c4d: 83 c4 10 add $0x10,%esp } 108c50: 8d 65 f8 lea -0x8(%ebp),%esp 108c53: 5b pop %ebx 108c54: 5e pop %esi 108c55: c9 leave 108c56: c3 ret =============================================================================== 00110c70 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 110c70: 55 push %ebp 110c71: 89 e5 mov %esp,%ebp 110c73: 57 push %edi 110c74: 56 push %esi 110c75: 53 push %ebx 110c76: 83 ec 48 sub $0x48,%esp rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) 110c79: 6a 01 push $0x1 110c7b: 8d 5d c4 lea -0x3c(%ebp),%ebx 110c7e: 53 push %ebx 110c7f: 6a 07 push $0x7 110c81: 6a 03 push $0x3 110c83: 68 50 f8 11 00 push $0x11f850 110c88: e8 a4 69 ff ff call 107631 110c8d: 83 c4 20 add $0x20,%esp 110c90: 85 c0 test %eax,%eax 110c92: 74 2b je 110cbf <== NEVER TAKEN != 0) { if (errno != ENOENT) 110c94: e8 c3 0c 00 00 call 11195c <__errno> 110c99: 83 38 02 cmpl $0x2,(%eax) 110c9c: 0f 85 0c 01 00 00 jne 110dae <== NEVER TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 110ca2: 50 push %eax 110ca3: 50 push %eax 110ca4: 68 ff 03 00 00 push $0x3ff 110ca9: 68 50 f8 11 00 push $0x11f850 110cae: e8 2d 6d ff ff call 1079e0 110cb3: 83 c4 10 add $0x10,%esp 110cb6: 85 c0 test %eax,%eax 110cb8: 74 1c je 110cd6 <== ALWAYS TAKEN 110cba: e9 ef 00 00 00 jmp 110dae <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); 110cbf: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 110cc2: 85 c0 test %eax,%eax <== NOT EXECUTED 110cc4: 74 10 je 110cd6 <== NOT EXECUTED 110cc6: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 110cc9: 85 c0 test %eax,%eax <== NOT EXECUTED 110ccb: 74 09 je 110cd6 <== NOT EXECUTED 110ccd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110cd0: 53 push %ebx <== NOT EXECUTED 110cd1: ff d0 call *%eax <== NOT EXECUTED 110cd3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 110cd6: 8d 5d d9 lea -0x27(%ebp),%ebx 110cd9: be 55 f8 11 00 mov $0x11f855,%esi 110cde: b9 0a 00 00 00 mov $0xa,%ecx 110ce3: 89 df mov %ebx,%edi 110ce5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 110ce7: 0f b7 05 04 53 12 00 movzwl 0x125304,%eax 110cee: 8d 50 01 lea 0x1(%eax),%edx 110cf1: 66 89 15 04 53 12 00 mov %dx,0x125304 110cf8: 57 push %edi 110cf9: 50 push %eax 110cfa: 68 60 f8 11 00 push $0x11f860 110cff: 8d 45 e3 lea -0x1d(%ebp),%eax 110d02: 50 push %eax 110d03: e8 e8 15 00 00 call 1122f0 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 110d08: 59 pop %ecx 110d09: 5e pop %esi 110d0a: 68 80 01 00 00 push $0x180 110d0f: 53 push %ebx 110d10: e8 4f 06 00 00 call 111364 110d15: 83 c4 10 add $0x10,%esp 110d18: 85 c0 test %eax,%eax 110d1a: 74 0a je 110d26 <== ALWAYS TAKEN if (errno != EEXIST){ 110d1c: e8 3b 0c 00 00 call 11195c <__errno> <== NOT EXECUTED 110d21: e9 88 00 00 00 jmp 110dae <== NOT EXECUTED return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); 110d26: 52 push %edx 110d27: 52 push %edx 110d28: 68 00 40 00 00 push $0x4000 110d2d: 53 push %ebx 110d2e: e8 19 74 ff ff call 10814c 110d33: 8b 55 08 mov 0x8(%ebp),%edx 110d36: 89 02 mov %eax,(%edx) if (filsdes[0] < 0) { 110d38: 83 c4 10 add $0x10,%esp 110d3b: 85 c0 test %eax,%eax 110d3d: 79 0d jns 110d4c <== NEVER TAKEN err = errno; 110d3f: e8 18 0c 00 00 call 11195c <__errno> 110d44: 8b 30 mov (%eax),%esi /* Delete file at errors, or else if pipe is successfully created the file node will be deleted after it is closed by all. */ unlink(fifopath); 110d46: 83 ec 0c sub $0xc,%esp 110d49: 53 push %ebx 110d4a: eb 53 jmp 110d9f } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 110d4c: 31 d2 xor %edx,%edx <== NOT EXECUTED 110d4e: 3b 05 24 16 12 00 cmp 0x121624,%eax <== NOT EXECUTED 110d54: 73 0b jae 110d61 <== NOT EXECUTED 110d56: 89 c2 mov %eax,%edx <== NOT EXECUTED 110d58: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED 110d5b: 03 15 00 55 12 00 add 0x125500,%edx <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 110d61: 83 62 14 fe andl $0xfffffffe,0x14(%edx) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 110d65: 50 push %eax <== NOT EXECUTED 110d66: 50 push %eax <== NOT EXECUTED 110d67: 6a 01 push $0x1 <== NOT EXECUTED 110d69: 8d 45 d9 lea -0x27(%ebp),%eax <== NOT EXECUTED 110d6c: 50 push %eax <== NOT EXECUTED 110d6d: e8 da 73 ff ff call 10814c <== NOT EXECUTED 110d72: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 110d75: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED if (filsdes[1] < 0) { 110d78: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110d7b: 31 f6 xor %esi,%esi <== NOT EXECUTED 110d7d: 85 c0 test %eax,%eax <== NOT EXECUTED 110d7f: 79 17 jns 110d98 <== NOT EXECUTED err = errno; 110d81: e8 d6 0b 00 00 call 11195c <__errno> <== NOT EXECUTED 110d86: 8b 30 mov (%eax),%esi <== NOT EXECUTED close(filsdes[0]); 110d88: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110d8b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 110d8e: ff 30 pushl (%eax) <== NOT EXECUTED 110d90: e8 1f dd ff ff call 10eab4 <== NOT EXECUTED 110d95: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } unlink(fifopath); 110d98: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110d9b: 8d 45 d9 lea -0x27(%ebp),%eax <== NOT EXECUTED 110d9e: 50 push %eax <== NOT EXECUTED 110d9f: e8 dc 05 00 00 call 111380 110da4: 83 c4 10 add $0x10,%esp } rtems_set_errno_and_return_minus_one(err); 110da7: e8 b0 0b 00 00 call 11195c <__errno> 110dac: 89 30 mov %esi,(%eax) } 110dae: 83 c8 ff or $0xffffffff,%eax 110db1: 8d 65 f4 lea -0xc(%ebp),%esp 110db4: 5b pop %ebx 110db5: 5e pop %esi 110db6: 5f pop %edi 110db7: c9 leave 110db8: c3 ret =============================================================================== 0010d9b1 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 10d9b1: 55 push %ebp <== NOT EXECUTED 10d9b2: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d9b4: 53 push %ebx <== NOT EXECUTED 10d9b5: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10d9b8: 89 c3 mov %eax,%ebx <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 10d9ba: ff 70 2c pushl 0x2c(%eax) <== NOT EXECUTED 10d9bd: e8 76 17 00 00 call 10f138 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 10d9c2: 59 pop %ecx <== NOT EXECUTED 10d9c3: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10d9c6: e8 6d 17 00 00 call 10f138 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 10d9cb: 5a pop %edx <== NOT EXECUTED 10d9cc: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d9cf: e8 80 cb ff ff call 10a554 <== NOT EXECUTED free(pipe->Buffer); 10d9d4: 58 pop %eax <== NOT EXECUTED 10d9d5: ff 33 pushl (%ebx) <== NOT EXECUTED 10d9d7: e8 c0 9c ff ff call 10769c <== NOT EXECUTED free(pipe); 10d9dc: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10d9df: e8 b8 9c ff ff call 10769c <== NOT EXECUTED 10d9e4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10d9e7: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10d9ea: c9 leave <== NOT EXECUTED 10d9eb: c3 ret <== NOT EXECUTED =============================================================================== 0010d667 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 10d667: 55 push %ebp <== NOT EXECUTED 10d668: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d66a: 56 push %esi <== NOT EXECUTED 10d66b: 53 push %ebx <== NOT EXECUTED 10d66c: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10d66f: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED if (cmd == FIONREAD) { 10d672: b8 ea ff ff ff mov $0xffffffea,%eax <== NOT EXECUTED 10d677: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) <== NOT EXECUTED 10d67e: 75 36 jne 10d6b6 <== NOT EXECUTED if (buffer == NULL) 10d680: b0 f2 mov $0xf2,%al <== NOT EXECUTED 10d682: 85 f6 test %esi,%esi <== NOT EXECUTED 10d684: 74 30 je 10d6b6 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 10d686: 50 push %eax <== NOT EXECUTED 10d687: 6a 00 push $0x0 <== NOT EXECUTED 10d689: 6a 00 push $0x0 <== NOT EXECUTED 10d68b: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d68e: e8 51 cf ff ff call 10a5e4 <== NOT EXECUTED 10d693: 89 c2 mov %eax,%edx <== NOT EXECUTED 10d695: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d698: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED 10d69d: 85 d2 test %edx,%edx <== NOT EXECUTED 10d69f: 75 15 jne 10d6b6 <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 10d6a1: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10d6a4: 89 06 mov %eax,(%esi) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10d6a6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d6a9: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d6ac: e8 1f d0 ff ff call 10a6d0 <== NOT EXECUTED 10d6b1: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10d6b3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return -EINVAL; } 10d6b6: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10d6b9: 5b pop %ebx <== NOT EXECUTED 10d6ba: 5e pop %esi <== NOT EXECUTED 10d6bb: c9 leave <== NOT EXECUTED 10d6bc: c3 ret <== NOT EXECUTED =============================================================================== 0010d610 : pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 10d610: 55 push %ebp <== NOT EXECUTED 10d611: 89 e5 mov %esp,%ebp <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 10d613: b8 e3 ff ff ff mov $0xffffffe3,%eax <== NOT EXECUTED 10d618: c9 leave <== NOT EXECUTED 10d619: c3 ret <== NOT EXECUTED =============================================================================== 0010d84f : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 10d84f: 55 push %ebp <== NOT EXECUTED 10d850: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d852: 57 push %edi <== NOT EXECUTED 10d853: 56 push %esi <== NOT EXECUTED 10d854: 53 push %ebx <== NOT EXECUTED 10d855: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED 10d858: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 10d85b: 6a 00 push $0x0 <== NOT EXECUTED 10d85d: 6a 00 push $0x0 <== NOT EXECUTED 10d85f: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d862: e8 7d cd ff ff call 10a5e4 <== NOT EXECUTED 10d867: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d86a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10d871: 85 c0 test %eax,%eax <== NOT EXECUTED 10d873: 0f 84 08 01 00 00 je 10d981 <== NOT EXECUTED 10d879: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED 10d880: e9 21 01 00 00 jmp 10d9a6 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 10d885: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10d889: 0f 84 fe 00 00 00 je 10d98d <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 10d88f: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10d892: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10d896: 74 0a je 10d8a2 <== NOT EXECUTED 10d898: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 10d89d: e9 ed 00 00 00 jmp 10d98f <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 10d8a2: ff 43 18 incl 0x18(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10d8a5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d8a8: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d8ab: e8 20 ce ff ff call 10a6d0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10d8b0: 5a pop %edx <== NOT EXECUTED 10d8b1: 59 pop %ecx <== NOT EXECUTED 10d8b2: 6a 00 push $0x0 <== NOT EXECUTED 10d8b4: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10d8b7: e8 5c 19 00 00 call 10f218 <== NOT EXECUTED 10d8bc: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10d8bf: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10d8c2: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10d8c4: f7 d6 not %esi <== NOT EXECUTED 10d8c6: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10d8c9: 6a 00 push $0x0 <== NOT EXECUTED 10d8cb: 6a 00 push $0x0 <== NOT EXECUTED 10d8cd: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d8d0: e8 0f cd ff ff call 10a5e4 <== NOT EXECUTED 10d8d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d8d8: 85 c0 test %eax,%eax <== NOT EXECUTED 10d8da: 74 0a je 10d8e6 <== NOT EXECUTED 10d8dc: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 10d8e1: e9 b7 00 00 00 jmp 10d99d <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 10d8e6: ff 4b 18 decl 0x18(%ebx) <== NOT EXECUTED if (ret != 0) 10d8e9: 85 f6 test %esi,%esi <== NOT EXECUTED 10d8eb: 0f 85 9e 00 00 00 jne 10d98f <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 10d8f1: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 10d8f4: 85 d2 test %edx,%edx <== NOT EXECUTED 10d8f6: 74 8d je 10d885 <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 10d8f8: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10d8fb: 2b 45 d4 sub -0x2c(%ebp),%eax <== NOT EXECUTED 10d8fe: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 10d901: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10d903: 76 03 jbe 10d908 <== NOT EXECUTED 10d905: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 10d908: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED 10d90b: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED 10d90e: 29 f0 sub %esi,%eax <== NOT EXECUTED if (chunk > chunk1) { 10d910: 39 45 d0 cmp %eax,-0x30(%ebp) <== NOT EXECUTED 10d913: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 10d916: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 10d919: 8d 14 0f lea (%edi,%ecx,1),%edx <== NOT EXECUTED 10d91c: 7e 1b jle 10d939 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 10d91e: 03 33 add (%ebx),%esi <== NOT EXECUTED 10d920: 89 d7 mov %edx,%edi <== NOT EXECUTED 10d922: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10d924: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 10d926: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10d929: 01 c2 add %eax,%edx <== NOT EXECUTED 10d92b: 03 55 0c add 0xc(%ebp),%edx <== NOT EXECUTED 10d92e: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10d931: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10d933: 8b 33 mov (%ebx),%esi <== NOT EXECUTED 10d935: 89 d7 mov %edx,%edi <== NOT EXECUTED 10d937: eb 07 jmp 10d940 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 10d939: 03 33 add (%ebx),%esi <== NOT EXECUTED 10d93b: 89 d7 mov %edx,%edi <== NOT EXECUTED 10d93d: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10d940: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED pipe->Start += chunk; 10d942: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10d945: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED pipe->Start %= pipe->Size; 10d948: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d94a: f7 73 04 divl 0x4(%ebx) <== NOT EXECUTED 10d94d: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED pipe->Length -= chunk; 10d950: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10d953: 2b 45 d0 sub -0x30(%ebp),%eax <== NOT EXECUTED 10d956: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 10d959: 85 c0 test %eax,%eax <== NOT EXECUTED 10d95b: 75 07 jne 10d964 <== NOT EXECUTED pipe->Start = 0; 10d95d: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED if (pipe->waitingWriters > 0) 10d964: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) <== NOT EXECUTED 10d968: 74 11 je 10d97b <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10d96a: 50 push %eax <== NOT EXECUTED 10d96b: 50 push %eax <== NOT EXECUTED 10d96c: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10d96f: 50 push %eax <== NOT EXECUTED 10d970: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10d973: e8 48 18 00 00 call 10f1c0 <== NOT EXECUTED 10d978: 83 c4 10 add $0x10,%esp <== NOT EXECUTED read += chunk; 10d97b: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10d97e: 01 4d d4 add %ecx,-0x2c(%ebp) <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 10d981: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 10d984: 39 7d d4 cmp %edi,-0x2c(%ebp) <== NOT EXECUTED 10d987: 0f 82 64 ff ff ff jb 10d8f1 <== NOT EXECUTED 10d98d: 31 f6 xor %esi,%esi <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 10d98f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d992: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d995: e8 36 cd ff ff call 10a6d0 <== NOT EXECUTED 10d99a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_nolock: if (read > 0) 10d99d: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10d9a1: 7f 03 jg 10d9a6 <== NOT EXECUTED 10d9a3: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED return read; return ret; } 10d9a6: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10d9a9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10d9ac: 5b pop %ebx <== NOT EXECUTED 10d9ad: 5e pop %esi <== NOT EXECUTED 10d9ae: 5f pop %edi <== NOT EXECUTED 10d9af: c9 leave <== NOT EXECUTED 10d9b0: c3 ret <== NOT EXECUTED =============================================================================== 0010d9ec : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 10d9ec: 55 push %ebp <== NOT EXECUTED 10d9ed: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d9ef: 57 push %edi <== NOT EXECUTED 10d9f0: 56 push %esi <== NOT EXECUTED 10d9f1: 53 push %ebx <== NOT EXECUTED 10d9f2: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED 10d9f5: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED pipe_control_t *pipe = *pipep; 10d9f8: 8b 1f mov (%edi),%ebx <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 10d9fa: 6a 00 push $0x0 <== NOT EXECUTED 10d9fc: 6a 00 push $0x0 <== NOT EXECUTED 10d9fe: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10da01: e8 de cb ff ff call 10a5e4 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 10da06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10da09: 85 c0 test %eax,%eax <== NOT EXECUTED 10da0b: 75 34 jne 10da41 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 10da0d: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10da10: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 10da13: 89 c6 mov %eax,%esi <== NOT EXECUTED 10da15: 83 e6 06 and $0x6,%esi <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 10da18: a8 02 test $0x2,%al <== NOT EXECUTED 10da1a: 74 03 je 10da1f <== NOT EXECUTED pipe->Readers --; 10da1c: ff 4b 10 decl 0x10(%ebx) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 10da1f: f7 c6 04 00 00 00 test $0x4,%esi <== NOT EXECUTED 10da25: 74 03 je 10da2a <== NOT EXECUTED pipe->Writers --; 10da27: ff 4b 14 decl 0x14(%ebx) <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 10da2a: 50 push %eax <== NOT EXECUTED 10da2b: 6a 00 push $0x0 <== NOT EXECUTED 10da2d: 6a 00 push $0x0 <== NOT EXECUTED 10da2f: ff 35 fc 52 12 00 pushl 0x1252fc <== NOT EXECUTED 10da35: e8 aa cb ff ff call 10a5e4 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 10da3a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10da3d: 85 c0 test %eax,%eax <== NOT EXECUTED 10da3f: 74 09 je 10da4a <== NOT EXECUTED rtems_fatal_error_occurred(sc); 10da41: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10da44: 50 push %eax <== NOT EXECUTED 10da45: e8 52 d1 ff ff call 10ab9c <== NOT EXECUTED PIPE_UNLOCK(pipe); 10da4a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10da4d: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10da50: e8 7b cc ff ff call 10a6d0 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 10da55: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10da58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10da5b: 85 c0 test %eax,%eax <== NOT EXECUTED 10da5d: 75 15 jne 10da74 <== NOT EXECUTED 10da5f: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10da63: 75 0f jne 10da74 <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 10da65: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10da67: e8 45 ff ff ff call 10d9b1 <== NOT EXECUTED *pipep = NULL; 10da6c: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 10da72: eb 30 jmp 10daa4 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 10da74: 83 fe 04 cmp $0x4,%esi <== NOT EXECUTED 10da77: 74 0f je 10da88 <== NOT EXECUTED 10da79: 85 c0 test %eax,%eax <== NOT EXECUTED 10da7b: 75 0b jne 10da88 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 10da7d: 57 push %edi <== NOT EXECUTED 10da7e: 57 push %edi <== NOT EXECUTED 10da7f: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10da82: 50 push %eax <== NOT EXECUTED 10da83: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10da86: eb 14 jmp 10da9c <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 10da88: 83 fe 02 cmp $0x2,%esi <== NOT EXECUTED 10da8b: 74 17 je 10daa4 <== NOT EXECUTED 10da8d: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10da91: 75 11 jne 10daa4 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10da93: 56 push %esi <== NOT EXECUTED 10da94: 56 push %esi <== NOT EXECUTED 10da95: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10da98: 50 push %eax <== NOT EXECUTED 10da99: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10da9c: e8 1f 17 00 00 call 10f1c0 <== NOT EXECUTED 10daa1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 10daa4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10daa7: ff 35 fc 52 12 00 pushl 0x1252fc <== NOT EXECUTED 10daad: e8 1e cc ff ff call 10a6d0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 10dab2: 31 c0 xor %eax,%eax <== NOT EXECUTED 10dab4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10dab7: 5b pop %ebx <== NOT EXECUTED 10dab8: 5e pop %esi <== NOT EXECUTED 10dab9: 5f pop %edi <== NOT EXECUTED 10daba: c9 leave <== NOT EXECUTED 10dabb: c3 ret <== NOT EXECUTED =============================================================================== 0010d6bd : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 10d6bd: 55 push %ebp <== NOT EXECUTED 10d6be: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d6c0: 57 push %edi <== NOT EXECUTED 10d6c1: 56 push %esi <== NOT EXECUTED 10d6c2: 53 push %ebx <== NOT EXECUTED 10d6c3: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 10d6c6: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 10d6c9: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10d6d0: 83 7d 10 00 cmpl $0x0,0x10(%ebp) <== NOT EXECUTED 10d6d4: 0f 84 6a 01 00 00 je 10d844 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 10d6da: 57 push %edi <== NOT EXECUTED 10d6db: 6a 00 push $0x0 <== NOT EXECUTED 10d6dd: 6a 00 push $0x0 <== NOT EXECUTED 10d6df: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d6e2: e8 fd ce ff ff call 10a5e4 <== NOT EXECUTED 10d6e7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d6ea: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED 10d6f1: 85 c0 test %eax,%eax <== NOT EXECUTED 10d6f3: 0f 85 4b 01 00 00 jne 10d844 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 10d6f9: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10d6fd: 75 11 jne 10d710 <== NOT EXECUTED 10d6ff: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED 10d704: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10d70b: e9 1d 01 00 00 jmp 10d82d <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 10d710: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 10d713: 3b 7b 04 cmp 0x4(%ebx),%edi <== NOT EXECUTED 10d716: 76 05 jbe 10d71d <== NOT EXECUTED 10d718: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 10d71d: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10d724: e9 f6 00 00 00 jmp 10d81f <== NOT EXECUTED while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 10d729: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10d72c: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10d730: 74 0a je 10d73c <== NOT EXECUTED 10d732: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 10d737: e9 f1 00 00 00 jmp 10d82d <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 10d73c: ff 43 1c incl 0x1c(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10d73f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d742: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d745: e8 86 cf ff ff call 10a6d0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10d74a: 59 pop %ecx <== NOT EXECUTED 10d74b: 5e pop %esi <== NOT EXECUTED 10d74c: 6a 00 push $0x0 <== NOT EXECUTED 10d74e: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10d751: e8 c2 1a 00 00 call 10f218 <== NOT EXECUTED 10d756: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10d759: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10d75c: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10d75e: f7 d6 not %esi <== NOT EXECUTED 10d760: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10d763: 6a 00 push $0x0 <== NOT EXECUTED 10d765: 6a 00 push $0x0 <== NOT EXECUTED 10d767: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d76a: e8 75 ce ff ff call 10a5e4 <== NOT EXECUTED 10d76f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d772: 85 c0 test %eax,%eax <== NOT EXECUTED 10d774: 74 0a je 10d780 <== NOT EXECUTED 10d776: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 10d77b: e9 bb 00 00 00 jmp 10d83b <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 10d780: ff 4b 1c decl 0x1c(%ebx) <== NOT EXECUTED if (ret != 0) 10d783: 85 f6 test %esi,%esi <== NOT EXECUTED 10d785: 0f 85 a2 00 00 00 jne 10d82d <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 10d78b: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10d78f: 75 0a jne 10d79b <== NOT EXECUTED 10d791: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED 10d796: e9 92 00 00 00 jmp 10d82d <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { 10d79b: 8b 73 04 mov 0x4(%ebx),%esi <== NOT EXECUTED 10d79e: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10d7a1: 89 f1 mov %esi,%ecx <== NOT EXECUTED 10d7a3: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10d7a5: 39 f9 cmp %edi,%ecx <== NOT EXECUTED 10d7a7: 72 80 jb 10d729 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 10d7a9: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10d7ac: 2b 55 d4 sub -0x2c(%ebp),%edx <== NOT EXECUTED 10d7af: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED 10d7b2: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 10d7b4: 76 03 jbe 10d7b9 <== NOT EXECUTED 10d7b6: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 10d7b9: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED 10d7bc: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d7be: f7 f6 div %esi <== NOT EXECUTED 10d7c0: 89 f0 mov %esi,%eax <== NOT EXECUTED 10d7c2: 29 d0 sub %edx,%eax <== NOT EXECUTED if (chunk > chunk1) { 10d7c4: 39 45 d0 cmp %eax,-0x30(%ebp) <== NOT EXECUTED 10d7c7: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 10d7ca: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 10d7cd: 8d 34 0f lea (%edi,%ecx,1),%esi <== NOT EXECUTED 10d7d0: 7e 1c jle 10d7ee <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 10d7d2: 03 13 add (%ebx),%edx <== NOT EXECUTED 10d7d4: 89 d7 mov %edx,%edi <== NOT EXECUTED 10d7d6: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10d7d8: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 10d7da: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 10d7dc: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10d7df: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10d7e1: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED 10d7e4: 8d 34 38 lea (%eax,%edi,1),%esi <== NOT EXECUTED 10d7e7: 03 75 0c add 0xc(%ebp),%esi <== NOT EXECUTED 10d7ea: 89 d7 mov %edx,%edi <== NOT EXECUTED 10d7ec: eb 07 jmp 10d7f5 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 10d7ee: 03 13 add (%ebx),%edx <== NOT EXECUTED 10d7f0: 89 d7 mov %edx,%edi <== NOT EXECUTED 10d7f2: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10d7f5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED pipe->Length += chunk; 10d7f7: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10d7fa: 01 43 0c add %eax,0xc(%ebx) <== NOT EXECUTED if (pipe->waitingReaders > 0) 10d7fd: 83 7b 18 00 cmpl $0x0,0x18(%ebx) <== NOT EXECUTED 10d801: 74 11 je 10d814 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10d803: 52 push %edx <== NOT EXECUTED 10d804: 52 push %edx <== NOT EXECUTED 10d805: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 10d808: 51 push %ecx <== NOT EXECUTED 10d809: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10d80c: e8 af 19 00 00 call 10f1c0 <== NOT EXECUTED 10d811: 83 c4 10 add $0x10,%esp <== NOT EXECUTED written += chunk; 10d814: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED 10d817: 01 7d d4 add %edi,-0x2c(%ebp) <== NOT EXECUTED 10d81a: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 10d81f: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10d822: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 10d825: 0f 82 70 ff ff ff jb 10d79b <== NOT EXECUTED 10d82b: 31 f6 xor %esi,%esi <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 10d82d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d830: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d833: e8 98 ce ff ff call 10a6d0 <== NOT EXECUTED 10d838: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 10d83b: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10d83f: 7f 03 jg 10d844 <== NOT EXECUTED 10d841: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED return written; return ret; } 10d844: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10d847: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10d84a: 5b pop %ebx <== NOT EXECUTED 10d84b: 5e pop %esi <== NOT EXECUTED 10d84c: 5f pop %edi <== NOT EXECUTED 10d84d: c9 leave <== NOT EXECUTED 10d84e: c3 ret <== NOT EXECUTED =============================================================================== 0010aa10 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 10aa10: 55 push %ebp 10aa11: 89 e5 mov %esp,%ebp 10aa13: 53 push %ebx 10aa14: 83 ec 04 sub $0x4,%esp 10aa17: 8b 55 08 mov 0x8(%ebp),%edx 10aa1a: 8b 45 0c mov 0xc(%ebp),%eax 10aa1d: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Update call statistics */ MSBUMP(memalign_calls, 1); 10aa20: ff 05 54 b9 12 00 incl 0x12b954 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 10aa26: 8d 58 ff lea -0x1(%eax),%ebx 10aa29: 85 c3 test %eax,%ebx 10aa2b: 75 05 jne 10aa32 <== NEVER TAKEN 10aa2d: 83 f8 03 cmp $0x3,%eax 10aa30: 77 09 ja 10aa3b /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 10aa32: b8 16 00 00 00 mov $0x16,%eax 10aa37: 5a pop %edx 10aa38: 5b pop %ebx 10aa39: c9 leave 10aa3a: c3 ret /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10aa3b: 89 4d 10 mov %ecx,0x10(%ebp) 10aa3e: 89 45 0c mov %eax,0xc(%ebp) 10aa41: 89 55 08 mov %edx,0x8(%ebp) } 10aa44: 58 pop %eax 10aa45: 5b pop %ebx 10aa46: c9 leave /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10aa47: e9 10 01 00 00 jmp 10ab5c =============================================================================== 0011d14c : ssize_t read( int fd, void *buffer, size_t count ) { 11d14c: 55 push %ebp 11d14d: 89 e5 mov %esp,%ebp 11d14f: 56 push %esi 11d150: 53 push %ebx 11d151: 8b 5d 08 mov 0x8(%ebp),%ebx 11d154: 8b 55 0c mov 0xc(%ebp),%edx 11d157: 8b 4d 10 mov 0x10(%ebp),%ecx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11d15a: 3b 1d 24 16 12 00 cmp 0x121624,%ebx 11d160: 73 14 jae 11d176 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11d162: c1 e3 06 shl $0x6,%ebx 11d165: 03 1d 00 55 12 00 add 0x125500,%ebx rtems_libio_check_is_open( iop ); 11d16b: 8b 73 14 mov 0x14(%ebx),%esi 11d16e: f7 c6 00 01 00 00 test $0x100,%esi 11d174: 75 0d jne 11d183 11d176: e8 e1 47 ff ff call 11195c <__errno> 11d17b: c7 00 09 00 00 00 movl $0x9,(%eax) 11d181: eb 31 jmp 11d1b4 rtems_libio_check_buffer( buffer ); 11d183: 85 d2 test %edx,%edx 11d185: 74 0b je 11d192 <== NEVER TAKEN rtems_libio_check_count( count ); 11d187: 31 c0 xor %eax,%eax 11d189: 85 c9 test %ecx,%ecx 11d18b: 74 44 je 11d1d1 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11d18d: 83 e6 02 and $0x2,%esi 11d190: 75 0d jne 11d19f <== ALWAYS TAKEN 11d192: e8 c5 47 ff ff call 11195c <__errno> <== NOT EXECUTED 11d197: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11d19d: eb 15 jmp 11d1b4 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 11d19f: 8b 43 3c mov 0x3c(%ebx),%eax 11d1a2: 8b 40 08 mov 0x8(%eax),%eax 11d1a5: 85 c0 test %eax,%eax 11d1a7: 75 10 jne 11d1b9 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11d1a9: e8 ae 47 ff ff call 11195c <__errno> <== NOT EXECUTED 11d1ae: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11d1b4: 83 c8 ff or $0xffffffff,%eax 11d1b7: eb 18 jmp 11d1d1 rc = (*iop->handlers->read_h)( iop, buffer, count ); 11d1b9: 56 push %esi 11d1ba: 51 push %ecx 11d1bb: 52 push %edx 11d1bc: 53 push %ebx 11d1bd: ff d0 call *%eax if ( rc > 0 ) 11d1bf: 83 c4 10 add $0x10,%esp 11d1c2: 85 c0 test %eax,%eax 11d1c4: 7e 0b jle 11d1d1 iop->offset += rc; 11d1c6: 89 c1 mov %eax,%ecx 11d1c8: c1 f9 1f sar $0x1f,%ecx 11d1cb: 01 43 0c add %eax,0xc(%ebx) 11d1ce: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11d1d1: 8d 65 f8 lea -0x8(%ebp),%esp 11d1d4: 5b pop %ebx 11d1d5: 5e pop %esi 11d1d6: c9 leave 11d1d7: c3 ret =============================================================================== 0010a034 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 10a034: 55 push %ebp 10a035: 89 e5 mov %esp,%ebp 10a037: 57 push %edi 10a038: 56 push %esi 10a039: 53 push %ebx 10a03a: 83 ec 2c sub $0x2c,%esp 10a03d: 8b 55 08 mov 0x8(%ebp),%edx 10a040: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if (!buf) 10a043: 85 db test %ebx,%ebx 10a045: 75 0d jne 10a054 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 10a047: e8 e0 9d 00 00 call 113e2c <__errno> <== NOT EXECUTED 10a04c: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10a052: eb 51 jmp 10a0a5 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 10a054: 31 c0 xor %eax,%eax 10a056: 83 c9 ff or $0xffffffff,%ecx 10a059: 89 d7 mov %edx,%edi 10a05b: f2 ae repnz scas %es:(%edi),%al 10a05d: f7 d1 not %ecx 10a05f: 49 dec %ecx 10a060: 83 ec 0c sub $0xc,%esp 10a063: 6a 00 push $0x0 10a065: 8d 75 d4 lea -0x2c(%ebp),%esi 10a068: 56 push %esi 10a069: 6a 00 push $0x0 10a06b: 51 push %ecx 10a06c: 52 push %edx 10a06d: e8 0f f0 ff ff call 109081 0, &loc, false ); if ( result != 0 ) 10a072: 83 c4 20 add $0x20,%esp 10a075: 83 cf ff or $0xffffffff,%edi 10a078: 85 c0 test %eax,%eax 10a07a: 0f 85 8c 00 00 00 jne 10a10c <== NEVER TAKEN return -1; if ( !loc.ops->node_type_h ){ 10a080: 8b 55 e0 mov -0x20(%ebp),%edx 10a083: 8b 42 10 mov 0x10(%edx),%eax 10a086: 85 c0 test %eax,%eax 10a088: 75 20 jne 10a0aa <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10a08a: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10a08d: 85 c0 test %eax,%eax <== NOT EXECUTED 10a08f: 74 09 je 10a09a <== NOT EXECUTED 10a091: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a094: 56 push %esi <== NOT EXECUTED 10a095: ff d0 call *%eax <== NOT EXECUTED 10a097: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a09a: e8 8d 9d 00 00 call 113e2c <__errno> <== NOT EXECUTED 10a09f: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10a0a5: 83 cf ff or $0xffffffff,%edi 10a0a8: eb 62 jmp 10a10c } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 10a0aa: 83 ec 0c sub $0xc,%esp 10a0ad: 56 push %esi 10a0ae: ff d0 call *%eax 10a0b0: 83 c4 10 add $0x10,%esp 10a0b3: 83 f8 04 cmp $0x4,%eax 10a0b6: 8b 45 e0 mov -0x20(%ebp),%eax 10a0b9: 74 21 je 10a0dc rtems_filesystem_freenode( &loc ); 10a0bb: 85 c0 test %eax,%eax 10a0bd: 74 10 je 10a0cf <== NEVER TAKEN 10a0bf: 8b 40 1c mov 0x1c(%eax),%eax 10a0c2: 85 c0 test %eax,%eax 10a0c4: 74 09 je 10a0cf <== NEVER TAKEN 10a0c6: 83 ec 0c sub $0xc,%esp 10a0c9: 56 push %esi 10a0ca: ff d0 call *%eax 10a0cc: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EINVAL ); 10a0cf: e8 58 9d 00 00 call 113e2c <__errno> 10a0d4: c7 00 16 00 00 00 movl $0x16,(%eax) 10a0da: eb c9 jmp 10a0a5 } if ( !loc.ops->readlink_h ){ 10a0dc: 8b 50 3c mov 0x3c(%eax),%edx 10a0df: 85 d2 test %edx,%edx 10a0e1: 75 05 jne 10a0e8 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10a0e3: 8b 40 1c mov 0x1c(%eax),%eax 10a0e6: eb a5 jmp 10a08d <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 10a0e8: 50 push %eax 10a0e9: ff 75 10 pushl 0x10(%ebp) 10a0ec: 53 push %ebx 10a0ed: 56 push %esi 10a0ee: ff d2 call *%edx 10a0f0: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &loc ); 10a0f2: 8b 45 e0 mov -0x20(%ebp),%eax 10a0f5: 83 c4 10 add $0x10,%esp 10a0f8: 85 c0 test %eax,%eax 10a0fa: 74 10 je 10a10c <== NEVER TAKEN 10a0fc: 8b 40 1c mov 0x1c(%eax),%eax 10a0ff: 85 c0 test %eax,%eax 10a101: 74 09 je 10a10c <== NEVER TAKEN 10a103: 83 ec 0c sub $0xc,%esp 10a106: 56 push %esi 10a107: ff d0 call *%eax 10a109: 83 c4 10 add $0x10,%esp return result; } 10a10c: 89 f8 mov %edi,%eax 10a10e: 8d 65 f4 lea -0xc(%ebp),%esp 10a111: 5b pop %ebx 10a112: 5e pop %esi 10a113: 5f pop %edi 10a114: c9 leave 10a115: c3 ret =============================================================================== 00108d68 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 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 2c sub $0x2c,%esp 108d71: 8b 75 08 mov 0x8(%ebp),%esi 108d74: 8b 7d 0c mov 0xc(%ebp),%edi int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 108d77: 3b 35 44 31 12 00 cmp 0x123144,%esi 108d7d: 73 11 jae 108d90 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 108d7f: c1 e6 06 shl $0x6,%esi 108d82: 03 35 f0 77 12 00 add 0x1277f0,%esi rtems_libio_check_is_open( iop ); 108d88: 8b 46 14 mov 0x14(%esi),%eax 108d8b: f6 c4 01 test $0x1,%ah 108d8e: 75 10 jne 108da0 <== ALWAYS TAKEN 108d90: e8 7b 97 00 00 call 112510 <__errno> <== NOT EXECUTED 108d95: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 108d9b: e9 95 00 00 00 jmp 108e35 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 108da0: a8 02 test $0x2,%al 108da2: 74 46 je 108dea <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 108da4: 85 ff test %edi,%edi 108da6: 74 42 je 108dea rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 108da8: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 108dac: 7e 3c jle 108dea rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 108dae: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 108db5: 7f 33 jg 108dea <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 108db7: 8b 46 3c mov 0x3c(%esi),%eax 108dba: 83 78 08 00 cmpl $0x0,0x8(%eax) 108dbe: 75 0d jne 108dcd <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 108dc0: e8 4b 97 00 00 call 112510 <__errno> <== NOT EXECUTED 108dc5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108dcb: eb 68 jmp 108e35 <== NOT EXECUTED 108dcd: b2 01 mov $0x1,%dl 108dcf: 31 c0 xor %eax,%eax 108dd1: 31 c9 xor %ecx,%ecx 108dd3: 89 75 d4 mov %esi,-0x2c(%ebp) all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 108dd6: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8) 108dda: 74 0e je 108dea if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 108ddc: 8b 5c c7 04 mov 0x4(%edi,%eax,8),%ebx 108de0: 8d 34 19 lea (%ecx,%ebx,1),%esi 108de3: 89 75 e4 mov %esi,-0x1c(%ebp) if ( total < old ) 108de6: 39 ce cmp %ecx,%esi 108de8: 7d 0d jge 108df7 rtems_set_errno_and_return_minus_one( EINVAL ); 108dea: e8 21 97 00 00 call 112510 <__errno> 108def: c7 00 16 00 00 00 movl $0x16,(%eax) 108df5: eb 3e jmp 108e35 if ( iov[v].iov_len ) 108df7: 85 db test %ebx,%ebx 108df9: 0f 94 c1 sete %cl 108dfc: f7 d9 neg %ecx 108dfe: 21 ca and %ecx,%edx * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 108e00: 40 inc %eax 108e01: 3b 45 10 cmp 0x10(%ebp),%eax 108e04: 7d 05 jge 108e0b <== NEVER TAKEN 108e06: 8b 4d e4 mov -0x1c(%ebp),%ecx 108e09: eb cb jmp 108dd6 108e0b: 8b 75 d4 mov -0x2c(%ebp),%esi /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { 108e0e: 31 db xor %ebx,%ebx 108e10: 84 d2 test %dl,%dl <== NOT EXECUTED 108e12: 75 49 jne 108e5d <== NOT EXECUTED 108e14: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 108e1b: 50 push %eax <== NOT EXECUTED 108e1c: 8b 46 3c mov 0x3c(%esi),%eax <== NOT EXECUTED 108e1f: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 108e22: ff 74 d7 04 pushl 0x4(%edi,%edx,8) <== NOT EXECUTED 108e26: ff 34 d7 pushl (%edi,%edx,8) <== NOT EXECUTED 108e29: 56 push %esi <== NOT EXECUTED 108e2a: ff 50 08 call *0x8(%eax) <== NOT EXECUTED if ( bytes < 0 ) 108e2d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108e30: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 108e33: 7d 05 jge 108e3a <== NOT EXECUTED 108e35: 83 cb ff or $0xffffffff,%ebx 108e38: eb 23 jmp 108e5d return -1; if ( bytes > 0 ) { 108e3a: 74 0d je 108e49 <== NOT EXECUTED iop->offset += bytes; 108e3c: 89 c1 mov %eax,%ecx <== NOT EXECUTED 108e3e: c1 f9 1f sar $0x1f,%ecx <== NOT EXECUTED 108e41: 01 46 0c add %eax,0xc(%esi) <== NOT EXECUTED 108e44: 11 4e 10 adc %ecx,0x10(%esi) <== NOT EXECUTED total += bytes; 108e47: 01 c3 add %eax,%ebx <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 108e49: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 108e4c: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax <== NOT EXECUTED 108e50: 75 0b jne 108e5d <== NOT EXECUTED } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 108e52: 42 inc %edx <== NOT EXECUTED 108e53: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 108e56: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 108e59: 39 c2 cmp %eax,%edx <== NOT EXECUTED 108e5b: 7c be jl 108e1b <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 108e5d: 89 d8 mov %ebx,%eax 108e5f: 8d 65 f4 lea -0xc(%ebp),%esp 108e62: 5b pop %ebx 108e63: 5e pop %esi 108e64: 5f pop %edi 108e65: c9 leave 108e66: c3 ret =============================================================================== 0011d258 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 11d258: 55 push %ebp 11d259: 89 e5 mov %esp,%ebp 11d25b: 57 push %edi 11d25c: 56 push %esi 11d25d: 53 push %ebx 11d25e: 83 ec 2c sub $0x2c,%esp 11d261: 8b 5d 08 mov 0x8(%ebp),%ebx 11d264: 8b 75 0c mov 0xc(%ebp),%esi 11d267: ff 05 28 55 12 00 incl 0x125528 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11d26d: 83 3d e8 57 12 00 03 cmpl $0x3,0x1257e8 11d274: 75 1a jne 11d290 <== NEVER TAKEN if (_Thread_Dispatch_disable_level > 0) 11d276: a1 50 56 12 00 mov 0x125650,%eax 11d27b: 85 c0 test %eax,%eax 11d27d: 0f 85 a7 00 00 00 jne 11d32a <== NEVER TAKEN return (void *) 0; if (_ISR_Nest_level > 0) 11d283: a1 e8 56 12 00 mov 0x1256e8,%eax 11d288: 85 c0 test %eax,%eax 11d28a: 0f 85 9a 00 00 00 jne 11d32a <== NEVER TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 11d290: 85 db test %ebx,%ebx 11d292: 75 0e jne 11d2a2 return malloc( size ); 11d294: 83 ec 0c sub $0xc,%esp 11d297: 56 push %esi 11d298: e8 9f a6 fe ff call 10793c 11d29d: e9 81 00 00 00 jmp 11d323 if ( !size ) { 11d2a2: 85 f6 test %esi,%esi 11d2a4: 75 0d jne 11d2b3 <== ALWAYS TAKEN free( ptr ); 11d2a6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11d2a9: 53 push %ebx <== NOT EXECUTED 11d2aa: e8 ed a3 fe ff call 10769c <== NOT EXECUTED 11d2af: 31 db xor %ebx,%ebx <== NOT EXECUTED 11d2b1: eb 72 jmp 11d325 <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 11d2b3: 52 push %edx 11d2b4: 8d 45 e4 lea -0x1c(%ebp),%eax 11d2b7: 50 push %eax 11d2b8: 53 push %ebx 11d2b9: ff 35 30 16 12 00 pushl 0x121630 11d2bf: e8 00 01 00 00 call 11d3c4 <_Protected_heap_Get_block_size> 11d2c4: 83 c4 10 add $0x10,%esp 11d2c7: 84 c0 test %al,%al 11d2c9: 75 0d jne 11d2d8 errno = EINVAL; 11d2cb: e8 8c 46 ff ff call 11195c <__errno> 11d2d0: c7 00 16 00 00 00 movl $0x16,(%eax) 11d2d6: eb 52 jmp 11d32a #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS) if (rtems_malloc_boundary_helpers) resize += (*rtems_malloc_boundary_helpers->overhead)(); #endif if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) { 11d2d8: 50 push %eax 11d2d9: 56 push %esi 11d2da: 53 push %ebx 11d2db: ff 35 30 16 12 00 pushl 0x121630 11d2e1: e8 16 01 00 00 call 11d3fc <_Protected_heap_Resize_block> 11d2e6: 83 c4 10 add $0x10,%esp 11d2e9: 84 c0 test %al,%al 11d2eb: 75 3f jne 11d32c * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); 11d2ed: 83 ec 0c sub $0xc,%esp 11d2f0: 56 push %esi 11d2f1: e8 46 a6 fe ff call 10793c MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11d2f6: ff 0d 1c 55 12 00 decl 0x12551c if ( !new_area ) { 11d2fc: 83 c4 10 add $0x10,%esp 11d2ff: 85 c0 test %eax,%eax 11d301: 74 27 je 11d32a return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11d303: 8b 55 e4 mov -0x1c(%ebp),%edx 11d306: 89 f1 mov %esi,%ecx 11d308: 39 d6 cmp %edx,%esi 11d30a: 76 02 jbe 11d30e <== NEVER TAKEN 11d30c: 89 d1 mov %edx,%ecx 11d30e: 89 c7 mov %eax,%edi 11d310: 89 de mov %ebx,%esi 11d312: f3 a4 rep movsb %ds:(%esi),%es:(%edi) free( ptr ); 11d314: 83 ec 0c sub $0xc,%esp 11d317: 53 push %ebx 11d318: 89 45 d4 mov %eax,-0x2c(%ebp) 11d31b: e8 7c a3 fe ff call 10769c 11d320: 8b 45 d4 mov -0x2c(%ebp),%eax 11d323: 89 c3 mov %eax,%ebx return new_area; 11d325: 83 c4 10 add $0x10,%esp 11d328: eb 02 jmp 11d32c 11d32a: 31 db xor %ebx,%ebx } 11d32c: 89 d8 mov %ebx,%eax 11d32e: 8d 65 f4 lea -0xc(%ebp),%esp 11d331: 5b pop %ebx 11d332: 5e pop %esi 11d333: 5f pop %edi 11d334: c9 leave 11d335: c3 ret =============================================================================== 0010afe4 : #include int rmdir( const char *pathname ) { 10afe4: 55 push %ebp 10afe5: 89 e5 mov %esp,%ebp 10afe7: 57 push %edi 10afe8: 56 push %esi 10afe9: 53 push %ebx 10afea: 83 ec 58 sub $0x58,%esp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 10afed: ff 75 08 pushl 0x8(%ebp) 10aff0: e8 f7 e8 ff ff call 1098ec 10aff5: 89 45 b4 mov %eax,-0x4c(%ebp) if ( parentpathlen == 0 ) 10aff8: 83 c4 10 add $0x10,%esp 10affb: 85 c0 test %eax,%eax 10affd: 8d 45 d0 lea -0x30(%ebp),%eax 10b000: 75 15 jne 10b017 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 10b002: 52 push %edx 10b003: 50 push %eax 10b004: 8d 45 e4 lea -0x1c(%ebp),%eax 10b007: 50 push %eax 10b008: ff 75 08 pushl 0x8(%ebp) 10b00b: e8 70 02 00 00 call 10b280 10b010: 31 db xor %ebx,%ebx 10b012: 83 c4 10 add $0x10,%esp 10b015: eb 20 jmp 10b037 else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 10b017: 83 ec 0c sub $0xc,%esp 10b01a: 6a 00 push $0x0 10b01c: 50 push %eax 10b01d: 6a 02 push $0x2 10b01f: ff 75 b4 pushl -0x4c(%ebp) 10b022: ff 75 08 pushl 0x8(%ebp) 10b025: e8 bf e9 ff ff call 1099e9 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 10b02a: 83 c4 20 add $0x20,%esp 10b02d: 85 c0 test %eax,%eax 10b02f: 0f 85 73 01 00 00 jne 10b1a8 <== NEVER TAKEN 10b035: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 10b037: 8d 7d bc lea -0x44(%ebp),%edi 10b03a: 8d 75 d0 lea -0x30(%ebp),%esi 10b03d: b9 05 00 00 00 mov $0x5,%ecx 10b042: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = pathname + parentpathlen; 10b044: 8b 75 08 mov 0x8(%ebp),%esi 10b047: 03 75 b4 add -0x4c(%ebp),%esi name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10b04a: 83 c9 ff or $0xffffffff,%ecx 10b04d: 89 f7 mov %esi,%edi 10b04f: 31 c0 xor %eax,%eax 10b051: f2 ae repnz scas %es:(%edi),%al 10b053: f7 d1 not %ecx 10b055: 49 dec %ecx 10b056: 57 push %edi 10b057: 57 push %edi 10b058: 51 push %ecx 10b059: 56 push %esi 10b05a: e8 51 e8 ff ff call 1098b0 10b05f: 01 c6 add %eax,%esi result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10b061: 83 c9 ff or $0xffffffff,%ecx 10b064: 89 f7 mov %esi,%edi 10b066: 31 c0 xor %eax,%eax 10b068: f2 ae repnz scas %es:(%edi),%al 10b06a: f7 d1 not %ecx 10b06c: 49 dec %ecx 10b06d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10b074: 8d 7d bc lea -0x44(%ebp),%edi 10b077: 57 push %edi 10b078: 6a 00 push $0x0 10b07a: 51 push %ecx 10b07b: 56 push %esi 10b07c: e8 ae e8 ff ff call 10992f 0, &loc, false ); if ( result != 0 ) { 10b081: 83 c4 20 add $0x20,%esp 10b084: 85 c0 test %eax,%eax 10b086: 74 2f je 10b0b7 if ( free_parentloc ) 10b088: 84 db test %bl,%bl 10b08a: 0f 84 18 01 00 00 je 10b1a8 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 10b090: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 10b093: 85 c0 test %eax,%eax <== NOT EXECUTED 10b095: 0f 84 0d 01 00 00 je 10b1a8 <== NOT EXECUTED 10b09b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10b09e: 85 c0 test %eax,%eax <== NOT EXECUTED 10b0a0: 0f 84 02 01 00 00 je 10b1a8 <== NOT EXECUTED 10b0a6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b0a9: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 10b0ac: 52 push %edx <== NOT EXECUTED 10b0ad: ff d0 call *%eax <== NOT EXECUTED 10b0af: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 10b0b2: e9 ec 00 00 00 jmp 10b1a3 <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 10b0b7: 8b 55 c8 mov -0x38(%ebp),%edx 10b0ba: 8b 42 10 mov 0x10(%edx),%eax 10b0bd: 85 c0 test %eax,%eax 10b0bf: 75 05 jne 10b0c6 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10b0c1: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10b0c4: eb 65 jmp 10b12b <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 10b0c6: 83 ec 0c sub $0xc,%esp 10b0c9: 57 push %edi 10b0ca: ff d0 call *%eax 10b0cc: 83 c4 10 add $0x10,%esp 10b0cf: 48 dec %eax 10b0d0: 74 45 je 10b117 rtems_filesystem_freenode( &loc ); 10b0d2: 8b 45 c8 mov -0x38(%ebp),%eax 10b0d5: 85 c0 test %eax,%eax 10b0d7: 74 10 je 10b0e9 <== NEVER TAKEN 10b0d9: 8b 40 1c mov 0x1c(%eax),%eax 10b0dc: 85 c0 test %eax,%eax 10b0de: 74 09 je 10b0e9 <== NEVER TAKEN 10b0e0: 83 ec 0c sub $0xc,%esp 10b0e3: 57 push %edi 10b0e4: ff d0 call *%eax 10b0e6: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 10b0e9: 84 db test %bl,%bl 10b0eb: 74 1a je 10b107 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 10b0ed: 8b 45 dc mov -0x24(%ebp),%eax 10b0f0: 85 c0 test %eax,%eax 10b0f2: 74 13 je 10b107 <== NEVER TAKEN 10b0f4: 8b 40 1c mov 0x1c(%eax),%eax 10b0f7: 85 c0 test %eax,%eax 10b0f9: 74 0c je 10b107 <== NEVER TAKEN 10b0fb: 83 ec 0c sub $0xc,%esp 10b0fe: 8d 55 d0 lea -0x30(%ebp),%edx 10b101: 52 push %edx 10b102: ff d0 call *%eax 10b104: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 10b107: e8 6c 96 00 00 call 114778 <__errno> 10b10c: c7 00 14 00 00 00 movl $0x14,(%eax) 10b112: e9 91 00 00 00 jmp 10b1a8 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 10b117: 8b 45 c4 mov -0x3c(%ebp),%eax 10b11a: 8b 40 34 mov 0x34(%eax),%eax 10b11d: 85 c0 test %eax,%eax 10b11f: 75 42 jne 10b163 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10b121: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 10b124: 85 c0 test %eax,%eax <== NOT EXECUTED 10b126: 74 10 je 10b138 <== NOT EXECUTED 10b128: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10b12b: 85 c0 test %eax,%eax <== NOT EXECUTED 10b12d: 74 09 je 10b138 <== NOT EXECUTED 10b12f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b132: 57 push %edi <== NOT EXECUTED 10b133: ff d0 call *%eax <== NOT EXECUTED 10b135: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 10b138: 84 db test %bl,%bl <== NOT EXECUTED 10b13a: 74 1a je 10b156 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 10b13c: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 10b13f: 85 c0 test %eax,%eax <== NOT EXECUTED 10b141: 74 13 je 10b156 <== NOT EXECUTED 10b143: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10b146: 85 c0 test %eax,%eax <== NOT EXECUTED 10b148: 74 0c je 10b156 <== NOT EXECUTED 10b14a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b14d: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 10b150: 52 push %edx <== NOT EXECUTED 10b151: ff d0 call *%eax <== NOT EXECUTED 10b153: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10b156: e8 1d 96 00 00 call 114778 <__errno> <== NOT EXECUTED 10b15b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10b161: eb 45 jmp 10b1a8 <== NOT EXECUTED } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 10b163: 52 push %edx 10b164: 52 push %edx 10b165: 57 push %edi 10b166: 8d 55 d0 lea -0x30(%ebp),%edx 10b169: 52 push %edx 10b16a: ff d0 call *%eax 10b16c: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10b16e: 8b 45 c8 mov -0x38(%ebp),%eax 10b171: 83 c4 10 add $0x10,%esp 10b174: 85 c0 test %eax,%eax 10b176: 74 10 je 10b188 <== NEVER TAKEN 10b178: 8b 40 1c mov 0x1c(%eax),%eax 10b17b: 85 c0 test %eax,%eax 10b17d: 74 09 je 10b188 <== NEVER TAKEN 10b17f: 83 ec 0c sub $0xc,%esp 10b182: 57 push %edi 10b183: ff d0 call *%eax 10b185: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 10b188: 84 db test %bl,%bl 10b18a: 74 1f je 10b1ab rtems_filesystem_freenode( &parentloc ); 10b18c: 8b 45 dc mov -0x24(%ebp),%eax 10b18f: 85 c0 test %eax,%eax 10b191: 74 18 je 10b1ab <== NEVER TAKEN 10b193: 8b 40 1c mov 0x1c(%eax),%eax 10b196: 85 c0 test %eax,%eax 10b198: 74 11 je 10b1ab <== NEVER TAKEN 10b19a: 83 ec 0c sub $0xc,%esp 10b19d: 8d 55 d0 lea -0x30(%ebp),%edx 10b1a0: 52 push %edx 10b1a1: ff d0 call *%eax 10b1a3: 83 c4 10 add $0x10,%esp 10b1a6: eb 03 jmp 10b1ab 10b1a8: 83 ce ff or $0xffffffff,%esi return result; } 10b1ab: 89 f0 mov %esi,%eax 10b1ad: 8d 65 f4 lea -0xc(%ebp),%esp 10b1b0: 5b pop %ebx 10b1b1: 5e pop %esi 10b1b2: 5f pop %edi 10b1b3: c9 leave 10b1b4: c3 ret =============================================================================== 00115e34 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 115e34: 55 push %ebp <== NOT EXECUTED 115e35: 89 e5 mov %esp,%ebp <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 115e37: b8 e0 91 12 00 mov $0x1291e0,%eax <== NOT EXECUTED 115e3c: c9 leave <== NOT EXECUTED 115e3d: c3 ret <== NOT EXECUTED =============================================================================== 00113404 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 113404: 55 push %ebp 113405: 89 e5 mov %esp,%ebp 113407: 53 push %ebx 113408: 83 ec 0c sub $0xc,%esp 11340b: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 11340e: 53 push %ebx 11340f: ff 75 08 pushl 0x8(%ebp) 113412: e8 1d 00 00 00 call 113434 if (nap) 113417: 83 c4 10 add $0x10,%esp 11341a: 85 c0 test %eax,%eax 11341c: 74 07 je 113425 <== NEVER TAKEN return nap->name; 11341e: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(local_value); } 113420: 8b 5d fc mov -0x4(%ebp),%ebx 113423: c9 leave 113424: c3 ret nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 113425: 89 5d 08 mov %ebx,0x8(%ebp) } 113428: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11342b: c9 leave <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 11342c: e9 03 2a 00 00 jmp 115e34 <== NOT EXECUTED =============================================================================== 001118fc : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 1118fc: 55 push %ebp 1118fd: 89 e5 mov %esp,%ebp 1118ff: 56 push %esi 111900: 53 push %ebx 111901: 8b 5d 08 mov 0x8(%ebp),%ebx 111904: 8b 75 0c mov 0xc(%ebp),%esi const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 111907: 8b 03 mov (%ebx),%eax 111909: 85 c0 test %eax,%eax 11190b: 74 1b je 111928 <== NEVER TAKEN 11190d: 52 push %edx 11190e: 52 push %edx 11190f: 68 65 f8 11 00 push $0x11f865 111914: 50 push %eax 111915: e8 5e 0b 00 00 call 112478 11191a: 83 c4 10 add $0x10,%esp 11191d: 85 c0 test %eax,%eax 11191f: 75 07 jne 111928 <== ALWAYS TAKEN default_ap = ap++; 111921: 89 d8 mov %ebx,%eax <== NOT EXECUTED 111923: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED 111926: eb 0c jmp 111934 <== NOT EXECUTED 111928: 31 c0 xor %eax,%eax 11192a: eb 08 jmp 111934 for ( ; ap->name; ap++) if (ap->local_value == local_value) 11192c: 39 73 04 cmp %esi,0x4(%ebx) 11192f: 74 0a je 11193b const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 111931: 83 c3 0c add $0xc,%ebx 111934: 83 3b 00 cmpl $0x0,(%ebx) 111937: 75 f3 jne 11192c 111939: 89 c3 mov %eax,%ebx if (ap->local_value == local_value) return ap; return default_ap; } 11193b: 89 d8 mov %ebx,%eax 11193d: 8d 65 f8 lea -0x8(%ebp),%esp 111940: 5b pop %ebx 111941: 5e pop %esi 111942: c9 leave 111943: c3 ret =============================================================================== 0011131c : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 11131c: 55 push %ebp 11131d: 89 e5 mov %esp,%ebp 11131f: 56 push %esi 111320: 53 push %ebx 111321: 8b 5d 08 mov 0x8(%ebp),%ebx 111324: 8b 75 0c mov 0xc(%ebp),%esi const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 111327: 8b 03 mov (%ebx),%eax 111329: 85 c0 test %eax,%eax 11132b: 74 1b je 111348 <== NEVER TAKEN 11132d: 52 push %edx 11132e: 52 push %edx 11132f: 68 65 f8 11 00 push $0x11f865 111334: 50 push %eax 111335: e8 3e 11 00 00 call 112478 11133a: 83 c4 10 add $0x10,%esp 11133d: 85 c0 test %eax,%eax 11133f: 75 07 jne 111348 <== ALWAYS TAKEN default_ap = ap++; 111341: 89 d8 mov %ebx,%eax <== NOT EXECUTED 111343: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED 111346: eb 0c jmp 111354 <== NOT EXECUTED 111348: 31 c0 xor %eax,%eax 11134a: eb 08 jmp 111354 for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 11134c: 39 73 08 cmp %esi,0x8(%ebx) 11134f: 74 0a je 11135b const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 111351: 83 c3 0c add $0xc,%ebx 111354: 83 3b 00 cmpl $0x0,(%ebx) 111357: 75 f3 jne 11134c 111359: 89 c3 mov %eax,%ebx if (ap->remote_value == remote_value) return ap; return default_ap; } 11135b: 89 d8 mov %ebx,%eax 11135d: 8d 65 f8 lea -0x8(%ebp),%esp 111360: 5b pop %ebx 111361: 5e pop %esi 111362: c9 leave 111363: c3 ret =============================================================================== 001118d8 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 1118d8: 55 push %ebp <== NOT EXECUTED 1118d9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1118db: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 1118de: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 1118e1: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1118e4: e8 13 00 00 00 call 1118fc <== NOT EXECUTED 1118e9: 89 c2 mov %eax,%edx <== NOT EXECUTED if (nap) 1118eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1118ee: 31 c0 xor %eax,%eax <== NOT EXECUTED 1118f0: 85 d2 test %edx,%edx <== NOT EXECUTED 1118f2: 74 03 je 1118f7 <== NOT EXECUTED return nap->remote_value; 1118f4: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED return 0; } 1118f7: c9 leave <== NOT EXECUTED 1118f8: c3 ret <== NOT EXECUTED =============================================================================== 0010f138 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 10f138: 55 push %ebp 10f139: 89 e5 mov %esp,%ebp 10f13b: 53 push %ebx 10f13c: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 10f13f: 8d 45 f4 lea -0xc(%ebp),%eax 10f142: 50 push %eax 10f143: ff 75 08 pushl 0x8(%ebp) 10f146: 68 a4 58 12 00 push $0x1258a4 10f14b: e8 2c c9 ff ff call 10ba7c <_Objects_Get> 10f150: 89 c3 mov %eax,%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 10f152: 83 c4 10 add $0x10,%esp 10f155: b8 04 00 00 00 mov $0x4,%eax 10f15a: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10f15e: 75 32 jne 10f192 <== NEVER TAKEN case OBJECTS_LOCAL: _CORE_barrier_Flush( 10f160: 52 push %edx 10f161: 6a 02 push $0x2 10f163: 6a 00 push $0x0 10f165: 8d 43 14 lea 0x14(%ebx),%eax 10f168: 50 push %eax 10f169: e8 4e d7 ff ff call 10c8bc <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 10f16e: 59 pop %ecx 10f16f: 58 pop %eax 10f170: 53 push %ebx 10f171: 68 a4 58 12 00 push $0x1258a4 10f176: e8 59 c5 ff ff call 10b6d4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 10f17b: 58 pop %eax 10f17c: 5a pop %edx 10f17d: 53 push %ebx 10f17e: 68 a4 58 12 00 push $0x1258a4 10f183: e8 cc c7 ff ff call 10b954 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 10f188: e8 b4 d0 ff ff call 10c241 <_Thread_Enable_dispatch> 10f18d: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f18f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f192: 8b 5d fc mov -0x4(%ebp),%ebx 10f195: c9 leave 10f196: c3 ret =============================================================================== 001071ec : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 1071ec: 55 push %ebp 1071ed: 89 e5 mov %esp,%ebp 1071ef: 57 push %edi 1071f0: 56 push %esi 1071f1: 53 push %ebx 1071f2: 83 ec 0c sub $0xc,%esp 1071f5: 8b 45 08 mov 0x8(%ebp),%eax 1071f8: 8b 5d 0c mov 0xc(%ebp),%ebx 1071fb: 8b 75 10 mov 0x10(%ebp),%esi const char *p; if ( !name ) 1071fe: 85 c0 test %eax,%eax 107200: 74 4c je 10724e return NULL; if ( !value ) 107202: 85 db test %ebx,%ebx 107204: 74 4a je 107250 return NULL; if ( !length ) 107206: 85 f6 test %esi,%esi 107208: 74 44 je 10724e return NULL; value[0] = '\0'; 10720a: c6 03 00 movb $0x0,(%ebx) p = rtems_bsp_cmdline_get_param_raw( name ); 10720d: 83 ec 0c sub $0xc,%esp 107210: 50 push %eax 107211: e8 46 00 00 00 call 10725c if ( !p ) 107216: 83 c4 10 add $0x10,%esp 107219: 85 c0 test %eax,%eax 10721b: 74 31 je 10724e 10721d: 31 ff xor %edi,%edi 10721f: 31 d2 xor %edx,%edx int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i if ( *p == '\"' ) { 107224: 80 f9 22 cmp $0x22,%cl 107227: 75 03 jne 10722c <== ALWAYS TAKEN quotes++; 107229: 47 inc %edi <== NOT EXECUTED 10722a: eb 0d jmp 107239 <== NOT EXECUTED } else if ( ((quotes % 2) == 0) && *p == ' ' ) 10722c: f7 c7 01 00 00 00 test $0x1,%edi 107232: 75 05 jne 107239 <== NEVER TAKEN 107234: 80 f9 20 cmp $0x20,%cl 107237: 74 17 je 107250 <== NEVER TAKEN break; value[i++] = *p++; 107239: 88 0c 13 mov %cl,(%ebx,%edx,1) 10723c: 42 inc %edx value[i] = '\0'; 10723d: c6 04 13 00 movb $0x0,(%ebx,%edx,1) int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 107248: 39 f2 cmp %esi,%edx 10724a: 72 d8 jb 107224 <== ALWAYS TAKEN 10724c: eb 02 jmp 107250 <== NOT EXECUTED 10724e: 31 db xor %ebx,%ebx return NULL; copy_string( p, value, length ); return value; } 107250: 89 d8 mov %ebx,%eax 107252: 8d 65 f4 lea -0xc(%ebp),%esp 107255: 5b pop %ebx 107256: 5e pop %esi 107257: 5f pop %edi 107258: c9 leave 107259: c3 ret =============================================================================== 00107284 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 107284: 55 push %ebp 107285: 89 e5 mov %esp,%ebp 107287: 57 push %edi 107288: 53 push %ebx 107289: 8b 7d 08 mov 0x8(%ebp),%edi 10728c: 8b 5d 0c mov 0xc(%ebp),%ebx const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 10728f: 50 push %eax 107290: ff 75 10 pushl 0x10(%ebp) 107293: 53 push %ebx 107294: 57 push %edi 107295: e8 52 ff ff ff call 1071ec 10729a: 89 c2 mov %eax,%edx if ( !p ) 10729c: 83 c4 10 add $0x10,%esp 10729f: 85 c0 test %eax,%eax 1072a1: 74 3c je 1072df <== NEVER TAKEN return NULL; rhs = &p[strlen(name)]; 1072a3: 31 c0 xor %eax,%eax 1072a5: 83 c9 ff or $0xffffffff,%ecx 1072a8: f2 ae repnz scas %es:(%edi),%al 1072aa: f7 d1 not %ecx 1072ac: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax if ( *rhs != '=' ) 1072b0: 80 38 3d cmpb $0x3d,(%eax) 1072b3: 75 2a jne 1072df <== NEVER TAKEN return NULL; rhs++; 1072b5: 8d 50 01 lea 0x1(%eax),%edx if ( *rhs == '\"' ) 1072b8: 80 78 01 22 cmpb $0x22,0x1(%eax) 1072bc: 75 03 jne 1072c1 <== ALWAYS TAKEN rhs++; 1072be: 8d 50 02 lea 0x2(%eax),%edx <== NOT EXECUTED 1072c1: 89 d8 mov %ebx,%eax 1072c3: eb 04 jmp 1072c9 for ( d=value ; *rhs ; ) *d++ = *rhs++; 1072c5: 88 08 mov %cl,(%eax) <== NOT EXECUTED 1072c7: 40 inc %eax <== NOT EXECUTED 1072c8: 42 inc %edx <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1072c9: 8a 0a mov (%edx),%cl 1072cb: 84 c9 test %cl,%cl 1072cd: 75 f6 jne 1072c5 <== NEVER TAKEN *d++ = *rhs++; if ( *(d-1) == '\"' ) 1072cf: 8d 50 ff lea -0x1(%eax),%edx 1072d2: 80 78 ff 22 cmpb $0x22,-0x1(%eax) 1072d6: 75 02 jne 1072da <== ALWAYS TAKEN 1072d8: 89 d0 mov %edx,%eax <== NOT EXECUTED d--; *d = '\0'; 1072da: c6 00 00 movb $0x0,(%eax) return value; 1072dd: eb 02 jmp 1072e1 1072df: 31 db xor %ebx,%ebx } 1072e1: 89 d8 mov %ebx,%eax 1072e3: 8d 65 f8 lea -0x8(%ebp),%esp 1072e6: 5b pop %ebx 1072e7: 5f pop %edi 1072e8: c9 leave 1072e9: c3 ret =============================================================================== 00107920 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 107920: 55 push %ebp 107921: 89 e5 mov %esp,%ebp 107923: 57 push %edi 107924: 56 push %esi 107925: 53 push %ebx 107926: 83 ec 6c sub $0x6c,%esp 107929: 8b 5d 08 mov 0x8(%ebp),%ebx Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 10792c: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 107930: 0f 84 53 01 00 00 je 107a89 <== NEVER TAKEN * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 107936: 83 ec 0c sub $0xc,%esp 107939: 8d 75 d8 lea -0x28(%ebp),%esi 10793c: 56 push %esi 10793d: e8 8a 4c 00 00 call 10c5cc <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 107942: 83 c4 0c add $0xc,%esp 107945: 8d 45 d0 lea -0x30(%ebp),%eax 107948: 50 push %eax 107949: 56 push %esi 10794a: 68 28 88 12 00 push $0x128828 10794f: e8 b4 6b 00 00 call 10e508 <_Timespec_Subtract> } } } #endif (*print)( 107954: 5e pop %esi 107955: 5f pop %edi 107956: 68 ac 10 12 00 push $0x1210ac 10795b: 53 push %ebx 10795c: ff 55 0c call *0xc(%ebp) 10795f: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp) 107966: 83 c4 10 add $0x10,%esp ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 107969: 8b 55 a4 mov -0x5c(%ebp),%edx 10796c: 8b 04 95 68 85 12 00 mov 0x128568(,%edx,4),%eax 107973: 85 c0 test %eax,%eax 107975: 0f 84 e5 00 00 00 je 107a60 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10797b: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 10797e: 85 f6 test %esi,%esi 107980: 0f 84 da 00 00 00 je 107a60 <== NEVER TAKEN 107986: bf 01 00 00 00 mov $0x1,%edi 10798b: 89 5d 94 mov %ebx,-0x6c(%ebp) 10798e: e9 be 00 00 00 jmp 107a51 for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 107993: 8b 46 1c mov 0x1c(%esi),%eax 107996: 8b 14 b8 mov (%eax,%edi,4),%edx if ( !the_thread ) 107999: 85 d2 test %edx,%edx 10799b: 0f 84 af 00 00 00 je 107a50 <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 1079a1: 51 push %ecx 1079a2: 8d 4d b3 lea -0x4d(%ebp),%ecx 1079a5: 51 push %ecx 1079a6: 6a 0d push $0xd 1079a8: ff 72 08 pushl 0x8(%edx) 1079ab: 89 55 a0 mov %edx,-0x60(%ebp) 1079ae: e8 65 3b 00 00 call 10b518 (*print)( 1079b3: 8d 5d b3 lea -0x4d(%ebp),%ebx 1079b6: 53 push %ebx 1079b7: 8b 55 a0 mov -0x60(%ebp),%edx 1079ba: ff 72 08 pushl 0x8(%edx) 1079bd: 68 1e 12 12 00 push $0x12121e 1079c2: ff 75 94 pushl -0x6c(%ebp) 1079c5: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 1079c8: 8b 55 a0 mov -0x60(%ebp),%edx 1079cb: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx 1079d1: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx 1079d7: 89 4d c8 mov %ecx,-0x38(%ebp) 1079da: 89 5d cc mov %ebx,-0x34(%ebp) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 1079dd: 83 c4 20 add $0x20,%esp 1079e0: a1 50 86 12 00 mov 0x128650,%eax 1079e5: 8b 40 08 mov 0x8(%eax),%eax 1079e8: 3b 42 08 cmp 0x8(%edx),%eax 1079eb: 75 28 jne 107a15 Timestamp_Control used; _Timestamp_Subtract( 1079ed: 50 push %eax 1079ee: 8d 45 c0 lea -0x40(%ebp),%eax 1079f1: 50 push %eax 1079f2: 8d 55 d8 lea -0x28(%ebp),%edx 1079f5: 52 push %edx 1079f6: 68 58 86 12 00 push $0x128658 1079fb: 89 45 a0 mov %eax,-0x60(%ebp) 1079fe: e8 05 6b 00 00 call 10e508 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 107a03: 59 pop %ecx 107a04: 5b pop %ebx 107a05: 8b 45 a0 mov -0x60(%ebp),%eax 107a08: 50 push %eax 107a09: 8d 5d c8 lea -0x38(%ebp),%ebx 107a0c: 53 push %ebx 107a0d: e8 fa 69 00 00 call 10e40c <_Timespec_Add_to> 107a12: 83 c4 10 add $0x10,%esp }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 107a15: 8d 45 e0 lea -0x20(%ebp),%eax 107a18: 50 push %eax 107a19: 8d 55 e4 lea -0x1c(%ebp),%edx 107a1c: 52 push %edx 107a1d: 8d 4d d0 lea -0x30(%ebp),%ecx 107a20: 51 push %ecx 107a21: 8d 5d c8 lea -0x38(%ebp),%ebx 107a24: 53 push %ebx 107a25: e8 12 6a 00 00 call 10e43c <_Timespec_Divide> /* * Print the information */ (*print)( context, 107a2a: 58 pop %eax 107a2b: 5a pop %edx 107a2c: ff 75 e0 pushl -0x20(%ebp) 107a2f: ff 75 e4 pushl -0x1c(%ebp) 107a32: 8b 45 cc mov -0x34(%ebp),%eax 107a35: b9 e8 03 00 00 mov $0x3e8,%ecx 107a3a: 31 d2 xor %edx,%edx 107a3c: f7 f1 div %ecx 107a3e: 50 push %eax 107a3f: ff 75 c8 pushl -0x38(%ebp) 107a42: 68 31 12 12 00 push $0x121231 107a47: ff 75 94 pushl -0x6c(%ebp) 107a4a: ff 55 0c call *0xc(%ebp) 107a4d: 83 c4 20 add $0x20,%esp api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 107a50: 47 inc %edi 107a51: 0f b7 46 10 movzwl 0x10(%esi),%eax 107a55: 39 c7 cmp %eax,%edi 107a57: 0f 86 36 ff ff ff jbe 107993 107a5d: 8b 5d 94 mov -0x6c(%ebp),%ebx "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 107a60: ff 45 a4 incl -0x5c(%ebp) " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 107a63: 83 7d a4 05 cmpl $0x5,-0x5c(%ebp) 107a67: 0f 85 fc fe ff ff jne 107969 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 107a6d: 8b 45 d4 mov -0x2c(%ebp),%eax 107a70: b9 e8 03 00 00 mov $0x3e8,%ecx 107a75: 31 d2 xor %edx,%edx 107a77: f7 f1 div %ecx 107a79: 50 push %eax 107a7a: ff 75 d0 pushl -0x30(%ebp) 107a7d: 68 49 12 12 00 push $0x121249 107a82: 53 push %ebx 107a83: ff 55 0c call *0xc(%ebp) 107a86: 83 c4 10 add $0x10,%esp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 107a89: 8d 65 f4 lea -0xc(%ebp),%esp 107a8c: 5b pop %ebx 107a8d: 5e pop %esi 107a8e: 5f pop %edi 107a8f: c9 leave 107a90: c3 ret =============================================================================== 001118ac : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 1118ac: 55 push %ebp <== NOT EXECUTED 1118ad: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1118af: 53 push %ebx <== NOT EXECUTED 1118b0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 1118b3: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1118b6: 68 dc f8 11 00 push $0x11f8dc <== NOT EXECUTED 1118bb: e8 18 00 00 00 call 1118d8 <== NOT EXECUTED 1118c0: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1118c2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1118c5: 85 c0 test %eax,%eax <== NOT EXECUTED 1118c7: 74 07 je 1118d0 <== NOT EXECUTED { errno = rc; 1118c9: e8 8e 00 00 00 call 11195c <__errno> <== NOT EXECUTED 1118ce: 89 18 mov %ebx,(%eax) <== NOT EXECUTED return -1; } return -1; } 1118d0: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1118d3: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1118d6: c9 leave <== NOT EXECUTED 1118d7: c3 ret <== NOT EXECUTED =============================================================================== 0010b6b3 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 10b6b3: 55 push %ebp <== NOT EXECUTED 10b6b4: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b6b6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED * printf(3) format string, with its concommitant arguments. * * Returns the number of characters written. */ int rtems_error( 10b6b9: 8d 4d 10 lea 0x10(%ebp),%ecx <== NOT EXECUTED { va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 10b6bc: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10b6bf: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10b6c2: e8 6a fe ff ff call 10b531 <== NOT EXECUTED va_end(arglist); return chars_written; } 10b6c7: c9 leave <== NOT EXECUTED 10b6c8: c3 ret <== NOT EXECUTED =============================================================================== 00107631 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 107631: 55 push %ebp 107632: 89 e5 mov %esp,%ebp 107634: 56 push %esi 107635: 53 push %ebx 107636: 83 ec 10 sub $0x10,%esp 107639: 8b 5d 08 mov 0x8(%ebp),%ebx 10763c: 8b 75 14 mov 0x14(%ebp),%esi int i = 0; 10763f: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) /* * Verify Input parameters. */ if ( !pathname ) 107646: 85 db test %ebx,%ebx 107648: 75 0d jne 107657 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 10764a: e8 0d a3 00 00 call 11195c <__errno> <== NOT EXECUTED 10764f: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107655: eb 0f jmp 107666 <== NOT EXECUTED if ( !pathloc ) 107657: 85 f6 test %esi,%esi 107659: 75 10 jne 10766b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 10765b: e8 fc a2 00 00 call 11195c <__errno> <== NOT EXECUTED 107660: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 107666: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107669: eb 28 jmp 107693 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 10766b: 51 push %ecx 10766c: 56 push %esi 10766d: 8d 45 f4 lea -0xc(%ebp),%eax 107670: 50 push %eax 107671: 53 push %ebx 107672: e8 15 0d 00 00 call 10838c /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 107677: 8b 45 f4 mov -0xc(%ebp),%eax 10767a: 5a pop %edx 10767b: ff 75 18 pushl 0x18(%ebp) 10767e: 56 push %esi 10767f: ff 75 10 pushl 0x10(%ebp) 107682: 8b 55 0c mov 0xc(%ebp),%edx 107685: 29 c2 sub %eax,%edx 107687: 52 push %edx 107688: 01 c3 add %eax,%ebx 10768a: 53 push %ebx 10768b: e8 e7 fe ff ff call 107577 107690: 83 c4 20 add $0x20,%esp pathnamelen - i, flags, pathloc, follow_link ); } 107693: 8d 65 f8 lea -0x8(%ebp),%esp 107696: 5b pop %ebx 107697: 5e pop %esi 107698: c9 leave 107699: c3 ret =============================================================================== 00107577 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 107577: 55 push %ebp 107578: 89 e5 mov %esp,%ebp 10757a: 57 push %edi 10757b: 56 push %esi 10757c: 53 push %ebx 10757d: 83 ec 1c sub $0x1c,%esp 107580: 8b 4d 08 mov 0x8(%ebp),%ecx 107583: 8b 75 0c mov 0xc(%ebp),%esi 107586: 8b 7d 10 mov 0x10(%ebp),%edi 107589: 8b 5d 14 mov 0x14(%ebp),%ebx 10758c: 8b 55 18 mov 0x18(%ebp),%edx /* * Verify Input parameters. */ if ( !pathname ) 10758f: 85 c9 test %ecx,%ecx 107591: 75 0d jne 1075a0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 107593: e8 c4 a3 00 00 call 11195c <__errno> <== NOT EXECUTED 107598: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10759e: eb 0f jmp 1075af <== NOT EXECUTED if ( !pathloc ) 1075a0: 85 db test %ebx,%ebx 1075a2: 75 10 jne 1075b4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 1075a4: e8 b3 a3 00 00 call 11195c <__errno> <== NOT EXECUTED 1075a9: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 1075af: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 1075b2: eb 73 jmp 107627 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 1075b4: 8b 43 0c mov 0xc(%ebx),%eax 1075b7: 8b 00 mov (%eax),%eax 1075b9: 85 c0 test %eax,%eax 1075bb: 74 4e je 10760b <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 1075bd: 53 push %ebx 1075be: 57 push %edi 1075bf: 56 push %esi 1075c0: 51 push %ecx 1075c1: 89 55 e4 mov %edx,-0x1c(%ebp) 1075c4: ff d0 call *%eax 1075c6: 89 c6 mov %eax,%esi /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 1075c8: 83 c4 10 add $0x10,%esp 1075cb: 85 c0 test %eax,%eax 1075cd: 8b 55 e4 mov -0x1c(%ebp),%edx 1075d0: 75 55 jne 107627 1075d2: 85 d2 test %edx,%edx 1075d4: 74 51 je 107627 if ( !pathloc->ops->node_type_h ){ 1075d6: 8b 53 0c mov 0xc(%ebx),%edx 1075d9: 8b 42 10 mov 0x10(%edx),%eax 1075dc: 85 c0 test %eax,%eax 1075de: 74 1b je 1075fb <== NEVER TAKEN rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 1075e0: 83 ec 0c sub $0xc,%esp 1075e3: 53 push %ebx 1075e4: ff d0 call *%eax if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 1075e6: 83 e8 03 sub $0x3,%eax 1075e9: 83 c4 10 add $0x10,%esp 1075ec: 83 f8 01 cmp $0x1,%eax 1075ef: 77 36 ja 107627 ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 1075f1: 8b 53 0c mov 0xc(%ebx),%edx 1075f4: 8b 42 34 mov 0x34(%edx),%eax 1075f7: 85 c0 test %eax,%eax 1075f9: 75 1d jne 107618 <== ALWAYS TAKEN rtems_filesystem_freenode( pathloc ); 1075fb: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1075fe: 85 c0 test %eax,%eax <== NOT EXECUTED 107600: 74 09 je 10760b <== NOT EXECUTED 107602: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107605: 53 push %ebx <== NOT EXECUTED 107606: ff d0 call *%eax <== NOT EXECUTED 107608: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10760b: e8 4c a3 00 00 call 11195c <__errno> <== NOT EXECUTED 107610: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 107616: eb 97 jmp 1075af <== NOT EXECUTED * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 107618: 89 7d 0c mov %edi,0xc(%ebp) 10761b: 89 5d 08 mov %ebx,0x8(%ebp) } } return result; } 10761e: 8d 65 f4 lea -0xc(%ebp),%esp 107621: 5b pop %ebx 107622: 5e pop %esi 107623: 5f pop %edi 107624: c9 leave * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 107625: ff e0 jmp *%eax } } return result; } 107627: 89 f0 mov %esi,%eax 107629: 8d 65 f4 lea -0xc(%ebp),%esp 10762c: 5b pop %ebx 10762d: 5e pop %esi 10762e: 5f pop %edi 10762f: c9 leave 107630: c3 ret =============================================================================== 0010ef4b : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 10ef4b: 55 push %ebp 10ef4c: 89 e5 mov %esp,%ebp 10ef4e: 83 ec 18 sub $0x18,%esp 10ef51: 8b 45 08 mov 0x8(%ebp),%eax find_arg fa = { .type = type, .mount_h = NULL }; 10ef54: 89 45 f0 mov %eax,-0x10(%ebp) 10ef57: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) if ( type != NULL ) { 10ef5e: 85 c0 test %eax,%eax 10ef60: 74 13 je 10ef75 <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); 10ef62: 50 push %eax 10ef63: 50 push %eax 10ef64: 8d 45 f0 lea -0x10(%ebp),%eax 10ef67: 50 push %eax 10ef68: 68 fc ed 10 00 push $0x10edfc 10ef6d: e8 54 ff ff ff call 10eec6 10ef72: 83 c4 10 add $0x10,%esp } return fa.mount_h; } 10ef75: 8b 45 f4 mov -0xc(%ebp),%eax 10ef78: c9 leave 10ef79: c3 ret =============================================================================== 001073dc : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1073dc: 55 push %ebp 1073dd: 89 e5 mov %esp,%ebp 1073df: 57 push %edi 1073e0: 56 push %esi 1073e1: 53 push %ebx 1073e2: 83 ec 2c sub $0x2c,%esp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 1073e5: a1 34 34 12 00 mov 0x123434,%eax 1073ea: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1073f1: 83 3d 40 d8 11 00 00 cmpl $0x0,0x11d840 1073f8: 75 0a jne 107404 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); 1073fa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1073fd: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED 107402: eb 28 jmp 10742c <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 107404: a1 2c 16 12 00 mov 0x12162c,%eax status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 107409: 83 ec 0c sub $0xc,%esp 10740c: 6a 00 push $0x0 10740e: ff 70 04 pushl 0x4(%eax) 107411: ff 30 pushl (%eax) 107413: ff 70 0c pushl 0xc(%eax) 107416: ff 70 08 pushl 0x8(%eax) 107419: e8 0c 07 00 00 call 107b2a if ( status == -1 ) 10741e: 83 c4 20 add $0x20,%esp 107421: 40 inc %eax 107422: 75 0d jne 107431 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); 107424: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107427: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED 10742c: e8 6b 37 00 00 call 10ab9c <== NOT EXECUTED rtems_filesystem_link_counts = 0; 107431: a1 34 34 12 00 mov 0x123434,%eax 107436: 66 c7 40 30 00 00 movw $0x0,0x30(%eax) * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 10743c: 83 ec 0c sub $0xc,%esp 10743f: 6a 00 push $0x0 107441: 8d 5d d4 lea -0x2c(%ebp),%ebx 107444: 53 push %ebx 107445: 6a 00 push $0x0 107447: 6a 01 push $0x1 107449: 68 80 ef 11 00 push $0x11ef80 10744e: e8 de 01 00 00 call 107631 rtems_filesystem_root = loc; 107453: 8b 3d 34 34 12 00 mov 0x123434,%edi 107459: 83 c7 18 add $0x18,%edi 10745c: b9 05 00 00 00 mov $0x5,%ecx 107461: 89 de mov %ebx,%esi 107463: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 107465: 83 c4 14 add $0x14,%esp 107468: 6a 00 push $0x0 10746a: 53 push %ebx 10746b: 6a 00 push $0x0 10746d: 6a 01 push $0x1 10746f: 68 80 ef 11 00 push $0x11ef80 107474: e8 b8 01 00 00 call 107631 rtems_filesystem_current = loc; 107479: 8b 3d 34 34 12 00 mov 0x123434,%edi 10747f: 83 c7 04 add $0x4,%edi 107482: b9 05 00 00 00 mov $0x5,%ecx 107487: 89 de mov %ebx,%esi 107489: f3 a5 rep movsl %ds:(%esi),%es:(%edi) * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 10748b: 83 c4 18 add $0x18,%esp 10748e: 68 ff 01 00 00 push $0x1ff 107493: 68 82 ef 11 00 push $0x11ef82 107498: e8 43 05 00 00 call 1079e0 if ( status != 0 ) 10749d: 83 c4 10 add $0x10,%esp 1074a0: 85 c0 test %eax,%eax 1074a2: 74 0d je 1074b1 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0003 ); 1074a4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1074a7: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED 1074ac: e9 7b ff ff ff jmp 10742c <== NOT EXECUTED * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } 1074b1: 8d 65 f4 lea -0xc(%ebp),%esp 1074b4: 5b pop %ebx 1074b5: 5e pop %esi 1074b6: 5f pop %edi 1074b7: c9 leave 1074b8: c3 ret =============================================================================== 0010eec6 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 10eec6: 55 push %ebp 10eec7: 89 e5 mov %esp,%ebp 10eec9: 57 push %edi 10eeca: 56 push %esi 10eecb: 53 push %ebx 10eecc: 83 ec 0c sub $0xc,%esp 10eecf: 8b 7d 08 mov 0x8(%ebp),%edi 10eed2: 31 c0 xor %eax,%eax 10eed4: bb 20 d8 11 00 mov $0x11d820,%ebx const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 10eed9: eb 0e jmp 10eee9 stop = (*routine)( table_entry, routine_arg ); 10eedb: 51 push %ecx 10eedc: 51 push %ecx 10eedd: ff 75 0c pushl 0xc(%ebp) 10eee0: 53 push %ebx 10eee1: ff d7 call *%edi ++table_entry; 10eee3: 83 c3 08 add $0x8,%ebx 10eee6: 83 c4 10 add $0x10,%esp { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 10eee9: 83 3b 00 cmpl $0x0,(%ebx) 10eeec: 74 06 je 10eef4 10eeee: 84 c0 test %al,%al 10eef0: 74 e9 je 10eedb <== ALWAYS TAKEN 10eef2: eb 4f jmp 10ef43 <== NOT EXECUTED 10eef4: 88 c3 mov %al,%bl stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 10eef6: 84 c0 test %al,%al 10eef8: 75 49 jne 10ef43 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 ); 10eefa: 52 push %edx 10eefb: 6a 00 push $0x0 10eefd: 6a 00 push $0x0 10eeff: ff 35 08 55 12 00 pushl 0x125508 10ef05: e8 da b6 ff ff call 10a5e4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 10ef0a: 8b 35 5c 34 12 00 mov 0x12345c,%esi 10ef10: eb 0f jmp 10ef21 !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 10ef12: 50 push %eax 10ef13: 50 push %eax 10ef14: ff 75 0c pushl 0xc(%ebp) 10ef17: 8d 46 08 lea 0x8(%esi),%eax 10ef1a: 50 push %eax 10ef1b: ff d7 call *%edi 10ef1d: 88 c3 mov %al,%bl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 10ef1f: 8b 36 mov (%esi),%esi 10ef21: 83 c4 10 add $0x10,%esp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ef24: 81 fe 60 34 12 00 cmp $0x123460,%esi 10ef2a: 74 04 je 10ef30 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10ef2c: 84 db test %bl,%bl 10ef2e: 74 e2 je 10ef12 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10ef30: 83 ec 0c sub $0xc,%esp 10ef33: ff 35 08 55 12 00 pushl 0x125508 10ef39: e8 92 b7 ff ff call 10a6d0 10ef3e: 88 d8 mov %bl,%al 10ef40: 83 c4 10 add $0x10,%esp } rtems_libio_unlock(); } return stop; } 10ef43: 8d 65 f4 lea -0xc(%ebp),%esp 10ef46: 5b pop %ebx 10ef47: 5e pop %esi 10ef48: 5f pop %edi 10ef49: c9 leave 10ef4a: c3 ret =============================================================================== 00107ad1 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 107ad1: 55 push %ebp 107ad2: 89 e5 mov %esp,%ebp 107ad4: 57 push %edi 107ad5: 56 push %esi 107ad6: 53 push %ebx 107ad7: 83 ec 10 sub $0x10,%esp 107ada: 8b 7d 0c mov 0xc(%ebp),%edi 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 ); 107add: 6a 00 push $0x0 107adf: 6a 00 push $0x0 107ae1: ff 35 08 55 12 00 pushl 0x125508 107ae7: e8 f8 2a 00 00 call 10a5e4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 107aec: 8b 1d 14 34 12 00 mov 0x123414,%ebx 107af2: 31 f6 xor %esi,%esi 107af4: eb 0b jmp 107b01 node = rtems_chain_next( node ) ) { const rtems_filesystem_mount_table_entry_t *mt_entry = (rtems_filesystem_mount_table_entry_t *) node; stop = (*routine)( mt_entry, routine_arg ); 107af6: 50 push %eax 107af7: 50 push %eax 107af8: 57 push %edi 107af9: 53 push %ebx 107afa: ff 55 08 call *0x8(%ebp) 107afd: 89 c6 mov %eax,%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 107aff: 8b 1b mov (%ebx),%ebx 107b01: 83 c4 10 add $0x10,%esp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 107b04: 81 fb 18 34 12 00 cmp $0x123418,%ebx 107b0a: 74 06 je 107b12 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 107b0c: 89 f0 mov %esi,%eax 107b0e: 84 c0 test %al,%al 107b10: 74 e4 je 107af6 <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 107b12: 83 ec 0c sub $0xc,%esp 107b15: ff 35 08 55 12 00 pushl 0x125508 107b1b: e8 b0 2b 00 00 call 10a6d0 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 107b20: 89 f0 mov %esi,%eax 107b22: 8d 65 f4 lea -0xc(%ebp),%esp 107b25: 5b pop %ebx 107b26: 5e pop %esi 107b27: 5f pop %edi 107b28: c9 leave 107b29: c3 ret =============================================================================== 001074f8 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 1074f8: 55 push %ebp 1074f9: 89 e5 mov %esp,%ebp 1074fb: 57 push %edi 1074fc: 56 push %esi 1074fd: 53 push %ebx 1074fe: 83 ec 0c sub $0xc,%esp 107501: 8b 7d 08 mov 0x8(%ebp),%edi 107504: 8b 75 0c mov 0xc(%ebp),%esi 107507: 31 db xor %ebx,%ebx /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 107509: eb 01 jmp 10750c { pathname++; pathnamelen--; stripped++; 10750b: 43 inc %ebx { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 10750c: 8a 04 1f mov (%edi,%ebx,1),%al 10750f: 39 de cmp %ebx,%esi 107511: 74 17 je 10752a <== NEVER TAKEN 107513: 84 c0 test %al,%al 107515: 74 13 je 10752a <== NEVER TAKEN 107517: 83 ec 0c sub $0xc,%esp 10751a: 0f be c0 movsbl %al,%eax 10751d: 50 push %eax 10751e: e8 c1 0e 00 00 call 1083e4 107523: 83 c4 10 add $0x10,%esp 107526: 85 c0 test %eax,%eax 107528: 75 e1 jne 10750b pathname++; pathnamelen--; stripped++; } return stripped; } 10752a: 89 d8 mov %ebx,%eax 10752c: 8d 65 f4 lea -0xc(%ebp),%esp 10752f: 5b pop %ebx 107530: 5e pop %esi 107531: 5f pop %edi 107532: c9 leave 107533: c3 ret =============================================================================== 0010ef7a : int rtems_filesystem_register( const char *type, rtems_filesystem_fsmount_me_t mount_h ) { 10ef7a: 55 push %ebp 10ef7b: 89 e5 mov %esp,%ebp 10ef7d: 57 push %edi 10ef7e: 56 push %esi 10ef7f: 53 push %ebx 10ef80: 83 ec 18 sub $0x18,%esp 10ef83: 8b 5d 08 mov 0x8(%ebp),%ebx size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; 10ef86: 31 c0 xor %eax,%eax 10ef88: 83 c9 ff or $0xffffffff,%ecx 10ef8b: 89 df mov %ebx,%edi 10ef8d: f2 ae repnz scas %es:(%edi),%al 10ef8f: f7 d1 not %ecx filesystem_node *fsn = malloc( fsn_size ); 10ef91: 83 c1 10 add $0x10,%ecx 10ef94: 51 push %ecx 10ef95: e8 a2 89 ff ff call 10793c 10ef9a: 89 c6 mov %eax,%esi char *type_storage = (char *) fsn + sizeof( filesystem_node ); if ( fsn == NULL ) 10ef9c: 83 c4 10 add $0x10,%esp 10ef9f: 85 c0 test %eax,%eax 10efa1: 75 10 jne 10efb3 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 10efa3: e8 b4 29 00 00 call 11195c <__errno> <== NOT EXECUTED 10efa8: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10efae: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10efb1: eb 7a jmp 10f02d <== NOT EXECUTED rtems_filesystem_fsmount_me_t mount_h ) { size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; filesystem_node *fsn = malloc( fsn_size ); char *type_storage = (char *) fsn + sizeof( filesystem_node ); 10efb3: 8d 78 10 lea 0x10(%eax),%edi if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); strcpy(type_storage, type); 10efb6: 50 push %eax 10efb7: 50 push %eax 10efb8: 53 push %ebx 10efb9: 57 push %edi 10efba: e8 11 35 00 00 call 1124d0 fsn->entry.type = type_storage; 10efbf: 89 7e 08 mov %edi,0x8(%esi) fsn->entry.mount_h = mount_h; 10efc2: 8b 45 0c mov 0xc(%ebp),%eax 10efc5: 89 46 0c mov %eax,0xc(%esi) rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10efc8: 83 c4 0c add $0xc,%esp 10efcb: 6a 00 push $0x0 10efcd: 6a 00 push $0x0 10efcf: ff 35 08 55 12 00 pushl 0x125508 10efd5: e8 0a b6 ff ff call 10a5e4 rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { 10efda: 89 1c 24 mov %ebx,(%esp) 10efdd: e8 69 ff ff ff call 10ef4b 10efe2: 83 c4 10 add $0x10,%esp 10efe5: 85 c0 test %eax,%eax 10efe7: 75 1d jne 10f006 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 10efe9: 51 push %ecx 10efea: 51 push %ecx 10efeb: 56 push %esi 10efec: 68 5c 34 12 00 push $0x12345c 10eff1: e8 02 be ff ff call 10adf8 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10eff6: 5a pop %edx 10eff7: ff 35 08 55 12 00 pushl 0x125508 10effd: e8 ce b6 ff ff call 10a6d0 10f002: 31 c0 xor %eax,%eax 10f004: eb 24 jmp 10f02a 10f006: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f009: ff 35 08 55 12 00 pushl 0x125508 <== NOT EXECUTED 10f00f: e8 bc b6 ff ff call 10a6d0 <== NOT EXECUTED rtems_chain_append( &filesystem_chain, &fsn->node ); } else { rtems_libio_unlock(); free( fsn ); 10f014: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED 10f017: e8 80 86 ff ff call 10769c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 10f01c: e8 3b 29 00 00 call 11195c <__errno> <== NOT EXECUTED 10f021: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10f027: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10f02a: 83 c4 10 add $0x10,%esp } rtems_libio_unlock(); return 0; } 10f02d: 8d 65 f4 lea -0xc(%ebp),%esp 10f030: 5b pop %ebx 10f031: 5e pop %esi 10f032: 5f pop %edi 10f033: c9 leave 10f034: c3 ret =============================================================================== 0010ee2c : int rtems_filesystem_unregister( const char *type ) { 10ee2c: 55 push %ebp <== NOT EXECUTED 10ee2d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ee2f: 56 push %esi <== NOT EXECUTED 10ee30: 53 push %ebx <== NOT EXECUTED 10ee31: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED rtems_chain_node *node = NULL; if ( type == NULL ) { 10ee34: 85 f6 test %esi,%esi <== NOT EXECUTED 10ee36: 75 10 jne 10ee48 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 10ee38: e8 1f 2b 00 00 call 11195c <__errno> <== NOT EXECUTED 10ee3d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10ee43: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10ee46: eb 77 jmp 10eebf <== NOT EXECUTED rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10ee48: 53 push %ebx <== NOT EXECUTED 10ee49: 6a 00 push $0x0 <== NOT EXECUTED 10ee4b: 6a 00 push $0x0 <== NOT EXECUTED 10ee4d: ff 35 08 55 12 00 pushl 0x125508 <== NOT EXECUTED 10ee53: e8 8c b7 ff ff call 10a5e4 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 10ee58: 8b 1d 5c 34 12 00 mov 0x12345c,%ebx <== NOT EXECUTED } rtems_libio_lock(); for ( 10ee5e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ee61: eb 35 jmp 10ee98 <== NOT EXECUTED !rtems_chain_is_tail( &filesystem_chain, node ); node = rtems_chain_next( node ) ) { filesystem_node *fsn = (filesystem_node *) node; if ( strcmp( fsn->entry.type, type ) == 0 ) { 10ee63: 51 push %ecx <== NOT EXECUTED 10ee64: 51 push %ecx <== NOT EXECUTED 10ee65: 56 push %esi <== NOT EXECUTED 10ee66: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10ee69: e8 0a 36 00 00 call 112478 <== NOT EXECUTED 10ee6e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ee71: 85 c0 test %eax,%eax <== NOT EXECUTED 10ee73: 75 21 jne 10ee96 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10ee75: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ee78: 53 push %ebx <== NOT EXECUTED 10ee79: e8 9e bf ff ff call 10ae1c <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( node ); free( fsn ); 10ee7e: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10ee81: e8 16 88 ff ff call 10769c <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10ee86: 5a pop %edx <== NOT EXECUTED 10ee87: ff 35 08 55 12 00 pushl 0x125508 <== NOT EXECUTED 10ee8d: e8 3e b8 ff ff call 10a6d0 <== NOT EXECUTED 10ee92: 31 c0 xor %eax,%eax <== NOT EXECUTED 10ee94: eb 26 jmp 10eebc <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 10ee96: 8b 1b mov (%ebx),%ebx <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ee98: 81 fb 60 34 12 00 cmp $0x123460,%ebx <== NOT EXECUTED 10ee9e: 75 c3 jne 10ee63 <== NOT EXECUTED 10eea0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10eea3: ff 35 08 55 12 00 pushl 0x125508 <== NOT EXECUTED 10eea9: e8 22 b8 ff ff call 10a6d0 <== NOT EXECUTED return 0; } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); 10eeae: e8 a9 2a 00 00 call 11195c <__errno> <== NOT EXECUTED 10eeb3: c7 00 02 00 00 00 movl $0x2,(%eax) <== NOT EXECUTED 10eeb9: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10eebc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10eebf: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10eec2: 5b pop %ebx <== NOT EXECUTED 10eec3: 5e pop %esi <== NOT EXECUTED 10eec4: c9 leave <== NOT EXECUTED 10eec5: c3 ret <== NOT EXECUTED =============================================================================== 00107290 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 107290: 55 push %ebp <== NOT EXECUTED 107291: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107293: 57 push %edi <== NOT EXECUTED 107294: 56 push %esi <== NOT EXECUTED 107295: 53 push %ebx <== NOT EXECUTED 107296: 83 ec 48 sub $0x48,%esp <== NOT EXECUTED 107299: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 10729c: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 10729f: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED 1072a2: 31 c0 xor %eax,%eax <== NOT EXECUTED 1072a4: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 1072a6: f7 d1 not %ecx <== NOT EXECUTED 1072a8: 49 dec %ecx <== NOT EXECUTED 1072a9: 6a 01 push $0x1 <== NOT EXECUTED 1072ab: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 1072ae: 56 push %esi <== NOT EXECUTED 1072af: 6a 00 push $0x0 <== NOT EXECUTED 1072b1: 51 push %ecx <== NOT EXECUTED 1072b2: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1072b5: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED 1072b8: e8 74 03 00 00 call 107631 <== NOT EXECUTED 1072bd: 89 c7 mov %eax,%edi <== NOT EXECUTED the_jnode = loc.node_access; 1072bf: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 1072c2: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 1072c5: 8b 41 10 mov 0x10(%ecx),%eax <== NOT EXECUTED 1072c8: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1072cb: 85 c0 test %eax,%eax <== NOT EXECUTED 1072cd: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 1072d0: 75 20 jne 1072f2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1072d2: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED 1072d5: 85 c0 test %eax,%eax <== NOT EXECUTED 1072d7: 74 09 je 1072e2 <== NOT EXECUTED 1072d9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1072dc: 56 push %esi <== NOT EXECUTED 1072dd: ff d0 call *%eax <== NOT EXECUTED 1072df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1072e2: e8 75 a6 00 00 call 11195c <__errno> <== NOT EXECUTED 1072e7: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1072ed: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1072f0: eb 7b jmp 10736d <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 1072f2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1072f5: 56 push %esi <== NOT EXECUTED 1072f6: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED 1072f9: ff d0 call *%eax <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 1072fb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1072fe: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 107301: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 107304: 75 04 jne 10730a <== NOT EXECUTED 107306: 85 ff test %edi,%edi <== NOT EXECUTED 107308: 74 1e je 107328 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 10730a: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10730d: 85 c0 test %eax,%eax <== NOT EXECUTED 10730f: 74 53 je 107364 <== NOT EXECUTED 107311: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 107314: 85 c0 test %eax,%eax <== NOT EXECUTED 107316: 74 4c je 107364 <== NOT EXECUTED 107318: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10731b: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED 10731e: 52 push %edx <== NOT EXECUTED 10731f: ff d0 call *%eax <== NOT EXECUTED 107321: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED 107326: eb 37 jmp 10735f <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 107328: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10732b: 89 02 mov %eax,(%edx) <== NOT EXECUTED device_info->device_name_length = strlen( name ); 10732d: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 107330: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED 107333: 31 c0 xor %eax,%eax <== NOT EXECUTED 107335: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 107337: f7 d1 not %ecx <== NOT EXECUTED 107339: 49 dec %ecx <== NOT EXECUTED 10733a: 89 4a 04 mov %ecx,0x4(%edx) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 10733d: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED 107340: 89 42 08 mov %eax,0x8(%edx) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 107343: 8b 43 54 mov 0x54(%ebx),%eax <== NOT EXECUTED 107346: 89 42 0c mov %eax,0xc(%edx) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 107349: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10734c: 85 c0 test %eax,%eax <== NOT EXECUTED 10734e: 74 1b je 10736b <== NOT EXECUTED 107350: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 107353: 85 c0 test %eax,%eax <== NOT EXECUTED 107355: 74 14 je 10736b <== NOT EXECUTED 107357: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10735a: 56 push %esi <== NOT EXECUTED 10735b: ff d0 call *%eax <== NOT EXECUTED 10735d: 31 c0 xor %eax,%eax <== NOT EXECUTED 10735f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107362: eb 09 jmp 10736d <== NOT EXECUTED 107364: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED 107369: eb 02 jmp 10736d <== NOT EXECUTED 10736b: 31 c0 xor %eax,%eax <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 10736d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107370: 5b pop %ebx <== NOT EXECUTED 107371: 5e pop %esi <== NOT EXECUTED 107372: 5f pop %edi <== NOT EXECUTED 107373: c9 leave <== NOT EXECUTED 107374: c3 ret <== NOT EXECUTED =============================================================================== 0010cab0 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10cab0: 55 push %ebp 10cab1: 89 e5 mov %esp,%ebp 10cab3: 57 push %edi 10cab4: 56 push %esi 10cab5: 53 push %ebx 10cab6: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10cab9: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10cabd: 74 41 je 10cb00 <== NEVER TAKEN 10cabf: bb 01 00 00 00 mov $0x1,%ebx return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10cac4: 8b 04 9d 68 85 12 00 mov 0x128568(,%ebx,4),%eax 10cacb: 85 c0 test %eax,%eax 10cacd: 74 2b je 10cafa continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10cacf: 8b 78 04 mov 0x4(%eax),%edi if ( !information ) 10cad2: be 01 00 00 00 mov $0x1,%esi 10cad7: 85 ff test %edi,%edi 10cad9: 75 17 jne 10caf2 10cadb: eb 1d jmp 10cafa continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10cadd: 8b 47 1c mov 0x1c(%edi),%eax 10cae0: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !the_thread ) 10cae3: 85 c0 test %eax,%eax 10cae5: 74 0a je 10caf1 <== NEVER TAKEN continue; (*routine)(the_thread); 10cae7: 83 ec 0c sub $0xc,%esp 10caea: 50 push %eax 10caeb: ff 55 08 call *0x8(%ebp) 10caee: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10caf1: 46 inc %esi 10caf2: 0f b7 47 10 movzwl 0x10(%edi),%eax 10caf6: 39 c6 cmp %eax,%esi 10caf8: 76 e3 jbe 10cadd Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10cafa: 43 inc %ebx 10cafb: 83 fb 05 cmp $0x5,%ebx 10cafe: 75 c4 jne 10cac4 (*routine)(the_thread); } } } 10cb00: 8d 65 f4 lea -0xc(%ebp),%esp 10cb03: 5b pop %ebx 10cb04: 5e pop %esi 10cb05: 5f pop %edi 10cb06: c9 leave 10cb07: c3 ret =============================================================================== 0010ed3b : * This routine searches the IOP Table for an unused entry. If it * finds one, it returns it. Otherwise, it returns NULL. */ rtems_libio_t *rtems_libio_allocate( void ) { 10ed3b: 55 push %ebp 10ed3c: 89 e5 mov %esp,%ebp 10ed3e: 57 push %edi 10ed3f: 53 push %ebx 10ed40: 83 ec 14 sub $0x14,%esp rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10ed43: 6a 00 push $0x0 10ed45: 6a 00 push $0x0 10ed47: ff 35 08 55 12 00 pushl 0x125508 10ed4d: e8 92 b8 ff ff call 10a5e4 rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { 10ed52: a1 04 55 12 00 mov 0x125504,%eax 10ed57: 83 c4 10 add $0x10,%esp 10ed5a: 85 c0 test %eax,%eax 10ed5c: 74 4f je 10edad rc = rtems_semaphore_create( 10ed5e: 83 ec 0c sub $0xc,%esp 10ed61: 8d 55 f4 lea -0xc(%ebp),%edx 10ed64: 52 push %edx 10ed65: 6a 00 push $0x0 10ed67: 6a 54 push $0x54 10ed69: 6a 01 push $0x1 10ed6b: 2b 05 00 55 12 00 sub 0x125500,%eax 10ed71: c1 f8 06 sar $0x6,%eax 10ed74: 0d 00 49 42 4c or $0x4c424900,%eax 10ed79: 50 push %eax 10ed7a: e8 39 b6 ff ff call 10a3b8 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL) 10ed7f: 83 c4 20 add $0x20,%esp 10ed82: 85 c0 test %eax,%eax 10ed84: 75 27 jne 10edad <== NEVER TAKEN goto failed; iop = rtems_libio_iop_freelist; 10ed86: 8b 1d 04 55 12 00 mov 0x125504,%ebx next = iop->data1; 10ed8c: 8b 53 34 mov 0x34(%ebx),%edx (void) memset( iop, 0, sizeof(rtems_libio_t) ); 10ed8f: b9 10 00 00 00 mov $0x10,%ecx 10ed94: 89 df mov %ebx,%edi 10ed96: f3 ab rep stos %eax,%es:(%edi) iop->flags = LIBIO_FLAGS_OPEN; 10ed98: c7 43 14 00 01 00 00 movl $0x100,0x14(%ebx) iop->sem = sema; 10ed9f: 8b 45 f4 mov -0xc(%ebp),%eax 10eda2: 89 43 2c mov %eax,0x2c(%ebx) rtems_libio_iop_freelist = next; 10eda5: 89 15 04 55 12 00 mov %edx,0x125504 goto done; 10edab: eb 02 jmp 10edaf 10edad: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10edaf: 83 ec 0c sub $0xc,%esp 10edb2: ff 35 08 55 12 00 pushl 0x125508 10edb8: e8 13 b9 ff ff call 10a6d0 iop = 0; done: rtems_libio_unlock(); return iop; } 10edbd: 89 d8 mov %ebx,%eax 10edbf: 8d 65 f8 lea -0x8(%ebp),%esp 10edc2: 5b pop %ebx 10edc3: 5f pop %edi 10edc4: c9 leave 10edc5: c3 ret =============================================================================== 0010ece6 : */ void rtems_libio_free( rtems_libio_t *iop ) { 10ece6: 55 push %ebp 10ece7: 89 e5 mov %esp,%ebp 10ece9: 53 push %ebx 10ecea: 83 ec 08 sub $0x8,%esp 10eced: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10ecf0: 6a 00 push $0x0 10ecf2: 6a 00 push $0x0 10ecf4: ff 35 08 55 12 00 pushl 0x125508 10ecfa: e8 e5 b8 ff ff call 10a5e4 rtems_libio_lock(); if (iop->sem) 10ecff: 8b 43 2c mov 0x2c(%ebx),%eax 10ed02: 83 c4 10 add $0x10,%esp 10ed05: 85 c0 test %eax,%eax 10ed07: 74 0c je 10ed15 <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 10ed09: 83 ec 0c sub $0xc,%esp 10ed0c: 50 push %eax 10ed0d: e8 42 b8 ff ff call 10a554 10ed12: 83 c4 10 add $0x10,%esp iop->flags &= ~LIBIO_FLAGS_OPEN; 10ed15: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) iop->data1 = rtems_libio_iop_freelist; 10ed1c: a1 04 55 12 00 mov 0x125504,%eax 10ed21: 89 43 34 mov %eax,0x34(%ebx) rtems_libio_iop_freelist = iop; 10ed24: 89 1d 04 55 12 00 mov %ebx,0x125504 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10ed2a: a1 08 55 12 00 mov 0x125508,%eax 10ed2f: 89 45 08 mov %eax,0x8(%ebp) rtems_libio_unlock(); } 10ed32: 8b 5d fc mov -0x4(%ebp),%ebx 10ed35: c9 leave 10ed36: e9 95 b9 ff ff jmp 10a6d0 =============================================================================== 00107788 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 107788: 55 push %ebp 107789: 89 e5 mov %esp,%ebp 10778b: 53 push %ebx 10778c: 83 ec 04 sub $0x4,%esp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 10778f: a1 24 16 12 00 mov 0x121624,%eax 107794: 85 c0 test %eax,%eax 107796: 74 40 je 1077d8 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 107798: 52 push %edx 107799: 52 push %edx 10779a: 6a 40 push $0x40 10779c: 50 push %eax 10779d: e8 1a fd ff ff call 1074bc 1077a2: a3 00 55 12 00 mov %eax,0x125500 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1077a7: 83 c4 10 add $0x10,%esp 1077aa: 85 c0 test %eax,%eax 1077ac: 75 07 jne 1077b5 <== ALWAYS TAKEN rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 1077ae: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1077b1: 6a 1a push $0x1a <== NOT EXECUTED 1077b3: eb 46 jmp 1077fb <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 1077b5: a3 04 55 12 00 mov %eax,0x125504 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1077ba: 8b 1d 24 16 12 00 mov 0x121624,%ebx 1077c0: 31 d2 xor %edx,%edx 1077c2: eb 03 jmp 1077c7 iop->data1 = iop + 1; 1077c4: 89 40 f4 mov %eax,-0xc(%eax) 1077c7: 89 c1 mov %eax,%ecx sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1077c9: 42 inc %edx 1077ca: 83 c0 40 add $0x40,%eax 1077cd: 39 da cmp %ebx,%edx 1077cf: 72 f3 jb 1077c4 iop->data1 = iop + 1; iop->data1 = NULL; 1077d1: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 1077d8: 83 ec 0c sub $0xc,%esp 1077db: 68 08 55 12 00 push $0x125508 1077e0: 6a 00 push $0x0 1077e2: 6a 54 push $0x54 1077e4: 6a 01 push $0x1 1077e6: 68 4f 49 42 4c push $0x4c42494f 1077eb: e8 c8 2b 00 00 call 10a3b8 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 1077f0: 83 c4 20 add $0x20,%esp 1077f3: 85 c0 test %eax,%eax 1077f5: 74 09 je 107800 <== ALWAYS TAKEN rtems_fatal_error_occurred( rc ); 1077f7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1077fa: 50 push %eax <== NOT EXECUTED 1077fb: e8 9c 33 00 00 call 10ab9c <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 107800: a1 20 16 12 00 mov 0x121620,%eax 107805: 85 c0 test %eax,%eax 107807: 74 06 je 10780f <== NEVER TAKEN (* rtems_fs_init_helper)(); } 107809: 8b 5d fc mov -0x4(%ebp),%ebx 10780c: c9 leave /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 10780d: ff e0 jmp *%eax } 10780f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107812: c9 leave <== NOT EXECUTED 107813: c3 ret <== NOT EXECUTED =============================================================================== 001089c0 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 1089c0: 55 push %ebp 1089c1: 89 e5 mov %esp,%ebp 1089c3: 57 push %edi 1089c4: 56 push %esi 1089c5: 53 push %ebx 1089c6: 83 ec 40 sub $0x40,%esp rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 1089c9: 8d 45 e4 lea -0x1c(%ebp),%eax 1089cc: 50 push %eax 1089cd: 6a 00 push $0x0 1089cf: 6a 00 push $0x0 1089d1: e8 32 27 00 00 call 10b108 1089d6: 89 45 c4 mov %eax,-0x3c(%ebp) if (sc != RTEMS_SUCCESSFUL) return sc; 1089d9: 83 c4 10 add $0x10,%esp 1089dc: 85 c0 test %eax,%eax 1089de: 0f 85 c7 00 00 00 jne 108aab <== NEVER TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 1089e4: 81 3d 40 2f 12 00 70 cmpl $0x125070,0x122f40 1089eb: 50 12 00 1089ee: 75 51 jne 108a41 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 1089f0: 83 ec 0c sub $0xc,%esp 1089f3: 6a 48 push $0x48 1089f5: e8 8a f4 ff ff call 107e84 1089fa: 89 c3 mov %eax,%ebx if (!tmp) 1089fc: 83 c4 10 add $0x10,%esp 1089ff: 85 c0 test %eax,%eax 108a01: 75 0c jne 108a0f <== ALWAYS TAKEN 108a03: c7 45 c4 1a 00 00 00 movl $0x1a,-0x3c(%ebp) <== NOT EXECUTED 108a0a: e9 9c 00 00 00 jmp 108aab <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 108a0f: 56 push %esi 108a10: 68 d4 88 10 00 push $0x1088d4 108a15: 68 40 2f 12 00 push $0x122f40 108a1a: 6a 00 push $0x0 108a1c: e8 03 28 00 00 call 10b224 108a21: 89 c6 mov %eax,%esi if (sc != RTEMS_SUCCESSFUL) { 108a23: 83 c4 10 add $0x10,%esp 108a26: 85 c0 test %eax,%eax 108a28: 74 11 je 108a3b <== ALWAYS TAKEN /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 108a2a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108a2d: 53 push %ebx <== NOT EXECUTED 108a2e: e8 a5 ef ff ff call 1079d8 <== NOT EXECUTED 108a33: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED return sc; 108a36: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108a39: eb 70 jmp 108aab <== NOT EXECUTED } rtems_current_user_env = tmp; 108a3b: 89 1d 40 2f 12 00 mov %ebx,0x122f40 }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 108a41: a1 40 2f 12 00 mov 0x122f40,%eax 108a46: be 70 50 12 00 mov $0x125070,%esi 108a4b: b9 12 00 00 00 mov $0x12,%ecx 108a50: 89 c7 mov %eax,%edi 108a52: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_current_user_env->task_id=task_id; /* mark the local values*/ 108a54: 8b 55 e4 mov -0x1c(%ebp),%edx 108a57: 89 10 mov %edx,(%eax) * what we are trying to do here is forking off * clones. The reason is a pathloc can be allocated by the * file system and needs to be freed when deleting the environment. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 108a59: 83 ec 0c sub $0xc,%esp 108a5c: 6a 00 push $0x0 108a5e: 8d 5d d0 lea -0x30(%ebp),%ebx 108a61: 53 push %ebx 108a62: 6a 00 push $0x0 108a64: 6a 01 push $0x1 108a66: 68 08 f7 11 00 push $0x11f708 108a6b: e8 fd ee ff ff call 10796d rtems_filesystem_root = loc; 108a70: 8b 3d 40 2f 12 00 mov 0x122f40,%edi 108a76: 83 c7 18 add $0x18,%edi 108a79: b9 05 00 00 00 mov $0x5,%ecx 108a7e: 89 de mov %ebx,%esi 108a80: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 108a82: 83 c4 14 add $0x14,%esp 108a85: 6a 00 push $0x0 108a87: 53 push %ebx 108a88: 6a 00 push $0x0 108a8a: 6a 01 push $0x1 108a8c: 68 08 f7 11 00 push $0x11f708 108a91: e8 d7 ee ff ff call 10796d rtems_filesystem_current = loc; 108a96: 8b 3d 40 2f 12 00 mov 0x122f40,%edi 108a9c: 83 c7 04 add $0x4,%edi 108a9f: b9 05 00 00 00 mov $0x5,%ecx 108aa4: 89 de mov %ebx,%esi 108aa6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return RTEMS_SUCCESSFUL; 108aa8: 83 c4 20 add $0x20,%esp } 108aab: 8b 45 c4 mov -0x3c(%ebp),%eax 108aae: 8d 65 f4 lea -0xc(%ebp),%esp 108ab1: 5b pop %ebx 108ab2: 5e pop %esi 108ab3: 5f pop %edi 108ab4: c9 leave 108ab5: c3 ret =============================================================================== 0010892b : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 10892b: 55 push %ebp <== NOT EXECUTED 10892c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10892e: 53 push %ebx <== NOT EXECUTED 10892f: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); 108932: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 108935: 50 push %eax <== NOT EXECUTED 108936: 6a 00 push $0x0 <== NOT EXECUTED 108938: 6a 00 push $0x0 <== NOT EXECUTED 10893a: e8 c9 27 00 00 call 10b108 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 10893f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108942: 85 c0 test %eax,%eax <== NOT EXECUTED 108944: 75 75 jne 1089bb <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 108946: 8b 1d 40 2f 12 00 mov 0x122f40,%ebx <== NOT EXECUTED 10894c: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 10894e: 3b 45 f0 cmp -0x10(%ebp),%eax <== NOT EXECUTED 108951: 75 21 jne 108974 <== NOT EXECUTED /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 108953: 51 push %ecx <== NOT EXECUTED 108954: 51 push %ecx <== NOT EXECUTED 108955: 68 40 2f 12 00 push $0x122f40 <== NOT EXECUTED 10895a: 6a 00 push $0x0 <== NOT EXECUTED 10895c: e8 57 29 00 00 call 10b2b8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 108961: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108964: 85 c0 test %eax,%eax <== NOT EXECUTED 108966: 75 53 jne 1089bb <== NOT EXECUTED free_user_env(tmp); 108968: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10896b: 53 push %ebx <== NOT EXECUTED 10896c: e8 63 ff ff ff call 1088d4 <== NOT EXECUTED 108971: 83 c4 10 add $0x10,%esp <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 108974: 52 push %edx <== NOT EXECUTED 108975: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 108978: 50 push %eax <== NOT EXECUTED 108979: 68 40 2f 12 00 push $0x122f40 <== NOT EXECUTED 10897e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 108981: e8 ae 29 00 00 call 10b334 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 108986: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108989: 85 c0 test %eax,%eax <== NOT EXECUTED 10898b: 75 24 jne 1089b1 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 10898d: 50 push %eax <== NOT EXECUTED 10898e: 68 d4 88 10 00 push $0x1088d4 <== NOT EXECUTED 108993: 68 40 2f 12 00 push $0x122f40 <== NOT EXECUTED 108998: 6a 00 push $0x0 <== NOT EXECUTED 10899a: e8 85 28 00 00 call 10b224 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 10899f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1089a2: 85 c0 test %eax,%eax <== NOT EXECUTED 1089a4: 75 0b jne 1089b1 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 1089a6: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 1089a9: 89 15 40 2f 12 00 mov %edx,0x122f40 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 1089af: eb 0a jmp 1089bb <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 1089b1: c7 05 40 2f 12 00 70 movl $0x125070,0x122f40 <== NOT EXECUTED 1089b8: 50 12 00 return sc; } 1089bb: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1089be: c9 leave <== NOT EXECUTED 1089bf: c3 ret <== NOT EXECUTED =============================================================================== 0010ebf0 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 10ebf0: 55 push %ebp 10ebf1: 89 e5 mov %esp,%ebp 10ebf3: 8b 55 08 mov 0x8(%ebp),%edx uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10ebf6: 89 d1 mov %edx,%ecx 10ebf8: 83 e1 06 and $0x6,%ecx 10ebfb: b8 02 00 00 00 mov $0x2,%eax 10ec00: 83 f9 06 cmp $0x6,%ecx 10ec03: 74 0f je 10ec14 <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 10ec05: 30 c0 xor %al,%al 10ec07: f6 c2 02 test $0x2,%dl 10ec0a: 75 08 jne 10ec14 <== ALWAYS TAKEN 10ec0c: 89 d0 mov %edx,%eax <== NOT EXECUTED 10ec0e: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED 10ec11: 83 e0 01 and $0x1,%eax <== NOT EXECUTED fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 10ec14: f6 c2 01 test $0x1,%dl 10ec17: 74 03 je 10ec1c fcntl_flags |= O_NONBLOCK; 10ec19: 80 cc 40 or $0x40,%ah } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 10ec1c: f6 c6 02 test $0x2,%dh 10ec1f: 74 03 je 10ec24 fcntl_flags |= O_APPEND; 10ec21: 83 c8 08 or $0x8,%eax } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 10ec24: 80 e6 04 and $0x4,%dh 10ec27: 74 03 je 10ec2c fcntl_flags |= O_CREAT; 10ec29: 80 cc 02 or $0x2,%ah } return fcntl_flags; } 10ec2c: c9 leave 10ec2d: c3 ret =============================================================================== 00112550 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 112550: 55 push %ebp 112551: 89 e5 mov %esp,%ebp 112553: 56 push %esi 112554: 53 push %ebx 112555: 8b 5d 08 mov 0x8(%ebp),%ebx void *return_this; /* * Parameter error checks */ if ( !pointer ) 112558: 85 db test %ebx,%ebx 11255a: 74 57 je 1125b3 return EINVAL; *pointer = NULL; 11255c: c7 03 00 00 00 00 movl $0x0,(%ebx) /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 112562: 83 3d a0 8c 12 00 03 cmpl $0x3,0x128ca0 112569: 75 09 jne 112574 <== NEVER TAKEN 11256b: e8 90 5f ff ff call 108500 112570: 84 c0 test %al,%al 112572: 74 3f je 1125b3 <== NEVER TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 112574: e8 dd 5f ff ff call 108556 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 112579: 6a 00 push $0x0 11257b: ff 75 0c pushl 0xc(%ebp) 11257e: ff 75 10 pushl 0x10(%ebp) 112581: ff 35 30 4a 12 00 pushl 0x124a30 112587: e8 2c a8 ff ff call 10cdb8 <_Protected_heap_Allocate_aligned_with_boundary> 11258c: 89 c6 mov %eax,%esi return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 11258e: 83 c4 10 add $0x10,%esp 112591: b8 0c 00 00 00 mov $0xc,%eax 112596: 85 f6 test %esi,%esi 112598: 74 1e je 1125b8 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 11259a: a1 d0 6d 12 00 mov 0x126dd0,%eax 11259f: 85 c0 test %eax,%eax 1125a1: 74 0a je 1125ad <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 1125a3: 83 ec 0c sub $0xc,%esp 1125a6: 53 push %ebx <== NOT EXECUTED 1125a7: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 1125aa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 1125ad: 89 33 mov %esi,(%ebx) 1125af: 31 c0 xor %eax,%eax return 0; 1125b1: eb 05 jmp 1125b8 1125b3: b8 16 00 00 00 mov $0x16,%eax } 1125b8: 8d 65 f8 lea -0x8(%ebp),%esp 1125bb: 5b pop %ebx 1125bc: 5e pop %esi 1125bd: c9 leave 1125be: c3 ret =============================================================================== 0010b69b : void rtems_panic( const char *printf_format, ... ) { 10b69b: 55 push %ebp <== NOT EXECUTED 10b69c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b69e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED /* * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...) */ void rtems_panic( 10b6a1: 8d 4d 0c lea 0xc(%ebp),%ecx <== NOT EXECUTED ) { va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 10b6a4: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10b6a7: b8 00 00 00 20 mov $0x20000000,%eax <== NOT EXECUTED 10b6ac: e8 80 fe ff ff call 10b531 <== NOT EXECUTED va_end(arglist); } 10b6b1: c9 leave <== NOT EXECUTED 10b6b2: c3 ret <== NOT EXECUTED =============================================================================== 00114f08 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 114f08: 55 push %ebp 114f09: 89 e5 mov %esp,%ebp 114f0b: 57 push %edi 114f0c: 56 push %esi 114f0d: 53 push %ebx 114f0e: 83 ec 1c sub $0x1c,%esp 114f11: 8b 75 0c mov 0xc(%ebp),%esi 114f14: 8b 55 10 mov 0x10(%ebp),%edx 114f17: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 114f1a: b8 03 00 00 00 mov $0x3,%eax 114f1f: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 114f23: 0f 84 cf 00 00 00 je 114ff8 return RTEMS_INVALID_NAME; if ( !starting_address ) 114f29: 85 f6 test %esi,%esi 114f2b: 0f 84 bb 00 00 00 je 114fec return RTEMS_INVALID_ADDRESS; if ( !id ) 114f31: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 114f35: 0f 84 b1 00 00 00 je 114fec <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114f3b: 85 ff test %edi,%edi 114f3d: 0f 84 b0 00 00 00 je 114ff3 114f43: 85 d2 test %edx,%edx 114f45: 0f 84 a8 00 00 00 je 114ff3 114f4b: 39 fa cmp %edi,%edx 114f4d: 0f 82 a0 00 00 00 jb 114ff3 114f53: f7 c7 03 00 00 00 test $0x3,%edi 114f59: 0f 85 94 00 00 00 jne 114ff3 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 114f5f: f7 c6 03 00 00 00 test $0x3,%esi 114f65: 0f 85 81 00 00 00 jne 114fec 114f6b: a1 64 e5 13 00 mov 0x13e564,%eax 114f70: 40 inc %eax 114f71: a3 64 e5 13 00 mov %eax,0x13e564 * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 114f76: 83 ec 0c sub $0xc,%esp 114f79: 68 ec e3 13 00 push $0x13e3ec 114f7e: 89 55 e4 mov %edx,-0x1c(%ebp) 114f81: e8 a6 3b 00 00 call 118b2c <_Objects_Allocate> 114f86: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 114f88: 83 c4 10 add $0x10,%esp 114f8b: 85 c0 test %eax,%eax 114f8d: 8b 55 e4 mov -0x1c(%ebp),%edx 114f90: 75 0c jne 114f9e _Thread_Enable_dispatch(); 114f92: e8 16 48 00 00 call 1197ad <_Thread_Enable_dispatch> 114f97: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 114f9c: eb 5a jmp 114ff8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 114f9e: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 114fa1: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 114fa4: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 114fa7: 8b 45 18 mov 0x18(%ebp),%eax 114faa: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 114fad: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 114fb4: 57 push %edi 114fb5: 89 d0 mov %edx,%eax 114fb7: 31 d2 xor %edx,%edx 114fb9: f7 f7 div %edi 114fbb: 50 push %eax 114fbc: 56 push %esi 114fbd: 8d 43 24 lea 0x24(%ebx),%eax 114fc0: 50 push %eax 114fc1: e8 62 2a 00 00 call 117a28 <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 114fc6: 8b 43 08 mov 0x8(%ebx),%eax 114fc9: 0f b7 c8 movzwl %ax,%ecx 114fcc: 8b 15 08 e4 13 00 mov 0x13e408,%edx 114fd2: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 114fd5: 8b 55 08 mov 0x8(%ebp),%edx 114fd8: 89 53 0c mov %edx,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 114fdb: 8b 55 1c mov 0x1c(%ebp),%edx 114fde: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 114fe0: e8 c8 47 00 00 call 1197ad <_Thread_Enable_dispatch> 114fe5: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114fe7: 83 c4 10 add $0x10,%esp 114fea: eb 0c jmp 114ff8 114fec: b8 09 00 00 00 mov $0x9,%eax 114ff1: eb 05 jmp 114ff8 114ff3: b8 08 00 00 00 mov $0x8,%eax } 114ff8: 8d 65 f4 lea -0xc(%ebp),%esp 114ffb: 5b pop %ebx 114ffc: 5e pop %esi 114ffd: 5f pop %edi 114ffe: c9 leave 114fff: c3 ret =============================================================================== 0010d61a : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 10d61a: 55 push %ebp 10d61b: 89 e5 mov %esp,%ebp 10d61d: 83 ec 08 sub $0x8,%esp if (!rtems_pipe_configured) 10d620: 80 3d ac 39 12 00 00 cmpb $0x0,0x1239ac 10d627: 74 3c je 10d665 <== ALWAYS TAKEN return; if (rtems_pipe_semaphore) 10d629: 83 3d fc 52 12 00 00 cmpl $0x0,0x1252fc <== NOT EXECUTED 10d630: 75 33 jne 10d665 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 10d632: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d635: 68 fc 52 12 00 push $0x1252fc <== NOT EXECUTED 10d63a: 6a 00 push $0x0 <== NOT EXECUTED 10d63c: 6a 54 push $0x54 <== NOT EXECUTED 10d63e: 6a 01 push $0x1 <== NOT EXECUTED 10d640: 68 45 50 49 50 push $0x50495045 <== NOT EXECUTED 10d645: e8 6e cd ff ff call 10a3b8 <== NOT EXECUTED rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) 10d64a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10d64d: 85 c0 test %eax,%eax <== NOT EXECUTED 10d64f: 74 09 je 10d65a <== NOT EXECUTED rtems_fatal_error_occurred (sc); 10d651: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d654: 50 push %eax <== NOT EXECUTED 10d655: e8 42 d5 ff ff call 10ab9c <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 10d65a: e8 55 c9 ff ff call 109fb4 <== NOT EXECUTED rtems_pipe_no = now; 10d65f: 66 a3 04 53 12 00 mov %ax,0x125304 <== NOT EXECUTED } 10d665: c9 leave 10d666: c3 ret =============================================================================== 0010b465 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10b465: 55 push %ebp 10b466: 89 e5 mov %esp,%ebp 10b468: 57 push %edi 10b469: 56 push %esi 10b46a: 53 push %ebx 10b46b: 83 ec 30 sub $0x30,%esp 10b46e: 8b 75 08 mov 0x8(%ebp),%esi 10b471: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 10b474: 8d 45 e4 lea -0x1c(%ebp),%eax 10b477: 50 push %eax 10b478: 56 push %esi 10b479: 68 9c 71 12 00 push $0x12719c 10b47e: e8 15 1d 00 00 call 10d198 <_Objects_Get> 10b483: 89 c7 mov %eax,%edi rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10b485: 83 c4 10 add $0x10,%esp 10b488: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b48c: 0f 85 40 01 00 00 jne 10b5d2 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10b492: 8b 40 40 mov 0x40(%eax),%eax 10b495: 3b 05 50 73 12 00 cmp 0x127350,%eax 10b49b: 74 0f je 10b4ac _Thread_Enable_dispatch(); 10b49d: e8 bb 24 00 00 call 10d95d <_Thread_Enable_dispatch> 10b4a2: bb 17 00 00 00 mov $0x17,%ebx return RTEMS_NOT_OWNER_OF_RESOURCE; 10b4a7: e9 2b 01 00 00 jmp 10b5d7 } if ( length == RTEMS_PERIOD_STATUS ) { 10b4ac: 85 db test %ebx,%ebx 10b4ae: 75 19 jne 10b4c9 switch ( the_period->state ) { 10b4b0: 8b 47 38 mov 0x38(%edi),%eax 10b4b3: 83 f8 04 cmp $0x4,%eax 10b4b6: 77 07 ja 10b4bf <== NEVER TAKEN 10b4b8: 8b 1c 85 60 11 12 00 mov 0x121160(,%eax,4),%ebx case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10b4bf: e8 99 24 00 00 call 10d95d <_Thread_Enable_dispatch> return( return_value ); 10b4c4: e9 0e 01 00 00 jmp 10b5d7 } _ISR_Disable( level ); 10b4c9: 9c pushf 10b4ca: fa cli 10b4cb: 8f 45 d4 popl -0x2c(%ebp) switch ( the_period->state ) { 10b4ce: 8b 47 38 mov 0x38(%edi),%eax 10b4d1: 83 f8 02 cmp $0x2,%eax 10b4d4: 74 5f je 10b535 10b4d6: 83 f8 04 cmp $0x4,%eax 10b4d9: 0f 84 ba 00 00 00 je 10b599 10b4df: 85 c0 test %eax,%eax 10b4e1: 0f 85 eb 00 00 00 jne 10b5d2 <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10b4e7: ff 75 d4 pushl -0x2c(%ebp) 10b4ea: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10b4eb: 83 ec 0c sub $0xc,%esp 10b4ee: 57 push %edi 10b4ef: e8 9c fd ff ff call 10b290 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10b4f4: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b4fb: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10b502: c7 47 2c e0 b7 10 00 movl $0x10b7e0,0x2c(%edi) the_watchdog->id = id; 10b509: 89 77 30 mov %esi,0x30(%edi) the_watchdog->user_data = user_data; 10b50c: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10b513: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b516: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b519: 5b pop %ebx 10b51a: 5e pop %esi 10b51b: 83 c7 10 add $0x10,%edi 10b51e: 57 push %edi 10b51f: 68 70 73 12 00 push $0x127370 10b524: e8 7b 33 00 00 call 10e8a4 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10b529: e8 2f 24 00 00 call 10d95d <_Thread_Enable_dispatch> 10b52e: 31 db xor %ebx,%ebx 10b530: e9 98 00 00 00 jmp 10b5cd case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10b535: 83 ec 0c sub $0xc,%esp 10b538: 57 push %edi 10b539: e8 4c fe ff ff call 10b38a <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 10b53e: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) the_period->next_length = length; 10b545: 89 5f 3c mov %ebx,0x3c(%edi) _ISR_Enable( level ); 10b548: ff 75 d4 pushl -0x2c(%ebp) 10b54b: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10b54c: a1 50 73 12 00 mov 0x127350,%eax 10b551: 8b 57 08 mov 0x8(%edi),%edx 10b554: 89 50 20 mov %edx,0x20(%eax) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10b557: 5a pop %edx 10b558: 59 pop %ecx 10b559: 68 00 40 00 00 push $0x4000 10b55e: 50 push %eax 10b55f: e8 08 2c 00 00 call 10e16c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10b564: 9c pushf 10b565: fa cli 10b566: 5a pop %edx local_state = the_period->state; 10b567: 8b 47 38 mov 0x38(%edi),%eax the_period->state = RATE_MONOTONIC_ACTIVE; 10b56a: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) _ISR_Enable( level ); 10b571: 52 push %edx 10b572: 9d popf /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 10b573: 83 c4 10 add $0x10,%esp 10b576: 83 f8 03 cmp $0x3,%eax 10b579: 75 15 jne 10b590 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10b57b: 56 push %esi 10b57c: 56 push %esi 10b57d: 68 00 40 00 00 push $0x4000 10b582: ff 35 50 73 12 00 pushl 0x127350 10b588: e8 53 20 00 00 call 10d5e0 <_Thread_Clear_state> 10b58d: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 10b590: e8 c8 23 00 00 call 10d95d <_Thread_Enable_dispatch> 10b595: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 10b597: eb 3e jmp 10b5d7 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10b599: 83 ec 0c sub $0xc,%esp 10b59c: 57 push %edi 10b59d: e8 e8 fd ff ff call 10b38a <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10b5a2: ff 75 d4 pushl -0x2c(%ebp) 10b5a5: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10b5a6: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) the_period->next_length = length; 10b5ad: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b5b0: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b5b3: 59 pop %ecx 10b5b4: 5b pop %ebx 10b5b5: 83 c7 10 add $0x10,%edi 10b5b8: 57 push %edi 10b5b9: 68 70 73 12 00 push $0x127370 10b5be: e8 e1 32 00 00 call 10e8a4 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10b5c3: e8 95 23 00 00 call 10d95d <_Thread_Enable_dispatch> 10b5c8: bb 06 00 00 00 mov $0x6,%ebx return RTEMS_TIMEOUT; 10b5cd: 83 c4 10 add $0x10,%esp 10b5d0: eb 05 jmp 10b5d7 10b5d2: bb 04 00 00 00 mov $0x4,%ebx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b5d7: 89 d8 mov %ebx,%eax 10b5d9: 8d 65 f4 lea -0xc(%ebp),%esp 10b5dc: 5b pop %ebx 10b5dd: 5e pop %esi 10b5de: 5f pop %edi 10b5df: c9 leave 10b5e0: c3 ret =============================================================================== 0010b5e4 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10b5e4: 55 push %ebp 10b5e5: 89 e5 mov %esp,%ebp 10b5e7: 57 push %edi 10b5e8: 56 push %esi 10b5e9: 53 push %ebx 10b5ea: 83 ec 7c sub $0x7c,%esp 10b5ed: 8b 5d 08 mov 0x8(%ebp),%ebx 10b5f0: 8b 7d 0c mov 0xc(%ebp),%edi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 10b5f3: 85 ff test %edi,%edi 10b5f5: 0f 84 2b 01 00 00 je 10b726 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10b5fb: 52 push %edx 10b5fc: 52 push %edx 10b5fd: 68 74 11 12 00 push $0x121174 10b602: 53 push %ebx 10b603: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10b605: 5e pop %esi 10b606: 58 pop %eax 10b607: 68 92 11 12 00 push $0x121192 10b60c: 53 push %ebx 10b60d: ff d7 call *%edi (*print)( context, "--- Wall times are in seconds ---\n" ); 10b60f: 5a pop %edx 10b610: 59 pop %ecx 10b611: 68 b4 11 12 00 push $0x1211b4 10b616: 53 push %ebx 10b617: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10b619: 5e pop %esi 10b61a: 58 pop %eax 10b61b: 68 d7 11 12 00 push $0x1211d7 10b620: 53 push %ebx 10b621: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10b623: 5a pop %edx 10b624: 59 pop %ecx 10b625: 68 22 12 12 00 push $0x121222 10b62a: 53 push %ebx 10b62b: ff d7 call *%edi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10b62d: 8b 35 a4 71 12 00 mov 0x1271a4,%esi 10b633: 83 c4 10 add $0x10,%esp 10b636: e9 df 00 00 00 jmp 10b71a id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10b63b: 50 push %eax 10b63c: 50 push %eax 10b63d: 8d 45 88 lea -0x78(%ebp),%eax 10b640: 50 push %eax 10b641: 56 push %esi 10b642: e8 29 56 00 00 call 110c70 if ( status != RTEMS_SUCCESSFUL ) 10b647: 83 c4 10 add $0x10,%esp 10b64a: 85 c0 test %eax,%eax 10b64c: 0f 85 c7 00 00 00 jne 10b719 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10b652: 51 push %ecx 10b653: 51 push %ecx 10b654: 8d 55 c0 lea -0x40(%ebp),%edx 10b657: 52 push %edx 10b658: 56 push %esi 10b659: e8 b6 56 00 00 call 110d14 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10b65e: 83 c4 0c add $0xc,%esp 10b661: 8d 45 e3 lea -0x1d(%ebp),%eax 10b664: 50 push %eax 10b665: 6a 05 push $0x5 10b667: ff 75 c0 pushl -0x40(%ebp) 10b66a: e8 fd 01 00 00 call 10b86c /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10b66f: 58 pop %eax 10b670: 5a pop %edx 10b671: ff 75 8c pushl -0x74(%ebp) 10b674: ff 75 88 pushl -0x78(%ebp) 10b677: 8d 55 e3 lea -0x1d(%ebp),%edx 10b67a: 52 push %edx 10b67b: 56 push %esi 10b67c: 68 6e 12 12 00 push $0x12126e 10b681: 53 push %ebx 10b682: ff d7 call *%edi ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10b684: 8b 45 88 mov -0x78(%ebp),%eax 10b687: 83 c4 20 add $0x20,%esp 10b68a: 85 c0 test %eax,%eax 10b68c: 75 0f jne 10b69d (*print)( context, "\n" ); 10b68e: 51 push %ecx 10b68f: 51 push %ecx 10b690: 68 e8 14 12 00 push $0x1214e8 10b695: 53 push %ebx 10b696: ff d7 call *%edi continue; 10b698: 83 c4 10 add $0x10,%esp 10b69b: eb 7c jmp 10b719 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 10b69d: 52 push %edx 10b69e: 8d 55 d8 lea -0x28(%ebp),%edx 10b6a1: 52 push %edx 10b6a2: 50 push %eax 10b6a3: 8d 45 a0 lea -0x60(%ebp),%eax 10b6a6: 50 push %eax 10b6a7: e8 cc 2e 00 00 call 10e578 <_Timespec_Divide_by_integer> (*print)( context, 10b6ac: 8b 45 dc mov -0x24(%ebp),%eax 10b6af: b9 e8 03 00 00 mov $0x3e8,%ecx 10b6b4: 99 cltd 10b6b5: f7 f9 idiv %ecx 10b6b7: 50 push %eax 10b6b8: ff 75 d8 pushl -0x28(%ebp) 10b6bb: 8b 45 9c mov -0x64(%ebp),%eax 10b6be: 99 cltd 10b6bf: f7 f9 idiv %ecx 10b6c1: 50 push %eax 10b6c2: ff 75 98 pushl -0x68(%ebp) 10b6c5: 8b 45 94 mov -0x6c(%ebp),%eax 10b6c8: 99 cltd 10b6c9: f7 f9 idiv %ecx 10b6cb: 50 push %eax 10b6cc: ff 75 90 pushl -0x70(%ebp) 10b6cf: 68 85 12 12 00 push $0x121285 10b6d4: 53 push %ebx 10b6d5: 89 4d 84 mov %ecx,-0x7c(%ebp) 10b6d8: ff d7 call *%edi struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 10b6da: 83 c4 2c add $0x2c,%esp 10b6dd: 8d 55 d8 lea -0x28(%ebp),%edx 10b6e0: 52 push %edx 10b6e1: ff 75 88 pushl -0x78(%ebp) 10b6e4: 8d 45 b8 lea -0x48(%ebp),%eax 10b6e7: 50 push %eax 10b6e8: e8 8b 2e 00 00 call 10e578 <_Timespec_Divide_by_integer> (*print)( context, 10b6ed: 8b 45 dc mov -0x24(%ebp),%eax 10b6f0: 8b 4d 84 mov -0x7c(%ebp),%ecx 10b6f3: 99 cltd 10b6f4: f7 f9 idiv %ecx 10b6f6: 50 push %eax 10b6f7: ff 75 d8 pushl -0x28(%ebp) 10b6fa: 8b 45 b4 mov -0x4c(%ebp),%eax 10b6fd: 99 cltd 10b6fe: f7 f9 idiv %ecx 10b700: 50 push %eax 10b701: ff 75 b0 pushl -0x50(%ebp) 10b704: 8b 45 ac mov -0x54(%ebp),%eax 10b707: 99 cltd 10b708: f7 f9 idiv %ecx 10b70a: 50 push %eax 10b70b: ff 75 a8 pushl -0x58(%ebp) 10b70e: 68 a4 12 12 00 push $0x1212a4 10b713: 53 push %ebx 10b714: ff d7 call *%edi 10b716: 83 c4 30 add $0x30,%esp * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10b719: 46 inc %esi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10b71a: 3b 35 a8 71 12 00 cmp 0x1271a8,%esi 10b720: 0f 86 15 ff ff ff jbe 10b63b the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10b726: 8d 65 f4 lea -0xc(%ebp),%esp 10b729: 5b pop %ebx 10b72a: 5e pop %esi 10b72b: 5f pop %edi 10b72c: c9 leave 10b72d: c3 ret =============================================================================== 0010a3b8 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10a3b8: 55 push %ebp 10a3b9: 89 e5 mov %esp,%ebp 10a3bb: 57 push %edi 10a3bc: 56 push %esi 10a3bd: 53 push %ebx 10a3be: 83 ec 3c sub $0x3c,%esp 10a3c1: 8b 7d 0c mov 0xc(%ebp),%edi 10a3c4: 8b 5d 10 mov 0x10(%ebp),%ebx register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 10a3c7: b8 03 00 00 00 mov $0x3,%eax 10a3cc: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10a3d0: 0f 84 74 01 00 00 je 10a54a <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 10a3d6: b0 09 mov $0x9,%al 10a3d8: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 10a3dc: 0f 84 68 01 00 00 je 10a54a <== NEVER TAKEN return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10a3e2: 89 d8 mov %ebx,%eax 10a3e4: 25 c0 00 00 00 and $0xc0,%eax 10a3e9: 74 22 je 10a40d _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10a3eb: 89 da mov %ebx,%edx 10a3ed: 83 e2 30 and $0x30,%edx 10a3f0: 83 fa 10 cmp $0x10,%edx 10a3f3: 0f 85 4c 01 00 00 jne 10a545 <== NEVER TAKEN 10a3f9: f6 c3 04 test $0x4,%bl 10a3fc: 0f 84 43 01 00 00 je 10a545 <== NEVER TAKEN _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10a402: 3d c0 00 00 00 cmp $0xc0,%eax 10a407: 0f 84 38 01 00 00 je 10a545 <== NEVER TAKEN _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10a40d: 89 da mov %ebx,%edx 10a40f: 83 e2 30 and $0x30,%edx 10a412: 74 0e je 10a422 10a414: b8 0a 00 00 00 mov $0xa,%eax 10a419: 83 ff 01 cmp $0x1,%edi 10a41c: 0f 87 28 01 00 00 ja 10a54a <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a422: a1 50 56 12 00 mov 0x125650,%eax 10a427: 40 inc %eax 10a428: a3 50 56 12 00 mov %eax,0x125650 * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 10a42d: 83 ec 0c sub $0xc,%esp 10a430: 68 98 55 12 00 push $0x125598 10a435: 89 55 c4 mov %edx,-0x3c(%ebp) 10a438: e8 2b 12 00 00 call 10b668 <_Objects_Allocate> 10a43d: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10a43f: 83 c4 10 add $0x10,%esp 10a442: 85 c0 test %eax,%eax 10a444: 8b 55 c4 mov -0x3c(%ebp),%edx 10a447: 75 0f jne 10a458 _Thread_Enable_dispatch(); 10a449: e8 f3 1d 00 00 call 10c241 <_Thread_Enable_dispatch> 10a44e: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10a453: e9 f2 00 00 00 jmp 10a54a _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10a458: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10a45b: 85 d2 test %edx,%edx 10a45d: 75 37 jne 10a496 /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10a45f: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 10a466: 31 c0 xor %eax,%eax 10a468: f6 c3 04 test $0x4,%bl 10a46b: 0f 95 c0 setne %al 10a46e: 89 45 e4 mov %eax,-0x1c(%ebp) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10a471: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10a478: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10a47f: 51 push %ecx 10a480: 57 push %edi 10a481: 8d 45 e0 lea -0x20(%ebp),%eax 10a484: 50 push %eax 10a485: 8d 46 14 lea 0x14(%esi),%eax 10a488: 50 push %eax 10a489: e8 da 0c 00 00 call 10b168 <_CORE_semaphore_Initialize> 10a48e: 83 c4 10 add $0x10,%esp 10a491: e9 8c 00 00 00 jmp 10a522 /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 10a496: 31 c0 xor %eax,%eax 10a498: f6 c3 04 test $0x4,%bl 10a49b: 0f 95 c0 setne %al 10a49e: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10a4a1: 83 fa 10 cmp $0x10,%edx 10a4a4: 75 36 jne 10a4dc the_mutex_attr.priority_ceiling = priority_ceiling; 10a4a6: 8b 45 14 mov 0x14(%ebp),%eax 10a4a9: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10a4ac: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10a4b3: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10a4b7: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10a4bb: 75 2a jne 10a4e7 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10a4bd: f6 c3 40 test $0x40,%bl 10a4c0: 74 09 je 10a4cb the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10a4c2: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) 10a4c9: eb 0b jmp 10a4d6 the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 10a4cb: 84 db test %bl,%bl 10a4cd: 79 18 jns 10a4e7 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10a4cf: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10a4d6: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10a4da: eb 0b jmp 10a4e7 } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 10a4dc: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10a4e3: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10a4e7: 52 push %edx 10a4e8: 31 c0 xor %eax,%eax 10a4ea: 83 ff 01 cmp $0x1,%edi 10a4ed: 0f 94 c0 sete %al 10a4f0: 50 push %eax 10a4f1: 8d 45 d0 lea -0x30(%ebp),%eax 10a4f4: 50 push %eax 10a4f5: 8d 46 14 lea 0x14(%esi),%eax 10a4f8: 50 push %eax 10a4f9: e8 fe 09 00 00 call 10aefc <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 10a4fe: 83 c4 10 add $0x10,%esp 10a501: 83 f8 06 cmp $0x6,%eax 10a504: 75 1c jne 10a522 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10a506: 50 push %eax 10a507: 50 push %eax 10a508: 56 push %esi 10a509: 68 98 55 12 00 push $0x125598 10a50e: e8 41 14 00 00 call 10b954 <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 10a513: e8 29 1d 00 00 call 10c241 <_Thread_Enable_dispatch> 10a518: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 10a51d: 83 c4 10 add $0x10,%esp 10a520: eb 28 jmp 10a54a #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a522: 8b 46 08 mov 0x8(%esi),%eax 10a525: 0f b7 c8 movzwl %ax,%ecx 10a528: 8b 15 b4 55 12 00 mov 0x1255b4,%edx 10a52e: 89 34 8a mov %esi,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10a531: 8b 55 08 mov 0x8(%ebp),%edx 10a534: 89 56 0c mov %edx,0xc(%esi) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10a537: 8b 55 18 mov 0x18(%ebp),%edx 10a53a: 89 02 mov %eax,(%edx) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10a53c: e8 00 1d 00 00 call 10c241 <_Thread_Enable_dispatch> 10a541: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a543: eb 05 jmp 10a54a 10a545: b8 0b 00 00 00 mov $0xb,%eax } 10a54a: 8d 65 f4 lea -0xc(%ebp),%esp 10a54d: 5b pop %ebx 10a54e: 5e pop %esi 10a54f: 5f pop %edi 10a550: c9 leave 10a551: c3 ret =============================================================================== 001162b0 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 1162b0: 55 push %ebp 1162b1: 89 e5 mov %esp,%ebp 1162b3: 53 push %ebx 1162b4: 83 ec 14 sub $0x14,%esp 1162b7: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 1162ba: b8 0a 00 00 00 mov $0xa,%eax 1162bf: 85 db test %ebx,%ebx 1162c1: 74 71 je 116334 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 1162c3: 50 push %eax 1162c4: 50 push %eax 1162c5: 8d 45 f4 lea -0xc(%ebp),%eax 1162c8: 50 push %eax 1162c9: ff 75 08 pushl 0x8(%ebp) 1162cc: e8 2b 35 00 00 call 1197fc <_Thread_Get> 1162d1: 89 c1 mov %eax,%ecx switch ( location ) { 1162d3: 83 c4 10 add $0x10,%esp 1162d6: b8 04 00 00 00 mov $0x4,%eax 1162db: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1162df: 75 53 jne 116334 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 1162e1: 8b 91 f0 00 00 00 mov 0xf0(%ecx),%edx asr = &api->Signal; 1162e7: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 1162eb: 74 3d je 11632a if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 1162ed: 80 7a 08 00 cmpb $0x0,0x8(%edx) 1162f1: 74 26 je 116319 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1162f3: 9c pushf 1162f4: fa cli 1162f5: 58 pop %eax *signal_set |= signals; 1162f6: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 1162f9: 50 push %eax 1162fa: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 1162fb: c6 41 74 01 movb $0x1,0x74(%ecx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1162ff: a1 fc e5 13 00 mov 0x13e5fc,%eax 116304: 85 c0 test %eax,%eax 116306: 74 19 je 116321 116308: 3b 0d 20 e6 13 00 cmp 0x13e620,%ecx 11630e: 75 11 jne 116321 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 116310: c6 05 b4 e6 13 00 01 movb $0x1,0x13e6b4 116317: eb 08 jmp 116321 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 116319: 9c pushf 11631a: fa cli 11631b: 58 pop %eax *signal_set |= signals; 11631c: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 11631f: 50 push %eax 116320: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 116321: e8 87 34 00 00 call 1197ad <_Thread_Enable_dispatch> 116326: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116328: eb 0a jmp 116334 } _Thread_Enable_dispatch(); 11632a: e8 7e 34 00 00 call 1197ad <_Thread_Enable_dispatch> 11632f: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116334: 8b 5d fc mov -0x4(%ebp),%ebx 116337: c9 leave 116338: c3 ret =============================================================================== 00106dc0 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 106dc0: 55 push %ebp 106dc1: 89 e5 mov %esp,%ebp 106dc3: 57 push %edi 106dc4: 56 push %esi 106dc5: 8b 45 08 mov 0x8(%ebp),%eax Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 106dc8: 83 78 08 00 cmpl $0x0,0x8(%eax) 106dcc: 74 15 je 106de3 <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 106dce: 8b b8 c4 00 00 00 mov 0xc4(%eax),%edi 106dd4: 83 c7 08 add $0x8,%edi 106dd7: be 48 50 12 00 mov $0x125048,%esi 106ddc: b9 04 00 00 00 mov $0x4,%ecx 106de1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } 106de3: 5e pop %esi 106de4: 5f pop %edi 106de5: c9 leave 106de6: c3 ret =============================================================================== 0010717e : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 10717e: 55 push %ebp 10717f: 89 e5 mov %esp,%ebp 107181: 57 push %edi 107182: 8b 7d 0c mov 0xc(%ebp),%edi Stack_check_Initialize(); 107185: e8 97 ff ff ff call 107121 if (the_thread) 10718a: 85 ff test %edi,%edi 10718c: 74 12 je 1071a0 <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 10718e: 8b 8f c0 00 00 00 mov 0xc0(%edi),%ecx 107194: 8b 97 c4 00 00 00 mov 0xc4(%edi),%edx 10719a: b0 a5 mov $0xa5,%al 10719c: 89 d7 mov %edx,%edi 10719e: f3 aa rep stos %al,%es:(%edi) return true; } 1071a0: b0 01 mov $0x1,%al 1071a2: 5f pop %edi 1071a3: c9 leave 1071a4: c3 ret =============================================================================== 00107050 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 107050: 55 push %ebp 107051: 89 e5 mov %esp,%ebp 107053: 53 push %ebx 107054: 83 ec 04 sub $0x4,%esp Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 107057: 8b 15 6c 52 12 00 mov 0x12526c,%edx ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 10705d: 8b 82 c4 00 00 00 mov 0xc4(%edx),%eax 107063: 31 db xor %ebx,%ebx 107065: 39 c5 cmp %eax,%ebp 107067: 72 0e jb 107077 <== NEVER TAKEN } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 107069: 8b 8a c0 00 00 00 mov 0xc0(%edx),%ecx 10706f: 8d 14 08 lea (%eax,%ecx,1),%edx 107072: 39 d5 cmp %edx,%ebp 107074: 0f 96 c3 setbe %bl /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 107077: b2 01 mov $0x1,%dl 107079: 83 3d 2c 4d 12 00 00 cmpl $0x0,0x124d2c 107080: 74 19 je 10709b <== NEVER TAKEN pattern_ok = (!memcmp( 107082: 83 c0 08 add $0x8,%eax 107085: 52 push %edx 107086: 6a 10 push $0x10 107088: 68 48 50 12 00 push $0x125048 10708d: 50 push %eax 10708e: e8 99 b5 00 00 call 11262c 107093: 83 c4 10 add $0x10,%esp 107096: 85 c0 test %eax,%eax 107098: 0f 94 c2 sete %dl } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 10709b: 84 db test %bl,%bl 10709d: 74 06 je 1070a5 <== NEVER TAKEN 10709f: 31 c0 xor %eax,%eax 1070a1: 84 d2 test %dl,%dl 1070a3: 75 16 jne 1070bb <== ALWAYS TAKEN return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 1070a5: 53 push %ebx <== NOT EXECUTED 1070a6: 53 push %ebx <== NOT EXECUTED 1070a7: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 1070aa: 52 push %edx <== NOT EXECUTED 1070ab: ff 35 6c 52 12 00 pushl 0x12526c <== NOT EXECUTED 1070b1: e8 e6 fe ff ff call 106f9c <== NOT EXECUTED 1070b6: b0 01 mov $0x1,%al <== NOT EXECUTED return true; 1070b8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 1070bb: 8b 5d fc mov -0x4(%ebp),%ebx 1070be: c9 leave 1070bf: c3 ret =============================================================================== 00106f85 : void rtems_stack_checker_report_usage( void ) { 106f85: 55 push %ebp <== NOT EXECUTED 106f86: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106f88: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 106f8b: 68 44 87 10 00 push $0x108744 <== NOT EXECUTED 106f90: 6a 00 push $0x0 <== NOT EXECUTED 106f92: e8 8d ff ff ff call 106f24 <== NOT EXECUTED 106f97: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 106f9a: c9 leave <== NOT EXECUTED 106f9b: c3 ret <== NOT EXECUTED =============================================================================== 00106f24 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 106f24: 55 push %ebp <== NOT EXECUTED 106f25: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106f27: 56 push %esi <== NOT EXECUTED 106f28: 53 push %ebx <== NOT EXECUTED 106f29: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 106f2c: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED print_context = context; 106f2f: 89 35 30 4d 12 00 mov %esi,0x124d30 <== NOT EXECUTED print_handler = print; 106f35: 89 1d 34 4d 12 00 mov %ebx,0x124d34 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 106f3b: 51 push %ecx <== NOT EXECUTED 106f3c: 51 push %ecx <== NOT EXECUTED 106f3d: 68 5e f3 11 00 push $0x11f35e <== NOT EXECUTED 106f42: 56 push %esi <== NOT EXECUTED 106f43: ff d3 call *%ebx <== NOT EXECUTED (*print)( context, 106f45: 58 pop %eax <== NOT EXECUTED 106f46: 5a pop %edx <== NOT EXECUTED 106f47: 68 75 f3 11 00 push $0x11f375 <== NOT EXECUTED 106f4c: 56 push %esi <== NOT EXECUTED 106f4d: ff d3 call *%ebx <== NOT EXECUTED " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 106f4f: c7 04 24 0e 6e 10 00 movl $0x106e0e,(%esp) <== NOT EXECUTED 106f56: e8 a5 4a 00 00 call 10ba00 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 106f5b: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED 106f62: e8 a7 fe ff ff call 106e0e <== NOT EXECUTED print_context = NULL; 106f67: c7 05 30 4d 12 00 00 movl $0x0,0x124d30 <== NOT EXECUTED 106f6e: 00 00 00 print_handler = NULL; 106f71: c7 05 34 4d 12 00 00 movl $0x0,0x124d34 <== NOT EXECUTED 106f78: 00 00 00 106f7b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 106f7e: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 106f81: 5b pop %ebx <== NOT EXECUTED 106f82: 5e pop %esi <== NOT EXECUTED 106f83: c9 leave <== NOT EXECUTED 106f84: c3 ret <== NOT EXECUTED =============================================================================== 001070c0 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 1070c0: 55 push %ebp 1070c1: 89 e5 mov %esp,%ebp 1070c3: 53 push %ebx 1070c4: 83 ec 14 sub $0x14,%esp 1070c7: 8b 5d 08 mov 0x8(%ebp),%ebx Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 1070ca: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 1070d0: 31 d2 xor %edx,%edx 1070d2: 39 c5 cmp %eax,%ebp 1070d4: 72 0d jb 1070e3 <== NEVER TAKEN } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 1070d6: 8b 93 c0 00 00 00 mov 0xc0(%ebx),%edx 1070dc: 01 c2 add %eax,%edx 1070de: 39 d5 cmp %edx,%ebp 1070e0: 0f 96 c2 setbe %dl /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 1070e3: 83 c0 08 add $0x8,%eax 1070e6: 51 push %ecx 1070e7: 6a 10 push $0x10 1070e9: 68 48 50 12 00 push $0x125048 1070ee: 50 push %eax 1070ef: 88 55 f4 mov %dl,-0xc(%ebp) 1070f2: e8 35 b5 00 00 call 11262c 1070f7: 83 c4 10 add $0x10,%esp 1070fa: 85 c0 test %eax,%eax 1070fc: 0f 94 c0 sete %al (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 1070ff: 8a 55 f4 mov -0xc(%ebp),%dl 107102: 84 d2 test %dl,%dl 107104: 74 04 je 10710a <== NEVER TAKEN 107106: 84 c0 test %al,%al 107108: 75 12 jne 10711c <== ALWAYS TAKEN Stack_check_report_blown_task( running, pattern_ok ); 10710a: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10710d: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 107110: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 107113: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107116: c9 leave <== NOT EXECUTED pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 107117: e9 80 fe ff ff jmp 106f9c <== NOT EXECUTED } } 10711c: 8b 5d fc mov -0x4(%ebp),%ebx 10711f: c9 leave 107120: c3 ret =============================================================================== 0010f0a0 : rtems_status_code rtems_string_to_double ( const char *s, double *n, char **endptr ) { 10f0a0: 55 push %ebp 10f0a1: 89 e5 mov %esp,%ebp 10f0a3: 57 push %edi 10f0a4: 56 push %esi 10f0a5: 53 push %ebx 10f0a6: 83 ec 2c sub $0x2c,%esp 10f0a9: 8b 75 08 mov 0x8(%ebp),%esi 10f0ac: 8b 5d 0c mov 0xc(%ebp),%ebx 10f0af: 8b 7d 10 mov 0x10(%ebp),%edi double result; char *end; if ( !n ) 10f0b2: b8 09 00 00 00 mov $0x9,%eax 10f0b7: 85 db test %ebx,%ebx 10f0b9: 0f 84 90 00 00 00 je 10f14f return RTEMS_INVALID_ADDRESS; errno = 0; 10f0bf: e8 98 1d 00 00 call 110e5c <__errno> 10f0c4: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f0ca: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f0d0: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtod( s, &end ); 10f0d7: 50 push %eax 10f0d8: 50 push %eax 10f0d9: 8d 45 e4 lea -0x1c(%ebp),%eax 10f0dc: 50 push %eax 10f0dd: 56 push %esi 10f0de: e8 45 48 00 00 call 113928 if ( endptr ) 10f0e3: 83 c4 10 add $0x10,%esp 10f0e6: 85 ff test %edi,%edi 10f0e8: 74 05 je 10f0ef *endptr = end; 10f0ea: 8b 45 e4 mov -0x1c(%ebp),%eax 10f0ed: 89 07 mov %eax,(%edi) if ( end == s ) 10f0ef: b8 0b 00 00 00 mov $0xb,%eax 10f0f4: 39 75 e4 cmp %esi,-0x1c(%ebp) 10f0f7: 74 54 je 10f14d return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f0f9: dd 5d c8 fstpl -0x38(%ebp) 10f0fc: e8 5b 1d 00 00 call 110e5c <__errno> 10f101: 83 38 22 cmpl $0x22,(%eax) 10f104: dd 45 c8 fldl -0x38(%ebp) 10f107: 75 2d jne 10f136 10f109: d9 ee fldz 10f10b: d9 c9 fxch %st(1) 10f10d: dd e1 fucom %st(1) 10f10f: df e0 fnstsw %ax 10f111: dd d9 fstp %st(1) 10f113: 9e sahf 10f114: 7a 02 jp 10f118 <== NEVER TAKEN 10f116: 74 24 je 10f13c <== NEVER TAKEN 10f118: dd 05 78 24 12 00 fldl 0x122478 10f11e: d9 c9 fxch %st(1) 10f120: dd e1 fucom %st(1) 10f122: df e0 fnstsw %ax 10f124: dd d9 fstp %st(1) 10f126: 9e sahf 10f127: 77 17 ja 10f140 <== ALWAYS TAKEN 10f129: dd 05 80 24 12 00 fldl 0x122480 <== NOT EXECUTED 10f12f: dd e9 fucomp %st(1) <== NOT EXECUTED 10f131: df e0 fnstsw %ax <== NOT EXECUTED 10f133: 9e sahf <== NOT EXECUTED 10f134: 77 0e ja 10f144 <== NOT EXECUTED (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; *n = result; 10f136: dd 1b fstpl (%ebx) 10f138: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f13a: eb 13 jmp 10f14f 10f13c: dd d8 fstp %st(0) <== NOT EXECUTED 10f13e: eb 06 jmp 10f146 <== NOT EXECUTED 10f140: dd d8 fstp %st(0) 10f142: eb 02 jmp 10f146 10f144: dd d8 fstp %st(0) <== NOT EXECUTED 10f146: b8 0a 00 00 00 mov $0xa,%eax 10f14b: eb 02 jmp 10f14f 10f14d: dd d8 fstp %st(0) } 10f14f: 8d 65 f4 lea -0xc(%ebp),%esp 10f152: 5b pop %ebx 10f153: 5e pop %esi 10f154: 5f pop %edi 10f155: c9 leave 10f156: c3 ret =============================================================================== 0010f158 : rtems_status_code rtems_string_to_float ( const char *s, float *n, char **endptr ) { 10f158: 55 push %ebp 10f159: 89 e5 mov %esp,%ebp 10f15b: 57 push %edi 10f15c: 56 push %esi 10f15d: 53 push %ebx 10f15e: 83 ec 2c sub $0x2c,%esp 10f161: 8b 75 08 mov 0x8(%ebp),%esi 10f164: 8b 5d 0c mov 0xc(%ebp),%ebx 10f167: 8b 7d 10 mov 0x10(%ebp),%edi float result; char *end; if ( !n ) 10f16a: b8 09 00 00 00 mov $0x9,%eax 10f16f: 85 db test %ebx,%ebx 10f171: 0f 84 89 00 00 00 je 10f200 return RTEMS_INVALID_ADDRESS; errno = 0; 10f177: e8 e0 1c 00 00 call 110e5c <__errno> 10f17c: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f182: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtof( s, &end ); 10f188: 50 push %eax 10f189: 50 push %eax 10f18a: 8d 45 e4 lea -0x1c(%ebp),%eax 10f18d: 50 push %eax 10f18e: 56 push %esi 10f18f: e8 50 47 00 00 call 1138e4 if ( endptr ) 10f194: 83 c4 10 add $0x10,%esp 10f197: 85 ff test %edi,%edi 10f199: 74 05 je 10f1a0 *endptr = end; 10f19b: 8b 45 e4 mov -0x1c(%ebp),%eax 10f19e: 89 07 mov %eax,(%edi) if ( end == s ) 10f1a0: b8 0b 00 00 00 mov $0xb,%eax 10f1a5: 39 75 e4 cmp %esi,-0x1c(%ebp) 10f1a8: 74 54 je 10f1fe return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f1aa: d9 5d c8 fstps -0x38(%ebp) 10f1ad: e8 aa 1c 00 00 call 110e5c <__errno> 10f1b2: 83 38 22 cmpl $0x22,(%eax) 10f1b5: d9 45 c8 flds -0x38(%ebp) 10f1b8: 75 2d jne 10f1e7 10f1ba: d9 ee fldz 10f1bc: d9 c9 fxch %st(1) 10f1be: dd e1 fucom %st(1) 10f1c0: df e0 fnstsw %ax 10f1c2: dd d9 fstp %st(1) 10f1c4: 9e sahf 10f1c5: 7a 02 jp 10f1c9 <== NEVER TAKEN 10f1c7: 74 24 je 10f1ed <== NEVER TAKEN 10f1c9: d9 05 88 24 12 00 flds 0x122488 10f1cf: d9 c9 fxch %st(1) 10f1d1: dd e1 fucom %st(1) 10f1d3: df e0 fnstsw %ax 10f1d5: dd d9 fstp %st(1) 10f1d7: 9e sahf 10f1d8: 77 17 ja 10f1f1 <== ALWAYS TAKEN 10f1da: d9 05 8c 24 12 00 flds 0x12248c <== NOT EXECUTED 10f1e0: dd e9 fucomp %st(1) <== NOT EXECUTED 10f1e2: df e0 fnstsw %ax <== NOT EXECUTED 10f1e4: 9e sahf <== NOT EXECUTED 10f1e5: 77 0e ja 10f1f5 <== NOT EXECUTED (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; *n = result; 10f1e7: d9 1b fstps (%ebx) 10f1e9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f1eb: eb 13 jmp 10f200 10f1ed: dd d8 fstp %st(0) <== NOT EXECUTED 10f1ef: eb 06 jmp 10f1f7 <== NOT EXECUTED 10f1f1: dd d8 fstp %st(0) 10f1f3: eb 02 jmp 10f1f7 10f1f5: dd d8 fstp %st(0) <== NOT EXECUTED 10f1f7: b8 0a 00 00 00 mov $0xa,%eax 10f1fc: eb 02 jmp 10f200 10f1fe: dd d8 fstp %st(0) } 10f200: 8d 65 f4 lea -0xc(%ebp),%esp 10f203: 5b pop %ebx 10f204: 5e pop %esi 10f205: 5f pop %edi 10f206: c9 leave 10f207: c3 ret =============================================================================== 0010f208 : const char *s, int *n, char **endptr, int base ) { 10f208: 55 push %ebp 10f209: 89 e5 mov %esp,%ebp 10f20b: 57 push %edi 10f20c: 56 push %esi 10f20d: 53 push %ebx 10f20e: 83 ec 2c sub $0x2c,%esp 10f211: 8b 7d 08 mov 0x8(%ebp),%edi 10f214: 8b 75 0c mov 0xc(%ebp),%esi 10f217: 8b 55 10 mov 0x10(%ebp),%edx long result; char *end; if ( !n ) 10f21a: b8 09 00 00 00 mov $0x9,%eax 10f21f: 85 f6 test %esi,%esi 10f221: 74 66 je 10f289 return RTEMS_INVALID_ADDRESS; errno = 0; 10f223: 89 55 d4 mov %edx,-0x2c(%ebp) 10f226: e8 31 1c 00 00 call 110e5c <__errno> 10f22b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f231: c7 06 00 00 00 00 movl $0x0,(%esi) result = strtol( s, &end, base ); 10f237: 50 push %eax 10f238: ff 75 14 pushl 0x14(%ebp) 10f23b: 8d 45 e4 lea -0x1c(%ebp),%eax 10f23e: 50 push %eax 10f23f: 57 push %edi 10f240: e8 7f 48 00 00 call 113ac4 10f245: 89 c3 mov %eax,%ebx if ( endptr ) 10f247: 83 c4 10 add $0x10,%esp 10f24a: 8b 55 d4 mov -0x2c(%ebp),%edx 10f24d: 85 d2 test %edx,%edx 10f24f: 74 05 je 10f256 *endptr = end; 10f251: 8b 45 e4 mov -0x1c(%ebp),%eax 10f254: 89 02 mov %eax,(%edx) if ( end == s ) 10f256: b8 0b 00 00 00 mov $0xb,%eax 10f25b: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f25e: 74 29 je 10f289 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f260: e8 f7 1b 00 00 call 110e5c <__errno> 10f265: 83 38 22 cmpl $0x22,(%eax) 10f268: 75 14 jne 10f27e 10f26a: 81 fb ff ff ff 7f cmp $0x7fffffff,%ebx 10f270: 74 12 je 10f284 <== ALWAYS TAKEN 10f272: 85 db test %ebx,%ebx <== NOT EXECUTED 10f274: 74 0e je 10f284 <== NOT EXECUTED 10f276: 81 fb 00 00 00 80 cmp $0x80000000,%ebx <== NOT EXECUTED 10f27c: 74 06 je 10f284 <== NOT EXECUTED errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 10f27e: 89 1e mov %ebx,(%esi) 10f280: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f282: eb 05 jmp 10f289 10f284: b8 0a 00 00 00 mov $0xa,%eax } 10f289: 8d 65 f4 lea -0xc(%ebp),%esp 10f28c: 5b pop %ebx 10f28d: 5e pop %esi 10f28e: 5f pop %edi 10f28f: c9 leave 10f290: c3 ret =============================================================================== 0010f334 : const char *s, long *n, char **endptr, int base ) { 10f334: 55 push %ebp 10f335: 89 e5 mov %esp,%ebp 10f337: 57 push %edi 10f338: 56 push %esi 10f339: 53 push %ebx 10f33a: 83 ec 2c sub $0x2c,%esp 10f33d: 8b 7d 08 mov 0x8(%ebp),%edi 10f340: 8b 75 0c mov 0xc(%ebp),%esi 10f343: 8b 55 10 mov 0x10(%ebp),%edx long result; char *end; if ( !n ) 10f346: b8 09 00 00 00 mov $0x9,%eax 10f34b: 85 f6 test %esi,%esi 10f34d: 74 66 je 10f3b5 return RTEMS_INVALID_ADDRESS; errno = 0; 10f34f: 89 55 d4 mov %edx,-0x2c(%ebp) 10f352: e8 05 1b 00 00 call 110e5c <__errno> 10f357: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f35d: c7 06 00 00 00 00 movl $0x0,(%esi) result = strtol( s, &end, base ); 10f363: 50 push %eax 10f364: ff 75 14 pushl 0x14(%ebp) 10f367: 8d 45 e4 lea -0x1c(%ebp),%eax 10f36a: 50 push %eax 10f36b: 57 push %edi 10f36c: e8 53 47 00 00 call 113ac4 10f371: 89 c3 mov %eax,%ebx if ( endptr ) 10f373: 83 c4 10 add $0x10,%esp 10f376: 8b 55 d4 mov -0x2c(%ebp),%edx 10f379: 85 d2 test %edx,%edx 10f37b: 74 05 je 10f382 *endptr = end; 10f37d: 8b 45 e4 mov -0x1c(%ebp),%eax 10f380: 89 02 mov %eax,(%edx) if ( end == s ) 10f382: b8 0b 00 00 00 mov $0xb,%eax 10f387: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f38a: 74 29 je 10f3b5 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f38c: e8 cb 1a 00 00 call 110e5c <__errno> 10f391: 83 38 22 cmpl $0x22,(%eax) 10f394: 75 14 jne 10f3aa 10f396: 81 fb ff ff ff 7f cmp $0x7fffffff,%ebx 10f39c: 74 12 je 10f3b0 10f39e: 85 db test %ebx,%ebx 10f3a0: 74 0e je 10f3b0 <== NEVER TAKEN 10f3a2: 81 fb 00 00 00 80 cmp $0x80000000,%ebx 10f3a8: 74 06 je 10f3b0 <== ALWAYS TAKEN (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 10f3aa: 89 1e mov %ebx,(%esi) 10f3ac: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f3ae: eb 05 jmp 10f3b5 10f3b0: b8 0a 00 00 00 mov $0xa,%eax } 10f3b5: 8d 65 f4 lea -0xc(%ebp),%esp 10f3b8: 5b pop %ebx 10f3b9: 5e pop %esi 10f3ba: 5f pop %edi 10f3bb: c9 leave 10f3bc: c3 ret =============================================================================== 0010f294 : const char *s, long long *n, char **endptr, int base ) { 10f294: 55 push %ebp 10f295: 89 e5 mov %esp,%ebp 10f297: 57 push %edi 10f298: 56 push %esi 10f299: 53 push %ebx 10f29a: 83 ec 2c sub $0x2c,%esp 10f29d: 8b 5d 0c mov 0xc(%ebp),%ebx 10f2a0: 8b 7d 10 mov 0x10(%ebp),%edi long long result; char *end; if ( !n ) 10f2a3: b8 09 00 00 00 mov $0x9,%eax 10f2a8: 85 db test %ebx,%ebx 10f2aa: 74 7e je 10f32a return RTEMS_INVALID_ADDRESS; errno = 0; 10f2ac: e8 ab 1b 00 00 call 110e5c <__errno> 10f2b1: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f2b7: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f2bd: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtoll( s, &end, base ); 10f2c4: 50 push %eax 10f2c5: ff 75 14 pushl 0x14(%ebp) 10f2c8: 8d 45 e4 lea -0x1c(%ebp),%eax 10f2cb: 50 push %eax 10f2cc: ff 75 08 pushl 0x8(%ebp) 10f2cf: e8 0c 48 00 00 call 113ae0 10f2d4: 89 c6 mov %eax,%esi if ( endptr ) 10f2d6: 83 c4 10 add $0x10,%esp 10f2d9: 85 ff test %edi,%edi 10f2db: 74 05 je 10f2e2 *endptr = end; 10f2dd: 8b 45 e4 mov -0x1c(%ebp),%eax 10f2e0: 89 07 mov %eax,(%edi) if ( end == s ) 10f2e2: b8 0b 00 00 00 mov $0xb,%eax 10f2e7: 8b 4d 08 mov 0x8(%ebp),%ecx 10f2ea: 39 4d e4 cmp %ecx,-0x1c(%ebp) 10f2ed: 74 3b je 10f32a return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f2ef: 89 55 d4 mov %edx,-0x2c(%ebp) 10f2f2: e8 65 1b 00 00 call 110e5c <__errno> 10f2f7: 83 38 22 cmpl $0x22,(%eax) 10f2fa: 8b 55 d4 mov -0x2c(%ebp),%edx 10f2fd: 75 1d jne 10f31c 10f2ff: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10f305: 75 05 jne 10f30c 10f307: 83 fe ff cmp $0xffffffff,%esi 10f30a: 74 19 je 10f325 <== ALWAYS TAKEN 10f30c: 89 d0 mov %edx,%eax 10f30e: 09 f0 or %esi,%eax 10f310: 74 13 je 10f325 <== NEVER TAKEN 10f312: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax 10f318: 09 f0 or %esi,%eax 10f31a: 74 09 je 10f325 <== ALWAYS TAKEN (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 10f31c: 89 33 mov %esi,(%ebx) 10f31e: 89 53 04 mov %edx,0x4(%ebx) 10f321: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f323: eb 05 jmp 10f32a 10f325: b8 0a 00 00 00 mov $0xa,%eax } 10f32a: 8d 65 f4 lea -0xc(%ebp),%esp 10f32d: 5b pop %ebx 10f32e: 5e pop %esi 10f32f: 5f pop %edi 10f330: c9 leave 10f331: c3 ret =============================================================================== 0010f3d8 : const char *s, unsigned char *n, char **endptr, int base ) { 10f3d8: 55 push %ebp 10f3d9: 89 e5 mov %esp,%ebp 10f3db: 57 push %edi 10f3dc: 56 push %esi 10f3dd: 53 push %ebx 10f3de: 83 ec 2c sub $0x2c,%esp 10f3e1: 8b 7d 08 mov 0x8(%ebp),%edi 10f3e4: 8b 5d 0c mov 0xc(%ebp),%ebx 10f3e7: 8b 55 10 mov 0x10(%ebp),%edx unsigned long result; char *end; if ( !n ) 10f3ea: b8 09 00 00 00 mov $0x9,%eax 10f3ef: 85 db test %ebx,%ebx 10f3f1: 74 71 je 10f464 return RTEMS_INVALID_ADDRESS; errno = 0; 10f3f3: 89 55 d4 mov %edx,-0x2c(%ebp) 10f3f6: e8 61 1a 00 00 call 110e5c <__errno> 10f3fb: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f401: c6 03 00 movb $0x0,(%ebx) result = strtoul( s, &end, base ); 10f404: 50 push %eax 10f405: ff 75 14 pushl 0x14(%ebp) 10f408: 8d 45 e4 lea -0x1c(%ebp),%eax 10f40b: 50 push %eax 10f40c: 57 push %edi 10f40d: e8 2e 4b 00 00 call 113f40 10f412: 89 c6 mov %eax,%esi if ( endptr ) 10f414: 83 c4 10 add $0x10,%esp 10f417: 8b 55 d4 mov -0x2c(%ebp),%edx 10f41a: 85 d2 test %edx,%edx 10f41c: 74 05 je 10f423 *endptr = end; 10f41e: 8b 45 e4 mov -0x1c(%ebp),%eax 10f421: 89 02 mov %eax,(%edx) if ( end == s ) 10f423: b8 0b 00 00 00 mov $0xb,%eax 10f428: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f42b: 74 37 je 10f464 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f42d: e8 2a 1a 00 00 call 110e5c <__errno> 10f432: 83 38 22 cmpl $0x22,(%eax) 10f435: 75 0d jne 10f444 <== ALWAYS TAKEN 10f437: 8d 56 ff lea -0x1(%esi),%edx <== NOT EXECUTED 10f43a: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 10f43f: 83 fa fd cmp $0xfffffffd,%edx <== NOT EXECUTED 10f442: 77 20 ja 10f464 <== NOT EXECUTED (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { 10f444: 81 fe ff 00 00 00 cmp $0xff,%esi 10f44a: 76 12 jbe 10f45e <== ALWAYS TAKEN errno = ERANGE; 10f44c: e8 0b 1a 00 00 call 110e5c <__errno> <== NOT EXECUTED 10f451: c7 00 22 00 00 00 movl $0x22,(%eax) <== NOT EXECUTED 10f457: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED return RTEMS_INVALID_NUMBER; 10f45c: eb 06 jmp 10f464 <== NOT EXECUTED } #endif *n = result; 10f45e: 89 f0 mov %esi,%eax 10f460: 88 03 mov %al,(%ebx) 10f462: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10f464: 8d 65 f4 lea -0xc(%ebp),%esp 10f467: 5b pop %ebx 10f468: 5e pop %esi 10f469: 5f pop %edi 10f46a: c9 leave 10f46b: c3 ret =============================================================================== 0010f46c : const char *s, unsigned int *n, char **endptr, int base ) { 10f46c: 55 push %ebp 10f46d: 89 e5 mov %esp,%ebp 10f46f: 57 push %edi 10f470: 56 push %esi 10f471: 53 push %ebx 10f472: 83 ec 2c sub $0x2c,%esp 10f475: 8b 7d 08 mov 0x8(%ebp),%edi 10f478: 8b 5d 0c mov 0xc(%ebp),%ebx 10f47b: 8b 55 10 mov 0x10(%ebp),%edx unsigned long result; char *end; if ( !n ) 10f47e: b8 09 00 00 00 mov $0x9,%eax 10f483: 85 db test %ebx,%ebx 10f485: 74 58 je 10f4df return RTEMS_INVALID_ADDRESS; errno = 0; 10f487: 89 55 d4 mov %edx,-0x2c(%ebp) 10f48a: e8 cd 19 00 00 call 110e5c <__errno> 10f48f: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f495: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtoul( s, &end, base ); 10f49b: 50 push %eax 10f49c: ff 75 14 pushl 0x14(%ebp) 10f49f: 8d 45 e4 lea -0x1c(%ebp),%eax 10f4a2: 50 push %eax 10f4a3: 57 push %edi 10f4a4: e8 97 4a 00 00 call 113f40 10f4a9: 89 c6 mov %eax,%esi if ( endptr ) 10f4ab: 83 c4 10 add $0x10,%esp 10f4ae: 8b 55 d4 mov -0x2c(%ebp),%edx 10f4b1: 85 d2 test %edx,%edx 10f4b3: 74 05 je 10f4ba *endptr = end; 10f4b5: 8b 45 e4 mov -0x1c(%ebp),%eax 10f4b8: 89 02 mov %eax,(%edx) if ( end == s ) 10f4ba: b8 0b 00 00 00 mov $0xb,%eax 10f4bf: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f4c2: 74 1b je 10f4df return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f4c4: e8 93 19 00 00 call 110e5c <__errno> 10f4c9: 83 38 22 cmpl $0x22,(%eax) 10f4cc: 75 0d jne 10f4db 10f4ce: 8d 56 ff lea -0x1(%esi),%edx 10f4d1: b8 0a 00 00 00 mov $0xa,%eax 10f4d6: 83 fa fd cmp $0xfffffffd,%edx 10f4d9: 77 04 ja 10f4df <== ALWAYS TAKEN errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 10f4db: 89 33 mov %esi,(%ebx) 10f4dd: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10f4df: 8d 65 f4 lea -0xc(%ebp),%esp 10f4e2: 5b pop %ebx 10f4e3: 5e pop %esi 10f4e4: 5f pop %edi 10f4e5: c9 leave 10f4e6: c3 ret =============================================================================== 0010f584 : const char *s, unsigned long *n, char **endptr, int base ) { 10f584: 55 push %ebp 10f585: 89 e5 mov %esp,%ebp 10f587: 57 push %edi 10f588: 56 push %esi 10f589: 53 push %ebx 10f58a: 83 ec 2c sub $0x2c,%esp 10f58d: 8b 7d 08 mov 0x8(%ebp),%edi 10f590: 8b 5d 0c mov 0xc(%ebp),%ebx 10f593: 8b 55 10 mov 0x10(%ebp),%edx unsigned long result; char *end; if ( !n ) 10f596: b8 09 00 00 00 mov $0x9,%eax 10f59b: 85 db test %ebx,%ebx 10f59d: 74 58 je 10f5f7 return RTEMS_INVALID_ADDRESS; errno = 0; 10f59f: 89 55 d4 mov %edx,-0x2c(%ebp) 10f5a2: e8 b5 18 00 00 call 110e5c <__errno> 10f5a7: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f5ad: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtoul( s, &end, base ); 10f5b3: 50 push %eax 10f5b4: ff 75 14 pushl 0x14(%ebp) 10f5b7: 8d 45 e4 lea -0x1c(%ebp),%eax 10f5ba: 50 push %eax 10f5bb: 57 push %edi 10f5bc: e8 7f 49 00 00 call 113f40 10f5c1: 89 c6 mov %eax,%esi if ( endptr ) 10f5c3: 83 c4 10 add $0x10,%esp 10f5c6: 8b 55 d4 mov -0x2c(%ebp),%edx 10f5c9: 85 d2 test %edx,%edx 10f5cb: 74 05 je 10f5d2 *endptr = end; 10f5cd: 8b 45 e4 mov -0x1c(%ebp),%eax 10f5d0: 89 02 mov %eax,(%edx) if ( end == s ) 10f5d2: b8 0b 00 00 00 mov $0xb,%eax 10f5d7: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f5da: 74 1b je 10f5f7 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f5dc: e8 7b 18 00 00 call 110e5c <__errno> 10f5e1: 83 38 22 cmpl $0x22,(%eax) 10f5e4: 75 0d jne 10f5f3 10f5e6: 8d 56 ff lea -0x1(%esi),%edx 10f5e9: b8 0a 00 00 00 mov $0xa,%eax 10f5ee: 83 fa fd cmp $0xfffffffd,%edx 10f5f1: 77 04 ja 10f5f7 <== ALWAYS TAKEN (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 10f5f3: 89 33 mov %esi,(%ebx) 10f5f5: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10f5f7: 8d 65 f4 lea -0xc(%ebp),%esp 10f5fa: 5b pop %ebx 10f5fb: 5e pop %esi 10f5fc: 5f pop %edi 10f5fd: c9 leave 10f5fe: c3 ret =============================================================================== 0010f4e8 : const char *s, unsigned long long *n, char **endptr, int base ) { 10f4e8: 55 push %ebp 10f4e9: 89 e5 mov %esp,%ebp 10f4eb: 57 push %edi 10f4ec: 56 push %esi 10f4ed: 53 push %ebx 10f4ee: 83 ec 2c sub $0x2c,%esp 10f4f1: 8b 7d 08 mov 0x8(%ebp),%edi 10f4f4: 8b 5d 0c mov 0xc(%ebp),%ebx 10f4f7: 8b 75 10 mov 0x10(%ebp),%esi unsigned long long result; char *end; if ( !n ) 10f4fa: b8 09 00 00 00 mov $0x9,%eax 10f4ff: 85 db test %ebx,%ebx 10f501: 74 76 je 10f579 return RTEMS_INVALID_ADDRESS; errno = 0; 10f503: e8 54 19 00 00 call 110e5c <__errno> 10f508: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f50e: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f514: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtoull( s, &end, base ); 10f51b: 50 push %eax 10f51c: ff 75 14 pushl 0x14(%ebp) 10f51f: 8d 45 e4 lea -0x1c(%ebp),%eax 10f522: 50 push %eax 10f523: 57 push %edi 10f524: e8 33 4a 00 00 call 113f5c 10f529: 89 d1 mov %edx,%ecx 10f52b: 89 c2 mov %eax,%edx if ( endptr ) 10f52d: 83 c4 10 add $0x10,%esp 10f530: 85 f6 test %esi,%esi 10f532: 74 05 je 10f539 *endptr = end; 10f534: 8b 45 e4 mov -0x1c(%ebp),%eax 10f537: 89 06 mov %eax,(%esi) if ( end == s ) 10f539: b8 0b 00 00 00 mov $0xb,%eax 10f53e: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f541: 74 36 je 10f579 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f543: 89 55 d4 mov %edx,-0x2c(%ebp) 10f546: 89 4d d0 mov %ecx,-0x30(%ebp) 10f549: e8 0e 19 00 00 call 110e5c <__errno> 10f54e: 83 38 22 cmpl $0x22,(%eax) 10f551: 8b 55 d4 mov -0x2c(%ebp),%edx 10f554: 8b 4d d0 mov -0x30(%ebp),%ecx 10f557: 75 19 jne 10f572 10f559: 89 d6 mov %edx,%esi 10f55b: 89 cf mov %ecx,%edi 10f55d: 83 c6 ff add $0xffffffff,%esi 10f560: 83 d7 ff adc $0xffffffff,%edi 10f563: 83 ff ff cmp $0xffffffff,%edi 10f566: 72 0a jb 10f572 <== NEVER TAKEN 10f568: b8 0a 00 00 00 mov $0xa,%eax 10f56d: 83 fe fd cmp $0xfffffffd,%esi 10f570: 77 07 ja 10f579 <== ALWAYS TAKEN (( result == 0 ) || ( result == ULONG_LONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 10f572: 89 13 mov %edx,(%ebx) 10f574: 89 4b 04 mov %ecx,0x4(%ebx) 10f577: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10f579: 8d 65 f4 lea -0xc(%ebp),%esp 10f57c: 5b pop %ebx 10f57d: 5e pop %esi 10f57e: 5f pop %edi 10f57f: c9 leave 10f580: c3 ret =============================================================================== 0011156c : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 11156c: 55 push %ebp 11156d: 89 e5 mov %esp,%ebp 11156f: 57 push %edi 111570: 56 push %esi 111571: 53 push %ebx 111572: 83 ec 1c sub $0x1c,%esp 111575: 8b 4d 10 mov 0x10(%ebp),%ecx ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 111578: b8 09 00 00 00 mov $0x9,%eax 11157d: 85 c9 test %ecx,%ecx 11157f: 0f 84 f4 00 00 00 je 111679 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 111585: 8b 1d 0c 57 12 00 mov 0x12570c,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 11158b: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 111591: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 111595: 19 ff sbb %edi,%edi 111597: 81 e7 00 01 00 00 and $0x100,%edi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 11159d: 83 7b 7c 00 cmpl $0x0,0x7c(%ebx) 1115a1: 74 06 je 1115a9 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 1115a3: 81 cf 00 02 00 00 or $0x200,%edi if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 1115a9: 80 7e 08 01 cmpb $0x1,0x8(%esi) 1115ad: 19 d2 sbb %edx,%edx 1115af: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 1115b5: 89 55 e4 mov %edx,-0x1c(%ebp) 1115b8: 89 4d e0 mov %ecx,-0x20(%ebp) 1115bb: e8 7b be ff ff call 10d43b <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 1115c0: 8b 55 e4 mov -0x1c(%ebp),%edx 1115c3: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 1115c5: 09 f8 or %edi,%eax 1115c7: 8b 4d e0 mov -0x20(%ebp),%ecx 1115ca: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 1115cc: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 1115d3: 74 0f je 1115e4 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 1115d5: 8b 45 08 mov 0x8(%ebp),%eax 1115d8: c1 e8 08 shr $0x8,%eax 1115db: 83 f0 01 xor $0x1,%eax 1115de: 83 e0 01 and $0x1,%eax 1115e1: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 1115e4: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 1115eb: 74 21 je 11160e if ( _Modes_Is_timeslice(mode_set) ) { 1115ed: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 1115f4: 74 11 je 111607 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 1115f6: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 1115fd: a1 1c 56 12 00 mov 0x12561c,%eax 111602: 89 43 78 mov %eax,0x78(%ebx) 111605: eb 07 jmp 11160e } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 111607: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 11160e: f6 45 0c 01 testb $0x1,0xc(%ebp) 111612: 74 0a je 11161e */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 111614: f6 45 08 01 testb $0x1,0x8(%ebp) 111618: 74 03 je 11161d 11161a: fa cli 11161b: eb 01 jmp 11161e 11161d: fb sti */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 11161e: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 111625: 74 33 je 11165a * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 111627: 8b 45 08 mov 0x8(%ebp),%eax 11162a: c1 e8 0a shr $0xa,%eax 11162d: 83 f0 01 xor $0x1,%eax 111630: 83 e0 01 and $0x1,%eax if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 111633: 3a 46 08 cmp 0x8(%esi),%al 111636: 74 22 je 11165a needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; 111638: 88 46 08 mov %al,0x8(%esi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 11163b: 9c pushf 11163c: fa cli 11163d: 58 pop %eax _signals = information->signals_pending; 11163e: 8b 56 18 mov 0x18(%esi),%edx information->signals_pending = information->signals_posted; 111641: 8b 4e 14 mov 0x14(%esi),%ecx 111644: 89 4e 18 mov %ecx,0x18(%esi) information->signals_posted = _signals; 111647: 89 56 14 mov %edx,0x14(%esi) _ISR_Enable( _level ); 11164a: 50 push %eax 11164b: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 11164c: 83 7e 14 00 cmpl $0x0,0x14(%esi) 111650: 74 08 je 11165a if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 111652: c6 43 74 01 movb $0x1,0x74(%ebx) 111656: b3 01 mov $0x1,%bl 111658: eb 02 jmp 11165c 11165a: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 11165c: 83 3d e8 57 12 00 03 cmpl $0x3,0x1257e8 111663: 75 12 jne 111677 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 111665: e8 0a 01 00 00 call 111774 <_Thread_Evaluate_mode> 11166a: 84 c0 test %al,%al 11166c: 75 04 jne 111672 11166e: 84 db test %bl,%bl 111670: 74 05 je 111677 _Thread_Dispatch(); 111672: e8 85 aa ff ff call 10c0fc <_Thread_Dispatch> 111677: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 111679: 83 c4 1c add $0x1c,%esp 11167c: 5b pop %ebx 11167d: 5e pop %esi 11167e: 5f pop %edi 11167f: c9 leave 111680: c3 ret =============================================================================== 0010e200 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10e200: 55 push %ebp 10e201: 89 e5 mov %esp,%ebp 10e203: 56 push %esi 10e204: 53 push %ebx 10e205: 83 ec 10 sub $0x10,%esp 10e208: 8b 5d 0c mov 0xc(%ebp),%ebx 10e20b: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10e20e: 85 db test %ebx,%ebx 10e210: 74 10 je 10e222 10e212: 0f b6 05 f4 41 12 00 movzbl 0x1241f4,%eax 10e219: ba 13 00 00 00 mov $0x13,%edx 10e21e: 39 c3 cmp %eax,%ebx 10e220: 77 50 ja 10e272 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10e222: ba 09 00 00 00 mov $0x9,%edx 10e227: 85 f6 test %esi,%esi 10e229: 74 47 je 10e272 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10e22b: 51 push %ecx 10e22c: 51 push %ecx 10e22d: 8d 45 f4 lea -0xc(%ebp),%eax 10e230: 50 push %eax 10e231: ff 75 08 pushl 0x8(%ebp) 10e234: e8 17 1b 00 00 call 10fd50 <_Thread_Get> switch ( location ) { 10e239: 83 c4 10 add $0x10,%esp 10e23c: ba 04 00 00 00 mov $0x4,%edx 10e241: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e245: 75 2b jne 10e272 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10e247: 8b 50 14 mov 0x14(%eax),%edx 10e24a: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10e24c: 85 db test %ebx,%ebx 10e24e: 74 1b je 10e26b the_thread->real_priority = new_priority; 10e250: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10e253: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10e257: 74 05 je 10e25e the_thread->current_priority > new_priority ) 10e259: 39 58 14 cmp %ebx,0x14(%eax) 10e25c: 76 0d jbe 10e26b <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10e25e: 52 push %edx 10e25f: 6a 00 push $0x0 10e261: 53 push %ebx 10e262: 50 push %eax 10e263: e8 fc 15 00 00 call 10f864 <_Thread_Change_priority> 10e268: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10e26b: e8 91 1a 00 00 call 10fd01 <_Thread_Enable_dispatch> 10e270: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e272: 89 d0 mov %edx,%eax 10e274: 8d 65 f8 lea -0x8(%ebp),%esp 10e277: 5b pop %ebx 10e278: 5e pop %esi 10e279: c9 leave 10e27a: c3 ret =============================================================================== 0010960c : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 10960c: 55 push %ebp 10960d: 89 e5 mov %esp,%ebp 10960f: 8b 55 08 mov 0x8(%ebp),%edx case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; 109612: b8 09 00 00 00 mov $0x9,%eax rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109617: 83 fa 09 cmp $0x9,%edx 10961a: 0f 84 b5 00 00 00 je 1096d5 <== NEVER TAKEN 109620: 7f 54 jg 109676 <== NEVER TAKEN case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; 109622: b0 04 mov $0x4,%al rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109624: 83 fa 04 cmp $0x4,%edx 109627: 0f 84 a8 00 00 00 je 1096d5 <== NEVER TAKEN 10962d: 7f 2b jg 10965a <== NEVER TAKEN 10962f: b0 01 mov $0x1,%al 109631: 83 fa 01 cmp $0x1,%edx 109634: 0f 84 9b 00 00 00 je 1096d5 <== NEVER TAKEN 10963a: 7f 09 jg 109645 <== NEVER TAKEN 10963c: 30 c0 xor %al,%al 10963e: 85 d2 test %edx,%edx 109640: e9 8b 00 00 00 jmp 1096d0 109645: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED 10964a: 83 fa 02 cmp $0x2,%edx <== NOT EXECUTED 10964d: 0f 84 82 00 00 00 je 1096d5 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 109653: b0 03 mov $0x3,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109655: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 109658: eb 76 jmp 1096d0 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; 10965a: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10965f: 83 fa 06 cmp $0x6,%edx <== NOT EXECUTED 109662: 74 71 je 1096d5 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 109664: b0 05 mov $0x5,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109666: 7c 6d jl 1096d5 <== NOT EXECUTED case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; 109668: b0 07 mov $0x7,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10966a: 83 fa 07 cmp $0x7,%edx <== NOT EXECUTED 10966d: 74 66 je 1096d5 <== NOT EXECUTED case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; 10966f: b0 08 mov $0x8,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109671: 83 fa 08 cmp $0x8,%edx <== NOT EXECUTED 109674: eb 5a jmp 1096d0 <== NOT EXECUTED case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; 109676: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10967b: 83 fa 0e cmp $0xe,%edx <== NOT EXECUTED 10967e: 74 55 je 1096d5 <== NOT EXECUTED 109680: 7f 19 jg 10969b <== NOT EXECUTED case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; 109682: b0 0b mov $0xb,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109684: 83 fa 0b cmp $0xb,%edx <== NOT EXECUTED 109687: 74 4c je 1096d5 <== NOT EXECUTED case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 109689: b0 0a mov $0xa,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10968b: 7c 48 jl 1096d5 <== NOT EXECUTED case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; 10968d: b0 0c mov $0xc,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10968f: 83 fa 0c cmp $0xc,%edx <== NOT EXECUTED 109692: 74 41 je 1096d5 <== NOT EXECUTED case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; 109694: b0 0d mov $0xd,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109696: 83 fa 0d cmp $0xd,%edx <== NOT EXECUTED 109699: eb 35 jmp 1096d0 <== NOT EXECUTED case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; 10969b: b8 11 00 00 00 mov $0x11,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1096a0: 81 fa 02 10 00 00 cmp $0x1002,%edx <== NOT EXECUTED 1096a6: 74 2d je 1096d5 <== NOT EXECUTED 1096a8: 7f 11 jg 1096bb <== NOT EXECUTED case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; 1096aa: b0 0f mov $0xf,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1096ac: 83 fa 0f cmp $0xf,%edx <== NOT EXECUTED 1096af: 74 24 je 1096d5 <== NOT EXECUTED case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; 1096b1: b0 10 mov $0x10,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1096b3: 81 fa 01 10 00 00 cmp $0x1001,%edx <== NOT EXECUTED 1096b9: eb 15 jmp 1096d0 <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 1096bb: b8 12 00 00 00 mov $0x12,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1096c0: 81 fa 03 10 00 00 cmp $0x1003,%edx <== NOT EXECUTED 1096c6: 74 0d je 1096d5 <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 1096c8: b0 13 mov $0x13,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1096ca: 81 fa 04 10 00 00 cmp $0x1004,%edx <== NOT EXECUTED 1096d0: 74 03 je 1096d5 <== NEVER TAKEN case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 1096d2: 83 c8 ff or $0xffffffff,%eax default: baud_index = -1; break; } return baud_index; } 1096d5: c9 leave 1096d6: c3 ret =============================================================================== 0010852c : rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 10852c: 55 push %ebp <== NOT EXECUTED 10852d: 89 e5 mov %esp,%ebp <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 10852f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 108532: a3 24 34 12 00 mov %eax,0x123424 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 108537: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10853a: a3 28 34 12 00 mov %eax,0x123428 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 10853f: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 108542: a3 2c 34 12 00 mov %eax,0x12342c <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 108547: 31 c0 xor %eax,%eax <== NOT EXECUTED 108549: c9 leave <== NOT EXECUTED 10854a: c3 ret <== NOT EXECUTED =============================================================================== 001096b6 : } } rtems_status_code rtems_termios_close (void *arg) { 1096b6: 55 push %ebp 1096b7: 89 e5 mov %esp,%ebp 1096b9: 56 push %esi 1096ba: 53 push %ebx 1096bb: 8b 75 08 mov 0x8(%ebp),%esi rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 1096be: 8b 06 mov (%esi),%eax 1096c0: 8b 58 34 mov 0x34(%eax),%ebx rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1096c3: 50 push %eax 1096c4: 6a 00 push $0x0 1096c6: 6a 00 push $0x0 1096c8: ff 35 44 55 12 00 pushl 0x125544 1096ce: e8 11 0f 00 00 call 10a5e4 if (sc != RTEMS_SUCCESSFUL) 1096d3: 83 c4 10 add $0x10,%esp 1096d6: 85 c0 test %eax,%eax 1096d8: 75 7d jne 109757 <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 1096da: 8b 43 08 mov 0x8(%ebx),%eax 1096dd: 48 dec %eax 1096de: 89 43 08 mov %eax,0x8(%ebx) 1096e1: 85 c0 test %eax,%eax 1096e3: 0f 85 33 01 00 00 jne 10981c if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 1096e9: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 1096ef: c1 e0 05 shl $0x5,%eax 1096f2: 8b 80 f8 51 12 00 mov 0x1251f8(%eax),%eax 1096f8: 85 c0 test %eax,%eax 1096fa: 74 0b je 109707 <== ALWAYS TAKEN /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 1096fc: 83 ec 0c sub $0xc,%esp 1096ff: 53 push %ebx 109700: ff d0 call *%eax 109702: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109705: eb 1b jmp 109722 <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 109707: 51 push %ecx 109708: 6a 00 push $0x0 10970a: 6a 00 push $0x0 10970c: ff 73 18 pushl 0x18(%ebx) 10970f: e8 d0 0e 00 00 call 10a5e4 if (sc != RTEMS_SUCCESSFUL) { 109714: 83 c4 10 add $0x10,%esp 109717: 85 c0 test %eax,%eax 109719: 75 3c jne 109757 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 10971b: 89 d8 mov %ebx,%eax 10971d: e8 18 f9 ff ff call 10903a } if (tty->device.outputUsesInterrupts 109722: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109729: 75 35 jne 109760 <== ALWAYS TAKEN == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 10972b: 52 push %edx 10972c: 52 push %edx 10972d: 6a 01 push $0x1 <== NOT EXECUTED 10972f: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED 109735: e8 3e 0a 00 00 call 10a178 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 10973a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10973d: 85 c0 test %eax,%eax <== NOT EXECUTED 10973f: 75 16 jne 109757 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 109741: 50 push %eax <== NOT EXECUTED 109742: 50 push %eax <== NOT EXECUTED 109743: 6a 01 push $0x1 <== NOT EXECUTED 109745: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED 10974b: e8 28 0a 00 00 call 10a178 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 109750: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109753: 85 c0 test %eax,%eax <== NOT EXECUTED 109755: 74 09 je 109760 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 109757: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10975a: 50 push %eax <== NOT EXECUTED 10975b: e8 3c 14 00 00 call 10ab9c <== NOT EXECUTED } if (tty->device.lastClose) 109760: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax 109766: 85 c0 test %eax,%eax 109768: 74 0d je 109777 (*tty->device.lastClose)(tty->major, tty->minor, arg); 10976a: 51 push %ecx 10976b: 56 push %esi 10976c: ff 73 10 pushl 0x10(%ebx) 10976f: ff 73 0c pushl 0xc(%ebx) 109772: ff d0 call *%eax 109774: 83 c4 10 add $0x10,%esp if (tty->forw == NULL) { 109777: 8b 13 mov (%ebx),%edx 109779: 85 d2 test %edx,%edx 10977b: 8b 43 04 mov 0x4(%ebx),%eax 10977e: 75 11 jne 109791 rtems_termios_ttyTail = tty->back; 109780: a3 48 55 12 00 mov %eax,0x125548 if ( rtems_termios_ttyTail != NULL ) { 109785: 85 c0 test %eax,%eax 109787: 74 0b je 109794 <== ALWAYS TAKEN rtems_termios_ttyTail->forw = NULL; 109789: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED 10978f: eb 03 jmp 109794 <== NOT EXECUTED } } else { tty->forw->back = tty->back; 109791: 89 42 04 mov %eax,0x4(%edx) } if (tty->back == NULL) { 109794: 8b 53 04 mov 0x4(%ebx),%edx 109797: 85 d2 test %edx,%edx 109799: 8b 03 mov (%ebx),%eax 10979b: 75 12 jne 1097af <== NEVER TAKEN rtems_termios_ttyHead = tty->forw; 10979d: a3 4c 55 12 00 mov %eax,0x12554c if ( rtems_termios_ttyHead != NULL ) { 1097a2: 85 c0 test %eax,%eax 1097a4: 74 0b je 1097b1 rtems_termios_ttyHead->back = NULL; 1097a6: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 1097ad: eb 02 jmp 1097b1 } } else { tty->back->forw = tty->forw; 1097af: 89 02 mov %eax,(%edx) } rtems_semaphore_delete (tty->isem); 1097b1: 83 ec 0c sub $0xc,%esp 1097b4: ff 73 14 pushl 0x14(%ebx) 1097b7: e8 98 0d 00 00 call 10a554 rtems_semaphore_delete (tty->osem); 1097bc: 5a pop %edx 1097bd: ff 73 18 pushl 0x18(%ebx) 1097c0: e8 8f 0d 00 00 call 10a554 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 1097c5: 58 pop %eax 1097c6: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 1097cc: e8 83 0d 00 00 call 10a554 if ((tty->device.pollRead == NULL) || 1097d1: 83 c4 10 add $0x10,%esp 1097d4: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 1097db: 74 09 je 1097e6 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 1097dd: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 1097e4: 75 0e jne 1097f4 <== ALWAYS TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); 1097e6: 83 ec 0c sub $0xc,%esp 1097e9: ff 73 68 pushl 0x68(%ebx) 1097ec: e8 63 0d 00 00 call 10a554 1097f1: 83 c4 10 add $0x10,%esp free (tty->rawInBuf.theBuf); 1097f4: 83 ec 0c sub $0xc,%esp 1097f7: ff 73 58 pushl 0x58(%ebx) 1097fa: e8 9d de ff ff call 10769c free (tty->rawOutBuf.theBuf); 1097ff: 5e pop %esi 109800: ff 73 7c pushl 0x7c(%ebx) 109803: e8 94 de ff ff call 10769c free (tty->cbuf); 109808: 59 pop %ecx 109809: ff 73 1c pushl 0x1c(%ebx) 10980c: e8 8b de ff ff call 10769c free (tty); 109811: 89 1c 24 mov %ebx,(%esp) 109814: e8 83 de ff ff call 10769c 109819: 83 c4 10 add $0x10,%esp } rtems_semaphore_release (rtems_termios_ttyMutex); 10981c: 83 ec 0c sub $0xc,%esp 10981f: ff 35 44 55 12 00 pushl 0x125544 109825: e8 a6 0e 00 00 call 10a6d0 return RTEMS_SUCCESSFUL; } 10982a: 31 c0 xor %eax,%eax 10982c: 8d 65 f8 lea -0x8(%ebp),%esp 10982f: 5b pop %ebx 109830: 5e pop %esi 109831: c9 leave 109832: c3 ret =============================================================================== 0010872e : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 10872e: 55 push %ebp 10872f: 89 e5 mov %esp,%ebp 108731: 83 ec 08 sub $0x8,%esp 108734: 8b 45 08 mov 0x8(%ebp),%eax rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 108737: 8b 55 0c mov 0xc(%ebp),%edx 10873a: 01 90 90 00 00 00 add %edx,0x90(%eax) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 108740: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 108747: 75 1f jne 108768 <== ALWAYS TAKEN /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 108749: 52 push %edx <== NOT EXECUTED 10874a: 52 push %edx <== NOT EXECUTED 10874b: 6a 02 push $0x2 <== NOT EXECUTED 10874d: ff b0 c8 00 00 00 pushl 0xc8(%eax) <== NOT EXECUTED 108753: e8 20 1a 00 00 call 10a178 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 108758: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10875b: 85 c0 test %eax,%eax <== NOT EXECUTED 10875d: 74 30 je 10878f <== NOT EXECUTED rtems_fatal_error_occurred (sc); 10875f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108762: 50 push %eax <== NOT EXECUTED 108763: e8 34 24 00 00 call 10ab9c <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 108768: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax) 10876f: 75 15 jne 108786 <== ALWAYS TAKEN /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 108771: 8b 15 a8 52 12 00 mov 0x1252a8,%edx 108777: 85 d2 test %edx,%edx 108779: 74 14 je 10878f <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 10877b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10877e: 50 push %eax <== NOT EXECUTED 10877f: ff d2 call *%edx <== NOT EXECUTED 108781: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108784: eb 09 jmp 10878f <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 108786: 89 45 08 mov %eax,0x8(%ebp) } } 108789: c9 leave rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 10878a: e9 d7 fd ff ff jmp 108566 } } 10878f: 31 c0 xor %eax,%eax 108791: c9 leave 108792: c3 ret <== NOT EXECUTED =============================================================================== 00108793 : * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 108793: 55 push %ebp <== NOT EXECUTED 108794: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108796: 57 push %edi <== NOT EXECUTED 108797: 56 push %esi <== NOT EXECUTED 108798: 53 push %ebx <== NOT EXECUTED 108799: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 10879c: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10879f: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 1087a2: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 1087a5: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx <== NOT EXECUTED 1087ab: c1 e2 05 shl $0x5,%edx <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 1087ae: 89 c6 mov %eax,%esi <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 1087b0: 83 ba 04 52 12 00 00 cmpl $0x0,0x125204(%edx) <== NOT EXECUTED 1087b7: 75 35 jne 1087ee <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 1087b9: 8d 53 4a lea 0x4a(%ebx),%edx <== NOT EXECUTED 1087bc: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 1087bf: 8d 4b 30 lea 0x30(%ebx),%ecx <== NOT EXECUTED 1087c2: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED 1087c5: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 1087c8: c6 45 de 00 movb $0x0,-0x22(%ebp) <== NOT EXECUTED 1087cc: 31 f6 xor %esi,%esi <== NOT EXECUTED 1087ce: e9 1d 02 00 00 jmp 1089f0 <== NOT EXECUTED bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; 1087d3: 0f be 17 movsbl (%edi),%edx <== NOT EXECUTED 1087d6: 47 inc %edi <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 1087d7: 50 push %eax <== NOT EXECUTED 1087d8: 50 push %eax <== NOT EXECUTED 1087d9: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 1087df: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1087e2: 53 push %ebx <== NOT EXECUTED 1087e3: 52 push %edx <== NOT EXECUTED 1087e4: ff 90 04 52 12 00 call *0x125204(%eax) <== NOT EXECUTED 1087ea: 4e dec %esi <== NOT EXECUTED 1087eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 1087ee: 85 f6 test %esi,%esi <== NOT EXECUTED 1087f0: 75 e1 jne 1087d3 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 1087f2: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx) <== NOT EXECUTED 1087f9: 0f 85 0e 02 00 00 jne 108a0d <== NOT EXECUTED 1087ff: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 108805: 85 c0 test %eax,%eax <== NOT EXECUTED 108807: 0f 84 00 02 00 00 je 108a0d <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 10880d: 51 push %ecx <== NOT EXECUTED 10880e: 51 push %ecx <== NOT EXECUTED 10880f: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 108815: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 108818: 52 push %edx <== NOT EXECUTED 108819: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 10881b: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 108822: 00 00 00 108825: e9 de 01 00 00 jmp 108a08 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 10882a: 8a 07 mov (%edi),%al <== NOT EXECUTED 10882c: 88 45 df mov %al,-0x21(%ebp) <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 10882f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108835: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 108838: 74 47 je 108881 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 10883a: 0f be 45 df movsbl -0x21(%ebp),%eax <== NOT EXECUTED 10883e: 0f b6 53 4a movzbl 0x4a(%ebx),%edx <== NOT EXECUTED 108842: 39 d0 cmp %edx,%eax <== NOT EXECUTED 108844: 75 28 jne 10886e <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 108846: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 10884a: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10884c: 75 0b jne 108859 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 10884e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108854: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED 108857: eb 09 jmp 108862 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 108859: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10885f: 83 c8 10 or $0x10,%eax <== NOT EXECUTED 108862: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 108868: c6 45 de 01 movb $0x1,-0x22(%ebp) <== NOT EXECUTED 10886c: eb 19 jmp 108887 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 10886e: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 108872: 39 d0 cmp %edx,%eax <== NOT EXECUTED 108874: 75 0b jne 108881 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 108876: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10887c: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED 10887f: eb e1 jmp 108862 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 108881: 80 7d de 00 cmpb $0x0,-0x22(%ebp) <== NOT EXECUTED 108885: 74 51 je 1088d8 <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 108887: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10888d: 83 e0 30 and $0x30,%eax <== NOT EXECUTED 108890: 83 f8 20 cmp $0x20,%eax <== NOT EXECUTED 108893: 0f 85 53 01 00 00 jne 1089ec <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 108899: 9c pushf <== NOT EXECUTED 10889a: fa cli <== NOT EXECUTED 10889b: 8f 45 e4 popl -0x1c(%ebp) <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 10889e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1088a4: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 1088a7: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 1088ad: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 1088b4: 74 19 je 1088cf <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 1088b6: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 1088bc: 52 push %edx <== NOT EXECUTED 1088bd: 6a 01 push $0x1 <== NOT EXECUTED 1088bf: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 1088c2: 50 push %eax <== NOT EXECUTED 1088c3: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1088c6: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 1088cc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 1088cf: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 1088d2: 9d popf <== NOT EXECUTED 1088d3: e9 14 01 00 00 jmp 1089ec <== NOT EXECUTED } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 1088d8: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 1088db: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 1088de: 40 inc %eax <== NOT EXECUTED 1088df: 31 d2 xor %edx,%edx <== NOT EXECUTED 1088e1: f7 f1 div %ecx <== NOT EXECUTED 1088e3: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 1088e6: 9c pushf <== NOT EXECUTED 1088e7: fa cli <== NOT EXECUTED 1088e8: 8f 45 d4 popl -0x2c(%ebp) <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 1088eb: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 1088ee: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 1088f1: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 1088f4: 29 d0 sub %edx,%eax <== NOT EXECUTED 1088f6: 03 45 e4 add -0x1c(%ebp),%eax <== NOT EXECUTED 1088f9: 31 d2 xor %edx,%edx <== NOT EXECUTED 1088fb: f7 f1 div %ecx <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 1088fd: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx <== NOT EXECUTED 108903: 0f 86 98 00 00 00 jbe 1089a1 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 108909: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 10890f: a8 01 test $0x1,%al <== NOT EXECUTED 108911: 0f 85 8a 00 00 00 jne 1089a1 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 108917: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10891d: 83 c8 01 or $0x1,%eax <== NOT EXECUTED 108920: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 108926: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10892c: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED 108931: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED 108936: 75 33 jne 10896b <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 108938: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10893e: a8 20 test $0x20,%al <== NOT EXECUTED 108940: 75 09 jne 10894b <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 108942: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 108949: 75 56 jne 1089a1 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 10894b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108951: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 108954: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED (*tty->device.write)(tty->minor, 10895a: 50 push %eax <== NOT EXECUTED 10895b: 6a 01 push $0x1 <== NOT EXECUTED 10895d: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 108960: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108963: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 108969: eb 33 jmp 10899e <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 10896b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108971: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED 108976: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED 10897b: 75 24 jne 1089a1 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 10897d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108983: 83 c8 04 or $0x4,%eax <== NOT EXECUTED 108986: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 10898c: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED 108992: 85 c0 test %eax,%eax <== NOT EXECUTED 108994: 74 0b je 1089a1 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 108996: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108999: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10899c: ff d0 call *%eax <== NOT EXECUTED 10899e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 1089a1: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 1089a4: 9d popf <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 1089a5: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 1089a8: 39 45 e4 cmp %eax,-0x1c(%ebp) <== NOT EXECUTED 1089ab: 75 03 jne 1089b0 <== NOT EXECUTED dropped++; 1089ad: 46 inc %esi <== NOT EXECUTED 1089ae: eb 3c jmp 1089ec <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 1089b0: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 1089b3: 8a 4d df mov -0x21(%ebp),%cl <== NOT EXECUTED 1089b6: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1089b9: 88 0c 10 mov %cl,(%eax,%edx,1) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 1089bc: 89 53 60 mov %edx,0x60(%ebx) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 1089bf: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx) <== NOT EXECUTED 1089c6: 75 24 jne 1089ec <== NOT EXECUTED 1089c8: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 1089ce: 85 c0 test %eax,%eax <== NOT EXECUTED 1089d0: 74 1a je 1089ec <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 1089d2: 51 push %ecx <== NOT EXECUTED 1089d3: 51 push %ecx <== NOT EXECUTED 1089d4: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 1089da: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED 1089dd: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 1089df: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 1089e6: 00 00 00 1089e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 1089ec: 47 inc %edi <== NOT EXECUTED 1089ed: ff 4d e0 decl -0x20(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 1089f0: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 1089f4: 0f 85 30 fe ff ff jne 10882a <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 1089fa: 01 73 78 add %esi,0x78(%ebx) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 1089fd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108a00: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 108a03: e8 c8 1c 00 00 call 10a6d0 <== NOT EXECUTED return dropped; 108a08: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108a0b: eb 02 jmp 108a0f <== NOT EXECUTED 108a0d: 31 f6 xor %esi,%esi <== NOT EXECUTED } 108a0f: 89 f0 mov %esi,%eax <== NOT EXECUTED 108a11: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108a14: 5b pop %ebx <== NOT EXECUTED 108a15: 5e pop %esi <== NOT EXECUTED 108a16: 5f pop %edi <== NOT EXECUTED 108a17: c9 leave <== NOT EXECUTED 108a18: c3 ret <== NOT EXECUTED =============================================================================== 001084f0 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 1084f0: 55 push %ebp 1084f1: 89 e5 mov %esp,%ebp 1084f3: 83 ec 08 sub $0x8,%esp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 1084f6: 83 3d 44 55 12 00 00 cmpl $0x0,0x125544 1084fd: 75 28 jne 108527 sc = rtems_semaphore_create ( 1084ff: 83 ec 0c sub $0xc,%esp 108502: 68 44 55 12 00 push $0x125544 108507: 6a 00 push $0x0 108509: 6a 54 push $0x54 10850b: 6a 01 push $0x1 10850d: 68 69 6d 52 54 push $0x54526d69 108512: e8 a1 1e 00 00 call 10a3b8 rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 108517: 83 c4 20 add $0x20,%esp 10851a: 85 c0 test %eax,%eax 10851c: 74 09 je 108527 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 10851e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108521: 50 push %eax <== NOT EXECUTED 108522: e8 75 26 00 00 call 10ab9c <== NOT EXECUTED } } 108527: c9 leave 108528: c3 ret =============================================================================== 0010936b : } } rtems_status_code rtems_termios_ioctl (void *arg) { 10936b: 55 push %ebp 10936c: 89 e5 mov %esp,%ebp 10936e: 57 push %edi 10936f: 56 push %esi 109370: 53 push %ebx 109371: 83 ec 20 sub $0x20,%esp rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 109374: 8b 55 08 mov 0x8(%ebp),%edx 109377: 8b 02 mov (%edx),%eax 109379: 8b 58 34 mov 0x34(%eax),%ebx struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 10937c: 8b 72 08 mov 0x8(%edx),%esi rtems_status_code sc; args->ioctl_return = 0; 10937f: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 109386: 6a 00 push $0x0 109388: 6a 00 push $0x0 10938a: ff 73 18 pushl 0x18(%ebx) 10938d: e8 52 12 00 00 call 10a5e4 109392: 89 45 e4 mov %eax,-0x1c(%ebp) if (sc != RTEMS_SUCCESSFUL) { 109395: 83 c4 10 add $0x10,%esp 109398: 85 c0 test %eax,%eax 10939a: 74 0b je 1093a7 <== ALWAYS TAKEN args->ioctl_return = sc; 10939c: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 10939f: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED return sc; 1093a2: e9 04 03 00 00 jmp 1096ab <== NOT EXECUTED } switch (args->command) { 1093a7: 8b 55 08 mov 0x8(%ebp),%edx 1093aa: 8b 42 04 mov 0x4(%edx),%eax 1093ad: 83 f8 04 cmp $0x4,%eax 1093b0: 0f 84 4c 02 00 00 je 109602 <== NEVER TAKEN 1093b6: 77 10 ja 1093c8 <== NEVER TAKEN 1093b8: 83 f8 02 cmp $0x2,%eax 1093bb: 74 77 je 109434 1093bd: 0f 87 1d 02 00 00 ja 1095e0 1093c3: 48 dec %eax 1093c4: 75 2f jne 1093f5 <== NEVER TAKEN 1093c6: eb 55 jmp 10941d 1093c8: 3d 7f 66 04 40 cmp $0x4004667f,%eax <== NOT EXECUTED 1093cd: 0f 84 a4 02 00 00 je 109677 <== NOT EXECUTED 1093d3: 77 0a ja 1093df <== NOT EXECUTED 1093d5: 83 f8 05 cmp $0x5,%eax <== NOT EXECUTED 1093d8: 75 1b jne 1093f5 <== NOT EXECUTED 1093da: e9 0d 02 00 00 jmp 1095ec <== NOT EXECUTED 1093df: 3d 1a 74 04 40 cmp $0x4004741a,%eax <== NOT EXECUTED 1093e4: 0f 84 7d 02 00 00 je 109667 <== NOT EXECUTED 1093ea: 3d 1b 74 04 80 cmp $0x8004741b,%eax <== NOT EXECUTED 1093ef: 0f 84 20 02 00 00 je 109615 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 1093f5: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 1093fb: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1093fe: 8b 80 0c 52 12 00 mov 0x12520c(%eax),%eax <== NOT EXECUTED 109404: c7 45 e4 0a 00 00 00 movl $0xa,-0x1c(%ebp) <== NOT EXECUTED 10940b: 85 c0 test %eax,%eax <== NOT EXECUTED 10940d: 0f 84 81 02 00 00 je 109694 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 109413: 52 push %edx <== NOT EXECUTED 109414: 52 push %edx <== NOT EXECUTED 109415: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 109418: e9 3f 02 00 00 jmp 10965c <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 10941d: 8b 4d 08 mov 0x8(%ebp),%ecx 109420: 8b 41 08 mov 0x8(%ecx),%eax 109423: 8d 73 30 lea 0x30(%ebx),%esi 109426: b9 09 00 00 00 mov $0x9,%ecx 10942b: 89 c7 mov %eax,%edi 10942d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) break; 10942f: e9 60 02 00 00 jmp 109694 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 109434: 8b 45 08 mov 0x8(%ebp),%eax 109437: 8b 70 08 mov 0x8(%eax),%esi 10943a: 8d 7b 30 lea 0x30(%ebx),%edi 10943d: b9 09 00 00 00 mov $0x9,%ecx 109442: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 109444: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10944a: f6 c4 02 test $0x2,%ah 10944d: 74 57 je 1094a6 10944f: f6 43 31 04 testb $0x4,0x31(%ebx) 109453: 75 51 jne 1094a6 <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 109455: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10945b: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED 109460: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 109466: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10946c: a8 20 test $0x20,%al <== NOT EXECUTED 10946e: 74 36 je 1094a6 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 109470: 9c pushf <== NOT EXECUTED 109471: fa cli <== NOT EXECUTED 109472: 5e pop %esi <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 109473: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109479: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 10947c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 109482: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 109489: 74 19 je 1094a4 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 10948b: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 109491: 57 push %edi <== NOT EXECUTED 109492: 6a 01 push $0x1 <== NOT EXECUTED 109494: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 109497: 50 push %eax <== NOT EXECUTED 109498: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10949b: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 1094a1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 1094a4: 56 push %esi <== NOT EXECUTED 1094a5: 9d popf <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 1094a6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1094ac: f6 c4 04 test $0x4,%ah 1094af: 74 24 je 1094d5 <== ALWAYS TAKEN 1094b1: f6 43 31 10 testb $0x10,0x31(%ebx) <== NOT EXECUTED 1094b5: 75 1e jne 1094d5 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 1094b7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1094bd: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED 1094c0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 1094c6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1094cc: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 1094cf: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 1094d5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1094db: f6 c4 01 test $0x1,%ah 1094de: 74 43 je 109523 <== ALWAYS TAKEN 1094e0: 83 7b 38 00 cmpl $0x0,0x38(%ebx) <== NOT EXECUTED 1094e4: 78 3d js 109523 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 1094e6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1094ec: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED 1094ef: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 1094f5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1094fb: a8 04 test $0x4,%al <== NOT EXECUTED 1094fd: 74 15 je 109514 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 1094ff: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 109505: 85 c0 test %eax,%eax <== NOT EXECUTED 109507: 74 0b je 109514 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 109509: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10950c: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10950f: ff d0 call *%eax <== NOT EXECUTED 109511: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 109514: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10951a: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 10951d: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 109523: 83 7b 38 00 cmpl $0x0,0x38(%ebx) 109527: 79 0f jns 109538 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDRTS; 109529: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10952f: 80 cc 01 or $0x1,%ah <== NOT EXECUTED 109532: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 109538: f6 43 31 10 testb $0x10,0x31(%ebx) 10953c: 74 0f je 10954d <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXOF; 10953e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109544: 80 cc 04 or $0x4,%ah <== NOT EXECUTED 109547: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 10954d: f6 43 31 04 testb $0x4,0x31(%ebx) 109551: 74 0f je 109562 <== NEVER TAKEN tty->flow_ctrl |= FL_MDXON; 109553: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109559: 80 cc 02 or $0x2,%ah 10955c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 109562: f6 43 3c 02 testb $0x2,0x3c(%ebx) 109566: 75 39 jne 1095a1 <== ALWAYS TAKEN tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 109568: 0f b6 73 46 movzbl 0x46(%ebx),%esi <== NOT EXECUTED 10956c: e8 2f 0a 00 00 call 109fa0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 109571: 0f af c6 imul %esi,%eax <== NOT EXECUTED 109574: b9 0a 00 00 00 mov $0xa,%ecx <== NOT EXECUTED 109579: 31 d2 xor %edx,%edx <== NOT EXECUTED 10957b: f7 f1 div %ecx <== NOT EXECUTED 10957d: 89 43 54 mov %eax,0x54(%ebx) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 109580: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 109584: 74 15 je 10959b <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 109586: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 10958d: 89 43 70 mov %eax,0x70(%ebx) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 109590: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 109594: 75 19 jne 1095af <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 109596: 89 43 74 mov %eax,0x74(%ebx) <== NOT EXECUTED 109599: eb 24 jmp 1095bf <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 10959b: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 10959f: 74 17 je 1095b8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 1095a1: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 1095a8: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 1095af: c7 43 74 00 00 00 00 movl $0x0,0x74(%ebx) 1095b6: eb 07 jmp 1095bf } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 1095b8: c7 43 6c 01 00 00 00 movl $0x1,0x6c(%ebx) <== NOT EXECUTED } } } if (tty->device.setAttributes) 1095bf: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax 1095c5: 85 c0 test %eax,%eax 1095c7: 0f 84 c7 00 00 00 je 109694 <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 1095cd: 56 push %esi 1095ce: 56 push %esi 1095cf: 8d 53 30 lea 0x30(%ebx),%edx 1095d2: 52 push %edx 1095d3: ff 73 10 pushl 0x10(%ebx) 1095d6: ff d0 call *%eax 1095d8: 83 c4 10 add $0x10,%esp 1095db: e9 b4 00 00 00 jmp 109694 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 1095e0: 89 d8 mov %ebx,%eax 1095e2: e8 53 fa ff ff call 10903a break; 1095e7: e9 a8 00 00 00 jmp 109694 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 1095ec: 8b 06 mov (%esi),%eax <== NOT EXECUTED 1095ee: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 1095f1: 89 83 d4 00 00 00 mov %eax,0xd4(%ebx) <== NOT EXECUTED 1095f7: 89 93 d8 00 00 00 mov %edx,0xd8(%ebx) <== NOT EXECUTED break; 1095fd: e9 92 00 00 00 jmp 109694 <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 109602: 8b 06 mov (%esi),%eax <== NOT EXECUTED 109604: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 109607: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx) <== NOT EXECUTED 10960d: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx) <== NOT EXECUTED break; 109613: eb 7f jmp 109694 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 109615: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 10961b: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10961e: 8b 80 f8 51 12 00 mov 0x1251f8(%eax),%eax <== NOT EXECUTED 109624: 85 c0 test %eax,%eax <== NOT EXECUTED 109626: 74 0c je 109634 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 109628: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10962b: 53 push %ebx <== NOT EXECUTED 10962c: ff d0 call *%eax <== NOT EXECUTED 10962e: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 109631: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 109634: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 109637: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED 10963a: 8b 00 mov (%eax),%eax <== NOT EXECUTED 10963c: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 109642: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) <== NOT EXECUTED 109649: 00 00 00 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 10964c: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10964f: 8b 80 f4 51 12 00 mov 0x1251f4(%eax),%eax <== NOT EXECUTED 109655: 85 c0 test %eax,%eax <== NOT EXECUTED 109657: 74 3b je 109694 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 109659: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10965c: 53 push %ebx <== NOT EXECUTED 10965d: ff d0 call *%eax <== NOT EXECUTED 10965f: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 109662: e9 71 ff ff ff jmp 1095d8 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 109667: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 10966a: 8b 41 08 mov 0x8(%ecx),%eax <== NOT EXECUTED 10966d: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx <== NOT EXECUTED 109673: 89 10 mov %edx,(%eax) <== NOT EXECUTED break; 109675: eb 1d jmp 109694 <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 109677: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10967a: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED if ( rawnc < 0 ) 10967d: 29 d0 sub %edx,%eax <== NOT EXECUTED 10967f: 79 05 jns 109686 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 109681: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 109684: 01 d0 add %edx,%eax <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 109686: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 109689: 8b 51 08 mov 0x8(%ecx),%edx <== NOT EXECUTED 10968c: 03 43 20 add 0x20(%ebx),%eax <== NOT EXECUTED 10968f: 2b 43 24 sub 0x24(%ebx),%eax <== NOT EXECUTED 109692: 89 02 mov %eax,(%edx) <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 109694: 83 ec 0c sub $0xc,%esp 109697: ff 73 18 pushl 0x18(%ebx) 10969a: e8 31 10 00 00 call 10a6d0 args->ioctl_return = sc; 10969f: 8b 55 e4 mov -0x1c(%ebp),%edx 1096a2: 8b 45 08 mov 0x8(%ebp),%eax 1096a5: 89 50 0c mov %edx,0xc(%eax) return sc; 1096a8: 83 c4 10 add $0x10,%esp } 1096ab: 8b 45 e4 mov -0x1c(%ebp),%eax 1096ae: 8d 65 f4 lea -0xc(%ebp),%esp 1096b1: 5b pop %ebx 1096b2: 5e pop %esi 1096b3: 5f pop %edi 1096b4: c9 leave 1096b5: c3 ret =============================================================================== 00109833 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 109833: 55 push %ebp 109834: 89 e5 mov %esp,%ebp 109836: 57 push %edi 109837: 56 push %esi 109838: 53 push %ebx 109839: 83 ec 20 sub $0x20,%esp 10983c: 8b 75 14 mov 0x14(%ebp),%esi struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 10983f: 6a 00 push $0x0 109841: 6a 00 push $0x0 109843: ff 35 44 55 12 00 pushl 0x125544 109849: e8 96 0d 00 00 call 10a5e4 10984e: 89 45 e4 mov %eax,-0x1c(%ebp) RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109851: 83 c4 10 add $0x10,%esp 109854: 85 c0 test %eax,%eax 109856: 0f 85 cf 03 00 00 jne 109c2b <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 10985c: 8b 15 4c 55 12 00 mov 0x12554c,%edx 109862: eb 16 jmp 10987a if ((tty->major == major) && (tty->minor == minor)) 109864: 8b 45 08 mov 0x8(%ebp),%eax 109867: 39 42 0c cmp %eax,0xc(%edx) 10986a: 75 0c jne 109878 10986c: 8b 4d 0c mov 0xc(%ebp),%ecx 10986f: 39 4a 10 cmp %ecx,0x10(%edx) 109872: 0f 84 24 03 00 00 je 109b9c <== ALWAYS TAKEN */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 109878: 8b 12 mov (%edx),%edx 10987a: 85 d2 test %edx,%edx 10987c: 75 e6 jne 109864 10987e: e9 b3 03 00 00 jmp 109c36 /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 109883: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109886: e9 98 00 00 00 jmp 109923 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 10988b: a1 28 34 12 00 mov 0x123428,%eax 109890: 89 42 64 mov %eax,0x64(%edx) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 109893: 8b 42 64 mov 0x64(%edx),%eax 109896: 83 ec 0c sub $0xc,%esp 109899: 50 push %eax 10989a: 89 55 e0 mov %edx,-0x20(%ebp) 10989d: e8 9a e0 ff ff call 10793c 1098a2: 8b 55 e0 mov -0x20(%ebp),%edx 1098a5: 89 42 58 mov %eax,0x58(%edx) if (tty->rawInBuf.theBuf == NULL) { 1098a8: 83 c4 10 add $0x10,%esp 1098ab: 85 c0 test %eax,%eax 1098ad: 75 05 jne 1098b4 <== ALWAYS TAKEN free(tty); 1098af: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1098b2: eb 68 jmp 10991c <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 1098b4: a1 2c 34 12 00 mov 0x12342c,%eax 1098b9: 89 82 88 00 00 00 mov %eax,0x88(%edx) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 1098bf: 8b 82 88 00 00 00 mov 0x88(%edx),%eax 1098c5: 83 ec 0c sub $0xc,%esp 1098c8: 50 push %eax 1098c9: 89 55 e0 mov %edx,-0x20(%ebp) 1098cc: e8 6b e0 ff ff call 10793c 1098d1: 8b 55 e0 mov -0x20(%ebp),%edx 1098d4: 89 42 7c mov %eax,0x7c(%edx) if (tty->rawOutBuf.theBuf == NULL) { 1098d7: 83 c4 10 add $0x10,%esp 1098da: 85 c0 test %eax,%eax 1098dc: 75 05 jne 1098e3 <== ALWAYS TAKEN free((void *)(tty->rawInBuf.theBuf)); 1098de: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1098e1: eb 2d jmp 109910 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 1098e3: 83 ec 0c sub $0xc,%esp 1098e6: ff 35 24 34 12 00 pushl 0x123424 1098ec: 89 55 e0 mov %edx,-0x20(%ebp) 1098ef: e8 48 e0 ff ff call 10793c 1098f4: 8b 55 e0 mov -0x20(%ebp),%edx 1098f7: 89 42 1c mov %eax,0x1c(%edx) if (tty->cbuf == NULL) { 1098fa: 83 c4 10 add $0x10,%esp 1098fd: 85 c0 test %eax,%eax 1098ff: 75 39 jne 10993a <== ALWAYS TAKEN free((void *)(tty->rawOutBuf.theBuf)); 109901: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109904: ff 72 7c pushl 0x7c(%edx) <== NOT EXECUTED 109907: e8 90 dd ff ff call 10769c <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 10990c: 5b pop %ebx <== NOT EXECUTED 10990d: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109910: ff 72 58 pushl 0x58(%edx) <== NOT EXECUTED 109913: e8 84 dd ff ff call 10769c <== NOT EXECUTED free(tty); 109918: 59 pop %ecx <== NOT EXECUTED 109919: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 10991c: 52 push %edx <== NOT EXECUTED 10991d: e8 7a dd ff ff call 10769c <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 109922: 5a pop %edx <== NOT EXECUTED 109923: ff 35 44 55 12 00 pushl 0x125544 <== NOT EXECUTED 109929: e8 a2 0d 00 00 call 10a6d0 <== NOT EXECUTED 10992e: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED 109935: e9 ee 02 00 00 jmp 109c28 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 10993a: c7 82 d4 00 00 00 00 movl $0x0,0xd4(%edx) 109941: 00 00 00 tty->tty_snd.sw_arg = NULL; 109944: c7 82 d8 00 00 00 00 movl $0x0,0xd8(%edx) 10994b: 00 00 00 tty->tty_rcv.sw_pfn = NULL; 10994e: c7 82 dc 00 00 00 00 movl $0x0,0xdc(%edx) 109955: 00 00 00 tty->tty_rcv.sw_arg = NULL; 109958: c7 82 e0 00 00 00 00 movl $0x0,0xe0(%edx) 10995f: 00 00 00 tty->tty_rcvwakeup = 0; 109962: c7 82 e4 00 00 00 00 movl $0x0,0xe4(%edx) 109969: 00 00 00 /* * link tty */ tty->forw = rtems_termios_ttyHead; 10996c: a1 4c 55 12 00 mov 0x12554c,%eax 109971: 89 02 mov %eax,(%edx) tty->back = NULL; 109973: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) if (rtems_termios_ttyHead != NULL) 10997a: 85 c0 test %eax,%eax 10997c: 74 03 je 109981 rtems_termios_ttyHead->back = tty; 10997e: 89 50 04 mov %edx,0x4(%eax) rtems_termios_ttyHead = tty; 109981: 89 1d 4c 55 12 00 mov %ebx,0x12554c if (rtems_termios_ttyTail == NULL) 109987: 83 3d 48 55 12 00 00 cmpl $0x0,0x125548 10998e: 75 06 jne 109996 rtems_termios_ttyTail = tty; 109990: 89 1d 48 55 12 00 mov %ebx,0x125548 tty->minor = minor; 109996: 8b 45 0c mov 0xc(%ebp),%eax 109999: 89 43 10 mov %eax,0x10(%ebx) tty->major = major; 10999c: 8b 4d 08 mov 0x8(%ebp),%ecx 10999f: 89 4b 0c mov %ecx,0xc(%ebx) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 1099a2: 83 ec 0c sub $0xc,%esp 1099a5: 8d 43 14 lea 0x14(%ebx),%eax 1099a8: 50 push %eax 1099a9: 6a 00 push $0x0 1099ab: 6a 54 push $0x54 1099ad: 6a 01 push $0x1 1099af: 0f be 05 30 34 12 00 movsbl 0x123430,%eax 1099b6: 0d 00 69 52 54 or $0x54526900,%eax 1099bb: 50 push %eax 1099bc: 89 55 e0 mov %edx,-0x20(%ebp) 1099bf: e8 f4 09 00 00 call 10a3b8 rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 1099c4: 83 c4 20 add $0x20,%esp 1099c7: 85 c0 test %eax,%eax 1099c9: 8b 55 e0 mov -0x20(%ebp),%edx 1099cc: 0f 85 3f 02 00 00 jne 109c11 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 1099d2: 83 ec 0c sub $0xc,%esp 1099d5: 8d 43 18 lea 0x18(%ebx),%eax 1099d8: 50 push %eax 1099d9: 6a 00 push $0x0 1099db: 6a 54 push $0x54 1099dd: 6a 01 push $0x1 1099df: 0f be 05 30 34 12 00 movsbl 0x123430,%eax 1099e6: 0d 00 6f 52 54 or $0x54526f00,%eax 1099eb: 50 push %eax 1099ec: 89 55 e0 mov %edx,-0x20(%ebp) 1099ef: e8 c4 09 00 00 call 10a3b8 rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 1099f4: 83 c4 20 add $0x20,%esp 1099f7: 85 c0 test %eax,%eax 1099f9: 8b 55 e0 mov -0x20(%ebp),%edx 1099fc: 0f 85 0f 02 00 00 jne 109c11 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 109a02: 83 ec 0c sub $0xc,%esp 109a05: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax 109a0b: 50 push %eax 109a0c: 6a 00 push $0x0 109a0e: 6a 20 push $0x20 109a10: 6a 00 push $0x0 109a12: 0f be 05 30 34 12 00 movsbl 0x123430,%eax 109a19: 0d 00 78 52 54 or $0x54527800,%eax 109a1e: 50 push %eax 109a1f: 89 55 e0 mov %edx,-0x20(%ebp) 109a22: e8 91 09 00 00 call 10a3b8 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 109a27: 83 c4 20 add $0x20,%esp 109a2a: 85 c0 test %eax,%eax 109a2c: 8b 55 e0 mov -0x20(%ebp),%edx 109a2f: 0f 85 dc 01 00 00 jne 109c11 <== NEVER TAKEN rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 109a35: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 109a3c: 00 00 00 /* * Set callbacks */ tty->device = *callbacks; 109a3f: 8d bb 98 00 00 00 lea 0x98(%ebx),%edi 109a45: b9 08 00 00 00 mov $0x8,%ecx 109a4a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 109a4c: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109a53: 75 74 jne 109ac9 <== ALWAYS TAKEN sc = rtems_task_create ( 109a55: 50 push %eax <== NOT EXECUTED 109a56: 50 push %eax <== NOT EXECUTED 109a57: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax <== NOT EXECUTED 109a5d: 50 push %eax <== NOT EXECUTED 109a5e: 6a 00 push $0x0 <== NOT EXECUTED 109a60: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 109a65: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 109a6a: 6a 0a push $0xa <== NOT EXECUTED 109a6c: 0f be 05 30 34 12 00 movsbl 0x123430,%eax <== NOT EXECUTED 109a73: 0d 00 54 78 54 or $0x54785400,%eax <== NOT EXECUTED 109a78: 50 push %eax <== NOT EXECUTED 109a79: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 109a7c: e8 df 0c 00 00 call 10a760 <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 109a81: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 109a84: 85 c0 test %eax,%eax <== NOT EXECUTED 109a86: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109a89: 0f 85 82 01 00 00 jne 109c11 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 109a8f: 57 push %edi <== NOT EXECUTED 109a90: 57 push %edi <== NOT EXECUTED 109a91: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax <== NOT EXECUTED 109a97: 50 push %eax <== NOT EXECUTED 109a98: 6a 00 push $0x0 <== NOT EXECUTED 109a9a: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 109a9f: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 109aa4: 6a 09 push $0x9 <== NOT EXECUTED 109aa6: 0f be 05 30 34 12 00 movsbl 0x123430,%eax <== NOT EXECUTED 109aad: 0d 00 54 78 52 or $0x52785400,%eax <== NOT EXECUTED 109ab2: 50 push %eax <== NOT EXECUTED 109ab3: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 109ab6: e8 a5 0c 00 00 call 10a760 <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 109abb: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 109abe: 85 c0 test %eax,%eax <== NOT EXECUTED 109ac0: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109ac3: 0f 85 48 01 00 00 jne 109c11 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 109ac9: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 109ad0: 74 09 je 109adb (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 109ad2: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109ad9: 75 30 jne 109b0b <== ALWAYS TAKEN sc = rtems_semaphore_create ( 109adb: 83 ec 0c sub $0xc,%esp 109ade: 8d 43 68 lea 0x68(%ebx),%eax 109ae1: 50 push %eax 109ae2: 6a 00 push $0x0 109ae4: 6a 24 push $0x24 109ae6: 6a 00 push $0x0 109ae8: 0f be 05 30 34 12 00 movsbl 0x123430,%eax 109aef: 0d 00 72 52 54 or $0x54527200,%eax 109af4: 50 push %eax 109af5: 89 55 e0 mov %edx,-0x20(%ebp) 109af8: e8 bb 08 00 00 call 10a3b8 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 109afd: 83 c4 20 add $0x20,%esp 109b00: 85 c0 test %eax,%eax 109b02: 8b 55 e0 mov -0x20(%ebp),%edx 109b05: 0f 85 06 01 00 00 jne 109c11 <== NEVER TAKEN } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 109b0b: c7 43 30 02 25 00 00 movl $0x2502,0x30(%ebx) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 109b12: c7 43 34 05 18 00 00 movl $0x1805,0x34(%ebx) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 109b19: c7 43 38 bd 08 00 00 movl $0x8bd,0x38(%ebx) tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 109b20: c7 43 3c 3b 82 00 00 movl $0x823b,0x3c(%ebx) tty->termios.c_cc[VINTR] = '\003'; 109b27: c6 43 41 03 movb $0x3,0x41(%ebx) tty->termios.c_cc[VQUIT] = '\034'; 109b2b: c6 43 42 1c movb $0x1c,0x42(%ebx) tty->termios.c_cc[VERASE] = '\177'; 109b2f: c6 43 43 7f movb $0x7f,0x43(%ebx) tty->termios.c_cc[VKILL] = '\025'; 109b33: c6 43 44 15 movb $0x15,0x44(%ebx) tty->termios.c_cc[VEOF] = '\004'; 109b37: c6 43 45 04 movb $0x4,0x45(%ebx) tty->termios.c_cc[VEOL] = '\000'; 109b3b: c6 43 4c 00 movb $0x0,0x4c(%ebx) tty->termios.c_cc[VEOL2] = '\000'; 109b3f: c6 43 51 00 movb $0x0,0x51(%ebx) tty->termios.c_cc[VSTART] = '\021'; 109b43: c6 43 49 11 movb $0x11,0x49(%ebx) tty->termios.c_cc[VSTOP] = '\023'; 109b47: c6 43 4a 13 movb $0x13,0x4a(%ebx) tty->termios.c_cc[VSUSP] = '\032'; 109b4b: c6 43 4b 1a movb $0x1a,0x4b(%ebx) tty->termios.c_cc[VREPRINT] = '\022'; 109b4f: c6 43 4d 12 movb $0x12,0x4d(%ebx) tty->termios.c_cc[VDISCARD] = '\017'; 109b53: c6 43 4e 0f movb $0xf,0x4e(%ebx) tty->termios.c_cc[VWERASE] = '\027'; 109b57: c6 43 4f 17 movb $0x17,0x4f(%ebx) tty->termios.c_cc[VLNEXT] = '\026'; 109b5b: c6 43 50 16 movb $0x16,0x50(%ebx) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 109b5f: c7 83 b8 00 00 00 00 movl $0x0,0xb8(%ebx) 109b66: 00 00 00 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 109b69: 8b 43 64 mov 0x64(%ebx),%eax 109b6c: d1 e8 shr %eax 109b6e: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) tty->highwater = tty->rawInBuf.Size * 3/4; 109b74: 8b 43 64 mov 0x64(%ebx),%eax 109b77: 8d 04 40 lea (%eax,%eax,2),%eax 109b7a: c1 e8 02 shr $0x2,%eax 109b7d: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) /* * Bump name characer */ if (c++ == 'z') 109b83: a0 30 34 12 00 mov 0x123430,%al 109b88: 8d 48 01 lea 0x1(%eax),%ecx 109b8b: 88 0d 30 34 12 00 mov %cl,0x123430 109b91: 3c 7a cmp $0x7a,%al 109b93: 75 07 jne 109b9c <== ALWAYS TAKEN c = 'a'; 109b95: c6 05 30 34 12 00 61 movb $0x61,0x123430 <== NOT EXECUTED } args->iop->data1 = tty; 109b9c: 8b 4d 10 mov 0x10(%ebp),%ecx 109b9f: 8b 01 mov (%ecx),%eax 109ba1: 89 50 34 mov %edx,0x34(%eax) if (!tty->refcount++) { 109ba4: 8b 42 08 mov 0x8(%edx),%eax 109ba7: 8d 48 01 lea 0x1(%eax),%ecx 109baa: 89 4a 08 mov %ecx,0x8(%edx) 109bad: 85 c0 test %eax,%eax 109baf: 75 69 jne 109c1a if (tty->device.firstOpen) 109bb1: 8b 82 98 00 00 00 mov 0x98(%edx),%eax 109bb7: 85 c0 test %eax,%eax 109bb9: 74 15 je 109bd0 (*tty->device.firstOpen)(major, minor, arg); 109bbb: 56 push %esi 109bbc: ff 75 10 pushl 0x10(%ebp) 109bbf: ff 75 0c pushl 0xc(%ebp) 109bc2: ff 75 08 pushl 0x8(%ebp) 109bc5: 89 55 e0 mov %edx,-0x20(%ebp) 109bc8: ff d0 call *%eax 109bca: 83 c4 10 add $0x10,%esp 109bcd: 8b 55 e0 mov -0x20(%ebp),%edx /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 109bd0: 83 ba b4 00 00 00 02 cmpl $0x2,0xb4(%edx) 109bd7: 75 41 jne 109c1a <== ALWAYS TAKEN sc = rtems_task_start(tty->rxTaskId, 109bd9: 53 push %ebx <== NOT EXECUTED 109bda: 52 push %edx <== NOT EXECUTED 109bdb: 68 bb 9c 10 00 push $0x109cbb <== NOT EXECUTED 109be0: ff b2 c4 00 00 00 pushl 0xc4(%edx) <== NOT EXECUTED 109be6: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 109be9: e8 de 0d 00 00 call 10a9cc <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 109bee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109bf1: 85 c0 test %eax,%eax <== NOT EXECUTED 109bf3: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109bf6: 75 19 jne 109c11 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 109bf8: 51 push %ecx <== NOT EXECUTED 109bf9: 52 push %edx <== NOT EXECUTED 109bfa: 68 58 9c 10 00 push $0x109c58 <== NOT EXECUTED 109bff: ff b2 c8 00 00 00 pushl 0xc8(%edx) <== NOT EXECUTED 109c05: e8 c2 0d 00 00 call 10a9cc <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 109c0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109c0d: 85 c0 test %eax,%eax <== NOT EXECUTED 109c0f: 74 09 je 109c1a <== NOT EXECUTED rtems_fatal_error_occurred (sc); 109c11: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109c14: 50 push %eax <== NOT EXECUTED 109c15: e8 82 0f 00 00 call 10ab9c <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 109c1a: 83 ec 0c sub $0xc,%esp 109c1d: ff 35 44 55 12 00 pushl 0x125544 109c23: e8 a8 0a 00 00 call 10a6d0 return RTEMS_SUCCESSFUL; 109c28: 83 c4 10 add $0x10,%esp } 109c2b: 8b 45 e4 mov -0x1c(%ebp),%eax 109c2e: 8d 65 f4 lea -0xc(%ebp),%esp 109c31: 5b pop %ebx 109c32: 5e pop %esi 109c33: 5f pop %edi 109c34: c9 leave 109c35: c3 ret static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 109c36: 52 push %edx 109c37: 52 push %edx 109c38: 68 e8 00 00 00 push $0xe8 109c3d: 6a 01 push $0x1 109c3f: e8 78 d8 ff ff call 1074bc 109c44: 89 c2 mov %eax,%edx 109c46: 89 c3 mov %eax,%ebx if (tty == NULL) { 109c48: 83 c4 10 add $0x10,%esp 109c4b: 85 c0 test %eax,%eax 109c4d: 0f 85 38 fc ff ff jne 10988b <== ALWAYS TAKEN 109c53: e9 2b fc ff ff jmp 109883 <== NOT EXECUTED =============================================================================== 00108a19 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 108a19: 55 push %ebp 108a1a: 89 e5 mov %esp,%ebp 108a1c: 57 push %edi 108a1d: 56 push %esi 108a1e: 53 push %ebx 108a1f: 83 ec 3c sub $0x3c,%esp 108a22: 8b 45 08 mov 0x8(%ebp),%eax 108a25: 8b 75 0c mov 0xc(%ebp),%esi 108a28: 8b 5d 10 mov 0x10(%ebp),%ebx const unsigned char *buf = _buf; 108a2b: 89 c7 mov %eax,%edi unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 108a2d: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx) 108a34: 75 1b jne 108a51 <== ALWAYS TAKEN (*tty->device.write)(tty->minor, (void *)buf, len); 108a36: 89 75 10 mov %esi,0x10(%ebp) <== NOT EXECUTED 108a39: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 108a3c: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 108a3f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 108a42: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 108a48: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108a4b: 5b pop %ebx <== NOT EXECUTED 108a4c: 5e pop %esi <== NOT EXECUTED 108a4d: 5f pop %edi <== NOT EXECUTED 108a4e: c9 leave <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 108a4f: ff e0 jmp *%eax <== NOT EXECUTED return; } newHead = tty->rawOutBuf.Head; 108a51: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 108a57: 89 45 e4 mov %eax,-0x1c(%ebp) while (len) { 108a5a: e9 ca 00 00 00 jmp 108b29 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 108a5f: 8b 45 e4 mov -0x1c(%ebp),%eax 108a62: 40 inc %eax 108a63: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 108a69: 31 d2 xor %edx,%edx 108a6b: f7 f1 div %ecx 108a6d: 89 55 c4 mov %edx,-0x3c(%ebp) 108a70: 89 55 e4 mov %edx,-0x1c(%ebp) rtems_interrupt_disable (level); 108a73: 9c pushf 108a74: fa cli 108a75: 8f 45 d4 popl -0x2c(%ebp) 108a78: 8b 55 d4 mov -0x2c(%ebp),%edx 108a7b: 8b 4d c4 mov -0x3c(%ebp),%ecx while (newHead == tty->rawOutBuf.Tail) { 108a7e: eb 35 jmp 108ab5 tty->rawOutBufState = rob_wait; 108a80: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 108a87: 00 00 00 rtems_interrupt_enable (level); 108a8a: 52 push %edx 108a8b: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 108a8c: 50 push %eax 108a8d: 6a 00 push $0x0 108a8f: 6a 00 push $0x0 108a91: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 108a97: 89 4d e0 mov %ecx,-0x20(%ebp) 108a9a: e8 45 1b 00 00 call 10a5e4 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 108a9f: 83 c4 10 add $0x10,%esp 108aa2: 85 c0 test %eax,%eax 108aa4: 8b 4d e0 mov -0x20(%ebp),%ecx 108aa7: 74 09 je 108ab2 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 108aa9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108aac: 50 push %eax <== NOT EXECUTED 108aad: e8 ea 20 00 00 call 10ab9c <== NOT EXECUTED rtems_interrupt_disable (level); 108ab2: 9c pushf 108ab3: fa cli 108ab4: 5a pop %edx * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 108ab5: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 108abb: 39 c1 cmp %eax,%ecx 108abd: 74 c1 je 108a80 108abf: 89 55 d4 mov %edx,-0x2c(%ebp) 108ac2: 89 4d c4 mov %ecx,-0x3c(%ebp) RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 108ac5: 8b 8b 80 00 00 00 mov 0x80(%ebx),%ecx 108acb: 8a 07 mov (%edi),%al 108acd: 8b 53 7c mov 0x7c(%ebx),%edx 108ad0: 88 04 0a mov %al,(%edx,%ecx,1) tty->rawOutBuf.Head = newHead; 108ad3: 8b 4d c4 mov -0x3c(%ebp),%ecx 108ad6: 89 8b 80 00 00 00 mov %ecx,0x80(%ebx) if (tty->rawOutBufState == rob_idle) { 108adc: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) 108ae3: 75 3e jne 108b23 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 108ae5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108aeb: a8 10 test $0x10,%al 108aed: 75 1b jne 108b0a <== NEVER TAKEN (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 108aef: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 108af5: 52 push %edx 108af6: 6a 01 push $0x1 108af8: 03 43 7c add 0x7c(%ebx),%eax 108afb: 50 push %eax 108afc: ff 73 10 pushl 0x10(%ebx) 108aff: ff 93 a4 00 00 00 call *0xa4(%ebx) 108b05: 83 c4 10 add $0x10,%esp 108b08: eb 0f jmp 108b19 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 108b0a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108b10: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 108b13: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 108b19: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 108b20: 00 00 00 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 108b23: 47 inc %edi /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); 108b24: ff 75 d4 pushl -0x2c(%ebp) 108b27: 9d popf len--; 108b28: 4e dec %esi if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 108b29: 85 f6 test %esi,%esi 108b2b: 0f 85 2e ff ff ff jne 108a5f tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 108b31: 8d 65 f4 lea -0xc(%ebp),%esp 108b34: 5b pop %ebx 108b35: 5e pop %esi 108b36: 5f pop %edi 108b37: c9 leave 108b38: c3 ret =============================================================================== 00109097 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 109097: 55 push %ebp <== NOT EXECUTED 109098: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10909a: 57 push %edi <== NOT EXECUTED 10909b: 56 push %esi <== NOT EXECUTED 10909c: 53 push %ebx <== NOT EXECUTED 10909d: 83 ec 50 sub $0x50,%esp <== NOT EXECUTED 1090a0: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 1090a3: 8b 06 mov (%esi),%eax <== NOT EXECUTED 1090a5: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t count = args->count; 1090a8: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED 1090ab: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED char *buffer = args->buffer; 1090ae: 8b 4e 0c mov 0xc(%esi),%ecx <== NOT EXECUTED 1090b1: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1090b4: 6a 00 push $0x0 <== NOT EXECUTED 1090b6: 6a 00 push $0x0 <== NOT EXECUTED 1090b8: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 1090bb: e8 24 15 00 00 call 10a5e4 <== NOT EXECUTED 1090c0: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 1090c3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1090c6: 85 c0 test %eax,%eax <== NOT EXECUTED 1090c8: 0f 85 92 02 00 00 jne 109360 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 1090ce: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 1090d4: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1090d7: 8b 80 fc 51 12 00 mov 0x1251fc(%eax),%eax <== NOT EXECUTED 1090dd: 85 c0 test %eax,%eax <== NOT EXECUTED 1090df: 74 19 je 1090fa <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 1090e1: 51 push %ecx <== NOT EXECUTED 1090e2: 51 push %ecx <== NOT EXECUTED 1090e3: 56 push %esi <== NOT EXECUTED 1090e4: 53 push %ebx <== NOT EXECUTED 1090e5: ff d0 call *%eax <== NOT EXECUTED 1090e7: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 1090ea: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 1090f1: 00 00 00 rtems_semaphore_release (tty->isem); 1090f4: 5a pop %edx <== NOT EXECUTED 1090f5: e9 5b 02 00 00 jmp 109355 <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { 1090fa: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 1090fd: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 109100: 0f 85 25 02 00 00 jne 10932b <== NOT EXECUTED tty->cindex = tty->ccount = 0; 109106: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED 10910d: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED tty->read_start_column = tty->column; 109114: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 109117: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED if (tty->device.pollRead != NULL 10911a: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) <== NOT EXECUTED 109121: 0f 84 c4 00 00 00 je 1091eb <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 109127: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx) <== NOT EXECUTED 10912e: 0f 85 b7 00 00 00 jne 1091eb <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 109134: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 109138: 74 35 je 10916f <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 10913a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10913d: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109140: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (n < 0) { 109146: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109149: 85 c0 test %eax,%eax <== NOT EXECUTED 10914b: 79 0f jns 10915c <== NOT EXECUTED rtems_task_wake_after (1); 10914d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109150: 6a 01 push $0x1 <== NOT EXECUTED 109152: e8 d9 18 00 00 call 10aa30 <== NOT EXECUTED 109157: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10915a: eb de jmp 10913a <== NOT EXECUTED } else { if (siproc (n, tty)) 10915c: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10915f: 89 da mov %ebx,%edx <== NOT EXECUTED 109161: e8 db fd ff ff call 108f41 <== NOT EXECUTED 109166: 85 c0 test %eax,%eax <== NOT EXECUTED 109168: 74 d0 je 10913a <== NOT EXECUTED 10916a: e9 bc 01 00 00 jmp 10932b <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 10916f: e8 40 0e 00 00 call 109fb4 <== NOT EXECUTED 109174: 89 c7 mov %eax,%edi <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 109176: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109179: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10917c: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (n < 0) { 109182: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109185: 85 c0 test %eax,%eax <== NOT EXECUTED 109187: 79 3d jns 1091c6 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 109189: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 10918d: 74 0e je 10919d <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 10918f: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 109193: 74 22 je 1091b7 <== NOT EXECUTED 109195: 83 7b 20 00 cmpl $0x0,0x20(%ebx) <== NOT EXECUTED 109199: 74 1c je 1091b7 <== NOT EXECUTED 10919b: eb 0a jmp 1091a7 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 10919d: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 1091a1: 0f 84 84 01 00 00 je 10932b <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 1091a7: e8 08 0e 00 00 call 109fb4 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 1091ac: 29 f8 sub %edi,%eax <== NOT EXECUTED 1091ae: 3b 43 54 cmp 0x54(%ebx),%eax <== NOT EXECUTED 1091b1: 0f 87 74 01 00 00 ja 10932b <== NOT EXECUTED break; } } rtems_task_wake_after (1); 1091b7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1091ba: 6a 01 push $0x1 <== NOT EXECUTED 1091bc: e8 6f 18 00 00 call 10aa30 <== NOT EXECUTED 1091c1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1091c4: eb b0 jmp 109176 <== NOT EXECUTED } else { siproc (n, tty); 1091c6: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 1091c9: 89 da mov %ebx,%edx <== NOT EXECUTED 1091cb: e8 71 fd ff ff call 108f41 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 1091d0: 8a 43 47 mov 0x47(%ebx),%al <== NOT EXECUTED 1091d3: 0f b6 d0 movzbl %al,%edx <== NOT EXECUTED 1091d6: 39 53 20 cmp %edx,0x20(%ebx) <== NOT EXECUTED 1091d9: 0f 8d 4c 01 00 00 jge 10932b <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 1091df: 84 c0 test %al,%al <== NOT EXECUTED 1091e1: 74 93 je 109176 <== NOT EXECUTED 1091e3: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 1091e7: 74 8d je 109176 <== NOT EXECUTED 1091e9: eb 84 jmp 10916f <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 1091eb: 8b 53 74 mov 0x74(%ebx),%edx <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 1091ee: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 1091f1: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 1091f4: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 1091f9: e9 de 00 00 00 jmp 1092dc <== NOT EXECUTED while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 1091fe: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 109201: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 109204: 40 inc %eax <== NOT EXECUTED 109205: 31 d2 xor %edx,%edx <== NOT EXECUTED 109207: f7 f1 div %ecx <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 109209: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 10920c: 8a 04 10 mov (%eax,%edx,1),%al <== NOT EXECUTED 10920f: 88 45 d7 mov %al,-0x29(%ebp) <== NOT EXECUTED tty->rawInBuf.Head = newHead; 109212: 89 53 5c mov %edx,0x5c(%ebx) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 109215: 8b 4b 60 mov 0x60(%ebx),%ecx <== NOT EXECUTED 109218: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED 10921b: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 10921e: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED 109221: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 109224: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED 109227: 03 45 c4 add -0x3c(%ebp),%eax <== NOT EXECUTED 10922a: 29 d0 sub %edx,%eax <== NOT EXECUTED 10922c: 31 d2 xor %edx,%edx <== NOT EXECUTED 10922e: f7 f1 div %ecx <== NOT EXECUTED 109230: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx <== NOT EXECUTED 109236: 73 74 jae 1092ac <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 109238: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10923e: 83 e0 fe and $0xfffffffe,%eax <== NOT EXECUTED 109241: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 109247: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10924d: 25 02 02 00 00 and $0x202,%eax <== NOT EXECUTED 109252: 3d 02 02 00 00 cmp $0x202,%eax <== NOT EXECUTED 109257: 75 24 jne 10927d <== NOT EXECUTED 109259: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 109260: 74 0a je 10926c <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 109262: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 109268: a8 20 test $0x20,%al <== NOT EXECUTED 10926a: 74 11 je 10927d <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 10926c: 50 push %eax <== NOT EXECUTED 10926d: 6a 01 push $0x1 <== NOT EXECUTED 10926f: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 109272: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109275: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10927b: eb 2c jmp 1092a9 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 10927d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109283: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 109286: 74 24 je 1092ac <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 109288: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10928e: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 109291: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 109297: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED 10929d: 85 c0 test %eax,%eax <== NOT EXECUTED 10929f: 74 0b je 1092ac <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 1092a1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1092a4: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1092a7: ff d0 call *%eax <== NOT EXECUTED 1092a9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 1092ac: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 1092b0: 74 11 je 1092c3 <== NOT EXECUTED if (siproc (c, tty)) 1092b2: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 1092b6: 89 da mov %ebx,%edx <== NOT EXECUTED 1092b8: e8 84 fc ff ff call 108f41 <== NOT EXECUTED 1092bd: 85 c0 test %eax,%eax <== NOT EXECUTED 1092bf: 75 16 jne 1092d7 <== NOT EXECUTED 1092c1: eb 16 jmp 1092d9 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 1092c3: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 1092c7: 89 da mov %ebx,%edx <== NOT EXECUTED 1092c9: e8 73 fc ff ff call 108f41 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 1092ce: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED 1092d2: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 1092d5: 7c 02 jl 1092d9 <== NOT EXECUTED 1092d7: 31 ff xor %edi,%edi <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 1092d9: 8b 53 70 mov 0x70(%ebx),%edx <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 1092dc: 8b 4b 5c mov 0x5c(%ebx),%ecx <== NOT EXECUTED 1092df: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 1092e2: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 1092e4: 74 0f je 1092f5 <== NOT EXECUTED 1092e6: a1 24 34 12 00 mov 0x123424,%eax <== NOT EXECUTED 1092eb: 48 dec %eax <== NOT EXECUTED 1092ec: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 1092ef: 0f 8c 09 ff ff ff jl 1091fe <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 1092f5: 85 ff test %edi,%edi <== NOT EXECUTED 1092f7: 74 32 je 10932b <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 1092f9: 51 push %ecx <== NOT EXECUTED 1092fa: 52 push %edx <== NOT EXECUTED 1092fb: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 1092fe: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 109301: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 109304: e8 db 12 00 00 call 10a5e4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 109309: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10930c: 85 c0 test %eax,%eax <== NOT EXECUTED 10930e: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 109311: 74 c9 je 1092dc <== NOT EXECUTED 109313: eb 16 jmp 10932b <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 109315: 8b 7b 1c mov 0x1c(%ebx),%edi <== NOT EXECUTED 109318: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10931b: 8a 04 07 mov (%edi,%eax,1),%al <== NOT EXECUTED 10931e: 88 02 mov %al,(%edx) <== NOT EXECUTED 109320: 42 inc %edx <== NOT EXECUTED 109321: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 109324: 40 inc %eax <== NOT EXECUTED 109325: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED count--; 109328: 49 dec %ecx <== NOT EXECUTED 109329: eb 06 jmp 109331 <== NOT EXECUTED 10932b: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 10932e: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 109331: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109333: 74 0b je 109340 <== NOT EXECUTED 109335: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 109338: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 10933b: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 10933e: 7c d5 jl 109315 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 109340: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED 109343: 29 c8 sub %ecx,%eax <== NOT EXECUTED 109345: 89 46 18 mov %eax,0x18(%esi) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 109348: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 10934f: 00 00 00 rtems_semaphore_release (tty->isem); 109352: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109355: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 109358: e8 73 13 00 00 call 10a6d0 <== NOT EXECUTED return sc; 10935d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 109360: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 109363: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109366: 5b pop %ebx <== NOT EXECUTED 109367: 5e pop %esi <== NOT EXECUTED 109368: 5f pop %edi <== NOT EXECUTED 109369: c9 leave <== NOT EXECUTED 10936a: c3 ret <== NOT EXECUTED =============================================================================== 00108566 : * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 108566: 55 push %ebp 108567: 89 e5 mov %esp,%ebp 108569: 57 push %edi 10856a: 56 push %esi 10856b: 53 push %ebx 10856c: 83 ec 0c sub $0xc,%esp 10856f: 8b 5d 08 mov 0x8(%ebp),%ebx int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 108572: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108578: 25 03 04 00 00 and $0x403,%eax 10857d: 3d 01 04 00 00 cmp $0x401,%eax 108582: 75 2c jne 1085b0 <== ALWAYS TAKEN == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 108584: 56 push %esi <== NOT EXECUTED 108585: 6a 01 push $0x1 <== NOT EXECUTED 108587: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 10858a: 50 push %eax <== NOT EXECUTED 10858b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10858e: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 108594: 9c pushf <== NOT EXECUTED 108595: fa cli <== NOT EXECUTED 108596: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 108597: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 10859d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1085a3: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 1085a6: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 1085ac: 52 push %edx <== NOT EXECUTED 1085ad: 9d popf <== NOT EXECUTED 1085ae: eb 38 jmp 1085e8 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 1085b0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1085b6: 83 e0 03 and $0x3,%eax 1085b9: 83 f8 02 cmp $0x2,%eax 1085bc: 75 37 jne 1085f5 <== ALWAYS TAKEN * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 1085be: 51 push %ecx <== NOT EXECUTED 1085bf: 6a 01 push $0x1 <== NOT EXECUTED 1085c1: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 1085c4: 50 push %eax <== NOT EXECUTED 1085c5: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1085c8: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 1085ce: 9c pushf <== NOT EXECUTED 1085cf: fa cli <== NOT EXECUTED 1085d0: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 1085d1: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 1085d7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1085dd: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 1085e0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 1085e6: 52 push %edx <== NOT EXECUTED 1085e7: 9d popf <== NOT EXECUTED 1085e8: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED 1085ed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1085f0: e9 2f 01 00 00 jmp 108724 <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 1085f5: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 1085fb: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 108601: 39 c2 cmp %eax,%edx 108603: 75 1f jne 108624 <== ALWAYS TAKEN /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 108605: 31 f6 xor %esi,%esi 108607: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) <== NOT EXECUTED 10860e: 0f 85 10 01 00 00 jne 108724 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 108614: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108617: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED 10861d: e8 ae 20 00 00 call 10a6d0 <== NOT EXECUTED 108622: eb c9 jmp 1085ed <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 108624: 9c pushf 108625: fa cli 108626: 58 pop %eax len = tty->t_dqlen; 108627: 8b 8b 90 00 00 00 mov 0x90(%ebx),%ecx tty->t_dqlen = 0; 10862d: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx) 108634: 00 00 00 rtems_interrupt_enable(level); 108637: 50 push %eax 108638: 9d popf newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 108639: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 10863f: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi 108645: 8d 04 01 lea (%ecx,%eax,1),%eax 108648: 31 d2 xor %edx,%edx 10864a: f7 f6 div %esi 10864c: 89 d7 mov %edx,%edi tty->rawOutBuf.Tail = newTail; 10864e: 89 93 84 00 00 00 mov %edx,0x84(%ebx) if (tty->rawOutBufState == rob_wait) { 108654: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 10865b: 75 11 jne 10866e /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 10865d: 83 ec 0c sub $0xc,%esp 108660: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 108666: e8 65 20 00 00 call 10a6d0 10866b: 83 c4 10 add $0x10,%esp } if (newTail == tty->rawOutBuf.Head) { 10866e: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 108674: 39 c7 cmp %eax,%edi 108676: 75 2a jne 1086a2 /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 108678: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 10867f: 00 00 00 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 108682: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax 108688: 31 f6 xor %esi,%esi 10868a: 85 c0 test %eax,%eax 10868c: 0f 84 8c 00 00 00 je 10871e <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 108692: 52 push %edx <== NOT EXECUTED 108693: 52 push %edx <== NOT EXECUTED 108694: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED 10869a: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 10869d: 52 push %edx <== NOT EXECUTED 10869e: ff d0 call *%eax <== NOT EXECUTED 1086a0: eb 79 jmp 10871b <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 1086a2: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1086a8: 25 10 02 00 00 and $0x210,%eax 1086ad: 3d 10 02 00 00 cmp $0x210,%eax 1086b2: 75 22 jne 1086d6 <== ALWAYS TAKEN == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 1086b4: 9c pushf <== NOT EXECUTED 1086b5: fa cli <== NOT EXECUTED 1086b6: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 1086b7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1086bd: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 1086c0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 1086c6: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED 1086cd: 00 00 00 rtems_interrupt_enable(level); 1086d0: 52 push %edx <== NOT EXECUTED 1086d1: 9d popf <== NOT EXECUTED 1086d2: 31 f6 xor %esi,%esi <== NOT EXECUTED 1086d4: eb 48 jmp 10871e <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 1086d6: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 1086dc: 39 c7 cmp %eax,%edi 1086de: 76 08 jbe 1086e8 nToSend = tty->rawOutBuf.Size - newTail; 1086e0: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi 1086e6: eb 06 jmp 1086ee else nToSend = tty->rawOutBuf.Head - newTail; 1086e8: 8b b3 80 00 00 00 mov 0x80(%ebx),%esi 1086ee: 29 fe sub %edi,%esi /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 1086f0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1086f6: f6 c4 06 test $0x6,%ah 1086f9: 74 05 je 108700 <== ALWAYS TAKEN 1086fb: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 108700: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 108707: 00 00 00 (*tty->device.write)(tty->minor, 10870a: 50 push %eax 10870b: 56 push %esi 10870c: 8b 43 7c mov 0x7c(%ebx),%eax 10870f: 01 f8 add %edi,%eax 108711: 50 push %eax 108712: ff 73 10 pushl 0x10(%ebx) 108715: ff 93 a4 00 00 00 call *0xa4(%ebx) 10871b: 83 c4 10 add $0x10,%esp &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 10871e: 89 bb 84 00 00 00 mov %edi,0x84(%ebx) } return nToSend; } 108724: 89 f0 mov %esi,%eax 108726: 8d 65 f4 lea -0xc(%ebp),%esp 108729: 5b pop %ebx 10872a: 5e pop %esi 10872b: 5f pop %edi 10872c: c9 leave 10872d: c3 ret =============================================================================== 00109cbb : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 109cbb: 55 push %ebp <== NOT EXECUTED 109cbc: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109cbe: 57 push %edi <== NOT EXECUTED 109cbf: 56 push %esi <== NOT EXECUTED 109cc0: 53 push %ebx <== NOT EXECUTED 109cc1: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 109cc4: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 109cc7: 8d 7d e0 lea -0x20(%ebp),%edi <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 109cca: 8d 75 e7 lea -0x19(%ebp),%esi <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 109ccd: 57 push %edi <== NOT EXECUTED 109cce: 6a 00 push $0x0 <== NOT EXECUTED 109cd0: 6a 02 push $0x2 <== NOT EXECUTED 109cd2: 6a 03 push $0x3 <== NOT EXECUTED 109cd4: e8 3f 03 00 00 call 10a018 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 109cd9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109cdc: f6 45 e0 01 testb $0x1,-0x20(%ebp) <== NOT EXECUTED 109ce0: 74 16 je 109cf8 <== NOT EXECUTED tty->rxTaskId = 0; 109ce2: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED 109ce9: 00 00 00 rtems_task_delete(RTEMS_SELF); 109cec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109cef: 6a 00 push $0x0 <== NOT EXECUTED 109cf1: e8 9a 0b 00 00 call 10a890 <== NOT EXECUTED 109cf6: eb 21 jmp 109d19 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 109cf8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109cfb: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109cfe: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (c != EOF) { 109d04: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109d07: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 109d0a: 74 c1 je 109ccd <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 109d0c: 88 45 e7 mov %al,-0x19(%ebp) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 109d0f: 50 push %eax <== NOT EXECUTED 109d10: 6a 01 push $0x1 <== NOT EXECUTED 109d12: 56 push %esi <== NOT EXECUTED 109d13: 53 push %ebx <== NOT EXECUTED 109d14: e8 7a ea ff ff call 108793 <== NOT EXECUTED 109d19: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109d1c: eb af jmp 109ccd <== NOT EXECUTED =============================================================================== 0010854b : * signal receive interrupt to rx daemon * NOTE: This routine runs in the context of the * device receive interrupt handler. */ void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { 10854b: 55 push %ebp <== NOT EXECUTED 10854c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10854e: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 108551: 6a 02 push $0x2 <== NOT EXECUTED 108553: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 108556: ff b0 c4 00 00 00 pushl 0xc4(%eax) <== NOT EXECUTED 10855c: e8 17 1c 00 00 call 10a178 <== NOT EXECUTED 108561: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 108564: c9 leave <== NOT EXECUTED 108565: c3 ret <== NOT EXECUTED =============================================================================== 00109c58 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 109c58: 55 push %ebp <== NOT EXECUTED 109c59: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109c5b: 56 push %esi <== NOT EXECUTED 109c5c: 53 push %ebx <== NOT EXECUTED 109c5d: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 109c60: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 109c63: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED 109c66: 56 push %esi <== NOT EXECUTED 109c67: 6a 00 push $0x0 <== NOT EXECUTED 109c69: 6a 02 push $0x2 <== NOT EXECUTED 109c6b: 6a 03 push $0x3 <== NOT EXECUTED 109c6d: e8 a6 03 00 00 call 10a018 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 109c72: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109c75: f6 45 f4 01 testb $0x1,-0xc(%ebp) <== NOT EXECUTED 109c79: 74 16 je 109c91 <== NOT EXECUTED tty->txTaskId = 0; 109c7b: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED 109c82: 00 00 00 rtems_task_delete(RTEMS_SELF); 109c85: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109c88: 6a 00 push $0x0 <== NOT EXECUTED 109c8a: e8 01 0c 00 00 call 10a890 <== NOT EXECUTED 109c8f: eb 25 jmp 109cb6 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 109c91: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 109c97: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 109c9a: 8b 80 08 52 12 00 mov 0x125208(%eax),%eax <== NOT EXECUTED 109ca0: 85 c0 test %eax,%eax <== NOT EXECUTED 109ca2: 74 09 je 109cad <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 109ca4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109ca7: 53 push %ebx <== NOT EXECUTED 109ca8: ff d0 call *%eax <== NOT EXECUTED 109caa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 109cad: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109cb0: 53 push %ebx <== NOT EXECUTED 109cb1: e8 b0 e8 ff ff call 108566 <== NOT EXECUTED 109cb6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109cb9: eb ab jmp 109c66 <== NOT EXECUTED =============================================================================== 00108f93 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 108f93: 55 push %ebp 108f94: 89 e5 mov %esp,%ebp 108f96: 57 push %edi 108f97: 56 push %esi 108f98: 53 push %ebx 108f99: 83 ec 20 sub $0x20,%esp 108f9c: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 108f9f: 8b 03 mov (%ebx),%eax 108fa1: 8b 70 34 mov 0x34(%eax),%esi rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 108fa4: 6a 00 push $0x0 108fa6: 6a 00 push $0x0 108fa8: ff 76 18 pushl 0x18(%esi) 108fab: e8 34 16 00 00 call 10a5e4 108fb0: 89 c7 mov %eax,%edi if (sc != RTEMS_SUCCESSFUL) 108fb2: 83 c4 10 add $0x10,%esp 108fb5: 85 c0 test %eax,%eax 108fb7: 75 77 jne 109030 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 108fb9: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 108fbf: c1 e0 05 shl $0x5,%eax 108fc2: 8b 80 00 52 12 00 mov 0x125200(%eax),%eax 108fc8: 85 c0 test %eax,%eax 108fca: 74 0b je 108fd7 <== ALWAYS TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 108fcc: 57 push %edi <== NOT EXECUTED 108fcd: 57 push %edi <== NOT EXECUTED 108fce: 53 push %ebx <== NOT EXECUTED 108fcf: 56 push %esi <== NOT EXECUTED 108fd0: ff d0 call *%eax <== NOT EXECUTED 108fd2: 89 c7 mov %eax,%edi <== NOT EXECUTED rtems_semaphore_release (tty->osem); 108fd4: 5b pop %ebx <== NOT EXECUTED 108fd5: eb 4e jmp 109025 <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { 108fd7: f6 46 34 01 testb $0x1,0x34(%esi) 108fdb: 74 2f je 10900c <== NEVER TAKEN uint32_t count = args->count; 108fdd: 8b 4b 10 mov 0x10(%ebx),%ecx char *buffer = args->buffer; 108fe0: 8b 43 0c mov 0xc(%ebx),%eax 108fe3: 89 45 e4 mov %eax,-0x1c(%ebp) while (count--) 108fe6: eb 18 jmp 109000 oproc (*buffer++, tty); 108fe8: 8b 55 e4 mov -0x1c(%ebp),%edx 108feb: 0f b6 02 movzbl (%edx),%eax 108fee: 42 inc %edx 108fef: 89 55 e4 mov %edx,-0x1c(%ebp) 108ff2: 89 f2 mov %esi,%edx 108ff4: 89 4d e0 mov %ecx,-0x20(%ebp) 108ff7: e8 3d fb ff ff call 108b39 108ffc: 8b 4d e0 mov -0x20(%ebp),%ecx 108fff: 49 dec %ecx return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 109000: 85 c9 test %ecx,%ecx 109002: 75 e4 jne 108fe8 oproc (*buffer++, tty); args->bytes_moved = args->count; 109004: 8b 43 10 mov 0x10(%ebx),%eax 109007: 89 43 18 mov %eax,0x18(%ebx) 10900a: eb 16 jmp 109022 } else { rtems_termios_puts (args->buffer, args->count, tty); 10900c: 51 push %ecx <== NOT EXECUTED 10900d: 56 push %esi <== NOT EXECUTED 10900e: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109011: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 109014: e8 00 fa ff ff call 108a19 <== NOT EXECUTED args->bytes_moved = args->count; 109019: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10901c: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED 10901f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 109022: 83 ec 0c sub $0xc,%esp 109025: ff 76 18 pushl 0x18(%esi) 109028: e8 a3 16 00 00 call 10a6d0 return sc; 10902d: 83 c4 10 add $0x10,%esp } 109030: 89 f8 mov %edi,%eax 109032: 8d 65 f4 lea -0xc(%ebp),%esp 109035: 5b pop %ebx 109036: 5e pop %esi 109037: 5f pop %edi 109038: c9 leave 109039: c3 ret =============================================================================== 00116af8 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 116af8: 55 push %ebp 116af9: 89 e5 mov %esp,%ebp 116afb: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 116afe: 8d 45 f4 lea -0xc(%ebp),%eax 116b01: 50 push %eax 116b02: ff 75 08 pushl 0x8(%ebp) 116b05: 68 44 e8 13 00 push $0x13e844 116b0a: e8 6d 24 00 00 call 118f7c <_Objects_Get> 116b0f: 89 c2 mov %eax,%edx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116b11: 83 c4 10 add $0x10,%esp 116b14: b8 04 00 00 00 mov $0x4,%eax 116b19: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 116b1d: 75 1c jne 116b3b case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 116b1f: 83 7a 38 04 cmpl $0x4,0x38(%edx) 116b23: 74 0f je 116b34 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 116b25: 83 ec 0c sub $0xc,%esp 116b28: 83 c2 10 add $0x10,%edx 116b2b: 52 push %edx 116b2c: e8 93 3e 00 00 call 11a9c4 <_Watchdog_Remove> 116b31: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 116b34: e8 74 2c 00 00 call 1197ad <_Thread_Enable_dispatch> 116b39: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116b3b: c9 leave 116b3c: c3 ret =============================================================================== 00116f60 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 116f60: 55 push %ebp 116f61: 89 e5 mov %esp,%ebp 116f63: 57 push %edi 116f64: 56 push %esi 116f65: 53 push %ebx 116f66: 83 ec 1c sub $0x1c,%esp 116f69: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 116f6c: 8b 35 84 e8 13 00 mov 0x13e884,%esi if ( !timer_server ) 116f72: b8 0e 00 00 00 mov $0xe,%eax 116f77: 85 f6 test %esi,%esi 116f79: 0f 84 b4 00 00 00 je 117033 <== NEVER TAKEN return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 116f7f: b0 0b mov $0xb,%al 116f81: 80 3d 78 e5 13 00 00 cmpb $0x0,0x13e578 116f88: 0f 84 a5 00 00 00 je 117033 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 116f8e: b0 09 mov $0x9,%al 116f90: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 116f94: 0f 84 99 00 00 00 je 117033 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 116f9a: 83 ec 0c sub $0xc,%esp 116f9d: 53 push %ebx 116f9e: e8 61 d6 ff ff call 114604 <_TOD_Validate> 116fa3: 83 c4 10 add $0x10,%esp 116fa6: 84 c0 test %al,%al 116fa8: 0f 84 80 00 00 00 je 11702e <== NEVER TAKEN return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 116fae: 83 ec 0c sub $0xc,%esp 116fb1: 53 push %ebx 116fb2: e8 e5 d5 ff ff call 11459c <_TOD_To_seconds> 116fb7: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 116fb9: 83 c4 10 add $0x10,%esp 116fbc: 3b 05 f4 e5 13 00 cmp 0x13e5f4,%eax 116fc2: 76 6a jbe 11702e <== NEVER TAKEN 116fc4: 51 push %ecx 116fc5: 8d 45 e4 lea -0x1c(%ebp),%eax 116fc8: 50 push %eax 116fc9: ff 75 08 pushl 0x8(%ebp) 116fcc: 68 44 e8 13 00 push $0x13e844 116fd1: e8 a6 1f 00 00 call 118f7c <_Objects_Get> 116fd6: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116fd8: 83 c4 10 add $0x10,%esp 116fdb: b8 04 00 00 00 mov $0x4,%eax 116fe0: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 116fe4: 75 4d jne 117033 <== NEVER TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 116fe6: 83 ec 0c sub $0xc,%esp 116fe9: 8d 43 10 lea 0x10(%ebx),%eax 116fec: 50 push %eax 116fed: e8 d2 39 00 00 call 11a9c4 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 116ff2: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 116ff9: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 117000: 8b 45 10 mov 0x10(%ebp),%eax 117003: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 117006: 8b 45 08 mov 0x8(%ebp),%eax 117009: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 11700c: 8b 45 14 mov 0x14(%ebp),%eax 11700f: 89 43 34 mov %eax,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 117012: 2b 3d f4 e5 13 00 sub 0x13e5f4,%edi 117018: 89 7b 1c mov %edi,0x1c(%ebx) (*timer_server->schedule_operation)( timer_server, the_timer ); 11701b: 58 pop %eax 11701c: 5a pop %edx 11701d: 53 push %ebx 11701e: 56 push %esi 11701f: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 117022: e8 86 27 00 00 call 1197ad <_Thread_Enable_dispatch> 117027: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 117029: 83 c4 10 add $0x10,%esp 11702c: eb 05 jmp 117033 11702e: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117033: 8d 65 f4 lea -0xc(%ebp),%esp 117036: 5b pop %ebx 117037: 5e pop %esi 117038: 5f pop %edi 117039: c9 leave 11703a: c3 ret =============================================================================== 0010b531 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 10b531: 55 push %ebp <== NOT EXECUTED 10b532: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b534: 57 push %edi <== NOT EXECUTED 10b535: 56 push %esi <== NOT EXECUTED 10b536: 53 push %ebx <== NOT EXECUTED 10b537: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10b53a: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10b53c: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 10b53f: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 10b542: 25 00 00 00 20 and $0x20000000,%eax <== NOT EXECUTED 10b547: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10b54a: 74 2a je 10b576 <== NOT EXECUTED { if (rtems_panic_in_progress++) 10b54c: a1 50 b3 12 00 mov 0x12b350,%eax <== NOT EXECUTED 10b551: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10b554: 89 15 50 b3 12 00 mov %edx,0x12b350 <== NOT EXECUTED 10b55a: 85 c0 test %eax,%eax <== NOT EXECUTED 10b55c: 74 0b je 10b569 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b55e: a1 a4 b4 12 00 mov 0x12b4a4,%eax <== NOT EXECUTED 10b563: 40 inc %eax <== NOT EXECUTED 10b564: a3 a4 b4 12 00 mov %eax,0x12b4a4 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 10b569: 83 3d 50 b3 12 00 02 cmpl $0x2,0x12b350 <== NOT EXECUTED 10b570: 0f 8f 1b 01 00 00 jg 10b691 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 10b576: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b579: a1 20 92 12 00 mov 0x129220,%eax <== NOT EXECUTED 10b57e: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10b581: e8 2a af 00 00 call 1164b0 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 10b586: 89 df mov %ebx,%edi <== NOT EXECUTED 10b588: 81 e7 ff ff ff 8f and $0x8fffffff,%edi <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 10b58e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b591: 31 f6 xor %esi,%esi <== NOT EXECUTED 10b593: f7 c3 00 00 00 40 test $0x40000000,%ebx <== NOT EXECUTED 10b599: 74 07 je 10b5a2 <== NOT EXECUTED local_errno = errno; 10b59b: e8 94 ab 00 00 call 116134 <__errno> <== NOT EXECUTED 10b5a0: 8b 30 mov (%eax),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 10b5a2: 52 push %edx <== NOT EXECUTED 10b5a3: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED 10b5a6: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10b5a9: a1 20 92 12 00 mov 0x129220,%eax <== NOT EXECUTED 10b5ae: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b5b1: e8 aa 0a 01 00 call 11c060 <== NOT EXECUTED 10b5b6: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED if (status) 10b5b9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b5bc: 85 ff test %edi,%edi <== NOT EXECUTED 10b5be: 74 25 je 10b5e5 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 10b5c0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b5c3: 57 push %edi <== NOT EXECUTED 10b5c4: e8 53 ff ff ff call 10b51c <== NOT EXECUTED 10b5c9: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10b5cc: 50 push %eax <== NOT EXECUTED 10b5cd: 68 d3 3f 12 00 push $0x123fd3 <== NOT EXECUTED 10b5d2: a1 20 92 12 00 mov 0x129220,%eax <== NOT EXECUTED 10b5d7: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b5da: e8 19 b2 00 00 call 1167f8 <== NOT EXECUTED 10b5df: 01 45 e4 add %eax,-0x1c(%ebp) <== NOT EXECUTED 10b5e2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (local_errno) 10b5e5: 83 fe 00 cmp $0x0,%esi <== NOT EXECUTED 10b5e8: 74 41 je 10b62b <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 10b5ea: 7e 25 jle 10b611 <== NOT EXECUTED 10b5ec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b5ef: 56 push %esi <== NOT EXECUTED 10b5f0: e8 d3 b9 00 00 call 116fc8 <== NOT EXECUTED 10b5f5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b5f8: 80 38 00 cmpb $0x0,(%eax) <== NOT EXECUTED 10b5fb: 74 14 je 10b611 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 10b5fd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b600: 56 push %esi <== NOT EXECUTED 10b601: e8 c2 b9 00 00 call 116fc8 <== NOT EXECUTED 10b606: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10b609: 50 push %eax <== NOT EXECUTED 10b60a: 68 e1 3f 12 00 push $0x123fe1 <== NOT EXECUTED 10b60f: eb 07 jmp 10b618 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 10b611: 50 push %eax <== NOT EXECUTED 10b612: 56 push %esi <== NOT EXECUTED 10b613: 68 ee 3f 12 00 push $0x123fee <== NOT EXECUTED 10b618: a1 20 92 12 00 mov 0x129220,%eax <== NOT EXECUTED 10b61d: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b620: e8 d3 b1 00 00 call 1167f8 <== NOT EXECUTED 10b625: 01 45 e4 add %eax,-0x1c(%ebp) <== NOT EXECUTED 10b628: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 10b62b: 57 push %edi <== NOT EXECUTED 10b62c: 57 push %edi <== NOT EXECUTED 10b62d: 68 ec 46 12 00 push $0x1246ec <== NOT EXECUTED 10b632: a1 20 92 12 00 mov 0x129220,%eax <== NOT EXECUTED 10b637: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b63a: e8 b9 b1 00 00 call 1167f8 <== NOT EXECUTED 10b63f: 89 c7 mov %eax,%edi <== NOT EXECUTED (void) fflush(stderr); 10b641: 59 pop %ecx <== NOT EXECUTED 10b642: a1 20 92 12 00 mov 0x129220,%eax <== NOT EXECUTED 10b647: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b64a: e8 61 ae 00 00 call 1164b0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 10b64f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b652: 81 e3 00 00 00 30 and $0x30000000,%ebx <== NOT EXECUTED 10b658: 75 08 jne 10b662 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 10b65a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10b65d: 8d 04 17 lea (%edi,%edx,1),%eax <== NOT EXECUTED 10b660: eb 31 jmp 10b693 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) { if (error_flag & RTEMS_ERROR_PANIC) 10b662: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 10b666: 74 16 je 10b67e <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 10b668: 52 push %edx <== NOT EXECUTED 10b669: 52 push %edx <== NOT EXECUTED 10b66a: 68 02 40 12 00 push $0x124002 <== NOT EXECUTED 10b66f: 6a 00 push $0x0 <== NOT EXECUTED 10b671: e8 3d 00 00 00 call 10b6b3 <== NOT EXECUTED _exit(local_errno); 10b676: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED 10b679: e8 6e 09 00 00 call 10bfec <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 10b67e: 50 push %eax <== NOT EXECUTED 10b67f: 50 push %eax <== NOT EXECUTED 10b680: 68 17 40 12 00 push $0x124017 <== NOT EXECUTED 10b685: 6a 00 push $0x0 <== NOT EXECUTED 10b687: e8 27 00 00 00 call 10b6b3 <== NOT EXECUTED abort(); 10b68c: e8 6f aa 00 00 call 116100 <== NOT EXECUTED 10b691: 31 c0 xor %eax,%eax <== NOT EXECUTED } } return chars_written; } 10b693: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b696: 5b pop %ebx <== NOT EXECUTED 10b697: 5e pop %esi <== NOT EXECUTED 10b698: 5f pop %edi <== NOT EXECUTED 10b699: c9 leave <== NOT EXECUTED 10b69a: c3 ret <== NOT EXECUTED =============================================================================== 0010786e : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 10786e: 55 push %ebp 10786f: 89 e5 mov %esp,%ebp 107871: 57 push %edi 107872: 56 push %esi 107873: 53 push %ebx 107874: 83 ec 3c sub $0x3c,%esp 107877: 89 c3 mov %eax,%ebx 107879: 89 55 e0 mov %edx,-0x20(%ebp) 10787c: 31 f6 xor %esi,%esi 10787e: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp) 107885: 31 ff xor %edi,%edi sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 107887: 89 7d c4 mov %edi,-0x3c(%ebp) unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 10788a: 8b 43 04 mov 0x4(%ebx),%eax 10788d: 48 dec %eax 10788e: 89 43 04 mov %eax,0x4(%ebx) 107891: 85 c0 test %eax,%eax 107893: 79 15 jns 1078aa <== ALWAYS TAKEN 107895: 50 push %eax <== NOT EXECUTED 107896: 50 push %eax <== NOT EXECUTED 107897: 53 push %ebx <== NOT EXECUTED 107898: ff 35 e0 3f 12 00 pushl 0x123fe0 <== NOT EXECUTED 10789e: e8 15 c3 00 00 call 113bb8 <__srget_r> <== NOT EXECUTED 1078a3: 89 c1 mov %eax,%ecx <== NOT EXECUTED 1078a5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1078a8: eb 08 jmp 1078b2 <== NOT EXECUTED 1078aa: 8b 03 mov (%ebx),%eax 1078ac: 0f b6 08 movzbl (%eax),%ecx 1078af: 40 inc %eax 1078b0: 89 03 mov %eax,(%ebx) if (c == ':') 1078b2: 83 f9 3a cmp $0x3a,%ecx 1078b5: 74 4a je 107901 break; if (sign == 0) { 1078b7: 85 f6 test %esi,%esi 1078b9: 75 11 jne 1078cc <== NEVER TAKEN if (c == '-') { sign = -1; limit++; continue; 1078bb: 66 be 01 00 mov $0x1,%si for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 1078bf: 83 f9 2d cmp $0x2d,%ecx 1078c2: 75 08 jne 1078cc <== ALWAYS TAKEN sign = -1; limit++; 1078c4: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED 1078c7: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED continue; 1078ca: eb be jmp 10788a <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 1078cc: a1 dc 3f 12 00 mov 0x123fdc,%eax 1078d1: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1) 1078d6: 74 3f je 107917 <== NEVER TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 1078d8: 8b 45 e4 mov -0x1c(%ebp),%eax 1078db: bf 0a 00 00 00 mov $0xa,%edi 1078e0: 31 d2 xor %edx,%edx 1078e2: f7 f7 div %edi 1078e4: 89 55 d4 mov %edx,-0x2c(%ebp) 1078e7: 39 45 c4 cmp %eax,-0x3c(%ebp) 1078ea: 77 2b ja 107917 <== NEVER TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 1078ec: 83 e9 30 sub $0x30,%ecx if ((i > (limit / 10)) 1078ef: 39 45 c4 cmp %eax,-0x3c(%ebp) 1078f2: 75 04 jne 1078f8 <== ALWAYS TAKEN 1078f4: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 1078f6: 77 1f ja 107917 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 1078f8: 6b 7d c4 0a imul $0xa,-0x3c(%ebp),%edi 1078fc: 8d 3c 39 lea (%ecx,%edi,1),%edi 1078ff: eb 86 jmp 107887 107901: 8b 7d c4 mov -0x3c(%ebp),%edi } if (sign == 0) 107904: 85 f6 test %esi,%esi 107906: 74 0f je 107917 <== NEVER TAKEN return 0; *val = i * sign; 107908: 0f af f7 imul %edi,%esi 10790b: 8b 45 e0 mov -0x20(%ebp),%eax 10790e: 89 30 mov %esi,(%eax) 107910: b8 01 00 00 00 mov $0x1,%eax return 1; 107915: eb 02 jmp 107919 107917: 31 c0 xor %eax,%eax } 107919: 8d 65 f4 lea -0xc(%ebp),%esp 10791c: 5b pop %ebx 10791d: 5e pop %esi 10791e: 5f pop %edi 10791f: c9 leave 107920: c3 ret =============================================================================== 00107921 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 107921: 55 push %ebp 107922: 89 e5 mov %esp,%ebp 107924: 57 push %edi 107925: 56 push %esi 107926: 53 push %ebx 107927: 83 ec 1c sub $0x1c,%esp 10792a: 89 c3 mov %eax,%ebx 10792c: 89 ce mov %ecx,%esi 10792e: 8b 7d 08 mov 0x8(%ebp),%edi 107931: 8b 4d 0c mov 0xc(%ebp),%ecx int c; *name = *bufp; 107934: 8b 06 mov (%esi),%eax 107936: 89 02 mov %eax,(%edx) for (;;) { c = getc(fp); 107938: 8b 43 04 mov 0x4(%ebx),%eax 10793b: 48 dec %eax 10793c: 89 43 04 mov %eax,0x4(%ebx) 10793f: 85 c0 test %eax,%eax 107941: 79 19 jns 10795c 107943: 52 push %edx 107944: 52 push %edx 107945: 53 push %ebx 107946: ff 35 e0 3f 12 00 pushl 0x123fe0 10794c: 89 4d e4 mov %ecx,-0x1c(%ebp) 10794f: e8 64 c2 00 00 call 113bb8 <__srget_r> 107954: 83 c4 10 add $0x10,%esp 107957: 8b 4d e4 mov -0x1c(%ebp),%ecx 10795a: eb 08 jmp 107964 10795c: 8b 13 mov (%ebx),%edx 10795e: 0f b6 02 movzbl (%edx),%eax 107961: 42 inc %edx 107962: 89 13 mov %edx,(%ebx) if (c == ':') { 107964: 83 f8 3a cmp $0x3a,%eax 107967: 75 06 jne 10796f if (nlFlag) 107969: 85 c9 test %ecx,%ecx 10796b: 74 21 je 10798e <== ALWAYS TAKEN 10796d: eb 2f jmp 10799e <== NOT EXECUTED return 0; break; } if (c == '\n') { 10796f: 83 f8 0a cmp $0xa,%eax 107972: 75 06 jne 10797a if (!nlFlag) 107974: 85 c9 test %ecx,%ecx 107976: 75 16 jne 10798e <== ALWAYS TAKEN 107978: eb 24 jmp 10799e <== NOT EXECUTED return 0; break; } if (c == EOF) 10797a: 83 f8 ff cmp $0xffffffff,%eax 10797d: 74 1f je 10799e <== NEVER TAKEN return 0; if (*nleft < 2) 10797f: 83 3f 01 cmpl $0x1,(%edi) 107982: 76 1a jbe 10799e <== NEVER TAKEN return 0; **bufp = c; 107984: 8b 16 mov (%esi),%edx 107986: 88 02 mov %al,(%edx) ++(*bufp); 107988: ff 06 incl (%esi) --(*nleft); 10798a: ff 0f decl (%edi) } 10798c: eb aa jmp 107938 **bufp = '\0'; 10798e: 8b 06 mov (%esi),%eax 107990: c6 00 00 movb $0x0,(%eax) ++(*bufp); 107993: ff 06 incl (%esi) --(*nleft); 107995: ff 0f decl (%edi) 107997: b8 01 00 00 00 mov $0x1,%eax return 1; 10799c: eb 02 jmp 1079a0 10799e: 31 c0 xor %eax,%eax } 1079a0: 8d 65 f4 lea -0xc(%ebp),%esp 1079a3: 5b pop %ebx 1079a4: 5e pop %esi 1079a5: 5f pop %edi 1079a6: c9 leave 1079a7: c3 ret =============================================================================== 001079a8 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 1079a8: 55 push %ebp 1079a9: 89 e5 mov %esp,%ebp 1079ab: 57 push %edi 1079ac: 56 push %esi 1079ad: 53 push %ebx 1079ae: 83 ec 34 sub $0x34,%esp 1079b1: 89 c6 mov %eax,%esi 1079b3: 89 d3 mov %edx,%ebx 1079b5: 89 4d d4 mov %ecx,-0x2c(%ebp) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1079b8: 8d 7d d4 lea -0x2c(%ebp),%edi 1079bb: 6a 00 push $0x0 1079bd: 8d 45 08 lea 0x8(%ebp),%eax 1079c0: 50 push %eax 1079c1: 89 f9 mov %edi,%ecx 1079c3: 89 f0 mov %esi,%eax 1079c5: e8 57 ff ff ff call 107921 1079ca: 83 c4 10 add $0x10,%esp 1079cd: 85 c0 test %eax,%eax 1079cf: 0f 84 c8 00 00 00 je 107a9d <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 1079d5: 50 push %eax 1079d6: 50 push %eax 1079d7: 8d 53 04 lea 0x4(%ebx),%edx 1079da: 6a 00 push $0x0 1079dc: 8d 45 08 lea 0x8(%ebp),%eax 1079df: 50 push %eax 1079e0: 89 f9 mov %edi,%ecx 1079e2: 89 f0 mov %esi,%eax 1079e4: e8 38 ff ff ff call 107921 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1079e9: 83 c4 10 add $0x10,%esp 1079ec: 85 c0 test %eax,%eax 1079ee: 0f 84 a9 00 00 00 je 107a9d <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 1079f4: 8d 55 e4 lea -0x1c(%ebp),%edx 1079f7: 89 f0 mov %esi,%eax 1079f9: e8 70 fe ff ff call 10786e { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1079fe: 85 c0 test %eax,%eax 107a00: 0f 84 97 00 00 00 je 107a9d <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 107a06: 51 push %ecx 107a07: 51 push %ecx 107a08: 8d 55 e0 lea -0x20(%ebp),%edx 107a0b: 6a 01 push $0x1 107a0d: 8d 45 08 lea 0x8(%ebp),%eax 107a10: 50 push %eax 107a11: 89 f9 mov %edi,%ecx 107a13: 89 f0 mov %esi,%eax 107a15: e8 07 ff ff ff call 107921 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 107a1a: 83 c4 10 add $0x10,%esp 107a1d: 85 c0 test %eax,%eax 107a1f: 74 7c je 107a9d <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 107a21: 8b 45 e4 mov -0x1c(%ebp),%eax 107a24: 66 89 43 08 mov %ax,0x8(%ebx) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107a28: 8b 7d e0 mov -0x20(%ebp),%edi 107a2b: 89 fa mov %edi,%edx 107a2d: b8 01 00 00 00 mov $0x1,%eax 107a32: eb 12 jmp 107a46 if(*cp == ',') memcount++; 107a34: 80 7d d3 2c cmpb $0x2c,-0x2d(%ebp) 107a38: 0f 94 c1 sete %cl 107a3b: 89 ce mov %ecx,%esi 107a3d: 81 e6 ff 00 00 00 and $0xff,%esi 107a43: 01 f0 add %esi,%eax grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107a45: 42 inc %edx 107a46: 8a 0a mov (%edx),%cl 107a48: 88 4d d3 mov %cl,-0x2d(%ebp) 107a4b: 84 c9 test %cl,%cl 107a4d: 75 e5 jne 107a34 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 107a4f: 8d 04 85 13 00 00 00 lea 0x13(,%eax,4),%eax 107a56: 39 45 08 cmp %eax,0x8(%ebp) 107a59: 72 42 jb 107a9d <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 107a5b: 8b 45 d4 mov -0x2c(%ebp),%eax 107a5e: 83 c0 0f add $0xf,%eax 107a61: 83 e0 f0 and $0xfffffff0,%eax 107a64: 89 43 0c mov %eax,0xc(%ebx) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 107a67: 89 38 mov %edi,(%eax) 107a69: 8b 45 e0 mov -0x20(%ebp),%eax 107a6c: 40 inc %eax 107a6d: ba 01 00 00 00 mov $0x1,%edx for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107a72: eb 11 jmp 107a85 if(*cp == ',') { 107a74: 80 f9 2c cmp $0x2c,%cl 107a77: 75 0b jne 107a84 <== ALWAYS TAKEN *cp = '\0'; 107a79: c6 40 ff 00 movb $0x0,-0x1(%eax) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 107a7d: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED 107a80: 89 04 91 mov %eax,(%ecx,%edx,4) <== NOT EXECUTED 107a83: 42 inc %edx <== NOT EXECUTED 107a84: 40 inc %eax /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107a85: 8a 48 ff mov -0x1(%eax),%cl 107a88: 84 c9 test %cl,%cl 107a8a: 75 e8 jne 107a74 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 107a8c: 8b 43 0c mov 0xc(%ebx),%eax 107a8f: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) 107a96: b8 01 00 00 00 mov $0x1,%eax return 1; 107a9b: eb 02 jmp 107a9f 107a9d: 31 c0 xor %eax,%eax } 107a9f: 8d 65 f4 lea -0xc(%ebp),%esp 107aa2: 5b pop %ebx 107aa3: 5e pop %esi 107aa4: 5f pop %edi 107aa5: c9 leave 107aa6: c3 ret =============================================================================== 00107adf : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 107adf: 55 push %ebp 107ae0: 89 e5 mov %esp,%ebp 107ae2: 57 push %edi 107ae3: 56 push %esi 107ae4: 53 push %ebx 107ae5: 83 ec 34 sub $0x34,%esp 107ae8: 89 c6 mov %eax,%esi 107aea: 89 d3 mov %edx,%ebx 107aec: 89 4d d4 mov %ecx,-0x2c(%ebp) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107aef: 8d 7d d4 lea -0x2c(%ebp),%edi 107af2: 6a 00 push $0x0 107af4: 8d 45 08 lea 0x8(%ebp),%eax 107af7: 50 push %eax 107af8: 89 f9 mov %edi,%ecx 107afa: 89 f0 mov %esi,%eax 107afc: e8 20 fe ff ff call 107921 107b01: 83 c4 10 add $0x10,%esp 107b04: 85 c0 test %eax,%eax 107b06: 0f 84 c4 00 00 00 je 107bd0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 107b0c: 51 push %ecx 107b0d: 51 push %ecx 107b0e: 8d 53 04 lea 0x4(%ebx),%edx 107b11: 6a 00 push $0x0 107b13: 8d 45 08 lea 0x8(%ebp),%eax 107b16: 50 push %eax 107b17: 89 f9 mov %edi,%ecx 107b19: 89 f0 mov %esi,%eax 107b1b: e8 01 fe ff ff call 107921 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b20: 83 c4 10 add $0x10,%esp 107b23: 85 c0 test %eax,%eax 107b25: 0f 84 a5 00 00 00 je 107bd0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 107b2b: 8d 55 e4 lea -0x1c(%ebp),%edx 107b2e: 89 f0 mov %esi,%eax 107b30: e8 39 fd ff ff call 10786e size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b35: 85 c0 test %eax,%eax 107b37: 0f 84 93 00 00 00 je 107bd0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 107b3d: 8d 55 e0 lea -0x20(%ebp),%edx 107b40: 89 f0 mov %esi,%eax 107b42: e8 27 fd ff ff call 10786e size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b47: 85 c0 test %eax,%eax 107b49: 0f 84 81 00 00 00 je 107bd0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 107b4f: 52 push %edx 107b50: 52 push %edx 107b51: 8d 53 0c lea 0xc(%ebx),%edx 107b54: 6a 00 push $0x0 107b56: 8d 45 08 lea 0x8(%ebp),%eax 107b59: 50 push %eax 107b5a: 89 f9 mov %edi,%ecx 107b5c: 89 f0 mov %esi,%eax 107b5e: e8 be fd ff ff call 107921 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b63: 83 c4 10 add $0x10,%esp 107b66: 85 c0 test %eax,%eax 107b68: 74 66 je 107bd0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 107b6a: 50 push %eax 107b6b: 50 push %eax 107b6c: 8d 53 10 lea 0x10(%ebx),%edx 107b6f: 6a 00 push $0x0 107b71: 8d 45 08 lea 0x8(%ebp),%eax 107b74: 50 push %eax 107b75: 89 f9 mov %edi,%ecx 107b77: 89 f0 mov %esi,%eax 107b79: e8 a3 fd ff ff call 107921 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b7e: 83 c4 10 add $0x10,%esp 107b81: 85 c0 test %eax,%eax 107b83: 74 4b je 107bd0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 107b85: 51 push %ecx 107b86: 51 push %ecx 107b87: 8d 53 14 lea 0x14(%ebx),%edx 107b8a: 6a 00 push $0x0 107b8c: 8d 45 08 lea 0x8(%ebp),%eax 107b8f: 50 push %eax 107b90: 89 f9 mov %edi,%ecx 107b92: 89 f0 mov %esi,%eax 107b94: e8 88 fd ff ff call 107921 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b99: 83 c4 10 add $0x10,%esp 107b9c: 85 c0 test %eax,%eax 107b9e: 74 30 je 107bd0 <== NEVER TAKEN || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 107ba0: 52 push %edx 107ba1: 52 push %edx 107ba2: 8d 53 18 lea 0x18(%ebx),%edx 107ba5: 6a 01 push $0x1 107ba7: 8d 45 08 lea 0x8(%ebp),%eax 107baa: 50 push %eax 107bab: 89 f9 mov %edi,%ecx 107bad: 89 f0 mov %esi,%eax 107baf: e8 6d fd ff ff call 107921 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107bb4: 83 c4 10 add $0x10,%esp 107bb7: 85 c0 test %eax,%eax 107bb9: 74 15 je 107bd0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 107bbb: 8b 45 e4 mov -0x1c(%ebp),%eax 107bbe: 66 89 43 08 mov %ax,0x8(%ebx) pwd->pw_gid = pwgid; 107bc2: 8b 45 e0 mov -0x20(%ebp),%eax 107bc5: 66 89 43 0a mov %ax,0xa(%ebx) 107bc9: b8 01 00 00 00 mov $0x1,%eax return 1; 107bce: eb 02 jmp 107bd2 107bd0: 31 c0 xor %eax,%eax } 107bd2: 8d 65 f4 lea -0xc(%ebp),%esp 107bd5: 5b pop %ebx 107bd6: 5e pop %esi 107bd7: 5f pop %edi 107bd8: c9 leave 107bd9: c3 ret =============================================================================== 00107ce3 : return NULL; return &grent; } void setgrent(void) { 107ce3: 55 push %ebp <== NOT EXECUTED 107ce4: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107ce6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 107ce9: e8 24 ff ff ff call 107c12 <== NOT EXECUTED if (group_fp != NULL) 107cee: a1 00 5e 12 00 mov 0x125e00,%eax <== NOT EXECUTED 107cf3: 85 c0 test %eax,%eax <== NOT EXECUTED 107cf5: 74 0c je 107d03 <== NOT EXECUTED fclose(group_fp); 107cf7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107cfa: 50 push %eax <== NOT EXECUTED 107cfb: e8 88 a6 00 00 call 112388 <== NOT EXECUTED 107d00: 83 c4 10 add $0x10,%esp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 107d03: 52 push %edx <== NOT EXECUTED 107d04: 52 push %edx <== NOT EXECUTED 107d05: 68 b3 f0 11 00 push $0x11f0b3 <== NOT EXECUTED 107d0a: 68 db 03 12 00 push $0x1203db <== NOT EXECUTED 107d0f: e8 d8 ac 00 00 call 1129ec <== NOT EXECUTED 107d14: a3 00 5e 12 00 mov %eax,0x125e00 <== NOT EXECUTED 107d19: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107d1c: c9 leave <== NOT EXECUTED 107d1d: c3 ret <== NOT EXECUTED =============================================================================== 00107e87 : return NULL; return &pwent; } void setpwent(void) { 107e87: 55 push %ebp <== NOT EXECUTED 107e88: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107e8a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 107e8d: e8 80 fd ff ff call 107c12 <== NOT EXECUTED if (passwd_fp != NULL) 107e92: a1 18 5d 12 00 mov 0x125d18,%eax <== NOT EXECUTED 107e97: 85 c0 test %eax,%eax <== NOT EXECUTED 107e99: 74 0c je 107ea7 <== NOT EXECUTED fclose(passwd_fp); 107e9b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e9e: 50 push %eax <== NOT EXECUTED 107e9f: e8 e4 a4 00 00 call 112388 <== NOT EXECUTED 107ea4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 107ea7: 50 push %eax <== NOT EXECUTED 107ea8: 50 push %eax <== NOT EXECUTED 107ea9: 68 b3 f0 11 00 push $0x11f0b3 <== NOT EXECUTED 107eae: 68 68 03 12 00 push $0x120368 <== NOT EXECUTED 107eb3: e8 34 ab 00 00 call 1129ec <== NOT EXECUTED 107eb8: a3 18 5d 12 00 mov %eax,0x125d18 <== NOT EXECUTED 107ebd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107ec0: c9 leave <== NOT EXECUTED 107ec1: c3 ret <== NOT EXECUTED =============================================================================== 00108f41 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 108f41: 55 push %ebp <== NOT EXECUTED 108f42: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108f44: 56 push %esi <== NOT EXECUTED 108f45: 53 push %ebx <== NOT EXECUTED 108f46: 89 d3 mov %edx,%ebx <== NOT EXECUTED 108f48: 89 c6 mov %eax,%esi <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 108f4a: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) <== NOT EXECUTED 108f51: 74 30 je 108f83 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 108f53: 52 push %edx <== NOT EXECUTED 108f54: 6a 00 push $0x0 <== NOT EXECUTED 108f56: 6a 00 push $0x0 <== NOT EXECUTED 108f58: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 108f5b: e8 84 16 00 00 call 10a5e4 <== NOT EXECUTED i = iproc (c, tty); 108f60: 89 f2 mov %esi,%edx <== NOT EXECUTED 108f62: 0f b6 c2 movzbl %dl,%eax <== NOT EXECUTED 108f65: 89 da mov %ebx,%edx <== NOT EXECUTED 108f67: e8 bc fe ff ff call 108e28 <== NOT EXECUTED 108f6c: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_semaphore_release (tty->osem); 108f6e: 58 pop %eax <== NOT EXECUTED 108f6f: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 108f72: e8 59 17 00 00 call 10a6d0 <== NOT EXECUTED 108f77: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 108f7a: 89 f0 mov %esi,%eax <== NOT EXECUTED 108f7c: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 108f7f: 5b pop %ebx <== NOT EXECUTED 108f80: 5e pop %esi <== NOT EXECUTED 108f81: c9 leave <== NOT EXECUTED 108f82: c3 ret <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 108f83: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108f86: 89 da mov %ebx,%edx <== NOT EXECUTED } return i; } 108f88: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 108f8b: 5b pop %ebx <== NOT EXECUTED 108f8c: 5e pop %esi <== NOT EXECUTED 108f8d: c9 leave <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 108f8e: e9 95 fe ff ff jmp 108e28 <== NOT EXECUTED =============================================================================== 001092a8 : int _STAT_NAME( const char *path, struct stat *buf ) { 1092a8: 55 push %ebp 1092a9: 89 e5 mov %esp,%ebp 1092ab: 57 push %edi 1092ac: 56 push %esi 1092ad: 53 push %ebx 1092ae: 83 ec 2c sub $0x2c,%esp 1092b1: 8b 55 08 mov 0x8(%ebp),%edx 1092b4: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 1092b7: 85 f6 test %esi,%esi 1092b9: 75 0d jne 1092c8 rtems_set_errno_and_return_minus_one( EFAULT ); 1092bb: e8 48 95 00 00 call 112808 <__errno> 1092c0: c7 00 0e 00 00 00 movl $0xe,(%eax) 1092c6: eb 53 jmp 10931b status = rtems_filesystem_evaluate_path( path, strlen( path ), 1092c8: 31 c0 xor %eax,%eax 1092ca: 83 c9 ff or $0xffffffff,%ecx 1092cd: 89 d7 mov %edx,%edi 1092cf: f2 ae repnz scas %es:(%edi),%al 1092d1: f7 d1 not %ecx 1092d3: 49 dec %ecx 1092d4: 83 ec 0c sub $0xc,%esp 1092d7: 6a 01 push $0x1 1092d9: 8d 5d d4 lea -0x2c(%ebp),%ebx 1092dc: 53 push %ebx 1092dd: 6a 00 push $0x0 1092df: 51 push %ecx 1092e0: 52 push %edx 1092e1: e8 9f eb ff ff call 107e85 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 1092e6: 83 c4 20 add $0x20,%esp 1092e9: 83 cf ff or $0xffffffff,%edi 1092ec: 85 c0 test %eax,%eax 1092ee: 75 5c jne 10934c return -1; if ( !loc.handlers->fstat_h ){ 1092f0: 8b 55 dc mov -0x24(%ebp),%edx 1092f3: 83 7a 18 00 cmpl $0x0,0x18(%edx) 1092f7: 75 27 jne 109320 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 1092f9: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1092fc: 85 c0 test %eax,%eax <== NOT EXECUTED 1092fe: 74 10 je 109310 <== NOT EXECUTED 109300: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 109303: 85 c0 test %eax,%eax <== NOT EXECUTED 109305: 74 09 je 109310 <== NOT EXECUTED 109307: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10930a: 53 push %ebx <== NOT EXECUTED 10930b: ff d0 call *%eax <== NOT EXECUTED 10930d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 109310: e8 f3 94 00 00 call 112808 <__errno> <== NOT EXECUTED 109315: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10931b: 83 cf ff or $0xffffffff,%edi 10931e: eb 2c jmp 10934c /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 109320: b9 12 00 00 00 mov $0x12,%ecx 109325: 89 f7 mov %esi,%edi 109327: f3 ab rep stos %eax,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 109329: 50 push %eax 10932a: 50 push %eax 10932b: 56 push %esi 10932c: 53 push %ebx 10932d: ff 52 18 call *0x18(%edx) 109330: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &loc ); 109332: 8b 45 e0 mov -0x20(%ebp),%eax 109335: 83 c4 10 add $0x10,%esp 109338: 85 c0 test %eax,%eax 10933a: 74 10 je 10934c <== NEVER TAKEN 10933c: 8b 40 1c mov 0x1c(%eax),%eax 10933f: 85 c0 test %eax,%eax 109341: 74 09 je 10934c <== NEVER TAKEN 109343: 83 ec 0c sub $0xc,%esp 109346: 53 push %ebx 109347: ff d0 call *%eax 109349: 83 c4 10 add $0x10,%esp return status; } 10934c: 89 f8 mov %edi,%eax 10934e: 8d 65 f4 lea -0xc(%ebp),%esp 109351: 5b pop %ebx 109352: 5e pop %esi 109353: 5f pop %edi 109354: c9 leave 109355: c3 ret =============================================================================== 00109590 : int symlink( const char *actualpath, const char *sympath ) { 109590: 55 push %ebp 109591: 89 e5 mov %esp,%ebp 109593: 56 push %esi 109594: 53 push %ebx 109595: 83 ec 24 sub $0x24,%esp 109598: 8b 75 0c mov 0xc(%ebp),%esi rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 10959b: 8d 5d dc lea -0x24(%ebp),%ebx 10959e: 53 push %ebx 10959f: 8d 45 f4 lea -0xc(%ebp),%eax 1095a2: 50 push %eax 1095a3: 56 push %esi 1095a4: e8 6f ff ff ff call 109518 if ( !loc.ops->evalformake_h ) { 1095a9: 8b 45 e8 mov -0x18(%ebp),%eax 1095ac: 8b 40 04 mov 0x4(%eax),%eax 1095af: 83 c4 10 add $0x10,%esp 1095b2: 85 c0 test %eax,%eax 1095b4: 74 30 je 1095e6 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 1095b6: 51 push %ecx 1095b7: 8d 55 f0 lea -0x10(%ebp),%edx 1095ba: 52 push %edx 1095bb: 53 push %ebx 1095bc: 03 75 f4 add -0xc(%ebp),%esi 1095bf: 56 push %esi 1095c0: ff d0 call *%eax if ( result != 0 ) 1095c2: 83 c4 10 add $0x10,%esp 1095c5: 83 ce ff or $0xffffffff,%esi 1095c8: 85 c0 test %eax,%eax 1095ca: 75 50 jne 10961c return -1; if ( !loc.ops->symlink_h ) { 1095cc: 8b 55 e8 mov -0x18(%ebp),%edx 1095cf: 8b 42 38 mov 0x38(%edx),%eax 1095d2: 85 c0 test %eax,%eax 1095d4: 75 20 jne 1095f6 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 1095d6: 8b 42 1c mov 0x1c(%edx),%eax 1095d9: 85 c0 test %eax,%eax 1095db: 74 09 je 1095e6 <== NOT EXECUTED 1095dd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1095e0: 53 push %ebx <== NOT EXECUTED 1095e1: ff d0 call *%eax <== NOT EXECUTED 1095e3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1095e6: e8 ad 94 00 00 call 112a98 <__errno> <== NOT EXECUTED 1095eb: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1095f1: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 1095f4: eb 26 jmp 10961c <== NOT EXECUTED } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 1095f6: 52 push %edx 1095f7: ff 75 f0 pushl -0x10(%ebp) 1095fa: ff 75 08 pushl 0x8(%ebp) 1095fd: 53 push %ebx 1095fe: ff d0 call *%eax 109600: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 109602: 8b 45 e8 mov -0x18(%ebp),%eax 109605: 83 c4 10 add $0x10,%esp 109608: 85 c0 test %eax,%eax 10960a: 74 10 je 10961c <== NEVER TAKEN 10960c: 8b 40 1c mov 0x1c(%eax),%eax 10960f: 85 c0 test %eax,%eax 109611: 74 09 je 10961c <== NEVER TAKEN 109613: 83 ec 0c sub $0xc,%esp 109616: 53 push %ebx 109617: ff d0 call *%eax 109619: 83 c4 10 add $0x10,%esp return result; } 10961c: 89 f0 mov %esi,%eax 10961e: 8d 65 f8 lea -0x8(%ebp),%esp 109621: 5b pop %ebx 109622: 5e pop %esi 109623: c9 leave 109624: c3 ret =============================================================================== 001093e8 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 1093e8: 55 push %ebp 1093e9: 89 e5 mov %esp,%ebp 1093eb: 53 push %ebx 1093ec: 83 ec 04 sub $0x4,%esp 1093ef: 8b 45 08 mov 0x8(%ebp),%eax /* * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; 1093f2: 8b 88 ec 00 00 00 mov 0xec(%eax),%ecx if ( this_reent ) { 1093f8: 85 c9 test %ecx,%ecx 1093fa: 74 32 je 10942e <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 1093fc: 8b 15 2c 62 12 00 mov 0x12622c,%edx 109402: 8b 9a ec 00 00 00 mov 0xec(%edx),%ebx _Thread_Executing->libc_reent = this_reent; 109408: 89 8a ec 00 00 00 mov %ecx,0xec(%edx) _fwalk (t->libc_reent, sync_wrapper); 10940e: 52 push %edx 10940f: 52 push %edx 109410: 68 5a 94 10 00 push $0x10945a 109415: ff b0 ec 00 00 00 pushl 0xec(%eax) 10941b: e8 fc a2 00 00 call 11371c <_fwalk> _Thread_Executing->libc_reent = current_reent; 109420: a1 2c 62 12 00 mov 0x12622c,%eax 109425: 89 98 ec 00 00 00 mov %ebx,0xec(%eax) 10942b: 83 c4 10 add $0x10,%esp } } 10942e: 8b 5d fc mov -0x4(%ebp),%ebx 109431: c9 leave 109432: c3 ret =============================================================================== 001095b4 : int tcsetattr( int fd, int opt, struct termios *tp ) { 1095b4: 55 push %ebp 1095b5: 89 e5 mov %esp,%ebp 1095b7: 56 push %esi 1095b8: 53 push %ebx 1095b9: 8b 5d 08 mov 0x8(%ebp),%ebx 1095bc: 8b 45 0c mov 0xc(%ebp),%eax 1095bf: 8b 75 10 mov 0x10(%ebp),%esi switch (opt) { 1095c2: 85 c0 test %eax,%eax 1095c4: 74 22 je 1095e8 <== ALWAYS TAKEN 1095c6: 48 dec %eax 1095c7: 74 0d je 1095d6 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 1095c9: e8 e2 96 00 00 call 112cb0 <__errno> <== NOT EXECUTED 1095ce: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1095d4: eb 2a jmp 109600 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 1095d6: 50 push %eax <== NOT EXECUTED 1095d7: 6a 00 push $0x0 <== NOT EXECUTED 1095d9: 6a 03 push $0x3 <== NOT EXECUTED 1095db: 53 push %ebx <== NOT EXECUTED 1095dc: e8 d7 6b 00 00 call 1101b8 <== NOT EXECUTED 1095e1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1095e4: 85 c0 test %eax,%eax <== NOT EXECUTED 1095e6: 78 18 js 109600 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 1095e8: 89 75 10 mov %esi,0x10(%ebp) 1095eb: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) 1095f2: 89 5d 08 mov %ebx,0x8(%ebp) } } 1095f5: 8d 65 f8 lea -0x8(%ebp),%esp 1095f8: 5b pop %ebx 1095f9: 5e pop %esi 1095fa: c9 leave return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 1095fb: e9 b8 6b 00 00 jmp 1101b8 } } 109600: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 109603: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 109606: 5b pop %ebx <== NOT EXECUTED 109607: 5e pop %esi <== NOT EXECUTED 109608: c9 leave <== NOT EXECUTED 109609: c3 ret <== NOT EXECUTED =============================================================================== 00111380 : #include int unlink( const char *path ) { 111380: 55 push %ebp 111381: 89 e5 mov %esp,%ebp 111383: 57 push %edi 111384: 56 push %esi 111385: 53 push %ebx 111386: 83 ec 58 sub $0x58,%esp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 111389: ff 75 08 pushl 0x8(%ebp) 11138c: e8 a3 61 ff ff call 107534 111391: 89 45 b4 mov %eax,-0x4c(%ebp) if ( parentpathlen == 0 ) 111394: 83 c4 10 add $0x10,%esp 111397: 85 c0 test %eax,%eax 111399: 8d 45 d0 lea -0x30(%ebp),%eax 11139c: 75 15 jne 1113b3 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 11139e: 51 push %ecx 11139f: 50 push %eax 1113a0: 8d 45 e4 lea -0x1c(%ebp),%eax 1113a3: 50 push %eax 1113a4: ff 75 08 pushl 0x8(%ebp) 1113a7: e8 e0 6f ff ff call 10838c 1113ac: 31 db xor %ebx,%ebx 1113ae: 83 c4 10 add $0x10,%esp 1113b1: eb 20 jmp 1113d3 else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 1113b3: 83 ec 0c sub $0xc,%esp 1113b6: 6a 00 push $0x0 1113b8: 50 push %eax 1113b9: 6a 02 push $0x2 1113bb: ff 75 b4 pushl -0x4c(%ebp) 1113be: ff 75 08 pushl 0x8(%ebp) 1113c1: e8 6b 62 ff ff call 107631 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 1113c6: 83 c4 20 add $0x20,%esp 1113c9: 85 c0 test %eax,%eax 1113cb: 0f 85 69 01 00 00 jne 11153a <== NEVER TAKEN 1113d1: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 1113d3: 8d 7d bc lea -0x44(%ebp),%edi 1113d6: 8d 75 d0 lea -0x30(%ebp),%esi 1113d9: b9 05 00 00 00 mov $0x5,%ecx 1113de: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = path + parentpathlen; 1113e0: 8b 75 08 mov 0x8(%ebp),%esi 1113e3: 03 75 b4 add -0x4c(%ebp),%esi name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 1113e6: 83 c9 ff or $0xffffffff,%ecx 1113e9: 89 f7 mov %esi,%edi 1113eb: 31 c0 xor %eax,%eax 1113ed: f2 ae repnz scas %es:(%edi),%al 1113ef: f7 d1 not %ecx 1113f1: 49 dec %ecx 1113f2: 52 push %edx 1113f3: 52 push %edx 1113f4: 51 push %ecx 1113f5: 56 push %esi 1113f6: e8 fd 60 ff ff call 1074f8 1113fb: 01 c6 add %eax,%esi result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 1113fd: 83 c9 ff or $0xffffffff,%ecx 111400: 89 f7 mov %esi,%edi 111402: 31 c0 xor %eax,%eax 111404: f2 ae repnz scas %es:(%edi),%al 111406: f7 d1 not %ecx 111408: 49 dec %ecx 111409: c7 04 24 00 00 00 00 movl $0x0,(%esp) 111410: 8d 7d bc lea -0x44(%ebp),%edi 111413: 57 push %edi 111414: 6a 00 push $0x0 111416: 51 push %ecx 111417: 56 push %esi 111418: e8 5a 61 ff ff call 107577 0, &loc, false ); if ( result != 0 ) { 11141d: 83 c4 20 add $0x20,%esp 111420: 85 c0 test %eax,%eax 111422: 74 2f je 111453 if ( free_parentloc ) 111424: 84 db test %bl,%bl 111426: 0f 84 0e 01 00 00 je 11153a <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 11142c: 8b 45 dc mov -0x24(%ebp),%eax 11142f: 85 c0 test %eax,%eax 111431: 0f 84 03 01 00 00 je 11153a <== NEVER TAKEN 111437: 8b 40 1c mov 0x1c(%eax),%eax 11143a: 85 c0 test %eax,%eax 11143c: 0f 84 f8 00 00 00 je 11153a <== NEVER TAKEN 111442: 83 ec 0c sub $0xc,%esp 111445: 8d 55 d0 lea -0x30(%ebp),%edx 111448: 52 push %edx 111449: ff d0 call *%eax 11144b: 83 ce ff or $0xffffffff,%esi 11144e: e9 e2 00 00 00 jmp 111535 return -1; } if ( !loc.ops->node_type_h ) { 111453: 8b 55 c8 mov -0x38(%ebp),%edx 111456: 8b 42 10 mov 0x10(%edx),%eax 111459: 85 c0 test %eax,%eax 11145b: 75 05 jne 111462 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 11145d: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 111460: eb 5b jmp 1114bd <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 111462: 83 ec 0c sub $0xc,%esp 111465: 57 push %edi 111466: ff d0 call *%eax 111468: 83 c4 10 add $0x10,%esp 11146b: 48 dec %eax 11146c: 8b 45 c8 mov -0x38(%ebp),%eax 11146f: 75 42 jne 1114b3 rtems_filesystem_freenode( &loc ); 111471: 85 c0 test %eax,%eax 111473: 74 10 je 111485 <== NEVER TAKEN 111475: 8b 40 1c mov 0x1c(%eax),%eax 111478: 85 c0 test %eax,%eax 11147a: 74 09 je 111485 <== NEVER TAKEN 11147c: 83 ec 0c sub $0xc,%esp 11147f: 57 push %edi 111480: ff d0 call *%eax 111482: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 111485: 84 db test %bl,%bl 111487: 74 1a je 1114a3 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 111489: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 11148c: 85 c0 test %eax,%eax <== NOT EXECUTED 11148e: 74 13 je 1114a3 <== NOT EXECUTED 111490: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 111493: 85 c0 test %eax,%eax <== NOT EXECUTED 111495: 74 0c je 1114a3 <== NOT EXECUTED 111497: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11149a: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 11149d: 52 push %edx <== NOT EXECUTED 11149e: ff d0 call *%eax <== NOT EXECUTED 1114a0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 1114a3: e8 b4 04 00 00 call 11195c <__errno> 1114a8: c7 00 15 00 00 00 movl $0x15,(%eax) 1114ae: e9 87 00 00 00 jmp 11153a } if ( !loc.ops->unlink_h ) { 1114b3: 8b 50 0c mov 0xc(%eax),%edx 1114b6: 85 d2 test %edx,%edx 1114b8: 75 3b jne 1114f5 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 1114ba: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1114bd: 85 c0 test %eax,%eax <== NOT EXECUTED 1114bf: 74 09 je 1114ca <== NOT EXECUTED 1114c1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1114c4: 57 push %edi <== NOT EXECUTED 1114c5: ff d0 call *%eax <== NOT EXECUTED 1114c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 1114ca: 84 db test %bl,%bl <== NOT EXECUTED 1114cc: 74 1a je 1114e8 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 1114ce: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 1114d1: 85 c0 test %eax,%eax <== NOT EXECUTED 1114d3: 74 13 je 1114e8 <== NOT EXECUTED 1114d5: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1114d8: 85 c0 test %eax,%eax <== NOT EXECUTED 1114da: 74 0c je 1114e8 <== NOT EXECUTED 1114dc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1114df: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 1114e2: 52 push %edx <== NOT EXECUTED 1114e3: ff d0 call *%eax <== NOT EXECUTED 1114e5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1114e8: e8 6f 04 00 00 call 11195c <__errno> <== NOT EXECUTED 1114ed: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1114f3: eb 45 jmp 11153a <== NOT EXECUTED } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 1114f5: 50 push %eax 1114f6: 50 push %eax 1114f7: 57 push %edi 1114f8: 8d 45 d0 lea -0x30(%ebp),%eax 1114fb: 50 push %eax 1114fc: ff d2 call *%edx 1114fe: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 111500: 8b 45 c8 mov -0x38(%ebp),%eax 111503: 83 c4 10 add $0x10,%esp 111506: 85 c0 test %eax,%eax 111508: 74 10 je 11151a <== NEVER TAKEN 11150a: 8b 40 1c mov 0x1c(%eax),%eax 11150d: 85 c0 test %eax,%eax 11150f: 74 09 je 11151a <== NEVER TAKEN 111511: 83 ec 0c sub $0xc,%esp 111514: 57 push %edi 111515: ff d0 call *%eax 111517: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 11151a: 84 db test %bl,%bl 11151c: 74 1f je 11153d <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 11151e: 8b 45 dc mov -0x24(%ebp),%eax 111521: 85 c0 test %eax,%eax 111523: 74 18 je 11153d <== NEVER TAKEN 111525: 8b 40 1c mov 0x1c(%eax),%eax 111528: 85 c0 test %eax,%eax 11152a: 74 11 je 11153d <== NEVER TAKEN 11152c: 83 ec 0c sub $0xc,%esp 11152f: 8d 55 d0 lea -0x30(%ebp),%edx 111532: 52 push %edx 111533: ff d0 call *%eax 111535: 83 c4 10 add $0x10,%esp 111538: eb 03 jmp 11153d 11153a: 83 ce ff or $0xffffffff,%esi return result; } 11153d: 89 f0 mov %esi,%eax 11153f: 8d 65 f4 lea -0xc(%ebp),%esp 111542: 5b pop %ebx 111543: 5e pop %esi 111544: 5f pop %edi 111545: c9 leave 111546: c3 ret =============================================================================== 0010ce65 : */ int unmount( const char *path ) { 10ce65: 55 push %ebp 10ce66: 89 e5 mov %esp,%ebp 10ce68: 57 push %edi 10ce69: 56 push %esi 10ce6a: 53 push %ebx 10ce6b: 83 ec 38 sub $0x38,%esp 10ce6e: 8b 55 08 mov 0x8(%ebp),%edx * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 10ce71: 31 c0 xor %eax,%eax 10ce73: 83 c9 ff or $0xffffffff,%ecx 10ce76: 89 d7 mov %edx,%edi 10ce78: f2 ae repnz scas %es:(%edi),%al 10ce7a: f7 d1 not %ecx 10ce7c: 49 dec %ecx 10ce7d: 6a 01 push $0x1 10ce7f: 8d 75 d4 lea -0x2c(%ebp),%esi 10ce82: 56 push %esi 10ce83: 6a 00 push $0x0 10ce85: 51 push %ecx 10ce86: 52 push %edx 10ce87: e8 5d cb ff ff call 1099e9 10ce8c: 83 c4 20 add $0x20,%esp 10ce8f: 85 c0 test %eax,%eax 10ce91: 0f 85 35 01 00 00 jne 10cfcc <== NEVER TAKEN return -1; mt_entry = loc.mt_entry; 10ce97: 8b 5d e4 mov -0x1c(%ebp),%ebx fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 10ce9a: 8b 43 1c mov 0x1c(%ebx),%eax 10ce9d: 3b 45 d4 cmp -0x2c(%ebp),%eax 10cea0: 8b 45 e0 mov -0x20(%ebp),%eax 10cea3: 74 24 je 10cec9 /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ rtems_filesystem_freenode( &loc ); 10cea5: 85 c0 test %eax,%eax 10cea7: 74 10 je 10ceb9 <== NEVER TAKEN 10cea9: 8b 40 1c mov 0x1c(%eax),%eax 10ceac: 85 c0 test %eax,%eax 10ceae: 74 09 je 10ceb9 <== NEVER TAKEN 10ceb0: 83 ec 0c sub $0xc,%esp 10ceb3: 56 push %esi 10ceb4: ff d0 call *%eax 10ceb6: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EACCES ); 10ceb9: e8 ba 78 00 00 call 114778 <__errno> 10cebe: c7 00 0d 00 00 00 movl $0xd,(%eax) 10cec4: e9 03 01 00 00 jmp 10cfcc /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 10cec9: 85 c0 test %eax,%eax 10cecb: 74 10 je 10cedd <== NEVER TAKEN 10cecd: 8b 40 1c mov 0x1c(%eax),%eax 10ced0: 85 c0 test %eax,%eax 10ced2: 74 09 je 10cedd <== NEVER TAKEN 10ced4: 83 ec 0c sub $0xc,%esp 10ced7: 56 push %esi 10ced8: ff d0 call *%eax 10ceda: 83 c4 10 add $0x10,%esp if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; 10cedd: 8b 43 14 mov 0x14(%ebx),%eax 10cee0: 83 78 28 00 cmpl $0x0,0x28(%eax) 10cee4: 74 09 je 10ceef <== NEVER TAKEN fs_root_loc = &mt_entry->mt_fs_root; 10cee6: 8b 43 28 mov 0x28(%ebx),%eax 10cee9: 83 78 2c 00 cmpl $0x0,0x2c(%eax) 10ceed: 75 10 jne 10ceff <== ALWAYS TAKEN if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ceef: e8 84 78 00 00 call 114778 <__errno> <== NOT EXECUTED 10cef4: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10cefa: e9 cd 00 00 00 jmp 10cfcc <== NOT EXECUTED * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 10ceff: a1 a0 8f 12 00 mov 0x128fa0,%eax 10cf04: 39 58 14 cmp %ebx,0x14(%eax) 10cf07: 74 25 je 10cf2e <== NEVER TAKEN /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 10cf09: 51 push %ecx 10cf0a: 51 push %ecx 10cf0b: ff 73 2c pushl 0x2c(%ebx) 10cf0e: 68 54 ce 10 00 push $0x10ce54 10cf13: e8 c9 d4 ff ff call 10a3e1 10cf18: 83 c4 10 add $0x10,%esp 10cf1b: 84 c0 test %al,%al 10cf1d: 75 0f jne 10cf2e * Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) 10cf1f: 83 ec 0c sub $0xc,%esp 10cf22: 53 push %ebx 10cf23: e8 3e cd ff ff call 109c66 10cf28: 83 c4 10 add $0x10,%esp 10cf2b: 48 dec %eax 10cf2c: 75 10 jne 10cf3e rtems_set_errno_and_return_minus_one( EBUSY ); 10cf2e: e8 45 78 00 00 call 114778 <__errno> 10cf33: c7 00 10 00 00 00 movl $0x10,(%eax) 10cf39: e9 8e 00 00 00 jmp 10cfcc * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) 10cf3e: 83 ec 0c sub $0xc,%esp 10cf41: 8b 43 14 mov 0x14(%ebx),%eax 10cf44: 53 push %ebx 10cf45: ff 50 28 call *0x28(%eax) 10cf48: 83 c4 10 add $0x10,%esp 10cf4b: 85 c0 test %eax,%eax 10cf4d: 75 7d jne 10cfcc <== NEVER TAKEN * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 10cf4f: 83 ec 0c sub $0xc,%esp 10cf52: 8b 43 28 mov 0x28(%ebx),%eax 10cf55: 53 push %ebx 10cf56: ff 50 2c call *0x2c(%eax) 10cf59: 83 c4 10 add $0x10,%esp 10cf5c: 85 c0 test %eax,%eax 10cf5e: 74 1b je 10cf7b <== ALWAYS TAKEN if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 10cf60: 83 ec 0c sub $0xc,%esp 10cf63: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10cf66: 53 push %ebx <== NOT EXECUTED 10cf67: ff 50 20 call *0x20(%eax) <== NOT EXECUTED 10cf6a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cf6d: 85 c0 test %eax,%eax <== NOT EXECUTED 10cf6f: 74 5b je 10cfcc <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 10cf71: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cf74: 6a 00 push $0x0 <== NOT EXECUTED 10cf76: e8 69 10 00 00 call 10dfe4 <== NOT EXECUTED rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10cf7b: 52 push %edx 10cf7c: 6a 00 push $0x0 10cf7e: 6a 00 push $0x0 10cf80: ff 35 40 b9 12 00 pushl 0x12b940 10cf86: e8 e5 0a 00 00 call 10da70 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10cf8b: 89 1c 24 mov %ebx,(%esp) 10cf8e: e8 d1 12 00 00 call 10e264 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10cf93: 58 pop %eax 10cf94: ff 35 40 b9 12 00 pushl 0x12b940 10cf9a: e8 bd 0b 00 00 call 10db5c /* * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); 10cf9f: 8b 43 14 mov 0x14(%ebx),%eax 10cfa2: 83 c4 10 add $0x10,%esp 10cfa5: 85 c0 test %eax,%eax 10cfa7: 74 13 je 10cfbc <== NEVER TAKEN 10cfa9: 8b 40 1c mov 0x1c(%eax),%eax 10cfac: 85 c0 test %eax,%eax 10cfae: 74 0c je 10cfbc <== NEVER TAKEN 10cfb0: 83 ec 0c sub $0xc,%esp 10cfb3: 8d 53 08 lea 0x8(%ebx),%edx 10cfb6: 52 push %edx 10cfb7: ff d0 call *%eax 10cfb9: 83 c4 10 add $0x10,%esp free( mt_entry ); 10cfbc: 83 ec 0c sub $0xc,%esp 10cfbf: 53 push %ebx 10cfc0: e8 8f ca ff ff call 109a54 10cfc5: 31 c0 xor %eax,%eax return 0; 10cfc7: 83 c4 10 add $0x10,%esp 10cfca: eb 03 jmp 10cfcf 10cfcc: 83 c8 ff or $0xffffffff,%eax } 10cfcf: 8d 65 f4 lea -0xc(%ebp),%esp 10cfd2: 5b pop %ebx 10cfd3: 5e pop %esi 10cfd4: 5f pop %edi 10cfd5: c9 leave 10cfd6: c3 ret =============================================================================== 0010adb4 : int utime( const char *path, const struct utimbuf *times ) { 10adb4: 55 push %ebp 10adb5: 89 e5 mov %esp,%ebp 10adb7: 57 push %edi 10adb8: 56 push %esi 10adb9: 53 push %ebx 10adba: 83 ec 38 sub $0x38,%esp 10adbd: 8b 55 08 mov 0x8(%ebp),%edx 10adc0: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 10adc3: 31 c0 xor %eax,%eax 10adc5: 83 c9 ff or $0xffffffff,%ecx 10adc8: 89 d7 mov %edx,%edi 10adca: f2 ae repnz scas %es:(%edi),%al 10adcc: f7 d1 not %ecx 10adce: 49 dec %ecx 10adcf: 6a 01 push $0x1 10add1: 8d 75 d4 lea -0x2c(%ebp),%esi 10add4: 56 push %esi 10add5: 6a 00 push $0x0 10add7: 51 push %ecx 10add8: 52 push %edx 10add9: e8 a7 d0 ff ff call 107e85 10adde: 83 c4 20 add $0x20,%esp 10ade1: 83 cf ff or $0xffffffff,%edi 10ade4: 85 c0 test %eax,%eax 10ade6: 75 4f jne 10ae37 return -1; if ( !temp_loc.ops->utime_h ){ 10ade8: 8b 55 e0 mov -0x20(%ebp),%edx 10adeb: 8b 42 30 mov 0x30(%edx),%eax 10adee: 85 c0 test %eax,%eax 10adf0: 75 20 jne 10ae12 <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); 10adf2: 8b 42 1c mov 0x1c(%edx),%eax 10adf5: 85 c0 test %eax,%eax <== NOT EXECUTED 10adf7: 74 09 je 10ae02 <== NOT EXECUTED 10adf9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10adfc: 56 push %esi <== NOT EXECUTED 10adfd: ff d0 call *%eax <== NOT EXECUTED 10adff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ae02: e8 01 7a 00 00 call 112808 <__errno> <== NOT EXECUTED 10ae07: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10ae0d: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 10ae10: eb 25 jmp 10ae37 <== NOT EXECUTED } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 10ae12: 52 push %edx 10ae13: ff 73 04 pushl 0x4(%ebx) 10ae16: ff 33 pushl (%ebx) 10ae18: 56 push %esi 10ae19: ff d0 call *%eax 10ae1b: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &temp_loc ); 10ae1d: 8b 45 e0 mov -0x20(%ebp),%eax 10ae20: 83 c4 10 add $0x10,%esp 10ae23: 85 c0 test %eax,%eax 10ae25: 74 10 je 10ae37 <== NEVER TAKEN 10ae27: 8b 40 1c mov 0x1c(%eax),%eax 10ae2a: 85 c0 test %eax,%eax 10ae2c: 74 09 je 10ae37 <== NEVER TAKEN 10ae2e: 83 ec 0c sub $0xc,%esp 10ae31: 56 push %esi 10ae32: ff d0 call *%eax 10ae34: 83 c4 10 add $0x10,%esp return result; } 10ae37: 89 f8 mov %edi,%eax 10ae39: 8d 65 f4 lea -0xc(%ebp),%esp 10ae3c: 5b pop %ebx 10ae3d: 5e pop %esi 10ae3e: 5f pop %edi 10ae3f: c9 leave 10ae40: c3 ret =============================================================================== 00109d20 : */ void vprintk( const char *fmt, va_list ap ) { 109d20: 55 push %ebp 109d21: 89 e5 mov %esp,%ebp 109d23: 57 push %edi 109d24: 56 push %esi 109d25: 53 push %ebx 109d26: 83 ec 4c sub $0x4c,%esp 109d29: 8b 5d 08 mov 0x8(%ebp),%ebx 109d2c: 8b 75 0c mov 0xc(%ebp),%esi for (; *fmt != '\0'; fmt++) { 109d2f: e9 58 02 00 00 jmp 109f8c bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 109d34: 3c 25 cmp $0x25,%al 109d36: 74 0c je 109d44 BSP_output_char(*fmt); 109d38: 83 ec 0c sub $0xc,%esp 109d3b: 0f be c0 movsbl %al,%eax 109d3e: 50 push %eax 109d3f: e9 52 01 00 00 jmp 109e96 continue; } fmt++; 109d44: 43 inc %ebx if (*fmt == '0' ) { 109d45: c6 45 c4 20 movb $0x20,-0x3c(%ebp) 109d49: 80 3b 30 cmpb $0x30,(%ebx) 109d4c: 75 05 jne 109d53 lead = '0'; fmt++; 109d4e: 43 inc %ebx 109d4f: c6 45 c4 30 movb $0x30,-0x3c(%ebp) } if (*fmt == '-' ) { 109d53: 31 c9 xor %ecx,%ecx 109d55: 80 3b 2d cmpb $0x2d,(%ebx) 109d58: 75 03 jne 109d5d minus = true; fmt++; 109d5a: 43 inc %ebx 109d5b: b1 01 mov $0x1,%cl 109d5d: 31 ff xor %edi,%edi 109d5f: eb 0b jmp 109d6c } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 109d61: 6b ff 0a imul $0xa,%edi,%edi width += ((unsigned) *fmt - '0'); 109d64: 0f be d2 movsbl %dl,%edx 109d67: 8d 7c 17 d0 lea -0x30(%edi,%edx,1),%edi fmt++; 109d6b: 43 inc %ebx } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 109d6c: 8a 13 mov (%ebx),%dl 109d6e: 8d 42 d0 lea -0x30(%edx),%eax 109d71: 3c 09 cmp $0x9,%al 109d73: 76 ec jbe 109d61 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 109d75: c6 45 c0 00 movb $0x0,-0x40(%ebp) 109d79: 80 fa 6c cmp $0x6c,%dl 109d7c: 75 07 jne 109d85 lflag = true; c = *++fmt; 109d7e: 43 inc %ebx 109d7f: 8a 13 mov (%ebx),%dl 109d81: c6 45 c0 01 movb $0x1,-0x40(%ebp) } if ( c == 'c' ) { 109d85: 80 fa 63 cmp $0x63,%dl 109d88: 75 17 jne 109da1 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 109d8a: 8d 7e 04 lea 0x4(%esi),%edi BSP_output_char(chr); 109d8d: 83 ec 0c sub $0xc,%esp 109d90: 0f be 06 movsbl (%esi),%eax 109d93: 50 push %eax 109d94: ff 15 3c 17 12 00 call *0x12173c 109d9a: 89 fe mov %edi,%esi 109d9c: e9 fb 00 00 00 jmp 109e9c continue; } if ( c == 's' ) { 109da1: 80 fa 73 cmp $0x73,%dl 109da4: 0f 85 99 00 00 00 jne 109e43 unsigned i, len; char *s, *str; str = va_arg(ap, char *); 109daa: 8d 46 04 lea 0x4(%esi),%eax 109dad: 89 45 c4 mov %eax,-0x3c(%ebp) 109db0: 8b 06 mov (%esi),%eax if ( str == NULL ) { 109db2: 85 c0 test %eax,%eax 109db4: 75 05 jne 109dbb 109db6: b8 f5 ef 11 00 mov $0x11eff5,%eax 109dbb: 31 f6 xor %esi,%esi str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 109dbd: eb 01 jmp 109dc0 109dbf: 46 inc %esi 109dc0: 80 3c 30 00 cmpb $0x0,(%eax,%esi,1) 109dc4: 75 f9 jne 109dbf ; /* leading spaces */ if ( !minus ) 109dc6: 89 f2 mov %esi,%edx 109dc8: 84 c9 test %cl,%cl 109dca: 74 23 je 109def 109dcc: eb 25 jmp 109df3 for ( i=len ; i BSP_output_char(' '); /* no width option */ if (width == 0) { 109df3: 85 ff test %edi,%edi 109df5: 75 02 jne 109df9 109df7: 89 f7 mov %esi,%edi width = len; } /* output the string */ for ( i=0 ; i 109dfd: eb 1d jmp 109e1c BSP_output_char(*str); 109dff: 83 ec 0c sub $0xc,%esp 109e02: 0f be d2 movsbl %dl,%edx 109e05: 52 push %edx 109e06: 89 45 b0 mov %eax,-0x50(%ebp) 109e09: 88 4d ac mov %cl,-0x54(%ebp) 109e0c: ff 15 3c 17 12 00 call *0x12173c if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 109e22: 84 c9 test %cl,%cl 109e24: 75 14 jne 109e3a 109e26: e9 5d 01 00 00 jmp 109f88 for ( i=len ; i 109e3e: e9 45 01 00 00 jmp 109f88 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 109e43: 80 fa 4f cmp $0x4f,%dl 109e46: 74 5c je 109ea4 109e48: 80 fa 6f cmp $0x6f,%dl 109e4b: 74 57 je 109ea4 <== NEVER TAKEN base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 109e4d: 80 fa 49 cmp $0x49,%dl 109e50: 74 5b je 109ead 109e52: 80 fa 69 cmp $0x69,%dl 109e55: 74 56 je 109ead 109e57: 80 fa 44 cmp $0x44,%dl 109e5a: 74 51 je 109ead 109e5c: 80 fa 64 cmp $0x64,%dl 109e5f: 74 4c je 109ead c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 109e61: 80 fa 55 cmp $0x55,%dl 109e64: 74 05 je 109e6b 109e66: 80 fa 75 cmp $0x75,%dl 109e69: 75 04 jne 109e6f 109e6b: 31 d2 xor %edx,%edx 109e6d: eb 40 jmp 109eaf base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 109e6f: 80 fa 58 cmp $0x58,%dl 109e72: 74 05 je 109e79 109e74: 80 fa 78 cmp $0x78,%dl 109e77: 75 04 jne 109e7d 109e79: 31 d2 xor %edx,%edx 109e7b: eb 0b jmp 109e88 base = 16; sign = false; } else if ( c == 'p' ) { 109e7d: 80 fa 70 cmp $0x70,%dl 109e80: 75 0d jne 109e8f 109e82: 31 d2 xor %edx,%edx 109e84: c6 45 c0 01 movb $0x1,-0x40(%ebp) 109e88: b9 10 00 00 00 mov $0x10,%ecx 109e8d: eb 25 jmp 109eb4 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 109e8f: 83 ec 0c sub $0xc,%esp 109e92: 0f be d2 movsbl %dl,%edx 109e95: 52 push %edx 109e96: ff 15 3c 17 12 00 call *0x12173c continue; 109e9c: 83 c4 10 add $0x10,%esp 109e9f: e9 e7 00 00 00 jmp 109f8b 109ea4: 31 d2 xor %edx,%edx 109ea6: b9 08 00 00 00 mov $0x8,%ecx 109eab: eb 07 jmp 109eb4 109ead: b2 01 mov $0x1,%dl 109eaf: b9 0a 00 00 00 mov $0xa,%ecx } printNum( 109eb4: 0f be 45 c4 movsbl -0x3c(%ebp),%eax 109eb8: 89 45 b4 mov %eax,-0x4c(%ebp) 109ebb: 8d 46 04 lea 0x4(%esi),%eax 109ebe: 89 45 c4 mov %eax,-0x3c(%ebp) 109ec1: 8b 06 mov (%esi),%eax 109ec3: 8b 75 c4 mov -0x3c(%ebp),%esi unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 109ec6: 84 d2 test %dl,%dl 109ec8: 74 2b je 109ef5 109eca: 85 c0 test %eax,%eax 109ecc: 79 27 jns 109ef5 BSP_output_char('-'); 109ece: 83 ec 0c sub $0xc,%esp 109ed1: 6a 2d push $0x2d 109ed3: 89 45 b0 mov %eax,-0x50(%ebp) 109ed6: 89 4d ac mov %ecx,-0x54(%ebp) 109ed9: ff 15 3c 17 12 00 call *0x12173c unsigned_num = (unsigned long) -num; 109edf: 8b 45 b0 mov -0x50(%ebp),%eax 109ee2: f7 d8 neg %eax 109ee4: 89 45 c4 mov %eax,-0x3c(%ebp) if (maxwidth) maxwidth--; 109ee7: 83 c4 10 add $0x10,%esp 109eea: 83 ff 01 cmp $0x1,%edi 109eed: 83 d7 ff adc $0xffffffff,%edi 109ef0: 8b 4d ac mov -0x54(%ebp),%ecx 109ef3: eb 03 jmp 109ef8 } else { unsigned_num = (unsigned long) num; 109ef5: 89 45 c4 mov %eax,-0x3c(%ebp) 109ef8: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) 109eff: eb 1f jmp 109f20 } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); 109f01: 8a 45 bc mov -0x44(%ebp),%al 109f04: f6 e1 mul %cl 109f06: 8a 55 c4 mov -0x3c(%ebp),%dl 109f09: 28 c2 sub %al,%dl 109f0b: 88 d0 mov %dl,%al 109f0d: 8b 55 c0 mov -0x40(%ebp),%edx 109f10: 88 44 15 d4 mov %al,-0x2c(%ebp,%edx,1) 109f14: 8b 45 b8 mov -0x48(%ebp),%eax 109f17: 89 45 c0 mov %eax,-0x40(%ebp) 109f1a: 8b 55 bc mov -0x44(%ebp),%edx 109f1d: 89 55 c4 mov %edx,-0x3c(%ebp) } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 109f20: 8b 45 c4 mov -0x3c(%ebp),%eax 109f23: 31 d2 xor %edx,%edx 109f25: f7 f1 div %ecx 109f27: 89 45 bc mov %eax,-0x44(%ebp) 109f2a: 85 c0 test %eax,%eax 109f2c: 8b 55 c0 mov -0x40(%ebp),%edx 109f2f: 8d 52 01 lea 0x1(%edx),%edx 109f32: 89 55 b8 mov %edx,-0x48(%ebp) 109f35: 75 ca jne 109f01 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 109f37: 8a 45 c4 mov -0x3c(%ebp),%al 109f3a: 8b 55 c0 mov -0x40(%ebp),%edx 109f3d: 88 44 15 d4 mov %al,-0x2c(%ebp,%edx,1) 109f41: eb 10 jmp 109f53 for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 109f43: 83 ec 0c sub $0xc,%esp 109f46: ff 75 b4 pushl -0x4c(%ebp) 109f49: ff 15 3c 17 12 00 call *0x12173c toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 109f4f: 4f dec %edi 109f50: 83 c4 10 add $0x10,%esp 109f53: 3b 7d b8 cmp -0x48(%ebp),%edi 109f56: 77 eb ja 109f43 109f58: 8d 45 d4 lea -0x2c(%ebp),%eax 109f5b: 03 45 c0 add -0x40(%ebp),%eax 109f5e: 31 ff xor %edi,%edi 109f60: eb 1f jmp 109f81 BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 109f62: 83 ec 0c sub $0xc,%esp 109f65: 0f be 10 movsbl (%eax),%edx 109f68: 0f be 92 f6 ef 11 00 movsbl 0x11eff6(%edx),%edx 109f6f: 52 push %edx 109f70: 89 45 b0 mov %eax,-0x50(%ebp) 109f73: ff 15 3c 17 12 00 call *0x12173c toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 109f79: 47 inc %edi 109f7a: 8b 45 b0 mov -0x50(%ebp),%eax 109f7d: 48 dec %eax 109f7e: 83 c4 10 add $0x10,%esp 109f81: 3b 7d b8 cmp -0x48(%ebp),%edi 109f84: 72 dc jb 109f62 109f86: eb 03 jmp 109f8b 109f88: 8b 75 c4 mov -0x3c(%ebp),%esi void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 109f8b: 43 inc %ebx 109f8c: 8a 03 mov (%ebx),%al 109f8e: 84 c0 test %al,%al 109f90: 0f 85 9e fd ff ff jne 109d34 sign, width, lead ); } } 109f96: 8d 65 f4 lea -0xc(%ebp),%esp 109f99: 5b pop %ebx 109f9a: 5e pop %esi 109f9b: 5f pop %edi 109f9c: c9 leave 109f9d: c3 ret =============================================================================== 0011d338 : ssize_t write( int fd, const void *buffer, size_t count ) { 11d338: 55 push %ebp 11d339: 89 e5 mov %esp,%ebp 11d33b: 56 push %esi 11d33c: 53 push %ebx 11d33d: 8b 5d 08 mov 0x8(%ebp),%ebx 11d340: 8b 55 0c mov 0xc(%ebp),%edx 11d343: 8b 4d 10 mov 0x10(%ebp),%ecx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11d346: 3b 1d 24 16 12 00 cmp 0x121624,%ebx 11d34c: 73 14 jae 11d362 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11d34e: c1 e3 06 shl $0x6,%ebx 11d351: 03 1d 00 55 12 00 add 0x125500,%ebx rtems_libio_check_is_open( iop ); 11d357: 8b 73 14 mov 0x14(%ebx),%esi 11d35a: f7 c6 00 01 00 00 test $0x100,%esi 11d360: 75 0d jne 11d36f <== ALWAYS TAKEN 11d362: e8 f5 45 ff ff call 11195c <__errno> <== NOT EXECUTED 11d367: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11d36d: eb 31 jmp 11d3a0 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 11d36f: 85 d2 test %edx,%edx 11d371: 74 0b je 11d37e <== NEVER TAKEN rtems_libio_check_count( count ); 11d373: 31 c0 xor %eax,%eax 11d375: 85 c9 test %ecx,%ecx 11d377: 74 44 je 11d3bd rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 11d379: 83 e6 04 and $0x4,%esi 11d37c: 75 0d jne 11d38b <== ALWAYS TAKEN 11d37e: e8 d9 45 ff ff call 11195c <__errno> <== NOT EXECUTED 11d383: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11d389: eb 15 jmp 11d3a0 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 11d38b: 8b 43 3c mov 0x3c(%ebx),%eax 11d38e: 8b 40 0c mov 0xc(%eax),%eax 11d391: 85 c0 test %eax,%eax 11d393: 75 10 jne 11d3a5 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11d395: e8 c2 45 ff ff call 11195c <__errno> <== NOT EXECUTED 11d39a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11d3a0: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 11d3a3: eb 18 jmp 11d3bd <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 11d3a5: 56 push %esi 11d3a6: 51 push %ecx 11d3a7: 52 push %edx 11d3a8: 53 push %ebx 11d3a9: ff d0 call *%eax if ( rc > 0 ) 11d3ab: 83 c4 10 add $0x10,%esp 11d3ae: 85 c0 test %eax,%eax 11d3b0: 7e 0b jle 11d3bd <== NEVER TAKEN iop->offset += rc; 11d3b2: 89 c1 mov %eax,%ecx 11d3b4: c1 f9 1f sar $0x1f,%ecx 11d3b7: 01 43 0c add %eax,0xc(%ebx) 11d3ba: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11d3bd: 8d 65 f8 lea -0x8(%ebp),%esp 11d3c0: 5b pop %ebx 11d3c1: 5e pop %esi 11d3c2: c9 leave 11d3c3: c3 ret =============================================================================== 0010ac58 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 10ac58: 55 push %ebp 10ac59: 89 e5 mov %esp,%ebp 10ac5b: 57 push %edi 10ac5c: 56 push %esi 10ac5d: 53 push %ebx 10ac5e: 83 ec 1c sub $0x1c,%esp 10ac61: 8b 75 08 mov 0x8(%ebp),%esi 10ac64: 8b 7d 0c mov 0xc(%ebp),%edi int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 10ac67: 3b 35 44 31 12 00 cmp 0x123144,%esi 10ac6d: 73 11 jae 10ac80 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 10ac6f: c1 e6 06 shl $0x6,%esi 10ac72: 03 35 f0 77 12 00 add 0x1277f0,%esi rtems_libio_check_is_open( iop ); 10ac78: 8b 46 14 mov 0x14(%esi),%eax 10ac7b: f6 c4 01 test $0x1,%ah 10ac7e: 75 10 jne 10ac90 10ac80: e8 8b 78 00 00 call 112510 <__errno> 10ac85: c7 00 09 00 00 00 movl $0x9,(%eax) 10ac8b: e9 a4 00 00 00 jmp 10ad34 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10ac90: a8 04 test $0x4,%al 10ac92: 74 57 je 10aceb <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 10ac94: 85 ff test %edi,%edi 10ac96: 74 53 je 10aceb rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 10ac98: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10ac9c: 7e 4d jle 10aceb rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 10ac9e: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 10aca5: 7f 44 jg 10aceb <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 10aca7: 8b 46 3c mov 0x3c(%esi),%eax 10acaa: 83 78 0c 00 cmpl $0x0,0xc(%eax) 10acae: 75 0d jne 10acbd <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10acb0: e8 5b 78 00 00 call 112510 <__errno> <== NOT EXECUTED 10acb5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10acbb: eb 77 jmp 10ad34 <== NOT EXECUTED 10acbd: 31 c0 xor %eax,%eax 10acbf: 31 c9 xor %ecx,%ecx 10acc1: b2 01 mov $0x1,%dl 10acc3: 89 75 e4 mov %esi,-0x1c(%ebp) * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) 10acc6: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8) 10acca: 74 1f je 10aceb rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 10accc: 83 7c c7 04 00 cmpl $0x0,0x4(%edi,%eax,8) 10acd1: 0f 94 c3 sete %bl 10acd4: f7 db neg %ebx 10acd6: 21 da and %ebx,%edx all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 10acd8: 8b 74 c7 04 mov 0x4(%edi,%eax,8),%esi 10acdc: 8d 1c 31 lea (%ecx,%esi,1),%ebx if ( total < old || total > SSIZE_MAX ) 10acdf: 81 fb ff 7f 00 00 cmp $0x7fff,%ebx 10ace5: 7f 04 jg 10aceb <== NEVER TAKEN 10ace7: 39 cb cmp %ecx,%ebx 10ace9: 7d 0d jge 10acf8 rtems_set_errno_and_return_minus_one( EINVAL ); 10aceb: e8 20 78 00 00 call 112510 <__errno> 10acf0: c7 00 16 00 00 00 movl $0x16,(%eax) 10acf6: eb 3c jmp 10ad34 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 10acf8: 40 inc %eax 10acf9: 3b 45 10 cmp 0x10(%ebp),%eax 10acfc: 7d 04 jge 10ad02 10acfe: 89 d9 mov %ebx,%ecx 10ad00: eb c4 jmp 10acc6 10ad02: 8b 75 e4 mov -0x1c(%ebp),%esi } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 10ad05: 31 db xor %ebx,%ebx 10ad07: 84 d2 test %dl,%dl 10ad09: 75 51 jne 10ad5c <== NEVER TAKEN 10ad0b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 10ad12: 8b 55 e4 mov -0x1c(%ebp),%edx 10ad15: 8b 44 d7 04 mov 0x4(%edi,%edx,8),%eax 10ad19: 85 c0 test %eax,%eax 10ad1b: 74 34 je 10ad51 <== NEVER TAKEN continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 10ad1d: 52 push %edx 10ad1e: 8b 56 3c mov 0x3c(%esi),%edx 10ad21: 50 push %eax 10ad22: 8b 45 e4 mov -0x1c(%ebp),%eax 10ad25: ff 34 c7 pushl (%edi,%eax,8) 10ad28: 56 push %esi 10ad29: ff 52 0c call *0xc(%edx) if ( bytes < 0 ) 10ad2c: 83 c4 10 add $0x10,%esp 10ad2f: 83 f8 00 cmp $0x0,%eax 10ad32: 7d 05 jge 10ad39 <== ALWAYS TAKEN 10ad34: 83 cb ff or $0xffffffff,%ebx 10ad37: eb 23 jmp 10ad5c return -1; if ( bytes > 0 ) { 10ad39: 74 0d je 10ad48 <== NEVER TAKEN iop->offset += bytes; 10ad3b: 89 c1 mov %eax,%ecx 10ad3d: c1 f9 1f sar $0x1f,%ecx 10ad40: 01 46 0c add %eax,0xc(%esi) 10ad43: 11 4e 10 adc %ecx,0x10(%esi) total += bytes; 10ad46: 01 c3 add %eax,%ebx } if (bytes != iov[ v ].iov_len) 10ad48: 8b 55 e4 mov -0x1c(%ebp),%edx 10ad4b: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax 10ad4f: 75 0b jne 10ad5c <== NEVER TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 10ad51: ff 45 e4 incl -0x1c(%ebp) 10ad54: 8b 45 10 mov 0x10(%ebp),%eax 10ad57: 39 45 e4 cmp %eax,-0x1c(%ebp) 10ad5a: 7c b6 jl 10ad12 if (bytes != iov[ v ].iov_len) break; } return total; } 10ad5c: 89 d8 mov %ebx,%eax 10ad5e: 8d 65 f4 lea -0xc(%ebp),%esp 10ad61: 5b pop %ebx 10ad62: 5e pop %esi 10ad63: 5f pop %edi 10ad64: c9 leave 10ad65: c3 ret