=============================================================================== 0010cfd0 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10cfd0: 55 push %ebp 10cfd1: 89 e5 mov %esp,%ebp 10cfd3: 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; 10cfd6: 8b 50 10 mov 0x10(%eax),%edx 10cfd9: 8b 52 34 mov 0x34(%edx),%edx switch( node->type ) { 10cfdc: 8b 08 mov (%eax),%ecx 10cfde: 8b 49 4c mov 0x4c(%ecx),%ecx 10cfe1: 49 dec %ecx 10cfe2: 83 f9 06 cmp $0x6,%ecx 10cfe5: 77 2d ja 10d014 <== NEVER TAKEN 10cfe7: ff 24 8d bc d9 11 00 jmp *0x11d9bc(,%ecx,4) case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10cfee: 8b 52 0c mov 0xc(%edx),%edx 10cff1: eb 15 jmp 10d008 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10cff3: c7 40 08 8c da 11 00 movl $0x11da8c,0x8(%eax) break; 10cffa: eb 18 jmp 10d014 case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 10cffc: c7 40 08 c4 da 11 00 movl $0x11dac4,0x8(%eax) break; 10d003: eb 0f jmp 10d014 case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; 10d005: 8b 52 08 mov 0x8(%edx),%edx 10d008: 89 50 08 mov %edx,0x8(%eax) break; 10d00b: eb 07 jmp 10d014 case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 10d00d: c7 40 08 d8 d9 11 00 movl $0x11d9d8,0x8(%eax) break; } return 0; } 10d014: 31 c0 xor %eax,%eax 10d016: c9 leave 10d017: c3 ret =============================================================================== 0010f6c0 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 10f6c0: 55 push %ebp 10f6c1: 89 e5 mov %esp,%ebp 10f6c3: 53 push %ebx 10f6c4: 83 ec 1c sub $0x1c,%esp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 10f6c7: 6a 64 push $0x64 10f6c9: 6a 01 push $0x1 10f6cb: e8 bc e4 ff ff call 10db8c 10f6d0: 89 c3 mov %eax,%ebx if ( !node ) 10f6d2: 83 c4 10 add $0x10,%esp 10f6d5: 85 c0 test %eax,%eax 10f6d7: 74 49 je 10f722 <== NEVER TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 10f6d9: 66 c7 40 34 01 00 movw $0x1,0x34(%eax) node->type = type; 10f6df: 8b 45 08 mov 0x8(%ebp),%eax 10f6e2: 89 43 4c mov %eax,0x4c(%ebx) strncpy( node->name, name, IMFS_NAME_MAX ); 10f6e5: 51 push %ecx 10f6e6: 6a 20 push $0x20 10f6e8: ff 75 0c pushl 0xc(%ebp) 10f6eb: 8d 43 0c lea 0xc(%ebx),%eax 10f6ee: 50 push %eax 10f6ef: e8 34 19 00 00 call 111028 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 10f6f4: 8b 45 10 mov 0x10(%ebp),%eax 10f6f7: 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; 10f6fa: 66 c7 43 3c 00 00 movw $0x0,0x3c(%ebx) node->st_gid = 0; 10f700: 66 c7 43 3e 00 00 movw $0x0,0x3e(%ebx) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 10f706: 58 pop %eax 10f707: 5a pop %edx 10f708: 6a 00 push $0x0 10f70a: 8d 45 f0 lea -0x10(%ebp),%eax 10f70d: 50 push %eax 10f70e: e8 f1 e5 ff ff call 10dd04 node->stat_atime = (time_t) tv.tv_sec; 10f713: 8b 45 f0 mov -0x10(%ebp),%eax 10f716: 89 43 40 mov %eax,0x40(%ebx) node->stat_mtime = (time_t) tv.tv_sec; 10f719: 89 43 44 mov %eax,0x44(%ebx) node->stat_ctime = (time_t) tv.tv_sec; 10f71c: 89 43 48 mov %eax,0x48(%ebx) return node; 10f71f: 83 c4 10 add $0x10,%esp } 10f722: 89 d8 mov %ebx,%eax 10f724: 8b 5d fc mov -0x4(%ebp),%ebx 10f727: c9 leave 10f728: c3 ret =============================================================================== 0010f75c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10f75c: 55 push %ebp 10f75d: 89 e5 mov %esp,%ebp 10f75f: 57 push %edi 10f760: 56 push %esi 10f761: 53 push %ebx 10f762: 83 ec 1c sub $0x1c,%esp 10f765: 8b 75 08 mov 0x8(%ebp),%esi 10f768: 8b 7d 0c mov 0xc(%ebp),%edi 10f76b: 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 ) 10f76e: 31 c0 xor %eax,%eax 10f770: 85 f6 test %esi,%esi 10f772: 0f 84 dc 00 00 00 je 10f854 <== NEVER TAKEN return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10f778: 50 push %eax 10f779: a1 28 18 12 00 mov 0x121828,%eax 10f77e: 8b 40 2c mov 0x2c(%eax),%eax 10f781: f7 d0 not %eax 10f783: 23 45 14 and 0x14(%ebp),%eax 10f786: 50 push %eax 10f787: ff 75 10 pushl 0x10(%ebp) 10f78a: 57 push %edi 10f78b: e8 30 ff ff ff call 10f6c0 if ( !node ) 10f790: 83 c4 10 add $0x10,%esp 10f793: 85 c0 test %eax,%eax 10f795: 0f 84 b9 00 00 00 je 10f854 <== NEVER TAKEN return NULL; /* * Set the type specific information */ switch (type) { 10f79b: 4f dec %edi 10f79c: 83 ff 06 cmp $0x6,%edi 10f79f: 77 73 ja 10f814 <== NEVER TAKEN 10f7a1: ff 24 bd 60 dc 11 00 jmp *0x11dc60(,%edi,4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10f7a8: 8d 50 54 lea 0x54(%eax),%edx 10f7ab: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10f7ae: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10f7b5: 8d 50 50 lea 0x50(%eax),%edx 10f7b8: 89 50 58 mov %edx,0x58(%eax) 10f7bb: eb 6d jmp 10f82a 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; 10f7bd: 8b 13 mov (%ebx),%edx 10f7bf: 89 50 50 mov %edx,0x50(%eax) break; 10f7c2: eb 66 jmp 10f82a case IMFS_DEVICE: node->info.device.major = info->device.major; 10f7c4: 8b 13 mov (%ebx),%edx 10f7c6: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 10f7c9: 8b 53 04 mov 0x4(%ebx),%edx 10f7cc: 89 50 54 mov %edx,0x54(%eax) break; 10f7cf: eb 59 jmp 10f82a case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 10f7d1: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED 10f7d8: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED node->info.linearfile.direct = 0; 10f7df: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 10f7e6: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10f7ed: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10f7f4: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10f7fb: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10f802: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 10f809: eb 1f jmp 10f82a case IMFS_FIFO: node->info.fifo.pipe = NULL; 10f80b: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) break; 10f812: eb 16 jmp 10f82a default: assert(0); 10f814: 68 24 ce 11 00 push $0x11ce24 <== NOT EXECUTED 10f819: 68 7c dc 11 00 push $0x11dc7c <== NOT EXECUTED 10f81e: 6a 5c push $0x5c <== NOT EXECUTED 10f820: 68 14 dc 11 00 push $0x11dc14 <== NOT EXECUTED 10f825: e8 d6 76 ff ff call 106f00 <__assert_func> <== NOT EXECUTED } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 10f82a: 8b 16 mov (%esi),%edx fs_info = parent_loc->mt_entry->fs_info; 10f82c: 8b 4e 10 mov 0x10(%esi),%ecx 10f82f: 8b 59 34 mov 0x34(%ecx),%ebx node->Parent = parent; 10f832: 89 50 08 mov %edx,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10f835: 8b 4b 04 mov 0x4(%ebx),%ecx 10f838: 41 inc %ecx 10f839: 89 4b 04 mov %ecx,0x4(%ebx) 10f83c: 89 48 38 mov %ecx,0x38(%eax) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 10f83f: 53 push %ebx 10f840: 53 push %ebx 10f841: 50 push %eax 10f842: 83 c2 50 add $0x50,%edx 10f845: 52 push %edx 10f846: 89 45 e4 mov %eax,-0x1c(%ebp) 10f849: e8 b2 af ff ff call 10a800 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 10f84e: 83 c4 10 add $0x10,%esp 10f851: 8b 45 e4 mov -0x1c(%ebp),%eax } 10f854: 8d 65 f4 lea -0xc(%ebp),%esp 10f857: 5b pop %ebx 10f858: 5e pop %esi 10f859: 5f pop %edi 10f85a: c9 leave 10f85b: c3 ret =============================================================================== 0010f729 : IMFS_jnode_t *IMFS_create_root_node(void) { 10f729: 55 push %ebp 10f72a: 89 e5 mov %esp,%ebp 10f72c: 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) ); 10f72f: 68 ed 41 00 00 push $0x41ed 10f734: 68 5e d6 11 00 push $0x11d65e 10f739: 6a 01 push $0x1 10f73b: e8 80 ff ff ff call 10f6c0 if ( !node ) 10f740: 83 c4 10 add $0x10,%esp 10f743: 85 c0 test %eax,%eax 10f745: 74 13 je 10f75a <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10f747: 8d 50 54 lea 0x54(%eax),%edx 10f74a: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10f74d: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10f754: 8d 50 50 lea 0x50(%eax),%edx 10f757: 89 50 58 mov %edx,0x58(%eax) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 10f75a: c9 leave 10f75b: c3 ret =============================================================================== 00108e3b : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 108e3b: 55 push %ebp 108e3c: 89 e5 mov %esp,%ebp 108e3e: 57 push %edi 108e3f: 56 push %esi 108e40: 53 push %ebx 108e41: 83 ec 1c sub $0x1c,%esp 108e44: 8b 45 08 mov 0x8(%ebp),%eax 108e47: 8b 75 0c mov 0xc(%ebp),%esi rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 108e4a: 85 c0 test %eax,%eax 108e4c: 75 11 jne 108e5f <== ALWAYS TAKEN 108e4e: 68 4e 3c 12 00 push $0x123c4e <== NOT EXECUTED 108e53: 68 38 3d 12 00 push $0x123d38 <== NOT EXECUTED 108e58: 68 84 00 00 00 push $0x84 <== NOT EXECUTED 108e5d: eb 13 jmp 108e72 <== NOT EXECUTED assert( level >= 0 ); 108e5f: 85 f6 test %esi,%esi 108e61: 79 19 jns 108e7c <== ALWAYS TAKEN 108e63: 68 5c 3c 12 00 push $0x123c5c <== NOT EXECUTED 108e68: 68 38 3d 12 00 push $0x123d38 <== NOT EXECUTED 108e6d: 68 86 00 00 00 push $0x86 <== NOT EXECUTED 108e72: 68 a2 3b 12 00 push $0x123ba2 <== NOT EXECUTED 108e77: e8 24 07 00 00 call 1095a0 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 108e7c: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 108e80: 74 11 je 108e93 <== ALWAYS TAKEN 108e82: 68 67 3c 12 00 push $0x123c67 <== NOT EXECUTED 108e87: 68 38 3d 12 00 push $0x123d38 <== NOT EXECUTED 108e8c: 68 88 00 00 00 push $0x88 <== NOT EXECUTED 108e91: eb df jmp 108e72 <== NOT EXECUTED the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108e93: 8b 58 50 mov 0x50(%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 108e96: 83 c0 54 add $0x54,%eax 108e99: 89 45 e4 mov %eax,-0x1c(%ebp) for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 108e9c: 8d 46 01 lea 0x1(%esi),%eax 108e9f: 89 45 e0 mov %eax,-0x20(%ebp) assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108ea2: eb 40 jmp 108ee4 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 108ea4: 31 ff xor %edi,%edi for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 108ea6: 51 push %ecx 108ea7: 51 push %ecx 108ea8: a1 00 80 12 00 mov 0x128000,%eax 108ead: ff 70 08 pushl 0x8(%eax) 108eb0: 68 8d 3c 12 00 push $0x123c8d 108eb5: e8 e6 bf 00 00 call 114ea0 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 108eba: 47 inc %edi 108ebb: 83 c4 10 add $0x10,%esp 108ebe: 39 f7 cmp %esi,%edi 108ec0: 7e e4 jle 108ea6 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 108ec2: 83 ec 0c sub $0xc,%esp 108ec5: 53 push %ebx 108ec6: e8 53 fe ff ff call 108d1e if ( the_jnode->type == IMFS_DIRECTORY ) 108ecb: 83 c4 10 add $0x10,%esp 108ece: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 108ed2: 75 0e jne 108ee2 IMFS_dump_directory( the_jnode, level + 1 ); 108ed4: 52 push %edx 108ed5: 52 push %edx 108ed6: ff 75 e0 pushl -0x20(%ebp) 108ed9: 53 push %ebx 108eda: e8 5c ff ff ff call 108e3b 108edf: 83 c4 10 add $0x10,%esp the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 108ee2: 8b 1b mov (%ebx),%ebx assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108ee4: 3b 5d e4 cmp -0x1c(%ebp),%ebx 108ee7: 75 bb jne 108ea4 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 108ee9: 8d 65 f4 lea -0xc(%ebp),%esp 108eec: 5b pop %ebx 108eed: 5e pop %esi 108eee: 5f pop %edi 108eef: c9 leave 108ef0: c3 ret =============================================================================== 0010d13f : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10d13f: 55 push %ebp 10d140: 89 e5 mov %esp,%ebp 10d142: 57 push %edi 10d143: 56 push %esi 10d144: 53 push %ebx 10d145: 83 ec 5c sub $0x5c,%esp 10d148: 8b 5d 14 mov 0x14(%ebp),%ebx /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10d14b: 8b 3b mov (%ebx),%edi 10d14d: b8 01 00 00 00 mov $0x1,%eax 10d152: 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) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10d159: 8d 75 af lea -0x51(%ebp),%esi /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10d15c: e9 38 01 00 00 jmp 10d299 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10d161: 8d 45 e4 lea -0x1c(%ebp),%eax 10d164: 50 push %eax 10d165: 56 push %esi 10d166: ff 75 0c pushl 0xc(%ebp) 10d169: 8b 45 08 mov 0x8(%ebp),%eax 10d16c: 03 45 a4 add -0x5c(%ebp),%eax 10d16f: 50 push %eax 10d170: e8 a7 06 00 00 call 10d81c pathnamelen -= len; 10d175: 8b 4d e4 mov -0x1c(%ebp),%ecx i += len; if ( !pathloc->node_access ) 10d178: 8b 13 mov (%ebx),%edx 10d17a: 83 c4 10 add $0x10,%esp 10d17d: 85 d2 test %edx,%edx 10d17f: 0f 84 ed 00 00 00 je 10d272 <== 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 ) 10d185: 85 c0 test %eax,%eax 10d187: 74 10 je 10d199 if ( node->type == IMFS_DIRECTORY ) 10d189: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10d18d: 75 0a jne 10d199 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10d18f: f6 42 30 40 testb $0x40,0x30(%edx) 10d193: 0f 84 77 01 00 00 je 10d310 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10d199: 29 4d 0c sub %ecx,0xc(%ebp) i += len; 10d19c: 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; 10d19f: 89 d7 mov %edx,%edi switch( type ) { 10d1a1: 83 f8 03 cmp $0x3,%eax 10d1a4: 74 5b je 10d201 10d1a6: 83 f8 04 cmp $0x4,%eax 10d1a9: 0f 84 da 00 00 00 je 10d289 10d1af: 83 f8 02 cmp $0x2,%eax 10d1b2: 0f 85 e1 00 00 00 jne 10d299 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10d1b8: a1 28 18 12 00 mov 0x121828,%eax 10d1bd: 3b 50 18 cmp 0x18(%eax),%edx 10d1c0: 74 9f je 10d161 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10d1c2: 8b 43 10 mov 0x10(%ebx),%eax /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10d1c5: 3b 50 1c cmp 0x1c(%eax),%edx 10d1c8: 75 32 jne 10d1fc 10d1ca: 89 4d a0 mov %ecx,-0x60(%ebp) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 10d1cd: 8d 7d d0 lea -0x30(%ebp),%edi 10d1d0: 8d 70 08 lea 0x8(%eax),%esi 10d1d3: b9 05 00 00 00 mov $0x5,%ecx 10d1d8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10d1da: 8d 75 d0 lea -0x30(%ebp),%esi 10d1dd: b1 05 mov $0x5,%cl 10d1df: 89 df mov %ebx,%edi 10d1e1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 10d1e3: 8b 53 0c mov 0xc(%ebx),%edx 10d1e6: 53 push %ebx 10d1e7: ff 75 10 pushl 0x10(%ebp) 10d1ea: 8b 45 a0 mov -0x60(%ebp),%eax 10d1ed: 03 45 0c add 0xc(%ebp),%eax 10d1f0: 50 push %eax 10d1f1: 8b 45 a4 mov -0x5c(%ebp),%eax 10d1f4: 2b 45 a0 sub -0x60(%ebp),%eax 10d1f7: e9 e4 00 00 00 jmp 10d2e0 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10d1fc: 8b 7a 08 mov 0x8(%edx),%edi 10d1ff: eb 6d jmp 10d26e case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10d201: 8b 42 4c mov 0x4c(%edx),%eax 10d204: 83 f8 03 cmp $0x3,%eax 10d207: 75 15 jne 10d21e IMFS_evaluate_hard_link( pathloc, 0 ); 10d209: 51 push %ecx 10d20a: 51 push %ecx 10d20b: 6a 00 push $0x0 10d20d: 53 push %ebx 10d20e: e8 22 fe ff ff call 10d035 node = pathloc->node_access; 10d213: 8b 3b mov (%ebx),%edi if ( !node ) 10d215: 83 c4 10 add $0x10,%esp 10d218: 85 ff test %edi,%edi 10d21a: 75 1f jne 10d23b <== ALWAYS TAKEN 10d21c: eb 23 jmp 10d241 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 10d21e: 83 f8 04 cmp $0x4,%eax 10d221: 75 18 jne 10d23b result = IMFS_evaluate_sym_link( pathloc, 0 ); 10d223: 52 push %edx 10d224: 52 push %edx 10d225: 6a 00 push $0x0 10d227: 53 push %ebx 10d228: e8 60 fe ff ff call 10d08d node = pathloc->node_access; 10d22d: 8b 3b mov (%ebx),%edi if ( result == -1 ) 10d22f: 83 c4 10 add $0x10,%esp 10d232: 83 f8 ff cmp $0xffffffff,%eax 10d235: 0f 84 cd 00 00 00 je 10d308 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10d23b: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10d23f: 74 10 je 10d251 rtems_set_errno_and_return_minus_one( ENOTDIR ); 10d241: e8 1e 31 00 00 call 110364 <__errno> 10d246: c7 00 14 00 00 00 movl $0x14,(%eax) 10d24c: e9 ca 00 00 00 jmp 10d31b /* * 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 ) { 10d251: 8b 47 5c mov 0x5c(%edi),%eax 10d254: 85 c0 test %eax,%eax 10d256: 74 08 je 10d260 newloc = node->info.directory.mt_fs->mt_fs_root; 10d258: 8d 7d d0 lea -0x30(%ebp),%edi 10d25b: 8d 70 1c lea 0x1c(%eax),%esi 10d25e: eb 59 jmp 10d2b9 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10d260: 50 push %eax 10d261: 50 push %eax 10d262: 56 push %esi 10d263: 57 push %edi 10d264: e8 27 05 00 00 call 10d790 10d269: 89 c7 mov %eax,%edi if ( !node ) 10d26b: 83 c4 10 add $0x10,%esp 10d26e: 85 ff test %edi,%edi 10d270: 75 10 jne 10d282 rtems_set_errno_and_return_minus_one( ENOENT ); 10d272: e8 ed 30 00 00 call 110364 <__errno> 10d277: c7 00 02 00 00 00 movl $0x2,(%eax) 10d27d: e9 99 00 00 00 jmp 10d31b /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10d282: 89 3b mov %edi,(%ebx) 10d284: e9 d8 fe ff ff jmp 10d161 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10d289: e8 d6 30 00 00 call 110364 <__errno> 10d28e: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10d294: e9 82 00 00 00 jmp 10d31b /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10d299: 83 f8 04 cmp $0x4,%eax 10d29c: 74 08 je 10d2a6 <== NEVER TAKEN 10d29e: 85 c0 test %eax,%eax 10d2a0: 0f 85 bb fe ff ff jne 10d161 * 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 ) { 10d2a6: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10d2aa: 75 3f jne 10d2eb if ( node->info.directory.mt_fs != NULL ) { 10d2ac: 8b 77 5c mov 0x5c(%edi),%esi 10d2af: 85 f6 test %esi,%esi 10d2b1: 74 38 je 10d2eb newloc = node->info.directory.mt_fs->mt_fs_root; 10d2b3: 8d 7d d0 lea -0x30(%ebp),%edi 10d2b6: 83 c6 1c add $0x1c,%esi 10d2b9: b9 05 00 00 00 mov $0x5,%ecx 10d2be: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10d2c0: 8d 75 d0 lea -0x30(%ebp),%esi 10d2c3: b1 05 mov $0x5,%cl 10d2c5: 89 df mov %ebx,%edi 10d2c7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10d2c9: 8b 45 e4 mov -0x1c(%ebp),%eax 10d2cc: 8b 53 0c mov 0xc(%ebx),%edx 10d2cf: 53 push %ebx 10d2d0: ff 75 10 pushl 0x10(%ebp) 10d2d3: 8b 4d 0c mov 0xc(%ebp),%ecx 10d2d6: 01 c1 add %eax,%ecx 10d2d8: 51 push %ecx 10d2d9: 8b 4d a4 mov -0x5c(%ebp),%ecx 10d2dc: 29 c1 sub %eax,%ecx 10d2de: 89 c8 mov %ecx,%eax 10d2e0: 03 45 08 add 0x8(%ebp),%eax 10d2e3: 50 push %eax 10d2e4: ff 12 call *(%edx) 10d2e6: 83 c4 10 add $0x10,%esp 10d2e9: eb 1d jmp 10d308 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10d2eb: 83 ec 0c sub $0xc,%esp 10d2ee: 53 push %ebx 10d2ef: e8 dc fc ff ff call 10cfd0 10d2f4: 83 c4 10 add $0x10,%esp /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10d2f7: 8b 55 10 mov 0x10(%ebp),%edx 10d2fa: c1 e2 06 shl $0x6,%edx if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 10d2fd: 8b 0b mov (%ebx),%ecx 10d2ff: 8b 49 30 mov 0x30(%ecx),%ecx 10d302: 21 d1 and %edx,%ecx 10d304: 39 d1 cmp %edx,%ecx 10d306: 75 08 jne 10d310 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10d308: 8d 65 f4 lea -0xc(%ebp),%esp 10d30b: 5b pop %ebx 10d30c: 5e pop %esi 10d30d: 5f pop %edi 10d30e: c9 leave 10d30f: c3 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10d310: e8 4f 30 00 00 call 110364 <__errno> 10d315: c7 00 0d 00 00 00 movl $0xd,(%eax) 10d31b: 83 c8 ff or $0xffffffff,%eax 10d31e: eb e8 jmp 10d308 =============================================================================== 0010d3a3 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 10d3a3: 55 push %ebp 10d3a4: 89 e5 mov %esp,%ebp 10d3a6: 57 push %edi 10d3a7: 56 push %esi 10d3a8: 53 push %ebx 10d3a9: 83 ec 5c sub $0x5c,%esp 10d3ac: 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; 10d3af: 8b 1a mov (%edx),%ebx /* * Get the path length. */ pathlen = strlen( path ); 10d3b1: 31 c0 xor %eax,%eax 10d3b3: 83 c9 ff or $0xffffffff,%ecx 10d3b6: 8b 7d 08 mov 0x8(%ebp),%edi 10d3b9: f2 ae repnz scas %es:(%edi),%al 10d3bb: f7 d1 not %ecx 10d3bd: 8d 79 ff lea -0x1(%ecx),%edi 10d3c0: 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 ); 10d3c7: 8d 75 af lea -0x51(%ebp),%esi 10d3ca: 89 7d a0 mov %edi,-0x60(%ebp) 10d3cd: 89 d7 mov %edx,%edi 10d3cf: 8d 45 e4 lea -0x1c(%ebp),%eax 10d3d2: 50 push %eax 10d3d3: 56 push %esi 10d3d4: ff 75 a0 pushl -0x60(%ebp) 10d3d7: 8b 45 08 mov 0x8(%ebp),%eax 10d3da: 03 45 a4 add -0x5c(%ebp),%eax 10d3dd: 50 push %eax 10d3de: e8 39 04 00 00 call 10d81c pathlen -= len; 10d3e3: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d3e6: 29 4d a0 sub %ecx,-0x60(%ebp) i += len; if ( !pathloc->node_access ) 10d3e9: 8b 17 mov (%edi),%edx 10d3eb: 83 c4 10 add $0x10,%esp 10d3ee: 85 d2 test %edx,%edx 10d3f0: 0f 84 53 01 00 00 je 10d549 <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10d3f6: 85 c0 test %eax,%eax 10d3f8: 74 10 je 10d40a if ( node->type == IMFS_DIRECTORY ) 10d3fa: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10d3fe: 75 0a jne 10d40a /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10d400: f6 42 30 40 testb $0x40,0x30(%edx) 10d404: 0f 84 92 01 00 00 je 10d59c while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 10d40a: 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; 10d40d: 89 d3 mov %edx,%ebx switch( type ) { 10d40f: 83 f8 02 cmp $0x2,%eax 10d412: 74 1b je 10d42f 10d414: 77 0a ja 10d420 10d416: 85 c0 test %eax,%eax 10d418: 0f 84 e8 00 00 00 je 10d506 10d41e: eb af jmp 10d3cf 10d420: 83 f8 03 cmp $0x3,%eax 10d423: 74 55 je 10d47a 10d425: 83 f8 04 cmp $0x4,%eax 10d428: 75 a5 jne 10d3cf <== NEVER TAKEN 10d42a: e9 e7 00 00 00 jmp 10d516 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10d42f: a1 28 18 12 00 mov 0x121828,%eax 10d434: 3b 50 18 cmp 0x18(%eax),%edx 10d437: 74 96 je 10d3cf /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 10d439: 8b 47 10 mov 0x10(%edi),%eax 10d43c: 3b 50 1c cmp 0x1c(%eax),%edx 10d43f: 75 29 jne 10d46a 10d441: 89 cb mov %ecx,%ebx 10d443: 89 fa mov %edi,%edx if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 10d445: 8d 7d d0 lea -0x30(%ebp),%edi 10d448: 8d 70 08 lea 0x8(%eax),%esi 10d44b: b9 05 00 00 00 mov $0x5,%ecx 10d450: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10d452: 8d 75 d0 lea -0x30(%ebp),%esi 10d455: b1 05 mov $0x5,%cl 10d457: 89 d7 mov %edx,%edi 10d459: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10d45b: 51 push %ecx 10d45c: 8b 42 0c mov 0xc(%edx),%eax 10d45f: ff 75 10 pushl 0x10(%ebp) 10d462: 52 push %edx 10d463: 8b 55 a4 mov -0x5c(%ebp),%edx 10d466: 29 da sub %ebx,%edx 10d468: eb 74 jmp 10d4de } } else { if ( !node->Parent ) 10d46a: 8b 5a 08 mov 0x8(%edx),%ebx 10d46d: 85 db test %ebx,%ebx 10d46f: 0f 85 8a 00 00 00 jne 10d4ff 10d475: e9 cf 00 00 00 jmp 10d549 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 10d47a: 8b 42 4c mov 0x4c(%edx),%eax 10d47d: 83 f8 03 cmp $0x3,%eax 10d480: 74 05 je 10d487 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 10d482: 83 f8 04 cmp $0x4,%eax 10d485: 75 16 jne 10d49d result = IMFS_evaluate_link( pathloc, 0 ); 10d487: 50 push %eax 10d488: 50 push %eax 10d489: 6a 00 push $0x0 10d48b: 57 push %edi 10d48c: e8 8f fe ff ff call 10d320 if ( result == -1 ) 10d491: 83 c4 10 add $0x10,%esp 10d494: 83 f8 ff cmp $0xffffffff,%eax 10d497: 0f 84 f7 00 00 00 je 10d594 <== NEVER TAKEN return -1; } node = pathloc->node_access; 10d49d: 8b 17 mov (%edi),%edx if ( !node ) 10d49f: 85 d2 test %edx,%edx 10d4a1: 0f 84 cf 00 00 00 je 10d576 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10d4a7: 83 7a 4c 01 cmpl $0x1,0x4c(%edx) 10d4ab: 0f 85 c5 00 00 00 jne 10d576 /* * 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 ) { 10d4b1: 8b 42 5c mov 0x5c(%edx),%eax 10d4b4: 85 c0 test %eax,%eax 10d4b6: 74 35 je 10d4ed 10d4b8: 89 fa mov %edi,%edx newloc = node->info.directory.mt_fs->mt_fs_root; 10d4ba: 8d 7d d0 lea -0x30(%ebp),%edi 10d4bd: 8d 70 1c lea 0x1c(%eax),%esi 10d4c0: b9 05 00 00 00 mov $0x5,%ecx 10d4c5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10d4c7: 8d 75 d0 lea -0x30(%ebp),%esi 10d4ca: b1 05 mov $0x5,%cl 10d4cc: 89 d7 mov %edx,%edi 10d4ce: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10d4d0: 53 push %ebx 10d4d1: 8b 42 0c mov 0xc(%edx),%eax 10d4d4: ff 75 10 pushl 0x10(%ebp) 10d4d7: 52 push %edx 10d4d8: 8b 55 a4 mov -0x5c(%ebp),%edx 10d4db: 2b 55 e4 sub -0x1c(%ebp),%edx 10d4de: 03 55 08 add 0x8(%ebp),%edx 10d4e1: 52 push %edx 10d4e2: ff 50 04 call *0x4(%eax) 10d4e5: 83 c4 10 add $0x10,%esp 10d4e8: e9 a7 00 00 00 jmp 10d594 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10d4ed: 51 push %ecx 10d4ee: 51 push %ecx 10d4ef: 56 push %esi 10d4f0: 52 push %edx 10d4f1: e8 9a 02 00 00 call 10d790 10d4f6: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 10d4f8: 83 c4 10 add $0x10,%esp 10d4fb: 85 c0 test %eax,%eax 10d4fd: 74 27 je 10d526 done = true; else pathloc->node_access = node; 10d4ff: 89 1f mov %ebx,(%edi) 10d501: e9 c9 fe ff ff jmp 10d3cf break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 10d506: e8 59 2e 00 00 call 110364 <__errno> 10d50b: c7 00 11 00 00 00 movl $0x11,(%eax) 10d511: e9 91 00 00 00 jmp 10d5a7 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10d516: e8 49 2e 00 00 call 110364 <__errno> 10d51b: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10d521: e9 81 00 00 00 jmp 10d5a7 10d526: 89 fa mov %edi,%edx case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 10d528: 8b 45 a4 mov -0x5c(%ebp),%eax 10d52b: 2b 45 e4 sub -0x1c(%ebp),%eax 10d52e: 03 45 08 add 0x8(%ebp),%eax 10d531: 8b 4d 10 mov 0x10(%ebp),%ecx 10d534: 89 01 mov %eax,(%ecx) 10d536: 8b 45 08 mov 0x8(%ebp),%eax 10d539: 03 45 a4 add -0x5c(%ebp),%eax /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 10d53c: eb 18 jmp 10d556 10d53e: 40 inc %eax if ( !IMFS_is_separator( path[ i ] ) ) 10d53f: 80 f9 5c cmp $0x5c,%cl 10d542: 74 12 je 10d556 10d544: 80 f9 2f cmp $0x2f,%cl 10d547: 74 0d je 10d556 rtems_set_errno_and_return_minus_one( ENOENT ); 10d549: e8 16 2e 00 00 call 110364 <__errno> 10d54e: c7 00 02 00 00 00 movl $0x2,(%eax) 10d554: eb 51 jmp 10d5a7 /* * 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++) { 10d556: 8a 08 mov (%eax),%cl 10d558: 84 c9 test %cl,%cl 10d55a: 75 e2 jne 10d53e /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 10d55c: 83 ec 0c sub $0xc,%esp 10d55f: 52 push %edx 10d560: 89 55 9c mov %edx,-0x64(%ebp) 10d563: e8 68 fa ff ff call 10cfd0 /* * The returned node must be a directory */ node = pathloc->node_access; 10d568: 8b 55 9c mov -0x64(%ebp),%edx 10d56b: 8b 12 mov (%edx),%edx if ( node->type != IMFS_DIRECTORY ) 10d56d: 83 c4 10 add $0x10,%esp 10d570: 83 7a 4c 01 cmpl $0x1,0x4c(%edx) 10d574: 74 0d je 10d583 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 10d576: e8 e9 2d 00 00 call 110364 <__errno> 10d57b: c7 00 14 00 00 00 movl $0x14,(%eax) 10d581: eb 24 jmp 10d5a7 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10d583: 8b 52 30 mov 0x30(%edx),%edx 10d586: 81 e2 c0 00 00 00 and $0xc0,%edx 10d58c: 81 fa c0 00 00 00 cmp $0xc0,%edx 10d592: 75 08 jne 10d59c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10d594: 8d 65 f4 lea -0xc(%ebp),%esp 10d597: 5b pop %ebx 10d598: 5e pop %esi 10d599: 5f pop %edi 10d59a: c9 leave 10d59b: c3 ret /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10d59c: e8 c3 2d 00 00 call 110364 <__errno> 10d5a1: c7 00 0d 00 00 00 movl $0xd,(%eax) 10d5a7: 83 c8 ff or $0xffffffff,%eax 10d5aa: eb e8 jmp 10d594 =============================================================================== 0010d035 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10d035: 55 push %ebp 10d036: 89 e5 mov %esp,%ebp 10d038: 53 push %ebx 10d039: 83 ec 04 sub $0x4,%esp 10d03c: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10d03f: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10d041: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10d045: 74 0d je 10d054 <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 10d047: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d04a: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10d04f: e8 50 d5 ff ff call 10a5a4 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10d054: 8b 40 50 mov 0x50(%eax),%eax 10d057: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10d059: 83 ec 0c sub $0xc,%esp 10d05c: 53 push %ebx 10d05d: e8 6e ff ff ff call 10cfd0 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10d062: 8b 45 0c mov 0xc(%ebp),%eax 10d065: c1 e0 06 shl $0x6,%eax if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 10d068: 8b 13 mov (%ebx),%edx 10d06a: 8b 52 30 mov 0x30(%edx),%edx 10d06d: 21 c2 and %eax,%edx 10d06f: 83 c4 10 add $0x10,%esp 10d072: 39 c2 cmp %eax,%edx 10d074: 75 07 jne 10d07d <== NEVER TAKEN 10d076: 31 c0 xor %eax,%eax if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10d078: 8b 5d fc mov -0x4(%ebp),%ebx 10d07b: c9 leave 10d07c: c3 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10d07d: e8 e2 32 00 00 call 110364 <__errno> <== NOT EXECUTED 10d082: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10d088: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10d08b: eb eb jmp 10d078 <== NOT EXECUTED =============================================================================== 0010d018 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10d018: 55 push %ebp <== NOT EXECUTED 10d019: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d01b: 8b 45 0c mov 0xc(%ebp),%eax <== 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 ) 10d01e: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 10d021: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10d024: 8b 12 mov (%edx),%edx <== NOT EXECUTED 10d026: 8b 52 30 mov 0x30(%edx),%edx <== NOT EXECUTED 10d029: 21 c2 and %eax,%edx <== NOT EXECUTED 10d02b: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10d02d: 0f 94 c0 sete %al <== NOT EXECUTED 10d030: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED return 1; return 0; } 10d033: c9 leave <== NOT EXECUTED 10d034: c3 ret <== NOT EXECUTED =============================================================================== 0010d08d : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10d08d: 55 push %ebp 10d08e: 89 e5 mov %esp,%ebp 10d090: 57 push %edi 10d091: 56 push %esi 10d092: 53 push %ebx 10d093: 83 ec 0c sub $0xc,%esp 10d096: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10d099: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10d09b: 83 78 4c 04 cmpl $0x4,0x4c(%eax) 10d09f: 74 0a je 10d0ab <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 10d0a1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d0a4: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10d0a9: eb 0f jmp 10d0ba <== NOT EXECUTED if ( !jnode->Parent ) 10d0ab: 8b 50 08 mov 0x8(%eax),%edx 10d0ae: 85 d2 test %edx,%edx 10d0b0: 75 0d jne 10d0bf <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xBAD00000 ); 10d0b2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d0b5: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 10d0ba: e8 e5 d4 ff ff call 10a5a4 <== 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; 10d0bf: 89 13 mov %edx,(%ebx) rtems_filesystem_get_sym_start_loc( 10d0c1: 8b 50 50 mov 0x50(%eax),%edx 10d0c4: 8a 0a mov (%edx),%cl 10d0c6: 80 f9 5c cmp $0x5c,%cl 10d0c9: 74 0b je 10d0d6 <== NEVER TAKEN 10d0cb: 80 f9 2f cmp $0x2f,%cl 10d0ce: 74 06 je 10d0d6 10d0d0: 31 d2 xor %edx,%edx 10d0d2: 84 c9 test %cl,%cl 10d0d4: 75 17 jne 10d0ed <== ALWAYS TAKEN 10d0d6: 8b 35 28 18 12 00 mov 0x121828,%esi 10d0dc: 83 c6 18 add $0x18,%esi 10d0df: b9 05 00 00 00 mov $0x5,%ecx 10d0e4: 89 df mov %ebx,%edi 10d0e6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10d0e8: ba 01 00 00 00 mov $0x1,%edx * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 10d0ed: 03 50 50 add 0x50(%eax),%edx 10d0f0: 31 c0 xor %eax,%eax 10d0f2: 83 c9 ff or $0xffffffff,%ecx 10d0f5: 89 d7 mov %edx,%edi 10d0f7: f2 ae repnz scas %es:(%edi),%al 10d0f9: f7 d1 not %ecx 10d0fb: 49 dec %ecx /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10d0fc: 53 push %ebx 10d0fd: ff 75 0c pushl 0xc(%ebp) 10d100: 51 push %ecx 10d101: 52 push %edx 10d102: e8 38 00 00 00 call 10d13f 10d107: 89 c6 mov %eax,%esi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10d109: 89 1c 24 mov %ebx,(%esp) 10d10c: e8 bf fe ff ff call 10cfd0 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10d111: 8b 45 0c mov 0xc(%ebp),%eax 10d114: c1 e0 06 shl $0x6,%eax if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 10d117: 8b 13 mov (%ebx),%edx 10d119: 8b 52 30 mov 0x30(%edx),%edx 10d11c: 21 c2 and %eax,%edx 10d11e: 83 c4 10 add $0x10,%esp 10d121: 39 c2 cmp %eax,%edx 10d123: 75 0a jne 10d12f <== NEVER TAKEN if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10d125: 89 f0 mov %esi,%eax 10d127: 8d 65 f4 lea -0xc(%ebp),%esp 10d12a: 5b pop %ebx 10d12b: 5e pop %esi 10d12c: 5f pop %edi 10d12d: c9 leave 10d12e: c3 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10d12f: e8 30 32 00 00 call 110364 <__errno> <== NOT EXECUTED 10d134: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10d13a: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 10d13d: eb e6 jmp 10d125 <== NOT EXECUTED =============================================================================== 0010d6f5 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 10d6f5: 55 push %ebp <== NOT EXECUTED 10d6f6: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d6f8: 57 push %edi <== NOT EXECUTED 10d6f9: 56 push %esi <== NOT EXECUTED 10d6fa: 53 push %ebx <== NOT EXECUTED 10d6fb: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 10d6fe: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10d701: 8b 77 38 mov 0x38(%edi),%esi <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 10d704: 57 push %edi <== NOT EXECUTED 10d705: 8d 46 50 lea 0x50(%esi),%eax <== NOT EXECUTED 10d708: 50 push %eax <== NOT EXECUTED 10d709: e8 ba 1b 00 00 call 10f2c8 <== NOT EXECUTED 10d70e: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (! err) { 10d710: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d713: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10d716: 75 2c jne 10d744 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 10d718: 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) 10d71f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d722: 56 push %esi <== NOT EXECUTED 10d723: e8 8e 06 00 00 call 10ddb6 <== NOT EXECUTED 10d728: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d72b: 85 c0 test %eax,%eax <== NOT EXECUTED 10d72d: 75 23 jne 10d752 <== NOT EXECUTED 10d72f: 66 83 7e 34 00 cmpw $0x0,0x34(%esi) <== NOT EXECUTED 10d734: 75 1c jne 10d752 <== NOT EXECUTED free(jnode); 10d736: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d739: 56 push %esi <== NOT EXECUTED 10d73a: e8 b1 9a ff ff call 1071f0 <== NOT EXECUTED 10d73f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d742: eb 0e jmp 10d752 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10d744: 7d 0c jge 10d752 <== NOT EXECUTED 10d746: e8 19 2c 00 00 call 110364 <__errno> <== NOT EXECUTED 10d74b: f7 db neg %ebx <== NOT EXECUTED 10d74d: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d74f: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10d752: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10d754: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10d757: 5b pop %ebx <== NOT EXECUTED 10d758: 5e pop %esi <== NOT EXECUTED 10d759: 5f pop %edi <== NOT EXECUTED 10d75a: c9 leave <== NOT EXECUTED 10d75b: c3 ret <== NOT EXECUTED =============================================================================== 0010d5e8 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 10d5e8: 55 push %ebp <== NOT EXECUTED 10d5e9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d5eb: 53 push %ebx <== NOT EXECUTED 10d5ec: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 10d5ef: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10d5f2: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 10d5f5: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED int err; if (command == FIONBIO) { 10d5f8: 81 f9 7e 66 04 80 cmp $0x8004667e,%ecx <== NOT EXECUTED 10d5fe: 75 1c jne 10d61c <== NOT EXECUTED if (buffer == NULL) 10d600: bb f2 ff ff ff mov $0xfffffff2,%ebx <== NOT EXECUTED 10d605: 85 d2 test %edx,%edx <== NOT EXECUTED 10d607: 74 2a je 10d633 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 10d609: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 10d60c: 74 06 je 10d614 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 10d60e: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED 10d612: eb 04 jmp 10d618 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 10d614: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED 10d618: 31 db xor %ebx,%ebx <== NOT EXECUTED 10d61a: eb 23 jmp 10d63f <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 10d61c: 50 push %eax <== NOT EXECUTED 10d61d: 52 push %edx <== NOT EXECUTED 10d61e: 51 push %ecx <== NOT EXECUTED 10d61f: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10d622: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10d625: e8 19 19 00 00 call 10ef43 <== NOT EXECUTED 10d62a: 89 c3 mov %eax,%ebx <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10d62c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d62f: 85 c0 test %eax,%eax <== NOT EXECUTED 10d631: 79 0c jns 10d63f <== NOT EXECUTED 10d633: e8 2c 2d 00 00 call 110364 <__errno> <== NOT EXECUTED 10d638: f7 db neg %ebx <== NOT EXECUTED 10d63a: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d63c: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10d63f: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10d641: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10d644: c9 leave <== NOT EXECUTED 10d645: c3 ret <== NOT EXECUTED =============================================================================== 0010d5ac : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 10d5ac: 55 push %ebp <== NOT EXECUTED 10d5ad: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d5af: 53 push %ebx <== NOT EXECUTED 10d5b0: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10d5b3: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 10d5b6: 50 push %eax <== NOT EXECUTED 10d5b7: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 10d5ba: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10d5bd: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10d5c0: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10d5c3: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10d5c6: e8 21 19 00 00 call 10eeec <== NOT EXECUTED 10d5cb: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10d5cd: 99 cltd <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10d5ce: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10d5d1: 85 d2 test %edx,%edx <== NOT EXECUTED 10d5d3: 79 0e jns 10d5e3 <== NOT EXECUTED 10d5d5: e8 8a 2d 00 00 call 110364 <__errno> <== NOT EXECUTED 10d5da: f7 db neg %ebx <== NOT EXECUTED 10d5dc: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d5de: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10d5e1: 89 c2 mov %eax,%edx <== NOT EXECUTED } 10d5e3: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10d5e6: c9 leave <== NOT EXECUTED 10d5e7: c3 ret <== NOT EXECUTED =============================================================================== 0010d75c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10d75c: 55 push %ebp 10d75d: 89 e5 mov %esp,%ebp 10d75f: 53 push %ebx 10d760: 83 ec 0c sub $0xc,%esp 10d763: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 10d766: 50 push %eax 10d767: 8b 40 38 mov 0x38(%eax),%eax 10d76a: 83 c0 50 add $0x50,%eax 10d76d: 50 push %eax 10d76e: e8 25 1c 00 00 call 10f398 10d773: 89 c3 mov %eax,%ebx IMFS_FIFO_RETURN(err); 10d775: 83 c4 10 add $0x10,%esp 10d778: 85 c0 test %eax,%eax 10d77a: 79 0c jns 10d788 <== NEVER TAKEN 10d77c: e8 e3 2b 00 00 call 110364 <__errno> 10d781: f7 db neg %ebx 10d783: 89 18 mov %ebx,(%eax) 10d785: 83 cb ff or $0xffffffff,%ebx } 10d788: 89 d8 mov %ebx,%eax 10d78a: 8b 5d fc mov -0x4(%ebp),%ebx 10d78d: c9 leave 10d78e: c3 ret =============================================================================== 0010d69f : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10d69f: 55 push %ebp <== NOT EXECUTED 10d6a0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d6a2: 56 push %esi <== NOT EXECUTED 10d6a3: 53 push %ebx <== NOT EXECUTED 10d6a4: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10d6a7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10d6aa: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 10d6ad: 50 push %eax <== NOT EXECUTED 10d6ae: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10d6b1: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10d6b4: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10d6b7: e8 6f 1a 00 00 call 10f12b <== NOT EXECUTED 10d6bc: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) 10d6be: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d6c1: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10d6c4: 7e 18 jle 10d6de <== NOT EXECUTED IMFS_update_atime(jnode); 10d6c6: 52 push %edx <== NOT EXECUTED 10d6c7: 52 push %edx <== NOT EXECUTED 10d6c8: 6a 00 push $0x0 <== NOT EXECUTED 10d6ca: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10d6cd: 50 push %eax <== NOT EXECUTED 10d6ce: e8 31 06 00 00 call 10dd04 <== NOT EXECUTED 10d6d3: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10d6d6: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED 10d6d9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d6dc: eb 0e jmp 10d6ec <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10d6de: 74 0c je 10d6ec <== NOT EXECUTED 10d6e0: e8 7f 2c 00 00 call 110364 <__errno> <== NOT EXECUTED 10d6e5: f7 db neg %ebx <== NOT EXECUTED 10d6e7: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d6e9: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10d6ec: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10d6ee: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10d6f1: 5b pop %ebx <== NOT EXECUTED 10d6f2: 5e pop %esi <== NOT EXECUTED 10d6f3: c9 leave <== NOT EXECUTED 10d6f4: c3 ret <== NOT EXECUTED =============================================================================== 0010d646 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10d646: 55 push %ebp <== NOT EXECUTED 10d647: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d649: 56 push %esi <== NOT EXECUTED 10d64a: 53 push %ebx <== NOT EXECUTED 10d64b: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10d64e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10d651: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 10d654: 50 push %eax <== NOT EXECUTED 10d655: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10d658: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10d65b: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10d65e: e8 36 19 00 00 call 10ef99 <== NOT EXECUTED 10d663: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) { 10d665: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d668: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10d66b: 7e 1b jle 10d688 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 10d66d: 50 push %eax <== NOT EXECUTED 10d66e: 50 push %eax <== NOT EXECUTED 10d66f: 6a 00 push $0x0 <== NOT EXECUTED 10d671: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10d674: 50 push %eax <== NOT EXECUTED 10d675: e8 8a 06 00 00 call 10dd04 <== NOT EXECUTED 10d67a: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10d67d: 89 46 44 mov %eax,0x44(%esi) <== NOT EXECUTED 10d680: 89 46 48 mov %eax,0x48(%esi) <== NOT EXECUTED 10d683: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d686: eb 0e jmp 10d696 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10d688: 74 0c je 10d696 <== NOT EXECUTED 10d68a: e8 d5 2c 00 00 call 110364 <__errno> <== NOT EXECUTED 10d68f: f7 db neg %ebx <== NOT EXECUTED 10d691: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d693: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10d696: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10d698: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10d69b: 5b pop %ebx <== NOT EXECUTED 10d69c: 5e pop %esi <== NOT EXECUTED 10d69d: c9 leave <== NOT EXECUTED 10d69e: c3 ret <== NOT EXECUTED =============================================================================== 0010d790 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 10d790: 55 push %ebp 10d791: 89 e5 mov %esp,%ebp 10d793: 57 push %edi 10d794: 56 push %esi 10d795: 53 push %ebx 10d796: 83 ec 0c sub $0xc,%esp 10d799: 8b 5d 08 mov 0x8(%ebp),%ebx 10d79c: 8b 7d 0c mov 0xc(%ebp),%edi /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 10d79f: 85 db test %ebx,%ebx 10d7a1: 75 16 jne 10d7b9 <== ALWAYS TAKEN 10d7a3: 68 10 da 11 00 push $0x11da10 <== NOT EXECUTED 10d7a8: 68 70 da 11 00 push $0x11da70 <== NOT EXECUTED 10d7ad: 6a 2a push $0x2a <== NOT EXECUTED 10d7af: 68 1a da 11 00 push $0x11da1a <== NOT EXECUTED 10d7b4: e8 47 97 ff ff call 106f00 <__assert_func> <== NOT EXECUTED if ( !name ) 10d7b9: 85 ff test %edi,%edi 10d7bb: 74 52 je 10d80f <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 10d7bd: 56 push %esi 10d7be: 56 push %esi 10d7bf: 68 68 da 11 00 push $0x11da68 10d7c4: 57 push %edi 10d7c5: e8 b6 36 00 00 call 110e80 10d7ca: 83 c4 10 add $0x10,%esp 10d7cd: 85 c0 test %eax,%eax 10d7cf: 74 40 je 10d811 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 10d7d1: 51 push %ecx 10d7d2: 51 push %ecx 10d7d3: 68 6a da 11 00 push $0x11da6a 10d7d8: 57 push %edi 10d7d9: e8 a2 36 00 00 call 110e80 10d7de: 83 c4 10 add $0x10,%esp 10d7e1: 85 c0 test %eax,%eax 10d7e3: 75 05 jne 10d7ea <== ALWAYS TAKEN return directory->Parent; 10d7e5: 8b 5b 08 mov 0x8(%ebx),%ebx <== NOT EXECUTED 10d7e8: eb 27 jmp 10d811 <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10d7ea: 8b 73 50 mov 0x50(%ebx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d7ed: 83 c3 54 add $0x54,%ebx 10d7f0: eb 19 jmp 10d80b !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 ) ) 10d7f2: 8d 46 0c lea 0xc(%esi),%eax 10d7f5: 52 push %edx 10d7f6: 52 push %edx 10d7f7: 50 push %eax 10d7f8: 57 push %edi 10d7f9: e8 82 36 00 00 call 110e80 10d7fe: 83 c4 10 add $0x10,%esp 10d801: 85 c0 test %eax,%eax 10d803: 75 04 jne 10d809 10d805: 89 f3 mov %esi,%ebx 10d807: eb 08 jmp 10d811 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 ) { 10d809: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10d80b: 39 de cmp %ebx,%esi 10d80d: 75 e3 jne 10d7f2 10d80f: 31 db xor %ebx,%ebx if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10d811: 89 d8 mov %ebx,%eax 10d813: 8d 65 f4 lea -0xc(%ebp),%esp 10d816: 5b pop %ebx 10d817: 5e pop %esi 10d818: 5f pop %edi 10d819: c9 leave 10d81a: c3 ret =============================================================================== 00111c04 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 111c04: 55 push %ebp 111c05: 89 e5 mov %esp,%ebp 111c07: 57 push %edi 111c08: 56 push %esi 111c09: 53 push %ebx 111c0a: 83 ec 2c sub $0x2c,%esp 111c0d: 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; 111c10: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 111c13: 8d 7d d4 lea -0x2c(%ebp),%edi 111c16: 8d 70 1c lea 0x1c(%eax),%esi 111c19: b9 05 00 00 00 mov $0x5,%ecx 111c1e: 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; 111c20: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 111c27: 8d 75 d4 lea -0x2c(%ebp),%esi */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 111c2a: 8b 7b 08 mov 0x8(%ebx),%edi loc.node_access = (void *)jnode; 111c2d: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 111c30: 83 ec 0c sub $0xc,%esp 111c33: 56 push %esi 111c34: e8 03 f8 ff ff call 11143c if ( jnode->type != IMFS_DIRECTORY ) { 111c39: 83 c4 10 add $0x10,%esp 111c3c: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 111c40: 75 08 jne 111c4a */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 111c42: 8d 43 54 lea 0x54(%ebx),%eax 111c45: 39 43 50 cmp %eax,0x50(%ebx) 111c48: 75 13 jne 111c5d result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 111c4a: 50 push %eax 111c4b: 50 push %eax 111c4c: 56 push %esi 111c4d: 6a 00 push $0x0 111c4f: e8 28 62 ff ff call 107e7c if (result != 0) 111c54: 83 c4 10 add $0x10,%esp 111c57: 85 c0 test %eax,%eax 111c59: 75 1d jne 111c78 <== NEVER TAKEN 111c5b: 89 fb mov %edi,%ebx return -1; jnode = next; } if ( jnode != NULL ) { 111c5d: 85 db test %ebx,%ebx 111c5f: 74 1c je 111c7d if ( jnode->type == IMFS_DIRECTORY ) { 111c61: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 111c65: 75 c3 jne 111c2a <== NEVER TAKEN 111c67: 8d 43 54 lea 0x54(%ebx),%eax 111c6a: 39 43 50 cmp %eax,0x50(%ebx) 111c6d: 74 bb je 111c2a if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 111c6f: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 111c72: 85 db test %ebx,%ebx 111c74: 75 b4 jne 111c2a <== ALWAYS TAKEN 111c76: eb 05 jmp 111c7d <== NOT EXECUTED 111c78: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 111c7b: eb 02 jmp 111c7f <== NOT EXECUTED 111c7d: 31 c0 xor %eax,%eax return 0; } 111c7f: 8d 65 f4 lea -0xc(%ebp),%esp 111c82: 5b pop %ebx 111c83: 5e pop %esi 111c84: 5f pop %edi 111c85: c9 leave 111c86: c3 ret =============================================================================== 0010d81c : const char *path, int pathlen, char *token, int *token_len ) { 10d81c: 55 push %ebp 10d81d: 89 e5 mov %esp,%ebp 10d81f: 56 push %esi 10d820: 53 push %ebx 10d821: 8b 5d 08 mov 0x8(%ebp),%ebx 10d824: 8b 4d 0c mov 0xc(%ebp),%ecx 10d827: 8b 75 10 mov 0x10(%ebp),%esi register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 10d82a: 8a 13 mov (%ebx),%dl 10d82c: 31 c0 xor %eax,%eax while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10d82e: eb 13 jmp 10d843 token[i] = c; 10d830: 88 14 06 mov %dl,(%esi,%eax,1) if ( i == IMFS_NAME_MAX ) 10d833: 83 f8 20 cmp $0x20,%eax 10d836: 75 07 jne 10d83f 10d838: bb 04 00 00 00 mov $0x4,%ebx 10d83d: eb 7c jmp 10d8bb return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 10d83f: 40 inc %eax 10d840: 8a 14 03 mov (%ebx,%eax,1),%dl /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10d843: 80 fa 5c cmp $0x5c,%dl 10d846: 74 0d je 10d855 10d848: 80 fa 2f cmp $0x2f,%dl 10d84b: 74 08 je 10d855 10d84d: 39 c8 cmp %ecx,%eax 10d84f: 7d 04 jge 10d855 10d851: 84 d2 test %dl,%dl 10d853: 75 db jne 10d830 <== ALWAYS TAKEN /* * Copy a seperator into token. */ if ( i == 0 ) { 10d855: 85 c0 test %eax,%eax 10d857: 75 17 jne 10d870 token[i] = c; 10d859: 88 16 mov %dl,(%esi) if ( (token[i] != '\0') && pathlen ) { 10d85b: 84 d2 test %dl,%dl 10d85d: 74 0d je 10d86c 10d85f: 85 c9 test %ecx,%ecx 10d861: 74 09 je 10d86c 10d863: bb 01 00 00 00 mov $0x1,%ebx 10d868: b0 01 mov $0x1,%al 10d86a: eb 14 jmp 10d880 10d86c: 31 db xor %ebx,%ebx 10d86e: eb 10 jmp 10d880 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10d870: bb 03 00 00 00 mov $0x3,%ebx 10d875: 80 7c 06 ff 00 cmpb $0x0,-0x1(%esi,%eax,1) 10d87a: 74 04 je 10d880 <== NEVER TAKEN token[i] = '\0'; 10d87c: c6 04 06 00 movb $0x0,(%esi,%eax,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 10d880: 8b 55 14 mov 0x14(%ebp),%edx 10d883: 89 02 mov %eax,(%edx) /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 10d885: 83 fb 03 cmp $0x3,%ebx 10d888: 75 31 jne 10d8bb if ( strcmp( token, "..") == 0 ) 10d88a: 52 push %edx 10d88b: 52 push %edx 10d88c: 68 87 da 11 00 push $0x11da87 10d891: 56 push %esi 10d892: e8 e9 35 00 00 call 110e80 10d897: 83 c4 10 add $0x10,%esp 10d89a: 85 c0 test %eax,%eax 10d89c: 75 04 jne 10d8a2 10d89e: b3 02 mov $0x2,%bl 10d8a0: eb 19 jmp 10d8bb type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 10d8a2: 50 push %eax 10d8a3: 50 push %eax 10d8a4: 68 88 da 11 00 push $0x11da88 10d8a9: 56 push %esi 10d8aa: e8 d1 35 00 00 call 110e80 10d8af: 83 c4 10 add $0x10,%esp 10d8b2: 85 c0 test %eax,%eax 10d8b4: 75 05 jne 10d8bb 10d8b6: bb 01 00 00 00 mov $0x1,%ebx type = IMFS_CURRENT_DIR; } return type; } 10d8bb: 89 d8 mov %ebx,%eax 10d8bd: 8d 65 f8 lea -0x8(%ebp),%esp 10d8c0: 5b pop %ebx 10d8c1: 5e pop %esi 10d8c2: c9 leave 10d8c3: c3 ret =============================================================================== 0010d8c4 : 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 ) { 10d8c4: 55 push %ebp 10d8c5: 89 e5 mov %esp,%ebp 10d8c7: 57 push %edi 10d8c8: 56 push %esi 10d8c9: 53 push %ebx 10d8ca: 83 ec 0c sub $0xc,%esp 10d8cd: 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, 10d8d0: 8b 0d 28 fa 11 00 mov 0x11fa28,%ecx 10d8d6: 31 d2 xor %edx,%edx 10d8d8: 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) { 10d8dd: 39 c8 cmp %ecx,%eax 10d8df: 74 0d je 10d8ee 10d8e1: d1 e0 shl %eax 10d8e3: 42 inc %edx 10d8e4: 83 fa 06 cmp $0x6,%edx 10d8e7: 75 f4 jne 10d8dd <== ALWAYS TAKEN 10d8e9: 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) 10d8ee: a3 f4 36 12 00 mov %eax,0x1236f4 /* * 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(); 10d8f3: e8 31 1e 00 00 call 10f729 10d8f8: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 10d8fb: 8b 45 14 mov 0x14(%ebp),%eax 10d8fe: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 10d901: 8b 45 0c mov 0xc(%ebp),%eax 10d904: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 10d907: 8d 7b 38 lea 0x38(%ebx),%edi 10d90a: be e4 db 11 00 mov $0x11dbe4,%esi 10d90f: b9 0c 00 00 00 mov $0xc,%ecx 10d914: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 10d916: 50 push %eax 10d917: 50 push %eax 10d918: 6a 10 push $0x10 10d91a: 6a 01 push $0x1 10d91c: e8 6b 02 00 00 call 10db8c if ( !fs_info ) { 10d921: 83 c4 10 add $0x10,%esp 10d924: 85 c0 test %eax,%eax 10d926: 75 1e jne 10d946 <== ALWAYS TAKEN free(temp_mt_entry->mt_fs_root.node_access); 10d928: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d92b: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED 10d92e: e8 bd 98 ff ff call 1071f0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 10d933: e8 2c 2a 00 00 call 110364 <__errno> <== NOT EXECUTED 10d938: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10d93e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10d941: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d944: eb 36 jmp 10d97c <== NOT EXECUTED } temp_mt_entry->fs_info = fs_info; 10d946: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 10d949: 8b 15 f8 36 12 00 mov 0x1236f8,%edx 10d94f: 89 10 mov %edx,(%eax) 10d951: 42 inc %edx 10d952: 89 15 f8 36 12 00 mov %edx,0x1236f8 fs_info->ino_count = 1; 10d958: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 10d95f: 8b 55 10 mov 0x10(%ebp),%edx 10d962: 89 50 08 mov %edx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 10d965: 8b 55 14 mov 0x14(%ebp),%edx 10d968: 89 50 0c mov %edx,0xc(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 10d96b: 8b 43 1c mov 0x1c(%ebx),%eax 10d96e: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 10d975: e8 7c 15 00 00 call 10eef6 10d97a: 31 c0 xor %eax,%eax return 0; } 10d97c: 8d 65 f4 lea -0xc(%ebp),%esp 10d97f: 5b pop %ebx 10d980: 5e pop %esi 10d981: 5f pop %edi 10d982: c9 leave 10d983: c3 ret =============================================================================== 00107bbc : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 107bbc: 55 push %ebp 107bbd: 89 e5 mov %esp,%ebp 107bbf: 57 push %edi 107bc0: 53 push %ebx 107bc1: 83 ec 50 sub $0x50,%esp 107bc4: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 107bc7: 8b 45 08 mov 0x8(%ebp),%eax 107bca: 8b 00 mov (%eax),%eax 107bcc: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 107bcf: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 107bd4: 76 0d jbe 107be3 rtems_set_errno_and_return_minus_one( EMLINK ); 107bd6: e8 b5 cf 00 00 call 114b90 <__errno> 107bdb: c7 00 1f 00 00 00 movl $0x1f,(%eax) 107be1: eb 43 jmp 107c26 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 107be3: 31 c0 xor %eax,%eax 107be5: 83 c9 ff or $0xffffffff,%ecx 107be8: 89 d7 mov %edx,%edi 107bea: f2 ae repnz scas %es:(%edi),%al 107bec: f7 d1 not %ecx 107bee: 49 dec %ecx 107bef: 8d 45 f4 lea -0xc(%ebp),%eax 107bf2: 50 push %eax 107bf3: 8d 5d b7 lea -0x49(%ebp),%ebx 107bf6: 53 push %ebx 107bf7: 51 push %ecx 107bf8: 52 push %edx 107bf9: e8 16 a1 00 00 call 111d14 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107bfe: 8d 45 d8 lea -0x28(%ebp),%eax 107c01: 89 04 24 mov %eax,(%esp) 107c04: 68 ff a1 00 00 push $0xa1ff 107c09: 53 push %ebx 107c0a: 6a 03 push $0x3 107c0c: ff 75 0c pushl 0xc(%ebp) 107c0f: e8 28 97 00 00 call 11133c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 107c14: 83 c4 20 add $0x20,%esp 107c17: 85 c0 test %eax,%eax 107c19: 75 10 jne 107c2b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 107c1b: e8 70 cf 00 00 call 114b90 <__errno> <== NOT EXECUTED 107c20: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107c26: 83 c8 ff or $0xffffffff,%eax 107c29: eb 22 jmp 107c4d /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 107c2b: 8b 45 d8 mov -0x28(%ebp),%eax 107c2e: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 107c32: 50 push %eax 107c33: 50 push %eax 107c34: 6a 00 push $0x0 107c36: 8d 45 ec lea -0x14(%ebp),%eax 107c39: 50 push %eax 107c3a: e8 f1 07 00 00 call 108430 107c3f: 8b 55 ec mov -0x14(%ebp),%edx 107c42: 8b 45 d8 mov -0x28(%ebp),%eax 107c45: 89 50 48 mov %edx,0x48(%eax) 107c48: 31 c0 xor %eax,%eax return 0; 107c4a: 83 c4 10 add $0x10,%esp } 107c4d: 8d 65 f8 lea -0x8(%ebp),%esp 107c50: 5b pop %ebx 107c51: 5f pop %edi 107c52: c9 leave 107c53: c3 ret =============================================================================== 00113a48 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 113a48: 55 push %ebp 113a49: 89 e5 mov %esp,%ebp 113a4b: 53 push %ebx 113a4c: 83 ec 04 sub $0x4,%esp 113a4f: 8b 45 08 mov 0x8(%ebp),%eax block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 113a52: 85 c0 test %eax,%eax 113a54: 75 11 jne 113a67 <== ALWAYS TAKEN 113a56: 68 90 26 12 00 push $0x122690 <== NOT EXECUTED 113a5b: 68 34 28 12 00 push $0x122834 <== NOT EXECUTED 113a60: 68 69 01 00 00 push $0x169 <== NOT EXECUTED 113a65: eb 15 jmp 113a7c <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 113a67: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 113a6b: 74 19 je 113a86 <== ALWAYS TAKEN 113a6d: 68 e0 26 12 00 push $0x1226e0 <== NOT EXECUTED 113a72: 68 34 28 12 00 push $0x122834 <== NOT EXECUTED 113a77: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED 113a7c: 68 9a 26 12 00 push $0x12269a <== NOT EXECUTED 113a81: e8 06 46 ff ff call 10808c <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 113a86: 52 push %edx 113a87: 6a 01 push $0x1 113a89: ff 75 0c pushl 0xc(%ebp) 113a8c: 50 push %eax 113a8d: e8 84 fb ff ff call 113616 113a92: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 113a94: 83 c4 10 add $0x10,%esp 113a97: 31 c0 xor %eax,%eax 113a99: 83 3b 00 cmpl $0x0,(%ebx) 113a9c: 75 14 jne 113ab2 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 113a9e: e8 51 fb ff ff call 1135f4 113aa3: 89 c2 mov %eax,%edx if ( !memory ) 113aa5: b8 01 00 00 00 mov $0x1,%eax 113aaa: 85 d2 test %edx,%edx 113aac: 74 04 je 113ab2 <== NEVER TAKEN return 1; *block_entry_ptr = memory; 113aae: 89 13 mov %edx,(%ebx) 113ab0: 30 c0 xor %al,%al return 0; } 113ab2: 8b 5d fc mov -0x4(%ebp),%ebx 113ab5: c9 leave 113ab6: c3 ret =============================================================================== 00113ab7 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 113ab7: 55 push %ebp 113ab8: 89 e5 mov %esp,%ebp 113aba: 57 push %edi 113abb: 56 push %esi 113abc: 53 push %ebx 113abd: 83 ec 2c sub $0x2c,%esp 113ac0: 8b 5d 08 mov 0x8(%ebp),%ebx 113ac3: 8b 75 0c mov 0xc(%ebp),%esi 113ac6: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 113ac9: 85 db test %ebx,%ebx 113acb: 75 11 jne 113ade <== ALWAYS TAKEN 113acd: 68 90 26 12 00 push $0x122690 <== NOT EXECUTED 113ad2: 68 4c 28 12 00 push $0x12284c <== NOT EXECUTED 113ad7: 68 31 01 00 00 push $0x131 <== NOT EXECUTED 113adc: eb 15 jmp 113af3 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 113ade: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 113ae2: 74 19 je 113afd <== ALWAYS TAKEN 113ae4: 68 e0 26 12 00 push $0x1226e0 <== NOT EXECUTED 113ae9: 68 4c 28 12 00 push $0x12284c <== NOT EXECUTED 113aee: 68 35 01 00 00 push $0x135 <== NOT EXECUTED 113af3: 68 9a 26 12 00 push $0x12269a <== NOT EXECUTED 113af8: e8 8f 45 ff ff call 10808c <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 113afd: a1 3c 82 12 00 mov 0x12823c,%eax 113b02: 89 c1 mov %eax,%ecx 113b04: c1 e9 02 shr $0x2,%ecx 113b07: 8d 51 01 lea 0x1(%ecx),%edx 113b0a: 0f af d1 imul %ecx,%edx 113b0d: 42 inc %edx 113b0e: 0f af d1 imul %ecx,%edx 113b11: 4a dec %edx 113b12: 0f af d0 imul %eax,%edx 113b15: 83 ff 00 cmp $0x0,%edi 113b18: 7c 16 jl 113b30 <== NEVER TAKEN 113b1a: 7f 04 jg 113b20 <== NEVER TAKEN 113b1c: 39 d6 cmp %edx,%esi 113b1e: 72 10 jb 113b30 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 113b20: e8 6b 10 00 00 call 114b90 <__errno> <== NOT EXECUTED 113b25: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 113b2b: e9 92 00 00 00 jmp 113bc2 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 113b30: 8b 53 50 mov 0x50(%ebx),%edx 113b33: 8b 4b 54 mov 0x54(%ebx),%ecx 113b36: 89 55 e0 mov %edx,-0x20(%ebp) 113b39: 89 4d e4 mov %ecx,-0x1c(%ebp) 113b3c: 39 cf cmp %ecx,%edi 113b3e: 7f 0e jg 113b4e <== NEVER TAKEN 113b40: 0f 8c 8d 00 00 00 jl 113bd3 <== NEVER TAKEN 113b46: 39 d6 cmp %edx,%esi 113b48: 0f 86 85 00 00 00 jbe 113bd3 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 113b4e: 89 45 d8 mov %eax,-0x28(%ebp) 113b51: 89 c1 mov %eax,%ecx 113b53: c1 f9 1f sar $0x1f,%ecx 113b56: 89 4d dc mov %ecx,-0x24(%ebp) 113b59: ff 75 dc pushl -0x24(%ebp) 113b5c: ff 75 d8 pushl -0x28(%ebp) 113b5f: 57 push %edi 113b60: 56 push %esi 113b61: e8 66 c0 00 00 call 11fbcc <__divdi3> 113b66: 83 c4 10 add $0x10,%esp 113b69: 89 45 d4 mov %eax,-0x2c(%ebp) old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 113b6c: ff 75 dc pushl -0x24(%ebp) 113b6f: ff 75 d8 pushl -0x28(%ebp) 113b72: ff 75 e4 pushl -0x1c(%ebp) 113b75: ff 75 e0 pushl -0x20(%ebp) 113b78: e8 4f c0 00 00 call 11fbcc <__divdi3> 113b7d: 83 c4 10 add $0x10,%esp 113b80: 89 45 e0 mov %eax,-0x20(%ebp) 113b83: 89 c2 mov %eax,%edx /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 113b85: eb 41 jmp 113bc8 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 113b87: 50 push %eax 113b88: 50 push %eax 113b89: 52 push %edx 113b8a: 53 push %ebx 113b8b: 89 55 d0 mov %edx,-0x30(%ebp) 113b8e: e8 b5 fe ff ff call 113a48 113b93: 83 c4 10 add $0x10,%esp 113b96: 85 c0 test %eax,%eax 113b98: 8b 55 d0 mov -0x30(%ebp),%edx 113b9b: 74 2a je 113bc7 <== ALWAYS TAKEN 113b9d: eb 13 jmp 113bb2 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 113b9f: 51 push %ecx <== NOT EXECUTED 113ba0: 51 push %ecx <== NOT EXECUTED 113ba1: 52 push %edx <== NOT EXECUTED 113ba2: 53 push %ebx <== NOT EXECUTED 113ba3: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 113ba6: e8 5c fc ff ff call 113807 <== 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-- ) { 113bab: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 113bae: 4a dec %edx <== NOT EXECUTED 113baf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 113bb2: 3b 55 e0 cmp -0x20(%ebp),%edx <== NOT EXECUTED 113bb5: 73 e8 jae 113b9f <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 113bb7: e8 d4 0f 00 00 call 114b90 <__errno> <== NOT EXECUTED 113bbc: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 113bc2: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 113bc5: eb 0e jmp 113bd5 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 113bc7: 42 inc %edx 113bc8: 3b 55 d4 cmp -0x2c(%ebp),%edx 113bcb: 76 ba jbe 113b87 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 113bcd: 89 73 50 mov %esi,0x50(%ebx) 113bd0: 89 7b 54 mov %edi,0x54(%ebx) 113bd3: 31 c0 xor %eax,%eax return 0; } 113bd5: 8d 65 f4 lea -0xc(%ebp),%esp 113bd8: 5b pop %ebx 113bd9: 5e pop %esi 113bda: 5f pop %edi 113bdb: c9 leave 113bdc: c3 ret =============================================================================== 00113616 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 113616: 55 push %ebp 113617: 89 e5 mov %esp,%ebp 113619: 57 push %edi 11361a: 56 push %esi 11361b: 53 push %ebx 11361c: 83 ec 1c sub $0x1c,%esp 11361f: 8b 5d 08 mov 0x8(%ebp),%ebx 113622: 8b 7d 0c mov 0xc(%ebp),%edi 113625: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 113628: 85 db test %ebx,%ebx 11362a: 75 11 jne 11363d <== ALWAYS TAKEN 11362c: 68 90 26 12 00 push $0x122690 <== NOT EXECUTED 113631: 68 9c 27 12 00 push $0x12279c <== NOT EXECUTED 113636: 68 88 03 00 00 push $0x388 <== NOT EXECUTED 11363b: eb 15 jmp 113652 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 11363d: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 113641: 74 19 je 11365c <== ALWAYS TAKEN 113643: 68 e0 26 12 00 push $0x1226e0 <== NOT EXECUTED 113648: 68 9c 27 12 00 push $0x12279c <== NOT EXECUTED 11364d: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED 113652: 68 9a 26 12 00 push $0x12269a <== NOT EXECUTED 113657: e8 30 4a ff ff call 10808c <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 11365c: 8b 0d 3c 82 12 00 mov 0x12823c,%ecx 113662: c1 e9 02 shr $0x2,%ecx 113665: 8d 41 ff lea -0x1(%ecx),%eax 113668: 39 c7 cmp %eax,%edi 11366a: 77 2f ja 11369b <== NEVER TAKEN #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 11366c: 8b 53 58 mov 0x58(%ebx),%edx if ( malloc_it ) { 11366f: 85 f6 test %esi,%esi 113671: 74 23 je 113696 if ( !p ) { 113673: 85 d2 test %edx,%edx 113675: 75 10 jne 113687 p = memfile_alloc_block(); 113677: e8 78 ff ff ff call 1135f4 if ( !p ) 11367c: 85 c0 test %eax,%eax 11367e: 0f 84 0f 01 00 00 je 113793 <== NEVER TAKEN return 0; info->indirect = p; 113684: 89 43 58 mov %eax,0x58(%ebx) } return &info->indirect[ my_block ]; 113687: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax 11368e: 03 43 58 add 0x58(%ebx),%eax 113691: e9 ff 00 00 00 jmp 113795 } if ( !p ) return 0; return &info->indirect[ my_block ]; 113696: 8d 04 ba lea (%edx,%edi,4),%eax 113699: eb 69 jmp 113704 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 11369b: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 11369e: 0f af c1 imul %ecx,%eax <== NOT EXECUTED 1136a1: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 1136a4: 39 d7 cmp %edx,%edi <== NOT EXECUTED 1136a6: 77 69 ja 113711 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 1136a8: 29 cf sub %ecx,%edi <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 1136aa: 89 f8 mov %edi,%eax <== NOT EXECUTED 1136ac: 31 d2 xor %edx,%edx <== NOT EXECUTED 1136ae: f7 f1 div %ecx <== NOT EXECUTED 1136b0: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 1136b3: 89 c7 mov %eax,%edi <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 1136b5: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 1136b8: 85 f6 test %esi,%esi <== NOT EXECUTED 1136ba: 74 37 je 1136f3 <== NOT EXECUTED if ( !p ) { 1136bc: 85 c0 test %eax,%eax <== NOT EXECUTED 1136be: 75 10 jne 1136d0 <== NOT EXECUTED p = memfile_alloc_block(); 1136c0: e8 2f ff ff ff call 1135f4 <== NOT EXECUTED if ( !p ) 1136c5: 85 c0 test %eax,%eax <== NOT EXECUTED 1136c7: 0f 84 c6 00 00 00 je 113793 <== NOT EXECUTED return 0; info->doubly_indirect = p; 1136cd: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 1136d0: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED 1136d3: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 1136d5: 85 c0 test %eax,%eax <== NOT EXECUTED 1136d7: 75 0f jne 1136e8 <== NOT EXECUTED p1 = memfile_alloc_block(); 1136d9: e8 16 ff ff ff call 1135f4 <== NOT EXECUTED if ( !p1 ) 1136de: 85 c0 test %eax,%eax <== NOT EXECUTED 1136e0: 0f 84 ad 00 00 00 je 113793 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 1136e6: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 1136e8: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 1136eb: 8d 04 88 lea (%eax,%ecx,4),%eax <== NOT EXECUTED 1136ee: e9 a2 00 00 00 jmp 113795 <== NOT EXECUTED } if ( !p ) 1136f3: 85 c0 test %eax,%eax <== NOT EXECUTED 1136f5: 0f 84 98 00 00 00 je 113793 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 1136fb: 8b 14 b8 mov (%eax,%edi,4),%edx <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 1136fe: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 113701: 8d 04 8a lea (%edx,%ecx,4),%eax <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 113704: 85 d2 test %edx,%edx 113706: 0f 85 89 00 00 00 jne 113795 <== ALWAYS TAKEN 11370c: e9 82 00 00 00 jmp 113793 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 113711: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 113714: 0f af d1 imul %ecx,%edx <== NOT EXECUTED 113717: 4a dec %edx <== NOT EXECUTED 113718: 39 d7 cmp %edx,%edi <== NOT EXECUTED 11371a: 77 77 ja 113793 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 11371c: 29 c7 sub %eax,%edi <== NOT EXECUTED 11371e: 89 f8 mov %edi,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 113720: 31 d2 xor %edx,%edx <== NOT EXECUTED 113722: f7 f1 div %ecx <== NOT EXECUTED 113724: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 113727: 31 d2 xor %edx,%edx <== NOT EXECUTED 113729: f7 f1 div %ecx <== NOT EXECUTED 11372b: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 11372e: 89 c7 mov %eax,%edi <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 113730: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 113733: 85 f6 test %esi,%esi <== NOT EXECUTED 113735: 74 43 je 11377a <== NOT EXECUTED if ( !p ) { 113737: 85 c0 test %eax,%eax <== NOT EXECUTED 113739: 75 0c jne 113747 <== NOT EXECUTED p = memfile_alloc_block(); 11373b: e8 b4 fe ff ff call 1135f4 <== NOT EXECUTED if ( !p ) 113740: 85 c0 test %eax,%eax <== NOT EXECUTED 113742: 74 4f je 113793 <== NOT EXECUTED return 0; info->triply_indirect = p; 113744: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 113747: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED 11374a: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 11374c: 85 c0 test %eax,%eax <== NOT EXECUTED 11374e: 75 0b jne 11375b <== NOT EXECUTED p1 = memfile_alloc_block(); 113750: e8 9f fe ff ff call 1135f4 <== NOT EXECUTED if ( !p1 ) 113755: 85 c0 test %eax,%eax <== NOT EXECUTED 113757: 74 3a je 113793 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 113759: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 11375b: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 11375e: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 113761: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p2 ) { 113763: 85 c0 test %eax,%eax <== NOT EXECUTED 113765: 75 0b jne 113772 <== NOT EXECUTED p2 = memfile_alloc_block(); 113767: e8 88 fe ff ff call 1135f4 <== NOT EXECUTED if ( !p2 ) 11376c: 85 c0 test %eax,%eax <== NOT EXECUTED 11376e: 74 23 je 113793 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 113770: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 113772: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 113775: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED 113778: eb 1b jmp 113795 <== NOT EXECUTED } if ( !p ) 11377a: 85 c0 test %eax,%eax <== NOT EXECUTED 11377c: 74 15 je 113793 <== 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 ]; 11377e: 8b 14 b8 mov (%eax,%edi,4),%edx <== NOT EXECUTED if ( !p1 ) 113781: 85 d2 test %edx,%edx <== NOT EXECUTED 113783: 74 0e je 113793 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 113785: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 113788: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED 11378b: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 11378e: 03 04 8a add (%edx,%ecx,4),%eax <== NOT EXECUTED 113791: eb 02 jmp 113795 <== NOT EXECUTED 113793: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 113795: 8d 65 f4 lea -0xc(%ebp),%esp 113798: 5b pop %ebx 113799: 5e pop %esi 11379a: 5f pop %edi 11379b: c9 leave 11379c: c3 ret =============================================================================== 00113f4e : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 113f4e: 55 push %ebp 113f4f: 89 e5 mov %esp,%ebp 113f51: 57 push %edi 113f52: 56 push %esi 113f53: 53 push %ebx 113f54: 83 ec 3c sub $0x3c,%esp 113f57: 8b 75 0c mov 0xc(%ebp),%esi 113f5a: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 113f5d: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 113f61: 75 11 jne 113f74 <== ALWAYS TAKEN 113f63: 68 90 26 12 00 push $0x122690 <== NOT EXECUTED 113f68: 68 d0 27 12 00 push $0x1227d0 <== NOT EXECUTED 113f6d: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED 113f72: eb 1d jmp 113f91 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 113f74: 8b 55 08 mov 0x8(%ebp),%edx 113f77: 8b 42 4c mov 0x4c(%edx),%eax 113f7a: 8d 48 fb lea -0x5(%eax),%ecx 113f7d: 83 f9 01 cmp $0x1,%ecx 113f80: 76 19 jbe 113f9b <== ALWAYS TAKEN 113f82: 68 4a 27 12 00 push $0x12274a <== NOT EXECUTED 113f87: 68 d0 27 12 00 push $0x1227d0 <== NOT EXECUTED 113f8c: 68 51 02 00 00 push $0x251 <== NOT EXECUTED 113f91: 68 9a 26 12 00 push $0x12269a <== NOT EXECUTED 113f96: e8 f1 40 ff ff call 10808c <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 113f9b: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 113f9f: 75 11 jne 113fb2 <== ALWAYS TAKEN 113fa1: 68 95 27 12 00 push $0x122795 <== NOT EXECUTED 113fa6: 68 d0 27 12 00 push $0x1227d0 <== NOT EXECUTED 113fab: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED 113fb0: eb df jmp 113f91 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 113fb2: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 113fb6: 75 13 jne 113fcb <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 113fb8: e8 d3 0b 00 00 call 114b90 <__errno> <== NOT EXECUTED 113fbd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 113fc3: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 113fc6: e9 d0 01 00 00 jmp 11419b <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 113fcb: 83 f8 06 cmp $0x6,%eax 113fce: 75 64 jne 114034 <== ALWAYS TAKEN unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 113fd0: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 113fd3: 8b 49 58 mov 0x58(%ecx),%ecx <== NOT EXECUTED 113fd6: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 113fd9: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 113fdc: 8b 48 50 mov 0x50(%eax),%ecx <== NOT EXECUTED 113fdf: 8b 58 54 mov 0x54(%eax),%ebx <== NOT EXECUTED 113fe2: 89 c8 mov %ecx,%eax <== NOT EXECUTED 113fe4: 89 da mov %ebx,%edx <== NOT EXECUTED 113fe6: 29 f0 sub %esi,%eax <== NOT EXECUTED 113fe8: 19 fa sbb %edi,%edx <== NOT EXECUTED 113fea: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 113fed: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 113ff0: 31 c0 xor %eax,%eax <== NOT EXECUTED 113ff2: 39 d0 cmp %edx,%eax <== NOT EXECUTED 113ff4: 7f 0f jg 114005 <== NOT EXECUTED 113ff6: 7c 08 jl 114000 <== NOT EXECUTED 113ff8: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 113ffb: 39 55 18 cmp %edx,0x18(%ebp) <== NOT EXECUTED 113ffe: 77 05 ja 114005 <== NOT EXECUTED 114000: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED 114003: eb 04 jmp 114009 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 114005: 89 ca mov %ecx,%edx <== NOT EXECUTED 114007: 29 f2 sub %esi,%edx <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 114009: 03 75 c8 add -0x38(%ebp),%esi <== NOT EXECUTED 11400c: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 11400f: 89 d1 mov %edx,%ecx <== NOT EXECUTED 114011: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED IMFS_update_atime( the_jnode ); 114013: 51 push %ecx <== NOT EXECUTED 114014: 51 push %ecx <== NOT EXECUTED 114015: 6a 00 push $0x0 <== NOT EXECUTED 114017: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 11401a: 50 push %eax <== NOT EXECUTED 11401b: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 11401e: e8 0d 44 ff ff call 108430 <== NOT EXECUTED 114023: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 114026: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 114029: 89 41 40 mov %eax,0x40(%ecx) <== NOT EXECUTED return my_length; 11402c: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 11402f: e9 64 01 00 00 jmp 114198 <== 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; 114034: 89 f0 mov %esi,%eax if ( last_byte > the_jnode->info.file.size ) 114036: 8b 55 08 mov 0x8(%ebp),%edx 114039: 8b 5a 50 mov 0x50(%edx),%ebx 11403c: 8b 4d 18 mov 0x18(%ebp),%ecx 11403f: 01 f1 add %esi,%ecx 114041: 89 4d d0 mov %ecx,-0x30(%ebp) 114044: 31 c9 xor %ecx,%ecx 114046: 3b 4a 54 cmp 0x54(%edx),%ecx 114049: 7f 0f jg 11405a <== NEVER TAKEN 11404b: 7c 05 jl 114052 <== NEVER TAKEN 11404d: 39 5d d0 cmp %ebx,-0x30(%ebp) 114050: 77 08 ja 11405a 114052: 8b 45 18 mov 0x18(%ebp),%eax 114055: 89 45 d0 mov %eax,-0x30(%ebp) 114058: eb 05 jmp 11405f my_length = the_jnode->info.file.size - start; 11405a: 29 c3 sub %eax,%ebx 11405c: 89 5d d0 mov %ebx,-0x30(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 11405f: 8b 15 3c 82 12 00 mov 0x12823c,%edx 114065: 89 55 c4 mov %edx,-0x3c(%ebp) 114068: 89 d0 mov %edx,%eax 11406a: 99 cltd 11406b: 89 d3 mov %edx,%ebx 11406d: 52 push %edx 11406e: 50 push %eax 11406f: 57 push %edi 114070: 56 push %esi 114071: 89 45 c0 mov %eax,-0x40(%ebp) 114074: e8 a3 bc 00 00 call 11fd1c <__moddi3> 114079: 83 c4 10 add $0x10,%esp 11407c: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 11407f: 8b 4d c0 mov -0x40(%ebp),%ecx 114082: 53 push %ebx 114083: 51 push %ecx 114084: 57 push %edi 114085: 56 push %esi 114086: e8 41 bb 00 00 call 11fbcc <__divdi3> 11408b: 83 c4 10 add $0x10,%esp 11408e: 89 c3 mov %eax,%ebx if ( start_offset ) { 114090: 83 7d c8 00 cmpl $0x0,-0x38(%ebp) 114094: 75 0f jne 1140a5 114096: 8b 55 14 mov 0x14(%ebp),%edx 114099: 89 55 c8 mov %edx,-0x38(%ebp) 11409c: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 1140a3: eb 4c jmp 1140f1 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 ); 1140a5: 50 push %eax 1140a6: 6a 00 push $0x0 1140a8: 53 push %ebx 1140a9: ff 75 08 pushl 0x8(%ebp) 1140ac: e8 65 f5 ff ff call 113616 assert( block_ptr ); 1140b1: 83 c4 10 add $0x10,%esp 1140b4: 85 c0 test %eax,%eax 1140b6: 75 14 jne 1140cc <== ALWAYS TAKEN 1140b8: 68 10 27 12 00 push $0x122710 <== NOT EXECUTED 1140bd: 68 d0 27 12 00 push $0x1227d0 <== NOT EXECUTED 1140c2: 68 96 02 00 00 push $0x296 <== NOT EXECUTED 1140c7: e9 c5 fe ff ff jmp 113f91 <== 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; 1140cc: 8b 4d c4 mov -0x3c(%ebp),%ecx 1140cf: 2b 4d c8 sub -0x38(%ebp),%ecx 1140d2: 8b 55 d0 mov -0x30(%ebp),%edx 1140d5: 39 ca cmp %ecx,%edx 1140d7: 76 02 jbe 1140db 1140d9: 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 ); 1140db: 8b 75 c8 mov -0x38(%ebp),%esi 1140de: 03 30 add (%eax),%esi dest += to_copy; 1140e0: 8b 7d 14 mov 0x14(%ebp),%edi 1140e3: 89 d1 mov %edx,%ecx 1140e5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 1140e7: 89 7d c8 mov %edi,-0x38(%ebp) block++; 1140ea: 43 inc %ebx my_length -= to_copy; 1140eb: 29 55 d0 sub %edx,-0x30(%ebp) 1140ee: 89 55 cc mov %edx,-0x34(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 1140f1: 8b 15 3c 82 12 00 mov 0x12823c,%edx while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1140f7: eb 40 jmp 114139 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1140f9: 57 push %edi 1140fa: 6a 00 push $0x0 1140fc: 53 push %ebx 1140fd: ff 75 08 pushl 0x8(%ebp) 114100: 89 55 c0 mov %edx,-0x40(%ebp) 114103: e8 0e f5 ff ff call 113616 assert( block_ptr ); 114108: 83 c4 10 add $0x10,%esp 11410b: 85 c0 test %eax,%eax 11410d: 8b 55 c0 mov -0x40(%ebp),%edx 114110: 75 14 jne 114126 <== ALWAYS TAKEN 114112: 68 10 27 12 00 push $0x122710 <== NOT EXECUTED 114117: 68 d0 27 12 00 push $0x1227d0 <== NOT EXECUTED 11411c: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED 114121: e9 6b fe ff ff jmp 113f91 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 114126: 8b 30 mov (%eax),%esi 114128: 8b 7d c8 mov -0x38(%ebp),%edi 11412b: 89 d1 mov %edx,%ecx 11412d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 11412f: 89 7d c8 mov %edi,-0x38(%ebp) block++; 114132: 43 inc %ebx my_length -= to_copy; 114133: 29 55 d0 sub %edx,-0x30(%ebp) copied += to_copy; 114136: 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 ) { 114139: 8b 45 d0 mov -0x30(%ebp),%eax 11413c: 3b 05 3c 82 12 00 cmp 0x12823c,%eax 114142: 73 b5 jae 1140f9 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 114144: 85 c0 test %eax,%eax 114146: 74 37 je 11417f block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 114148: 56 push %esi 114149: 6a 00 push $0x0 11414b: 53 push %ebx 11414c: ff 75 08 pushl 0x8(%ebp) 11414f: e8 c2 f4 ff ff call 113616 assert( block_ptr ); 114154: 83 c4 10 add $0x10,%esp 114157: 85 c0 test %eax,%eax 114159: 75 14 jne 11416f <== ALWAYS TAKEN 11415b: 68 10 27 12 00 push $0x122710 <== NOT EXECUTED 114160: 68 d0 27 12 00 push $0x1227d0 <== NOT EXECUTED 114165: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED 11416a: e9 22 fe ff ff jmp 113f91 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 11416f: 8b 30 mov (%eax),%esi 114171: 8b 7d c8 mov -0x38(%ebp),%edi 114174: 8b 4d d0 mov -0x30(%ebp),%ecx 114177: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 114179: 8b 55 d0 mov -0x30(%ebp),%edx 11417c: 01 55 cc add %edx,-0x34(%ebp) } IMFS_update_atime( the_jnode ); 11417f: 53 push %ebx 114180: 53 push %ebx 114181: 6a 00 push $0x0 114183: 8d 45 e0 lea -0x20(%ebp),%eax 114186: 50 push %eax 114187: e8 a4 42 ff ff call 108430 11418c: 8b 45 e0 mov -0x20(%ebp),%eax 11418f: 8b 4d 08 mov 0x8(%ebp),%ecx 114192: 89 41 40 mov %eax,0x40(%ecx) return copied; 114195: 8b 55 cc mov -0x34(%ebp),%edx 114198: 83 c4 10 add $0x10,%esp } 11419b: 89 d0 mov %edx,%eax 11419d: 8d 65 f4 lea -0xc(%ebp),%esp 1141a0: 5b pop %ebx 1141a1: 5e pop %esi 1141a2: 5f pop %edi 1141a3: c9 leave 1141a4: c3 ret =============================================================================== 00113852 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 113852: 55 push %ebp 113853: 89 e5 mov %esp,%ebp 113855: 57 push %edi 113856: 56 push %esi 113857: 53 push %ebx 113858: 83 ec 1c sub $0x1c,%esp 11385b: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Perform internal consistency checks */ assert( the_jnode ); 11385e: 85 db test %ebx,%ebx 113860: 75 11 jne 113873 <== ALWAYS TAKEN 113862: 68 90 26 12 00 push $0x122690 <== NOT EXECUTED 113867: 68 e4 27 12 00 push $0x1227e4 <== NOT EXECUTED 11386c: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED 113871: eb 15 jmp 113888 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 113873: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 113877: 74 19 je 113892 <== ALWAYS TAKEN 113879: 68 e0 26 12 00 push $0x1226e0 <== NOT EXECUTED 11387e: 68 e4 27 12 00 push $0x1227e4 <== NOT EXECUTED 113883: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED 113888: 68 9a 26 12 00 push $0x12269a <== NOT EXECUTED 11388d: e8 fa 47 ff ff call 10808c <__assert_func> <== NOT EXECUTED /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 113892: 8b 35 3c 82 12 00 mov 0x12823c,%esi 113898: c1 ee 02 shr $0x2,%esi * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 11389b: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 11389f: 74 0f je 1138b0 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 1138a1: 57 push %edi 1138a2: 57 push %edi 1138a3: 56 push %esi 1138a4: 8d 43 58 lea 0x58(%ebx),%eax 1138a7: 50 push %eax 1138a8: e8 f0 fe ff ff call 11379d 1138ad: 83 c4 10 add $0x10,%esp * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 1138b0: 31 ff xor %edi,%edi 1138b2: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 1138b6: 75 21 jne 1138d9 <== NEVER TAKEN 1138b8: eb 3a jmp 1138f4 } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 1138ba: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 1138bd: 8d 14 bd 00 00 00 00 lea 0x0(,%edi,4),%edx <== NOT EXECUTED 1138c4: 83 3c b8 00 cmpl $0x0,(%eax,%edi,4) <== NOT EXECUTED 1138c8: 74 0e je 1138d8 <== NOT EXECUTED memfile_free_blocks_in_table( 1138ca: 51 push %ecx <== NOT EXECUTED 1138cb: 51 push %ecx <== NOT EXECUTED 1138cc: 56 push %esi <== NOT EXECUTED 1138cd: 01 d0 add %edx,%eax <== NOT EXECUTED 1138cf: 50 push %eax <== NOT EXECUTED 1138d0: e8 c8 fe ff ff call 11379d <== NOT EXECUTED 1138d5: 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 ); 1138e5: 57 push %edi <== NOT EXECUTED 1138e6: 57 push %edi <== NOT EXECUTED 1138e7: 56 push %esi <== NOT EXECUTED 1138e8: 8d 43 5c lea 0x5c(%ebx),%eax <== NOT EXECUTED 1138eb: 50 push %eax <== NOT EXECUTED 1138ec: e8 ac fe ff ff call 11379d <== NOT EXECUTED 1138f1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 1138f4: 31 ff xor %edi,%edi 1138f6: 83 7b 60 00 cmpl $0x0,0x60(%ebx) 1138fa: 75 5b jne 113957 <== NEVER TAKEN 1138fc: eb 74 jmp 113972 1138fe: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax <== NOT EXECUTED 113905: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 113908: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 11390b: 8b 04 b8 mov (%eax,%edi,4),%eax <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 11390e: 85 c0 test %eax,%eax <== NOT EXECUTED 113910: 74 51 je 113963 <== NOT EXECUTED 113912: 31 d2 xor %edx,%edx <== NOT EXECUTED 113914: eb 21 jmp 113937 <== NOT EXECUTED break; for ( j=0 ; j<== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 11391b: 51 push %ecx <== NOT EXECUTED 11391c: 51 push %ecx <== NOT EXECUTED 11391d: 56 push %esi <== NOT EXECUTED 11391e: 50 push %eax <== NOT EXECUTED 11391f: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 113922: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 113925: e8 73 fe ff ff call 11379d <== NOT EXECUTED 11392a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11392d: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 113930: 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( 113944: 52 push %edx <== NOT EXECUTED 113945: 52 push %edx <== NOT EXECUTED 113946: 56 push %esi <== NOT EXECUTED 113947: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 11394a: 03 43 60 add 0x60(%ebx),%eax <== NOT EXECUTED 11394d: 50 push %eax <== NOT EXECUTED 11394e: e8 4a fe ff ff call 11379d <== 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( 113963: 50 push %eax <== NOT EXECUTED 113964: 50 push %eax <== NOT EXECUTED 113965: 56 push %esi <== NOT EXECUTED 113966: 83 c3 60 add $0x60,%ebx <== NOT EXECUTED 113969: 53 push %ebx <== NOT EXECUTED 11396a: e8 2e fe ff ff call 11379d <== NOT EXECUTED 11396f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 113972: 31 c0 xor %eax,%eax 113974: 8d 65 f4 lea -0xc(%ebp),%esp 113977: 5b pop %ebx 113978: 5e pop %esi 113979: 5f pop %edi 11397a: c9 leave 11397b: c3 ret =============================================================================== 00113807 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 113807: 55 push %ebp <== NOT EXECUTED 113808: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11380a: 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 ); 11380d: 6a 00 push $0x0 <== NOT EXECUTED 11380f: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 113812: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 113815: e8 fc fd ff ff call 113616 <== NOT EXECUTED assert( block_ptr ); 11381a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11381d: 85 c0 test %eax,%eax <== NOT EXECUTED 11381f: 75 19 jne 11383a <== NOT EXECUTED 113821: 68 10 27 12 00 push $0x122710 <== NOT EXECUTED 113826: 68 18 28 12 00 push $0x122818 <== NOT EXECUTED 11382b: 68 96 01 00 00 push $0x196 <== NOT EXECUTED 113830: 68 9a 26 12 00 push $0x12269a <== NOT EXECUTED 113835: e8 52 48 ff ff call 10808c <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 11383a: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 11383c: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 113842: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113845: 52 push %edx <== NOT EXECUTED 113846: e8 90 fd ff ff call 1135db <== NOT EXECUTED } return 1; } 11384b: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 113850: c9 leave <== NOT EXECUTED 113851: c3 ret <== NOT EXECUTED =============================================================================== 00113c9a : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 113c9a: 55 push %ebp 113c9b: 89 e5 mov %esp,%ebp 113c9d: 57 push %edi 113c9e: 56 push %esi 113c9f: 53 push %ebx 113ca0: 83 ec 3c sub $0x3c,%esp 113ca3: 8b 75 0c mov 0xc(%ebp),%esi 113ca6: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 113ca9: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 113cad: 75 11 jne 113cc0 <== ALWAYS TAKEN 113caf: 68 90 26 12 00 push $0x122690 <== NOT EXECUTED 113cb4: 68 bc 27 12 00 push $0x1227bc <== NOT EXECUTED 113cb9: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED 113cbe: eb 18 jmp 113cd8 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 113cc0: 8b 45 08 mov 0x8(%ebp),%eax 113cc3: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 113cc7: 74 19 je 113ce2 <== ALWAYS TAKEN 113cc9: 68 e0 26 12 00 push $0x1226e0 <== NOT EXECUTED 113cce: 68 bc 27 12 00 push $0x1227bc <== NOT EXECUTED 113cd3: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED 113cd8: 68 9a 26 12 00 push $0x12269a <== NOT EXECUTED 113cdd: e8 aa 43 ff ff call 10808c <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 113ce2: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 113ce6: 75 11 jne 113cf9 <== ALWAYS TAKEN 113ce8: 68 1a 27 12 00 push $0x12271a <== NOT EXECUTED 113ced: 68 bc 27 12 00 push $0x1227bc <== NOT EXECUTED 113cf2: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED 113cf7: eb df jmp 113cd8 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 113cf9: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 113cfd: 75 0d jne 113d0c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 113cff: e8 8c 0e 00 00 call 114b90 <__errno> <== NOT EXECUTED 113d04: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 113d0a: eb 33 jmp 113d3f <== 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 ) { 113d0c: 8b 45 18 mov 0x18(%ebp),%eax 113d0f: 01 f0 add %esi,%eax 113d11: 31 d2 xor %edx,%edx 113d13: 8b 4d 08 mov 0x8(%ebp),%ecx 113d16: 3b 51 54 cmp 0x54(%ecx),%edx 113d19: 7c 2c jl 113d47 <== NEVER TAKEN 113d1b: 7f 05 jg 113d22 <== NEVER TAKEN 113d1d: 3b 41 50 cmp 0x50(%ecx),%eax 113d20: 76 25 jbe 113d47 <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 113d22: 51 push %ecx 113d23: 52 push %edx 113d24: 50 push %eax 113d25: ff 75 08 pushl 0x8(%ebp) 113d28: e8 8a fd ff ff call 113ab7 if ( status ) 113d2d: 83 c4 10 add $0x10,%esp 113d30: 85 c0 test %eax,%eax 113d32: 74 13 je 113d47 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 113d34: e8 57 0e 00 00 call 114b90 <__errno> <== NOT EXECUTED 113d39: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 113d3f: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 113d42: e9 3b 01 00 00 jmp 113e82 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 113d47: a1 3c 82 12 00 mov 0x12823c,%eax 113d4c: 89 45 c8 mov %eax,-0x38(%ebp) 113d4f: 99 cltd 113d50: 89 d3 mov %edx,%ebx 113d52: 52 push %edx 113d53: 50 push %eax 113d54: 57 push %edi 113d55: 56 push %esi 113d56: 89 45 c4 mov %eax,-0x3c(%ebp) 113d59: e8 be bf 00 00 call 11fd1c <__moddi3> 113d5e: 83 c4 10 add $0x10,%esp 113d61: 89 45 cc mov %eax,-0x34(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 113d64: 8b 4d c4 mov -0x3c(%ebp),%ecx 113d67: 53 push %ebx 113d68: 51 push %ecx 113d69: 57 push %edi 113d6a: 56 push %esi 113d6b: e8 5c be 00 00 call 11fbcc <__divdi3> 113d70: 83 c4 10 add $0x10,%esp 113d73: 89 45 d0 mov %eax,-0x30(%ebp) if ( start_offset ) { 113d76: 83 7d cc 00 cmpl $0x0,-0x34(%ebp) 113d7a: 75 0d jne 113d89 113d7c: 8b 75 14 mov 0x14(%ebp),%esi 113d7f: 8b 55 18 mov 0x18(%ebp),%edx 113d82: 89 55 d4 mov %edx,-0x2c(%ebp) 113d85: 31 db xor %ebx,%ebx 113d87: eb 52 jmp 113ddb 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 ); 113d89: 50 push %eax 113d8a: 6a 00 push $0x0 113d8c: ff 75 d0 pushl -0x30(%ebp) 113d8f: ff 75 08 pushl 0x8(%ebp) 113d92: e8 7f f8 ff ff call 113616 assert( block_ptr ); 113d97: 83 c4 10 add $0x10,%esp 113d9a: 85 c0 test %eax,%eax 113d9c: 75 14 jne 113db2 <== ALWAYS TAKEN 113d9e: 68 10 27 12 00 push $0x122710 <== NOT EXECUTED 113da3: 68 bc 27 12 00 push $0x1227bc <== NOT EXECUTED 113da8: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED 113dad: e9 26 ff ff ff jmp 113cd8 <== 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; 113db2: 8b 55 c8 mov -0x38(%ebp),%edx 113db5: 2b 55 cc sub -0x34(%ebp),%edx 113db8: 3b 55 18 cmp 0x18(%ebp),%edx 113dbb: 76 03 jbe 113dc0 113dbd: 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 ); 113dc0: 8b 00 mov (%eax),%eax 113dc2: 03 45 cc add -0x34(%ebp),%eax src += to_copy; 113dc5: 89 c7 mov %eax,%edi 113dc7: 8b 75 14 mov 0x14(%ebp),%esi 113dca: 89 d1 mov %edx,%ecx 113dcc: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 113dce: ff 45 d0 incl -0x30(%ebp) my_length -= to_copy; 113dd1: 8b 4d 18 mov 0x18(%ebp),%ecx 113dd4: 29 d1 sub %edx,%ecx 113dd6: 89 4d d4 mov %ecx,-0x2c(%ebp) copied += to_copy; 113dd9: 89 d3 mov %edx,%ebx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 113ddb: 8b 15 3c 82 12 00 mov 0x12823c,%edx while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 113de1: eb 3f jmp 113e22 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 113de3: 57 push %edi 113de4: 6a 00 push $0x0 113de6: ff 75 d0 pushl -0x30(%ebp) 113de9: ff 75 08 pushl 0x8(%ebp) 113dec: 89 55 c4 mov %edx,-0x3c(%ebp) 113def: e8 22 f8 ff ff call 113616 assert( block_ptr ); 113df4: 83 c4 10 add $0x10,%esp 113df7: 85 c0 test %eax,%eax 113df9: 8b 55 c4 mov -0x3c(%ebp),%edx 113dfc: 75 14 jne 113e12 <== ALWAYS TAKEN 113dfe: 68 10 27 12 00 push $0x122710 <== NOT EXECUTED 113e03: 68 bc 27 12 00 push $0x1227bc <== NOT EXECUTED 113e08: 68 30 03 00 00 push $0x330 <== NOT EXECUTED 113e0d: e9 c6 fe ff ff jmp 113cd8 <== 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 ); 113e12: 8b 00 mov (%eax),%eax src += to_copy; 113e14: 89 c7 mov %eax,%edi 113e16: 89 d1 mov %edx,%ecx 113e18: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 113e1a: ff 45 d0 incl -0x30(%ebp) my_length -= to_copy; 113e1d: 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( 113e20: 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 ) { 113e22: 8b 45 d4 mov -0x2c(%ebp),%eax 113e25: 3b 05 3c 82 12 00 cmp 0x12823c,%eax 113e2b: 73 b6 jae 113de3 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 113e2d: 85 c0 test %eax,%eax 113e2f: 74 35 je 113e66 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 113e31: 51 push %ecx 113e32: 6a 00 push $0x0 113e34: ff 75 d0 pushl -0x30(%ebp) 113e37: ff 75 08 pushl 0x8(%ebp) 113e3a: e8 d7 f7 ff ff call 113616 assert( block_ptr ); 113e3f: 83 c4 10 add $0x10,%esp 113e42: 85 c0 test %eax,%eax 113e44: 75 14 jne 113e5a <== ALWAYS TAKEN 113e46: 68 10 27 12 00 push $0x122710 <== NOT EXECUTED 113e4b: 68 bc 27 12 00 push $0x1227bc <== NOT EXECUTED 113e50: 68 46 03 00 00 push $0x346 <== NOT EXECUTED 113e55: e9 7e fe ff ff jmp 113cd8 <== 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 ); 113e5a: 8b 00 mov (%eax),%eax 113e5c: 89 c7 mov %eax,%edi 113e5e: 8b 4d d4 mov -0x2c(%ebp),%ecx 113e61: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 113e63: 03 5d d4 add -0x2c(%ebp),%ebx } IMFS_mtime_ctime_update( the_jnode ); 113e66: 52 push %edx 113e67: 52 push %edx 113e68: 6a 00 push $0x0 113e6a: 8d 45 e0 lea -0x20(%ebp),%eax 113e6d: 50 push %eax 113e6e: e8 bd 45 ff ff call 108430 113e73: 8b 45 e0 mov -0x20(%ebp),%eax 113e76: 8b 55 08 mov 0x8(%ebp),%edx 113e79: 89 42 44 mov %eax,0x44(%edx) 113e7c: 89 42 48 mov %eax,0x48(%edx) return copied; 113e7f: 83 c4 10 add $0x10,%esp } 113e82: 89 d8 mov %ebx,%eax 113e84: 8d 65 f4 lea -0xc(%ebp),%esp 113e87: 5b pop %ebx 113e88: 5e pop %esi 113e89: 5f pop %edi 113e8a: c9 leave 113e8b: c3 ret =============================================================================== 0010d984 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10d984: 55 push %ebp 10d985: 89 e5 mov %esp,%ebp 10d987: 57 push %edi 10d988: 56 push %esi 10d989: 53 push %ebx 10d98a: 83 ec 4c sub $0x4c,%esp 10d98d: 8b 55 08 mov 0x8(%ebp),%edx 10d990: 8b 5d 10 mov 0x10(%ebp),%ebx 10d993: 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 ); 10d996: 31 c0 xor %eax,%eax 10d998: 83 c9 ff or $0xffffffff,%ecx 10d99b: 89 d7 mov %edx,%edi 10d99d: f2 ae repnz scas %es:(%edi),%al 10d99f: f7 d1 not %ecx 10d9a1: 49 dec %ecx 10d9a2: 8d 45 e4 lea -0x1c(%ebp),%eax 10d9a5: 50 push %eax 10d9a6: 8d 45 af lea -0x51(%ebp),%eax 10d9a9: 50 push %eax 10d9aa: 51 push %ecx 10d9ab: 52 push %edx 10d9ac: e8 6b fe ff ff call 10d81c /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 10d9b1: 8b 45 0c mov 0xc(%ebp),%eax 10d9b4: 25 00 f0 00 00 and $0xf000,%eax 10d9b9: 83 c4 10 add $0x10,%esp 10d9bc: 3d 00 40 00 00 cmp $0x4000,%eax 10d9c1: 74 40 je 10da03 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 10d9c3: ba 05 00 00 00 mov $0x5,%edx 10d9c8: 3d 00 80 00 00 cmp $0x8000,%eax 10d9cd: 74 39 je 10da08 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 10d9cf: 3d 00 20 00 00 cmp $0x2000,%eax 10d9d4: 74 07 je 10d9dd 10d9d6: 3d 00 60 00 00 cmp $0x6000,%eax 10d9db: 75 0d jne 10d9ea type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 10d9dd: 89 5d d0 mov %ebx,-0x30(%ebp) 10d9e0: 89 75 d4 mov %esi,-0x2c(%ebp) 10d9e3: ba 02 00 00 00 mov $0x2,%edx 10d9e8: eb 1e jmp 10da08 } else if (S_ISFIFO(mode)) 10d9ea: ba 07 00 00 00 mov $0x7,%edx 10d9ef: 3d 00 10 00 00 cmp $0x1000,%eax 10d9f4: 74 12 je 10da08 <== ALWAYS TAKEN type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 10d9f6: e8 69 29 00 00 call 110364 <__errno> <== NOT EXECUTED 10d9fb: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10da01: eb 32 jmp 10da35 <== NOT EXECUTED 10da03: 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( 10da08: 83 ec 0c sub $0xc,%esp 10da0b: 8d 45 d0 lea -0x30(%ebp),%eax 10da0e: 50 push %eax 10da0f: ff 75 0c pushl 0xc(%ebp) 10da12: 8d 45 af lea -0x51(%ebp),%eax 10da15: 50 push %eax 10da16: 52 push %edx 10da17: ff 75 18 pushl 0x18(%ebp) 10da1a: e8 3d 1d 00 00 call 10f75c 10da1f: 89 c2 mov %eax,%edx new_name, mode, &info ); if ( !new_node ) 10da21: 83 c4 20 add $0x20,%esp 10da24: 31 c0 xor %eax,%eax 10da26: 85 d2 test %edx,%edx 10da28: 75 0e jne 10da38 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 10da2a: e8 35 29 00 00 call 110364 <__errno> <== NOT EXECUTED 10da2f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10da35: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return 0; } 10da38: 8d 65 f4 lea -0xc(%ebp),%esp 10da3b: 5b pop %ebx 10da3c: 5e pop %esi 10da3d: 5f pop %edi 10da3e: c9 leave 10da3f: c3 ret =============================================================================== 00107d10 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107d10: 55 push %ebp 107d11: 89 e5 mov %esp,%ebp 107d13: 83 ec 08 sub $0x8,%esp 107d16: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 107d19: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107d1c: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107d20: 74 10 je 107d32 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 107d22: e8 69 ce 00 00 call 114b90 <__errno> <== NOT EXECUTED 107d27: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107d2d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d30: eb 05 jmp 107d37 <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 107d32: 89 50 5c mov %edx,0x5c(%eax) 107d35: 31 c0 xor %eax,%eax return 0; } 107d37: c9 leave 107d38: c3 ret =============================================================================== 00108d1e : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 108d1e: 55 push %ebp 108d1f: 89 e5 mov %esp,%ebp 108d21: 53 push %ebx 108d22: 83 ec 04 sub $0x4,%esp 108d25: 8b 5d 08 mov 0x8(%ebp),%ebx assert( the_jnode ); 108d28: 85 db test %ebx,%ebx 108d2a: 75 11 jne 108d3d <== ALWAYS TAKEN 108d2c: 68 98 3b 12 00 push $0x123b98 <== NOT EXECUTED 108d31: 68 4c 3d 12 00 push $0x123d4c <== NOT EXECUTED 108d36: 6a 38 push $0x38 <== NOT EXECUTED 108d38: e9 98 00 00 00 jmp 108dd5 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 108d3d: 50 push %eax 108d3e: 50 push %eax 108d3f: a1 00 80 12 00 mov 0x128000,%eax 108d44: ff 70 08 pushl 0x8(%eax) 108d47: 8d 43 0c lea 0xc(%ebx),%eax 108d4a: 50 push %eax 108d4b: e8 50 c1 00 00 call 114ea0 switch( the_jnode->type ) { 108d50: 8b 43 4c mov 0x4c(%ebx),%eax 108d53: 83 c4 10 add $0x10,%esp 108d56: 8d 50 ff lea -0x1(%eax),%edx 108d59: 83 fa 06 cmp $0x6,%edx 108d5c: 0f 87 b7 00 00 00 ja 108e19 <== NEVER TAKEN 108d62: a1 00 80 12 00 mov 0x128000,%eax 108d67: ff 24 95 1c 3d 12 00 jmp *0x123d1c(,%edx,4) case IMFS_DIRECTORY: fprintf(stdout, "/" ); 108d6e: 53 push %ebx 108d6f: 53 push %ebx 108d70: ff 70 08 pushl 0x8(%eax) 108d73: 6a 2f push $0x2f 108d75: e8 3a c0 00 00 call 114db4 108d7a: eb 2b jmp 108da7 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 108d7c: ff 73 54 pushl 0x54(%ebx) 108d7f: ff 73 50 pushl 0x50(%ebx) 108d82: 68 eb 3b 12 00 push $0x123beb 108d87: eb 16 jmp 108d9f the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 108d89: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 108d8c: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 108d8f: 68 fe 3b 12 00 push $0x123bfe <== NOT EXECUTED 108d94: eb 09 jmp 108d9f <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 108d96: 51 push %ecx 108d97: ff 73 50 pushl 0x50(%ebx) 108d9a: 68 0d 3c 12 00 push $0x123c0d 108d9f: ff 70 08 pushl 0x8(%eax) 108da2: e8 d1 bf 00 00 call 114d78 (uint32_t)the_jnode->info.file.size ); #endif break; 108da7: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 108daa: c7 45 08 31 3f 12 00 movl $0x123f31,0x8(%ebp) } 108db1: 8b 5d fc mov -0x4(%ebp),%ebx 108db4: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 108db5: e9 26 d9 00 00 jmp 1166e0 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 108dba: 52 push %edx <== NOT EXECUTED 108dbb: 52 push %edx <== NOT EXECUTED 108dbc: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108dbf: 68 19 3c 12 00 push $0x123c19 <== NOT EXECUTED 108dc4: e8 d7 c0 00 00 call 114ea0 <== NOT EXECUTED assert(0); 108dc9: 68 e8 33 12 00 push $0x1233e8 <== NOT EXECUTED 108dce: 68 4c 3d 12 00 push $0x123d4c <== NOT EXECUTED 108dd3: 6a 5d push $0x5d <== NOT EXECUTED 108dd5: 68 a2 3b 12 00 push $0x123ba2 <== NOT EXECUTED 108dda: e8 c1 07 00 00 call 1095a0 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 108ddf: 53 push %ebx <== NOT EXECUTED 108de0: 53 push %ebx <== NOT EXECUTED 108de1: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108de4: 68 19 3c 12 00 push $0x123c19 <== NOT EXECUTED 108de9: e8 b2 c0 00 00 call 114ea0 <== NOT EXECUTED assert(0); 108dee: 68 e8 33 12 00 push $0x1233e8 <== NOT EXECUTED 108df3: 68 4c 3d 12 00 push $0x123d4c <== NOT EXECUTED 108df8: 6a 62 push $0x62 <== NOT EXECUTED 108dfa: eb d9 jmp 108dd5 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 108dfc: 51 push %ecx <== NOT EXECUTED 108dfd: 51 push %ecx <== NOT EXECUTED 108dfe: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108e01: 68 2d 3c 12 00 push $0x123c2d <== NOT EXECUTED 108e06: e8 95 c0 00 00 call 114ea0 <== NOT EXECUTED assert(0); 108e0b: 68 e8 33 12 00 push $0x1233e8 <== NOT EXECUTED 108e10: 68 4c 3d 12 00 push $0x123d4c <== NOT EXECUTED 108e15: 6a 67 push $0x67 <== NOT EXECUTED 108e17: eb bc jmp 108dd5 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 108e19: 52 push %edx <== NOT EXECUTED 108e1a: 50 push %eax <== NOT EXECUTED 108e1b: 68 40 3c 12 00 push $0x123c40 <== NOT EXECUTED 108e20: a1 00 80 12 00 mov 0x128000,%eax <== NOT EXECUTED 108e25: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108e28: e8 4b bf 00 00 call 114d78 <== NOT EXECUTED assert(0); 108e2d: 68 e8 33 12 00 push $0x1233e8 <== NOT EXECUTED 108e32: 68 4c 3d 12 00 push $0x123d4c <== NOT EXECUTED 108e37: 6a 6c push $0x6c <== NOT EXECUTED 108e39: eb 9a jmp 108dd5 <== NOT EXECUTED =============================================================================== 00107d4c : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 107d4c: 55 push %ebp 107d4d: 89 e5 mov %esp,%ebp 107d4f: 56 push %esi 107d50: 53 push %ebx 107d51: 8b 75 0c mov 0xc(%ebp),%esi 107d54: 8b 5d 10 mov 0x10(%ebp),%ebx IMFS_jnode_t *node; int i; node = loc->node_access; 107d57: 8b 45 08 mov 0x8(%ebp),%eax 107d5a: 8b 10 mov (%eax),%edx if ( node->type != IMFS_SYM_LINK ) 107d5c: 31 c0 xor %eax,%eax 107d5e: 83 7a 4c 04 cmpl $0x4,0x4c(%edx) 107d62: 74 14 je 107d78 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 107d64: e8 27 ce 00 00 call 114b90 <__errno> <== NOT EXECUTED 107d69: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107d6f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d72: eb 12 jmp 107d86 <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 107d74: 88 0c 06 mov %cl,(%esi,%eax,1) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107d77: 40 inc %eax 107d78: 39 d8 cmp %ebx,%eax 107d7a: 73 0a jae 107d86 107d7c: 8b 4a 50 mov 0x50(%edx),%ecx 107d7f: 8a 0c 01 mov (%ecx,%eax,1),%cl 107d82: 84 c9 test %cl,%cl 107d84: 75 ee jne 107d74 buf[i] = node->info.sym_link.name[i]; return i; } 107d86: 5b pop %ebx 107d87: 5e pop %esi 107d88: c9 leave 107d89: c3 ret =============================================================================== 00107d8c : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 107d8c: 55 push %ebp 107d8d: 89 e5 mov %esp,%ebp 107d8f: 53 push %ebx 107d90: 83 ec 18 sub $0x18,%esp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 107d93: 8b 45 0c mov 0xc(%ebp),%eax 107d96: 8b 18 mov (%eax),%ebx strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 107d98: 6a 20 push $0x20 107d9a: ff 75 14 pushl 0x14(%ebp) 107d9d: 8d 43 0c lea 0xc(%ebx),%eax 107da0: 50 push %eax 107da1: e8 72 da 00 00 call 115818 if ( the_jnode->Parent != NULL ) 107da6: 83 c4 10 add $0x10,%esp 107da9: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 107dad: 74 0c je 107dbb <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 107daf: 83 ec 0c sub $0xc,%esp 107db2: 53 push %ebx 107db3: e8 b4 40 00 00 call 10be6c <_Chain_Extract> 107db8: 83 c4 10 add $0x10,%esp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 107dbb: 8b 45 10 mov 0x10(%ebp),%eax 107dbe: 8b 00 mov (%eax),%eax the_jnode->Parent = new_parent; 107dc0: 89 43 08 mov %eax,0x8(%ebx) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 107dc3: 51 push %ecx 107dc4: 51 push %ecx 107dc5: 53 push %ebx 107dc6: 83 c0 50 add $0x50,%eax 107dc9: 50 push %eax 107dca: e8 79 40 00 00 call 10be48 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 107dcf: 58 pop %eax 107dd0: 5a pop %edx 107dd1: 6a 00 push $0x0 107dd3: 8d 45 f0 lea -0x10(%ebp),%eax 107dd6: 50 push %eax 107dd7: e8 54 06 00 00 call 108430 107ddc: 8b 45 f0 mov -0x10(%ebp),%eax 107ddf: 89 43 48 mov %eax,0x48(%ebx) return 0; } 107de2: 31 c0 xor %eax,%eax 107de4: 8b 5d fc mov -0x4(%ebp),%ebx 107de7: c9 leave 107de8: c3 ret =============================================================================== 0010da50 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 10da50: 55 push %ebp 10da51: 89 e5 mov %esp,%ebp 10da53: 56 push %esi 10da54: 53 push %ebx 10da55: 83 ec 10 sub $0x10,%esp 10da58: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 10da5b: 8b 1e mov (%esi),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 10da5d: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10da61: 74 13 je 10da76 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10da63: 83 ec 0c sub $0xc,%esp 10da66: 53 push %ebx 10da67: e8 60 09 00 00 call 10e3cc <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 10da6c: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10da73: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 10da76: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 10da7a: 50 push %eax 10da7b: 50 push %eax 10da7c: 6a 00 push $0x0 10da7e: 8d 45 f0 lea -0x10(%ebp),%eax 10da81: 50 push %eax 10da82: e8 7d 02 00 00 call 10dd04 10da87: 8b 45 f0 mov -0x10(%ebp),%eax 10da8a: 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) ) { 10da8d: 89 1c 24 mov %ebx,(%esp) 10da90: e8 21 03 00 00 call 10ddb6 10da95: 83 c4 10 add $0x10,%esp 10da98: 85 c0 test %eax,%eax 10da9a: 75 3f jne 10dadb <== NEVER TAKEN 10da9c: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 10daa1: 75 38 jne 10dadb <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 10daa3: a1 28 18 12 00 mov 0x121828,%eax 10daa8: 8b 50 04 mov 0x4(%eax),%edx 10daab: 3b 16 cmp (%esi),%edx 10daad: 75 07 jne 10dab6 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 10daaf: 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 ) { 10dab6: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 10daba: 75 13 jne 10dacf if ( the_jnode->info.sym_link.name ) 10dabc: 8b 43 50 mov 0x50(%ebx),%eax 10dabf: 85 c0 test %eax,%eax 10dac1: 74 0c je 10dacf <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); 10dac3: 83 ec 0c sub $0xc,%esp 10dac6: 50 push %eax 10dac7: e8 24 97 ff ff call 1071f0 10dacc: 83 c4 10 add $0x10,%esp } free( the_jnode ); 10dacf: 83 ec 0c sub $0xc,%esp 10dad2: 53 push %ebx 10dad3: e8 18 97 ff ff call 1071f0 10dad8: 83 c4 10 add $0x10,%esp } return 0; } 10dadb: 31 c0 xor %eax,%eax 10dadd: 8d 65 f8 lea -0x8(%ebp),%esp 10dae0: 5b pop %ebx 10dae1: 5e pop %esi 10dae2: c9 leave 10dae3: c3 ret =============================================================================== 0010dae4 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 10dae4: 55 push %ebp 10dae5: 89 e5 mov %esp,%ebp 10dae7: 56 push %esi 10dae8: 53 push %ebx 10dae9: 8b 4d 08 mov 0x8(%ebp),%ecx 10daec: 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; 10daef: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 10daf1: 8b 5a 4c mov 0x4c(%edx),%ebx 10daf4: 83 eb 02 sub $0x2,%ebx 10daf7: 83 fb 05 cmp $0x5,%ebx 10dafa: 77 33 ja 10db2f <== NEVER TAKEN 10dafc: ff 24 9d fc da 11 00 jmp *0x11dafc(,%ebx,4) case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 10db03: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 10db06: 8b 72 50 mov 0x50(%edx),%esi 10db09: 89 70 18 mov %esi,0x18(%eax) 10db0c: 89 58 1c mov %ebx,0x1c(%eax) break; 10db0f: eb 2e jmp 10db3f case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 10db11: 8b 5a 50 mov 0x50(%edx),%ebx 10db14: 8b 72 54 mov 0x54(%edx),%esi 10db17: 89 58 20 mov %ebx,0x20(%eax) 10db1a: 89 70 24 mov %esi,0x24(%eax) break; 10db1d: eb 20 jmp 10db3f case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 10db1f: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED 10db26: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) <== NOT EXECUTED break; 10db2d: eb 10 jmp 10db3f <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10db2f: e8 30 28 00 00 call 110364 <__errno> <== NOT EXECUTED 10db34: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10db3a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10db3d: eb 47 jmp 10db86 <== 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 ); 10db3f: 8b 49 10 mov 0x10(%ecx),%ecx 10db42: 8b 49 34 mov 0x34(%ecx),%ecx 10db45: 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 = 10db47: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 10db4d: 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; 10db50: 8b 4a 30 mov 0x30(%edx),%ecx 10db53: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 10db56: 8b 4a 34 mov 0x34(%edx),%ecx 10db59: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 10db5d: 8b 4a 38 mov 0x38(%edx),%ecx 10db60: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 10db63: 8b 4a 3c mov 0x3c(%edx),%ecx 10db66: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 10db6a: 66 8b 4a 3e mov 0x3e(%edx),%cx 10db6e: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 10db72: 8b 4a 40 mov 0x40(%edx),%ecx 10db75: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 10db78: 8b 4a 44 mov 0x44(%edx),%ecx 10db7b: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 10db7e: 8b 52 48 mov 0x48(%edx),%edx 10db81: 89 50 38 mov %edx,0x38(%eax) 10db84: 31 c0 xor %eax,%eax return 0; } 10db86: 5b pop %ebx 10db87: 5e pop %esi 10db88: c9 leave 10db89: c3 ret =============================================================================== 00107dec : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 107dec: 55 push %ebp 107ded: 89 e5 mov %esp,%ebp 107def: 57 push %edi 107df0: 53 push %ebx 107df1: 83 ec 40 sub $0x40,%esp 107df4: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 107df7: 31 c0 xor %eax,%eax 107df9: 83 c9 ff or $0xffffffff,%ecx 107dfc: 89 d7 mov %edx,%edi 107dfe: f2 ae repnz scas %es:(%edi),%al 107e00: f7 d1 not %ecx 107e02: 49 dec %ecx 107e03: 8d 45 f4 lea -0xc(%ebp),%eax 107e06: 50 push %eax 107e07: 8d 5d bf lea -0x41(%ebp),%ebx 107e0a: 53 push %ebx 107e0b: 51 push %ecx 107e0c: 52 push %edx 107e0d: e8 02 9f 00 00 call 111d14 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 107e12: 58 pop %eax 107e13: ff 75 0c pushl 0xc(%ebp) 107e16: e8 a1 d8 00 00 call 1156bc 107e1b: 89 45 e0 mov %eax,-0x20(%ebp) if (info.sym_link.name == NULL) { 107e1e: 83 c4 10 add $0x10,%esp 107e21: 85 c0 test %eax,%eax 107e23: 75 10 jne 107e35 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 107e25: e8 66 cd 00 00 call 114b90 <__errno> <== NOT EXECUTED 107e2a: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107e30: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107e33: eb 3e jmp 107e73 <== NOT EXECUTED * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107e35: 83 ec 0c sub $0xc,%esp 107e38: 8d 45 e0 lea -0x20(%ebp),%eax 107e3b: 50 push %eax 107e3c: 68 ff a1 00 00 push $0xa1ff 107e41: 53 push %ebx 107e42: 6a 04 push $0x4 107e44: ff 75 08 pushl 0x8(%ebp) 107e47: e8 f0 94 00 00 call 11133c 107e4c: 89 c2 mov %eax,%edx new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 107e4e: 83 c4 20 add $0x20,%esp 107e51: 31 c0 xor %eax,%eax 107e53: 85 d2 test %edx,%edx 107e55: 75 1c jne 107e73 <== ALWAYS TAKEN free(info.sym_link.name); 107e57: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e5a: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 107e5d: e8 56 05 00 00 call 1083b8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 107e62: e8 29 cd 00 00 call 114b90 <__errno> <== NOT EXECUTED 107e67: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107e6d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107e70: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 107e73: 8d 65 f8 lea -0x8(%ebp),%esp 107e76: 5b pop %ebx 107e77: 5f pop %edi 107e78: c9 leave 107e79: c3 ret =============================================================================== 00107e7c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 107e7c: 55 push %ebp 107e7d: 89 e5 mov %esp,%ebp 107e7f: 57 push %edi 107e80: 56 push %esi 107e81: 53 push %ebx 107e82: 83 ec 2c sub $0x2c,%esp IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 107e85: 8b 45 0c mov 0xc(%ebp),%eax 107e88: 8b 18 mov (%eax),%ebx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 107e8a: 83 7b 4c 03 cmpl $0x3,0x4c(%ebx) 107e8e: 75 7a jne 107f0a if ( !node->info.hard_link.link_node ) 107e90: 8b 43 50 mov 0x50(%ebx),%eax 107e93: 85 c0 test %eax,%eax 107e95: 75 10 jne 107ea7 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 107e97: e8 f4 cc 00 00 call 114b90 <__errno> <== NOT EXECUTED 107e9c: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107ea2: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107ea5: eb 75 jmp 107f1c <== NOT EXECUTED the_link = *loc; 107ea7: 8d 7d cc lea -0x34(%ebp),%edi 107eaa: b9 05 00 00 00 mov $0x5,%ecx 107eaf: 8b 75 0c mov 0xc(%ebp),%esi 107eb2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 107eb4: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 107eb7: 83 ec 0c sub $0xc,%esp 107eba: 8d 75 cc lea -0x34(%ebp),%esi 107ebd: 56 push %esi 107ebe: e8 79 95 00 00 call 11143c /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 107ec3: 8b 43 50 mov 0x50(%ebx),%eax 107ec6: 8b 50 34 mov 0x34(%eax),%edx 107ec9: 83 c4 10 add $0x10,%esp 107ecc: 66 83 fa 01 cmp $0x1,%dx 107ed0: 75 1a jne 107eec { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 107ed2: 51 push %ecx 107ed3: 51 push %ecx 107ed4: 56 push %esi 107ed5: ff 75 08 pushl 0x8(%ebp) 107ed8: 8b 45 d4 mov -0x2c(%ebp),%eax 107edb: ff 50 34 call *0x34(%eax) 107ede: 89 c2 mov %eax,%edx if ( result != 0 ) 107ee0: 83 c4 10 add $0x10,%esp 107ee3: 83 c8 ff or $0xffffffff,%eax 107ee6: 85 d2 test %edx,%edx 107ee8: 74 20 je 107f0a 107eea: eb 30 jmp 107f1c return -1; } else { node->info.hard_link.link_node->st_nlink --; 107eec: 4a dec %edx 107eed: 66 89 50 34 mov %dx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 107ef1: 52 push %edx 107ef2: 52 push %edx 107ef3: 6a 00 push $0x0 107ef5: 8d 45 e0 lea -0x20(%ebp),%eax 107ef8: 50 push %eax 107ef9: e8 32 05 00 00 call 108430 107efe: 8b 43 50 mov 0x50(%ebx),%eax 107f01: 8b 55 e0 mov -0x20(%ebp),%edx 107f04: 89 50 48 mov %edx,0x48(%eax) 107f07: 83 c4 10 add $0x10,%esp /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 107f0a: 50 push %eax 107f0b: 50 push %eax 107f0c: 8b 55 0c mov 0xc(%ebp),%edx 107f0f: 8b 42 08 mov 0x8(%edx),%eax 107f12: 52 push %edx 107f13: ff 75 08 pushl 0x8(%ebp) 107f16: ff 50 34 call *0x34(%eax) return result; 107f19: 83 c4 10 add $0x10,%esp } 107f1c: 8d 65 f4 lea -0xc(%ebp),%esp 107f1f: 5b pop %ebx 107f20: 5e pop %esi 107f21: 5f pop %edi 107f22: c9 leave 107f23: c3 ret =============================================================================== 00107f24 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107f24: 55 push %ebp 107f25: 89 e5 mov %esp,%ebp 107f27: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 107f2a: 8b 45 08 mov 0x8(%ebp),%eax 107f2d: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107f30: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107f34: 74 0d je 107f43 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 107f36: e8 55 cc 00 00 call 114b90 <__errno> <== NOT EXECUTED 107f3b: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107f41: eb 11 jmp 107f54 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 107f43: 83 78 5c 00 cmpl $0x0,0x5c(%eax) 107f47: 75 10 jne 107f59 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 107f49: e8 42 cc 00 00 call 114b90 <__errno> <== NOT EXECUTED 107f4e: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107f54: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107f57: eb 09 jmp 107f62 <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 107f59: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) 107f60: 31 c0 xor %eax,%eax return 0; } 107f62: c9 leave 107f63: c3 ret =============================================================================== 00107374 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 107374: 55 push %ebp 107375: 89 e5 mov %esp,%ebp 107377: 57 push %edi 107378: 56 push %esi 107379: 53 push %ebx 10737a: 83 ec 0c sub $0xc,%esp 10737d: 8b 5d 08 mov 0x8(%ebp),%ebx 107380: 8b 75 0c mov 0xc(%ebp),%esi #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 107383: a1 b0 1d 12 00 mov 0x121db0,%eax 107388: 85 c0 test %eax,%eax 10738a: 74 02 je 10738e <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->initialize)(); 10738c: ff 10 call *(%eax) <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 10738e: e8 7c ff ff ff call 10730f /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 107393: a1 b4 1d 12 00 mov 0x121db4,%eax 107398: 85 c0 test %eax,%eax 10739a: 74 12 je 1073ae <== ALWAYS TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 10739c: 52 push %edx <== NOT EXECUTED 10739d: 52 push %edx <== NOT EXECUTED 10739e: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1073a1: 53 push %ebx <== NOT EXECUTED 1073a2: ff 10 call *(%eax) <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1073a4: 8d 34 33 lea (%ebx,%esi,1),%esi <== NOT EXECUTED 1073a7: 29 c6 sub %eax,%esi <== NOT EXECUTED 1073a9: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1073ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 1073ae: 80 3d ad 1d 12 00 00 cmpb $0x0,0x121dad 1073b5: 75 11 jne 1073c8 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1073b7: 80 3d 00 fb 11 00 00 cmpb $0x0,0x11fb00 1073be: 74 08 je 1073c8 ) { memset( heap_begin, 0, heap_size ); 1073c0: 31 c0 xor %eax,%eax 1073c2: 89 df mov %ebx,%edi 1073c4: 89 f1 mov %esi,%ecx 1073c6: f3 aa rep stos %al,%es:(%edi) * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 1073c8: 80 3d ad 1d 12 00 00 cmpb $0x0,0x121dad 1073cf: 75 20 jne 1073f1 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1073d1: 6a 04 push $0x4 1073d3: 56 push %esi 1073d4: 53 push %ebx 1073d5: ff 35 30 fa 11 00 pushl 0x11fa30 1073db: e8 94 38 00 00 call 10ac74 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 1073e0: 83 c4 10 add $0x10,%esp 1073e3: 85 c0 test %eax,%eax 1073e5: 75 0a jne 1073f1 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 1073e7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1073ea: 6a 1a push $0x1a <== NOT EXECUTED 1073ec: e8 b3 31 00 00 call 10a5a4 <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 1073f1: 8b 1d 10 39 12 00 mov 0x123910,%ebx 1073f7: 83 ec 0c sub $0xc,%esp 1073fa: ff 35 30 fa 11 00 pushl 0x11fa30 107400: e8 db 42 00 00 call 10b6e0 <_Protected_heap_Get_size> 107405: 8d 1c 18 lea (%eax,%ebx,1),%ebx 107408: 89 1d 10 39 12 00 mov %ebx,0x123910 10740e: 83 c4 10 add $0x10,%esp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 107411: 8d 65 f4 lea -0xc(%ebp),%esp 107414: 5b pop %ebx 107415: 5e pop %esi 107416: 5f pop %edi 107417: c9 leave 107418: c3 ret =============================================================================== 00106e0e : 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 14 2d 12 00 mov 0x122d14,%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 3c 30 12 00 00 cmpl $0x0,0x12303c <== NOT EXECUTED 106e3e: 0f 84 d8 00 00 00 je 106f1c <== NOT EXECUTED 106e44: be 38 30 12 00 mov $0x123038,%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 ef 32 00 00 call 10a190 <== NOT EXECUTED 106ea1: 50 push %eax <== NOT EXECUTED 106ea2: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 106ea5: 68 d5 d9 11 00 push $0x11d9d5 <== NOT EXECUTED 106eaa: ff 35 10 2d 12 00 pushl 0x122d10 <== 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 e2 d9 11 00 push $0x11d9e2 <== NOT EXECUTED 106ec0: ff 35 10 2d 12 00 pushl 0x122d10 <== 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 f0 d9 11 00 push $0x11d9f0 <== NOT EXECUTED 106ee4: ff 35 10 2d 12 00 pushl 0x122d10 <== NOT EXECUTED 106eea: ff 15 14 2d 12 00 call *0x122d14 <== 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 0c 2d 12 00 00 cmpl $0x0,0x122d0c <== NOT EXECUTED 106efa: a1 14 2d 12 00 mov 0x122d14,%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 0e da 11 00 push $0x11da0e <== 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 1b da 11 00 push $0x11da1b <== NOT EXECUTED 106f11: ff 35 10 2d 12 00 pushl 0x122d10 <== 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 0c 2d 12 00 00 cmpl $0x0,0x122d0c 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 54 db 11 00 mov 0x11db54(,%edx,4),%edx 10713c: 89 14 85 28 30 12 00 mov %edx,0x123028(,%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 ac 31 12 00 mov 0x1231ac,%edx 10714f: 85 d2 test %edx,%edx 107151: 74 1e je 107171 <== NEVER TAKEN 107153: 8b 0d 6c 31 12 00 mov 0x12316c,%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 3c 30 12 00 mov %edx,0x12303c Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 107163: 29 d1 sub %edx,%ecx 107165: 89 0d 38 30 12 00 mov %ecx,0x123038 (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 0c 2d 12 00 01 movl $0x1,0x122d0c 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 82 da 11 00 push $0x11da82 <== NOT EXECUTED 106fb5: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 106fb8: e8 ef 11 00 00 call 1081ac <== 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 92 da 11 00 push $0x11da92 <== NOT EXECUTED 106fc5: e8 e2 11 00 00 call 1081ac <== 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 af da 11 00 push $0x11daaf <== NOT EXECUTED 106fd4: e8 d3 11 00 00 call 1081ac <== 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 c1 da 11 00 push $0x11dac1 <== NOT EXECUTED 106fe3: e8 c4 11 00 00 call 1081ac <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 106fe8: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 106feb: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 106fee: 50 push %eax <== NOT EXECUTED 106fef: 6a 20 push $0x20 <== NOT EXECUTED 106ff1: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 106ff4: e8 97 31 00 00 call 10a190 <== NOT EXECUTED 106ff9: 5a pop %edx <== NOT EXECUTED 106ffa: 59 pop %ecx <== NOT EXECUTED 106ffb: 50 push %eax <== NOT EXECUTED 106ffc: 68 d5 da 11 00 push $0x11dad5 <== NOT EXECUTED 107001: e8 a6 11 00 00 call 1081ac <== 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 eb da 11 00 push $0x11daeb <== NOT EXECUTED 10701d: e8 8a 11 00 00 call 1081ac <== 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 1c db 11 00 push $0x11db1c <== NOT EXECUTED 10703b: e8 6c 11 00 00 call 1081ac <== 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 ec 38 00 00 call 10a93c <== NOT EXECUTED =============================================================================== 00117450 <_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 ) { 117450: 55 push %ebp 117451: 89 e5 mov %esp,%ebp 117453: 57 push %edi 117454: 56 push %esi 117455: 53 push %ebx 117456: 83 ec 1c sub $0x1c,%esp 117459: 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 ) { 11745c: b8 01 00 00 00 mov $0x1,%eax 117461: 8b 55 10 mov 0x10(%ebp),%edx 117464: 3b 53 4c cmp 0x4c(%ebx),%edx 117467: 77 4c ja 1174b5 <_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))) { 117469: 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 ) { 117470: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 117474: 74 23 je 117499 <_CORE_message_queue_Broadcast+0x49> *count = 0; 117476: 8b 45 1c mov 0x1c(%ebp),%eax 117479: c7 00 00 00 00 00 movl $0x0,(%eax) 11747f: eb 32 jmp 1174b3 <_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; 117481: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 117484: 8b 42 2c mov 0x2c(%edx),%eax 117487: 89 c7 mov %eax,%edi 117489: 8b 75 0c mov 0xc(%ebp),%esi 11748c: 8b 4d 10 mov 0x10(%ebp),%ecx 11748f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 117491: 8b 42 28 mov 0x28(%edx),%eax 117494: 8b 55 10 mov 0x10(%ebp),%edx 117497: 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))) { 117499: 83 ec 0c sub $0xc,%esp 11749c: 53 push %ebx 11749d: e8 ae 20 00 00 call 119550 <_Thread_queue_Dequeue> 1174a2: 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 = 1174a4: 83 c4 10 add $0x10,%esp 1174a7: 85 c0 test %eax,%eax 1174a9: 75 d6 jne 117481 <_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; 1174ab: 8b 55 e4 mov -0x1c(%ebp),%edx 1174ae: 8b 45 1c mov 0x1c(%ebp),%eax 1174b1: 89 10 mov %edx,(%eax) 1174b3: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1174b5: 8d 65 f4 lea -0xc(%ebp),%esp 1174b8: 5b pop %ebx 1174b9: 5e pop %esi 1174ba: 5f pop %edi 1174bb: c9 leave 1174bc: c3 ret =============================================================================== 00112334 <_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 ) { 112334: 55 push %ebp 112335: 89 e5 mov %esp,%ebp 112337: 57 push %edi 112338: 56 push %esi 112339: 53 push %ebx 11233a: 83 ec 0c sub $0xc,%esp 11233d: 8b 5d 08 mov 0x8(%ebp),%ebx 112340: 8b 75 10 mov 0x10(%ebp),%esi 112343: 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; 112346: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 112349: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 112350: 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)) { 112353: 89 d0 mov %edx,%eax 112355: f6 c2 03 test $0x3,%dl 112358: 74 0a je 112364 <_CORE_message_queue_Initialize+0x30> allocated_message_size += sizeof(uint32_t); 11235a: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 11235d: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 112360: 39 d0 cmp %edx,%eax 112362: 72 5f jb 1123c3 <_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)); 112364: 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 * 112367: 89 fa mov %edi,%edx 112369: 0f af d6 imul %esi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 11236c: 39 c2 cmp %eax,%edx 11236e: 72 53 jb 1123c3 <_CORE_message_queue_Initialize+0x8f><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 112370: 83 ec 0c sub $0xc,%esp 112373: 52 push %edx 112374: e8 03 25 00 00 call 11487c <_Workspace_Allocate> 112379: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 11237c: 83 c4 10 add $0x10,%esp 11237f: 85 c0 test %eax,%eax 112381: 74 40 je 1123c3 <_CORE_message_queue_Initialize+0x8f> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 112383: 57 push %edi 112384: 56 push %esi 112385: 50 push %eax 112386: 8d 43 60 lea 0x60(%ebx),%eax 112389: 50 push %eax 11238a: e8 25 3d 00 00 call 1160b4 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11238f: 8d 43 54 lea 0x54(%ebx),%eax 112392: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 112395: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 11239c: 8d 43 50 lea 0x50(%ebx),%eax 11239f: 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( 1123a2: 6a 06 push $0x6 1123a4: 68 80 00 00 00 push $0x80 1123a9: 8b 45 0c mov 0xc(%ebp),%eax 1123ac: 83 38 01 cmpl $0x1,(%eax) 1123af: 0f 94 c0 sete %al 1123b2: 0f b6 c0 movzbl %al,%eax 1123b5: 50 push %eax 1123b6: 53 push %ebx 1123b7: e8 cc 1b 00 00 call 113f88 <_Thread_queue_Initialize> 1123bc: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 1123be: 83 c4 20 add $0x20,%esp 1123c1: eb 02 jmp 1123c5 <_CORE_message_queue_Initialize+0x91> 1123c3: 31 c0 xor %eax,%eax } 1123c5: 8d 65 f4 lea -0xc(%ebp),%esp 1123c8: 5b pop %ebx 1123c9: 5e pop %esi 1123ca: 5f pop %edi 1123cb: c9 leave 1123cc: c3 ret =============================================================================== 001123d0 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 1123d0: 55 push %ebp 1123d1: 89 e5 mov %esp,%ebp 1123d3: 57 push %edi 1123d4: 56 push %esi 1123d5: 53 push %ebx 1123d6: 83 ec 2c sub $0x2c,%esp 1123d9: 8b 45 08 mov 0x8(%ebp),%eax 1123dc: 8b 55 0c mov 0xc(%ebp),%edx 1123df: 89 55 dc mov %edx,-0x24(%ebp) 1123e2: 8b 55 10 mov 0x10(%ebp),%edx 1123e5: 89 55 e0 mov %edx,-0x20(%ebp) 1123e8: 8b 7d 14 mov 0x14(%ebp),%edi 1123eb: 8b 55 1c mov 0x1c(%ebp),%edx 1123ee: 89 55 d4 mov %edx,-0x2c(%ebp) 1123f1: 8a 55 18 mov 0x18(%ebp),%dl 1123f4: 88 55 db mov %dl,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 1123f7: 8b 0d a0 b3 12 00 mov 0x12b3a0,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1123fd: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 112404: 9c pushf 112405: fa cli 112406: 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)); 112409: 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; 11240c: 8d 58 54 lea 0x54(%eax),%ebx 11240f: 39 da cmp %ebx,%edx 112411: 74 47 je 11245a <_CORE_message_queue_Seize+0x8a> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 112413: 8b 32 mov (%edx),%esi the_chain->first = new_first; 112415: 89 70 50 mov %esi,0x50(%eax) new_first->previous = _Chain_Head(the_chain); 112418: 8d 58 50 lea 0x50(%eax),%ebx 11241b: 89 5e 04 mov %ebx,0x4(%esi) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 11241e: 85 d2 test %edx,%edx 112420: 74 38 je 11245a <_CORE_message_queue_Seize+0x8a><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 112422: ff 48 48 decl 0x48(%eax) _ISR_Enable( level ); 112425: ff 75 e4 pushl -0x1c(%ebp) 112428: 9d popf *size_p = the_message->Contents.size; 112429: 8b 4a 08 mov 0x8(%edx),%ecx 11242c: 89 0f mov %ecx,(%edi) _Thread_Executing->Wait.count = 11242e: 8b 0d a0 b3 12 00 mov 0x12b3a0,%ecx 112434: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11243b: 8d 72 0c lea 0xc(%edx),%esi 11243e: 8b 0f mov (%edi),%ecx 112440: 8b 7d e0 mov -0x20(%ebp),%edi 112443: 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 ); 112445: 89 55 0c mov %edx,0xc(%ebp) 112448: 83 c0 60 add $0x60,%eax 11244b: 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 ); } 11244e: 83 c4 2c add $0x2c,%esp 112451: 5b pop %ebx 112452: 5e pop %esi 112453: 5f pop %edi 112454: c9 leave 112455: e9 5a fe ff ff jmp 1122b4 <_Chain_Append> return; } #endif } if ( !wait ) { 11245a: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 11245e: 75 13 jne 112473 <_CORE_message_queue_Seize+0xa3> _ISR_Enable( level ); 112460: ff 75 e4 pushl -0x1c(%ebp) 112463: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 112464: 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 ); } 11246b: 83 c4 2c add $0x2c,%esp 11246e: 5b pop %ebx 11246f: 5e pop %esi 112470: 5f pop %edi 112471: c9 leave 112472: 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; 112473: 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; 11247a: 89 41 44 mov %eax,0x44(%ecx) executing->Wait.id = id; 11247d: 8b 55 dc mov -0x24(%ebp),%edx 112480: 89 51 20 mov %edx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 112483: 8b 55 e0 mov -0x20(%ebp),%edx 112486: 89 51 2c mov %edx,0x2c(%ecx) executing->Wait.return_argument = size_p; 112489: 89 79 28 mov %edi,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 11248c: ff 75 e4 pushl -0x1c(%ebp) 11248f: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 112490: c7 45 10 2c 40 11 00 movl $0x11402c,0x10(%ebp) 112497: 8b 55 d4 mov -0x2c(%ebp),%edx 11249a: 89 55 0c mov %edx,0xc(%ebp) 11249d: 89 45 08 mov %eax,0x8(%ebp) } 1124a0: 83 c4 2c add $0x2c,%esp 1124a3: 5b pop %ebx 1124a4: 5e pop %esi 1124a5: 5f pop %edi 1124a6: 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 ); 1124a7: e9 c4 18 00 00 jmp 113d70 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010a9d5 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10a9d5: 55 push %ebp 10a9d6: 89 e5 mov %esp,%ebp 10a9d8: 53 push %ebx 10a9d9: 83 ec 14 sub $0x14,%esp 10a9dc: 8b 5d 08 mov 0x8(%ebp),%ebx 10a9df: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10a9e2: a1 54 3a 12 00 mov 0x123a54,%eax 10a9e7: 85 c0 test %eax,%eax 10a9e9: 74 19 je 10aa04 <_CORE_mutex_Seize+0x2f> 10a9eb: 84 d2 test %dl,%dl 10a9ed: 74 15 je 10aa04 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN 10a9ef: 83 3d ec 3b 12 00 01 cmpl $0x1,0x123bec 10a9f6: 76 0c jbe 10aa04 <_CORE_mutex_Seize+0x2f> 10a9f8: 53 push %ebx 10a9f9: 6a 13 push $0x13 10a9fb: 6a 00 push $0x0 10a9fd: 6a 00 push $0x0 10a9ff: e8 60 05 00 00 call 10af64 <_Internal_error_Occurred> 10aa04: 51 push %ecx 10aa05: 51 push %ecx 10aa06: 8d 45 18 lea 0x18(%ebp),%eax 10aa09: 50 push %eax 10aa0a: 53 push %ebx 10aa0b: 88 55 f4 mov %dl,-0xc(%ebp) 10aa0e: e8 4d 3a 00 00 call 10e460 <_CORE_mutex_Seize_interrupt_trylock> 10aa13: 83 c4 10 add $0x10,%esp 10aa16: 85 c0 test %eax,%eax 10aa18: 8a 55 f4 mov -0xc(%ebp),%dl 10aa1b: 74 48 je 10aa65 <_CORE_mutex_Seize+0x90> 10aa1d: 84 d2 test %dl,%dl 10aa1f: 75 12 jne 10aa33 <_CORE_mutex_Seize+0x5e> 10aa21: ff 75 18 pushl 0x18(%ebp) 10aa24: 9d popf 10aa25: a1 10 3b 12 00 mov 0x123b10,%eax 10aa2a: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10aa31: eb 32 jmp 10aa65 <_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; 10aa33: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10aa3a: a1 10 3b 12 00 mov 0x123b10,%eax 10aa3f: 89 58 44 mov %ebx,0x44(%eax) 10aa42: 8b 55 0c mov 0xc(%ebp),%edx 10aa45: 89 50 20 mov %edx,0x20(%eax) 10aa48: a1 54 3a 12 00 mov 0x123a54,%eax 10aa4d: 40 inc %eax 10aa4e: a3 54 3a 12 00 mov %eax,0x123a54 10aa53: ff 75 18 pushl 0x18(%ebp) 10aa56: 9d popf 10aa57: 50 push %eax 10aa58: 50 push %eax 10aa59: ff 75 14 pushl 0x14(%ebp) 10aa5c: 53 push %ebx 10aa5d: e8 26 ff ff ff call 10a988 <_CORE_mutex_Seize_interrupt_blocking> 10aa62: 83 c4 10 add $0x10,%esp } 10aa65: 8b 5d fc mov -0x4(%ebp),%ebx 10aa68: c9 leave 10aa69: c3 ret =============================================================================== 0010e460 <_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 ) { 10e460: 55 push %ebp 10e461: 89 e5 mov %esp,%ebp 10e463: 53 push %ebx 10e464: 83 ec 04 sub $0x4,%esp 10e467: 8b 45 08 mov 0x8(%ebp),%eax 10e46a: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10e46d: 8b 15 10 3b 12 00 mov 0x123b10,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 10e473: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 10e47a: 83 78 50 00 cmpl $0x0,0x50(%eax) 10e47e: 0f 84 87 00 00 00 je 10e50b <_CORE_mutex_Seize_interrupt_trylock+0xab> the_mutex->lock = CORE_MUTEX_LOCKED; 10e484: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 10e48b: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 10e48e: 8b 5a 08 mov 0x8(%edx),%ebx 10e491: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 10e494: 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; 10e49b: 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 ) || 10e49e: 83 fb 02 cmp $0x2,%ebx 10e4a1: 74 05 je 10e4a8 <_CORE_mutex_Seize_interrupt_trylock+0x48> 10e4a3: 83 fb 03 cmp $0x3,%ebx 10e4a6: 75 08 jne 10e4b0 <_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++; 10e4a8: ff 42 1c incl 0x1c(%edx) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 10e4ab: 83 fb 03 cmp $0x3,%ebx 10e4ae: 74 05 je 10e4b5 <_CORE_mutex_Seize_interrupt_trylock+0x55> _ISR_Enable( *level_p ); 10e4b0: ff 31 pushl (%ecx) 10e4b2: 9d popf 10e4b3: eb 7b jmp 10e530 <_CORE_mutex_Seize_interrupt_trylock+0xd0> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 10e4b5: 8b 5a 14 mov 0x14(%edx),%ebx if ( current == ceiling ) { 10e4b8: 3b 58 4c cmp 0x4c(%eax),%ebx 10e4bb: 75 05 jne 10e4c2 <_CORE_mutex_Seize_interrupt_trylock+0x62> _ISR_Enable( *level_p ); 10e4bd: ff 31 pushl (%ecx) 10e4bf: 9d popf 10e4c0: eb 6e jmp 10e530 <_CORE_mutex_Seize_interrupt_trylock+0xd0> return 0; } if ( current > ceiling ) { 10e4c2: 76 2a jbe 10e4ee <_CORE_mutex_Seize_interrupt_trylock+0x8e> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10e4c4: 8b 15 54 3a 12 00 mov 0x123a54,%edx 10e4ca: 42 inc %edx 10e4cb: 89 15 54 3a 12 00 mov %edx,0x123a54 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 10e4d1: ff 31 pushl (%ecx) 10e4d3: 9d popf _Thread_Change_priority( 10e4d4: 52 push %edx 10e4d5: 6a 00 push $0x0 10e4d7: ff 70 4c pushl 0x4c(%eax) 10e4da: ff 70 5c pushl 0x5c(%eax) 10e4dd: e8 56 d2 ff ff call 10b738 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 10e4e2: e8 ee d6 ff ff call 10bbd5 <_Thread_Enable_dispatch> 10e4e7: 31 c0 xor %eax,%eax 10e4e9: 83 c4 10 add $0x10,%esp 10e4ec: eb 4b jmp 10e539 <_CORE_mutex_Seize_interrupt_trylock+0xd9> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 10e4ee: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 10e4f5: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 10e4fc: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 10e503: ff 4a 1c decl 0x1c(%edx) _ISR_Enable( *level_p ); 10e506: ff 31 pushl (%ecx) 10e508: 9d popf 10e509: eb 25 jmp 10e530 <_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 ) ) { 10e50b: 8b 58 5c mov 0x5c(%eax),%ebx 10e50e: 39 d3 cmp %edx,%ebx 10e510: 75 22 jne 10e534 <_CORE_mutex_Seize_interrupt_trylock+0xd4> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 10e512: 8b 50 40 mov 0x40(%eax),%edx 10e515: 85 d2 test %edx,%edx 10e517: 74 05 je 10e51e <_CORE_mutex_Seize_interrupt_trylock+0xbe> 10e519: 4a dec %edx 10e51a: 75 18 jne 10e534 <_CORE_mutex_Seize_interrupt_trylock+0xd4><== ALWAYS TAKEN 10e51c: eb 08 jmp 10e526 <_CORE_mutex_Seize_interrupt_trylock+0xc6><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 10e51e: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 10e521: ff 31 pushl (%ecx) 10e523: 9d popf 10e524: eb 0a jmp 10e530 <_CORE_mutex_Seize_interrupt_trylock+0xd0> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 10e526: c7 43 34 02 00 00 00 movl $0x2,0x34(%ebx) <== NOT EXECUTED _ISR_Enable( *level_p ); 10e52d: ff 31 pushl (%ecx) <== NOT EXECUTED 10e52f: 9d popf <== NOT EXECUTED 10e530: 31 c0 xor %eax,%eax 10e532: eb 05 jmp 10e539 <_CORE_mutex_Seize_interrupt_trylock+0xd9> 10e534: b8 01 00 00 00 mov $0x1,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 10e539: 8b 5d fc mov -0x4(%ebp),%ebx 10e53c: c9 leave 10e53d: c3 ret =============================================================================== 0010ab98 <_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 ) { 10ab98: 55 push %ebp 10ab99: 89 e5 mov %esp,%ebp 10ab9b: 53 push %ebx 10ab9c: 83 ec 10 sub $0x10,%esp 10ab9f: 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)) ) { 10aba2: 53 push %ebx 10aba3: e8 b4 13 00 00 call 10bf5c <_Thread_queue_Dequeue> 10aba8: 89 c2 mov %eax,%edx 10abaa: 83 c4 10 add $0x10,%esp 10abad: 31 c0 xor %eax,%eax 10abaf: 85 d2 test %edx,%edx 10abb1: 75 15 jne 10abc8 <_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 ); 10abb3: 9c pushf 10abb4: fa cli 10abb5: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10abb6: 8b 53 48 mov 0x48(%ebx),%edx 10abb9: b0 04 mov $0x4,%al 10abbb: 3b 53 40 cmp 0x40(%ebx),%edx 10abbe: 73 06 jae 10abc6 <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN the_semaphore->count += 1; 10abc0: 42 inc %edx 10abc1: 89 53 48 mov %edx,0x48(%ebx) 10abc4: 30 c0 xor %al,%al else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10abc6: 51 push %ecx 10abc7: 9d popf } return status; } 10abc8: 8b 5d fc mov -0x4(%ebp),%ebx 10abcb: c9 leave 10abcc: c3 ret =============================================================================== 00109a78 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 109a78: 55 push %ebp 109a79: 89 e5 mov %esp,%ebp 109a7b: 57 push %edi 109a7c: 56 push %esi 109a7d: 53 push %ebx 109a7e: 83 ec 1c sub $0x1c,%esp 109a81: 8b 45 08 mov 0x8(%ebp),%eax 109a84: 8b 75 0c mov 0xc(%ebp),%esi 109a87: 8b 55 10 mov 0x10(%ebp),%edx 109a8a: 89 55 dc mov %edx,-0x24(%ebp) 109a8d: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 109a90: 8b 1d 10 3b 12 00 mov 0x123b10,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 109a96: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 109a9d: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi _ISR_Disable( level ); 109aa3: 9c pushf 109aa4: fa cli 109aa5: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 109aa8: 8b 17 mov (%edi),%edx 109aaa: 89 55 e0 mov %edx,-0x20(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 109aad: 21 c2 and %eax,%edx 109aaf: 74 1b je 109acc <_Event_Seize+0x54> 109ab1: 39 c2 cmp %eax,%edx 109ab3: 74 08 je 109abd <_Event_Seize+0x45> 109ab5: f7 c6 02 00 00 00 test $0x2,%esi 109abb: 74 0f je 109acc <_Event_Seize+0x54> <== NEVER TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 109abd: 89 d0 mov %edx,%eax 109abf: f7 d0 not %eax 109ac1: 23 45 e0 and -0x20(%ebp),%eax 109ac4: 89 07 mov %eax,(%edi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 109ac6: ff 75 e4 pushl -0x1c(%ebp) 109ac9: 9d popf 109aca: eb 13 jmp 109adf <_Event_Seize+0x67> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 109acc: f7 c6 01 00 00 00 test $0x1,%esi 109ad2: 74 12 je 109ae6 <_Event_Seize+0x6e> _ISR_Enable( level ); 109ad4: ff 75 e4 pushl -0x1c(%ebp) 109ad7: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 109ad8: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 109adf: 89 11 mov %edx,(%ecx) return; 109ae1: e9 91 00 00 00 jmp 109b77 <_Event_Seize+0xff> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 109ae6: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 109ae9: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 109aec: 89 4b 28 mov %ecx,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 109aef: c7 05 a8 3c 12 00 01 movl $0x1,0x123ca8 109af6: 00 00 00 _ISR_Enable( level ); 109af9: ff 75 e4 pushl -0x1c(%ebp) 109afc: 9d popf if ( ticks ) { 109afd: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 109b01: 74 34 je 109b37 <_Event_Seize+0xbf> _Watchdog_Initialize( 109b03: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 109b06: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 109b0d: c7 43 64 b4 9c 10 00 movl $0x109cb4,0x64(%ebx) the_watchdog->id = id; 109b14: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 109b17: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 109b1e: 8b 45 dc mov -0x24(%ebp),%eax 109b21: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 109b24: 52 push %edx 109b25: 52 push %edx 109b26: 8d 43 48 lea 0x48(%ebx),%eax 109b29: 50 push %eax 109b2a: 68 30 3b 12 00 push $0x123b30 109b2f: e8 24 2e 00 00 call 10c958 <_Watchdog_Insert> 109b34: 83 c4 10 add $0x10,%esp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 109b37: 50 push %eax 109b38: 50 push %eax 109b39: 68 00 01 00 00 push $0x100 109b3e: 53 push %ebx 109b3f: e8 74 28 00 00 call 10c3b8 <_Thread_Set_state> _ISR_Disable( level ); 109b44: 9c pushf 109b45: fa cli 109b46: 5a pop %edx sync_state = _Event_Sync_state; 109b47: a1 a8 3c 12 00 mov 0x123ca8,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 109b4c: c7 05 a8 3c 12 00 00 movl $0x0,0x123ca8 109b53: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 109b56: 83 c4 10 add $0x10,%esp 109b59: 83 f8 01 cmp $0x1,%eax 109b5c: 75 04 jne 109b62 <_Event_Seize+0xea> _ISR_Enable( level ); 109b5e: 52 push %edx 109b5f: 9d popf 109b60: eb 15 jmp 109b77 <_Event_Seize+0xff> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 109b62: 89 55 10 mov %edx,0x10(%ebp) 109b65: 89 5d 0c mov %ebx,0xc(%ebp) 109b68: 89 45 08 mov %eax,0x8(%ebp) } 109b6b: 8d 65 f4 lea -0xc(%ebp),%esp 109b6e: 5b pop %ebx 109b6f: 5e pop %esi 109b70: 5f pop %edi 109b71: c9 leave * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 109b72: e9 75 1b 00 00 jmp 10b6ec <_Thread_blocking_operation_Cancel> } 109b77: 8d 65 f4 lea -0xc(%ebp),%esp 109b7a: 5b pop %ebx 109b7b: 5e pop %esi 109b7c: 5f pop %edi 109b7d: c9 leave 109b7e: c3 ret =============================================================================== 00109bcc <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 109bcc: 55 push %ebp 109bcd: 89 e5 mov %esp,%ebp 109bcf: 57 push %edi 109bd0: 56 push %esi 109bd1: 53 push %ebx 109bd2: 83 ec 2c sub $0x2c,%esp 109bd5: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 109bd8: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 109bde: 8b 43 30 mov 0x30(%ebx),%eax 109be1: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 109be4: 9c pushf 109be5: fa cli 109be6: 58 pop %eax pending_events = api->pending_events; 109be7: 8b 17 mov (%edi),%edx 109be9: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 109bec: 8b 73 24 mov 0x24(%ebx),%esi seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 109bef: 21 f2 and %esi,%edx 109bf1: 75 07 jne 109bfa <_Event_Surrender+0x2e> _ISR_Enable( level ); 109bf3: 50 push %eax 109bf4: 9d popf return; 109bf5: e9 b0 00 00 00 jmp 109caa <_Event_Surrender+0xde> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 109bfa: 8b 0d ec 3a 12 00 mov 0x123aec,%ecx 109c00: 85 c9 test %ecx,%ecx 109c02: 74 49 je 109c4d <_Event_Surrender+0x81> 109c04: 3b 1d 10 3b 12 00 cmp 0x123b10,%ebx 109c0a: 75 41 jne 109c4d <_Event_Surrender+0x81> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109c0c: 8b 0d a8 3c 12 00 mov 0x123ca8,%ecx /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 109c12: 83 f9 02 cmp $0x2,%ecx 109c15: 74 09 je 109c20 <_Event_Surrender+0x54> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 109c17: 8b 0d a8 3c 12 00 mov 0x123ca8,%ecx /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 109c1d: 49 dec %ecx 109c1e: 75 2d jne 109c4d <_Event_Surrender+0x81> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 109c20: 39 f2 cmp %esi,%edx 109c22: 74 06 je 109c2a <_Event_Surrender+0x5e> 109c24: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109c28: 74 1f je 109c49 <_Event_Surrender+0x7d> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 109c2a: 89 d6 mov %edx,%esi 109c2c: f7 d6 not %esi 109c2e: 23 75 d4 and -0x2c(%ebp),%esi 109c31: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 109c33: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109c3a: 8b 4b 28 mov 0x28(%ebx),%ecx 109c3d: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 109c3f: c7 05 a8 3c 12 00 03 movl $0x3,0x123ca8 109c46: 00 00 00 } _ISR_Enable( level ); 109c49: 50 push %eax 109c4a: 9d popf return; 109c4b: eb 5d jmp 109caa <_Event_Surrender+0xde> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 109c4d: f6 43 11 01 testb $0x1,0x11(%ebx) 109c51: 74 55 je 109ca8 <_Event_Surrender+0xdc> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 109c53: 39 f2 cmp %esi,%edx 109c55: 74 06 je 109c5d <_Event_Surrender+0x91> 109c57: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109c5b: 74 4b je 109ca8 <_Event_Surrender+0xdc> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 109c5d: 89 d6 mov %edx,%esi 109c5f: f7 d6 not %esi 109c61: 23 75 d4 and -0x2c(%ebp),%esi 109c64: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 109c66: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109c6d: 8b 4b 28 mov 0x28(%ebx),%ecx 109c70: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 109c72: 50 push %eax 109c73: 9d popf 109c74: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 109c75: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 109c79: 74 06 je 109c81 <_Event_Surrender+0xb5> _ISR_Enable( level ); 109c7b: 50 push %eax 109c7c: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 109c7d: 51 push %ecx 109c7e: 51 push %ecx 109c7f: eb 17 jmp 109c98 <_Event_Surrender+0xcc> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 109c81: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 109c88: 50 push %eax 109c89: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 109c8a: 83 ec 0c sub $0xc,%esp 109c8d: 8d 43 48 lea 0x48(%ebx),%eax 109c90: 50 push %eax 109c91: e8 da 2d 00 00 call 10ca70 <_Watchdog_Remove> 109c96: 58 pop %eax 109c97: 5a pop %edx 109c98: 68 f8 ff 03 10 push $0x1003fff8 109c9d: 53 push %ebx 109c9e: e8 b5 1b 00 00 call 10b858 <_Thread_Clear_state> 109ca3: 83 c4 10 add $0x10,%esp 109ca6: eb 02 jmp 109caa <_Event_Surrender+0xde> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 109ca8: 50 push %eax 109ca9: 9d popf } 109caa: 8d 65 f4 lea -0xc(%ebp),%esp 109cad: 5b pop %ebx 109cae: 5e pop %esi 109caf: 5f pop %edi 109cb0: c9 leave 109cb1: c3 ret =============================================================================== 00109cb4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 109cb4: 55 push %ebp 109cb5: 89 e5 mov %esp,%ebp 109cb7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 109cba: 8d 45 f4 lea -0xc(%ebp),%eax 109cbd: 50 push %eax 109cbe: ff 75 08 pushl 0x8(%ebp) 109cc1: e8 32 1f 00 00 call 10bbf8 <_Thread_Get> switch ( location ) { 109cc6: 83 c4 10 add $0x10,%esp 109cc9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109ccd: 75 49 jne 109d18 <_Event_Timeout+0x64> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 109ccf: 9c pushf 109cd0: fa cli 109cd1: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 109cd2: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 109cd9: 3b 05 10 3b 12 00 cmp 0x123b10,%eax 109cdf: 75 13 jne 109cf4 <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 109ce1: 8b 0d a8 3c 12 00 mov 0x123ca8,%ecx 109ce7: 49 dec %ecx 109ce8: 75 0a jne 109cf4 <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 109cea: c7 05 a8 3c 12 00 02 movl $0x2,0x123ca8 109cf1: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 109cf4: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 109cfb: 52 push %edx 109cfc: 9d popf 109cfd: 52 push %edx 109cfe: 52 push %edx 109cff: 68 f8 ff 03 10 push $0x1003fff8 109d04: 50 push %eax 109d05: e8 4e 1b 00 00 call 10b858 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 109d0a: a1 54 3a 12 00 mov 0x123a54,%eax 109d0f: 48 dec %eax 109d10: a3 54 3a 12 00 mov %eax,0x123a54 109d15: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 109d18: c9 leave 109d19: c3 ret =============================================================================== 0010e5f8 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 10e5f8: 55 push %ebp 10e5f9: 89 e5 mov %esp,%ebp 10e5fb: 57 push %edi 10e5fc: 56 push %esi 10e5fd: 53 push %ebx 10e5fe: 83 ec 2c sub $0x2c,%esp 10e601: 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; 10e604: 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; 10e607: 8b 46 10 mov 0x10(%esi),%eax 10e60a: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 10e60d: 8b 45 0c mov 0xc(%ebp),%eax 10e610: 83 c0 04 add $0x4,%eax 10e613: 89 45 cc mov %eax,-0x34(%ebp) 10e616: 0f 82 2f 01 00 00 jb 10e74b <_Heap_Allocate_aligned_with_boundary+0x153> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 10e61c: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10e620: 74 18 je 10e63a <_Heap_Allocate_aligned_with_boundary+0x42> if ( boundary < alloc_size ) { 10e622: 8b 45 0c mov 0xc(%ebp),%eax 10e625: 39 45 14 cmp %eax,0x14(%ebp) 10e628: 0f 82 1d 01 00 00 jb 10e74b <_Heap_Allocate_aligned_with_boundary+0x153> return NULL; } if ( alignment == 0 ) { 10e62e: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10e632: 75 06 jne 10e63a <_Heap_Allocate_aligned_with_boundary+0x42> 10e634: 8b 45 e0 mov -0x20(%ebp),%eax 10e637: 89 45 10 mov %eax,0x10(%ebp) 10e63a: 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; 10e641: 8b 45 e0 mov -0x20(%ebp),%eax 10e644: 83 c0 07 add $0x7,%eax 10e647: 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; 10e64a: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 10e651: 8b 45 0c mov 0xc(%ebp),%eax 10e654: 29 45 d8 sub %eax,-0x28(%ebp) 10e657: 89 f7 mov %esi,%edi 10e659: e9 ba 00 00 00 jmp 10e718 <_Heap_Allocate_aligned_with_boundary+0x120> while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 10e65e: 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 ) { 10e661: 8b 59 04 mov 0x4(%ecx),%ebx 10e664: 3b 5d cc cmp -0x34(%ebp),%ebx 10e667: 0f 86 a8 00 00 00 jbe 10e715 <_Heap_Allocate_aligned_with_boundary+0x11d> if ( alignment == 0 ) { 10e66d: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10e671: 8d 41 08 lea 0x8(%ecx),%eax 10e674: 89 45 dc mov %eax,-0x24(%ebp) 10e677: 75 07 jne 10e680 <_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; 10e679: 89 c3 mov %eax,%ebx 10e67b: e9 91 00 00 00 jmp 10e711 <_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; 10e680: 8b 47 14 mov 0x14(%edi),%eax 10e683: 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; 10e686: 83 e3 fe and $0xfffffffe,%ebx 10e689: 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; 10e68c: 8b 75 c8 mov -0x38(%ebp),%esi 10e68f: 29 c6 sub %eax,%esi 10e691: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10e693: 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); 10e696: 89 d8 mov %ebx,%eax 10e698: 31 d2 xor %edx,%edx 10e69a: f7 75 10 divl 0x10(%ebp) 10e69d: 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 ) { 10e69f: 39 f3 cmp %esi,%ebx 10e6a1: 76 0b jbe 10e6ae <_Heap_Allocate_aligned_with_boundary+0xb6> 10e6a3: 89 f0 mov %esi,%eax 10e6a5: 31 d2 xor %edx,%edx 10e6a7: f7 75 10 divl 0x10(%ebp) 10e6aa: 89 f3 mov %esi,%ebx 10e6ac: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 10e6ae: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10e6b2: 74 3f je 10e6f3 <_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; 10e6b4: 8b 45 0c mov 0xc(%ebp),%eax 10e6b7: 8d 34 03 lea (%ebx,%eax,1),%esi /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 10e6ba: 8b 45 dc mov -0x24(%ebp),%eax 10e6bd: 03 45 0c add 0xc(%ebp),%eax 10e6c0: 89 45 d0 mov %eax,-0x30(%ebp) 10e6c3: eb 19 jmp 10e6de <_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 ) { 10e6c5: 3b 55 d0 cmp -0x30(%ebp),%edx 10e6c8: 72 4b jb 10e715 <_Heap_Allocate_aligned_with_boundary+0x11d> return 0; } alloc_begin = boundary_line - alloc_size; 10e6ca: 89 d3 mov %edx,%ebx 10e6cc: 2b 5d 0c sub 0xc(%ebp),%ebx 10e6cf: 89 d8 mov %ebx,%eax 10e6d1: 31 d2 xor %edx,%edx 10e6d3: f7 75 10 divl 0x10(%ebp) 10e6d6: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 10e6d8: 8b 45 0c mov 0xc(%ebp),%eax 10e6db: 8d 34 03 lea (%ebx,%eax,1),%esi 10e6de: 89 f0 mov %esi,%eax 10e6e0: 31 d2 xor %edx,%edx 10e6e2: f7 75 14 divl 0x14(%ebp) 10e6e5: 89 f0 mov %esi,%eax 10e6e7: 29 d0 sub %edx,%eax 10e6e9: 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 ) { 10e6eb: 39 f0 cmp %esi,%eax 10e6ed: 73 04 jae 10e6f3 <_Heap_Allocate_aligned_with_boundary+0xfb> 10e6ef: 39 c3 cmp %eax,%ebx 10e6f1: 72 d2 jb 10e6c5 <_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 ) { 10e6f3: 3b 5d dc cmp -0x24(%ebp),%ebx 10e6f6: 72 1d jb 10e715 <_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; 10e6f8: be f8 ff ff ff mov $0xfffffff8,%esi 10e6fd: 29 ce sub %ecx,%esi 10e6ff: 01 de add %ebx,%esi 10e701: 89 d8 mov %ebx,%eax 10e703: 31 d2 xor %edx,%edx 10e705: f7 75 e0 divl -0x20(%ebp) if ( free_size >= min_block_size || free_size == 0 ) { 10e708: 29 d6 sub %edx,%esi 10e70a: 74 05 je 10e711 <_Heap_Allocate_aligned_with_boundary+0x119> 10e70c: 3b 75 d4 cmp -0x2c(%ebp),%esi 10e70f: 72 04 jb 10e715 <_Heap_Allocate_aligned_with_boundary+0x11d> boundary ); } } if ( alloc_begin != 0 ) { 10e711: 85 db test %ebx,%ebx 10e713: 75 11 jne 10e726 <_Heap_Allocate_aligned_with_boundary+0x12e><== ALWAYS TAKEN break; } block = block->next; 10e715: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 10e718: 39 f9 cmp %edi,%ecx 10e71a: 0f 85 3e ff ff ff jne 10e65e <_Heap_Allocate_aligned_with_boundary+0x66> 10e720: 89 fe mov %edi,%esi 10e722: 31 db xor %ebx,%ebx 10e724: eb 16 jmp 10e73c <_Heap_Allocate_aligned_with_boundary+0x144> 10e726: 89 fe mov %edi,%esi block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 10e728: 8b 45 e4 mov -0x1c(%ebp),%eax 10e72b: 01 47 4c add %eax,0x4c(%edi) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 10e72e: ff 75 0c pushl 0xc(%ebp) 10e731: 53 push %ebx 10e732: 51 push %ecx 10e733: 57 push %edi 10e734: e8 4f c7 ff ff call 10ae88 <_Heap_Block_allocate> 10e739: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 10e73c: 8b 45 e4 mov -0x1c(%ebp),%eax 10e73f: 39 46 44 cmp %eax,0x44(%esi) 10e742: 73 03 jae 10e747 <_Heap_Allocate_aligned_with_boundary+0x14f> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 10e744: 89 46 44 mov %eax,0x44(%esi) } return (void *) alloc_begin; 10e747: 89 d8 mov %ebx,%eax 10e749: eb 02 jmp 10e74d <_Heap_Allocate_aligned_with_boundary+0x155> 10e74b: 31 c0 xor %eax,%eax } 10e74d: 8d 65 f4 lea -0xc(%ebp),%esp 10e750: 5b pop %ebx 10e751: 5e pop %esi 10e752: 5f pop %edi 10e753: c9 leave 10e754: c3 ret =============================================================================== 00111a34 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 111a34: 55 push %ebp 111a35: 89 e5 mov %esp,%ebp 111a37: 56 push %esi 111a38: 53 push %ebx 111a39: 8b 4d 08 mov 0x8(%ebp),%ecx 111a3c: 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; 111a3f: 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; 111a42: 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 ) { 111a45: 39 f2 cmp %esi,%edx 111a47: 73 0a jae 111a53 <_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; 111a49: b8 01 00 00 00 mov $0x1,%eax 111a4e: 3b 51 18 cmp 0x18(%ecx),%edx 111a51: 73 5f jae 111ab2 <_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 ) { 111a53: b8 02 00 00 00 mov $0x2,%eax 111a58: 39 f2 cmp %esi,%edx 111a5a: 75 56 jne 111ab2 <_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; 111a5c: 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; 111a5f: 89 51 1c mov %edx,0x1c(%ecx) extend_size = new_heap_area_end 111a62: 29 da sub %ebx,%edx 111a64: 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); 111a67: 89 f0 mov %esi,%eax 111a69: 31 d2 xor %edx,%edx 111a6b: f7 71 10 divl 0x10(%ecx) 111a6e: 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; 111a70: 8b 45 14 mov 0x14(%ebp),%eax 111a73: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 111a75: 31 c0 xor %eax,%eax 111a77: 3b 71 14 cmp 0x14(%ecx),%esi 111a7a: 72 36 jb 111ab2 <_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); 111a7c: 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; 111a7f: 8b 43 04 mov 0x4(%ebx),%eax 111a82: 83 e0 01 and $0x1,%eax 111a85: 09 f0 or %esi,%eax 111a87: 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 = 111a8a: 8b 41 20 mov 0x20(%ecx),%eax 111a8d: 29 d0 sub %edx,%eax 111a8f: 83 c8 01 or $0x1,%eax 111a92: 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; 111a95: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 111a98: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 111a9b: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 111a9e: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 111aa1: 50 push %eax 111aa2: 50 push %eax 111aa3: 83 c3 08 add $0x8,%ebx 111aa6: 53 push %ebx 111aa7: 51 push %ecx 111aa8: e8 27 be ff ff call 10d8d4 <_Heap_Free> 111aad: 31 c0 xor %eax,%eax 111aaf: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 111ab2: 8d 65 f8 lea -0x8(%ebp),%esp 111ab5: 5b pop %ebx 111ab6: 5e pop %esi 111ab7: c9 leave 111ab8: c3 ret =============================================================================== 0010e758 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 10e758: 55 push %ebp 10e759: 89 e5 mov %esp,%ebp 10e75b: 57 push %edi 10e75c: 56 push %esi 10e75d: 53 push %ebx 10e75e: 83 ec 14 sub $0x14,%esp 10e761: 8b 4d 08 mov 0x8(%ebp),%ecx 10e764: 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 ) 10e767: 8d 58 f8 lea -0x8(%eax),%ebx 10e76a: 31 d2 xor %edx,%edx 10e76c: f7 71 10 divl 0x10(%ecx) 10e76f: 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; 10e771: 8b 41 20 mov 0x20(%ecx),%eax 10e774: 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 10e777: 31 c0 xor %eax,%eax 10e779: 3b 5d f0 cmp -0x10(%ebp),%ebx 10e77c: 72 08 jb 10e786 <_Heap_Free+0x2e> 10e77e: 31 c0 xor %eax,%eax 10e780: 39 59 24 cmp %ebx,0x24(%ecx) 10e783: 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 ) ) { 10e786: 85 c0 test %eax,%eax 10e788: 0f 84 2d 01 00 00 je 10e8bb <_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; 10e78e: 8b 7b 04 mov 0x4(%ebx),%edi 10e791: 89 fa mov %edi,%edx 10e793: 83 e2 fe and $0xfffffffe,%edx 10e796: 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); 10e799: 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 10e79c: 31 f6 xor %esi,%esi 10e79e: 3b 45 f0 cmp -0x10(%ebp),%eax 10e7a1: 72 0e jb 10e7b1 <_Heap_Free+0x59> <== NEVER TAKEN 10e7a3: 39 41 24 cmp %eax,0x24(%ecx) 10e7a6: 0f 93 c2 setae %dl 10e7a9: 89 d6 mov %edx,%esi 10e7ab: 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 ) ) { 10e7b1: 85 f6 test %esi,%esi 10e7b3: 0f 84 02 01 00 00 je 10e8bb <_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; 10e7b9: 8b 70 04 mov 0x4(%eax),%esi _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10e7bc: f7 c6 01 00 00 00 test $0x1,%esi 10e7c2: 0f 84 f3 00 00 00 je 10e8bb <_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; 10e7c8: 83 e6 fe and $0xfffffffe,%esi 10e7cb: 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 )); 10e7ce: 8b 51 24 mov 0x24(%ecx),%edx 10e7d1: 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 10e7d4: 31 f6 xor %esi,%esi 10e7d6: 39 d0 cmp %edx,%eax 10e7d8: 74 0d je 10e7e7 <_Heap_Free+0x8f> 10e7da: 8b 55 e8 mov -0x18(%ebp),%edx 10e7dd: 8b 74 10 04 mov 0x4(%eax,%edx,1),%esi 10e7e1: 83 e6 01 and $0x1,%esi 10e7e4: 83 f6 01 xor $0x1,%esi && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 10e7e7: 83 e7 01 and $0x1,%edi 10e7ea: 75 64 jne 10e850 <_Heap_Free+0xf8> uintptr_t const prev_size = block->prev_size; 10e7ec: 8b 13 mov (%ebx),%edx 10e7ee: 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); 10e7f1: 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 10e7f3: 31 ff xor %edi,%edi 10e7f5: 3b 5d f0 cmp -0x10(%ebp),%ebx 10e7f8: 72 0e jb 10e808 <_Heap_Free+0xb0> <== NEVER TAKEN 10e7fa: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10e7fd: 0f 93 c2 setae %dl 10e800: 89 d7 mov %edx,%edi 10e802: 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 ) ) { 10e808: 85 ff test %edi,%edi 10e80a: 0f 84 ab 00 00 00 je 10e8bb <_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) ) { 10e810: f6 43 04 01 testb $0x1,0x4(%ebx) 10e814: 0f 84 a1 00 00 00 je 10e8bb <_Heap_Free+0x163> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 10e81a: 89 f2 mov %esi,%edx 10e81c: 84 d2 test %dl,%dl 10e81e: 74 1a je 10e83a <_Heap_Free+0xe2> uintptr_t const size = block_size + prev_size + next_block_size; 10e820: 8b 75 e0 mov -0x20(%ebp),%esi 10e823: 03 75 e8 add -0x18(%ebp),%esi 10e826: 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; 10e829: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = block->prev; 10e82c: 8b 40 0c mov 0xc(%eax),%eax prev->next = next; 10e82f: 89 78 08 mov %edi,0x8(%eax) next->prev = prev; 10e832: 89 47 0c mov %eax,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 10e835: ff 49 38 decl 0x38(%ecx) 10e838: eb 34 jmp 10e86e <_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; 10e83a: 8b 75 e0 mov -0x20(%ebp),%esi 10e83d: 03 75 ec add -0x14(%ebp),%esi prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10e840: 89 f7 mov %esi,%edi 10e842: 83 cf 01 or $0x1,%edi 10e845: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10e848: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = size; 10e84c: 89 30 mov %esi,(%eax) 10e84e: eb 5b jmp 10e8ab <_Heap_Free+0x153> } } else if ( next_is_free ) { /* coalesce next */ 10e850: 89 f2 mov %esi,%edx 10e852: 84 d2 test %dl,%dl 10e854: 74 25 je 10e87b <_Heap_Free+0x123> uintptr_t const size = block_size + next_block_size; 10e856: 8b 75 e8 mov -0x18(%ebp),%esi 10e859: 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; 10e85c: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = old_block->prev; 10e85f: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10e862: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 10e865: 89 43 0c mov %eax,0xc(%ebx) next->prev = new_block; 10e868: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 10e86b: 89 58 08 mov %ebx,0x8(%eax) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10e86e: 89 f0 mov %esi,%eax 10e870: 83 c8 01 or $0x1,%eax 10e873: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 10e876: 89 34 33 mov %esi,(%ebx,%esi,1) 10e879: eb 30 jmp 10e8ab <_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; 10e87b: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 10e87e: 89 73 08 mov %esi,0x8(%ebx) new_block->prev = block_before; 10e881: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10e884: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10e887: 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; 10e88a: 8b 75 e0 mov -0x20(%ebp),%esi 10e88d: 83 ce 01 or $0x1,%esi 10e890: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10e893: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = block_size; 10e897: 8b 55 e0 mov -0x20(%ebp),%edx 10e89a: 89 10 mov %edx,(%eax) /* Statistics */ ++stats->free_blocks; 10e89c: 8b 41 38 mov 0x38(%ecx),%eax 10e89f: 40 inc %eax 10e8a0: 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; 10e8a3: 39 41 3c cmp %eax,0x3c(%ecx) 10e8a6: 73 03 jae 10e8ab <_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; 10e8a8: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 10e8ab: ff 49 40 decl 0x40(%ecx) ++stats->frees; 10e8ae: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 10e8b1: 8b 45 e0 mov -0x20(%ebp),%eax 10e8b4: 01 41 30 add %eax,0x30(%ecx) 10e8b7: b0 01 mov $0x1,%al return( true ); 10e8b9: eb 02 jmp 10e8bd <_Heap_Free+0x165> 10e8bb: 31 c0 xor %eax,%eax } 10e8bd: 83 c4 14 add $0x14,%esp 10e8c0: 5b pop %ebx 10e8c1: 5e pop %esi 10e8c2: 5f pop %edi 10e8c3: c9 leave 10e8c4: c3 ret =============================================================================== 0011bc40 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11bc40: 55 push %ebp 11bc41: 89 e5 mov %esp,%ebp 11bc43: 56 push %esi 11bc44: 53 push %ebx 11bc45: 8b 5d 08 mov 0x8(%ebp),%ebx 11bc48: 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 ) 11bc4b: 8d 4e f8 lea -0x8(%esi),%ecx 11bc4e: 89 f0 mov %esi,%eax 11bc50: 31 d2 xor %edx,%edx 11bc52: f7 73 10 divl 0x10(%ebx) 11bc55: 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; 11bc57: 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 11bc5a: 31 c0 xor %eax,%eax 11bc5c: 39 d1 cmp %edx,%ecx 11bc5e: 72 08 jb 11bc68 <_Heap_Size_of_alloc_area+0x28> 11bc60: 31 c0 xor %eax,%eax 11bc62: 39 4b 24 cmp %ecx,0x24(%ebx) 11bc65: 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 ) ) { 11bc68: 85 c0 test %eax,%eax 11bc6a: 74 2e je 11bc9a <_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); 11bc6c: 8b 41 04 mov 0x4(%ecx),%eax 11bc6f: 83 e0 fe and $0xfffffffe,%eax 11bc72: 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 11bc74: 31 c0 xor %eax,%eax 11bc76: 39 d1 cmp %edx,%ecx 11bc78: 72 08 jb 11bc82 <_Heap_Size_of_alloc_area+0x42><== NEVER TAKEN 11bc7a: 31 c0 xor %eax,%eax 11bc7c: 39 4b 24 cmp %ecx,0x24(%ebx) 11bc7f: 0f 93 c0 setae %al } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11bc82: 85 c0 test %eax,%eax 11bc84: 74 14 je 11bc9a <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN 11bc86: f6 41 04 01 testb $0x1,0x4(%ecx) 11bc8a: 74 0e je 11bc9a <_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; 11bc8c: 29 f1 sub %esi,%ecx 11bc8e: 8d 51 04 lea 0x4(%ecx),%edx 11bc91: 8b 45 10 mov 0x10(%ebp),%eax 11bc94: 89 10 mov %edx,(%eax) 11bc96: b0 01 mov $0x1,%al return true; 11bc98: eb 02 jmp 11bc9c <_Heap_Size_of_alloc_area+0x5c> 11bc9a: 31 c0 xor %eax,%eax } 11bc9c: 5b pop %ebx 11bc9d: 5e pop %esi 11bc9e: c9 leave 11bc9f: c3 ret =============================================================================== 0010b975 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10b975: 55 push %ebp 10b976: 89 e5 mov %esp,%ebp 10b978: 57 push %edi 10b979: 56 push %esi 10b97a: 53 push %ebx 10b97b: 83 ec 4c sub $0x4c,%esp 10b97e: 8b 7d 08 mov 0x8(%ebp),%edi 10b981: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t const page_size = heap->page_size; 10b984: 8b 4f 10 mov 0x10(%edi),%ecx uintptr_t const min_block_size = heap->min_block_size; 10b987: 8b 47 14 mov 0x14(%edi),%eax 10b98a: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10b98d: 8b 57 24 mov 0x24(%edi),%edx 10b990: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *block = heap->first_block; 10b993: 8b 5f 20 mov 0x20(%edi),%ebx Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10b996: c7 45 e4 87 bc 10 00 movl $0x10bc87,-0x1c(%ebp) 10b99d: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10b9a1: 75 07 jne 10b9aa <_Heap_Walk+0x35> 10b9a3: c7 45 e4 70 b9 10 00 movl $0x10b970,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10b9aa: 83 3d 94 53 12 00 03 cmpl $0x3,0x125394 10b9b1: 0f 85 c6 02 00 00 jne 10bc7d <_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)( 10b9b7: 50 push %eax 10b9b8: ff 77 0c pushl 0xc(%edi) 10b9bb: ff 77 08 pushl 0x8(%edi) 10b9be: ff 75 d0 pushl -0x30(%ebp) 10b9c1: 53 push %ebx 10b9c2: ff 77 1c pushl 0x1c(%edi) 10b9c5: ff 77 18 pushl 0x18(%edi) 10b9c8: ff 75 dc pushl -0x24(%ebp) 10b9cb: 51 push %ecx 10b9cc: 68 a8 e6 11 00 push $0x11e6a8 10b9d1: 6a 00 push $0x0 10b9d3: 56 push %esi 10b9d4: 89 4d bc mov %ecx,-0x44(%ebp) 10b9d7: 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 ) { 10b9da: 83 c4 30 add $0x30,%esp 10b9dd: 8b 4d bc mov -0x44(%ebp),%ecx 10b9e0: 85 c9 test %ecx,%ecx 10b9e2: 75 0b jne 10b9ef <_Heap_Walk+0x7a> (*printer)( source, true, "page size is zero\n" ); 10b9e4: 53 push %ebx 10b9e5: 68 39 e7 11 00 push $0x11e739 10b9ea: e9 5b 02 00 00 jmp 10bc4a <_Heap_Walk+0x2d5> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10b9ef: f6 c1 03 test $0x3,%cl 10b9f2: 74 0b je 10b9ff <_Heap_Walk+0x8a> (*printer)( 10b9f4: 51 push %ecx 10b9f5: 68 4c e7 11 00 push $0x11e74c 10b9fa: e9 4b 02 00 00 jmp 10bc4a <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10b9ff: 8b 45 dc mov -0x24(%ebp),%eax 10ba02: 31 d2 xor %edx,%edx 10ba04: f7 f1 div %ecx 10ba06: 85 d2 test %edx,%edx 10ba08: 74 0d je 10ba17 <_Heap_Walk+0xa2> (*printer)( 10ba0a: ff 75 dc pushl -0x24(%ebp) 10ba0d: 68 6a e7 11 00 push $0x11e76a 10ba12: e9 33 02 00 00 jmp 10bc4a <_Heap_Walk+0x2d5> ); return false; } if ( 10ba17: 8d 43 08 lea 0x8(%ebx),%eax 10ba1a: 31 d2 xor %edx,%edx 10ba1c: f7 f1 div %ecx 10ba1e: 85 d2 test %edx,%edx 10ba20: 74 0b je 10ba2d <_Heap_Walk+0xb8> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10ba22: 53 push %ebx 10ba23: 68 8e e7 11 00 push $0x11e78e 10ba28: e9 1d 02 00 00 jmp 10bc4a <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10ba2d: f6 43 04 01 testb $0x1,0x4(%ebx) 10ba31: 75 0b jne 10ba3e <_Heap_Walk+0xc9> (*printer)( 10ba33: 51 push %ecx 10ba34: 68 bf e7 11 00 push $0x11e7bf 10ba39: e9 0c 02 00 00 jmp 10bc4a <_Heap_Walk+0x2d5> ); return false; } if ( first_block->prev_size != page_size ) { 10ba3e: 8b 03 mov (%ebx),%eax 10ba40: 89 45 d4 mov %eax,-0x2c(%ebp) 10ba43: 39 c8 cmp %ecx,%eax 10ba45: 74 0f je 10ba56 <_Heap_Walk+0xe1> (*printer)( 10ba47: 83 ec 0c sub $0xc,%esp 10ba4a: 51 push %ecx 10ba4b: 50 push %eax 10ba4c: 68 ed e7 11 00 push $0x11e7ed 10ba51: e9 3d 01 00 00 jmp 10bb93 <_Heap_Walk+0x21e> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10ba56: 8b 55 d0 mov -0x30(%ebp),%edx 10ba59: 8b 42 04 mov 0x4(%edx),%eax 10ba5c: 83 e0 fe and $0xfffffffe,%eax 10ba5f: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10ba64: 75 0b jne 10ba71 <_Heap_Walk+0xfc> (*printer)( 10ba66: 52 push %edx 10ba67: 68 18 e8 11 00 push $0x11e818 10ba6c: e9 d9 01 00 00 jmp 10bc4a <_Heap_Walk+0x2d5> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10ba71: 8b 4f 10 mov 0x10(%edi),%ecx 10ba74: 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; 10ba77: 8b 4f 08 mov 0x8(%edi),%ecx 10ba7a: 89 7d e0 mov %edi,-0x20(%ebp) 10ba7d: eb 6a jmp 10bae9 <_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 10ba7f: 31 c0 xor %eax,%eax 10ba81: 39 4f 20 cmp %ecx,0x20(%edi) 10ba84: 77 08 ja 10ba8e <_Heap_Walk+0x119> 10ba86: 31 c0 xor %eax,%eax 10ba88: 39 4f 24 cmp %ecx,0x24(%edi) 10ba8b: 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 ) ) { 10ba8e: 85 c0 test %eax,%eax 10ba90: 75 0b jne 10ba9d <_Heap_Walk+0x128> (*printer)( 10ba92: 51 push %ecx 10ba93: 68 2d e8 11 00 push $0x11e82d 10ba98: e9 ad 01 00 00 jmp 10bc4a <_Heap_Walk+0x2d5> ); return false; } if ( 10ba9d: 8d 41 08 lea 0x8(%ecx),%eax 10baa0: 31 d2 xor %edx,%edx 10baa2: f7 75 d8 divl -0x28(%ebp) 10baa5: 85 d2 test %edx,%edx 10baa7: 74 0b je 10bab4 <_Heap_Walk+0x13f> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10baa9: 51 push %ecx 10baaa: 68 4d e8 11 00 push $0x11e84d 10baaf: e9 96 01 00 00 jmp 10bc4a <_Heap_Walk+0x2d5> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10bab4: 8b 41 04 mov 0x4(%ecx),%eax 10bab7: 83 e0 fe and $0xfffffffe,%eax 10baba: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10babf: 74 0b je 10bacc <_Heap_Walk+0x157> (*printer)( 10bac1: 51 push %ecx 10bac2: 68 7d e8 11 00 push $0x11e87d 10bac7: e9 7e 01 00 00 jmp 10bc4a <_Heap_Walk+0x2d5> ); return false; } if ( free_block->prev != prev_block ) { 10bacc: 8b 41 0c mov 0xc(%ecx),%eax 10bacf: 3b 45 e0 cmp -0x20(%ebp),%eax 10bad2: 74 0f je 10bae3 <_Heap_Walk+0x16e> (*printer)( 10bad4: 83 ec 0c sub $0xc,%esp 10bad7: 50 push %eax 10bad8: 51 push %ecx 10bad9: 68 99 e8 11 00 push $0x11e899 10bade: e9 b0 00 00 00 jmp 10bb93 <_Heap_Walk+0x21e> return false; } prev_block = free_block; free_block = free_block->next; 10bae3: 89 4d e0 mov %ecx,-0x20(%ebp) 10bae6: 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 ) { 10bae9: 39 f9 cmp %edi,%ecx 10baeb: 75 92 jne 10ba7f <_Heap_Walk+0x10a> 10baed: 89 75 e0 mov %esi,-0x20(%ebp) 10baf0: e9 7f 01 00 00 jmp 10bc74 <_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; 10baf5: 8b 43 04 mov 0x4(%ebx),%eax 10baf8: 89 c1 mov %eax,%ecx 10bafa: 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); 10bafd: 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 ) { 10bb00: a8 01 test $0x1,%al 10bb02: 74 0c je 10bb10 <_Heap_Walk+0x19b> (*printer)( 10bb04: 83 ec 0c sub $0xc,%esp 10bb07: 51 push %ecx 10bb08: 53 push %ebx 10bb09: 68 cb e8 11 00 push $0x11e8cb 10bb0e: eb 0b jmp 10bb1b <_Heap_Walk+0x1a6> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10bb10: 50 push %eax 10bb11: 50 push %eax 10bb12: ff 33 pushl (%ebx) 10bb14: 51 push %ecx 10bb15: 53 push %ebx 10bb16: 68 e2 e8 11 00 push $0x11e8e2 10bb1b: 6a 00 push $0x0 10bb1d: ff 75 e0 pushl -0x20(%ebp) 10bb20: 89 4d bc mov %ecx,-0x44(%ebp) 10bb23: ff 55 e4 call *-0x1c(%ebp) 10bb26: 83 c4 20 add $0x20,%esp 10bb29: 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 10bb2c: 31 c0 xor %eax,%eax 10bb2e: 39 77 20 cmp %esi,0x20(%edi) 10bb31: 77 08 ja 10bb3b <_Heap_Walk+0x1c6> <== NEVER TAKEN 10bb33: 31 c0 xor %eax,%eax 10bb35: 39 77 24 cmp %esi,0x24(%edi) 10bb38: 0f 93 c0 setae %al block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10bb3b: 85 c0 test %eax,%eax 10bb3d: 75 11 jne 10bb50 <_Heap_Walk+0x1db> 10bb3f: 89 f1 mov %esi,%ecx 10bb41: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb44: 83 ec 0c sub $0xc,%esp 10bb47: 51 push %ecx 10bb48: 53 push %ebx 10bb49: 68 07 e9 11 00 push $0x11e907 10bb4e: eb 43 jmp 10bb93 <_Heap_Walk+0x21e> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10bb50: 89 c8 mov %ecx,%eax 10bb52: 31 d2 xor %edx,%edx 10bb54: f7 75 d4 divl -0x2c(%ebp) 10bb57: 85 d2 test %edx,%edx 10bb59: 74 0f je 10bb6a <_Heap_Walk+0x1f5> 10bb5b: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb5e: 83 ec 0c sub $0xc,%esp 10bb61: 51 push %ecx 10bb62: 53 push %ebx 10bb63: 68 34 e9 11 00 push $0x11e934 10bb68: eb 29 jmp 10bb93 <_Heap_Walk+0x21e> ); return false; } if ( block_size < min_block_size ) { 10bb6a: 3b 4d dc cmp -0x24(%ebp),%ecx 10bb6d: 73 11 jae 10bb80 <_Heap_Walk+0x20b> 10bb6f: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb72: 57 push %edi 10bb73: 57 push %edi 10bb74: ff 75 dc pushl -0x24(%ebp) 10bb77: 51 push %ecx 10bb78: 53 push %ebx 10bb79: 68 62 e9 11 00 push $0x11e962 10bb7e: eb 13 jmp 10bb93 <_Heap_Walk+0x21e> ); return false; } if ( next_block_begin <= block_begin ) { 10bb80: 39 de cmp %ebx,%esi 10bb82: 77 1f ja 10bba3 <_Heap_Walk+0x22e> 10bb84: 89 f1 mov %esi,%ecx 10bb86: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb89: 83 ec 0c sub $0xc,%esp 10bb8c: 51 push %ecx 10bb8d: 53 push %ebx 10bb8e: 68 8d e9 11 00 push $0x11e98d 10bb93: 6a 01 push $0x1 10bb95: 56 push %esi 10bb96: ff 55 e4 call *-0x1c(%ebp) 10bb99: 31 c0 xor %eax,%eax "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 10bb9b: 83 c4 20 add $0x20,%esp 10bb9e: e9 dc 00 00 00 jmp 10bc7f <_Heap_Walk+0x30a> } if ( !_Heap_Is_prev_used( next_block ) ) { 10bba3: f6 46 04 01 testb $0x1,0x4(%esi) 10bba7: 0f 85 c5 00 00 00 jne 10bc72 <_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; 10bbad: 8b 47 08 mov 0x8(%edi),%eax 10bbb0: 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; 10bbb3: 8b 53 04 mov 0x4(%ebx),%edx 10bbb6: 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; 10bbb9: 83 e2 fe and $0xfffffffe,%edx 10bbbc: 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); 10bbbf: 01 da add %ebx,%edx 10bbc1: 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)( 10bbc4: 8b 4b 08 mov 0x8(%ebx),%ecx 10bbc7: 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; 10bbca: ba c1 e9 11 00 mov $0x11e9c1,%edx 10bbcf: 3b 4f 0c cmp 0xc(%edi),%ecx 10bbd2: 74 0e je 10bbe2 <_Heap_Walk+0x26d> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10bbd4: ba cb e9 11 00 mov $0x11e9cb,%edx 10bbd9: 39 f9 cmp %edi,%ecx 10bbdb: 74 05 je 10bbe2 <_Heap_Walk+0x26d> 10bbdd: ba f6 e5 11 00 mov $0x11e5f6,%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)( 10bbe2: 8b 43 0c mov 0xc(%ebx),%eax 10bbe5: 89 45 d8 mov %eax,-0x28(%ebp) 10bbe8: b8 d5 e9 11 00 mov $0x11e9d5,%eax 10bbed: 8b 4d c0 mov -0x40(%ebp),%ecx 10bbf0: 39 4d d8 cmp %ecx,-0x28(%ebp) 10bbf3: 74 0f je 10bc04 <_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)" : ""), 10bbf5: b8 e0 e9 11 00 mov $0x11e9e0,%eax 10bbfa: 39 7d d8 cmp %edi,-0x28(%ebp) 10bbfd: 74 05 je 10bc04 <_Heap_Walk+0x28f> 10bbff: b8 f6 e5 11 00 mov $0x11e5f6,%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)( 10bc04: 52 push %edx 10bc05: ff 75 b4 pushl -0x4c(%ebp) 10bc08: 50 push %eax 10bc09: ff 75 d8 pushl -0x28(%ebp) 10bc0c: 53 push %ebx 10bc0d: 68 ea e9 11 00 push $0x11e9ea 10bc12: 6a 00 push $0x0 10bc14: ff 75 e0 pushl -0x20(%ebp) 10bc17: 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 ) { 10bc1a: 8b 55 c8 mov -0x38(%ebp),%edx 10bc1d: 8b 02 mov (%edx),%eax 10bc1f: 83 c4 20 add $0x20,%esp 10bc22: 39 45 cc cmp %eax,-0x34(%ebp) 10bc25: 74 14 je 10bc3b <_Heap_Walk+0x2c6> 10bc27: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bc2a: 51 push %ecx 10bc2b: 52 push %edx 10bc2c: 50 push %eax 10bc2d: ff 75 cc pushl -0x34(%ebp) 10bc30: 53 push %ebx 10bc31: 68 16 ea 11 00 push $0x11ea16 10bc36: e9 58 ff ff ff jmp 10bb93 <_Heap_Walk+0x21e> ); return false; } if ( !prev_used ) { 10bc3b: f6 45 c4 01 testb $0x1,-0x3c(%ebp) 10bc3f: 75 16 jne 10bc57 <_Heap_Walk+0x2e2> 10bc41: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bc44: 53 push %ebx 10bc45: 68 4f ea 11 00 push $0x11ea4f 10bc4a: 6a 01 push $0x1 10bc4c: 56 push %esi 10bc4d: ff 55 e4 call *-0x1c(%ebp) 10bc50: 31 c0 xor %eax,%eax 10bc52: 83 c4 10 add $0x10,%esp 10bc55: eb 28 jmp 10bc7f <_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; 10bc57: 8b 47 08 mov 0x8(%edi),%eax 10bc5a: eb 07 jmp 10bc63 <_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 ) { 10bc5c: 39 d8 cmp %ebx,%eax 10bc5e: 74 12 je 10bc72 <_Heap_Walk+0x2fd> return true; } free_block = free_block->next; 10bc60: 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 ) { 10bc63: 39 f8 cmp %edi,%eax 10bc65: 75 f5 jne 10bc5c <_Heap_Walk+0x2e7> 10bc67: 8b 75 e0 mov -0x20(%ebp),%esi return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10bc6a: 53 push %ebx 10bc6b: 68 7e ea 11 00 push $0x11ea7e 10bc70: eb d8 jmp 10bc4a <_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 ) { 10bc72: 89 f3 mov %esi,%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10bc74: 3b 5d d0 cmp -0x30(%ebp),%ebx 10bc77: 0f 85 78 fe ff ff jne 10baf5 <_Heap_Walk+0x180> 10bc7d: b0 01 mov $0x1,%al block = next_block; } return true; } 10bc7f: 8d 65 f4 lea -0xc(%ebp),%esp 10bc82: 5b pop %ebx 10bc83: 5e pop %esi 10bc84: 5f pop %edi 10bc85: c9 leave 10bc86: c3 ret =============================================================================== 0010af64 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10af64: 55 push %ebp 10af65: 89 e5 mov %esp,%ebp 10af67: 53 push %ebx 10af68: 83 ec 08 sub $0x8,%esp 10af6b: 8b 45 08 mov 0x8(%ebp),%eax 10af6e: 8b 55 0c mov 0xc(%ebp),%edx 10af71: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10af74: a3 f8 3a 12 00 mov %eax,0x123af8 _Internal_errors_What_happened.is_internal = is_internal; 10af79: 88 15 fc 3a 12 00 mov %dl,0x123afc _Internal_errors_What_happened.the_error = the_error; 10af7f: 89 1d 00 3b 12 00 mov %ebx,0x123b00 _User_extensions_Fatal( the_source, is_internal, the_error ); 10af85: 53 push %ebx 10af86: 0f b6 d2 movzbl %dl,%edx 10af89: 52 push %edx 10af8a: 50 push %eax 10af8b: e8 ab 18 00 00 call 10c83b <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10af90: c7 05 ec 3b 12 00 05 movl $0x5,0x123bec <== NOT EXECUTED 10af97: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10af9a: fa cli <== NOT EXECUTED 10af9b: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10af9d: f4 hlt <== NOT EXECUTED 10af9e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10afa1: eb fe jmp 10afa1 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 0010affc <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10affc: 55 push %ebp 10affd: 89 e5 mov %esp,%ebp 10afff: 56 push %esi 10b000: 53 push %ebx 10b001: 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 ) 10b004: 31 c9 xor %ecx,%ecx 10b006: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10b00a: 74 53 je 10b05f <_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 ); 10b00c: 8d 73 20 lea 0x20(%ebx),%esi 10b00f: 83 ec 0c sub $0xc,%esp 10b012: 56 push %esi 10b013: e8 0c f8 ff ff call 10a824 <_Chain_Get> 10b018: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10b01a: 83 c4 10 add $0x10,%esp 10b01d: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b021: 74 3c je 10b05f <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10b023: 85 c0 test %eax,%eax 10b025: 75 1a jne 10b041 <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10b027: 83 ec 0c sub $0xc,%esp 10b02a: 53 push %ebx 10b02b: e8 60 00 00 00 call 10b090 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b030: 89 34 24 mov %esi,(%esp) 10b033: e8 ec f7 ff ff call 10a824 <_Chain_Get> 10b038: 89 c1 mov %eax,%ecx } if ( the_object ) { 10b03a: 83 c4 10 add $0x10,%esp 10b03d: 85 c0 test %eax,%eax 10b03f: 74 1e je 10b05f <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10b041: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10b045: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b049: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10b04b: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b04f: 31 d2 xor %edx,%edx 10b051: f7 f6 div %esi 10b053: c1 e0 02 shl $0x2,%eax 10b056: 03 43 30 add 0x30(%ebx),%eax 10b059: ff 08 decl (%eax) information->inactive--; 10b05b: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10b05f: 89 c8 mov %ecx,%eax 10b061: 8d 65 f8 lea -0x8(%ebp),%esp 10b064: 5b pop %ebx 10b065: 5e pop %esi 10b066: c9 leave 10b067: c3 ret =============================================================================== 0010b090 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10b090: 55 push %ebp 10b091: 89 e5 mov %esp,%ebp 10b093: 57 push %edi 10b094: 56 push %esi 10b095: 53 push %ebx 10b096: 83 ec 4c sub $0x4c,%esp 10b099: 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 ); 10b09c: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10b0a0: 89 45 c8 mov %eax,-0x38(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10b0a3: 8b 4b 34 mov 0x34(%ebx),%ecx 10b0a6: 85 c9 test %ecx,%ecx 10b0a8: 75 0e jne 10b0b8 <_Objects_Extend_information+0x28> 10b0aa: 89 45 d4 mov %eax,-0x2c(%ebp) 10b0ad: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b0b4: 31 d2 xor %edx,%edx 10b0b6: eb 31 jmp 10b0e9 <_Objects_Extend_information+0x59> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10b0b8: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b0bc: 8b 43 10 mov 0x10(%ebx),%eax 10b0bf: 31 d2 xor %edx,%edx 10b0c1: 66 f7 f6 div %si 10b0c4: 0f b7 d0 movzwl %ax,%edx 10b0c7: 8b 7d c8 mov -0x38(%ebp),%edi 10b0ca: 89 7d d4 mov %edi,-0x2c(%ebp) 10b0cd: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b0d4: 31 c0 xor %eax,%eax for ( ; block < block_count; block++ ) { 10b0d6: eb 0a jmp 10b0e2 <_Objects_Extend_information+0x52> if ( information->object_blocks[ block ] == NULL ) 10b0d8: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4) 10b0dc: 74 08 je 10b0e6 <_Objects_Extend_information+0x56> 10b0de: 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++ ) { 10b0e1: 40 inc %eax 10b0e2: 39 d0 cmp %edx,%eax 10b0e4: 72 f2 jb 10b0d8 <_Objects_Extend_information+0x48> 10b0e6: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10b0e9: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10b0ed: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b0f1: 8d 0c 08 lea (%eax,%ecx,1),%ecx 10b0f4: 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 ) { 10b0f7: 81 f9 ff ff 00 00 cmp $0xffff,%ecx 10b0fd: 0f 87 db 01 00 00 ja 10b2de <_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; 10b103: 0f af 43 18 imul 0x18(%ebx),%eax if ( information->auto_extend ) { 10b107: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b10b: 74 1e je 10b12b <_Objects_Extend_information+0x9b> new_object_block = _Workspace_Allocate( block_size ); 10b10d: 83 ec 0c sub $0xc,%esp 10b110: 50 push %eax 10b111: 89 55 b4 mov %edx,-0x4c(%ebp) 10b114: e8 53 1a 00 00 call 10cb6c <_Workspace_Allocate> 10b119: 89 45 bc mov %eax,-0x44(%ebp) if ( !new_object_block ) 10b11c: 83 c4 10 add $0x10,%esp 10b11f: 85 c0 test %eax,%eax 10b121: 8b 55 b4 mov -0x4c(%ebp),%edx 10b124: 75 1a jne 10b140 <_Objects_Extend_information+0xb0> 10b126: e9 b3 01 00 00 jmp 10b2de <_Objects_Extend_information+0x24e> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10b12b: 83 ec 0c sub $0xc,%esp 10b12e: 50 push %eax 10b12f: 89 55 b4 mov %edx,-0x4c(%ebp) 10b132: e8 09 1a 00 00 call 10cb40 <_Workspace_Allocate_or_fatal_error> 10b137: 89 45 bc mov %eax,-0x44(%ebp) 10b13a: 83 c4 10 add $0x10,%esp 10b13d: 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 ) { 10b140: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b144: 39 45 d4 cmp %eax,-0x2c(%ebp) 10b147: 0f 82 14 01 00 00 jb 10b261 <_Objects_Extend_information+0x1d1> */ /* * Up the block count and maximum */ block_count++; 10b14d: 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 ); 10b150: 83 ec 0c sub $0xc,%esp 10b153: 8b 4d b8 mov -0x48(%ebp),%ecx 10b156: 03 4d c8 add -0x38(%ebp),%ecx 10b159: 8d 04 76 lea (%esi,%esi,2),%eax 10b15c: 8d 04 01 lea (%ecx,%eax,1),%eax 10b15f: c1 e0 02 shl $0x2,%eax 10b162: 50 push %eax 10b163: 89 55 b4 mov %edx,-0x4c(%ebp) 10b166: e8 01 1a 00 00 call 10cb6c <_Workspace_Allocate> if ( !object_blocks ) { 10b16b: 83 c4 10 add $0x10,%esp 10b16e: 85 c0 test %eax,%eax 10b170: 8b 55 b4 mov -0x4c(%ebp),%edx 10b173: 75 13 jne 10b188 <_Objects_Extend_information+0xf8> _Workspace_Free( new_object_block ); 10b175: 83 ec 0c sub $0xc,%esp 10b178: ff 75 bc pushl -0x44(%ebp) 10b17b: e8 05 1a 00 00 call 10cb85 <_Workspace_Free> return; 10b180: 83 c4 10 add $0x10,%esp 10b183: e9 56 01 00 00 jmp 10b2de <_Objects_Extend_information+0x24e> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10b188: 8d 0c b0 lea (%eax,%esi,4),%ecx 10b18b: 89 4d c0 mov %ecx,-0x40(%ebp) 10b18e: 8d 34 f0 lea (%eax,%esi,8),%esi 10b191: 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 ) { 10b194: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b198: 31 c9 xor %ecx,%ecx 10b19a: 3b 75 c8 cmp -0x38(%ebp),%esi 10b19d: 76 3e jbe 10b1dd <_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, 10b19f: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi 10b1a6: 89 75 d0 mov %esi,-0x30(%ebp) 10b1a9: 8b 73 34 mov 0x34(%ebx),%esi 10b1ac: 89 c7 mov %eax,%edi 10b1ae: 8b 4d d0 mov -0x30(%ebp),%ecx 10b1b1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10b1b3: 8b 73 30 mov 0x30(%ebx),%esi 10b1b6: 8b 7d c0 mov -0x40(%ebp),%edi 10b1b9: 8b 4d d0 mov -0x30(%ebp),%ecx 10b1bc: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b1be: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b1c2: 03 4d c8 add -0x38(%ebp),%ecx 10b1c5: c1 e1 02 shl $0x2,%ecx 10b1c8: 8b 73 1c mov 0x1c(%ebx),%esi 10b1cb: 8b 7d c4 mov -0x3c(%ebp),%edi 10b1ce: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10b1d0: eb 10 jmp 10b1e2 <_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; 10b1d2: 8b 7d c4 mov -0x3c(%ebp),%edi 10b1d5: 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++ ) { 10b1dc: 41 inc %ecx 10b1dd: 3b 4d c8 cmp -0x38(%ebp),%ecx 10b1e0: 72 f0 jb 10b1d2 <_Objects_Extend_information+0x142> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10b1e2: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) inactive_per_block[block_count] = 0; 10b1e9: 8b 4d c0 mov -0x40(%ebp),%ecx 10b1ec: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b1f3: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b1f7: 8b 75 d4 mov -0x2c(%ebp),%esi 10b1fa: 01 d6 add %edx,%esi 10b1fc: 8b 7d d4 mov -0x2c(%ebp),%edi 10b1ff: 8b 55 c4 mov -0x3c(%ebp),%edx 10b202: 8d 0c ba lea (%edx,%edi,4),%ecx 10b205: 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 ; 10b207: eb 0a jmp 10b213 <_Objects_Extend_information+0x183> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10b209: 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++ ) { 10b20f: 42 inc %edx 10b210: 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 ; 10b213: 39 f2 cmp %esi,%edx 10b215: 72 f2 jb 10b209 <_Objects_Extend_information+0x179> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10b217: 9c pushf 10b218: fa cli 10b219: 5e pop %esi old_tables = information->object_blocks; 10b21a: 8b 53 34 mov 0x34(%ebx),%edx information->object_blocks = object_blocks; 10b21d: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10b220: 8b 4d c0 mov -0x40(%ebp),%ecx 10b223: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10b226: 8b 7d c4 mov -0x3c(%ebp),%edi 10b229: 89 7b 1c mov %edi,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10b22c: 8b 45 b8 mov -0x48(%ebp),%eax 10b22f: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10b233: 8b 03 mov (%ebx),%eax 10b235: c1 e0 18 shl $0x18,%eax 10b238: 0d 00 00 01 00 or $0x10000,%eax 10b23d: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b241: c1 e1 1b shl $0x1b,%ecx 10b244: 09 c8 or %ecx,%eax 10b246: 0f b7 4d b8 movzwl -0x48(%ebp),%ecx 10b24a: 09 c8 or %ecx,%eax 10b24c: 89 43 0c mov %eax,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10b24f: 56 push %esi 10b250: 9d popf if ( old_tables ) 10b251: 85 d2 test %edx,%edx 10b253: 74 0c je 10b261 <_Objects_Extend_information+0x1d1> _Workspace_Free( old_tables ); 10b255: 83 ec 0c sub $0xc,%esp 10b258: 52 push %edx 10b259: e8 27 19 00 00 call 10cb85 <_Workspace_Free> 10b25e: 83 c4 10 add $0x10,%esp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10b261: 8b 55 cc mov -0x34(%ebp),%edx 10b264: c1 e2 02 shl $0x2,%edx 10b267: 89 55 d0 mov %edx,-0x30(%ebp) 10b26a: 8b 43 34 mov 0x34(%ebx),%eax 10b26d: 8b 75 bc mov -0x44(%ebp),%esi 10b270: 8b 4d cc mov -0x34(%ebp),%ecx 10b273: 89 34 88 mov %esi,(%eax,%ecx,4) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10b276: ff 73 18 pushl 0x18(%ebx) 10b279: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b27d: 52 push %edx 10b27e: ff 34 88 pushl (%eax,%ecx,4) 10b281: 8d 45 dc lea -0x24(%ebp),%eax 10b284: 50 push %eax 10b285: 89 45 b4 mov %eax,-0x4c(%ebp) 10b288: e8 57 31 00 00 call 10e3e4 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b28d: 8d 7b 20 lea 0x20(%ebx),%edi 10b290: 8b 75 d4 mov -0x2c(%ebp),%esi 10b293: eb 23 jmp 10b2b8 <_Objects_Extend_information+0x228> */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 10b295: 8b 13 mov (%ebx),%edx 10b297: c1 e2 18 shl $0x18,%edx 10b29a: 81 ca 00 00 01 00 or $0x10000,%edx 10b2a0: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b2a4: c1 e1 1b shl $0x1b,%ecx 10b2a7: 09 ca or %ecx,%edx 10b2a9: 09 f2 or %esi,%edx 10b2ab: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b2ae: 52 push %edx 10b2af: 52 push %edx 10b2b0: 50 push %eax 10b2b1: 57 push %edi 10b2b2: e8 49 f5 ff ff call 10a800 <_Chain_Append> index++; 10b2b7: 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 ) { 10b2b8: 8d 45 dc lea -0x24(%ebp),%eax 10b2bb: 89 04 24 mov %eax,(%esp) 10b2be: e8 61 f5 ff ff call 10a824 <_Chain_Get> 10b2c3: 83 c4 10 add $0x10,%esp 10b2c6: 85 c0 test %eax,%eax 10b2c8: 75 cb jne 10b295 <_Objects_Extend_information+0x205> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10b2ca: 8b 43 30 mov 0x30(%ebx),%eax 10b2cd: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b2d1: 8b 4d d0 mov -0x30(%ebp),%ecx 10b2d4: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10b2d7: 8b 43 14 mov 0x14(%ebx),%eax 10b2da: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10b2de: 8d 65 f4 lea -0xc(%ebp),%esp 10b2e1: 5b pop %ebx 10b2e2: 5e pop %esi 10b2e3: 5f pop %edi 10b2e4: c9 leave 10b2e5: c3 ret =============================================================================== 0010b378 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10b378: 55 push %ebp 10b379: 89 e5 mov %esp,%ebp 10b37b: 56 push %esi 10b37c: 53 push %ebx 10b37d: 8b 75 08 mov 0x8(%ebp),%esi 10b380: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10b383: 85 db test %ebx,%ebx 10b385: 74 2d je 10b3b4 <_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 ); 10b387: 83 ec 0c sub $0xc,%esp 10b38a: 56 push %esi 10b38b: e8 38 35 00 00 call 10e8c8 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10b390: 83 c4 10 add $0x10,%esp 10b393: 85 c0 test %eax,%eax 10b395: 74 1d je 10b3b4 <_Objects_Get_information+0x3c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10b397: 39 c3 cmp %eax,%ebx 10b399: 77 19 ja 10b3b4 <_Objects_Get_information+0x3c> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10b39b: 8b 04 b5 28 3a 12 00 mov 0x123a28(,%esi,4),%eax 10b3a2: 85 c0 test %eax,%eax 10b3a4: 74 0e je 10b3b4 <_Objects_Get_information+0x3c><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10b3a6: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10b3a9: 85 c0 test %eax,%eax 10b3ab: 74 09 je 10b3b6 <_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 ) 10b3ad: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10b3b2: 75 02 jne 10b3b6 <_Objects_Get_information+0x3e> 10b3b4: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10b3b6: 8d 65 f8 lea -0x8(%ebp),%esp 10b3b9: 5b pop %ebx 10b3ba: 5e pop %esi 10b3bb: c9 leave 10b3bc: c3 ret =============================================================================== 0010c90c <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10c90c: 55 push %ebp 10c90d: 89 e5 mov %esp,%ebp 10c90f: 57 push %edi 10c910: 56 push %esi 10c911: 53 push %ebx 10c912: 83 ec 2c sub $0x2c,%esp 10c915: 8b 75 0c mov 0xc(%ebp),%esi 10c918: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10c91b: 85 f6 test %esi,%esi 10c91d: 0f 84 95 00 00 00 je 10c9b8 <_Objects_Get_name_as_string+0xac><== NEVER TAKEN return NULL; if ( name == NULL ) 10c923: 85 db test %ebx,%ebx 10c925: 0f 84 8f 00 00 00 je 10c9ba <_Objects_Get_name_as_string+0xae><== NEVER TAKEN return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10c92b: 8b 7d 08 mov 0x8(%ebp),%edi 10c92e: 85 ff test %edi,%edi 10c930: 75 08 jne 10c93a <_Objects_Get_name_as_string+0x2e> 10c932: a1 74 ea 12 00 mov 0x12ea74,%eax 10c937: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 10c93a: 83 ec 0c sub $0xc,%esp 10c93d: 57 push %edi 10c93e: e8 11 ff ff ff call 10c854 <_Objects_Get_information_id> if ( !information ) 10c943: 83 c4 10 add $0x10,%esp 10c946: 85 c0 test %eax,%eax 10c948: 74 6e je 10c9b8 <_Objects_Get_name_as_string+0xac><== NEVER TAKEN return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10c94a: 52 push %edx 10c94b: 8d 55 e4 lea -0x1c(%ebp),%edx 10c94e: 52 push %edx 10c94f: 57 push %edi 10c950: 50 push %eax 10c951: e8 6e 00 00 00 call 10c9c4 <_Objects_Get> switch ( location ) { 10c956: 83 c4 10 add $0x10,%esp 10c959: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10c95d: 75 59 jne 10c9b8 <_Objects_Get_name_as_string+0xac> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 10c95f: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 10c962: 89 c2 mov %eax,%edx 10c964: c1 ea 18 shr $0x18,%edx 10c967: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10c96a: 89 c2 mov %eax,%edx 10c96c: c1 ea 10 shr $0x10,%edx 10c96f: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10c972: 89 c2 mov %eax,%edx 10c974: c1 ea 08 shr $0x8,%edx 10c977: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10c97a: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 10c97d: c6 45 e3 00 movb $0x0,-0x1d(%ebp) 10c981: 89 d8 mov %ebx,%eax 10c983: 31 d2 xor %edx,%edx s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10c985: 4e dec %esi 10c986: 89 75 d4 mov %esi,-0x2c(%ebp) 10c989: eb 16 jmp 10c9a1 <_Objects_Get_name_as_string+0x95> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10c98b: 0f b6 f1 movzbl %cl,%esi 10c98e: 8b 3d 6c 4a 12 00 mov 0x124a6c,%edi 10c994: f6 44 37 01 97 testb $0x97,0x1(%edi,%esi,1) 10c999: 75 02 jne 10c99d <_Objects_Get_name_as_string+0x91> 10c99b: b1 2a mov $0x2a,%cl 10c99d: 88 08 mov %cl,(%eax) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10c99f: 42 inc %edx 10c9a0: 40 inc %eax 10c9a1: 3b 55 d4 cmp -0x2c(%ebp),%edx 10c9a4: 73 08 jae 10c9ae <_Objects_Get_name_as_string+0xa2> 10c9a6: 8a 4c 15 df mov -0x21(%ebp,%edx,1),%cl 10c9aa: 84 c9 test %cl,%cl 10c9ac: 75 dd jne 10c98b <_Objects_Get_name_as_string+0x7f> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10c9ae: c6 00 00 movb $0x0,(%eax) _Thread_Enable_dispatch(); 10c9b1: e8 d3 07 00 00 call 10d189 <_Thread_Enable_dispatch> return name; 10c9b6: eb 02 jmp 10c9ba <_Objects_Get_name_as_string+0xae> 10c9b8: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 10c9ba: 89 d8 mov %ebx,%eax 10c9bc: 8d 65 f4 lea -0xc(%ebp),%esp 10c9bf: 5b pop %ebx 10c9c0: 5e pop %esi 10c9c1: 5f pop %edi 10c9c2: c9 leave 10c9c3: c3 ret =============================================================================== 00118930 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 118930: 55 push %ebp 118931: 89 e5 mov %esp,%ebp 118933: 53 push %ebx 118934: 8b 55 08 mov 0x8(%ebp),%edx 118937: 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; 11893a: b8 01 00 00 00 mov $0x1,%eax 11893f: 2b 42 08 sub 0x8(%edx),%eax 118942: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 118945: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 118949: 39 c3 cmp %eax,%ebx 11894b: 72 12 jb 11895f <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 11894d: 8b 52 1c mov 0x1c(%edx),%edx 118950: 8b 04 82 mov (%edx,%eax,4),%eax 118953: 85 c0 test %eax,%eax 118955: 74 08 je 11895f <_Objects_Get_no_protection+0x2f><== NEVER TAKEN *location = OBJECTS_LOCAL; 118957: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 11895d: eb 08 jmp 118967 <_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; 11895f: c7 01 01 00 00 00 movl $0x1,(%ecx) 118965: 31 c0 xor %eax,%eax return NULL; } 118967: 5b pop %ebx 118968: c9 leave 118969: c3 ret =============================================================================== 0010c564 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10c564: 55 push %ebp 10c565: 89 e5 mov %esp,%ebp 10c567: 83 ec 18 sub $0x18,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10c56a: 8b 45 08 mov 0x8(%ebp),%eax 10c56d: 85 c0 test %eax,%eax 10c56f: 75 08 jne 10c579 <_Objects_Id_to_name+0x15> 10c571: a1 7c 52 12 00 mov 0x12527c,%eax 10c576: 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); 10c579: 89 c2 mov %eax,%edx 10c57b: c1 ea 18 shr $0x18,%edx 10c57e: 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 ) 10c581: 8d 4a ff lea -0x1(%edx),%ecx 10c584: 83 f9 03 cmp $0x3,%ecx 10c587: 77 32 ja 10c5bb <_Objects_Id_to_name+0x57> 10c589: eb 37 jmp 10c5c2 <_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 ]; 10c58b: 89 c1 mov %eax,%ecx 10c58d: c1 e9 1b shr $0x1b,%ecx 10c590: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10c593: 85 d2 test %edx,%edx 10c595: 74 24 je 10c5bb <_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 ); 10c597: 51 push %ecx 10c598: 8d 4d f4 lea -0xc(%ebp),%ecx 10c59b: 51 push %ecx 10c59c: 50 push %eax 10c59d: 52 push %edx 10c59e: e8 69 ff ff ff call 10c50c <_Objects_Get> if ( !the_object ) 10c5a3: 83 c4 10 add $0x10,%esp 10c5a6: 85 c0 test %eax,%eax 10c5a8: 74 11 je 10c5bb <_Objects_Id_to_name+0x57> return OBJECTS_INVALID_ID; *name = the_object->name; 10c5aa: 8b 50 0c mov 0xc(%eax),%edx 10c5ad: 8b 45 0c mov 0xc(%ebp),%eax 10c5b0: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10c5b2: e8 86 07 00 00 call 10cd3d <_Thread_Enable_dispatch> 10c5b7: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10c5b9: eb 05 jmp 10c5c0 <_Objects_Id_to_name+0x5c> 10c5bb: b8 03 00 00 00 mov $0x3,%eax } 10c5c0: c9 leave 10c5c1: 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 ] ) 10c5c2: 8b 14 95 94 51 12 00 mov 0x125194(,%edx,4),%edx 10c5c9: 85 d2 test %edx,%edx 10c5cb: 75 be jne 10c58b <_Objects_Id_to_name+0x27> 10c5cd: eb ec jmp 10c5bb <_Objects_Id_to_name+0x57> =============================================================================== 0010b468 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10b468: 55 push %ebp 10b469: 89 e5 mov %esp,%ebp 10b46b: 57 push %edi 10b46c: 56 push %esi 10b46d: 53 push %ebx 10b46e: 83 ec 1c sub $0x1c,%esp 10b471: 8b 45 08 mov 0x8(%ebp),%eax 10b474: 8b 55 0c mov 0xc(%ebp),%edx 10b477: 8b 75 10 mov 0x10(%ebp),%esi 10b47a: 8b 5d 14 mov 0x14(%ebp),%ebx 10b47d: 8b 4d 20 mov 0x20(%ebp),%ecx 10b480: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b483: 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; 10b487: 89 10 mov %edx,(%eax) information->the_class = the_class; 10b489: 66 89 70 04 mov %si,0x4(%eax) information->size = size; 10b48d: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10b490: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10b497: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10b49e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10b4a5: 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; 10b4ab: 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; 10b4b1: 8b 3c 95 28 3a 12 00 mov 0x123a28(,%edx,4),%edi 10b4b8: 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; 10b4bb: 89 df mov %ebx,%edi 10b4bd: 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 = 10b4c0: 89 f9 mov %edi,%ecx 10b4c2: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10b4c5: 89 d9 mov %ebx,%ecx 10b4c7: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10b4cd: 85 ff test %edi,%edi 10b4cf: 74 10 je 10b4e1 <_Objects_Initialize_information+0x79> 10b4d1: 85 c9 test %ecx,%ecx 10b4d3: 75 0c jne 10b4e1 <_Objects_Initialize_information+0x79> _Internal_error_Occurred( 10b4d5: 50 push %eax 10b4d6: 6a 14 push $0x14 10b4d8: 6a 01 push $0x1 10b4da: 6a 00 push $0x0 10b4dc: e8 83 fa ff ff call 10af64 <_Internal_error_Occurred> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10b4e1: 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; 10b4e5: c7 40 1c f0 36 12 00 movl $0x1236f0,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10b4ec: c1 e2 18 shl $0x18,%edx 10b4ef: 81 ca 00 00 01 00 or $0x10000,%edx 10b4f5: c1 e6 1b shl $0x1b,%esi 10b4f8: 09 f2 or %esi,%edx 10b4fa: 85 c9 test %ecx,%ecx 10b4fc: 0f 95 c3 setne %bl 10b4ff: 89 de mov %ebx,%esi 10b501: 81 e6 ff 00 00 00 and $0xff,%esi 10b507: 09 f2 or %esi,%edx 10b509: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10b50c: 8b 55 e4 mov -0x1c(%ebp),%edx 10b50f: f6 c2 03 test $0x3,%dl 10b512: 74 06 je 10b51a <_Objects_Initialize_information+0xb2><== ALWAYS TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10b514: 83 c2 04 add $0x4,%edx <== NOT EXECUTED 10b517: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10b51a: 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); 10b51e: 8d 50 24 lea 0x24(%eax),%edx 10b521: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10b524: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10b52b: 8d 50 20 lea 0x20(%eax),%edx 10b52e: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10b531: 85 c9 test %ecx,%ecx 10b533: 74 0f je 10b544 <_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 ); 10b535: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10b538: 8d 65 f4 lea -0xc(%ebp),%esp 10b53b: 5b pop %ebx 10b53c: 5e pop %esi 10b53d: 5f pop %edi 10b53e: 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 ); 10b53f: e9 4c fb ff ff jmp 10b090 <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10b544: 8d 65 f4 lea -0xc(%ebp),%esp 10b547: 5b pop %ebx 10b548: 5e pop %esi 10b549: 5f pop %edi 10b54a: c9 leave 10b54b: c3 ret =============================================================================== 0010e18e <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10e18e: 55 push %ebp 10e18f: 89 e5 mov %esp,%ebp 10e191: 57 push %edi 10e192: 56 push %esi 10e193: 53 push %ebx 10e194: 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 ]; 10e197: 8b 45 08 mov 0x8(%ebp),%eax 10e19a: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 10e1a0: 85 db test %ebx,%ebx 10e1a2: 74 45 je 10e1e9 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10e1a4: 9c pushf 10e1a5: fa cli 10e1a6: 58 pop %eax signal_set = asr->signals_posted; 10e1a7: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10e1aa: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10e1b1: 50 push %eax 10e1b2: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10e1b3: 85 ff test %edi,%edi 10e1b5: 74 32 je 10e1e9 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN return; asr->nest_level += 1; 10e1b7: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e1ba: 50 push %eax 10e1bb: 8d 75 e4 lea -0x1c(%ebp),%esi 10e1be: 56 push %esi 10e1bf: 68 ff ff 00 00 push $0xffff 10e1c4: ff 73 10 pushl 0x10(%ebx) 10e1c7: e8 4c 19 00 00 call 10fb18 (*asr->handler)( signal_set ); 10e1cc: 89 3c 24 mov %edi,(%esp) 10e1cf: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10e1d2: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e1d5: 83 c4 0c add $0xc,%esp 10e1d8: 56 push %esi 10e1d9: 68 ff ff 00 00 push $0xffff 10e1de: ff 75 e4 pushl -0x1c(%ebp) 10e1e1: e8 32 19 00 00 call 10fb18 10e1e6: 83 c4 10 add $0x10,%esp } 10e1e9: 8d 65 f4 lea -0xc(%ebp),%esp 10e1ec: 5b pop %ebx 10e1ed: 5e pop %esi 10e1ee: 5f pop %edi 10e1ef: c9 leave 10e1f0: c3 ret =============================================================================== 0010b1e8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10b1e8: 55 push %ebp 10b1e9: 89 e5 mov %esp,%ebp 10b1eb: 53 push %ebx 10b1ec: 83 ec 18 sub $0x18,%esp 10b1ef: 8d 45 f4 lea -0xc(%ebp),%eax 10b1f2: 50 push %eax 10b1f3: ff 75 08 pushl 0x8(%ebp) 10b1f6: 68 40 65 12 00 push $0x126540 10b1fb: e8 2c 19 00 00 call 10cb2c <_Objects_Get> 10b200: 89 c3 mov %eax,%ebx /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10b202: 83 c4 10 add $0x10,%esp 10b205: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b209: 75 64 jne 10b26f <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10b20b: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10b20e: f6 40 11 40 testb $0x40,0x11(%eax) 10b212: 74 18 je 10b22c <_Rate_monotonic_Timeout+0x44> the_thread->Wait.id == the_period->Object.id ) { 10b214: 8b 50 20 mov 0x20(%eax),%edx 10b217: 3b 53 08 cmp 0x8(%ebx),%edx 10b21a: 75 10 jne 10b22c <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b21c: 52 push %edx 10b21d: 52 push %edx 10b21e: 68 f8 ff 03 10 push $0x1003fff8 10b223: 50 push %eax 10b224: e8 4b 1d 00 00 call 10cf74 <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10b229: 59 pop %ecx 10b22a: eb 10 jmp 10b23c <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10b22c: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 10b230: 75 2b jne 10b25d <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10b232: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 10b239: 83 ec 0c sub $0xc,%esp 10b23c: 53 push %ebx 10b23d: e8 56 fa ff ff call 10ac98 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b242: 8b 43 3c mov 0x3c(%ebx),%eax 10b245: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b248: 58 pop %eax 10b249: 5a pop %edx 10b24a: 83 c3 10 add $0x10,%ebx 10b24d: 53 push %ebx 10b24e: 68 14 67 12 00 push $0x126714 10b253: e8 e0 2f 00 00 call 10e238 <_Watchdog_Insert> 10b258: 83 c4 10 add $0x10,%esp 10b25b: eb 07 jmp 10b264 <_Rate_monotonic_Timeout+0x7c> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 10b25d: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b264: a1 38 66 12 00 mov 0x126638,%eax 10b269: 48 dec %eax 10b26a: a3 38 66 12 00 mov %eax,0x126638 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b26f: 8b 5d fc mov -0x4(%ebp),%ebx 10b272: c9 leave 10b273: c3 ret =============================================================================== 0010ab10 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10ab10: 55 push %ebp 10ab11: 89 e5 mov %esp,%ebp 10ab13: 53 push %ebx 10ab14: 8b 4d 08 mov 0x8(%ebp),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 10ab17: 8b 1d 64 2c 12 00 mov 0x122c64,%ebx if ((!the_tod) || 10ab1d: 85 c9 test %ecx,%ecx 10ab1f: 74 59 je 10ab7a <_TOD_Validate+0x6a> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || 10ab21: b8 40 42 0f 00 mov $0xf4240,%eax 10ab26: 31 d2 xor %edx,%edx 10ab28: f7 f3 div %ebx 10ab2a: 39 41 18 cmp %eax,0x18(%ecx) 10ab2d: 73 4b jae 10ab7a <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10ab2f: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10ab33: 77 45 ja 10ab7a <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10ab35: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10ab39: 77 3f ja 10ab7a <_TOD_Validate+0x6a> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10ab3b: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10ab3f: 77 39 ja 10ab7a <_TOD_Validate+0x6a> (the_tod->month == 0) || 10ab41: 8b 41 04 mov 0x4(%ecx),%eax uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10ab44: 85 c0 test %eax,%eax 10ab46: 74 32 je 10ab7a <_TOD_Validate+0x6a> <== NEVER TAKEN 10ab48: 83 f8 0c cmp $0xc,%eax 10ab4b: 77 2d ja 10ab7a <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10ab4d: 8b 19 mov (%ecx),%ebx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10ab4f: 81 fb c3 07 00 00 cmp $0x7c3,%ebx 10ab55: 76 23 jbe 10ab7a <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10ab57: 8b 51 08 mov 0x8(%ecx),%edx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10ab5a: 85 d2 test %edx,%edx 10ab5c: 74 1c je 10ab7a <_TOD_Validate+0x6a> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10ab5e: 80 e3 03 and $0x3,%bl 10ab61: 75 09 jne 10ab6c <_TOD_Validate+0x5c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10ab63: 8b 04 85 60 ff 11 00 mov 0x11ff60(,%eax,4),%eax 10ab6a: eb 07 jmp 10ab73 <_TOD_Validate+0x63> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10ab6c: 8b 04 85 2c ff 11 00 mov 0x11ff2c(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10ab73: 39 c2 cmp %eax,%edx 10ab75: 0f 96 c0 setbe %al 10ab78: eb 02 jmp 10ab7c <_TOD_Validate+0x6c> 10ab7a: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10ab7c: 5b pop %ebx 10ab7d: c9 leave 10ab7e: c3 ret =============================================================================== 0010b738 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10b738: 55 push %ebp 10b739: 89 e5 mov %esp,%ebp 10b73b: 57 push %edi 10b73c: 56 push %esi 10b73d: 53 push %ebx 10b73e: 83 ec 28 sub $0x28,%esp 10b741: 8b 5d 08 mov 0x8(%ebp),%ebx 10b744: 8b 7d 0c mov 0xc(%ebp),%edi 10b747: 8a 45 10 mov 0x10(%ebp),%al 10b74a: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10b74d: 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 ); 10b750: 53 push %ebx 10b751: e8 32 0d 00 00 call 10c488 <_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 ) 10b756: 83 c4 10 add $0x10,%esp 10b759: 39 7b 14 cmp %edi,0x14(%ebx) 10b75c: 74 0c je 10b76a <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10b75e: 50 push %eax 10b75f: 50 push %eax 10b760: 57 push %edi 10b761: 53 push %ebx 10b762: e8 e9 0b 00 00 call 10c350 <_Thread_Set_priority> 10b767: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10b76a: 9c pushf 10b76b: fa cli 10b76c: 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; 10b76d: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10b770: 83 f8 04 cmp $0x4,%eax 10b773: 74 2f je 10b7a4 <_Thread_Change_priority+0x6c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10b775: 83 e6 04 and $0x4,%esi 10b778: 75 08 jne 10b782 <_Thread_Change_priority+0x4a><== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10b77a: 89 c2 mov %eax,%edx 10b77c: 83 e2 fb and $0xfffffffb,%edx 10b77f: 89 53 10 mov %edx,0x10(%ebx) _ISR_Enable( level ); 10b782: 51 push %ecx 10b783: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10b784: a9 e0 be 03 00 test $0x3bee0,%eax 10b789: 0f 84 c0 00 00 00 je 10b84f <_Thread_Change_priority+0x117> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10b78f: 89 5d 0c mov %ebx,0xc(%ebp) 10b792: 8b 43 44 mov 0x44(%ebx),%eax 10b795: 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 ); } 10b798: 8d 65 f4 lea -0xc(%ebp),%esp 10b79b: 5b pop %ebx 10b79c: 5e pop %esi 10b79d: 5f pop %edi 10b79e: 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 ); 10b79f: e9 24 0b 00 00 jmp 10c2c8 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10b7a4: 83 e6 04 and $0x4,%esi 10b7a7: 75 53 jne 10b7fc <_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 ); 10b7a9: 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; 10b7b0: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10b7b6: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx 10b7bd: 66 09 10 or %dx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10b7c0: 66 a1 04 3b 12 00 mov 0x123b04,%ax 10b7c6: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10b7cc: 66 a3 04 3b 12 00 mov %ax,0x123b04 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10b7d2: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10b7d6: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10b7dc: 74 0e je 10b7ec <_Thread_Change_priority+0xb4> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10b7de: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10b7e1: 8b 10 mov (%eax),%edx after_node->next = the_node; 10b7e3: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10b7e5: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10b7e7: 89 5a 04 mov %ebx,0x4(%edx) 10b7ea: eb 10 jmp 10b7fc <_Thread_Change_priority+0xc4> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10b7ec: 8d 50 04 lea 0x4(%eax),%edx 10b7ef: 89 13 mov %edx,(%ebx) old_last_node = the_chain->last; 10b7f1: 8b 50 08 mov 0x8(%eax),%edx the_chain->last = the_node; 10b7f4: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10b7f7: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 10b7f9: 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 ); 10b7fc: 51 push %ecx 10b7fd: 9d popf 10b7fe: 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 ); 10b7ff: 66 8b 1d 04 3b 12 00 mov 0x123b04,%bx 10b806: 31 c0 xor %eax,%eax 10b808: 89 c2 mov %eax,%edx 10b80a: 66 0f bc d3 bsf %bx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10b80e: 0f b7 d2 movzwl %dx,%edx 10b811: 66 8b 9c 12 7c 3b 12 mov 0x123b7c(%edx,%edx,1),%bx 10b818: 00 10b819: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10b81d: c1 e2 04 shl $0x4,%edx 10b820: 0f b7 c0 movzwl %ax,%eax 10b823: 01 c2 add %eax,%edx 10b825: 6b d2 0c imul $0xc,%edx,%edx 10b828: 8b 1d 1c 3a 12 00 mov 0x123a1c,%ebx 10b82e: 8b 14 1a mov (%edx,%ebx,1),%edx 10b831: 89 15 e0 3a 12 00 mov %edx,0x123ae0 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10b837: a1 10 3b 12 00 mov 0x123b10,%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() && 10b83c: 39 d0 cmp %edx,%eax 10b83e: 74 0d je 10b84d <_Thread_Change_priority+0x115> _Thread_Executing->is_preemptible ) 10b840: 80 78 75 00 cmpb $0x0,0x75(%eax) 10b844: 74 07 je 10b84d <_Thread_Change_priority+0x115> _Context_Switch_necessary = true; 10b846: c6 05 20 3b 12 00 01 movb $0x1,0x123b20 _ISR_Enable( level ); 10b84d: 51 push %ecx 10b84e: 9d popf } 10b84f: 8d 65 f4 lea -0xc(%ebp),%esp 10b852: 5b pop %ebx 10b853: 5e pop %esi 10b854: 5f pop %edi 10b855: c9 leave 10b856: c3 ret =============================================================================== 0010b858 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10b858: 55 push %ebp 10b859: 89 e5 mov %esp,%ebp 10b85b: 53 push %ebx 10b85c: 8b 45 08 mov 0x8(%ebp),%eax 10b85f: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10b862: 9c pushf 10b863: fa cli 10b864: 59 pop %ecx current_state = the_thread->current_state; 10b865: 8b 58 10 mov 0x10(%eax),%ebx if ( current_state & state ) { 10b868: 85 da test %ebx,%edx 10b86a: 74 71 je 10b8dd <_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); 10b86c: f7 d2 not %edx 10b86e: 21 da and %ebx,%edx current_state = 10b870: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10b873: 85 d2 test %edx,%edx 10b875: 75 66 jne 10b8dd <_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; 10b877: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10b87d: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10b884: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10b887: 66 8b 15 04 3b 12 00 mov 0x123b04,%dx 10b88e: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10b894: 66 89 15 04 3b 12 00 mov %dx,0x123b04 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10b89b: 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); 10b8a1: 8d 5a 04 lea 0x4(%edx),%ebx 10b8a4: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10b8a6: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10b8a9: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10b8ac: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10b8ae: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10b8b1: 51 push %ecx 10b8b2: 9d popf 10b8b3: 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 ) { 10b8b4: 8b 50 14 mov 0x14(%eax),%edx 10b8b7: 8b 1d e0 3a 12 00 mov 0x123ae0,%ebx 10b8bd: 3b 53 14 cmp 0x14(%ebx),%edx 10b8c0: 73 1b jae 10b8dd <_Thread_Clear_state+0x85> _Thread_Heir = the_thread; 10b8c2: a3 e0 3a 12 00 mov %eax,0x123ae0 if ( _Thread_Executing->is_preemptible || 10b8c7: a1 10 3b 12 00 mov 0x123b10,%eax 10b8cc: 80 78 75 00 cmpb $0x0,0x75(%eax) 10b8d0: 75 04 jne 10b8d6 <_Thread_Clear_state+0x7e> 10b8d2: 85 d2 test %edx,%edx 10b8d4: 75 07 jne 10b8dd <_Thread_Clear_state+0x85><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10b8d6: c6 05 20 3b 12 00 01 movb $0x1,0x123b20 } } } _ISR_Enable( level ); 10b8dd: 51 push %ecx 10b8de: 9d popf } 10b8df: 5b pop %ebx 10b8e0: c9 leave 10b8e1: c3 ret =============================================================================== 0010ba58 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10ba58: 55 push %ebp 10ba59: 89 e5 mov %esp,%ebp 10ba5b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ba5e: 8d 45 f4 lea -0xc(%ebp),%eax 10ba61: 50 push %eax 10ba62: ff 75 08 pushl 0x8(%ebp) 10ba65: e8 8e 01 00 00 call 10bbf8 <_Thread_Get> switch ( location ) { 10ba6a: 83 c4 10 add $0x10,%esp 10ba6d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ba71: 75 1b jne 10ba8e <_Thread_Delay_ended+0x36><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10ba73: 52 push %edx 10ba74: 52 push %edx 10ba75: 68 18 00 00 10 push $0x10000018 10ba7a: 50 push %eax 10ba7b: e8 d8 fd ff ff call 10b858 <_Thread_Clear_state> 10ba80: a1 54 3a 12 00 mov 0x123a54,%eax 10ba85: 48 dec %eax 10ba86: a3 54 3a 12 00 mov %eax,0x123a54 10ba8b: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10ba8e: c9 leave 10ba8f: c3 ret =============================================================================== 0010ba90 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10ba90: 55 push %ebp 10ba91: 89 e5 mov %esp,%ebp 10ba93: 57 push %edi 10ba94: 56 push %esi 10ba95: 53 push %ebx 10ba96: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10ba99: 8b 1d 10 3b 12 00 mov 0x123b10,%ebx _ISR_Disable( level ); 10ba9f: 9c pushf 10baa0: fa cli 10baa1: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10baa2: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10baa5: e9 f1 00 00 00 jmp 10bb9b <_Thread_Dispatch+0x10b> heir = _Thread_Heir; 10baaa: 8b 35 e0 3a 12 00 mov 0x123ae0,%esi _Thread_Dispatch_disable_level = 1; 10bab0: c7 05 54 3a 12 00 01 movl $0x1,0x123a54 10bab7: 00 00 00 _Context_Switch_necessary = false; 10baba: c6 05 20 3b 12 00 00 movb $0x0,0x123b20 _Thread_Executing = heir; 10bac1: 89 35 10 3b 12 00 mov %esi,0x123b10 #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 ) 10bac7: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10bacb: 75 09 jne 10bad6 <_Thread_Dispatch+0x46> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10bacd: 8b 15 20 3a 12 00 mov 0x123a20,%edx 10bad3: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10bad6: 50 push %eax 10bad7: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10bad8: 83 ec 0c sub $0xc,%esp 10badb: 8d 45 e0 lea -0x20(%ebp),%eax 10bade: 50 push %eax 10badf: e8 b8 2a 00 00 call 10e59c <_TOD_Get_uptime> _Timestamp_Subtract( 10bae4: 83 c4 0c add $0xc,%esp 10bae7: 57 push %edi 10bae8: 8d 45 e0 lea -0x20(%ebp),%eax 10baeb: 50 push %eax 10baec: 68 18 3b 12 00 push $0x123b18 10baf1: e8 fe 0b 00 00 call 10c6f4 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10baf6: 58 pop %eax 10baf7: 5a pop %edx 10baf8: 57 push %edi 10baf9: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10baff: 50 push %eax 10bb00: e8 bf 0b 00 00 call 10c6c4 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10bb05: 8b 45 e0 mov -0x20(%ebp),%eax 10bb08: 8b 55 e4 mov -0x1c(%ebp),%edx 10bb0b: a3 18 3b 12 00 mov %eax,0x123b18 10bb10: 89 15 1c 3b 12 00 mov %edx,0x123b1c #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10bb16: a1 dc 3a 12 00 mov 0x123adc,%eax 10bb1b: 83 c4 10 add $0x10,%esp 10bb1e: 85 c0 test %eax,%eax 10bb20: 74 10 je 10bb32 <_Thread_Dispatch+0xa2> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10bb22: 8b 10 mov (%eax),%edx 10bb24: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10bb2a: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10bb30: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10bb32: 51 push %ecx 10bb33: 51 push %ecx 10bb34: 56 push %esi 10bb35: 53 push %ebx 10bb36: e8 e9 0d 00 00 call 10c924 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10bb3b: 58 pop %eax 10bb3c: 5a pop %edx 10bb3d: 81 c6 d0 00 00 00 add $0xd0,%esi 10bb43: 56 push %esi 10bb44: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10bb4a: 50 push %eax 10bb4b: e8 a0 10 00 00 call 10cbf0 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10bb50: 83 c4 10 add $0x10,%esp 10bb53: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10bb5a: 74 36 je 10bb92 <_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 ); 10bb5c: a1 d8 3a 12 00 mov 0x123ad8,%eax 10bb61: 39 c3 cmp %eax,%ebx 10bb63: 74 2d je 10bb92 <_Thread_Dispatch+0x102> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10bb65: 85 c0 test %eax,%eax 10bb67: 74 11 je 10bb7a <_Thread_Dispatch+0xea> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10bb69: 83 ec 0c sub $0xc,%esp 10bb6c: 05 e8 00 00 00 add $0xe8,%eax 10bb71: 50 push %eax 10bb72: e8 ad 10 00 00 call 10cc24 <_CPU_Context_save_fp> 10bb77: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10bb7a: 83 ec 0c sub $0xc,%esp 10bb7d: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10bb83: 50 push %eax 10bb84: e8 a5 10 00 00 call 10cc2e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10bb89: 89 1d d8 3a 12 00 mov %ebx,0x123ad8 10bb8f: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10bb92: 8b 1d 10 3b 12 00 mov 0x123b10,%ebx _ISR_Disable( level ); 10bb98: 9c pushf 10bb99: fa cli 10bb9a: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10bb9b: 8a 15 20 3b 12 00 mov 0x123b20,%dl 10bba1: 84 d2 test %dl,%dl 10bba3: 0f 85 01 ff ff ff jne 10baaa <_Thread_Dispatch+0x1a> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10bba9: c7 05 54 3a 12 00 00 movl $0x0,0x123a54 10bbb0: 00 00 00 _ISR_Enable( level ); 10bbb3: 50 push %eax 10bbb4: 9d popf if ( _Thread_Do_post_task_switch_extension || 10bbb5: 83 3d f4 3a 12 00 00 cmpl $0x0,0x123af4 10bbbc: 75 06 jne 10bbc4 <_Thread_Dispatch+0x134><== NEVER TAKEN executing->do_post_task_switch_extension ) { 10bbbe: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10bbc2: 74 09 je 10bbcd <_Thread_Dispatch+0x13d> executing->do_post_task_switch_extension = false; 10bbc4: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10bbc8: e8 1e eb ff ff call 10a6eb <_API_extensions_Run_postswitch> } } 10bbcd: 8d 65 f4 lea -0xc(%ebp),%esp 10bbd0: 5b pop %ebx 10bbd1: 5e pop %esi 10bbd2: 5f pop %edi 10bbd3: c9 leave 10bbd4: c3 ret =============================================================================== 0010fe08 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 10fe08: 55 push %ebp 10fe09: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 10fe0b: a1 10 3b 12 00 mov 0x123b10,%eax if ( !_States_Is_ready( executing->current_state ) || 10fe10: 83 78 10 00 cmpl $0x0,0x10(%eax) 10fe14: 75 0e jne 10fe24 <_Thread_Evaluate_mode+0x1c><== NEVER TAKEN 10fe16: 3b 05 e0 3a 12 00 cmp 0x123ae0,%eax 10fe1c: 74 11 je 10fe2f <_Thread_Evaluate_mode+0x27> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 10fe1e: 80 78 75 00 cmpb $0x0,0x75(%eax) 10fe22: 74 0b je 10fe2f <_Thread_Evaluate_mode+0x27><== NEVER TAKEN _Context_Switch_necessary = true; 10fe24: c6 05 20 3b 12 00 01 movb $0x1,0x123b20 10fe2b: b0 01 mov $0x1,%al return true; 10fe2d: eb 02 jmp 10fe31 <_Thread_Evaluate_mode+0x29> 10fe2f: 31 c0 xor %eax,%eax } return false; } 10fe31: c9 leave 10fe32: c3 ret =============================================================================== 0010fe34 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 10fe34: 55 push %ebp 10fe35: 89 e5 mov %esp,%ebp 10fe37: 53 push %ebx 10fe38: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 10fe3b: 8b 1d 10 3b 12 00 mov 0x123b10,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 10fe41: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 10fe47: 85 c0 test %eax,%eax 10fe49: 74 03 je 10fe4e <_Thread_Handler+0x1a> 10fe4b: fa cli 10fe4c: eb 01 jmp 10fe4f <_Thread_Handler+0x1b> 10fe4e: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 10fe4f: a0 00 37 12 00 mov 0x123700,%al 10fe54: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 10fe57: c6 05 00 37 12 00 01 movb $0x1,0x123700 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10fe5e: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10fe65: 74 24 je 10fe8b <_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 ); 10fe67: a1 d8 3a 12 00 mov 0x123ad8,%eax 10fe6c: 39 c3 cmp %eax,%ebx 10fe6e: 74 1b je 10fe8b <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10fe70: 85 c0 test %eax,%eax 10fe72: 74 11 je 10fe85 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10fe74: 83 ec 0c sub $0xc,%esp 10fe77: 05 e8 00 00 00 add $0xe8,%eax 10fe7c: 50 push %eax 10fe7d: e8 a2 cd ff ff call 10cc24 <_CPU_Context_save_fp> 10fe82: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 10fe85: 89 1d d8 3a 12 00 mov %ebx,0x123ad8 /* * 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 ); 10fe8b: 83 ec 0c sub $0xc,%esp 10fe8e: 53 push %ebx 10fe8f: e8 44 c9 ff ff call 10c7d8 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 10fe94: e8 3c bd ff ff call 10bbd5 <_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) */ { 10fe99: 83 c4 10 add $0x10,%esp 10fe9c: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 10fea0: 75 05 jne 10fea7 <_Thread_Handler+0x73> INIT_NAME (); 10fea2: e8 f9 bf 00 00 call 11bea0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 10fea7: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 10feae: 75 15 jne 10fec5 <_Thread_Handler+0x91> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 10feb0: 83 ec 0c sub $0xc,%esp 10feb3: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 10feb9: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 10febf: 89 43 28 mov %eax,0x28(%ebx) 10fec2: 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 ); 10fec5: 83 ec 0c sub $0xc,%esp 10fec8: 53 push %ebx 10fec9: e8 3b c9 ff ff call 10c809 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 10fece: 83 c4 0c add $0xc,%esp 10fed1: 6a 06 push $0x6 10fed3: 6a 01 push $0x1 10fed5: 6a 00 push $0x0 10fed7: e8 88 b0 ff ff call 10af64 <_Internal_error_Occurred> =============================================================================== 0010bc6c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10bc6c: 55 push %ebp 10bc6d: 89 e5 mov %esp,%ebp 10bc6f: 57 push %edi 10bc70: 56 push %esi 10bc71: 53 push %ebx 10bc72: 83 ec 24 sub $0x24,%esp 10bc75: 8b 5d 0c mov 0xc(%ebp),%ebx 10bc78: 8b 75 14 mov 0x14(%ebp),%esi 10bc7b: 8a 55 18 mov 0x18(%ebp),%dl 10bc7e: 8a 45 20 mov 0x20(%ebp),%al 10bc81: 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; 10bc84: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10bc8b: 00 00 00 10bc8e: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10bc95: 00 00 00 10bc98: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10bc9f: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10bca2: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10bca9: 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 ); 10bcac: 56 push %esi 10bcad: 53 push %ebx 10bcae: 88 55 e0 mov %dl,-0x20(%ebp) 10bcb1: e8 46 08 00 00 call 10c4fc <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10bcb6: 83 c4 10 add $0x10,%esp 10bcb9: 39 f0 cmp %esi,%eax 10bcbb: 8a 55 e0 mov -0x20(%ebp),%dl 10bcbe: 72 04 jb 10bcc4 <_Thread_Initialize+0x58> 10bcc0: 85 c0 test %eax,%eax 10bcc2: 75 07 jne 10bccb <_Thread_Initialize+0x5f><== ALWAYS TAKEN 10bcc4: 31 c0 xor %eax,%eax 10bcc6: e9 b9 01 00 00 jmp 10be84 <_Thread_Initialize+0x218> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10bccb: 8b 8b cc 00 00 00 mov 0xcc(%ebx),%ecx 10bcd1: 89 8b c4 00 00 00 mov %ecx,0xc4(%ebx) the_stack->size = size; 10bcd7: 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 ) { 10bcdd: 31 ff xor %edi,%edi 10bcdf: 84 d2 test %dl,%dl 10bce1: 74 19 je 10bcfc <_Thread_Initialize+0x90> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10bce3: 83 ec 0c sub $0xc,%esp 10bce6: 6a 6c push $0x6c 10bce8: e8 7f 0e 00 00 call 10cb6c <_Workspace_Allocate> 10bced: 89 c7 mov %eax,%edi if ( !fp_area ) 10bcef: 83 c4 10 add $0x10,%esp 10bcf2: 31 f6 xor %esi,%esi 10bcf4: 85 c0 test %eax,%eax 10bcf6: 0f 84 02 01 00 00 je 10bdfe <_Thread_Initialize+0x192> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10bcfc: 89 bb e8 00 00 00 mov %edi,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10bd02: 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; 10bd08: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10bd0f: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10bd16: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10bd1d: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10bd24: a1 f0 3a 12 00 mov 0x123af0,%eax 10bd29: 31 f6 xor %esi,%esi 10bd2b: 85 c0 test %eax,%eax 10bd2d: 74 1d je 10bd4c <_Thread_Initialize+0xe0> extensions_area = _Workspace_Allocate( 10bd2f: 83 ec 0c sub $0xc,%esp 10bd32: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10bd39: 50 push %eax 10bd3a: e8 2d 0e 00 00 call 10cb6c <_Workspace_Allocate> 10bd3f: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10bd41: 83 c4 10 add $0x10,%esp 10bd44: 85 c0 test %eax,%eax 10bd46: 0f 84 b2 00 00 00 je 10bdfe <_Thread_Initialize+0x192> goto failed; } the_thread->extensions = (void **) extensions_area; 10bd4c: 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 ) { 10bd52: 85 f6 test %esi,%esi 10bd54: 74 1c je 10bd72 <_Thread_Initialize+0x106> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10bd56: 8b 0d f0 3a 12 00 mov 0x123af0,%ecx 10bd5c: 31 c0 xor %eax,%eax 10bd5e: eb 0e jmp 10bd6e <_Thread_Initialize+0x102> the_thread->extensions[i] = NULL; 10bd60: 8b 93 fc 00 00 00 mov 0xfc(%ebx),%edx 10bd66: 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++ ) 10bd6d: 40 inc %eax 10bd6e: 39 c8 cmp %ecx,%eax 10bd70: 76 ee jbe 10bd60 <_Thread_Initialize+0xf4> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10bd72: 8a 45 e7 mov -0x19(%ebp),%al 10bd75: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10bd7b: 8b 45 24 mov 0x24(%ebp),%eax 10bd7e: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10bd84: 8b 45 28 mov 0x28(%ebp),%eax 10bd87: 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; 10bd8d: 8b 45 2c mov 0x2c(%ebp),%eax 10bd90: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10bd96: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10bd9d: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10bda4: 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; 10bdab: 8b 45 1c mov 0x1c(%ebp),%eax 10bdae: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10bdb1: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10bdb7: 52 push %edx 10bdb8: 52 push %edx 10bdb9: 50 push %eax 10bdba: 53 push %ebx 10bdbb: e8 90 05 00 00 call 10c350 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10bdc0: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10bdc7: 00 00 00 10bdca: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10bdd1: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bdd4: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10bdd8: 8b 45 08 mov 0x8(%ebp),%eax 10bddb: 8b 40 1c mov 0x1c(%eax),%eax 10bdde: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10bde1: 8b 45 30 mov 0x30(%ebp),%eax 10bde4: 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 ); 10bde7: 89 1c 24 mov %ebx,(%esp) 10bdea: e8 89 0a 00 00 call 10c878 <_User_extensions_Thread_create> 10bdef: 88 c2 mov %al,%dl if ( extension_status ) 10bdf1: 83 c4 10 add $0x10,%esp 10bdf4: b0 01 mov $0x1,%al 10bdf6: 84 d2 test %dl,%dl 10bdf8: 0f 85 86 00 00 00 jne 10be84 <_Thread_Initialize+0x218> return true; failed: if ( the_thread->libc_reent ) 10bdfe: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10be04: 85 c0 test %eax,%eax 10be06: 74 0c je 10be14 <_Thread_Initialize+0x1a8> _Workspace_Free( the_thread->libc_reent ); 10be08: 83 ec 0c sub $0xc,%esp 10be0b: 50 push %eax 10be0c: e8 74 0d 00 00 call 10cb85 <_Workspace_Free> 10be11: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10be14: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10be1a: 85 c0 test %eax,%eax 10be1c: 74 0c je 10be2a <_Thread_Initialize+0x1be> _Workspace_Free( the_thread->API_Extensions[i] ); 10be1e: 83 ec 0c sub $0xc,%esp 10be21: 50 push %eax 10be22: e8 5e 0d 00 00 call 10cb85 <_Workspace_Free> 10be27: 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] ) 10be2a: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10be30: 85 c0 test %eax,%eax 10be32: 74 0c je 10be40 <_Thread_Initialize+0x1d4><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10be34: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10be37: 50 push %eax <== NOT EXECUTED 10be38: e8 48 0d 00 00 call 10cb85 <_Workspace_Free> <== NOT EXECUTED 10be3d: 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] ) 10be40: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10be46: 85 c0 test %eax,%eax 10be48: 74 0c je 10be56 <_Thread_Initialize+0x1ea><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10be4a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10be4d: 50 push %eax <== NOT EXECUTED 10be4e: e8 32 0d 00 00 call 10cb85 <_Workspace_Free> <== NOT EXECUTED 10be53: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10be56: 85 f6 test %esi,%esi 10be58: 74 0c je 10be66 <_Thread_Initialize+0x1fa> (void) _Workspace_Free( extensions_area ); 10be5a: 83 ec 0c sub $0xc,%esp 10be5d: 56 push %esi 10be5e: e8 22 0d 00 00 call 10cb85 <_Workspace_Free> 10be63: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10be66: 85 ff test %edi,%edi 10be68: 74 0c je 10be76 <_Thread_Initialize+0x20a> (void) _Workspace_Free( fp_area ); 10be6a: 83 ec 0c sub $0xc,%esp 10be6d: 57 push %edi 10be6e: e8 12 0d 00 00 call 10cb85 <_Workspace_Free> 10be73: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10be76: 83 ec 0c sub $0xc,%esp 10be79: 53 push %ebx 10be7a: e8 cd 06 00 00 call 10c54c <_Thread_Stack_Free> 10be7f: 31 c0 xor %eax,%eax return false; 10be81: 83 c4 10 add $0x10,%esp } 10be84: 8d 65 f4 lea -0xc(%ebp),%esp 10be87: 5b pop %ebx 10be88: 5e pop %esi 10be89: 5f pop %edi 10be8a: c9 leave 10be8b: c3 ret =============================================================================== 0010ebe8 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 10ebe8: 55 push %ebp 10ebe9: 89 e5 mov %esp,%ebp 10ebeb: 56 push %esi 10ebec: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10ebed: a1 10 3b 12 00 mov 0x123b10,%eax ready = executing->ready; 10ebf2: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10ebf8: 9c pushf 10ebf9: fa cli 10ebfa: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 10ebfb: 8b 1a mov (%edx),%ebx 10ebfd: 3b 5a 08 cmp 0x8(%edx),%ebx 10ec00: 75 04 jne 10ec06 <_Thread_Reset_timeslice+0x1e> _ISR_Enable( level ); 10ec02: 51 push %ecx 10ec03: 9d popf return; 10ec04: eb 35 jmp 10ec3b <_Thread_Reset_timeslice+0x53> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10ec06: 8b 30 mov (%eax),%esi previous = the_node->previous; 10ec08: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10ec0b: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10ec0e: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10ec10: 8d 5a 04 lea 0x4(%edx),%ebx 10ec13: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10ec15: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10ec18: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10ec1b: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10ec1d: 89 58 04 mov %ebx,0x4(%eax) } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10ec20: 51 push %ecx 10ec21: 9d popf 10ec22: fa cli if ( _Thread_Is_heir( executing ) ) 10ec23: 3b 05 e0 3a 12 00 cmp 0x123ae0,%eax 10ec29: 75 07 jne 10ec32 <_Thread_Reset_timeslice+0x4a><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10ec2b: 8b 02 mov (%edx),%eax 10ec2d: a3 e0 3a 12 00 mov %eax,0x123ae0 _Context_Switch_necessary = true; 10ec32: c6 05 20 3b 12 00 01 movb $0x1,0x123b20 _ISR_Enable( level ); 10ec39: 51 push %ecx 10ec3a: 9d popf } 10ec3b: 5b pop %ebx 10ec3c: 5e pop %esi 10ec3d: c9 leave 10ec3e: c3 ret =============================================================================== 0010f744 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f744: 55 push %ebp 10f745: 89 e5 mov %esp,%ebp 10f747: 53 push %ebx 10f748: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f74b: 9c pushf 10f74c: fa cli 10f74d: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 10f74e: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f751: f6 c2 02 test $0x2,%dl 10f754: 74 70 je 10f7c6 <_Thread_Resume+0x82> <== NEVER TAKEN 10f756: 83 e2 fd and $0xfffffffd,%edx current_state = 10f759: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10f75c: 85 d2 test %edx,%edx 10f75e: 75 66 jne 10f7c6 <_Thread_Resume+0x82> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10f760: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f766: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10f76d: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10f770: 66 8b 15 1c 85 12 00 mov 0x12851c,%dx 10f777: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10f77d: 66 89 15 1c 85 12 00 mov %dx,0x12851c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10f784: 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); 10f78a: 8d 5a 04 lea 0x4(%edx),%ebx 10f78d: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10f78f: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f792: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f795: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f797: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10f79a: 51 push %ecx 10f79b: 9d popf 10f79c: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10f79d: 8b 50 14 mov 0x14(%eax),%edx 10f7a0: 8b 1d f8 84 12 00 mov 0x1284f8,%ebx 10f7a6: 3b 53 14 cmp 0x14(%ebx),%edx 10f7a9: 73 1b jae 10f7c6 <_Thread_Resume+0x82> _Thread_Heir = the_thread; 10f7ab: a3 f8 84 12 00 mov %eax,0x1284f8 if ( _Thread_Executing->is_preemptible || 10f7b0: a1 28 85 12 00 mov 0x128528,%eax 10f7b5: 80 78 75 00 cmpb $0x0,0x75(%eax) 10f7b9: 75 04 jne 10f7bf <_Thread_Resume+0x7b> 10f7bb: 85 d2 test %edx,%edx 10f7bd: 75 07 jne 10f7c6 <_Thread_Resume+0x82> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10f7bf: c6 05 38 85 12 00 01 movb $0x1,0x128538 } } } _ISR_Enable( level ); 10f7c6: 51 push %ecx 10f7c7: 9d popf } 10f7c8: 5b pop %ebx 10f7c9: c9 leave 10f7ca: c3 ret =============================================================================== 0010c664 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10c664: 55 push %ebp 10c665: 89 e5 mov %esp,%ebp 10c667: 56 push %esi 10c668: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10c669: a1 10 3b 12 00 mov 0x123b10,%eax ready = executing->ready; 10c66e: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c674: 9c pushf 10c675: fa cli 10c676: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10c677: 8b 1a mov (%edx),%ebx 10c679: 3b 5a 08 cmp 0x8(%edx),%ebx 10c67c: 74 2e je 10c6ac <_Thread_Yield_processor+0x48> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c67e: 8b 30 mov (%eax),%esi previous = the_node->previous; 10c680: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10c683: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10c686: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10c688: 8d 5a 04 lea 0x4(%edx),%ebx 10c68b: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10c68d: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10c690: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10c693: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10c695: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10c698: 51 push %ecx 10c699: 9d popf 10c69a: fa cli if ( _Thread_Is_heir( executing ) ) 10c69b: 3b 05 e0 3a 12 00 cmp 0x123ae0,%eax 10c6a1: 75 11 jne 10c6b4 <_Thread_Yield_processor+0x50><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10c6a3: 8b 02 mov (%edx),%eax 10c6a5: a3 e0 3a 12 00 mov %eax,0x123ae0 10c6aa: eb 08 jmp 10c6b4 <_Thread_Yield_processor+0x50> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10c6ac: 3b 05 e0 3a 12 00 cmp 0x123ae0,%eax 10c6b2: 74 07 je 10c6bb <_Thread_Yield_processor+0x57><== ALWAYS TAKEN _Context_Switch_necessary = true; 10c6b4: c6 05 20 3b 12 00 01 movb $0x1,0x123b20 _ISR_Enable( level ); 10c6bb: 51 push %ecx 10c6bc: 9d popf } 10c6bd: 5b pop %ebx 10c6be: 5e pop %esi 10c6bf: c9 leave 10c6c0: c3 ret =============================================================================== 0010c0ec <_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 ) { 10c0ec: 55 push %ebp 10c0ed: 89 e5 mov %esp,%ebp 10c0ef: 57 push %edi 10c0f0: 56 push %esi 10c0f1: 53 push %ebx 10c0f2: 83 ec 10 sub $0x10,%esp 10c0f5: 8b 4d 08 mov 0x8(%ebp),%ecx 10c0f8: 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); 10c0fb: 8d 50 3c lea 0x3c(%eax),%edx 10c0fe: 89 50 38 mov %edx,0x38(%eax) the_chain->permanent_null = NULL; 10c101: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) the_chain->last = _Chain_Head(the_chain); 10c108: 8d 50 38 lea 0x38(%eax),%edx 10c10b: 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; 10c10e: 8b 58 14 mov 0x14(%eax),%ebx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10c111: 89 de mov %ebx,%esi 10c113: c1 ee 06 shr $0x6,%esi 10c116: 6b f6 0c imul $0xc,%esi,%esi 10c119: 8d 34 31 lea (%ecx,%esi,1),%esi block_state = the_thread_queue->state; 10c11c: 8b 79 38 mov 0x38(%ecx),%edi if ( _Thread_queue_Is_reverse_search( priority ) ) 10c11f: f6 c3 20 test $0x20,%bl 10c122: 75 70 jne 10c194 <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c124: 8d 56 04 lea 0x4(%esi),%edx 10c127: 89 55 e8 mov %edx,-0x18(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10c12a: 9c pushf 10c12b: fa cli 10c12c: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->first; 10c12f: 8b 16 mov (%esi),%edx 10c131: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) 10c138: 89 75 e4 mov %esi,-0x1c(%ebp) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c13b: eb 1f jmp 10c15c <_Thread_queue_Enqueue_priority+0x70> search_priority = search_thread->current_priority; 10c13d: 8b 72 14 mov 0x14(%edx),%esi 10c140: 89 75 ec mov %esi,-0x14(%ebp) if ( priority <= search_priority ) 10c143: 39 f3 cmp %esi,%ebx 10c145: 76 1a jbe 10c161 <_Thread_queue_Enqueue_priority+0x75> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10c147: ff 75 f0 pushl -0x10(%ebp) 10c14a: 9d popf 10c14b: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c14c: 85 7a 10 test %edi,0x10(%edx) 10c14f: 75 09 jne 10c15a <_Thread_queue_Enqueue_priority+0x6e><== ALWAYS TAKEN 10c151: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED _ISR_Enable( level ); 10c154: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10c157: 9d popf <== NOT EXECUTED goto restart_forward_search; 10c158: eb d0 jmp 10c12a <_Thread_queue_Enqueue_priority+0x3e><== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10c15a: 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 ) ) { 10c15c: 3b 55 e8 cmp -0x18(%ebp),%edx 10c15f: 75 dc jne 10c13d <_Thread_queue_Enqueue_priority+0x51> 10c161: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10c164: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c168: 0f 85 a9 00 00 00 jne 10c217 <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c16e: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c175: 3b 5d ec cmp -0x14(%ebp),%ebx 10c178: 0f 84 82 00 00 00 je 10c200 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10c17e: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c181: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c183: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c186: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c188: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c18b: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c18e: ff 75 f0 pushl -0x10(%ebp) 10c191: 9d popf 10c192: eb 65 jmp 10c1f9 <_Thread_queue_Enqueue_priority+0x10d> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10c194: 0f b6 15 d4 fa 11 00 movzbl 0x11fad4,%edx 10c19b: 42 inc %edx 10c19c: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 10c19f: 9c pushf 10c1a0: fa cli 10c1a1: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->last; 10c1a4: 8b 56 08 mov 0x8(%esi),%edx 10c1a7: 89 75 e8 mov %esi,-0x18(%ebp) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c1aa: eb 20 jmp 10c1cc <_Thread_queue_Enqueue_priority+0xe0> search_priority = search_thread->current_priority; 10c1ac: 8b 72 14 mov 0x14(%edx),%esi 10c1af: 89 75 ec mov %esi,-0x14(%ebp) if ( priority >= search_priority ) 10c1b2: 39 f3 cmp %esi,%ebx 10c1b4: 73 1b jae 10c1d1 <_Thread_queue_Enqueue_priority+0xe5> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10c1b6: ff 75 f0 pushl -0x10(%ebp) 10c1b9: 9d popf 10c1ba: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c1bb: 85 7a 10 test %edi,0x10(%edx) 10c1be: 75 09 jne 10c1c9 <_Thread_queue_Enqueue_priority+0xdd> 10c1c0: 8b 75 e8 mov -0x18(%ebp),%esi _ISR_Enable( level ); 10c1c3: ff 75 f0 pushl -0x10(%ebp) 10c1c6: 9d popf goto restart_reverse_search; 10c1c7: eb cb jmp 10c194 <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *) 10c1c9: 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 ) ) { 10c1cc: 3b 55 e8 cmp -0x18(%ebp),%edx 10c1cf: 75 db jne 10c1ac <_Thread_queue_Enqueue_priority+0xc0> 10c1d1: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10c1d4: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c1d8: 75 3d jne 10c217 <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c1da: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c1e1: 3b 5d ec cmp -0x14(%ebp),%ebx 10c1e4: 74 1a je 10c200 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10c1e6: 8b 1a mov (%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10c1e8: 89 18 mov %ebx,(%eax) the_node->previous = search_node; 10c1ea: 89 50 04 mov %edx,0x4(%eax) search_node->next = the_node; 10c1ed: 89 02 mov %eax,(%edx) next_node->previous = the_node; 10c1ef: 89 43 04 mov %eax,0x4(%ebx) the_thread->Wait.queue = the_thread_queue; 10c1f2: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c1f5: ff 75 f0 pushl -0x10(%ebp) 10c1f8: 9d popf 10c1f9: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c1fe: eb 1f jmp 10c21f <_Thread_queue_Enqueue_priority+0x133> 10c200: 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; 10c203: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c206: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c208: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c20b: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c20d: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c210: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c213: 56 push %esi 10c214: 9d popf 10c215: eb e2 jmp 10c1f9 <_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; 10c217: 8b 45 10 mov 0x10(%ebp),%eax 10c21a: 89 30 mov %esi,(%eax) return the_thread_queue->sync_state; 10c21c: 8b 41 30 mov 0x30(%ecx),%eax } 10c21f: 83 c4 10 add $0x10,%esp 10c222: 5b pop %ebx 10c223: 5e pop %esi 10c224: 5f pop %edi 10c225: c9 leave 10c226: c3 ret =============================================================================== 0010c2c8 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10c2c8: 55 push %ebp 10c2c9: 89 e5 mov %esp,%ebp 10c2cb: 57 push %edi 10c2cc: 56 push %esi 10c2cd: 53 push %ebx 10c2ce: 83 ec 1c sub $0x1c,%esp 10c2d1: 8b 75 08 mov 0x8(%ebp),%esi 10c2d4: 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 ) 10c2d7: 85 f6 test %esi,%esi 10c2d9: 74 36 je 10c311 <_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 ) { 10c2db: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c2df: 75 30 jne 10c311 <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10c2e1: 9c pushf 10c2e2: fa cli 10c2e3: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10c2e4: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10c2eb: 74 22 je 10c30f <_Thread_queue_Requeue+0x47><== NEVER TAKEN 10c2ed: 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 ); 10c2f4: 50 push %eax 10c2f5: 6a 01 push $0x1 10c2f7: 57 push %edi 10c2f8: 56 push %esi 10c2f9: e8 46 27 00 00 call 10ea44 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10c2fe: 83 c4 0c add $0xc,%esp 10c301: 8d 45 e4 lea -0x1c(%ebp),%eax 10c304: 50 push %eax 10c305: 57 push %edi 10c306: 56 push %esi 10c307: e8 e0 fd ff ff call 10c0ec <_Thread_queue_Enqueue_priority> 10c30c: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c30f: 53 push %ebx 10c310: 9d popf } } 10c311: 8d 65 f4 lea -0xc(%ebp),%esp 10c314: 5b pop %ebx 10c315: 5e pop %esi 10c316: 5f pop %edi 10c317: c9 leave 10c318: c3 ret =============================================================================== 0010c31c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c31c: 55 push %ebp 10c31d: 89 e5 mov %esp,%ebp 10c31f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c322: 8d 45 f4 lea -0xc(%ebp),%eax 10c325: 50 push %eax 10c326: ff 75 08 pushl 0x8(%ebp) 10c329: e8 ca f8 ff ff call 10bbf8 <_Thread_Get> switch ( location ) { 10c32e: 83 c4 10 add $0x10,%esp 10c331: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c335: 75 17 jne 10c34e <_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 ); 10c337: 83 ec 0c sub $0xc,%esp 10c33a: 50 push %eax 10c33b: e8 bc 27 00 00 call 10eafc <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c340: a1 54 3a 12 00 mov 0x123a54,%eax 10c345: 48 dec %eax 10c346: a3 54 3a 12 00 mov %eax,0x123a54 10c34b: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c34e: c9 leave 10c34f: c3 ret =============================================================================== 00116c50 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 116c50: 55 push %ebp 116c51: 89 e5 mov %esp,%ebp 116c53: 57 push %edi 116c54: 56 push %esi 116c55: 53 push %ebx 116c56: 83 ec 4c sub $0x4c,%esp 116c59: 8b 5d 08 mov 0x8(%ebp),%ebx 116c5c: 8d 45 dc lea -0x24(%ebp),%eax 116c5f: 8d 55 e0 lea -0x20(%ebp),%edx 116c62: 89 55 b4 mov %edx,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 116c65: 89 55 dc mov %edx,-0x24(%ebp) the_chain->permanent_null = NULL; 116c68: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 116c6f: 89 45 e4 mov %eax,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 116c72: 8d 75 d0 lea -0x30(%ebp),%esi 116c75: 8d 55 d4 lea -0x2c(%ebp),%edx 116c78: 89 55 b0 mov %edx,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 116c7b: 89 55 d0 mov %edx,-0x30(%ebp) the_chain->permanent_null = NULL; 116c7e: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 116c85: 89 75 d8 mov %esi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 116c88: 8d 53 30 lea 0x30(%ebx),%edx 116c8b: 89 55 c0 mov %edx,-0x40(%ebp) /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 116c8e: 8d 7b 68 lea 0x68(%ebx),%edi static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 116c91: 8d 4b 08 lea 0x8(%ebx),%ecx 116c94: 89 4d b8 mov %ecx,-0x48(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 116c97: 8d 53 40 lea 0x40(%ebx),%edx 116c9a: 89 55 bc mov %edx,-0x44(%ebp) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 116c9d: 8d 4d dc lea -0x24(%ebp),%ecx 116ca0: 89 4b 78 mov %ecx,0x78(%ebx) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 116ca3: a1 94 c6 13 00 mov 0x13c694,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 116ca8: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 116cab: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 116cae: 51 push %ecx 116caf: 8d 4d d0 lea -0x30(%ebp),%ecx 116cb2: 51 push %ecx 116cb3: 29 d0 sub %edx,%eax 116cb5: 50 push %eax 116cb6: ff 75 c0 pushl -0x40(%ebp) 116cb9: e8 56 35 00 00 call 11a214 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 116cbe: a1 d8 c5 13 00 mov 0x13c5d8,%eax 116cc3: 89 45 c4 mov %eax,-0x3c(%ebp) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 116cc6: 8b 43 74 mov 0x74(%ebx),%eax /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 116cc9: 83 c4 10 add $0x10,%esp 116ccc: 39 45 c4 cmp %eax,-0x3c(%ebp) 116ccf: 76 13 jbe 116ce4 <_Timer_server_Body+0x94> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 116cd1: 52 push %edx 116cd2: 8d 55 d0 lea -0x30(%ebp),%edx 116cd5: 52 push %edx 116cd6: 8b 4d c4 mov -0x3c(%ebp),%ecx 116cd9: 29 c1 sub %eax,%ecx 116cdb: 51 push %ecx 116cdc: 57 push %edi 116cdd: e8 32 35 00 00 call 11a214 <_Watchdog_Adjust_to_chain> 116ce2: eb 0f jmp 116cf3 <_Timer_server_Body+0xa3> } else if ( snapshot < last_snapshot ) { 116ce4: 73 10 jae 116cf6 <_Timer_server_Body+0xa6> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 116ce6: 51 push %ecx 116ce7: 2b 45 c4 sub -0x3c(%ebp),%eax 116cea: 50 push %eax 116ceb: 6a 01 push $0x1 116ced: 57 push %edi 116cee: e8 b5 34 00 00 call 11a1a8 <_Watchdog_Adjust> 116cf3: 83 c4 10 add $0x10,%esp } watchdogs->last_snapshot = snapshot; 116cf6: 8b 45 c4 mov -0x3c(%ebp),%eax 116cf9: 89 43 74 mov %eax,0x74(%ebx) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 116cfc: 8b 43 78 mov 0x78(%ebx),%eax 116cff: 83 ec 0c sub $0xc,%esp 116d02: 50 push %eax 116d03: e8 ec 06 00 00 call 1173f4 <_Chain_Get> if ( timer == NULL ) { 116d08: 83 c4 10 add $0x10,%esp 116d0b: 85 c0 test %eax,%eax 116d0d: 74 29 je 116d38 <_Timer_server_Body+0xe8><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 116d0f: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 116d12: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 116d15: 75 0b jne 116d22 <_Timer_server_Body+0xd2><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116d17: 52 push %edx <== NOT EXECUTED 116d18: 52 push %edx <== NOT EXECUTED 116d19: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 116d1c: 50 push %eax <== NOT EXECUTED 116d1d: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED 116d20: eb 0c jmp 116d2e <_Timer_server_Body+0xde><== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116d22: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 116d25: 75 d5 jne 116cfc <_Timer_server_Body+0xac><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116d27: 51 push %ecx <== NOT EXECUTED 116d28: 51 push %ecx <== NOT EXECUTED 116d29: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 116d2c: 50 push %eax <== NOT EXECUTED 116d2d: 57 push %edi <== NOT EXECUTED 116d2e: e8 69 35 00 00 call 11a29c <_Watchdog_Insert> <== NOT EXECUTED 116d33: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 116d36: eb c4 jmp 116cfc <_Timer_server_Body+0xac><== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 116d38: 9c pushf 116d39: fa cli 116d3a: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 116d3b: 8b 55 b4 mov -0x4c(%ebp),%edx 116d3e: 39 55 dc cmp %edx,-0x24(%ebp) 116d41: 75 13 jne 116d56 <_Timer_server_Body+0x106><== NEVER TAKEN ts->insert_chain = NULL; 116d43: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 116d4a: 50 push %eax 116d4b: 9d popf _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 116d4c: 8b 4d b0 mov -0x50(%ebp),%ecx 116d4f: 39 4d d0 cmp %ecx,-0x30(%ebp) 116d52: 75 09 jne 116d5d <_Timer_server_Body+0x10d> 116d54: eb 3e jmp 116d94 <_Timer_server_Body+0x144> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 116d56: 50 push %eax <== NOT EXECUTED 116d57: 9d popf <== NOT EXECUTED 116d58: e9 46 ff ff ff jmp 116ca3 <_Timer_server_Body+0x53><== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 116d5d: 9c pushf 116d5e: fa cli 116d5f: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 116d60: 8b 45 d0 mov -0x30(%ebp),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 116d63: 3b 45 b0 cmp -0x50(%ebp),%eax 116d66: 74 25 je 116d8d <_Timer_server_Body+0x13d> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 116d68: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 116d6a: 89 4d d0 mov %ecx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 116d6d: 89 71 04 mov %esi,0x4(%ecx) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 116d70: 85 c0 test %eax,%eax 116d72: 74 19 je 116d8d <_Timer_server_Body+0x13d><== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 116d74: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 116d7b: 52 push %edx 116d7c: 9d popf /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 116d7d: 52 push %edx 116d7e: 52 push %edx 116d7f: ff 70 24 pushl 0x24(%eax) 116d82: ff 70 20 pushl 0x20(%eax) 116d85: ff 50 1c call *0x1c(%eax) } 116d88: 83 c4 10 add $0x10,%esp 116d8b: eb d0 jmp 116d5d <_Timer_server_Body+0x10d> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 116d8d: 52 push %edx 116d8e: 9d popf 116d8f: e9 09 ff ff ff jmp 116c9d <_Timer_server_Body+0x4d> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 116d94: c6 43 7c 00 movb $0x0,0x7c(%ebx) 116d98: a1 48 c5 13 00 mov 0x13c548,%eax 116d9d: 40 inc %eax 116d9e: a3 48 c5 13 00 mov %eax,0x13c548 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 116da3: 50 push %eax 116da4: 50 push %eax 116da5: 6a 08 push $0x8 116da7: ff 33 pushl (%ebx) 116da9: e8 0a 2d 00 00 call 119ab8 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 116dae: 89 d8 mov %ebx,%eax 116db0: e8 0f fe ff ff call 116bc4 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 116db5: 89 d8 mov %ebx,%eax 116db7: e8 4e fe ff ff call 116c0a <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 116dbc: e8 dc 23 00 00 call 11919d <_Thread_Enable_dispatch> ts->active = true; 116dc1: c6 43 7c 01 movb $0x1,0x7c(%ebx) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 116dc5: 59 pop %ecx 116dc6: ff 75 b8 pushl -0x48(%ebp) 116dc9: e8 e6 35 00 00 call 11a3b4 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 116dce: 5a pop %edx 116dcf: ff 75 bc pushl -0x44(%ebp) 116dd2: e8 dd 35 00 00 call 11a3b4 <_Watchdog_Remove> 116dd7: 83 c4 10 add $0x10,%esp 116dda: e9 be fe ff ff jmp 116c9d <_Timer_server_Body+0x4d> =============================================================================== 00116ddf <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 116ddf: 55 push %ebp 116de0: 89 e5 mov %esp,%ebp 116de2: 57 push %edi 116de3: 56 push %esi 116de4: 53 push %ebx 116de5: 83 ec 2c sub $0x2c,%esp 116de8: 8b 5d 08 mov 0x8(%ebp),%ebx 116deb: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 116dee: 8b 53 78 mov 0x78(%ebx),%edx 116df1: 85 d2 test %edx,%edx 116df3: 0f 85 e6 00 00 00 jne 116edf <_Timer_server_Schedule_operation_method+0x100><== NEVER TAKEN 116df9: 8b 15 48 c5 13 00 mov 0x13c548,%edx 116dff: 42 inc %edx 116e00: 89 15 48 c5 13 00 mov %edx,0x13c548 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 116e06: 8b 50 38 mov 0x38(%eax),%edx 116e09: 83 fa 01 cmp $0x1,%edx 116e0c: 75 5a jne 116e68 <_Timer_server_Schedule_operation_method+0x89> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 116e0e: 9c pushf 116e0f: fa cli 116e10: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 116e13: 8b 0d 94 c6 13 00 mov 0x13c694,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 116e19: 8b 73 3c mov 0x3c(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 116e1c: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 116e1f: 8d 7b 34 lea 0x34(%ebx),%edi 116e22: 39 fa cmp %edi,%edx 116e24: 74 19 je 116e3f <_Timer_server_Schedule_operation_method+0x60> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 116e26: 89 cf mov %ecx,%edi 116e28: 29 f7 sub %esi,%edi 116e2a: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 116e2d: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 116e30: 31 f6 xor %esi,%esi 116e32: 3b 7d e4 cmp -0x1c(%ebp),%edi 116e35: 76 05 jbe 116e3c <_Timer_server_Schedule_operation_method+0x5d> delta_interval -= delta; 116e37: 89 fe mov %edi,%esi 116e39: 2b 75 e4 sub -0x1c(%ebp),%esi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 116e3c: 89 72 10 mov %esi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 116e3f: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 116e42: ff 75 e0 pushl -0x20(%ebp) 116e45: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116e46: 57 push %edi 116e47: 57 push %edi 116e48: 83 c0 10 add $0x10,%eax 116e4b: 50 push %eax 116e4c: 8d 43 30 lea 0x30(%ebx),%eax 116e4f: 50 push %eax 116e50: e8 47 34 00 00 call 11a29c <_Watchdog_Insert> if ( !ts->active ) { 116e55: 8a 43 7c mov 0x7c(%ebx),%al 116e58: 83 c4 10 add $0x10,%esp 116e5b: 84 c0 test %al,%al 116e5d: 75 74 jne 116ed3 <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_interval_system_watchdog( ts ); 116e5f: 89 d8 mov %ebx,%eax 116e61: e8 5e fd ff ff call 116bc4 <_Timer_server_Reset_interval_system_watchdog> 116e66: eb 6b jmp 116ed3 <_Timer_server_Schedule_operation_method+0xf4> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116e68: 83 fa 03 cmp $0x3,%edx 116e6b: 75 66 jne 116ed3 <_Timer_server_Schedule_operation_method+0xf4> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 116e6d: 9c pushf 116e6e: fa cli 116e6f: 8f 45 e0 popl -0x20(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 116e72: 8b 0d d8 c5 13 00 mov 0x13c5d8,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 116e78: 8b 53 74 mov 0x74(%ebx),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 116e7b: 8b 73 68 mov 0x68(%ebx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 116e7e: 8d 7b 6c lea 0x6c(%ebx),%edi 116e81: 39 fe cmp %edi,%esi 116e83: 74 27 je 116eac <_Timer_server_Schedule_operation_method+0xcd> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 116e85: 8b 7e 10 mov 0x10(%esi),%edi 116e88: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 116e8b: 39 d1 cmp %edx,%ecx 116e8d: 76 15 jbe 116ea4 <_Timer_server_Schedule_operation_method+0xc5> /* * We advanced in time. */ delta = snapshot - last_snapshot; 116e8f: 89 cf mov %ecx,%edi 116e91: 29 d7 sub %edx,%edi 116e93: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { 116e96: 31 d2 xor %edx,%edx 116e98: 39 7d d4 cmp %edi,-0x2c(%ebp) 116e9b: 76 0c jbe 116ea9 <_Timer_server_Schedule_operation_method+0xca><== NEVER TAKEN delta_interval -= delta; 116e9d: 8b 55 d4 mov -0x2c(%ebp),%edx 116ea0: 29 fa sub %edi,%edx 116ea2: eb 05 jmp 116ea9 <_Timer_server_Schedule_operation_method+0xca> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 116ea4: 03 55 d4 add -0x2c(%ebp),%edx delta_interval += delta; 116ea7: 29 ca sub %ecx,%edx } first_watchdog->delta_interval = delta_interval; 116ea9: 89 56 10 mov %edx,0x10(%esi) } ts->TOD_watchdogs.last_snapshot = snapshot; 116eac: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 116eaf: ff 75 e0 pushl -0x20(%ebp) 116eb2: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116eb3: 56 push %esi 116eb4: 56 push %esi 116eb5: 83 c0 10 add $0x10,%eax 116eb8: 50 push %eax 116eb9: 8d 43 68 lea 0x68(%ebx),%eax 116ebc: 50 push %eax 116ebd: e8 da 33 00 00 call 11a29c <_Watchdog_Insert> if ( !ts->active ) { 116ec2: 8a 43 7c mov 0x7c(%ebx),%al 116ec5: 83 c4 10 add $0x10,%esp 116ec8: 84 c0 test %al,%al 116eca: 75 07 jne 116ed3 <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_tod_system_watchdog( ts ); 116ecc: 89 d8 mov %ebx,%eax 116ece: e8 37 fd ff ff call 116c0a <_Timer_server_Reset_tod_system_watchdog> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 116ed3: 8d 65 f4 lea -0xc(%ebp),%esp 116ed6: 5b pop %ebx 116ed7: 5e pop %esi 116ed8: 5f pop %edi 116ed9: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 116eda: e9 be 22 00 00 jmp 11919d <_Thread_Enable_dispatch> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 116edf: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 116ee2: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 116ee5: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 116ee8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 116eeb: 5b pop %ebx <== NOT EXECUTED 116eec: 5e pop %esi <== NOT EXECUTED 116eed: 5f pop %edi <== NOT EXECUTED 116eee: c9 leave <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 116eef: e9 dc 04 00 00 jmp 1173d0 <_Chain_Append> <== NOT EXECUTED =============================================================================== 0010df8c <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 10df8c: 55 push %ebp 10df8d: 89 e5 mov %esp,%ebp 10df8f: 53 push %ebx 10df90: 8b 4d 08 mov 0x8(%ebp),%ecx 10df93: 8b 55 0c mov 0xc(%ebp),%edx if ( lhs->tv_sec > rhs->tv_sec ) 10df96: 8b 1a mov (%edx),%ebx 10df98: b0 01 mov $0x1,%al 10df9a: 39 19 cmp %ebx,(%ecx) 10df9c: 7f 0f jg 10dfad <_Timespec_Greater_than+0x21> return true; if ( lhs->tv_sec < rhs->tv_sec ) 10df9e: 7d 04 jge 10dfa4 <_Timespec_Greater_than+0x18><== ALWAYS TAKEN 10dfa0: 31 c0 xor %eax,%eax <== NOT EXECUTED 10dfa2: eb 09 jmp 10dfad <_Timespec_Greater_than+0x21><== NOT EXECUTED #include #include #include bool _Timespec_Greater_than( 10dfa4: 8b 41 04 mov 0x4(%ecx),%eax 10dfa7: 3b 42 04 cmp 0x4(%edx),%eax 10dfaa: 0f 9f c0 setg %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 10dfad: 5b pop %ebx 10dfae: c9 leave 10dfaf: c3 ret =============================================================================== 0010c809 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10c809: 55 push %ebp 10c80a: 89 e5 mov %esp,%ebp 10c80c: 56 push %esi 10c80d: 53 push %ebx 10c80e: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c811: 8b 1d 6c 3c 12 00 mov 0x123c6c,%ebx 10c817: eb 13 jmp 10c82c <_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 ) 10c819: 8b 43 2c mov 0x2c(%ebx),%eax 10c81c: 85 c0 test %eax,%eax 10c81e: 74 09 je 10c829 <_User_extensions_Thread_exitted+0x20> (*the_extension->Callouts.thread_exitted)( executing ); 10c820: 83 ec 0c sub $0xc,%esp 10c823: 56 push %esi 10c824: ff d0 call *%eax 10c826: 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 ) { 10c829: 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 ) ; 10c82c: 81 fb 64 3c 12 00 cmp $0x123c64,%ebx 10c832: 75 e5 jne 10c819 <_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 ); } } 10c834: 8d 65 f8 lea -0x8(%ebp),%esp 10c837: 5b pop %ebx 10c838: 5e pop %esi 10c839: c9 leave 10c83a: c3 ret =============================================================================== 0010e198 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e198: 55 push %ebp 10e199: 89 e5 mov %esp,%ebp 10e19b: 57 push %edi 10e19c: 56 push %esi 10e19d: 53 push %ebx 10e19e: 83 ec 1c sub $0x1c,%esp 10e1a1: 8b 75 08 mov 0x8(%ebp),%esi 10e1a4: 8b 7d 0c mov 0xc(%ebp),%edi 10e1a7: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e1aa: 9c pushf 10e1ab: fa cli 10e1ac: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e1ad: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e1af: 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 ) ) { 10e1b2: 39 ca cmp %ecx,%edx 10e1b4: 74 44 je 10e1fa <_Watchdog_Adjust+0x62> switch ( direction ) { 10e1b6: 85 ff test %edi,%edi 10e1b8: 74 3c je 10e1f6 <_Watchdog_Adjust+0x5e> 10e1ba: 4f dec %edi 10e1bb: 75 3d jne 10e1fa <_Watchdog_Adjust+0x62> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e1bd: 01 5a 10 add %ebx,0x10(%edx) break; 10e1c0: eb 38 jmp 10e1fa <_Watchdog_Adjust+0x62> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e1c2: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e1c4: 8b 7a 10 mov 0x10(%edx),%edi 10e1c7: 39 fb cmp %edi,%ebx 10e1c9: 73 07 jae 10e1d2 <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e1cb: 29 df sub %ebx,%edi 10e1cd: 89 7a 10 mov %edi,0x10(%edx) break; 10e1d0: eb 28 jmp 10e1fa <_Watchdog_Adjust+0x62> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e1d2: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e1d9: 50 push %eax 10e1da: 9d popf _Watchdog_Tickle( header ); 10e1db: 83 ec 0c sub $0xc,%esp 10e1de: 56 push %esi 10e1df: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e1e2: e8 9d 01 00 00 call 10e384 <_Watchdog_Tickle> _ISR_Disable( level ); 10e1e7: 9c pushf 10e1e8: fa cli 10e1e9: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e1ea: 83 c4 10 add $0x10,%esp 10e1ed: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e1f0: 39 0e cmp %ecx,(%esi) 10e1f2: 74 06 je 10e1fa <_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; 10e1f4: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e1f6: 85 db test %ebx,%ebx 10e1f8: 75 c8 jne 10e1c2 <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10e1fa: 50 push %eax 10e1fb: 9d popf } 10e1fc: 8d 65 f4 lea -0xc(%ebp),%esp 10e1ff: 5b pop %ebx 10e200: 5e pop %esi 10e201: 5f pop %edi 10e202: c9 leave 10e203: c3 ret =============================================================================== 0010ca70 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10ca70: 55 push %ebp 10ca71: 89 e5 mov %esp,%ebp 10ca73: 56 push %esi 10ca74: 53 push %ebx 10ca75: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10ca78: 9c pushf 10ca79: fa cli 10ca7a: 5e pop %esi previous_state = the_watchdog->state; 10ca7b: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10ca7e: 83 f8 01 cmp $0x1,%eax 10ca81: 74 09 je 10ca8c <_Watchdog_Remove+0x1c> 10ca83: 72 44 jb 10cac9 <_Watchdog_Remove+0x59> 10ca85: 83 f8 03 cmp $0x3,%eax 10ca88: 77 3f ja 10cac9 <_Watchdog_Remove+0x59> <== NEVER TAKEN 10ca8a: eb 09 jmp 10ca95 <_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; 10ca8c: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10ca93: eb 34 jmp 10cac9 <_Watchdog_Remove+0x59> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10ca95: 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 ); 10ca9c: 8b 0a mov (%edx),%ecx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10ca9e: 83 39 00 cmpl $0x0,(%ecx) 10caa1: 74 06 je 10caa9 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10caa3: 8b 5a 10 mov 0x10(%edx),%ebx 10caa6: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10caa9: 8b 0d 9c 3b 12 00 mov 0x123b9c,%ecx 10caaf: 85 c9 test %ecx,%ecx 10cab1: 74 0c je 10cabf <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10cab3: 8b 0d ec 3a 12 00 mov 0x123aec,%ecx 10cab9: 89 0d 0c 3b 12 00 mov %ecx,0x123b0c ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10cabf: 8b 1a mov (%edx),%ebx previous = the_node->previous; 10cac1: 8b 4a 04 mov 0x4(%edx),%ecx next->previous = previous; 10cac4: 89 4b 04 mov %ecx,0x4(%ebx) previous->next = next; 10cac7: 89 19 mov %ebx,(%ecx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10cac9: 8b 0d a0 3b 12 00 mov 0x123ba0,%ecx 10cacf: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10cad2: 56 push %esi 10cad3: 9d popf return( previous_state ); } 10cad4: 5b pop %ebx 10cad5: 5e pop %esi 10cad6: c9 leave 10cad7: c3 ret =============================================================================== 0010dd14 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10dd14: 55 push %ebp 10dd15: 89 e5 mov %esp,%ebp 10dd17: 57 push %edi 10dd18: 56 push %esi 10dd19: 53 push %ebx 10dd1a: 83 ec 20 sub $0x20,%esp 10dd1d: 8b 7d 08 mov 0x8(%ebp),%edi 10dd20: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10dd23: 9c pushf 10dd24: fa cli 10dd25: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10dd28: 56 push %esi 10dd29: 57 push %edi 10dd2a: 68 e4 fa 11 00 push $0x11fae4 10dd2f: e8 e4 ab ff ff call 108918 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10dd34: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dd36: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10dd39: 83 c4 10 add $0x10,%esp 10dd3c: 39 f3 cmp %esi,%ebx 10dd3e: 74 1d je 10dd5d <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10dd40: 52 push %edx 10dd41: 52 push %edx 10dd42: 53 push %ebx 10dd43: 6a 00 push $0x0 10dd45: e8 32 00 00 00 call 10dd7c <_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 ) 10dd4a: 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 ; 10dd4c: 83 c4 10 add $0x10,%esp 10dd4f: 39 f3 cmp %esi,%ebx 10dd51: 75 ed jne 10dd40 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10dd53: 50 push %eax 10dd54: 50 push %eax 10dd55: 57 push %edi 10dd56: 68 fb fa 11 00 push $0x11fafb 10dd5b: eb 08 jmp 10dd65 <_Watchdog_Report_chain+0x51> } else { printk( "Chain is empty\n" ); 10dd5d: 83 ec 0c sub $0xc,%esp 10dd60: 68 0a fb 11 00 push $0x11fb0a 10dd65: e8 ae ab ff ff call 108918 10dd6a: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10dd6d: ff 75 e4 pushl -0x1c(%ebp) 10dd70: 9d popf } 10dd71: 8d 65 f4 lea -0xc(%ebp),%esp 10dd74: 5b pop %ebx 10dd75: 5e pop %esi 10dd76: 5f pop %edi 10dd77: c9 leave 10dd78: c3 ret =============================================================================== 0010cad8 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10cad8: 55 push %ebp 10cad9: 89 e5 mov %esp,%ebp 10cadb: 57 push %edi 10cadc: 56 push %esi 10cadd: 53 push %ebx 10cade: 83 ec 1c sub $0x1c,%esp 10cae1: 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 ); 10cae4: 9c pushf 10cae5: fa cli 10cae6: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10cae7: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10cae9: 8d 47 04 lea 0x4(%edi),%eax 10caec: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10caef: 39 c3 cmp %eax,%ebx 10caf1: 74 40 je 10cb33 <_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) { 10caf3: 8b 43 10 mov 0x10(%ebx),%eax 10caf6: 85 c0 test %eax,%eax 10caf8: 74 08 je 10cb02 <_Watchdog_Tickle+0x2a> the_watchdog->delta_interval--; 10cafa: 48 dec %eax 10cafb: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10cafe: 85 c0 test %eax,%eax 10cb00: 75 31 jne 10cb33 <_Watchdog_Tickle+0x5b> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10cb02: 83 ec 0c sub $0xc,%esp 10cb05: 53 push %ebx 10cb06: e8 65 ff ff ff call 10ca70 <_Watchdog_Remove> _ISR_Enable( level ); 10cb0b: 56 push %esi 10cb0c: 9d popf switch( watchdog_state ) { 10cb0d: 83 c4 10 add $0x10,%esp 10cb10: 83 f8 02 cmp $0x2,%eax 10cb13: 75 0e jne 10cb23 <_Watchdog_Tickle+0x4b> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10cb15: 50 push %eax 10cb16: 50 push %eax 10cb17: ff 73 24 pushl 0x24(%ebx) 10cb1a: ff 73 20 pushl 0x20(%ebx) 10cb1d: ff 53 1c call *0x1c(%ebx) 10cb20: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10cb23: 9c pushf 10cb24: fa cli 10cb25: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10cb26: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10cb28: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10cb2b: 74 06 je 10cb33 <_Watchdog_Tickle+0x5b> 10cb2d: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10cb31: eb cd jmp 10cb00 <_Watchdog_Tickle+0x28> leave: _ISR_Enable(level); 10cb33: 56 push %esi 10cb34: 9d popf } 10cb35: 8d 65 f4 lea -0xc(%ebp),%esp 10cb38: 5b pop %ebx 10cb39: 5e pop %esi 10cb3a: 5f pop %edi 10cb3b: c9 leave 10cb3c: c3 ret =============================================================================== 0012196e <__kill>: #endif int __kill( pid_t pid, int sig ) { 12196e: 55 push %ebp <== NOT EXECUTED 12196f: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 121971: 31 c0 xor %eax,%eax <== NOT EXECUTED 121973: c9 leave <== NOT EXECUTED 121974: c3 ret <== NOT EXECUTED =============================================================================== 0011b838 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 11b838: 55 push %ebp 11b839: 89 e5 mov %esp,%ebp 11b83b: 83 ec 08 sub $0x8,%esp 11b83e: e8 6a 06 00 00 call 11bead <_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(); 11b843: e8 8c ff ff ff call 11b7d4 rtems_shutdown_executive(status); 11b848: 83 ec 0c sub $0xc,%esp 11b84b: ff 75 08 pushl 0x8(%ebp) 11b84e: e8 e9 00 00 00 call 11b93c 11b853: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11b856: eb fe jmp 11b856 <_exit+0x1e> <== NOT EXECUTED =============================================================================== 0010806a <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 10806a: 55 push %ebp <== NOT EXECUTED 10806b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10806d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108070: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 108073: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED return fcntl( fd, cmd, arg ); 108076: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 108079: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED 10807c: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10807f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 108082: c9 leave <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 108083: e9 98 fe ff ff jmp 107f20 <== NOT EXECUTED =============================================================================== 00121942 <_getpid_r>: #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 121942: 55 push %ebp <== NOT EXECUTED 121943: 89 e5 mov %esp,%ebp <== NOT EXECUTED return getpid(); } 121945: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 12194a: c9 leave <== NOT EXECUTED 12194b: c3 ret <== NOT EXECUTED =============================================================================== 0010dd53 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 10dd53: 55 push %ebp <== NOT EXECUTED 10dd54: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10dd56: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 10dd59: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10dd5a: e9 a5 ff ff ff jmp 10dd04 <== NOT EXECUTED =============================================================================== 00121967 <_kill_r>: #if defined(RTEMS_NEWLIB) #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 121967: 55 push %ebp <== NOT EXECUTED 121968: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 12196a: 31 c0 xor %eax,%eax <== NOT EXECUTED 12196c: c9 leave <== NOT EXECUTED 12196d: c3 ret <== NOT EXECUTED =============================================================================== 0010891a <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 10891a: 55 push %ebp <== NOT EXECUTED 10891b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10891d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108920: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return link( existing, new ); 108923: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 108926: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 108929: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10892c: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 10892d: e9 26 fe ff ff jmp 108758 <== NOT EXECUTED =============================================================================== 0011b904 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 11b904: 55 push %ebp <== NOT EXECUTED 11b905: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11b907: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11b90a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return realloc( ptr, size ); 11b90d: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 11b910: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 11b913: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 11b916: c9 leave <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 11b917: e9 48 00 00 00 jmp 11b964 <== NOT EXECUTED =============================================================================== 0010aa8c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 10aa8c: 55 push %ebp 10aa8d: 89 e5 mov %esp,%ebp 10aa8f: 57 push %edi 10aa90: 56 push %esi 10aa91: 53 push %ebx 10aa92: 83 ec 68 sub $0x68,%esp /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 10aa95: ff 75 0c pushl 0xc(%ebp) 10aa98: e8 02 ee ff ff call 10989f 10aa9d: 89 c2 mov %eax,%edx if ( old_parent_pathlen == 0 ) 10aa9f: 83 c4 10 add $0x10,%esp 10aaa2: 85 c0 test %eax,%eax 10aaa4: 75 36 jne 10aadc <_rename_r+0x50> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 10aaa6: 8b 4d 0c mov 0xc(%ebp),%ecx 10aaa9: 8a 01 mov (%ecx),%al 10aaab: 3c 5c cmp $0x5c,%al 10aaad: 74 08 je 10aab7 <_rename_r+0x2b> <== NEVER TAKEN 10aaaf: 3c 2f cmp $0x2f,%al 10aab1: 74 04 je 10aab7 <_rename_r+0x2b> <== NEVER TAKEN 10aab3: 84 c0 test %al,%al 10aab5: 75 0e jne 10aac5 <_rename_r+0x39> <== ALWAYS TAKEN 10aab7: 8d 7d bc lea -0x44(%ebp),%edi <== NOT EXECUTED 10aaba: 8b 35 68 7f 12 00 mov 0x127f68,%esi <== NOT EXECUTED 10aac0: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 10aac3: eb 0c jmp 10aad1 <_rename_r+0x45> <== NOT EXECUTED 10aac5: 8d 7d bc lea -0x44(%ebp),%edi 10aac8: 8b 35 68 7f 12 00 mov 0x127f68,%esi 10aace: 83 c6 04 add $0x4,%esi 10aad1: b9 05 00 00 00 mov $0x5,%ecx 10aad6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10aad8: 31 db xor %ebx,%ebx 10aada: eb 27 jmp 10ab03 <_rename_r+0x77> else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 10aadc: 83 ec 0c sub $0xc,%esp 10aadf: 6a 00 push $0x0 10aae1: 8d 45 bc lea -0x44(%ebp),%eax 10aae4: 50 push %eax 10aae5: 6a 02 push $0x2 10aae7: 52 push %edx 10aae8: ff 75 0c pushl 0xc(%ebp) 10aaeb: 89 55 a4 mov %edx,-0x5c(%ebp) 10aaee: e8 99 ee ff ff call 10998c RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 10aaf3: 83 c4 20 add $0x20,%esp 10aaf6: 85 c0 test %eax,%eax 10aaf8: 8b 55 a4 mov -0x5c(%ebp),%edx 10aafb: 0f 85 6b 02 00 00 jne 10ad6c <_rename_r+0x2e0> <== NEVER TAKEN 10ab01: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 10ab03: 8d 7d d0 lea -0x30(%ebp),%edi 10ab06: 8d 75 bc lea -0x44(%ebp),%esi 10ab09: b9 05 00 00 00 mov $0x5,%ecx 10ab0e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = old + old_parent_pathlen; 10ab10: 8b 75 0c mov 0xc(%ebp),%esi 10ab13: 01 d6 add %edx,%esi 10ab15: 89 75 e4 mov %esi,-0x1c(%ebp) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10ab18: 83 c9 ff or $0xffffffff,%ecx 10ab1b: 89 f7 mov %esi,%edi 10ab1d: 31 c0 xor %eax,%eax 10ab1f: f2 ae repnz scas %es:(%edi),%al 10ab21: f7 d1 not %ecx 10ab23: 49 dec %ecx 10ab24: 57 push %edi 10ab25: 57 push %edi 10ab26: 51 push %ecx 10ab27: 56 push %esi 10ab28: e8 4b ed ff ff call 109878 10ab2d: 01 c6 add %eax,%esi 10ab2f: 89 75 e4 mov %esi,-0x1c(%ebp) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10ab32: 83 c9 ff or $0xffffffff,%ecx 10ab35: 89 f7 mov %esi,%edi 10ab37: 31 c0 xor %eax,%eax 10ab39: f2 ae repnz scas %es:(%edi),%al 10ab3b: f7 d1 not %ecx 10ab3d: 49 dec %ecx 10ab3e: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10ab45: 8d 45 d0 lea -0x30(%ebp),%eax 10ab48: 50 push %eax 10ab49: 6a 00 push $0x0 10ab4b: 51 push %ecx 10ab4c: 56 push %esi 10ab4d: e8 80 ed ff ff call 1098d2 0, &old_loc, false ); if ( result != 0 ) { 10ab52: 83 c4 20 add $0x20,%esp 10ab55: 85 c0 test %eax,%eax 10ab57: 74 29 je 10ab82 <_rename_r+0xf6> if ( free_old_parentloc ) 10ab59: 84 db test %bl,%bl 10ab5b: 0f 84 0b 02 00 00 je 10ad6c <_rename_r+0x2e0> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10ab61: 8b 45 c8 mov -0x38(%ebp),%eax 10ab64: 85 c0 test %eax,%eax 10ab66: 0f 84 00 02 00 00 je 10ad6c <_rename_r+0x2e0> <== NEVER TAKEN 10ab6c: 8b 40 1c mov 0x1c(%eax),%eax 10ab6f: 85 c0 test %eax,%eax 10ab71: 0f 84 f5 01 00 00 je 10ad6c <_rename_r+0x2e0> <== NEVER TAKEN 10ab77: 83 ec 0c sub $0xc,%esp 10ab7a: 8d 55 bc lea -0x44(%ebp),%edx 10ab7d: e9 b5 00 00 00 jmp 10ac37 <_rename_r+0x1ab> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 10ab82: 8b 55 10 mov 0x10(%ebp),%edx 10ab85: 8a 02 mov (%edx),%al 10ab87: 3c 5c cmp $0x5c,%al 10ab89: 74 08 je 10ab93 <_rename_r+0x107> <== NEVER TAKEN 10ab8b: 3c 2f cmp $0x2f,%al 10ab8d: 74 04 je 10ab93 <_rename_r+0x107> 10ab8f: 84 c0 test %al,%al 10ab91: 75 1a jne 10abad <_rename_r+0x121> <== ALWAYS TAKEN 10ab93: 8d 7d a8 lea -0x58(%ebp),%edi 10ab96: 8b 35 68 7f 12 00 mov 0x127f68,%esi 10ab9c: 83 c6 18 add $0x18,%esi 10ab9f: b9 05 00 00 00 mov $0x5,%ecx 10aba4: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10aba6: ba 01 00 00 00 mov $0x1,%edx 10abab: eb 15 jmp 10abc2 <_rename_r+0x136> 10abad: 8d 7d a8 lea -0x58(%ebp),%edi 10abb0: 8b 35 68 7f 12 00 mov 0x127f68,%esi 10abb6: 83 c6 04 add $0x4,%esi 10abb9: b9 05 00 00 00 mov $0x5,%ecx 10abbe: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10abc0: 31 d2 xor %edx,%edx if ( !new_parent_loc.ops->evalformake_h ) { 10abc2: 8b 45 b4 mov -0x4c(%ebp),%eax 10abc5: 8b 40 04 mov 0x4(%eax),%eax 10abc8: 85 c0 test %eax,%eax 10abca: 0f 84 f3 00 00 00 je 10acc3 <_rename_r+0x237> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 10abd0: 51 push %ecx 10abd1: 8d 4d e4 lea -0x1c(%ebp),%ecx 10abd4: 51 push %ecx 10abd5: 8d 7d a8 lea -0x58(%ebp),%edi 10abd8: 57 push %edi 10abd9: 03 55 10 add 0x10(%ebp),%edx 10abdc: 52 push %edx 10abdd: ff d0 call *%eax if ( result != 0 ) { 10abdf: 83 c4 10 add $0x10,%esp 10abe2: 85 c0 test %eax,%eax 10abe4: 74 5f je 10ac45 <_rename_r+0x1b9> rtems_filesystem_freenode( &new_parent_loc ); 10abe6: 8b 45 b4 mov -0x4c(%ebp),%eax 10abe9: 85 c0 test %eax,%eax 10abeb: 74 10 je 10abfd <_rename_r+0x171> <== NEVER TAKEN 10abed: 8b 40 1c mov 0x1c(%eax),%eax 10abf0: 85 c0 test %eax,%eax 10abf2: 74 09 je 10abfd <_rename_r+0x171> <== NEVER TAKEN 10abf4: 83 ec 0c sub $0xc,%esp 10abf7: 57 push %edi 10abf8: ff d0 call *%eax 10abfa: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10abfd: 84 db test %bl,%bl 10abff: 74 1a je 10ac1b <_rename_r+0x18f> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10ac01: 8b 45 c8 mov -0x38(%ebp),%eax 10ac04: 85 c0 test %eax,%eax 10ac06: 74 13 je 10ac1b <_rename_r+0x18f> <== NEVER TAKEN 10ac08: 8b 40 1c mov 0x1c(%eax),%eax 10ac0b: 85 c0 test %eax,%eax 10ac0d: 74 0c je 10ac1b <_rename_r+0x18f> <== NEVER TAKEN 10ac0f: 83 ec 0c sub $0xc,%esp 10ac12: 8d 55 bc lea -0x44(%ebp),%edx 10ac15: 52 push %edx 10ac16: ff d0 call *%eax 10ac18: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10ac1b: 8b 45 dc mov -0x24(%ebp),%eax 10ac1e: 85 c0 test %eax,%eax 10ac20: 0f 84 46 01 00 00 je 10ad6c <_rename_r+0x2e0> <== NEVER TAKEN 10ac26: 8b 40 1c mov 0x1c(%eax),%eax 10ac29: 85 c0 test %eax,%eax 10ac2b: 0f 84 3b 01 00 00 je 10ad6c <_rename_r+0x2e0> <== NEVER TAKEN 10ac31: 83 ec 0c sub $0xc,%esp 10ac34: 8d 55 d0 lea -0x30(%ebp),%edx 10ac37: 52 push %edx 10ac38: ff d0 call *%eax 10ac3a: 83 ce ff or $0xffffffff,%esi 10ac3d: 83 c4 10 add $0x10,%esp 10ac40: e9 2a 01 00 00 jmp 10ad6f <_rename_r+0x2e3> /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 10ac45: 8b 45 cc mov -0x34(%ebp),%eax 10ac48: 3b 45 b8 cmp -0x48(%ebp),%eax 10ac4b: 8b 45 b4 mov -0x4c(%ebp),%eax 10ac4e: 74 5c je 10acac <_rename_r+0x220> rtems_filesystem_freenode( &new_parent_loc ); 10ac50: 85 c0 test %eax,%eax 10ac52: 74 10 je 10ac64 <_rename_r+0x1d8> <== NEVER TAKEN 10ac54: 8b 40 1c mov 0x1c(%eax),%eax 10ac57: 85 c0 test %eax,%eax 10ac59: 74 09 je 10ac64 <_rename_r+0x1d8> <== NEVER TAKEN 10ac5b: 83 ec 0c sub $0xc,%esp 10ac5e: 57 push %edi 10ac5f: ff d0 call *%eax 10ac61: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10ac64: 84 db test %bl,%bl 10ac66: 74 1a je 10ac82 <_rename_r+0x1f6> rtems_filesystem_freenode( &old_parent_loc ); 10ac68: 8b 45 c8 mov -0x38(%ebp),%eax 10ac6b: 85 c0 test %eax,%eax 10ac6d: 74 13 je 10ac82 <_rename_r+0x1f6> <== NEVER TAKEN 10ac6f: 8b 40 1c mov 0x1c(%eax),%eax 10ac72: 85 c0 test %eax,%eax 10ac74: 74 0c je 10ac82 <_rename_r+0x1f6> <== NEVER TAKEN 10ac76: 83 ec 0c sub $0xc,%esp 10ac79: 8d 55 bc lea -0x44(%ebp),%edx 10ac7c: 52 push %edx 10ac7d: ff d0 call *%eax 10ac7f: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10ac82: 8b 45 dc mov -0x24(%ebp),%eax 10ac85: 85 c0 test %eax,%eax 10ac87: 74 13 je 10ac9c <_rename_r+0x210> <== NEVER TAKEN 10ac89: 8b 40 1c mov 0x1c(%eax),%eax 10ac8c: 85 c0 test %eax,%eax 10ac8e: 74 0c je 10ac9c <_rename_r+0x210> <== NEVER TAKEN 10ac90: 83 ec 0c sub $0xc,%esp 10ac93: 8d 55 d0 lea -0x30(%ebp),%edx 10ac96: 52 push %edx 10ac97: ff d0 call *%eax 10ac99: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 10ac9c: e8 d7 97 00 00 call 114478 <__errno> 10aca1: c7 00 12 00 00 00 movl $0x12,(%eax) 10aca7: e9 c0 00 00 00 jmp 10ad6c <_rename_r+0x2e0> } if ( !new_parent_loc.ops->rename_h ) { 10acac: 8b 50 40 mov 0x40(%eax),%edx 10acaf: 85 d2 test %edx,%edx 10acb1: 75 55 jne 10ad08 <_rename_r+0x27c> rtems_filesystem_freenode( &new_parent_loc ); 10acb3: 8b 40 1c mov 0x1c(%eax),%eax 10acb6: 85 c0 test %eax,%eax 10acb8: 74 09 je 10acc3 <_rename_r+0x237> <== NEVER TAKEN 10acba: 83 ec 0c sub $0xc,%esp 10acbd: 57 push %edi 10acbe: ff d0 call *%eax 10acc0: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10acc3: 84 db test %bl,%bl 10acc5: 74 1a je 10ace1 <_rename_r+0x255> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10acc7: 8b 45 c8 mov -0x38(%ebp),%eax 10acca: 85 c0 test %eax,%eax 10accc: 74 13 je 10ace1 <_rename_r+0x255> <== NEVER TAKEN 10acce: 8b 40 1c mov 0x1c(%eax),%eax 10acd1: 85 c0 test %eax,%eax 10acd3: 74 0c je 10ace1 <_rename_r+0x255> <== NEVER TAKEN 10acd5: 83 ec 0c sub $0xc,%esp 10acd8: 8d 55 bc lea -0x44(%ebp),%edx 10acdb: 52 push %edx 10acdc: ff d0 call *%eax 10acde: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10ace1: 8b 45 dc mov -0x24(%ebp),%eax 10ace4: 85 c0 test %eax,%eax 10ace6: 74 13 je 10acfb <_rename_r+0x26f> <== NEVER TAKEN 10ace8: 8b 40 1c mov 0x1c(%eax),%eax 10aceb: 85 c0 test %eax,%eax 10aced: 74 0c je 10acfb <_rename_r+0x26f> <== NEVER TAKEN 10acef: 83 ec 0c sub $0xc,%esp 10acf2: 8d 55 d0 lea -0x30(%ebp),%edx 10acf5: 52 push %edx 10acf6: ff d0 call *%eax 10acf8: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTSUP ); 10acfb: e8 78 97 00 00 call 114478 <__errno> 10ad00: c7 00 86 00 00 00 movl $0x86,(%eax) 10ad06: eb 64 jmp 10ad6c <_rename_r+0x2e0> } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 10ad08: ff 75 e4 pushl -0x1c(%ebp) 10ad0b: 57 push %edi 10ad0c: 8d 45 d0 lea -0x30(%ebp),%eax 10ad0f: 50 push %eax 10ad10: 8d 45 bc lea -0x44(%ebp),%eax 10ad13: 50 push %eax 10ad14: ff d2 call *%edx 10ad16: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &new_parent_loc ); 10ad18: 8b 45 b4 mov -0x4c(%ebp),%eax 10ad1b: 83 c4 10 add $0x10,%esp 10ad1e: 85 c0 test %eax,%eax 10ad20: 74 10 je 10ad32 <_rename_r+0x2a6> <== NEVER TAKEN 10ad22: 8b 40 1c mov 0x1c(%eax),%eax 10ad25: 85 c0 test %eax,%eax 10ad27: 74 09 je 10ad32 <_rename_r+0x2a6> <== NEVER TAKEN 10ad29: 83 ec 0c sub $0xc,%esp 10ad2c: 57 push %edi 10ad2d: ff d0 call *%eax 10ad2f: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10ad32: 84 db test %bl,%bl 10ad34: 74 1a je 10ad50 <_rename_r+0x2c4> rtems_filesystem_freenode( &old_parent_loc ); 10ad36: 8b 45 c8 mov -0x38(%ebp),%eax 10ad39: 85 c0 test %eax,%eax 10ad3b: 74 13 je 10ad50 <_rename_r+0x2c4> <== NEVER TAKEN 10ad3d: 8b 40 1c mov 0x1c(%eax),%eax 10ad40: 85 c0 test %eax,%eax 10ad42: 74 0c je 10ad50 <_rename_r+0x2c4> <== NEVER TAKEN 10ad44: 83 ec 0c sub $0xc,%esp 10ad47: 8d 55 bc lea -0x44(%ebp),%edx 10ad4a: 52 push %edx 10ad4b: ff d0 call *%eax 10ad4d: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10ad50: 8b 45 dc mov -0x24(%ebp),%eax 10ad53: 85 c0 test %eax,%eax 10ad55: 74 18 je 10ad6f <_rename_r+0x2e3> <== NEVER TAKEN 10ad57: 8b 40 1c mov 0x1c(%eax),%eax 10ad5a: 85 c0 test %eax,%eax 10ad5c: 74 11 je 10ad6f <_rename_r+0x2e3> <== NEVER TAKEN 10ad5e: 83 ec 0c sub $0xc,%esp 10ad61: 8d 55 d0 lea -0x30(%ebp),%edx 10ad64: 52 push %edx 10ad65: ff d0 call *%eax 10ad67: e9 d1 fe ff ff jmp 10ac3d <_rename_r+0x1b1> 10ad6c: 83 ce ff or $0xffffffff,%esi return result; } 10ad6f: 89 f0 mov %esi,%eax 10ad71: 8d 65 f4 lea -0xc(%ebp),%esp 10ad74: 5b pop %ebx 10ad75: 5e pop %esi 10ad76: 5f pop %edi 10ad77: c9 leave 10ad78: c3 ret =============================================================================== 00109326 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 109326: 55 push %ebp <== NOT EXECUTED 109327: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109329: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10932c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 10932f: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 109332: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 109335: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 109338: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 109339: e9 3a ff ff ff jmp 109278 <== NOT EXECUTED =============================================================================== 001102e2 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 1102e2: 55 push %ebp <== NOT EXECUTED 1102e3: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1102e5: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 1102e8: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 1102eb: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 1102ee: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 1102ef: e9 04 fe ff ff jmp 1100f8 <== NOT EXECUTED =============================================================================== 0010db8c : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 10db8c: 55 push %ebp 10db8d: 89 e5 mov %esp,%ebp 10db8f: 57 push %edi 10db90: 53 push %ebx 10db91: 8b 5d 0c mov 0xc(%ebp),%ebx 10db94: ff 05 24 39 12 00 incl 0x123924 length = nelem * elsize; 10db9a: 0f af 5d 08 imul 0x8(%ebp),%ebx cptr = malloc( length ); 10db9e: 83 ec 0c sub $0xc,%esp 10dba1: 53 push %ebx 10dba2: e8 75 98 ff ff call 10741c 10dba7: 89 c2 mov %eax,%edx if ( cptr ) 10dba9: 83 c4 10 add $0x10,%esp 10dbac: 85 c0 test %eax,%eax 10dbae: 74 08 je 10dbb8 <== NEVER TAKEN memset( cptr, '\0', length ); 10dbb0: 31 c0 xor %eax,%eax 10dbb2: 89 d7 mov %edx,%edi 10dbb4: 89 d9 mov %ebx,%ecx 10dbb6: f3 aa rep stos %al,%es:(%edi) MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 10dbb8: ff 0d 14 39 12 00 decl 0x123914 return cptr; } 10dbbe: 89 d0 mov %edx,%eax 10dbc0: 8d 65 f8 lea -0x8(%ebp),%esp 10dbc3: 5b pop %ebx 10dbc4: 5f pop %edi 10dbc5: c9 leave 10dbc6: c3 ret =============================================================================== 0010f438 : #include int chdir( const char *pathname ) { 10f438: 55 push %ebp 10f439: 89 e5 mov %esp,%ebp 10f43b: 57 push %edi 10f43c: 56 push %esi 10f43d: 83 ec 20 sub $0x20,%esp 10f440: 8b 55 08 mov 0x8(%ebp),%edx rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 10f443: 85 d2 test %edx,%edx 10f445: 75 0d jne 10f454 rtems_set_errno_and_return_minus_one( EFAULT ); 10f447: e8 a0 29 00 00 call 111dec <__errno> 10f44c: c7 00 0e 00 00 00 movl $0xe,(%eax) 10f452: eb 53 jmp 10f4a7 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 10f454: 31 c0 xor %eax,%eax 10f456: 83 c9 ff or $0xffffffff,%ecx 10f459: 89 d7 mov %edx,%edi 10f45b: f2 ae repnz scas %es:(%edi),%al 10f45d: f7 d1 not %ecx 10f45f: 49 dec %ecx rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 10f460: 83 ec 0c sub $0xc,%esp 10f463: 6a 01 push $0x1 10f465: 8d 75 e4 lea -0x1c(%ebp),%esi 10f468: 56 push %esi 10f469: 6a 01 push $0x1 10f46b: 51 push %ecx 10f46c: 52 push %edx 10f46d: e8 ee 84 ff ff call 107960 10f472: 89 c2 mov %eax,%edx pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 10f474: 83 c4 20 add $0x20,%esp 10f477: 83 c8 ff or $0xffffffff,%eax 10f47a: 85 d2 test %edx,%edx 10f47c: 0f 85 8f 00 00 00 jne 10f511 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 10f482: 8b 55 f0 mov -0x10(%ebp),%edx 10f485: 8b 42 10 mov 0x10(%edx),%eax 10f488: 85 c0 test %eax,%eax 10f48a: 75 20 jne 10f4ac <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10f48c: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10f48f: 85 c0 test %eax,%eax <== NOT EXECUTED 10f491: 74 09 je 10f49c <== NOT EXECUTED 10f493: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f496: 56 push %esi <== NOT EXECUTED 10f497: ff d0 call *%eax <== NOT EXECUTED 10f499: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10f49c: e8 4b 29 00 00 call 111dec <__errno> <== NOT EXECUTED 10f4a1: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10f4a7: 83 c8 ff or $0xffffffff,%eax 10f4aa: eb 65 jmp 10f511 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 10f4ac: 83 ec 0c sub $0xc,%esp 10f4af: 56 push %esi 10f4b0: ff d0 call *%eax 10f4b2: 83 c4 10 add $0x10,%esp 10f4b5: 48 dec %eax 10f4b6: 74 24 je 10f4dc rtems_filesystem_freenode( &loc ); 10f4b8: 8b 45 f0 mov -0x10(%ebp),%eax 10f4bb: 85 c0 test %eax,%eax 10f4bd: 74 10 je 10f4cf <== NEVER TAKEN 10f4bf: 8b 40 1c mov 0x1c(%eax),%eax 10f4c2: 85 c0 test %eax,%eax 10f4c4: 74 09 je 10f4cf <== NEVER TAKEN 10f4c6: 83 ec 0c sub $0xc,%esp 10f4c9: 56 push %esi 10f4ca: ff d0 call *%eax 10f4cc: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 10f4cf: e8 18 29 00 00 call 111dec <__errno> 10f4d4: c7 00 14 00 00 00 movl $0x14,(%eax) 10f4da: eb cb jmp 10f4a7 } rtems_filesystem_freenode( &rtems_filesystem_current ); 10f4dc: 8b 15 f4 37 12 00 mov 0x1237f4,%edx 10f4e2: 8b 42 10 mov 0x10(%edx),%eax 10f4e5: 85 c0 test %eax,%eax 10f4e7: 74 13 je 10f4fc <== NEVER TAKEN 10f4e9: 8b 40 1c mov 0x1c(%eax),%eax 10f4ec: 85 c0 test %eax,%eax 10f4ee: 74 0c je 10f4fc <== NEVER TAKEN 10f4f0: 83 ec 0c sub $0xc,%esp 10f4f3: 83 c2 04 add $0x4,%edx 10f4f6: 52 push %edx 10f4f7: ff d0 call *%eax 10f4f9: 83 c4 10 add $0x10,%esp rtems_filesystem_current = loc; 10f4fc: 8b 3d f4 37 12 00 mov 0x1237f4,%edi 10f502: 83 c7 04 add $0x4,%edi 10f505: 8d 75 e4 lea -0x1c(%ebp),%esi 10f508: b9 05 00 00 00 mov $0x5,%ecx 10f50d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10f50f: 31 c0 xor %eax,%eax return 0; } 10f511: 8d 65 f8 lea -0x8(%ebp),%esp 10f514: 5e pop %esi 10f515: 5f pop %edi 10f516: c9 leave 10f517: c3 ret =============================================================================== 00108e0c : int chmod( const char *path, mode_t mode ) { 108e0c: 55 push %ebp 108e0d: 89 e5 mov %esp,%ebp 108e0f: 57 push %edi 108e10: 56 push %esi 108e11: 53 push %ebx 108e12: 83 ec 38 sub $0x38,%esp 108e15: 8b 55 08 mov 0x8(%ebp),%edx int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 108e18: 31 c0 xor %eax,%eax 108e1a: 83 c9 ff or $0xffffffff,%ecx 108e1d: 89 d7 mov %edx,%edi 108e1f: f2 ae repnz scas %es:(%edi),%al 108e21: f7 d1 not %ecx 108e23: 49 dec %ecx 108e24: 6a 01 push $0x1 108e26: 8d 5d d4 lea -0x2c(%ebp),%ebx 108e29: 53 push %ebx 108e2a: 6a 00 push $0x0 108e2c: 51 push %ecx 108e2d: 52 push %edx 108e2e: e8 41 02 00 00 call 109074 if ( status != 0 ) 108e33: 83 c4 20 add $0x20,%esp 108e36: 83 ce ff or $0xffffffff,%esi 108e39: 85 c0 test %eax,%eax 108e3b: 75 7d jne 108eba return -1; if ( !loc.handlers ){ 108e3d: 8b 45 dc mov -0x24(%ebp),%eax 108e40: 85 c0 test %eax,%eax 108e42: 75 24 jne 108e68 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 108e44: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 108e47: 85 c0 test %eax,%eax <== NOT EXECUTED 108e49: 74 10 je 108e5b <== NOT EXECUTED 108e4b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 108e4e: 85 c0 test %eax,%eax <== NOT EXECUTED 108e50: 74 09 je 108e5b <== NOT EXECUTED 108e52: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e55: 53 push %ebx <== NOT EXECUTED 108e56: ff d0 call *%eax <== NOT EXECUTED 108e58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 108e5b: e8 20 ad 00 00 call 113b80 <__errno> <== NOT EXECUTED 108e60: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 108e66: eb 29 jmp 108e91 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 108e68: 8b 40 1c mov 0x1c(%eax),%eax 108e6b: 85 c0 test %eax,%eax 108e6d: 75 27 jne 108e96 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 108e6f: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 108e72: 85 c0 test %eax,%eax <== NOT EXECUTED 108e74: 74 10 je 108e86 <== NOT EXECUTED 108e76: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 108e79: 85 c0 test %eax,%eax <== NOT EXECUTED 108e7b: 74 09 je 108e86 <== NOT EXECUTED 108e7d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e80: 53 push %ebx <== NOT EXECUTED 108e81: ff d0 call *%eax <== NOT EXECUTED 108e83: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 108e86: e8 f5 ac 00 00 call 113b80 <__errno> <== NOT EXECUTED 108e8b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108e91: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 108e94: eb 24 jmp 108eba <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 108e96: 52 push %edx 108e97: 52 push %edx 108e98: ff 75 0c pushl 0xc(%ebp) 108e9b: 53 push %ebx 108e9c: ff d0 call *%eax 108e9e: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 108ea0: 8b 45 e0 mov -0x20(%ebp),%eax 108ea3: 83 c4 10 add $0x10,%esp 108ea6: 85 c0 test %eax,%eax 108ea8: 74 10 je 108eba <== NEVER TAKEN 108eaa: 8b 40 1c mov 0x1c(%eax),%eax 108ead: 85 c0 test %eax,%eax 108eaf: 74 09 je 108eba <== NEVER TAKEN 108eb1: 83 ec 0c sub $0xc,%esp 108eb4: 53 push %ebx 108eb5: ff d0 call *%eax 108eb7: 83 c4 10 add $0x10,%esp return result; } 108eba: 89 f0 mov %esi,%eax 108ebc: 8d 65 f4 lea -0xc(%ebp),%esp 108ebf: 5b pop %ebx 108ec0: 5e pop %esi 108ec1: 5f pop %edi 108ec2: c9 leave 108ec3: c3 ret =============================================================================== 00108ec4 : int chown( const char *path, uid_t owner, gid_t group ) { 108ec4: 55 push %ebp 108ec5: 89 e5 mov %esp,%ebp 108ec7: 57 push %edi 108ec8: 56 push %esi 108ec9: 53 push %ebx 108eca: 83 ec 48 sub $0x48,%esp 108ecd: 8b 55 08 mov 0x8(%ebp),%edx 108ed0: 8b 75 0c mov 0xc(%ebp),%esi 108ed3: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 108ed6: 31 c0 xor %eax,%eax 108ed8: 83 c9 ff or $0xffffffff,%ecx 108edb: 89 d7 mov %edx,%edi 108edd: f2 ae repnz scas %es:(%edi),%al 108edf: f7 d1 not %ecx 108ee1: 49 dec %ecx 108ee2: 6a 01 push $0x1 108ee4: 8d 7d d4 lea -0x2c(%ebp),%edi 108ee7: 57 push %edi 108ee8: 6a 00 push $0x0 108eea: 51 push %ecx 108eeb: 52 push %edx 108eec: e8 83 01 00 00 call 109074 108ef1: 83 c4 20 add $0x20,%esp 108ef4: 83 ca ff or $0xffffffff,%edx 108ef7: 85 c0 test %eax,%eax 108ef9: 75 58 jne 108f53 return -1; if ( !loc.ops->chown_h ) { 108efb: 8b 55 e0 mov -0x20(%ebp),%edx 108efe: 8b 42 18 mov 0x18(%edx),%eax 108f01: 85 c0 test %eax,%eax 108f03: 75 20 jne 108f25 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 108f05: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 108f08: 85 c0 test %eax,%eax <== NOT EXECUTED 108f0a: 74 09 je 108f15 <== NOT EXECUTED 108f0c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108f0f: 57 push %edi <== NOT EXECUTED 108f10: ff d0 call *%eax <== NOT EXECUTED 108f12: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 108f15: e8 66 ac 00 00 call 113b80 <__errno> <== NOT EXECUTED 108f1a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108f20: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 108f23: eb 2e jmp 108f53 <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); 108f25: 52 push %edx 108f26: 0f b7 db movzwl %bx,%ebx 108f29: 53 push %ebx 108f2a: 0f b7 f6 movzwl %si,%esi 108f2d: 56 push %esi 108f2e: 57 push %edi 108f2f: ff d0 call *%eax 108f31: 89 c2 mov %eax,%edx rtems_filesystem_freenode( &loc ); 108f33: 8b 45 e0 mov -0x20(%ebp),%eax 108f36: 83 c4 10 add $0x10,%esp 108f39: 85 c0 test %eax,%eax 108f3b: 74 16 je 108f53 <== NEVER TAKEN 108f3d: 8b 40 1c mov 0x1c(%eax),%eax 108f40: 85 c0 test %eax,%eax 108f42: 74 0f je 108f53 <== NEVER TAKEN 108f44: 83 ec 0c sub $0xc,%esp 108f47: 57 push %edi 108f48: 89 55 c4 mov %edx,-0x3c(%ebp) 108f4b: ff d0 call *%eax 108f4d: 83 c4 10 add $0x10,%esp 108f50: 8b 55 c4 mov -0x3c(%ebp),%edx return result; } 108f53: 89 d0 mov %edx,%eax 108f55: 8d 65 f4 lea -0xc(%ebp),%esp 108f58: 5b pop %ebx 108f59: 5e pop %esi 108f5a: 5f pop %edi 108f5b: c9 leave 108f5c: c3 ret =============================================================================== 00107710 : #include int chroot( const char *pathname ) { 107710: 55 push %ebp 107711: 89 e5 mov %esp,%ebp 107713: 57 push %edi 107714: 56 push %esi 107715: 83 ec 20 sub $0x20,%esp int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 107718: 81 3d f4 37 12 00 1c cmpl $0x12591c,0x1237f4 10771f: 59 12 00 107722: 75 1e jne 107742 <== NEVER TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ 107724: e8 67 12 00 00 call 108990 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 107729: 81 3d f4 37 12 00 1c cmpl $0x12591c,0x1237f4 107730: 59 12 00 107733: 75 0d jne 107742 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 107735: e8 b2 a6 00 00 call 111dec <__errno> <== NOT EXECUTED 10773a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 107740: eb 22 jmp 107764 <== NOT EXECUTED } result = chdir(pathname); 107742: 83 ec 0c sub $0xc,%esp 107745: ff 75 08 pushl 0x8(%ebp) 107748: e8 eb 7c 00 00 call 10f438 if (result) { 10774d: 83 c4 10 add $0x10,%esp 107750: 85 c0 test %eax,%eax 107752: 74 15 je 107769 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( errno ); 107754: e8 93 a6 00 00 call 111dec <__errno> <== NOT EXECUTED 107759: 89 c6 mov %eax,%esi <== NOT EXECUTED 10775b: e8 8c a6 00 00 call 111dec <__errno> <== NOT EXECUTED 107760: 8b 00 mov (%eax),%eax <== NOT EXECUTED 107762: 89 06 mov %eax,(%esi) <== NOT EXECUTED 107764: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107767: eb 53 jmp 1077bc <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 107769: 83 ec 0c sub $0xc,%esp 10776c: 6a 00 push $0x0 10776e: 8d 45 e4 lea -0x1c(%ebp),%eax 107771: 50 push %eax 107772: 6a 00 push $0x0 107774: 6a 01 push $0x1 107776: 68 40 f9 11 00 push $0x11f940 10777b: e8 e0 01 00 00 call 107960 107780: 83 c4 20 add $0x20,%esp 107783: 85 c0 test %eax,%eax 107785: 75 cd jne 107754 <== NEVER TAKEN /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 107787: 8b 15 f4 37 12 00 mov 0x1237f4,%edx 10778d: 8b 42 24 mov 0x24(%edx),%eax 107790: 85 c0 test %eax,%eax 107792: 74 13 je 1077a7 <== NEVER TAKEN 107794: 8b 40 1c mov 0x1c(%eax),%eax 107797: 85 c0 test %eax,%eax 107799: 74 0c je 1077a7 <== NEVER TAKEN 10779b: 83 ec 0c sub $0xc,%esp 10779e: 83 c2 18 add $0x18,%edx 1077a1: 52 push %edx 1077a2: ff d0 call *%eax 1077a4: 83 c4 10 add $0x10,%esp rtems_filesystem_root = loc; 1077a7: 8b 3d f4 37 12 00 mov 0x1237f4,%edi 1077ad: 83 c7 18 add $0x18,%edi 1077b0: 8d 75 e4 lea -0x1c(%ebp),%esi 1077b3: b9 05 00 00 00 mov $0x5,%ecx 1077b8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1077ba: 31 c0 xor %eax,%eax return 0; } 1077bc: 8d 65 f8 lea -0x8(%ebp),%esp 1077bf: 5e pop %esi 1077c0: 5f pop %edi 1077c1: c9 leave 1077c2: c3 ret =============================================================================== 0010dbc8 : #include int close( int fd ) { 10dbc8: 55 push %ebp 10dbc9: 89 e5 mov %esp,%ebp 10dbcb: 56 push %esi 10dbcc: 53 push %ebx 10dbcd: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 10dbd0: 3b 1d 24 fa 11 00 cmp 0x11fa24,%ebx 10dbd6: 73 0f jae 10dbe7 iop = rtems_libio_iop(fd); 10dbd8: c1 e3 06 shl $0x6,%ebx 10dbdb: 03 1d f8 38 12 00 add 0x1238f8,%ebx rtems_libio_check_is_open(iop); 10dbe1: f6 43 15 01 testb $0x1,0x15(%ebx) 10dbe5: 75 10 jne 10dbf7 10dbe7: e8 78 27 00 00 call 110364 <__errno> 10dbec: c7 00 09 00 00 00 movl $0x9,(%eax) 10dbf2: 83 c8 ff or $0xffffffff,%eax 10dbf5: eb 3f jmp 10dc36 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 10dbf7: 8b 43 3c mov 0x3c(%ebx),%eax 10dbfa: 8b 40 04 mov 0x4(%eax),%eax 10dbfd: 31 f6 xor %esi,%esi 10dbff: 85 c0 test %eax,%eax 10dc01: 74 0b je 10dc0e <== NEVER TAKEN rc = (*iop->handlers->close_h)( iop ); 10dc03: 83 ec 0c sub $0xc,%esp 10dc06: 53 push %ebx 10dc07: ff d0 call *%eax 10dc09: 89 c6 mov %eax,%esi 10dc0b: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &iop->pathinfo ); 10dc0e: 8b 43 24 mov 0x24(%ebx),%eax 10dc11: 85 c0 test %eax,%eax 10dc13: 74 13 je 10dc28 <== NEVER TAKEN 10dc15: 8b 40 1c mov 0x1c(%eax),%eax 10dc18: 85 c0 test %eax,%eax 10dc1a: 74 0c je 10dc28 10dc1c: 83 ec 0c sub $0xc,%esp 10dc1f: 8d 53 18 lea 0x18(%ebx),%edx 10dc22: 52 push %edx 10dc23: ff d0 call *%eax 10dc25: 83 c4 10 add $0x10,%esp rtems_libio_free( iop ); 10dc28: 83 ec 0c sub $0xc,%esp 10dc2b: 53 push %ebx 10dc2c: e8 3d 02 00 00 call 10de6e return rc; 10dc31: 89 f0 mov %esi,%eax 10dc33: 83 c4 10 add $0x10,%esp } 10dc36: 8d 65 f8 lea -0x8(%ebp),%esp 10dc39: 5b pop %ebx 10dc3a: 5e pop %esi 10dc3b: c9 leave 10dc3c: c3 ret =============================================================================== 0010d290 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 10d290: 55 push %ebp 10d291: 89 e5 mov %esp,%ebp 10d293: 83 ec 1c sub $0x1c,%esp 10d296: 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; 10d299: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10d29c: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10d29f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10d2a6: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10d2ad: 8d 55 ec lea -0x14(%ebp),%edx 10d2b0: 52 push %edx 10d2b1: ff 70 0c pushl 0xc(%eax) 10d2b4: ff 70 08 pushl 0x8(%eax) 10d2b7: e8 a8 08 00 00 call 10db64 10d2bc: 89 c2 mov %eax,%edx np->major, np->minor, (void *) &args ); if ( status ) { 10d2be: 83 c4 10 add $0x10,%esp 10d2c1: 31 c0 xor %eax,%eax 10d2c3: 85 d2 test %edx,%edx 10d2c5: 74 0c je 10d2d3 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 10d2c7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d2ca: 52 push %edx <== NOT EXECUTED 10d2cb: e8 a8 00 00 00 call 10d378 <== NOT EXECUTED 10d2d0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10d2d3: c9 leave 10d2d4: c3 ret =============================================================================== 0010d2e7 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10d2e7: 55 push %ebp 10d2e8: 89 e5 mov %esp,%ebp 10d2ea: 57 push %edi 10d2eb: 56 push %esi 10d2ec: 53 push %ebx 10d2ed: 83 ec 1c sub $0x1c,%esp 10d2f0: 8b 4d 0c mov 0xc(%ebp),%ecx 10d2f3: 8b 5d 14 mov 0x14(%ebp),%ebx assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 10d2f6: 8b 33 mov (%ebx),%esi if (!device_name_table) 10d2f8: 85 f6 test %esi,%esi 10d2fa: 74 04 je 10d300 <== NEVER TAKEN 10d2fc: 31 ff xor %edi,%edi 10d2fe: eb 5a jmp 10d35a rtems_set_errno_and_return_minus_one( EFAULT ); 10d300: e8 3b 15 00 00 call 10e840 <__errno> <== NOT EXECUTED 10d305: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10d30b: eb 60 jmp 10d36d <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 10d30d: 8b 16 mov (%esi),%edx 10d30f: 85 d2 test %edx,%edx 10d311: 74 43 je 10d356 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10d313: 50 push %eax 10d314: 51 push %ecx 10d315: 52 push %edx 10d316: ff 75 08 pushl 0x8(%ebp) 10d319: 89 55 e4 mov %edx,-0x1c(%ebp) 10d31c: 89 4d e0 mov %ecx,-0x20(%ebp) 10d31f: e8 28 21 00 00 call 10f44c 10d324: 83 c4 10 add $0x10,%esp 10d327: 85 c0 test %eax,%eax 10d329: 8b 55 e4 mov -0x1c(%ebp),%edx 10d32c: 8b 4d e0 mov -0x20(%ebp),%ecx 10d32f: 75 25 jne 10d356 <== NEVER TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10d331: 80 3c 0a 00 cmpb $0x0,(%edx,%ecx,1) 10d335: 75 1f jne 10d356 <== NEVER TAKEN continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 10d337: 89 33 mov %esi,(%ebx) pathloc->handlers = &devFS_file_handlers; 10d339: c7 43 08 48 f9 11 00 movl $0x11f948,0x8(%ebx) pathloc->ops = &devFS_ops; 10d340: c7 43 0c 00 f9 11 00 movl $0x11f900,0xc(%ebx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10d347: a1 94 f9 11 00 mov 0x11f994,%eax 10d34c: 8b 40 28 mov 0x28(%eax),%eax 10d34f: 89 43 10 mov %eax,0x10(%ebx) 10d352: 31 c0 xor %eax,%eax return 0; 10d354: eb 1a jmp 10d370 /* 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++) { 10d356: 47 inc %edi 10d357: 83 c6 14 add $0x14,%esi 10d35a: 3b 3d 28 db 11 00 cmp 0x11db28,%edi 10d360: 72 ab jb 10d30d pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10d362: e8 d9 14 00 00 call 10e840 <__errno> 10d367: c7 00 02 00 00 00 movl $0x2,(%eax) 10d36d: 83 c8 ff or $0xffffffff,%eax } 10d370: 8d 65 f4 lea -0xc(%ebp),%esp 10d373: 5b pop %ebx 10d374: 5e pop %esi 10d375: 5f pop %edi 10d376: c9 leave 10d377: c3 ret =============================================================================== 00106d70 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 106d70: 55 push %ebp 106d71: 89 e5 mov %esp,%ebp 106d73: 57 push %edi 106d74: 53 push %ebx 106d75: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 106d78: 83 ec 0c sub $0xc,%esp 106d7b: 6b 05 28 db 11 00 14 imul $0x14,0x11db28,%eax 106d82: 50 push %eax 106d83: e8 d0 60 00 00 call 10ce58 <_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 aa 7a 00 00 call 10e840 <__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 28 db 11 00 14 imul $0x14,0x11db28,%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 48 f9 11 00 movl $0x11f948,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 106db5: c7 43 28 00 f9 11 00 movl $0x11f900,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 e6 38 00 00 call 10a7e4 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 6a 64 00 00 call 10d378 <== 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 2e 7a 00 00 call 10e840 <__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 09 7a 00 00 call 10e840 <__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 c8 84 00 00 call 10f320 <== 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 d6 79 00 00 call 10e840 <__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 28 db 11 00 cmp 0x11db28,%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 b6 79 00 00 call 10e840 <__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 7a 39 00 00 call 10a8bc 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 22 64 00 00 call 10d378 <== 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 4c 39 00 00 call 10a8ec <== 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 c8 63 00 00 call 10d378 <== 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 68 78 00 00 call 10e840 <__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 dc 38 00 00 call 10a91c 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 28 63 00 00 call 10d378 <== 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 =============================================================================== 0010ee64 : */ int device_close( rtems_libio_t *iop ) { 10ee64: 55 push %ebp 10ee65: 89 e5 mov %esp,%ebp 10ee67: 83 ec 1c sub $0x1c,%esp 10ee6a: 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; 10ee6d: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10ee70: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10ee73: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10ee7a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10ee81: 8d 55 ec lea -0x14(%ebp),%edx 10ee84: 52 push %edx 10ee85: ff 70 54 pushl 0x54(%eax) 10ee88: ff 70 50 pushl 0x50(%eax) 10ee8b: e8 a0 0d 00 00 call 10fc30 10ee90: 89 c2 mov %eax,%edx the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 10ee92: 83 c4 10 add $0x10,%esp 10ee95: 31 c0 xor %eax,%eax 10ee97: 85 d2 test %edx,%edx 10ee99: 74 0c je 10eea7 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 10ee9b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ee9e: 52 push %edx <== NOT EXECUTED 10ee9f: e8 e8 11 00 00 call 11008c <== NOT EXECUTED 10eea4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10eea7: c9 leave 10eea8: c3 ret =============================================================================== 0010ed5e : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 10ed5e: 55 push %ebp 10ed5f: 89 e5 mov %esp,%ebp 10ed61: 83 ec 1c sub $0x1c,%esp 10ed64: 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; 10ed67: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 10ed6a: 8b 55 0c mov 0xc(%ebp),%edx 10ed6d: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 10ed70: 8b 55 10 mov 0x10(%ebp),%edx 10ed73: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->file_info; 10ed76: 8b 40 38 mov 0x38(%eax),%eax status = rtems_io_control( 10ed79: 8d 55 e8 lea -0x18(%ebp),%edx 10ed7c: 52 push %edx 10ed7d: ff 70 54 pushl 0x54(%eax) 10ed80: ff 70 50 pushl 0x50(%eax) 10ed83: e8 d8 0e 00 00 call 10fc60 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10ed88: 83 c4 10 add $0x10,%esp 10ed8b: 85 c0 test %eax,%eax 10ed8d: 74 0e je 10ed9d <== ALWAYS TAKEN return rtems_deviceio_errno(status); 10ed8f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ed92: 50 push %eax <== NOT EXECUTED 10ed93: e8 f4 12 00 00 call 11008c <== NOT EXECUTED 10ed98: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ed9b: eb 03 jmp 10eda0 <== NOT EXECUTED return args.ioctl_return; 10ed9d: 8b 45 f4 mov -0xc(%ebp),%eax } 10eda0: c9 leave 10eda1: c3 ret =============================================================================== 0010eea9 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10eea9: 55 push %ebp 10eeaa: 89 e5 mov %esp,%ebp 10eeac: 83 ec 1c sub $0x1c,%esp 10eeaf: 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; 10eeb2: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 10eeb5: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 10eeb8: 8b 40 14 mov 0x14(%eax),%eax 10eebb: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 10eebe: 8b 45 14 mov 0x14(%ebp),%eax 10eec1: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 10eec4: 8d 45 ec lea -0x14(%ebp),%eax 10eec7: 50 push %eax 10eec8: ff 72 54 pushl 0x54(%edx) 10eecb: ff 72 50 pushl 0x50(%edx) 10eece: e8 bd 0d 00 00 call 10fc90 10eed3: 89 c2 mov %eax,%edx the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10eed5: 83 c4 10 add $0x10,%esp 10eed8: 31 c0 xor %eax,%eax 10eeda: 85 d2 test %edx,%edx 10eedc: 74 0c je 10eeea <== ALWAYS TAKEN return rtems_deviceio_errno(status); 10eede: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10eee1: 52 push %edx <== NOT EXECUTED 10eee2: e8 a5 11 00 00 call 11008c <== NOT EXECUTED 10eee7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 10eeea: c9 leave 10eeeb: c3 ret =============================================================================== 0010ee03 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10ee03: 55 push %ebp <== NOT EXECUTED 10ee04: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ee06: 53 push %ebx <== NOT EXECUTED 10ee07: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 10ee0a: 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; 10ee0d: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 10ee10: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 10ee13: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 10ee16: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 10ee19: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 10ee1c: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 10ee1f: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 10ee22: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 10ee25: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 10ee28: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 10ee2b: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 10ee2e: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 10ee31: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 10ee38: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 10ee3b: 50 push %eax <== NOT EXECUTED 10ee3c: ff 72 54 pushl 0x54(%edx) <== NOT EXECUTED 10ee3f: ff 72 50 pushl 0x50(%edx) <== NOT EXECUTED 10ee42: e8 79 0e 00 00 call 10fcc0 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10ee47: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ee4a: 85 c0 test %eax,%eax <== NOT EXECUTED 10ee4c: 74 0e je 10ee5c <== NOT EXECUTED return rtems_deviceio_errno(status); 10ee4e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ee51: 50 push %eax <== NOT EXECUTED 10ee52: e8 35 12 00 00 call 11008c <== NOT EXECUTED 10ee57: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ee5a: eb 03 jmp 10ee5f <== NOT EXECUTED return (ssize_t) args.bytes_moved; 10ee5c: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 10ee5f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10ee62: c9 leave <== NOT EXECUTED 10ee63: c3 ret <== NOT EXECUTED =============================================================================== 0010eda2 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10eda2: 55 push %ebp 10eda3: 89 e5 mov %esp,%ebp 10eda5: 53 push %ebx 10eda6: 83 ec 28 sub $0x28,%esp 10eda9: 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; 10edac: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 10edaf: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 10edb2: 8b 48 0c mov 0xc(%eax),%ecx 10edb5: 8b 58 10 mov 0x10(%eax),%ebx 10edb8: 89 4d e0 mov %ecx,-0x20(%ebp) 10edbb: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 10edbe: 8b 4d 0c mov 0xc(%ebp),%ecx 10edc1: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 10edc4: 8b 4d 10 mov 0x10(%ebp),%ecx 10edc7: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 10edca: 8b 40 14 mov 0x14(%eax),%eax 10edcd: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 10edd0: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 10edd7: 8d 45 dc lea -0x24(%ebp),%eax 10edda: 50 push %eax 10eddb: ff 72 54 pushl 0x54(%edx) 10edde: ff 72 50 pushl 0x50(%edx) 10ede1: e8 0a 0f 00 00 call 10fcf0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10ede6: 83 c4 10 add $0x10,%esp 10ede9: 85 c0 test %eax,%eax 10edeb: 74 0e je 10edfb <== ALWAYS TAKEN return rtems_deviceio_errno(status); 10eded: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10edf0: 50 push %eax <== NOT EXECUTED 10edf1: e8 96 12 00 00 call 11008c <== NOT EXECUTED 10edf6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10edf9: eb 03 jmp 10edfe <== NOT EXECUTED return (ssize_t) args.bytes_moved; 10edfb: 8b 45 f4 mov -0xc(%ebp),%eax } 10edfe: 8b 5d fc mov -0x4(%ebp),%ebx 10ee01: c9 leave 10ee02: c3 ret =============================================================================== 00108a42 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 108a42: 55 push %ebp 108a43: 89 e5 mov %esp,%ebp 108a45: 53 push %ebx 108a46: 83 ec 04 sub $0x4,%esp 108a49: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 108a4b: 83 b8 b4 00 00 00 00 cmpl $0x0,0xb4(%eax) 108a52: 74 46 je 108a9a rtems_interrupt_disable (level); 108a54: 9c pushf 108a55: fa cli 108a56: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 108a57: eb 2f jmp 108a88 tty->rawOutBufState = rob_wait; 108a59: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 108a60: 00 00 00 rtems_interrupt_enable (level); 108a63: 50 push %eax 108a64: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 108a65: 50 push %eax 108a66: 6a 00 push $0x0 108a68: 6a 00 push $0x0 108a6a: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 108a70: e8 77 15 00 00 call 109fec RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 108a75: 83 c4 10 add $0x10,%esp 108a78: 85 c0 test %eax,%eax 108a7a: 74 09 je 108a85 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 108a7c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108a7f: 50 push %eax <== NOT EXECUTED 108a80: e8 1f 1b 00 00 call 10a5a4 <== NOT EXECUTED rtems_interrupt_disable (level); 108a85: 9c pushf 108a86: fa cli 108a87: 58 pop %eax rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 108a88: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 108a8e: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 108a94: 39 d1 cmp %edx,%ecx 108a96: 75 c1 jne 108a59 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 108a98: 50 push %eax 108a99: 9d popf } } 108a9a: 8b 5d fc mov -0x4(%ebp),%ebx 108a9d: c9 leave 108a9e: c3 ret =============================================================================== 00107d08 : int dup2( int fildes, int fildes2 ) { 107d08: 55 push %ebp 107d09: 89 e5 mov %esp,%ebp 107d0b: 57 push %edi 107d0c: 56 push %esi 107d0d: 53 push %ebx 107d0e: 83 ec 64 sub $0x64,%esp 107d11: 8b 5d 08 mov 0x8(%ebp),%ebx 107d14: 8b 75 0c mov 0xc(%ebp),%esi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 107d17: 8d 7d a0 lea -0x60(%ebp),%edi 107d1a: 57 push %edi 107d1b: 53 push %ebx 107d1c: e8 d7 04 00 00 call 1081f8 if ( status == -1 ) 107d21: 83 c4 10 add $0x10,%esp 107d24: 40 inc %eax 107d25: 74 1e je 107d45 <== NEVER TAKEN /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 107d27: 52 push %edx 107d28: 52 push %edx 107d29: 57 push %edi 107d2a: 56 push %esi 107d2b: e8 c8 04 00 00 call 1081f8 if ( status == -1 ) 107d30: 83 c4 10 add $0x10,%esp 107d33: 40 inc %eax 107d34: 74 0f je 107d45 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 107d36: 50 push %eax <== NOT EXECUTED 107d37: 56 push %esi <== NOT EXECUTED 107d38: 6a 00 push $0x0 <== NOT EXECUTED 107d3a: 53 push %ebx <== NOT EXECUTED 107d3b: e8 e0 01 00 00 call 107f20 <== NOT EXECUTED 107d40: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107d43: eb 03 jmp 107d48 <== NOT EXECUTED 107d45: 83 c8 ff or $0xffffffff,%eax } 107d48: 8d 65 f4 lea -0xc(%ebp),%esp 107d4b: 5b pop %ebx 107d4c: 5e pop %esi 107d4d: 5f pop %edi 107d4e: c9 leave 107d4f: c3 ret =============================================================================== 0010865f : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 10865f: 55 push %ebp <== NOT EXECUTED 108660: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108662: 53 push %ebx <== NOT EXECUTED 108663: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 108666: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED 10866a: 74 3e je 1086aa <== NOT EXECUTED 10866c: 0f b6 c8 movzbl %al,%ecx <== NOT EXECUTED 10866f: 8b 1d a4 18 12 00 mov 0x1218a4,%ebx <== NOT EXECUTED 108675: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) <== NOT EXECUTED 10867a: 74 2e je 1086aa <== NOT EXECUTED 10867c: 3c 09 cmp $0x9,%al <== NOT EXECUTED 10867e: 74 2a je 1086aa <== NOT EXECUTED 108680: 3c 0a cmp $0xa,%al <== NOT EXECUTED 108682: 74 26 je 1086aa <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; 108684: c6 45 f6 5e movb $0x5e,-0xa(%ebp) <== NOT EXECUTED echobuf[1] = c ^ 0x40; 108688: 83 f0 40 xor $0x40,%eax <== NOT EXECUTED 10868b: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 10868e: 50 push %eax <== NOT EXECUTED 10868f: 52 push %edx <== NOT EXECUTED 108690: 6a 02 push $0x2 <== NOT EXECUTED 108692: 8d 45 f6 lea -0xa(%ebp),%eax <== NOT EXECUTED 108695: 50 push %eax <== NOT EXECUTED 108696: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 108699: e8 83 fd ff ff call 108421 <== NOT EXECUTED tty->column += 2; 10869e: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1086a1: 83 42 28 02 addl $0x2,0x28(%edx) <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 1086a5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1086a8: eb 08 jmp 1086b2 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 1086aa: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 1086ad: e8 8f fe ff ff call 108541 <== NOT EXECUTED } } 1086b2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1086b5: c9 leave <== NOT EXECUTED 1086b6: c3 ret <== NOT EXECUTED =============================================================================== 00107864 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 107864: 55 push %ebp <== NOT EXECUTED 107865: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107867: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp != NULL) 10786a: a1 40 63 12 00 mov 0x126340,%eax <== NOT EXECUTED 10786f: 85 c0 test %eax,%eax <== NOT EXECUTED 107871: 74 0c je 10787f <== NOT EXECUTED fclose(group_fp); 107873: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107876: 50 push %eax <== NOT EXECUTED 107877: e8 c0 a7 00 00 call 11203c <== NOT EXECUTED 10787c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10787f: c9 leave <== NOT EXECUTED 107880: c3 ret <== NOT EXECUTED =============================================================================== 00107881 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 107881: 55 push %ebp <== NOT EXECUTED 107882: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107884: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp != NULL) 107887: a1 58 62 12 00 mov 0x126258,%eax <== NOT EXECUTED 10788c: 85 c0 test %eax,%eax <== NOT EXECUTED 10788e: 74 0c je 10789c <== NOT EXECUTED fclose(passwd_fp); 107890: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107893: 50 push %eax <== NOT EXECUTED 107894: e8 a3 a7 00 00 call 11203c <== NOT EXECUTED 107899: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10789c: c9 leave <== NOT EXECUTED 10789d: c3 ret <== NOT EXECUTED =============================================================================== 001086b7 : * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { 1086b7: 55 push %ebp <== NOT EXECUTED 1086b8: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1086ba: 57 push %edi <== NOT EXECUTED 1086bb: 56 push %esi <== NOT EXECUTED 1086bc: 53 push %ebx <== NOT EXECUTED 1086bd: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 1086c0: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1086c2: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED if (tty->ccount == 0) 1086c5: 83 78 20 00 cmpl $0x0,0x20(%eax) <== NOT EXECUTED 1086c9: 0f 84 59 01 00 00 je 108828 <== NOT EXECUTED return; if (lineFlag) { 1086cf: 85 d2 test %edx,%edx <== NOT EXECUTED 1086d1: 0f 84 46 01 00 00 je 10881d <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 1086d7: 8b 40 3c mov 0x3c(%eax),%eax <== NOT EXECUTED 1086da: a8 08 test $0x8,%al <== NOT EXECUTED 1086dc: 75 0c jne 1086ea <== NOT EXECUTED tty->ccount = 0; 1086de: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED return; 1086e5: e9 3e 01 00 00 jmp 108828 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 1086ea: a8 10 test $0x10,%al <== NOT EXECUTED 1086ec: 0f 85 2b 01 00 00 jne 10881d <== NOT EXECUTED tty->ccount = 0; 1086f2: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 1086f9: 0f b6 43 44 movzbl 0x44(%ebx),%eax <== NOT EXECUTED 1086fd: 89 da mov %ebx,%edx <== NOT EXECUTED 1086ff: e8 5b ff ff ff call 10865f <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 108704: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 108708: 0f 84 1a 01 00 00 je 108828 <== NOT EXECUTED echo ('\n', tty); 10870e: 89 da mov %ebx,%edx <== NOT EXECUTED 108710: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 108715: eb 30 jmp 108747 <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 108717: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 10871a: 8d 48 ff lea -0x1(%eax),%ecx <== NOT EXECUTED 10871d: 89 4b 20 mov %ecx,0x20(%ebx) <== NOT EXECUTED 108720: 8a 54 02 ff mov -0x1(%edx,%eax,1),%dl <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 108724: 8b 7b 3c mov 0x3c(%ebx),%edi <== NOT EXECUTED 108727: f7 c7 08 00 00 00 test $0x8,%edi <== NOT EXECUTED 10872d: 0f 84 e4 00 00 00 je 108817 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 108733: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 108737: 75 1a jne 108753 <== NOT EXECUTED 108739: f7 c7 10 00 00 00 test $0x10,%edi <== NOT EXECUTED 10873f: 75 12 jne 108753 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 108741: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 108745: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 108747: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10874a: 5b pop %ebx <== NOT EXECUTED 10874b: 5e pop %esi <== NOT EXECUTED 10874c: 5f pop %edi <== NOT EXECUTED 10874d: c9 leave <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 10874e: e9 0c ff ff ff jmp 10865f <== NOT EXECUTED } else if (c == '\t') { 108753: 80 fa 09 cmp $0x9,%dl <== NOT EXECUTED 108756: 8b 0d a4 18 12 00 mov 0x1218a4,%ecx <== NOT EXECUTED 10875c: 75 5d jne 1087bb <== NOT EXECUTED int col = tty->read_start_column; 10875e: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED * Erase a character or line * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) 108761: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 108766: 81 e7 00 02 00 00 and $0x200,%edi <== NOT EXECUTED 10876c: 89 7d e0 mov %edi,-0x20(%ebp) <== NOT EXECUTED 10876f: 89 c7 mov %eax,%edi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 108771: eb 27 jmp 10879a <== NOT EXECUTED c = tty->cbuf[i++]; 108773: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 108776: 8a 44 10 ff mov -0x1(%eax,%edx,1),%al <== NOT EXECUTED if (c == '\t') { 10877a: 3c 09 cmp $0x9,%al <== NOT EXECUTED 10877c: 75 05 jne 108783 <== NOT EXECUTED col = (col | 7) + 1; 10877e: 83 ce 07 or $0x7,%esi <== NOT EXECUTED 108781: eb 15 jmp 108798 <== NOT EXECUTED } else if (iscntrl (c)) { 108783: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108786: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) <== NOT EXECUTED 10878b: 74 0b je 108798 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 10878d: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 108791: 74 06 je 108799 <== NOT EXECUTED col += 2; 108793: 83 c6 02 add $0x2,%esi <== NOT EXECUTED 108796: eb 01 jmp 108799 <== NOT EXECUTED } else { col++; 108798: 46 inc %esi <== NOT EXECUTED 108799: 42 inc %edx <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 10879a: 39 fa cmp %edi,%edx <== NOT EXECUTED 10879c: 75 d5 jne 108773 <== NOT EXECUTED 10879e: eb 14 jmp 1087b4 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 1087a0: 57 push %edi <== NOT EXECUTED 1087a1: 53 push %ebx <== NOT EXECUTED 1087a2: 6a 01 push $0x1 <== NOT EXECUTED 1087a4: 68 5d d6 11 00 push $0x11d65d <== NOT EXECUTED 1087a9: e8 73 fc ff ff call 108421 <== NOT EXECUTED tty->column--; 1087ae: ff 4b 28 decl 0x28(%ebx) <== NOT EXECUTED 1087b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 1087b4: 39 73 28 cmp %esi,0x28(%ebx) <== NOT EXECUTED 1087b7: 7f e7 jg 1087a0 <== NOT EXECUTED 1087b9: eb 5c jmp 108817 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 1087bb: 0f b6 f2 movzbl %dl,%esi <== NOT EXECUTED 1087be: f6 44 31 01 20 testb $0x20,0x1(%ecx,%esi,1) <== NOT EXECUTED 1087c3: 74 24 je 1087e9 <== NOT EXECUTED 1087c5: 81 e7 00 02 00 00 and $0x200,%edi <== NOT EXECUTED 1087cb: 74 1c je 1087e9 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 1087cd: 51 push %ecx <== NOT EXECUTED 1087ce: 53 push %ebx <== NOT EXECUTED 1087cf: 6a 03 push $0x3 <== NOT EXECUTED 1087d1: 68 5b d6 11 00 push $0x11d65b <== NOT EXECUTED 1087d6: e8 46 fc ff ff call 108421 <== NOT EXECUTED if (tty->column) 1087db: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 1087de: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1087e1: 85 c0 test %eax,%eax <== NOT EXECUTED 1087e3: 74 04 je 1087e9 <== NOT EXECUTED tty->column--; 1087e5: 48 dec %eax <== NOT EXECUTED 1087e6: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 1087e9: a1 a4 18 12 00 mov 0x1218a4,%eax <== NOT EXECUTED 1087ee: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1) <== NOT EXECUTED 1087f3: 74 06 je 1087fb <== NOT EXECUTED 1087f5: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 1087f9: 74 1c je 108817 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 1087fb: 52 push %edx <== NOT EXECUTED 1087fc: 53 push %ebx <== NOT EXECUTED 1087fd: 6a 03 push $0x3 <== NOT EXECUTED 1087ff: 68 5b d6 11 00 push $0x11d65b <== NOT EXECUTED 108804: e8 18 fc ff ff call 108421 <== NOT EXECUTED if (tty->column) 108809: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10880c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10880f: 85 c0 test %eax,%eax <== NOT EXECUTED 108811: 74 04 je 108817 <== NOT EXECUTED tty->column--; 108813: 48 dec %eax <== NOT EXECUTED 108814: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } } } if (!lineFlag) 108817: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 10881b: 74 0b je 108828 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 10881d: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108820: 85 c0 test %eax,%eax <== NOT EXECUTED 108822: 0f 85 ef fe ff ff jne 108717 <== NOT EXECUTED } } if (!lineFlag) break; } } 108828: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10882b: 5b pop %ebx <== NOT EXECUTED 10882c: 5e pop %esi <== NOT EXECUTED 10882d: 5f pop %edi <== NOT EXECUTED 10882e: c9 leave <== NOT EXECUTED 10882f: c3 ret <== NOT EXECUTED =============================================================================== 00107f20 : int fcntl( int fd, int cmd, ... ) { 107f20: 55 push %ebp 107f21: 89 e5 mov %esp,%ebp 107f23: 57 push %edi 107f24: 56 push %esi 107f25: 53 push %ebx 107f26: 83 ec 0c sub $0xc,%esp 107f29: 8b 5d 08 mov 0x8(%ebp),%ebx #include #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, ...)); 107f2c: 8d 55 10 lea 0x10(%ebp),%edx int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 107f2f: 8b 0d 44 21 12 00 mov 0x122144,%ecx 107f35: 39 cb cmp %ecx,%ebx 107f37: 73 16 jae 107f4f <== NEVER TAKEN iop = rtems_libio_iop( fd ); 107f39: a1 20 60 12 00 mov 0x126020,%eax 107f3e: c1 e3 06 shl $0x6,%ebx 107f41: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 107f44: 8b 73 14 mov 0x14(%ebx),%esi 107f47: f7 c6 00 01 00 00 test $0x100,%esi 107f4d: 75 10 jne 107f5f <== ALWAYS TAKEN 107f4f: e8 68 a5 00 00 call 1124bc <__errno> <== NOT EXECUTED 107f54: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 107f5a: e9 fe 00 00 00 jmp 10805d <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 107f5f: 83 7d 0c 09 cmpl $0x9,0xc(%ebp) 107f63: 0f 87 c1 00 00 00 ja 10802a 107f69: 8b 7d 0c mov 0xc(%ebp),%edi 107f6c: ff 24 bd d8 05 12 00 jmp *0x1205d8(,%edi,4) case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 107f73: 8b 32 mov (%edx),%esi if ( fd2 ) 107f75: 85 f6 test %esi,%esi 107f77: 74 10 je 107f89 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); 107f79: 31 d2 xor %edx,%edx <== NOT EXECUTED 107f7b: 39 ce cmp %ecx,%esi <== NOT EXECUTED 107f7d: 73 1c jae 107f9b <== NOT EXECUTED 107f7f: 89 f2 mov %esi,%edx <== NOT EXECUTED 107f81: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED 107f84: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 107f87: eb 12 jmp 107f9b <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 107f89: e8 b5 05 00 00 call 108543 107f8e: 89 c2 mov %eax,%edx if ( diop == 0 ) { 107f90: 83 ce ff or $0xffffffff,%esi 107f93: 85 c0 test %eax,%eax 107f95: 0f 84 c5 00 00 00 je 108060 <== NEVER TAKEN ret = -1; break; } } diop->handlers = iop->handlers; 107f9b: 8b 43 3c mov 0x3c(%ebx),%eax 107f9e: 89 42 3c mov %eax,0x3c(%edx) diop->file_info = iop->file_info; 107fa1: 8b 43 38 mov 0x38(%ebx),%eax 107fa4: 89 42 38 mov %eax,0x38(%edx) diop->flags = iop->flags; 107fa7: 8b 43 14 mov 0x14(%ebx),%eax 107faa: 89 42 14 mov %eax,0x14(%edx) diop->pathinfo = iop->pathinfo; 107fad: 8d 7a 18 lea 0x18(%edx),%edi 107fb0: 8d 73 18 lea 0x18(%ebx),%esi 107fb3: b9 05 00 00 00 mov $0x5,%ecx 107fb8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 107fba: 89 d6 mov %edx,%esi 107fbc: 2b 35 20 60 12 00 sub 0x126020,%esi 107fc2: c1 fe 06 sar $0x6,%esi 107fc5: eb 70 jmp 108037 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 107fc7: c1 ee 0b shr $0xb,%esi 107fca: 83 e6 01 and $0x1,%esi 107fcd: eb 6c jmp 10803b * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 107fcf: 83 3a 00 cmpl $0x0,(%edx) 107fd2: 74 08 je 107fdc <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 107fd4: 81 ce 00 08 00 00 or $0x800,%esi 107fda: eb 06 jmp 107fe2 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 107fdc: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi <== NOT EXECUTED 107fe2: 89 73 14 mov %esi,0x14(%ebx) 107fe5: 31 f6 xor %esi,%esi 107fe7: eb 52 jmp 10803b break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 107fe9: 83 ec 0c sub $0xc,%esp 107fec: 56 push %esi 107fed: e8 06 04 00 00 call 1083f8 107ff2: 89 c6 mov %eax,%esi 107ff4: 83 c4 10 add $0x10,%esp 107ff7: eb 3e jmp 108037 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 107ff9: 83 ec 0c sub $0xc,%esp 107ffc: ff 32 pushl (%edx) 107ffe: e8 cb 05 00 00 call 1085ce /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 108003: 25 01 02 00 00 and $0x201,%eax 108008: 8b 53 14 mov 0x14(%ebx),%edx 10800b: 81 e2 fe fd ff ff and $0xfffffdfe,%edx 108011: 09 d0 or %edx,%eax 108013: 89 43 14 mov %eax,0x14(%ebx) 108016: 31 f6 xor %esi,%esi 108018: 83 c4 10 add $0x10,%esp 10801b: eb 1e jmp 10803b errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 10801d: e8 9a a4 00 00 call 1124bc <__errno> 108022: c7 00 86 00 00 00 movl $0x86,(%eax) 108028: eb 33 jmp 10805d ret = -1; break; default: errno = EINVAL; 10802a: e8 8d a4 00 00 call 1124bc <__errno> 10802f: c7 00 16 00 00 00 movl $0x16,(%eax) 108035: eb 26 jmp 10805d /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 108037: 85 f6 test %esi,%esi 108039: 78 25 js 108060 <== NEVER TAKEN if (iop->handlers->fcntl_h) { 10803b: 8b 43 3c mov 0x3c(%ebx),%eax 10803e: 8b 40 30 mov 0x30(%eax),%eax 108041: 85 c0 test %eax,%eax 108043: 74 1b je 108060 <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 108045: 52 push %edx 108046: 52 push %edx 108047: 53 push %ebx 108048: ff 75 0c pushl 0xc(%ebp) 10804b: ff d0 call *%eax 10804d: 89 c3 mov %eax,%ebx if (err) { 10804f: 83 c4 10 add $0x10,%esp 108052: 85 c0 test %eax,%eax 108054: 74 0a je 108060 <== ALWAYS TAKEN errno = err; 108056: e8 61 a4 00 00 call 1124bc <__errno> <== NOT EXECUTED 10805b: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10805d: 83 ce ff or $0xffffffff,%esi va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 108060: 89 f0 mov %esi,%eax 108062: 8d 65 f4 lea -0xc(%ebp),%esp 108065: 5b pop %ebx 108066: 5e pop %esi 108067: 5f pop %edi 108068: c9 leave 108069: c3 ret =============================================================================== 00108088 : #include int fdatasync( int fd ) { 108088: 55 push %ebp 108089: 89 e5 mov %esp,%ebp 10808b: 83 ec 08 sub $0x8,%esp 10808e: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108091: 3b 05 44 21 12 00 cmp 0x122144,%eax 108097: 73 11 jae 1080aa iop = rtems_libio_iop( fd ); 108099: c1 e0 06 shl $0x6,%eax 10809c: 03 05 20 60 12 00 add 0x126020,%eax rtems_libio_check_is_open(iop); 1080a2: 8b 50 14 mov 0x14(%eax),%edx 1080a5: f6 c6 01 test $0x1,%dh 1080a8: 75 0d jne 1080b7 <== ALWAYS TAKEN 1080aa: e8 0d a4 00 00 call 1124bc <__errno> 1080af: c7 00 09 00 00 00 movl $0x9,(%eax) 1080b5: eb 2f jmp 1080e6 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1080b7: 80 e2 04 and $0x4,%dl 1080ba: 75 0d jne 1080c9 1080bc: e8 fb a3 00 00 call 1124bc <__errno> 1080c1: c7 00 16 00 00 00 movl $0x16,(%eax) 1080c7: eb 1d jmp 1080e6 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 1080c9: 8b 50 3c mov 0x3c(%eax),%edx 1080cc: 8b 52 2c mov 0x2c(%edx),%edx 1080cf: 85 d2 test %edx,%edx 1080d1: 75 0d jne 1080e0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1080d3: e8 e4 a3 00 00 call 1124bc <__errno> 1080d8: c7 00 86 00 00 00 movl $0x86,(%eax) 1080de: eb 06 jmp 1080e6 return (*iop->handlers->fdatasync_h)( iop ); 1080e0: 89 45 08 mov %eax,0x8(%ebp) } 1080e3: c9 leave */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 1080e4: ff e2 jmp *%edx } 1080e6: 83 c8 ff or $0xffffffff,%eax 1080e9: c9 leave 1080ea: c3 ret =============================================================================== 0010f398 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 10f398: 55 push %ebp 10f399: 89 e5 mov %esp,%ebp 10f39b: 57 push %edi 10f39c: 56 push %esi 10f39d: 53 push %ebx 10f39e: 83 ec 30 sub $0x30,%esp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 10f3a1: 6a 00 push $0x0 10f3a3: 6a 00 push $0x0 10f3a5: ff 35 fc 36 12 00 pushl 0x1236fc 10f3ab: e8 3c ac ff ff call 109fec 10f3b0: 89 c2 mov %eax,%edx 10f3b2: 83 c4 10 add $0x10,%esp 10f3b5: bf fc ff ff ff mov $0xfffffffc,%edi 10f3ba: 85 c0 test %eax,%eax 10f3bc: 0f 85 f3 02 00 00 jne 10f6b5 <== ALWAYS TAKEN RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 10f3c2: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f3c5: 8b 30 mov (%eax),%esi <== NOT EXECUTED if (pipe == NULL) { 10f3c7: 85 f6 test %esi,%esi <== NOT EXECUTED 10f3c9: 0f 85 13 01 00 00 jne 10f4e2 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 10f3cf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f3d2: 6a 34 push $0x34 <== NOT EXECUTED 10f3d4: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 10f3d7: e8 40 80 ff ff call 10741c <== NOT EXECUTED 10f3dc: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10f3de: 89 c6 mov %eax,%esi <== NOT EXECUTED if (pipe == NULL) 10f3e0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f3e3: 66 bf f4 ff mov $0xfff4,%di <== NOT EXECUTED 10f3e7: 85 c0 test %eax,%eax <== NOT EXECUTED 10f3e9: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10f3ec: 0f 84 24 01 00 00 je 10f516 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 10f3f2: b9 0d 00 00 00 mov $0xd,%ecx <== NOT EXECUTED 10f3f7: 89 c7 mov %eax,%edi <== NOT EXECUTED 10f3f9: 89 d0 mov %edx,%eax <== NOT EXECUTED 10f3fb: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED pipe->Size = PIPE_BUF; 10f3fd: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 10f404: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f407: 68 00 02 00 00 push $0x200 <== NOT EXECUTED 10f40c: e8 0b 80 ff ff call 10741c <== NOT EXECUTED 10f411: 89 03 mov %eax,(%ebx) <== NOT EXECUTED if (! pipe->Buffer) 10f413: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f416: bf f4 ff ff ff mov $0xfffffff4,%edi <== NOT EXECUTED 10f41b: 85 c0 test %eax,%eax <== NOT EXECUTED 10f41d: 0f 84 b1 00 00 00 je 10f4d4 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 10f423: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED 10f426: 50 push %eax <== NOT EXECUTED 10f427: 6a 00 push $0x0 <== NOT EXECUTED 10f429: 6a 00 push $0x0 <== NOT EXECUTED 10f42b: 0f be 05 90 18 12 00 movsbl 0x121890,%eax <== NOT EXECUTED 10f432: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED 10f437: 50 push %eax <== NOT EXECUTED 10f438: e8 0b 05 00 00 call 10f948 <== NOT EXECUTED 10f43d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f440: 85 c0 test %eax,%eax <== NOT EXECUTED 10f442: 75 7e jne 10f4c2 <== 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( 10f444: 8d 43 30 lea 0x30(%ebx),%eax <== NOT EXECUTED 10f447: 50 push %eax <== NOT EXECUTED 10f448: 6a 00 push $0x0 <== NOT EXECUTED 10f44a: 6a 00 push $0x0 <== NOT EXECUTED 10f44c: 0f be 05 90 18 12 00 movsbl 0x121890,%eax <== NOT EXECUTED 10f453: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED 10f458: 50 push %eax <== NOT EXECUTED 10f459: e8 ea 04 00 00 call 10f948 <== NOT EXECUTED 10f45e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f461: 85 c0 test %eax,%eax <== NOT EXECUTED 10f463: 75 4f jne 10f4b4 <== 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( 10f465: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f468: 8d 43 28 lea 0x28(%ebx),%eax <== NOT EXECUTED 10f46b: 50 push %eax <== NOT EXECUTED 10f46c: 6a 00 push $0x0 <== NOT EXECUTED 10f46e: 6a 10 push $0x10 <== NOT EXECUTED 10f470: 6a 01 push $0x1 <== NOT EXECUTED 10f472: 0f be 05 90 18 12 00 movsbl 0x121890,%eax <== NOT EXECUTED 10f479: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED 10f47e: 50 push %eax <== NOT EXECUTED 10f47f: e8 3c a9 ff ff call 109dc0 <== NOT EXECUTED 10f484: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10f487: 85 c0 test %eax,%eax <== NOT EXECUTED 10f489: 75 1b jne 10f4a6 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 10f48b: a0 90 18 12 00 mov 0x121890,%al <== NOT EXECUTED 10f490: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f493: 88 15 90 18 12 00 mov %dl,0x121890 <== NOT EXECUTED 10f499: 3c 7a cmp $0x7a,%al <== NOT EXECUTED 10f49b: 75 45 jne 10f4e2 <== NOT EXECUTED c = 'a'; 10f49d: c6 05 90 18 12 00 61 movb $0x61,0x121890 <== NOT EXECUTED 10f4a4: eb 3c jmp 10f4e2 <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 10f4a6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f4a9: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f4ac: e8 4f 05 00 00 call 10fa00 <== NOT EXECUTED 10f4b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 10f4b4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f4b7: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f4ba: e8 41 05 00 00 call 10fa00 <== NOT EXECUTED 10f4bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 10f4c2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f4c5: ff 33 pushl (%ebx) <== NOT EXECUTED 10f4c7: e8 24 7d ff ff call 1071f0 <== NOT EXECUTED 10f4cc: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED 10f4d1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_buf: free(pipe); 10f4d4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f4d7: 53 push %ebx <== NOT EXECUTED 10f4d8: e8 13 7d ff ff call 1071f0 <== NOT EXECUTED 10f4dd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f4e0: eb 34 jmp 10f516 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 10f4e2: 57 push %edi <== NOT EXECUTED 10f4e3: 6a 00 push $0x0 <== NOT EXECUTED 10f4e5: 6a 00 push $0x0 <== NOT EXECUTED 10f4e7: ff 76 28 pushl 0x28(%esi) <== NOT EXECUTED 10f4ea: e8 fd aa ff ff call 109fec <== NOT EXECUTED 10f4ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f4f2: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10f4f5: 19 ff sbb %edi,%edi <== NOT EXECUTED 10f4f7: f7 d7 not %edi <== NOT EXECUTED 10f4f9: 83 e7 fc and $0xfffffffc,%edi <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 10f4fc: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f4ff: 83 38 00 cmpl $0x0,(%eax) <== NOT EXECUTED 10f502: 75 12 jne 10f516 <== NOT EXECUTED if (err) 10f504: 85 ff test %edi,%edi <== NOT EXECUTED 10f506: 74 09 je 10f511 <== NOT EXECUTED pipe_free(pipe); 10f508: 89 f0 mov %esi,%eax <== NOT EXECUTED 10f50a: e8 7e fd ff ff call 10f28d <== NOT EXECUTED 10f50f: eb 05 jmp 10f516 <== NOT EXECUTED else *pipep = pipe; 10f511: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f514: 89 30 mov %esi,(%eax) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 10f516: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f519: ff 35 fc 36 12 00 pushl 0x1236fc <== NOT EXECUTED 10f51f: e8 b4 ab ff ff call 10a0d8 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 10f524: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f527: 85 ff test %edi,%edi <== NOT EXECUTED 10f529: 0f 85 86 01 00 00 jne 10f6b5 <== NOT EXECUTED return err; pipe = *pipep; 10f52f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f532: 8b 18 mov (%eax),%ebx <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 10f534: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10f537: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 10f53a: 89 d0 mov %edx,%eax <== NOT EXECUTED 10f53c: 83 e0 06 and $0x6,%eax <== NOT EXECUTED 10f53f: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10f542: 0f 84 91 00 00 00 je 10f5d9 <== NOT EXECUTED 10f548: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10f54b: 0f 84 00 01 00 00 je 10f651 <== NOT EXECUTED 10f551: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10f554: 0f 85 39 01 00 00 jne 10f693 <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; 10f55a: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10f55d: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10f560: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f563: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10f566: 85 c0 test %eax,%eax <== NOT EXECUTED 10f568: 75 11 jne 10f57b <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10f56a: 56 push %esi <== NOT EXECUTED 10f56b: 56 push %esi <== NOT EXECUTED 10f56c: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f56f: 50 push %eax <== NOT EXECUTED 10f570: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f573: e8 e8 04 00 00 call 10fa60 <== NOT EXECUTED 10f578: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (pipe->Writers == 0) { 10f57b: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10f57f: 0f 85 0e 01 00 00 jne 10f693 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 10f585: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10f588: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10f58c: 0f 85 01 01 00 00 jne 10f693 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 10f592: 8b 73 24 mov 0x24(%ebx),%esi <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 10f595: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f598: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f59b: e8 38 ab ff ff call 10a0d8 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10f5a0: 5a pop %edx <== NOT EXECUTED 10f5a1: 59 pop %ecx <== NOT EXECUTED 10f5a2: 6a 00 push $0x0 <== NOT EXECUTED 10f5a4: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f5a7: e8 0c 05 00 00 call 10fab8 <== NOT EXECUTED 10f5ac: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f5af: 85 c0 test %eax,%eax <== NOT EXECUTED 10f5b1: 0f 85 e9 00 00 00 jne 10f6a0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 10f5b7: 50 push %eax <== NOT EXECUTED 10f5b8: 6a 00 push $0x0 <== NOT EXECUTED 10f5ba: 6a 00 push $0x0 <== NOT EXECUTED 10f5bc: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f5bf: e8 28 aa ff ff call 109fec <== NOT EXECUTED 10f5c4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f5c7: 85 c0 test %eax,%eax <== NOT EXECUTED 10f5c9: 0f 85 d1 00 00 00 jne 10f6a0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 10f5cf: 3b 73 24 cmp 0x24(%ebx),%esi <== NOT EXECUTED 10f5d2: 74 c1 je 10f595 <== NOT EXECUTED 10f5d4: e9 ba 00 00 00 jmp 10f693 <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 10f5d9: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10f5dd: 75 0f jne 10f5ee <== NOT EXECUTED 10f5df: 80 e2 01 and $0x1,%dl <== NOT EXECUTED 10f5e2: 74 0a je 10f5ee <== NOT EXECUTED 10f5e4: bf fa ff ff ff mov $0xfffffffa,%edi <== NOT EXECUTED 10f5e9: e9 b7 00 00 00 jmp 10f6a5 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; 10f5ee: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10f5f1: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10f5f4: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f5f7: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10f5fa: 85 c0 test %eax,%eax <== NOT EXECUTED 10f5fc: 75 11 jne 10f60f <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10f5fe: 56 push %esi <== NOT EXECUTED 10f5ff: 56 push %esi <== NOT EXECUTED 10f600: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f603: 50 push %eax <== NOT EXECUTED 10f604: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f607: e8 54 04 00 00 call 10fa60 <== NOT EXECUTED 10f60c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (pipe->Readers == 0) { 10f60f: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10f613: 75 7e jne 10f693 <== NOT EXECUTED prevCounter = pipe->readerCounter; 10f615: 8b 73 20 mov 0x20(%ebx),%esi <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 10f618: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f61b: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f61e: e8 b5 aa ff ff call 10a0d8 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10f623: 5a pop %edx <== NOT EXECUTED 10f624: 59 pop %ecx <== NOT EXECUTED 10f625: 6a 00 push $0x0 <== NOT EXECUTED 10f627: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f62a: e8 89 04 00 00 call 10fab8 <== NOT EXECUTED 10f62f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f632: 85 c0 test %eax,%eax <== NOT EXECUTED 10f634: 75 6a jne 10f6a0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 10f636: 50 push %eax <== NOT EXECUTED 10f637: 6a 00 push $0x0 <== NOT EXECUTED 10f639: 6a 00 push $0x0 <== NOT EXECUTED 10f63b: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f63e: e8 a9 a9 ff ff call 109fec <== NOT EXECUTED 10f643: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f646: 85 c0 test %eax,%eax <== NOT EXECUTED 10f648: 75 56 jne 10f6a0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 10f64a: 3b 73 20 cmp 0x20(%ebx),%esi <== NOT EXECUTED 10f64d: 74 c9 je 10f618 <== NOT EXECUTED 10f64f: eb 42 jmp 10f693 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 10f651: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10f654: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10f657: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f65a: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10f65d: 85 c0 test %eax,%eax <== NOT EXECUTED 10f65f: 75 11 jne 10f672 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10f661: 56 push %esi <== NOT EXECUTED 10f662: 56 push %esi <== NOT EXECUTED 10f663: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f666: 50 push %eax <== NOT EXECUTED 10f667: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f66a: e8 f1 03 00 00 call 10fa60 <== NOT EXECUTED 10f66f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED pipe->writerCounter ++; 10f672: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10f675: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10f678: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f67b: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10f67e: 85 c0 test %eax,%eax <== NOT EXECUTED 10f680: 75 11 jne 10f693 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10f682: 51 push %ecx <== NOT EXECUTED 10f683: 51 push %ecx <== NOT EXECUTED 10f684: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f687: 50 push %eax <== NOT EXECUTED 10f688: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f68b: e8 d0 03 00 00 call 10fa60 <== NOT EXECUTED 10f690: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 10f693: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f696: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f699: e8 3a aa ff ff call 10a0d8 <== NOT EXECUTED 10f69e: eb 12 jmp 10f6b2 <== NOT EXECUTED return 0; 10f6a0: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED out_error: pipe_release(pipep, iop); 10f6a5: 52 push %edx <== NOT EXECUTED 10f6a6: 52 push %edx <== NOT EXECUTED 10f6a7: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10f6aa: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10f6ad: e8 16 fc ff ff call 10f2c8 <== NOT EXECUTED return err; 10f6b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10f6b5: 89 f8 mov %edi,%eax 10f6b7: 8d 65 f4 lea -0xc(%ebp),%esp 10f6ba: 5b pop %ebx 10f6bb: 5e pop %esi 10f6bc: 5f pop %edi 10f6bd: c9 leave 10f6be: c3 ret =============================================================================== 0010cbc6 : bool file_systems_below_this_mountpoint( const char *path __attribute__((unused)), rtems_filesystem_location_info_t *fs_root_loc, rtems_filesystem_mount_table_entry_t *fs_to_unmount __attribute__((unused)) ) { 10cbc6: 55 push %ebp <== NOT EXECUTED 10cbc7: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cbc9: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 10cbcc: a1 5c a9 12 00 mov 0x12a95c,%eax <== NOT EXECUTED 10cbd1: eb 0e jmp 10cbe1 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 10cbd3: 8b 48 18 mov 0x18(%eax),%ecx <== NOT EXECUTED 10cbd6: 3b 4a 10 cmp 0x10(%edx),%ecx <== NOT EXECUTED 10cbd9: 75 04 jne 10cbdf <== NOT EXECUTED 10cbdb: b0 01 mov $0x1,%al <== NOT EXECUTED 10cbdd: eb 0b jmp 10cbea <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 10cbdf: 8b 00 mov (%eax),%eax <== NOT EXECUTED 10cbe1: 3d 60 a9 12 00 cmp $0x12a960,%eax <== NOT EXECUTED 10cbe6: 75 eb jne 10cbd3 <== NOT EXECUTED 10cbe8: 31 c0 xor %eax,%eax <== NOT EXECUTED return true; } } return false; } 10cbea: c9 leave <== NOT EXECUTED 10cbeb: c3 ret <== NOT EXECUTED =============================================================================== 001080ec : long fpathconf( int fd, int name ) { 1080ec: 55 push %ebp 1080ed: 89 e5 mov %esp,%ebp 1080ef: 83 ec 08 sub $0x8,%esp 1080f2: 8b 45 08 mov 0x8(%ebp),%eax 1080f5: 8b 55 0c mov 0xc(%ebp),%edx long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 1080f8: 3b 05 44 21 12 00 cmp 0x122144,%eax 1080fe: 73 11 jae 108111 iop = rtems_libio_iop(fd); 108100: c1 e0 06 shl $0x6,%eax 108103: 03 05 20 60 12 00 add 0x126020,%eax rtems_libio_check_is_open(iop); 108109: 8b 48 14 mov 0x14(%eax),%ecx 10810c: f6 c5 01 test $0x1,%ch 10810f: 75 0d jne 10811e <== ALWAYS TAKEN 108111: e8 a6 a3 00 00 call 1124bc <__errno> 108116: c7 00 09 00 00 00 movl $0x9,(%eax) 10811c: eb 5b jmp 108179 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 10811e: 80 e1 02 and $0x2,%cl 108121: 74 4b je 10816e <== NEVER TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 108123: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 108126: 83 fa 0b cmp $0xb,%edx 108129: 77 43 ja 10816e 10812b: ff 24 95 00 06 12 00 jmp *0x120600(,%edx,4) case _PC_LINK_MAX: return_value = the_limits->link_max; 108132: 8b 40 38 mov 0x38(%eax),%eax break; 108135: eb 45 jmp 10817c case _PC_MAX_CANON: return_value = the_limits->max_canon; 108137: 8b 40 3c mov 0x3c(%eax),%eax break; 10813a: eb 40 jmp 10817c case _PC_MAX_INPUT: return_value = the_limits->max_input; 10813c: 8b 40 40 mov 0x40(%eax),%eax break; 10813f: eb 3b jmp 10817c case _PC_NAME_MAX: return_value = the_limits->name_max; 108141: 8b 40 44 mov 0x44(%eax),%eax break; 108144: eb 36 jmp 10817c case _PC_PATH_MAX: return_value = the_limits->path_max; 108146: 8b 40 48 mov 0x48(%eax),%eax break; 108149: eb 31 jmp 10817c case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 10814b: 8b 40 4c mov 0x4c(%eax),%eax break; 10814e: eb 2c jmp 10817c case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 108150: 8b 40 54 mov 0x54(%eax),%eax break; 108153: eb 27 jmp 10817c case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 108155: 8b 40 58 mov 0x58(%eax),%eax break; 108158: eb 22 jmp 10817c case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 10815a: 8b 40 64 mov 0x64(%eax),%eax break; 10815d: eb 1d jmp 10817c case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 10815f: 8b 40 50 mov 0x50(%eax),%eax break; 108162: eb 18 jmp 10817c case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 108164: 8b 40 5c mov 0x5c(%eax),%eax break; 108167: eb 13 jmp 10817c case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 108169: 8b 40 60 mov 0x60(%eax),%eax break; 10816c: eb 0e jmp 10817c default: rtems_set_errno_and_return_minus_one( EINVAL ); 10816e: e8 49 a3 00 00 call 1124bc <__errno> 108173: c7 00 16 00 00 00 movl $0x16,(%eax) 108179: 83 c8 ff or $0xffffffff,%eax break; } return return_value; } 10817c: c9 leave 10817d: c3 ret =============================================================================== 001071f0 : void free( void *ptr ) { MSBUMP(free_calls, 1); 1071f0: 55 push %ebp 1071f1: 89 e5 mov %esp,%ebp 1071f3: 53 push %ebx 1071f4: 83 ec 04 sub $0x4,%esp 1071f7: 8b 5d 08 mov 0x8(%ebp),%ebx 1071fa: ff 05 1c 39 12 00 incl 0x12391c if ( !ptr ) 107200: 85 db test %ebx,%ebx 107202: 74 5f je 107263 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 107204: 83 3d ec 3b 12 00 03 cmpl $0x3,0x123bec 10720b: 75 15 jne 107222 <== NEVER TAKEN 10720d: e8 e2 00 00 00 call 1072f4 107212: 84 c0 test %al,%al 107214: 75 0c jne 107222 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 107216: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 107219: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10721c: c9 leave <== NOT EXECUTED * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 10721d: e9 10 01 00 00 jmp 107332 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 107222: a1 b0 1d 12 00 mov 0x121db0,%eax 107227: 85 c0 test %eax,%eax 107229: 74 0a je 107235 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 10722b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10722e: 53 push %ebx <== NOT EXECUTED 10722f: ff 50 08 call *0x8(%eax) <== NOT EXECUTED 107232: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 107235: 50 push %eax 107236: 50 push %eax 107237: 53 push %ebx 107238: ff 35 30 fa 11 00 pushl 0x11fa30 10723e: e8 69 44 00 00 call 10b6ac <_Protected_heap_Free> 107243: 83 c4 10 add $0x10,%esp 107246: 84 c0 test %al,%al 107248: 75 19 jne 107263 <== ALWAYS TAKEN printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 10724a: a1 30 fa 11 00 mov 0x11fa30,%eax <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 10724f: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED 107252: ff 70 18 pushl 0x18(%eax) <== NOT EXECUTED 107255: 53 push %ebx <== NOT EXECUTED 107256: 68 21 d6 11 00 push $0x11d621 <== NOT EXECUTED 10725b: e8 94 0b 00 00 call 107df4 <== NOT EXECUTED 107260: 83 c4 10 add $0x10,%esp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 107263: 8b 5d fc mov -0x4(%ebp),%ebx 107266: c9 leave 107267: c3 ret =============================================================================== 001088a4 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 1088a4: 55 push %ebp <== NOT EXECUTED 1088a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1088a7: 53 push %ebx <== NOT EXECUTED 1088a8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 1088ab: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 1088ae: 81 fb 1c 59 12 00 cmp $0x12591c,%ebx <== NOT EXECUTED 1088b4: 74 40 je 1088f6 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 1088b6: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 1088b9: 85 c0 test %eax,%eax <== NOT EXECUTED 1088bb: 74 13 je 1088d0 <== NOT EXECUTED 1088bd: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1088c0: 85 c0 test %eax,%eax <== NOT EXECUTED 1088c2: 74 0c je 1088d0 <== NOT EXECUTED 1088c4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1088c7: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED 1088ca: 52 push %edx <== NOT EXECUTED 1088cb: ff d0 call *%eax <== NOT EXECUTED 1088cd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 1088d0: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 1088d3: 85 c0 test %eax,%eax <== NOT EXECUTED 1088d5: 74 13 je 1088ea <== NOT EXECUTED 1088d7: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1088da: 85 c0 test %eax,%eax <== NOT EXECUTED 1088dc: 74 0c je 1088ea <== NOT EXECUTED 1088de: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1088e1: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED 1088e4: 52 push %edx <== NOT EXECUTED 1088e5: ff d0 call *%eax <== NOT EXECUTED 1088e7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(env); 1088ea: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 1088ed: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1088f0: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 1088f1: e9 12 f1 ff ff jmp 107a08 <== NOT EXECUTED } } 1088f6: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1088f9: c9 leave <== NOT EXECUTED 1088fa: c3 ret <== NOT EXECUTED =============================================================================== 0011b620 : int fstat( int fd, struct stat *sbuf ) { 11b620: 55 push %ebp 11b621: 89 e5 mov %esp,%ebp 11b623: 57 push %edi 11b624: 53 push %ebx 11b625: 8b 55 08 mov 0x8(%ebp),%edx 11b628: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11b62b: 85 db test %ebx,%ebx 11b62d: 75 0d jne 11b63c rtems_set_errno_and_return_minus_one( EFAULT ); 11b62f: e8 30 4d ff ff call 110364 <__errno> 11b634: c7 00 0e 00 00 00 movl $0xe,(%eax) 11b63a: eb 5d jmp 11b699 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11b63c: 3b 15 24 fa 11 00 cmp 0x11fa24,%edx 11b642: 73 16 jae 11b65a 11b644: c1 e2 06 shl $0x6,%edx 11b647: 03 15 f8 38 12 00 add 0x1238f8,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11b64d: f6 42 15 01 testb $0x1,0x15(%edx) 11b651: 74 07 je 11b65a <== NEVER TAKEN if ( !iop->handlers ) 11b653: 8b 42 3c mov 0x3c(%edx),%eax 11b656: 85 c0 test %eax,%eax 11b658: 75 0d jne 11b667 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 11b65a: e8 05 4d ff ff call 110364 <__errno> 11b65f: c7 00 09 00 00 00 movl $0x9,(%eax) 11b665: eb 32 jmp 11b699 if ( !iop->handlers->fstat_h ) 11b667: 83 78 18 00 cmpl $0x0,0x18(%eax) 11b66b: 75 0d jne 11b67a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11b66d: e8 f2 4c ff ff call 110364 <__errno> <== NOT EXECUTED 11b672: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11b678: eb 1f jmp 11b699 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11b67a: b9 12 00 00 00 mov $0x12,%ecx 11b67f: 31 c0 xor %eax,%eax 11b681: 89 df mov %ebx,%edi 11b683: f3 ab rep stos %eax,%es:(%edi) return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 11b685: 8b 42 3c mov 0x3c(%edx),%eax 11b688: 89 5d 0c mov %ebx,0xc(%ebp) 11b68b: 83 c2 18 add $0x18,%edx 11b68e: 89 55 08 mov %edx,0x8(%ebp) 11b691: 8b 40 18 mov 0x18(%eax),%eax } 11b694: 5b pop %ebx 11b695: 5f pop %edi 11b696: 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 ); 11b697: ff e0 jmp *%eax } 11b699: 83 c8 ff or $0xffffffff,%eax 11b69c: 5b pop %ebx 11b69d: 5f pop %edi 11b69e: c9 leave 11b69f: c3 ret =============================================================================== 00108290 : #include int fsync( int fd ) { 108290: 55 push %ebp 108291: 89 e5 mov %esp,%ebp 108293: 83 ec 08 sub $0x8,%esp 108296: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108299: 3b 05 44 21 12 00 cmp 0x122144,%eax 10829f: 73 2a jae 1082cb <== NEVER TAKEN iop = rtems_libio_iop( fd ); 1082a1: c1 e0 06 shl $0x6,%eax 1082a4: 03 05 20 60 12 00 add 0x126020,%eax rtems_libio_check_is_open(iop); 1082aa: 8b 50 14 mov 0x14(%eax),%edx 1082ad: f6 c6 01 test $0x1,%dh 1082b0: 74 19 je 1082cb <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1082b2: 80 e2 04 and $0x4,%dl 1082b5: 75 0d jne 1082c4 1082b7: e8 00 a2 00 00 call 1124bc <__errno> 1082bc: c7 00 16 00 00 00 movl $0x16,(%eax) 1082c2: eb 2e jmp 1082f2 /* * Now process the fsync(). */ if ( !iop->handlers ) 1082c4: 8b 50 3c mov 0x3c(%eax),%edx 1082c7: 85 d2 test %edx,%edx 1082c9: 75 0d jne 1082d8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 1082cb: e8 ec a1 00 00 call 1124bc <__errno> <== NOT EXECUTED 1082d0: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 1082d6: eb 1a jmp 1082f2 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 1082d8: 8b 52 28 mov 0x28(%edx),%edx 1082db: 85 d2 test %edx,%edx 1082dd: 75 0d jne 1082ec rtems_set_errno_and_return_minus_one( ENOTSUP ); 1082df: e8 d8 a1 00 00 call 1124bc <__errno> 1082e4: c7 00 86 00 00 00 movl $0x86,(%eax) 1082ea: eb 06 jmp 1082f2 return (*iop->handlers->fsync_h)( iop ); 1082ec: 89 45 08 mov %eax,0x8(%ebp) } 1082ef: c9 leave rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 1082f0: ff e2 jmp *%edx } 1082f2: 83 c8 ff or $0xffffffff,%eax 1082f5: c9 leave 1082f6: c3 ret =============================================================================== 0010dc50 : int ftruncate( int fd, off_t length ) { 10dc50: 55 push %ebp 10dc51: 89 e5 mov %esp,%ebp 10dc53: 57 push %edi 10dc54: 56 push %esi 10dc55: 53 push %ebx 10dc56: 83 ec 3c sub $0x3c,%esp 10dc59: 8b 5d 08 mov 0x8(%ebp),%ebx 10dc5c: 8b 45 0c mov 0xc(%ebp),%eax 10dc5f: 8b 55 10 mov 0x10(%ebp),%edx 10dc62: 89 45 c0 mov %eax,-0x40(%ebp) 10dc65: 89 55 c4 mov %edx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 10dc68: 3b 1d 24 fa 11 00 cmp 0x11fa24,%ebx 10dc6e: 73 0f jae 10dc7f <== NEVER TAKEN iop = rtems_libio_iop( fd ); 10dc70: c1 e3 06 shl $0x6,%ebx 10dc73: 03 1d f8 38 12 00 add 0x1238f8,%ebx rtems_libio_check_is_open(iop); 10dc79: f6 43 15 01 testb $0x1,0x15(%ebx) 10dc7d: 75 0d jne 10dc8c <== ALWAYS TAKEN 10dc7f: e8 e0 26 00 00 call 110364 <__errno> <== NOT EXECUTED 10dc84: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10dc8a: eb 5b jmp 10dce7 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 10dc8c: 8d 7d d4 lea -0x2c(%ebp),%edi 10dc8f: 8d 73 18 lea 0x18(%ebx),%esi 10dc92: b9 05 00 00 00 mov $0x5,%ecx 10dc97: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 10dc99: 8b 45 e0 mov -0x20(%ebp),%eax 10dc9c: 8b 40 10 mov 0x10(%eax),%eax 10dc9f: 85 c0 test %eax,%eax 10dca1: 74 39 je 10dcdc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 10dca3: 83 ec 0c sub $0xc,%esp 10dca6: 8d 55 d4 lea -0x2c(%ebp),%edx 10dca9: 52 push %edx 10dcaa: ff d0 call *%eax 10dcac: 83 c4 10 add $0x10,%esp 10dcaf: 48 dec %eax 10dcb0: 75 0d jne 10dcbf rtems_set_errno_and_return_minus_one( EISDIR ); 10dcb2: e8 ad 26 00 00 call 110364 <__errno> 10dcb7: c7 00 15 00 00 00 movl $0x15,(%eax) 10dcbd: eb 28 jmp 10dce7 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10dcbf: f6 43 14 04 testb $0x4,0x14(%ebx) 10dcc3: 75 0d jne 10dcd2 <== ALWAYS TAKEN 10dcc5: e8 9a 26 00 00 call 110364 <__errno> <== NOT EXECUTED 10dcca: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10dcd0: eb 15 jmp 10dce7 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 10dcd2: 8b 43 3c mov 0x3c(%ebx),%eax 10dcd5: 8b 40 20 mov 0x20(%eax),%eax 10dcd8: 85 c0 test %eax,%eax 10dcda: 75 10 jne 10dcec <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10dcdc: e8 83 26 00 00 call 110364 <__errno> <== NOT EXECUTED 10dce1: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10dce7: 83 c8 ff or $0xffffffff,%eax 10dcea: eb 0d jmp 10dcf9 return (*iop->handlers->ftruncate_h)( iop, length ); 10dcec: 52 push %edx 10dced: ff 75 c4 pushl -0x3c(%ebp) 10dcf0: ff 75 c0 pushl -0x40(%ebp) 10dcf3: 53 push %ebx 10dcf4: ff d0 call *%eax 10dcf6: 83 c4 10 add $0x10,%esp } 10dcf9: 8d 65 f4 lea -0xc(%ebp),%esp 10dcfc: 5b pop %ebx 10dcfd: 5e pop %esi 10dcfe: 5f pop %edi 10dcff: c9 leave 10dd00: c3 ret =============================================================================== 0011e6a4 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 11e6a4: 55 push %ebp 11e6a5: 89 e5 mov %esp,%ebp 11e6a7: 57 push %edi 11e6a8: 56 push %esi 11e6a9: 53 push %ebx 11e6aa: 83 ec 2c sub $0x2c,%esp 11e6ad: 8b 45 08 mov 0x8(%ebp),%eax /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 11e6b0: 31 db xor %ebx,%ebx 11e6b2: 3b 05 44 31 12 00 cmp 0x123144,%eax 11e6b8: 73 0b jae 11e6c5 <== NEVER TAKEN 11e6ba: 89 c3 mov %eax,%ebx 11e6bc: c1 e3 06 shl $0x6,%ebx 11e6bf: 03 1d 60 71 12 00 add 0x127160,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 11e6c5: 8d 7d d4 lea -0x2c(%ebp),%edi 11e6c8: 8d 73 18 lea 0x18(%ebx),%esi 11e6cb: b9 05 00 00 00 mov $0x5,%ecx 11e6d0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 11e6d2: 8b 45 e0 mov -0x20(%ebp),%eax 11e6d5: 8b 40 10 mov 0x10(%eax),%eax 11e6d8: 85 c0 test %eax,%eax 11e6da: 74 29 je 11e705 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 11e6dc: 83 ec 0c sub $0xc,%esp 11e6df: 8d 55 d4 lea -0x2c(%ebp),%edx 11e6e2: 52 push %edx 11e6e3: ff d0 call *%eax 11e6e5: 83 c4 10 add $0x10,%esp 11e6e8: 48 dec %eax 11e6e9: 74 10 je 11e6fb rtems_set_errno_and_return_minus_one( ENOTDIR ); 11e6eb: e8 cc 40 ff ff call 1127bc <__errno> 11e6f0: c7 00 14 00 00 00 movl $0x14,(%eax) 11e6f6: 83 c8 ff or $0xffffffff,%eax 11e6f9: eb 24 jmp 11e71f /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 11e6fb: 8b 43 3c mov 0x3c(%ebx),%eax 11e6fe: 8b 40 08 mov 0x8(%eax),%eax 11e701: 85 c0 test %eax,%eax 11e703: 75 0d jne 11e712 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11e705: e8 b2 40 ff ff call 1127bc <__errno> <== NOT EXECUTED 11e70a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11e710: eb e4 jmp 11e6f6 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 11e712: 52 push %edx 11e713: ff 75 10 pushl 0x10(%ebp) 11e716: ff 75 0c pushl 0xc(%ebp) 11e719: 53 push %ebx 11e71a: ff d0 call *%eax 11e71c: 83 c4 10 add $0x10,%esp } 11e71f: 8d 65 f4 lea -0xc(%ebp),%esp 11e722: 5b pop %ebx 11e723: 5e pop %esi 11e724: 5f pop %edi 11e725: c9 leave 11e726: c3 ret =============================================================================== 00107d4e : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 107d4e: 55 push %ebp 107d4f: 89 e5 mov %esp,%ebp 107d51: 57 push %edi 107d52: 56 push %esi 107d53: 53 push %ebx 107d54: 83 ec 1c sub $0x1c,%esp 107d57: 89 c7 mov %eax,%edi 107d59: 89 55 e4 mov %edx,-0x1c(%ebp) 107d5c: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 107d5e: e8 df fe ff ff call 107c42 if ((fp = fopen("/etc/group", "r")) == NULL) { 107d63: 53 push %ebx 107d64: 53 push %ebx 107d65: 68 53 ed 11 00 push $0x11ed53 107d6a: 68 77 00 12 00 push $0x120077 107d6f: e8 2c a9 00 00 call 1126a0 107d74: 89 c3 mov %eax,%ebx 107d76: 83 c4 10 add $0x10,%esp 107d79: 85 c0 test %eax,%eax 107d7b: 75 10 jne 107d8d <== ALWAYS TAKEN errno = EINVAL; 107d7d: e8 6e a1 00 00 call 111ef0 <__errno> <== NOT EXECUTED 107d82: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107d88: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 107d8b: eb 6b jmp 107df8 <== NOT EXECUTED } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 107d8d: 83 ec 0c sub $0xc,%esp 107d90: ff 75 0c pushl 0xc(%ebp) 107d93: 8b 4d 08 mov 0x8(%ebp),%ecx 107d96: 89 f2 mov %esi,%edx 107d98: 89 d8 mov %ebx,%eax 107d9a: e8 39 fc ff ff call 1079d8 107d9f: 83 c4 10 add $0x10,%esp 107da2: 85 c0 test %eax,%eax 107da4: 75 19 jne 107dbf <== ALWAYS TAKEN errno = EINVAL; 107da6: e8 45 a1 00 00 call 111ef0 <__errno> <== NOT EXECUTED 107dab: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 107db1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107db4: 53 push %ebx <== NOT EXECUTED 107db5: e8 82 a2 00 00 call 11203c <== NOT EXECUTED 107dba: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107dbd: eb 36 jmp 107df5 <== NOT EXECUTED return -1; } if (name) { 107dbf: 85 ff test %edi,%edi 107dc1: 74 11 je 107dd4 <== NEVER TAKEN match = (strcmp(grp->gr_name, name) == 0); 107dc3: 51 push %ecx 107dc4: 51 push %ecx 107dc5: 57 push %edi 107dc6: ff 36 pushl (%esi) 107dc8: e8 93 bc 00 00 call 113a60 107dcd: 83 c4 10 add $0x10,%esp 107dd0: 85 c0 test %eax,%eax 107dd2: eb 07 jmp 107ddb } else { match = (grp->gr_gid == gid); 107dd4: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 107dd8: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 107ddb: 0f 94 c0 sete %al 107dde: 0f b6 c0 movzbl %al,%eax } if (match) { 107de1: 85 c0 test %eax,%eax 107de3: 74 a8 je 107d8d fclose(fp); 107de5: 83 ec 0c sub $0xc,%esp 107de8: 53 push %ebx 107de9: e8 4e a2 00 00 call 11203c *result = grp; 107dee: 8b 45 10 mov 0x10(%ebp),%eax 107df1: 89 30 mov %esi,(%eax) 107df3: 31 c0 xor %eax,%eax return 0; 107df5: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 107df8: 8d 65 f4 lea -0xc(%ebp),%esp 107dfb: 5b pop %ebx 107dfc: 5e pop %esi 107dfd: 5f pop %edi 107dfe: c9 leave 107dff: c3 ret =============================================================================== 00107ad7 : return NULL; return p; } struct group *getgrent(void) { 107ad7: 55 push %ebp <== NOT EXECUTED 107ad8: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107ada: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp == NULL) 107add: a1 40 63 12 00 mov 0x126340,%eax <== NOT EXECUTED 107ae2: 85 c0 test %eax,%eax <== NOT EXECUTED 107ae4: 74 25 je 107b0b <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 107ae6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107ae9: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 107aee: b9 44 63 12 00 mov $0x126344,%ecx <== NOT EXECUTED 107af3: ba 0c 64 12 00 mov $0x12640c,%edx <== NOT EXECUTED 107af8: e8 db fe ff ff call 1079d8 <== NOT EXECUTED 107afd: 89 c2 mov %eax,%edx <== NOT EXECUTED 107aff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107b02: b8 0c 64 12 00 mov $0x12640c,%eax <== NOT EXECUTED 107b07: 85 d2 test %edx,%edx <== NOT EXECUTED 107b09: 75 02 jne 107b0d <== NOT EXECUTED 107b0b: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &grent; } 107b0d: c9 leave <== NOT EXECUTED 107b0e: c3 ret <== NOT EXECUTED =============================================================================== 00107e2a : } struct group *getgrgid( gid_t gid ) { 107e2a: 55 push %ebp <== NOT EXECUTED 107e2b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107e2d: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 107e30: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 107e33: 50 push %eax <== NOT EXECUTED 107e34: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 107e39: 68 44 63 12 00 push $0x126344 <== NOT EXECUTED 107e3e: 68 0c 64 12 00 push $0x12640c <== NOT EXECUTED 107e43: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 107e47: 50 push %eax <== NOT EXECUTED 107e48: e8 b3 ff ff ff call 107e00 <== NOT EXECUTED 107e4d: 89 c2 mov %eax,%edx <== NOT EXECUTED 107e4f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107e52: 31 c0 xor %eax,%eax <== NOT EXECUTED 107e54: 85 d2 test %edx,%edx <== NOT EXECUTED 107e56: 75 03 jne 107e5b <== NOT EXECUTED return NULL; return p; 107e58: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 107e5b: c9 leave <== NOT EXECUTED 107e5c: c3 ret <== NOT EXECUTED =============================================================================== 00107e00 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 107e00: 55 push %ebp <== NOT EXECUTED 107e01: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107e03: 53 push %ebx <== NOT EXECUTED 107e04: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 107e07: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107e0a: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 107e0d: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 107e11: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 107e14: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 107e17: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 107e1a: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 107e1d: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 107e20: 31 c0 xor %eax,%eax <== NOT EXECUTED } 107e22: 5b pop %ebx <== NOT EXECUTED 107e23: 5b pop %ebx <== NOT EXECUTED 107e24: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 107e25: e9 24 ff ff ff jmp 107d4e <== NOT EXECUTED =============================================================================== 00107e86 : } struct group *getgrnam( const char *name ) { 107e86: 55 push %ebp 107e87: 89 e5 mov %esp,%ebp 107e89: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 107e8c: 8d 45 f4 lea -0xc(%ebp),%eax 107e8f: 50 push %eax 107e90: 68 c8 00 00 00 push $0xc8 107e95: 68 44 63 12 00 push $0x126344 107e9a: 68 0c 64 12 00 push $0x12640c 107e9f: ff 75 08 pushl 0x8(%ebp) 107ea2: e8 b6 ff ff ff call 107e5d 107ea7: 89 c2 mov %eax,%edx 107ea9: 83 c4 20 add $0x20,%esp 107eac: 31 c0 xor %eax,%eax 107eae: 85 d2 test %edx,%edx 107eb0: 75 03 jne 107eb5 <== NEVER TAKEN return NULL; return p; 107eb2: 8b 45 f4 mov -0xc(%ebp),%eax } 107eb5: c9 leave 107eb6: c3 ret =============================================================================== 00121938 : * * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83 */ pid_t getpid( void ) { 121938: 55 push %ebp <== NOT EXECUTED 121939: 89 e5 mov %esp,%ebp <== NOT EXECUTED return _Objects_Local_node; } 12193b: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 121940: c9 leave <== NOT EXECUTED 121941: c3 ret <== NOT EXECUTED =============================================================================== 00107ef2 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 107ef2: 55 push %ebp 107ef3: 89 e5 mov %esp,%ebp 107ef5: 57 push %edi 107ef6: 56 push %esi 107ef7: 53 push %ebx 107ef8: 83 ec 1c sub $0x1c,%esp 107efb: 89 c7 mov %eax,%edi 107efd: 89 55 e4 mov %edx,-0x1c(%ebp) 107f00: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 107f02: e8 3b fd ff ff call 107c42 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 107f07: 51 push %ecx 107f08: 51 push %ecx 107f09: 68 53 ed 11 00 push $0x11ed53 107f0e: 68 04 00 12 00 push $0x120004 107f13: e8 88 a7 00 00 call 1126a0 107f18: 89 c3 mov %eax,%ebx 107f1a: 83 c4 10 add $0x10,%esp 107f1d: 85 c0 test %eax,%eax 107f1f: 75 10 jne 107f31 <== ALWAYS TAKEN errno = EINVAL; 107f21: e8 ca 9f 00 00 call 111ef0 <__errno> <== NOT EXECUTED 107f26: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107f2c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 107f2f: eb 6b jmp 107f9c <== NOT EXECUTED } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 107f31: 83 ec 0c sub $0xc,%esp 107f34: ff 75 0c pushl 0xc(%ebp) 107f37: 8b 4d 08 mov 0x8(%ebp),%ecx 107f3a: 89 f2 mov %esi,%edx 107f3c: 89 d8 mov %ebx,%eax 107f3e: e8 cc fb ff ff call 107b0f 107f43: 83 c4 10 add $0x10,%esp 107f46: 85 c0 test %eax,%eax 107f48: 75 19 jne 107f63 <== ALWAYS TAKEN errno = EINVAL; 107f4a: e8 a1 9f 00 00 call 111ef0 <__errno> <== NOT EXECUTED 107f4f: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 107f55: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107f58: 53 push %ebx <== NOT EXECUTED 107f59: e8 de a0 00 00 call 11203c <== NOT EXECUTED 107f5e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107f61: eb 36 jmp 107f99 <== NOT EXECUTED return -1; } if (name) { 107f63: 85 ff test %edi,%edi 107f65: 74 11 je 107f78 <== NEVER TAKEN match = (strcmp(pwd->pw_name, name) == 0); 107f67: 52 push %edx 107f68: 52 push %edx 107f69: 57 push %edi 107f6a: ff 36 pushl (%esi) 107f6c: e8 ef ba 00 00 call 113a60 107f71: 83 c4 10 add $0x10,%esp 107f74: 85 c0 test %eax,%eax 107f76: eb 07 jmp 107f7f } else { match = (pwd->pw_uid == uid); 107f78: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 107f7c: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 107f7f: 0f 94 c0 sete %al 107f82: 0f b6 c0 movzbl %al,%eax } if (match) { 107f85: 85 c0 test %eax,%eax 107f87: 74 a8 je 107f31 fclose(fp); 107f89: 83 ec 0c sub $0xc,%esp 107f8c: 53 push %ebx 107f8d: e8 aa a0 00 00 call 11203c *result = pwd; 107f92: 8b 45 10 mov 0x10(%ebp),%eax 107f95: 89 30 mov %esi,(%eax) 107f97: 31 c0 xor %eax,%eax return 0; 107f99: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 107f9c: 8d 65 f4 lea -0xc(%ebp),%esp 107f9f: 5b pop %ebx 107fa0: 5e pop %esi 107fa1: 5f pop %edi 107fa2: c9 leave 107fa3: c3 ret =============================================================================== 00107c0a : return NULL; return p; } struct passwd *getpwent(void) { 107c0a: 55 push %ebp <== NOT EXECUTED 107c0b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107c0d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp == NULL) 107c10: a1 58 62 12 00 mov 0x126258,%eax <== NOT EXECUTED 107c15: 85 c0 test %eax,%eax <== NOT EXECUTED 107c17: 74 25 je 107c3e <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 107c19: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107c1c: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 107c21: b9 5c 62 12 00 mov $0x12625c,%ecx <== NOT EXECUTED 107c26: ba 24 63 12 00 mov $0x126324,%edx <== NOT EXECUTED 107c2b: e8 df fe ff ff call 107b0f <== NOT EXECUTED 107c30: 89 c2 mov %eax,%edx <== NOT EXECUTED 107c32: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107c35: b8 24 63 12 00 mov $0x126324,%eax <== NOT EXECUTED 107c3a: 85 d2 test %edx,%edx <== NOT EXECUTED 107c3c: 75 02 jne 107c40 <== NOT EXECUTED 107c3e: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &pwent; } 107c40: c9 leave <== NOT EXECUTED 107c41: c3 ret <== NOT EXECUTED =============================================================================== 0010802a : } struct passwd *getpwnam( const char *name ) { 10802a: 55 push %ebp 10802b: 89 e5 mov %esp,%ebp 10802d: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 108030: 8d 45 f4 lea -0xc(%ebp),%eax 108033: 50 push %eax 108034: 68 c8 00 00 00 push $0xc8 108039: 68 5c 62 12 00 push $0x12625c 10803e: 68 24 63 12 00 push $0x126324 108043: ff 75 08 pushl 0x8(%ebp) 108046: e8 b6 ff ff ff call 108001 10804b: 89 c2 mov %eax,%edx 10804d: 83 c4 20 add $0x20,%esp 108050: 31 c0 xor %eax,%eax 108052: 85 d2 test %edx,%edx 108054: 75 03 jne 108059 <== NEVER TAKEN return NULL; return p; 108056: 8b 45 f4 mov -0xc(%ebp),%eax } 108059: c9 leave 10805a: c3 ret =============================================================================== 00107fce : } struct passwd *getpwuid( uid_t uid ) { 107fce: 55 push %ebp <== NOT EXECUTED 107fcf: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107fd1: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 107fd4: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 107fd7: 50 push %eax <== NOT EXECUTED 107fd8: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 107fdd: 68 5c 62 12 00 push $0x12625c <== NOT EXECUTED 107fe2: 68 24 63 12 00 push $0x126324 <== NOT EXECUTED 107fe7: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 107feb: 50 push %eax <== NOT EXECUTED 107fec: e8 b3 ff ff ff call 107fa4 <== NOT EXECUTED 107ff1: 89 c2 mov %eax,%edx <== NOT EXECUTED 107ff3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107ff6: 31 c0 xor %eax,%eax <== NOT EXECUTED 107ff8: 85 d2 test %edx,%edx <== NOT EXECUTED 107ffa: 75 03 jne 107fff <== NOT EXECUTED return NULL; return p; 107ffc: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 107fff: c9 leave <== NOT EXECUTED 108000: c3 ret <== NOT EXECUTED =============================================================================== 00107fa4 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 107fa4: 55 push %ebp <== NOT EXECUTED 107fa5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107fa7: 53 push %ebx <== NOT EXECUTED 107fa8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 107fab: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107fae: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 107fb1: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 107fb5: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 107fb8: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 107fbb: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 107fbe: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 107fc1: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 107fc4: 31 c0 xor %eax,%eax <== NOT EXECUTED } 107fc6: 5b pop %ebx <== NOT EXECUTED 107fc7: 5b pop %ebx <== NOT EXECUTED 107fc8: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 107fc9: e9 24 ff ff ff jmp 107ef2 <== NOT EXECUTED =============================================================================== 0010dd04 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 10dd04: 55 push %ebp 10dd05: 89 e5 mov %esp,%ebp 10dd07: 56 push %esi 10dd08: 53 push %ebx 10dd09: 83 ec 10 sub $0x10,%esp 10dd0c: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 10dd0f: 85 db test %ebx,%ebx 10dd11: 75 10 jne 10dd23 <== ALWAYS TAKEN errno = EFAULT; 10dd13: e8 4c 26 00 00 call 110364 <__errno> <== NOT EXECUTED 10dd18: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10dd1e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 10dd21: eb 29 jmp 10dd4c <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10dd23: 9c pushf 10dd24: fa cli 10dd25: 5e pop %esi _TOD_Get( &now ); 10dd26: 83 ec 0c sub $0xc,%esp 10dd29: 8d 45 f0 lea -0x10(%ebp),%eax 10dd2c: 50 push %eax 10dd2d: e8 0e 08 00 00 call 10e540 <_TOD_Get> _ISR_Enable(level); 10dd32: 56 push %esi 10dd33: 9d popf useconds = (suseconds_t)now.tv_nsec; 10dd34: 8b 45 f4 mov -0xc(%ebp),%eax useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10dd37: 8b 55 f0 mov -0x10(%ebp),%edx 10dd3a: 89 13 mov %edx,(%ebx) time->tv_usec = useconds; 10dd3c: b9 e8 03 00 00 mov $0x3e8,%ecx 10dd41: 99 cltd 10dd42: f7 f9 idiv %ecx 10dd44: 89 43 04 mov %eax,0x4(%ebx) 10dd47: 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; 10dd49: 83 c4 10 add $0x10,%esp } 10dd4c: 8d 65 f8 lea -0x8(%ebp),%esp 10dd4f: 5b pop %ebx 10dd50: 5e pop %esi 10dd51: c9 leave 10dd52: c3 ret =============================================================================== 001144b0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 1144b0: 55 push %ebp 1144b1: 89 e5 mov %esp,%ebp 1144b3: 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; 1144b6: 8b 4a 38 mov 0x38(%edx),%ecx 1144b9: 83 c8 ff or $0xffffffff,%eax 1144bc: 83 79 4c 01 cmpl $0x1,0x4c(%ecx) 1144c0: 75 10 jne 1144d2 <== NEVER TAKEN if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 1144c2: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) 1144c9: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 1144d0: 31 c0 xor %eax,%eax return 0; } 1144d2: c9 leave 1144d3: c3 ret =============================================================================== 001145d4 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 1145d4: 55 push %ebp 1145d5: 89 e5 mov %esp,%ebp 1145d7: 56 push %esi 1145d8: 53 push %ebx 1145d9: 83 ec 10 sub $0x10,%esp 1145dc: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 1145df: 8b 1e mov (%esi),%ebx 1145e1: 8d 43 54 lea 0x54(%ebx),%eax 1145e4: 39 43 50 cmp %eax,0x50(%ebx) 1145e7: 74 0d je 1145f6 /* * 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 ); 1145e9: e8 a2 05 00 00 call 114b90 <__errno> 1145ee: c7 00 5a 00 00 00 movl $0x5a,(%eax) 1145f4: eb 19 jmp 11460f /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 1145f6: 8b 46 10 mov 0x10(%esi),%eax 1145f9: 39 58 1c cmp %ebx,0x1c(%eax) 1145fc: 74 06 je 114604 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 1145fe: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 114602: 74 10 je 114614 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); 114604: e8 87 05 00 00 call 114b90 <__errno> 114609: c7 00 10 00 00 00 movl $0x10,(%eax) 11460f: 83 c8 ff or $0xffffffff,%eax 114612: eb 6b jmp 11467f /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 114614: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 114618: 74 13 je 11462d 11461a: 83 ec 0c sub $0xc,%esp 11461d: 53 push %ebx 11461e: e8 49 78 ff ff call 10be6c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 114623: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 11462a: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 11462d: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 114631: 50 push %eax 114632: 50 push %eax 114633: 6a 00 push $0x0 114635: 8d 45 f0 lea -0x10(%ebp),%eax 114638: 50 push %eax 114639: e8 f2 3d ff ff call 108430 11463e: 8b 45 f0 mov -0x10(%ebp),%eax 114641: 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) ) { 114644: 89 1c 24 mov %ebx,(%esp) 114647: e8 26 da ff ff call 112072 11464c: 83 c4 10 add $0x10,%esp 11464f: 85 c0 test %eax,%eax 114651: 75 2a jne 11467d 114653: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 114658: 75 23 jne 11467d /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 11465a: a1 34 64 12 00 mov 0x126434,%eax 11465f: 8b 50 04 mov 0x4(%eax),%edx 114662: 3b 16 cmp (%esi),%edx 114664: 75 07 jne 11466d <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 114666: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 11466d: 83 ec 0c sub $0xc,%esp 114670: 53 push %ebx 114671: e8 42 3d ff ff call 1083b8 114676: 31 c0 xor %eax,%eax 114678: 83 c4 10 add $0x10,%esp 11467b: eb 02 jmp 11467f 11467d: 31 c0 xor %eax,%eax } return 0; } 11467f: 8d 65 f8 lea -0x8(%ebp),%esp 114682: 5b pop %ebx 114683: 5e pop %esi 114684: c9 leave 114685: c3 ret =============================================================================== 00107c42 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 107c42: 55 push %ebp 107c43: 89 e5 mov %esp,%ebp 107c45: 53 push %ebx 107c46: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 107c49: 80 3d 54 62 12 00 00 cmpb $0x0,0x126254 107c50: 0f 85 b8 00 00 00 jne 107d0e return; etc_passwd_initted = 1; 107c56: c6 05 54 62 12 00 01 movb $0x1,0x126254 mkdir("/etc", 0777); 107c5d: 50 push %eax 107c5e: 50 push %eax 107c5f: 68 ff 01 00 00 push $0x1ff 107c64: 68 ff ff 11 00 push $0x11ffff 107c69: e8 ba 06 00 00 call 108328 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 107c6e: 59 pop %ecx 107c6f: 5b pop %ebx 107c70: 68 53 ed 11 00 push $0x11ed53 107c75: 68 04 00 12 00 push $0x120004 107c7a: e8 21 aa 00 00 call 1126a0 107c7f: 83 c4 10 add $0x10,%esp 107c82: 85 c0 test %eax,%eax 107c84: 74 06 je 107c8c <== ALWAYS TAKEN fclose(fp); 107c86: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107c89: 50 push %eax <== NOT EXECUTED 107c8a: eb 2a jmp 107cb6 <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 107c8c: 52 push %edx 107c8d: 52 push %edx 107c8e: 68 5c ec 11 00 push $0x11ec5c 107c93: 68 04 00 12 00 push $0x120004 107c98: e8 03 aa 00 00 call 1126a0 107c9d: 89 c3 mov %eax,%ebx 107c9f: 83 c4 10 add $0x10,%esp 107ca2: 85 c0 test %eax,%eax 107ca4: 74 18 je 107cbe <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 107ca6: 50 push %eax 107ca7: 50 push %eax 107ca8: 53 push %ebx 107ca9: 68 10 00 12 00 push $0x120010 107cae: e8 b9 aa 00 00 call 11276c "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 107cb3: 89 1c 24 mov %ebx,(%esp) 107cb6: e8 81 a3 00 00 call 11203c 107cbb: 83 c4 10 add $0x10,%esp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 107cbe: 51 push %ecx 107cbf: 51 push %ecx 107cc0: 68 53 ed 11 00 push $0x11ed53 107cc5: 68 77 00 12 00 push $0x120077 107cca: e8 d1 a9 00 00 call 1126a0 107ccf: 83 c4 10 add $0x10,%esp 107cd2: 85 c0 test %eax,%eax 107cd4: 74 06 je 107cdc <== ALWAYS TAKEN fclose(fp); 107cd6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107cd9: 50 push %eax <== NOT EXECUTED 107cda: eb 2a jmp 107d06 <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 107cdc: 52 push %edx 107cdd: 52 push %edx 107cde: 68 5c ec 11 00 push $0x11ec5c 107ce3: 68 77 00 12 00 push $0x120077 107ce8: e8 b3 a9 00 00 call 1126a0 107ced: 89 c3 mov %eax,%ebx 107cef: 83 c4 10 add $0x10,%esp 107cf2: 85 c0 test %eax,%eax 107cf4: 74 18 je 107d0e <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 107cf6: 50 push %eax 107cf7: 50 push %eax 107cf8: 53 push %ebx 107cf9: 68 82 00 12 00 push $0x120082 107cfe: e8 69 aa 00 00 call 11276c "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 107d03: 89 1c 24 mov %ebx,(%esp) 107d06: e8 31 a3 00 00 call 11203c 107d0b: 83 c4 10 add $0x10,%esp } } 107d0e: 8b 5d fc mov -0x4(%ebp),%ebx 107d11: c9 leave 107d12: c3 ret =============================================================================== 0010a408 : int ioctl( int fd, ioctl_command_t command, ... ) { 10a408: 55 push %ebp 10a409: 89 e5 mov %esp,%ebp 10a40b: 83 ec 08 sub $0x8,%esp 10a40e: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 10a411: 3b 05 a4 48 12 00 cmp 0x1248a4,%eax 10a417: 73 19 jae 10a432 iop = rtems_libio_iop( fd ); 10a419: c1 e0 06 shl $0x6,%eax 10a41c: 03 05 50 88 12 00 add 0x128850,%eax rtems_libio_check_is_open(iop); 10a422: f6 40 15 01 testb $0x1,0x15(%eax) 10a426: 74 0a je 10a432 <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 10a428: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Now process the ioctl(). */ if ( !iop->handlers ) 10a42b: 8b 50 3c mov 0x3c(%eax),%edx 10a42e: 85 d2 test %edx,%edx 10a430: 75 0d jne 10a43f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 10a432: e8 79 a9 00 00 call 114db0 <__errno> 10a437: c7 00 09 00 00 00 movl $0x9,(%eax) 10a43d: eb 12 jmp 10a451 if ( !iop->handlers->ioctl_h ) 10a43f: 8b 52 10 mov 0x10(%edx),%edx 10a442: 85 d2 test %edx,%edx 10a444: 75 10 jne 10a456 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a446: e8 65 a9 00 00 call 114db0 <__errno> <== NOT EXECUTED 10a44b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10a451: 83 c8 ff or $0xffffffff,%eax 10a454: eb 0d jmp 10a463 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 10a456: 83 ec 04 sub $0x4,%esp 10a459: 51 push %ecx 10a45a: ff 75 0c pushl 0xc(%ebp) 10a45d: 50 push %eax 10a45e: ff d2 call *%edx return rc; 10a460: 83 c4 10 add $0x10,%esp } 10a463: c9 leave 10a464: c3 ret =============================================================================== 00108830 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 108830: 55 push %ebp <== NOT EXECUTED 108831: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108833: 53 push %ebx <== NOT EXECUTED 108834: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 108837: 89 d3 mov %edx,%ebx <== NOT EXECUTED 108839: 88 c1 mov %al,%cl <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 10883b: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED 10883e: a8 20 test $0x20,%al <== NOT EXECUTED 108840: 74 03 je 108845 <== NOT EXECUTED c &= 0x7f; 108842: 83 e1 7f and $0x7f,%ecx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 108845: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 108848: 74 17 je 108861 <== NOT EXECUTED c = tolower (c); 10884a: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED 10884d: 8b 15 a4 18 12 00 mov 0x1218a4,%edx <== NOT EXECUTED 108853: 0f be 54 0a 01 movsbl 0x1(%edx,%ecx,1),%edx <== NOT EXECUTED 108858: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 10885b: 4a dec %edx <== NOT EXECUTED 10885c: 75 03 jne 108861 <== NOT EXECUTED 10885e: 83 c1 20 add $0x20,%ecx <== NOT EXECUTED if (c == '\r') { 108861: 80 f9 0d cmp $0xd,%cl <== NOT EXECUTED 108864: 75 11 jne 108877 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 108866: 84 c0 test %al,%al <== NOT EXECUTED 108868: 0f 88 d3 00 00 00 js 108941 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 10886e: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 108871: 74 19 je 10888c <== NOT EXECUTED 108873: b1 0a mov $0xa,%cl <== NOT EXECUTED 108875: eb 15 jmp 10888c <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 108877: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED 10887a: 75 08 jne 108884 <== NOT EXECUTED 10887c: a8 40 test $0x40,%al <== NOT EXECUTED 10887e: 74 0c je 10888c <== NOT EXECUTED 108880: b1 0d mov $0xd,%cl <== NOT EXECUTED 108882: eb 08 jmp 10888c <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 108884: 84 c9 test %cl,%cl <== NOT EXECUTED 108886: 0f 84 87 00 00 00 je 108913 <== NOT EXECUTED 10888c: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED 10888f: f6 c2 02 test $0x2,%dl <== NOT EXECUTED 108892: 74 7f je 108913 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 108894: 3a 4b 43 cmp 0x43(%ebx),%cl <== NOT EXECUTED 108897: 75 04 jne 10889d <== NOT EXECUTED erase (tty, 0); 108899: 31 d2 xor %edx,%edx <== NOT EXECUTED 10889b: eb 0a jmp 1088a7 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { 10889d: 3a 4b 44 cmp 0x44(%ebx),%cl <== NOT EXECUTED 1088a0: 75 11 jne 1088b3 <== NOT EXECUTED erase (tty, 1); 1088a2: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 1088a7: 89 d8 mov %ebx,%eax <== NOT EXECUTED 1088a9: e8 09 fe ff ff call 1086b7 <== NOT EXECUTED 1088ae: e9 8e 00 00 00 jmp 108941 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 1088b3: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 1088b8: 3a 4b 45 cmp 0x45(%ebx),%cl <== NOT EXECUTED 1088bb: 0f 84 82 00 00 00 je 108943 <== NOT EXECUTED return 1; } else if (c == '\n') { 1088c1: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED 1088c4: 75 1a jne 1088e0 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 1088c6: 80 e2 48 and $0x48,%dl <== NOT EXECUTED 1088c9: 74 09 je 1088d4 <== NOT EXECUTED echo (c, tty); 1088cb: 89 da mov %ebx,%edx <== NOT EXECUTED 1088cd: b0 0a mov $0xa,%al <== NOT EXECUTED 1088cf: e8 8b fd ff ff call 10865f <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 1088d4: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 1088d7: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 1088da: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED 1088de: eb 28 jmp 108908 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 1088e0: 3a 4b 4c cmp 0x4c(%ebx),%cl <== NOT EXECUTED 1088e3: 74 05 je 1088ea <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 1088e5: 3a 4b 51 cmp 0x51(%ebx),%cl <== NOT EXECUTED 1088e8: 75 29 jne 108913 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 1088ea: 80 e2 08 and $0x8,%dl <== NOT EXECUTED 1088ed: 74 10 je 1088ff <== NOT EXECUTED echo (c, tty); 1088ef: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 1088f2: 89 da mov %ebx,%edx <== NOT EXECUTED 1088f4: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED 1088f7: e8 63 fd ff ff call 10865f <== NOT EXECUTED 1088fc: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 1088ff: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108902: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108905: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED 108908: 40 inc %eax <== NOT EXECUTED 108909: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED 10890c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 108911: eb 30 jmp 108943 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 108913: a1 18 18 12 00 mov 0x121818,%eax <== NOT EXECUTED 108918: 48 dec %eax <== NOT EXECUTED 108919: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 10891c: 7d 23 jge 108941 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 10891e: f6 43 3c 08 testb $0x8,0x3c(%ebx) <== NOT EXECUTED 108922: 74 10 je 108934 <== NOT EXECUTED echo (c, tty); 108924: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 108927: 89 da mov %ebx,%edx <== NOT EXECUTED 108929: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED 10892c: e8 2e fd ff ff call 10865f <== NOT EXECUTED 108931: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108934: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108937: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 10893a: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED 10893d: 40 inc %eax <== NOT EXECUTED 10893e: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED 108941: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 108943: 83 c4 14 add $0x14,%esp <== NOT EXECUTED 108946: 5b pop %ebx <== NOT EXECUTED 108947: c9 leave <== NOT EXECUTED 108948: c3 ret <== NOT EXECUTED =============================================================================== 00121960 : * These are directly supported (and completely correct) in the posix api. */ #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { 121960: 55 push %ebp <== NOT EXECUTED 121961: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 121963: 31 c0 xor %eax,%eax <== NOT EXECUTED 121965: c9 leave <== NOT EXECUTED 121966: c3 ret <== NOT EXECUTED =============================================================================== 00108758 : int link( const char *existing, const char *new ) { 108758: 55 push %ebp 108759: 89 e5 mov %esp,%ebp 10875b: 57 push %edi 10875c: 56 push %esi 10875d: 53 push %ebx 10875e: 83 ec 48 sub $0x48,%esp 108761: 8b 55 08 mov 0x8(%ebp),%edx 108764: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 108767: 31 c0 xor %eax,%eax 108769: 83 c9 ff or $0xffffffff,%ecx 10876c: 89 d7 mov %edx,%edi 10876e: f2 ae repnz scas %es:(%edi),%al 108770: f7 d1 not %ecx 108772: 49 dec %ecx 108773: 6a 01 push $0x1 108775: 8d 45 d0 lea -0x30(%ebp),%eax 108778: 50 push %eax 108779: 6a 00 push $0x0 10877b: 51 push %ecx 10877c: 52 push %edx 10877d: e8 aa fb ff ff call 10832c 0, &existing_loc, true ); if ( result != 0 ) 108782: 83 c4 20 add $0x20,%esp 108785: 83 ce ff or $0xffffffff,%esi 108788: 85 c0 test %eax,%eax 10878a: 0f 85 80 01 00 00 jne 108910 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 108790: 8a 03 mov (%ebx),%al 108792: 3c 5c cmp $0x5c,%al 108794: 74 08 je 10879e <== NEVER TAKEN 108796: 3c 2f cmp $0x2f,%al 108798: 74 04 je 10879e 10879a: 84 c0 test %al,%al 10879c: 75 1a jne 1087b8 <== ALWAYS TAKEN 10879e: 8d 7d bc lea -0x44(%ebp),%edi 1087a1: 8b 35 d4 4f 12 00 mov 0x124fd4,%esi 1087a7: 83 c6 18 add $0x18,%esi 1087aa: b9 05 00 00 00 mov $0x5,%ecx 1087af: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1087b1: ba 01 00 00 00 mov $0x1,%edx 1087b6: eb 15 jmp 1087cd 1087b8: 8d 7d bc lea -0x44(%ebp),%edi 1087bb: 8b 35 d4 4f 12 00 mov 0x124fd4,%esi 1087c1: 83 c6 04 add $0x4,%esi 1087c4: b9 05 00 00 00 mov $0x5,%ecx 1087c9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1087cb: 31 d2 xor %edx,%edx if ( !parent_loc.ops->evalformake_h ) { 1087cd: 8b 45 c8 mov -0x38(%ebp),%eax 1087d0: 8b 40 04 mov 0x4(%eax),%eax 1087d3: 85 c0 test %eax,%eax 1087d5: 75 21 jne 1087f8 <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); 1087d7: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 1087da: 85 c0 test %eax,%eax <== NOT EXECUTED 1087dc: 0f 84 dd 00 00 00 je 1088bf <== NOT EXECUTED 1087e2: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1087e5: 85 c0 test %eax,%eax <== NOT EXECUTED 1087e7: 0f 84 d2 00 00 00 je 1088bf <== NOT EXECUTED 1087ed: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1087f0: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 1087f3: e9 c1 00 00 00 jmp 1088b9 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 1087f8: 51 push %ecx 1087f9: 8d 4d e4 lea -0x1c(%ebp),%ecx 1087fc: 51 push %ecx 1087fd: 8d 75 bc lea -0x44(%ebp),%esi 108800: 56 push %esi 108801: 01 d3 add %edx,%ebx 108803: 53 push %ebx 108804: ff d0 call *%eax 108806: 89 c3 mov %eax,%ebx if ( result != 0 ) { 108808: 83 c4 10 add $0x10,%esp 10880b: 85 c0 test %eax,%eax 10880d: 74 29 je 108838 rtems_filesystem_freenode( &existing_loc ); 10880f: 8b 45 dc mov -0x24(%ebp),%eax 108812: 85 c0 test %eax,%eax 108814: 74 13 je 108829 <== NEVER TAKEN 108816: 8b 40 1c mov 0x1c(%eax),%eax 108819: 85 c0 test %eax,%eax 10881b: 74 0c je 108829 <== NEVER TAKEN 10881d: 83 ec 0c sub $0xc,%esp 108820: 8d 55 d0 lea -0x30(%ebp),%edx 108823: 52 push %edx 108824: ff d0 call *%eax 108826: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( result ); 108829: e8 8e 9f 00 00 call 1127bc <__errno> 10882e: 89 18 mov %ebx,(%eax) 108830: 83 ce ff or $0xffffffff,%esi 108833: e9 d8 00 00 00 jmp 108910 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 108838: 8b 45 cc mov -0x34(%ebp),%eax 10883b: 3b 45 e0 cmp -0x20(%ebp),%eax 10883e: 74 41 je 108881 rtems_filesystem_freenode( &existing_loc ); 108840: 8b 45 dc mov -0x24(%ebp),%eax 108843: 85 c0 test %eax,%eax 108845: 74 13 je 10885a <== NEVER TAKEN 108847: 8b 40 1c mov 0x1c(%eax),%eax 10884a: 85 c0 test %eax,%eax 10884c: 74 0c je 10885a <== NEVER TAKEN 10884e: 83 ec 0c sub $0xc,%esp 108851: 8d 55 d0 lea -0x30(%ebp),%edx 108854: 52 push %edx 108855: ff d0 call *%eax 108857: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 10885a: 8b 45 c8 mov -0x38(%ebp),%eax 10885d: 85 c0 test %eax,%eax 10885f: 74 13 je 108874 <== NEVER TAKEN 108861: 8b 40 1c mov 0x1c(%eax),%eax 108864: 85 c0 test %eax,%eax 108866: 74 0c je 108874 <== NEVER TAKEN 108868: 83 ec 0c sub $0xc,%esp 10886b: 8d 55 bc lea -0x44(%ebp),%edx 10886e: 52 push %edx 10886f: ff d0 call *%eax 108871: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 108874: e8 43 9f 00 00 call 1127bc <__errno> 108879: c7 00 12 00 00 00 movl $0x12,(%eax) 10887f: eb af jmp 108830 } if ( !parent_loc.ops->link_h ) { 108881: 8b 45 c8 mov -0x38(%ebp),%eax 108884: 8b 40 08 mov 0x8(%eax),%eax 108887: 85 c0 test %eax,%eax 108889: 75 44 jne 1088cf <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); 10888b: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 10888e: 85 c0 test %eax,%eax <== NOT EXECUTED 108890: 74 13 je 1088a5 <== NOT EXECUTED 108892: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 108895: 85 c0 test %eax,%eax <== NOT EXECUTED 108897: 74 0c je 1088a5 <== NOT EXECUTED 108899: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10889c: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 10889f: 52 push %edx <== NOT EXECUTED 1088a0: ff d0 call *%eax <== NOT EXECUTED 1088a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 1088a5: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 1088a8: 85 c0 test %eax,%eax <== NOT EXECUTED 1088aa: 74 13 je 1088bf <== NOT EXECUTED 1088ac: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1088af: 85 c0 test %eax,%eax <== NOT EXECUTED 1088b1: 74 0c je 1088bf <== NOT EXECUTED 1088b3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1088b6: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED 1088b9: 52 push %edx <== NOT EXECUTED 1088ba: ff d0 call *%eax <== NOT EXECUTED 1088bc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1088bf: e8 f8 9e 00 00 call 1127bc <__errno> <== NOT EXECUTED 1088c4: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1088ca: e9 61 ff ff ff jmp 108830 <== NOT EXECUTED } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 1088cf: 52 push %edx 1088d0: ff 75 e4 pushl -0x1c(%ebp) 1088d3: 56 push %esi 1088d4: 8d 5d d0 lea -0x30(%ebp),%ebx 1088d7: 53 push %ebx 1088d8: ff d0 call *%eax 1088da: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &existing_loc ); 1088dc: 8b 45 dc mov -0x24(%ebp),%eax 1088df: 83 c4 10 add $0x10,%esp 1088e2: 85 c0 test %eax,%eax 1088e4: 74 10 je 1088f6 <== NEVER TAKEN 1088e6: 8b 40 1c mov 0x1c(%eax),%eax 1088e9: 85 c0 test %eax,%eax 1088eb: 74 09 je 1088f6 <== NEVER TAKEN 1088ed: 83 ec 0c sub $0xc,%esp 1088f0: 53 push %ebx 1088f1: ff d0 call *%eax 1088f3: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 1088f6: 8b 45 c8 mov -0x38(%ebp),%eax 1088f9: 85 c0 test %eax,%eax 1088fb: 74 13 je 108910 <== NEVER TAKEN 1088fd: 8b 40 1c mov 0x1c(%eax),%eax 108900: 85 c0 test %eax,%eax 108902: 74 0c je 108910 <== NEVER TAKEN 108904: 83 ec 0c sub $0xc,%esp 108907: 8d 55 bc lea -0x44(%ebp),%edx 10890a: 52 push %edx 10890b: ff d0 call *%eax 10890d: 83 c4 10 add $0x10,%esp return result; } 108910: 89 f0 mov %esi,%eax 108912: 8d 65 f4 lea -0xc(%ebp),%esp 108915: 5b pop %ebx 108916: 5e pop %esi 108917: 5f pop %edi 108918: c9 leave 108919: c3 ret =============================================================================== 0011b6cc : off_t lseek( int fd, off_t offset, int whence ) { 11b6cc: 55 push %ebp 11b6cd: 89 e5 mov %esp,%ebp 11b6cf: 57 push %edi 11b6d0: 56 push %esi 11b6d1: 53 push %ebx 11b6d2: 83 ec 1c sub $0x1c,%esp 11b6d5: 8b 5d 08 mov 0x8(%ebp),%ebx 11b6d8: 8b 45 0c mov 0xc(%ebp),%eax 11b6db: 8b 55 10 mov 0x10(%ebp),%edx 11b6de: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11b6e1: 3b 1d 24 fa 11 00 cmp 0x11fa24,%ebx 11b6e7: 73 0f jae 11b6f8 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11b6e9: c1 e3 06 shl $0x6,%ebx 11b6ec: 03 1d f8 38 12 00 add 0x1238f8,%ebx rtems_libio_check_is_open(iop); 11b6f2: f6 43 15 01 testb $0x1,0x15(%ebx) 11b6f6: 75 0d jne 11b705 <== ALWAYS TAKEN 11b6f8: e8 67 4c ff ff call 110364 <__errno> <== NOT EXECUTED 11b6fd: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11b703: eb 61 jmp 11b766 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 11b705: 8b 73 3c mov 0x3c(%ebx),%esi 11b708: 83 7e 14 00 cmpl $0x0,0x14(%esi) 11b70c: 75 0d jne 11b71b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11b70e: e8 51 4c ff ff call 110364 <__errno> <== NOT EXECUTED 11b713: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11b719: eb 4b jmp 11b766 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; 11b71b: 8b 73 0c mov 0xc(%ebx),%esi 11b71e: 8b 7b 10 mov 0x10(%ebx),%edi 11b721: 89 75 e0 mov %esi,-0x20(%ebp) 11b724: 89 7d e4 mov %edi,-0x1c(%ebp) switch ( whence ) { 11b727: 83 f9 01 cmp $0x1,%ecx 11b72a: 74 11 je 11b73d 11b72c: 83 f9 02 cmp $0x2,%ecx 11b72f: 74 18 je 11b749 11b731: 85 c9 test %ecx,%ecx 11b733: 75 26 jne 11b75b case SEEK_SET: iop->offset = offset; 11b735: 89 43 0c mov %eax,0xc(%ebx) 11b738: 89 53 10 mov %edx,0x10(%ebx) break; 11b73b: eb 30 jmp 11b76d case SEEK_CUR: iop->offset += offset; 11b73d: 8b 75 e0 mov -0x20(%ebp),%esi 11b740: 8b 7d e4 mov -0x1c(%ebp),%edi 11b743: 01 c6 add %eax,%esi 11b745: 11 d7 adc %edx,%edi 11b747: eb 0a jmp 11b753 break; case SEEK_END: iop->offset = iop->size + offset; 11b749: 89 c6 mov %eax,%esi 11b74b: 89 d7 mov %edx,%edi 11b74d: 03 73 04 add 0x4(%ebx),%esi 11b750: 13 7b 08 adc 0x8(%ebx),%edi 11b753: 89 73 0c mov %esi,0xc(%ebx) 11b756: 89 7b 10 mov %edi,0x10(%ebx) break; 11b759: eb 12 jmp 11b76d default: rtems_set_errno_and_return_minus_one( EINVAL ); 11b75b: e8 04 4c ff ff call 110364 <__errno> 11b760: c7 00 16 00 00 00 movl $0x16,(%eax) 11b766: 83 c8 ff or $0xffffffff,%eax 11b769: 89 c2 mov %eax,%edx 11b76b: eb 23 jmp 11b790 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 11b76d: 8b 73 3c mov 0x3c(%ebx),%esi 11b770: 51 push %ecx 11b771: 52 push %edx 11b772: 50 push %eax 11b773: 53 push %ebx 11b774: ff 56 14 call *0x14(%esi) if ( status == (off_t) -1 ) 11b777: 83 c4 10 add $0x10,%esp 11b77a: 83 fa ff cmp $0xffffffff,%edx 11b77d: 75 11 jne 11b790 11b77f: 83 f8 ff cmp $0xffffffff,%eax 11b782: 75 0c jne 11b790 <== NEVER TAKEN iop->offset = old_offset; 11b784: 8b 75 e0 mov -0x20(%ebp),%esi 11b787: 8b 7d e4 mov -0x1c(%ebp),%edi 11b78a: 89 73 0c mov %esi,0xc(%ebx) 11b78d: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11b790: 8d 65 f4 lea -0xc(%ebp),%esp 11b793: 5b pop %ebx 11b794: 5e pop %esi 11b795: 5f pop %edi 11b796: c9 leave 11b797: c3 ret =============================================================================== 0010741c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 10741c: 55 push %ebp 10741d: 89 e5 mov %esp,%ebp 10741f: 57 push %edi 107420: 56 push %esi 107421: 53 push %ebx 107422: 83 ec 0c sub $0xc,%esp 107425: 8b 75 08 mov 0x8(%ebp),%esi 107428: ff 05 14 39 12 00 incl 0x123914 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 10742e: e8 17 ff ff ff call 10734a /* * Validate the parameters */ if ( !size ) 107433: 85 f6 test %esi,%esi 107435: 74 7c je 1074b3 <== NEVER TAKEN return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 107437: 83 3d ec 3b 12 00 03 cmpl $0x3,0x123bec 10743e: 75 09 jne 107449 107440: e8 af fe ff ff call 1072f4 107445: 84 c0 test %al,%al 107447: 74 6a je 1074b3 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 107449: 6a 00 push $0x0 10744b: 6a 00 push $0x0 10744d: 56 push %esi 10744e: ff 35 30 fa 11 00 pushl 0x11fa30 107454: e8 1b 42 00 00 call 10b674 <_Protected_heap_Allocate_aligned_with_boundary> 107459: 89 c3 mov %eax,%ebx * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 10745b: 83 c4 10 add $0x10,%esp if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 10745e: 89 c7 mov %eax,%edi * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 107460: 85 c0 test %eax,%eax 107462: 75 26 jne 10748a if (rtems_malloc_sbrk_helpers) 107464: a1 b4 1d 12 00 mov 0x121db4,%eax 107469: 85 c0 test %eax,%eax 10746b: 74 10 je 10747d <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 10746d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107470: 56 push %esi <== NOT EXECUTED 107471: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 107474: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( !return_this ) { 107476: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107479: 85 c0 test %eax,%eax <== NOT EXECUTED 10747b: 75 0d jne 10748a <== NOT EXECUTED errno = ENOMEM; 10747d: e8 e2 8e 00 00 call 110364 <__errno> 107482: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 107488: eb 2b jmp 1074b5 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 10748a: a1 b8 1d 12 00 mov 0x121db8,%eax 10748f: 85 c0 test %eax,%eax 107491: 74 09 je 10749c <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 107493: 52 push %edx <== NOT EXECUTED 107494: 52 push %edx <== NOT EXECUTED 107495: 56 push %esi <== NOT EXECUTED 107496: 57 push %edi <== NOT EXECUTED 107497: ff 10 call *(%eax) <== NOT EXECUTED 107499: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 10749c: a1 b0 1d 12 00 mov 0x121db0,%eax 1074a1: 89 fb mov %edi,%ebx 1074a3: 85 c0 test %eax,%eax 1074a5: 74 0e je 1074b5 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1074a7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1074aa: 57 push %edi <== NOT EXECUTED 1074ab: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 1074ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1074b1: eb 02 jmp 1074b5 <== NOT EXECUTED 1074b3: 31 db xor %ebx,%ebx <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1074b5: 89 d8 mov %ebx,%eax 1074b7: 8d 65 f4 lea -0xc(%ebp),%esp 1074ba: 5b pop %ebx 1074bb: 5e pop %esi 1074bc: 5f pop %edi 1074bd: c9 leave 1074be: c3 ret =============================================================================== 00107332 : } void malloc_deferred_free( void *pointer ) { 107332: 55 push %ebp <== NOT EXECUTED 107333: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107335: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 107338: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10733b: 68 04 39 12 00 push $0x123904 <== NOT EXECUTED 107340: e8 bb 34 00 00 call 10a800 <_Chain_Append> <== NOT EXECUTED 107345: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 107348: c9 leave <== NOT EXECUTED 107349: c3 ret <== NOT EXECUTED =============================================================================== 0010734a : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 10734a: 55 push %ebp 10734b: 89 e5 mov %esp,%ebp 10734d: 83 ec 08 sub $0x8,%esp rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 107350: eb 0c jmp 10735e free(to_be_freed); 107352: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107355: 50 push %eax <== NOT EXECUTED 107356: e8 95 fe ff ff call 1071f0 <== NOT EXECUTED 10735b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10735e: 83 ec 0c sub $0xc,%esp 107361: 68 04 39 12 00 push $0x123904 107366: e8 b9 34 00 00 call 10a824 <_Chain_Get> rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 10736b: 83 c4 10 add $0x10,%esp 10736e: 85 c0 test %eax,%eax 107370: 75 e0 jne 107352 <== NEVER TAKEN free(to_be_freed); } 107372: c9 leave 107373: c3 ret =============================================================================== 001072f4 : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 1072f4: 55 push %ebp 1072f5: 89 e5 mov %esp,%ebp if ( _Thread_Dispatch_disable_level > 0 ) 1072f7: 8b 15 54 3a 12 00 mov 0x123a54,%edx 1072fd: 31 c0 xor %eax,%eax 1072ff: 85 d2 test %edx,%edx 107301: 75 0a jne 10730d <== NEVER TAKEN return false; if ( _ISR_Nest_level > 0 ) 107303: a1 ec 3a 12 00 mov 0x123aec,%eax #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 107308: 85 c0 test %eax,%eax 10730a: 0f 94 c0 sete %al if ( _ISR_Nest_level > 0 ) return false; return true; } 10730d: c9 leave 10730e: c3 ret =============================================================================== 001135f4 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 1135f4: 55 push %ebp 1135f5: 89 e5 mov %esp,%ebp 1135f7: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 1135fa: ff 35 3c 82 12 00 pushl 0x12823c 113600: 6a 01 push $0x1 113602: e8 b9 4b ff ff call 1081c0 if ( memory ) 113607: 83 c4 10 add $0x10,%esp 11360a: 85 c0 test %eax,%eax 11360c: 74 06 je 113614 <== NEVER TAKEN memfile_blocks_allocated++; 11360e: ff 05 dc 83 12 00 incl 0x1283dc return memory; } 113614: c9 leave 113615: c3 ret =============================================================================== 0011397c : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 11397c: 55 push %ebp 11397d: 89 e5 mov %esp,%ebp 11397f: 53 push %ebx 113980: 83 ec 10 sub $0x10,%esp 113983: 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) ) { 113986: 53 push %ebx 113987: e8 e6 e6 ff ff call 112072 11398c: 83 c4 10 add $0x10,%esp 11398f: 85 c0 test %eax,%eax 113991: 75 36 jne 1139c9 113993: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 113998: 75 2f jne 1139c9 <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 11399a: a1 34 64 12 00 mov 0x126434,%eax 11399f: 39 58 04 cmp %ebx,0x4(%eax) 1139a2: 75 07 jne 1139ab <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 1139a4: 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) 1139ab: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 1139af: 74 0c je 1139bd <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); 1139b1: 83 ec 0c sub $0xc,%esp 1139b4: 53 push %ebx 1139b5: e8 98 fe ff ff call 113852 1139ba: 83 c4 10 add $0x10,%esp free( the_jnode ); 1139bd: 83 ec 0c sub $0xc,%esp 1139c0: 53 push %ebx 1139c1: e8 f2 49 ff ff call 1083b8 1139c6: 83 c4 10 add $0x10,%esp } return 0; } 1139c9: 31 c0 xor %eax,%eax 1139cb: 8b 5d fc mov -0x4(%ebp),%ebx 1139ce: c9 leave 1139cf: c3 ret =============================================================================== 0011379d : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 11379d: 55 push %ebp 11379e: 89 e5 mov %esp,%ebp 1137a0: 57 push %edi 1137a1: 56 push %esi 1137a2: 53 push %ebx 1137a3: 83 ec 0c sub $0xc,%esp 1137a6: 8b 75 08 mov 0x8(%ebp),%esi /* * Perform internal consistency checks */ assert( block_table ); 1137a9: 85 f6 test %esi,%esi 1137ab: 75 19 jne 1137c6 <== ALWAYS TAKEN 1137ad: 68 04 27 12 00 push $0x122704 <== NOT EXECUTED 1137b2: 68 f8 27 12 00 push $0x1227f8 <== NOT EXECUTED 1137b7: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED 1137bc: 68 9a 26 12 00 push $0x12269a <== NOT EXECUTED 1137c1: e8 c6 48 ff ff call 10808c <__assert_func> <== NOT EXECUTED /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 1137c6: 8b 3e mov (%esi),%edi 1137c8: 31 db xor %ebx,%ebx for ( i=0 ; i if ( b[i] ) { 1137cc: 8b 04 9f mov (%edi,%ebx,4),%eax 1137cf: 85 c0 test %eax,%eax 1137d1: 74 13 je 1137e6 memfile_free_block( b[i] ); 1137d3: 83 ec 0c sub $0xc,%esp 1137d6: 50 push %eax 1137d7: e8 ff fd ff ff call 1135db b[i] = 0; 1137dc: c7 04 9f 00 00 00 00 movl $0x0,(%edi,%ebx,4) 1137e3: 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 ); 1137ec: 83 ec 0c sub $0xc,%esp 1137ef: ff 36 pushl (%esi) 1137f1: e8 e5 fd ff ff call 1135db *block_table = 0; 1137f6: c7 06 00 00 00 00 movl $0x0,(%esi) 1137fc: 83 c4 10 add $0x10,%esp } 1137ff: 8d 65 f4 lea -0xc(%ebp),%esp 113802: 5b pop %ebx 113803: 5e pop %esi 113804: 5f pop %edi 113805: c9 leave 113806: c3 ret =============================================================================== 00113bdd : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 113bdd: 55 push %ebp 113bde: 89 e5 mov %esp,%ebp 113be0: 53 push %ebx 113be1: 83 ec 14 sub $0x14,%esp 113be4: 8b 4d 08 mov 0x8(%ebp),%ecx 113be7: 8b 45 0c mov 0xc(%ebp),%eax 113bea: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 113bed: 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 ) 113bf0: 3b 53 54 cmp 0x54(%ebx),%edx 113bf3: 7c 12 jl 113c07 <== NEVER TAKEN 113bf5: 7f 05 jg 113bfc <== NEVER TAKEN 113bf7: 3b 43 50 cmp 0x50(%ebx),%eax 113bfa: 76 0b jbe 113c07 <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 113bfc: 51 push %ecx <== NOT EXECUTED 113bfd: 52 push %edx <== NOT EXECUTED 113bfe: 50 push %eax <== NOT EXECUTED 113bff: 53 push %ebx <== NOT EXECUTED 113c00: e8 b2 fe ff ff call 113ab7 <== NOT EXECUTED 113c05: eb 21 jmp 113c28 <== 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; 113c07: 89 43 50 mov %eax,0x50(%ebx) 113c0a: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 113c0d: 89 41 04 mov %eax,0x4(%ecx) 113c10: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 113c13: 52 push %edx 113c14: 52 push %edx 113c15: 6a 00 push $0x0 113c17: 8d 45 f0 lea -0x10(%ebp),%eax 113c1a: 50 push %eax 113c1b: e8 10 48 ff ff call 108430 113c20: 8b 45 f0 mov -0x10(%ebp),%eax 113c23: 89 43 40 mov %eax,0x40(%ebx) 113c26: 31 c0 xor %eax,%eax return 0; 113c28: 83 c4 10 add $0x10,%esp } 113c2b: 8b 5d fc mov -0x4(%ebp),%ebx 113c2e: c9 leave 113c2f: c3 ret =============================================================================== 00113c30 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 113c30: 55 push %ebp 113c31: 89 e5 mov %esp,%ebp 113c33: 56 push %esi 113c34: 53 push %ebx 113c35: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 113c38: 8b 73 38 mov 0x38(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 113c3b: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 113c3f: 75 1a jne 113c5b <== ALWAYS TAKEN if (iop->offset > the_jnode->info.linearfile.size) 113c41: 8b 56 50 mov 0x50(%esi),%edx <== NOT EXECUTED 113c44: 8b 46 54 mov 0x54(%esi),%eax <== NOT EXECUTED 113c47: 39 43 10 cmp %eax,0x10(%ebx) <== NOT EXECUTED 113c4a: 7c 41 jl 113c8d <== NOT EXECUTED 113c4c: 7f 05 jg 113c53 <== NOT EXECUTED 113c4e: 39 53 0c cmp %edx,0xc(%ebx) <== NOT EXECUTED 113c51: 76 3a jbe 113c8d <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 113c53: 89 53 0c mov %edx,0xc(%ebx) <== NOT EXECUTED 113c56: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED 113c59: eb 32 jmp 113c8d <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 113c5b: 50 push %eax 113c5c: ff 73 10 pushl 0x10(%ebx) 113c5f: ff 73 0c pushl 0xc(%ebx) 113c62: 56 push %esi 113c63: e8 4f fe ff ff call 113ab7 113c68: 83 c4 10 add $0x10,%esp 113c6b: 85 c0 test %eax,%eax 113c6d: 74 12 je 113c81 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 113c6f: e8 1c 0f 00 00 call 114b90 <__errno> <== NOT EXECUTED 113c74: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 113c7a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 113c7d: 89 c2 mov %eax,%edx <== NOT EXECUTED 113c7f: eb 12 jmp 113c93 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 113c81: 8b 46 50 mov 0x50(%esi),%eax 113c84: 8b 56 54 mov 0x54(%esi),%edx 113c87: 89 43 04 mov %eax,0x4(%ebx) 113c8a: 89 53 08 mov %edx,0x8(%ebx) } return iop->offset; 113c8d: 8b 43 0c mov 0xc(%ebx),%eax 113c90: 8b 53 10 mov 0x10(%ebx),%edx } 113c93: 8d 65 f8 lea -0x8(%ebp),%esp 113c96: 5b pop %ebx 113c97: 5e pop %esi 113c98: c9 leave 113c99: c3 ret =============================================================================== 00113ebf : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 113ebf: 55 push %ebp 113ec0: 89 e5 mov %esp,%ebp 113ec2: 56 push %esi 113ec3: 53 push %ebx 113ec4: 8b 75 08 mov 0x8(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 113ec7: 8b 5e 38 mov 0x38(%esi),%ebx /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 113eca: f7 46 14 04 02 00 00 testl $0x204,0x14(%esi) 113ed1: 74 54 je 113f27 && (the_jnode->type == IMFS_LINEAR_FILE)) { 113ed3: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 113ed7: 75 4e jne 113f27 <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; 113ed9: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 113edc: 8b 53 58 mov 0x58(%ebx),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 113edf: c7 43 4c 05 00 00 00 movl $0x5,0x4c(%ebx) <== NOT EXECUTED the_jnode->info.file.size = 0; 113ee6: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) <== NOT EXECUTED 113eed: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 113ef4: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 113efb: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 113f02: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) <== NOT EXECUTED if ((count != 0) 113f09: 85 c0 test %eax,%eax <== NOT EXECUTED 113f0b: 74 1a je 113f27 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 113f0d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113f10: 50 push %eax <== NOT EXECUTED 113f11: 52 push %edx <== NOT EXECUTED 113f12: 6a 00 push $0x0 <== NOT EXECUTED 113f14: 6a 00 push $0x0 <== NOT EXECUTED 113f16: 53 push %ebx <== NOT EXECUTED 113f17: e8 7e fd ff ff call 113c9a <== NOT EXECUTED 113f1c: 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) 113f1e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 113f21: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 113f24: 42 inc %edx <== NOT EXECUTED 113f25: 74 20 je 113f47 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 113f27: f6 46 15 02 testb $0x2,0x15(%esi) 113f2b: 74 0c je 113f39 iop->offset = the_jnode->info.file.size; 113f2d: 8b 43 50 mov 0x50(%ebx),%eax 113f30: 8b 53 54 mov 0x54(%ebx),%edx 113f33: 89 46 0c mov %eax,0xc(%esi) 113f36: 89 56 10 mov %edx,0x10(%esi) iop->size = the_jnode->info.file.size; 113f39: 8b 43 50 mov 0x50(%ebx),%eax 113f3c: 8b 53 54 mov 0x54(%ebx),%edx 113f3f: 89 46 04 mov %eax,0x4(%esi) 113f42: 89 56 08 mov %edx,0x8(%esi) 113f45: 31 c0 xor %eax,%eax return 0; } 113f47: 8d 65 f8 lea -0x8(%ebp),%esp 113f4a: 5b pop %ebx 113f4b: 5e pop %esi 113f4c: c9 leave 113f4d: c3 ret =============================================================================== 001139d0 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 1139d0: 55 push %ebp 1139d1: 89 e5 mov %esp,%ebp 1139d3: 53 push %ebx 1139d4: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 1139d7: 8b 45 0c mov 0xc(%ebp),%eax 1139da: 8b 18 mov (%eax),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 1139dc: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 1139e0: 74 13 je 1139f5 <== NEVER TAKEN 1139e2: 83 ec 0c sub $0xc,%esp 1139e5: 53 push %ebx 1139e6: e8 81 84 ff ff call 10be6c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 1139eb: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 1139f2: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 1139f5: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 1139f9: 50 push %eax 1139fa: 50 push %eax 1139fb: 6a 00 push $0x0 1139fd: 8d 45 f0 lea -0x10(%ebp),%eax 113a00: 50 push %eax 113a01: e8 2a 4a ff ff call 108430 113a06: 8b 45 f0 mov -0x10(%ebp),%eax 113a09: 89 43 48 mov %eax,0x48(%ebx) return memfile_check_rmnod( the_jnode ); 113a0c: 89 1c 24 mov %ebx,(%esp) 113a0f: e8 68 ff ff ff call 11397c } 113a14: 8b 5d fc mov -0x4(%ebp),%ebx 113a17: c9 leave 113a18: c3 ret =============================================================================== 001074dc : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1074dc: 55 push %ebp 1074dd: 89 e5 mov %esp,%ebp 1074df: 57 push %edi 1074e0: 56 push %esi 1074e1: 53 push %ebx 1074e2: 83 ec 3c sub $0x3c,%esp 1074e5: 8b 45 08 mov 0x8(%ebp),%eax 1074e8: 8b 5d 0c mov 0xc(%ebp),%ebx 1074eb: 8b 55 10 mov 0x10(%ebp),%edx 1074ee: 8b 4d 14 mov 0x14(%ebp),%ecx 1074f1: 89 55 c0 mov %edx,-0x40(%ebp) 1074f4: 89 4d c4 mov %ecx,-0x3c(%ebp) rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 1074f7: 66 f7 c3 00 f0 test $0xf000,%bx 1074fc: 75 0d jne 10750b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 1074fe: e8 61 8e 00 00 call 110364 <__errno> <== NOT EXECUTED 107503: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107509: eb 4f jmp 10755a <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 10750b: 8a 10 mov (%eax),%dl 10750d: 80 fa 5c cmp $0x5c,%dl 107510: 74 09 je 10751b <== NEVER TAKEN 107512: 80 fa 2f cmp $0x2f,%dl 107515: 74 04 je 10751b 107517: 84 d2 test %dl,%dl 107519: 75 17 jne 107532 <== ALWAYS TAKEN 10751b: 8d 7d d0 lea -0x30(%ebp),%edi 10751e: 8b 35 28 18 12 00 mov 0x121828,%esi 107524: 83 c6 18 add $0x18,%esi 107527: b9 05 00 00 00 mov $0x5,%ecx 10752c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10752e: b1 01 mov $0x1,%cl 107530: eb 13 jmp 107545 107532: 8d 7d d0 lea -0x30(%ebp),%edi 107535: 8b 35 28 18 12 00 mov 0x121828,%esi 10753b: 83 c6 04 add $0x4,%esi 10753e: b9 05 00 00 00 mov $0x5,%ecx 107543: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !temp_loc.ops->evalformake_h ) { 107545: 8b 55 dc mov -0x24(%ebp),%edx 107548: 8b 52 04 mov 0x4(%edx),%edx 10754b: 85 d2 test %edx,%edx 10754d: 75 10 jne 10755f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10754f: e8 10 8e 00 00 call 110364 <__errno> <== NOT EXECUTED 107554: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10755a: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 10755d: eb 60 jmp 1075bf <== NOT EXECUTED } result = (*temp_loc.ops->evalformake_h)( 10755f: 56 push %esi 107560: 8d 75 e4 lea -0x1c(%ebp),%esi 107563: 56 push %esi 107564: 8d 75 d0 lea -0x30(%ebp),%esi 107567: 56 push %esi 107568: 01 c8 add %ecx,%eax 10756a: 50 push %eax 10756b: ff d2 call *%edx &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 10756d: 83 c4 10 add $0x10,%esp 107570: 83 cf ff or $0xffffffff,%edi 107573: 85 c0 test %eax,%eax 107575: 75 48 jne 1075bf return -1; if ( !temp_loc.ops->mknod_h ) { 107577: 8b 55 dc mov -0x24(%ebp),%edx 10757a: 8b 42 14 mov 0x14(%edx),%eax 10757d: 85 c0 test %eax,%eax 10757f: 75 12 jne 107593 <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); 107581: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 107584: 85 c0 test %eax,%eax <== NOT EXECUTED 107586: 74 c7 je 10754f <== NOT EXECUTED 107588: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10758b: 56 push %esi <== NOT EXECUTED 10758c: ff d0 call *%eax <== NOT EXECUTED 10758e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107591: eb bc jmp 10754f <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 107593: 83 ec 0c sub $0xc,%esp 107596: 56 push %esi 107597: ff 75 c4 pushl -0x3c(%ebp) 10759a: ff 75 c0 pushl -0x40(%ebp) 10759d: 53 push %ebx 10759e: ff 75 e4 pushl -0x1c(%ebp) 1075a1: ff d0 call *%eax 1075a3: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &temp_loc ); 1075a5: 8b 45 dc mov -0x24(%ebp),%eax 1075a8: 83 c4 20 add $0x20,%esp 1075ab: 85 c0 test %eax,%eax 1075ad: 74 10 je 1075bf <== NEVER TAKEN 1075af: 8b 40 1c mov 0x1c(%eax),%eax 1075b2: 85 c0 test %eax,%eax 1075b4: 74 09 je 1075bf 1075b6: 83 ec 0c sub $0xc,%esp 1075b9: 56 push %esi 1075ba: ff d0 call *%eax 1075bc: 83 c4 10 add $0x10,%esp return result; } 1075bf: 89 f8 mov %edi,%eax 1075c1: 8d 65 f4 lea -0xc(%ebp),%esp 1075c4: 5b pop %ebx 1075c5: 5e pop %esi 1075c6: 5f pop %edi 1075c7: c9 leave 1075c8: c3 ret =============================================================================== 001075f1 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 1075f1: 55 push %ebp 1075f2: 89 e5 mov %esp,%ebp 1075f4: 57 push %edi 1075f5: 56 push %esi 1075f6: 53 push %ebx 1075f7: 83 ec 3c sub $0x3c,%esp 1075fa: 8b 75 14 mov 0x14(%ebp),%esi /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 1075fd: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 107601: 74 06 je 107609 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 107603: 83 7d 10 01 cmpl $0x1,0x10(%ebp) 107607: 76 10 jbe 107619 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 107609: e8 56 8d 00 00 call 110364 <__errno> 10760e: c7 00 16 00 00 00 movl $0x16,(%eax) 107614: e9 ea 01 00 00 jmp 107803 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 107619: 8b 45 0c mov 0xc(%ebp),%eax 10761c: 83 78 24 00 cmpl $0x0,0x24(%eax) 107620: 75 19 jne 10763b <== ALWAYS TAKEN errno = ENOTSUP; 107622: e8 3d 8d 00 00 call 110364 <__errno> <== NOT EXECUTED 107627: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10762d: 31 f6 xor %esi,%esi <== NOT EXECUTED 10762f: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) <== NOT EXECUTED goto cleanup_and_bail; 107636: e9 9a 01 00 00 jmp 1077d5 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 10763b: b9 6c 00 00 00 mov $0x6c,%ecx 107640: 85 f6 test %esi,%esi 107642: 74 0e je 107652 <== ALWAYS TAKEN size += strlen( device ) + 1; 107644: 31 c0 xor %eax,%eax <== NOT EXECUTED 107646: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 107649: 89 f7 mov %esi,%edi <== NOT EXECUTED 10764b: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 10764d: f7 d1 not %ecx <== NOT EXECUTED 10764f: 83 c1 6c add $0x6c,%ecx <== NOT EXECUTED temp_mt_entry = malloc( size ); 107652: 83 ec 0c sub $0xc,%esp 107655: 51 push %ecx 107656: e8 c1 fd ff ff call 10741c 10765b: 89 c3 mov %eax,%ebx 10765d: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !temp_mt_entry ) { 107660: 83 c4 10 add $0x10,%esp 107663: 85 c0 test %eax,%eax 107665: 75 10 jne 107677 <== ALWAYS TAKEN errno = ENOMEM; 107667: e8 f8 8c 00 00 call 110364 <__errno> <== NOT EXECUTED 10766c: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107672: e9 8c 01 00 00 jmp 107803 <== NOT EXECUTED return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 107677: 89 43 2c mov %eax,0x2c(%ebx) temp_mt_entry->options = options; 10767a: 8b 55 10 mov 0x10(%ebp),%edx 10767d: 89 50 30 mov %edx,0x30(%eax) if ( device ) { 107680: 85 f6 test %esi,%esi 107682: 74 14 je 107698 <== ALWAYS TAKEN temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 107684: 8d 40 6c lea 0x6c(%eax),%eax <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 107687: 89 43 68 mov %eax,0x68(%ebx) <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 10768a: 52 push %edx <== NOT EXECUTED 10768b: 52 push %edx <== NOT EXECUTED 10768c: 56 push %esi <== NOT EXECUTED 10768d: 50 push %eax <== NOT EXECUTED 10768e: e8 45 98 00 00 call 110ed8 <== NOT EXECUTED 107693: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107696: eb 07 jmp 10769f <== NOT EXECUTED } else temp_mt_entry->dev = 0; 107698: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 10769f: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 1076a3: 0f 84 b0 00 00 00 je 107759 if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 1076a9: 31 c0 xor %eax,%eax 1076ab: 83 c9 ff or $0xffffffff,%ecx 1076ae: 8b 7d 18 mov 0x18(%ebp),%edi 1076b1: f2 ae repnz scas %es:(%edi),%al 1076b3: f7 d1 not %ecx 1076b5: 49 dec %ecx * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 1076b6: 83 ec 0c sub $0xc,%esp 1076b9: 6a 01 push $0x1 1076bb: 8d 75 d4 lea -0x2c(%ebp),%esi 1076be: 56 push %esi 1076bf: 6a 07 push $0x7 1076c1: 51 push %ecx 1076c2: ff 75 18 pushl 0x18(%ebp) 1076c5: e8 7e fa ff ff call 107148 1076ca: 83 c4 20 add $0x20,%esp 1076cd: 40 inc %eax 1076ce: 0f 84 ff 00 00 00 je 1077d3 <== NEVER TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 1076d4: 8b 45 e0 mov -0x20(%ebp),%eax 1076d7: 8b 40 10 mov 0x10(%eax),%eax 1076da: 85 c0 test %eax,%eax 1076dc: 75 10 jne 1076ee <== ALWAYS TAKEN errno = ENOTSUP; 1076de: e8 81 8c 00 00 call 110364 <__errno> <== NOT EXECUTED 1076e3: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 1076e9: e9 e7 00 00 00 jmp 1077d5 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 1076ee: 83 ec 0c sub $0xc,%esp 1076f1: 56 push %esi 1076f2: ff d0 call *%eax 1076f4: 83 c4 10 add $0x10,%esp 1076f7: 48 dec %eax 1076f8: 74 10 je 10770a errno = ENOTDIR; 1076fa: e8 65 8c 00 00 call 110364 <__errno> 1076ff: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 107705: e9 cb 00 00 00 jmp 1077d5 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 10770a: a1 3c 39 12 00 mov 0x12393c,%eax !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 10770f: 8b 55 d4 mov -0x2c(%ebp),%edx 107712: eb 07 jmp 10771b 107714: 39 50 1c cmp %edx,0x1c(%eax) 107717: 74 0e je 107727 * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 107719: 8b 00 mov (%eax),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10771b: 3d 40 39 12 00 cmp $0x123940,%eax 107720: 75 f2 jne 107714 107722: e9 e7 00 00 00 jmp 10780e /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 107727: e8 38 8c 00 00 call 110364 <__errno> 10772c: c7 00 10 00 00 00 movl $0x10,(%eax) 107732: eb 0b jmp 10773f * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 107734: e8 2b 8c 00 00 call 110364 <__errno> <== NOT EXECUTED 107739: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10773f: 8d 75 d4 lea -0x2c(%ebp),%esi goto cleanup_and_bail; 107742: e9 8e 00 00 00 jmp 1077d5 } if ( loc.ops->mount_h( temp_mt_entry ) ) { 107747: 83 ec 0c sub $0xc,%esp 10774a: 53 push %ebx 10774b: ff d0 call *%eax 10774d: 83 c4 10 add $0x10,%esp 107750: 85 c0 test %eax,%eax 107752: 8d 75 d4 lea -0x2c(%ebp),%esi 107755: 74 35 je 10778c <== ALWAYS TAKEN 107757: eb 7c jmp 1077d5 <== NOT EXECUTED * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 107759: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = NULL; 107760: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = NULL; 107767: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) temp_mt_entry->mt_point_node.node_access = NULL; 10776e: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) temp_mt_entry->mt_point_node.handlers = NULL; 107775: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) temp_mt_entry->mt_point_node.ops = NULL; 10777c: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) temp_mt_entry->mt_point_node.mt_entry = NULL; 107783: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) 10778a: 31 f6 xor %esi,%esi } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 10778c: 83 ec 0c sub $0xc,%esp 10778f: 53 push %ebx 107790: 8b 55 0c mov 0xc(%ebp),%edx 107793: ff 52 24 call *0x24(%edx) 107796: 83 c4 10 add $0x10,%esp 107799: 85 c0 test %eax,%eax 10779b: 74 15 je 1077b2 <== ALWAYS TAKEN /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 10779d: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1077a0: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 1077a3: 85 c0 test %eax,%eax <== NOT EXECUTED 1077a5: 74 2e je 1077d5 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 1077a7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1077aa: 53 push %ebx <== NOT EXECUTED 1077ab: ff d0 call *%eax <== NOT EXECUTED 1077ad: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1077b0: eb 23 jmp 1077d5 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 1077b2: 50 push %eax 1077b3: 50 push %eax 1077b4: 53 push %ebx 1077b5: 68 3c 39 12 00 push $0x12393c 1077ba: e8 41 30 00 00 call 10a800 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 1077bf: 83 c4 10 add $0x10,%esp 1077c2: 31 c0 xor %eax,%eax 1077c4: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 1077c8: 74 3c je 107806 <== NEVER TAKEN *mt_entry = temp_mt_entry; 1077ca: 8b 45 08 mov 0x8(%ebp),%eax 1077cd: 89 18 mov %ebx,(%eax) 1077cf: 31 c0 xor %eax,%eax 1077d1: eb 33 jmp 107806 1077d3: 31 f6 xor %esi,%esi <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 1077d5: 83 ec 0c sub $0xc,%esp 1077d8: ff 75 c4 pushl -0x3c(%ebp) 1077db: e8 10 fa ff ff call 1071f0 if ( loc_to_free ) 1077e0: 83 c4 10 add $0x10,%esp 1077e3: 85 f6 test %esi,%esi 1077e5: 74 1c je 107803 <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); 1077e7: 8b 46 0c mov 0xc(%esi),%eax 1077ea: 85 c0 test %eax,%eax 1077ec: 74 15 je 107803 <== NEVER TAKEN 1077ee: 8b 40 1c mov 0x1c(%eax),%eax 1077f1: 85 c0 test %eax,%eax 1077f3: 74 0e je 107803 <== NEVER TAKEN 1077f5: 83 ec 0c sub $0xc,%esp 1077f8: 56 push %esi 1077f9: ff d0 call *%eax 1077fb: 83 c8 ff or $0xffffffff,%eax 1077fe: 83 c4 10 add $0x10,%esp 107801: eb 03 jmp 107806 107803: 83 c8 ff or $0xffffffff,%eax return -1; } 107806: 8d 65 f4 lea -0xc(%ebp),%esp 107809: 5b pop %ebx 10780a: 5e pop %esi 10780b: 5f pop %edi 10780c: c9 leave 10780d: c3 ret * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 10780e: 89 53 08 mov %edx,0x8(%ebx) temp_mt_entry->mt_point_node.handlers = loc.handlers; 107811: 8b 45 dc mov -0x24(%ebp),%eax 107814: 89 43 10 mov %eax,0x10(%ebx) temp_mt_entry->mt_point_node.ops = loc.ops; 107817: 8b 45 e0 mov -0x20(%ebp),%eax 10781a: 89 43 14 mov %eax,0x14(%ebx) temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 10781d: 8b 55 e4 mov -0x1c(%ebp),%edx 107820: 89 53 18 mov %edx,0x18(%ebx) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 107823: 8b 40 20 mov 0x20(%eax),%eax 107826: 85 c0 test %eax,%eax 107828: 0f 85 19 ff ff ff jne 107747 <== ALWAYS TAKEN 10782e: e9 01 ff ff ff jmp 107734 <== NOT EXECUTED =============================================================================== 0010783c : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 10783c: 55 push %ebp 10783d: 89 e5 mov %esp,%ebp 10783f: 57 push %edi 107840: 56 push %esi 107841: 53 push %ebx 107842: 83 ec 0c sub $0xc,%esp 107845: 8b 7d 08 mov 0x8(%ebp),%edi 107848: 8b 75 0c mov 0xc(%ebp),%esi /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 10784b: 39 f7 cmp %esi,%edi 10784d: 75 08 jne 107857 ptr = _REENT; 10784f: 8b 1d c0 18 12 00 mov 0x1218c0,%ebx 107855: eb 06 jmp 10785d } else { ptr = deleted_task->libc_reent; 107857: 8b 9e ec 00 00 00 mov 0xec(%esi),%ebx } if (ptr && ptr != _global_impure_ptr) { 10785d: 85 db test %ebx,%ebx 10785f: 74 20 je 107881 <== NEVER TAKEN 107861: 3b 1d 40 e0 11 00 cmp 0x11e040,%ebx 107867: 74 18 je 107881 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 107869: 50 push %eax 10786a: 50 push %eax 10786b: 68 a1 78 10 00 push $0x1078a1 107870: 53 push %ebx 107871: e8 9e 92 00 00 call 110b14 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 107876: 89 1c 24 mov %ebx,(%esp) 107879: e8 07 53 00 00 call 10cb85 <_Workspace_Free> 10787e: 83 c4 10 add $0x10,%esp #endif } deleted_task->libc_reent = NULL; 107881: c7 86 ec 00 00 00 00 movl $0x0,0xec(%esi) 107888: 00 00 00 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 10788b: 39 f7 cmp %esi,%edi 10788d: 75 0a jne 107899 _REENT = 0; 10788f: c7 05 c0 18 12 00 00 movl $0x0,0x1218c0 107896: 00 00 00 } } 107899: 8d 65 f4 lea -0xc(%ebp),%esp 10789c: 5b pop %ebx 10789d: 5e pop %esi 10789e: 5f pop %edi 10789f: c9 leave 1078a0: c3 ret =============================================================================== 001078a1 : */ int newlib_free_buffers( FILE *fp ) { 1078a1: 55 push %ebp 1078a2: 89 e5 mov %esp,%ebp 1078a4: 53 push %ebx 1078a5: 83 ec 10 sub $0x10,%esp 1078a8: 8b 5d 08 mov 0x8(%ebp),%ebx switch ( fileno(fp) ) { 1078ab: 53 push %ebx 1078ac: e8 6b 8e 00 00 call 11071c 1078b1: 83 c4 10 add $0x10,%esp 1078b4: 83 f8 02 cmp $0x2,%eax 1078b7: 77 26 ja 1078df <== NEVER TAKEN case 0: case 1: case 2: if (fp->_flags & __SMBF) { 1078b9: 80 7b 0c 00 cmpb $0x0,0xc(%ebx) 1078bd: 79 2c jns 1078eb <== ALWAYS TAKEN free( fp->_bf._base ); 1078bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1078c2: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1078c5: e8 26 f9 ff ff call 1071f0 <== NOT EXECUTED fp->_flags &= ~__SMBF; 1078ca: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 1078d0: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 1078d6: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED 1078dd: eb 09 jmp 1078e8 <== NOT EXECUTED } break; default: fclose(fp); 1078df: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1078e2: 53 push %ebx <== NOT EXECUTED 1078e3: e8 c8 8b 00 00 call 1104b0 <== NOT EXECUTED 1078e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 1078eb: 31 c0 xor %eax,%eax 1078ed: 8b 5d fc mov -0x4(%ebp),%ebx 1078f0: c9 leave 1078f1: c3 ret =============================================================================== 001078d0 : 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 84 4d 12 00 00 cmpb $0x0,0x124d84 1078e1: 75 2b jne 10790e initialized = 1; 1078e3: c6 05 84 4d 12 00 01 movb $0x1,0x124d84 status = rtems_io_register_name( 1078ea: 50 push %eax 1078eb: 6a 00 push $0x0 1078ed: 53 push %ebx 1078ee: 68 7f ed 11 00 push $0x11ed7f 1078f3: e8 05 01 00 00 call 1079fd "/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 <== NOT EXECUTED 107902: 50 push %eax <== NOT EXECUTED 107903: e8 dc 39 00 00 call 10b2e4 <== NOT EXECUTED NULL_major = major; 107908: 89 1d b8 50 12 00 mov %ebx,0x1250b8 } 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 =============================================================================== 00107bcc : int open( const char *pathname, int flags, ... ) { 107bcc: 55 push %ebp 107bcd: 89 e5 mov %esp,%ebp 107bcf: 57 push %edi 107bd0: 56 push %esi 107bd1: 53 push %ebx 107bd2: 83 ec 3c sub $0x3c,%esp /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 107bd5: 8b 45 0c mov 0xc(%ebp),%eax 107bd8: 40 inc %eax if ( ( status & _FREAD ) == _FREAD ) 107bd9: 89 c6 mov %eax,%esi 107bdb: 83 e6 01 and $0x1,%esi 107bde: f7 de neg %esi 107be0: 83 e6 04 and $0x4,%esi eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 107be3: a8 02 test $0x2,%al 107be5: 74 03 je 107bea eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 107be7: 83 ce 02 or $0x2,%esi va_start(ap, flags); mode = va_arg( ap, int ); 107bea: 8b 45 10 mov 0x10(%ebp),%eax 107bed: 89 45 c4 mov %eax,-0x3c(%ebp) * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 107bf0: e8 ce 62 00 00 call 10dec3 107bf5: 89 c3 mov %eax,%ebx if ( iop == 0 ) { 107bf7: bf 17 00 00 00 mov $0x17,%edi 107bfc: 85 c0 test %eax,%eax 107bfe: 0f 84 a8 01 00 00 je 107dac /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 107c04: 83 c9 ff or $0xffffffff,%ecx 107c07: 8b 7d 08 mov 0x8(%ebp),%edi 107c0a: 31 c0 xor %eax,%eax 107c0c: f2 ae repnz scas %es:(%edi),%al 107c0e: f7 d1 not %ecx 107c10: 49 dec %ecx /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 107c11: 83 ec 0c sub $0xc,%esp 107c14: 6a 01 push $0x1 107c16: 8d 45 d4 lea -0x2c(%ebp),%eax 107c19: 50 push %eax 107c1a: 56 push %esi 107c1b: 51 push %ecx 107c1c: ff 75 08 pushl 0x8(%ebp) 107c1f: e8 24 f5 ff ff call 107148 107c24: 89 c6 mov %eax,%esi pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 107c26: 83 c4 20 add $0x20,%esp 107c29: 83 f8 ff cmp $0xffffffff,%eax 107c2c: 75 7a jne 107ca8 if ( errno != ENOENT ) { 107c2e: e8 31 87 00 00 call 110364 <__errno> 107c33: 83 38 02 cmpl $0x2,(%eax) 107c36: 75 2f jne 107c67 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 107c38: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 107c3f: 75 0c jne 107c4d 107c41: 31 f6 xor %esi,%esi 107c43: bf 02 00 00 00 mov $0x2,%edi 107c48: e9 34 01 00 00 jmp 107d81 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 107c4d: 6a 00 push $0x0 107c4f: 6a 00 push $0x0 107c51: 8b 45 c4 mov -0x3c(%ebp),%eax 107c54: 80 cc 80 or $0x80,%ah 107c57: 50 push %eax 107c58: ff 75 08 pushl 0x8(%ebp) 107c5b: e8 7c f8 ff ff call 1074dc if ( rc ) { 107c60: 83 c4 10 add $0x10,%esp 107c63: 85 c0 test %eax,%eax 107c65: 74 0e je 107c75 <== ALWAYS TAKEN rc = errno; 107c67: e8 f8 86 00 00 call 110364 <__errno> 107c6c: 8b 38 mov (%eax),%edi 107c6e: 31 f6 xor %esi,%esi goto done; 107c70: e9 08 01 00 00 jmp 107d7d } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 107c75: 89 f1 mov %esi,%ecx 107c77: 8b 7d 08 mov 0x8(%ebp),%edi 107c7a: 31 c0 xor %eax,%eax 107c7c: f2 ae repnz scas %es:(%edi),%al 107c7e: f7 d1 not %ecx 107c80: 49 dec %ecx 107c81: 83 ec 0c sub $0xc,%esp 107c84: 6a 01 push $0x1 107c86: 8d 45 d4 lea -0x2c(%ebp),%eax 107c89: 50 push %eax 107c8a: 6a 00 push $0x0 107c8c: 51 push %ecx 107c8d: ff 75 08 pushl 0x8(%ebp) 107c90: e8 b3 f4 ff ff call 107148 if ( status != 0 ) { /* The file did not exist */ 107c95: 83 c4 20 add $0x20,%esp 107c98: 85 c0 test %eax,%eax 107c9a: 74 28 je 107cc4 <== ALWAYS TAKEN 107c9c: 31 f6 xor %esi,%esi <== NOT EXECUTED 107c9e: bf 0d 00 00 00 mov $0xd,%edi <== NOT EXECUTED 107ca3: e9 d9 00 00 00 jmp 107d81 <== NOT EXECUTED rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 107ca8: 8b 45 0c mov 0xc(%ebp),%eax 107cab: 25 00 0a 00 00 and $0xa00,%eax 107cb0: 3d 00 0a 00 00 cmp $0xa00,%eax 107cb5: 75 0d jne 107cc4 107cb7: 8d 75 d4 lea -0x2c(%ebp),%esi 107cba: bf 11 00 00 00 mov $0x11,%edi 107cbf: e9 bd 00 00 00 jmp 107d81 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 107cc4: 8b 45 dc mov -0x24(%ebp),%eax 107cc7: 89 43 3c mov %eax,0x3c(%ebx) iop->file_info = loc.node_access; 107cca: 8b 45 d4 mov -0x2c(%ebp),%eax 107ccd: 89 43 38 mov %eax,0x38(%ebx) iop->flags |= rtems_libio_fcntl_flags( flags ); 107cd0: 8b 73 14 mov 0x14(%ebx),%esi 107cd3: 83 ec 0c sub $0xc,%esp 107cd6: ff 75 0c pushl 0xc(%ebp) 107cd9: e8 70 62 00 00 call 10df4e 107cde: 09 f0 or %esi,%eax 107ce0: 89 43 14 mov %eax,0x14(%ebx) iop->pathinfo = loc; 107ce3: 8d 7b 18 lea 0x18(%ebx),%edi 107ce6: 8d 75 d4 lea -0x2c(%ebp),%esi 107ce9: b9 05 00 00 00 mov $0x5,%ecx 107cee: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !iop->handlers || !iop->handlers->open_h ) { 107cf0: 8b 43 3c mov 0x3c(%ebx),%eax 107cf3: 83 c4 10 add $0x10,%esp 107cf6: 85 c0 test %eax,%eax 107cf8: 0f 84 cd 00 00 00 je 107dcb <== NEVER TAKEN 107cfe: 8b 00 mov (%eax),%eax 107d00: 85 c0 test %eax,%eax 107d02: 0f 84 c3 00 00 00 je 107dcb <== NEVER TAKEN rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 107d08: ff 75 c4 pushl -0x3c(%ebp) 107d0b: ff 75 0c pushl 0xc(%ebp) 107d0e: ff 75 08 pushl 0x8(%ebp) 107d11: 53 push %ebx 107d12: ff d0 call *%eax if ( rc ) { 107d14: 83 c4 10 add $0x10,%esp 107d17: 85 c0 test %eax,%eax 107d19: 74 0c je 107d27 rc = errno; 107d1b: e8 44 86 00 00 call 110364 <__errno> 107d20: 8b 38 mov (%eax),%edi 107d22: 8d 75 d4 lea -0x2c(%ebp),%esi goto done; 107d25: eb 56 jmp 107d7d /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 107d27: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 107d2e: 0f 84 84 00 00 00 je 107db8 rc = ftruncate( iop - rtems_libio_iops, 0 ); 107d34: 50 push %eax 107d35: 6a 00 push $0x0 107d37: 6a 00 push $0x0 107d39: 89 d8 mov %ebx,%eax 107d3b: 2b 05 f8 38 12 00 sub 0x1238f8,%eax 107d41: c1 f8 06 sar $0x6,%eax 107d44: 50 push %eax 107d45: e8 06 5f 00 00 call 10dc50 107d4a: 89 c7 mov %eax,%edi if ( rc ) { 107d4c: 83 c4 10 add $0x10,%esp 107d4f: 85 c0 test %eax,%eax 107d51: 74 65 je 107db8 <== ALWAYS TAKEN if(errno) rc = errno; 107d53: e8 0c 86 00 00 call 110364 <__errno> <== NOT EXECUTED 107d58: 83 38 00 cmpl $0x0,(%eax) <== NOT EXECUTED 107d5b: 74 07 je 107d64 <== NOT EXECUTED 107d5d: e8 02 86 00 00 call 110364 <__errno> <== NOT EXECUTED 107d62: 8b 38 mov (%eax),%edi <== NOT EXECUTED close( iop - rtems_libio_iops ); 107d64: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d67: 2b 1d f8 38 12 00 sub 0x1238f8,%ebx <== NOT EXECUTED 107d6d: c1 fb 06 sar $0x6,%ebx <== NOT EXECUTED 107d70: 53 push %ebx <== NOT EXECUTED 107d71: e8 52 5e 00 00 call 10dbc8 <== NOT EXECUTED 107d76: 31 f6 xor %esi,%esi <== NOT EXECUTED 107d78: 31 db xor %ebx,%ebx <== NOT EXECUTED 107d7a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 107d7d: 85 ff test %edi,%edi 107d7f: 74 37 je 107db8 <== NEVER TAKEN if ( iop ) 107d81: 85 db test %ebx,%ebx 107d83: 74 0c je 107d91 <== NEVER TAKEN rtems_libio_free( iop ); 107d85: 83 ec 0c sub $0xc,%esp 107d88: 53 push %ebx 107d89: e8 e0 60 00 00 call 10de6e 107d8e: 83 c4 10 add $0x10,%esp if ( loc_to_free ) 107d91: 85 f6 test %esi,%esi 107d93: 74 17 je 107dac rtems_filesystem_freenode( loc_to_free ); 107d95: 8b 46 0c mov 0xc(%esi),%eax 107d98: 85 c0 test %eax,%eax 107d9a: 74 10 je 107dac <== NEVER TAKEN 107d9c: 8b 40 1c mov 0x1c(%eax),%eax 107d9f: 85 c0 test %eax,%eax 107da1: 74 09 je 107dac <== NEVER TAKEN 107da3: 83 ec 0c sub $0xc,%esp 107da6: 56 push %esi 107da7: ff d0 call *%eax 107da9: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( rc ); 107dac: e8 b3 85 00 00 call 110364 <__errno> 107db1: 89 38 mov %edi,(%eax) 107db3: 83 c8 ff or $0xffffffff,%eax 107db6: eb 0b jmp 107dc3 } return iop - rtems_libio_iops; 107db8: 89 d8 mov %ebx,%eax 107dba: 2b 05 f8 38 12 00 sub 0x1238f8,%eax 107dc0: c1 f8 06 sar $0x6,%eax } 107dc3: 8d 65 f4 lea -0xc(%ebp),%esp 107dc6: 5b pop %ebx 107dc7: 5e pop %esi 107dc8: 5f pop %edi 107dc9: c9 leave 107dca: c3 ret if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 107dcb: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 107dce: bf 86 00 00 00 mov $0x86,%edi <== NOT EXECUTED 107dd3: eb ac jmp 107d81 <== NOT EXECUTED =============================================================================== 00107b6c : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 107b6c: 55 push %ebp 107b6d: 89 e5 mov %esp,%ebp 107b6f: 83 ec 0c sub $0xc,%esp int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 107b72: 6a 00 push $0x0 107b74: 6a 00 push $0x0 107b76: 68 92 c0 11 00 push $0x11c092 107b7b: e8 4c 00 00 00 call 107bcc 107b80: 83 c4 10 add $0x10,%esp 107b83: 40 inc %eax 107b84: 74 41 je 107bc7 /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 107b86: 52 push %edx 107b87: 6a 00 push $0x0 107b89: 6a 01 push $0x1 107b8b: 68 92 c0 11 00 push $0x11c092 107b90: e8 37 00 00 00 call 107bcc 107b95: 83 c4 10 add $0x10,%esp 107b98: 40 inc %eax 107b99: 75 0a jne 107ba5 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 107b9b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107b9e: 68 31 44 54 55 push $0x55544431 <== NOT EXECUTED 107ba3: eb 1d jmp 107bc2 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 107ba5: 50 push %eax 107ba6: 6a 00 push $0x0 107ba8: 6a 01 push $0x1 107baa: 68 92 c0 11 00 push $0x11c092 107baf: e8 18 00 00 00 call 107bcc 107bb4: 83 c4 10 add $0x10,%esp 107bb7: 40 inc %eax 107bb8: 75 0d jne 107bc7 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 107bba: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107bbd: 68 32 44 54 55 push $0x55544432 <== NOT EXECUTED 107bc2: e8 dd 29 00 00 call 10a5a4 <== NOT EXECUTED } 107bc7: c9 leave 107bc8: c3 ret =============================================================================== 00108541 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 108541: 55 push %ebp 108542: 89 e5 mov %esp,%ebp 108544: 56 push %esi 108545: 53 push %ebx 108546: 83 ec 10 sub $0x10,%esp 108549: 89 d3 mov %edx,%ebx 10854b: 88 45 f4 mov %al,-0xc(%ebp) int i; if (tty->termios.c_oflag & OPOST) { 10854e: 8b 52 34 mov 0x34(%edx),%edx 108551: f6 c2 01 test $0x1,%dl 108554: 0f 84 ee 00 00 00 je 108648 <== NEVER TAKEN switch (c) { 10855a: 3c 09 cmp $0x9,%al 10855c: 74 76 je 1085d4 10855e: 77 0d ja 10856d <== ALWAYS TAKEN 108560: 3c 08 cmp $0x8,%al <== NOT EXECUTED 108562: 0f 85 ab 00 00 00 jne 108613 <== NOT EXECUTED 108568: e9 99 00 00 00 jmp 108606 <== NOT EXECUTED 10856d: 3c 0a cmp $0xa,%al 10856f: 74 0a je 10857b 108571: 3c 0d cmp $0xd,%al 108573: 0f 85 9a 00 00 00 jne 108613 <== ALWAYS TAKEN 108579: eb 33 jmp 1085ae <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 10857b: 80 e2 20 and $0x20,%dl 10857e: 74 07 je 108587 <== ALWAYS TAKEN tty->column = 0; 108580: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 108587: f6 43 34 04 testb $0x4,0x34(%ebx) 10858b: 0f 84 b7 00 00 00 je 108648 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); 108591: 56 push %esi 108592: 53 push %ebx 108593: 6a 01 push $0x1 108595: 68 59 d6 11 00 push $0x11d659 10859a: e8 82 fe ff ff call 108421 tty->column = 0; 10859f: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) 1085a6: 83 c4 10 add $0x10,%esp 1085a9: e9 9a 00 00 00 jmp 108648 } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 1085ae: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 1085b1: 74 0a je 1085bd <== NOT EXECUTED 1085b3: 83 7b 28 00 cmpl $0x0,0x28(%ebx) <== NOT EXECUTED 1085b7: 0f 84 9b 00 00 00 je 108658 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 1085bd: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 1085c0: 74 09 je 1085cb <== NOT EXECUTED c = '\n'; 1085c2: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 1085c6: 80 e2 20 and $0x20,%dl <== NOT EXECUTED 1085c9: 74 7d je 108648 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 1085cb: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED break; 1085d2: eb 74 jmp 108648 <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 1085d4: 8b 4b 28 mov 0x28(%ebx),%ecx 1085d7: 89 ce mov %ecx,%esi 1085d9: 83 e6 07 and $0x7,%esi 1085dc: b8 08 00 00 00 mov $0x8,%eax 1085e1: 29 f0 sub %esi,%eax if ((tty->termios.c_oflag & TABDLY) == XTABS) { 1085e3: 81 e2 00 18 00 00 and $0x1800,%edx 1085e9: 81 fa 00 18 00 00 cmp $0x1800,%edx 1085ef: 8d 14 08 lea (%eax,%ecx,1),%edx 1085f2: 75 0d jne 108601 <== NEVER TAKEN tty->column += i; 1085f4: 89 53 28 mov %edx,0x28(%ebx) rtems_termios_puts ( " ", i, tty); 1085f7: 51 push %ecx 1085f8: 53 push %ebx 1085f9: 50 push %eax 1085fa: 68 04 d3 11 00 push $0x11d304 1085ff: eb 4f jmp 108650 return; } tty->column += i; 108601: 89 53 28 mov %edx,0x28(%ebx) <== NOT EXECUTED break; 108604: eb 42 jmp 108648 <== NOT EXECUTED case '\b': if (tty->column > 0) 108606: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108609: 85 c0 test %eax,%eax <== NOT EXECUTED 10860b: 7e 3b jle 108648 <== NOT EXECUTED tty->column--; 10860d: 48 dec %eax <== NOT EXECUTED 10860e: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED 108611: eb 35 jmp 108648 <== NOT EXECUTED break; default: if (tty->termios.c_oflag & OLCUC) 108613: 80 e2 02 and $0x2,%dl 108616: 74 1c je 108634 <== ALWAYS TAKEN c = toupper(c); 108618: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10861b: 8b 15 a4 18 12 00 mov 0x1218a4,%edx <== NOT EXECUTED 108621: 0f be 54 02 01 movsbl 0x1(%edx,%eax,1),%edx <== NOT EXECUTED 108626: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 108629: 83 fa 02 cmp $0x2,%edx <== NOT EXECUTED 10862c: 75 03 jne 108631 <== NOT EXECUTED 10862e: 83 e8 20 sub $0x20,%eax <== NOT EXECUTED 108631: 88 45 f4 mov %al,-0xc(%ebp) <== NOT EXECUTED if (!iscntrl(c)) 108634: 0f b6 45 f4 movzbl -0xc(%ebp),%eax 108638: 8b 15 a4 18 12 00 mov 0x1218a4,%edx 10863e: f6 44 02 01 20 testb $0x20,0x1(%edx,%eax,1) 108643: 75 03 jne 108648 <== NEVER TAKEN tty->column++; 108645: ff 43 28 incl 0x28(%ebx) break; } } rtems_termios_puts (&c, 1, tty); 108648: 52 push %edx 108649: 53 push %ebx 10864a: 6a 01 push $0x1 10864c: 8d 45 f4 lea -0xc(%ebp),%eax 10864f: 50 push %eax 108650: e8 cc fd ff ff call 108421 108655: 83 c4 10 add $0x10,%esp } 108658: 8d 65 f8 lea -0x8(%ebp),%esp 10865b: 5b pop %ebx 10865c: 5e pop %esi 10865d: c9 leave 10865e: c3 ret =============================================================================== 0010ff40 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 10ff40: 55 push %ebp 10ff41: 89 e5 mov %esp,%ebp 10ff43: 57 push %edi 10ff44: 56 push %esi 10ff45: 53 push %ebx 10ff46: 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) 10ff49: 6a 01 push $0x1 10ff4b: 8d 5d c4 lea -0x3c(%ebp),%ebx 10ff4e: 53 push %ebx 10ff4f: 6a 07 push $0x7 10ff51: 6a 03 push $0x3 10ff53: 68 97 dc 11 00 push $0x11dc97 10ff58: e8 eb 71 ff ff call 107148 10ff5d: 83 c4 20 add $0x20,%esp 10ff60: 85 c0 test %eax,%eax 10ff62: 74 2b je 10ff8f <== NEVER TAKEN != 0) { if (errno != ENOENT) 10ff64: e8 fb 03 00 00 call 110364 <__errno> 10ff69: 83 38 02 cmpl $0x2,(%eax) 10ff6c: 0f 85 0c 01 00 00 jne 11007e <== NEVER TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 10ff72: 50 push %eax 10ff73: 50 push %eax 10ff74: 68 ff 03 00 00 push $0x3ff 10ff79: 68 97 dc 11 00 push $0x11dc97 10ff7e: e8 3d 75 ff ff call 1074c0 10ff83: 83 c4 10 add $0x10,%esp 10ff86: 85 c0 test %eax,%eax 10ff88: 74 1c je 10ffa6 <== ALWAYS TAKEN 10ff8a: e9 ef 00 00 00 jmp 11007e <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); 10ff8f: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10ff92: 85 c0 test %eax,%eax <== NOT EXECUTED 10ff94: 74 10 je 10ffa6 <== NOT EXECUTED 10ff96: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10ff99: 85 c0 test %eax,%eax <== NOT EXECUTED 10ff9b: 74 09 je 10ffa6 <== NOT EXECUTED 10ff9d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ffa0: 53 push %ebx <== NOT EXECUTED 10ffa1: ff d0 call *%eax <== NOT EXECUTED 10ffa3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 10ffa6: 8d 5d d9 lea -0x27(%ebp),%ebx 10ffa9: be 9c dc 11 00 mov $0x11dc9c,%esi 10ffae: b9 0a 00 00 00 mov $0xa,%ecx 10ffb3: 89 df mov %ebx,%edi 10ffb5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 10ffb7: 0f b7 05 04 37 12 00 movzwl 0x123704,%eax 10ffbe: 8d 50 01 lea 0x1(%eax),%edx 10ffc1: 66 89 15 04 37 12 00 mov %dx,0x123704 10ffc8: 57 push %edi 10ffc9: 50 push %eax 10ffca: 68 a7 dc 11 00 push $0x11dca7 10ffcf: 8d 45 e3 lea -0x1d(%ebp),%eax 10ffd2: 50 push %eax 10ffd3: e8 20 0d 00 00 call 110cf8 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 10ffd8: 59 pop %ecx 10ffd9: 5e pop %esi 10ffda: 68 80 01 00 00 push $0x180 10ffdf: 53 push %ebx 10ffe0: e8 f7 00 00 00 call 1100dc 10ffe5: 83 c4 10 add $0x10,%esp 10ffe8: 85 c0 test %eax,%eax 10ffea: 74 0a je 10fff6 <== ALWAYS TAKEN if (errno != EEXIST){ 10ffec: e8 73 03 00 00 call 110364 <__errno> <== NOT EXECUTED 10fff1: e9 88 00 00 00 jmp 11007e <== 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); 10fff6: 52 push %edx 10fff7: 52 push %edx 10fff8: 68 00 40 00 00 push $0x4000 10fffd: 53 push %ebx 10fffe: e8 c9 7b ff ff call 107bcc 110003: 8b 55 08 mov 0x8(%ebp),%edx 110006: 89 02 mov %eax,(%edx) if (filsdes[0] < 0) { 110008: 83 c4 10 add $0x10,%esp 11000b: 85 c0 test %eax,%eax 11000d: 79 0d jns 11001c <== NEVER TAKEN err = errno; 11000f: e8 50 03 00 00 call 110364 <__errno> 110014: 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); 110016: 83 ec 0c sub $0xc,%esp 110019: 53 push %ebx 11001a: eb 53 jmp 11006f } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 11001c: 31 d2 xor %edx,%edx <== NOT EXECUTED 11001e: 3b 05 24 fa 11 00 cmp 0x11fa24,%eax <== NOT EXECUTED 110024: 73 0b jae 110031 <== NOT EXECUTED 110026: 89 c2 mov %eax,%edx <== NOT EXECUTED 110028: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED 11002b: 03 15 f8 38 12 00 add 0x1238f8,%edx <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 110031: 83 62 14 fe andl $0xfffffffe,0x14(%edx) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 110035: 50 push %eax <== NOT EXECUTED 110036: 50 push %eax <== NOT EXECUTED 110037: 6a 01 push $0x1 <== NOT EXECUTED 110039: 8d 45 d9 lea -0x27(%ebp),%eax <== NOT EXECUTED 11003c: 50 push %eax <== NOT EXECUTED 11003d: e8 8a 7b ff ff call 107bcc <== NOT EXECUTED 110042: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 110045: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED if (filsdes[1] < 0) { 110048: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11004b: 31 f6 xor %esi,%esi <== NOT EXECUTED 11004d: 85 c0 test %eax,%eax <== NOT EXECUTED 11004f: 79 17 jns 110068 <== NOT EXECUTED err = errno; 110051: e8 0e 03 00 00 call 110364 <__errno> <== NOT EXECUTED 110056: 8b 30 mov (%eax),%esi <== NOT EXECUTED close(filsdes[0]); 110058: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11005b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 11005e: ff 30 pushl (%eax) <== NOT EXECUTED 110060: e8 63 db ff ff call 10dbc8 <== NOT EXECUTED 110065: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } unlink(fifopath); 110068: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11006b: 8d 45 d9 lea -0x27(%ebp),%eax <== NOT EXECUTED 11006e: 50 push %eax <== NOT EXECUTED 11006f: e8 84 00 00 00 call 1100f8 110074: 83 c4 10 add $0x10,%esp } rtems_set_errno_and_return_minus_one(err); 110077: e8 e8 02 00 00 call 110364 <__errno> 11007c: 89 30 mov %esi,(%eax) } 11007e: 83 c8 ff or $0xffffffff,%eax 110081: 8d 65 f4 lea -0xc(%ebp),%esp 110084: 5b pop %ebx 110085: 5e pop %esi 110086: 5f pop %edi 110087: c9 leave 110088: c3 ret =============================================================================== 0010f28d : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 10f28d: 55 push %ebp <== NOT EXECUTED 10f28e: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f290: 53 push %ebx <== NOT EXECUTED 10f291: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10f294: 89 c3 mov %eax,%ebx <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 10f296: ff 70 2c pushl 0x2c(%eax) <== NOT EXECUTED 10f299: e8 62 07 00 00 call 10fa00 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 10f29e: 59 pop %ecx <== NOT EXECUTED 10f29f: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f2a2: e8 59 07 00 00 call 10fa00 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 10f2a7: 5a pop %edx <== NOT EXECUTED 10f2a8: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f2ab: e8 ac ac ff ff call 109f5c <== NOT EXECUTED free(pipe->Buffer); 10f2b0: 58 pop %eax <== NOT EXECUTED 10f2b1: ff 33 pushl (%ebx) <== NOT EXECUTED 10f2b3: e8 38 7f ff ff call 1071f0 <== NOT EXECUTED free(pipe); 10f2b8: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10f2bb: e8 30 7f ff ff call 1071f0 <== NOT EXECUTED 10f2c0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10f2c3: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10f2c6: c9 leave <== NOT EXECUTED 10f2c7: c3 ret <== NOT EXECUTED =============================================================================== 0010ef43 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 10ef43: 55 push %ebp <== NOT EXECUTED 10ef44: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ef46: 56 push %esi <== NOT EXECUTED 10ef47: 53 push %ebx <== NOT EXECUTED 10ef48: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10ef4b: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED if (cmd == FIONREAD) { 10ef4e: b8 ea ff ff ff mov $0xffffffea,%eax <== NOT EXECUTED 10ef53: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) <== NOT EXECUTED 10ef5a: 75 36 jne 10ef92 <== NOT EXECUTED if (buffer == NULL) 10ef5c: b0 f2 mov $0xf2,%al <== NOT EXECUTED 10ef5e: 85 f6 test %esi,%esi <== NOT EXECUTED 10ef60: 74 30 je 10ef92 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 10ef62: 50 push %eax <== NOT EXECUTED 10ef63: 6a 00 push $0x0 <== NOT EXECUTED 10ef65: 6a 00 push $0x0 <== NOT EXECUTED 10ef67: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10ef6a: e8 7d b0 ff ff call 109fec <== NOT EXECUTED 10ef6f: 89 c2 mov %eax,%edx <== NOT EXECUTED 10ef71: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ef74: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED 10ef79: 85 d2 test %edx,%edx <== NOT EXECUTED 10ef7b: 75 15 jne 10ef92 <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 10ef7d: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10ef80: 89 06 mov %eax,(%esi) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10ef82: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ef85: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10ef88: e8 4b b1 ff ff call 10a0d8 <== NOT EXECUTED 10ef8d: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10ef8f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return -EINVAL; } 10ef92: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10ef95: 5b pop %ebx <== NOT EXECUTED 10ef96: 5e pop %esi <== NOT EXECUTED 10ef97: c9 leave <== NOT EXECUTED 10ef98: c3 ret <== NOT EXECUTED =============================================================================== 0010eeec : pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 10eeec: 55 push %ebp <== NOT EXECUTED 10eeed: 89 e5 mov %esp,%ebp <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 10eeef: b8 e3 ff ff ff mov $0xffffffe3,%eax <== NOT EXECUTED 10eef4: c9 leave <== NOT EXECUTED 10eef5: c3 ret <== NOT EXECUTED =============================================================================== 0010f12b : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 10f12b: 55 push %ebp <== NOT EXECUTED 10f12c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f12e: 57 push %edi <== NOT EXECUTED 10f12f: 56 push %esi <== NOT EXECUTED 10f130: 53 push %ebx <== NOT EXECUTED 10f131: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED 10f134: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 10f137: 6a 00 push $0x0 <== NOT EXECUTED 10f139: 6a 00 push $0x0 <== NOT EXECUTED 10f13b: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f13e: e8 a9 ae ff ff call 109fec <== NOT EXECUTED 10f143: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f146: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10f14d: 85 c0 test %eax,%eax <== NOT EXECUTED 10f14f: 0f 84 08 01 00 00 je 10f25d <== NOT EXECUTED 10f155: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED 10f15c: e9 21 01 00 00 jmp 10f282 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 10f161: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10f165: 0f 84 fe 00 00 00 je 10f269 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 10f16b: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10f16e: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10f172: 74 0a je 10f17e <== NOT EXECUTED 10f174: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 10f179: e9 ed 00 00 00 jmp 10f26b <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 10f17e: ff 43 18 incl 0x18(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10f181: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f184: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f187: e8 4c af ff ff call 10a0d8 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10f18c: 5a pop %edx <== NOT EXECUTED 10f18d: 59 pop %ecx <== NOT EXECUTED 10f18e: 6a 00 push $0x0 <== NOT EXECUTED 10f190: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f193: e8 20 09 00 00 call 10fab8 <== NOT EXECUTED 10f198: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10f19b: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10f19e: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10f1a0: f7 d6 not %esi <== NOT EXECUTED 10f1a2: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10f1a5: 6a 00 push $0x0 <== NOT EXECUTED 10f1a7: 6a 00 push $0x0 <== NOT EXECUTED 10f1a9: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f1ac: e8 3b ae ff ff call 109fec <== NOT EXECUTED 10f1b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f1b4: 85 c0 test %eax,%eax <== NOT EXECUTED 10f1b6: 74 0a je 10f1c2 <== NOT EXECUTED 10f1b8: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 10f1bd: e9 b7 00 00 00 jmp 10f279 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 10f1c2: ff 4b 18 decl 0x18(%ebx) <== NOT EXECUTED if (ret != 0) 10f1c5: 85 f6 test %esi,%esi <== NOT EXECUTED 10f1c7: 0f 85 9e 00 00 00 jne 10f26b <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 10f1cd: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 10f1d0: 85 d2 test %edx,%edx <== NOT EXECUTED 10f1d2: 74 8d je 10f161 <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 10f1d4: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10f1d7: 2b 45 d4 sub -0x2c(%ebp),%eax <== NOT EXECUTED 10f1da: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 10f1dd: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10f1df: 76 03 jbe 10f1e4 <== NOT EXECUTED 10f1e1: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 10f1e4: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED 10f1e7: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED 10f1ea: 29 f0 sub %esi,%eax <== NOT EXECUTED if (chunk > chunk1) { 10f1ec: 39 45 d0 cmp %eax,-0x30(%ebp) <== NOT EXECUTED 10f1ef: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 10f1f2: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 10f1f5: 8d 14 0f lea (%edi,%ecx,1),%edx <== NOT EXECUTED 10f1f8: 7e 1b jle 10f215 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 10f1fa: 03 33 add (%ebx),%esi <== NOT EXECUTED 10f1fc: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f1fe: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10f200: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 10f202: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10f205: 01 c2 add %eax,%edx <== NOT EXECUTED 10f207: 03 55 0c add 0xc(%ebp),%edx <== NOT EXECUTED 10f20a: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10f20d: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10f20f: 8b 33 mov (%ebx),%esi <== NOT EXECUTED 10f211: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f213: eb 07 jmp 10f21c <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 10f215: 03 33 add (%ebx),%esi <== NOT EXECUTED 10f217: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f219: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10f21c: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED pipe->Start += chunk; 10f21e: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10f221: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED pipe->Start %= pipe->Size; 10f224: 31 d2 xor %edx,%edx <== NOT EXECUTED 10f226: f7 73 04 divl 0x4(%ebx) <== NOT EXECUTED 10f229: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED pipe->Length -= chunk; 10f22c: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10f22f: 2b 45 d0 sub -0x30(%ebp),%eax <== NOT EXECUTED 10f232: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 10f235: 85 c0 test %eax,%eax <== NOT EXECUTED 10f237: 75 07 jne 10f240 <== NOT EXECUTED pipe->Start = 0; 10f239: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED if (pipe->waitingWriters > 0) 10f240: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) <== NOT EXECUTED 10f244: 74 11 je 10f257 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10f246: 50 push %eax <== NOT EXECUTED 10f247: 50 push %eax <== NOT EXECUTED 10f248: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f24b: 50 push %eax <== NOT EXECUTED 10f24c: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f24f: e8 0c 08 00 00 call 10fa60 <== NOT EXECUTED 10f254: 83 c4 10 add $0x10,%esp <== NOT EXECUTED read += chunk; 10f257: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10f25a: 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) { 10f25d: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 10f260: 39 7d d4 cmp %edi,-0x2c(%ebp) <== NOT EXECUTED 10f263: 0f 82 64 ff ff ff jb 10f1cd <== NOT EXECUTED 10f269: 31 f6 xor %esi,%esi <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 10f26b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f26e: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f271: e8 62 ae ff ff call 10a0d8 <== NOT EXECUTED 10f276: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_nolock: if (read > 0) 10f279: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10f27d: 7f 03 jg 10f282 <== NOT EXECUTED 10f27f: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED return read; return ret; } 10f282: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f285: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f288: 5b pop %ebx <== NOT EXECUTED 10f289: 5e pop %esi <== NOT EXECUTED 10f28a: 5f pop %edi <== NOT EXECUTED 10f28b: c9 leave <== NOT EXECUTED 10f28c: c3 ret <== NOT EXECUTED =============================================================================== 0010f2c8 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 10f2c8: 55 push %ebp <== NOT EXECUTED 10f2c9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f2cb: 57 push %edi <== NOT EXECUTED 10f2cc: 56 push %esi <== NOT EXECUTED 10f2cd: 53 push %ebx <== NOT EXECUTED 10f2ce: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED 10f2d1: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED pipe_control_t *pipe = *pipep; 10f2d4: 8b 1f mov (%edi),%ebx <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 10f2d6: 6a 00 push $0x0 <== NOT EXECUTED 10f2d8: 6a 00 push $0x0 <== NOT EXECUTED 10f2da: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f2dd: e8 0a ad ff ff call 109fec <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 10f2e2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f2e5: 85 c0 test %eax,%eax <== NOT EXECUTED 10f2e7: 75 34 jne 10f31d <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 10f2e9: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10f2ec: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 10f2ef: 89 c6 mov %eax,%esi <== NOT EXECUTED 10f2f1: 83 e6 06 and $0x6,%esi <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 10f2f4: a8 02 test $0x2,%al <== NOT EXECUTED 10f2f6: 74 03 je 10f2fb <== NOT EXECUTED pipe->Readers --; 10f2f8: ff 4b 10 decl 0x10(%ebx) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 10f2fb: f7 c6 04 00 00 00 test $0x4,%esi <== NOT EXECUTED 10f301: 74 03 je 10f306 <== NOT EXECUTED pipe->Writers --; 10f303: ff 4b 14 decl 0x14(%ebx) <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 10f306: 50 push %eax <== NOT EXECUTED 10f307: 6a 00 push $0x0 <== NOT EXECUTED 10f309: 6a 00 push $0x0 <== NOT EXECUTED 10f30b: ff 35 fc 36 12 00 pushl 0x1236fc <== NOT EXECUTED 10f311: e8 d6 ac ff ff call 109fec <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 10f316: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f319: 85 c0 test %eax,%eax <== NOT EXECUTED 10f31b: 74 09 je 10f326 <== NOT EXECUTED rtems_fatal_error_occurred(sc); 10f31d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f320: 50 push %eax <== NOT EXECUTED 10f321: e8 7e b2 ff ff call 10a5a4 <== NOT EXECUTED PIPE_UNLOCK(pipe); 10f326: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f329: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f32c: e8 a7 ad ff ff call 10a0d8 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 10f331: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10f334: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f337: 85 c0 test %eax,%eax <== NOT EXECUTED 10f339: 75 15 jne 10f350 <== NOT EXECUTED 10f33b: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10f33f: 75 0f jne 10f350 <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 10f341: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10f343: e8 45 ff ff ff call 10f28d <== NOT EXECUTED *pipep = NULL; 10f348: 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) { 10f34e: eb 30 jmp 10f380 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 10f350: 83 fe 04 cmp $0x4,%esi <== NOT EXECUTED 10f353: 74 0f je 10f364 <== NOT EXECUTED 10f355: 85 c0 test %eax,%eax <== NOT EXECUTED 10f357: 75 0b jne 10f364 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 10f359: 57 push %edi <== NOT EXECUTED 10f35a: 57 push %edi <== NOT EXECUTED 10f35b: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f35e: 50 push %eax <== NOT EXECUTED 10f35f: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f362: eb 14 jmp 10f378 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 10f364: 83 fe 02 cmp $0x2,%esi <== NOT EXECUTED 10f367: 74 17 je 10f380 <== NOT EXECUTED 10f369: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10f36d: 75 11 jne 10f380 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10f36f: 56 push %esi <== NOT EXECUTED 10f370: 56 push %esi <== NOT EXECUTED 10f371: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f374: 50 push %eax <== NOT EXECUTED 10f375: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f378: e8 e3 06 00 00 call 10fa60 <== NOT EXECUTED 10f37d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 10f380: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f383: ff 35 fc 36 12 00 pushl 0x1236fc <== NOT EXECUTED 10f389: e8 4a ad ff ff call 10a0d8 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 10f38e: 31 c0 xor %eax,%eax <== NOT EXECUTED 10f390: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f393: 5b pop %ebx <== NOT EXECUTED 10f394: 5e pop %esi <== NOT EXECUTED 10f395: 5f pop %edi <== NOT EXECUTED 10f396: c9 leave <== NOT EXECUTED 10f397: c3 ret <== NOT EXECUTED =============================================================================== 0010ef99 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 10ef99: 55 push %ebp <== NOT EXECUTED 10ef9a: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ef9c: 57 push %edi <== NOT EXECUTED 10ef9d: 56 push %esi <== NOT EXECUTED 10ef9e: 53 push %ebx <== NOT EXECUTED 10ef9f: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 10efa2: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 10efa5: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10efac: 83 7d 10 00 cmpl $0x0,0x10(%ebp) <== NOT EXECUTED 10efb0: 0f 84 6a 01 00 00 je 10f120 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 10efb6: 57 push %edi <== NOT EXECUTED 10efb7: 6a 00 push $0x0 <== NOT EXECUTED 10efb9: 6a 00 push $0x0 <== NOT EXECUTED 10efbb: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10efbe: e8 29 b0 ff ff call 109fec <== NOT EXECUTED 10efc3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10efc6: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED 10efcd: 85 c0 test %eax,%eax <== NOT EXECUTED 10efcf: 0f 85 4b 01 00 00 jne 10f120 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 10efd5: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10efd9: 75 11 jne 10efec <== NOT EXECUTED 10efdb: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED 10efe0: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10efe7: e9 1d 01 00 00 jmp 10f109 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 10efec: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 10efef: 3b 7b 04 cmp 0x4(%ebx),%edi <== NOT EXECUTED 10eff2: 76 05 jbe 10eff9 <== NOT EXECUTED 10eff4: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 10eff9: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10f000: e9 f6 00 00 00 jmp 10f0fb <== NOT EXECUTED while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 10f005: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10f008: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10f00c: 74 0a je 10f018 <== NOT EXECUTED 10f00e: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 10f013: e9 f1 00 00 00 jmp 10f109 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 10f018: ff 43 1c incl 0x1c(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10f01b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f01e: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f021: e8 b2 b0 ff ff call 10a0d8 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10f026: 59 pop %ecx <== NOT EXECUTED 10f027: 5e pop %esi <== NOT EXECUTED 10f028: 6a 00 push $0x0 <== NOT EXECUTED 10f02a: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f02d: e8 86 0a 00 00 call 10fab8 <== NOT EXECUTED 10f032: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10f035: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10f038: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10f03a: f7 d6 not %esi <== NOT EXECUTED 10f03c: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10f03f: 6a 00 push $0x0 <== NOT EXECUTED 10f041: 6a 00 push $0x0 <== NOT EXECUTED 10f043: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f046: e8 a1 af ff ff call 109fec <== NOT EXECUTED 10f04b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f04e: 85 c0 test %eax,%eax <== NOT EXECUTED 10f050: 74 0a je 10f05c <== NOT EXECUTED 10f052: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 10f057: e9 bb 00 00 00 jmp 10f117 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 10f05c: ff 4b 1c decl 0x1c(%ebx) <== NOT EXECUTED if (ret != 0) 10f05f: 85 f6 test %esi,%esi <== NOT EXECUTED 10f061: 0f 85 a2 00 00 00 jne 10f109 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 10f067: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10f06b: 75 0a jne 10f077 <== NOT EXECUTED 10f06d: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED 10f072: e9 92 00 00 00 jmp 10f109 <== 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) { 10f077: 8b 73 04 mov 0x4(%ebx),%esi <== NOT EXECUTED 10f07a: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10f07d: 89 f1 mov %esi,%ecx <== NOT EXECUTED 10f07f: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10f081: 39 f9 cmp %edi,%ecx <== NOT EXECUTED 10f083: 72 80 jb 10f005 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 10f085: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10f088: 2b 55 d4 sub -0x2c(%ebp),%edx <== NOT EXECUTED 10f08b: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED 10f08e: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 10f090: 76 03 jbe 10f095 <== NOT EXECUTED 10f092: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 10f095: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED 10f098: 31 d2 xor %edx,%edx <== NOT EXECUTED 10f09a: f7 f6 div %esi <== NOT EXECUTED 10f09c: 89 f0 mov %esi,%eax <== NOT EXECUTED 10f09e: 29 d0 sub %edx,%eax <== NOT EXECUTED if (chunk > chunk1) { 10f0a0: 39 45 d0 cmp %eax,-0x30(%ebp) <== NOT EXECUTED 10f0a3: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 10f0a6: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 10f0a9: 8d 34 0f lea (%edi,%ecx,1),%esi <== NOT EXECUTED 10f0ac: 7e 1c jle 10f0ca <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 10f0ae: 03 13 add (%ebx),%edx <== NOT EXECUTED 10f0b0: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f0b2: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10f0b4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 10f0b6: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 10f0b8: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10f0bb: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10f0bd: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED 10f0c0: 8d 34 38 lea (%eax,%edi,1),%esi <== NOT EXECUTED 10f0c3: 03 75 0c add 0xc(%ebp),%esi <== NOT EXECUTED 10f0c6: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f0c8: eb 07 jmp 10f0d1 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 10f0ca: 03 13 add (%ebx),%edx <== NOT EXECUTED 10f0cc: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f0ce: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10f0d1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED pipe->Length += chunk; 10f0d3: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10f0d6: 01 43 0c add %eax,0xc(%ebx) <== NOT EXECUTED if (pipe->waitingReaders > 0) 10f0d9: 83 7b 18 00 cmpl $0x0,0x18(%ebx) <== NOT EXECUTED 10f0dd: 74 11 je 10f0f0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10f0df: 52 push %edx <== NOT EXECUTED 10f0e0: 52 push %edx <== NOT EXECUTED 10f0e1: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 10f0e4: 51 push %ecx <== NOT EXECUTED 10f0e5: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f0e8: e8 73 09 00 00 call 10fa60 <== NOT EXECUTED 10f0ed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED written += chunk; 10f0f0: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED 10f0f3: 01 7d d4 add %edi,-0x2c(%ebp) <== NOT EXECUTED 10f0f6: 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) { 10f0fb: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10f0fe: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 10f101: 0f 82 70 ff ff ff jb 10f077 <== NOT EXECUTED 10f107: 31 f6 xor %esi,%esi <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 10f109: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f10c: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f10f: e8 c4 af ff ff call 10a0d8 <== NOT EXECUTED 10f114: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 10f117: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10f11b: 7f 03 jg 10f120 <== NOT EXECUTED 10f11d: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED return written; return ret; } 10f120: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f123: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f126: 5b pop %ebx <== NOT EXECUTED 10f127: 5e pop %esi <== NOT EXECUTED 10f128: 5f pop %edi <== NOT EXECUTED 10f129: c9 leave <== NOT EXECUTED 10f12a: c3 ret <== NOT EXECUTED =============================================================================== 0010a490 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 10a490: 55 push %ebp 10a491: 89 e5 mov %esp,%ebp 10a493: 53 push %ebx 10a494: 83 ec 04 sub $0x4,%esp 10a497: 8b 55 08 mov 0x8(%ebp),%edx 10a49a: 8b 45 0c mov 0xc(%ebp),%eax 10a49d: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Update call statistics */ MSBUMP(memalign_calls, 1); 10a4a0: ff 05 2c 99 12 00 incl 0x12992c if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 10a4a6: 8d 58 ff lea -0x1(%eax),%ebx 10a4a9: 85 c3 test %eax,%ebx 10a4ab: 75 05 jne 10a4b2 <== NEVER TAKEN 10a4ad: 83 f8 03 cmp $0x3,%eax 10a4b0: 77 09 ja 10a4bb /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 10a4b2: b8 16 00 00 00 mov $0x16,%eax 10a4b7: 5a pop %edx 10a4b8: 5b pop %ebx 10a4b9: c9 leave 10a4ba: c3 ret /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10a4bb: 89 4d 10 mov %ecx,0x10(%ebp) 10a4be: 89 45 0c mov %eax,0xc(%ebp) 10a4c1: 89 55 08 mov %edx,0x8(%ebp) } 10a4c4: 58 pop %eax 10a4c5: 5b pop %ebx 10a4c6: c9 leave /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10a4c7: e9 10 01 00 00 jmp 10a5dc =============================================================================== 0011b858 : ssize_t read( int fd, void *buffer, size_t count ) { 11b858: 55 push %ebp 11b859: 89 e5 mov %esp,%ebp 11b85b: 56 push %esi 11b85c: 53 push %ebx 11b85d: 8b 5d 08 mov 0x8(%ebp),%ebx 11b860: 8b 55 0c mov 0xc(%ebp),%edx 11b863: 8b 4d 10 mov 0x10(%ebp),%ecx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11b866: 3b 1d 24 fa 11 00 cmp 0x11fa24,%ebx 11b86c: 73 14 jae 11b882 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11b86e: c1 e3 06 shl $0x6,%ebx 11b871: 03 1d f8 38 12 00 add 0x1238f8,%ebx rtems_libio_check_is_open( iop ); 11b877: 8b 73 14 mov 0x14(%ebx),%esi 11b87a: f7 c6 00 01 00 00 test $0x100,%esi 11b880: 75 0d jne 11b88f 11b882: e8 dd 4a ff ff call 110364 <__errno> 11b887: c7 00 09 00 00 00 movl $0x9,(%eax) 11b88d: eb 31 jmp 11b8c0 rtems_libio_check_buffer( buffer ); 11b88f: 85 d2 test %edx,%edx 11b891: 74 0b je 11b89e <== NEVER TAKEN rtems_libio_check_count( count ); 11b893: 31 c0 xor %eax,%eax 11b895: 85 c9 test %ecx,%ecx 11b897: 74 44 je 11b8dd <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11b899: 83 e6 02 and $0x2,%esi 11b89c: 75 0d jne 11b8ab <== ALWAYS TAKEN 11b89e: e8 c1 4a ff ff call 110364 <__errno> <== NOT EXECUTED 11b8a3: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11b8a9: eb 15 jmp 11b8c0 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 11b8ab: 8b 43 3c mov 0x3c(%ebx),%eax 11b8ae: 8b 40 08 mov 0x8(%eax),%eax 11b8b1: 85 c0 test %eax,%eax 11b8b3: 75 10 jne 11b8c5 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11b8b5: e8 aa 4a ff ff call 110364 <__errno> <== NOT EXECUTED 11b8ba: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11b8c0: 83 c8 ff or $0xffffffff,%eax 11b8c3: eb 18 jmp 11b8dd rc = (*iop->handlers->read_h)( iop, buffer, count ); 11b8c5: 56 push %esi 11b8c6: 51 push %ecx 11b8c7: 52 push %edx 11b8c8: 53 push %ebx 11b8c9: ff d0 call *%eax if ( rc > 0 ) 11b8cb: 83 c4 10 add $0x10,%esp 11b8ce: 85 c0 test %eax,%eax 11b8d0: 7e 0b jle 11b8dd iop->offset += rc; 11b8d2: 89 c1 mov %eax,%ecx 11b8d4: c1 f9 1f sar $0x1f,%ecx 11b8d7: 01 43 0c add %eax,0xc(%ebx) 11b8da: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11b8dd: 8d 65 f8 lea -0x8(%ebp),%esp 11b8e0: 5b pop %ebx 11b8e1: 5e pop %esi 11b8e2: c9 leave 11b8e3: c3 ret =============================================================================== 0010a040 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 10a040: 55 push %ebp 10a041: 89 e5 mov %esp,%ebp 10a043: 57 push %edi 10a044: 56 push %esi 10a045: 53 push %ebx 10a046: 83 ec 2c sub $0x2c,%esp 10a049: 8b 55 08 mov 0x8(%ebp),%edx 10a04c: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if (!buf) 10a04f: 85 db test %ebx,%ebx 10a051: 75 0d jne 10a060 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 10a053: e8 28 9b 00 00 call 113b80 <__errno> <== NOT EXECUTED 10a058: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10a05e: eb 51 jmp 10a0b1 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 10a060: 31 c0 xor %eax,%eax 10a062: 83 c9 ff or $0xffffffff,%ecx 10a065: 89 d7 mov %edx,%edi 10a067: f2 ae repnz scas %es:(%edi),%al 10a069: f7 d1 not %ecx 10a06b: 49 dec %ecx 10a06c: 83 ec 0c sub $0xc,%esp 10a06f: 6a 00 push $0x0 10a071: 8d 75 d4 lea -0x2c(%ebp),%esi 10a074: 56 push %esi 10a075: 6a 00 push $0x0 10a077: 51 push %ecx 10a078: 52 push %edx 10a079: e8 f6 ef ff ff call 109074 0, &loc, false ); if ( result != 0 ) 10a07e: 83 c4 20 add $0x20,%esp 10a081: 83 cf ff or $0xffffffff,%edi 10a084: 85 c0 test %eax,%eax 10a086: 0f 85 8c 00 00 00 jne 10a118 <== NEVER TAKEN return -1; if ( !loc.ops->node_type_h ){ 10a08c: 8b 55 e0 mov -0x20(%ebp),%edx 10a08f: 8b 42 10 mov 0x10(%edx),%eax 10a092: 85 c0 test %eax,%eax 10a094: 75 20 jne 10a0b6 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10a096: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10a099: 85 c0 test %eax,%eax <== NOT EXECUTED 10a09b: 74 09 je 10a0a6 <== NOT EXECUTED 10a09d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a0a0: 56 push %esi <== NOT EXECUTED 10a0a1: ff d0 call *%eax <== NOT EXECUTED 10a0a3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a0a6: e8 d5 9a 00 00 call 113b80 <__errno> <== NOT EXECUTED 10a0ab: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10a0b1: 83 cf ff or $0xffffffff,%edi 10a0b4: eb 62 jmp 10a118 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 10a0b6: 83 ec 0c sub $0xc,%esp 10a0b9: 56 push %esi 10a0ba: ff d0 call *%eax 10a0bc: 83 c4 10 add $0x10,%esp 10a0bf: 83 f8 04 cmp $0x4,%eax 10a0c2: 8b 45 e0 mov -0x20(%ebp),%eax 10a0c5: 74 21 je 10a0e8 rtems_filesystem_freenode( &loc ); 10a0c7: 85 c0 test %eax,%eax 10a0c9: 74 10 je 10a0db <== NEVER TAKEN 10a0cb: 8b 40 1c mov 0x1c(%eax),%eax 10a0ce: 85 c0 test %eax,%eax 10a0d0: 74 09 je 10a0db <== NEVER TAKEN 10a0d2: 83 ec 0c sub $0xc,%esp 10a0d5: 56 push %esi 10a0d6: ff d0 call *%eax 10a0d8: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EINVAL ); 10a0db: e8 a0 9a 00 00 call 113b80 <__errno> 10a0e0: c7 00 16 00 00 00 movl $0x16,(%eax) 10a0e6: eb c9 jmp 10a0b1 } if ( !loc.ops->readlink_h ){ 10a0e8: 8b 50 3c mov 0x3c(%eax),%edx 10a0eb: 85 d2 test %edx,%edx 10a0ed: 75 05 jne 10a0f4 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10a0ef: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10a0f2: eb a5 jmp 10a099 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 10a0f4: 50 push %eax 10a0f5: ff 75 10 pushl 0x10(%ebp) 10a0f8: 53 push %ebx 10a0f9: 56 push %esi 10a0fa: ff d2 call *%edx 10a0fc: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &loc ); 10a0fe: 8b 45 e0 mov -0x20(%ebp),%eax 10a101: 83 c4 10 add $0x10,%esp 10a104: 85 c0 test %eax,%eax 10a106: 74 10 je 10a118 <== NEVER TAKEN 10a108: 8b 40 1c mov 0x1c(%eax),%eax 10a10b: 85 c0 test %eax,%eax 10a10d: 74 09 je 10a118 <== NEVER TAKEN 10a10f: 83 ec 0c sub $0xc,%esp 10a112: 56 push %esi 10a113: ff d0 call *%eax 10a115: 83 c4 10 add $0x10,%esp return result; } 10a118: 89 f8 mov %edi,%eax 10a11a: 8d 65 f4 lea -0xc(%ebp),%esp 10a11d: 5b pop %ebx 10a11e: 5e pop %esi 10a11f: 5f pop %edi 10a120: c9 leave 10a121: c3 ret =============================================================================== 00108d38 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 108d38: 55 push %ebp 108d39: 89 e5 mov %esp,%ebp 108d3b: 57 push %edi 108d3c: 56 push %esi 108d3d: 53 push %ebx 108d3e: 83 ec 2c sub $0x2c,%esp 108d41: 8b 75 08 mov 0x8(%ebp),%esi 108d44: 8b 7d 0c mov 0xc(%ebp),%edi int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 108d47: 3b 35 44 31 12 00 cmp 0x123144,%esi 108d4d: 73 11 jae 108d60 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 108d4f: c1 e6 06 shl $0x6,%esi 108d52: 03 35 f0 77 12 00 add 0x1277f0,%esi rtems_libio_check_is_open( iop ); 108d58: 8b 46 14 mov 0x14(%esi),%eax 108d5b: f6 c4 01 test $0x1,%ah 108d5e: 75 10 jne 108d70 <== ALWAYS TAKEN 108d60: e8 5f 94 00 00 call 1121c4 <__errno> <== NOT EXECUTED 108d65: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 108d6b: e9 95 00 00 00 jmp 108e05 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 108d70: a8 02 test $0x2,%al 108d72: 74 46 je 108dba <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 108d74: 85 ff test %edi,%edi 108d76: 74 42 je 108dba rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 108d78: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 108d7c: 7e 3c jle 108dba rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 108d7e: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 108d85: 7f 33 jg 108dba <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 108d87: 8b 46 3c mov 0x3c(%esi),%eax 108d8a: 83 78 08 00 cmpl $0x0,0x8(%eax) 108d8e: 75 0d jne 108d9d <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 108d90: e8 2f 94 00 00 call 1121c4 <__errno> <== NOT EXECUTED 108d95: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108d9b: eb 68 jmp 108e05 <== NOT EXECUTED 108d9d: b2 01 mov $0x1,%dl 108d9f: 31 c0 xor %eax,%eax 108da1: 31 c9 xor %ecx,%ecx 108da3: 89 75 d4 mov %esi,-0x2c(%ebp) all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 108da6: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8) 108daa: 74 0e je 108dba if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 108dac: 8b 5c c7 04 mov 0x4(%edi,%eax,8),%ebx 108db0: 8d 34 19 lea (%ecx,%ebx,1),%esi 108db3: 89 75 e4 mov %esi,-0x1c(%ebp) if ( total < old ) 108db6: 39 ce cmp %ecx,%esi 108db8: 7d 0d jge 108dc7 rtems_set_errno_and_return_minus_one( EINVAL ); 108dba: e8 05 94 00 00 call 1121c4 <__errno> 108dbf: c7 00 16 00 00 00 movl $0x16,(%eax) 108dc5: eb 3e jmp 108e05 if ( iov[v].iov_len ) 108dc7: 85 db test %ebx,%ebx 108dc9: 0f 94 c1 sete %cl 108dcc: f7 d9 neg %ecx 108dce: 21 ca and %ecx,%edx * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 108dd0: 40 inc %eax 108dd1: 3b 45 10 cmp 0x10(%ebp),%eax 108dd4: 7d 05 jge 108ddb 108dd6: 8b 4d e4 mov -0x1c(%ebp),%ecx 108dd9: eb cb jmp 108da6 108ddb: 8b 75 d4 mov -0x2c(%ebp),%esi /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { 108dde: 31 db xor %ebx,%ebx 108de0: 84 d2 test %dl,%dl 108de2: 75 49 jne 108e2d 108de4: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 108deb: 50 push %eax 108dec: 8b 46 3c mov 0x3c(%esi),%eax 108def: 8b 55 e4 mov -0x1c(%ebp),%edx 108df2: ff 74 d7 04 pushl 0x4(%edi,%edx,8) 108df6: ff 34 d7 pushl (%edi,%edx,8) 108df9: 56 push %esi 108dfa: ff 50 08 call *0x8(%eax) if ( bytes < 0 ) 108dfd: 83 c4 10 add $0x10,%esp 108e00: 83 f8 00 cmp $0x0,%eax 108e03: 7d 05 jge 108e0a <== ALWAYS TAKEN 108e05: 83 cb ff or $0xffffffff,%ebx 108e08: eb 23 jmp 108e2d return -1; if ( bytes > 0 ) { 108e0a: 74 0d je 108e19 <== NEVER TAKEN iop->offset += bytes; 108e0c: 89 c1 mov %eax,%ecx 108e0e: c1 f9 1f sar $0x1f,%ecx 108e11: 01 46 0c add %eax,0xc(%esi) 108e14: 11 4e 10 adc %ecx,0x10(%esi) total += bytes; 108e17: 01 c3 add %eax,%ebx } if (bytes != iov[ v ].iov_len) 108e19: 8b 55 e4 mov -0x1c(%ebp),%edx 108e1c: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax 108e20: 75 0b jne 108e2d <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 108e22: 42 inc %edx 108e23: 89 55 e4 mov %edx,-0x1c(%ebp) 108e26: 8b 45 10 mov 0x10(%ebp),%eax 108e29: 39 c2 cmp %eax,%edx 108e2b: 7c be jl 108deb if (bytes != iov[ v ].iov_len) break; } return total; } 108e2d: 89 d8 mov %ebx,%eax 108e2f: 8d 65 f4 lea -0xc(%ebp),%esp 108e32: 5b pop %ebx 108e33: 5e pop %esi 108e34: 5f pop %edi 108e35: c9 leave 108e36: c3 ret =============================================================================== 0011b964 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 11b964: 55 push %ebp 11b965: 89 e5 mov %esp,%ebp 11b967: 57 push %edi 11b968: 56 push %esi 11b969: 53 push %ebx 11b96a: 83 ec 2c sub $0x2c,%esp 11b96d: 8b 5d 08 mov 0x8(%ebp),%ebx 11b970: 8b 75 0c mov 0xc(%ebp),%esi 11b973: ff 05 20 39 12 00 incl 0x123920 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11b979: 83 3d ec 3b 12 00 03 cmpl $0x3,0x123bec 11b980: 75 1a jne 11b99c <== NEVER TAKEN if (_Thread_Dispatch_disable_level > 0) 11b982: a1 54 3a 12 00 mov 0x123a54,%eax 11b987: 85 c0 test %eax,%eax 11b989: 0f 85 a7 00 00 00 jne 11ba36 <== NEVER TAKEN return (void *) 0; if (_ISR_Nest_level > 0) 11b98f: a1 ec 3a 12 00 mov 0x123aec,%eax 11b994: 85 c0 test %eax,%eax 11b996: 0f 85 9a 00 00 00 jne 11ba36 <== NEVER TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 11b99c: 85 db test %ebx,%ebx 11b99e: 75 0e jne 11b9ae return malloc( size ); 11b9a0: 83 ec 0c sub $0xc,%esp 11b9a3: 56 push %esi 11b9a4: e8 73 ba fe ff call 10741c 11b9a9: e9 81 00 00 00 jmp 11ba2f if ( !size ) { 11b9ae: 85 f6 test %esi,%esi 11b9b0: 75 0d jne 11b9bf <== ALWAYS TAKEN free( ptr ); 11b9b2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11b9b5: 53 push %ebx <== NOT EXECUTED 11b9b6: e8 35 b8 fe ff call 1071f0 <== NOT EXECUTED 11b9bb: 31 db xor %ebx,%ebx <== NOT EXECUTED 11b9bd: eb 72 jmp 11ba31 <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 11b9bf: 52 push %edx 11b9c0: 8d 45 e4 lea -0x1c(%ebp),%eax 11b9c3: 50 push %eax 11b9c4: 53 push %ebx 11b9c5: ff 35 30 fa 11 00 pushl 0x11fa30 11b9cb: e8 00 01 00 00 call 11bad0 <_Protected_heap_Get_block_size> 11b9d0: 83 c4 10 add $0x10,%esp 11b9d3: 84 c0 test %al,%al 11b9d5: 75 0d jne 11b9e4 errno = EINVAL; 11b9d7: e8 88 49 ff ff call 110364 <__errno> 11b9dc: c7 00 16 00 00 00 movl $0x16,(%eax) 11b9e2: eb 52 jmp 11ba36 #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 ) ) { 11b9e4: 50 push %eax 11b9e5: 56 push %esi 11b9e6: 53 push %ebx 11b9e7: ff 35 30 fa 11 00 pushl 0x11fa30 11b9ed: e8 16 01 00 00 call 11bb08 <_Protected_heap_Resize_block> 11b9f2: 83 c4 10 add $0x10,%esp 11b9f5: 84 c0 test %al,%al 11b9f7: 75 3f jne 11ba38 * 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 ); 11b9f9: 83 ec 0c sub $0xc,%esp 11b9fc: 56 push %esi 11b9fd: e8 1a ba fe ff call 10741c MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11ba02: ff 0d 14 39 12 00 decl 0x123914 if ( !new_area ) { 11ba08: 83 c4 10 add $0x10,%esp 11ba0b: 85 c0 test %eax,%eax 11ba0d: 74 27 je 11ba36 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11ba0f: 8b 55 e4 mov -0x1c(%ebp),%edx 11ba12: 89 f1 mov %esi,%ecx 11ba14: 39 d6 cmp %edx,%esi 11ba16: 76 02 jbe 11ba1a <== NEVER TAKEN 11ba18: 89 d1 mov %edx,%ecx 11ba1a: 89 c7 mov %eax,%edi 11ba1c: 89 de mov %ebx,%esi 11ba1e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) free( ptr ); 11ba20: 83 ec 0c sub $0xc,%esp 11ba23: 53 push %ebx 11ba24: 89 45 d4 mov %eax,-0x2c(%ebp) 11ba27: e8 c4 b7 fe ff call 1071f0 11ba2c: 8b 45 d4 mov -0x2c(%ebp),%eax 11ba2f: 89 c3 mov %eax,%ebx return new_area; 11ba31: 83 c4 10 add $0x10,%esp 11ba34: eb 02 jmp 11ba38 11ba36: 31 db xor %ebx,%ebx } 11ba38: 89 d8 mov %ebx,%eax 11ba3a: 8d 65 f4 lea -0xc(%ebp),%esp 11ba3d: 5b pop %ebx 11ba3e: 5e pop %esi 11ba3f: 5f pop %edi 11ba40: c9 leave 11ba41: c3 ret =============================================================================== 0010ad7c : #include int rmdir( const char *pathname ) { 10ad7c: 55 push %ebp 10ad7d: 89 e5 mov %esp,%ebp 10ad7f: 57 push %edi 10ad80: 56 push %esi 10ad81: 53 push %ebx 10ad82: 83 ec 58 sub $0x58,%esp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 10ad85: ff 75 08 pushl 0x8(%ebp) 10ad88: e8 12 eb ff ff call 10989f 10ad8d: 89 c2 mov %eax,%edx if ( parentpathlen == 0 ) 10ad8f: 83 c4 10 add $0x10,%esp 10ad92: 85 c0 test %eax,%eax 10ad94: 75 36 jne 10adcc rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 10ad96: 8b 4d 08 mov 0x8(%ebp),%ecx 10ad99: 8a 01 mov (%ecx),%al 10ad9b: 3c 5c cmp $0x5c,%al 10ad9d: 74 08 je 10ada7 <== NEVER TAKEN 10ad9f: 3c 2f cmp $0x2f,%al 10ada1: 74 04 je 10ada7 <== ALWAYS TAKEN 10ada3: 84 c0 test %al,%al <== NOT EXECUTED 10ada5: 75 0e jne 10adb5 <== NOT EXECUTED 10ada7: 8d 7d d4 lea -0x2c(%ebp),%edi 10adaa: 8b 35 68 7f 12 00 mov 0x127f68,%esi 10adb0: 83 c6 18 add $0x18,%esi 10adb3: eb 0c jmp 10adc1 10adb5: 8d 7d d4 lea -0x2c(%ebp),%edi <== NOT EXECUTED 10adb8: 8b 35 68 7f 12 00 mov 0x127f68,%esi <== NOT EXECUTED 10adbe: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10adc1: b9 05 00 00 00 mov $0x5,%ecx 10adc6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10adc8: 31 db xor %ebx,%ebx 10adca: eb 27 jmp 10adf3 else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 10adcc: 83 ec 0c sub $0xc,%esp 10adcf: 6a 00 push $0x0 10add1: 8d 45 d4 lea -0x2c(%ebp),%eax 10add4: 50 push %eax 10add5: 6a 02 push $0x2 10add7: 52 push %edx 10add8: ff 75 08 pushl 0x8(%ebp) 10addb: 89 55 b4 mov %edx,-0x4c(%ebp) 10adde: e8 a9 eb ff ff call 10998c RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 10ade3: 83 c4 20 add $0x20,%esp 10ade6: 85 c0 test %eax,%eax 10ade8: 8b 55 b4 mov -0x4c(%ebp),%edx 10adeb: 0f 85 72 01 00 00 jne 10af63 <== NEVER TAKEN 10adf1: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 10adf3: 8d 7d c0 lea -0x40(%ebp),%edi 10adf6: 8d 75 d4 lea -0x2c(%ebp),%esi 10adf9: b9 05 00 00 00 mov $0x5,%ecx 10adfe: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = pathname + parentpathlen; 10ae00: 8b 75 08 mov 0x8(%ebp),%esi 10ae03: 01 d6 add %edx,%esi name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10ae05: 83 c9 ff or $0xffffffff,%ecx 10ae08: 89 f7 mov %esi,%edi 10ae0a: 31 c0 xor %eax,%eax 10ae0c: f2 ae repnz scas %es:(%edi),%al 10ae0e: f7 d1 not %ecx 10ae10: 49 dec %ecx 10ae11: 57 push %edi 10ae12: 57 push %edi 10ae13: 51 push %ecx 10ae14: 56 push %esi 10ae15: e8 5e ea ff ff call 109878 10ae1a: 01 c6 add %eax,%esi result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10ae1c: 83 c9 ff or $0xffffffff,%ecx 10ae1f: 89 f7 mov %esi,%edi 10ae21: 31 c0 xor %eax,%eax 10ae23: f2 ae repnz scas %es:(%edi),%al 10ae25: f7 d1 not %ecx 10ae27: 49 dec %ecx 10ae28: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10ae2f: 8d 7d c0 lea -0x40(%ebp),%edi 10ae32: 57 push %edi 10ae33: 6a 00 push $0x0 10ae35: 51 push %ecx 10ae36: 56 push %esi 10ae37: e8 96 ea ff ff call 1098d2 0, &loc, false ); if ( result != 0 ) { 10ae3c: 83 c4 20 add $0x20,%esp 10ae3f: 85 c0 test %eax,%eax 10ae41: 74 2f je 10ae72 if ( free_parentloc ) 10ae43: 84 db test %bl,%bl 10ae45: 0f 84 18 01 00 00 je 10af63 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 10ae4b: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10ae4e: 85 c0 test %eax,%eax <== NOT EXECUTED 10ae50: 0f 84 0d 01 00 00 je 10af63 <== NOT EXECUTED 10ae56: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10ae59: 85 c0 test %eax,%eax <== NOT EXECUTED 10ae5b: 0f 84 02 01 00 00 je 10af63 <== NOT EXECUTED 10ae61: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ae64: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED 10ae67: 52 push %edx <== NOT EXECUTED 10ae68: ff d0 call *%eax <== NOT EXECUTED 10ae6a: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 10ae6d: e9 ec 00 00 00 jmp 10af5e <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 10ae72: 8b 55 cc mov -0x34(%ebp),%edx 10ae75: 8b 42 10 mov 0x10(%edx),%eax 10ae78: 85 c0 test %eax,%eax 10ae7a: 75 05 jne 10ae81 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10ae7c: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10ae7f: eb 65 jmp 10aee6 <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 10ae81: 83 ec 0c sub $0xc,%esp 10ae84: 57 push %edi 10ae85: ff d0 call *%eax 10ae87: 83 c4 10 add $0x10,%esp 10ae8a: 48 dec %eax 10ae8b: 74 45 je 10aed2 rtems_filesystem_freenode( &loc ); 10ae8d: 8b 45 cc mov -0x34(%ebp),%eax 10ae90: 85 c0 test %eax,%eax 10ae92: 74 10 je 10aea4 <== NEVER TAKEN 10ae94: 8b 40 1c mov 0x1c(%eax),%eax 10ae97: 85 c0 test %eax,%eax 10ae99: 74 09 je 10aea4 <== NEVER TAKEN 10ae9b: 83 ec 0c sub $0xc,%esp 10ae9e: 57 push %edi 10ae9f: ff d0 call *%eax 10aea1: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 10aea4: 84 db test %bl,%bl 10aea6: 74 1a je 10aec2 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 10aea8: 8b 45 e0 mov -0x20(%ebp),%eax 10aeab: 85 c0 test %eax,%eax 10aead: 74 13 je 10aec2 <== NEVER TAKEN 10aeaf: 8b 40 1c mov 0x1c(%eax),%eax 10aeb2: 85 c0 test %eax,%eax 10aeb4: 74 0c je 10aec2 <== NEVER TAKEN 10aeb6: 83 ec 0c sub $0xc,%esp 10aeb9: 8d 55 d4 lea -0x2c(%ebp),%edx 10aebc: 52 push %edx 10aebd: ff d0 call *%eax 10aebf: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 10aec2: e8 b1 95 00 00 call 114478 <__errno> 10aec7: c7 00 14 00 00 00 movl $0x14,(%eax) 10aecd: e9 91 00 00 00 jmp 10af63 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 10aed2: 8b 45 c8 mov -0x38(%ebp),%eax 10aed5: 8b 40 34 mov 0x34(%eax),%eax 10aed8: 85 c0 test %eax,%eax 10aeda: 75 42 jne 10af1e <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10aedc: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10aedf: 85 c0 test %eax,%eax <== NOT EXECUTED 10aee1: 74 10 je 10aef3 <== NOT EXECUTED 10aee3: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10aee6: 85 c0 test %eax,%eax <== NOT EXECUTED 10aee8: 74 09 je 10aef3 <== NOT EXECUTED 10aeea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aeed: 57 push %edi <== NOT EXECUTED 10aeee: ff d0 call *%eax <== NOT EXECUTED 10aef0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 10aef3: 84 db test %bl,%bl <== NOT EXECUTED 10aef5: 74 1a je 10af11 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 10aef7: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10aefa: 85 c0 test %eax,%eax <== NOT EXECUTED 10aefc: 74 13 je 10af11 <== NOT EXECUTED 10aefe: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10af01: 85 c0 test %eax,%eax <== NOT EXECUTED 10af03: 74 0c je 10af11 <== NOT EXECUTED 10af05: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10af08: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED 10af0b: 52 push %edx <== NOT EXECUTED 10af0c: ff d0 call *%eax <== NOT EXECUTED 10af0e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10af11: e8 62 95 00 00 call 114478 <__errno> <== NOT EXECUTED 10af16: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10af1c: eb 45 jmp 10af63 <== NOT EXECUTED } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 10af1e: 52 push %edx 10af1f: 52 push %edx 10af20: 57 push %edi 10af21: 8d 55 d4 lea -0x2c(%ebp),%edx 10af24: 52 push %edx 10af25: ff d0 call *%eax 10af27: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10af29: 8b 45 cc mov -0x34(%ebp),%eax 10af2c: 83 c4 10 add $0x10,%esp 10af2f: 85 c0 test %eax,%eax 10af31: 74 10 je 10af43 <== NEVER TAKEN 10af33: 8b 40 1c mov 0x1c(%eax),%eax 10af36: 85 c0 test %eax,%eax 10af38: 74 09 je 10af43 <== NEVER TAKEN 10af3a: 83 ec 0c sub $0xc,%esp 10af3d: 57 push %edi 10af3e: ff d0 call *%eax 10af40: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 10af43: 84 db test %bl,%bl 10af45: 74 1f je 10af66 rtems_filesystem_freenode( &parentloc ); 10af47: 8b 45 e0 mov -0x20(%ebp),%eax 10af4a: 85 c0 test %eax,%eax 10af4c: 74 18 je 10af66 <== NEVER TAKEN 10af4e: 8b 40 1c mov 0x1c(%eax),%eax 10af51: 85 c0 test %eax,%eax 10af53: 74 11 je 10af66 <== NEVER TAKEN 10af55: 83 ec 0c sub $0xc,%esp 10af58: 8d 55 d4 lea -0x2c(%ebp),%edx 10af5b: 52 push %edx 10af5c: ff d0 call *%eax 10af5e: 83 c4 10 add $0x10,%esp 10af61: eb 03 jmp 10af66 10af63: 83 ce ff or $0xffffffff,%esi return result; } 10af66: 89 f0 mov %esi,%eax 10af68: 8d 65 f4 lea -0xc(%ebp),%esp 10af6b: 5b pop %ebx 10af6c: 5e pop %esi 10af6d: 5f pop %edi 10af6e: c9 leave 10af6f: c3 ret =============================================================================== 00115af8 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 115af8: 55 push %ebp <== NOT EXECUTED 115af9: 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; } 115afb: b8 08 80 12 00 mov $0x128008,%eax <== NOT EXECUTED 115b00: c9 leave <== NOT EXECUTED 115b01: c3 ret <== NOT EXECUTED =============================================================================== 00113340 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 113340: 55 push %ebp 113341: 89 e5 mov %esp,%ebp 113343: 53 push %ebx 113344: 83 ec 0c sub $0xc,%esp 113347: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 11334a: 53 push %ebx 11334b: ff 75 08 pushl 0x8(%ebp) 11334e: e8 1d 00 00 00 call 113370 if (nap) 113353: 83 c4 10 add $0x10,%esp 113356: 85 c0 test %eax,%eax 113358: 74 07 je 113361 <== NEVER TAKEN return nap->name; 11335a: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(local_value); } 11335c: 8b 5d fc mov -0x4(%ebp),%ebx 11335f: c9 leave 113360: c3 ret nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 113361: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } 113364: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 113367: 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); 113368: e9 8b 27 00 00 jmp 115af8 <== NOT EXECUTED =============================================================================== 00110304 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 110304: 55 push %ebp 110305: 89 e5 mov %esp,%ebp 110307: 56 push %esi 110308: 53 push %ebx 110309: 8b 5d 08 mov 0x8(%ebp),%ebx 11030c: 8b 75 0c mov 0xc(%ebp),%esi const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 11030f: 8b 03 mov (%ebx),%eax 110311: 85 c0 test %eax,%eax 110313: 74 1b je 110330 <== NEVER TAKEN 110315: 52 push %edx 110316: 52 push %edx 110317: 68 8d dc 11 00 push $0x11dc8d 11031c: 50 push %eax 11031d: e8 5e 0b 00 00 call 110e80 110322: 83 c4 10 add $0x10,%esp 110325: 85 c0 test %eax,%eax 110327: 75 07 jne 110330 <== ALWAYS TAKEN default_ap = ap++; 110329: 89 d8 mov %ebx,%eax <== NOT EXECUTED 11032b: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED 11032e: eb 0c jmp 11033c <== NOT EXECUTED 110330: 31 c0 xor %eax,%eax 110332: eb 08 jmp 11033c for ( ; ap->name; ap++) if (ap->local_value == local_value) 110334: 39 73 04 cmp %esi,0x4(%ebx) 110337: 74 0a je 110343 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 110339: 83 c3 0c add $0xc,%ebx 11033c: 83 3b 00 cmpl $0x0,(%ebx) 11033f: 75 f3 jne 110334 110341: 89 c3 mov %eax,%ebx if (ap->local_value == local_value) return ap; return default_ap; } 110343: 89 d8 mov %ebx,%eax 110345: 8d 65 f8 lea -0x8(%ebp),%esp 110348: 5b pop %ebx 110349: 5e pop %esi 11034a: c9 leave 11034b: c3 ret =============================================================================== 0010f900 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 10f900: 55 push %ebp 10f901: 89 e5 mov %esp,%ebp 10f903: 56 push %esi 10f904: 53 push %ebx 10f905: 8b 5d 08 mov 0x8(%ebp),%ebx 10f908: 8b 75 0c mov 0xc(%ebp),%esi const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 10f90b: 8b 03 mov (%ebx),%eax 10f90d: 85 c0 test %eax,%eax 10f90f: 74 1b je 10f92c <== NEVER TAKEN 10f911: 52 push %edx 10f912: 52 push %edx 10f913: 68 8d dc 11 00 push $0x11dc8d 10f918: 50 push %eax 10f919: e8 62 15 00 00 call 110e80 10f91e: 83 c4 10 add $0x10,%esp 10f921: 85 c0 test %eax,%eax 10f923: 75 07 jne 10f92c <== ALWAYS TAKEN default_ap = ap++; 10f925: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10f927: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED 10f92a: eb 0c jmp 10f938 <== NOT EXECUTED 10f92c: 31 c0 xor %eax,%eax 10f92e: eb 08 jmp 10f938 for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 10f930: 39 73 08 cmp %esi,0x8(%ebx) 10f933: 74 0a je 10f93f const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 10f935: 83 c3 0c add $0xc,%ebx 10f938: 83 3b 00 cmpl $0x0,(%ebx) 10f93b: 75 f3 jne 10f930 10f93d: 89 c3 mov %eax,%ebx if (ap->remote_value == remote_value) return ap; return default_ap; } 10f93f: 89 d8 mov %ebx,%eax 10f941: 8d 65 f8 lea -0x8(%ebp),%esp 10f944: 5b pop %ebx 10f945: 5e pop %esi 10f946: c9 leave 10f947: c3 ret =============================================================================== 001100b8 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 1100b8: 55 push %ebp <== NOT EXECUTED 1100b9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1100bb: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 1100be: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 1100c1: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1100c4: e8 3b 02 00 00 call 110304 <== NOT EXECUTED 1100c9: 89 c2 mov %eax,%edx <== NOT EXECUTED if (nap) 1100cb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1100ce: 31 c0 xor %eax,%eax <== NOT EXECUTED 1100d0: 85 d2 test %edx,%edx <== NOT EXECUTED 1100d2: 74 03 je 1100d7 <== NOT EXECUTED return nap->remote_value; 1100d4: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED return 0; } 1100d7: c9 leave <== NOT EXECUTED 1100d8: c3 ret <== NOT EXECUTED =============================================================================== 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 quotes++; 107229: 47 inc %edi 10722a: eb 0d jmp 107239 } else if ( ((quotes % 2) == 0) && *p == ' ' ) 10722c: f7 c7 01 00 00 00 test $0x1,%edi 107232: 75 05 jne 107239 107234: 80 f9 20 cmp $0x20,%cl 107237: 74 17 je 107250 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 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 rhs++; 1072be: 8d 50 02 lea 0x2(%eax),%edx 1072c1: 89 d8 mov %ebx,%eax 1072c3: eb 04 jmp 1072c9 for ( d=value ; *rhs ; ) *d++ = *rhs++; 1072c5: 88 08 mov %cl,(%eax) 1072c7: 40 inc %eax 1072c8: 42 inc %edx return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1072c9: 8a 0a mov (%edx),%cl 1072cb: 84 c9 test %cl,%cl 1072cd: 75 f6 jne 1072c5 *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 1072d8: 89 d0 mov %edx,%eax 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 7a 46 00 00 call 10bfbc <_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 4c ec 12 00 push $0x12ec4c 10794f: e8 a4 65 00 00 call 10def8 <_Timespec_Subtract> } } } #endif (*print)( 107954: 5e pop %esi 107955: 5f pop %edi 107956: 68 60 f7 11 00 push $0x11f760 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 8c e9 12 00 mov 0x12e98c(,%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 6d 35 00 00 call 10af20 (*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 d2 f8 11 00 push $0x11f8d2 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 74 ea 12 00 mov 0x12ea74,%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 7c ea 12 00 push $0x12ea7c 1079fb: 89 45 a0 mov %eax,-0x60(%ebp) 1079fe: e8 f5 64 00 00 call 10def8 <_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 ea 63 00 00 call 10ddfc <_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 02 64 00 00 call 10de2c <_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 e5 f8 11 00 push $0x11f8e5 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 fd f8 11 00 push $0x11f8fd 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 =============================================================================== 0011008c : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 11008c: 55 push %ebp <== NOT EXECUTED 11008d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11008f: 53 push %ebx <== NOT EXECUTED 110090: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 110093: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 110096: 68 18 dd 11 00 push $0x11dd18 <== NOT EXECUTED 11009b: e8 18 00 00 00 call 1100b8 <== NOT EXECUTED 1100a0: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1100a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1100a5: 85 c0 test %eax,%eax <== NOT EXECUTED 1100a7: 74 07 je 1100b0 <== NOT EXECUTED { errno = rc; 1100a9: e8 b6 02 00 00 call 110364 <__errno> <== NOT EXECUTED 1100ae: 89 18 mov %ebx,(%eax) <== NOT EXECUTED return -1; } return -1; } 1100b0: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1100b3: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1100b6: c9 leave <== NOT EXECUTED 1100b7: c3 ret <== NOT EXECUTED =============================================================================== 0010b6cb : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 10b6cb: 55 push %ebp <== NOT EXECUTED 10b6cc: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b6ce: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED * printf(3) format string, with its concommitant arguments. * * Returns the number of characters written. */ int rtems_error( 10b6d1: 8d 4d 10 lea 0x10(%ebp),%ecx <== NOT EXECUTED { va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 10b6d4: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10b6d7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10b6da: e8 6a fe ff ff call 10b549 <== NOT EXECUTED va_end(arglist); return chars_written; } 10b6df: c9 leave <== NOT EXECUTED 10b6e0: c3 ret <== NOT EXECUTED =============================================================================== 0010705b : } int rtems_filesystem_dirname( const char *pathname ) { 10705b: 55 push %ebp 10705c: 89 e5 mov %esp,%ebp 10705e: 57 push %edi 10705f: 8b 55 08 mov 0x8(%ebp),%edx int len = strlen( pathname ); 107062: 31 c0 xor %eax,%eax 107064: 83 c9 ff or $0xffffffff,%ecx 107067: 89 d7 mov %edx,%edi 107069: f2 ae repnz scas %es:(%edi),%al 10706b: f7 d1 not %ecx 10706d: 8d 41 ff lea -0x1(%ecx),%eax 107070: 01 c2 add %eax,%edx while ( len ) { 107072: eb 13 jmp 107087 len--; 107074: 48 dec %eax if ( rtems_filesystem_is_separator( pathname[len] ) ) 107075: 8a 4a ff mov -0x1(%edx),%cl 107078: 80 f9 5c cmp $0x5c,%cl 10707b: 74 0e je 10708b <== NEVER TAKEN 10707d: 80 f9 2f cmp $0x2f,%cl 107080: 74 09 je 10708b 107082: 4a dec %edx 107083: 84 c9 test %cl,%cl 107085: 74 04 je 10708b <== NEVER TAKEN const char *pathname ) { int len = strlen( pathname ); while ( len ) { 107087: 85 c0 test %eax,%eax 107089: 75 e9 jne 107074 if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 10708b: 5f pop %edi 10708c: c9 leave 10708d: c3 ret =============================================================================== 00107148 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 107148: 55 push %ebp 107149: 89 e5 mov %esp,%ebp 10714b: 57 push %edi 10714c: 56 push %esi 10714d: 53 push %ebx 10714e: 83 ec 1c sub $0x1c,%esp 107151: 8b 55 08 mov 0x8(%ebp),%edx 107154: 8b 45 0c mov 0xc(%ebp),%eax 107157: 89 45 e4 mov %eax,-0x1c(%ebp) 10715a: 8b 45 10 mov 0x10(%ebp),%eax 10715d: 89 45 e0 mov %eax,-0x20(%ebp) 107160: 8b 45 14 mov 0x14(%ebp),%eax 107163: 8b 5d 18 mov 0x18(%ebp),%ebx /* * Verify Input parameters. */ if ( !pathname ) 107166: 85 d2 test %edx,%edx 107168: 75 0d jne 107177 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 10716a: e8 f5 91 00 00 call 110364 <__errno> <== NOT EXECUTED 10716f: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107175: eb 6e jmp 1071e5 <== NOT EXECUTED if ( !pathloc ) 107177: 85 c0 test %eax,%eax 107179: 75 0d jne 107188 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 10717b: e8 e4 91 00 00 call 110364 <__errno> <== NOT EXECUTED 107180: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 107186: eb 5d jmp 1071e5 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 107188: 8a 0a mov (%edx),%cl 10718a: 80 f9 5c cmp $0x5c,%cl 10718d: 74 09 je 107198 <== NEVER TAKEN 10718f: 80 f9 2f cmp $0x2f,%cl 107192: 74 04 je 107198 107194: 84 c9 test %cl,%cl 107196: 75 16 jne 1071ae <== ALWAYS TAKEN 107198: 8b 35 28 18 12 00 mov 0x121828,%esi 10719e: 83 c6 18 add $0x18,%esi 1071a1: b9 05 00 00 00 mov $0x5,%ecx 1071a6: 89 c7 mov %eax,%edi 1071a8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1071aa: b1 01 mov $0x1,%cl 1071ac: eb 12 jmp 1071c0 1071ae: 8b 35 28 18 12 00 mov 0x121828,%esi 1071b4: 83 c6 04 add $0x4,%esi 1071b7: b9 05 00 00 00 mov $0x5,%ecx 1071bc: 89 c7 mov %eax,%edi 1071be: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 1071c0: 89 5d 18 mov %ebx,0x18(%ebp) 1071c3: 89 45 14 mov %eax,0x14(%ebp) 1071c6: 8b 45 e0 mov -0x20(%ebp),%eax 1071c9: 89 45 10 mov %eax,0x10(%ebp) 1071cc: 8b 45 e4 mov -0x1c(%ebp),%eax 1071cf: 29 c8 sub %ecx,%eax 1071d1: 89 45 0c mov %eax,0xc(%ebp) 1071d4: 01 ca add %ecx,%edx 1071d6: 89 55 08 mov %edx,0x8(%ebp) pathnamelen - i, flags, pathloc, follow_link ); } 1071d9: 83 c4 1c add $0x1c,%esp 1071dc: 5b pop %ebx 1071dd: 5e pop %esi 1071de: 5f pop %edi 1071df: c9 leave rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 1071e0: e9 a9 fe ff ff jmp 10708e pathnamelen - i, flags, pathloc, follow_link ); } 1071e5: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1071e8: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED 1071eb: 5b pop %ebx <== NOT EXECUTED 1071ec: 5e pop %esi <== NOT EXECUTED 1071ed: 5f pop %edi <== NOT EXECUTED 1071ee: c9 leave <== NOT EXECUTED 1071ef: c3 ret <== NOT EXECUTED =============================================================================== 0010708e : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 10708e: 55 push %ebp 10708f: 89 e5 mov %esp,%ebp 107091: 57 push %edi 107092: 56 push %esi 107093: 53 push %ebx 107094: 83 ec 1c sub $0x1c,%esp 107097: 8b 4d 08 mov 0x8(%ebp),%ecx 10709a: 8b 75 0c mov 0xc(%ebp),%esi 10709d: 8b 7d 10 mov 0x10(%ebp),%edi 1070a0: 8b 5d 14 mov 0x14(%ebp),%ebx 1070a3: 8b 55 18 mov 0x18(%ebp),%edx /* * Verify Input parameters. */ if ( !pathname ) 1070a6: 85 c9 test %ecx,%ecx 1070a8: 75 0d jne 1070b7 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 1070aa: e8 b5 92 00 00 call 110364 <__errno> <== NOT EXECUTED 1070af: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 1070b5: eb 0f jmp 1070c6 <== NOT EXECUTED if ( !pathloc ) 1070b7: 85 db test %ebx,%ebx 1070b9: 75 10 jne 1070cb <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 1070bb: e8 a4 92 00 00 call 110364 <__errno> <== NOT EXECUTED 1070c0: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 1070c6: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 1070c9: eb 73 jmp 10713e <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 1070cb: 8b 43 0c mov 0xc(%ebx),%eax 1070ce: 8b 00 mov (%eax),%eax 1070d0: 85 c0 test %eax,%eax 1070d2: 74 4e je 107122 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 1070d4: 53 push %ebx 1070d5: 57 push %edi 1070d6: 56 push %esi 1070d7: 51 push %ecx 1070d8: 89 55 e4 mov %edx,-0x1c(%ebp) 1070db: ff d0 call *%eax 1070dd: 89 c6 mov %eax,%esi /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 1070df: 83 c4 10 add $0x10,%esp 1070e2: 85 c0 test %eax,%eax 1070e4: 8b 55 e4 mov -0x1c(%ebp),%edx 1070e7: 75 55 jne 10713e 1070e9: 85 d2 test %edx,%edx 1070eb: 74 51 je 10713e if ( !pathloc->ops->node_type_h ){ 1070ed: 8b 53 0c mov 0xc(%ebx),%edx 1070f0: 8b 42 10 mov 0x10(%edx),%eax 1070f3: 85 c0 test %eax,%eax 1070f5: 74 1b je 107112 <== NEVER TAKEN rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 1070f7: 83 ec 0c sub $0xc,%esp 1070fa: 53 push %ebx 1070fb: ff d0 call *%eax if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 1070fd: 83 e8 03 sub $0x3,%eax 107100: 83 c4 10 add $0x10,%esp 107103: 83 f8 01 cmp $0x1,%eax 107106: 77 36 ja 10713e ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 107108: 8b 53 0c mov 0xc(%ebx),%edx 10710b: 8b 42 34 mov 0x34(%edx),%eax 10710e: 85 c0 test %eax,%eax 107110: 75 1d jne 10712f <== ALWAYS TAKEN rtems_filesystem_freenode( pathloc ); 107112: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 107115: 85 c0 test %eax,%eax <== NOT EXECUTED 107117: 74 09 je 107122 <== NOT EXECUTED 107119: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10711c: 53 push %ebx <== NOT EXECUTED 10711d: ff d0 call *%eax <== NOT EXECUTED 10711f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 107122: e8 3d 92 00 00 call 110364 <__errno> <== NOT EXECUTED 107127: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10712d: eb 97 jmp 1070c6 <== NOT EXECUTED * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 10712f: 89 7d 0c mov %edi,0xc(%ebp) 107132: 89 5d 08 mov %ebx,0x8(%ebp) } } return result; } 107135: 8d 65 f4 lea -0xc(%ebp),%esp 107138: 5b pop %ebx 107139: 5e pop %esi 10713a: 5f pop %edi 10713b: c9 leave * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 10713c: ff e0 jmp *%eax } } return result; } 10713e: 89 f0 mov %esi,%eax 107140: 8d 65 f4 lea -0xc(%ebp),%esp 107143: 5b pop %ebx 107144: 5e pop %esi 107145: 5f pop %edi 107146: c9 leave 107147: c3 ret =============================================================================== 00106f3c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 106f3c: 55 push %ebp 106f3d: 89 e5 mov %esp,%ebp 106f3f: 57 push %edi 106f40: 56 push %esi 106f41: 53 push %ebx 106f42: 83 ec 2c sub $0x2c,%esp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 106f45: a1 28 18 12 00 mov 0x121828,%eax 106f4a: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax) init_fs_mount_table(); 106f51: e8 76 06 00 00 call 1075cc /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 106f56: 83 3d 28 bf 11 00 00 cmpl $0x0,0x11bf28 106f5d: 75 0a jne 106f69 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); 106f5f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106f62: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED 106f67: eb 2a jmp 106f93 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 106f69: a1 2c fa 11 00 mov 0x11fa2c,%eax status = mount( 106f6e: 83 ec 0c sub $0xc,%esp 106f71: ff 70 0c pushl 0xc(%eax) 106f74: ff 70 08 pushl 0x8(%eax) 106f77: ff 70 04 pushl 0x4(%eax) 106f7a: ff 30 pushl (%eax) 106f7c: 8d 45 e4 lea -0x1c(%ebp),%eax 106f7f: 50 push %eax 106f80: e8 6c 06 00 00 call 1075f1 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 106f85: 83 c4 20 add $0x20,%esp 106f88: 40 inc %eax 106f89: 75 0d jne 106f98 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); 106f8b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106f8e: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED 106f93: e8 0c 36 00 00 call 10a5a4 <== NOT EXECUTED rtems_filesystem_link_counts = 0; 106f98: 8b 3d 28 18 12 00 mov 0x121828,%edi 106f9e: 66 c7 47 30 00 00 movw $0x0,0x30(%edi) * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 106fa4: 83 c7 18 add $0x18,%edi 106fa7: 8b 75 e4 mov -0x1c(%ebp),%esi 106faa: 83 c6 1c add $0x1c,%esi 106fad: b9 05 00 00 00 mov $0x5,%ecx 106fb2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 106fb4: 83 ec 0c sub $0xc,%esp 106fb7: 6a 00 push $0x0 106fb9: 8d 5d d0 lea -0x30(%ebp),%ebx 106fbc: 53 push %ebx 106fbd: 6a 00 push $0x0 106fbf: 6a 01 push $0x1 106fc1: 68 1a d6 11 00 push $0x11d61a 106fc6: e8 7d 01 00 00 call 107148 rtems_filesystem_root = loc; 106fcb: 8b 3d 28 18 12 00 mov 0x121828,%edi 106fd1: 83 c7 18 add $0x18,%edi 106fd4: b9 05 00 00 00 mov $0x5,%ecx 106fd9: 89 de mov %ebx,%esi 106fdb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 106fdd: 83 c4 14 add $0x14,%esp 106fe0: 6a 00 push $0x0 106fe2: 53 push %ebx 106fe3: 6a 00 push $0x0 106fe5: 6a 01 push $0x1 106fe7: 68 1a d6 11 00 push $0x11d61a 106fec: e8 57 01 00 00 call 107148 rtems_filesystem_current = loc; 106ff1: 8b 3d 28 18 12 00 mov 0x121828,%edi 106ff7: 83 c7 04 add $0x4,%edi 106ffa: b9 05 00 00 00 mov $0x5,%ecx 106fff: 89 de mov %ebx,%esi 107001: f3 a5 rep movsl %ds:(%esi),%es:(%edi) * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 107003: 83 c4 18 add $0x18,%esp 107006: 68 ff 01 00 00 push $0x1ff 10700b: 68 1c d6 11 00 push $0x11d61c 107010: e8 ab 04 00 00 call 1074c0 if ( status != 0 ) 107015: 83 c4 10 add $0x10,%esp 107018: 85 c0 test %eax,%eax 10701a: 74 0d je 107029 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0003 ); 10701c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10701f: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED 107024: e9 6a ff ff ff jmp 106f93 <== NOT EXECUTED * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } 107029: 8d 65 f4 lea -0xc(%ebp),%esp 10702c: 5b pop %ebx 10702d: 5e pop %esi 10702e: 5f pop %edi 10702f: c9 leave 107030: c3 ret =============================================================================== 0010cbb4 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 10cbb4: 55 push %ebp <== NOT EXECUTED 10cbb5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cbb7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10cbba: 8b 10 mov (%eax),%edx <== NOT EXECUTED 10cbbc: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10cbbf: 3b 10 cmp (%eax),%edx <== NOT EXECUTED 10cbc1: 0f 94 c0 sete %al <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 10cbc4: c9 leave <== NOT EXECUTED 10cbc5: c3 ret <== NOT EXECUTED =============================================================================== 00107034 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 107034: 55 push %ebp 107035: 89 e5 mov %esp,%ebp 107037: 53 push %ebx 107038: 8b 5d 08 mov 0x8(%ebp),%ebx 10703b: 8b 4d 0c mov 0xc(%ebp),%ecx 10703e: 31 c0 xor %eax,%eax /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 107040: eb 01 jmp 107043 { pathname++; pathnamelen--; stripped++; 107042: 40 inc %eax { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 107043: 8a 14 03 mov (%ebx,%eax,1),%dl 107046: 39 c1 cmp %eax,%ecx 107048: 74 0e je 107058 <== NEVER TAKEN 10704a: 84 d2 test %dl,%dl 10704c: 74 0a je 107058 <== NEVER TAKEN 10704e: 80 fa 5c cmp $0x5c,%dl 107051: 74 ef je 107042 <== NEVER TAKEN 107053: 80 fa 2f cmp $0x2f,%dl 107056: 74 ea je 107042 pathname++; pathnamelen--; stripped++; } return stripped; } 107058: 5b pop %ebx 107059: c9 leave 10705a: c3 ret =============================================================================== 00106df0 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 106df0: 55 push %ebp <== NOT EXECUTED 106df1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106df3: 57 push %edi <== NOT EXECUTED 106df4: 56 push %esi <== NOT EXECUTED 106df5: 53 push %ebx <== NOT EXECUTED 106df6: 83 ec 48 sub $0x48,%esp <== NOT EXECUTED 106df9: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 106dfc: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 106dff: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED 106e02: 31 c0 xor %eax,%eax <== NOT EXECUTED 106e04: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 106e06: f7 d1 not %ecx <== NOT EXECUTED 106e08: 49 dec %ecx <== NOT EXECUTED 106e09: 6a 01 push $0x1 <== NOT EXECUTED 106e0b: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 106e0e: 56 push %esi <== NOT EXECUTED 106e0f: 6a 00 push $0x0 <== NOT EXECUTED 106e11: 51 push %ecx <== NOT EXECUTED 106e12: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 106e15: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED 106e18: e8 2b 03 00 00 call 107148 <== NOT EXECUTED 106e1d: 89 c7 mov %eax,%edi <== NOT EXECUTED the_jnode = loc.node_access; 106e1f: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 106e22: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 106e25: 8b 41 10 mov 0x10(%ecx),%eax <== NOT EXECUTED 106e28: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 106e2b: 85 c0 test %eax,%eax <== NOT EXECUTED 106e2d: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 106e30: 75 20 jne 106e52 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 106e32: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED 106e35: 85 c0 test %eax,%eax <== NOT EXECUTED 106e37: 74 09 je 106e42 <== NOT EXECUTED 106e39: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106e3c: 56 push %esi <== NOT EXECUTED 106e3d: ff d0 call *%eax <== NOT EXECUTED 106e3f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 106e42: e8 1d 95 00 00 call 110364 <__errno> <== NOT EXECUTED 106e47: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 106e4d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106e50: eb 7b jmp 106ecd <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 106e52: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106e55: 56 push %esi <== NOT EXECUTED 106e56: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED 106e59: ff d0 call *%eax <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 106e5b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106e5e: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 106e61: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 106e64: 75 04 jne 106e6a <== NOT EXECUTED 106e66: 85 ff test %edi,%edi <== NOT EXECUTED 106e68: 74 1e je 106e88 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 106e6a: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 106e6d: 85 c0 test %eax,%eax <== NOT EXECUTED 106e6f: 74 53 je 106ec4 <== NOT EXECUTED 106e71: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 106e74: 85 c0 test %eax,%eax <== NOT EXECUTED 106e76: 74 4c je 106ec4 <== NOT EXECUTED 106e78: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106e7b: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED 106e7e: 52 push %edx <== NOT EXECUTED 106e7f: ff d0 call *%eax <== NOT EXECUTED 106e81: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED 106e86: eb 37 jmp 106ebf <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 106e88: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 106e8b: 89 02 mov %eax,(%edx) <== NOT EXECUTED device_info->device_name_length = strlen( name ); 106e8d: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 106e90: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED 106e93: 31 c0 xor %eax,%eax <== NOT EXECUTED 106e95: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 106e97: f7 d1 not %ecx <== NOT EXECUTED 106e99: 49 dec %ecx <== NOT EXECUTED 106e9a: 89 4a 04 mov %ecx,0x4(%edx) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 106e9d: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED 106ea0: 89 42 08 mov %eax,0x8(%edx) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 106ea3: 8b 43 54 mov 0x54(%ebx),%eax <== NOT EXECUTED 106ea6: 89 42 0c mov %eax,0xc(%edx) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 106ea9: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 106eac: 85 c0 test %eax,%eax <== NOT EXECUTED 106eae: 74 1b je 106ecb <== NOT EXECUTED 106eb0: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 106eb3: 85 c0 test %eax,%eax <== NOT EXECUTED 106eb5: 74 14 je 106ecb <== NOT EXECUTED 106eb7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106eba: 56 push %esi <== NOT EXECUTED 106ebb: ff d0 call *%eax <== NOT EXECUTED 106ebd: 31 c0 xor %eax,%eax <== NOT EXECUTED 106ebf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106ec2: eb 09 jmp 106ecd <== NOT EXECUTED 106ec4: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED 106ec9: eb 02 jmp 106ecd <== NOT EXECUTED 106ecb: 31 c0 xor %eax,%eax <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 106ecd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 106ed0: 5b pop %ebx <== NOT EXECUTED 106ed1: 5e pop %esi <== NOT EXECUTED 106ed2: 5f pop %edi <== NOT EXECUTED 106ed3: c9 leave <== NOT EXECUTED 106ed4: c3 ret <== NOT EXECUTED =============================================================================== 0010c4a0 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10c4a0: 55 push %ebp 10c4a1: 89 e5 mov %esp,%ebp 10c4a3: 57 push %edi 10c4a4: 56 push %esi 10c4a5: 53 push %ebx 10c4a6: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10c4a9: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10c4ad: 74 41 je 10c4f0 <== NEVER TAKEN 10c4af: 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 ] ) 10c4b4: 8b 04 9d 8c e9 12 00 mov 0x12e98c(,%ebx,4),%eax 10c4bb: 85 c0 test %eax,%eax 10c4bd: 74 2b je 10c4ea continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10c4bf: 8b 78 04 mov 0x4(%eax),%edi if ( !information ) 10c4c2: be 01 00 00 00 mov $0x1,%esi 10c4c7: 85 ff test %edi,%edi 10c4c9: 75 17 jne 10c4e2 10c4cb: eb 1d jmp 10c4ea continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10c4cd: 8b 47 1c mov 0x1c(%edi),%eax 10c4d0: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !the_thread ) 10c4d3: 85 c0 test %eax,%eax 10c4d5: 74 0a je 10c4e1 <== NEVER TAKEN continue; (*routine)(the_thread); 10c4d7: 83 ec 0c sub $0xc,%esp 10c4da: 50 push %eax 10c4db: ff 55 08 call *0x8(%ebp) 10c4de: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10c4e1: 46 inc %esi 10c4e2: 0f b7 47 10 movzwl 0x10(%edi),%eax 10c4e6: 39 c6 cmp %eax,%esi 10c4e8: 76 e3 jbe 10c4cd Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10c4ea: 43 inc %ebx 10c4eb: 83 fb 05 cmp $0x5,%ebx 10c4ee: 75 c4 jne 10c4b4 (*routine)(the_thread); } } } 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 =============================================================================== 0010dec3 : * 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 ) { 10dec3: 55 push %ebp 10dec4: 89 e5 mov %esp,%ebp 10dec6: 57 push %edi 10dec7: 53 push %ebx 10dec8: 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 ); 10decb: 6a 00 push $0x0 10decd: 6a 00 push $0x0 10decf: ff 35 00 39 12 00 pushl 0x123900 10ded5: e8 12 c1 ff ff call 109fec rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { 10deda: a1 fc 38 12 00 mov 0x1238fc,%eax 10dedf: 83 c4 10 add $0x10,%esp 10dee2: 85 c0 test %eax,%eax 10dee4: 74 4f je 10df35 rc = rtems_semaphore_create( 10dee6: 83 ec 0c sub $0xc,%esp 10dee9: 8d 55 f4 lea -0xc(%ebp),%edx 10deec: 52 push %edx 10deed: 6a 00 push $0x0 10deef: 6a 54 push $0x54 10def1: 6a 01 push $0x1 10def3: 2b 05 f8 38 12 00 sub 0x1238f8,%eax 10def9: c1 f8 06 sar $0x6,%eax 10defc: 0d 00 49 42 4c or $0x4c424900,%eax 10df01: 50 push %eax 10df02: e8 b9 be ff ff call 109dc0 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL) 10df07: 83 c4 20 add $0x20,%esp 10df0a: 85 c0 test %eax,%eax 10df0c: 75 27 jne 10df35 <== NEVER TAKEN goto failed; iop = rtems_libio_iop_freelist; 10df0e: 8b 1d fc 38 12 00 mov 0x1238fc,%ebx next = iop->data1; 10df14: 8b 53 34 mov 0x34(%ebx),%edx (void) memset( iop, 0, sizeof(rtems_libio_t) ); 10df17: b9 10 00 00 00 mov $0x10,%ecx 10df1c: 89 df mov %ebx,%edi 10df1e: f3 ab rep stos %eax,%es:(%edi) iop->flags = LIBIO_FLAGS_OPEN; 10df20: c7 43 14 00 01 00 00 movl $0x100,0x14(%ebx) iop->sem = sema; 10df27: 8b 45 f4 mov -0xc(%ebp),%eax 10df2a: 89 43 2c mov %eax,0x2c(%ebx) rtems_libio_iop_freelist = next; 10df2d: 89 15 fc 38 12 00 mov %edx,0x1238fc goto done; 10df33: eb 02 jmp 10df37 10df35: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10df37: 83 ec 0c sub $0xc,%esp 10df3a: ff 35 00 39 12 00 pushl 0x123900 10df40: e8 93 c1 ff ff call 10a0d8 iop = 0; done: rtems_libio_unlock(); return iop; } 10df45: 89 d8 mov %ebx,%eax 10df47: 8d 65 f8 lea -0x8(%ebp),%esp 10df4a: 5b pop %ebx 10df4b: 5f pop %edi 10df4c: c9 leave 10df4d: c3 ret =============================================================================== 0010de6e : */ void rtems_libio_free( rtems_libio_t *iop ) { 10de6e: 55 push %ebp 10de6f: 89 e5 mov %esp,%ebp 10de71: 53 push %ebx 10de72: 83 ec 08 sub $0x8,%esp 10de75: 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 ); 10de78: 6a 00 push $0x0 10de7a: 6a 00 push $0x0 10de7c: ff 35 00 39 12 00 pushl 0x123900 10de82: e8 65 c1 ff ff call 109fec rtems_libio_lock(); if (iop->sem) 10de87: 8b 43 2c mov 0x2c(%ebx),%eax 10de8a: 83 c4 10 add $0x10,%esp 10de8d: 85 c0 test %eax,%eax 10de8f: 74 0c je 10de9d <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 10de91: 83 ec 0c sub $0xc,%esp 10de94: 50 push %eax 10de95: e8 c2 c0 ff ff call 109f5c 10de9a: 83 c4 10 add $0x10,%esp iop->flags &= ~LIBIO_FLAGS_OPEN; 10de9d: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) iop->data1 = rtems_libio_iop_freelist; 10dea4: a1 fc 38 12 00 mov 0x1238fc,%eax 10dea9: 89 43 34 mov %eax,0x34(%ebx) rtems_libio_iop_freelist = iop; 10deac: 89 1d fc 38 12 00 mov %ebx,0x1238fc } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10deb2: a1 00 39 12 00 mov 0x123900,%eax 10deb7: 89 45 08 mov %eax,0x8(%ebp) rtems_libio_unlock(); } 10deba: 8b 5d fc mov -0x4(%ebp),%ebx 10debd: c9 leave 10debe: e9 15 c2 ff ff jmp 10a0d8 =============================================================================== 00107268 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 107268: 55 push %ebp 107269: 89 e5 mov %esp,%ebp 10726b: 53 push %ebx 10726c: 83 ec 04 sub $0x4,%esp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 10726f: a1 24 fa 11 00 mov 0x11fa24,%eax 107274: 85 c0 test %eax,%eax 107276: 74 40 je 1072b8 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 107278: 52 push %edx 107279: 52 push %edx 10727a: 6a 40 push $0x40 10727c: 50 push %eax 10727d: e8 0a 69 00 00 call 10db8c 107282: a3 f8 38 12 00 mov %eax,0x1238f8 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 107287: 83 c4 10 add $0x10,%esp 10728a: 85 c0 test %eax,%eax 10728c: 75 07 jne 107295 <== ALWAYS TAKEN rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 10728e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107291: 6a 1a push $0x1a <== NOT EXECUTED 107293: eb 46 jmp 1072db <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 107295: a3 fc 38 12 00 mov %eax,0x1238fc for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 10729a: 8b 1d 24 fa 11 00 mov 0x11fa24,%ebx 1072a0: 31 d2 xor %edx,%edx 1072a2: eb 03 jmp 1072a7 iop->data1 = iop + 1; 1072a4: 89 40 f4 mov %eax,-0xc(%eax) 1072a7: 89 c1 mov %eax,%ecx sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1072a9: 42 inc %edx 1072aa: 83 c0 40 add $0x40,%eax 1072ad: 39 da cmp %ebx,%edx 1072af: 72 f3 jb 1072a4 iop->data1 = iop + 1; iop->data1 = NULL; 1072b1: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 1072b8: 83 ec 0c sub $0xc,%esp 1072bb: 68 00 39 12 00 push $0x123900 1072c0: 6a 00 push $0x0 1072c2: 6a 54 push $0x54 1072c4: 6a 01 push $0x1 1072c6: 68 4f 49 42 4c push $0x4c42494f 1072cb: e8 f0 2a 00 00 call 109dc0 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 1072d0: 83 c4 20 add $0x20,%esp 1072d3: 85 c0 test %eax,%eax 1072d5: 74 09 je 1072e0 <== ALWAYS TAKEN rtems_fatal_error_occurred( rc ); 1072d7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1072da: 50 push %eax <== NOT EXECUTED 1072db: e8 c4 32 00 00 call 10a5a4 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 1072e0: a1 20 fa 11 00 mov 0x11fa20,%eax 1072e5: 85 c0 test %eax,%eax 1072e7: 74 06 je 1072ef <== NEVER TAKEN (* rtems_fs_init_helper)(); } 1072e9: 8b 5d fc mov -0x4(%ebp),%ebx 1072ec: c9 leave /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 1072ed: ff e0 jmp *%eax } 1072ef: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1072f2: c9 leave <== NOT EXECUTED 1072f3: c3 ret <== NOT EXECUTED =============================================================================== 00108990 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 108990: 55 push %ebp 108991: 89 e5 mov %esp,%ebp 108993: 57 push %edi 108994: 56 push %esi 108995: 53 push %ebx 108996: 83 ec 40 sub $0x40,%esp rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 108999: 8d 45 e4 lea -0x1c(%ebp),%eax 10899c: 50 push %eax 10899d: 6a 00 push $0x0 10899f: 6a 00 push $0x0 1089a1: e8 ce 26 00 00 call 10b074 1089a6: 89 45 c4 mov %eax,-0x3c(%ebp) if (sc != RTEMS_SUCCESSFUL) return sc; 1089a9: 83 c4 10 add $0x10,%esp 1089ac: 85 c0 test %eax,%eax 1089ae: 0f 85 da 00 00 00 jne 108a8e <== NEVER TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 1089b4: 81 3d f4 37 12 00 1c cmpl $0x12591c,0x1237f4 1089bb: 59 12 00 1089be: 75 54 jne 108a14 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 1089c0: 83 ec 0c sub $0xc,%esp 1089c3: 6a 48 push $0x48 1089c5: e8 ea f4 ff ff call 107eb4 1089ca: 89 c3 mov %eax,%ebx if (!tmp) 1089cc: 83 c4 10 add $0x10,%esp 1089cf: 85 c0 test %eax,%eax 1089d1: 75 0c jne 1089df <== ALWAYS TAKEN 1089d3: c7 45 c4 1a 00 00 00 movl $0x1a,-0x3c(%ebp) <== NOT EXECUTED 1089da: e9 af 00 00 00 jmp 108a8e <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 1089df: 56 push %esi 1089e0: 68 a4 88 10 00 push $0x1088a4 1089e5: 68 f4 37 12 00 push $0x1237f4 1089ea: 6a 00 push $0x0 1089ec: e8 9f 27 00 00 call 10b190 1089f1: 89 c6 mov %eax,%esi if (sc != RTEMS_SUCCESSFUL) { 1089f3: 83 c4 10 add $0x10,%esp 1089f6: 85 c0 test %eax,%eax 1089f8: 74 14 je 108a0e <== ALWAYS TAKEN /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 1089fa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1089fd: 53 push %ebx <== NOT EXECUTED 1089fe: e8 05 f0 ff ff call 107a08 <== NOT EXECUTED 108a03: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED return sc; 108a06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108a09: e9 80 00 00 00 jmp 108a8e <== NOT EXECUTED } rtems_current_user_env = tmp; 108a0e: 89 1d f4 37 12 00 mov %ebx,0x1237f4 }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 108a14: a1 f4 37 12 00 mov 0x1237f4,%eax 108a19: be 1c 59 12 00 mov $0x12591c,%esi 108a1e: b9 12 00 00 00 mov $0x12,%ecx 108a23: 89 c7 mov %eax,%edi 108a25: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_current_user_env->task_id=task_id; /* mark the local values*/ 108a27: 8b 55 e4 mov -0x1c(%ebp),%edx 108a2a: 89 10 mov %edx,(%eax) /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 108a2c: 8d 78 18 lea 0x18(%eax),%edi 108a2f: 8b 35 04 59 12 00 mov 0x125904,%esi 108a35: 83 c6 1c add $0x1c,%esi 108a38: b1 05 mov $0x5,%cl 108a3a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 108a3c: 83 ec 0c sub $0xc,%esp 108a3f: 6a 00 push $0x0 108a41: 8d 5d d0 lea -0x30(%ebp),%ebx 108a44: 53 push %ebx 108a45: 6a 00 push $0x0 108a47: 6a 01 push $0x1 108a49: 68 e4 f3 11 00 push $0x11f3e4 108a4e: e8 0d ef ff ff call 107960 rtems_filesystem_root = loc; 108a53: 8b 3d f4 37 12 00 mov 0x1237f4,%edi 108a59: 83 c7 18 add $0x18,%edi 108a5c: b9 05 00 00 00 mov $0x5,%ecx 108a61: 89 de mov %ebx,%esi 108a63: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 108a65: 83 c4 14 add $0x14,%esp 108a68: 6a 00 push $0x0 108a6a: 53 push %ebx 108a6b: 6a 00 push $0x0 108a6d: 6a 01 push $0x1 108a6f: 68 e4 f3 11 00 push $0x11f3e4 108a74: e8 e7 ee ff ff call 107960 rtems_filesystem_current = loc; 108a79: 8b 3d f4 37 12 00 mov 0x1237f4,%edi 108a7f: 83 c7 04 add $0x4,%edi 108a82: b9 05 00 00 00 mov $0x5,%ecx 108a87: 89 de mov %ebx,%esi 108a89: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return RTEMS_SUCCESSFUL; 108a8b: 83 c4 20 add $0x20,%esp } 108a8e: 8b 45 c4 mov -0x3c(%ebp),%eax 108a91: 8d 65 f4 lea -0xc(%ebp),%esp 108a94: 5b pop %ebx 108a95: 5e pop %esi 108a96: 5f pop %edi 108a97: c9 leave 108a98: c3 ret =============================================================================== 001088fb : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 1088fb: 55 push %ebp <== NOT EXECUTED 1088fc: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1088fe: 53 push %ebx <== NOT EXECUTED 1088ff: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); 108902: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 108905: 50 push %eax <== NOT EXECUTED 108906: 6a 00 push $0x0 <== NOT EXECUTED 108908: 6a 00 push $0x0 <== NOT EXECUTED 10890a: e8 65 27 00 00 call 10b074 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 10890f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108912: 85 c0 test %eax,%eax <== NOT EXECUTED 108914: 75 75 jne 10898b <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 108916: 8b 1d f4 37 12 00 mov 0x1237f4,%ebx <== NOT EXECUTED 10891c: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 10891e: 3b 45 f0 cmp -0x10(%ebp),%eax <== NOT EXECUTED 108921: 75 21 jne 108944 <== NOT EXECUTED /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 108923: 51 push %ecx <== NOT EXECUTED 108924: 51 push %ecx <== NOT EXECUTED 108925: 68 f4 37 12 00 push $0x1237f4 <== NOT EXECUTED 10892a: 6a 00 push $0x0 <== NOT EXECUTED 10892c: e8 f3 28 00 00 call 10b224 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 108931: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108934: 85 c0 test %eax,%eax <== NOT EXECUTED 108936: 75 53 jne 10898b <== NOT EXECUTED free_user_env(tmp); 108938: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10893b: 53 push %ebx <== NOT EXECUTED 10893c: e8 63 ff ff ff call 1088a4 <== NOT EXECUTED 108941: 83 c4 10 add $0x10,%esp <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 108944: 52 push %edx <== NOT EXECUTED 108945: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 108948: 50 push %eax <== NOT EXECUTED 108949: 68 f4 37 12 00 push $0x1237f4 <== NOT EXECUTED 10894e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 108951: e8 4a 29 00 00 call 10b2a0 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 108956: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108959: 85 c0 test %eax,%eax <== NOT EXECUTED 10895b: 75 24 jne 108981 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 10895d: 50 push %eax <== NOT EXECUTED 10895e: 68 a4 88 10 00 push $0x1088a4 <== NOT EXECUTED 108963: 68 f4 37 12 00 push $0x1237f4 <== NOT EXECUTED 108968: 6a 00 push $0x0 <== NOT EXECUTED 10896a: e8 21 28 00 00 call 10b190 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 10896f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108972: 85 c0 test %eax,%eax <== NOT EXECUTED 108974: 75 0b jne 108981 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 108976: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 108979: 89 15 f4 37 12 00 mov %edx,0x1237f4 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 10897f: eb 0a jmp 10898b <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 108981: c7 05 f4 37 12 00 1c movl $0x12591c,0x1237f4 <== NOT EXECUTED 108988: 59 12 00 return sc; } 10898b: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10898e: c9 leave <== NOT EXECUTED 10898f: c3 ret <== NOT EXECUTED =============================================================================== 0010dd78 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 10dd78: 55 push %ebp 10dd79: 89 e5 mov %esp,%ebp 10dd7b: 8b 55 08 mov 0x8(%ebp),%edx uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10dd7e: 89 d1 mov %edx,%ecx 10dd80: 83 e1 06 and $0x6,%ecx 10dd83: b8 02 00 00 00 mov $0x2,%eax 10dd88: 83 f9 06 cmp $0x6,%ecx 10dd8b: 74 0f je 10dd9c <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 10dd8d: 30 c0 xor %al,%al 10dd8f: f6 c2 02 test $0x2,%dl 10dd92: 75 08 jne 10dd9c <== ALWAYS TAKEN 10dd94: 89 d0 mov %edx,%eax <== NOT EXECUTED 10dd96: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED 10dd99: 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 ) { 10dd9c: f6 c2 01 test $0x1,%dl 10dd9f: 74 03 je 10dda4 fcntl_flags |= O_NONBLOCK; 10dda1: 80 cc 40 or $0x40,%ah } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 10dda4: f6 c6 02 test $0x2,%dh 10dda7: 74 03 je 10ddac fcntl_flags |= O_APPEND; 10dda9: 83 c8 08 or $0x8,%eax } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 10ddac: 80 e6 04 and $0x4,%dh 10ddaf: 74 03 je 10ddb4 fcntl_flags |= O_CREAT; 10ddb1: 80 cc 02 or $0x2,%ah } return fcntl_flags; } 10ddb4: c9 leave 10ddb5: c3 ret =============================================================================== 00112240 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 112240: 55 push %ebp 112241: 89 e5 mov %esp,%ebp 112243: 56 push %esi 112244: 53 push %ebx 112245: 8b 5d 08 mov 0x8(%ebp),%ebx void *return_this; /* * Parameter error checks */ if ( !pointer ) 112248: 85 db test %ebx,%ebx 11224a: 74 57 je 1122a3 return EINVAL; *pointer = NULL; 11224c: 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()) && 112252: 83 3d cc 88 12 00 03 cmpl $0x3,0x1288cc 112259: 75 09 jne 112264 <== NEVER TAKEN 11225b: e8 d0 62 ff ff call 108530 112260: 84 c0 test %al,%al 112262: 74 3f je 1122a3 <== NEVER TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 112264: e8 1d 63 ff ff call 108586 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 112269: 6a 00 push $0x0 11226b: ff 75 0c pushl 0xc(%ebp) 11226e: ff 75 10 pushl 0x10(%ebp) 112271: ff 35 50 46 12 00 pushl 0x124650 112277: e8 b4 aa ff ff call 10cd30 <_Protected_heap_Allocate_aligned_with_boundary> 11227c: 89 c6 mov %eax,%esi return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 11227e: 83 c4 10 add $0x10,%esp 112281: b8 0c 00 00 00 mov $0xc,%eax 112286: 85 f6 test %esi,%esi 112288: 74 1e je 1122a8 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 11228a: a1 f0 69 12 00 mov 0x1269f0,%eax 11228f: 85 c0 test %eax,%eax 112291: 74 0a je 11229d <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 112293: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112296: 53 push %ebx <== NOT EXECUTED 112297: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 11229a: 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; 11229d: 89 33 mov %esi,(%ebx) 11229f: 31 c0 xor %eax,%eax return 0; 1122a1: eb 05 jmp 1122a8 1122a3: b8 16 00 00 00 mov $0x16,%eax } 1122a8: 8d 65 f8 lea -0x8(%ebp),%esp 1122ab: 5b pop %ebx 1122ac: 5e pop %esi 1122ad: c9 leave 1122ae: c3 ret =============================================================================== 0010b6b3 : void rtems_panic( const char *printf_format, ... ) { 10b6b3: 55 push %ebp <== NOT EXECUTED 10b6b4: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b6b6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED /* * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...) */ void rtems_panic( 10b6b9: 8d 4d 0c lea 0xc(%ebp),%ecx <== NOT EXECUTED ) { va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 10b6bc: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10b6bf: b8 00 00 00 20 mov $0x20000000,%eax <== NOT EXECUTED 10b6c4: e8 80 fe ff ff call 10b549 <== NOT EXECUTED va_end(arglist); } 10b6c9: c9 leave <== NOT EXECUTED 10b6ca: c3 ret <== NOT EXECUTED =============================================================================== 00114910 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 114910: 55 push %ebp 114911: 89 e5 mov %esp,%ebp 114913: 57 push %edi 114914: 56 push %esi 114915: 53 push %ebx 114916: 83 ec 1c sub $0x1c,%esp 114919: 8b 75 0c mov 0xc(%ebp),%esi 11491c: 8b 55 10 mov 0x10(%ebp),%edx 11491f: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 114922: b8 03 00 00 00 mov $0x3,%eax 114927: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 11492b: 0f 84 cf 00 00 00 je 114a00 return RTEMS_INVALID_NAME; if ( !starting_address ) 114931: 85 f6 test %esi,%esi 114933: 0f 84 bb 00 00 00 je 1149f4 return RTEMS_INVALID_ADDRESS; if ( !id ) 114939: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 11493d: 0f 84 b1 00 00 00 je 1149f4 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114943: 85 ff test %edi,%edi 114945: 0f 84 b0 00 00 00 je 1149fb 11494b: 85 d2 test %edx,%edx 11494d: 0f 84 a8 00 00 00 je 1149fb 114953: 39 fa cmp %edi,%edx 114955: 0f 82 a0 00 00 00 jb 1149fb 11495b: f7 c7 03 00 00 00 test $0x3,%edi 114961: 0f 85 94 00 00 00 jne 1149fb !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 114967: f7 c6 03 00 00 00 test $0x3,%esi 11496d: 0f 85 81 00 00 00 jne 1149f4 114973: a1 48 c5 13 00 mov 0x13c548,%eax 114978: 40 inc %eax 114979: a3 48 c5 13 00 mov %eax,0x13c548 * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 11497e: 83 ec 0c sub $0xc,%esp 114981: 68 d0 c3 13 00 push $0x13c3d0 114986: 89 55 e4 mov %edx,-0x1c(%ebp) 114989: e8 8e 3b 00 00 call 11851c <_Objects_Allocate> 11498e: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 114990: 83 c4 10 add $0x10,%esp 114993: 85 c0 test %eax,%eax 114995: 8b 55 e4 mov -0x1c(%ebp),%edx 114998: 75 0c jne 1149a6 _Thread_Enable_dispatch(); 11499a: e8 fe 47 00 00 call 11919d <_Thread_Enable_dispatch> 11499f: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1149a4: eb 5a jmp 114a00 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 1149a6: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 1149a9: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 1149ac: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 1149af: 8b 45 18 mov 0x18(%ebp),%eax 1149b2: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 1149b5: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 1149bc: 57 push %edi 1149bd: 89 d0 mov %edx,%eax 1149bf: 31 d2 xor %edx,%edx 1149c1: f7 f7 div %edi 1149c3: 50 push %eax 1149c4: 56 push %esi 1149c5: 8d 43 24 lea 0x24(%ebx),%eax 1149c8: 50 push %eax 1149c9: e8 4a 2a 00 00 call 117418 <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1149ce: 8b 43 08 mov 0x8(%ebx),%eax 1149d1: 0f b7 c8 movzwl %ax,%ecx 1149d4: 8b 15 ec c3 13 00 mov 0x13c3ec,%edx 1149da: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1149dd: 8b 55 08 mov 0x8(%ebp),%edx 1149e0: 89 53 0c mov %edx,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1149e3: 8b 55 1c mov 0x1c(%ebp),%edx 1149e6: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1149e8: e8 b0 47 00 00 call 11919d <_Thread_Enable_dispatch> 1149ed: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1149ef: 83 c4 10 add $0x10,%esp 1149f2: eb 0c jmp 114a00 1149f4: b8 09 00 00 00 mov $0x9,%eax 1149f9: eb 05 jmp 114a00 1149fb: b8 08 00 00 00 mov $0x8,%eax } 114a00: 8d 65 f4 lea -0xc(%ebp),%esp 114a03: 5b pop %ebx 114a04: 5e pop %esi 114a05: 5f pop %edi 114a06: c9 leave 114a07: c3 ret =============================================================================== 0010eef6 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 10eef6: 55 push %ebp 10eef7: 89 e5 mov %esp,%ebp 10eef9: 83 ec 08 sub $0x8,%esp if (!rtems_pipe_configured) 10eefc: 80 3d ac 1d 12 00 00 cmpb $0x0,0x121dac 10ef03: 74 3c je 10ef41 <== ALWAYS TAKEN return; if (rtems_pipe_semaphore) 10ef05: 83 3d fc 36 12 00 00 cmpl $0x0,0x1236fc <== NOT EXECUTED 10ef0c: 75 33 jne 10ef41 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 10ef0e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ef11: 68 fc 36 12 00 push $0x1236fc <== NOT EXECUTED 10ef16: 6a 00 push $0x0 <== NOT EXECUTED 10ef18: 6a 54 push $0x54 <== NOT EXECUTED 10ef1a: 6a 01 push $0x1 <== NOT EXECUTED 10ef1c: 68 45 50 49 50 push $0x50495045 <== NOT EXECUTED 10ef21: e8 9a ae ff ff call 109dc0 <== 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) 10ef26: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10ef29: 85 c0 test %eax,%eax <== NOT EXECUTED 10ef2b: 74 09 je 10ef36 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 10ef2d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ef30: 50 push %eax <== NOT EXECUTED 10ef31: e8 6e b6 ff ff call 10a5a4 <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 10ef36: e8 81 aa ff ff call 1099bc <== NOT EXECUTED rtems_pipe_no = now; 10ef3b: 66 a3 04 37 12 00 mov %ax,0x123704 <== NOT EXECUTED } 10ef41: c9 leave 10ef42: c3 ret =============================================================================== 0010ae6d : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10ae6d: 55 push %ebp 10ae6e: 89 e5 mov %esp,%ebp 10ae70: 57 push %edi 10ae71: 56 push %esi 10ae72: 53 push %ebx 10ae73: 83 ec 30 sub $0x30,%esp 10ae76: 8b 75 08 mov 0x8(%ebp),%esi 10ae79: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 10ae7c: 8d 45 e4 lea -0x1c(%ebp),%eax 10ae7f: 50 push %eax 10ae80: 56 push %esi 10ae81: 68 40 65 12 00 push $0x126540 10ae86: e8 a1 1c 00 00 call 10cb2c <_Objects_Get> 10ae8b: 89 c7 mov %eax,%edi rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10ae8d: 83 c4 10 add $0x10,%esp 10ae90: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10ae94: 0f 85 40 01 00 00 jne 10afda case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10ae9a: 8b 40 40 mov 0x40(%eax),%eax 10ae9d: 3b 05 f4 66 12 00 cmp 0x1266f4,%eax 10aea3: 74 0f je 10aeb4 _Thread_Enable_dispatch(); 10aea5: e8 47 24 00 00 call 10d2f1 <_Thread_Enable_dispatch> 10aeaa: bb 17 00 00 00 mov $0x17,%ebx return RTEMS_NOT_OWNER_OF_RESOURCE; 10aeaf: e9 2b 01 00 00 jmp 10afdf } if ( length == RTEMS_PERIOD_STATUS ) { 10aeb4: 85 db test %ebx,%ebx 10aeb6: 75 19 jne 10aed1 switch ( the_period->state ) { 10aeb8: 8b 47 38 mov 0x38(%edi),%eax 10aebb: 83 f8 04 cmp $0x4,%eax 10aebe: 77 07 ja 10aec7 <== NEVER TAKEN 10aec0: 8b 1c 85 c4 f7 11 00 mov 0x11f7c4(,%eax,4),%ebx case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10aec7: e8 25 24 00 00 call 10d2f1 <_Thread_Enable_dispatch> return( return_value ); 10aecc: e9 0e 01 00 00 jmp 10afdf } _ISR_Disable( level ); 10aed1: 9c pushf 10aed2: fa cli 10aed3: 8f 45 d4 popl -0x2c(%ebp) switch ( the_period->state ) { 10aed6: 8b 47 38 mov 0x38(%edi),%eax 10aed9: 83 f8 02 cmp $0x2,%eax 10aedc: 74 5f je 10af3d 10aede: 83 f8 04 cmp $0x4,%eax 10aee1: 0f 84 ba 00 00 00 je 10afa1 10aee7: 85 c0 test %eax,%eax 10aee9: 0f 85 eb 00 00 00 jne 10afda <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10aeef: ff 75 d4 pushl -0x2c(%ebp) 10aef2: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10aef3: 83 ec 0c sub $0xc,%esp 10aef6: 57 push %edi 10aef7: e8 9c fd ff ff call 10ac98 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10aefc: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10af03: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10af0a: c7 47 2c e8 b1 10 00 movl $0x10b1e8,0x2c(%edi) the_watchdog->id = id; 10af11: 89 77 30 mov %esi,0x30(%edi) the_watchdog->user_data = user_data; 10af14: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10af1b: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10af1e: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10af21: 5b pop %ebx 10af22: 5e pop %esi 10af23: 83 c7 10 add $0x10,%edi 10af26: 57 push %edi 10af27: 68 14 67 12 00 push $0x126714 10af2c: e8 07 33 00 00 call 10e238 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10af31: e8 bb 23 00 00 call 10d2f1 <_Thread_Enable_dispatch> 10af36: 31 db xor %ebx,%ebx 10af38: e9 98 00 00 00 jmp 10afd5 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10af3d: 83 ec 0c sub $0xc,%esp 10af40: 57 push %edi 10af41: e8 4c fe ff ff call 10ad92 <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 10af46: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) the_period->next_length = length; 10af4d: 89 5f 3c mov %ebx,0x3c(%edi) _ISR_Enable( level ); 10af50: ff 75 d4 pushl -0x2c(%ebp) 10af53: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10af54: a1 f4 66 12 00 mov 0x1266f4,%eax 10af59: 8b 57 08 mov 0x8(%edi),%edx 10af5c: 89 50 20 mov %edx,0x20(%eax) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10af5f: 5a pop %edx 10af60: 59 pop %ecx 10af61: 68 00 40 00 00 push $0x4000 10af66: 50 push %eax 10af67: e8 94 2b 00 00 call 10db00 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10af6c: 9c pushf 10af6d: fa cli 10af6e: 5a pop %edx local_state = the_period->state; 10af6f: 8b 47 38 mov 0x38(%edi),%eax the_period->state = RATE_MONOTONIC_ACTIVE; 10af72: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) _ISR_Enable( level ); 10af79: 52 push %edx 10af7a: 9d popf /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 10af7b: 83 c4 10 add $0x10,%esp 10af7e: 83 f8 03 cmp $0x3,%eax 10af81: 75 15 jne 10af98 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10af83: 56 push %esi 10af84: 56 push %esi 10af85: 68 00 40 00 00 push $0x4000 10af8a: ff 35 f4 66 12 00 pushl 0x1266f4 10af90: e8 df 1f 00 00 call 10cf74 <_Thread_Clear_state> 10af95: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 10af98: e8 54 23 00 00 call 10d2f1 <_Thread_Enable_dispatch> 10af9d: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 10af9f: eb 3e jmp 10afdf case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10afa1: 83 ec 0c sub $0xc,%esp 10afa4: 57 push %edi 10afa5: e8 e8 fd ff ff call 10ad92 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10afaa: ff 75 d4 pushl -0x2c(%ebp) 10afad: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10afae: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) the_period->next_length = length; 10afb5: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10afb8: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10afbb: 59 pop %ecx 10afbc: 5b pop %ebx 10afbd: 83 c7 10 add $0x10,%edi 10afc0: 57 push %edi 10afc1: 68 14 67 12 00 push $0x126714 10afc6: e8 6d 32 00 00 call 10e238 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10afcb: e8 21 23 00 00 call 10d2f1 <_Thread_Enable_dispatch> 10afd0: bb 06 00 00 00 mov $0x6,%ebx return RTEMS_TIMEOUT; 10afd5: 83 c4 10 add $0x10,%esp 10afd8: eb 05 jmp 10afdf 10afda: bb 04 00 00 00 mov $0x4,%ebx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10afdf: 89 d8 mov %ebx,%eax 10afe1: 8d 65 f4 lea -0xc(%ebp),%esp 10afe4: 5b pop %ebx 10afe5: 5e pop %esi 10afe6: 5f pop %edi 10afe7: c9 leave 10afe8: c3 ret =============================================================================== 0010afec : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10afec: 55 push %ebp 10afed: 89 e5 mov %esp,%ebp 10afef: 57 push %edi 10aff0: 56 push %esi 10aff1: 53 push %ebx 10aff2: 83 ec 7c sub $0x7c,%esp 10aff5: 8b 5d 08 mov 0x8(%ebp),%ebx 10aff8: 8b 7d 0c mov 0xc(%ebp),%edi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 10affb: 85 ff test %edi,%edi 10affd: 0f 84 2b 01 00 00 je 10b12e <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10b003: 52 push %edx 10b004: 52 push %edx 10b005: 68 d8 f7 11 00 push $0x11f7d8 10b00a: 53 push %ebx 10b00b: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10b00d: 5e pop %esi 10b00e: 58 pop %eax 10b00f: 68 f6 f7 11 00 push $0x11f7f6 10b014: 53 push %ebx 10b015: ff d7 call *%edi (*print)( context, "--- Wall times are in seconds ---\n" ); 10b017: 5a pop %edx 10b018: 59 pop %ecx 10b019: 68 18 f8 11 00 push $0x11f818 10b01e: 53 push %ebx 10b01f: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10b021: 5e pop %esi 10b022: 58 pop %eax 10b023: 68 3b f8 11 00 push $0x11f83b 10b028: 53 push %ebx 10b029: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10b02b: 5a pop %edx 10b02c: 59 pop %ecx 10b02d: 68 86 f8 11 00 push $0x11f886 10b032: 53 push %ebx 10b033: ff d7 call *%edi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10b035: 8b 35 48 65 12 00 mov 0x126548,%esi 10b03b: 83 c4 10 add $0x10,%esp 10b03e: e9 df 00 00 00 jmp 10b122 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10b043: 50 push %eax 10b044: 50 push %eax 10b045: 8d 45 88 lea -0x78(%ebp),%eax 10b048: 50 push %eax 10b049: 56 push %esi 10b04a: e8 55 49 00 00 call 10f9a4 if ( status != RTEMS_SUCCESSFUL ) 10b04f: 83 c4 10 add $0x10,%esp 10b052: 85 c0 test %eax,%eax 10b054: 0f 85 c7 00 00 00 jne 10b121 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10b05a: 51 push %ecx 10b05b: 51 push %ecx 10b05c: 8d 55 c0 lea -0x40(%ebp),%edx 10b05f: 52 push %edx 10b060: 56 push %esi 10b061: e8 e2 49 00 00 call 10fa48 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10b066: 83 c4 0c add $0xc,%esp 10b069: 8d 45 e3 lea -0x1d(%ebp),%eax 10b06c: 50 push %eax 10b06d: 6a 05 push $0x5 10b06f: ff 75 c0 pushl -0x40(%ebp) 10b072: e8 fd 01 00 00 call 10b274 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10b077: 58 pop %eax 10b078: 5a pop %edx 10b079: ff 75 8c pushl -0x74(%ebp) 10b07c: ff 75 88 pushl -0x78(%ebp) 10b07f: 8d 55 e3 lea -0x1d(%ebp),%edx 10b082: 52 push %edx 10b083: 56 push %esi 10b084: 68 d2 f8 11 00 push $0x11f8d2 10b089: 53 push %ebx 10b08a: ff d7 call *%edi ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10b08c: 8b 45 88 mov -0x78(%ebp),%eax 10b08f: 83 c4 20 add $0x20,%esp 10b092: 85 c0 test %eax,%eax 10b094: 75 0f jne 10b0a5 (*print)( context, "\n" ); 10b096: 51 push %ecx 10b097: 51 push %ecx 10b098: 68 4c fb 11 00 push $0x11fb4c 10b09d: 53 push %ebx 10b09e: ff d7 call *%edi continue; 10b0a0: 83 c4 10 add $0x10,%esp 10b0a3: eb 7c jmp 10b121 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 10b0a5: 52 push %edx 10b0a6: 8d 55 d8 lea -0x28(%ebp),%edx 10b0a9: 52 push %edx 10b0aa: 50 push %eax 10b0ab: 8d 45 a0 lea -0x60(%ebp),%eax 10b0ae: 50 push %eax 10b0af: e8 58 2e 00 00 call 10df0c <_Timespec_Divide_by_integer> (*print)( context, 10b0b4: 8b 45 dc mov -0x24(%ebp),%eax 10b0b7: b9 e8 03 00 00 mov $0x3e8,%ecx 10b0bc: 99 cltd 10b0bd: f7 f9 idiv %ecx 10b0bf: 50 push %eax 10b0c0: ff 75 d8 pushl -0x28(%ebp) 10b0c3: 8b 45 9c mov -0x64(%ebp),%eax 10b0c6: 99 cltd 10b0c7: f7 f9 idiv %ecx 10b0c9: 50 push %eax 10b0ca: ff 75 98 pushl -0x68(%ebp) 10b0cd: 8b 45 94 mov -0x6c(%ebp),%eax 10b0d0: 99 cltd 10b0d1: f7 f9 idiv %ecx 10b0d3: 50 push %eax 10b0d4: ff 75 90 pushl -0x70(%ebp) 10b0d7: 68 e9 f8 11 00 push $0x11f8e9 10b0dc: 53 push %ebx 10b0dd: 89 4d 84 mov %ecx,-0x7c(%ebp) 10b0e0: ff d7 call *%edi struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 10b0e2: 83 c4 2c add $0x2c,%esp 10b0e5: 8d 55 d8 lea -0x28(%ebp),%edx 10b0e8: 52 push %edx 10b0e9: ff 75 88 pushl -0x78(%ebp) 10b0ec: 8d 45 b8 lea -0x48(%ebp),%eax 10b0ef: 50 push %eax 10b0f0: e8 17 2e 00 00 call 10df0c <_Timespec_Divide_by_integer> (*print)( context, 10b0f5: 8b 45 dc mov -0x24(%ebp),%eax 10b0f8: 8b 4d 84 mov -0x7c(%ebp),%ecx 10b0fb: 99 cltd 10b0fc: f7 f9 idiv %ecx 10b0fe: 50 push %eax 10b0ff: ff 75 d8 pushl -0x28(%ebp) 10b102: 8b 45 b4 mov -0x4c(%ebp),%eax 10b105: 99 cltd 10b106: f7 f9 idiv %ecx 10b108: 50 push %eax 10b109: ff 75 b0 pushl -0x50(%ebp) 10b10c: 8b 45 ac mov -0x54(%ebp),%eax 10b10f: 99 cltd 10b110: f7 f9 idiv %ecx 10b112: 50 push %eax 10b113: ff 75 a8 pushl -0x58(%ebp) 10b116: 68 08 f9 11 00 push $0x11f908 10b11b: 53 push %ebx 10b11c: ff d7 call *%edi 10b11e: 83 c4 30 add $0x30,%esp * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10b121: 46 inc %esi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10b122: 3b 35 4c 65 12 00 cmp 0x12654c,%esi 10b128: 0f 86 15 ff ff ff jbe 10b043 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10b12e: 8d 65 f4 lea -0xc(%ebp),%esp 10b131: 5b pop %ebx 10b132: 5e pop %esi 10b133: 5f pop %edi 10b134: c9 leave 10b135: c3 ret =============================================================================== 00115cb8 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 115cb8: 55 push %ebp 115cb9: 89 e5 mov %esp,%ebp 115cbb: 53 push %ebx 115cbc: 83 ec 14 sub $0x14,%esp 115cbf: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 115cc2: b8 0a 00 00 00 mov $0xa,%eax 115cc7: 85 db test %ebx,%ebx 115cc9: 74 71 je 115d3c return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 115ccb: 50 push %eax 115ccc: 50 push %eax 115ccd: 8d 45 f4 lea -0xc(%ebp),%eax 115cd0: 50 push %eax 115cd1: ff 75 08 pushl 0x8(%ebp) 115cd4: e8 13 35 00 00 call 1191ec <_Thread_Get> 115cd9: 89 c1 mov %eax,%ecx switch ( location ) { 115cdb: 83 c4 10 add $0x10,%esp 115cde: b8 04 00 00 00 mov $0x4,%eax 115ce3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115ce7: 75 53 jne 115d3c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 115ce9: 8b 91 f0 00 00 00 mov 0xf0(%ecx),%edx asr = &api->Signal; 115cef: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 115cf3: 74 3d je 115d32 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 115cf5: 80 7a 08 00 cmpb $0x0,0x8(%edx) 115cf9: 74 26 je 115d21 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 115cfb: 9c pushf 115cfc: fa cli 115cfd: 58 pop %eax *signal_set |= signals; 115cfe: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 115d01: 50 push %eax 115d02: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 115d03: c6 41 74 01 movb $0x1,0x74(%ecx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 115d07: a1 e0 c5 13 00 mov 0x13c5e0,%eax 115d0c: 85 c0 test %eax,%eax 115d0e: 74 19 je 115d29 115d10: 3b 0d 04 c6 13 00 cmp 0x13c604,%ecx 115d16: 75 11 jne 115d29 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 115d18: c6 05 98 c6 13 00 01 movb $0x1,0x13c698 115d1f: eb 08 jmp 115d29 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 115d21: 9c pushf 115d22: fa cli 115d23: 58 pop %eax *signal_set |= signals; 115d24: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 115d27: 50 push %eax 115d28: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 115d29: e8 6f 34 00 00 call 11919d <_Thread_Enable_dispatch> 115d2e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115d30: eb 0a jmp 115d3c } _Thread_Enable_dispatch(); 115d32: e8 66 34 00 00 call 11919d <_Thread_Enable_dispatch> 115d37: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115d3c: 8b 5d fc mov -0x4(%ebp),%ebx 115d3f: c9 leave 115d40: c3 ret =============================================================================== 00106dc0 : * rtems_stack_checker_Begin_extension */ 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 28 30 12 00 mov $0x123028,%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 58 32 12 00 mov 0x123258,%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 0c 2d 12 00 00 cmpl $0x0,0x122d0c 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 28 30 12 00 push $0x123028 10708d: 50 push %eax 10708e: e8 91 9f 00 00 call 111024 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 58 32 12 00 pushl 0x123258 <== 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 c4 81 10 00 push $0x1081c4 <== 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 10 2d 12 00 mov %esi,0x122d10 <== NOT EXECUTED print_handler = print; 106f35: 89 1d 14 2d 12 00 mov %ebx,0x122d14 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 106f3b: 51 push %ecx <== NOT EXECUTED 106f3c: 51 push %ecx <== NOT EXECUTED 106f3d: 68 21 da 11 00 push $0x11da21 <== 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 38 da 11 00 push $0x11da38 <== 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 39 44 00 00 call 10b394 <== 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 10 2d 12 00 00 movl $0x0,0x122d10 <== NOT EXECUTED 106f6e: 00 00 00 print_handler = NULL; 106f71: c7 05 14 2d 12 00 00 movl $0x0,0x122d14 <== 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 28 30 12 00 push $0x123028 1070ee: 50 push %eax 1070ef: 88 55 f4 mov %dl,-0xc(%ebp) 1070f2: e8 2d 9f 00 00 call 111024 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 =============================================================================== 0010eff0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10eff0: 55 push %ebp 10eff1: 89 e5 mov %esp,%ebp 10eff3: 57 push %edi 10eff4: 56 push %esi 10eff5: 53 push %ebx 10eff6: 83 ec 2c sub $0x2c,%esp 10eff9: 8b 75 08 mov 0x8(%ebp),%esi 10effc: 8b 5d 0c mov 0xc(%ebp),%ebx 10efff: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f002: b8 09 00 00 00 mov $0x9,%eax 10f007: 85 db test %ebx,%ebx 10f009: 74 6e je 10f079 return RTEMS_INVALID_ADDRESS; errno = 0; 10f00b: e8 04 1b 00 00 call 110b14 <__errno> 10f010: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f016: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f01c: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 10f023: 50 push %eax 10f024: 50 push %eax 10f025: 8d 45 e4 lea -0x1c(%ebp),%eax 10f028: 50 push %eax 10f029: 56 push %esi 10f02a: e8 d5 45 00 00 call 113604 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f02f: 83 c4 10 add $0x10,%esp 10f032: 85 ff test %edi,%edi 10f034: 74 05 je 10f03b *endptr = end; 10f036: 8b 45 e4 mov -0x1c(%ebp),%eax 10f039: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 10f03b: b8 0b 00 00 00 mov $0xb,%eax 10f040: 39 75 e4 cmp %esi,-0x1c(%ebp) 10f043: 74 2e je 10f073 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f045: dd 05 28 21 12 00 fldl 0x122128 10f04b: d9 c9 fxch %st(1) 10f04d: dd e1 fucom %st(1) 10f04f: df e0 fnstsw %ax 10f051: dd d9 fstp %st(1) 10f053: 9e sahf 10f054: 76 17 jbe 10f06d 10f056: dd 5d c8 fstpl -0x38(%ebp) 10f059: e8 b6 1a 00 00 call 110b14 <__errno> 10f05e: 89 c2 mov %eax,%edx 10f060: b8 0a 00 00 00 mov $0xa,%eax 10f065: 83 3a 22 cmpl $0x22,(%edx) 10f068: dd 45 c8 fldl -0x38(%ebp) 10f06b: 74 0a je 10f077 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10f06d: dd 1b fstpl (%ebx) 10f06f: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; 10f071: eb 06 jmp 10f079 10f073: dd d8 fstp %st(0) 10f075: eb 02 jmp 10f079 10f077: dd d8 fstp %st(0) } 10f079: 8d 65 f4 lea -0xc(%ebp),%esp 10f07c: 5b pop %ebx 10f07d: 5e pop %esi 10f07e: 5f pop %edi 10f07f: c9 leave 10f080: c3 ret =============================================================================== 0010f084 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f084: 55 push %ebp 10f085: 89 e5 mov %esp,%ebp 10f087: 57 push %edi 10f088: 56 push %esi 10f089: 53 push %ebx 10f08a: 83 ec 2c sub $0x2c,%esp 10f08d: 8b 75 08 mov 0x8(%ebp),%esi 10f090: 8b 5d 0c mov 0xc(%ebp),%ebx 10f093: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f096: b8 09 00 00 00 mov $0x9,%eax 10f09b: 85 db test %ebx,%ebx 10f09d: 74 67 je 10f106 return RTEMS_INVALID_ADDRESS; errno = 0; 10f09f: e8 70 1a 00 00 call 110b14 <__errno> 10f0a4: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f0aa: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 10f0b0: 50 push %eax 10f0b1: 50 push %eax 10f0b2: 8d 45 e4 lea -0x1c(%ebp),%eax 10f0b5: 50 push %eax 10f0b6: 56 push %esi 10f0b7: e8 04 45 00 00 call 1135c0 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f0bc: 83 c4 10 add $0x10,%esp 10f0bf: 85 ff test %edi,%edi 10f0c1: 74 05 je 10f0c8 *endptr = end; 10f0c3: 8b 45 e4 mov -0x1c(%ebp),%eax 10f0c6: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 10f0c8: b8 0b 00 00 00 mov $0xb,%eax 10f0cd: 39 75 e4 cmp %esi,-0x1c(%ebp) 10f0d0: 74 2e je 10f100 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f0d2: d9 05 30 21 12 00 flds 0x122130 10f0d8: d9 c9 fxch %st(1) 10f0da: dd e1 fucom %st(1) 10f0dc: df e0 fnstsw %ax 10f0de: dd d9 fstp %st(1) 10f0e0: 9e sahf 10f0e1: 76 17 jbe 10f0fa 10f0e3: d9 5d c8 fstps -0x38(%ebp) 10f0e6: e8 29 1a 00 00 call 110b14 <__errno> 10f0eb: 89 c2 mov %eax,%edx 10f0ed: b8 0a 00 00 00 mov $0xa,%eax 10f0f2: 83 3a 22 cmpl $0x22,(%edx) 10f0f5: d9 45 c8 flds -0x38(%ebp) 10f0f8: 74 0a je 10f104 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10f0fa: d9 1b fstps (%ebx) 10f0fc: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; 10f0fe: eb 06 jmp 10f106 10f100: dd d8 fstp %st(0) 10f102: eb 02 jmp 10f106 10f104: dd d8 fstp %st(0) } 10f106: 8d 65 f4 lea -0xc(%ebp),%esp 10f109: 5b pop %ebx 10f10a: 5e pop %esi 10f10b: 5f pop %edi 10f10c: c9 leave 10f10d: c3 ret =============================================================================== 0010f110 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f110: 55 push %ebp 10f111: 89 e5 mov %esp,%ebp 10f113: 57 push %edi 10f114: 56 push %esi 10f115: 53 push %ebx 10f116: 83 ec 2c sub $0x2c,%esp 10f119: 8b 7d 08 mov 0x8(%ebp),%edi 10f11c: 8b 5d 0c mov 0xc(%ebp),%ebx 10f11f: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f122: b8 09 00 00 00 mov $0x9,%eax 10f127: 85 db test %ebx,%ebx 10f129: 74 5a je 10f185 return RTEMS_INVALID_ADDRESS; errno = 0; 10f12b: 89 55 d4 mov %edx,-0x2c(%ebp) 10f12e: e8 e1 19 00 00 call 110b14 <__errno> 10f133: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f139: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 10f13f: 50 push %eax 10f140: ff 75 14 pushl 0x14(%ebp) 10f143: 8d 45 e4 lea -0x1c(%ebp),%eax 10f146: 50 push %eax 10f147: 57 push %edi 10f148: e8 53 46 00 00 call 1137a0 10f14d: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f14f: 83 c4 10 add $0x10,%esp 10f152: 8b 55 d4 mov -0x2c(%ebp),%edx 10f155: 85 d2 test %edx,%edx 10f157: 74 05 je 10f15e *endptr = end; 10f159: 8b 45 e4 mov -0x1c(%ebp),%eax 10f15c: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 10f15e: b8 0b 00 00 00 mov $0xb,%eax 10f163: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f166: 74 1d je 10f185 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f168: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi 10f16e: 75 11 jne 10f181 10f170: e8 9f 19 00 00 call 110b14 <__errno> 10f175: 89 c2 mov %eax,%edx 10f177: b8 0a 00 00 00 mov $0xa,%eax 10f17c: 83 3a 22 cmpl $0x22,(%edx) 10f17f: 74 04 je 10f185 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10f181: 89 33 mov %esi,(%ebx) 10f183: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; } 10f185: 8d 65 f4 lea -0xc(%ebp),%esp 10f188: 5b pop %ebx 10f189: 5e pop %esi 10f18a: 5f pop %edi 10f18b: c9 leave 10f18c: c3 ret =============================================================================== 0010f228 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f228: 55 push %ebp 10f229: 89 e5 mov %esp,%ebp 10f22b: 57 push %edi 10f22c: 56 push %esi 10f22d: 53 push %ebx 10f22e: 83 ec 2c sub $0x2c,%esp 10f231: 8b 7d 08 mov 0x8(%ebp),%edi 10f234: 8b 5d 0c mov 0xc(%ebp),%ebx 10f237: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f23a: b8 09 00 00 00 mov $0x9,%eax 10f23f: 85 db test %ebx,%ebx 10f241: 74 62 je 10f2a5 return RTEMS_INVALID_ADDRESS; errno = 0; 10f243: 89 55 d4 mov %edx,-0x2c(%ebp) 10f246: e8 c9 18 00 00 call 110b14 <__errno> 10f24b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f251: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 10f257: 50 push %eax 10f258: ff 75 14 pushl 0x14(%ebp) 10f25b: 8d 45 e4 lea -0x1c(%ebp),%eax 10f25e: 50 push %eax 10f25f: 57 push %edi 10f260: e8 3b 45 00 00 call 1137a0 10f265: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f267: 83 c4 10 add $0x10,%esp 10f26a: 8b 55 d4 mov -0x2c(%ebp),%edx 10f26d: 85 d2 test %edx,%edx 10f26f: 74 05 je 10f276 *endptr = end; 10f271: 8b 45 e4 mov -0x1c(%ebp),%eax 10f274: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 10f276: b8 0b 00 00 00 mov $0xb,%eax 10f27b: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f27e: 74 25 je 10f2a5 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f280: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi 10f286: 74 08 je 10f290 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 10f288: 81 fe 00 00 00 80 cmp $0x80000000,%esi 10f28e: 75 0a jne 10f29a 10f290: e8 7f 18 00 00 call 110b14 <__errno> 10f295: 83 38 22 cmpl $0x22,(%eax) 10f298: 74 06 je 10f2a0 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10f29a: 89 33 mov %esi,(%ebx) 10f29c: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; 10f29e: eb 05 jmp 10f2a5 10f2a0: b8 0a 00 00 00 mov $0xa,%eax } 10f2a5: 8d 65 f4 lea -0xc(%ebp),%esp 10f2a8: 5b pop %ebx 10f2a9: 5e pop %esi 10f2aa: 5f pop %edi 10f2ab: c9 leave 10f2ac: c3 ret =============================================================================== 0010f190 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f190: 55 push %ebp 10f191: 89 e5 mov %esp,%ebp 10f193: 57 push %edi 10f194: 56 push %esi 10f195: 53 push %ebx 10f196: 83 ec 2c sub $0x2c,%esp 10f199: 8b 5d 0c mov 0xc(%ebp),%ebx 10f19c: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f19f: b8 09 00 00 00 mov $0x9,%eax 10f1a4: 85 db test %ebx,%ebx 10f1a6: 74 78 je 10f220 return RTEMS_INVALID_ADDRESS; errno = 0; 10f1a8: e8 67 19 00 00 call 110b14 <__errno> 10f1ad: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f1b3: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f1b9: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 10f1c0: 50 push %eax 10f1c1: ff 75 14 pushl 0x14(%ebp) 10f1c4: 8d 45 e4 lea -0x1c(%ebp),%eax 10f1c7: 50 push %eax 10f1c8: ff 75 08 pushl 0x8(%ebp) 10f1cb: e8 ec 45 00 00 call 1137bc 10f1d0: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f1d2: 83 c4 10 add $0x10,%esp 10f1d5: 85 ff test %edi,%edi 10f1d7: 74 05 je 10f1de *endptr = end; 10f1d9: 8b 45 e4 mov -0x1c(%ebp),%eax 10f1dc: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 10f1de: b8 0b 00 00 00 mov $0xb,%eax 10f1e3: 8b 4d 08 mov 0x8(%ebp),%ecx 10f1e6: 39 4d e4 cmp %ecx,-0x1c(%ebp) 10f1e9: 74 35 je 10f220 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f1eb: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10f1f1: 75 05 jne 10f1f8 10f1f3: 83 fe ff cmp $0xffffffff,%esi 10f1f6: 74 0a je 10f202 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 10f1f8: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax 10f1fe: 09 f0 or %esi,%eax 10f200: 75 10 jne 10f212 10f202: 89 55 d4 mov %edx,-0x2c(%ebp) 10f205: e8 0a 19 00 00 call 110b14 <__errno> 10f20a: 83 38 22 cmpl $0x22,(%eax) 10f20d: 8b 55 d4 mov -0x2c(%ebp),%edx 10f210: 74 09 je 10f21b <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10f212: 89 33 mov %esi,(%ebx) 10f214: 89 53 04 mov %edx,0x4(%ebx) 10f217: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; 10f219: eb 05 jmp 10f220 10f21b: b8 0a 00 00 00 mov $0xa,%eax } 10f220: 8d 65 f4 lea -0xc(%ebp),%esp 10f223: 5b pop %ebx 10f224: 5e pop %esi 10f225: 5f pop %edi 10f226: c9 leave 10f227: c3 ret =============================================================================== 0010f2b0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f2b0: 55 push %ebp 10f2b1: 89 e5 mov %esp,%ebp 10f2b3: 57 push %edi 10f2b4: 56 push %esi 10f2b5: 53 push %ebx 10f2b6: 83 ec 2c sub $0x2c,%esp 10f2b9: 8b 7d 08 mov 0x8(%ebp),%edi 10f2bc: 8b 5d 0c mov 0xc(%ebp),%ebx 10f2bf: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f2c2: b8 09 00 00 00 mov $0x9,%eax 10f2c7: 85 db test %ebx,%ebx 10f2c9: 74 56 je 10f321 return RTEMS_INVALID_ADDRESS; errno = 0; 10f2cb: 89 55 d4 mov %edx,-0x2c(%ebp) 10f2ce: e8 41 18 00 00 call 110b14 <__errno> 10f2d3: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f2d9: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 10f2df: 50 push %eax 10f2e0: 6a 10 push $0x10 10f2e2: 8d 45 e4 lea -0x1c(%ebp),%eax 10f2e5: 50 push %eax 10f2e6: 57 push %edi 10f2e7: e8 30 49 00 00 call 113c1c 10f2ec: 89 c6 mov %eax,%esi #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f2ee: 83 c4 10 add $0x10,%esp 10f2f1: 8b 55 d4 mov -0x2c(%ebp),%edx 10f2f4: 85 d2 test %edx,%edx 10f2f6: 74 05 je 10f2fd *endptr = end; 10f2f8: 8b 45 e4 mov -0x1c(%ebp),%eax 10f2fb: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 10f2fd: b8 0b 00 00 00 mov $0xb,%eax 10f302: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f305: 74 1a je 10f321 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f307: 83 fe ff cmp $0xffffffff,%esi 10f30a: 75 11 jne 10f31d <== ALWAYS TAKEN 10f30c: e8 03 18 00 00 call 110b14 <__errno> <== NOT EXECUTED 10f311: 89 c2 mov %eax,%edx <== NOT EXECUTED 10f313: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 10f318: 83 3a 22 cmpl $0x22,(%edx) <== NOT EXECUTED 10f31b: 74 04 je 10f321 <== NOT EXECUTED if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; 10f31d: 89 33 mov %esi,(%ebx) 10f31f: 31 c0 xor %eax,%eax #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 10f321: 8d 65 f4 lea -0xc(%ebp),%esp 10f324: 5b pop %ebx 10f325: 5e pop %esi 10f326: 5f pop %edi 10f327: c9 leave 10f328: c3 ret =============================================================================== 0010f388 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f388: 55 push %ebp 10f389: 89 e5 mov %esp,%ebp 10f38b: 57 push %edi 10f38c: 56 push %esi 10f38d: 53 push %ebx 10f38e: 83 ec 2c sub $0x2c,%esp 10f391: 8b 7d 08 mov 0x8(%ebp),%edi 10f394: 8b 5d 0c mov 0xc(%ebp),%ebx 10f397: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f39a: b8 09 00 00 00 mov $0x9,%eax 10f39f: 85 db test %ebx,%ebx 10f3a1: 74 57 je 10f3fa return RTEMS_INVALID_ADDRESS; errno = 0; 10f3a3: 89 55 d4 mov %edx,-0x2c(%ebp) 10f3a6: e8 69 17 00 00 call 110b14 <__errno> 10f3ab: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f3b1: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 10f3b7: 50 push %eax 10f3b8: ff 75 14 pushl 0x14(%ebp) 10f3bb: 8d 45 e4 lea -0x1c(%ebp),%eax 10f3be: 50 push %eax 10f3bf: 57 push %edi 10f3c0: e8 57 48 00 00 call 113c1c 10f3c5: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f3c7: 83 c4 10 add $0x10,%esp 10f3ca: 8b 55 d4 mov -0x2c(%ebp),%edx 10f3cd: 85 d2 test %edx,%edx 10f3cf: 74 05 je 10f3d6 *endptr = end; 10f3d1: 8b 45 e4 mov -0x1c(%ebp),%eax 10f3d4: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 10f3d6: b8 0b 00 00 00 mov $0xb,%eax 10f3db: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f3de: 74 1a je 10f3fa return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f3e0: 83 fe ff cmp $0xffffffff,%esi 10f3e3: 75 11 jne 10f3f6 10f3e5: e8 2a 17 00 00 call 110b14 <__errno> 10f3ea: 89 c2 mov %eax,%edx 10f3ec: b8 0a 00 00 00 mov $0xa,%eax 10f3f1: 83 3a 22 cmpl $0x22,(%edx) 10f3f4: 74 04 je 10f3fa <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10f3f6: 89 33 mov %esi,(%ebx) 10f3f8: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; } 10f3fa: 8d 65 f4 lea -0xc(%ebp),%esp 10f3fd: 5b pop %ebx 10f3fe: 5e pop %esi 10f3ff: 5f pop %edi 10f400: c9 leave 10f401: c3 ret =============================================================================== 0010f490 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f490: 55 push %ebp 10f491: 89 e5 mov %esp,%ebp 10f493: 57 push %edi 10f494: 56 push %esi 10f495: 53 push %ebx 10f496: 83 ec 2c sub $0x2c,%esp 10f499: 8b 7d 08 mov 0x8(%ebp),%edi 10f49c: 8b 5d 0c mov 0xc(%ebp),%ebx 10f49f: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f4a2: b8 09 00 00 00 mov $0x9,%eax 10f4a7: 85 db test %ebx,%ebx 10f4a9: 74 57 je 10f502 return RTEMS_INVALID_ADDRESS; errno = 0; 10f4ab: 89 55 d4 mov %edx,-0x2c(%ebp) 10f4ae: e8 61 16 00 00 call 110b14 <__errno> 10f4b3: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f4b9: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 10f4bf: 50 push %eax 10f4c0: ff 75 14 pushl 0x14(%ebp) 10f4c3: 8d 45 e4 lea -0x1c(%ebp),%eax 10f4c6: 50 push %eax 10f4c7: 57 push %edi 10f4c8: e8 4f 47 00 00 call 113c1c 10f4cd: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f4cf: 83 c4 10 add $0x10,%esp 10f4d2: 8b 55 d4 mov -0x2c(%ebp),%edx 10f4d5: 85 d2 test %edx,%edx 10f4d7: 74 05 je 10f4de *endptr = end; 10f4d9: 8b 45 e4 mov -0x1c(%ebp),%eax 10f4dc: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 10f4de: b8 0b 00 00 00 mov $0xb,%eax 10f4e3: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f4e6: 74 1a je 10f502 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f4e8: 83 fe ff cmp $0xffffffff,%esi 10f4eb: 75 11 jne 10f4fe 10f4ed: e8 22 16 00 00 call 110b14 <__errno> 10f4f2: 89 c2 mov %eax,%edx 10f4f4: b8 0a 00 00 00 mov $0xa,%eax 10f4f9: 83 3a 22 cmpl $0x22,(%edx) 10f4fc: 74 04 je 10f502 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10f4fe: 89 33 mov %esi,(%ebx) 10f500: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; } 10f502: 8d 65 f4 lea -0xc(%ebp),%esp 10f505: 5b pop %ebx 10f506: 5e pop %esi 10f507: 5f pop %edi 10f508: c9 leave 10f509: c3 ret =============================================================================== 0010f404 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f404: 55 push %ebp 10f405: 89 e5 mov %esp,%ebp 10f407: 57 push %edi 10f408: 56 push %esi 10f409: 53 push %ebx 10f40a: 83 ec 2c sub $0x2c,%esp 10f40d: 8b 5d 0c mov 0xc(%ebp),%ebx 10f410: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f413: b8 09 00 00 00 mov $0x9,%eax 10f418: 85 db test %ebx,%ebx 10f41a: 74 6b je 10f487 return RTEMS_INVALID_ADDRESS; errno = 0; 10f41c: e8 f3 16 00 00 call 110b14 <__errno> 10f421: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f427: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f42d: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 10f434: 50 push %eax 10f435: ff 75 14 pushl 0x14(%ebp) 10f438: 8d 45 e4 lea -0x1c(%ebp),%eax 10f43b: 50 push %eax 10f43c: ff 75 08 pushl 0x8(%ebp) 10f43f: e8 f4 47 00 00 call 113c38 10f444: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f446: 83 c4 10 add $0x10,%esp 10f449: 85 ff test %edi,%edi 10f44b: 74 05 je 10f452 *endptr = end; 10f44d: 8b 45 e4 mov -0x1c(%ebp),%eax 10f450: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 10f452: b8 0b 00 00 00 mov $0xb,%eax 10f457: 8b 4d 08 mov 0x8(%ebp),%ecx 10f45a: 39 4d e4 cmp %ecx,-0x1c(%ebp) 10f45d: 74 28 je 10f487 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f45f: 83 fa ff cmp $0xffffffff,%edx 10f462: 75 1c jne 10f480 10f464: 83 fe ff cmp $0xffffffff,%esi 10f467: 75 17 jne 10f480 <== NEVER TAKEN 10f469: 89 55 d4 mov %edx,-0x2c(%ebp) 10f46c: e8 a3 16 00 00 call 110b14 <__errno> 10f471: 89 c1 mov %eax,%ecx 10f473: b8 0a 00 00 00 mov $0xa,%eax 10f478: 83 39 22 cmpl $0x22,(%ecx) 10f47b: 8b 55 d4 mov -0x2c(%ebp),%edx 10f47e: 74 07 je 10f487 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10f480: 89 33 mov %esi,(%ebx) 10f482: 89 53 04 mov %edx,0x4(%ebx) 10f485: 31 c0 xor %eax,%eax #endif return RTEMS_SUCCESSFUL; } 10f487: 8d 65 f4 lea -0xc(%ebp),%esp 10f48a: 5b pop %ebx 10f48b: 5e pop %esi 10f48c: 5f pop %edi 10f48d: c9 leave 10f48e: c3 ret =============================================================================== 0010fb18 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 10fb18: 55 push %ebp 10fb19: 89 e5 mov %esp,%ebp 10fb1b: 57 push %edi 10fb1c: 56 push %esi 10fb1d: 53 push %ebx 10fb1e: 83 ec 1c sub $0x1c,%esp 10fb21: 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 ) 10fb24: b8 09 00 00 00 mov $0x9,%eax 10fb29: 85 c9 test %ecx,%ecx 10fb2b: 0f 84 f4 00 00 00 je 10fc25 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 10fb31: 8b 1d 10 3b 12 00 mov 0x123b10,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10fb37: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 10fb3d: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 10fb41: 19 ff sbb %edi,%edi 10fb43: 81 e7 00 01 00 00 and $0x100,%edi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 10fb49: 83 7b 7c 00 cmpl $0x0,0x7c(%ebx) 10fb4d: 74 06 je 10fb55 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 10fb4f: 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; 10fb55: 80 7e 08 01 cmpb $0x1,0x8(%esi) 10fb59: 19 d2 sbb %edx,%edx 10fb5b: 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(); 10fb61: 89 55 e4 mov %edx,-0x1c(%ebp) 10fb64: 89 4d e0 mov %ecx,-0x20(%ebp) 10fb67: e8 6f d2 ff ff call 10cddb <_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; 10fb6c: 8b 55 e4 mov -0x1c(%ebp),%edx 10fb6f: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 10fb71: 09 f8 or %edi,%eax 10fb73: 8b 4d e0 mov -0x20(%ebp),%ecx 10fb76: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 10fb78: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 10fb7f: 74 0f je 10fb90 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 10fb81: 8b 45 08 mov 0x8(%ebp),%eax 10fb84: c1 e8 08 shr $0x8,%eax 10fb87: 83 f0 01 xor $0x1,%eax 10fb8a: 83 e0 01 and $0x1,%eax 10fb8d: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 10fb90: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 10fb97: 74 21 je 10fbba if ( _Modes_Is_timeslice(mode_set) ) { 10fb99: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 10fba0: 74 11 je 10fbb3 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 10fba2: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10fba9: a1 20 3a 12 00 mov 0x123a20,%eax 10fbae: 89 43 78 mov %eax,0x78(%ebx) 10fbb1: eb 07 jmp 10fbba } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10fbb3: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 10fbba: f6 45 0c 01 testb $0x1,0xc(%ebp) 10fbbe: 74 0a je 10fbca */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 10fbc0: f6 45 08 01 testb $0x1,0x8(%ebp) 10fbc4: 74 03 je 10fbc9 10fbc6: fa cli 10fbc7: eb 01 jmp 10fbca 10fbc9: fb sti */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 10fbca: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 10fbd1: 74 33 je 10fc06 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 10fbd3: 8b 45 08 mov 0x8(%ebp),%eax 10fbd6: c1 e8 0a shr $0xa,%eax 10fbd9: 83 f0 01 xor $0x1,%eax 10fbdc: 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; 10fbdf: 3a 46 08 cmp 0x8(%esi),%al 10fbe2: 74 22 je 10fc06 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; 10fbe4: 88 46 08 mov %al,0x8(%esi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 10fbe7: 9c pushf 10fbe8: fa cli 10fbe9: 58 pop %eax _signals = information->signals_pending; 10fbea: 8b 56 18 mov 0x18(%esi),%edx information->signals_pending = information->signals_posted; 10fbed: 8b 4e 14 mov 0x14(%esi),%ecx 10fbf0: 89 4e 18 mov %ecx,0x18(%esi) information->signals_posted = _signals; 10fbf3: 89 56 14 mov %edx,0x14(%esi) _ISR_Enable( _level ); 10fbf6: 50 push %eax 10fbf7: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10fbf8: 83 7e 14 00 cmpl $0x0,0x14(%esi) 10fbfc: 74 08 je 10fc06 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; 10fbfe: c6 43 74 01 movb $0x1,0x74(%ebx) 10fc02: b3 01 mov $0x1,%bl 10fc04: eb 02 jmp 10fc08 10fc06: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 10fc08: 83 3d ec 3b 12 00 03 cmpl $0x3,0x123bec 10fc0f: 75 12 jne 10fc23 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 10fc11: e8 f2 01 00 00 call 10fe08 <_Thread_Evaluate_mode> 10fc16: 84 c0 test %al,%al 10fc18: 75 04 jne 10fc1e 10fc1a: 84 db test %bl,%bl 10fc1c: 74 05 je 10fc23 _Thread_Dispatch(); 10fc1e: e8 6d be ff ff call 10ba90 <_Thread_Dispatch> 10fc23: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10fc25: 83 c4 1c add $0x1c,%esp 10fc28: 5b pop %ebx 10fc29: 5e pop %esi 10fc2a: 5f pop %edi 10fc2b: c9 leave 10fc2c: c3 ret =============================================================================== 0010e178 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10e178: 55 push %ebp 10e179: 89 e5 mov %esp,%ebp 10e17b: 56 push %esi 10e17c: 53 push %ebx 10e17d: 83 ec 10 sub $0x10,%esp 10e180: 8b 5d 0c mov 0xc(%ebp),%ebx 10e183: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10e186: 85 db test %ebx,%ebx 10e188: 74 10 je 10e19a 10e18a: 0f b6 05 d4 4a 12 00 movzbl 0x124ad4,%eax 10e191: ba 13 00 00 00 mov $0x13,%edx 10e196: 39 c3 cmp %eax,%ebx 10e198: 77 50 ja 10e1ea !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10e19a: ba 09 00 00 00 mov $0x9,%edx 10e19f: 85 f6 test %esi,%esi 10e1a1: 74 47 je 10e1ea return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10e1a3: 51 push %ecx 10e1a4: 51 push %ecx 10e1a5: 8d 45 f4 lea -0xc(%ebp),%eax 10e1a8: 50 push %eax 10e1a9: ff 75 08 pushl 0x8(%ebp) 10e1ac: e8 17 1b 00 00 call 10fcc8 <_Thread_Get> switch ( location ) { 10e1b1: 83 c4 10 add $0x10,%esp 10e1b4: ba 04 00 00 00 mov $0x4,%edx 10e1b9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e1bd: 75 2b jne 10e1ea case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10e1bf: 8b 50 14 mov 0x14(%eax),%edx 10e1c2: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10e1c4: 85 db test %ebx,%ebx 10e1c6: 74 1b je 10e1e3 the_thread->real_priority = new_priority; 10e1c8: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10e1cb: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10e1cf: 74 05 je 10e1d6 the_thread->current_priority > new_priority ) 10e1d1: 39 58 14 cmp %ebx,0x14(%eax) 10e1d4: 76 0d jbe 10e1e3 <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10e1d6: 52 push %edx 10e1d7: 6a 00 push $0x0 10e1d9: 53 push %ebx 10e1da: 50 push %eax 10e1db: e8 fc 15 00 00 call 10f7dc <_Thread_Change_priority> 10e1e0: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10e1e3: e8 91 1a 00 00 call 10fc79 <_Thread_Enable_dispatch> 10e1e8: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e1ea: 89 d0 mov %edx,%eax 10e1ec: 8d 65 f8 lea -0x8(%ebp),%esp 10e1ef: 5b pop %ebx 10e1f0: 5e pop %esi 10e1f1: c9 leave 10e1f2: c3 ret =============================================================================== 00109014 : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 109014: 55 push %ebp 109015: 89 e5 mov %esp,%ebp 109017: 8b 55 08 mov 0x8(%ebp),%edx case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; 10901a: b8 09 00 00 00 mov $0x9,%eax rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10901f: 83 fa 09 cmp $0x9,%edx 109022: 0f 84 b5 00 00 00 je 1090dd <== NEVER TAKEN 109028: 7f 54 jg 10907e <== NEVER TAKEN case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; 10902a: b0 04 mov $0x4,%al rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10902c: 83 fa 04 cmp $0x4,%edx 10902f: 0f 84 a8 00 00 00 je 1090dd <== NEVER TAKEN 109035: 7f 2b jg 109062 <== NEVER TAKEN 109037: b0 01 mov $0x1,%al 109039: 83 fa 01 cmp $0x1,%edx 10903c: 0f 84 9b 00 00 00 je 1090dd <== NEVER TAKEN 109042: 7f 09 jg 10904d <== NEVER TAKEN 109044: 30 c0 xor %al,%al 109046: 85 d2 test %edx,%edx 109048: e9 8b 00 00 00 jmp 1090d8 10904d: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED 109052: 83 fa 02 cmp $0x2,%edx <== NOT EXECUTED 109055: 0f 84 82 00 00 00 je 1090dd <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 10905b: b0 03 mov $0x3,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10905d: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 109060: eb 76 jmp 1090d8 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; 109062: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109067: 83 fa 06 cmp $0x6,%edx <== NOT EXECUTED 10906a: 74 71 je 1090dd <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 10906c: b0 05 mov $0x5,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10906e: 7c 6d jl 1090dd <== NOT EXECUTED case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; 109070: b0 07 mov $0x7,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109072: 83 fa 07 cmp $0x7,%edx <== NOT EXECUTED 109075: 74 66 je 1090dd <== NOT EXECUTED case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; 109077: b0 08 mov $0x8,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109079: 83 fa 08 cmp $0x8,%edx <== NOT EXECUTED 10907c: eb 5a jmp 1090d8 <== NOT EXECUTED case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; 10907e: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109083: 83 fa 0e cmp $0xe,%edx <== NOT EXECUTED 109086: 74 55 je 1090dd <== NOT EXECUTED 109088: 7f 19 jg 1090a3 <== NOT EXECUTED case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; 10908a: b0 0b mov $0xb,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10908c: 83 fa 0b cmp $0xb,%edx <== NOT EXECUTED 10908f: 74 4c je 1090dd <== NOT EXECUTED case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 109091: b0 0a mov $0xa,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109093: 7c 48 jl 1090dd <== NOT EXECUTED case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; 109095: b0 0c mov $0xc,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109097: 83 fa 0c cmp $0xc,%edx <== NOT EXECUTED 10909a: 74 41 je 1090dd <== NOT EXECUTED case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; 10909c: b0 0d mov $0xd,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10909e: 83 fa 0d cmp $0xd,%edx <== NOT EXECUTED 1090a1: eb 35 jmp 1090d8 <== NOT EXECUTED case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; 1090a3: b8 11 00 00 00 mov $0x11,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1090a8: 81 fa 02 10 00 00 cmp $0x1002,%edx <== NOT EXECUTED 1090ae: 74 2d je 1090dd <== NOT EXECUTED 1090b0: 7f 11 jg 1090c3 <== NOT EXECUTED case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; 1090b2: b0 0f mov $0xf,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1090b4: 83 fa 0f cmp $0xf,%edx <== NOT EXECUTED 1090b7: 74 24 je 1090dd <== NOT EXECUTED case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; 1090b9: b0 10 mov $0x10,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1090bb: 81 fa 01 10 00 00 cmp $0x1001,%edx <== NOT EXECUTED 1090c1: eb 15 jmp 1090d8 <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 1090c3: b8 12 00 00 00 mov $0x12,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1090c8: 81 fa 03 10 00 00 cmp $0x1003,%edx <== NOT EXECUTED 1090ce: 74 0d je 1090dd <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 1090d0: b0 13 mov $0x13,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1090d2: 81 fa 04 10 00 00 cmp $0x1004,%edx <== NOT EXECUTED 1090d8: 74 03 je 1090dd <== NEVER TAKEN case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 1090da: 83 c8 ff or $0xffffffff,%eax default: baud_index = -1; break; } return baud_index; } 1090dd: c9 leave 1090de: c3 ret =============================================================================== 00107f34 : rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 107f34: 55 push %ebp <== NOT EXECUTED 107f35: 89 e5 mov %esp,%ebp <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 107f37: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 107f3a: a3 18 18 12 00 mov %eax,0x121818 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 107f3f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 107f42: a3 1c 18 12 00 mov %eax,0x12181c <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 107f47: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 107f4a: a3 20 18 12 00 mov %eax,0x121820 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 107f4f: 31 c0 xor %eax,%eax <== NOT EXECUTED 107f51: c9 leave <== NOT EXECUTED 107f52: c3 ret <== NOT EXECUTED =============================================================================== 001090be : } } rtems_status_code rtems_termios_close (void *arg) { 1090be: 55 push %ebp 1090bf: 89 e5 mov %esp,%ebp 1090c1: 56 push %esi 1090c2: 53 push %ebx 1090c3: 8b 75 08 mov 0x8(%ebp),%esi rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 1090c6: 8b 06 mov (%esi),%eax 1090c8: 8b 58 34 mov 0x34(%eax),%ebx rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1090cb: 50 push %eax 1090cc: 6a 00 push $0x0 1090ce: 6a 00 push $0x0 1090d0: ff 35 48 39 12 00 pushl 0x123948 1090d6: e8 11 0f 00 00 call 109fec if (sc != RTEMS_SUCCESSFUL) 1090db: 83 c4 10 add $0x10,%esp 1090de: 85 c0 test %eax,%eax 1090e0: 75 7d jne 10915f <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 1090e2: 8b 43 08 mov 0x8(%ebx),%eax 1090e5: 48 dec %eax 1090e6: 89 43 08 mov %eax,0x8(%ebx) 1090e9: 85 c0 test %eax,%eax 1090eb: 0f 85 33 01 00 00 jne 109224 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 1090f1: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 1090f7: c1 e0 05 shl $0x5,%eax 1090fa: 8b 80 f0 35 12 00 mov 0x1235f0(%eax),%eax 109100: 85 c0 test %eax,%eax 109102: 74 0b je 10910f <== ALWAYS TAKEN /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 109104: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109107: 53 push %ebx <== NOT EXECUTED 109108: ff d0 call *%eax <== NOT EXECUTED 10910a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10910d: eb 1b jmp 10912a <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10910f: 51 push %ecx 109110: 6a 00 push $0x0 109112: 6a 00 push $0x0 109114: ff 73 18 pushl 0x18(%ebx) 109117: e8 d0 0e 00 00 call 109fec if (sc != RTEMS_SUCCESSFUL) { 10911c: 83 c4 10 add $0x10,%esp 10911f: 85 c0 test %eax,%eax 109121: 75 3c jne 10915f <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 109123: 89 d8 mov %ebx,%eax 109125: e8 18 f9 ff ff call 108a42 } if (tty->device.outputUsesInterrupts 10912a: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109131: 75 35 jne 109168 <== ALWAYS TAKEN == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 109133: 52 push %edx <== NOT EXECUTED 109134: 52 push %edx <== NOT EXECUTED 109135: 6a 01 push $0x1 <== NOT EXECUTED 109137: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED 10913d: e8 3e 0a 00 00 call 109b80 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 109142: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109145: 85 c0 test %eax,%eax <== NOT EXECUTED 109147: 75 16 jne 10915f <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 109149: 50 push %eax <== NOT EXECUTED 10914a: 50 push %eax <== NOT EXECUTED 10914b: 6a 01 push $0x1 <== NOT EXECUTED 10914d: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED 109153: e8 28 0a 00 00 call 109b80 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 109158: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10915b: 85 c0 test %eax,%eax <== NOT EXECUTED 10915d: 74 09 je 109168 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 10915f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109162: 50 push %eax <== NOT EXECUTED 109163: e8 3c 14 00 00 call 10a5a4 <== NOT EXECUTED } if (tty->device.lastClose) 109168: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax 10916e: 85 c0 test %eax,%eax 109170: 74 0d je 10917f (*tty->device.lastClose)(tty->major, tty->minor, arg); 109172: 51 push %ecx 109173: 56 push %esi 109174: ff 73 10 pushl 0x10(%ebx) 109177: ff 73 0c pushl 0xc(%ebx) 10917a: ff d0 call *%eax 10917c: 83 c4 10 add $0x10,%esp if (tty->forw == NULL) { 10917f: 8b 13 mov (%ebx),%edx 109181: 85 d2 test %edx,%edx 109183: 8b 43 04 mov 0x4(%ebx),%eax 109186: 75 11 jne 109199 rtems_termios_ttyTail = tty->back; 109188: a3 4c 39 12 00 mov %eax,0x12394c if ( rtems_termios_ttyTail != NULL ) { 10918d: 85 c0 test %eax,%eax 10918f: 74 0b je 10919c <== ALWAYS TAKEN rtems_termios_ttyTail->forw = NULL; 109191: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED 109197: eb 03 jmp 10919c <== NOT EXECUTED } } else { tty->forw->back = tty->back; 109199: 89 42 04 mov %eax,0x4(%edx) } if (tty->back == NULL) { 10919c: 8b 53 04 mov 0x4(%ebx),%edx 10919f: 85 d2 test %edx,%edx 1091a1: 8b 03 mov (%ebx),%eax 1091a3: 75 12 jne 1091b7 <== NEVER TAKEN rtems_termios_ttyHead = tty->forw; 1091a5: a3 50 39 12 00 mov %eax,0x123950 if ( rtems_termios_ttyHead != NULL ) { 1091aa: 85 c0 test %eax,%eax 1091ac: 74 0b je 1091b9 rtems_termios_ttyHead->back = NULL; 1091ae: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 1091b5: eb 02 jmp 1091b9 } } else { tty->back->forw = tty->forw; 1091b7: 89 02 mov %eax,(%edx) <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 1091b9: 83 ec 0c sub $0xc,%esp 1091bc: ff 73 14 pushl 0x14(%ebx) 1091bf: e8 98 0d 00 00 call 109f5c rtems_semaphore_delete (tty->osem); 1091c4: 5a pop %edx 1091c5: ff 73 18 pushl 0x18(%ebx) 1091c8: e8 8f 0d 00 00 call 109f5c rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 1091cd: 58 pop %eax 1091ce: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 1091d4: e8 83 0d 00 00 call 109f5c if ((tty->device.pollRead == NULL) || 1091d9: 83 c4 10 add $0x10,%esp 1091dc: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 1091e3: 74 09 je 1091ee (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 1091e5: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 1091ec: 75 0e jne 1091fc <== ALWAYS TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); 1091ee: 83 ec 0c sub $0xc,%esp 1091f1: ff 73 68 pushl 0x68(%ebx) 1091f4: e8 63 0d 00 00 call 109f5c 1091f9: 83 c4 10 add $0x10,%esp free (tty->rawInBuf.theBuf); 1091fc: 83 ec 0c sub $0xc,%esp 1091ff: ff 73 58 pushl 0x58(%ebx) 109202: e8 e9 df ff ff call 1071f0 free (tty->rawOutBuf.theBuf); 109207: 5e pop %esi 109208: ff 73 7c pushl 0x7c(%ebx) 10920b: e8 e0 df ff ff call 1071f0 free (tty->cbuf); 109210: 59 pop %ecx 109211: ff 73 1c pushl 0x1c(%ebx) 109214: e8 d7 df ff ff call 1071f0 free (tty); 109219: 89 1c 24 mov %ebx,(%esp) 10921c: e8 cf df ff ff call 1071f0 109221: 83 c4 10 add $0x10,%esp } rtems_semaphore_release (rtems_termios_ttyMutex); 109224: 83 ec 0c sub $0xc,%esp 109227: ff 35 48 39 12 00 pushl 0x123948 10922d: e8 a6 0e 00 00 call 10a0d8 return RTEMS_SUCCESSFUL; } 109232: 31 c0 xor %eax,%eax 109234: 8d 65 f8 lea -0x8(%ebp),%esp 109237: 5b pop %ebx 109238: 5e pop %esi 109239: c9 leave 10923a: c3 ret =============================================================================== 00108136 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 108136: 55 push %ebp 108137: 89 e5 mov %esp,%ebp 108139: 83 ec 08 sub $0x8,%esp 10813c: 8b 45 08 mov 0x8(%ebp),%eax rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 10813f: 8b 55 0c mov 0xc(%ebp),%edx 108142: 01 90 90 00 00 00 add %edx,0x90(%eax) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 108148: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 10814f: 75 1f jne 108170 <== ALWAYS TAKEN /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 108151: 52 push %edx <== NOT EXECUTED 108152: 52 push %edx <== NOT EXECUTED 108153: 6a 02 push $0x2 <== NOT EXECUTED 108155: ff b0 c8 00 00 00 pushl 0xc8(%eax) <== NOT EXECUTED 10815b: e8 20 1a 00 00 call 109b80 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 108160: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108163: 85 c0 test %eax,%eax <== NOT EXECUTED 108165: 74 30 je 108197 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 108167: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10816a: 50 push %eax <== NOT EXECUTED 10816b: e8 34 24 00 00 call 10a5a4 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 108170: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax) 108177: 75 15 jne 10818e <== ALWAYS TAKEN /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 108179: 8b 15 a0 36 12 00 mov 0x1236a0,%edx <== NOT EXECUTED 10817f: 85 d2 test %edx,%edx <== NOT EXECUTED 108181: 74 14 je 108197 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 108183: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108186: 50 push %eax <== NOT EXECUTED 108187: ff d2 call *%edx <== NOT EXECUTED 108189: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10818c: eb 09 jmp 108197 <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 10818e: 89 45 08 mov %eax,0x8(%ebp) } } 108191: c9 leave rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 108192: e9 d7 fd ff ff jmp 107f6e } } 108197: 31 c0 xor %eax,%eax <== NOT EXECUTED 108199: c9 leave <== NOT EXECUTED 10819a: c3 ret <== NOT EXECUTED =============================================================================== 0010819b : * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 10819b: 55 push %ebp <== NOT EXECUTED 10819c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10819e: 57 push %edi <== NOT EXECUTED 10819f: 56 push %esi <== NOT EXECUTED 1081a0: 53 push %ebx <== NOT EXECUTED 1081a1: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 1081a4: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 1081a7: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 1081aa: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 1081ad: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx <== NOT EXECUTED 1081b3: c1 e2 05 shl $0x5,%edx <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 1081b6: 89 c6 mov %eax,%esi <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 1081b8: 83 ba fc 35 12 00 00 cmpl $0x0,0x1235fc(%edx) <== NOT EXECUTED 1081bf: 75 35 jne 1081f6 <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 1081c1: 8d 53 4a lea 0x4a(%ebx),%edx <== NOT EXECUTED 1081c4: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 1081c7: 8d 4b 30 lea 0x30(%ebx),%ecx <== NOT EXECUTED 1081ca: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED 1081cd: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 1081d0: c6 45 de 00 movb $0x0,-0x22(%ebp) <== NOT EXECUTED 1081d4: 31 f6 xor %esi,%esi <== NOT EXECUTED 1081d6: e9 1d 02 00 00 jmp 1083f8 <== NOT EXECUTED bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; 1081db: 0f be 17 movsbl (%edi),%edx <== NOT EXECUTED 1081de: 47 inc %edi <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 1081df: 50 push %eax <== NOT EXECUTED 1081e0: 50 push %eax <== NOT EXECUTED 1081e1: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 1081e7: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1081ea: 53 push %ebx <== NOT EXECUTED 1081eb: 52 push %edx <== NOT EXECUTED 1081ec: ff 90 fc 35 12 00 call *0x1235fc(%eax) <== NOT EXECUTED 1081f2: 4e dec %esi <== NOT EXECUTED 1081f3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 1081f6: 85 f6 test %esi,%esi <== NOT EXECUTED 1081f8: 75 e1 jne 1081db <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 1081fa: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx) <== NOT EXECUTED 108201: 0f 85 0e 02 00 00 jne 108415 <== NOT EXECUTED 108207: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 10820d: 85 c0 test %eax,%eax <== NOT EXECUTED 10820f: 0f 84 00 02 00 00 je 108415 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 108215: 51 push %ecx <== NOT EXECUTED 108216: 51 push %ecx <== NOT EXECUTED 108217: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 10821d: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 108220: 52 push %edx <== NOT EXECUTED 108221: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 108223: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 10822a: 00 00 00 10822d: e9 de 01 00 00 jmp 108410 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 108232: 8a 07 mov (%edi),%al <== NOT EXECUTED 108234: 88 45 df mov %al,-0x21(%ebp) <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 108237: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10823d: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 108240: 74 47 je 108289 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 108242: 0f be 45 df movsbl -0x21(%ebp),%eax <== NOT EXECUTED 108246: 0f b6 53 4a movzbl 0x4a(%ebx),%edx <== NOT EXECUTED 10824a: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10824c: 75 28 jne 108276 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 10824e: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 108252: 39 d0 cmp %edx,%eax <== NOT EXECUTED 108254: 75 0b jne 108261 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 108256: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10825c: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED 10825f: eb 09 jmp 10826a <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 108261: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108267: 83 c8 10 or $0x10,%eax <== NOT EXECUTED 10826a: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 108270: c6 45 de 01 movb $0x1,-0x22(%ebp) <== NOT EXECUTED 108274: eb 19 jmp 10828f <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 108276: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 10827a: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10827c: 75 0b jne 108289 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 10827e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108284: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED 108287: eb e1 jmp 10826a <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 108289: 80 7d de 00 cmpb $0x0,-0x22(%ebp) <== NOT EXECUTED 10828d: 74 51 je 1082e0 <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 10828f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108295: 83 e0 30 and $0x30,%eax <== NOT EXECUTED 108298: 83 f8 20 cmp $0x20,%eax <== NOT EXECUTED 10829b: 0f 85 53 01 00 00 jne 1083f4 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 1082a1: 9c pushf <== NOT EXECUTED 1082a2: fa cli <== NOT EXECUTED 1082a3: 8f 45 e4 popl -0x1c(%ebp) <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 1082a6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1082ac: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 1082af: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 1082b5: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 1082bc: 74 19 je 1082d7 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 1082be: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 1082c4: 52 push %edx <== NOT EXECUTED 1082c5: 6a 01 push $0x1 <== NOT EXECUTED 1082c7: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 1082ca: 50 push %eax <== NOT EXECUTED 1082cb: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1082ce: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 1082d4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 1082d7: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 1082da: 9d popf <== NOT EXECUTED 1082db: e9 14 01 00 00 jmp 1083f4 <== NOT EXECUTED } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 1082e0: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 1082e3: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 1082e6: 40 inc %eax <== NOT EXECUTED 1082e7: 31 d2 xor %edx,%edx <== NOT EXECUTED 1082e9: f7 f1 div %ecx <== NOT EXECUTED 1082eb: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 1082ee: 9c pushf <== NOT EXECUTED 1082ef: fa cli <== NOT EXECUTED 1082f0: 8f 45 d4 popl -0x2c(%ebp) <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 1082f3: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 1082f6: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 1082f9: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 1082fc: 29 d0 sub %edx,%eax <== NOT EXECUTED 1082fe: 03 45 e4 add -0x1c(%ebp),%eax <== NOT EXECUTED 108301: 31 d2 xor %edx,%edx <== NOT EXECUTED 108303: f7 f1 div %ecx <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 108305: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx <== NOT EXECUTED 10830b: 0f 86 98 00 00 00 jbe 1083a9 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 108311: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 108317: a8 01 test $0x1,%al <== NOT EXECUTED 108319: 0f 85 8a 00 00 00 jne 1083a9 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 10831f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108325: 83 c8 01 or $0x1,%eax <== NOT EXECUTED 108328: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 10832e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108334: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED 108339: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED 10833e: 75 33 jne 108373 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 108340: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108346: a8 20 test $0x20,%al <== NOT EXECUTED 108348: 75 09 jne 108353 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 10834a: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 108351: 75 56 jne 1083a9 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 108353: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108359: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 10835c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED (*tty->device.write)(tty->minor, 108362: 50 push %eax <== NOT EXECUTED 108363: 6a 01 push $0x1 <== NOT EXECUTED 108365: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 108368: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10836b: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 108371: eb 33 jmp 1083a6 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 108373: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108379: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED 10837e: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED 108383: 75 24 jne 1083a9 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 108385: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10838b: 83 c8 04 or $0x4,%eax <== NOT EXECUTED 10838e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 108394: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED 10839a: 85 c0 test %eax,%eax <== NOT EXECUTED 10839c: 74 0b je 1083a9 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 10839e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1083a1: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1083a4: ff d0 call *%eax <== NOT EXECUTED 1083a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 1083a9: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 1083ac: 9d popf <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 1083ad: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 1083b0: 39 45 e4 cmp %eax,-0x1c(%ebp) <== NOT EXECUTED 1083b3: 75 03 jne 1083b8 <== NOT EXECUTED dropped++; 1083b5: 46 inc %esi <== NOT EXECUTED 1083b6: eb 3c jmp 1083f4 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 1083b8: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 1083bb: 8a 4d df mov -0x21(%ebp),%cl <== NOT EXECUTED 1083be: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1083c1: 88 0c 10 mov %cl,(%eax,%edx,1) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 1083c4: 89 53 60 mov %edx,0x60(%ebx) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 1083c7: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx) <== NOT EXECUTED 1083ce: 75 24 jne 1083f4 <== NOT EXECUTED 1083d0: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 1083d6: 85 c0 test %eax,%eax <== NOT EXECUTED 1083d8: 74 1a je 1083f4 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 1083da: 51 push %ecx <== NOT EXECUTED 1083db: 51 push %ecx <== NOT EXECUTED 1083dc: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 1083e2: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED 1083e5: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 1083e7: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 1083ee: 00 00 00 1083f1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 1083f4: 47 inc %edi <== NOT EXECUTED 1083f5: ff 4d e0 decl -0x20(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 1083f8: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 1083fc: 0f 85 30 fe ff ff jne 108232 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 108402: 01 73 78 add %esi,0x78(%ebx) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 108405: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108408: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 10840b: e8 c8 1c 00 00 call 10a0d8 <== NOT EXECUTED return dropped; 108410: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108413: eb 02 jmp 108417 <== NOT EXECUTED 108415: 31 f6 xor %esi,%esi <== NOT EXECUTED } 108417: 89 f0 mov %esi,%eax <== NOT EXECUTED 108419: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10841c: 5b pop %ebx <== NOT EXECUTED 10841d: 5e pop %esi <== NOT EXECUTED 10841e: 5f pop %edi <== NOT EXECUTED 10841f: c9 leave <== NOT EXECUTED 108420: c3 ret <== NOT EXECUTED =============================================================================== 00107ef8 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 107ef8: 55 push %ebp 107ef9: 89 e5 mov %esp,%ebp 107efb: 83 ec 08 sub $0x8,%esp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 107efe: 83 3d 48 39 12 00 00 cmpl $0x0,0x123948 107f05: 75 28 jne 107f2f sc = rtems_semaphore_create ( 107f07: 83 ec 0c sub $0xc,%esp 107f0a: 68 48 39 12 00 push $0x123948 107f0f: 6a 00 push $0x0 107f11: 6a 54 push $0x54 107f13: 6a 01 push $0x1 107f15: 68 69 6d 52 54 push $0x54526d69 107f1a: e8 a1 1e 00 00 call 109dc0 rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 107f1f: 83 c4 20 add $0x20,%esp 107f22: 85 c0 test %eax,%eax 107f24: 74 09 je 107f2f <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 107f26: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107f29: 50 push %eax <== NOT EXECUTED 107f2a: e8 75 26 00 00 call 10a5a4 <== NOT EXECUTED } } 107f2f: c9 leave 107f30: c3 ret =============================================================================== 00108d73 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 108d73: 55 push %ebp 108d74: 89 e5 mov %esp,%ebp 108d76: 57 push %edi 108d77: 56 push %esi 108d78: 53 push %ebx 108d79: 83 ec 20 sub $0x20,%esp rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 108d7c: 8b 55 08 mov 0x8(%ebp),%edx 108d7f: 8b 02 mov (%edx),%eax 108d81: 8b 58 34 mov 0x34(%eax),%ebx struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 108d84: 8b 72 08 mov 0x8(%edx),%esi rtems_status_code sc; args->ioctl_return = 0; 108d87: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 108d8e: 6a 00 push $0x0 108d90: 6a 00 push $0x0 108d92: ff 73 18 pushl 0x18(%ebx) 108d95: e8 52 12 00 00 call 109fec 108d9a: 89 45 e4 mov %eax,-0x1c(%ebp) if (sc != RTEMS_SUCCESSFUL) { 108d9d: 83 c4 10 add $0x10,%esp 108da0: 85 c0 test %eax,%eax 108da2: 74 0b je 108daf <== ALWAYS TAKEN args->ioctl_return = sc; 108da4: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 108da7: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED return sc; 108daa: e9 04 03 00 00 jmp 1090b3 <== NOT EXECUTED } switch (args->command) { 108daf: 8b 55 08 mov 0x8(%ebp),%edx 108db2: 8b 42 04 mov 0x4(%edx),%eax 108db5: 83 f8 04 cmp $0x4,%eax 108db8: 0f 84 4c 02 00 00 je 10900a <== NEVER TAKEN 108dbe: 77 10 ja 108dd0 <== NEVER TAKEN 108dc0: 83 f8 02 cmp $0x2,%eax 108dc3: 74 77 je 108e3c 108dc5: 0f 87 1d 02 00 00 ja 108fe8 108dcb: 48 dec %eax 108dcc: 75 2f jne 108dfd <== NEVER TAKEN 108dce: eb 55 jmp 108e25 108dd0: 3d 7f 66 04 40 cmp $0x4004667f,%eax <== NOT EXECUTED 108dd5: 0f 84 a4 02 00 00 je 10907f <== NOT EXECUTED 108ddb: 77 0a ja 108de7 <== NOT EXECUTED 108ddd: 83 f8 05 cmp $0x5,%eax <== NOT EXECUTED 108de0: 75 1b jne 108dfd <== NOT EXECUTED 108de2: e9 0d 02 00 00 jmp 108ff4 <== NOT EXECUTED 108de7: 3d 1a 74 04 40 cmp $0x4004741a,%eax <== NOT EXECUTED 108dec: 0f 84 7d 02 00 00 je 10906f <== NOT EXECUTED 108df2: 3d 1b 74 04 80 cmp $0x8004741b,%eax <== NOT EXECUTED 108df7: 0f 84 20 02 00 00 je 10901d <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 108dfd: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 108e03: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 108e06: 8b 80 04 36 12 00 mov 0x123604(%eax),%eax <== NOT EXECUTED 108e0c: c7 45 e4 0a 00 00 00 movl $0xa,-0x1c(%ebp) <== NOT EXECUTED 108e13: 85 c0 test %eax,%eax <== NOT EXECUTED 108e15: 0f 84 81 02 00 00 je 10909c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 108e1b: 52 push %edx <== NOT EXECUTED 108e1c: 52 push %edx <== NOT EXECUTED 108e1d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 108e20: e9 3f 02 00 00 jmp 109064 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 108e25: 8b 4d 08 mov 0x8(%ebp),%ecx 108e28: 8b 41 08 mov 0x8(%ecx),%eax 108e2b: 8d 73 30 lea 0x30(%ebx),%esi 108e2e: b9 09 00 00 00 mov $0x9,%ecx 108e33: 89 c7 mov %eax,%edi 108e35: f3 a5 rep movsl %ds:(%esi),%es:(%edi) break; 108e37: e9 60 02 00 00 jmp 10909c case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 108e3c: 8b 45 08 mov 0x8(%ebp),%eax 108e3f: 8b 70 08 mov 0x8(%eax),%esi 108e42: 8d 7b 30 lea 0x30(%ebx),%edi 108e45: b9 09 00 00 00 mov $0x9,%ecx 108e4a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 108e4c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108e52: f6 c4 02 test $0x2,%ah 108e55: 74 57 je 108eae 108e57: f6 43 31 04 testb $0x4,0x31(%ebx) 108e5b: 75 51 jne 108eae <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 108e5d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108e63: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED 108e68: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 108e6e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108e74: a8 20 test $0x20,%al <== NOT EXECUTED 108e76: 74 36 je 108eae <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 108e78: 9c pushf <== NOT EXECUTED 108e79: fa cli <== NOT EXECUTED 108e7a: 5e pop %esi <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 108e7b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108e81: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 108e84: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 108e8a: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 108e91: 74 19 je 108eac <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 108e93: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 108e99: 57 push %edi <== NOT EXECUTED 108e9a: 6a 01 push $0x1 <== NOT EXECUTED 108e9c: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 108e9f: 50 push %eax <== NOT EXECUTED 108ea0: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108ea3: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 108ea9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 108eac: 56 push %esi <== NOT EXECUTED 108ead: 9d popf <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 108eae: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108eb4: f6 c4 04 test $0x4,%ah 108eb7: 74 24 je 108edd <== ALWAYS TAKEN 108eb9: f6 43 31 10 testb $0x10,0x31(%ebx) <== NOT EXECUTED 108ebd: 75 1e jne 108edd <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 108ebf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108ec5: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED 108ec8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 108ece: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108ed4: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 108ed7: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 108edd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108ee3: f6 c4 01 test $0x1,%ah 108ee6: 74 43 je 108f2b <== ALWAYS TAKEN 108ee8: 83 7b 38 00 cmpl $0x0,0x38(%ebx) <== NOT EXECUTED 108eec: 78 3d js 108f2b <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 108eee: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108ef4: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED 108ef7: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 108efd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108f03: a8 04 test $0x4,%al <== NOT EXECUTED 108f05: 74 15 je 108f1c <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 108f07: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 108f0d: 85 c0 test %eax,%eax <== NOT EXECUTED 108f0f: 74 0b je 108f1c <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 108f11: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108f14: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108f17: ff d0 call *%eax <== NOT EXECUTED 108f19: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 108f1c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108f22: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 108f25: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 108f2b: 83 7b 38 00 cmpl $0x0,0x38(%ebx) 108f2f: 79 0f jns 108f40 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDRTS; 108f31: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108f37: 80 cc 01 or $0x1,%ah <== NOT EXECUTED 108f3a: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 108f40: f6 43 31 10 testb $0x10,0x31(%ebx) 108f44: 74 0f je 108f55 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXOF; 108f46: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108f4c: 80 cc 04 or $0x4,%ah <== NOT EXECUTED 108f4f: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 108f55: f6 43 31 04 testb $0x4,0x31(%ebx) 108f59: 74 0f je 108f6a <== NEVER TAKEN tty->flow_ctrl |= FL_MDXON; 108f5b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108f61: 80 cc 02 or $0x2,%ah 108f64: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 108f6a: f6 43 3c 02 testb $0x2,0x3c(%ebx) 108f6e: 75 39 jne 108fa9 <== ALWAYS TAKEN tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 108f70: 0f b6 73 46 movzbl 0x46(%ebx),%esi <== NOT EXECUTED 108f74: e8 2f 0a 00 00 call 1099a8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 108f79: 0f af c6 imul %esi,%eax <== NOT EXECUTED 108f7c: b9 0a 00 00 00 mov $0xa,%ecx <== NOT EXECUTED 108f81: 31 d2 xor %edx,%edx <== NOT EXECUTED 108f83: f7 f1 div %ecx <== NOT EXECUTED 108f85: 89 43 54 mov %eax,0x54(%ebx) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 108f88: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 108f8c: 74 15 je 108fa3 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 108f8e: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 108f95: 89 43 70 mov %eax,0x70(%ebx) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 108f98: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 108f9c: 75 19 jne 108fb7 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 108f9e: 89 43 74 mov %eax,0x74(%ebx) <== NOT EXECUTED 108fa1: eb 24 jmp 108fc7 <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 108fa3: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 108fa7: 74 17 je 108fc0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 108fa9: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 108fb0: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 108fb7: c7 43 74 00 00 00 00 movl $0x0,0x74(%ebx) 108fbe: eb 07 jmp 108fc7 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 108fc0: c7 43 6c 01 00 00 00 movl $0x1,0x6c(%ebx) <== NOT EXECUTED } } } if (tty->device.setAttributes) 108fc7: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax 108fcd: 85 c0 test %eax,%eax 108fcf: 0f 84 c7 00 00 00 je 10909c <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 108fd5: 56 push %esi 108fd6: 56 push %esi 108fd7: 8d 53 30 lea 0x30(%ebx),%edx 108fda: 52 push %edx 108fdb: ff 73 10 pushl 0x10(%ebx) 108fde: ff d0 call *%eax 108fe0: 83 c4 10 add $0x10,%esp 108fe3: e9 b4 00 00 00 jmp 10909c break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 108fe8: 89 d8 mov %ebx,%eax 108fea: e8 53 fa ff ff call 108a42 break; 108fef: e9 a8 00 00 00 jmp 10909c case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 108ff4: 8b 06 mov (%esi),%eax <== NOT EXECUTED 108ff6: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 108ff9: 89 83 d4 00 00 00 mov %eax,0xd4(%ebx) <== NOT EXECUTED 108fff: 89 93 d8 00 00 00 mov %edx,0xd8(%ebx) <== NOT EXECUTED break; 109005: e9 92 00 00 00 jmp 10909c <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 10900a: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10900c: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 10900f: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx) <== NOT EXECUTED 109015: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx) <== NOT EXECUTED break; 10901b: eb 7f jmp 10909c <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 10901d: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 109023: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 109026: 8b 80 f0 35 12 00 mov 0x1235f0(%eax),%eax <== NOT EXECUTED 10902c: 85 c0 test %eax,%eax <== NOT EXECUTED 10902e: 74 0c je 10903c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 109030: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109033: 53 push %ebx <== NOT EXECUTED 109034: ff d0 call *%eax <== NOT EXECUTED 109036: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 109039: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 10903c: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10903f: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED 109042: 8b 00 mov (%eax),%eax <== NOT EXECUTED 109044: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 10904a: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) <== NOT EXECUTED 109051: 00 00 00 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 109054: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 109057: 8b 80 ec 35 12 00 mov 0x1235ec(%eax),%eax <== NOT EXECUTED 10905d: 85 c0 test %eax,%eax <== NOT EXECUTED 10905f: 74 3b je 10909c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 109061: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109064: 53 push %ebx <== NOT EXECUTED 109065: ff d0 call *%eax <== NOT EXECUTED 109067: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 10906a: e9 71 ff ff ff jmp 108fe0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 10906f: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 109072: 8b 41 08 mov 0x8(%ecx),%eax <== NOT EXECUTED 109075: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx <== NOT EXECUTED 10907b: 89 10 mov %edx,(%eax) <== NOT EXECUTED break; 10907d: eb 1d jmp 10909c <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 10907f: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 109082: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED if ( rawnc < 0 ) 109085: 29 d0 sub %edx,%eax <== NOT EXECUTED 109087: 79 05 jns 10908e <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 109089: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 10908c: 01 d0 add %edx,%eax <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 10908e: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 109091: 8b 51 08 mov 0x8(%ecx),%edx <== NOT EXECUTED 109094: 03 43 20 add 0x20(%ebx),%eax <== NOT EXECUTED 109097: 2b 43 24 sub 0x24(%ebx),%eax <== NOT EXECUTED 10909a: 89 02 mov %eax,(%edx) <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 10909c: 83 ec 0c sub $0xc,%esp 10909f: ff 73 18 pushl 0x18(%ebx) 1090a2: e8 31 10 00 00 call 10a0d8 args->ioctl_return = sc; 1090a7: 8b 55 e4 mov -0x1c(%ebp),%edx 1090aa: 8b 45 08 mov 0x8(%ebp),%eax 1090ad: 89 50 0c mov %edx,0xc(%eax) return sc; 1090b0: 83 c4 10 add $0x10,%esp } 1090b3: 8b 45 e4 mov -0x1c(%ebp),%eax 1090b6: 8d 65 f4 lea -0xc(%ebp),%esp 1090b9: 5b pop %ebx 1090ba: 5e pop %esi 1090bb: 5f pop %edi 1090bc: c9 leave 1090bd: c3 ret =============================================================================== 0010923b : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 10923b: 55 push %ebp 10923c: 89 e5 mov %esp,%ebp 10923e: 57 push %edi 10923f: 56 push %esi 109240: 53 push %ebx 109241: 83 ec 20 sub $0x20,%esp 109244: 8b 75 14 mov 0x14(%ebp),%esi struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 109247: 6a 00 push $0x0 109249: 6a 00 push $0x0 10924b: ff 35 48 39 12 00 pushl 0x123948 109251: e8 96 0d 00 00 call 109fec 109256: 89 45 e4 mov %eax,-0x1c(%ebp) RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109259: 83 c4 10 add $0x10,%esp 10925c: 85 c0 test %eax,%eax 10925e: 0f 85 cf 03 00 00 jne 109633 <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 109264: 8b 15 50 39 12 00 mov 0x123950,%edx 10926a: eb 16 jmp 109282 if ((tty->major == major) && (tty->minor == minor)) 10926c: 8b 45 08 mov 0x8(%ebp),%eax 10926f: 39 42 0c cmp %eax,0xc(%edx) 109272: 75 0c jne 109280 109274: 8b 4d 0c mov 0xc(%ebp),%ecx 109277: 39 4a 10 cmp %ecx,0x10(%edx) 10927a: 0f 84 24 03 00 00 je 1095a4 <== ALWAYS TAKEN */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 109280: 8b 12 mov (%edx),%edx 109282: 85 d2 test %edx,%edx 109284: 75 e6 jne 10926c 109286: e9 b3 03 00 00 jmp 10963e /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 10928b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10928e: e9 98 00 00 00 jmp 10932b <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 109293: a1 1c 18 12 00 mov 0x12181c,%eax 109298: 89 42 64 mov %eax,0x64(%edx) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 10929b: 8b 42 64 mov 0x64(%edx),%eax 10929e: 83 ec 0c sub $0xc,%esp 1092a1: 50 push %eax 1092a2: 89 55 e0 mov %edx,-0x20(%ebp) 1092a5: e8 72 e1 ff ff call 10741c 1092aa: 8b 55 e0 mov -0x20(%ebp),%edx 1092ad: 89 42 58 mov %eax,0x58(%edx) if (tty->rawInBuf.theBuf == NULL) { 1092b0: 83 c4 10 add $0x10,%esp 1092b3: 85 c0 test %eax,%eax 1092b5: 75 05 jne 1092bc <== ALWAYS TAKEN free(tty); 1092b7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1092ba: eb 68 jmp 109324 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 1092bc: a1 20 18 12 00 mov 0x121820,%eax 1092c1: 89 82 88 00 00 00 mov %eax,0x88(%edx) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 1092c7: 8b 82 88 00 00 00 mov 0x88(%edx),%eax 1092cd: 83 ec 0c sub $0xc,%esp 1092d0: 50 push %eax 1092d1: 89 55 e0 mov %edx,-0x20(%ebp) 1092d4: e8 43 e1 ff ff call 10741c 1092d9: 8b 55 e0 mov -0x20(%ebp),%edx 1092dc: 89 42 7c mov %eax,0x7c(%edx) if (tty->rawOutBuf.theBuf == NULL) { 1092df: 83 c4 10 add $0x10,%esp 1092e2: 85 c0 test %eax,%eax 1092e4: 75 05 jne 1092eb <== ALWAYS TAKEN free((void *)(tty->rawInBuf.theBuf)); 1092e6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1092e9: eb 2d jmp 109318 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 1092eb: 83 ec 0c sub $0xc,%esp 1092ee: ff 35 18 18 12 00 pushl 0x121818 1092f4: 89 55 e0 mov %edx,-0x20(%ebp) 1092f7: e8 20 e1 ff ff call 10741c 1092fc: 8b 55 e0 mov -0x20(%ebp),%edx 1092ff: 89 42 1c mov %eax,0x1c(%edx) if (tty->cbuf == NULL) { 109302: 83 c4 10 add $0x10,%esp 109305: 85 c0 test %eax,%eax 109307: 75 39 jne 109342 <== ALWAYS TAKEN free((void *)(tty->rawOutBuf.theBuf)); 109309: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10930c: ff 72 7c pushl 0x7c(%edx) <== NOT EXECUTED 10930f: e8 dc de ff ff call 1071f0 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 109314: 5b pop %ebx <== NOT EXECUTED 109315: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109318: ff 72 58 pushl 0x58(%edx) <== NOT EXECUTED 10931b: e8 d0 de ff ff call 1071f0 <== NOT EXECUTED free(tty); 109320: 59 pop %ecx <== NOT EXECUTED 109321: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109324: 52 push %edx <== NOT EXECUTED 109325: e8 c6 de ff ff call 1071f0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 10932a: 5a pop %edx <== NOT EXECUTED 10932b: ff 35 48 39 12 00 pushl 0x123948 <== NOT EXECUTED 109331: e8 a2 0d 00 00 call 10a0d8 <== NOT EXECUTED 109336: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED 10933d: e9 ee 02 00 00 jmp 109630 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 109342: c7 82 d4 00 00 00 00 movl $0x0,0xd4(%edx) 109349: 00 00 00 tty->tty_snd.sw_arg = NULL; 10934c: c7 82 d8 00 00 00 00 movl $0x0,0xd8(%edx) 109353: 00 00 00 tty->tty_rcv.sw_pfn = NULL; 109356: c7 82 dc 00 00 00 00 movl $0x0,0xdc(%edx) 10935d: 00 00 00 tty->tty_rcv.sw_arg = NULL; 109360: c7 82 e0 00 00 00 00 movl $0x0,0xe0(%edx) 109367: 00 00 00 tty->tty_rcvwakeup = 0; 10936a: c7 82 e4 00 00 00 00 movl $0x0,0xe4(%edx) 109371: 00 00 00 /* * link tty */ tty->forw = rtems_termios_ttyHead; 109374: a1 50 39 12 00 mov 0x123950,%eax 109379: 89 02 mov %eax,(%edx) tty->back = NULL; 10937b: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) if (rtems_termios_ttyHead != NULL) 109382: 85 c0 test %eax,%eax 109384: 74 03 je 109389 rtems_termios_ttyHead->back = tty; 109386: 89 50 04 mov %edx,0x4(%eax) rtems_termios_ttyHead = tty; 109389: 89 1d 50 39 12 00 mov %ebx,0x123950 if (rtems_termios_ttyTail == NULL) 10938f: 83 3d 4c 39 12 00 00 cmpl $0x0,0x12394c 109396: 75 06 jne 10939e rtems_termios_ttyTail = tty; 109398: 89 1d 4c 39 12 00 mov %ebx,0x12394c tty->minor = minor; 10939e: 8b 45 0c mov 0xc(%ebp),%eax 1093a1: 89 43 10 mov %eax,0x10(%ebx) tty->major = major; 1093a4: 8b 4d 08 mov 0x8(%ebp),%ecx 1093a7: 89 4b 0c mov %ecx,0xc(%ebx) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 1093aa: 83 ec 0c sub $0xc,%esp 1093ad: 8d 43 14 lea 0x14(%ebx),%eax 1093b0: 50 push %eax 1093b1: 6a 00 push $0x0 1093b3: 6a 54 push $0x54 1093b5: 6a 01 push $0x1 1093b7: 0f be 05 24 18 12 00 movsbl 0x121824,%eax 1093be: 0d 00 69 52 54 or $0x54526900,%eax 1093c3: 50 push %eax 1093c4: 89 55 e0 mov %edx,-0x20(%ebp) 1093c7: e8 f4 09 00 00 call 109dc0 rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 1093cc: 83 c4 20 add $0x20,%esp 1093cf: 85 c0 test %eax,%eax 1093d1: 8b 55 e0 mov -0x20(%ebp),%edx 1093d4: 0f 85 3f 02 00 00 jne 109619 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 1093da: 83 ec 0c sub $0xc,%esp 1093dd: 8d 43 18 lea 0x18(%ebx),%eax 1093e0: 50 push %eax 1093e1: 6a 00 push $0x0 1093e3: 6a 54 push $0x54 1093e5: 6a 01 push $0x1 1093e7: 0f be 05 24 18 12 00 movsbl 0x121824,%eax 1093ee: 0d 00 6f 52 54 or $0x54526f00,%eax 1093f3: 50 push %eax 1093f4: 89 55 e0 mov %edx,-0x20(%ebp) 1093f7: e8 c4 09 00 00 call 109dc0 rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 1093fc: 83 c4 20 add $0x20,%esp 1093ff: 85 c0 test %eax,%eax 109401: 8b 55 e0 mov -0x20(%ebp),%edx 109404: 0f 85 0f 02 00 00 jne 109619 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10940a: 83 ec 0c sub $0xc,%esp 10940d: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax 109413: 50 push %eax 109414: 6a 00 push $0x0 109416: 6a 20 push $0x20 109418: 6a 00 push $0x0 10941a: 0f be 05 24 18 12 00 movsbl 0x121824,%eax 109421: 0d 00 78 52 54 or $0x54527800,%eax 109426: 50 push %eax 109427: 89 55 e0 mov %edx,-0x20(%ebp) 10942a: e8 91 09 00 00 call 109dc0 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 10942f: 83 c4 20 add $0x20,%esp 109432: 85 c0 test %eax,%eax 109434: 8b 55 e0 mov -0x20(%ebp),%edx 109437: 0f 85 dc 01 00 00 jne 109619 <== NEVER TAKEN rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 10943d: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 109444: 00 00 00 /* * Set callbacks */ tty->device = *callbacks; 109447: 8d bb 98 00 00 00 lea 0x98(%ebx),%edi 10944d: b9 08 00 00 00 mov $0x8,%ecx 109452: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 109454: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10945b: 75 74 jne 1094d1 <== ALWAYS TAKEN sc = rtems_task_create ( 10945d: 50 push %eax <== NOT EXECUTED 10945e: 50 push %eax <== NOT EXECUTED 10945f: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax <== NOT EXECUTED 109465: 50 push %eax <== NOT EXECUTED 109466: 6a 00 push $0x0 <== NOT EXECUTED 109468: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 10946d: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 109472: 6a 0a push $0xa <== NOT EXECUTED 109474: 0f be 05 24 18 12 00 movsbl 0x121824,%eax <== NOT EXECUTED 10947b: 0d 00 54 78 54 or $0x54785400,%eax <== NOT EXECUTED 109480: 50 push %eax <== NOT EXECUTED 109481: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 109484: e8 df 0c 00 00 call 10a168 <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 109489: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10948c: 85 c0 test %eax,%eax <== NOT EXECUTED 10948e: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109491: 0f 85 82 01 00 00 jne 109619 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 109497: 57 push %edi <== NOT EXECUTED 109498: 57 push %edi <== NOT EXECUTED 109499: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax <== NOT EXECUTED 10949f: 50 push %eax <== NOT EXECUTED 1094a0: 6a 00 push $0x0 <== NOT EXECUTED 1094a2: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 1094a7: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 1094ac: 6a 09 push $0x9 <== NOT EXECUTED 1094ae: 0f be 05 24 18 12 00 movsbl 0x121824,%eax <== NOT EXECUTED 1094b5: 0d 00 54 78 52 or $0x52785400,%eax <== NOT EXECUTED 1094ba: 50 push %eax <== NOT EXECUTED 1094bb: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 1094be: e8 a5 0c 00 00 call 10a168 <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 1094c3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1094c6: 85 c0 test %eax,%eax <== NOT EXECUTED 1094c8: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 1094cb: 0f 85 48 01 00 00 jne 109619 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 1094d1: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 1094d8: 74 09 je 1094e3 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 1094da: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 1094e1: 75 30 jne 109513 <== ALWAYS TAKEN sc = rtems_semaphore_create ( 1094e3: 83 ec 0c sub $0xc,%esp 1094e6: 8d 43 68 lea 0x68(%ebx),%eax 1094e9: 50 push %eax 1094ea: 6a 00 push $0x0 1094ec: 6a 24 push $0x24 1094ee: 6a 00 push $0x0 1094f0: 0f be 05 24 18 12 00 movsbl 0x121824,%eax 1094f7: 0d 00 72 52 54 or $0x54527200,%eax 1094fc: 50 push %eax 1094fd: 89 55 e0 mov %edx,-0x20(%ebp) 109500: e8 bb 08 00 00 call 109dc0 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 109505: 83 c4 20 add $0x20,%esp 109508: 85 c0 test %eax,%eax 10950a: 8b 55 e0 mov -0x20(%ebp),%edx 10950d: 0f 85 06 01 00 00 jne 109619 <== NEVER TAKEN } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 109513: c7 43 30 02 25 00 00 movl $0x2502,0x30(%ebx) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 10951a: c7 43 34 05 18 00 00 movl $0x1805,0x34(%ebx) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 109521: c7 43 38 bd 08 00 00 movl $0x8bd,0x38(%ebx) tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 109528: c7 43 3c 3b 82 00 00 movl $0x823b,0x3c(%ebx) tty->termios.c_cc[VINTR] = '\003'; 10952f: c6 43 41 03 movb $0x3,0x41(%ebx) tty->termios.c_cc[VQUIT] = '\034'; 109533: c6 43 42 1c movb $0x1c,0x42(%ebx) tty->termios.c_cc[VERASE] = '\177'; 109537: c6 43 43 7f movb $0x7f,0x43(%ebx) tty->termios.c_cc[VKILL] = '\025'; 10953b: c6 43 44 15 movb $0x15,0x44(%ebx) tty->termios.c_cc[VEOF] = '\004'; 10953f: c6 43 45 04 movb $0x4,0x45(%ebx) tty->termios.c_cc[VEOL] = '\000'; 109543: c6 43 4c 00 movb $0x0,0x4c(%ebx) tty->termios.c_cc[VEOL2] = '\000'; 109547: c6 43 51 00 movb $0x0,0x51(%ebx) tty->termios.c_cc[VSTART] = '\021'; 10954b: c6 43 49 11 movb $0x11,0x49(%ebx) tty->termios.c_cc[VSTOP] = '\023'; 10954f: c6 43 4a 13 movb $0x13,0x4a(%ebx) tty->termios.c_cc[VSUSP] = '\032'; 109553: c6 43 4b 1a movb $0x1a,0x4b(%ebx) tty->termios.c_cc[VREPRINT] = '\022'; 109557: c6 43 4d 12 movb $0x12,0x4d(%ebx) tty->termios.c_cc[VDISCARD] = '\017'; 10955b: c6 43 4e 0f movb $0xf,0x4e(%ebx) tty->termios.c_cc[VWERASE] = '\027'; 10955f: c6 43 4f 17 movb $0x17,0x4f(%ebx) tty->termios.c_cc[VLNEXT] = '\026'; 109563: c6 43 50 16 movb $0x16,0x50(%ebx) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 109567: c7 83 b8 00 00 00 00 movl $0x0,0xb8(%ebx) 10956e: 00 00 00 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 109571: 8b 43 64 mov 0x64(%ebx),%eax 109574: d1 e8 shr %eax 109576: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) tty->highwater = tty->rawInBuf.Size * 3/4; 10957c: 8b 43 64 mov 0x64(%ebx),%eax 10957f: 8d 04 40 lea (%eax,%eax,2),%eax 109582: c1 e8 02 shr $0x2,%eax 109585: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) /* * Bump name characer */ if (c++ == 'z') 10958b: a0 24 18 12 00 mov 0x121824,%al 109590: 8d 48 01 lea 0x1(%eax),%ecx 109593: 88 0d 24 18 12 00 mov %cl,0x121824 109599: 3c 7a cmp $0x7a,%al 10959b: 75 07 jne 1095a4 <== ALWAYS TAKEN c = 'a'; 10959d: c6 05 24 18 12 00 61 movb $0x61,0x121824 <== NOT EXECUTED } args->iop->data1 = tty; 1095a4: 8b 4d 10 mov 0x10(%ebp),%ecx 1095a7: 8b 01 mov (%ecx),%eax 1095a9: 89 50 34 mov %edx,0x34(%eax) if (!tty->refcount++) { 1095ac: 8b 42 08 mov 0x8(%edx),%eax 1095af: 8d 48 01 lea 0x1(%eax),%ecx 1095b2: 89 4a 08 mov %ecx,0x8(%edx) 1095b5: 85 c0 test %eax,%eax 1095b7: 75 69 jne 109622 if (tty->device.firstOpen) 1095b9: 8b 82 98 00 00 00 mov 0x98(%edx),%eax 1095bf: 85 c0 test %eax,%eax 1095c1: 74 15 je 1095d8 (*tty->device.firstOpen)(major, minor, arg); 1095c3: 56 push %esi 1095c4: ff 75 10 pushl 0x10(%ebp) 1095c7: ff 75 0c pushl 0xc(%ebp) 1095ca: ff 75 08 pushl 0x8(%ebp) 1095cd: 89 55 e0 mov %edx,-0x20(%ebp) 1095d0: ff d0 call *%eax 1095d2: 83 c4 10 add $0x10,%esp 1095d5: 8b 55 e0 mov -0x20(%ebp),%edx /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 1095d8: 83 ba b4 00 00 00 02 cmpl $0x2,0xb4(%edx) 1095df: 75 41 jne 109622 <== ALWAYS TAKEN sc = rtems_task_start(tty->rxTaskId, 1095e1: 53 push %ebx <== NOT EXECUTED 1095e2: 52 push %edx <== NOT EXECUTED 1095e3: 68 c3 96 10 00 push $0x1096c3 <== NOT EXECUTED 1095e8: ff b2 c4 00 00 00 pushl 0xc4(%edx) <== NOT EXECUTED 1095ee: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 1095f1: e8 de 0d 00 00 call 10a3d4 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 1095f6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1095f9: 85 c0 test %eax,%eax <== NOT EXECUTED 1095fb: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 1095fe: 75 19 jne 109619 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 109600: 51 push %ecx <== NOT EXECUTED 109601: 52 push %edx <== NOT EXECUTED 109602: 68 60 96 10 00 push $0x109660 <== NOT EXECUTED 109607: ff b2 c8 00 00 00 pushl 0xc8(%edx) <== NOT EXECUTED 10960d: e8 c2 0d 00 00 call 10a3d4 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 109612: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109615: 85 c0 test %eax,%eax <== NOT EXECUTED 109617: 74 09 je 109622 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 109619: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10961c: 50 push %eax <== NOT EXECUTED 10961d: e8 82 0f 00 00 call 10a5a4 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 109622: 83 ec 0c sub $0xc,%esp 109625: ff 35 48 39 12 00 pushl 0x123948 10962b: e8 a8 0a 00 00 call 10a0d8 return RTEMS_SUCCESSFUL; 109630: 83 c4 10 add $0x10,%esp } 109633: 8b 45 e4 mov -0x1c(%ebp),%eax 109636: 8d 65 f4 lea -0xc(%ebp),%esp 109639: 5b pop %ebx 10963a: 5e pop %esi 10963b: 5f pop %edi 10963c: c9 leave 10963d: c3 ret static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 10963e: 52 push %edx 10963f: 52 push %edx 109640: 68 e8 00 00 00 push $0xe8 109645: 6a 01 push $0x1 109647: e8 40 45 00 00 call 10db8c 10964c: 89 c2 mov %eax,%edx 10964e: 89 c3 mov %eax,%ebx if (tty == NULL) { 109650: 83 c4 10 add $0x10,%esp 109653: 85 c0 test %eax,%eax 109655: 0f 85 38 fc ff ff jne 109293 <== ALWAYS TAKEN 10965b: e9 2b fc ff ff jmp 10928b <== NOT EXECUTED =============================================================================== 00108421 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 108421: 55 push %ebp 108422: 89 e5 mov %esp,%ebp 108424: 57 push %edi 108425: 56 push %esi 108426: 53 push %ebx 108427: 83 ec 3c sub $0x3c,%esp 10842a: 8b 45 08 mov 0x8(%ebp),%eax 10842d: 8b 75 0c mov 0xc(%ebp),%esi 108430: 8b 5d 10 mov 0x10(%ebp),%ebx const unsigned char *buf = _buf; 108433: 89 c7 mov %eax,%edi unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 108435: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx) 10843c: 75 1b jne 108459 <== ALWAYS TAKEN (*tty->device.write)(tty->minor, (void *)buf, len); 10843e: 89 75 10 mov %esi,0x10(%ebp) <== NOT EXECUTED 108441: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 108444: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 108447: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 10844a: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 108450: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108453: 5b pop %ebx <== NOT EXECUTED 108454: 5e pop %esi <== NOT EXECUTED 108455: 5f pop %edi <== NOT EXECUTED 108456: c9 leave <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 108457: ff e0 jmp *%eax <== NOT EXECUTED return; } newHead = tty->rawOutBuf.Head; 108459: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10845f: 89 45 e4 mov %eax,-0x1c(%ebp) while (len) { 108462: e9 ca 00 00 00 jmp 108531 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 108467: 8b 45 e4 mov -0x1c(%ebp),%eax 10846a: 40 inc %eax 10846b: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 108471: 31 d2 xor %edx,%edx 108473: f7 f1 div %ecx 108475: 89 55 c4 mov %edx,-0x3c(%ebp) 108478: 89 55 e4 mov %edx,-0x1c(%ebp) rtems_interrupt_disable (level); 10847b: 9c pushf 10847c: fa cli 10847d: 8f 45 d4 popl -0x2c(%ebp) 108480: 8b 55 d4 mov -0x2c(%ebp),%edx 108483: 8b 4d c4 mov -0x3c(%ebp),%ecx while (newHead == tty->rawOutBuf.Tail) { 108486: eb 35 jmp 1084bd tty->rawOutBufState = rob_wait; 108488: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 10848f: 00 00 00 rtems_interrupt_enable (level); 108492: 52 push %edx 108493: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 108494: 50 push %eax 108495: 6a 00 push $0x0 108497: 6a 00 push $0x0 108499: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10849f: 89 4d e0 mov %ecx,-0x20(%ebp) 1084a2: e8 45 1b 00 00 call 109fec RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 1084a7: 83 c4 10 add $0x10,%esp 1084aa: 85 c0 test %eax,%eax 1084ac: 8b 4d e0 mov -0x20(%ebp),%ecx 1084af: 74 09 je 1084ba <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 1084b1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1084b4: 50 push %eax <== NOT EXECUTED 1084b5: e8 ea 20 00 00 call 10a5a4 <== NOT EXECUTED rtems_interrupt_disable (level); 1084ba: 9c pushf 1084bb: fa cli 1084bc: 5a pop %edx * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 1084bd: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 1084c3: 39 c1 cmp %eax,%ecx 1084c5: 74 c1 je 108488 1084c7: 89 55 d4 mov %edx,-0x2c(%ebp) 1084ca: 89 4d c4 mov %ecx,-0x3c(%ebp) RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 1084cd: 8b 8b 80 00 00 00 mov 0x80(%ebx),%ecx 1084d3: 8a 07 mov (%edi),%al 1084d5: 8b 53 7c mov 0x7c(%ebx),%edx 1084d8: 88 04 0a mov %al,(%edx,%ecx,1) tty->rawOutBuf.Head = newHead; 1084db: 8b 4d c4 mov -0x3c(%ebp),%ecx 1084de: 89 8b 80 00 00 00 mov %ecx,0x80(%ebx) if (tty->rawOutBufState == rob_idle) { 1084e4: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) 1084eb: 75 3e jne 10852b /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 1084ed: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1084f3: a8 10 test $0x10,%al 1084f5: 75 1b jne 108512 <== NEVER TAKEN (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 1084f7: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 1084fd: 52 push %edx 1084fe: 6a 01 push $0x1 108500: 03 43 7c add 0x7c(%ebx),%eax 108503: 50 push %eax 108504: ff 73 10 pushl 0x10(%ebx) 108507: ff 93 a4 00 00 00 call *0xa4(%ebx) 10850d: 83 c4 10 add $0x10,%esp 108510: eb 0f jmp 108521 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 108512: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108518: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 10851b: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 108521: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 108528: 00 00 00 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 10852b: 47 inc %edi /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); 10852c: ff 75 d4 pushl -0x2c(%ebp) 10852f: 9d popf len--; 108530: 4e dec %esi if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 108531: 85 f6 test %esi,%esi 108533: 0f 85 2e ff ff ff jne 108467 tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 108539: 8d 65 f4 lea -0xc(%ebp),%esp 10853c: 5b pop %ebx 10853d: 5e pop %esi 10853e: 5f pop %edi 10853f: c9 leave 108540: c3 ret =============================================================================== 00108a9f : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 108a9f: 55 push %ebp <== NOT EXECUTED 108aa0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108aa2: 57 push %edi <== NOT EXECUTED 108aa3: 56 push %esi <== NOT EXECUTED 108aa4: 53 push %ebx <== NOT EXECUTED 108aa5: 83 ec 50 sub $0x50,%esp <== NOT EXECUTED 108aa8: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 108aab: 8b 06 mov (%esi),%eax <== NOT EXECUTED 108aad: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t count = args->count; 108ab0: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED 108ab3: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED char *buffer = args->buffer; 108ab6: 8b 4e 0c mov 0xc(%esi),%ecx <== NOT EXECUTED 108ab9: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 108abc: 6a 00 push $0x0 <== NOT EXECUTED 108abe: 6a 00 push $0x0 <== NOT EXECUTED 108ac0: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 108ac3: e8 24 15 00 00 call 109fec <== NOT EXECUTED 108ac8: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 108acb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108ace: 85 c0 test %eax,%eax <== NOT EXECUTED 108ad0: 0f 85 92 02 00 00 jne 108d68 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 108ad6: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 108adc: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 108adf: 8b 80 f4 35 12 00 mov 0x1235f4(%eax),%eax <== NOT EXECUTED 108ae5: 85 c0 test %eax,%eax <== NOT EXECUTED 108ae7: 74 19 je 108b02 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 108ae9: 51 push %ecx <== NOT EXECUTED 108aea: 51 push %ecx <== NOT EXECUTED 108aeb: 56 push %esi <== NOT EXECUTED 108aec: 53 push %ebx <== NOT EXECUTED 108aed: ff d0 call *%eax <== NOT EXECUTED 108aef: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 108af2: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 108af9: 00 00 00 rtems_semaphore_release (tty->isem); 108afc: 5a pop %edx <== NOT EXECUTED 108afd: e9 5b 02 00 00 jmp 108d5d <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { 108b02: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 108b05: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 108b08: 0f 85 25 02 00 00 jne 108d33 <== NOT EXECUTED tty->cindex = tty->ccount = 0; 108b0e: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED 108b15: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED tty->read_start_column = tty->column; 108b1c: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108b1f: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED if (tty->device.pollRead != NULL 108b22: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) <== NOT EXECUTED 108b29: 0f 84 c4 00 00 00 je 108bf3 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 108b2f: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx) <== NOT EXECUTED 108b36: 0f 85 b7 00 00 00 jne 108bf3 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 108b3c: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 108b40: 74 35 je 108b77 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 108b42: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108b45: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108b48: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (n < 0) { 108b4e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108b51: 85 c0 test %eax,%eax <== NOT EXECUTED 108b53: 79 0f jns 108b64 <== NOT EXECUTED rtems_task_wake_after (1); 108b55: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108b58: 6a 01 push $0x1 <== NOT EXECUTED 108b5a: e8 d9 18 00 00 call 10a438 <== NOT EXECUTED 108b5f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108b62: eb de jmp 108b42 <== NOT EXECUTED } else { if (siproc (n, tty)) 108b64: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108b67: 89 da mov %ebx,%edx <== NOT EXECUTED 108b69: e8 db fd ff ff call 108949 <== NOT EXECUTED 108b6e: 85 c0 test %eax,%eax <== NOT EXECUTED 108b70: 74 d0 je 108b42 <== NOT EXECUTED 108b72: e9 bc 01 00 00 jmp 108d33 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 108b77: e8 40 0e 00 00 call 1099bc <== NOT EXECUTED 108b7c: 89 c7 mov %eax,%edi <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 108b7e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108b81: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108b84: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (n < 0) { 108b8a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108b8d: 85 c0 test %eax,%eax <== NOT EXECUTED 108b8f: 79 3d jns 108bce <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 108b91: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 108b95: 74 0e je 108ba5 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 108b97: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 108b9b: 74 22 je 108bbf <== NOT EXECUTED 108b9d: 83 7b 20 00 cmpl $0x0,0x20(%ebx) <== NOT EXECUTED 108ba1: 74 1c je 108bbf <== NOT EXECUTED 108ba3: eb 0a jmp 108baf <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 108ba5: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 108ba9: 0f 84 84 01 00 00 je 108d33 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 108baf: e8 08 0e 00 00 call 1099bc <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 108bb4: 29 f8 sub %edi,%eax <== NOT EXECUTED 108bb6: 3b 43 54 cmp 0x54(%ebx),%eax <== NOT EXECUTED 108bb9: 0f 87 74 01 00 00 ja 108d33 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 108bbf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108bc2: 6a 01 push $0x1 <== NOT EXECUTED 108bc4: e8 6f 18 00 00 call 10a438 <== NOT EXECUTED 108bc9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108bcc: eb b0 jmp 108b7e <== NOT EXECUTED } else { siproc (n, tty); 108bce: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108bd1: 89 da mov %ebx,%edx <== NOT EXECUTED 108bd3: e8 71 fd ff ff call 108949 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 108bd8: 8a 43 47 mov 0x47(%ebx),%al <== NOT EXECUTED 108bdb: 0f b6 d0 movzbl %al,%edx <== NOT EXECUTED 108bde: 39 53 20 cmp %edx,0x20(%ebx) <== NOT EXECUTED 108be1: 0f 8d 4c 01 00 00 jge 108d33 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 108be7: 84 c0 test %al,%al <== NOT EXECUTED 108be9: 74 93 je 108b7e <== NOT EXECUTED 108beb: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 108bef: 74 8d je 108b7e <== NOT EXECUTED 108bf1: eb 84 jmp 108b77 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 108bf3: 8b 53 74 mov 0x74(%ebx),%edx <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 108bf6: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 108bf9: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 108bfc: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 108c01: e9 de 00 00 00 jmp 108ce4 <== NOT EXECUTED while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 108c06: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 108c09: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 108c0c: 40 inc %eax <== NOT EXECUTED 108c0d: 31 d2 xor %edx,%edx <== NOT EXECUTED 108c0f: f7 f1 div %ecx <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 108c11: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 108c14: 8a 04 10 mov (%eax,%edx,1),%al <== NOT EXECUTED 108c17: 88 45 d7 mov %al,-0x29(%ebp) <== NOT EXECUTED tty->rawInBuf.Head = newHead; 108c1a: 89 53 5c mov %edx,0x5c(%ebx) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 108c1d: 8b 4b 60 mov 0x60(%ebx),%ecx <== NOT EXECUTED 108c20: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED 108c23: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 108c26: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED 108c29: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 108c2c: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED 108c2f: 03 45 c4 add -0x3c(%ebp),%eax <== NOT EXECUTED 108c32: 29 d0 sub %edx,%eax <== NOT EXECUTED 108c34: 31 d2 xor %edx,%edx <== NOT EXECUTED 108c36: f7 f1 div %ecx <== NOT EXECUTED 108c38: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx <== NOT EXECUTED 108c3e: 73 74 jae 108cb4 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 108c40: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108c46: 83 e0 fe and $0xfffffffe,%eax <== NOT EXECUTED 108c49: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 108c4f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108c55: 25 02 02 00 00 and $0x202,%eax <== NOT EXECUTED 108c5a: 3d 02 02 00 00 cmp $0x202,%eax <== NOT EXECUTED 108c5f: 75 24 jne 108c85 <== NOT EXECUTED 108c61: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 108c68: 74 0a je 108c74 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 108c6a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 108c70: a8 20 test $0x20,%al <== NOT EXECUTED 108c72: 74 11 je 108c85 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 108c74: 50 push %eax <== NOT EXECUTED 108c75: 6a 01 push $0x1 <== NOT EXECUTED 108c77: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 108c7a: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108c7d: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 108c83: eb 2c jmp 108cb1 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 108c85: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108c8b: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 108c8e: 74 24 je 108cb4 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 108c90: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108c96: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 108c99: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 108c9f: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED 108ca5: 85 c0 test %eax,%eax <== NOT EXECUTED 108ca7: 74 0b je 108cb4 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 108ca9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108cac: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108caf: ff d0 call *%eax <== NOT EXECUTED 108cb1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 108cb4: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 108cb8: 74 11 je 108ccb <== NOT EXECUTED if (siproc (c, tty)) 108cba: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 108cbe: 89 da mov %ebx,%edx <== NOT EXECUTED 108cc0: e8 84 fc ff ff call 108949 <== NOT EXECUTED 108cc5: 85 c0 test %eax,%eax <== NOT EXECUTED 108cc7: 75 16 jne 108cdf <== NOT EXECUTED 108cc9: eb 16 jmp 108ce1 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 108ccb: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 108ccf: 89 da mov %ebx,%edx <== NOT EXECUTED 108cd1: e8 73 fc ff ff call 108949 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 108cd6: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED 108cda: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 108cdd: 7c 02 jl 108ce1 <== NOT EXECUTED 108cdf: 31 ff xor %edi,%edi <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 108ce1: 8b 53 70 mov 0x70(%ebx),%edx <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 108ce4: 8b 4b 5c mov 0x5c(%ebx),%ecx <== NOT EXECUTED 108ce7: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 108cea: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 108cec: 74 0f je 108cfd <== NOT EXECUTED 108cee: a1 18 18 12 00 mov 0x121818,%eax <== NOT EXECUTED 108cf3: 48 dec %eax <== NOT EXECUTED 108cf4: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 108cf7: 0f 8c 09 ff ff ff jl 108c06 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 108cfd: 85 ff test %edi,%edi <== NOT EXECUTED 108cff: 74 32 je 108d33 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 108d01: 51 push %ecx <== NOT EXECUTED 108d02: 52 push %edx <== NOT EXECUTED 108d03: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 108d06: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 108d09: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 108d0c: e8 db 12 00 00 call 109fec <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 108d11: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108d14: 85 c0 test %eax,%eax <== NOT EXECUTED 108d16: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 108d19: 74 c9 je 108ce4 <== NOT EXECUTED 108d1b: eb 16 jmp 108d33 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 108d1d: 8b 7b 1c mov 0x1c(%ebx),%edi <== NOT EXECUTED 108d20: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 108d23: 8a 04 07 mov (%edi,%eax,1),%al <== NOT EXECUTED 108d26: 88 02 mov %al,(%edx) <== NOT EXECUTED 108d28: 42 inc %edx <== NOT EXECUTED 108d29: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 108d2c: 40 inc %eax <== NOT EXECUTED 108d2d: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED count--; 108d30: 49 dec %ecx <== NOT EXECUTED 108d31: eb 06 jmp 108d39 <== NOT EXECUTED 108d33: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 108d36: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 108d39: 85 c9 test %ecx,%ecx <== NOT EXECUTED 108d3b: 74 0b je 108d48 <== NOT EXECUTED 108d3d: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 108d40: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 108d43: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 108d46: 7c d5 jl 108d1d <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 108d48: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED 108d4b: 29 c8 sub %ecx,%eax <== NOT EXECUTED 108d4d: 89 46 18 mov %eax,0x18(%esi) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 108d50: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 108d57: 00 00 00 rtems_semaphore_release (tty->isem); 108d5a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108d5d: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 108d60: e8 73 13 00 00 call 10a0d8 <== NOT EXECUTED return sc; 108d65: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 108d68: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 108d6b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108d6e: 5b pop %ebx <== NOT EXECUTED 108d6f: 5e pop %esi <== NOT EXECUTED 108d70: 5f pop %edi <== NOT EXECUTED 108d71: c9 leave <== NOT EXECUTED 108d72: c3 ret <== NOT EXECUTED =============================================================================== 00107f6e : * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 107f6e: 55 push %ebp 107f6f: 89 e5 mov %esp,%ebp 107f71: 57 push %edi 107f72: 56 push %esi 107f73: 53 push %ebx 107f74: 83 ec 0c sub $0xc,%esp 107f77: 8b 5d 08 mov 0x8(%ebp),%ebx int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 107f7a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 107f80: 25 03 04 00 00 and $0x403,%eax 107f85: 3d 01 04 00 00 cmp $0x401,%eax 107f8a: 75 2c jne 107fb8 <== ALWAYS TAKEN == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 107f8c: 56 push %esi <== NOT EXECUTED 107f8d: 6a 01 push $0x1 <== NOT EXECUTED 107f8f: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 107f92: 50 push %eax <== NOT EXECUTED 107f93: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 107f96: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 107f9c: 9c pushf <== NOT EXECUTED 107f9d: fa cli <== NOT EXECUTED 107f9e: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 107f9f: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 107fa5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 107fab: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 107fae: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 107fb4: 52 push %edx <== NOT EXECUTED 107fb5: 9d popf <== NOT EXECUTED 107fb6: eb 38 jmp 107ff0 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 107fb8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 107fbe: 83 e0 03 and $0x3,%eax 107fc1: 83 f8 02 cmp $0x2,%eax 107fc4: 75 37 jne 107ffd <== ALWAYS TAKEN * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 107fc6: 51 push %ecx <== NOT EXECUTED 107fc7: 6a 01 push $0x1 <== NOT EXECUTED 107fc9: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 107fcc: 50 push %eax <== NOT EXECUTED 107fcd: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 107fd0: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 107fd6: 9c pushf <== NOT EXECUTED 107fd7: fa cli <== NOT EXECUTED 107fd8: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 107fd9: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 107fdf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 107fe5: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 107fe8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 107fee: 52 push %edx <== NOT EXECUTED 107fef: 9d popf <== NOT EXECUTED 107ff0: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED 107ff5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107ff8: e9 2f 01 00 00 jmp 10812c <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 107ffd: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 108003: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 108009: 39 c2 cmp %eax,%edx 10800b: 75 1f jne 10802c <== ALWAYS TAKEN /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 10800d: 31 f6 xor %esi,%esi <== NOT EXECUTED 10800f: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) <== NOT EXECUTED 108016: 0f 85 10 01 00 00 jne 10812c <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 10801c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10801f: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED 108025: e8 ae 20 00 00 call 10a0d8 <== NOT EXECUTED 10802a: eb c9 jmp 107ff5 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 10802c: 9c pushf 10802d: fa cli 10802e: 58 pop %eax len = tty->t_dqlen; 10802f: 8b 8b 90 00 00 00 mov 0x90(%ebx),%ecx tty->t_dqlen = 0; 108035: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx) 10803c: 00 00 00 rtems_interrupt_enable(level); 10803f: 50 push %eax 108040: 9d popf newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 108041: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 108047: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi 10804d: 8d 04 01 lea (%ecx,%eax,1),%eax 108050: 31 d2 xor %edx,%edx 108052: f7 f6 div %esi 108054: 89 d7 mov %edx,%edi tty->rawOutBuf.Tail = newTail; 108056: 89 93 84 00 00 00 mov %edx,0x84(%ebx) if (tty->rawOutBufState == rob_wait) { 10805c: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 108063: 75 11 jne 108076 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 108065: 83 ec 0c sub $0xc,%esp 108068: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10806e: e8 65 20 00 00 call 10a0d8 108073: 83 c4 10 add $0x10,%esp } if (newTail == tty->rawOutBuf.Head) { 108076: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10807c: 39 c7 cmp %eax,%edi 10807e: 75 2a jne 1080aa /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 108080: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 108087: 00 00 00 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 10808a: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax 108090: 31 f6 xor %esi,%esi 108092: 85 c0 test %eax,%eax 108094: 0f 84 8c 00 00 00 je 108126 <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 10809a: 52 push %edx <== NOT EXECUTED 10809b: 52 push %edx <== NOT EXECUTED 10809c: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED 1080a2: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 1080a5: 52 push %edx <== NOT EXECUTED 1080a6: ff d0 call *%eax <== NOT EXECUTED 1080a8: eb 79 jmp 108123 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 1080aa: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1080b0: 25 10 02 00 00 and $0x210,%eax 1080b5: 3d 10 02 00 00 cmp $0x210,%eax 1080ba: 75 22 jne 1080de <== ALWAYS TAKEN == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 1080bc: 9c pushf <== NOT EXECUTED 1080bd: fa cli <== NOT EXECUTED 1080be: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 1080bf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1080c5: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 1080c8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 1080ce: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED 1080d5: 00 00 00 rtems_interrupt_enable(level); 1080d8: 52 push %edx <== NOT EXECUTED 1080d9: 9d popf <== NOT EXECUTED 1080da: 31 f6 xor %esi,%esi <== NOT EXECUTED 1080dc: eb 48 jmp 108126 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 1080de: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 1080e4: 39 c7 cmp %eax,%edi 1080e6: 76 08 jbe 1080f0 nToSend = tty->rawOutBuf.Size - newTail; 1080e8: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi 1080ee: eb 06 jmp 1080f6 else nToSend = tty->rawOutBuf.Head - newTail; 1080f0: 8b b3 80 00 00 00 mov 0x80(%ebx),%esi 1080f6: 29 fe sub %edi,%esi /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 1080f8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1080fe: f6 c4 06 test $0x6,%ah 108101: 74 05 je 108108 <== ALWAYS TAKEN 108103: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 108108: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 10810f: 00 00 00 (*tty->device.write)(tty->minor, 108112: 50 push %eax 108113: 56 push %esi 108114: 8b 43 7c mov 0x7c(%ebx),%eax 108117: 01 f8 add %edi,%eax 108119: 50 push %eax 10811a: ff 73 10 pushl 0x10(%ebx) 10811d: ff 93 a4 00 00 00 call *0xa4(%ebx) 108123: 83 c4 10 add $0x10,%esp &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 108126: 89 bb 84 00 00 00 mov %edi,0x84(%ebx) } return nToSend; } 10812c: 89 f0 mov %esi,%eax 10812e: 8d 65 f4 lea -0xc(%ebp),%esp 108131: 5b pop %ebx 108132: 5e pop %esi 108133: 5f pop %edi 108134: c9 leave 108135: c3 ret =============================================================================== 001096c3 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 1096c3: 55 push %ebp <== NOT EXECUTED 1096c4: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1096c6: 57 push %edi <== NOT EXECUTED 1096c7: 56 push %esi <== NOT EXECUTED 1096c8: 53 push %ebx <== NOT EXECUTED 1096c9: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 1096cc: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 1096cf: 8d 7d e0 lea -0x20(%ebp),%edi <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 1096d2: 8d 75 e7 lea -0x19(%ebp),%esi <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 1096d5: 57 push %edi <== NOT EXECUTED 1096d6: 6a 00 push $0x0 <== NOT EXECUTED 1096d8: 6a 02 push $0x2 <== NOT EXECUTED 1096da: 6a 03 push $0x3 <== NOT EXECUTED 1096dc: e8 3f 03 00 00 call 109a20 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 1096e1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1096e4: f6 45 e0 01 testb $0x1,-0x20(%ebp) <== NOT EXECUTED 1096e8: 74 16 je 109700 <== NOT EXECUTED tty->rxTaskId = 0; 1096ea: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED 1096f1: 00 00 00 rtems_task_delete(RTEMS_SELF); 1096f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1096f7: 6a 00 push $0x0 <== NOT EXECUTED 1096f9: e8 9a 0b 00 00 call 10a298 <== NOT EXECUTED 1096fe: eb 21 jmp 109721 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 109700: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109703: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109706: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (c != EOF) { 10970c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10970f: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 109712: 74 c1 je 1096d5 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 109714: 88 45 e7 mov %al,-0x19(%ebp) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 109717: 50 push %eax <== NOT EXECUTED 109718: 6a 01 push $0x1 <== NOT EXECUTED 10971a: 56 push %esi <== NOT EXECUTED 10971b: 53 push %ebx <== NOT EXECUTED 10971c: e8 7a ea ff ff call 10819b <== NOT EXECUTED 109721: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109724: eb af jmp 1096d5 <== NOT EXECUTED =============================================================================== 00107f53 : * signal receive interrupt to rx daemon * NOTE: This routine runs in the context of the * device receive interrupt handler. */ void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { 107f53: 55 push %ebp <== NOT EXECUTED 107f54: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107f56: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 107f59: 6a 02 push $0x2 <== NOT EXECUTED 107f5b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 107f5e: ff b0 c4 00 00 00 pushl 0xc4(%eax) <== NOT EXECUTED 107f64: e8 17 1c 00 00 call 109b80 <== NOT EXECUTED 107f69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107f6c: c9 leave <== NOT EXECUTED 107f6d: c3 ret <== NOT EXECUTED =============================================================================== 00109660 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 109660: 55 push %ebp <== NOT EXECUTED 109661: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109663: 56 push %esi <== NOT EXECUTED 109664: 53 push %ebx <== NOT EXECUTED 109665: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 109668: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 10966b: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED 10966e: 56 push %esi <== NOT EXECUTED 10966f: 6a 00 push $0x0 <== NOT EXECUTED 109671: 6a 02 push $0x2 <== NOT EXECUTED 109673: 6a 03 push $0x3 <== NOT EXECUTED 109675: e8 a6 03 00 00 call 109a20 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 10967a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10967d: f6 45 f4 01 testb $0x1,-0xc(%ebp) <== NOT EXECUTED 109681: 74 16 je 109699 <== NOT EXECUTED tty->txTaskId = 0; 109683: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED 10968a: 00 00 00 rtems_task_delete(RTEMS_SELF); 10968d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109690: 6a 00 push $0x0 <== NOT EXECUTED 109692: e8 01 0c 00 00 call 10a298 <== NOT EXECUTED 109697: eb 25 jmp 1096be <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 109699: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 10969f: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1096a2: 8b 80 00 36 12 00 mov 0x123600(%eax),%eax <== NOT EXECUTED 1096a8: 85 c0 test %eax,%eax <== NOT EXECUTED 1096aa: 74 09 je 1096b5 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 1096ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1096af: 53 push %ebx <== NOT EXECUTED 1096b0: ff d0 call *%eax <== NOT EXECUTED 1096b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 1096b5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1096b8: 53 push %ebx <== NOT EXECUTED 1096b9: e8 b0 e8 ff ff call 107f6e <== NOT EXECUTED 1096be: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1096c1: eb ab jmp 10966e <== NOT EXECUTED =============================================================================== 0010899b : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 10899b: 55 push %ebp 10899c: 89 e5 mov %esp,%ebp 10899e: 57 push %edi 10899f: 56 push %esi 1089a0: 53 push %ebx 1089a1: 83 ec 20 sub $0x20,%esp 1089a4: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 1089a7: 8b 03 mov (%ebx),%eax 1089a9: 8b 70 34 mov 0x34(%eax),%esi rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1089ac: 6a 00 push $0x0 1089ae: 6a 00 push $0x0 1089b0: ff 76 18 pushl 0x18(%esi) 1089b3: e8 34 16 00 00 call 109fec 1089b8: 89 c7 mov %eax,%edi if (sc != RTEMS_SUCCESSFUL) 1089ba: 83 c4 10 add $0x10,%esp 1089bd: 85 c0 test %eax,%eax 1089bf: 75 77 jne 108a38 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 1089c1: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 1089c7: c1 e0 05 shl $0x5,%eax 1089ca: 8b 80 f8 35 12 00 mov 0x1235f8(%eax),%eax 1089d0: 85 c0 test %eax,%eax 1089d2: 74 0b je 1089df <== ALWAYS TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 1089d4: 57 push %edi <== NOT EXECUTED 1089d5: 57 push %edi <== NOT EXECUTED 1089d6: 53 push %ebx <== NOT EXECUTED 1089d7: 56 push %esi <== NOT EXECUTED 1089d8: ff d0 call *%eax <== NOT EXECUTED 1089da: 89 c7 mov %eax,%edi <== NOT EXECUTED rtems_semaphore_release (tty->osem); 1089dc: 5b pop %ebx <== NOT EXECUTED 1089dd: eb 4e jmp 108a2d <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { 1089df: f6 46 34 01 testb $0x1,0x34(%esi) 1089e3: 74 2f je 108a14 <== NEVER TAKEN uint32_t count = args->count; 1089e5: 8b 4b 10 mov 0x10(%ebx),%ecx char *buffer = args->buffer; 1089e8: 8b 43 0c mov 0xc(%ebx),%eax 1089eb: 89 45 e4 mov %eax,-0x1c(%ebp) while (count--) 1089ee: eb 18 jmp 108a08 oproc (*buffer++, tty); 1089f0: 8b 55 e4 mov -0x1c(%ebp),%edx 1089f3: 0f b6 02 movzbl (%edx),%eax 1089f6: 42 inc %edx 1089f7: 89 55 e4 mov %edx,-0x1c(%ebp) 1089fa: 89 f2 mov %esi,%edx 1089fc: 89 4d e0 mov %ecx,-0x20(%ebp) 1089ff: e8 3d fb ff ff call 108541 108a04: 8b 4d e0 mov -0x20(%ebp),%ecx 108a07: 49 dec %ecx return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 108a08: 85 c9 test %ecx,%ecx 108a0a: 75 e4 jne 1089f0 oproc (*buffer++, tty); args->bytes_moved = args->count; 108a0c: 8b 43 10 mov 0x10(%ebx),%eax 108a0f: 89 43 18 mov %eax,0x18(%ebx) 108a12: eb 16 jmp 108a2a } else { rtems_termios_puts (args->buffer, args->count, tty); 108a14: 51 push %ecx <== NOT EXECUTED 108a15: 56 push %esi <== NOT EXECUTED 108a16: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108a19: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 108a1c: e8 00 fa ff ff call 108421 <== NOT EXECUTED args->bytes_moved = args->count; 108a21: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 108a24: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED 108a27: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 108a2a: 83 ec 0c sub $0xc,%esp 108a2d: ff 76 18 pushl 0x18(%esi) 108a30: e8 a3 16 00 00 call 10a0d8 return sc; 108a35: 83 c4 10 add $0x10,%esp } 108a38: 89 f8 mov %edi,%eax 108a3a: 8d 65 f4 lea -0xc(%ebp),%esp 108a3d: 5b pop %ebx 108a3e: 5e pop %esi 108a3f: 5f pop %edi 108a40: c9 leave 108a41: c3 ret =============================================================================== 00116500 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 116500: 55 push %ebp 116501: 89 e5 mov %esp,%ebp 116503: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 116506: 8d 45 f4 lea -0xc(%ebp),%eax 116509: 50 push %eax 11650a: ff 75 08 pushl 0x8(%ebp) 11650d: 68 e8 c7 13 00 push $0x13c7e8 116512: e8 55 24 00 00 call 11896c <_Objects_Get> 116517: 89 c2 mov %eax,%edx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116519: 83 c4 10 add $0x10,%esp 11651c: b8 04 00 00 00 mov $0x4,%eax 116521: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 116525: 75 1c jne 116543 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 116527: 83 7a 38 04 cmpl $0x4,0x38(%edx) 11652b: 74 0f je 11653c <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 11652d: 83 ec 0c sub $0xc,%esp 116530: 83 c2 10 add $0x10,%edx 116533: 52 push %edx 116534: e8 7b 3e 00 00 call 11a3b4 <_Watchdog_Remove> 116539: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 11653c: e8 5c 2c 00 00 call 11919d <_Thread_Enable_dispatch> 116541: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116543: c9 leave 116544: c3 ret =============================================================================== 00116968 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 116968: 55 push %ebp 116969: 89 e5 mov %esp,%ebp 11696b: 57 push %edi 11696c: 56 push %esi 11696d: 53 push %ebx 11696e: 83 ec 1c sub $0x1c,%esp 116971: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 116974: 8b 35 28 c8 13 00 mov 0x13c828,%esi if ( !timer_server ) 11697a: b8 0e 00 00 00 mov $0xe,%eax 11697f: 85 f6 test %esi,%esi 116981: 0f 84 b4 00 00 00 je 116a3b return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 116987: b0 0b mov $0xb,%al 116989: 80 3d 5c c5 13 00 00 cmpb $0x0,0x13c55c 116990: 0f 84 a5 00 00 00 je 116a3b <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 116996: b0 09 mov $0x9,%al 116998: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 11699c: 0f 84 99 00 00 00 je 116a3b return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 1169a2: 83 ec 0c sub $0xc,%esp 1169a5: 53 push %ebx 1169a6: e8 61 d6 ff ff call 11400c <_TOD_Validate> 1169ab: 83 c4 10 add $0x10,%esp 1169ae: 84 c0 test %al,%al 1169b0: 0f 84 80 00 00 00 je 116a36 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 1169b6: 83 ec 0c sub $0xc,%esp 1169b9: 53 push %ebx 1169ba: e8 e5 d5 ff ff call 113fa4 <_TOD_To_seconds> 1169bf: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 1169c1: 83 c4 10 add $0x10,%esp 1169c4: 3b 05 d8 c5 13 00 cmp 0x13c5d8,%eax 1169ca: 76 6a jbe 116a36 1169cc: 51 push %ecx 1169cd: 8d 45 e4 lea -0x1c(%ebp),%eax 1169d0: 50 push %eax 1169d1: ff 75 08 pushl 0x8(%ebp) 1169d4: 68 e8 c7 13 00 push $0x13c7e8 1169d9: e8 8e 1f 00 00 call 11896c <_Objects_Get> 1169de: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1169e0: 83 c4 10 add $0x10,%esp 1169e3: b8 04 00 00 00 mov $0x4,%eax 1169e8: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 1169ec: 75 4d jne 116a3b case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 1169ee: 83 ec 0c sub $0xc,%esp 1169f1: 8d 43 10 lea 0x10(%ebx),%eax 1169f4: 50 push %eax 1169f5: e8 ba 39 00 00 call 11a3b4 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 1169fa: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 116a01: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116a08: 8b 45 10 mov 0x10(%ebp),%eax 116a0b: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 116a0e: 8b 45 08 mov 0x8(%ebp),%eax 116a11: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 116a14: 8b 45 14 mov 0x14(%ebp),%eax 116a17: 89 43 34 mov %eax,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 116a1a: 2b 3d d8 c5 13 00 sub 0x13c5d8,%edi 116a20: 89 7b 1c mov %edi,0x1c(%ebx) (*timer_server->schedule_operation)( timer_server, the_timer ); 116a23: 58 pop %eax 116a24: 5a pop %edx 116a25: 53 push %ebx 116a26: 56 push %esi 116a27: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 116a2a: e8 6e 27 00 00 call 11919d <_Thread_Enable_dispatch> 116a2f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116a31: 83 c4 10 add $0x10,%esp 116a34: eb 05 jmp 116a3b 116a36: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a3b: 8d 65 f4 lea -0xc(%ebp),%esp 116a3e: 5b pop %ebx 116a3f: 5e pop %esi 116a40: 5f pop %edi 116a41: c9 leave 116a42: c3 ret =============================================================================== 0010b549 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 10b549: 55 push %ebp <== NOT EXECUTED 10b54a: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b54c: 57 push %edi <== NOT EXECUTED 10b54d: 56 push %esi <== NOT EXECUTED 10b54e: 53 push %ebx <== NOT EXECUTED 10b54f: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10b552: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10b554: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 10b557: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 10b55a: 25 00 00 00 20 and $0x20000000,%eax <== NOT EXECUTED 10b55f: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10b562: 74 2a je 10b58e <== NOT EXECUTED { if (rtems_panic_in_progress++) 10b564: a1 90 a1 12 00 mov 0x12a190,%eax <== NOT EXECUTED 10b569: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10b56c: 89 15 90 a1 12 00 mov %edx,0x12a190 <== NOT EXECUTED 10b572: 85 c0 test %eax,%eax <== NOT EXECUTED 10b574: 74 0b je 10b581 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b576: a1 f0 a2 12 00 mov 0x12a2f0,%eax <== NOT EXECUTED 10b57b: 40 inc %eax <== NOT EXECUTED 10b57c: a3 f0 a2 12 00 mov %eax,0x12a2f0 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 10b581: 83 3d 90 a1 12 00 02 cmpl $0x2,0x12a190 <== NOT EXECUTED 10b588: 0f 8f 1b 01 00 00 jg 10b6a9 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 10b58e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b591: a1 60 80 12 00 mov 0x128060,%eax <== NOT EXECUTED 10b596: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10b599: e8 d6 ab 00 00 call 116174 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 10b59e: 89 df mov %ebx,%edi <== NOT EXECUTED 10b5a0: 81 e7 ff ff ff 8f and $0x8fffffff,%edi <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 10b5a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b5a9: 31 f6 xor %esi,%esi <== NOT EXECUTED 10b5ab: f7 c3 00 00 00 40 test $0x40000000,%ebx <== NOT EXECUTED 10b5b1: 74 07 je 10b5ba <== NOT EXECUTED local_errno = errno; 10b5b3: e8 40 a8 00 00 call 115df8 <__errno> <== NOT EXECUTED 10b5b8: 8b 30 mov (%eax),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 10b5ba: 52 push %edx <== NOT EXECUTED 10b5bb: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED 10b5be: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10b5c1: a1 60 80 12 00 mov 0x128060,%eax <== NOT EXECUTED 10b5c6: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b5c9: e8 8a 07 01 00 call 11bd58 <== NOT EXECUTED 10b5ce: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED if (status) 10b5d1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b5d4: 85 ff test %edi,%edi <== NOT EXECUTED 10b5d6: 74 25 je 10b5fd <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 10b5d8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b5db: 57 push %edi <== NOT EXECUTED 10b5dc: e8 53 ff ff ff call 10b534 <== NOT EXECUTED 10b5e1: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10b5e4: 50 push %eax <== NOT EXECUTED 10b5e5: 68 b7 3c 12 00 push $0x123cb7 <== NOT EXECUTED 10b5ea: a1 60 80 12 00 mov 0x128060,%eax <== NOT EXECUTED 10b5ef: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b5f2: e8 c5 ae 00 00 call 1164bc <== NOT EXECUTED 10b5f7: 01 45 e4 add %eax,-0x1c(%ebp) <== NOT EXECUTED 10b5fa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (local_errno) 10b5fd: 83 fe 00 cmp $0x0,%esi <== NOT EXECUTED 10b600: 74 41 je 10b643 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 10b602: 7e 25 jle 10b629 <== NOT EXECUTED 10b604: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b607: 56 push %esi <== NOT EXECUTED 10b608: e8 7f b6 00 00 call 116c8c <== NOT EXECUTED 10b60d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b610: 80 38 00 cmpb $0x0,(%eax) <== NOT EXECUTED 10b613: 74 14 je 10b629 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 10b615: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b618: 56 push %esi <== NOT EXECUTED 10b619: e8 6e b6 00 00 call 116c8c <== NOT EXECUTED 10b61e: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10b621: 50 push %eax <== NOT EXECUTED 10b622: 68 c5 3c 12 00 push $0x123cc5 <== NOT EXECUTED 10b627: eb 07 jmp 10b630 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 10b629: 50 push %eax <== NOT EXECUTED 10b62a: 56 push %esi <== NOT EXECUTED 10b62b: 68 d2 3c 12 00 push $0x123cd2 <== NOT EXECUTED 10b630: a1 60 80 12 00 mov 0x128060,%eax <== NOT EXECUTED 10b635: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b638: e8 7f ae 00 00 call 1164bc <== NOT EXECUTED 10b63d: 01 45 e4 add %eax,-0x1c(%ebp) <== NOT EXECUTED 10b640: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 10b643: 57 push %edi <== NOT EXECUTED 10b644: 57 push %edi <== NOT EXECUTED 10b645: 68 a0 43 12 00 push $0x1243a0 <== NOT EXECUTED 10b64a: a1 60 80 12 00 mov 0x128060,%eax <== NOT EXECUTED 10b64f: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b652: e8 65 ae 00 00 call 1164bc <== NOT EXECUTED 10b657: 89 c7 mov %eax,%edi <== NOT EXECUTED (void) fflush(stderr); 10b659: 59 pop %ecx <== NOT EXECUTED 10b65a: a1 60 80 12 00 mov 0x128060,%eax <== NOT EXECUTED 10b65f: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b662: e8 0d ab 00 00 call 116174 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 10b667: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b66a: 81 e3 00 00 00 30 and $0x30000000,%ebx <== NOT EXECUTED 10b670: 75 08 jne 10b67a <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 10b672: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10b675: 8d 04 17 lea (%edi,%edx,1),%eax <== NOT EXECUTED 10b678: eb 31 jmp 10b6ab <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) { if (error_flag & RTEMS_ERROR_PANIC) 10b67a: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 10b67e: 74 16 je 10b696 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 10b680: 52 push %edx <== NOT EXECUTED 10b681: 52 push %edx <== NOT EXECUTED 10b682: 68 e6 3c 12 00 push $0x123ce6 <== NOT EXECUTED 10b687: 6a 00 push $0x0 <== NOT EXECUTED 10b689: e8 3d 00 00 00 call 10b6cb <== NOT EXECUTED _exit(local_errno); 10b68e: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED 10b691: e8 26 09 00 00 call 10bfbc <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 10b696: 50 push %eax <== NOT EXECUTED 10b697: 50 push %eax <== NOT EXECUTED 10b698: 68 fb 3c 12 00 push $0x123cfb <== NOT EXECUTED 10b69d: 6a 00 push $0x0 <== NOT EXECUTED 10b69f: e8 27 00 00 00 call 10b6cb <== NOT EXECUTED abort(); 10b6a4: e8 1b a7 00 00 call 115dc4 <== NOT EXECUTED 10b6a9: 31 c0 xor %eax,%eax <== NOT EXECUTED } } return chars_written; } 10b6ab: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b6ae: 5b pop %ebx <== NOT EXECUTED 10b6af: 5e pop %esi <== NOT EXECUTED 10b6b0: 5f pop %edi <== NOT EXECUTED 10b6b1: c9 leave <== NOT EXECUTED 10b6b2: c3 ret <== NOT EXECUTED =============================================================================== 0010789e : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 10789e: 55 push %ebp 10789f: 89 e5 mov %esp,%ebp 1078a1: 57 push %edi 1078a2: 56 push %esi 1078a3: 53 push %ebx 1078a4: 83 ec 3c sub $0x3c,%esp 1078a7: 89 c3 mov %eax,%ebx 1078a9: 89 55 e0 mov %edx,-0x20(%ebp) 1078ac: 31 f6 xor %esi,%esi 1078ae: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp) 1078b5: 31 ff xor %edi,%edi sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 1078b7: 89 7d c4 mov %edi,-0x3c(%ebp) unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 1078ba: 8b 43 04 mov 0x4(%ebx),%eax 1078bd: 48 dec %eax 1078be: 89 43 04 mov %eax,0x4(%ebx) 1078c1: 85 c0 test %eax,%eax 1078c3: 79 15 jns 1078da <== ALWAYS TAKEN 1078c5: 50 push %eax <== NOT EXECUTED 1078c6: 50 push %eax <== NOT EXECUTED 1078c7: 53 push %ebx <== NOT EXECUTED 1078c8: ff 35 20 45 12 00 pushl 0x124520 <== NOT EXECUTED 1078ce: e8 95 bf 00 00 call 113868 <__srget_r> <== NOT EXECUTED 1078d3: 89 c1 mov %eax,%ecx <== NOT EXECUTED 1078d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1078d8: eb 08 jmp 1078e2 <== NOT EXECUTED 1078da: 8b 03 mov (%ebx),%eax 1078dc: 0f b6 08 movzbl (%eax),%ecx 1078df: 40 inc %eax 1078e0: 89 03 mov %eax,(%ebx) if (c == ':') 1078e2: 83 f9 3a cmp $0x3a,%ecx 1078e5: 74 4a je 107931 break; if (sign == 0) { 1078e7: 85 f6 test %esi,%esi 1078e9: 75 11 jne 1078fc <== NEVER TAKEN if (c == '-') { sign = -1; limit++; continue; 1078eb: 66 be 01 00 mov $0x1,%si for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 1078ef: 83 f9 2d cmp $0x2d,%ecx 1078f2: 75 08 jne 1078fc <== ALWAYS TAKEN sign = -1; limit++; 1078f4: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED 1078f7: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED continue; 1078fa: eb be jmp 1078ba <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 1078fc: a1 04 45 12 00 mov 0x124504,%eax 107901: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1) 107906: 74 3f je 107947 <== NEVER TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 107908: 8b 45 e4 mov -0x1c(%ebp),%eax 10790b: bf 0a 00 00 00 mov $0xa,%edi 107910: 31 d2 xor %edx,%edx 107912: f7 f7 div %edi 107914: 89 55 d4 mov %edx,-0x2c(%ebp) 107917: 39 45 c4 cmp %eax,-0x3c(%ebp) 10791a: 77 2b ja 107947 <== NEVER TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 10791c: 83 e9 30 sub $0x30,%ecx if ((i > (limit / 10)) 10791f: 39 45 c4 cmp %eax,-0x3c(%ebp) 107922: 75 04 jne 107928 <== ALWAYS TAKEN 107924: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 107926: 77 1f ja 107947 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 107928: 6b 7d c4 0a imul $0xa,-0x3c(%ebp),%edi 10792c: 8d 3c 39 lea (%ecx,%edi,1),%edi 10792f: eb 86 jmp 1078b7 107931: 8b 7d c4 mov -0x3c(%ebp),%edi } if (sign == 0) 107934: 85 f6 test %esi,%esi 107936: 74 0f je 107947 <== NEVER TAKEN return 0; *val = i * sign; 107938: 0f af f7 imul %edi,%esi 10793b: 8b 45 e0 mov -0x20(%ebp),%eax 10793e: 89 30 mov %esi,(%eax) 107940: b8 01 00 00 00 mov $0x1,%eax return 1; 107945: eb 02 jmp 107949 107947: 31 c0 xor %eax,%eax <== NOT EXECUTED } 107949: 8d 65 f4 lea -0xc(%ebp),%esp 10794c: 5b pop %ebx 10794d: 5e pop %esi 10794e: 5f pop %edi 10794f: c9 leave 107950: c3 ret =============================================================================== 00107951 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 107951: 55 push %ebp 107952: 89 e5 mov %esp,%ebp 107954: 57 push %edi 107955: 56 push %esi 107956: 53 push %ebx 107957: 83 ec 1c sub $0x1c,%esp 10795a: 89 c3 mov %eax,%ebx 10795c: 89 ce mov %ecx,%esi 10795e: 8b 7d 08 mov 0x8(%ebp),%edi 107961: 8b 4d 0c mov 0xc(%ebp),%ecx int c; *name = *bufp; 107964: 8b 06 mov (%esi),%eax 107966: 89 02 mov %eax,(%edx) for (;;) { c = getc(fp); 107968: 8b 43 04 mov 0x4(%ebx),%eax 10796b: 48 dec %eax 10796c: 89 43 04 mov %eax,0x4(%ebx) 10796f: 85 c0 test %eax,%eax 107971: 79 19 jns 10798c 107973: 52 push %edx 107974: 52 push %edx 107975: 53 push %ebx 107976: ff 35 20 45 12 00 pushl 0x124520 10797c: 89 4d e4 mov %ecx,-0x1c(%ebp) 10797f: e8 e4 be 00 00 call 113868 <__srget_r> 107984: 83 c4 10 add $0x10,%esp 107987: 8b 4d e4 mov -0x1c(%ebp),%ecx 10798a: eb 08 jmp 107994 10798c: 8b 13 mov (%ebx),%edx 10798e: 0f b6 02 movzbl (%edx),%eax 107991: 42 inc %edx 107992: 89 13 mov %edx,(%ebx) if (c == ':') { 107994: 83 f8 3a cmp $0x3a,%eax 107997: 75 06 jne 10799f if (nlFlag) 107999: 85 c9 test %ecx,%ecx 10799b: 74 21 je 1079be <== ALWAYS TAKEN 10799d: eb 2f jmp 1079ce <== NOT EXECUTED return 0; break; } if (c == '\n') { 10799f: 83 f8 0a cmp $0xa,%eax 1079a2: 75 06 jne 1079aa if (!nlFlag) 1079a4: 85 c9 test %ecx,%ecx 1079a6: 75 16 jne 1079be <== ALWAYS TAKEN 1079a8: eb 24 jmp 1079ce <== NOT EXECUTED return 0; break; } if (c == EOF) 1079aa: 83 f8 ff cmp $0xffffffff,%eax 1079ad: 74 1f je 1079ce <== NEVER TAKEN return 0; if (*nleft < 2) 1079af: 83 3f 01 cmpl $0x1,(%edi) 1079b2: 76 1a jbe 1079ce <== NEVER TAKEN return 0; **bufp = c; 1079b4: 8b 16 mov (%esi),%edx 1079b6: 88 02 mov %al,(%edx) ++(*bufp); 1079b8: ff 06 incl (%esi) --(*nleft); 1079ba: ff 0f decl (%edi) } 1079bc: eb aa jmp 107968 **bufp = '\0'; 1079be: 8b 06 mov (%esi),%eax 1079c0: c6 00 00 movb $0x0,(%eax) ++(*bufp); 1079c3: ff 06 incl (%esi) --(*nleft); 1079c5: ff 0f decl (%edi) 1079c7: b8 01 00 00 00 mov $0x1,%eax return 1; 1079cc: eb 02 jmp 1079d0 1079ce: 31 c0 xor %eax,%eax <== NOT EXECUTED } 1079d0: 8d 65 f4 lea -0xc(%ebp),%esp 1079d3: 5b pop %ebx 1079d4: 5e pop %esi 1079d5: 5f pop %edi 1079d6: c9 leave 1079d7: c3 ret =============================================================================== 001079d8 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 1079d8: 55 push %ebp 1079d9: 89 e5 mov %esp,%ebp 1079db: 57 push %edi 1079dc: 56 push %esi 1079dd: 53 push %ebx 1079de: 83 ec 34 sub $0x34,%esp 1079e1: 89 c6 mov %eax,%esi 1079e3: 89 d3 mov %edx,%ebx 1079e5: 89 4d d4 mov %ecx,-0x2c(%ebp) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1079e8: 8d 7d d4 lea -0x2c(%ebp),%edi 1079eb: 6a 00 push $0x0 1079ed: 8d 45 08 lea 0x8(%ebp),%eax 1079f0: 50 push %eax 1079f1: 89 f9 mov %edi,%ecx 1079f3: 89 f0 mov %esi,%eax 1079f5: e8 57 ff ff ff call 107951 1079fa: 83 c4 10 add $0x10,%esp 1079fd: 85 c0 test %eax,%eax 1079ff: 0f 84 c8 00 00 00 je 107acd <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 107a05: 50 push %eax 107a06: 50 push %eax 107a07: 8d 53 04 lea 0x4(%ebx),%edx 107a0a: 6a 00 push $0x0 107a0c: 8d 45 08 lea 0x8(%ebp),%eax 107a0f: 50 push %eax 107a10: 89 f9 mov %edi,%ecx 107a12: 89 f0 mov %esi,%eax 107a14: e8 38 ff ff ff call 107951 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 107a19: 83 c4 10 add $0x10,%esp 107a1c: 85 c0 test %eax,%eax 107a1e: 0f 84 a9 00 00 00 je 107acd <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 107a24: 8d 55 e4 lea -0x1c(%ebp),%edx 107a27: 89 f0 mov %esi,%eax 107a29: e8 70 fe ff ff call 10789e { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 107a2e: 85 c0 test %eax,%eax 107a30: 0f 84 97 00 00 00 je 107acd <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 107a36: 51 push %ecx 107a37: 51 push %ecx 107a38: 8d 55 e0 lea -0x20(%ebp),%edx 107a3b: 6a 01 push $0x1 107a3d: 8d 45 08 lea 0x8(%ebp),%eax 107a40: 50 push %eax 107a41: 89 f9 mov %edi,%ecx 107a43: 89 f0 mov %esi,%eax 107a45: e8 07 ff ff ff call 107951 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 107a4a: 83 c4 10 add $0x10,%esp 107a4d: 85 c0 test %eax,%eax 107a4f: 74 7c je 107acd <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 107a51: 8b 45 e4 mov -0x1c(%ebp),%eax 107a54: 66 89 43 08 mov %ax,0x8(%ebx) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107a58: 8b 7d e0 mov -0x20(%ebp),%edi 107a5b: 89 fa mov %edi,%edx 107a5d: b8 01 00 00 00 mov $0x1,%eax 107a62: eb 12 jmp 107a76 if(*cp == ',') memcount++; 107a64: 80 7d d3 2c cmpb $0x2c,-0x2d(%ebp) 107a68: 0f 94 c1 sete %cl 107a6b: 89 ce mov %ecx,%esi 107a6d: 81 e6 ff 00 00 00 and $0xff,%esi 107a73: 01 f0 add %esi,%eax grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107a75: 42 inc %edx 107a76: 8a 0a mov (%edx),%cl 107a78: 88 4d d3 mov %cl,-0x2d(%ebp) 107a7b: 84 c9 test %cl,%cl 107a7d: 75 e5 jne 107a64 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 107a7f: 8d 04 85 13 00 00 00 lea 0x13(,%eax,4),%eax 107a86: 39 45 08 cmp %eax,0x8(%ebp) 107a89: 72 42 jb 107acd <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 107a8b: 8b 45 d4 mov -0x2c(%ebp),%eax 107a8e: 83 c0 0f add $0xf,%eax 107a91: 83 e0 f0 and $0xfffffff0,%eax 107a94: 89 43 0c mov %eax,0xc(%ebx) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 107a97: 89 38 mov %edi,(%eax) 107a99: 8b 45 e0 mov -0x20(%ebp),%eax 107a9c: 40 inc %eax 107a9d: ba 01 00 00 00 mov $0x1,%edx for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107aa2: eb 11 jmp 107ab5 if(*cp == ',') { 107aa4: 80 f9 2c cmp $0x2c,%cl 107aa7: 75 0b jne 107ab4 <== ALWAYS TAKEN *cp = '\0'; 107aa9: c6 40 ff 00 movb $0x0,-0x1(%eax) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 107aad: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED 107ab0: 89 04 91 mov %eax,(%ecx,%edx,4) <== NOT EXECUTED 107ab3: 42 inc %edx <== NOT EXECUTED 107ab4: 40 inc %eax /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107ab5: 8a 48 ff mov -0x1(%eax),%cl 107ab8: 84 c9 test %cl,%cl 107aba: 75 e8 jne 107aa4 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 107abc: 8b 43 0c mov 0xc(%ebx),%eax 107abf: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) 107ac6: b8 01 00 00 00 mov $0x1,%eax return 1; 107acb: eb 02 jmp 107acf 107acd: 31 c0 xor %eax,%eax <== NOT EXECUTED } 107acf: 8d 65 f4 lea -0xc(%ebp),%esp 107ad2: 5b pop %ebx 107ad3: 5e pop %esi 107ad4: 5f pop %edi 107ad5: c9 leave 107ad6: c3 ret =============================================================================== 00107b0f : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 107b0f: 55 push %ebp 107b10: 89 e5 mov %esp,%ebp 107b12: 57 push %edi 107b13: 56 push %esi 107b14: 53 push %ebx 107b15: 83 ec 34 sub $0x34,%esp 107b18: 89 c6 mov %eax,%esi 107b1a: 89 d3 mov %edx,%ebx 107b1c: 89 4d d4 mov %ecx,-0x2c(%ebp) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b1f: 8d 7d d4 lea -0x2c(%ebp),%edi 107b22: 6a 00 push $0x0 107b24: 8d 45 08 lea 0x8(%ebp),%eax 107b27: 50 push %eax 107b28: 89 f9 mov %edi,%ecx 107b2a: 89 f0 mov %esi,%eax 107b2c: e8 20 fe ff ff call 107951 107b31: 83 c4 10 add $0x10,%esp 107b34: 85 c0 test %eax,%eax 107b36: 0f 84 c4 00 00 00 je 107c00 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 107b3c: 51 push %ecx 107b3d: 51 push %ecx 107b3e: 8d 53 04 lea 0x4(%ebx),%edx 107b41: 6a 00 push $0x0 107b43: 8d 45 08 lea 0x8(%ebp),%eax 107b46: 50 push %eax 107b47: 89 f9 mov %edi,%ecx 107b49: 89 f0 mov %esi,%eax 107b4b: e8 01 fe ff ff call 107951 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b50: 83 c4 10 add $0x10,%esp 107b53: 85 c0 test %eax,%eax 107b55: 0f 84 a5 00 00 00 je 107c00 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 107b5b: 8d 55 e4 lea -0x1c(%ebp),%edx 107b5e: 89 f0 mov %esi,%eax 107b60: e8 39 fd ff ff call 10789e size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b65: 85 c0 test %eax,%eax 107b67: 0f 84 93 00 00 00 je 107c00 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 107b6d: 8d 55 e0 lea -0x20(%ebp),%edx 107b70: 89 f0 mov %esi,%eax 107b72: e8 27 fd ff ff call 10789e size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b77: 85 c0 test %eax,%eax 107b79: 0f 84 81 00 00 00 je 107c00 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 107b7f: 52 push %edx 107b80: 52 push %edx 107b81: 8d 53 0c lea 0xc(%ebx),%edx 107b84: 6a 00 push $0x0 107b86: 8d 45 08 lea 0x8(%ebp),%eax 107b89: 50 push %eax 107b8a: 89 f9 mov %edi,%ecx 107b8c: 89 f0 mov %esi,%eax 107b8e: e8 be fd ff ff call 107951 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b93: 83 c4 10 add $0x10,%esp 107b96: 85 c0 test %eax,%eax 107b98: 74 66 je 107c00 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 107b9a: 50 push %eax 107b9b: 50 push %eax 107b9c: 8d 53 10 lea 0x10(%ebx),%edx 107b9f: 6a 00 push $0x0 107ba1: 8d 45 08 lea 0x8(%ebp),%eax 107ba4: 50 push %eax 107ba5: 89 f9 mov %edi,%ecx 107ba7: 89 f0 mov %esi,%eax 107ba9: e8 a3 fd ff ff call 107951 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107bae: 83 c4 10 add $0x10,%esp 107bb1: 85 c0 test %eax,%eax 107bb3: 74 4b je 107c00 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 107bb5: 51 push %ecx 107bb6: 51 push %ecx 107bb7: 8d 53 14 lea 0x14(%ebx),%edx 107bba: 6a 00 push $0x0 107bbc: 8d 45 08 lea 0x8(%ebp),%eax 107bbf: 50 push %eax 107bc0: 89 f9 mov %edi,%ecx 107bc2: 89 f0 mov %esi,%eax 107bc4: e8 88 fd ff ff call 107951 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107bc9: 83 c4 10 add $0x10,%esp 107bcc: 85 c0 test %eax,%eax 107bce: 74 30 je 107c00 <== NEVER TAKEN || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 107bd0: 52 push %edx 107bd1: 52 push %edx 107bd2: 8d 53 18 lea 0x18(%ebx),%edx 107bd5: 6a 01 push $0x1 107bd7: 8d 45 08 lea 0x8(%ebp),%eax 107bda: 50 push %eax 107bdb: 89 f9 mov %edi,%ecx 107bdd: 89 f0 mov %esi,%eax 107bdf: e8 6d fd ff ff call 107951 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107be4: 83 c4 10 add $0x10,%esp 107be7: 85 c0 test %eax,%eax 107be9: 74 15 je 107c00 <== NEVER TAKEN || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 107beb: 8b 45 e4 mov -0x1c(%ebp),%eax 107bee: 66 89 43 08 mov %ax,0x8(%ebx) pwd->pw_gid = pwgid; 107bf2: 8b 45 e0 mov -0x20(%ebp),%eax 107bf5: 66 89 43 0a mov %ax,0xa(%ebx) 107bf9: b8 01 00 00 00 mov $0x1,%eax return 1; 107bfe: eb 02 jmp 107c02 107c00: 31 c0 xor %eax,%eax <== NOT EXECUTED } 107c02: 8d 65 f4 lea -0xc(%ebp),%esp 107c05: 5b pop %ebx 107c06: 5e pop %esi 107c07: 5f pop %edi 107c08: c9 leave 107c09: c3 ret =============================================================================== 00107d13 : return NULL; return &grent; } void setgrent(void) { 107d13: 55 push %ebp <== NOT EXECUTED 107d14: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107d16: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 107d19: e8 24 ff ff ff call 107c42 <== NOT EXECUTED if (group_fp != NULL) 107d1e: a1 40 63 12 00 mov 0x126340,%eax <== NOT EXECUTED 107d23: 85 c0 test %eax,%eax <== NOT EXECUTED 107d25: 74 0c je 107d33 <== NOT EXECUTED fclose(group_fp); 107d27: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d2a: 50 push %eax <== NOT EXECUTED 107d2b: e8 0c a3 00 00 call 11203c <== NOT EXECUTED 107d30: 83 c4 10 add $0x10,%esp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 107d33: 52 push %edx <== NOT EXECUTED 107d34: 52 push %edx <== NOT EXECUTED 107d35: 68 53 ed 11 00 push $0x11ed53 <== NOT EXECUTED 107d3a: 68 77 00 12 00 push $0x120077 <== NOT EXECUTED 107d3f: e8 5c a9 00 00 call 1126a0 <== NOT EXECUTED 107d44: a3 40 63 12 00 mov %eax,0x126340 <== NOT EXECUTED 107d49: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107d4c: c9 leave <== NOT EXECUTED 107d4d: c3 ret <== NOT EXECUTED =============================================================================== 00107eb7 : return NULL; return &pwent; } void setpwent(void) { 107eb7: 55 push %ebp <== NOT EXECUTED 107eb8: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107eba: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 107ebd: e8 80 fd ff ff call 107c42 <== NOT EXECUTED if (passwd_fp != NULL) 107ec2: a1 58 62 12 00 mov 0x126258,%eax <== NOT EXECUTED 107ec7: 85 c0 test %eax,%eax <== NOT EXECUTED 107ec9: 74 0c je 107ed7 <== NOT EXECUTED fclose(passwd_fp); 107ecb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107ece: 50 push %eax <== NOT EXECUTED 107ecf: e8 68 a1 00 00 call 11203c <== NOT EXECUTED 107ed4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 107ed7: 50 push %eax <== NOT EXECUTED 107ed8: 50 push %eax <== NOT EXECUTED 107ed9: 68 53 ed 11 00 push $0x11ed53 <== NOT EXECUTED 107ede: 68 04 00 12 00 push $0x120004 <== NOT EXECUTED 107ee3: e8 b8 a7 00 00 call 1126a0 <== NOT EXECUTED 107ee8: a3 58 62 12 00 mov %eax,0x126258 <== NOT EXECUTED 107eed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107ef0: c9 leave <== NOT EXECUTED 107ef1: c3 ret <== NOT EXECUTED =============================================================================== 00108949 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 108949: 55 push %ebp <== NOT EXECUTED 10894a: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10894c: 56 push %esi <== NOT EXECUTED 10894d: 53 push %ebx <== NOT EXECUTED 10894e: 89 d3 mov %edx,%ebx <== NOT EXECUTED 108950: 89 c6 mov %eax,%esi <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 108952: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) <== NOT EXECUTED 108959: 74 30 je 10898b <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10895b: 52 push %edx <== NOT EXECUTED 10895c: 6a 00 push $0x0 <== NOT EXECUTED 10895e: 6a 00 push $0x0 <== NOT EXECUTED 108960: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 108963: e8 84 16 00 00 call 109fec <== NOT EXECUTED i = iproc (c, tty); 108968: 89 f2 mov %esi,%edx <== NOT EXECUTED 10896a: 0f b6 c2 movzbl %dl,%eax <== NOT EXECUTED 10896d: 89 da mov %ebx,%edx <== NOT EXECUTED 10896f: e8 bc fe ff ff call 108830 <== NOT EXECUTED 108974: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_semaphore_release (tty->osem); 108976: 58 pop %eax <== NOT EXECUTED 108977: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 10897a: e8 59 17 00 00 call 10a0d8 <== NOT EXECUTED 10897f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 108982: 89 f0 mov %esi,%eax <== NOT EXECUTED 108984: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 108987: 5b pop %ebx <== NOT EXECUTED 108988: 5e pop %esi <== NOT EXECUTED 108989: c9 leave <== NOT EXECUTED 10898a: c3 ret <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 10898b: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10898e: 89 da mov %ebx,%edx <== NOT EXECUTED } return i; } 108990: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 108993: 5b pop %ebx <== NOT EXECUTED 108994: 5e pop %esi <== NOT EXECUTED 108995: c9 leave <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 108996: e9 95 fe ff ff jmp 108830 <== NOT EXECUTED =============================================================================== 00109278 : int _STAT_NAME( const char *path, struct stat *buf ) { 109278: 55 push %ebp 109279: 89 e5 mov %esp,%ebp 10927b: 57 push %edi 10927c: 56 push %esi 10927d: 53 push %ebx 10927e: 83 ec 2c sub $0x2c,%esp 109281: 8b 55 08 mov 0x8(%ebp),%edx 109284: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 109287: 85 f6 test %esi,%esi 109289: 75 0d jne 109298 rtems_set_errno_and_return_minus_one( EFAULT ); 10928b: e8 2c 92 00 00 call 1124bc <__errno> 109290: c7 00 0e 00 00 00 movl $0xe,(%eax) 109296: eb 53 jmp 1092eb status = rtems_filesystem_evaluate_path( path, strlen( path ), 109298: 31 c0 xor %eax,%eax 10929a: 83 c9 ff or $0xffffffff,%ecx 10929d: 89 d7 mov %edx,%edi 10929f: f2 ae repnz scas %es:(%edi),%al 1092a1: f7 d1 not %ecx 1092a3: 49 dec %ecx 1092a4: 83 ec 0c sub $0xc,%esp 1092a7: 6a 01 push $0x1 1092a9: 8d 5d d4 lea -0x2c(%ebp),%ebx 1092ac: 53 push %ebx 1092ad: 6a 00 push $0x0 1092af: 51 push %ecx 1092b0: 52 push %edx 1092b1: e8 c2 eb ff ff call 107e78 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 1092b6: 83 c4 20 add $0x20,%esp 1092b9: 83 cf ff or $0xffffffff,%edi 1092bc: 85 c0 test %eax,%eax 1092be: 75 5c jne 10931c return -1; if ( !loc.handlers->fstat_h ){ 1092c0: 8b 55 dc mov -0x24(%ebp),%edx 1092c3: 83 7a 18 00 cmpl $0x0,0x18(%edx) 1092c7: 75 27 jne 1092f0 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 1092c9: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1092cc: 85 c0 test %eax,%eax <== NOT EXECUTED 1092ce: 74 10 je 1092e0 <== NOT EXECUTED 1092d0: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1092d3: 85 c0 test %eax,%eax <== NOT EXECUTED 1092d5: 74 09 je 1092e0 <== NOT EXECUTED 1092d7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1092da: 53 push %ebx <== NOT EXECUTED 1092db: ff d0 call *%eax <== NOT EXECUTED 1092dd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1092e0: e8 d7 91 00 00 call 1124bc <__errno> <== NOT EXECUTED 1092e5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1092eb: 83 cf ff or $0xffffffff,%edi 1092ee: eb 2c jmp 10931c /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 1092f0: b9 12 00 00 00 mov $0x12,%ecx 1092f5: 89 f7 mov %esi,%edi 1092f7: f3 ab rep stos %eax,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 1092f9: 50 push %eax 1092fa: 50 push %eax 1092fb: 56 push %esi 1092fc: 53 push %ebx 1092fd: ff 52 18 call *0x18(%edx) 109300: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &loc ); 109302: 8b 45 e0 mov -0x20(%ebp),%eax 109305: 83 c4 10 add $0x10,%esp 109308: 85 c0 test %eax,%eax 10930a: 74 10 je 10931c <== NEVER TAKEN 10930c: 8b 40 1c mov 0x1c(%eax),%eax 10930f: 85 c0 test %eax,%eax 109311: 74 09 je 10931c <== NEVER TAKEN 109313: 83 ec 0c sub $0xc,%esp 109316: 53 push %ebx 109317: ff d0 call *%eax 109319: 83 c4 10 add $0x10,%esp return status; } 10931c: 89 f8 mov %edi,%eax 10931e: 8d 65 f4 lea -0xc(%ebp),%esp 109321: 5b pop %ebx 109322: 5e pop %esi 109323: 5f pop %edi 109324: c9 leave 109325: c3 ret =============================================================================== 00109514 : int symlink( const char *actualpath, const char *sympath ) { 109514: 55 push %ebp 109515: 89 e5 mov %esp,%ebp 109517: 57 push %edi 109518: 56 push %esi 109519: 83 ec 20 sub $0x20,%esp 10951c: 8b 45 0c mov 0xc(%ebp),%eax rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 10951f: 8a 10 mov (%eax),%dl 109521: 80 fa 5c cmp $0x5c,%dl 109524: 74 09 je 10952f <== NEVER TAKEN 109526: 80 fa 2f cmp $0x2f,%dl 109529: 74 04 je 10952f 10952b: 84 d2 test %dl,%dl 10952d: 75 17 jne 109546 <== ALWAYS TAKEN 10952f: 8d 7d e0 lea -0x20(%ebp),%edi 109532: 8b 35 d4 4f 12 00 mov 0x124fd4,%esi 109538: 83 c6 18 add $0x18,%esi 10953b: b9 05 00 00 00 mov $0x5,%ecx 109540: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 109542: b1 01 mov $0x1,%cl 109544: eb 13 jmp 109559 109546: 8d 7d e0 lea -0x20(%ebp),%edi 109549: 8b 35 d4 4f 12 00 mov 0x124fd4,%esi 10954f: 83 c6 04 add $0x4,%esi 109552: b9 05 00 00 00 mov $0x5,%ecx 109557: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->evalformake_h ) { 109559: 8b 55 ec mov -0x14(%ebp),%edx 10955c: 8b 52 04 mov 0x4(%edx),%edx 10955f: 85 d2 test %edx,%edx 109561: 74 32 je 109595 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 109563: 56 push %esi 109564: 8d 75 f4 lea -0xc(%ebp),%esi 109567: 56 push %esi 109568: 8d 7d e0 lea -0x20(%ebp),%edi 10956b: 57 push %edi 10956c: 01 c8 add %ecx,%eax 10956e: 50 push %eax 10956f: ff d2 call *%edx if ( result != 0 ) 109571: 83 c4 10 add $0x10,%esp 109574: 83 ce ff or $0xffffffff,%esi 109577: 85 c0 test %eax,%eax 109579: 75 50 jne 1095cb return -1; if ( !loc.ops->symlink_h ) { 10957b: 8b 55 ec mov -0x14(%ebp),%edx 10957e: 8b 42 38 mov 0x38(%edx),%eax 109581: 85 c0 test %eax,%eax 109583: 75 20 jne 1095a5 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 109585: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 109588: 85 c0 test %eax,%eax <== NOT EXECUTED 10958a: 74 09 je 109595 <== NOT EXECUTED 10958c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10958f: 57 push %edi <== NOT EXECUTED 109590: ff d0 call *%eax <== NOT EXECUTED 109592: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 109595: e8 22 92 00 00 call 1127bc <__errno> <== NOT EXECUTED 10959a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1095a0: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 1095a3: eb 26 jmp 1095cb <== NOT EXECUTED } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 1095a5: 52 push %edx 1095a6: ff 75 f4 pushl -0xc(%ebp) 1095a9: ff 75 08 pushl 0x8(%ebp) 1095ac: 57 push %edi 1095ad: ff d0 call *%eax 1095af: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 1095b1: 8b 45 ec mov -0x14(%ebp),%eax 1095b4: 83 c4 10 add $0x10,%esp 1095b7: 85 c0 test %eax,%eax 1095b9: 74 10 je 1095cb <== NEVER TAKEN 1095bb: 8b 40 1c mov 0x1c(%eax),%eax 1095be: 85 c0 test %eax,%eax 1095c0: 74 09 je 1095cb <== NEVER TAKEN 1095c2: 83 ec 0c sub $0xc,%esp 1095c5: 57 push %edi 1095c6: ff d0 call *%eax 1095c8: 83 c4 10 add $0x10,%esp return result; } 1095cb: 89 f0 mov %esi,%eax 1095cd: 8d 65 f8 lea -0x8(%ebp),%esp 1095d0: 5e pop %esi 1095d1: 5f pop %edi 1095d2: c9 leave 1095d3: c3 ret =============================================================================== 00109340 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 109340: 55 push %ebp 109341: 89 e5 mov %esp,%ebp 109343: 53 push %ebx 109344: 83 ec 04 sub $0x4,%esp 109347: 8b 45 08 mov 0x8(%ebp),%eax /* * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; 10934a: 8b 88 ec 00 00 00 mov 0xec(%eax),%ecx if ( this_reent ) { 109350: 85 c9 test %ecx,%ecx 109352: 74 32 je 109386 <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 109354: 8b 15 38 62 12 00 mov 0x126238,%edx 10935a: 8b 9a ec 00 00 00 mov 0xec(%edx),%ebx _Thread_Executing->libc_reent = this_reent; 109360: 89 8a ec 00 00 00 mov %ecx,0xec(%edx) _fwalk (t->libc_reent, sync_wrapper); 109366: 52 push %edx 109367: 52 push %edx 109368: 68 b2 93 10 00 push $0x1093b2 10936d: ff b0 ec 00 00 00 pushl 0xec(%eax) 109373: e8 58 a0 00 00 call 1133d0 <_fwalk> _Thread_Executing->libc_reent = current_reent; 109378: a1 38 62 12 00 mov 0x126238,%eax 10937d: 89 98 ec 00 00 00 mov %ebx,0xec(%eax) 109383: 83 c4 10 add $0x10,%esp } } 109386: 8b 5d fc mov -0x4(%ebp),%ebx 109389: c9 leave 10938a: c3 ret =============================================================================== 00108fbc : int tcsetattr( int fd, int opt, struct termios *tp ) { 108fbc: 55 push %ebp 108fbd: 89 e5 mov %esp,%ebp 108fbf: 56 push %esi 108fc0: 53 push %ebx 108fc1: 8b 5d 08 mov 0x8(%ebp),%ebx 108fc4: 8b 45 0c mov 0xc(%ebp),%eax 108fc7: 8b 75 10 mov 0x10(%ebp),%esi switch (opt) { 108fca: 85 c0 test %eax,%eax 108fcc: 74 22 je 108ff0 <== ALWAYS TAKEN 108fce: 48 dec %eax <== NOT EXECUTED 108fcf: 74 0d je 108fde <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 108fd1: e8 d2 86 00 00 call 1116a8 <__errno> <== NOT EXECUTED 108fd6: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108fdc: eb 2a jmp 109008 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 108fde: 50 push %eax <== NOT EXECUTED 108fdf: 6a 00 push $0x0 <== NOT EXECUTED 108fe1: 6a 03 push $0x3 <== NOT EXECUTED 108fe3: 53 push %ebx <== NOT EXECUTED 108fe4: e8 47 63 00 00 call 10f330 <== NOT EXECUTED 108fe9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108fec: 85 c0 test %eax,%eax <== NOT EXECUTED 108fee: 78 18 js 109008 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 108ff0: 89 75 10 mov %esi,0x10(%ebp) 108ff3: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) 108ffa: 89 5d 08 mov %ebx,0x8(%ebp) } } 108ffd: 8d 65 f8 lea -0x8(%ebp),%esp 109000: 5b pop %ebx 109001: 5e pop %esi 109002: c9 leave return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 109003: e9 28 63 00 00 jmp 10f330 } } 109008: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10900b: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10900e: 5b pop %ebx <== NOT EXECUTED 10900f: 5e pop %esi <== NOT EXECUTED 109010: c9 leave <== NOT EXECUTED 109011: c3 ret <== NOT EXECUTED =============================================================================== 001100f8 : #include int unlink( const char *path ) { 1100f8: 55 push %ebp 1100f9: 89 e5 mov %esp,%ebp 1100fb: 57 push %edi 1100fc: 56 push %esi 1100fd: 53 push %ebx 1100fe: 83 ec 58 sub $0x58,%esp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 110101: ff 75 08 pushl 0x8(%ebp) 110104: e8 52 6f ff ff call 10705b 110109: 89 c2 mov %eax,%edx if ( parentpathlen == 0 ) 11010b: 83 c4 10 add $0x10,%esp 11010e: 85 c0 test %eax,%eax 110110: 75 36 jne 110148 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 110112: 8b 4d 08 mov 0x8(%ebp),%ecx 110115: 8a 01 mov (%ecx),%al 110117: 3c 5c cmp $0x5c,%al 110119: 74 08 je 110123 <== NEVER TAKEN 11011b: 3c 2f cmp $0x2f,%al 11011d: 74 04 je 110123 11011f: 84 c0 test %al,%al 110121: 75 0e jne 110131 <== ALWAYS TAKEN 110123: 8d 7d d4 lea -0x2c(%ebp),%edi 110126: 8b 35 28 18 12 00 mov 0x121828,%esi 11012c: 83 c6 18 add $0x18,%esi 11012f: eb 0c jmp 11013d 110131: 8d 7d d4 lea -0x2c(%ebp),%edi 110134: 8b 35 28 18 12 00 mov 0x121828,%esi 11013a: 83 c6 04 add $0x4,%esi 11013d: b9 05 00 00 00 mov $0x5,%ecx 110142: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 110144: 31 db xor %ebx,%ebx 110146: eb 27 jmp 11016f else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 110148: 83 ec 0c sub $0xc,%esp 11014b: 6a 00 push $0x0 11014d: 8d 45 d4 lea -0x2c(%ebp),%eax 110150: 50 push %eax 110151: 6a 02 push $0x2 110153: 52 push %edx 110154: ff 75 08 pushl 0x8(%ebp) 110157: 89 55 b4 mov %edx,-0x4c(%ebp) 11015a: e8 e9 6f ff ff call 107148 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 11015f: 83 c4 20 add $0x20,%esp 110162: 85 c0 test %eax,%eax 110164: 8b 55 b4 mov -0x4c(%ebp),%edx 110167: 0f 85 68 01 00 00 jne 1102d5 <== NEVER TAKEN 11016d: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 11016f: 8d 7d c0 lea -0x40(%ebp),%edi 110172: 8d 75 d4 lea -0x2c(%ebp),%esi 110175: b9 05 00 00 00 mov $0x5,%ecx 11017a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = path + parentpathlen; 11017c: 8b 75 08 mov 0x8(%ebp),%esi 11017f: 01 d6 add %edx,%esi name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 110181: 83 c9 ff or $0xffffffff,%ecx 110184: 89 f7 mov %esi,%edi 110186: 31 c0 xor %eax,%eax 110188: f2 ae repnz scas %es:(%edi),%al 11018a: f7 d1 not %ecx 11018c: 49 dec %ecx 11018d: 52 push %edx 11018e: 52 push %edx 11018f: 51 push %ecx 110190: 56 push %esi 110191: e8 9e 6e ff ff call 107034 110196: 01 c6 add %eax,%esi result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 110198: 83 c9 ff or $0xffffffff,%ecx 11019b: 89 f7 mov %esi,%edi 11019d: 31 c0 xor %eax,%eax 11019f: f2 ae repnz scas %es:(%edi),%al 1101a1: f7 d1 not %ecx 1101a3: 49 dec %ecx 1101a4: c7 04 24 00 00 00 00 movl $0x0,(%esp) 1101ab: 8d 7d c0 lea -0x40(%ebp),%edi 1101ae: 57 push %edi 1101af: 6a 00 push $0x0 1101b1: 51 push %ecx 1101b2: 56 push %esi 1101b3: e8 d6 6e ff ff call 10708e 0, &loc, false ); if ( result != 0 ) { 1101b8: 83 c4 20 add $0x20,%esp 1101bb: 85 c0 test %eax,%eax 1101bd: 74 2f je 1101ee if ( free_parentloc ) 1101bf: 84 db test %bl,%bl 1101c1: 0f 84 0e 01 00 00 je 1102d5 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 1101c7: 8b 45 e0 mov -0x20(%ebp),%eax 1101ca: 85 c0 test %eax,%eax 1101cc: 0f 84 03 01 00 00 je 1102d5 <== NEVER TAKEN 1101d2: 8b 40 1c mov 0x1c(%eax),%eax 1101d5: 85 c0 test %eax,%eax 1101d7: 0f 84 f8 00 00 00 je 1102d5 <== NEVER TAKEN 1101dd: 83 ec 0c sub $0xc,%esp 1101e0: 8d 55 d4 lea -0x2c(%ebp),%edx 1101e3: 52 push %edx 1101e4: ff d0 call *%eax 1101e6: 83 ce ff or $0xffffffff,%esi 1101e9: e9 e2 00 00 00 jmp 1102d0 return -1; } if ( !loc.ops->node_type_h ) { 1101ee: 8b 55 cc mov -0x34(%ebp),%edx 1101f1: 8b 42 10 mov 0x10(%edx),%eax 1101f4: 85 c0 test %eax,%eax 1101f6: 75 05 jne 1101fd <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 1101f8: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1101fb: eb 5b jmp 110258 <== 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 ) { 1101fd: 83 ec 0c sub $0xc,%esp 110200: 57 push %edi 110201: ff d0 call *%eax 110203: 83 c4 10 add $0x10,%esp 110206: 48 dec %eax 110207: 8b 45 cc mov -0x34(%ebp),%eax 11020a: 75 42 jne 11024e rtems_filesystem_freenode( &loc ); 11020c: 85 c0 test %eax,%eax 11020e: 74 10 je 110220 <== NEVER TAKEN 110210: 8b 40 1c mov 0x1c(%eax),%eax 110213: 85 c0 test %eax,%eax 110215: 74 09 je 110220 <== NEVER TAKEN 110217: 83 ec 0c sub $0xc,%esp 11021a: 57 push %edi 11021b: ff d0 call *%eax 11021d: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 110220: 84 db test %bl,%bl 110222: 74 1a je 11023e <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 110224: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 110227: 85 c0 test %eax,%eax <== NOT EXECUTED 110229: 74 13 je 11023e <== NOT EXECUTED 11022b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 11022e: 85 c0 test %eax,%eax <== NOT EXECUTED 110230: 74 0c je 11023e <== NOT EXECUTED 110232: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110235: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED 110238: 52 push %edx <== NOT EXECUTED 110239: ff d0 call *%eax <== NOT EXECUTED 11023b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 11023e: e8 21 01 00 00 call 110364 <__errno> 110243: c7 00 15 00 00 00 movl $0x15,(%eax) 110249: e9 87 00 00 00 jmp 1102d5 } if ( !loc.ops->unlink_h ) { 11024e: 8b 50 0c mov 0xc(%eax),%edx 110251: 85 d2 test %edx,%edx 110253: 75 3b jne 110290 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 110255: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 110258: 85 c0 test %eax,%eax <== NOT EXECUTED 11025a: 74 09 je 110265 <== NOT EXECUTED 11025c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11025f: 57 push %edi <== NOT EXECUTED 110260: ff d0 call *%eax <== NOT EXECUTED 110262: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 110265: 84 db test %bl,%bl <== NOT EXECUTED 110267: 74 1a je 110283 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 110269: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 11026c: 85 c0 test %eax,%eax <== NOT EXECUTED 11026e: 74 13 je 110283 <== NOT EXECUTED 110270: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 110273: 85 c0 test %eax,%eax <== NOT EXECUTED 110275: 74 0c je 110283 <== NOT EXECUTED 110277: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11027a: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED 11027d: 52 push %edx <== NOT EXECUTED 11027e: ff d0 call *%eax <== NOT EXECUTED 110280: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 110283: e8 dc 00 00 00 call 110364 <__errno> <== NOT EXECUTED 110288: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11028e: eb 45 jmp 1102d5 <== NOT EXECUTED } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 110290: 50 push %eax 110291: 50 push %eax 110292: 57 push %edi 110293: 8d 45 d4 lea -0x2c(%ebp),%eax 110296: 50 push %eax 110297: ff d2 call *%edx 110299: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 11029b: 8b 45 cc mov -0x34(%ebp),%eax 11029e: 83 c4 10 add $0x10,%esp 1102a1: 85 c0 test %eax,%eax 1102a3: 74 10 je 1102b5 <== NEVER TAKEN 1102a5: 8b 40 1c mov 0x1c(%eax),%eax 1102a8: 85 c0 test %eax,%eax 1102aa: 74 09 je 1102b5 <== NEVER TAKEN 1102ac: 83 ec 0c sub $0xc,%esp 1102af: 57 push %edi 1102b0: ff d0 call *%eax 1102b2: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 1102b5: 84 db test %bl,%bl 1102b7: 74 1f je 1102d8 rtems_filesystem_freenode( &parentloc ); 1102b9: 8b 45 e0 mov -0x20(%ebp),%eax 1102bc: 85 c0 test %eax,%eax 1102be: 74 18 je 1102d8 <== NEVER TAKEN 1102c0: 8b 40 1c mov 0x1c(%eax),%eax 1102c3: 85 c0 test %eax,%eax 1102c5: 74 11 je 1102d8 <== NEVER TAKEN 1102c7: 83 ec 0c sub $0xc,%esp 1102ca: 8d 55 d4 lea -0x2c(%ebp),%edx 1102cd: 52 push %edx 1102ce: ff d0 call *%eax 1102d0: 83 c4 10 add $0x10,%esp 1102d3: eb 03 jmp 1102d8 1102d5: 83 ce ff or $0xffffffff,%esi return result; } 1102d8: 89 f0 mov %esi,%eax 1102da: 8d 65 f4 lea -0xc(%ebp),%esp 1102dd: 5b pop %ebx 1102de: 5e pop %esi 1102df: 5f pop %edi 1102e0: c9 leave 1102e1: c3 ret =============================================================================== 0010cbec : */ int unmount( const char *path ) { 10cbec: 55 push %ebp 10cbed: 89 e5 mov %esp,%ebp 10cbef: 57 push %edi 10cbf0: 56 push %esi 10cbf1: 53 push %ebx 10cbf2: 83 ec 38 sub $0x38,%esp 10cbf5: 8b 55 08 mov 0x8(%ebp),%edx * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 10cbf8: 31 c0 xor %eax,%eax 10cbfa: 83 c9 ff or $0xffffffff,%ecx 10cbfd: 89 d7 mov %edx,%edi 10cbff: f2 ae repnz scas %es:(%edi),%al 10cc01: f7 d1 not %ecx 10cc03: 49 dec %ecx 10cc04: 6a 01 push $0x1 10cc06: 8d 75 d4 lea -0x2c(%ebp),%esi 10cc09: 56 push %esi 10cc0a: 6a 00 push $0x0 10cc0c: 51 push %ecx 10cc0d: 52 push %edx 10cc0e: e8 79 cd ff ff call 10998c 10cc13: 83 c4 20 add $0x20,%esp 10cc16: 85 c0 test %eax,%eax 10cc18: 0f 85 0f 01 00 00 jne 10cd2d <== NEVER TAKEN return -1; mt_entry = loc.mt_entry; 10cc1e: 8b 5d e4 mov -0x1c(%ebp),%ebx fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 10cc21: 8b 43 1c mov 0x1c(%ebx),%eax 10cc24: 3b 45 d4 cmp -0x2c(%ebp),%eax 10cc27: 8b 45 e0 mov -0x20(%ebp),%eax 10cc2a: 74 24 je 10cc50 /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 10cc2c: 85 c0 test %eax,%eax 10cc2e: 74 10 je 10cc40 <== NEVER TAKEN 10cc30: 8b 40 1c mov 0x1c(%eax),%eax 10cc33: 85 c0 test %eax,%eax 10cc35: 74 09 je 10cc40 <== NEVER TAKEN 10cc37: 83 ec 0c sub $0xc,%esp 10cc3a: 56 push %esi 10cc3b: ff d0 call *%eax 10cc3d: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EACCES ); 10cc40: e8 33 78 00 00 call 114478 <__errno> 10cc45: c7 00 0d 00 00 00 movl $0xd,(%eax) 10cc4b: e9 dd 00 00 00 jmp 10cd2d /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 10cc50: 85 c0 test %eax,%eax 10cc52: 74 10 je 10cc64 <== NEVER TAKEN 10cc54: 8b 40 1c mov 0x1c(%eax),%eax 10cc57: 85 c0 test %eax,%eax 10cc59: 74 09 je 10cc64 <== NEVER TAKEN 10cc5b: 83 ec 0c sub $0xc,%esp 10cc5e: 56 push %esi 10cc5f: ff d0 call *%eax 10cc61: 83 c4 10 add $0x10,%esp if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; 10cc64: 8b 43 14 mov 0x14(%ebx),%eax 10cc67: 83 78 28 00 cmpl $0x0,0x28(%eax) 10cc6b: 74 09 je 10cc76 <== NEVER TAKEN fs_root_loc = &mt_entry->mt_fs_root; 10cc6d: 8b 43 28 mov 0x28(%ebx),%eax 10cc70: 83 78 2c 00 cmpl $0x0,0x2c(%eax) 10cc74: 75 10 jne 10cc86 <== ALWAYS TAKEN if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10cc76: e8 fd 77 00 00 call 114478 <__errno> <== NOT EXECUTED 10cc7b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10cc81: e9 a7 00 00 00 jmp 10cd2d <== NOT EXECUTED * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 10cc86: a1 68 7f 12 00 mov 0x127f68,%eax 10cc8b: 39 58 14 cmp %ebx,0x14(%eax) 10cc8e: 74 1d je 10ccad /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 10cc90: a1 5c a9 12 00 mov 0x12a95c,%eax 10cc95: eb 0a jmp 10cca1 if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 10cc97: 8b 50 18 mov 0x18(%eax),%edx 10cc9a: 3b 53 2c cmp 0x2c(%ebx),%edx 10cc9d: 74 0e je 10ccad * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 10cc9f: 8b 00 mov (%eax),%eax 10cca1: 3d 60 a9 12 00 cmp $0x12a960,%eax 10cca6: 75 ef jne 10cc97 10cca8: e9 8b 00 00 00 jmp 10cd38 * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 10ccad: e8 c6 77 00 00 call 114478 <__errno> 10ccb2: c7 00 10 00 00 00 movl $0x10,(%eax) 10ccb8: eb 73 jmp 10cd2d * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) 10ccba: 83 ec 0c sub $0xc,%esp 10ccbd: 8b 43 14 mov 0x14(%ebx),%eax 10ccc0: 53 push %ebx 10ccc1: ff 50 28 call *0x28(%eax) 10ccc4: 83 c4 10 add $0x10,%esp 10ccc7: 85 c0 test %eax,%eax 10ccc9: 75 62 jne 10cd2d <== NEVER TAKEN * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 10cccb: 83 ec 0c sub $0xc,%esp 10ccce: 8b 43 28 mov 0x28(%ebx),%eax 10ccd1: 53 push %ebx 10ccd2: ff 50 2c call *0x2c(%eax) 10ccd5: 83 c4 10 add $0x10,%esp 10ccd8: 85 c0 test %eax,%eax 10ccda: 74 1b je 10ccf7 <== ALWAYS TAKEN if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 10ccdc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ccdf: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10cce2: 53 push %ebx <== NOT EXECUTED 10cce3: ff 50 20 call *0x20(%eax) <== NOT EXECUTED 10cce6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cce9: 85 c0 test %eax,%eax <== NOT EXECUTED 10cceb: 74 40 je 10cd2d <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 10cced: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ccf0: 6a 00 push $0x0 <== NOT EXECUTED 10ccf2: e8 65 10 00 00 call 10dd5c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10ccf7: 83 ec 0c sub $0xc,%esp 10ccfa: 53 push %ebx 10ccfb: e8 dc 12 00 00 call 10dfdc <_Chain_Extract> /* * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); 10cd00: 8b 43 14 mov 0x14(%ebx),%eax 10cd03: 83 c4 10 add $0x10,%esp 10cd06: 85 c0 test %eax,%eax 10cd08: 74 13 je 10cd1d <== NEVER TAKEN 10cd0a: 8b 40 1c mov 0x1c(%eax),%eax 10cd0d: 85 c0 test %eax,%eax 10cd0f: 74 0c je 10cd1d <== NEVER TAKEN 10cd11: 83 ec 0c sub $0xc,%esp 10cd14: 8d 53 08 lea 0x8(%ebx),%edx 10cd17: 52 push %edx 10cd18: ff d0 call *%eax 10cd1a: 83 c4 10 add $0x10,%esp free( mt_entry ); 10cd1d: 83 ec 0c sub $0xc,%esp 10cd20: 53 push %ebx 10cd21: e8 0e cd ff ff call 109a34 10cd26: 31 c0 xor %eax,%eax return 0; 10cd28: 83 c4 10 add $0x10,%esp 10cd2b: eb 03 jmp 10cd30 10cd2d: 83 c8 ff or $0xffffffff,%eax } 10cd30: 8d 65 f4 lea -0xc(%ebp),%esp 10cd33: 5b pop %ebx 10cd34: 5e pop %esi 10cd35: 5f pop %edi 10cd36: c9 leave 10cd37: c3 ret * Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) 10cd38: 83 ec 0c sub $0xc,%esp 10cd3b: 53 push %ebx 10cd3c: e8 05 cf ff ff call 109c46 10cd41: 83 c4 10 add $0x10,%esp 10cd44: 48 dec %eax 10cd45: 0f 85 6f ff ff ff jne 10ccba 10cd4b: e9 5d ff ff ff jmp 10ccad =============================================================================== 0010ad0c : int utime( const char *path, const struct utimbuf *times ) { 10ad0c: 55 push %ebp 10ad0d: 89 e5 mov %esp,%ebp 10ad0f: 57 push %edi 10ad10: 56 push %esi 10ad11: 53 push %ebx 10ad12: 83 ec 38 sub $0x38,%esp 10ad15: 8b 55 08 mov 0x8(%ebp),%edx 10ad18: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 10ad1b: 31 c0 xor %eax,%eax 10ad1d: 83 c9 ff or $0xffffffff,%ecx 10ad20: 89 d7 mov %edx,%edi 10ad22: f2 ae repnz scas %es:(%edi),%al 10ad24: f7 d1 not %ecx 10ad26: 49 dec %ecx 10ad27: 6a 01 push $0x1 10ad29: 8d 75 d4 lea -0x2c(%ebp),%esi 10ad2c: 56 push %esi 10ad2d: 6a 00 push $0x0 10ad2f: 51 push %ecx 10ad30: 52 push %edx 10ad31: e8 42 d1 ff ff call 107e78 10ad36: 83 c4 20 add $0x20,%esp 10ad39: 83 cf ff or $0xffffffff,%edi 10ad3c: 85 c0 test %eax,%eax 10ad3e: 75 4f jne 10ad8f return -1; if ( !temp_loc.ops->utime_h ){ 10ad40: 8b 55 e0 mov -0x20(%ebp),%edx 10ad43: 8b 42 30 mov 0x30(%edx),%eax 10ad46: 85 c0 test %eax,%eax 10ad48: 75 20 jne 10ad6a <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); 10ad4a: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10ad4d: 85 c0 test %eax,%eax <== NOT EXECUTED 10ad4f: 74 09 je 10ad5a <== NOT EXECUTED 10ad51: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ad54: 56 push %esi <== NOT EXECUTED 10ad55: ff d0 call *%eax <== NOT EXECUTED 10ad57: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ad5a: e8 5d 77 00 00 call 1124bc <__errno> <== NOT EXECUTED 10ad5f: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10ad65: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 10ad68: eb 25 jmp 10ad8f <== NOT EXECUTED } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 10ad6a: 52 push %edx 10ad6b: ff 73 04 pushl 0x4(%ebx) 10ad6e: ff 33 pushl (%ebx) 10ad70: 56 push %esi 10ad71: ff d0 call *%eax 10ad73: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &temp_loc ); 10ad75: 8b 45 e0 mov -0x20(%ebp),%eax 10ad78: 83 c4 10 add $0x10,%esp 10ad7b: 85 c0 test %eax,%eax 10ad7d: 74 10 je 10ad8f <== NEVER TAKEN 10ad7f: 8b 40 1c mov 0x1c(%eax),%eax 10ad82: 85 c0 test %eax,%eax 10ad84: 74 09 je 10ad8f <== NEVER TAKEN 10ad86: 83 ec 0c sub $0xc,%esp 10ad89: 56 push %esi 10ad8a: ff d0 call *%eax 10ad8c: 83 c4 10 add $0x10,%esp return result; } 10ad8f: 89 f8 mov %edi,%eax 10ad91: 8d 65 f4 lea -0xc(%ebp),%esp 10ad94: 5b pop %ebx 10ad95: 5e pop %esi 10ad96: 5f pop %edi 10ad97: c9 leave 10ad98: c3 ret =============================================================================== 00109728 : */ void vprintk( const char *fmt, va_list ap ) { 109728: 55 push %ebp 109729: 89 e5 mov %esp,%ebp 10972b: 57 push %edi 10972c: 56 push %esi 10972d: 53 push %ebx 10972e: 83 ec 4c sub $0x4c,%esp 109731: 8b 5d 08 mov 0x8(%ebp),%ebx 109734: 8b 75 0c mov 0xc(%ebp),%esi for (; *fmt != '\0'; fmt++) { 109737: e9 58 02 00 00 jmp 109994 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 10973c: 3c 25 cmp $0x25,%al 10973e: 74 0c je 10974c BSP_output_char(*fmt); 109740: 83 ec 0c sub $0xc,%esp 109743: 0f be c0 movsbl %al,%eax 109746: 50 push %eax 109747: e9 52 01 00 00 jmp 10989e continue; } fmt++; 10974c: 43 inc %ebx if (*fmt == '0' ) { 10974d: c6 45 c4 20 movb $0x20,-0x3c(%ebp) 109751: 80 3b 30 cmpb $0x30,(%ebx) 109754: 75 05 jne 10975b lead = '0'; fmt++; 109756: 43 inc %ebx 109757: c6 45 c4 30 movb $0x30,-0x3c(%ebp) } if (*fmt == '-' ) { 10975b: 31 c9 xor %ecx,%ecx 10975d: 80 3b 2d cmpb $0x2d,(%ebx) 109760: 75 03 jne 109765 minus = true; fmt++; 109762: 43 inc %ebx 109763: b1 01 mov $0x1,%cl 109765: 31 ff xor %edi,%edi 109767: eb 0b jmp 109774 } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 109769: 6b ff 0a imul $0xa,%edi,%edi width += ((unsigned) *fmt - '0'); 10976c: 0f be d2 movsbl %dl,%edx 10976f: 8d 7c 17 d0 lea -0x30(%edi,%edx,1),%edi fmt++; 109773: 43 inc %ebx } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 109774: 8a 13 mov (%ebx),%dl 109776: 8d 42 d0 lea -0x30(%edx),%eax 109779: 3c 09 cmp $0x9,%al 10977b: 76 ec jbe 109769 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 10977d: c6 45 c0 00 movb $0x0,-0x40(%ebp) 109781: 80 fa 6c cmp $0x6c,%dl 109784: 75 07 jne 10978d lflag = true; c = *++fmt; 109786: 43 inc %ebx 109787: 8a 13 mov (%ebx),%dl 109789: c6 45 c0 01 movb $0x1,-0x40(%ebp) } if ( c == 'c' ) { 10978d: 80 fa 63 cmp $0x63,%dl 109790: 75 17 jne 1097a9 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 109792: 8d 7e 04 lea 0x4(%esi),%edi BSP_output_char(chr); 109795: 83 ec 0c sub $0xc,%esp 109798: 0f be 06 movsbl (%esi),%eax 10979b: 50 push %eax 10979c: ff 15 3c fb 11 00 call *0x11fb3c 1097a2: 89 fe mov %edi,%esi 1097a4: e9 fb 00 00 00 jmp 1098a4 continue; } if ( c == 's' ) { 1097a9: 80 fa 73 cmp $0x73,%dl 1097ac: 0f 85 99 00 00 00 jne 10984b unsigned i, len; char *s, *str; str = va_arg(ap, char *); 1097b2: 8d 46 04 lea 0x4(%esi),%eax 1097b5: 89 45 c4 mov %eax,-0x3c(%ebp) 1097b8: 8b 06 mov (%esi),%eax if ( str == NULL ) { 1097ba: 85 c0 test %eax,%eax 1097bc: 75 05 jne 1097c3 1097be: b8 5e d6 11 00 mov $0x11d65e,%eax 1097c3: 31 f6 xor %esi,%esi str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 1097c5: eb 01 jmp 1097c8 1097c7: 46 inc %esi 1097c8: 80 3c 30 00 cmpb $0x0,(%eax,%esi,1) 1097cc: 75 f9 jne 1097c7 ; /* leading spaces */ if ( !minus ) 1097ce: 89 f2 mov %esi,%edx 1097d0: 84 c9 test %cl,%cl 1097d2: 74 23 je 1097f7 1097d4: eb 25 jmp 1097fb for ( i=len ; i BSP_output_char(' '); /* no width option */ if (width == 0) { 1097fb: 85 ff test %edi,%edi 1097fd: 75 02 jne 109801 1097ff: 89 f7 mov %esi,%edi width = len; } /* output the string */ for ( i=0 ; i 109805: eb 1d jmp 109824 BSP_output_char(*str); 109807: 83 ec 0c sub $0xc,%esp 10980a: 0f be d2 movsbl %dl,%edx 10980d: 52 push %edx 10980e: 89 45 b0 mov %eax,-0x50(%ebp) 109811: 88 4d ac mov %cl,-0x54(%ebp) 109814: ff 15 3c fb 11 00 call *0x11fb3c if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 10982a: 84 c9 test %cl,%cl 10982c: 75 14 jne 109842 10982e: e9 5d 01 00 00 jmp 109990 for ( i=len ; i 109846: e9 45 01 00 00 jmp 109990 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 10984b: 80 fa 4f cmp $0x4f,%dl 10984e: 74 5c je 1098ac 109850: 80 fa 6f cmp $0x6f,%dl 109853: 74 57 je 1098ac <== NEVER TAKEN base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 109855: 80 fa 49 cmp $0x49,%dl 109858: 74 5b je 1098b5 10985a: 80 fa 69 cmp $0x69,%dl 10985d: 74 56 je 1098b5 10985f: 80 fa 44 cmp $0x44,%dl 109862: 74 51 je 1098b5 109864: 80 fa 64 cmp $0x64,%dl 109867: 74 4c je 1098b5 c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 109869: 80 fa 55 cmp $0x55,%dl 10986c: 74 05 je 109873 10986e: 80 fa 75 cmp $0x75,%dl 109871: 75 04 jne 109877 109873: 31 d2 xor %edx,%edx 109875: eb 40 jmp 1098b7 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 109877: 80 fa 58 cmp $0x58,%dl 10987a: 74 05 je 109881 10987c: 80 fa 78 cmp $0x78,%dl 10987f: 75 04 jne 109885 109881: 31 d2 xor %edx,%edx 109883: eb 0b jmp 109890 base = 16; sign = false; } else if ( c == 'p' ) { 109885: 80 fa 70 cmp $0x70,%dl 109888: 75 0d jne 109897 10988a: 31 d2 xor %edx,%edx 10988c: c6 45 c0 01 movb $0x1,-0x40(%ebp) 109890: b9 10 00 00 00 mov $0x10,%ecx 109895: eb 25 jmp 1098bc base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 109897: 83 ec 0c sub $0xc,%esp 10989a: 0f be d2 movsbl %dl,%edx 10989d: 52 push %edx 10989e: ff 15 3c fb 11 00 call *0x11fb3c continue; 1098a4: 83 c4 10 add $0x10,%esp 1098a7: e9 e7 00 00 00 jmp 109993 1098ac: 31 d2 xor %edx,%edx 1098ae: b9 08 00 00 00 mov $0x8,%ecx 1098b3: eb 07 jmp 1098bc 1098b5: b2 01 mov $0x1,%dl 1098b7: b9 0a 00 00 00 mov $0xa,%ecx } printNum( 1098bc: 0f be 45 c4 movsbl -0x3c(%ebp),%eax 1098c0: 89 45 b4 mov %eax,-0x4c(%ebp) 1098c3: 8d 46 04 lea 0x4(%esi),%eax 1098c6: 89 45 c4 mov %eax,-0x3c(%ebp) 1098c9: 8b 06 mov (%esi),%eax 1098cb: 8b 75 c4 mov -0x3c(%ebp),%esi unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 1098ce: 84 d2 test %dl,%dl 1098d0: 74 2b je 1098fd 1098d2: 85 c0 test %eax,%eax 1098d4: 79 27 jns 1098fd BSP_output_char('-'); 1098d6: 83 ec 0c sub $0xc,%esp 1098d9: 6a 2d push $0x2d 1098db: 89 45 b0 mov %eax,-0x50(%ebp) 1098de: 89 4d ac mov %ecx,-0x54(%ebp) 1098e1: ff 15 3c fb 11 00 call *0x11fb3c unsigned_num = (unsigned long) -num; 1098e7: 8b 45 b0 mov -0x50(%ebp),%eax 1098ea: f7 d8 neg %eax 1098ec: 89 45 c4 mov %eax,-0x3c(%ebp) if (maxwidth) maxwidth--; 1098ef: 83 c4 10 add $0x10,%esp 1098f2: 83 ff 01 cmp $0x1,%edi 1098f5: 83 d7 ff adc $0xffffffff,%edi 1098f8: 8b 4d ac mov -0x54(%ebp),%ecx 1098fb: eb 03 jmp 109900 } else { unsigned_num = (unsigned long) num; 1098fd: 89 45 c4 mov %eax,-0x3c(%ebp) 109900: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) 109907: eb 1f jmp 109928 } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); 109909: 8a 45 bc mov -0x44(%ebp),%al 10990c: f6 e1 mul %cl 10990e: 8a 55 c4 mov -0x3c(%ebp),%dl 109911: 28 c2 sub %al,%dl 109913: 88 d0 mov %dl,%al 109915: 8b 55 c0 mov -0x40(%ebp),%edx 109918: 88 44 15 d4 mov %al,-0x2c(%ebp,%edx,1) 10991c: 8b 45 b8 mov -0x48(%ebp),%eax 10991f: 89 45 c0 mov %eax,-0x40(%ebp) 109922: 8b 55 bc mov -0x44(%ebp),%edx 109925: 89 55 c4 mov %edx,-0x3c(%ebp) } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 109928: 8b 45 c4 mov -0x3c(%ebp),%eax 10992b: 31 d2 xor %edx,%edx 10992d: f7 f1 div %ecx 10992f: 89 45 bc mov %eax,-0x44(%ebp) 109932: 85 c0 test %eax,%eax 109934: 8b 55 c0 mov -0x40(%ebp),%edx 109937: 8d 52 01 lea 0x1(%edx),%edx 10993a: 89 55 b8 mov %edx,-0x48(%ebp) 10993d: 75 ca jne 109909 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 10993f: 8a 45 c4 mov -0x3c(%ebp),%al 109942: 8b 55 c0 mov -0x40(%ebp),%edx 109945: 88 44 15 d4 mov %al,-0x2c(%ebp,%edx,1) 109949: eb 10 jmp 10995b for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 10994b: 83 ec 0c sub $0xc,%esp 10994e: ff 75 b4 pushl -0x4c(%ebp) 109951: ff 15 3c fb 11 00 call *0x11fb3c toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 109957: 4f dec %edi 109958: 83 c4 10 add $0x10,%esp 10995b: 3b 7d b8 cmp -0x48(%ebp),%edi 10995e: 77 eb ja 10994b 109960: 8d 45 d4 lea -0x2c(%ebp),%eax 109963: 03 45 c0 add -0x40(%ebp),%eax 109966: 31 ff xor %edi,%edi 109968: eb 1f jmp 109989 BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 10996a: 83 ec 0c sub $0xc,%esp 10996d: 0f be 10 movsbl (%eax),%edx 109970: 0f be 92 5f d6 11 00 movsbl 0x11d65f(%edx),%edx 109977: 52 push %edx 109978: 89 45 b0 mov %eax,-0x50(%ebp) 10997b: ff 15 3c fb 11 00 call *0x11fb3c toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 109981: 47 inc %edi 109982: 8b 45 b0 mov -0x50(%ebp),%eax 109985: 48 dec %eax 109986: 83 c4 10 add $0x10,%esp 109989: 3b 7d b8 cmp -0x48(%ebp),%edi 10998c: 72 dc jb 10996a 10998e: eb 03 jmp 109993 109990: 8b 75 c4 mov -0x3c(%ebp),%esi void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 109993: 43 inc %ebx 109994: 8a 03 mov (%ebx),%al 109996: 84 c0 test %al,%al 109998: 0f 85 9e fd ff ff jne 10973c sign, width, lead ); } } 10999e: 8d 65 f4 lea -0xc(%ebp),%esp 1099a1: 5b pop %ebx 1099a2: 5e pop %esi 1099a3: 5f pop %edi 1099a4: c9 leave 1099a5: c3 ret =============================================================================== 0011ba44 : ssize_t write( int fd, const void *buffer, size_t count ) { 11ba44: 55 push %ebp 11ba45: 89 e5 mov %esp,%ebp 11ba47: 56 push %esi 11ba48: 53 push %ebx 11ba49: 8b 5d 08 mov 0x8(%ebp),%ebx 11ba4c: 8b 55 0c mov 0xc(%ebp),%edx 11ba4f: 8b 4d 10 mov 0x10(%ebp),%ecx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11ba52: 3b 1d 24 fa 11 00 cmp 0x11fa24,%ebx 11ba58: 73 14 jae 11ba6e <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11ba5a: c1 e3 06 shl $0x6,%ebx 11ba5d: 03 1d f8 38 12 00 add 0x1238f8,%ebx rtems_libio_check_is_open( iop ); 11ba63: 8b 73 14 mov 0x14(%ebx),%esi 11ba66: f7 c6 00 01 00 00 test $0x100,%esi 11ba6c: 75 0d jne 11ba7b <== ALWAYS TAKEN 11ba6e: e8 f1 48 ff ff call 110364 <__errno> <== NOT EXECUTED 11ba73: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11ba79: eb 31 jmp 11baac <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 11ba7b: 85 d2 test %edx,%edx 11ba7d: 74 0b je 11ba8a <== NEVER TAKEN rtems_libio_check_count( count ); 11ba7f: 31 c0 xor %eax,%eax 11ba81: 85 c9 test %ecx,%ecx 11ba83: 74 44 je 11bac9 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 11ba85: 83 e6 04 and $0x4,%esi 11ba88: 75 0d jne 11ba97 <== ALWAYS TAKEN 11ba8a: e8 d5 48 ff ff call 110364 <__errno> <== NOT EXECUTED 11ba8f: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11ba95: eb 15 jmp 11baac <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 11ba97: 8b 43 3c mov 0x3c(%ebx),%eax 11ba9a: 8b 40 0c mov 0xc(%eax),%eax 11ba9d: 85 c0 test %eax,%eax 11ba9f: 75 10 jne 11bab1 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11baa1: e8 be 48 ff ff call 110364 <__errno> <== NOT EXECUTED 11baa6: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11baac: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 11baaf: eb 18 jmp 11bac9 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 11bab1: 56 push %esi 11bab2: 51 push %ecx 11bab3: 52 push %edx 11bab4: 53 push %ebx 11bab5: ff d0 call *%eax if ( rc > 0 ) 11bab7: 83 c4 10 add $0x10,%esp 11baba: 85 c0 test %eax,%eax 11babc: 7e 0b jle 11bac9 <== NEVER TAKEN iop->offset += rc; 11babe: 89 c1 mov %eax,%ecx 11bac0: c1 f9 1f sar $0x1f,%ecx 11bac3: 01 43 0c add %eax,0xc(%ebx) 11bac6: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11bac9: 8d 65 f8 lea -0x8(%ebp),%esp 11bacc: 5b pop %ebx 11bacd: 5e pop %esi 11bace: c9 leave 11bacf: c3 ret =============================================================================== 0010abd0 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 10abd0: 55 push %ebp 10abd1: 89 e5 mov %esp,%ebp 10abd3: 57 push %edi 10abd4: 56 push %esi 10abd5: 53 push %ebx 10abd6: 83 ec 1c sub $0x1c,%esp 10abd9: 8b 75 08 mov 0x8(%ebp),%esi 10abdc: 8b 7d 0c mov 0xc(%ebp),%edi int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 10abdf: 3b 35 44 31 12 00 cmp 0x123144,%esi 10abe5: 73 11 jae 10abf8 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 10abe7: c1 e6 06 shl $0x6,%esi 10abea: 03 35 f0 77 12 00 add 0x1277f0,%esi rtems_libio_check_is_open( iop ); 10abf0: 8b 46 14 mov 0x14(%esi),%eax 10abf3: f6 c4 01 test $0x1,%ah 10abf6: 75 10 jne 10ac08 10abf8: e8 c7 75 00 00 call 1121c4 <__errno> 10abfd: c7 00 09 00 00 00 movl $0x9,(%eax) 10ac03: e9 a4 00 00 00 jmp 10acac rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10ac08: a8 04 test $0x4,%al 10ac0a: 74 57 je 10ac63 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 10ac0c: 85 ff test %edi,%edi 10ac0e: 74 53 je 10ac63 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 10ac10: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10ac14: 7e 4d jle 10ac63 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 10ac16: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 10ac1d: 7f 44 jg 10ac63 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 10ac1f: 8b 46 3c mov 0x3c(%esi),%eax 10ac22: 83 78 0c 00 cmpl $0x0,0xc(%eax) 10ac26: 75 0d jne 10ac35 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ac28: e8 97 75 00 00 call 1121c4 <__errno> <== NOT EXECUTED 10ac2d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10ac33: eb 77 jmp 10acac <== NOT EXECUTED 10ac35: b2 01 mov $0x1,%dl 10ac37: 31 c0 xor %eax,%eax 10ac39: 31 c9 xor %ecx,%ecx 10ac3b: 89 75 e4 mov %esi,-0x1c(%ebp) * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) 10ac3e: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8) 10ac42: 74 1f je 10ac63 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 10ac44: 83 7c c7 04 00 cmpl $0x0,0x4(%edi,%eax,8) 10ac49: 0f 94 c3 sete %bl 10ac4c: f7 db neg %ebx 10ac4e: 21 da and %ebx,%edx all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 10ac50: 8b 74 c7 04 mov 0x4(%edi,%eax,8),%esi 10ac54: 8d 1c 31 lea (%ecx,%esi,1),%ebx if ( total < old || total > SSIZE_MAX ) 10ac57: 81 fb ff 7f 00 00 cmp $0x7fff,%ebx 10ac5d: 7f 04 jg 10ac63 <== NEVER TAKEN 10ac5f: 39 cb cmp %ecx,%ebx 10ac61: 7d 0d jge 10ac70 rtems_set_errno_and_return_minus_one( EINVAL ); 10ac63: e8 5c 75 00 00 call 1121c4 <__errno> 10ac68: c7 00 16 00 00 00 movl $0x16,(%eax) 10ac6e: eb 3c jmp 10acac * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 10ac70: 40 inc %eax 10ac71: 3b 45 10 cmp 0x10(%ebp),%eax 10ac74: 7d 04 jge 10ac7a 10ac76: 89 d9 mov %ebx,%ecx 10ac78: eb c4 jmp 10ac3e 10ac7a: 8b 75 e4 mov -0x1c(%ebp),%esi } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 10ac7d: 31 db xor %ebx,%ebx 10ac7f: 84 d2 test %dl,%dl 10ac81: 75 51 jne 10acd4 10ac83: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 10ac8a: 8b 55 e4 mov -0x1c(%ebp),%edx 10ac8d: 8b 44 d7 04 mov 0x4(%edi,%edx,8),%eax 10ac91: 85 c0 test %eax,%eax 10ac93: 74 34 je 10acc9 <== NEVER TAKEN continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 10ac95: 52 push %edx 10ac96: 8b 56 3c mov 0x3c(%esi),%edx 10ac99: 50 push %eax 10ac9a: 8b 45 e4 mov -0x1c(%ebp),%eax 10ac9d: ff 34 c7 pushl (%edi,%eax,8) 10aca0: 56 push %esi 10aca1: ff 52 0c call *0xc(%edx) if ( bytes < 0 ) 10aca4: 83 c4 10 add $0x10,%esp 10aca7: 83 f8 00 cmp $0x0,%eax 10acaa: 7d 05 jge 10acb1 <== ALWAYS TAKEN 10acac: 83 cb ff or $0xffffffff,%ebx 10acaf: eb 23 jmp 10acd4 return -1; if ( bytes > 0 ) { 10acb1: 74 0d je 10acc0 <== NEVER TAKEN iop->offset += bytes; 10acb3: 89 c1 mov %eax,%ecx 10acb5: c1 f9 1f sar $0x1f,%ecx 10acb8: 01 46 0c add %eax,0xc(%esi) 10acbb: 11 4e 10 adc %ecx,0x10(%esi) total += bytes; 10acbe: 01 c3 add %eax,%ebx } if (bytes != iov[ v ].iov_len) 10acc0: 8b 55 e4 mov -0x1c(%ebp),%edx 10acc3: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax 10acc7: 75 0b jne 10acd4 <== NEVER TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 10acc9: ff 45 e4 incl -0x1c(%ebp) 10accc: 8b 45 10 mov 0x10(%ebp),%eax 10accf: 39 45 e4 cmp %eax,-0x1c(%ebp) 10acd2: 7c b6 jl 10ac8a if (bytes != iov[ v ].iov_len) break; } return total; } 10acd4: 89 d8 mov %ebx,%eax 10acd6: 8d 65 f4 lea -0xc(%ebp),%esp 10acd9: 5b pop %ebx 10acda: 5e pop %esi 10acdb: 5f pop %edi 10acdc: c9 leave 10acdd: c3 ret